Skip to content

nathsou/smb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SMB

Play it online

Static recompilation of Super Mario Bros. using doppelganger's disassembly

SMB C port running in the browser

Controls

  • D-Pad: WASD
  • B: K
  • A: L
  • start: Enter
  • select: Space
  • z: Save state
  • x: Load state

Checkpoints

  • 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

Building

Linux & MacOS

In the root folder:

  1. Clone and build raylib using raylib-quickstart
  2. Run make build
  3. Place a legally obtained dump/ROM of SMB called smb.nes in the root folder to extract graphics data from
  4. You can now run ./smb

WebAssembly

  1. Install a recent version of clang with support for the wasm32 target
  2. Run make wasm
  3. Run an HTTP server in the web/ folder and open index.html in your browser
  4. Select a legally obtained dump/ROM of SMB to extract graphics data from

References & Resources

About

Super Mario Bros. static recompilation in C

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published