fix double cycle when in debug

This commit is contained in:
Will Scullin 2021-03-07 10:35:02 -08:00
parent 2958fe53c1
commit 017e152476
No known key found for this signature in database
GPG Key ID: 26DCD1042C6638CD
1 changed files with 2 additions and 2 deletions

View File

@ -1177,7 +1177,7 @@ export default class CPU6502 {
if (pc === undefined) {
pc = this.pc;
}
const b = this.readByte(pc),
const b = this.readByteDebug(pc),
op = this.opary[b],
size = sizes[op.mode];
let result = toHex(pc, 4) + '- ';
@ -1193,7 +1193,7 @@ export default class CPU6502 {
for (let idx = 0; idx < 4; idx++) {
if (idx < size) {
result += toHex(this.readByte(pc + idx)) + ' ';
result += toHex(this.readByteDebug(pc + idx)) + ' ';
} else {
result += ' ';
}