Skip to content

About

Native PC port of Super Smash Bros. Brawl (static recompilation): 4K, widescreen, gamepads, and Wii SD mods (Project+, Project+Ex, REX, Brawl Minus, Legacy XP). Bring your own disc.

Resources

Stars

122 stars

Watchers

6 watching

Forks

Latest commit

 

History

34 Commits

Folders and files

Repository files navigation

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).

Opening Main menu
Character select Stage select
Castle Siege The Subspace Emissary: Kirby
The Subspace Emissary: Kirby vs Mario The Subspace Emissary's first battle
REX's roster A 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)
  • Online play between Brawl Recompiled players (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 ("Build to play", [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; "Build to play" picks the one that runs, and "Vanilla Brawl (no mods)" plays the unmodded game whatever the card holds (no codes and no card). The builds tried, each copied from its Wii (console / "hackless") download into UserData\SD as the folder named here:

Build Card folder Get 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+Ex KingJigglypuff/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.5 Minusery brawlminus.net (Console zip)
Legacy XP 2.11 LegacyXP unofficialsmashlegacy.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 (the title card shows how far it is). Costumes, stages and movesets from Brawl Vault install into a build's pf folder exactly as on a Wii.

Online play

Press F9 in the game (or use Online in the launcher):

  • Host a room for 2 to 4 players: list it publicly, or keep it to friends, who join with its 5-letter room code.
  • Find rooms shows public rooms, rooms on your network and rooms over Tailscale.
  • Join with a code takes a friend's room code (or an IP address).
  • Starting a room hands everyone the host's save and restarts every game into the match together.

Over the internet the games connect directly to each other, with no port forwarding: a free matchmaking server only introduces them (see server/). A few home and mobile connections can't be reached that way; if a code never connects, Tailscale gets around it.

Every player needs the same build: vanilla, or the same mod (the Mods page; online with a mod is new, and works best when everyone's UserData\SD folder is a copy of the same download). The games run in lockstep: each frame's controller input is all that is sent, and the games check every frame that they still match. A player's own controller (port 1) is their player number in the room. Each frame waits for every player's input, so a slow connection adds input delay (2 to 8 frames, picked from the ping when the room starts). Cross-play with Dolphin (Brawl Online, Slippi-style netplay) is not possible: those run an emulator, and the games would not stay in step.

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.

Folder What it is
wiicompiled/translator PowerPC to C++ static recompiler (C#)
wiicompiled/runtime Runtime and Wii SDK HLE (OS, DVD, NAND, SD, WPAD/KPAD, AX audio, VI, GX)
wiicompiled/aurora-main Aurora: Wii GX on WebGPU (Dawn / Direct3D 12)
wiicompiled/projects/brawl This game's project: function map, module layout, code handler, tools
launcher The launcher (WinForms; linux\ is the same pages in Avalonia)
tools Build 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.

About

Native PC port of Super Smash Bros. Brawl (static recompilation): 4K, widescreen, gamepads, and Wii SD mods (Project+, Project+Ex, REX, Brawl Minus, Legacy XP). Bring your own disc.

Resources

Stars

122 stars

Watchers

6 watching

Forks

Releases

Packages

Contributors

Languages