18 users online:  Alex, AppleBoy54321, AyGaAlPa,  DeppySlide, FYRE150, Haroz, hopie9293,  icrawfish, lx5, MarioriaM, NeptuneNeon, NewPointless, Skye, STRlantian, SuperMarioMan32, Teaser, TheRealCatsup,  TickTockClock - Guests: 117 - Bots: 692
Users: 55,002 (2,197 active)
Latest user: SarePhoenix

SMW Memory Map - Waiting Addresses

Displaying 50 out of 94 waiting addresses.

View: moderated | waiting (94)


  • Pages:
  • 1
  • 2
RAM Address Length Type Description Details Submitter
$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.
$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. Thomas
$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.
$7E1419 1 byte Sprites How sprites enter pipes with the player. This handles carried sprites and riding yoshi, and is always set regardless whether or not the player is carrying a sprite and whether or not is riding yoshi. When this RAM is set to any non-zero and the sprite is being carried and/or yoshi is being ridden on, they're placed behind layer 1 and yoshi's tongue is not shown (when licking).
  • $01 = Horizontal pipes (duck a little on yoshi and carrying sprites facing left or right).
  • $02 = Vertical pipes (face the screen).
  • $FF = Don't change image, only go behind layer (shooting out of slanted pipe). Note that this will probably work with all values #$03-#$FF.

Note: Yoshi always show his pipe animation pose regardless if the player is mounted on Yoshi or not, consider using this patch to fix it.
$7E1462 2 bytes Misc. Layer 1 X position, next frame.
Much similar to $7E:001A, maintaining the exact same values, with the difference being the usage of their values.
This is more notable in auto-scroll commands, for example, if $7E:1462 were to remain static while there was a Layer 2 auto-scroll going, the image would stay, but the level would move.
Is also used for temporary storage to determine how much the screen has moved horizontally in the current frame. ($7E:001A - $7E:1462 = $7E:17BD)

Also used during the credits scene for the second layer 1 X position, where the output is separated in two halves, each with their own scrolling.
$7E146C 4 bytes Empty Empty. Cleared on reset, titlescreen load, overworld load and cutscene load.

$7E146C-$7E146D is used by Lunar Magic (v3.10+): on level load it holds the Layer 3 Y position/offset (as defined in the advanced bypass settings), and it's updated during the level when the layer 3 scrolls vertically to keep track of how much it scrolled. It's used to make layer 3 scroll with the camera in levels that scroll vertically, when the layer 3 vertical scroll is not "None".
$7E19B8 64 bytes Misc. Exit Table. This connects doors and exit-enabled pipes to their correct entrances.
  • $7E19B8-$7E19D7 (32 bytes): Low bits of the 9-bit (bits 0-7) level number (%llllllll) to warp to
    • The index for this exit table is the position of the exit (relative to layer 1) divided by 256. If layer 1 is vertical, then use the Y position of the exit, else use the X position. This is also known as the current screen number. For primary exits, the value in this exit table is the low 8 bits of the level number of the destination room. For secondary exits, the value in this exit table is the index to the secondary entrance ROM tables; and ROM table $05F800/0x2FA00 provides the low 8 bits of the room number.
  • $7E19D8-$7E19F7 (32 bytes): high bit and flags (%HHHHwush) This table is only used when Lunar Magic is done with the ROM. The original game does write the h bit, but never uses it.
    • h = Bit 8 of the level number for normal exits (0 = level 0xx, 1 = level 1xx).
    • HHHHh = Bits 8-12 of the secondary exit number.
    • s = Secondary exit flag.
    • u = LM-modified flag. If not set, the entire byte is ignored and SMW's original exit system is used.
    • w = Water flag (secondary exits) / Midway flag* (non-secondary exits).
    * Only used if the level has "use seperate settings for midway entrance" set.
Table correspondance HammerBrother
$7E1EA2 96 bytes Overworld Overworld level setting flags, location within the table corresponds to $7E:13BF. 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 $7E:1EEB will enable the special stage features (autumn overworld palettes, etc.) in the ORIGINAL game. The bit is set when you clear all special world levels.
$7F0B44 2048 bytes Misc. It is used for Dynamic Z V3.75 or more, for severals differents variables.

More Documentation here:

Start at $418000 in SA-1 rom.
$7F837D 5118 bytes Misc. VRAM upload table, as a stripe image. Used for things that change in the middle of the screen, such as ? blocks. Uploaded and reset every frame; most frames, it's empty.

Not all of it is used during normal gameplay, so $7F:8600+ shouldn't be dangerous to use.

See here for more info.
Data store in RAM format Example how to use in ASM - Layer 3 Another layer 3 example using RLE HammerBrother
$7FB408 3396 bytes Misc. Potentially used by Dynamic Z V3.75, lot of them usually are untouched but depends on the features that you use, they can be used by Dynamic Z V3.75 or later

Documentation Here:

Start at $418B80 on SA-1 rom.
$7FC070 16 bytes Misc. Manual ExAnimation triggers. Each manual trigger slot corresponds to 1 byte in this table. Note that this address is not initialized unless you use the "Trigger Init" button in the ExAnimation dialog.
Used since Lunar Magic 1.70.
Trigger number -> RAM table HammerBrother
$7FC0FC 2 bytes Misc. Custom ExAnimation triggers. Each trigger corresponds to 1 bit, where a bit set means the trigger is enabled. Note that this address isn't initialized unless you use the "Trigger Init" button in the ExAnimation dialog.
Used since Lunar Magic 1.70.
Flag and bit table ASM code to set/clear a specified bit HammerBrother
ROM Address Length Type Description Details Submitter
$00DC4F 75 bytes Mario physics Routine that updates the player's X and Y position ($94 and $13DA, $96 and $13DC) by X and Y speed ($7B and $7D).

The rate of movement is in “subpixels” per frame-- 1/16th of a pixel for more precise movement, using fixed point arithmetic. Note that stuff using position besides speed related data, such as hitboxes will only take the pixel position and not the subpixel position.

Normally this routine is called after JSR to $00DC2D. It then JSRs into $00DC4F with:
  • X = $00: Update X position
  • X = $02: Update Y position
How it works Math Example HammerBrother
$019138 8 bytes Sprite subroutine (JSL) JSL for sprites interacting with objects. Actually calls routine at $019140.

During processing GPS blocks:
  • $0A-$0D: Position (in pixels) of the collision point currently being processed for sprite interaction with blocks in the level:

    • $0A-$0B (2 bytes): X position
    • $0C-$0D (2 bytes): Y position

    Note, just like $98-9B, coordinates are respective to the top-left of the layer currently being processed. Hence, if Layer 1 and Layer 2 are offset from each other, this value will differ between the two, even when the sprite is at the same position with respect to the level.

  • $0F (1 byte): Index of one of the 4 collision points currently in use. Also used to eject sprite out of block horizontally:

    • #$00 = SpriteH: Right (touches blocks from left)
    • #$01 = SpriteH: Left (touches blocks from right)
    • #$02 = SpriteV: Down (touches blocks from above)
    • #$03 = SpriteV: Up (touches blocks from below)

    Be careful when using custom blocks, $0F remains used before and after custom block processing at $019533. If $0F is modified and not restored, sprite interaction glitches can occur.

Message to mods: SpriteV and SpriteH are swapped on the info about $0F. I fixed it.
$01A40E 172 bytes Sprite Misc. Part of the main Sprite<->Sprite interaction subroutine. Called from $018032

How this works:
  1. The current sprite that call this subroutine is sprite_A, and the other sprite to compare with will be Sprite_B.
  2. If the frame counter $13 is an odd number and sprite_A is also odd, or if both are even, then this subroutine terminates to save performance. Otherwise if one is odd and other is even, the proceed with the subroutine. The reason for this is because it is very performance-heavy. If all 12 sprites uses this, then there are 66 possible pairs to check for collision.
  3. The routine loops through all the sprite slots below (indexes lower than) sprite_A's index. With Sprite_B starting at sprite_A's index, minus 1, then decreasing until $FF, then finishes.
$0288A1 2 bytes Sprite Misc. The sprite which comes out of a Yoshi egg when spawned from a question mark block. The first byte is the sprite ID when no Yoshi exists and the second byte is the sprite ID when Yoshi does exist. By default, these are $35 (Yoshi) and $78 (1-up). MarioFanGamer
$029265 301 bytes Subroutine (JSR) Subroutine run on bounce sprite INIT (for all bounce sprites except turnblocks), which is responsible for the bug where a coin on top of hittable block and hitting said block will cause the coin to turn into an invisible solid block.

$029330 is the block on page 0 which is to be collected. Keep in mind that this is independent of the acts like setting and has to be implemented manually.
$029356 60 bytes Subroutine (JSR) Code that generates a spinning coin at the position of a bounce sprite. This is used to be able to collect with a bounce block. However, this routine doesn't handle the removal of the coin which is instead handled by $0291B8. MarioFanGamer
$02A1A4 115 bytes Sprite subroutine (JSR) 8x8 fireball GFX subroutine. Is it also used as a base for various other extended sprites' graphics (they JSR to it and then change the tile numbers and properties) as well as despawning them when they leave the screen. HammerBrother
$02A547 39 bytes Sprite subroutine (JSR) "Get Fireball clipping" subroutine. Valid for Yoshi's and Mario's fireballs, Stores the clipping X displacement low byte to $00, the clipping X displacement high byte to $08, the clipping width (#0C) to $02, the clipping Y displacement low byte to $01, the clipping Y displacement high byte to $09, and the clipping height (#$13) to $03 (so it's equivalent to the "Get sprite clipping B" routine).

- Y: which extended sprite slot to get clipping of (should be #$08, #$09 for Fireball #1 and #2)
Example Code Disk Poppy
$02B5BC 48 bytes Sprite subroutine (JSR) Suboutine that updates the extended sprite's X and Y position ($171F/$1733/$175B and $1715/$1729/$1751) by its speed ($1747 and $173D). This alone is without gravity. The rate of movement is “subpixels” (1/16th of a pixels) per frame, similarly to Mario's speed handler at $00DC4F

$02B5BC-$02B5C7: Calls $02B5C8 with the current extended sprite index +10 (number of existing extended sprite slots) to use the X position instead of Y.

$02B5C8-$02B5EB: The subroutine itself. Input:
  • X_Index = $00-$09: Update Y position
  • X_Index = $0A-$13: Update X position
$02F594 133 bytes Sprite subroutine (JSL) Ghost House Exit main pointer. The actual routine is located at $02F5D0; this is merely a wrapper for it, so it can JSL'ed. Major Flare
$03A6C8 40 bytes Subroutine (JSL) Routine which kills most active sprites and turn them into a smoke. Only the last two sprite slots as well as sprites with a certain ID are not affected.

$03A6E3 is the sprite state of the effected sprites.
$03A6E8 is the timer for how long the is smoke is active.
Whitelist MarioFanGamer
$03BA02 1534 bytes Empty Filled with $FF.

Modified by Lunar Magic:
- $03BB90: Start of Lunar Magic's modified Message Box routine.
- $03BC0B: Pointer to message locations. Note that this changes every time you use LM to edit the messages.
- $03BC7F: Table of the first 2 bytes of the stripe header for message boxes.
- $03BE80: Table of offsets to find the correct message. Indexed by ($13BF * 2 + ($1426 - 1)) * 2
- $03BCDC: (LM 3.00+) Routine (ends in RTL) that computes the current screen exit number Mario is in and puts it in X (required to use for the new horizontal level modes). Note: if the level uses one of the new horizontal modes, the routine will overwrite Y.
$0CA204 1 byte Coordinate The X position where Mario stops in the Yoshi's House at Ending.
If you change this value, Peach and Green Yoshi's stopping positions will also change to match Mario's. (The spacing will remain the same, but the positions will shift.)
$0CAF11 1681 bytes Sprite tilemap related Sprite data for the enemy credits roll. This contains the OAM data in the same format i.e. X position, Y position, tile number and tile properties aside from the priority bits. In the latter, bit 4 instead sets the tile size (bit clear = 8x8 tile, bit set = 16x16 tile) and bit 5 the scrolling of the screen (i.e. is the tile rooted to the top half or the bottom half).
The data of a scene ends when the X position is set to be $FF.

The scenes are indexed at the table $0CB5A2.
New Table MarioFanGamer
$0CB5A2 26 bytes Misc. The credits scene indices, indexed by $1DF9. The table contains all the indices to the sprite tilemap $0CAF11 for the enemy credits roll. MarioFanGamer
$0CB5BC 122 bytes Subroutine (JSR) This routine draws the sprites for the enemy credits roll using the table at $0CAF11, indexed by $0CB5A2. MarioFanGamer
Hijack Address Length Type Description Details Submitter
$0081C6 5 bytes Jump (JML/JSL) Modified by Easy Mode 7 Patch.

This makes SMW use the Mode 7 mirrors in any Mode 7 level instead of just boss levels.
$008385 7 bytes Jump (JML/JSL) Modified by Easy Mode 7 Patch.

Compatability code for SA-1 Pack v1.32+ due to changes in IRQ code.
$00988C 4 bytes Jump (JML/JSL) Modified by Easy Mode 7 Patch.

Fixes the Iggy/Larry battle mode.
$00A08A 5 bytes Jump (JML/JSL) Modified by Save Dragon Coins on Level End by  MarioFanGamer.

Check if the level has been beaten and all Dragon/Yoshi Coins have been collected and save them if so.
$00A28A 5 bytes Jump (JML/JSL) Modified by Easy Mode 7 Patch.

Handles rotation and scaling.
$00A5AF 5 bytes Jump (JML/JSL) Modified by Easy Mode 7 Patch.

Turns off ExAnimation in Mode 7 levels.
$00AD32 5 bytes Jump (JML/JSL) Modified by Lunar Magic.
Jumps to Lunar Magic routine that loads the current submap palette to $0703 depending if the special world flag is set or not, bypassing the original game's routine.
You can call this to force loading the normal or special palette for the current submap (see example code).
Example code Kevin
$00C35D 66 bytes Code Hijacked by the Climbing Net Door on Subscreen Boundary Fix patch, by Kevin.

Changes the code so that nets check, whether they horizontally cross a subscreen boundary, gets the stripe image index, set the row counter, jumps to freespace to handle the rest of the code, ends the stripe image and updates the index.
At the end of the code, there is the table which contains how many tiles to upload per side depending on how much the net crosses a subscreen boundary.
$00D06C 5 bytes Jump (JML/JSL) Hijacked by the Cape Wall and Spin Fly Fix patch by Alcaro and HammerBrother.


Disables cape spin while flying, wallrunning, or both, depending on configuration.
$00D8A8 5 bytes Jump (JML/JSL) Modified by the Cape-Lift Limit patch, by JamesD28.

JML : NOP, modifies the cape aircatch routine to impose a limit on the number of upward lifts possible per airtime.
$00DC11 5 bytes Jump (JML/JSL) Hijacked by the Faster Climbing with X/Y patch, by Francium.

JSL : NOP, adds a second climbing speed when the player is holding X/Y on a vine.
$00DC22 4 bytes Jump (JML/JSL) Hijacked by the Faster Climbing with X/Y patch, by Francium.

JML, cycles through the climbing animation faster when the player is holding X/Y on a vine.
$00ED52 4 bytes Jump (JML/JSL) Modified by Solid Slope Assist Tile by  MarioFanGamer.

Modifies Mario Above collision for tile 131 to act like slope assist tile.
$00EDF3 4 bytes Jump (JML/JSL) Modified by Solid Slope Assist Tile by  MarioFanGamer.

Modifies Top Corner collision for tile 131 to act like non-solid tile.
$00EF6B 4 bytes Jump (JML/JSL) Modified by the Cape-Lift Limit patch, by JamesD28.

JML, modifies the "touched the ground" routine to reset the cape lifts counter.
$00F2C9 4 bytes Jump (JML/JSL) Modified by Save Dragon Coins on Level End by  MarioFanGamer.

Save Dragon/Yoshi Coins on checkpoint, if the player have collected all of them beforehand.
$00F34D 7 bytes Code Modified by Save Dragon Coins on Level End by  MarioFanGamer.

Sets a flag to tell the game that all Dragon/Yoshi coins have been collected and could be saved on checkpoint or level end.

(Note: Size is 7 with default freeRAM address, which is 2 bytes long)
$00F5B9 2 bytes Opcode Hijacked by the Free $188A patch, by meatloaf.

BRA, repoints the branch destination to the RTL at the end of the kill routine for the animation check of the hurt routine.
$00F5C4 2 bytes Opcode Hijacked by the Free $188A patch, by meatloaf.

BRA, repoints the branch destination to the RTL at the end of the kill routine for the flashing, star and goal march check of the hurt routine.
$00F5F1 2 bytes Opcode Hijacked by the Free $188A patch, by meatloaf.

BRA, repoints the branch destination at the end of the cancle soaring code to the clear cape flight.
$00F5F1 2 bytes Opcode Hijacked by the Free $188A patch, by meatloaf.

BRA, repoints the branch destination of the powerdown code to the set animation and frozen flag at the end of the hurt routine to the RTL.
  • Pages:
  • 1
  • 2