Memory addresses for Super Mario 64 DS (USA, v1.0)

Side note : The DS framerate is around 60 FPS, but most of this game runs at 30 FPS by having a lag frame after every in-game frame (except the star select screen and the title screen), which means that almost all important addresses will update every 2 frames. Also, the input given by the player is counted when the actual game frame finishes, not during the lag itself.
The useful addresses related to a specific object derive from the object's base address. The address 0x02097490 holds a 4-byte pointer to the player's base address (which only changes if you're in the castle grounds or everywhere else). Almost all of the addresses derived from the player's base address listed here will also work for enemies' base addresses (such as speed and positions).

These are the useful addresses that have been decoded so far:
AddressSize (bytes)Description
base + 0x081Which character's cap you're wearing (Mario=0, Luigi=1, Wario=2, Yoshi=3)
base + 0x5C, 0x60, 0x644Character's X, Y and Z positions
base + 0xA4, 0xA8, 0xAC4Character's X, Y and Z speeds (Y speed is always set to -32768 on the ground)
base + 0x8E2Facing angle
base + 0x942Motion angle
base + 0x984Speed
base + 0x6E31Mid-air slide timer. The timer starts from 0 and increases by 1 for every two frames your character is in mid-air and above a floor during a butt slide, belly slide, or slide kick.
The timer will reset back to 0 if your character lands on a floor during the slide or after the timer reaches 30, at which point it will enter the falling state. Seems to have other purposes too.
base + 0x6ED1Y run timer. The timer is set to 30 when you've succesfully charged Y run and will decrease by 1 every two frames while you're running with Y held (can be preserved during any other state).
While running, if you release Y or hold neutral, the timer will reset to 0 instantly.
base + 0x3911Air/Ground state. This value holds 1 when you're on the ground and 0 when you're in the air.
base + 0x7061Water state. When in the water, this address holds a value of 1, else it will hold 0.
base + 0x3704This address has to do with what mode you're in (walking/jumping/swimming/crouching/etc.)
base + 0x6444The Y position of the floor that is under you (-2,147,483,648 if there is no floor under you)
base + 0xCC1Room reference (unsigned, more explanation below the board)
base(clam's) + 0x16E2Clam's timer (unsigned). When the clam is rendered, the timer is set to 0 and will increase by 1 every two frames while the clam is rendered. When the timer reaches 151 or more, getting
close to the clam will open it and the timer will restart to 0, and the clam will close again when it reaches 151 or more.
0x020967504RNG (hexadecimal)
0x020991004Frame counter associated to RNG. The RNG will be set to the value that this address is holding when you enter a new area.
0x020974541Coin counter
0x020974081Red coin counter
0x0208FCE51Health points
0x0217A11E1SSL Pillar counter (also used for some other counters in the game)
0x020927804Next object's unique ID (hexadecimal)
0x0217B1D42Bowser's revolution speed, the higher it is the faster you’re spinning him.
0x021764644Water level in the basement. Not fully tested, useful for hacking the 30 stars door skip to be easier.
The following addresses 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).
AddressSize (bytes)Description
base - 0x12C, 0x128, 0x1244Camera X, Y and Z positions
base - 0x3A2Camera up/down angle
base - 0x3C2Camera left/right angle

More informations about the addresses given

Angles are 2-byte values that use the full range from 0 to 65535 and then wrap (so an angle of 65535 is almost the same as an angle of 0). The character's facing angle controls what angle the character is drawn on the screen (relevant for long jumps, kicks, crouching, yoshi's tongue, etc.); the character's motion angle controls what direction the character is moving. When you're going in a straight line, the two angles are the same; when you're turning quickly on the ground or holding a different direction than forwards during a jump for example, the motion angle becomes different than the facing angle.
Despite the speed address displaying really high numbers when shown as integers, it stays the most accurate way to show it because of how little it can vary in many situations.
The Y run timer only decreases when you're running/walking and you can conserve it by doing a move. Even crouching keeps it. If the Y run timer eventually reaches 0 and that you want to keep the speed as long as possible, you need to press no-direction for 6 frames, then pressing forward again for 2 frames, then pressing no-direction for 6 frames, etc. (and at the end press a backwards direction instead of forward, and then press no-direction again) This is only useful if you want to go straight forwards or close to.
Also, while using Y run, the maximum acceleration is 122880, as well as the deceleration, therefore you can almost instantly get to a speed of 0 when running, and turn around at will.
The Random Number Generator (RNG) is set to a specific frame counter when entering a new area (mentioned in the board). Therefore we can manipulate it by delaying the entrance to a level (during the star select screen because the game runs at 60 FPS there so we lose half the time with delays), but multiple levels have objects that call the RNG by simply being rendered on the screen, without necessarily having to interact with the player, for example the fishes in JRB. The RNG manipulation is still very limited though, therefore it's common that a few frames will have to be lost on star select delays before a heavy RNG star (such as some 100 coin stars). Here is a more detailed explanation of the RNG in SM64DS
The Room reference address is unsigned and links the character to the main room currently loaded. When unloading the room you're supposed to currently be in and loading another one instead (all of that with cheats), you will need to cheat the value that this address holds to a certain number linked to the new cheated room to keep the character alive (works with any object too). There doesn't need to be another room in the map for this to work though, you can cheat a room fictionally. This address works with objects too (deriving from the object's base), so you can keep objects alive even when they're from a different room. Be aware though, because cheating too many rooms to be loaded can create in-game lag, and your movie could desync when trying to play it back without cheats.
There are specific addresses linked to rooms. Those addresses are all 1 byte signed, and if set to 1 the room is loaded, and 0 if the room is not loaded.
AddressRoom reference
0x0217BB700
0x0217BB7C1
0x0217BB882
0x0217BB943
0x0217BBA04
0x0217BBAC5
0x0217BBB86
0x0217BBC47

Fixed-point numbers

The game represents non-integer numbers using fixed-point 20.12 numbers (20 integer bits and 12 fractional bits). For example, the number 1.5 is represented by 0x00001800. However this page will consider these numbers as signed 32-bit integers, so 0x00001800 will be interpreted as 6144. To get the "real value" in fixed-point units (fxu), divide by 0x1000 or 4096.

Maximum speeds

Note that the maximum speed for a move does not mean you cannot get a higher speed while doing that move. In fact, you can get a higher speed than the maximum speed in some instances. For example, if you jump immediately after doing a long jump with full speed, you will notice that your speed during the jump is much higher than the maximum speed for a jump. In that case, you will need to check about the no-direction trick further below. Also, the maximum speed when you're sliding, regardless of the move you are in, is 409,600.
Here are listed the maximum speeds of every character for every move :
CharacterWalkRunY runJumping/FallingLong JumpSwimSlidekick/DiveButt Slide/Slip
Mario36,860147,440176,921121,638221,16065,536163,840196,608
Luigi32,760131,040157,242108,108196,56098,304163,840196,608
Yoshi32,760131,040157,242108,108196,56058,976163,840196,608
Wario30,720122,880147,450101,376184,32042,592163,840196,608
While doing a backflip or a sideflip, if you try to hold a direction to go full speed, the speed oscillates between 63488 and 57344. This happens because the speed is capped when going backwards (the facing angle is reversed in a sideflip). In fact, if you try to jump or long jump backwards (with POSITIVE speed), the cap happens too. The cap only happens when you're moving backwards compared to your facing angle but with forwards speed. If you start by jumping forwards and hold backwards while skipping the exact speed of 0, you will start moving backwards but with negative speed, and the speed is never capped when it's negative.

Glitches and Tricks


GameResources/DS/SuperMario64DS last edited by on 1/1/2022 6:14 PM
Page History Latest diff List referrers View Source