diff options
| author | Peter Fors <peter.fors@mindkiller.com> | 2025-05-29 19:19:59 +0200 |
|---|---|---|
| committer | Peter Fors <peter.fors@mindkiller.com> | 2025-05-29 19:19:59 +0200 |
| commit | 3d70e69f6c9fbdcb890c6986096330e4f6611a32 (patch) | |
| tree | 9f1ce34365ec376f10f6c6e68c1ca64fa4d4d63d /cpu.c | |
| parent | 7cca3bdbec289328b537c8256b43dcfedc5d56b8 (diff) | |
added mapper_tick() functionality, regressed 200fps, and optimized it back up to ~1940fps
Diffstat (limited to 'cpu.c')
| -rw-r--r-- | cpu.c | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -80,13 +80,10 @@ static inline void check_interrupts(struct nes_state *state) { static inline void cpu_tick(struct nes_state *state) { struct cpu_state * restrict cpu = &state->cpu; - check_interrupts(state); - uint8_t opcode; - // printf("%4.4x: ", cpu->pc); - opcode = memory_read(state, cpu->pc++); + uint8_t 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); } |
