#MARIO KART WII CODE#
Most of Mario Kart Wii's game code is located inside a relocatable module (StaticR.rel for release builds). Add your new build target to mkwutil/sources.py.Entries must be sorted in the spreadsheet (current limitation).To add a new decompiled section, modify the slice tables:.Do not manually adjust assembly ( asm) files.Listing all symbols that will not be stripped in the FORCEACTIVE directive in (all other symbols get thrown out).The dead-stripping feature can be re-enabled by: Simply commenting out the stripped function would result the string literals from vanishing too. This is very hard to replicate without dead-stripping: In edge cases require carefully controlled use of the dead-stripping feature.įor example: Symbols that were stripped in the initial build retain all string literals. This prevents any content from being dead-stripped. To fix this, the gen_lcf.py script places all objects into the FORCEFILES linker directive. functions) that it considers unused.ĭue to the unique nature of this build system, this would fail and result in all functions being removed. Final results:īy default, the CodeWarrior linker wants to remove any symbols (e.g. build.py to build the game and verify build authenticity. Pytest requires the mkwutil package to be installed in editable mode.
#MARIO KART WII INSTALL#
Pip install -r requirements.txt Unit testing It is recommended to setup a Python virtual environment to simplify workspace setup.Ī venv saves you from installing dependencies system- or user-wide. Place a copy of Mario Kart Wii's PAL binaries:.DocumentationĮvery fully understood piece of reverse engineered data has been documented in a consistent doxygen style. For example: strongly typed null pointers with nullptr and the override specifier. All are define'd out when compiling for C++03.
![mario kart wii mario kart wii](https://cdn02.nintendo-europe.com/media/images/10_share_images/games_15/wii_24/SI_Wii_MarioKartWii_image1600w.jpg)
While the original game was written and compiled as C++03, several modern C++ features have been used to aid readability and increase code quality. Mario Kart Wii currently is the second best-selling game on the Wii, beaten out by Wii Sports, and in turn the best-selling Mario game on the system the game has sold a total of 37.24 million units as of September 30, 2019, making it the best-selling racing video game of all time and the best-selling Mario Kart game. Common sense debug assertions have been added, enforcing unchecked preconditions. While the original access modifiers and trivial encapsulations have been lost to the optimizer, I have reconstructed both to minimize unsafe data exposure. I have written code to be as readable and maintainable as possible. Once all code is decompiled, this setup will build a new executable from scratch, sampling none of the original. This new executable is hashed to ensure it matches the original.
#MARIO KART WII VERIFICATION#
To automate verification of this, a special linker setup is used to emplace compiled code back into the original executable, forming a new executable. The primary priority is to maintain absolute code accuracy. All code in this repository will compile 1:1 to the original game.
![mario kart wii mario kart wii](https://i.ytimg.com/vi/Kye-yj_CN9A/maxresdefault.jpg)
A matching decompilation of Mario Kart Wii.