SMW Memory Map
Displaying 150 out of 3145 addresses.
View: moderated | waiting (19)
ROM Address | Length | Type | Description | Details |
---|---|---|---|---|
$008000 | 39 bytes | ASM | This is the starting address of SMW. This takes care of basic initialization such as disabling IRQ, HDMA, DMA, clearing the SPC ports, enabling F-blank, disabling emulation mode, disabling decimal mode, initializing the direct page, and setting up the stack. | |
$008027 | 43 bytes | ASM | This is code is responsible for uploading the OAM clear routine to $7F8000. The uploaded routine is essentially an unrolled loop which stores #$F0 to all of the OAM mirror($0200) Y positions. | |
$008052 | 25 bytes | ASM | This is the main part of the SMW initialization routine. SPC engine upload, sample upload, OAM setup, windowing setup, and RAM clearing all happens here. | |
$00806B | 14 bytes | ASM | This is the main game loop of SMW. It is used to wait for V-blank to complete before executing the code of the next frame. One of the frame counters ($13) is also incremented here. | |
$00810E | 15 bytes | Subroutine (JSR) | OW Music uploader. | |
$008134 | 37 bytes | Subroutine (JSR) | Uploads level music bank. | |
$008159 | 17 bytes | Subroutine (JSR) | Credit music uploader. | |
$00816A | 522 bytes | Misc. | SMW's NMI routine. For more information, see here. | |
$008179 | 49 bytes | ASM | Handles transfers to and from the SPC700 (I/O). Changing all values to [EA] (NOP) or jumping over the code effectively mutes all sound. | |
$008293 | 1 byte | Misc. | How many scanlines the status bar uses during a regular level. | |
$00835D | 1 byte | Layer 3 | How many scanlines the status bar uses during the battles with Bowser, Ludwig, and Reznor. | |
$008370 | 1 byte | Layer 3 | How many scanlines the status bar and ceiling use during the battles with Morton and Roy. | |
$008374 | 162 bytes | Misc. | SMW's IRQ routine. | |
$008449 | 44 bytes | Misc. | Code that transfer Sprite OAM mirror (sprite OAM table at $7E0200-$7E041F, a total of 544 bytes) to register $2104 to draw sprites. | |
$008494 | 52 bytes | Sprite tilemap related | Copies OAM's extra bits (size and 9th bit X position: %000000SX) data stored in $7E0420, and reformats, or “compacts” each 4 bytes of that into each byte to $7E0400 (%SXSXSXSX). | $0420 and $0400 format |
$0084C8 | 8 bytes | Subroutine (JSL) | JSL wrapper for the stripe image uploader (pointer lies in $12), which can be found at $0085D2. Because it upload tiles, it must run in either f- or v-blank (e.g. in NMI). | |
$0084D0 | 258 bytes | Stripe Image | Stripe image pointer table. Each 24-bit pointer here corresponds to a value of $12, but only multiples of 3 are used (the first pointer is for value $00, the second is for value $03, the third for $06, etc.). | |
$0085D2 | 40 bytes | Subroutine (JSR) | Subroutine which uploads the stripe image pointed by $12 to VRAM. The pointer is loaded from the table at $0084D0, and then the routine at $00871E is called. Afterwards, if $12 is #$00, the stripe image length at $7F837B is set to 0 and the terminator $FF is written to the beginning of $7F837D. In any case, $12 is reset to 0 before returning. To call this routine from outside bank 0 you can JSL to the wrapper at $0084C8. This should only be done during a blank period (usually NMI). |
|
$0085FA | 86 bytes | Subroutine (JSR) | Fills the entire layer 3 tilemap with tile 0x0FC (transparent tile) i.e. the code "empties" it. Also wipes the OAM before returning. | |
$008650 | 119 bytes | Subroutine (JSR) | This is the routine that polls the controller and updates $15, $16, $17, $18. $0086A0 (x8A0) - Change to [9C A0 0D AD A0 0D A2 00] to cause both player 1 & 2 to be controlled by controller 1. |
|
$0086C7 | 24 bytes | Subroutine (JSR) | Subroutine that initializes the OAM table in Roy, Morton and Ludwig's rooms. It first initializes the first 100 tiles to be 16x16 (by setting $0420,x to #$02), then jumps in the middle of the standard OAM clear routine (JSL $7F812E). | |
$0086DF | 27 bytes | Subroutine (JSL) | Pointer subroutine: Jump to a 2-byte pointer, the position of the pointer used is "Position after the JSL + 1 + (A*2)". The subroutine should always be accessed by a JSL. | |
$0086FA | 36 bytes | Subroutine (JSL) | Pointer subroutine: Jump to a 3-byte pointer, the position of the pointer used is "Position after the JSL + 1 + (A*3)". The subroutine should always be accessed by a JSL. | |
$00871E | 143 bytes | Stripe Image | Stripe Image Uploader. Uses $00-$02 as a 24-bit pointer to tile data. See this thread how the stripe image format works. Must be run during a blank, usually NMI. To call from a custom routine, do this: - Store stripe image pointer (24-bit) to $00-$02 - Push 24-bit return address (bank -> mid -> lo) - PHB : LDA #$00 : PHA : PLB - PEA $84CD - JSL $00871E |
|
$0087AD | 617 bytes | Subroutine (JSL) | This routine is the DMA routine in charge of updating layers one and two as needed. This is controlled by the addresses $1BE4 and $1CE6 when they are a non-zero value. | |
$008A4E | 43 bytes | Subroutine (JSR) | Clear RAM subroutine. This is part of the reset routine. Specifically, it clears ram $00-$FF (direct page), $0200-$1FFF, $0681 and the stripe image table (by setting $7F837B to #$0000 and the start of $7F837D to #$FF). |
|
$008A79 | 59 bytes | ASM | The routine that sets up certain VRAM-related registers in normal levels. - $008A80: Default value for $2107 [23]. - $008A85: Default value for $2108 [33]. - $008A8A: Default value for $2109 [53]. - $008A8F: Default value for $210B [00]. - $008A94: Default value for $210C [04]. - $008AAB: Default value for $2130 [02], although it's actually stored to the mirror here (i.e. $44). $210A is never set, since it is only ever used in Mode 0. |
|
$008ACD | 138 bytes | Subroutine (JSR) | Routine that updates the mode 7 matrix parameters mirrors at $2E-$34 using the rotation and scale parameters at $36-$38. SMW calls it every frame in mode 7 bosses (when $0D9B is >= #$80), and the "Easy Mode 7 patch" calls it every frame in mode 7 levels, but you may need to call it manually if you're using mode 7 in special situations (for example, on the Overworld). On SA-1 roms, this must be called when running on the SNES CPU. |
Call routine code |
$008C59 | 40 bytes | Layer 3 | Tile array for numbers in bonus star counter. | |
$008C81 | 126 bytes | Layer 3 | Default status bar tiles info table. Format for each 8x8 tile: %TTTTTTTT %YXPCCCTT *$008C81-$008C88: top line of status bar (4 top tiles of the item box) *$008C89-$008CC0: Second line of status bar *$008CC1-$008CF6: Third line of status bar *$008CF7-$008CFE: bottom line of status bar (4 bottom tiles of item box) |
Table of addresses |
$008D8B | 1 byte | Timer | Timer speed (USE WITH $008E2E) | |
$008D90 | 28 bytes | Misc. | These four tables indicate the DMA settings and the source address to use for the status bar tiles (the ones that are uploaded at the very beginning of the level). The tables get stored in the order of $43x0-$43x6. | |
$008DAC | 59 bytes | Layer 3 | The routine that draws the status bar onto the screen. It uses DMA to write the Layer 3 tiles to VRAM. | |
$008DF5 | 5 bytes | Layer 3 | The tiles that make up Luigi's name in the status bar. | |
$008DFA | 4 bytes | Sprite tilemap related | Tilemap of reserve item. First byte is mushroom, second is flower, third is star, fourth is feather. | |
$008DFE | 4 bytes | Sprite tilemap related | YXPPCCCT of stars in the item box. It cycles between the four entries every second frame. | |
$008E02 | 4 bytes | Sprite tilemap related | YXPPCCCT data for reserve item. First byte is mushroom, second is flower, third is bypassed ($008DFF), fourth is feather. | |
$008E06 | 20 bytes | Layer 3 | Bonus star counter tilemap - 2 bytes for each number. Every first byte is for the upper tile, every second byte for the bottom tile. | |
$008E1A | 480 bytes | Layer 3 | The routine that updates the values of all the addresses used for the status bar ($0EF9-$0F2F). $008E28 - Change this address to AD to disable the timer. $008E2E - Timer speed (USE WITH $008D8B) $008E45 - Tile that each timer digit resets to after reaching 0. Can be any value from $00-$80. (e.g. Change to $0F: 100 -> 0FF -> 0FE ... 0F0 -> 0EF ... etc.) $008E5C - Time is Running Out SFX. Change from FF to 00 to stop the music from speeding up when time reaches 99. $008E6B - [22 06 F6 00] Change to [EA EA EA EA] to not kill Mario when the timer reaches zero. The timer will count down normally and stop at zero, but Mario will not die $008EDB - Change this and/or $008F09 from 20 12 90 to EA EA EA to disable writing the score to the status bar when playing as Mario and/or Luigi, respectively. Useful if you want to place another counter in place of the score using Smallhacker's Status Bar Editor. Note: This alone will NOT stop writing blank tiles if the first N tiles/bytes at $0F29-$0F2E contains the value #$00 (the "0" graphic). To prevent that, consider using this patch. $008EE3 - Change to BRA [80] to write zeroes instead of blank tiles to Mario's score counter. Use with $008F11. $008F11 - Change to BRA [80] to write zeroes instead of blank tiles to Luigi's score counter. Use with $008EE3. $008F2C - How many coins you need to get an 1up (USE WITH $008F37) $008F2F - [EE E4 18] Change to [EA EA EA] to not gain a life after collecting enough for one. $008F37 - Number of coins to subtract from the counter when you gain enough for a 1up (Default: $64 (100). Change to [01] to create a coin wallet effect - use with $008F2F. $008F41 - (Use with $008F45) Maximum life limit, minus one. Warning: Changing this to anything higher than 0x7E (127 lives) will remove the life limit entirely! Also, if you have more than 99 lives, the life counter will appear slightly glitched. $008F45 - (Use with $008F41) Maximum life limit, minus one. Note that if you have more than 99 lives, the life counter will appear slightly glitched. $008F62 - Number of bonus stars required to enter bonus game $008F67 - [8D 25 14] Change to EA EA EA to disable entering bonus game when player has 100 bonus stars. $008F6F - Amount of bonus stars that will be subtracted when 100 bonus stars are collected. Change to [01] to make 99 the maximum amount of bonus stars you can get - to create a bonus star wallet effect, use with $008F67. $008F7E - Writes coins to status bar. Changing to [EA EA EA EA EA EA] will disable the coins from being written to the status bar. $008F95 - [09] The X position of the small bonus star counter in the status bar. $008FC5 - [20 79 90] Change to EA EA EA to disable the item GFX in the status bar $008FCE - Length of "LUIGI" text (Status bar) $008FE7 - [FC](blank tile) Tile used on the status bar when there's no Yoshi coin in that spot. $008FED - [2E](coin tile) Tile used on the status bar when there is a Yoshi coin in that spot. Change to [FC](blank tile) to visually disable collected Yoshi Coins. |
|
$008F1D | 30 bytes | Misc. | Routine that handles actually increasing the player's coin count and giving a life from 100 coins, controlled by RAM address $7E13CC. | |
$008FDC | 1 byte | Layer 3 | [05] If the player has collected at least this number of Dragon Coins, the status bar will display $008FE0 Dragon Coins instead (none by default). | |
$008FE0 | 1 byte | Layer 3 | [00] Number of Dragon Coins to display in the status bar, if the player has collected at least 5. | |
$008FF0 | 2 bytes | Layer 3 | Location of the first Dragon Coin tile in the status bar. | Diagram |
$008FFA | 24 bytes | Misc. | Table containing six 32-bit numbers representing hexadecimal powers of 10, used by the 6-digit HexToDec routine at $009012 used to display the player's score. The numbers are not direct 32-bit values, though, and are instead two consecutive 16-bit values that are directly concatenated together. For instance, the number 100000 (0x186A0 is hex) is represented here as [$0001,$86A0]. | 16-bit values |
$009012 | 51 bytes | Subroutine (JSR) | 6-digit HexToDec subroutine, used to write a player's score into status bar (note: although the score is shown in-game as 7 digits, the 7th digit is just a static 0 tile). This function calculates the digits by repeatedly subtracting powers of 10 (in hexadecimal) from the input number until no more can be subtracted. Input: - Y: Set to #$00 - X: Status bar position to write to (indexed from $0F15) - $00-$03: Hexadecimal value to convert. Note that this is not provided as a normal 32-bit value, though, and instead should be provided as two 16-bit values, with $00 being the high word and $02 being the low word. |
|
$009045 | 12 bytes | Subroutine (JSR) | Subroutine used to convert a hexadecimal value to 2-digit decimal (also known by HexToDec). A JSL to this routine can be found at $00974C. Input: -A: 8-bit value to convert Output: -A: 1s digit -X: 10s digit |
|
$009051 | 40 bytes | Subroutine (JSR) | Subroutine used to convert the player's bonus stars from hexadecimal to decimal, and then write them to the status bar. Note that this only writes them as single-tile 8x8 digits, though; the main status bar's code at $008FAF is responsible for later converting these small digits to the 8x16 numbers actually seen in-game. | |
$009053 | 3 bytes | Layer 3 | Change to EAEAEA to get rid of the small bonus stars. Use in conjunction with address $00:9068 | |
$009068 | 3 bytes | Layer 3 | Change to EAEAEA to get rid of the small bonus stars. Use in conjunction with address $00:9053 | |
$009079 | 88 bytes | Sprite tilemap related | Subroutine that draws the power up item to the item box on the status bar during levels. $0090AE is the X position of the Item Box item. $0090B3 is the Y position of the Item Box item. Note: Those two positions are only graphical. It won't change where the item drops from when select is pressed. To change that, see $028052 and $028060 |
|
$0090D1 | 104 bytes | Sprite tilemap related | Tile numbers for 'MARIO START' and various similar messages. $0090EE is for the top half of Time Up. $009122 is for the bottom half of Time Up. |
|
$009139 | 98 bytes | Sprite tilemap related | YXPPCCCT properties for 'MARIO START' and various similar messages. Change $00913F from 30 to 34 and $009170 from F0 to F4 to fix the S in "Mario/Luigi Start". $009156 is for the top half of 'TIME UP". |
|
$0091AC | 1 byte | Misc. | Number of coins needed to get an 1up from the green star block. | |
$0091DB | 1 byte | ASM | Change it to D0 to switch the "Mario/Luigi Start" | |
$00922F | 33 bytes | Subroutine (JSR) | Routine that uploads the entire palette from $0703 to CGRAM. Note that it first resets $0703 and $0704 to $0000 (i.e. turns color 0 to black). This routine is called during various loading screens (Nintendo Presents, level load, overworld load, cutscene load, credits load) but not during gameplay. |
|
$009250 | 51 bytes | Subroutine (JSR) | Routine that initializes the windowing HDMA parameters. It sets the window to use HDMA channel 7 (or 1, if using SA-1 pack v1.35+) and to use $04A0 as the source. It also initializes that buffer to all $FF00 (i.e. no window is shown). This is only called on game reset. |
|
$0092AE | 2 bytes | Misc. | The scanline × 2 of the solid lava colour in the Iggy/Larry boss battle. Change it to $A8,$01 (dw $01A8) to have it begin just where the sprite lava tiles end. |
|
$009329 | 84 bytes | Pointer | 16-bit game mode pointers. Indexed by $7E:0100. | |
$009389 | 4 bytes | Coordinate | X position of the "Nintendo Presents" tiles | |
$00938D | 4 bytes | Sprite tilemap related | "Nintendo Presents" logo tilemap | |
$0093A5 | 1 byte | Coordinate | Y position of "Nintendo Presents" logo | |
$0093B0 | 1 byte | Sprite tilemap related | YXPPCCCT properties for "Nintendo Presents". | |
$0093C0 | 5 bytes | Sound effect | Code responsible for the "Nintendo Presents" logo sound effect. $0093C1 (1 byte) is the sound effect ID ($01). $0093C3 (2 bytes) is the port ($1DFC). |
|
$0093C6 | 1 byte | Timer | How long "Nintendo Presents" stays on the screen before disappearing. | |
$0093CB | 1 byte | Misc. | Blinking Nintendo Presents (0F = 0 time, 1F = 1 time, 2F = 2 times, etc) Also known as Nintendo Presents Brightness (Values use Brightness Register ($0DAE)) |
|
$009436 | 3 bytes | Misc. | Change from [AD 33 14] to [4C 17 94] to disable the circle fade in from Title screen. Use in conjunction with address $009AAD. | |
$00943B | 1 byte | Misc. | How fast the circle right before the titlescreen opens. Default value is 04. The higher the value, the faster it opens. Don't go beyond #$19. | |
$009451 | 7 bytes | Palette | Back area colours to use for each castle destruction scene (One byte per movie) | |
$009459 | 7 bytes | Palette | Palette row (in the range 00-07) used by the castle in each castle destruction scene. 1 byte per scene. | |
$009461 | 7 bytes | Stripe Image | Stripe image (index to pointers at $0084D0) to load as the background for each castle destruction scene. | |
$0094A1 | 1 byte | Music | Music Bank that is used for the ending music. 0E = Overworld Music 48 = Level Music 59 = Ending Music |
|
$0094B3 | 1 byte | Music | Boss castle destruction sequence music #1 | |
$00950B | 1 byte | Debug | DEBUG: Boss defeated scene select (30 = enable) | |
$00955F | 1 byte | Misc. | GFX File loaded for Credits font | |
$009586 | 4 bytes | Level number | Which level to use for the Yoshi's House part in the credits. 'A9 28 A0 01'. Do not change A9 and A0. 28 is the low byte of the level (Note: Level number + 24), 01 is the high byte. | |
$00968E | 32 bytes | ASM | This is the beginning of the code that is executed for game mode 10 (the black period between fadeout from the OW and Mario Start). $0096A5 is which Layer 1 tile on the overworld will prevent the "Mario Start!" from appearing if the player is on it. (Default is $56, the Yoshi's House tile.) Change $0096A6 to EA EA to make MARIO START! appear on the Yoshi's house OW tile number, or to 80 03 to make the MARIO START! never appear. |
|
$0096AE | 158 bytes | ASM | This is the code that is executed by game mode 03 (Load title). Game mode 11 (Mario Start) also uses parts of this code. The shared parts starts at $0096D5. - $0096C4: music bank used for the Title Screen. 0E = Overworld Music, 48 = Level Music, 59 = Ending Music. - $0096C7: title screen (level C7) music. - $0096CC: title screen level number + $24. - $009724: intro screen (level C5) music. - $009725: changing it to [9C FB 1D] will allow you to change the music for the intro via Lunar Magic. - $009737: Bowser scene 1 music. |
|
$00974C | 4 bytes | Subroutine (JSL) | JSL wrapper for the HexToDec routine at $009045. | |
$00980F | 2 bytes | Coordinate | 16-bit X position of Mario when he starts at the Iggy / Larry room. First byte = X lo, second byte = X hi (this byte is not recommended to change). | |
$009A16 | 1 byte | Coordinate | Y lo position of Mario at the start of the Morton/Ludwig/Roy battle. | |
$009A1F | 47 bytes | Subroutine (JSR) | Writes the Map16 data for Ludwig/Morton/Roy's boss battle room. $009A40 is what tile the lava tiles in the Morton/Ludwig/Roy battles act like (by default: 05). Only Map16 page 00 is usable. |
|
$009AAD | 3 bytes | Misc. | Change from [A9 33 85] to [4C C0 9A] to disable the circle fade in from Title screen. Use in conjunction with address $009436. | |
$009AB2 | 1 byte | Misc. | Change to [03] to make all layers appear at the same time during titlescreen load. | |
$009ACB | 76 bytes | Subroutine (JSR) | The cursor routine used in file selection, player selection, and erase file. $009AD3 - If you change this to EA EA EA, the cursor arrow will never be shown in front of the game-start menus. (It will still act as though it were there, though.) $009AE4 - SFX that comes up when you select a game at the title screen. $009AFA - SFX played when you change an option at the title screen and overworld menus. |
|
$009B1D | 2 bytes | Palette | BG Palette for the File Erase screen. Original value is $39C9. | |
$009BBC | 1 byte | Sound effect | SFX for saving the game. | |
$009BC9 | 74 bytes | Subroutine (JSL) | Save Game function. (Load Game starts around $009CEF. Last byte used in SRAM seems to be $70:0358.) | Documentation |
$009C1F | 69 bytes | Controller | Mario's movement data on Title Screen. Format: xx yy xx yy xx yy [...] $FF The XXs is the value to store to $15, except that the Select flag (#$20) is instead used to tell if the XY flag (#$40) should be masked away from $16 (if it's set, that bit is stored to $16 unchanged; if clear, that bit is masked away. All other bits are stored to $16.) The YYs is how long to keep that value there. Setting an XX to $FF ends it. |
|
$009C6A | 1 byte | ASM | Change to 80 to open save game menu without pressing a button or Title Screen Playing. | |
$009C82 | 3 bytes | ASM | Change to [EA A9 00] to remove title screen movement. Title screen will not loop. | |
$009C87 | 1 byte | ASM | Change D0 (BNE) to 80 (BRA) to never make the titlescreen loop. | |
$009C9F | 4 bytes | ASM | Change from 22 00 80 7F to EA EA EA EA to disable sprites from disappearing on the title screen when pressing a button (opening file select menu) | |
$009CA9 | 1 byte | Misc. | Display following layers: ---o4321. o = sprite layer, 4 = layer 4 (unused), 3 = layer 3 (no effect however), 2 = layer 2, 1 = layer 1. Clear the corresponding bits for these layers to not make them display on file select screen load. | |
$009CAD | 3 bytes | ASM | Change '9C 9F 0D' to 'EA EA EA', and, if you happened to have a HDMA effect in the titlescreen, it will not be disabled when you go to the File Menu. | |
$009CB1 | 1 byte | Level number | Determines the low byte of the intro level number. Subtract 0x24 for the actual low byte (by default, E9-24=C5, meaning level C5, or possibly 1C5 with Lunar Magic's Display Level Message 1 fix). Change to [00] to skip the intro level and warp to the overworld immediately. | |
$009CCB | 3 bytes | Misc. | SRAM starting addresses for each of the three save files, high byte. | |
$009CCE | 3 bytes | Misc. | SRAM starting addresses for each of the three save files, low byte. | |
$009CD4 | 2 bytes | Palette | BG Palette for File and Player Select screens. Original value is $7393. | |
$009CD7 | 4 bytes | Sprite tilemap related | Y displacement for tiles in the first shared GFX routine ($019CF3). | |
$009CDB | 24 bytes | Sprite tilemap related | Properties for tiles in the first shared GFX routine ($019CF3). It's indexed by the value of $05 times 4. | |
$009D30 | 8 bytes | Subroutine (JSR) | Subroutine used for changing the background color on the titlescreen, when entering/exiting the file erase menu. To use, load the color (16-bit) to A and a CGADDSUB value (for half-color math) to Y first. Changing the first three bytes from [8D 01 07] to [EA EA EA] will disable the titlescreen back area color from changing. |
|
$009D6D | 1 byte | Misc. | How many exits you need to get the *96 icon. | |
$009D71 | 1 byte | Misc. | First tile of the *96 icon. | |
$009D73 | 1 byte | Misc. | Second tile of the *96 icon. | |
$009D8B | 1 byte | Palette | Palette for "number of levels beaten" in the Title Screen's Game Selection Menu (stored in YXPCCCTT format, but kind of screwy; value 30 seems to work well, though) | |
$009DB5 | 69 bytes | Subroutine (JSR) | The subroutine that checks if a saved game file is blank or not. When this subroutine returns, if Z = 0, the file is a new one. | |
$009E25 | 1 byte | Misc. | Amount of lives to start with, minus 1. | |
$009E35 | 2 bytes | ASM | Set powerups at game start. ($19 = #$00, small Mario.) | |
$009E6A | 10 bytes | Misc. | Table containing the number of possible options for different menus, in 16 bit format. The entries are as follows: - $0002: unused - $0004: file select menu - $0002: player select menu - $0002: unused - $0004: file erase menu |
|
$009E74 | 10 bytes | Stripe Image | Table containing the stripe image header (see here for more info) for the cursor in various menus. The entries are as follows: - $51CB: unused - $51E8: file select menu - $5208: player select menu - $51C4: unused - $51E5: file erase menu |
|
$009E7E | 4 bytes | Misc. | Table of four bitwise values ($01,$02,$04,$08) indexed by $1B92 and used in the cursor draw routine to determine on which row to actually draw it. | |
$009E82 | 94 bytes | Subroutine (JSR) | Routine that draws the cursor on the screen for different menus (file select, player select, file erase). It uses $1B92 to determine on which row to draw it, and $1B91 to skip drawing it every so often to create the blinking effect. $009EBA ($FC) holds the tile that's drawn in the rows that aren't supposed to show the cursor. $009EBB ($38) holds its YXPCCCTT properties. $009EC1 ($2E) holds the cursor tile number. $009EC2 ($3D) holds its YXPCCCTT properties. |
|
$009EE0 | 16 bytes | Overworld | Initial level flags. This table is made of a pair of bytes where the first byte contains the translevel number and the second byte the overworld level settings. In an LM-modified ROM, this table is unused, with the initial flag data instead being loaded from a table at $05DDA0 that just contains one byte per translevel. | |
$009EF0 | 22 bytes | Overworld | Initial overworld position data for Mario and Luigi, corresponding to addresses $1F11 through $1F26. The values are copied there on creation of a new save file. | |
$009F06 | 35 bytes | Subroutine (JSR) | Routine to initialize RAM for a new save file. This first clears the SRAM buffer at $7E1F49, then loads into it the initial level flags (using the table at $009EE0) and initial overworld positions for both players (using the table at $009EF0). | |
$009F2A | 1 byte | Misc. | Speed of Fade-ins and Fade-outs. | |
$009F2F | 1 byte | Overworld border | Change from 01 to 0F to stop fadeout on entering level, new area, and back to submap. (Use with $00:9F59) | |
$009F37 | 81 bytes | Subroutine (JSR) | Fading/mosaic routine. Change $009F59 from D0 to 90 to eliminate all fadeouts. (use in conjunction with $009F2F). Mod note: I've heard that this one is buggy. Use on your own risk. $009F67 controls which layers are affected by the mosaic effect. Format: xxxx4321. The numbers present the layer numbers to add mosaic on. So 1 = Layer 1, 2 = Layer 2, etc. |
|
$009F88 | 48 bytes | Layer 3 | Layer 3 settings. The table is indexed by 3t + i, where t is the tileset number and i is the Layer 3 image setting (00 = variable tide, 01 = low tide, 02 = tileset-specific image). It is used by the routine at $009FB8. The actual format seems to be: 01 = variable-height tide 02 = fixed-height tide 80 = Layer 3 smashers/cage 81 = slow-auto-scrolling background (except in tilesets 1 and 3, where it will be a background that scrolls at half the rate Layer 1 does) C0 = same as 80, except without the smasher palette |
|
$009FB8 | 141 bytes | Subroutine (JSR) | The main Layer 3 handling routine in levels. - $009FDA: Starting Y position of the rising/lowering tide. - $009FDF: Y position of the fixed-height tide. - $009FF3: One of two tilesets for which the tileset-specific Layer 3 background will not auto-scroll. The other is at $009FF7. - $009FF7: One of two tilesets for which the tileset-specific Layer 3 background will not auto-scroll. The other is at $009FF3. - $00A00A: Pointer to the layer 3 crusher palette. |
|
$00A045 | 38 bytes | Layer 3 | The routine that sets the interaction of the Layer 3 tide tiles. Both $00A04E and $00A04F are the low byte of the Map16 tile that the tides act like; nothing is stored to the high byte, so this is always on page 0. |
|
$00A06B | 14 bytes | Coordinate | 16-bit X-coordinates for each of the seven submaps. The main map has values of 0, and is overridden elsewhere. | |
$00A079 | 14 bytes | Coordinate | 16-bit Y-coordinates for each of the seven submaps. The main map has values of 0, and is overridden elsewhere. | |
$00A09C | 1 byte | Timer | Timer to disable skipping the intro message (level C5). The timer decreases every 4 frame. |
|
$00A0CC | 3 bytes | Misc. | Saves Mario/Luigi's powerups based on which one you are using for the level | |
$00A0F9 | 1 byte | ASM | Part of the routine that runs after dying with zero lives. If # of levels beat is zero, then it will take you back to the intro screen, if levels beat is positive, it will take you back to the last place you saved on the OW and bring up the Continue/End dialog. Change this byte to BRA ($80) to cause it to not send you to the intro screen and bring up the Continue/End dialog if you haven't saved for the first time. (In other words, it will take you back to Yoshi's House on an unedited overworld.) |
|
$00A148 | 1 byte | Overworld | GFX file for animated tiles (waterfalls etc) on the overworld. | |
$00A15A | 4 bytes | Overworld border | Call to the routine to draw the number of lives on the overworld border. Change to [80 02] (BRA $02) to disable the amount of lives from being shown in the overworld border. Use with $04A530. |
|
$00A1E3 | 1 byte | ASM | Change to 0xEA to keep the game running when a message box is on the screen. | |
$00A21E | 1 byte | Controller | Button to press for Pause. (Checks $16) | |
$00A21F | 1 byte | ASM | Change from F0 (BEQ) to 80 (BRA) to disable pausing | |
$00A22D | 1 byte | Timer | Timer (in frames) that runs to prevent the pause flag from being flipped instantly. Change [3C] to another value to change the time it takes for Mario to pause/unpause. | |
$00A23E | 1 byte | Music | Change to 12 and music will continue to play when you pause the game. Changing [11] to another value will alter the sound effect that occurs when pausing the game. | |
$00A248 | 1 byte | Debug | DEBUG: Advance frame / Slow motion (00 = enable) | |
$00A256 | 1 byte | Debug | DEBUG: Slow motion speed | |
$00A25B | 47 bytes | Controller | Code to handle leaving the level with Start+Select. Change $00:A268 to 00 to always allow leaving the level. Change $00:A273 to 00 to beat the level by doing that, not just leave it. Holding A or B will give the secret exit. |
|
$00A300 | 144 bytes | Subroutine (JSR) | The routine that handles the graphics that get DMA'd to the first five 16x16 tiles in SP1. It also write the necessary colors to the player's palette (colors 6-F). $00A30A - Mario/Luigi Palette - Starting Index (Changing this will cause Mario/Luigi to flash when the screen fades out after beating a boss) $00A320 - Mario/Luigi Palette - Amount of colours * 2 $00A307 - [F0] Changing this to [80] will skip the player's palette write code, removing palette 8's hardcoded colors. |
|
$00A390 | 1 byte | ASM | [C2] Change to 60 to disable all animations in levels. This includes colour 64. Note: LM will still show the animations. |
|
$00A3DB | 2 bytes | Overworld border | [00 08] For which VRAM address animation data will be broken up into two lines of two tiles instead of a single line of four tiles. | |
$00A400 | 2 bytes | Overworld border | [00 09] VRAM address of the second line of two animated tiles (value should be $00A3DB + 0x100). | |
$00A41A | 1 byte | Palette | [A9] Changing this to 60 will disable the flashing yellow color in levels, but not on the overworld. | |
$00A41B | 1 byte | Palette | Palette number to use for the flashing palette. Default value is $64 | |
$00A429 | 12 bytes | Palette | Changing [B9 0C B6 8D 22 21 B9 0D B6 8D 22 21] to [80 0A EA EA EA EA EA EA EA EA EA EA] will disable the flash animation of colour #64. Make sure that the "View Animation" function in Lunar Magic is disabled. WARNING: Will disable the animated colours on the OW too! |
|
$00A439 | 1 byte | Misc. | Change [F0] (BEQ) to [80] (BRA) to prevent various tiles in SP1 to be overwritten (which meant using ExGFX for them would have no effect). This does not affect tiles 00-09, 10-19 and 7F of SP1. | |
$00A514 | 1 byte | Palette | The first animated colour on the overworld. (Default: 6D.) | |
$00A51D | 1 byte | Palette | The second animated colour on the overworld. (Default: 7D.) | |
$00A635 | 353 bytes | ASM | Routine responsible for initializing various things during loading of levels and castle destruction cutscenes. This includes: - Resetting P-switch, star, and directional coin timers, as well as resetting their music. - Controlling the flag for whether the coinblock bonus room minigame is still playable. - Clearing RAM addresses $71-$93 and $13DA-$1410. - Preventing Yoshi from spawning if the level has a No-Yoshi entrance. - Preparing Mario's entrance action (as defined by $192A) for both regular levels and No-Yoshi entrances. $00A6B6: Initialization of a No-Yoshi level. $00A6CC: Initialization of a regular level. |
|
$00A757 | 1 byte | Misc. | How far to offset the players position to the right when exiting a vertical pipe. Values above 0F aren't recommended. | |
$00A75F | 1 byte | Misc. | How many frames to move Mario when exiting upward from a vertical pipe. | |
$00A763 | 1 byte | Misc. | How many frames to move Mario when exiting downward from a vertical pipe while small. | |