Skip to content
iHaiDeeZPublic

About

SMW: Super Mario Bros. Wonder Recomp on jailbroken PS4 (GoldHEN). Native static recomp, RADV Vulkan, FSR 1, L3+R3 quick menu, 4 players. Bring your own dump.

Resources

Stars

54 stars

Watchers

4 watching

Forks

Latest commit

 

History

13 Commits

Folders and files

Repository files navigation

SMW, Super Mario Bros. Wonder recomp for PS4

Latest release PS4 homebrew Switch recomp MIT

Super Mario Bros. Wonder, running natively on the PS4.

⬇ Get the latest release · Getting started · Controls · Quick menu · Performance · FAQ · Credits


Overview

SMW brings Super Mario Bros. Wonder Recomp, BelmanteGu's static recompilation of the Switch game, to jailbroken PS4 consoles. There's no emulator: the game's ARM code was translated to C++ ahead of time and compiled for the PS4's CPU, and its NVN graphics run on Vulkan through Mesa's RADV driver, ported to submit work straight to the PS4's AMD GPU.

It installs as an app on the home screen, shows its own boot screen with a progress bar, and plays with up to four DualShock 4 controllers. L3 + R3 opens a quick menu for resolution, FSR upscaling, the frame counter and button mapping.

You bring your own game: nothing copyrighted is in this repository or its releases. No game code, assets or keys.

Highlights

The whole game, natively

  • Upstream's recompiled code, with no interpreter or JIT in between, on the PS4's 7 cores.
  • The game's own audio engine, out through the PS4's speakers at 48 kHz.
  • Saves in /data/SMW/user, kept across updates.

Made for the PS4's hardware

  • FidelityFX Super Resolution 1 renders at a lower resolution and upscales to 1080p, with four quality modes plus native 1080p.
  • Render pipelines and the game's ASTC textures are prepared on spare cores in the background, so new objects don't stall the frame.
  • Submits are pipelined: the CPU starts the next frame while the GPU finishes the last one.

Couch-friendly

  • Up to four players, each on their own DualShock 4 and PS4 user.
  • Any Switch button on any DualShock 4 button, changed from the quick menu while you play.
  • A frame counter, top right, when you want one.

When something goes wrong

  • Logs, crash and freeze reports in /data/SMW, and a one-press diagnostics capture of a whole frame.

The boot screen The quick menu

Getting started

You need: a jailbroken PS4 with GoldHEN (developed on a launch-model PS4), an FTP connection to it, a PC with Windows 10 or 11 (64-bit, 16 GB of RAM recommended, ~50 GB free), and your own Super Mario Bros. Wonder 1.0.0 dump (.nsp or .xci, base game) with your prod.keys and title.keys, all from your own Switch.

SMW Maker makes both halves from your dump: the game data for /data/SMW and your own SMW package. It's a standalone Windows app: no WSL, Python or compilers to install, everything it needs is in its folder.

Making SMW with SMW Maker

  1. Download SMW-Maker-vXX.XX.zip from the releases page and unzip it anywhere.
  2. Open SMW-Maker.exe (it isn't signed: if Windows SmartScreen stops it, press More info, then Run anyway). Press Browse... on each row to pick your dump, prod.keys and title.keys in File Explorer (keys next to the dump are filled in for you) and the output folder. The work folder (about 40 GB, its path without spaces) is filled in for you.
  3. Optionally type your PS4's FTP address (for example 192.168.0.90:2121), then press Start.
  4. Wait while the log and progress bar follow along:
    • The game data (20-40 minutes): upstream's importer decrypts your dump, the game's 12,751 shaders are translated, and an SMW folder is laid out.
    • Your package (an hour or two on most PCs): the game's code is recompiled from your dump and built for the PS4 with the bundled clang 21 and OpenOrbis toolchain into SMW-vXX.XX.pkg. It runs as many compiles at once as fit in the memory that's free when it starts, keeping 2.5 GB for Windows, at a lower priority than your other programs: the PC stays usable, and 8 GB of RAM works (just slower).
  5. With an FTP address, the SMW folder goes to /data/SMW and the package to /data/pkg. Otherwise copy the contents of SMW to /data/SMW and the package to /data/pkg yourself (FileZilla), or press Upload only later. An interrupted upload resumes where it stopped.
  6. Install the package with GoldHEN's Package Installer and start SMW from the home screen.

SMW Maker

The package is built from your dump because its eboot.bin is mostly the game's own code, recompiled. That's why no release can include it, and why you must never share yours. On Linux, or to build it by hand, see docs/BUILDING.md.

Updating SMW: download the newer SMW Maker, untick the game data, build the package again (your dump isn't imported twice) and install it on top of the old one. The game data and your saves in /data/SMW stay.

Controls

DualShock 4 Switch
Cross / Circle A / B
Triangle / Square X / Y
L1 / R1 L / R
L2 / R2 ZL / ZR
OPTIONS +
Touchpad click −
Left / right stick Left / right stick
L3 / R3 Stick buttons
D-pad D-pad
L3 + R3, held The quick menu

Cross confirms, as in every PS4 menu. Prefer Nintendo's layout (A on the right)? Swap them in the quick menu's Controls, or put NX_BUTTONS=nintendo in /data/SMW/config.txt.

The quick menu

Hold L3 + R3 for half a second while playing. The game pauses under the menu; Circle or L3 + R3 closes it, and your choices are saved.

Item What it does Applies
Render resolution Native 1920x1080, FSR Ultra Quality (1476x830), Quality (1280x720, the default), Balanced (1128x634), Performance (960x540), or the game's handheld mode Next start
Upscaling FSR 1, or a plain bilinear stretch At once
FSR sharpness 0 (sharpest) to 2 (none) At once
Frame counter Off, FPS, or FPS and frame time At once
CPU cores Balanced, pinned or spread (see docs/BUILDING.md) Next start
Controls Pick a Switch button, press the DualShock 4 button you want for it At once
Capture a diagnostics frame Saves every pass of the next frame to /data/SMW/diag Next frame
Restart the game now Restarts SMW, to apply the "next start" items

Performance

Measured on a launch-model PS4 in course 1-1, at the default FSR Quality:

Where Frames per second
Menus, world map 60
Courses ~30, the game's own rate when a frame can't make 60

The PS4's CPU is the limit: about 23 ms of each course frame goes to turning the game's NVN commands into Vulkan. FSR Quality or Balanced keeps 30 steadier than native 1080p. The first time an area loads, its pipelines and textures are prepared in the background, so an object can appear a frame or two late. They're kept for next time.

FSR 2 and 3 aren't offered: they need motion vectors and a jittered camera from the game, which Wonder doesn't render, and their GPU cost doesn't fit next to the game on a PS4. FSR 1 works on the finished picture alone.

Your files

Everything lives in /data/SMW/:

  • analysis/, extract/romfs/, spirv/: the game data from SMW Maker (your game, keep it to yourself)
  • user/: your saves
  • config.txt: your settings (NX_<KEY>=<value> lines; the quick menu writes them)
  • pipelines_*.bin: the pipeline cache
  • nx.log, boot-trace.log, crash.log, hang.log: logs and reports for bug reports
  • diag/: diagnostics captures

FAQ

Why isn't there a package to download? The package is the game: its eboot.bin holds Super Mario Bros. Wonder's code, recompiled from a dump. Sharing it would be sharing Nintendo's game, so everyone builds their own from their own copy.

Why does the first start take a while? The boot screen shows the game data loading from the PS4's drive (about 15 seconds once the caches are warm). The first minutes in a new area also prepare pipelines and textures in the background.

The game slows down in busy scenes. The PS4's CPU is the bottleneck. Use FSR Quality or Balanced in the quick menu; on a PS4 Pro, turn on Boost Mode in the PS4's settings.

Something looks wrong or crashes. Make sure the data came from version 1.0.0 of the game and that the whole SMW folder reached /data/SMW. Then open an issue with nx.log, boot-trace.log and crash.log or hang.log from /data/SMW/, the SMW version, your PS4 model and firmware. Never attach game files.

Good to know

  • Only version 1.0.0 of the game is supported, without updates or DLC (upstream's target).
  • Upstream's own settings (NX_*, in its docs/nvn/SWITCHES.md) work in config.txt too.
  • The game's textures (ASTC, which the PS4's GPU can't read) are kept as BC3 since v00.30: a quarter of the memory of plain RGBA8, which long sessions ran out of. NX_ASTC_BC=0 in config.txt keeps them as RGBA8 again (sharper, but expect a crash after a while).
  • Only the original PS4 has been tested so far. PS4 Pro reports are welcome.

Thanks

Everyone involved, with licences, is listed in CREDITS.md.

License and disclaimer

Released under the MIT License, as upstream. See LICENSE. The PS4 runtime pieces come from Resonance, DolphinPS4 and Crema.

This is a fan-made project with no ties to Nintendo, Sony Interactive Entertainment or the upstream project's authors. Super Mario Bros. Wonder and Nintendo Switch are trademarks of Nintendo; PlayStation and PS4 are trademarks of Sony Interactive Entertainment. Please only play games you own. This project won't help you find or share game files or keys.

About

SMW: Super Mario Bros. Wonder Recomp on jailbroken PS4 (GoldHEN). Native static recomp, RADV Vulkan, FSR 1, L3+R3 quick menu, 4 players. Bring your own dump.

Resources

Stars

54 stars

Watchers

4 watching

Forks

Releases

Packages

Contributors

Languages