#602·jsnes

CPU: IRQ and reset interrupt handlers missing proper cycle timing

Author: bfirshCreated Feb 28, 2026Updated Feb 28, 2026
Labelsbugpriority: mediumdifficulty: mediumcomponent: cpuaccuracy

Summary

doIrq() missing dummy read PPU cycles

doNonMaskableInterrupt() correctly has 2 dummy PPU steps at the start (cycles 1-2 of the interrupt sequence), but doIrq() jumps straight to pushing the return address. The PPU is 6 dots short during IRQ handling.

doResetInterrupt() incomplete

Missing:

  • 3 dummy push cycles (stack pointer decrement without writing)
  • I flag set to 1
  • 5 of the 7 PPU step cycles (only has the 2 for vector fetch)

These affect PPU-CPU synchronization during interrupts.

References