Skip to content

mstan/DrMarioNesRecomp

Repository files navigation

DrMarioNesRecomp

Static recompilation of Dr. Mario (NES) for native PC. Built with the NESRecomp framework.

Status: Playable. Title screen, options menu, and gameplay are functional. 1-player mode tested through virus clearing. If you find a bug, please open an issue.

Acknowledgments

Function coverage and game logic analysis made possible by the dr-mario-disassembly by Nostaljipi.

What Works

  • Title screen
  • Options menu (level, speed, music type selection)
  • 1-player gameplay with virus placement and pill dropping
  • Palette and CHR bank switching (all 4 CHR ROM banks)
  • Music playback (Fever, Chill, Off)

Quick Start

  1. Download DrMarioNesRecomp-windows-x64.zip from Releases
  2. Extract and run DrMarioRecomp.exe
  3. Select your Dr. Mario (USA) ROM when prompted — the path is saved for future launches

Controls

Controls are fully configurable via keybinds.ini, auto-generated next to the executable on first run.

Player 1 (Default)

NES Button Keyboard
D-Pad Arrow keys
A Z
B X
Start Enter
Select Tab

Player 2 (Default)

NES Button Keyboard
D-Pad W / A / S / D
A K
B L
Start \
Select Right Shift

Hotkeys

Key Action
F5 Toggle turbo (fast-forward)
F6 Save state → quicksave.sav
F7 Load state
Escape Quit

Building from Source

Requires Visual Studio 2022 and CMake 3.20+.

git clone https://github.com/mstan/DrMarioNesRecomp
cd DrMarioNesRecomp

# Windows
setup.bat

# Linux / macOS
chmod +x setup.sh && ./setup.sh

This clones nesrecomp at the exact version pinned in nesrecomp.pin and links the Nestopia oracle core.

Then build:

cmake -S . -B build -G "Visual Studio 17 2022" -A x64
cmake --build build --config Release

Place your Dr. Mario (USA).nes ROM in the build directory or select it at runtime.

Regenerating from ROM

# Build the recompiler (one time)
cmake -S nesrecomp/recompiler -B nesrecomp/build/recompiler -G "Visual Studio 17 2022" -A x64
cmake --build nesrecomp/build/recompiler --config Release

# Generate C code from ROM
nesrecomp/build/recompiler/Release/NESRecomp.exe "Dr. Mario (USA).nes" --game game.toml

# Build the game
cmake --build build --config Release

Architecture

This is a static recompiler, not an emulator. The original 6502 machine code is translated to C at build time, then compiled to native x64. The NES PPU, APU, and mapper are simulated by the runner library.

  • game.toml — recompiler configuration (TOML format, inspired by N64Recomp)
  • game.cfg — legacy configuration (same directives, text format)
  • extras.c — game-specific hooks (CRC32 verification, debug server)
  • generated/ — auto-generated C code (do not edit manually)
  • nesrecomp/ — framework submodule (NESRecomp)
  • keybinds.ini — auto-generated controller bindings (edit to customize)

ROM Compatibility

ROM CRC32 Status
Dr. Mario (USA) 0x9735D267 Supported

Known Limitations

  • 2-player mode is untested (keyboard controls for P2 are mapped but gameplay is unverified)
  • Audio may sound slightly faster than original hardware in some configurations
  • Level completion cutscenes and ending sequences are untested

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages