CPU vectors
From SNESdev Wiki
Jump to navigationJump to search
When an interrupt occurs, the address of the interrupt handler is read from the vector table in bank $00. The vector used is determined by the type of interrupt and the current CPU mode. Vectors are all 16-bit and the target bank is forced to $00.
65C816 mode vectors
Vector | Address | Examples |
---|---|---|
COP | $FFE4-FFE5 | COP instruction |
BRK | $FFE6-FFE7 | BRK instruction |
NMI | $FFEA-FFEB | NMITIMEN vblank interrupt, or 5A22 /NMI input |
IRQ | $FFEE-FFEF | NMITIMEN H/V timer interrupt, or external interrupt (5A22 /IRQ input) |
6502 mode vectors
Vector | Address | Examples |
---|---|---|
COP | $FFF4-FFF5 | COP instruction |
NMI | $FFFA-FFFB | 5A22 /NMI input |
RESET | $FFFC-FFFD | 5A22 /RESET (CPU always resets into 6502 mode) |
IRQ/BRK | $FFFE-FFFF | BRK instruction, or external interrupt (5A22 /IRQ input) |
Unused vectors
The 65C816 also features an ABORT vector at $FFE8-FFE9 and $FFF8-FFF9, but this is not used nor exposed by the 5A22 S-CPU.