1
0
mirror of https://github.com/sehugg/8bitworkshop.git synced 2024-12-01 13:50:30 +00:00

vcs: fixed readAddress() bug

This commit is contained in:
Steven Hugg 2019-08-26 14:09:42 -04:00
parent 0bcd828670
commit 108d1ca292
2 changed files with 7 additions and 0 deletions

View File

@ -209,6 +209,8 @@ class VCSPlatform extends BasePlatform {
// TODO: shouldn't have to do this when debugging // TODO: shouldn't have to do this when debugging
if (this.lastBreakState && addr >= 0x80 && addr < 0x100) if (this.lastBreakState && addr >= 0x80 && addr < 0x100)
return this.getRAMForState(this.lastBreakState)[addr & 0x7f]; return this.getRAMForState(this.lastBreakState)[addr & 0x7f];
else if ((addr & 0x1280) === 0x280)
return 0; // don't read PIA
else else
return Javatari.room.console.readAddress(addr); return Javatari.room.console.readAddress(addr);
} }

View File

@ -148,6 +148,11 @@ function testPlatform(platid, romname, maxframes, callback) {
assert.equal(maxframes, rec.loadFrame(maxframes)); assert.equal(maxframes, rec.loadFrame(maxframes));
var state2 = platform.saveState(); var state2 = platform.saveState();
assert.deepEqual(state1, state2); assert.deepEqual(state1, state2);
// test memory reads not clearing stuff
for (var i=0; i<=0xffff; i++)
if (platform.readAddress) platform.readAddress(i);
var state3 = platform.saveState();
assert.deepEqual(state2, state3);
// test debug info // test debug info
var debugs = platform.getDebugCategories(); var debugs = platform.getDebugCategories();
for (var dcat of debugs) { for (var dcat of debugs) {