From f1bd6a7d2f4ffe3e5263e0254bcf7522ab381264 Mon Sep 17 00:00:00 2001 From: Peter Fors Date: Sat, 5 Apr 2025 08:58:12 +0200 Subject: transform to switch case for ppu_tick() --- cpu.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'cpu.c') diff --git a/cpu.c b/cpu.c index eb7c837..263ee6e 100644 --- a/cpu.c +++ b/cpu.c @@ -92,13 +92,8 @@ static void cpu_tick(struct nes_state *state) { uint8_t opcode; - // if(cpu->pc <= 0x90cc || cpu->pc >= 0x90e6) { - // printf("%5.5d %4.4x: ", line++, cpu->pc); - // opcode = memory_read(state, cpu->pc++); - // printf("%2.2x a:%2.2x x:%2.2x y:%2.2x p:%2.2x sp:%2.2x cycle: %ld\n", opcode, cpu->a, cpu->x, cpu->y, pack_flags(cpu), cpu->sp, state->cycles); - // } else { - opcode = memory_read(state, cpu->pc++); - // } + // printf("%5.5d %4.4x: ", line++, cpu->pc); + opcode = memory_read(state, cpu->pc++); + // printf("%2.2x a:%2.2x x:%2.2x y:%2.2x p:%2.2x sp:%2.2x cycle: %ld\n", opcode, cpu->a, cpu->x, cpu->y, pack_flags(cpu), cpu->sp, state->cycles); opcode_lut[opcode](state); - } -- cgit v1.2.3