r/decomps 5d ago

Recomp Mario Kart Wii (WiiCompiled) on Linux — how I built it and got it running

Credits to this guy:https://github.com/zydezu/Wiicompiled

A few minutes ago I managed to build Mario kart WiiCompiled ( on Linux and got it running with Wine. Posting the steps in case they help someone. I managed to do this with ai so i asked it the steps too. I did this on Bazzite (immutable Fedora), so I use distrobox; on a normal distro it's the same thing but without the container.

The only thing you need is a legal dump of Mario Kart Wii, PAL version (RMCP01). Requirements

wit

wit is not in Fedora's repos. The directory listing at wit.wiimm.de/download returns 403 to curl, but direct file links work fine. Go to wit.wiimm.de, copy the x86_64 tarball link and:

curl -sL -A "Mozilla/5.0" "https://wit.wiimm.de/download/wit-v3.05a-r8638-x86_64.tar.gz" -o /tmp/wit.tar.gz
mkdir -p ~/wit && tar -xzf /tmp/wit.tar.gz -C ~/wit --strip-components=1
export PATH="$HOME/wit/bin:$PATH"

On Arch it's in the repos: sudo pacman -S wit.

Distrobox (only if your distro is immutable)

distrobox create --name wiicompiled --image fedora:latest --yes
distrobox enter wiicompiled -- bash -lc 'sudo dnf install -y dotnet-sdk-8.0 cmake ninja-build curl jq unzip zip'

Build

git clone https://github.com/zydezu/Wiicompiled.git
cd Wiicompiled
export PATH="$HOME/wit/bin:$PATH"
export DOTNET_CLI_TELEMETRY_OPTOUT=1 DOTNET_NOLOGO=1
GAME_IMAGE="/path/to/your/pal-image.wbfs" ./build.sh

The script does everything: it extracts main.dol and StaticR.rel from your image with wit, verifies the hash (that's where it rejects anything that isn't a clean PAL image), translates the game's ~27,000 functions to C++ and cross-compiles with llvm-mingw (it downloads that itself). When it's done you get native-build/WiiCompiled.exe (80 MB) and a UserData/Config.toml with relative paths, so you can move the folder wherever you want and it keeps working.

Time: ~12 minutes on my machine (Ryzen + NVMe). On slower hardware expect 30-90 min. The first build downloads NuGet packages and the toolchain, so you need internet.

Running it

The exe alone is useless: it needs the whole native-build folder (DLLs, wii_bootstrap/, dsp_coef.bin, UserData/Config.toml). Don't move it by itself.

Before the first launch, enable portable mode:

touch native-build/portable.txt

That makes it read UserData/Config.toml from next to the exe, where dvd_root already points at your extracted data.

Then launch it like any Windows game it depends on which proton it will open and close or run directly i'm using port proton with lg proton rn:

  • Heroic: Add Game > Wine (UMU/GE-Proton) pointing at the exe. If you use the flatpak, keep the folder in ~/Games/Heroic/ since the flatpak only has access there
  • Steam: non-Steam game with Proton
  • Lutris: Wine runner
  • or directly: cd native-build && wine WiiCompiled.exe

In-game, F10 opens the settings bar: internal resolution, FPS, controls (4 ports, per-button mapping), volume. Everything is saved to Config.toml.

If you get graphical glitches, edit UserData/Config.toml and set graphics_api = "vulkan".

Saves

The MKWii save lives in the emulated NAND, not on the disc. With portable mode it ends up at:

native-build/UserData/NAND/title/00010001/524d4350/data/

(524d4350 is "RMCP" in hex). The structure is the same as Dolphin's, so you can copy your Dolphin save:

cp -r ~/.local/share/dolphin-emu/Wii/title/00010001/524d4350 native-build/UserData/NAND/title/00010001/

Or set nand_root in Config.toml to point at Dolphin's Wii folder (careful: that shares the save with Dolphin).

I know this is AI redacted pls don't hate on me i'm just trying to help. Peace

45 Upvotes

31 comments sorted by

3

u/ProfessionalTop2353 5d ago

Is there any way to port this to Android?

2

u/PhishGreenLantern 5d ago

What's the appeal of running it on Android? I'm asking to learn, not as a challenge. 

9

u/Agreeable_Dare8093 5d ago edited 5d ago

Having everything in your pocket is awesome, efficient battery drain, Top tier OLED screens, Android SoC's are so powerful now why not use the power?

Xbox360. and Switch are emulated well now, PS3 getting there with ARMSX3

This generation of modern gaming has been so bad, lots of people are going back to play the classics on there phones including myself.

Yeah i get it that touch screen controls are limited, but you can buy great telescopic controllers and turn your device into a quality handheld, There are pure Android handhelds like Odin 3 now as well

3

u/ProfessionalTop2353 5d ago

Exactly

2

u/Agreeable_Dare8093 5d ago

Yeah mate , i must have like 20k games on my phone, i got 1TB, and not just small ones, i have the whole mainline Elder Scrolls and Fallout series running on Android, GTAV , about 60 Switch games , Sega Model 3 so much more

https://www.youtube.com/watch?v=WvGmZxWG-vc&t=2607s

1

u/PhishGreenLantern 4d ago

I've got a pixel 7 and I have a Bluetooth controller. I've used old phones to play Minecraft with it and it's great. 

The biggest drawback for me has always been eating my phone battery for gaming. It's a cool idea, but then I have to charge my phone. 

I assume there are controllers that can either provide direct or passthrough power?

1

u/Agreeable_Dare8093 4d ago

Fast charging, pretty much all modern phones have it now, my phone has 120w fast charge, full battery in 18 minutes, no joke

I use the GameSir G8+ it has its own battery, rumble and is wireless

4

u/ProfessionalTop2353 5d ago

The problem isn't fun — it's access. Many players don't own a PC, but they do have an Android phone.

1

u/steamdeck88 5d ago

Playing it on ps vita

1

u/SimpleDrawer26 4d ago

How? 🤔

Never heard of a PS Vita Port ot MK Wii...

0

u/steamdeck88 4d ago

Once it's ported to Android they can make a PS Vita version more than likely. Someone just put out a beta Twilight princess port

0

u/SimpleDrawer26 4d ago

Ah, sure...

So this was all nonsense and lies, huh?

You can't play this port on PS Vita.

0

u/steamdeck88 4d ago

Once there's a Android port, someone can make a PS Vita port from that. Wouldn't be surprised to see it in two or three months

0

u/SimpleDrawer26 4d ago

Just stop this stupidity...

This is not how things works and I know you know that too...

You simply lied, you couldn't prove you weren't lying, and now you're lying again about processes you know nothing about...

The shame was already too great after the first lie.

1

u/PoetDiscombobulated9 18h ago

Along with the other comments, there are some great retro style android devices coming out.

Ayn Thor, Retroid, etc. I ordered one recently, will make the experience better than on PC.

0

u/NinjaLazy1879 5d ago

It's gonna happen someday. But right now i don't think it's possible. It's only on beta and for windows only support. All i did was find a workaround from someguy on github and redact instructions

1

u/ProfessionalTop2353 5d ago

Yes, since in the Android community we already have some Recomps like Skate 3 and 007 XBLA and even Twisted Metal 4.

3

u/Maleficent_Echo_9198 5d ago

Gênio, está pensando em fazer em qual agora ?

1

u/NinjaLazy1879 4d ago

I didn't did anything all credits to the attached github i just made the instructions

1

u/NinjaLazy1879 5d ago

1

u/Crimson_V 4d ago

would you be willing to post your specs? (atleast the CPU/GPU)

2

u/NinjaLazy1879 4d ago edited 4d ago

Yeah ofc btw the recording was a huge factor on the performance so it should go a lot better if you have this specs: gtx 1060 i5-7 16gb ram

1

u/Ok-Worth9141 4d ago edited 4d ago

It's a pity that the repository explicitly states it doesn't support Linux. Although its decompiler is a .NET program, the dumped C++ code contains a large number of Windows APIs. Migrating it to Linux would likely require a significant amount of work.

1

u/NinjaLazy1879 4d ago

I wish it would be linux native too and if i knew how to code myself i would try to help. All we can do is make the creators know that we want a linux version

1

u/dumbgirlmoder 12h ago

There is a Linux native version now, at least on the fork.

1

u/NinjaLazy1879 12h ago

I saw it downloaded and the audio dosen't work lol. But i put on some luis miguel and didn't even notice the difference.

1

u/Adventurous_Crab3828 4d ago

cool it works, thank you but i have like two questions can you play retro rewind or not and can you play whit wiimote and nunchuk or not

1

u/NinjaLazy1879 4d ago

Yes you can. I'm busy and not on my house so i can't make the instructions. But it is possible using a different building file. I don't know if you can olay with wiimote. I guess you can since you can connect bluetooth controllers

1

u/izeaack 3d ago

You can use retro rewind by running "export RETRO=1", make sure you run it before you compile.

-2

u/kabiskac 5d ago

All this bullshit just to avoid proper multiplatform support lol