Hysen Labs
Open-source project
mstan/snesrecomp avatar
mstan

snesrecomp

Super Nintendo (SNES) game static recompiler ecosystem · Part of the R.A.I.D. community

63 stars9 forksPythonNOASSERTION
DEEP OPEN-SOURCE ANALYSIS

A static recompiler for SNES games

SNESRecomp translates 65816 code into C and links it to a hardware runtime for native, moddable play.

How the recompiler works

SNESRecomp is a general purpose static recompiler for the Super Nintendo Entertainment System, also called the Super Famicom. Instead of running the game inside a full system emulator, it translates the 65816 machine code of a game into C, compiles that C into a native executable, and links it against a shared SNES hardware runtime. The game CPU therefore runs as native code on the host machine, while the runtime models the hardware around it. The README lists what the runtime emulates: the PPU, the APU, the DSP, DMA, cartridge mapping, and supported enhancement chips. For code that cannot yet be resolved statically, the framework provides a safe interpreter tier, so a game does not have to be fully analyzable to run. This split is the core idea. The parts that can be proven ahead of time run fast as native code, and the parts that need runtime decisions fall back to interpretation. The framework is game agnostic. Each title supplies its own analysis configuration and integration code, while improvements to the shared CPU and hardware model help every project that builds on it. That means a fix in the runtime can raise the quality of several game ports at once, rather than each port carrying its own copy of the same logic.

Features and the game ecosystem

Projects built on SNESRecomp already show a range of features that are hard to get from a traditional emulator. The README names true widescreen views, an Adaptive View mode, versioned mod packages, MSU-1 audio, cross platform builds, launchers, and save states. Each public game lives in its own repository, pins a known framework revision, and ships a ROM free release, so players do not need to supply copyrighted game data to run the port. The README shows a table of examples. Super Mario World is described as believed playable end to end, with 4:3, fixed 16:9, Adaptive View, and MSU-1 audio. The Legend of Zelda: A Link to the Past is shown running with Adaptive View among the example games. Mega Man X is shown running at 16:9. The README is careful to say these projects are still alpha, and it points to each game repository for its supported ROM revision, controls, build instructions, and current validation status. Because the framework is shared, the value is in the reusable runtime and the tooling around it more than in any single shipped title. A modder can target the same analysis and integration hooks that the example games use, and a player benefits from the native speed and the widescreen or audio features without altering the original game's copyrighted assets.

Scope and project status

The README frames SNESRecomp as part of the R.A.I.D. community, which gives some context for where the development energy comes from, though the page itself stays focused on the technical framework. The static recompilation approach trades the breadth of a full emulator for the speed and moddability of native code, and the interpreter tier is what keeps that trade from breaking games that the static pass cannot fully handle. The list of example games is short but spans different genres, which is a useful signal that the framework is not tuned to one title's quirks. The alpha label on the game repositories is an honest warning that controls, supported ROM revisions, and validation status vary per project and should be checked before relying on a specific port. The hardware model covers the major chips a game might use, including enhancement chips, but any game depending on an unmodeled chip would fall back to interpretation or simply not run well. The license field in the metadata is marked NOASSERTION, which means the repository does not carry a standard SPDX identifier, and a potential contributor should read the actual license file in the source before redistributing. The Python primary language reflects the build and analysis tooling, while the runtime and generated code are native and C based.

Editorial conclusion

The project is released under a license marked NOASSERTION in the metadata and is written in Python.

DEEP OPEN-SOURCE ANALYSIS

Official sources

Community notes

Community notes