AddressDescriptionTypeSize
$7E001ALayer 1 X position, current frame. Mirror of SNES register $210D. For autoscrolling Layer 1, see [url=https://smwc.me/m/smw/ram/7E1462]$1462[/url] instead.Hardware mirror2
$7E001CLayer 1 Y position, current frame. Mirror of SNES register $210E. For autoscrolling Layer 1, see [url=https://smwc.me/m/smw/ram/7E1464]$1464[/url] instead.Hardware mirror2
$7E0026If Layer 3 tides are disabled, this is the X offset of Layer 2 from Layer 1, calculated as [url=https://smwc.me/m/smw/ram/7E1466]$1466[/url] - [url=https://smwc.me/m/smw/ram/7E1462]$1462[/url]. If Layer 3 tides are enabled, it is instead the X offset of Layer 3 from Layer 1, calculated as [url=https://smwc.me/m/smw/ram/7E0022]$22[/url] - [url=https://smwc.me/m/smw/ram/7E1462]$1462[/url]. Used for handling interaction with Layer 2/3.Misc.2
$7E0028If Layer 3 tides are disabled, this is the Y offset of Layer 2 from Layer 1, calculated as [url=https://smwc.me/m/smw/ram/7E1468]$1468[/url] - [url=https://smwc.me/m/smw/ram/7E1464]$1464[/url]. If Layer 3 tides are enabled, it is instead the Y offset of Layer 3 from Layer 1, calculated as [url=https://smwc.me/m/smw/ram/7E0024]$24[/url] - [url=https://smwc.me/m/smw/ram/7E1464]$1464[/url]. Used for handling interaction with Layer 2/3.Misc.2
$7E0038Mode 7 scaling, i.e. making Layer 1 shrink or grow. Its values are calculated and stored into the respective Mode 7 parameter mirrors at [url=https://www.smwcentral.net/?p=memorymap&game=smw&u=0&address=2e-35&sizeValue=®ion=ram]$2E through $35[/url]. The first byte ($38) is used for horizontal scaling, while the second ($39) is vertical. These both default to #$20, with smaller values stretching the layer larger.Misc.2
$7E003AMode 7 Layer 1 X position. Mirror of SNES register $210D.Hardware mirror2
$7E003CMode 7 Layer 1 Y position. Mirror of SNES register $210E.Hardware mirror2
$7E003EBackground mode select applied with IRQ below status bar (so the area above IRQ is not affected by this). Format: [code inline]4321pmmm[/code] 4321 = Layer 1/2/3/4 uses 8x8 tiles when clear, 16x16 tiles when set; p = Layer 3 absolute priority (only in background mode 1); mmm = background mode # (0-7). Mirror of SNES register $2105.Hardware mirror1
$7E0045Column/row of Map16 tiles to use for VRAM upload when layer 1 is scrolling left/up. Its value is equal to $7E:001A (or $7E:001C if vertical) divided by #$10, minus #$08.Camera2
$7E0047Column/row of Map16 tiles to use for VRAM upload when layer 1 is scrolling right/down. Its value is equal to $7E:001A (or $7E:001C if vertical) divided by #$10, plus #$17.Camera2
$7E004DLast X/Y value of layer 1 where VRAM upload of Map16 tiles was performed when scrolling left/up. The low 4 bits are forced to zero (AND #$FFF0) in order to get scroll values on a 16 pixel boundary. It is used to determine if a VRAM update is necessary during scrolling.Camera2
$7E004FLast X/Y value of layer 1 where VRAM upload of Map16 tiles was performed when scrolling right/down. The low 4 bits are forced to zero (AND #$FFF0) in order to get scroll values on a 16 pixel boundary. It is used to determine if a VRAM update is necessary during scrolling.Camera2
$7E0055Direction of scrolling for Layer 1. #$00 = left (or up); #$02 = right (or down). Used to index the various camera tables at $7E0045 to $7E0048 and $7E004D to $7E0050. When handling routine $00F70D, it is set to $00 if the player's on-screen X position is less than the value of $142A and $02 otherwise. This is used to determine which side to enable spawning sprites depending which side the player is on compared to $142A. It is also temporarily set to #$01 during level load for loading onscreen sprites.Camera1
$7E005BScreen mode: CD----Vv. C = Collision with either Layer 2 or Layer 3. D = Disable collision with Layer 1. V = Vertical Layer 2. v = Vertical Layer 1. - = unused. For the most part, this address is managed by a table at [url=https://smwc.me/m/smw/rom/058417]$058417[/url], which is indexed by the level mode setting. The only exception to this is that the C bit may also get set if Layer 3 tides are active.Misc.1
$7E006524-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: - [b]$65-$66[/b] 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. - [b]$67[/b] tracks the current line number being written, with a line defined as two consecutive 8x8 rows.Pointer3
$7E0094Player X position (16-bit) within the level, next frame (calculates player position one frame ahead, as opposed to $D1). It's also used as a player X position on-screen on the overworld border. NOTE: During player interaction with blocks on Layer 2, this value is modified to be relative to Layer 2's position rather than Layer 1. This can be checked via $1933, and can be offset back to Layer 1 by subtracting $26.Player2
$7E0096Player Y position (16-bit) within the level, next frame (calculates player position one frame ahead, as opposed to $D3). It's also used as a player Y position on-screen on the overworld border. NOTE: the player's Y position is not affected by their powerup, nor whether they are crouching; the point will always be 32 pixels above their feet. However, if riding on Yoshi, their Y position does get offset 16 pixels upwards. Additionally, during player interaction with blocks on Layer 2, this value is modified to be relative to Layer 2's position rather than Layer 1. This can be checked via $1933, and can be offset back to Layer 1 by subtracting $28.Player2
$7E0098Position (in pixels) of the collision point currently being processed for player interaction with blocks in the level. Also used in the creation of various sprite types/other blocks. $98-$99: 16-bit Y position $9A-$9B: 16-bit X position Note that this position is with respect to the top left of the layer being processed. Hence, if Layer 1 and Layer 2 are offset from each other, this value will differ between the two, even when Mario is at the same position with respect to the level. Also note that, in vertical levels, the X and Y position may be swapped after running certain block changing routines (e.g. $00BEB0 or the ChangeMap16 routine included with various tools).Misc.4
$7E0D9DMain Screen and Window logic mask setting of current level mode (000abcde - a = Object layer; b = Layer 4; c = Layer 3; d = Layer 2; e = Layer 1). Appears as TM in Lunar Magic. Mirror of SNES registers $212C and $212E; transfer only occurs on level load.Hardware mirror1
$7E0D9ESub Screen and Window logic mask setting of current level mode (000abcde - a = Object layer; b = Layer 4; c = Layer 3; d = Layer 2; e = Layer 1). Appears as TD in Lunar Magic. Mirror of SNES registers $212D and $212F; transfer only occurs on level load.Hardware mirror1
$7E0DA2Copy of controller data 1 ($7E:0015). Format: byetUDLR. b = B, y = Y, e = Select, t = Start, UDLR = Up/Down/Left/Right. Used by player 1 (Mario).I/O1
$7E0DA4Copy of controller data 2 ($7E:0017). Format: axlr----. a = A; x = X; l = L; r = R, 0 = null/unused. Note that the upper two bits are also used by controller data 1 at $7E:0015, so that A/B and X/Y are combined. Used by player 1 (Mario).I/O1
$7E0DA6Copy of controller data 1, one frame ($7E:0016). Format: byetUDLR. b = B, y = Y, e = Select, t = Start, UDLR = Up/Down/Left/Right. Used by player 1 (Mario).I/O1
$7E0DA8Copy of controller data 2, one frame ($7E:0018). Format: axlr----. a = A; x = X; l = L; r = R, 0 = null/unused. Note that the sixth bit is also used by controller data 1 at $7E:0016, so that X/Y are combined. Used by player 1 (Mario).I/O1
$7E13C1Current Layer 1 overworld tile the player is standing on.Overworld1
$7E13CCThe value you store here is the amount of coins that are being added up, once per frame, to the total (done by incrementing the coin count and decrementing $13CC until 0). This is originally to allow the coin incrementing animation instead of instantly showing the total. This is handled by a code at $008F1D-$008F27. In the vanilla game, $13CC is written to via the routines at $05B329 - used by sprite 7E, the flying red coin, to give the player 5 coins - $05B330 - used by the Yoshi coin, to give the player 1 coin without overwriting the Yoshi coin sound effect - and $05B34A - used by various things which give the player a coin. These routines accumulate the value, in such a manner that the player can collect more than one coin in the same frame.Counter1
$7E13D5A flag that determines whether or not Layer 3 should scroll with the screen. If this is zero, Layer 3 will scroll depending on the tileset and tide setting; if it is any other value, Layer 3 will always be at the same position relative to Layer 1. Also used on the overworld as accumulating fraction bits for player X speed (see $04:9801).Misc.1
$7E13EFPlayer is on ground flag. Set to #$01 on Layer 1, #$02 on Layer 2, and #$03 when on both. If they're running fast enough up a slope, that value is doubled. Is only set when touching an actual floor, and not when running up walls. Does not work correctly in blocks, as the value still has to be calculated at that point. Instead, the value is copied over to $7E008D during that time. If Layer 1 interaction is enabled, that address is also doubled.Player1
$7E1417The base vertical offset of Layer 2 from Layer 1, when vertical scrolling is enabled for it. This is calculated based on the type of vertical scrolling set in [url=https://smwc.me/m/smw/ram/7E1414]$1414[/url] and the initial FG/BG positions stored to [url=https://smwc.me/m/smw/ram/7E001C]$1C[/url] and [url=https://smwc.me/m/smw/ram/7E0020]$20[/url] as [code inline]$20 - ($1C * scroll rate)[/code].Camera2
$7E1419How 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.
Sprites1
$7E1440The starting Y position of the current scroll sprite, left-shifted twice and with the extra bits still added. (Format: --YYYYEE, where Y = Y position and EE = extra bits). Regularly adjusted inside the scroll sprites. It can be particularly useful for determining what type of scrolling should be applied with this scroll sprite. This address is used for Layer 1 scrolling. Also used during the castle destruction cutscenes as a frame number for various animations.Sprites1
$7E1442Used in scroll sprites for tracking what type of scrolling Layer 1 it is currently doing, usually depending on [url=https://smwc.me/m/smw/ram/7E1440]$1440[/url]. Also used during the Yoshi's House portion of the credits to keep track of the current phase (24-bit pointers to which can be found at $0CA1DE):
  • 00 = Player and companion walks in
  • 01 = Various Yoshis duck and watch in excitement.
  • 02 = Eggs are shattering, one by one.
  • 03 = Yoshis get up and "THANK YOU" appears on Yoshi's house.
  • 04 = Yoshis jump in excitement, then screen fades out.
Similarly used during the castle destruction sequences to keep track of the current phase for those as well. Each castle destruction has its own pointer table for this address, which can be found by starting from the pointer table at $0CC9A5.
Misc.1
$7E1444Layer 1 scroll command pointer/timer. This timer serves no defined purpose on itself, but is generally used for waiting a specific number of frames before updating scroll properties such as speed. For example, with the Layer 1 auto-scroll, this value being #$00 indicates the auto-scroll has finished. Also used during the castle destruction scenes as an indicator to show the white surrender flag. Also used as a flag on the overworld to indicate if the player is on a level tile. Value is #$00 when on a path tile, and #$01 when on a level tile.Misc.1
$7E1446Layer 1 X speed used in the scrolling codes. #$0001-#$7FFF = move left; #$8000-#$FFFF = move right. #$0000 means there is no movement. Effectively, it's the X speed to give the player when they're touching the side of a screen, during a level which does not have regular Layer 1 scrolling. Values are different depending on the type of (auto-)scroll. This value divided by #$10/#16 is stored into $7E:007B. Additionally used during the castle destruction cutscenes for various purposes. $1446 is used in Morton/Roy's scenes to show the huff cloud at the end and as the Y position of the broom in Wendy's scene. $1447 is used in Ludwig's scene as the vertical speed of the castle as well as a counter for the dust animation when it hits the hill, and in Larry's as the vertical speed of the castle as well as a timer for when it crashes.Sprites2
$7E1448Layer 1 Y speed used in the scrolling codes. #$0001-#$7FFF = move upwards; #$8000-#$FFFF = move downwards. #$0000 means there is no movement. $1449 specifically is also used as a timer in Wendy's castle destruction scene for pausing between shifting broom directions or moving Mario to the side.Sprites2
$7E144EUsed internally by scroll sprites, often as accumulating fraction bits for Layer 1's X position (specifically with the routine at $05C4F9). On the overworld, $144E specifically is used to determine after how many frames the player should face the screen again after settling on a level tile. During the credits, $144E is used as a timer for Peach's walking animation, while $144F indicates which frame of that animation she is in.Sprites2
$7E1450Used internally by scroll sprites as accumulating fraction bits for Layer 1's Y position, specifically with the routine at $05C4F9.Sprites2
$7E1456Used internally by scroll sprites for indexing the layer position RAM addresses based on which layer is being moved (00 = Layer 1, 04 = Layer 2).Sprites1
$7E1462Layer 1 X position, next frame, as opposed to the current frame's position at [url=https://smwc.me/m/smw/ram/7E001A]$1A[/url]. Mainly used for autoscrolling Layer 1. 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.Misc.2
$7E1464Layer 1 Y position, next frame, as opposed to the current frame's position at [url=https://smwc.me/m/smw/ram/7E001C]$1C[/url]. Mainly used for autoscrolling Layer 1.Misc.2
$7E16C9Block bounce sprite table. Format: L-----DD L is which layer it is on. Clear means it's on layer 1, set means it's on layer 2 (or layer 3 if applicable). DD is the direction it is moving in. 00 = up; 01 = right; 10 = left; 11 = down.Sprites4
$7E17BCHow much the Y position of Layer 1 changed in the current frame. Only used by the originally unused winged cage sprite.Misc.1
$7E17BDHow much the X position of Layer 1 changed in the current frame. Used in various instances, for example to check how fast the spinning coins should move horizontally when a goal tape is touched when there are sprites on screen.Misc.1
$7E17E4Spinning coin from block table. Indicates whether the spinning coin is generated from a block on Layer 1, or Layer 2/3. Depending on the layer, it updates its position based on the layer's movements.Sprites4
$7E185ESometimes used to keep track of a tile to generate at $00:BEB0 (before storing to $7E:009C); may be used in conjunction with $7E:18B6. Also used to determine the player Y position when they're on the line guided rope and used to determine positions and such of Yoshi's tiles. In the sprite/object interaction routine, it's also used to indicate which layer the sprite is touching. 00 = layer 1; 01 = layer 2.Misc.1
$7E1887Time to shake Layer 1.Timer1
$7E1888Layer 1 image relative Y position, used by $7E:1887 (shaking ground). Does not affect Layer 1 interaction. #$0000 = default value, Layer 1's image unchanged. The higher the value (positive, #$0001 and beyond), the more Layer 1 goes up. The lower the value (negative, wraps around to #$FFFF and below) the more Layer 1 goes down.Misc.2
$7E18B5Cleared when standing on the ground, set when standing on the floor of the unused winged cage. It tells whether the player should be following the cage or layer 1.Flag1
$7E1933Layer being processed. #$00 = Layer 1; #$01 = Layer 2/3 (depending on which is interactive). Used in both level loading routine and processing interactions.Misc.1
$7E1B7CAccumulating fraction bits for the Layer 1 X speed on the overworld, used when the camera returns to the player after having been in free scrolling mode. This address handles incrementing the Layer 1 X position when it overflows.Overworld1
$7E1B7DAccumulating fraction bits for the Layer 1 Y speed on the overworld, used when the camera returns to the player after having been in free scrolling mode. This address handles incrementing the Layer 1 Y position when it overflows.Overworld1
$7E1BE4VRAM address to start uploading data from the table at [url=https://smwc.me/m/smw/ram/7E1BE6]$1BE6[/url]. Used for Layer 1.Blocks2
$7E1BE6Which tiles should be used for each row of 16x16 tiles, 2 bytes per 8x8 tile, used while scrolling layer 1 (loading new tiles). In horizontal levels, $7E:1BE6-$7E:1C65 form the left column of 8x8 tiles while $7E:1C66-$7E:1CE5 form the right column of 8x8 tiles. On the overworld and in vertical levels, $7E:1BE6-$7E:1C65 form the upper row of 8x8 tiles, while $7E:1C66-$7E:1CE5 form the bottom row of 8x8 tiles.Blocks256
$7E1F1FMario's overworld X position divided by #$10 (#16). Used to determine which layer 1 tile the player is standing on when drawing the level name, deciding which level the player is entering, and used during the overworld movement code.Player2
$7E1F21Mario's overworld Y position divided by #$10 (#16). Used to determine which layer 1 tile the player is standing on when drawing the level name, deciding which level the player is entering, and used during the overworld movement code.Player2
$7E1F23Luigi's overworld X position divided by #$10 (#16). Used to determine which layer 1 tile the player is standing on when drawing the level name, deciding which level the player is entering, and used during the overworld movement code.Player2
$7E1F25Luigi's overworld Y position divided by #$10 (#16). Used to determine which layer 1 tile the player is standing on when drawing the level name, deciding which level the player is entering, and used during the overworld movement code.Player2
$7EC800Map16 Low Byte Table. For the high bytes, see [url=https://smwc.me/m/smw/ram/7FC800]$7FC800[/url]. In horizontal levels, $1B0 tiles per screen, where each screen can be indexed using the format [code inline]%-------y yyyyxxxx[/code]. Addresses $7EFE00-$7EFFFF (512 bytes) are unused. In vertical levels, $200 bytes per screen, with the format [code inline]%--sssssx yyyyxxxx[/code]. All bytes are used. If Layer 2 or 3 is interactive in the level, it uses screens 10-1F (0E-1B in vertical levels). On Lunar Magic version 3+, refer to [url=https://www.smwcentral.net/?p=section&a=details&id=19816]this document[/url] for the layout in other level dimensions. [b]On the overworld:[/b] [code inline]$7EC800-$7ECFFF[/code] (2048 bytes) is used as the Layer 1 tilemap for the overworld. To index this table, use [url=https://smwc.me/m/smw/ram/7E1F11]$1F11[/url], [url=https://smwc.me/m/smw/ram/7E1F1F]$1F1F[/url], and [url=https://smwc.me/m/smw/ram/7E1F21]$1F21[/url] to find Mario (or [url=https://smwc.me/m/smw/ram/7E1F12]$1F12[/url], [url=https://smwc.me/m/smw/ram/7E1F23]$1F23[/url], and [url=https://smwc.me/m/smw/ram/7E1F25]$1F25[/url] for Luigi). X position / 16: [code inline]%---- ---- ---X xxxx[/code] Y position / 16: [code inline]%---- ---- ---Y yyyy[/code] Index to this table: [code inline]%---- -SYX yyyy xxxx[/code] * If the player is on a submap, the S bit is set. [code inline]$7ED000-$7ED7FF[/code] (2048 bytes) is used as a table that contains the translevel numbers for every Layer 1 tile, in the format of [url=https://smwc.me/m/smw/ram/7E13BF]$13BF[/url]. [code inline]$7ED800-$7EDFFF[/code] (2048 bytes) is used as a table that contains the path direction settings for every Layer 1 tile, in the format of [url=https://smwc.me/m/smw/rom/04D678]$04D678[/url]. [code inline]$7EE400-$7EEBFF[/code] (2048 bytes) is used for uploading the Layer 1 tile map to VRAM in 2KB chunks. One chunk is uploaded per frame for four frames during transitions between the main overworld and submaps. Data is refreshed after each DMA.Blocks14336
$7F831FUsed by Lunar Magic 1.70+ to keep track of the previous frame's layer positions when the VRAM patch is installed. $7F831F = 16-bit layer 1 X position $7F8321 = 16-bit layer 1 Y position $7F8323 = 16-bit layer 2 X position $7F8325 = 16-bit layer 2 Y positionCamera8