TASVideos

Tool-assisted game movies
When human skills are just not enough

Game Resources / DS / Super Mario 64DS

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:

address size (bytes) description
base+$8 1 which 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+$5c 4 character X
base+$60 4 character Y (SM64DS uses a coordinate system where the Y axis points up)
base+$64 4 character Z
base+$8e 2 character model angle (see below)
base+$94 2 character motion angle (see below)
base+$98 4 character speed
base+$a4 4 character X velocity (I think X and Z velocity are derived from the speed and direction)
base+$a8 4 character Y velocity (when you're on the ground, this is always -32768)
base+$ac 4 character Z velocity
base+$370 12 I think these have to do with what mode you're in
(walking/jumping/swimming/crouching/etc.)
0217B1D4 2 Bowser revolution speed, the higher it is the faster you’re spinning him.
02176464 4 Water level in the basement. Not fully tested, useful for hacking the 30 stars door skip to be easier.
0209CDF0 4 RNG, 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).

address size description
base-$12c 4 camera X
base-$128 4 camera Y
base-$124 4 camera Z
base-$3a 2 camera 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.


See also



Combined RSS Feed
GameResources/DS/SuperMario64DS last edited by ALAKTORN on 2012-02-28 02:13:29
Page info and history | Latest diff | List referrers | View Source