| Address | Description | Type | Size |
| $7E0000 | Temporary scratch RAM used to store values for later use within a routine. Commonly used to pass values to or from subroutines beyond just what can be carried in A/X/Y.
Notably, in custom blocks, $03 contains the 16-bit Map16 tile number of the block. | Misc. | 16 |
| $7E0045 | Column/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. | Camera | 2 |
| $7E0047 | Column/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. | Camera | 2 |
| $7E0049 | Column/row of Map16 tiles to use for VRAM upload when interactive layer 2 is scrolling left/up. Its value is equal to $7E:001E (or $7E:0020 if vertical) divided by #$10 (16), minus #$08. | Camera | 2 |
| $7E004B | Column/row of Map16 tiles to use for VRAM upload when interactive layer 2 is scrolling right/down. Its value is equal to $7E:001E (or $7E:0020 if vertical) divided by #$10, plus #$17. | Camera | 2 |
| $7E004D | Last 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. | Camera | 2 |
| $7E004F | Last 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. | Camera | 2 |
| $7E0051 | Last X/Y value of interactive layer 2 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. | Camera | 2 |
| $7E0053 | Last X/Y value of interactive layer 2 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. | Camera | 2 |
| $7E006B | 24-bit pointer to low byte of Map16 block data. Used during level load. | Pointer | 3 |
| $7E006E | 24-bit pointer to high byte of Map16 block data. Used during level load. | Pointer | 3 |
| $7E0098 | Position (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 |
| $7E009C | Map16 tile to generate (used with [url=https://smwc.me/m/smw/rom/00BEB0]$00BEB0[/url]). | Blocks | 1 |
| $7E0FBE | Used as a table of 16-bit pointers to the VRAM data for each of the original game's Map16 tiles (tiles 000-1FF), indexed by tile * 2. Generally references the tables at around [url=https://smwc.me/m/smw/rom/0D8000]$0D8000[/url] (levels, FG), [url=https://smwc.me/m/smw/rom/0D9100]$0D9100[/url] (levels, BG), or [url=https://smwc.me/m/smw/rom/05D000]$05D000[/url] (overworld). Only the lower two bytes of each are included, though, with the bank byte just assumed based on whether the player is in a level or the overworld. | Pointer | 1024 |
| $7E1693 | During block interaction, this contains the low byte of the "acts like" setting of the tile being interacted with (with the high byte being in Y). Writing to it (and Y) will change how things interact with the block.
In custom blocks, if you want to get the block's actual 16-bit Map16 number, that can instead be found in $03/$04. | Blocks | 1 |
| $7E16C1 | Bounce sprite turns into Map16 tile. This uses the same values as [url=https://smwc.me/m/smw/ram/7E009C/]$9C[/url]. | Sprites | 4 |
| $7E185F | This is the low byte of the Map16 tile (actual tile number, not "acts like" setting) that a sprite is touching vertically. The high byte is at $18D7.
This, $1860, $1862, and $18D7 are set after $019138, the subroutine that allows the sprite to interact with objects, is called. (This includes $01802A, the routine that updates sprite position with gravity, which calls $019138.) | Sprites | 1 |
| $7E1860 | This is the low byte of the Map16 tile (actual tile number, not "acts like" setting) that a sprite is touching horizontally. The high byte is at $1862.
This, $185F, $1862, and $18D7 are set after $019138, the subroutine that allows the sprite to interact with objects, is called. (This includes $01802A, the routine that updates sprite position with gravity, which calls $019138.) | Sprites | 1 |
| $7E1862 | This is the high byte of the Map16 tile (actual tile number, not "acts like" setting) that a sprite is touching horizontally. The low byte is at $1860.
This, $185F, $1860, and $18D7 are set after $019138, the subroutine that allows the sprite to interact with objects, is called. (This includes $01802A, the routine that updates sprite position with gravity, which calls $019138.) | Sprites | 1 |
| $7E1868 | Used as a mirror of [url=https://smwc.me/m/smw/ram/7E1693]$1693[/url] (the low byte of a Map16 tile being interacted with) for solid Map16 tiles when touched from below by a sprite. Carryable sprites in particular then use this value to handle actually hitting the block. | Blocks | 1 |
| $7E18A7 | This address is a mirror of $7E:1693, which holds the Map16 number of the current block that is being checked. Primarily used in the Chargin' Chuck turn/throw block detection code. | Blocks | 1 |
| $7E18D7 | This is the high byte of the Map16 tile (actual tile number, not "acts like" setting) that a sprite is touching vertically. The low byte is at $185F.
This, $185F, $1860, and $1862 are set after $019138, the subroutine that allows the sprite to interact with objects, is called. (This includes $01802A, the routine that updates sprite position with gravity, which calls $019138.) | Sprites | 1 |
| $7EC800 | Map16 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. | Blocks | 14336 |
| $7FC060 | Used by Lunar Magic v1.80+ as bitwise state flags for Conditional Direct Map16. To find the bit for a particular flag, use [code inline]flag >> 3[/code] to get the byte, and then [code inline]1 << (flag & 7)[/code] to get a bitmask for the bit (ordered low to high).
Note that this address is not initialized automatically. | Flag | 16 |
| $7FC300 | Used by Lunar Magic v1.70 as a Map16 high byte buffer.
Lunar Magic also moves the tables used for the overworld's switch palace block animation from [url=https://smwc.me/m/smw/ram/7EB900]$7EB900[/url] to here:
- [b]$7EC500[/b] - Switch block X position, high byte
- [b]$7EC528[/b] - Switch block Y position, high byte
- [b]$7EC550[/b] - Switch block Z position, high byte
- [b]$7EC578[/b] - Switch block X position, low byte
- [b]$7EC5A0[/b] - Switch block Y position, low byte
- [b]$7EC5C8[/b] - Switch block Z position, low byte
- [b]$7EC5F0[/b] - Switch block X speed
- [b]$7EC618[/b] - Switch block Y speed
- [b]$7EC640[/b] - Switch block Z speed
- [b]$7EC668[/b] - Accumulating fraction bits for fixed point switch block X speed
- [b]$7EC690[/b] - Accumulating fraction bits for fixed point switch block Y speed
- [b]$7EC6B8[/b] - Accumulating fraction bits for fixed point switch block Z speed
| Misc. | 1024 |
| $7FC800 | Map16 high byte table. Same format as [url=https://smwc.me/m/smw/ram/7EC800]$7EC800[/url].
$7FFFF8-$7FFFFD are also used by Lunar Magic's title screen recording ASM. | Blocks | 14336 |