New Super Mario Bros. 2 Recompiled — Linux build
New Super Mario Bros. 2 Recompiled is an experimental Linux port of the Nintendo 3DS game built on the RecompOne project.
- Type: PC port
- Game: New Super Mario Bros. 2
- Runs on Linux
- By Okxmir
- Latest release v1.0.0, 2026-11-22
- Source: https://github.com/HassanB48/nsmb2-linux-recompiled
README
New Super Mario Bros. 2 Recompiled — Linux build
Experimental native x64 port of the European Nintendo 3DS release (CTR-P-ABEP), built on Linux
and played through Proton or Wine. The build translates the original ARM and Thumb code to C and
cross-compiles it for x64 with LLVM-MinGW; it reads the original game resources from your own
cartridge image.
The port itself is Okxmir/new-super-mario-bros-2-recompiled (MIT). Its official builder is Windows-only (MSVC / PowerShell). This repository carries the same source snapshot plus the Linux build chain, so the game can be built and played here.
No game files are here. The game's code is recompiled from your own decrypted European cartridge.
Quick start
-
You need Linux x64, your own decrypted European
.3dsimage,python3withPillowandpypng,cmake(3.24+),ninja,curl,unzip,tarandxz, about 7 GB free disk, and internet access for the first build. Proton (Steam) or Wine to play. Details in BUILD.md. -
Put the cartridge image in
roms/next to these files, or name it inrom.txt, or pass it. -
Run:
./play.sh -rom "/path/New Super Mario Bros. 2 (Europe).3ds"The first run downloads the pinned toolchain and dependencies, recompiles the game and builds it (several minutes); later runs start the game straight away.
-
The playable folder is
work/dist. Run it again any time, or./build.sh --rom ...to only build.
With RecompLauncher
The release ships recomplauncher.json, so the launcher sets the game up itself: pick your
cartridge on the game's page, its setup step recompiles it (progress shown), and Play
starts the built game. Settings in the launcher: internal resolution, scaling, widescreen,
HUD size, volume, language, plus VSync, frame interpolation and fullscreen under Advanced.
Add the repository with add a recomp by link if it isn't in the store yet.
Default controls
| 3DS input | Keyboard and mouse | Xbox controller | PlayStation controller |
|---|---|---|---|
| Circle Pad | W, A, S, D (Z, Q, S, D on AZERTY) | Left stick | Left stick |
| D-Pad | Arrow keys | D-Pad | D-Pad |
| A | K | B | Circle |
| B | J | A | Cross |
| X | I | Y | Triangle |
| Y | U | X | Square |
| L | Q (A on AZERTY) | LB | L1 |
| R | E | RB | R1 |
| ZL | 1 (number row) | LT | L2 |
| ZR | 3 (number row) | RT | R2 |
| Start | Enter | Menu | Options |
| Select | Backspace | View | Share / Create |
| Touch screen | Left-click or drag on the lower screen |
PC shortcuts
| Shortcut | Action |
|---|---|
| Tab or right stick click (R3) | Swap the two screens |
| F5 | Cycle adaptive layouts for the current scene in single-screen mode |
| F6 | Toggle adaptive layout |
| F7 | Toggle widescreen |
| F8 | Toggle picture-in-picture |
| F9 | Toggle single-screen mode |
| F10 | Start or stop dumping textures for debugging |
| F11 | Toggle fullscreen |
| F12 | Take a screenshot and save diagnostic logs |
Upscaling
Open Upscaling below the window title (or the launcher at F1) to choose 1×, 2×, 3× or
4× rendering, and the scaling filter. The choice is saved in work/dist/userdata/settings.ini.
On a 4K display, resolution=4 with filter=1 (smooth) looks sharp and still runs at full speed on
a mid-range GPU.
The Linux build
build.sh is the Linux equivalent of the project's scripts/prepare.ps1 + build_game.ps1 +
package.ps1: same stages, same pinned versions and SHA-256 hashes, only the host-side tools differ.
| Upstream (Windows) | Here (Linux host) |
|---|---|
llvm-mingw-20260616-ucrt-x86_64 | llvm-mingw-20260616-ucrt-ubuntu-22.04-x86_64 + cmake/llvm-mingw-toolchain.cmake |
Rust 1.100.0 x86_64-pc-windows-gnullvm builds recomp.exe/ctrx.exe | Linux Rust 1.100.0 builds recomp/ctrx as host tools (memmap2 needs libc on unix) |
SDL3-devel-3.4.0-VC.zip | official SDL3-devel-3.4.0-mingw.zip, with a cmake/SDL3Config.cmake shim for the pinned path |
dxc.exe compiles the LCD shader | linux_dxc 1.8.2505.1 at the same pinned path |
| embedded Python + wheels | host Python + Pillow/pypng |
All of it is pinned in scripts/fetch-deps.sh. The cartridge code.bin
SHA-256 is checked, so a wrong region or revision is refused instead of producing a broken build.
Repository layout
build.sh the Linux builder (all stages)
play.sh RecompLauncher / player entry point (build once, then play)
scripts/fetch-deps.sh pinned dependencies, versions and hashes
cmake/llvm-mingw-toolchain.cmake
source/ the port's source (upstream snapshot, MIT, unmodified)
work/ created by the build: toolchain, generated code, dist/ (git-ignored)
Legal
This repository contains the port's source (MIT) and build scripts only: no game code and no game data. Recompiling requires your own legally obtained copy of New Super Mario Bros. 2 (European release). Nothing is uploaded from your machine.
The port is by Okxmir and contributors (MIT); the recompiler runtime is Clockwork by
watchmakerers (MIT); SDL3, Xbyak, LLVM-MinGW and DXC keep their own licences, copied next to the
built game and in source/licenses/. See LICENSE and NOTICE.md.