AddressDescriptionTypeSize
$7E003FOAM Address, low byte. Also known as the mirror of SNES register $2102. High byte is at $00846B. Is sometimes used to alter priority of various sprite tiles, such as with the sprite backgrounds in the boss rooms.Hardware mirror1
$7E0200OAM table. Used to handle all sprite tile data, with 128 slots for tiles. Generally, the table is indexed from either $0200 or $0300, with $0300 being used for normal sprites (and Mario) and $0200 being used for various other sprite types. Tiles are drawn to the screen from top to bottom of the table; that is, a sprite in slot 0 will always appear visually in front of a sprite in slot 1. The table actually consists of two sub-tables:
  • [b]$0200-$03FF[/b] (512 bytes): Each slot gets four bytes in the order of: X position, Y position, tile number, YXPPCCCT. Unused tiles are generally marked by giving them a Y position of #$F0 (i.e. offscreen).
  • [b]$0400-$041F[/b] (32 bytes): Each slot gets 2 bits [code inline]%SX[/code], with the X bit used to handle a 9th bit of the X position (for handling sprite tiles that go past the left edge of the screen) and the S bit acting as a "size bit" which (generally) controls whether the tile is 8x8 (0) or 16x16 (1). Since each tile only requires 2 bits, each byte of this table actually handles four separate tiles; see the details table for more information. It is not recommended that you write to this table directly, though, and you should use the table at [url=https://smwc.me/m/smw/ram/7E0420]$0420[/url] instead. The routine at [url=https://smwc.me/m/smw/rom/008494/]$008494[/url] is responsible for then packing the data from that table back into $0400.
See details for a more-detailed map of the gane's slot usage.
I/O544
$7E0420OAM extra bits table, with one byte per OAM tile. Used to generate the packed table at [url=https://smwc.me/m/smw/ram/7E0200]$0400[/url] during the routine at [url=https://smwc.me/m/smw/rom/008494]$008494[/url]. Format: [code inline]%000000SX[/code]
  • S - Size. Generally, 0 = 8x8, 1 = 16x16.
  • X - Bit 9 of the tile's X position. Used to allow tiles to be positioned beyond the left edge of the screen.
  • All other bits must remain 0.
Sprites can either manually write the necessary information here, or they can use the routine at [url=https://smwc.me/m/smw/rom/01B7B3]$01B7BE[/url] to take care of it.
Sprites128
$7E0DDFStarting OAM index for overworld sprites. Appears to be used only by the cloud sprites.Sprites1
$7E140FKeeps incrementing in the Reznor battle room. It is used as a flag to determine that a different OAM index needs to be used for a smoke sprite or a puff of smoke, to make sure there's no conflict with the platform tiles. However, since this keeps incrementing and thus sometimes hits #$00 again, it can occur that a platform tile disappears for one frame when a smoke sprite is shown.Flag1
$7E1438Used for multiple purposes. Keyholes use it as the Y position of the keyhole animation. The Iggy/Larry boss fight uses it to control the player's Y position when on the ground. The overworld also uses it when spawning switch palace blocks. $1438 is the base OAM index of the current block set. Increments by 0x20 with each set of blocks, then resets to 0x00 once it reaches 0xA0. $1439 is a counter for how many sets of blocks have been spawned. It stops spawning at 0x08, but keeps counting up to 0x0C, at which point the spawn routine ends.Misc.2
$7E15EASprite index to the OAM table, handled by [url=https://smwc.me/m/smw/rom/0180D2]$0180D2[/url] to quickly obtain an empty OAM slot. Note: meant to be used as an index to the second half of the OAM table (use it for $0300 and $0460, not $0200 and $0420).Sprites12
$7E190DUsed as a flag in the Bowser battle for whether or not the final cutscene is playing. Used to remove the item box, as well as several palette updates and using a different OAM index for the roof tiles. Any non-zero value activates the flag.Flag1
$7E1E01During 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 [url=https://smwc.me/m/smw/rom/00CC84]$00CC84[/url]). When enabled, the values correspond to: 00 = off, 01 = enable max P-speed, 02 = enable no-clip free roam. Use [url=https://www.smwcentral.net/?p=tweaks&a=details&id=190]this tweak[/url] to disable the cycling, rendering the address truly empty to use as free RAM (cleared at reset and title screen load). Player1
$7F8000Unrolled loop which, executed once per each frame, writes to OAM to put all sprites outside the screen (this clears the OAM slots by setting their Y positions to #$F0). Note: Not executed during pause.Sprites387