PORTCLUB
Cabecera de Dr. Mario
Port nativo

Dr. Mario

Port nativo de Dr. Mario para PC.

Dr. Mario

Port nativo basado en su ficha de origen.

README del repositorio

DrMarioNesRecomp

This recompilation is a byproduct of developing nesrecomp — the games are the proving ground, the framework is the goal. These are in-development previews, not finished ports — expect rough edges, and depth will keep landing over months, not days. My time for any one title is limited, so I ask for your patience. Contributions are welcome — testing, issues, and PRs to the game or framework all help and will accelerate this game's polish. More on the why at: Recomp + AI: 5 Months Later »

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.

Cycle backend migration branch

Default cycle controls: arrows move, Z is A, X is B, Enter is Start and Backslash is Select. Escape opens the menu, Tab fast-forwards, and F8/F9 save/load the cycle state. Use Controls to remap inputs in config.ini. Older keybinds.ini and F5/F6/F7 instructions below apply to the legacy host.

The normal build now uses the cycle CPU backend. Code is generated from the original ROM during configure and stays in the build directory. Run setup.bat or setup.sh to initialize the pinned engine/UI submodules, then configure:

cmake -S . -B build-cycle -DNESRECOMP_ROM="/path/to/Game.nes"
cmake --build build-cycle --config Release --parallel 4

Run the executable with that same ROM path. The launcher verifies the image; the runtime also verifies cartridge metadata and PRG identity. NESRECOMP_ROOT and NESRECOMP_RECOMP_UI can name other checkouts, and cross builds accept NESRECOMP_HOST_COMPILER pointing to a runnable host compiler.

Keep the old generated sources and select them explicitly with -DNESRECOMP_BACKEND=legacy in a separate build directory. Legacy save states cannot be loaded by the cycle backend; its cartridge shortcut slot uses saves/<ROM stem>.cycstate. Preserve existing saves and settings during rollout. Cycle-native comparisons use nesrecomp/tools/cyc/cyc_verify.py; --interp-only runs the cycle interpreter for diagnosis. Earlier --verify / --emulated Nestopia entry points remain in the legacy build.

The owner accepted the short Windows playtest on 2026-10-04. These remain branch previews; no merge or release has been performed. Desktop Windows checks cover a short gameplay route and runtime menu/input/save-state behavior; other platforms and full-game completion have not been validated by this migration.

The USA cycle target uses DRMARIO_REGION=usa and the Japan/USA Rev 1 (Rev A) ROM, headerless CRC32 DE581355, at NTSC timing. The European ROM (9735D267) uses DRMARIO_REGION=eu with proper PAL CPU/PPU/APU clocks and about 50.007 fps. Both region builds default to cycle mode and retain NESRECOMP_BACKEND=legacy. Use separate build directories and each variant's matching original ROM. The PAL branch passed 1,800-frame native/interpreter comparison at all five alignments, independent Mesen gameplay RAM and picture checks, state restoration, and window/shortcut/pacing checks. The owner accepted the EU PAL playtest on 2026-10-04. The old build examples below describe the legacy backend and need -DNESRECOMP_BACKEND=legacy.

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 the usa or eu Windows ZIP from Releases, matching your ROM
  2. Extract and run DrMarioRecomp.exe
  3. Select your matching Dr. Mario ROM when prompted — the path is saved for future launches

Linux users can run the matching DrMario-usa-x86_64.AppImage or DrMario-eu-x86_64.AppImage. No ROM is included in any release asset.

Controls

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

Player 1 (Default)

NES ButtonKeyboard
D-PadArrow keys
AZ
BX
StartEnter
SelectTab

Player 2 (Default)

NES ButtonKeyboard
D-PadW / A / S / D
AK
BL
Start\
SelectRight Shift

Hotkeys

KeyAction
F5Toggle turbo (fast-forward)
F6Save state → quicksave.sav
F7Load state
EscapeQuit

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 initializes the pinned nesrecomp submodule and links the Nestopia oracle core.

The committed generated sources support two independent variants. Build either one by selecting its region at CMake configure time:

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

Select a matching ROM at runtime. Release packages and source control contain no ROM. tools/make_release.ps1 builds both Windows ZIPs; tools/build-all-linux.sh builds both Linux AppImages on Linux.

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 (Europe).nes" --game game.toml
nesrecomp/build/recompiler/Release/NESRecomp.exe "Dr. Mario (Japan, USA) (Rev 1).nes" --game game-usa.toml

# Build the game
cmake --build build-usa --config Release
cmake --build build-eu --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 and game-usa.toml — region-specific recompiler configurations
  • 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

ROMCRC32Status
Dr. Mario (Europe)0x9735D267EU build
Dr. Mario (Japan, USA) (Rev 1)0xDE581355USA build

These CRCs exclude the 16-byte iNES header. The EU generated code remains under generated/dr-mario_*; the USA code is under generated/dr-mario-usa_*.

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

License

For this project's code covered by the PolyForm Noncommercial License, PERMISSIONS.md grants standing permission for voluntary donations, sponsorships, and advertising revenue, including support for broader development initiatives. Payment must not buy access to the software, games built with it, or their updates, features, or game content, including early access.

Matthew Stanley has authority from the relevant copyright holders to grant these permissions for the project's PolyForm-covered code. Third-party components and code explicitly licensed under other terms retain those terms.

PolyForm Noncommercial 1.0.0 — see LICENSE. Third-party components retain their own licenses.


Windows cycle releases: tools/make_release.ps1 -UsaRom <NA-ROM> -EuRom <EU-ROM> creates both regional ZIPs. Linux dual builds use NESRECOMP_USA_ROM and NESRECOMP_EU_ROM; macOS accepts --region usa|eu.

Comentarios (0)

Inicia sesión para dejar un comentario.

Sé el primero en comentar sobre este juego.