Language…
18 users online: buggy789, Drakel, Ennui Goldfeld, flips_bad, HamOfJustice, Hot Sauce, KaidenThelens,  MarioFanGamer, mason, Mega X, Minish Yoshi, ScrapTrapMaker, signature_steve, Spedinja, TavernaMugiwara, X11Gbyte, Xane123, zAce08xZ - Guests: 241 - Bots: 137
Users: 68,884 (2,338 active)
Latest user: Smwreverse

SMW Memory Map

Displaying 50 out of 840 addresses.

View: moderated | waiting (19)

Filter

Link
  • Pages:
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 16
  • 17
RAM Address Length Type Description Details
$7E0E65 16 bytes Sprites Overworld sprite X position, high byte.
$7E0E75 16 bytes Sprites Overworld sprite Y position, high byte.
$7E0E85 16 bytes Sprites Overworld sprite Z position, high byte; distance that the sprite is from the ground. Probably has no real purpose in the original SMW; it may not be anything but #$00.
$7E0E95 16 bytes Sprites Overworld sprite X speed.
$7E0EA5 16 bytes Sprites Overworld sprite Y speed.
$7E0EB5 16 bytes Sprites Overworld sprite Z speed.
$7E0EC5 16 bytes Sprites Accumulating fraction bits for overworld sprite X speed.
$7E0ED5 16 bytes Sprites Accumulating fraction bits for overworld sprite Y speed.
$7E0EE5 16 bytes Sprites Accumulating fraction bits for overworld sprite Z speed.
$7E0EF5 1 byte Overworld Bits 5 through 7 of this address are used to keep track of which overworld Koopa Kids have been defeated (i.e. they pulled Mario into a level and the level was beaten). If set, the corresponding sprite will not respawn.
$7E0EF6 1 byte Overworld Indicates which of the koopa kid triggers you are standing on. By default the tiles are: #$49, #$4A and #$4B. These correspond to index #$00, #$01 and #$02 respectively. This address is unused in the original SMW and can be used as empty free RAM, it is cleared on reset and titlescreen load.
$7E0EF7 1 byte Overworld If bit 7 is set (#$80-#$FF) and the player is located on a level tile, they will enter it directly without user input.

The Koopa Kid and Piranha Plant overworld sprites also write their sprite index to this address while the player is in contact with them. The Piranha Plant in particular uses this to erase itself if Mario beats the level the sprite is on top of.
$7E0EF8 1 byte Flag Yoshi has been saved for the first time flag - used for Yoshi's thank message.
$7E0EF9 55 bytes Misc. Status bar tilemap. View tiles as a table Diagram
$7E0F30 1 byte Counter Timer frame counter. Starts at $28 and decreases by 1 every frame. When this value becomes negative (by reaching $FF), one second is subtracted from SMW's game timer, and the counter is reset to $28. This means that an SMW second is 41 frames. At the NTSC refresh rate of about 60Hz, one SMW second is just over 2/3 of a real second (about 0.684s).
$7E0F31 3 bytes Counter Timer.
$7E:0F31 = Hundreds.
$7E:0F32 = Tens.
$7E:0F33 = Ones.
$7E0F34 6 bytes Counter 24-bit scores for each player.
$0F34 = Mario's score.
$0F37 = Luigi's score.

Note: This value is in hexadecimal and not decimal, so it needs to be converted before it can be displayed in-game. Additionally, this value is actually the score seen in the status bar divided by 10, as the "ones digit" SMW displays is actually just a static 0 tile.
$7E0F3A 6 bytes Empty Empty. Cleared on reset and titlescreen load.
$7E0F40 2 bytes Counter Amount of score to add up to the score total, at level end. Decrements as total score increments.
$7E0F42 6 bytes Empty Empty. Cleared on reset and titlescreen load.
$7E0F48 1 byte Counter Mario Bonus stars.
$7E0F49 1 byte Counter Luigi Bonus stars.
$7E0F4A 20 bytes Sprites Cluster sprite table. Is used for the castle background flame's frame to display, as well as Boo ring's speed - #$00 = still; #$01-#$7F = counter-clockwise; #$80-#$FF = clockwise.
Is also used for several other sprites that are generated, such as the ghost ceiling, but not necessarily for the same purpose.
$7E0F5E 20 bytes Empty Empty. Cleared on reset and titlescreen load. This table was probably meant to function as a cluster sprite table, but it was never used as such.
$7E0F72 20 bytes Sprites Cluster sprite table. Could be used for any purpose - in the original SMW, it holds the index of each individual Boo in a Boo ring (#$00-#$09). It is also used in the death bat ceiling to keep track of the bats' Y position.
$7E0F86 20 bytes Sprites Cluster sprite table, used for various purposes including determining which Boo ring is which and determining whether or not a particular "death bat" is visible.
$7E0F9A 20 bytes Sprites Cluster sprite table. Its purpose in SMW are the following: act as a timer for determining when death bats will fly, and as a timer to freeze an active Boo in the ghost ceiling.
$7E0FAE 2 bytes Sprites Low byte of the angle of the Boo rings. $7E:0FAE is for the first Boo ring active; $7E:0FAF is for the second Boo ring active.
Note that this is not reset on level or overworld load.
$7E0FB0 2 bytes Sprites High byte of the angle of the Boo rings. $7E:0FB0 is for the first Boo ring active; $7E:0FB1 is for the second Boo ring active.
Note that this does not reset on level or overworld load.
$7E0FB2 2 bytes Sprites Boo ring center X position, low byte. $7E:0FB2 is for the first active Boo ring; $7E:0FB3 is for the second active Boo ring.
$7E0FB4 2 bytes Sprites Boo ring center X position, high byte. $7E:0FB4 is for the first active Boo ring; $7E:0FB5 is for the second active Boo ring.
$7E0FB6 2 bytes Sprites Boo ring center Y position, low byte. $7E:0FB6 is for the first active Boo ring; $7E:0FB7 is for the second active Boo ring.
$7E0FB8 2 bytes Sprites Boo ring center Y position, high byte. $7E:0FB8 is for the first active Boo ring; $7E:0FB9 is for the second active Boo ring.
$7E0FBA 2 bytes Sprites Offscreen flag for the Boo ring. If a byte is set to 01, the ring is offscreen and doesn't show up. $7E:0FBA is for the first Boo ring active; $7E:0FBB is for the second.
$7E0FBC 2 bytes Sprites Boo ring index to level table (see $7E:1938). They are never erased, though, so they will always be reloaded.
$7E0FBE 1024 bytes Pointer 16-bit pointer table, indexed by Map16 tile number*2. Points to the image to use for a certain Map16 tile. Usually starts with #$8000 or $9100 (levels) or #$D000 (overworld) and the value counts up with eight per two RAM addresses. Bank byte should be #$0D (levels) or #$05 (overworld).
$7E13BE 1 byte Misc. Item memory settings from header.
$7E13BF 1 byte Misc. Translevel number, set during transfer from world map to level. This identifies the first room of the current level. To convert this to a room number (the "level number" in Lunar Magic), if > #$24, then add #$DC.

In the clean ROM, the actual formula is more complex. If translevel number > #$24, then subtract #$24. Then check RAM $7E:1F11 or $7E:1F12. If the player is in a submap (not the big world map), then add #$100. The submaps of SMW use translevel numbers > #$24, and the big map uses numbers <= #$24, so the simplication is that #$100 - #$24 is #$DC; Lunar Magic forces this simplification to remain.
$7E13C0 1 byte Should be 00 While this is never non-zero in the original SMW, $7E:13BF (level number) is sometimes used in 16bit mode, so using this address for different purposes is a bad idea
To make this one become useful free RAM, change $05:D9C9 to [E2 10 AC BF 13 B9 08 D6 8D EA 1D] (header : lorom : org $05D9C9 : SEP #$10 : LDY $13BF : LDA $D608,y : STA $1DEA).
$7E13C1 1 byte Overworld Current Layer 1 overworld tile the player is standing on.
$7E13C2 1 byte Should be 00 Used occasionally on the overworld as the high byte of $13C1, and thus should be kept as #$00 there. It is safe to use in levels, however.
Cleared on reset, title screen load, and when walking onto a new overworld tile.
$7E13C3 1 byte Overworld Current player submap. #$00 = Main map; #$01 = Yoshi's Island; #$02 = Vanilla Dome; #$03 = Forest of Illusion; #$04 = Valley of Bowser; #$05 = Special World; #$06 = Star World.
Note that it is sometimes inaccurate. It is wiser to use $7E:0DB3 and $7E:1F11.
$7E13C4 1 byte Should be 00 An address that is expected to be #$00 throughout the entire game. $7E:13C3 (current player submap) is often used in 16-bit mode, so using this address for different purposes is a bad idea, unless you make sure it's cleared on overworld load. Is also cleared during the switch between Mario and Luigi. Furthermore, cleared on reset and titlescreen load.
$7E13C5 1 byte Counter Increments each time a 3-Up moon is collected, serves no other purpose. (Its value is never loaded.)
$7E13C6 1 byte Misc. Used by SMW's cutscenes. Goes from #$01 to #$08 and these values are in the order of the boss battles, e.g. #$01 = Iggy's castle, #$02 = Morton's castle. #$08 is the value used for the credits.
Set to #$FF (in conjunction with $7E1493) to end the level as a boss fight: Mario won't walk during the fanfare, and it will trigger the boss cutscene set in Lunar Magic for the current level (if any). This also works for triggering the credit sequence.
$7E13C7 1 byte Yoshi Yoshi color. #$04=yellow; #$06=blue; #$08=red; #$0A=green. Refreshes on level change
$7E13C8 1 byte Empty Empty. Cleared on reset and titlescreen load.
$7E13C9 1 byte Flag Show "Continue/End" menu flag.
#$00 = Don't show it; #$01 = freeze player, but don't load the text yet; #$02 = freeze player, load "Continue/End" menu.
$7E13CA 1 byte Flag Show save prompt flag. It actually triggers when you get on a new level tile. #$00 = Don't show save prompt; #$01 = show save prompt.
$7E13CB 1 byte Misc. This has been left out in the current SMW version.

When you hit a goal tape, and spawn a starman (which never happens), this is set to #$01. Now each time you switch an area in a level, this gets multiplied by 2. When this reaches #$80 (changed area seven times), you will start the area with the star power. The instruction which sets this address to #$01 is located at $00:FB5C.
  • Pages:
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 16
  • 17