emu_nes

An NES emulator for learning how the 6502 and similar computers of the era worked
Log | Files | Refs | README | LICENSE

commit 718f89c9c56ea059f114edbdda098408ec3a6e8f
parent 30fe238d42957a7bb9c055ff9d1f4b3ba9dc3e0e
Author: vin <git@vineetk.net>
Date:   Sun, 30 Jun 2024 09:54:05 -0400

fix incorrect argument for INC

Perhaps a refactor is in order for the arguments to the opcodes.

Diffstat:
Mcpu.c | 3+--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/cpu.c b/cpu.c @@ -1274,7 +1274,7 @@ interpret(void) break; case 0xee: mode = AM_ABS; - arg = opcode_arg(mode); + arg = opcode_mem(mode); inc(arg); cycles += 6; printf("INC"); @@ -1310,7 +1310,6 @@ interpret(void) mem = peek16(regs.pc); deref = peek(mem); arg = opcode_mem(mode); - //jmp(arg); jmp(deref); cycles += 6; printf("JMP");