SuperMarioBros-C
The original game's compiled code translated into a native program for a new platform, usually a PC port.
Based on Super Mario
Links, repository & detailsAbout
Super Mario Bros. is a 1985 NES platform game developed and published by Nintendo, directed by Shigeru Miyamoto, in which Mario (or Luigi in multiplayer) travels through the Mushroom Kingdom to rescue Princess Toadstool from King Koopa. SuperMarioBros-C translates the original Super Mario Bros. NES disassembly (by doppelganger) into C++ using an automated codegen tool, running via an emulation layer for the NES CPU, PPU (video), APU (audio), and controller, built on SDL2. It requires an unmodified "Super Mario Bros. (JU) (PRG0)" ROM file at runtime, since the game's CHR graphics data is pulled from that ROM rather than reimplemented.
How it differs from the original
As a PC build it adds configurable options not present on the original NES hardware, such as adjustable audio sample rate, frame rate, video scale, and toggleable scanline rendering, set via an INI-format config file.
Getting started
Build with CMake (requires a C++11 compiler, Boost, SDL2, Flex, and Bison) to produce the "smbc" executable, then place an unmodified "Super Mario Bros. (JU) (PRG0)" NES ROM file in the working directory, or point to it via the smbc.conf config file, before running.
Known issues & limitations
- Custom palettes may use the 1536-byte format, but emphasis bits beyond the first 192 bytes are not supported.
What you need to run it
Features
- The game looks and plays like the original.
- Audio can be enabled or disabled, and its output frequency can be configured.
- The desired frame rate can be configured.
How to install
- Optionally, configure the program with an INI-format file named `smbc.conf` in the working directory.
Summarised from the project's README.
FAQ
- What is SuperMarioBros-C?
- SuperMarioBros-C is an open-source recompilation of Super Mario. The original game's compiled code translated into a native program for a new platform, usually a PC port. The original game ran on NES.
- Do I need the original game files to run SuperMarioBros-C?
- Yes. The project does not include the original game's assets, so you need your own copy. Requires an unmodified Super Mario Bros. (JU) (PRG0) NES ROM for CHR graphics data.




