From 017e152476ae106a32809b3353bce9f112274604 Mon Sep 17 00:00:00 2001 From: Will Scullin Date: Sun, 7 Mar 2021 10:35:02 -0800 Subject: [PATCH] fix double cycle when in debug --- js/cpu6502.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/cpu6502.ts b/js/cpu6502.ts index 113f239..dcfd914 100644 --- a/js/cpu6502.ts +++ b/js/cpu6502.ts @@ -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 += ' '; }