Memory addresses for Super Mario 64 DS (ROM Super Mario 64 DS (U) (V1.0).nds)

(Note: On this page, the dollar sign ($) indicates hexadecimal.
Unfortunately, most of the interesting information is not at a fixed address; it changes as you move from one area to another. (In very limited testing, the address is always the same in a given area, but I'm not sure that's always true.)
So the first address you need is $02097490. This holds a 4-byte pointer to the base of most of the interesting addresses. For instance, in the castle grounds when you first start the game, at $02097490 you will find the value $02169718. Then at $02169718+$98 is the character's speed. But once you get into the castle, $02097490 holds $217ab38, and the character's speed is at $217ab38+$98.
So I will refer to the contents of $02097490 as "base", and give the addresses as "base+$...".
These are the addresses that have been decoded so far:
addresssize (bytes)description
base+$81which character are you playing with (Mario: 0, Luigi: 1, Wario: 2, Yoshi: 3)
(I haven't tested what this does when you put on a cap)
base+$5c4character X
base+$604character Y (SM64DS uses a coordinate system where the Y axis points up)
base+$644character Z
base+$8e2character model angle (see below)
base+$942character motion angle (see below)
base+$984character speed
base+$a44character X velocity (I think X and Z velocity are derived from the speed and direction)
base+$a84character Y velocity (when you're on the ground, this is always -32768)
base+$ac4character Z velocity
base+$37012I think these have to do with what mode you're in
(walking/jumping/swimming/crouching/etc.)
0217B1D42Bowser revolution speed, the higher it is the faster you’re spinning him.
021764644Water level in the basement. Not fully tested, useful for hacking the 30 stars door skip to be easier.
0209CDF04RNG. Changes every frame, manipulable with input.
The following are actually less than base; this means they are probably in a separate object, so they might not always be at the same place relative to base (although they are consistent in limited testing).
addresssizedescription
base-$12c4camera X
base-$1284camera Y
base-$1244camera Z
base-$3a2camera up/down angle
Angles are a 2-byte value that use the full range from 0-65535 and then wrap (so an angle of 65535 is almost the same as an angle of 0). The character model angle controls what angle the character is drawn on the screen, I think (I suspect this also controls the direction of Yoshi's tongue, etc.); the character motion angle controls what direction the character is moving. When you're going in a straight line (or nearly a straight line) then the two angles are the same; when you're turning rapidly, the model angle lags behind the motion angle.
Unknown module GameFooter

GameResources/DS/SuperMario64DS last edited by ALAKTORN on 10/31/2011 7:26 PM
Page History Latest diff List referrers View Source