This wiki documents the inner workings of Mario Kart 64 and how to extract, render, and modify its courses.
- F3DEX: The RSP microcode program used by this game to render graphics. The game's "models" are mainly "programs" interpreted by this microcode, so you'll need to learn how it works.
- MIO0: The compression format used by this game (and many other N64 games).
- Level Data in ROM: Describes how the game finds, loads, and prepares the resources for each track.
- Compressed Display Lists: Describes a secondary compression format used for this game's models.
- Surface Map: Describes how the game generates collision-detection models from the track models.
- Objects: Describes how item boxes, trees, and various obstacles are placed on each track.
- Course Paths: Describes how the race course is defined.
- Track Rendering: How it all comes together to create the final scene.
- Battle Mode: some information about how this mode works.
- Cup Order: how the tracks are ordered in-game.
- Gameshark Codes and ROM Patches that can be useful while hacking.
- How the Sky color is defined.
- The game's CPU Threads.
- How to display the Crash Screen.
- Most of this information was reverse-engineered by myself over the years.
- Thanks to BGNG for helping figure out MIO0.
- Much information about how F3DEX works comes from various N64 emulators' graphic plugin source codes.
- Probably a lot of people I've forgotten.
I hope this data will be useful for modding this amazing game. I've kept it to myself for quite a while for a few reasons; partly because I felt it wasn't "finished enough", because it was a disorganized mess, and because of a lack of place to publish it.
This game uses a lot of hardcoded offsets and code for each track. My plan (which I've never implemented) was to replace these with a small block of track parameters (or even some simple bytecode, to allow for more complex rules like "don't load this object in 4-player mode", like Moo Moo Farm does), which could be stored in one of the RSP segments and pointed to by the unused header field. The way this game is designed makes it difficult to modify, but also allows for a lot of potential for very interesting mods.