Skip to content

About

Native AOT hybrid recompilation of Super Mario Land and Super Mario Land DX for Windows, optimized for low-end hardware. Features lightweight Win32 rendering, pixel-perfect scaling, and a portable graphical build tool. Bring your own ROM.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

Super Mario Land Native Collection

English · Español

ROM-free CI

An unofficial, lightweight Windows frontend and hybrid static recompilation toolchain for four editions of Super Mario Land and Super Mario Land 2 (original and DX). Both Land 2 editions are experimental. See collection status and replay instructions. The goal is low resource usage on older PCs. This repository contains the engine, recompilation tools and build scripts, not Nintendo's game, generated game code, ROMs, IPS patches or playable binaries. Bring your own legally obtained files and build locally.

Features

  • Native Win32 x86 executable, targeting i486 instructions and classic GDI / WaveOut APIs.
  • Hybrid ahead-of-time recompilation with interpreter fallback; no JIT.
  • Native 160 × 144 framebuffer with unfiltered adaptive scaling. Original 10:9 aspect ratio or stretch to fit; borderless fullscreen at the current desktop resolution.
  • Monochrome and authentic DX variants. DX uses actual Game Boy Color graphics, not a recoloring filter.
  • Optional light mode (draws every other frame); DX cartridge SRAM autosave.
  • No SDL, ImGui or DirectX dependency in the final Windows game.

Screenshots

Super Mario Land (monochrome)Super Mario Land DX 2.0
Monochrome gameplayDX color gameplay

Gameplay frames cropped and resized from earlier runtime tests; the monochrome image is reduced to four colors. Game artwork belongs to its respective rights holders.

Portable builder

Illustrative reconstruction of the portable builder

Illustration based on the current Windows Forms source, not a live Windows screenshot.

Build on Windows 10/11 x64

  1. Download or clone this repository and extract it into a writable folder.
  2. Open Abrir compilador.cmd (the graphical compiler). No installer or administrator rights needed. The first setup fetches pinned Python and LLVM-MinGW packages from official distributors into .herramientas/; later builds reuse them offline. Approximately 156 MiB of downloads; allow at least 2 GB of free disk space.
  3. Select an edition, both Land 1 editions or Coleccion completa (4 ediciones) and click Compilar. Select your own ROM(s) and the DX 2.0 IPS when prompted. See private inputs and hashes. Alternatively put the files under roms/ using the documented names. For an already-patched DX ROM, place smldx.gbc there before compiling.
  4. The tool generates game-specific C and AOT tables locally and links the selected editions into salida/. The first build can be slower. Select one compiler job on a low-memory PC.
  5. Open salida/Coleccion.exe to choose among installed editions, or open a game EXE directly. Do not publish the generated game files or executables.

The GUI is written in PowerShell/Windows Forms; Abrir compilador.cmd runs it with a process-local execution-policy override. The optional Compilador.exe launcher can be built locally with compilador/build_launcher.py after setting CLANG and LLD_LINK. It is not required or distributed here. The toolchain is portable but the GUI requires Windows PowerShell 5.1 and Windows Forms. The compiler is for modern Windows x64; the games target Win32 x86. Windows 95 is an unverified compatibility target, not a certified supported platform.

Command line

With Python 3, a host C++20 compiler and LLVM Clang / LLD available, place the required inputs in roms/ first:

python compilar.py --game mono --jobs 2
python compilar.py --game dx --jobs 2
python compilar.py --game both --jobs 1
python compilar.py --game sml2dx --jobs 2
python compilar.py --game all --jobs 2

CLANG, LLD_LINK and CXX can override the tool paths. On Windows the host C++ compiler must target x86-64 MinGW (the bundled LLVM-MinGW download supplies the C++ toolchain). --out-dir selects the output directory. Use python preparar_roms.py --game mono or --game dx to generate local sources only. Delete build/local/ to force regeneration. Linux can cross-compile the Win32 game using compatible host C++ and LLVM tools; the GUI is Windows-only.

Controls

Key Action
Arrow keys Move
X A / jump
Z B / run or shoot
Enter Start
Shift Select
P / Esc Pause
F2 Light mode
F3 Original 10:9 / stretch
F11 Fullscreen / windowed

In Land 1 DX, Shift selects OPTIONS, Enter opens it, Shift moves between settings, Z changes the value and Enter closes. Cartridge RAM is saved locally to smldx.sav. Land 2 and Land 2 DX use sml2.sav and sml2dx.sav respectively.

Source layout and verification

  • recomp/: runtime, game frontend glue, vendored static recompiler and retained upstream notices.
  • win95/: native Windows presentation, audio and build script.
  • aot/generate.py: static AOT generator. All within-bank immutable ROM offsets are translated; exceptional execution paths use the interpreter. Private measured RAM profiles are not included; RAM fallback remains available. Advanced developers may supply local aot/mono.trace or aot/dx.trace files from their own profiling. This public edition is not byte-identical to the previous private builds.
  • compilador/: portable build GUI and pinned toolchain manifest.
  • stability/: regression test source and reference digests. python stability/probar-hibrido.py runs Linux host regression tests after preparing both games. It is not a Windows execution test or a full playthrough.
  • roms/, build/local/, generated sources, salida/, and local toolchains are ignored by Git. Never force-add game-derived data.

License and credits

MIT for the authorized engine and modifications; preserve the original notices. See LICENSE, THIRD_PARTY_NOTICES.md and CREDITS.md. This license does not cover Nintendo's games or assets, Toruzz's patch, or locally generated game-derived code. Not affiliated with or endorsed by Nintendo or Toruzz.

Collection quality-of-life

The portable builder includes a hash-checked ZIP import button. Games remember window size, mute, light mode and scaling per edition. F4 displays game-frame/rendered-frame rates; a legacy WinMM controller maps buttons 1–4 to A/B/Select/Start. Battery saves are locked against simultaneous writers. See COLLECTION.md for details and limitations.

Linux (experimental)

Native X11/ALSA frontend without SDL. Build with python3 linux/build.py --game all --jobs 2. See dependencies, controls and limitations.

About

Native AOT hybrid recompilation of Super Mario Land and Super Mario Land DX for Windows, optimized for low-end hardware. Features lightweight Win32 rendering, pixel-perfect scaling, and a portable graphical build tool. Bring your own ROM.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages