Mario Kart 64 Exposed by James S

Introduction

Mario Kart 64 was the first and only Mario Kart for the N64 and featured in addition to Mario, his friends and enemies; Luigi, Peach, Toad, Wario, DK, Yoshi, and Bowser. Let's have a look how this game works and see what neat tricks we can come up with.

Note: there are multiple versions of Mario Kart 64 for the different regions so some values mentioned may be different for your version as well as due to regional differences. There are at least five different versions of Mario Kart 64; two Japanese, one USA, and two European versions. I have ID them as follows:

JAP 1.0=Japanese version 1.0

JAP 1.1=Japanese version 1.1

NTSC=USA version 1.0

PAL 1.0=Europe version 1.0

PAL 1.1=Europe version 1.1

Graphics

At first glance the graphics in Mario Kart 64 look very impressive for the time, and although the scenery is rendered in 3D, most of the objects are actually 2D with a billboarding effect. Sure the karts and other characters look nice but up close they appear very blocky.

Graphical effects

It is easy to turn on or off various graphical effects such as the scrolling background, by clearing the flag at (PAL 1.1) 0x800DC5D5 to zero which will show just black for the background. This usually removes the sky but does nothing to the Rainbow road course since it already has a black background.

The HUD which shows the lap number, time, speed etc can be turned on or off using the flag at (PAL 1.1) 0x800DC5D9.

Items

In Super Mario 64 the game would crash if too many items were spawned, but Mario Kart 64 is more clever in that it limits the maximum number of spawned objects to 0x64 (100), although this includes objects already in the course. When, for e.g., you drop an item such as a banana skin, before spawning the item the game checks for available memory in which to place the object's variables.

How many objects there are is remembered by the game so that upon creating the item, it can make sure that there is a spare slot before checking each memory space to see if it is unused. The object structures are very small compared to Super Mario 64 (112 bytes compared to 608 bytes) but at the cost of simplifying the actual objects. Whereas in SM64 each object contained a pointer to the next and previous object, in MK64 a single variable is checked in the object to find out if it is being used or not. This does mean that if there are a lot of objects at once the game could slow down as it checks each slot for availability.

In Time trials mode you start with a triple mushroom item but unlike in other modes there are no item boxes in which to get more items. You can use a code to give yourself more items but what about having an item box in Time trials?

In the above picture you can see Mario in Time trials with various items, one of which is an item box. To get the item box I first set the item select to a fake item box (PAL 1.1 80165FBD 0009). After laying the fake item box and moving out of the way, I went to address 0x8015FF58 for the PAL 1.1 game, and changed the value there of 0x000D to 0x000C (the values are different to the item select).

When I returned to the game the fake item box had transformed into a real item box. This means that for at least the items, the game uses object numbers to determine what the objects look like and how they behave rather than having to change many values to alter an object lke in Super Mario 64. However, on the downside it means the objects are much more limited.

Lakitu

He was famous for controlling the camera in Super Mario 64 but in Mario Kart 64 he (or a relation) counts down to the start of the race, warns you if you're driving the wrong way and fishes you out of water. You may wonder if there is actually more than one Lakitu that helps out especially as often more than one player ends up in trouble. If there is more than one Lakitu there is only one of them for each player, as I will prove:

While racing, change the variable at (PAL 1.1) 0x800DC533 from 3 to 1 which will cause Lakitu to return and start counting down with his traffic lights. When he has gone, drive in reverse so that Lakitu appears holding up his REVERSE sign. Then put the previously mentioned variable back to 1; the Lakitu holding the REVERSE sign will go away, come back with the traffic lights and do the count down and after that, he returns with the REVERSE sign.

This variable, when set to zero restarts the race allowing you to start a race again, but somewhere other than at the start position.

Above you can see that I had restarted the race as I had approached the tunnel. Lakitu flies in with his traffic lights and is caught on the TV above the tunnel's entrance which is something you wouldn't normally see.

Memory Map

Note: I will update this and include other versions.

PAL version 1.1

800DC533 (8-bit?) Controls the Lakitu count down. =0 start/restart race. =1 when Lakitu is coming into view. =2 when Lakitu

is counting down. =3 when Lakitu has finished counting down and goes away.

800DC57D (8-bit?) ? Values other than 0 or 1 glitch up the display.

800DC5D5 (8-bit?) Scrolling background enable. =0 turn off background and show black. =1 turn on background.

800DC5D9 (8-bit?) HUD on/off. =0 off. =1 on.

80150170 (16-bit) How many objects there are (increases such as when drop item and decreases when, for e.g., slip on banana

skin which is then removed).

801643F3 (8-bit?) (GP only? 1P only?) Lap number. =0 lap 1. =1 lap 2. =2 final lap. =3 finished race.

80165FBC (16-bit) 1P item.

8018CFF9 (8-bit?) (GP only? 1P only?) Position. =0 1st. =7 8th.

Races

The variable at (PAL 1.1) 0x801643F3 keeps track of what lap number you are on. Zero means you are on the first lap, 0x01 is lap 2, 0x02 is the final lap and 0x03 ends the race. So it's simple enough to change the value to advance you to another lap or finish it.

The position variable at (PAL 1.1) 0x8018CFF9 remembers how well you are doing. When you are first its value is zero, and when 8th it has the value of 0x07, any higher values cause extra characters or glitched up symbols to appear. The most likely reason that the position is stored as one less is so that it can be used as an index, to select what character is to be displayed.

All content of this and related pages is copyright (c) James S. 2007-2009