Super Mario Bros. 3/RAM map: Difference between revisions

From Data Crystal
Jump to navigation Jump to search
mNo edit summary
m ($071A)
 
(10 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{rammap|game=Super Mario Bros. 3}}
{{rammap|game=Super Mario Bros. 3}}


NOTES:
{{note|
* All values in the table are hexadecimal unless otherwise noted.
* All values in the table are hexadecimal unless otherwise noted.
* "Signed byte" means the value can technically be between -128..127 (80..FF, 00, 01..7F).
* "Signed byte" means the value can technically be between -128..127 (80..FF, 00, 01..7F).
}}


{| border="1" cellpadding="1"
<pre>
|'''RAM'''  || '''Purpose'''
$0000A to $---- = Temp. used to adjust main character sprite vertical position
|-
$00014 to $---- = Flag to return to map
|0A || Temp. used to adjust main character sprite vertical position
$00015 to $---- = Increased by one every game cycle. Used as timer
|-
$00017 to $---- = Player 1 gamepad bits.
|14 || Flag to return to map
$00075 to $---- = On map screen vertical position. Multiples of 20, unless in boat. Also horizontal position in levels measured in units of 8 blocks wide.
|-
$00076 to $??  = Enemy Sprite horizontal positions on screen high byte
|15 || Increased by one every game cycle. Used as timer
$00077 to $---- = Page counter on map screen
|-
$00078 to $---- = On map screen vertical position (see next RAM location description)
|17 || Player 1 gamepad bits.
$00079 to $---- = On map screen horizontal position. Multiples of 20, unless in boat. If multipaged, E0 shifts screen right, then 60, then D0, then 50. Shifting back to the left occurs at 20, then A0, then 20, then A0.  
|-
$00087 to $---- = Vertical position measured in units of 8 blocks wide
|75 || On map screen vertical position. Multiples of 20, unless in boat. Also horizontal position in levels measured in units of 8 blocks wide.
$00088 to $???? = Enemy Sprite vertical positions on screen high byte
|-
$00090 to $---- = Player horizontal position. Changing may cause problems in Name Table.
|77 || Page counter on map screen  
$00091 to $??   = Enemy Sprite horizontal positions on screen low byte
|-
$0009A to $??  = Platform move direction index
|78 || On map screen vertical position (see next RAM location description)
    E,F  0  1,2
|-
  D.  \  | /  .3
|79 || On map screen horizontal position. Multiples of 20, unless in boat. If multipaged, E0 shifts screen right, then 60, then D0, then 50. Shifting back to the left occurs at 20, then A0, then 20, then A0.  
    '. \ | / .'
|-
      '.\|/.'
|87 || Vertical position measured in units of 8 blocks wide
  C ------+------ 4
|-
        ./|\.
|88-?? || Enemy Sprite vertical positions on screen high byte
      .'/ | \'.
|-
  B.' /  | \ '.5
|90 || Player horizontal position. Changing may cause problems in Name Table.
    9,A  8  6,7
|-
$000A2 to $---- = Player vertical position in levels.
|A2 || Player vertical position in levels.
$000A3 to $???? = Enemy Sprite vertical positions on screen low byte
|-
$000B4 to $---- = Player vertical position with 11 added. Set to C0 to kill Mario in an odd way. Sprite disappears, death music plays and returns you to world map.
|A3-?? || Enemy Sprite vertical positions on screen low byte
$000BD to $---- = Player horizontal velocity (signed byte)
|-
$000BE to $???? = Enemy Sprite horizontal velocity (signed byte)
|B4 || Set to C0 to kill Mario in an odd way. Sprite disappears, death music plays and returns you to world map.
$000CF to $---- = Player vertical velocity (signed byte)
|-
$000D0 to $???? = Enemy Sprite vertical velocity (signed byte)
|BD || Player horizontal velocity (signed byte)
$000D8 to $---- = In air flag
|-
$000ED to $---- = Current form (to set, use 0578):
|BE-?? || Enemy Sprite horizontal velocity (signed byte)
    00-Small
|-
    01-Super
|CF || Player vertical velocity (signed byte)
    02-Fire
|-
    03-Raccoon
|D0-?? || Enemy Sprite vertical velocity (signed byte)
    04-Frog
|-
    05-Tanooki
|D8 || In air flag
    06-Hammer
|-
$000EE to $---- = Mario/Luigi Character Sprite Displayed(gets set just before display)
|ED || Current form (to set, use 0578): 00-Small, 01-Super, 02-Fire, 03-Raccoon, 04-Frog, 05-Tanooki, 06-Hammer
$000EF to $---- = Mario/Luigi status flag: 40 facing right, 00 facing left
|-
$000F5 to $---- = Controller status, new buttons pressed this frame (each bit clears to zero after initial frame)
|EE || Mario/Luigi Character Sprite Displayed(gets set just before display)
$000F7 to $---- = Controller status, buttons held down
|-
 
|EF || Mario/Luigi status flag: 40 facing right, 00 facing left
$0100 to $01FF = CPU Stack - Set 160 to 80 to enable debug mode without having to use the Game Genie code
|-
$0200 to $02FF = DMA transfer to sprite memory.
|F5 || Controller status, new buttons pressed this frame (each bit clears to zero after initial frame)
$0376 to $---- = Pause flag
|-
$03DD to $---- = P-meter in status bar. Bits 0-5 govern each arrow in turn and bit 6 is the P. (7F = all arrows alight and P blinking)
|F7 || Controller status, buttons held down
$03F2 to $---- = Map starman flag
|-
$03F3 to $---- = Character selection on map (ED value or 7-cloud, 8-p-wing)
|0100-01FF || CPU Stack - Set 160 to 80 to enable debug mode without having to use the Game Genie code
$04F1 to $---- = Sound play byte. Freeze to $00 to remove some sounds (i.e. full fly meter sound)
|-
$04F2 to $---- = Sound play byte.
|0200-02FF || DMA transfer to sprite memory.
$04F3 to $---- = Sound play byte.
|-
$04F4 to $---- = Fanfare play byte.
|0376 || Pause flag
$04F5 to $---- = Music play byte.
|-
$04F6 to $---- = Sound play byte.
|03DD || P-meter in status bar. Bits 0-5 govern each arrow in turn and bit 6 is the P. (7F = all arrows alight and P blinking)
$04F7 to $---- = Sound pause byte. 01 pauses, 02 un-pauses.
|-
$0510 to $0517 = Various countdown timers. There's a routine at A1DC decrementing these eight timers towards 00 every frame.
|03F2 || Map starman flag
$0510 to $---- = Countdown timer for player going in/out of pipe. Starts with 0F.
|-
$0511 to $---- = Countdown timer for raccoon tail waving (repeatedly pressing jump button).
|03F3 || Character selection on map (ED value or 7-cloud, 8-p-wing)
$0515 to $---- = Countdown timer for advancing the P-meter up or down.
|-
$0516 to $---- = Countdown timer for multi-coin blocks.
|04F1 || Sound play byte. Freeze to $00 to remove some sounds (i.e. full fly meter sound)
$051B? to $051C = Countdown timers for enemy use. See remarks below. They seem to be assigned backwards, 051C is used for the first enemy to come on screen, then 051B etc.
|-
$051D to $---- = Countdown timer for powerups rising animation. If set to nonzero value will make the powerup rise again(!) wherever it is on screen.
|04F2 || Sound play byte.
$0525 to $---- = Countdown timer for bounce block sprite (like ? when hit).
|-
$0545 to $---- = Level start entrance effect.
|04F3 || Sound play byte.
    0-normal, 1-slide
|-
    2-pipe upwaard
|04F4 || Fanfare play byte.
    3-pipe downward
|-
    4-pipe from right
|04F5 || Music play byte.
    5-pipe from left
|-
    6-jump on anchor of ship
|04F6 || Sound play byte.
    7-scroll right and down
|-
$0552 to $---- = Timer that is set after player is hit. Determine how long you flash (are invincible)
|04F7 || Sound pause byte. 01 pauses, 02 un-pauses.
$0553 to $---- = Timer for star mario
|-
$0554 to $---- = Timer for change suit poof effect (set value is 17 (or 11 hex?))
|0510-0517 || Various countdown timers. There's a routine at A1DC decrementing these eight timers towards 00 every frame.
$0559 to $---- = Set to FF for auto-control of player character
|-
$055A to $---- = Auto-control mode.
|0510 || Countdown timer for player going in/out of pipe. Starts with 0F.
    0-normal
|-
    1-run under ship
|0511 || Countdown timer for raccoon tail waving (repeatedly pressing jump button).
    2-jump on ship
|-
    3-grab anchor
|0515 || Countdown timer for advancing the P-meter up or down.
    4-screen scroll right and down for ship
|-
    6-screen scrolls fast right
|0516 || Countdown timer for multi-coin blocks.
$055C to $---- = <strike>Mario's velocity; 4 bits precision for 1/256th of a pixel</strike>
|-
$055D to $---- = 8 frame timer. Resets at the beginning of a level.
|051B?-051C || Countdown timers for enemy use. See remarks below. They seem to be assigned backwards, 051C is used for the first enemy to come on screen, then 051B etc.
$0567 to $---- = Timer for P-Block
|-
$056E to $---- = Timer that determines how long flight will last. Power Meter instantly empties when this hits zero. Setting to FF enables unlimited flight.
|051D || Countdown timer for powerups rising animation. If set to nonzero value will make the powerup rise again(!) wherever it is on screen.
$056F to $---- = Ducking flag; Set to $FF for squat-float effect
|-
$0570 to $---- = Number of frames ducking on white block
|0525 || Countdown timer for bounce block sprite (like ? when hit).
$0575 to $---- = Swimming flag
|-
$0577 to $---- = Indicates whether Mario currently has Kuribos boot. (00=No, 01=Yes)
|0545 || Level start entrance effect. 0-normal, 1-slide, 2-pipe upwaard, 3-pipe downward, 4-pipe from right, 5-pipe from left, 6-jump on anchor of ship, 7-scroll right and down
$0578 to $---- = Change Mario form. Modes 1-7 can be changed at will (same as ED value+1). Flag-like values combine with ANY mode (so you can get e.g. small Mario in statue form).
|-
  Modes:
|0552 || Timer that is set after player is hit. Determine how long you flash (are invincible)
    01=small
|-
    02=big
|0553 || Timer for star mario
    03=fire
|-
    04=raccoon
|0554 || Timer for change suit poof effect (set value is 17 (or 11 hex?))
    05=frog
|-
    06=tanooki
|0559 || Set to FF for auto-control of player character
    07=hammer
|-
  Flags:
|055A || Auto-control mode. 0-normal, 1-run under ship, 2-jump on ship, 3-grab anchor, 4-screen scroll right and down for ship, 6-screen scrolls fast right
    10=Enable statue
|-
    40=Enable swimming (causes splash on land)
|055C || <strike>Mario's velocity; 4 bits precision for 1/256th of a pixel</strike>
    80=Enable Kuribos boot. No idea how to CLEAR the flags, probably not possible here.
|-
$057A to $---- = <strike>Enable statue mario characteristic (gray & invincible, note: can't go down pipes with this characteristic enabled)</strike>
|055D || 8 frame timer. Resets at the beginning of a level.
$057B to $---- = Indicates flight? Has the value 1 when P-meter is full AND player is jumping. Used at least for locking 0515 and thus the P-meter while in flight.
|-
$057C to $---- = PrizeBoxCode
|0567 || Timer for P-Block
$0584 to $---- = Underwater / not underwater selection
|-
$0585 to $---- = (??) Set to $FF to slide "right" (not left) through solid objects
|056E || Timer that determines how long flight will last. Power Meter instantly empties when this hits zero. Setting to FF enables unlimited flight.
$0588 to $---- = Timer for "Backstage" status
|-
$05EE to $05F0 = Time remaining
|056F || Ducking flag; Set to $FF for squat-float effect
$05F3 to $---- = Freeze timer if set to 01
|-
$05F4 to $---- = Stomp counter
|0570 || Number of frames ducking on white block
$0669 to $---- = The item you'll get from a toad house
|-
$066F to $---- = Card selection for the flashing card that you jump to get
|0575 || Swimming flag
$070A to $---- = Current Object Set
|-
  01=Plains
|0577 || Indicates whether Mario currently has Kuribos boot. (00=No, 01=Yes)
  02=Dungeon
|-
  03=Hilly
|0578 || Change Mario form. Modes 1-7 can be changed at will (same as ED value+1). Flag-like values combine with ANY mode (so you can get e.g. small Mario in statue form). Modes: 01=small, 02=big, 03=fire, 04=raccoon, 05=frog, 06=tanooki, 07=hammer. Flags: 10=Enable statue, 40=Enable swimming (causes splash on land), 80=Enable Kuribos boot. No idea how to CLEAR the flags, probably not possible here.
  04=Sky
|-
  05=Piranha Plant
|057A || <strike>Enable statue mario characteristic (gray & invincible, note: can't go down pipes with this characteristic enabled)</strike>
  06=Water
|-
  08=Pipe
|057B || Indicates flight? Has the value 1 when P-meter is full AND player is jumping. Used at least for locking 0515 and thus the P-meter while in flight.
  09=Desert
|-
  0A=Ship
|057C || [[Super Mario Bros. 3:PrizeBoxCode|PrizeBoxCode]]
  0B=Giant
|-
  0C=Ice
|0584 || Underwater / not underwater selection
  0D=Cloudy
|-
  0E=Underground
|0585 || (??) Set to $FF to slide "right" (not left) through solid objects
$0715 to $0717 = current player score divided by dec10. (max F423F[dec999,999]) (There's a hard coded 0 in the score display)
|-
$071A to $---- = Current tileset animation frame
|0588 || Timer for "Backstage" status
$0727 to $---- = World number - 1
|-
$0736 to $---- = Mario # of Lives (max 63[dec99])
|05EE-05F0 || Time remaining
$0737 to $---- = Luigi # of Lives
|-
$0746 to $---- = Mario's Form that he will start next level as. When the level is loaded this value gets transferred to 00ED.
|05F3 || Freeze timer if set to 01
$0747 to $---- = For Luigi; See 0746.
|-
$074D to $---- = Horzontal subpixel position. (1/16 of a pixel)
|05F4 || Stomp counter
$075F to $---- = Vertical subpixel position. (1/16 of a pixel)
|-
$0781 to $---- = RNG. 72 bits LFSR.
|0669 || The item you'll get from a toad house
$6000 to $794F = Active Block Buffer/Tile Map
|-
  0x1B0 bytes per room
|066F || Card selection for the flashing card that you jump to get
$7976 to $---- = Map screen Y position for the current level Mario is in.
|-
$7977 to $---- = Map screen Y position for the current level Luigi is in.
|0715-0717 || current player score divided by dec10. (max F423F[dec999,999]) (There's a hard coded 0 in the score display)
$7978 to $---- = Map screen X position (high byte) for the current level Mario is in.
|-
$7979 to $---- = Map screen X position (high byte) for the current level Luigi is in.
|0727 || World number - 1
$797A to $---- = Map screen X position (low byte) for the current level Mario is in.
|-
$797B to $---- = Map screen X position (low byte) for the current level Luigi is in.
|0736 || Mario # of Lives (max 63[dec99])
$797E to $---- = Map screen Y position to return to when Mario dies.
|-
$797F to $---- = Map screen Y position to return to when Luigi dies.
|0737 || Luigi # of Lives
$7980 to $---- = Map screen X position (high byte) to return to when Mario dies.
|-
$7981 to $---- = Map screen X position (high byte) to return to when Luigi dies.
|0746 || Mario's Form that he will start next level as. When the level is loaded this value gets transferred to 00ED.
$7982 to $---- = Map screen X position (low byte) to return to when Mario dies.
|-
$7983 to $---- = Map screen X position (low byte) to return to when Luigi dies.
|0747 || For Luigi; See 0746.
$7B40 to $7B?? = Enemy data for the current level.
|-
$7D00 to $7D3F = Mario's level complete flags.
|074D || Horzontal subpixel position. (1/16 of a pixel)
$7D40 to $7D7F = Luigi's level complete flags.
|-
$7D80 to $7D9B = Each Byte Represents an Item that Mario is Carrying (Pressing 'B' while at Map Screen):
|075F || Vertical subpixel position. (1/16 of a pixel)
    00-No Item
|-
    01-Mushroom
|0781 || RNG. 72 bits LFSR.
    02-Flower
|-
    03-Leaf
|6000-794F || Active level data.
    04-Frog
|-
    05-Bear
|7976 || Map screen Y position for the current level Mario is in.
    06-Hammer Bro Suit
|-
    07-Cloud
|7977 || Map screen Y position for the current level Luigi is in.
    08-P-Wing
|-
    09-Star
|7978 || Map screen X position (high byte) for the current level Mario is in.
    0A-Anchor
|-
    0B-Hammer
|7979 || Map screen X position (high byte) for the current level Luigi is in.
    0C-Whistle
|-
    0D-Music Box.
|797A || Map screen X position (low byte) for the current level Mario is in.
    0E and above will most likely crash the game, not completely tested though.
|-
$7D9C to $7D9E = Each Byte Represents a reward card Mario has
|797B || Map screen X position (low byte) for the current level Luigi is in.
    00-No Item
|-
    01-Mushroom
|797E || Map screen Y position to return to when Mario dies.
    02-Flower
|-
    03-Star
|797F || Map screen Y position to return to when Luigi dies.
$7D9F to $7DA1 = Storage for Mario Score (/dec10)
|-
$7DA2 to $---- = # of coins Mario has
|7980 || Map screen X position (high byte) to return to when Mario dies.
$7DA3 to $7DBE = Each Byte Represents an Item that Luigi is Carrying (Pressing 'B' while at Map Screen):
|-
    00-No Item
|7981 || Map screen X position (high byte) to return to when Luigi dies.
    01-Mushroom
|-
    02-Flower
|7982 || Map screen X position (low byte) to return to when Mario dies.
    03-Leaf
|-
    04-Frog
|7983 || Map screen X position (low byte) to return to when Luigi dies.
    05-Bear
|-
    06-Hammer Bro Suit
|7B40-7B?? || Enemy data for the current level.
    07-Cloud
|-
    08-P-Wing
|7D00-7D3F || Mario's level complete flags.
    09-Star
|-
    0A-Anchor
|7D40-7D7F || Luigi's level complete flags.
    0B-Hammer
|-
    0C-Whistle
|7D80-7D9B || Each Byte Represents an Item that Mario is Carrying (Pressing 'B' while at Map Screen): 00-No Item, 01-Mushroom, 02-Flower, 03-Leaf, 04-Frog, 05-Bear, 06-Hammer Bro Suit, 07-Cloud, 08-P-Wing, 09-Star, 0A-Anchor, 0B-Hammer, 0C-Whistle, 0D-Music Box. 0E and above will most likely crash the game, not completely tested though.
    0D-Music Box
|-
    0E and above will most likely crash the game, not completely tested though.
|7D9C-7D9E || Each Byte Represents a reward card Mario has 00-No Item, 01-Mushroom, 02-Flower, 03-Star
$7DBF to $7DC1 = Each Byte Represents a reward card Luigi has
|-
    00-No Item
|7D9F-7DA1 || Storage for Mario Score (/dec10)
    01-Mushroom
|-
    02-Flower
|7DA2 || # of coins Mario has
    03-Star
|-
$7DC2 to $7DC4 = Storage for Luigi Score(/dec10)
|7DA3-7DBE || Each Byte Represents an Item that Luigi is Carrying (Pressing 'B' while at Map Screen): 00-No Item, 01-Mushroom, 02-Flower, 03-Leaf, 04-Frog, 05-Bear, 06-Hammer Bro Suit, 07-Cloud, 08-P-Wing, 09-Star, 0A-Anchor, 0B-Hammer, 0C-Whistle, 0D-Music Box. 0E and above will most likely crash the game, not completely tested though.
$7DC5 to $---- = # of coins Luigi has
|-
$A648 to $---- = (C8) Initial velocity for player jump.
|7DBF-7DC1 || Each Byte Represents a reward card Luigi has 00-No Item, 01-Mushroom, 02-Flower, 03-Star
$ACA2 to $---- = (05) Mario falling gravity, added to Y vel each frame.
|-
$ACA6 to $---- = (E0) Default upward velocity for jumps. Modified by a table value subtracted from this, see Notes.
|7DC2-7DC4 || Storage for Luigi Score(/dec10)
$ACB3 to $---- = (01) Mario jump gravity, added to Y vel each frame while jump in progress.
|-
$BFCC to $---- = Routine that clamps 00CF (Mario Y velocity) to the maximum ($45) when falling.
|7DC5 || # of coins Luigi has
</pre>
|-
|A648 || (C8) Initial velocity for player jump.
|-
|ACA2 || (05) Mario falling gravity, added to Y vel each frame.
|-
|ACA6 || (E0) Default upward velocity for jumps. Modified by a table value subtracted from this, see Notes.
|-
|ACB3 || (01) Mario jump gravity, added to Y vel each frame while jump in progress.
|-
|BFCC || Routine that clamps 00CF (Mario Y velocity) to the maximum ($45) when falling.
|}


{{note|text=Some addresses above are in the PRG ROM range, should probably be moved to the ROM map.}}
{{note|text=Some addresses above are in the PRG ROM range, should probably be moved to the ROM map.}}


Enemy timers at 051B-051C:
Enemy timers at $051B to $051C:
* Piranha plants use these to toggle being up/down. E.g. when inside the pipe, set to 01 to force the plant coming up next frame.
* Piranha plants use these to toggle being up/down. E.g. when inside the pipe, set to 01 to force the plant coming up next frame.


{{Internal Data|game=Super Mario Bros. 3}}
{{Internal Data|game=Super Mario Bros. 3}}

Latest revision as of 02:48, 24 June 2024

Chip tiny.png The following article is a RAM map for Super Mario Bros. 3.

Note for template.png
Note:
  • All values in the table are hexadecimal unless otherwise noted.
  • "Signed byte" means the value can technically be between -128..127 (80..FF, 00, 01..7F).


$0000A to $---- = Temp. used to adjust main character sprite vertical position
$00014 to $---- = Flag to return to map
$00015 to $---- = Increased by one every game cycle. Used as timer
$00017 to $---- = Player 1 gamepad bits.
$00075 to $---- = On map screen vertical position. Multiples of 20, unless in boat. Also horizontal position in levels measured in units of 8 blocks wide.
$00076 to $??   = Enemy Sprite horizontal positions on screen high byte
$00077 to $---- = Page counter on map screen 
$00078 to $---- = On map screen vertical position (see next RAM location description)
$00079 to $---- = On map screen horizontal position. Multiples of 20, unless in boat. If multipaged, E0 shifts screen right, then 60, then D0, then 50. Shifting back to the left occurs at 20, then A0, then 20, then A0. 
$00087 to $---- = Vertical position measured in units of 8 blocks wide
$00088 to $???? = Enemy Sprite vertical positions on screen high byte
$00090 to $---- = Player horizontal position. Changing may cause problems in Name Table.
$00091 to $??   = Enemy Sprite horizontal positions on screen low byte
$0009A to $??   = Platform move direction index
     E,F  0  1,2
   D.  \  |  /  .3
     '. \ | / .'
       '.\|/.'
  C ------+------ 4
        ./|\.
      .'/ | \'.
   B.' /  |  \ '.5
     9,A  8  6,7
$000A2 to $---- = Player vertical position in levels.
$000A3 to $???? = Enemy Sprite vertical positions on screen low byte
$000B4 to $---- = Player vertical position with 11 added. Set to C0 to kill Mario in an odd way. Sprite disappears, death music plays and returns you to world map.
$000BD to $---- = Player horizontal velocity (signed byte)
$000BE to $???? = Enemy Sprite horizontal velocity (signed byte)
$000CF to $---- = Player vertical velocity (signed byte)
$000D0 to $???? = Enemy Sprite vertical velocity (signed byte)
$000D8 to $---- = In air flag
$000ED to $---- = Current form (to set, use 0578):
     00-Small
     01-Super
     02-Fire
     03-Raccoon
     04-Frog
     05-Tanooki
     06-Hammer
$000EE to $---- = Mario/Luigi Character Sprite Displayed(gets set just before display)
$000EF to $---- = Mario/Luigi status flag: 40 facing right, 00 facing left
$000F5 to $---- = Controller status, new buttons pressed this frame (each bit clears to zero after initial frame)
$000F7 to $---- = Controller status, buttons held down

$0100 to $01FF = CPU Stack - Set 160 to 80 to enable debug mode without having to use the Game Genie code
$0200 to $02FF = DMA transfer to sprite memory.
$0376 to $---- = Pause flag
$03DD to $---- = P-meter in status bar. Bits 0-5 govern each arrow in turn and bit 6 is the P. (7F = all arrows alight and P blinking)
$03F2 to $---- = Map starman flag
$03F3 to $---- = Character selection on map (ED value or 7-cloud, 8-p-wing)
$04F1 to $---- = Sound play byte. Freeze to $00 to remove some sounds (i.e. full fly meter sound)
$04F2 to $---- = Sound play byte.
$04F3 to $---- = Sound play byte.
$04F4 to $---- = Fanfare play byte.
$04F5 to $---- = Music play byte.
$04F6 to $---- = Sound play byte.
$04F7 to $---- = Sound pause byte. 01 pauses, 02 un-pauses.
$0510 to $0517 = Various countdown timers. There's a routine at A1DC decrementing these eight timers towards 00 every frame.
$0510 to $---- = Countdown timer for player going in/out of pipe. Starts with 0F.
$0511 to $---- = Countdown timer for raccoon tail waving (repeatedly pressing jump button).
$0515 to $---- = Countdown timer for advancing the P-meter up or down.
$0516 to $---- = Countdown timer for multi-coin blocks.
$051B? to $051C = Countdown timers for enemy use. See remarks below. They seem to be assigned backwards, 051C is used for the first enemy to come on screen, then 051B etc.
$051D to $---- = Countdown timer for powerups rising animation. If set to nonzero value will make the powerup rise again(!) wherever it is on screen.
$0525 to $---- = Countdown timer for bounce block sprite (like ? when hit).
$0545 to $---- = Level start entrance effect.
     0-normal, 1-slide
     2-pipe upwaard
     3-pipe downward
     4-pipe from right
     5-pipe from left
     6-jump on anchor of ship
     7-scroll right and down
$0552 to $---- = Timer that is set after player is hit. Determine how long you flash (are invincible)
$0553 to $---- = Timer for star mario
$0554 to $---- = Timer for change suit poof effect (set value is 17 (or 11 hex?))
$0559 to $---- = Set to FF for auto-control of player character
$055A to $---- = Auto-control mode.
     0-normal
     1-run under ship
     2-jump on ship
     3-grab anchor
     4-screen scroll right and down for ship
     6-screen scrolls fast right
$055C to $---- = <strike>Mario's velocity; 4 bits precision for 1/256th of a pixel</strike>
$055D to $---- = 8 frame timer. Resets at the beginning of a level.
$0567 to $---- = Timer for P-Block
$056E to $---- = Timer that determines how long flight will last. Power Meter instantly empties when this hits zero. Setting to FF enables unlimited flight.
$056F to $---- = Ducking flag; Set to $FF for squat-float effect
$0570 to $---- = Number of frames ducking on white block
$0575 to $---- = Swimming flag
$0577 to $---- = Indicates whether Mario currently has Kuribos boot. (00=No, 01=Yes)
$0578 to $---- = Change Mario form. Modes 1-7 can be changed at will (same as ED value+1). Flag-like values combine with ANY mode (so you can get e.g. small Mario in statue form).
   Modes:
     01=small
     02=big
     03=fire
     04=raccoon
     05=frog
     06=tanooki
     07=hammer 
   Flags:
     10=Enable statue
     40=Enable swimming (causes splash on land)
     80=Enable Kuribos boot. No idea how to CLEAR the flags, probably not possible here.
$057A to $---- = <strike>Enable statue mario characteristic (gray & invincible, note: can't go down pipes with this characteristic enabled)</strike>
$057B to $---- = Indicates flight? Has the value 1 when P-meter is full AND player is jumping. Used at least for locking 0515 and thus the P-meter while in flight.
$057C to $---- = PrizeBoxCode
$0584 to $---- = Underwater / not underwater selection
$0585 to $---- = (??) Set to $FF to slide "right" (not left) through solid objects
$0588 to $---- = Timer for "Backstage" status
$05EE to $05F0 = Time remaining
$05F3 to $---- = Freeze timer if set to 01
$05F4 to $---- = Stomp counter
$0669 to $---- = The item you'll get from a toad house
$066F to $---- = Card selection for the flashing card that you jump to get
$070A to $---- = Current Object Set
   01=Plains
   02=Dungeon
   03=Hilly
   04=Sky
   05=Piranha Plant
   06=Water
   08=Pipe
   09=Desert
   0A=Ship
   0B=Giant
   0C=Ice
   0D=Cloudy
   0E=Underground
$0715 to $0717 = current player score divided by dec10. (max F423F[dec999,999]) (There's a hard coded 0 in the score display)
$071A to $---- = Current tileset animation frame
$0727 to $---- = World number - 1
$0736 to $---- = Mario # of Lives (max 63[dec99])
$0737 to $---- = Luigi # of Lives
$0746 to $---- = Mario's Form that he will start next level as. When the level is loaded this value gets transferred to 00ED.
$0747 to $---- = For Luigi; See 0746.
$074D to $---- = Horzontal subpixel position. (1/16 of a pixel)
$075F to $---- = Vertical subpixel position. (1/16 of a pixel)
$0781 to $---- = RNG. 72 bits LFSR.
$6000 to $794F = Active Block Buffer/Tile Map 
   0x1B0 bytes per room
$7976 to $---- = Map screen Y position for the current level Mario is in.
$7977 to $---- = Map screen Y position for the current level Luigi is in.
$7978 to $---- = Map screen X position (high byte) for the current level Mario is in.
$7979 to $---- = Map screen X position (high byte) for the current level Luigi is in.
$797A to $---- = Map screen X position (low byte) for the current level Mario is in.
$797B to $---- = Map screen X position (low byte) for the current level Luigi is in.
$797E to $---- = Map screen Y position to return to when Mario dies.
$797F to $---- = Map screen Y position to return to when Luigi dies.
$7980 to $---- = Map screen X position (high byte) to return to when Mario dies.
$7981 to $---- = Map screen X position (high byte) to return to when Luigi dies.
$7982 to $---- = Map screen X position (low byte) to return to when Mario dies.
$7983 to $---- = Map screen X position (low byte) to return to when Luigi dies.
$7B40 to $7B?? = Enemy data for the current level.
$7D00 to $7D3F = Mario's level complete flags.
$7D40 to $7D7F = Luigi's level complete flags.
$7D80 to $7D9B = Each Byte Represents an Item that Mario is Carrying (Pressing 'B' while at Map Screen):
     00-No Item
     01-Mushroom
     02-Flower
     03-Leaf
     04-Frog
     05-Bear
     06-Hammer Bro Suit
     07-Cloud
     08-P-Wing
     09-Star
     0A-Anchor
     0B-Hammer
     0C-Whistle
     0D-Music Box.
     0E and above will most likely crash the game, not completely tested though.
$7D9C to $7D9E = Each Byte Represents a reward card Mario has
     00-No Item
     01-Mushroom
     02-Flower
     03-Star
$7D9F to $7DA1 = Storage for Mario Score (/dec10)
$7DA2 to $---- = # of coins Mario has 
$7DA3 to $7DBE = Each Byte Represents an Item that Luigi is Carrying (Pressing 'B' while at Map Screen): 
     00-No Item
     01-Mushroom
     02-Flower
     03-Leaf
     04-Frog
     05-Bear
     06-Hammer Bro Suit
     07-Cloud
     08-P-Wing
     09-Star
     0A-Anchor
     0B-Hammer
     0C-Whistle
     0D-Music Box
     0E and above will most likely crash the game, not completely tested though.
$7DBF to $7DC1 = Each Byte Represents a reward card Luigi has
     00-No Item
     01-Mushroom
     02-Flower
     03-Star
$7DC2 to $7DC4 = Storage for Luigi Score(/dec10)
$7DC5 to $---- = # of coins Luigi has 
$A648 to $---- = (C8) Initial velocity for player jump. 
$ACA2 to $---- = (05) Mario falling gravity, added to Y vel each frame.
$ACA6 to $---- = (E0) Default upward velocity for jumps. Modified by a table value subtracted from this, see Notes.
$ACB3 to $---- = (01) Mario jump gravity, added to Y vel each frame while jump in progress.
$BFCC to $---- = Routine that clamps 00CF (Mario Y velocity) to the maximum ($45) when falling.
Note for template.png
Note:
{{{1}}}


Enemy timers at $051B to $051C:

  • Piranha plants use these to toggle being up/down. E.g. when inside the pipe, set to 01 to force the plant coming up next frame.