SNES tooling for Ghidra.
This project provides a Ghidra extension for loading and working with SNES ROMs. It currently includes:
- a SNES ROM loader
- a 65816 language specification tailored for SNES analysis
- SNES memory helpers (MMIO, WRAM, mirrors) and register/vector labels
The loader maps SNES ROMs into the SNES CPU address space at import time instead of treating them as raw binary blobs.
Supported mappings (canonical):
- LoROM:
80–FF:8000–FFFF - HiROM:
C0–FF:0000–FFFF - WRAM:
7E–7F:0000–FFFF - SNES MMIO register ranges
ROM mapping detection is score-based and compares LoROM and HiROM header candidates. It also supports optional 0x200-byte SMC header adjustment.
The loader creates primary (canonical) ROM banks and required mirror banks (00:0000-5FFF for SNES system RAM & I/O, and 00:8000-FFFF for ROM). Other mirrors can be managed by the (coming next) plugin UI.
Loader implementation:
src/main/java/ghidra_snes/loader/SnesRomLoader.java
- ✅ LoROM: Supported.
- ✅ HiROM: Supported.
- ✅ ExHiROM: Supported.
- ✅ SA-1: Supported.
- ✅ GSU-n: Supported.
- ✅ Capcom CX-4: Supported.
- ✅ DSP-n: Supported.
- ✅ OBC1: Supported.
⚠️ S-DD1: Partial support. Canonical ROM views are available, but some mappings currently differ from emulator behavior.⚠️ SPC7110: Partial support. Canonical ROM views are available, but some mappings currently differ from emulator behavior.
More details: Functional tests
The extension includes a SNES-oriented 65816 language definition:
- language id:
65816:LE:24:snes - compiler spec:
default
This allows imported ROMs to use native 24-bit 65816 addressing directly in Ghidra.
Set GHIDRA_INSTALL_DIR to your local Ghidra install and run:
GHIDRA_INSTALL_DIR=/path/to/ghidra ./gradlew clean buildExtensionThe built extension zip will be created in dist/.
- Open Ghidra.
- Go to File → Install Extensions...
- Click + and select the zip from
dist/. - Restart Ghidra.
When importing a ROM, select the SNES ROM Loader format.
-
This project includes code originally sourced from ghidra-65816, licensed under the MIT License. Parts of the codebase, notably the 65816 language specification, are derived from that repository, with modifications for compatibility, fixes, and integration.
-
Parts of the SPC7110 checksum behavior were implemented based on observations from SuperFamiCheck, licensed under the MIT License.
- A lot of informations about the SNES Memory Map was taken from the SNESDev Wiki.
- The SNES register list is based on undisbeliever's Register Cheat Sheet.
- The Super Famicom logo icon is sourced from Wikimedia Commons. It is considered to be in the public domain due to lack of originality, but may still be subject to trademark laws.
- One test ROM embeds the complete text of Aleph One's famous Smashing The Stack For Fun And Profit, originally published in Phrack 49, for testing and debugging purposes.
Special thanks to Near (formerly known as byuu), whose contributions to SNES documentation, emulation, and preservation have had a lasting impact on the community.
