(Please keep in mind that this project is heavily work-in-progress)
This project is working towards a decompilation of the European version of Mario Kart DS (game code AMCP
).
While the long-term goal of this project is to 100% document and understand it, there are interesting short-term goals that motivate work on reversing this game: ASM-hacking, better understanding of yet not fully documented DS/MKDS formats, additional tools (like a save editor):
YouTube video showcasing an ASM-hack injection of a custom scene with custom dialogs
Screenshots of the online save editor
Progress can be tracked in some way by the generated headers and symbols, since all unknown types and functions are slowly being named and documented as they are better understood, and since I cannot just push my IDA database :P
I am slowly putting together a documentation of the understood game parts, which shows more in-depth details of game logic. You may build it yourself, it's made using MkDocs and the Material theme.
While the game is not fully decompiled, we can still have some fun and get something useful from the already documented formats/code ;)
Reversing save-data formats and encryption/decryption allowed me to create an almost fully-featured online Mario Kart DS save editor:
Check out the ASM-hacking examples for more detailed information on how to inject custom code in MKDS, using the reversed functions/types in this project.
For practical purposes (to make my life easier) I made a simple command-line tool, mkdsutil, in order to work with several MKDS formats in a more straightforward way (better than staring into a hex editor).
It currently has the following features:
-
Decrypt and/or encrypt save data
-
Print info/fields of decrypted save data
You will need [CMake] in order to compile it, without any external dependencies other than standard C++.
As more game logic gets fully documented, libntr serves as a (long-term) work-in-progress reimplementation of Nintendo's SDK code/libs, while mkds contains actual MKDS-specific code... as long as I'm able to tell them apart ;)
(These libraries are not really useful right now, and they might not even compile correctly as some stuff is only partially implemented)
Note that this is the long-term, low-priority part of the project, since different parts of the code are really, really dependant on each other, and thus not much can reliably be done until many parts of the game code are (almost) fully understood.
For practical uses, there are common sources used by the tools in this project mentioned above.
-
GBATEK for its great (although sometimes limited/outdated) DS docs
-
mkds-asm containing some basic reference MKDS RE work
-
Existing MKDS decomp headers for being a great reference for so many internal structs and types
-
Super Mario Wiki for allowing me to understand some basic gameplay aspects without having to spend hours playing or watching gameplay footage :P
-
Pokémon Diamond decompilation as a helpful reference for already (partially) understood DS SDK code
-
'Hacking Nintendo DS' EnHacklopedia page as the only (and great) specifications I found regarding DS cheat codes
-
NCPatcher as a great tool for simplifying the process of making DS ASM hacks
-
Custom Mario Kart Wiiki for providing me some understanding of WFC-related fields and data