mirror of
https://github.com/sehugg/8bitworkshop.git
synced 2024-11-29 14:51:17 +00:00
vcs: fixed readAddress() bug
This commit is contained in:
parent
0bcd828670
commit
108d1ca292
@ -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);
|
||||||
}
|
}
|
||||||
|
@ -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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user