Language…
18 users online:  Ahrion, AJ1Ayrton, ASSATAKKU, crocodileman94, Green, Green Jerry, HengShao, Ice Man, Israelcv12cv, Klug, Luztruz, Nitrogen, RudeGuy, slimesoup, Sokobansolver, StarWolf3000,  Telinc1, underway - Guests: 154 - Bots: 129
Users: 64,441 (2,488 active)
Latest user: Victor90

SMW Memory Map

Displaying 25 out of 3136 addresses.

View: moderated | waiting (35)

Filter

Link
  • Pages:
  • 1
  • 2
  • 3
  • 4
  • 5
  • 125
  • 126
ROM Address Length Type Description Details
$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. Powers of 10 table for 6-digit* HexToDec routine at $009012 used to display the player's score. Note: These are 16-bit words, but are handled as 32-bit subtraction for the low and high words individually.

*SMW displays the score as 7 digits, but the score is actually a 6-digit (decimal) number stored internally, the 7th digit "0" is a static tile not part of this number.
16-bit values
$009012 51 bytes Subroutine (JSR) 6-digit* HexToDec subroutine to write a player's score into status bar.

Call with Y = #$00, X as the position to write to on the status bar (standard is #$14), and $00-$03 as the score to write (in hexadecimal). Note that this routine does not remove leading 0s; that is handled at $008EDE and $008F0C.

Works like this: count how many subtractions by 10n (with n=5) without the difference going into the negatives; that number of subtractions is the digit for the 10ns place. Then repeat but with 10n-1. This is the "left-to-right" version of base conversion using repeated subtraction to emulate the 32-bit division by 10n.

*SMW displays the score as 7 digits, but the score is actually a 6-digit (decimal) number stored internally, the 7th digit "0" is a static tile not part of this number.
$009045 12 bytes Subroutine (JSR) The hexadecimal to decimal subroutine (in short HexToDec) which converts a hexadecimal 8-bit value into a decimal string. To use for JSL, use JSL $00974C instead.

Input:
-A: 8-bit value to convert
Output:
-A: 1s digit (calculated via repeated subtraction until < 10; “modulo” by 10)
-X: 10s digit (calculated via how many subtraction until A < 10; “quotient” division by 10)
$009051 40 bytes Subroutine (JSR) Bonus stars (small 8x8 digits) HexToDec routine. Unknown why Nintendo didn't decide to use $009045 instead, since the bonus stars are 8-bit and other digits are also 8-bit and they use $009045.

Note: this routine alone produces mere 1s and 10s place, so the numbers will be 8x8 instead of 8x16. The code at $008FAF will convert the digits to tile numbers of 8x16 digit graphics.
$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
  • Pages:
  • 1
  • 2
  • 3
  • 4
  • 5
  • 125
  • 126