SNESRecomp
lastmod 2026-11-18created 2026-11-182 edits
SNESRecomp is a static recompilation framework for Super Nintendo (SNES) games, created by Matthew Stanley (mstan) and maintained together with Retro Porting Toolkit. It translates a ROM's 65816 machine code into C and builds it with a shared SNES hardware runtime to produce a native executable that runs on PC. Unlike an emulator, where you load a ROM and it just runs, it is a tool for growing a porting project by adding analysis configuration and glue code for each game.
About
- Pipeline: the analyzer discovers code, tracks control flow and the 65816 M/X register width state, and resolves indirect branches → the emitter generates C code per function → a regular C compiler builds it together with the shared runner and game-specific code
- Code that cannot be resolved statically, or that is only reached at run time, is handed off to an interpreter layer. The original game logic is the reference, and the design is hybrid low-level: recompiled CPU code drives modeled SNES hardware at the same register boundaries as the cartridge
- Contains no copyrighted game data. Each game port is managed in its own repository, and users supply their own ROM to generate and build it
- Supported cartridges: standard LoROM and HiROM (including FastROM), Capcom Cx4, Super FX (GSU), DSP-1, SA-1, and MSU-1 (opt-in). S-DD1 is experimental, and ExHiROM, SPC7110, DSP-2 to DSP-4, BS-X, and others are not yet supported
- Official ports: 11 games, including Mega Man X, X2, and X3, Super Mario World, The Legend of Zelda: A Link to the Past, Super Metroid, F-Zero, Star Fox, Super Mario RPG, Gundam Wing: Endless Duel, and SimCity. The list also has nearly 40 community ports (Donkey Kong Country 1–3, Doom, Final Fantasy V, Kirby Super Star, and more). Being on the list does not mean the whole game has been verified
- Per-game features: Adaptive widescreen (16:9, 21:9, 32:9) that widens the visible area to match the window aspect ratio, HD Mode 7, local and online co-op with rollback netplay, MSU-1 audio replacement, and save states and rewind
- Runtime translation: the ROM file is left untouched and only text and tiles in memory are replaced. Gundam Wing: Endless Duel supports 10 languages including Korean (Thai is partial)
- Mods are distributed as versioned
.snesmodpackages that contain only data, with no DLLs or native code. For existing ROM hacks, the project recommends reimplementing them as mods against the original ROM rather than recompiling a patched ROM - Components: a Python reference analyzer and C emitter (
recompiler/), a fast analyzer written in Rust (recompiler-rs/), the shared hardware model and interpreter (runner/), and 65816 differential fuzzing (fuzz/). For verification it providessnesref, which compares output against the bsnes and Snes9x libretro cores, and a TCP co-simulation that finds the first divergence between recompiled and interpreted execution - Based on snesrev's zelda3 and smw reverse-engineered ports, LakeSnes, and the SMWDisX disassembly
- Beta. Because the framework API may change, each game project pins a framework revision. The project belongs to R.A.I.D. (Retro AI Development), a Discord community for AI-assisted retro reverse engineering, but the first-port guide is written to be followed without AI
- PolyForm Noncommercial License 1.0.0. Donations and ad revenue are allowed, but access to the software, games, or updates cannot be sold