SMW Memory Map
Displaying 50 out of 840 addresses.
View: moderated | waiting (17)
RAM Address | Length | Type | Description | Details |
---|---|---|---|---|
$7E1DF6 | 1 byte | Overworld | Star and Warp pipe handler. It's an index of the current star/warp pipe tile you're standing on, multiplied by two. With this index, the destination coordinates are determined. | |
$7E1DF7 | 1 byte | Player | Used by the Star Road warp star on the overworld. Determines the speed with which the player is launched in the air during warping. The higher the value, the faster they gets launched in the air. By default the maximum is #$04, though this cap can be altered by editing $04:9E70/0x22070. | |
$7E1DF8 | 1 byte | Timer | Used by the Star Road warp star tile on the overworld. It controls how long the player has to stay on the ground during the warp, before they actually gets launched in the air. The player gets airborne as soon as the timer hits #$31 (as it increments). | |
$7E1DF9 | 4 bytes | I/O | SPC700 I/O Ports. Write values to play music/SFX. Note that the valid values refer to a clean rom, if using an Addmusic tool songs and sound effects are (usually) remapped (for example, with AddmusicK you can check them in "Addmusic_sound effects.txt" and "Addmusic_list.txt"). |
$1DF9 Values $1DFA Values $1DFB Values $1DFC Values |
$7E1DFD | 2 bytes | Empty | Empty. Cleared on reset, titlescreen, overworld and level load (the latter two due to new music banks being uploaded). Note that $7E:1DFD is cleared twice, due to a 16-bit store to $7E:1DFC - at $04:969F/0x2189F (LDA #$0023 : STA $1DFC) and $05:C75D/0x2C95D (LDA #$0009 : STA $1DFC). | |
$7E1DFF | 1 byte | I/O | A copy of $7E:1DFB, the music register. It contains the last value written to SNES register $2142. Probably used to keep the music playing between areas. | |
$7E1E00 | 1 byte | Empty | Empty. Cleared on reset, titlescreen, overworld and level load (the latter two due to new music banks being uploaded). | |
$7E1E01 | 1 byte | Player | During levels, holding A and pressing L will cycle this address through the values 00, 01, 02. The value, however, is only actually read by the unused free-roam debug code found at $00CC86 (enabled via the edit described at $00CC84). When enabled, the values correspond to: 00 = off, 01 = enable max P-speed, 02 = enable no-clip free roam. Use this tweak to disable the cycling, rendering the address truly empty to use as free RAM (cleared at reset and title screen load). |
|
$7E1E02 | 20 bytes | Sprites | Cluster sprite Y position, low byte. | |
$7E1E16 | 20 bytes | Sprites | Cluster sprite X position, low byte. | |
$7E1E2A | 20 bytes | Sprites | Cluster sprite Y position, high byte. | |
$7E1E3E | 20 bytes | Sprites | Cluster sprite X position, high byte. | |
$7E1E52 | 20 bytes | Sprites | Cluster sprite table. Used as: - Y position of reappearing Boos, frame 1. Not relative to screen border. - Y speed for Boos from ghost ceiling and death bats. |
|
$7E1E66 | 20 bytes | Sprites | Cluster sprite table. Used as: - X position of reappearing Boos, frame 1. Not relative to screen border. - X speed for Boos from ghost ceiling and death bats. |
|
$7E1E7A | 20 bytes | Sprites | Cluster sprite table. Used as: - Y position of reappearing Boos, frame 2. Not relative to screen border. - Accumulating fraction bits for fixed point Y speed of death bats. |
|
$7E1E8E | 20 bytes | Sprites | Cluster sprite table. Used as: - X position of reappearing Boos, frame 2. Not relative to screen border. |
|
$7E1EA2 | 96 bytes | Overworld | Overworld level setting flags, location within the table corresponds to $7E13BF. Format: bmesudlr. b = level is beaten. m = midway point has been passed. e = unused in SMW, Lunar Magic turns it into the "no entry if level already passed" flag. s = unused in SMW, Lunar Magic turns it into the "open Save Prompt when level is beaten" flag. u = enable walking upwards. d = enable walking downwards. l = enable walking leftwards. r = enable walking rightwards. Setting the high bit of $7E1EEB will enable the special stage features (autumn overworld palettes, etc.) in the ORIGINAL game. The bit is set when you beat level 125 (FUNKY). |
|
$7E1F02 | 15 bytes | Overworld | Overworld event flags. The table works bitwise - if a bit corresponding to an event is set, that event has been run. If it's clear, it hasn't been run yet. To find the bit for a particular event, use event >> 3 to get the byte, and then 1 << (7 - (event & 7)) to get a bitmask for the bit (ordered high to low). |
|
$7E1F11 | 1 byte | Overworld | Current submap for Mario. #$00 = Main map; #$01 = Yoshi's Island; #$02 = Vanilla Dome; #$03 = Forest of Illusion; #$04 = Valley of Bowser; #$05 = Special World; #$06 = Star World. | |
$7E1F12 | 1 byte | Overworld | Current submap for Luigi. #$00 = Main map; #$01 = Yoshi's Island; #$02 = Vanilla Dome; #$03 = Forest of Illusion; #$04 = Valley of Bowser; #$05 = Special World; #$06 = Star World. | |
$7E1F13 | 4 bytes | Player | Player animation on the overworld. $7E:1F13/4 form Mario's image and $7E:1F15/6 form Luigi's image. Note that the high bytes of the two (bytes 2 and 4, $7E:1F14 and $7E:1F16) are actually unused. |
Valid Values |
$7E1F17 | 2 bytes | Player | Overworld X position of Mario. | |
$7E1F19 | 2 bytes | Player | Overworld Y position of Mario. | |
$7E1F1B | 2 bytes | Player | Overworld X position of Luigi. | |
$7E1F1D | 2 bytes | Player | Overworld Y position of Luigi. | |
$7E1F1F | 2 bytes | Player | Pointer to Mario's overworld X position. Value is Mario's regular overworld X position divided by #$10 (#16). | |
$7E1F21 | 2 bytes | Player | Pointer to Mario's overworld Y position. Value is Mario's regular overworld Y position divided by #$10 (#16). | |
$7E1F23 | 2 bytes | Player | Pointer to Luigi's overworld X position. Value is Luigi's regular overworld X position divided by #$10 (#16). | |
$7E1F25 | 2 bytes | Player | Pointer to Luigi's overworld Y position. Value is Luigi's regular overworld Y position divided by #$10 (#16). | |
$7E1F27 | 4 bytes | Flag | Switch palace activation flags. $00 = off (outline passable switch palace blocks), $01 = on (solid switch palace blocks): $7E1F27: Green $7E1F28: Yellow $7E1F29: Blue $7E1F2A: Red Note: effects to the blocks will only apply during level loading when these flags are changed. |
|
$7E1F2B | 3 bytes | Empty | Empty. Unlike most empty addresses, this one is saved to and loaded from SRAM, so it's effectively cleared only at reset and new game. | |
$7E1F2E | 1 byte | Counter | Number of events triggered. Can be used as a levels beaten counter. | |
$7E1F2F | 12 bytes | Flag | "Collected five or more Yoshi Coins" flags for each level. Each of the 8 bits of each byte represents a different level, based on the level's translevel ID from $7E13BF. If a level's corresponding bit is set, Yoshi Coin objects will be skipped when the level is reloaded. Notably, the levels within each byte are ordered from most-significant bit to least-significant (e.g. level 0 uses bit 7 of $1F2F, while level 7 uses bit 0). To find a specific level's flag, start with the level's translevel ID; use id >> 3 to find its byte, and 1 << (7 - (id & 7)) to get a bitmask for its bit. |
|
$7E1F3B | 1 byte | Empty | Empty. Cleared on reset, titlescreen load and at the game over screen. | |
$7E1F3C | 12 bytes | Flag | "Collected invisible 1-Up flags" flags for each level. Each of the 8 bits of each byte represents a different level, based on the level's translevel ID from $7E13BF. If a level's corresponding bit is set, the invisible 1-Up checkpoint objects will be skipped when the level is reloaded. Notably, the levels within each byte are ordered from most-significant bit to least-significant (e.g. level 0 uses bit 7 of $1F3C, while level 7 uses bit 0). To find a specific level's flag, start with the level's translevel ID; use id >> 3 to find its byte, and 1 << (7 - (id & 7)) to get a bitmask for its bit. |
|
$7E1F48 | 1 byte | Empty | Empty. Cleared on reset and titlescreen load. | |
$7E1F49 | 141 bytes | Overworld | Buffer for $7E:1EA2-$7E:1F2E. SRAM transfer of those bytes goes via this buffer. | |
$7E1FD6 | 12 bytes | Sprites | Unused sprite table, cleared at individual sprite load. (1 slot each.) | |
$7E1FE2 | 12 bytes | Sprites | Sprite table that decrements once per frame, and is used for multiple purposes. All standard sprites have it briefly set after spawning. Primarily, it disables water splashes from showing when the sprite enter or exits water, and disables interaction for the sprite with capespins, quake sprites, cape smashes, and net punches. Some sprites use it for miscellaneous purposes, as well. More information can be found here. |
|
$7E1FEE | 12 bytes | Flag | "Collected 3-Up moon" flags for each level. Each of the 8 bits of each byte represents a different level, based on the level's translevel ID from $7E13BF. If a level's corresponding bit is set, 3-Up moon objects will be skipped when the level is reloaded. Notably, the levels within each byte are ordered from most-significant bit to least-significant (e.g. level 0 uses bit 7 of $1FEE, while level 7 uses bit 0). To find a specific level's flag, start with the level's translevel ID; use id >> 3 to find its byte, and 1 << (7 - (id & 7)) to get a bitmask for its bit. |
|
$7E1FFA | 1 byte | Empty | Empty. Cleared on reset and titlescreen load. | |
$7E1FFB | 1 byte | Palettes | Lightning flash color index. Only #$00-#$07 are actually used. #$07 is the brightest shade of white, the lower the value, the closer to black it gets. This address gets its value from the table at $04:F700. | |
$7E1FFC | 1 byte | Timer | How long to wait until the next lightning flash is generated. Gets its value from a table at $04:F6F8, which in turn gets its index from a "random" value in the routine of $04:F708 & #$07. This address decrements after the previous lightning flash has ended. | |
$7E1FFD | 1 byte | Timer | How long a lightning flash should last, per color change. Is set to #$08 frames for the first color flash (the most bright one), then it's set to #$04 frames for the following color flashes which are becoming less and less bright. Decrements every frame. | |
$7E1FFE | 1 byte | Flag | Whether to update the background in the first part of the credits, or not. #$00 = Don't update the background. #$01 = Do update the background. |
|
$7E1FFF | 1 byte | Empty | Empty. Cleared on reset and titlescreen load. | |
$7E2000 | 23808 bytes | Graphics | GFX32 decompressed. Written while the Nintendo Presents logo is shown and never modified after that, but often read. Prior to GFX32 being loaded here, it is also used as a buffer for decompressing GFX33 before it is converted from 3bpp to 4bpp into $7E7D00. |
|
$7E7D00 | 12288 bytes | Graphics | GFX33 decompressed. Written while the Nintendo Presents logo is shown and never modified after that, but often read. | |
$7EAD00 | 3072 bytes | Graphics | GFX file decompression buffer. Decompressed as 3bpp (3kb) for unexpanded GFX and as 4bpp for expanded. It may also use the RAM following this (up to $7ECCFF) for larger files, such as the LT3 or AN2 slots. The latter continues to remain here after level/overworld load, and is where ExAnimations will pull their data from. |
|
$7EB900 | 1024 bytes | Blocks | During level load, if using a background Layer 2 tilemap in a level, this is table is temporarily used to hold the low byte of each tile. Format: Background is split into two 16x27 rectangles, followed by 160 $25 bytes that are never actually read. The high bytes of each tile are at $7EBD00. This table also used as an extension of the GFX decompression buffer at $7EAD00. As with that address, during a level, it may be used to hold additional data for the level's AN2 GFX file. In the original game, some of the RAM in this table is also used on the overworld for a number of 40-byte tables relating to the switch palace's block animation:
With Lunar Magic, these tables instead get moved over to $7FC500 ($418800 on SA-1). |
|