mirror of
https://github.com/sehugg/8bitworkshop.git
synced 2026-11-22 04:28:05 +00:00
nes: fix write() bug
This commit is contained in:
1 parent
b49d273d10
commit
54cd3e4823
5 files changed
+35
-4
No files matched your search
@@ -107,6 +107,11 @@ class JSNESMachine {
|
||||
loadState(s) { this.p.loadState(s); }
|
||||
read(a: number) { return this.p.readAddress(a); }
|
||||
readConst(a: number) { return this.p.readAddress(a); }
|
||||
// for the debugger: RAM, or the mapper, without cpu.write()'s bus cycle
|
||||
write(a: number, v: number) {
|
||||
if (a < 0x2000) this.p.nes.cpu.mem[a & 0x7ff] = v;
|
||||
else this.p.nes.mmap.write(a, v);
|
||||
}
|
||||
connectProbe(probe: ProbeAll) { this.p.connectProbe(probe); }
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user