diff options
| author | Peter Fors <peter.fors@mindkiller.com> | 2025-04-05 08:58:12 +0200 |
|---|---|---|
| committer | Peter Fors <peter.fors@mindkiller.com> | 2025-04-05 08:58:12 +0200 |
| commit | f1bd6a7d2f4ffe3e5263e0254bcf7522ab381264 (patch) | |
| tree | e75bde292329f337d619f9a997aab9b17c37e38b /cpu.c | |
| parent | 8c82be43720d9e221a9e2541c9ff6151015838bb (diff) | |
transform to switch case for ppu_tick()
Diffstat (limited to 'cpu.c')
| -rw-r--r-- | cpu.c | 11 |
1 files changed, 3 insertions, 8 deletions
@@ -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); - } |
