show welcome message only on initial redirect

This commit is contained in:
Steven Hugg 2017-04-29 09:23:50 -04:00
parent 0dccb05701
commit 1f45dfdd74
3 changed files with 27 additions and 9 deletions

View File

@ -1,4 +1,6 @@
C COMPILERS
cc65 - A fairly mature C compiler + toolchain for the 6502 family with lots of target cc65 - A fairly mature C compiler + toolchain for the 6502 family with lots of target
platforms and an extensive library. The code generation is platforms and an extensive library. The code generation is
not great, using the AX register pair and a parameter stack for local variables that has to be not great, using the AX register pair and a parameter stack for local variables that has to be
@ -51,12 +53,27 @@ WLA-DX - Some other weird cross-assembler with lots of CPU targets.
z88dk - A Small C-derived cross-compiler for the Z80, supporting 20 target z88dk - A Small C-derived cross-compiler for the Z80, supporting 20 target
machines. machines.
SWEET16 - Woz's tiny bytecode interpreter on the Apple ][ integer BASIC ROM.
Still emcumbered by Apple's copyright for the foreseeable future.
http://6502.org/source/interpreters/sweet16.htm
https://github.com/EtchedPixels/FUZIX/wiki https://github.com/EtchedPixels/FUZIX/wiki
gcc6809 - need to check this out gcc6809 - need to check this out
OTHER COMPILERS
Java Grinder - Compile Java bytecode to microcontroller assembly. Currently
supporting MSP430, dsPIC, 6502/6510, 68000, MIPS, TMS9900, and Z80 with
platforms that include Commodore 64, Sega Genesis, Atari 2600, Apple IIgs,
ChipKit (PIC32), TI99, TI84 and more.
ZX Basic - This cross-compiler is focused on ZX-Spectrum, but with some
patchworking it can be used to compile to whatever machine running on z80
architecture. (Python)
IntyBASIC: a BASIC compiler for Intellivision. IntyBASIC is a cross
compiler that takes BASIC source code and translates it to CP1610 assembler
code. http://nanochess.org/intybasic.html
SWEET16 - Woz's tiny bytecode interpreter on the Apple ][ integer BASIC ROM.
Still emcumbered by Apple's copyright for the foreseeable future.
http://6502.org/source/interpreters/sweet16.htm

View File

@ -43,7 +43,7 @@ var Midway8080BWPlatform = function(mainElement) {
this.start = function() { this.start = function() {
ram = new RAM(0x2000); ram = new RAM(0x2000);
displayPCs = new Uint16Array(new ArrayBuffer(0x2000*2)); //displayPCs = new Uint16Array(new ArrayBuffer(0x2000*2));
membus = { membus = {
read: new AddressDecoder([ read: new AddressDecoder([
[0x0000, 0x1fff, 0x1fff, function(a) { return rom ? rom[a] : 0; }], [0x0000, 0x1fff, 0x1fff, function(a) { return rom ? rom[a] : 0; }],
@ -56,7 +56,7 @@ var Midway8080BWPlatform = function(mainElement) {
var ofs = (a - 0x400)<<3; var ofs = (a - 0x400)<<3;
for (var i=0; i<8; i++) for (var i=0; i<8; i++)
pixels[ofs+i] = (v & (1<<i)) ? PIXEL_ON : PIXEL_OFF; pixels[ofs+i] = (v & (1<<i)) ? PIXEL_ON : PIXEL_OFF;
displayPCs[a] = cpu.getPC(); // save program counter if (displayPCs) displayPCs[a] = cpu.getPC(); // save program counter
}], }],
]), ]),
isContended: function() { return false; }, isContended: function() { return false; },
@ -104,7 +104,7 @@ var Midway8080BWPlatform = function(mainElement) {
var x = Math.floor(e.offsetX * video.canvas.width / $(video.canvas).width()); var x = Math.floor(e.offsetX * video.canvas.width / $(video.canvas).width());
var y = Math.floor(e.offsetY * video.canvas.height / $(video.canvas).height()); var y = Math.floor(e.offsetY * video.canvas.height / $(video.canvas).height());
var addr = (x>>3) + (y*32) + 0x400; var addr = (x>>3) + (y*32) + 0x400;
console.log(x, y, hex(addr,4), "PC", hex(displayPCs[addr],4)); if (displayPCs) console.log(x, y, hex(addr,4), "PC", hex(displayPCs[addr],4));
}); });
var idata = video.getFrameData(); var idata = video.getFrameData();
setKeyboardFromMap(video, inputs, SPACEINV_KEYCODE_MAP); setKeyboardFromMap(video, inputs, SPACEINV_KEYCODE_MAP);

View File

@ -1025,10 +1025,10 @@ function setupDebugControls(){
} }
function showWelcomeMessage() { function showWelcomeMessage() {
if (qs['sharekey']) { if (localStorage.getItem("__lastplatform")) {
localStorage.setItem('8bitworkshop.splash', true); localStorage.setItem('8bitworkshop.splash', true);
} }
else if (!localStorage.getItem("8bitworkshop.splash")) { if (!localStorage.getItem("8bitworkshop.splash") && qs['redir']) {
// OH BOOTSTRAP YOU ARE SO AWESOME A+++++ // 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://stackoverflow.com/questions/28270333/how-do-i-know-which-button-is-click-when-bootstrap-modal-closes
// https://github.com/jschr/bootstrap-modal/issues/224 // https://github.com/jschr/bootstrap-modal/issues/224
@ -1138,6 +1138,7 @@ function startPlatform() {
// try to load last file (redirect) // try to load last file (redirect)
var lastid = localStorage.getItem("__lastid_"+platform_id) || localStorage.getItem("__lastid"); var lastid = localStorage.getItem("__lastid_"+platform_id) || localStorage.getItem("__lastid");
localStorage.removeItem("__lastid"); localStorage.removeItem("__lastid");
qs['redir'] = '1';
gotoPresetNamed(lastid || PRESETS[0].id); gotoPresetNamed(lastid || PRESETS[0].id);
return false; return false;
} }