SMW Memory Map
Displaying 25 out of 839 addresses.
View: moderated | waiting (105)
RAM Address | Length | Type | Description | Details |
---|---|---|---|---|
$7E005D | 1 byte | Misc. | Number of screens in level. Note: Set to $FF during Ludwig and Reznor boss battles, in these cases, the screen scroll range is X=$0000 to X=$0080 (1 and a 1/2 screen wide area) |
|
$7E005E | 1 byte | Camera | In horizontal levels, used as the level's width in screens, i.e. the screen number (plus 1) at which the camera should stop scrolling rightwards. Equivalent to the "number of screens" dropdown in Lunar Magic's "Change Properties in Header" dialogue. Not used in vertical levels; see $5F instead. Note: During Ludwig and Reznor boss battles, this is set to $00, in these cases, the screen scroll range is X=$0000 to X=$0080 (1 and a 1/2 screen wide area) |
|
$7E005F | 1 byte | Camera | In vertical levels, used as the level's height in screens, i.e. the screen number (plus 1) at which the camera should stop scrolling downwards. Equivalent to the "number of screens" dropdown in Lunar Magic's "Change Properties in Header" dialogue. Not used in horizontal levels; see $5E instead. | |
$7E0060 | 4 bytes | Empty | Empty. Cleared on reset, titlescreen load and overworld load. | |
$7E0064 | 1 byte | Misc. | Properties (YXPPCCCT) byte for most sprites inside levels - including the player. Exceptions to this include sprites that mess with sprite priority in a different way, such as Piranha Plants, items coming out of a box (and inside the item box) and Net Koopas behind the nets. | |
$7E0065 | 3 bytes | Pointer | 24-bit pointer to layer 1 data - both level and overworld. Also used during the staff roll sequence of the credits to hold some data about the current line being uploaded to VRAM: - $65-$66 is used to hold the first two bytes of the stripe image header for the current line (in little endian), mainly for keeping track of the Y position. - $67 tracks the current line number being written, with a line defined as two consecutive 8x8 rows. |
|
$7E0068 | 3 bytes | Pointer | 24-bit pointer to layer 2 data. | |
$7E006B | 3 bytes | Pointer | 24-bit pointer to low byte of Map16 block data. Used during level load. | |
$7E006E | 3 bytes | Pointer | 24-bit pointer to high byte of Map16 block data. Used during level load. | |
$7E0071 | 1 byte | Player | Player animation trigger states. When nonzero, the player character is performing an action and cannot be controlled by the player. Often used for cutscenes. | Valid values |
$7E0072 | 1 byte | Player | Player is in the air flag, as well as the actual pose value to store to $13E0 while the player is in midair. This is set to a certain value depending on how the player got in the air in the first place, and in what state they are currently (rising or sinking). This address is not affected by phases such as climbing. It is, however, also used in swimming animation. Notable values: #$0B = Jumping/swimming upwards. #$0C = Shooting out of a slanted pipe, running at maximum speed. #$24 = Descending/sinking. NOTE: Hitting bottom-solid sprites like invisible solid block, message block etc. does NOT set $72 to this value as cape mario. The address in general is used in many instances. For example, the game checks if this address is #$0C. If not, the player cannot ascend properly with the cape. Furthermore, the Layer 3 smash won't hurt the player if they're not on the ground (any non-zero value) and this address prevents the player from locking in place when still airborne during the Morton/Roy/Ludwig battle. |
|
$7E0073 | 1 byte | Flag | Player is ducking flag. #$00 = No; #$04 = Yes. However, any value that is not zero also counts as 'Yes', SMW just stores that specific value to it. | |
$7E0074 | 1 byte | Player | Player is climbing flag: format: n--sifhb n: Net/vine flag. 1 - net, 0 - vine. Determines whether Mario can move diagonally. s: Side body collision point with climbing. If clear, block horizontal movement. i: Side head collision point with climbing. f: Feet collision point with climbing. h: Head collision point with climbing. b: Body collision point with climbing. |
|
$7E0075 | 1 byte | Flag | Player is in water flag. #$00 = No; #$01 = Yes. | |
$7E0076 | 1 byte | Player | Player direction. #$00 = Left; #$01 = Right. | |
$7E0077 | 1 byte | Player | Player blocked status - Used to check if player is blocked in a certain direction. Format: SxxMUDLR The M bit means that the player is in the middle of a block. The S bit indicates that the player is touching the side of the screens while horizontal screen scrolling is disabled. UDLR = up, down, left, right (contact with walls). L is checked each 4 frames when the player have negative X speed. Others frames is zero. R is checked each 4 frames when the player have positive X speed. Others frames is zero. |
|
$7E0078 | 1 byte | Player | Used to hide the player partially or fully. Format: dlucapLU. d = used in conjunction with all other set bits in order to disable processes such as the star timer decrementing. l = hide lower extra player tile when in flight (hovering with the cape). u = hide upper extra player tile when in flight (hovering with the cape). c = hide regular cape tile. a = hide attributive 8x8 tile. p = hide extra player tile that is shown during the inflated P-balloon pose (does not apply if the player is small). L = hide lower half of the body. U = hide upper half of the body. |
|
$7E0079 | 1 byte | Empty | Empty. Cleared on reset, titlescreen load, overworld load and level load. | |
$7E007A | 1 byte | Player | Accumulating fraction bits for fixed point player X speed (fractions of 256, see code around $00D792, this handles horizontal movement with the player and when the player is on the slope). Not to be confused with $7E13DA, which handles X position. |
|
$7E007B | 1 byte | Player | Player X speed (8-bit, 2-complement signed), in 1/16s of a pixel per frame.
Note: Player's maximum X speeds, while holding left or right oscillates between (inclusively) $13-$15 (walking) and $2F-$31 (dashing). The oscillation is due to the code applying deceleration when Mario is at or above the max speed, rather than just setting his speed to the max value. |
|
$7E007C | 1 byte | Empty | Empty. Cleared on reset, titlescreen load, overworld load and level load. | |
$7E007D | 1 byte | Player | Player Y speed (8-bit, 2-complement signed), in 1/16s of a pixel per frame:
Note: $43 (when holding jump) $46 (not holding jump) is the maximum fall speed. Although $40 is the intended max speed (see at $00D7AF), the code first caps the downwards speed, and then apply the gravitational acceleration (increases Y speed by $03 or $06) afterwards. When jumping, $B3 is the normal jump speed, and #$A4 is the jump speed when fully running. |
|
$7E007E | 2 bytes | Player | Player X position (16-bit), within the borders of the screen. | |
$7E0080 | 2 bytes | Player | Player Y position (16-bit), within the borders of the screen. Note that this value may be displaced by $1888 (the screen shake), in addition to small one-pixel displacements based on Mario's powerup status and walking animation frame. |
|
$7E0082 | 3 bytes | Pointer | Points to how steep the various slopes are and which parts of the slopes they represent. Points to $00:E5C8 in tilesets 0 and 7, and $00:E55E in others. The table this one points to has one byte per block, from tile 16E to tile 1D7. The value in these tables is then multiplied by 16, the lowest nibble of the sprite/player X position is added, and this is then used as an index to $00:E632 to tell how many pixels the sprite/player should move down from the nearest 16x16 tile. |
|