Skip to content

Mario Kart DS (EU) decompilation project: documentation, ASM-hacking and other tools (work-in-progress)

License

Notifications You must be signed in to change notification settings

XorTroll/mkdsdecomp

Repository files navigation

Mario Kart DS (EU) decompilation project

(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

YouTube video showcasing an ASM-hack injection of a custom scene with custom dialogs

drawing

drawing

Screenshots of the online save editor

Decompilation progress

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.

Tools (fun stuff)

While the game is not fully decompiled, we can still have some fun and get something useful from the already documented formats/code ;)

Save editor

Reversing save-data formats and encryption/decryption allowed me to create an almost fully-featured online Mario Kart DS save editor:

drawing

drawing

drawing

drawing

drawing

drawing

ASM-hacking

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.

Command-line utility

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

Code decompilation

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.

Credits

About

Mario Kart DS (EU) decompilation project: documentation, ASM-hacking and other tools (work-in-progress)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published