Hardware vectors
Hardware vectors are a group of pointers that define how the SNES should handle certain interrupts within the ROM. Each vector is two bytes in size and point to instructions located in bank $00
. The hardware vectors are grouped by the two modes of the SNES: "emulation mode" vectors and "native mode" vectors.
Native mode vectors
These vectors come into play when the SNES runs in native mode (E=0).
ROM address | Vector | Additional notes |
| Unused | |
| Unused | |
| COP vector | Triggered by the COP opcode |
| BRK vector | Triggered by the BRK opcode |
| ABORT vector | Unused by the SNES |
| NMI vector | Triggered by the SNES V-Blank Interrupt |
| Unused | |
| IRQ vector | Triggered by the SNES H/V-Timer or external interrupt |
Emulation mode vectors
These vectors come into play when the SNES runs in emulation mode (E=1).
ROM address | Vector | Additional notes |
| Unused | |
| Unused | |
| COP vector | |
| Unused | |
| ABORT vector | Unused by the SNES |
| NMI vector | |
| RESET vector | Triggered by SNES soft/hard reset |
| IRQ/BRK vector | It's possible to differentiate between the two using the BRK flag |
Example setup
Here's an example setup with the most commonly used vectors, which can be used in homebrew SNES ROMs. Note that the labels must be located in bank $00
(which is located within the same bank as this setup).
Because homebrew programmers generally want to run their program in native mode, all vectors in emulation mode, save for reset, have been ignored. Furthermore, nothing is done with the BRK
and COP
vectors as these are opcodes which generally are unused.
Last updated