Brawl Recompiled

Brawl Recompiled is a native PC port of Super Smash Bros. Brawl that runs the game as a Windows program with up to 4K resolution and 120 fps frame interpolation.

README

Brawl Recompiled

A native PC port of Super Smash Bros. Brawl (Wii, 2008), made by statically recompiling the game's PowerPC code (main.dol and all 126 .rel modules) to C++ with WiiCompiled. No emulator: the game runs as a Windows program.

Donkey Kong vs the Ice Climbers on Castle Siege, rendered at 4K

Work in progress. What works today: boot, saves, every menu tested so far, VS battles, the attract demos, Classic mode's start, and the Subspace Emissary's opening (cutscenes and the first battle). Project+ and Project+Ex load from the virtual SD card and play matches with their own characters and stages; REX, Brawl Minus and Legacy XP load the same way (see Mods).

Screenshots

Rendered at 4K (shown here at 1080p).

OpeningMain menu
Character selectStage select
Castle SiegeThe Subspace Emissary: Kirby
The Subspace Emissary: Kirby vs MarioThe Subspace Emissary's first battle
REX's rosterA REX match: Ivysaur vs Incineroar

Features

  • Up to 4K, and the game's own 16:9 mode (plus fill-the-window for ultrawide)
  • 120 fps frame interpolation, on by default (it shows on displays faster than 60 Hz; game speed is unchanged)
  • Every gamepad is a GameCube controller (Xbox, PlayStation and Nintendo layouts), the keyboard too; real Wii Remotes over Bluetooth
  • A launcher that installs the game from your own disc image (.iso, .ciso, .wbfs), with the display, controller and mod settings, and Wii / Dolphin save import; it uses the game's own title font, fighters and Smash Ball, taken from your disc when the release is built (tools/make_launcher_art.py)
  • Keyboard and mouse controls for player 1, set up in the launcher or the game's F10 menu
  • Saves in UserData\NAND, compatible in layout with a Wii's
  • A virtual SD card (UserData\SD), so the game's own SD features and SD-based mods work
  • Gecko codes and Project+-style mods (in progress, see below)
  • Windows and Linux

No game data is included: the game's files are read from your own copy of the game.

The launcher

Mods

Brawl mods are installed the way they are on a Wii's SD card:

  • The SD card is the folder Play\UserData\SD. Copy a mod's SD card contents into it (for Project+: the Project+, private and apps folders from the Wii download). At start the game gets a card image built from that folder the way Dolphin builds one (FAT32, the contents plus 512 MiB to 8 GiB of free space; UserData\Cache\sd_card.raw, rebuilt only when the folder changes); files the game writes to the card are copied back into the folder when it exits. A card over 2 GiB is an SDHC card, which Brawl reads only with a mod's SDHC support (Project+ has it). A Dolphin sd.raw placed at UserData\sd.raw is used directly instead.
  • Gecko codes: the RSBE01.GCT of the card folder chosen on the launcher's Mods page ("Codes to load", [mods] sd_codes in Config.toml), else the first folder with one (UserData\SD\Project+\RSBE01.GCT), else UserData\Codes\RSBE01.gct, is installed with USB Loader GX's code handler, honouring a gc.txt beside it (code list address, hook type, pokes) exactly as the mods' own loaders do: the handler runs once before the game's first instruction and then at every frame.
  • Code the codes patch runs in a built-in PowerPC interpreter; everything else stays native. Modules a mod replaces (every fighter in Project+, the character select and the whole melee engine in Project+Ex and REX) run in the interpreter too, at full speed.

Several builds can share one card; "Codes to load" picks the one that runs. The builds tried, each copied from its Wii (console / "hackless") download into UserData\SD as the folder named here:

BuildCard folderGet it from
Project+ 3.2.1 (Knuckles, Mewtwo, Roy, …)Project+projectplusgame.com (Wii "Lite")
Project+Ex 1.7 (BrawlEx: Ridley, Waluigi, Sceptile, Dark Samus, …)P+ExKingJigglypuff/project-plus-ex (Wii zip)
Super Smash REX Release 0½ (PMEX Remix's successor, 100+ fighters)rex_rexbuild.site/downloads (Wii .rar)
Brawl Minus 5.1.5Minuserybrawlminus.net (Console zip)
Legacy XP 2.11LegacyXPunofficialsmashlegacy.weebly.com (Wii)

Only that folder is needed (the downloads' apps, private, codes and loader files are for a real Wii). The card image grows with what is in the folder (REX alone is 8 GB), so the first start after adding a build takes a few minutes while it is built. Costumes, stages and movesets from Brawl Vault install into a build's pf folder exactly as on a Wii.

Building from source

You need Windows, Python 3, 16 GB of RAM and your own disc image (USA, RSBE01). The toolchain is shared with the Super Paper Mario port's toolchain\ folder.

# Extract your disc image to Disc\DATA, then:
copy Disc\DATA\sys\main.dol game\main.dol
# Every module pre-linked at its home, plus main_translate.dol (main.dol with the resident modules and the
# Gecko code handler) for the translation:
python wiicompiled\projects\brawl\tools\build_modules.py Disc\DATA\files\module extras\brawl-decomp\config\RSBE01_02 game\brawl_modules.rel wiicompiled game\main.dol
powershell -ExecutionPolicy Bypass -File tools\build-brawl.ps1 -SkipTools

build-brawl.ps1 translates the game and compiles it into Play\SuperSmashBrosBrawl.exe and Play\engine_usa.dll (-SkipTranslate recompiles only the runtime). The function map comes from the Brawl decompilation, cloned into extras\brawl-decomp.

The release (Brawl Recompiled.exe plus a hidden engine\ folder) is made by tools\build-launcher.ps1 (the launcher, Windows and Linux, with a portable .NET SDK) and tools\package-brawl.ps1 -Zip; tools\build-linux.sh and tools\package-linux.sh make the Linux download in WSL from the same translation.

FolderWhat it is
wiicompiled/translatorPowerPC to C++ static recompiler (C#)
wiicompiled/runtimeRuntime and Wii SDK HLE (OS, DVD, NAND, SD, WPAD/KPAD, AX audio, VI, GX)
wiicompiled/aurora-mainAurora: Wii GX on WebGPU (Dawn / Direct3D 12)
wiicompiled/projects/brawlThis game's project: function map, module layout, code handler, tools
launcherThe launcher (WinForms; linux\ is the same pages in Avalonia)
toolsBuild and packaging scripts

Credits

  • Port: JosiahG
  • WiiCompiled (the recompiler and runtime) by patchzyy and contributors, GPLv3
  • Aurora by Luke Street, MIT; Dawn, SDL3 and the other components listed in wiicompiled/THIRD-PARTY-NOTICES.md
  • Gecko code handler: USB Loader GX's codehandleronly (Gecko OS), GPL
  • FatFs by ChaN (the SD card image), 1-clause BSD
  • Dolphin Emulator for the reference behaviour of the SD slot and data files (DSP coefficients, Wii system files), GPL-2.0-or-later
  • Symbol names from the Brawl decompilation and Dolphin's signature database

License

GPLv3, see wiicompiled/LICENSE. Bundled third-party components keep their own licenses.

Super Smash Bros. Brawl and all related characters are trademarks and copyrights of Nintendo, HAL Laboratory and their respective owners. This is an unofficial fan project, not affiliated with or endorsed by Nintendo. This repository contains no game code or data; the game's disc data is read from your own copy of the game.