Static recompilation of Super Mario Bros. using doppelganger's disassembly
- D-Pad: WASD
- B: K
- A: L
- start: Enter
- select: Space
- z: Save state
- x: Load state
- Static translation of the disassembly to low-level C
- PPU & APU emulation layers
- Convert subroutines to C functions
- Convert most gotos to if statements
- Remove unused flag updates
- Replace PPU with direct draw calls
- Manually rewrite portions of the code to higher level C
In the root folder:
- Clone and build raylib using raylib-quickstart
- Run
make build
- Place a legally obtained dump/ROM of SMB called
smb.nes
in the root folder to extract graphics data from - You can now run
./smb
- Install a recent version of
clang
with support for thewasm32
target - Run
make wasm
- Run an HTTP server in the
web/
folder and openindex.html
in your browser - Select a legally obtained dump/ROM of SMB to extract graphics data from