1
0
mirror of https://github.com/sehugg/8bitworkshop.git synced 2024-11-21 23:30:58 +00:00

no splash screen when sharekey present

This commit is contained in:
Steven Hugg 2017-04-27 07:48:59 -04:00
parent 9ae40b58c9
commit 0dccb05701
4 changed files with 37 additions and 2 deletions

BIN
favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

View File

@ -597,6 +597,7 @@ var BaseZ80Platform = function() {
this.getToolForFilename = function(fn) {
if (fn.endsWith(".c")) return "sdcc";
if (fn.endsWith(".s")) return "sdasz80";
if (fn.endsWith(".ns")) return "naken";
return "z80asm";
}
this.getDefaultExtension = function() { return ".c"; };

View File

@ -1025,7 +1025,10 @@ function setupDebugControls(){
}
function showWelcomeMessage() {
if (!localStorage.getItem("8bitworkshop.splash")) {
if (qs['sharekey']) {
localStorage.setItem('8bitworkshop.splash', true);
}
else if (!localStorage.getItem("8bitworkshop.splash")) {
// OH BOOTSTRAP YOU ARE SO AWESOME A+++++
// https://stackoverflow.com/questions/28270333/how-do-i-know-which-button-is-click-when-bootstrap-modal-closes
// https://github.com/jschr/bootstrap-modal/issues/224

View File

@ -887,6 +887,37 @@ function preprocessMCPP(code, platform) {
return {code:iout};
}
function assembleNAKEN(code, platform) {
load("naken_asm");
var errors = [];
var match_fn = makeErrorMatcher(errors, /Error: (.+) at (.+):(\d+)/, 3, 1);
var Module = naken_asm({
noInitialRun:true,
//logReadFiles:true,
print:match_fn,
printErr:print_fn
});
var FS = Module['FS'];
//setupFS(FS);
FS.writeFile("main.asm", code);
Module.callMain(["-l", "-b", "main.asm"]);
try {
var aout = FS.readFile("out.bin", {encoding:'binary'});
var alst = FS.readFile("out.lst", {encoding:'utf8'});
//console.log(alst);
// 0x0000: 77 ld (hl),a cycles: 4
var asmlines = parseListing(alst, /^0x([0-9a-f]+):\s+([0-9a-f]+)\s+(.+)cycles: (\d+)/i, 0, 1, 2, 3);
return {
output:aout,
errors:errors,
lines:asmlines,
intermediate:{listing:alst},
};
} catch(e) {
return {errors:errors};
}
}
var TOOLS = {
'dasm': assembleDASM,
'acme': assembleACME,
@ -897,7 +928,7 @@ var TOOLS = {
'sdasz80': assemblelinkSDASZ80,
'sdcc': compileSDCC,
'xasm6809': assembleXASM6809,
//'nakenz80': assembleNAKEN_Z80,
'naken': assembleNAKEN,
}
var TOOL_PRELOADFS = {