From b749d58de692c25e2bdb92f3121aded9ef9149d4 Mon Sep 17 00:00:00 2001 From: Steven Hugg Date: Tue, 28 Jan 2020 09:50:38 -0600 Subject: [PATCH] fixed a couple sentry bugs --- doc/notes.txt | 8 ++++++++ src/platform/vector.ts | 6 +++--- src/platform/verilog.ts | 2 +- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/doc/notes.txt b/doc/notes.txt index b5f5e640..77fb806e 100644 --- a/doc/notes.txt +++ b/doc/notes.txt @@ -384,3 +384,11 @@ Emulator Lib - VCS - NES - MAME + +Markdown (showdown) interface +- add code patches to files +- cursor shows current state/errors (must map markdown->src lines) +- show preview emulator at each step (play button? run when viewed?) + + + diff --git a/src/platform/vector.ts b/src/platform/vector.ts index a0abd6a5..661c95bf 100644 --- a/src/platform/vector.ts +++ b/src/platform/vector.ts @@ -75,7 +75,7 @@ var AtariVectorPlatform = function(mainElement) { [0x2400, 0x2407, 0x7, function(a) { return switches[a+8]; }], [0x4000, 0x4fff, 0xfff, function(a) { return dvgram.mem[a]; }], [0x5000, 0x5fff, 0xfff, function(a) { return vecrom[a]; }], - [0x6800, 0x7fff, 0, function(a) { return rom[a - 0x6800]; }], + [0x6800, 0x7fff, 0, function(a) { return rom ? rom[a - 0x6800] : 0; }], ], {gmask:0x7fff}), write: newAddressDecoder([ @@ -224,7 +224,7 @@ var AtariColorVectorPlatform = function(mainElement) { //[0x7000, 0x7000, 0, function(a) { /* EAROM read */ return 0; }], //[0x8940, 0x897f, 0x3f, function(a) { /* EAROM data */ return 0; }], [0x8900, 0x8900, 0, function(a) { /* EAROM read */ return earom_data; }], - [0x9000, 0xffff, 0xffff, function(a) { return rom[a - 0x9000]; }], + [0x9000, 0xffff, 0xffff, function(a) { return rom ? rom[a - 0x9000] : 0; }], ]), write: newAddressDecoder([ @@ -373,7 +373,7 @@ var Z80ColorVectorPlatform = function(mainElement, proto) { bus = { read: newAddressDecoder([ - [0x0, 0x7fff, 0, function(a) { return rom[a]; }], + [0x0, 0x7fff, 0, function(a) { return rom ? rom[a] : 0; }], [0x8000, 0x800f, 0xf, function(a) { return switches[a]; }], [0x8100, 0x810f, 0xf, function(a) { return mathram[a]; } ], [0xa000, 0xdfff, 0x3fff, function(a) { return dvgram.mem[a]; }], diff --git a/src/platform/verilog.ts b/src/platform/verilog.ts index ca9dad73..6aa5a046 100644 --- a/src/platform/verilog.ts +++ b/src/platform/verilog.ts @@ -371,7 +371,7 @@ var VerilogPlatform = function(mainElement, options) { timerCallback = () => { if (!this.isRunning()) return; - gen.switches = switches[0]; + if (gen) gen.switches = switches[0]; this.updateFrame(); }; this.setFrameRate(60);