Super Mario Land/RAM map: Difference between revisions

From Data Crystal
Jump to navigation Jump to search
m (c0ac)
m (ffa6 clarify)
Line 89: Line 89:
  ----    ----    -----------
  ----    ----    -----------
  FF99      1    Powerup Status (0x00 = small, 0x01 = growing, 0x02 = big with or without superball, 0x03 = shrinking, 0x04 = invincibility blinking)
  FF99      1    Powerup Status (0x00 = small, 0x01 = growing, 0x02 = big with or without superball, 0x03 = shrinking, 0x04 = invincibility blinking)
....    ....    ....
  FFA6      1    Powerup Status Timer (growing = set to 0x50, shrinking = set to 0x50, invincibility blinking = set to 0x40) and Time until respawn from death (set to 0x90 when Mario falls to the bottom of the screen, whether it's in a pit or from dying to an enemy)  
  FFA6      1    Time until respawn from death (set when Mario has fell to the bottom of the screen)  
  FFB3      1    ? (0x39 = Game Over)
  FFB3      1    ? (0x39 = Game Over)
  FFB5      1    Mario has the Superball? (0x00 = no, 0x02 = yes)
  FFB5      1    Mario has the Superball? (0x00 = no, 0x02 = yes)

Revision as of 12:16, 29 May 2022

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

RAM Map

VRAM

Addr    Size    Description
----    ----    -----------
9806       2    Lives displayed, copy from (DA15)
9821       1    Score - Ten thousands
9822       1    Score - Thousands
9823       1    Score - Hundreds
9824       1    Score - Tens
9825       1    Score - Ones
....    ....    ....
9829       1    Coin - Tens
982A       1    Coin - Ones
....    ....    ....
982C       1    Current world
982E       1    Current stage
....    ....    ....
9831       1    Timer - Hundreds
9832       1    Timer - Tens
9833       1    Timer - Ones

WRAM

Addr    Size    Description
----    ----    -----------
C000     160    Copied to OAM (0xFE00-0xFE9F)
C0A0       3    Score (Binary-coded decimal)
C0A3       1    Lives earned or lost
C0A4       1    ? (0x39 = Game Over)
C0A9       1    Superball's time left until it disappears
C0AC       1    Mario dead jump timer (0x00 (upward speed) to 0x26 (downward speed))
C0B0      16    Related to sprite tiles? (often 0x2c, empty sprite tile)
C0D3       1    Mario Starman Timer
C0D7       1    Title Screen Timer (switch to/from demo)
C0D8       1    Demo controller state change timer
C0D9       1    Demo controller state ID
C0DA       1    Demo controller state
C0DC       1    Demo ID (0x00 = 1-1 demo, 0x01 = 1-2 demo, 0x02 = 3-3 demo)
C201       1    ? Mario's Y position relative to the screen
C202       1    ? Mario's X position relative to the screen
C203       1    Mario's pose.
C207       1    Probably used in Mario's jump routine. (0x00 = Not jumping, 0x01 = Ascending, 0x02 = Descending)
C208       1    Mario's Y speed. (0x00 (a lot of speed) to 0x19 (no speed, top of jump)) (unintentionally reaches 0x1a and 0xff)
C209       1    Mario's low jumps : how long the button was pressed (0x02? to 0x0d frames)
C20A       1    Mario is on the ground flag (0x01 = On the ground, 0x00 = In the air)
C20C       1    ? Absolute value of Mario's X speed
C20D       1    Direction Mario faces while walking. (0x20 = Left, 0x10 = Right)
C600       8    4 Pointers? (same in 1-1, 1-2, 1-3, changes in 2-1. more testing plz)
....    ....    ....
D1XY     160    Object Table (X(0x0 to 0x9) is the index of the object in the table, Y(0x0 to 0xB?) is the property of the object)
Power-ups load from the bottom of the table and enemies load from the top
 Y=0       1    Object Type (refer to Super_Mario_Land:ROM_map#Enemy_Data.2FObject_Data)
 Y=1       1    Object HP?
 Y=2       1    Object Y position on screen
 Y=3       1    Object X position on screen (auto-adjusted with screen scroll)
 Y=6       1    Object sprite pose?
 Y=8       1    Object motion/animation? timer
....    ....    ....
DA00       3    Timer (frames, seconds (Binary-coded decimal), hundreds of seconds (Binary-coded decimal)) (frames count down from 0x28 to 0x01 in a loop)
DA15       1    Lives (Binary-coded decimal)
DA1D       1    Music speed-up when time is running out (0x00 = normal speed, 0x01 = 100sec and less, 0x02 = 50sec and less, 0x03 = 0sec (1 frame only), 0xff = time up) 
....    ....    ....
The sound engine is stored in rom3, so all pointers point there.
SEC is used for Sound Engine Command. Please suggest a better term for this.
DF01       2    Note Durations Table Pointer (0x7062 = multiples of 2 ticks, 0x7057 = multiples of 3 ticks #1, 0x7077 = multiples of 3 ticks #2, 0x706e = multiples of 5 ticks, 0x7082 = multiples of 7 ticks)
DF10       2    Channel 1 SEC Chain Pointer Pointer (points to the pointer of the first SEC of a chain)
DF12       1    Channel 1 Note Time Left
DF13       1    Channel 1 Note Duration
DF14       2    Channel 1 Current SEC Pointer
DF19       2    Channel 1 Note Frequency
DF1B       1    Channel 1 Is Note Silenced/Finished? (0x00 = no, 0x01 = yes)
DF1E       1?   Channel 1 Note Current Time Alive
DF2X      16    Same as above for Channel 2
DF3X      16    Same as above for Channel 3
DF4X      16    Same as above for Channel 4
....    ....    ....
DFE0       1    Request a Channel 1 Sound Effect (0x00 = no request, 0x01 = jump, 0x02 = fireball, 0x03 = jump on enemy, 0x04 = gain powerup, 0x05 = coin, 0x06 = shrink, 0x07 = hit block, 0x08 = 1up, 0x09 = hit block again?, 0x0a = time count down at the end of level, 0x0b = powerup comes out, 0x0c and above = invalid)
DFE1       1    Channel 1 Sound Effect currently playing
DFE8       1    Request a Music Track (0x00 = no request, 0x01 = level clear, 0x02 = death, 0x03 = pyramid, 0x04 = underground, 0x05 = shoot-'em-up, 0x06 = chai kingdom, 0x07 = birabuto kingdom, 0x08 = muda kingdom, 0x09 = bonus game, 0x0a = walk to prize, 0x0b = boss, 0x0c = starman, 0x0d = get prize, 0x0e = failure?, 0x0f = daisy, 0x10 = game over, 0x11 = credits, 0x12 = fake daisy, 0x13 = tatanga, 0x14 and above = invalid)
DFE9       1    Music Track currently playing
DFF0       1    Request a Channel 3 Sound Effect (0x00 = no request, 0x01 = boss hit, 0x02 and above = invalid)
DFF1       1    Channel 3 Sound Effect currently playing
DFF8       1    Request a Channel 4 Sound Effect (0x00 = no request, 0x01 = nokobon explosion, 0x02 = break brick, 0x03 = fly death, 0x04 = gao fireball, 0x05 and above = invalid)
DFF9       1    Channel 4 Sound Effect currently playing

HRAM

Addr    Size    Description
----    ----    -----------
FF99       1    Powerup Status (0x00 = small, 0x01 = growing, 0x02 = big with or without superball, 0x03 = shrinking, 0x04 = invincibility blinking)
FFA6       1    Powerup Status Timer (growing = set to 0x50, shrinking = set to 0x50, invincibility blinking = set to 0x40) and Time until respawn from death (set to 0x90 when Mario falls to the bottom of the screen, whether it's in a pit or from dying to an enemy) 
FFB3       1    ? (0x39 = Game Over)
FFB5       1    Mario has the Superball? (0x00 = no, 0x02 = yes)
FFFA       1    Coins (Binary-coded decimal)
FFFB       1    ? (0x2B = Extra Life)

Notes

  • Binary-coded decimal (daa) - if you view it as a hex number, the count skips A through F in any given ordinal. In this way, the hex value is human readable as the "correct" (decimal) number.
  • A list of less certain addresses is available on the Talk page for further review.