diff --git a/cpu.c b/cpu.c index a3b622e..8df2bf9 100644 --- a/cpu.c +++ b/cpu.c @@ -875,10 +875,10 @@ interpret(void) printf("$%02X", arg); break; case AM_ZP_X: - printf("$%02X,X", arg); + printf("$%02X,X @ %02X", peek(regs.pc - 1), arg); break; case AM_ZP_Y: - printf("$%02X,Y", arg); + printf("$%02X,Y @ %02X", peek(regs.pc - 1), arg); break; case AM_REL: case AM_ABS: @@ -891,7 +891,7 @@ interpret(void) printf("$%04X,Y @ %04X", (uint16_t)(arg - regs.y), arg); break; case AM_IND: - printf("($%04X) = %04X", arg, peek16(arg)); + printf("($%04X) = %04X", peek16(regs.pc - 2), arg); break; case AM_IND_X: printf("($%02X,X) @ %02X = %04X", peek(regs.pc - 1), (peek(regs.pc - 1) + regs.x) & 0xFF, arg); @@ -900,6 +900,8 @@ interpret(void) printf("($%02X),Y = %04X @ %04X", peek(regs.pc - 1), (uint16_t)(arg - regs.y), arg); break; case AM_ACC: + printf("A "); + break; case AM_NONE: printf(" "); break; @@ -927,6 +929,8 @@ interpret(void) break; case AM_ZP_X: case AM_ZP_Y: + spaces -= 3; + break; case AM_REL: case AM_ABS: spaces += 2;