Welcome to Data Crystal's new home! Data Crystal is now part of the TCRF family (sort of).
The wiki has recently moved; please report any issues in Discord. Pardon the dust.

Super Mario Bros. 2 (NES)/RAM map: Difference between revisions

From Data Crystal
Jump to navigation Jump to search
(Tried to lump similar data together)
(changed formatting for all, added references)
Line 1: Line 1:
{{rammap|game=Super Mario Bros. 2}}
{{rammap|game=Super Mario Bros. 2}}
=ROM=


====Counters====
==Counters==


* $04ED - Current number of lives
* $04ED - Current number of lives
Line 9: Line 10:
* $062C - Current number of BIG vegetables pulled for stop watch
* $062C - Current number of BIG vegetables pulled for stop watch


====Sprite Related====
==Sprite Related==


* $0014 - Page of main character's X position
* $0014 - Page of main character's X position
* $001E - Page of main character's Y position
* $001E - Page of main character's Y position


=====Position of sprites=====
===Position of sprites===


======X position on page======
====X position on page====


* $0028 - main character
* $0028 - main character
Line 25: Line 26:
* $002D - enemy 1
* $002D - enemy 1


======Y position on page======
====Y position on page====


* $0033 - enemy 5
* $0033 - enemy 5
Line 33: Line 34:
* $0037 - enemy 1
* $0037 - enemy 1


=====Speed of sprites (left/right)=====
===Speed of sprites (left/right)===


* $003C - enemy 5
* $003C - enemy 5
Line 41: Line 42:
* $0040 - enemy 1
* $0040 - enemy 1


=====Jumping Physics=====
===Jumping Physics===


* $0046 - main character
* $0046 - main character
Line 54: Line 55:
  01 - yes
  01 - yes


=====Misc. sprite addresses=====
===Misc. sprite addresses===


* $0051 - Enemy 5
* $0051 - Enemy 5
Line 77: Line 78:
  24 - carrying main character with same speed as movement
  24 - carrying main character with same speed as movement


=====Sprite's palette, mirroring, etc.=====
===Sprite's palette, mirroring, etc.===


* $0065 - Enemy 5
* $0065 - Enemy 5
Line 85: Line 86:
* $0069 - Enemy 1
* $0069 - Enemy 1


=====Sprite IDs=====
===Sprite IDs===


* $008F - Character selected (appearance only, until defeated, then stats as well)
* $008F - Character selected (appearance only, until defeated, then stats as well)
Line 106: Line 107:
* $00C7 - Character's status
* $00C7 - Character's status


=====Sprite HP=====
===Sprite HP===


* $0465 - Enemy 5
* $0465 - Enemy 5
Line 114: Line 115:
* $0469 - Enemy 1
* $0469 - Enemy 1


=====Main character=====
===Main character===


* $04C2 - Current life in the life meter
* $04C2 - Current life in the life meter
Line 128: Line 129:
  02 - Four bars
  02 - Four bars


====Timers====
==Timers==


* $0085 - Amount of time left until main character becomes vulnerable
* $0085 - Amount of time left until main character becomes vulnerable
Line 144: Line 145:
* $14CA - Timer for crouch jump power (0 - 3C)
* $14CA - Timer for crouch jump power (0 - 3C)


=====Item flags=====
===Item flags===


* $009C - Holding an item?
* $009C - Holding an item?
Line 157: Line 158:
* $00AE - Item in hand height (used for different character sizes?)
* $00AE - Item in hand height (used for different character sizes?)


====Misc.====
==Misc.==


* $00BA - Screen speed moving left and right
* $00BA - Screen speed moving left and right
Line 177: Line 178:
* $06F6 - Character growing or shrinking
* $06F6 - Character growing or shrinking


====Button Related====
==Button Related==


* $00F5 - Button pressed (Controller 1)
* $00F5 - Button pressed (Controller 1)
Line 220: Line 221:
  F* - Start + Select + A + B
  F* - Start + Select + A + B


====Sprite Flags====
==Sprite Flags==


* $04B4 - Something to do with the Hawkmouth opening and closing
* $04B4 - Something to do with the Hawkmouth opening and closing
Line 246: Line 247:
* $04E0 - Current Starman time length left
* $04E0 - Current Starman time length left


====Regeneration properties====
==Regeneration properties==


* $04E7 - Area
* $04E7 - Area
Line 252: Line 253:
* $04E9 - Page
* $04E9 - Page


====Mushroom Flags====
==Mushroom Flags==


* $04FB - Has First Mushroom been pulled? If yes, then it won't reappear.
* $04FB - Has First Mushroom been pulled? If yes, then it won't reappear.
Line 264: Line 265:
  01 - yes - If yes, then it won't reappear.
  01 - yes - If yes, then it won't reappear.


=====Subspace Related Properites=====
===Subspace Related Properites===


* $0621 - Number of times leaving Subspace aftering grabbing a coin
* $0621 - Number of times leaving Subspace aftering grabbing a coin
Line 276: Line 277:
* $0629 - look into
* $0629 - look into


====Level in Memory====
==Level in Memory==


$0531 - Current level loaded
$0531 - Current level loaded
Line 300: Line 301:
  13 - 7-2
  13 - 7-2


====Character Properties====
==Character Properties==


* $0546 - Pickup Speed Animation 1
* $0546 - Pickup Speed Animation 1
Line 319: Line 320:
* $0555 - Character's Jumping physics?
* $0555 - Character's Jumping physics?


====Music and Sound Properties====
==Music and Sound Properties==


* $05EE - Current music track?
* $05EE - Current music track?
Line 337: Line 338:
* $0612 - Current music tempo
* $0612 - Current music tempo


====World Properites====
==World Properites==


* $0635 - Current World number (loads characteristics of world such as Ice)
* $0635 - Current World number (loads characteristics of world such as Ice)


=====Graphics Tileset=====
===Graphics Tileset===


* $06F7 - Current Level Tileset (1st half of the right Table)
* $06F7 - Current Level Tileset (1st half of the right Table)
Line 359: Line 360:
* $06FD - Current animation of $06F8 (Cycling sprites)
* $06FD - Current animation of $06F8 (Cycling sprites)


=====Level Layout=====
===Level Layout===


* $0700 ~ $07FF - Subspace and jars
* $0700 ~ $07FF - Subspace and jars
* $6000 - $695F - Currently loaded level (Almost half the SRAM)
* $6000 - $695F - Currently loaded level (Almost half the SRAM)
=References=
http://www.tekhacks.net/forum - lost when forum was removed (recovered by internet archieve)
http://board.acmlm.org - lost when board was remade (recovered by internet archive)
http://bmf.rustedmagick.com/

Revision as of 20:31, 26 April 2006

Chip tiny.png The following article is a RAM map for Super Mario Bros. 2 (NES).

ROM

Counters

  • $04ED - Current number of lives
  • $05C5 - Current number of Continues
  • $062A - Current number of cherries
  • $062B - Current number of coins pulled in Subspace (Slot machine currency)
  • $062C - Current number of BIG vegetables pulled for stop watch

Sprite Related

  • $0014 - Page of main character's X position
  • $001E - Page of main character's Y position

Position of sprites

X position on page

  • $0028 - main character
  • $0029 - enemy 5
  • $002A - enemy 4
  • $002B - enemy 3
  • $002C - enemy 2
  • $002D - enemy 1

Y position on page

  • $0033 - enemy 5
  • $0034 - enemy 4
  • $0035 - enemy 3
  • $0036 - enemy 2
  • $0037 - enemy 1

Speed of sprites (left/right)

  • $003C - enemy 5
  • $003D - enemy 4
  • $003E - enemy 3
  • $003F - enemy 2
  • $0040 - enemy 1

Jumping Physics

  • $0046 - main character
  • $0047 - enemy 5
  • $0048 - enemy 4
  • $0049 - enemy 3
  • $004A - Enemy 2
  • $004B - Enemy 1
  • $0050 - Is character on a vine?
00 - no
01 - yes

Misc. sprite addresses

  • $0051 - Enemy 5
  • $0052 - Enemy 4
  • $0053 - Enemy 3
  • $0054 - Enemy 2
  • $0055 - Enemy 1
00 - Invisable
01 - Visable
02 - Dead
  • $005A - Enemy 5's relation to main character/landscape
  • $005B - Enemy 4's relation to main character/landscape
  • $005C - Enemy 3's relation to main character/landscape
  • $005D - Enemy 2's relation to main character/landscape
  • $005E - Enemy 1's relation to main character/landscape
00 - not on the ground (could be jumping or being thrown)
04 - walking
05 - turn left because object blocks path
06 - turn right because object blocks path
20 - carrying main character when reaching an edge to turn around
24 - carrying main character with same speed as movement

Sprite's palette, mirroring, etc.

  • $0065 - Enemy 5
  • $0066 - Enemy 4
  • $0067 - Enemy 3
  • $0068 - Enemy 2
  • $0069 - Enemy 1

Sprite IDs

  • $008F - Character selected (appearance only, until defeated, then stats as well)
00 - Mario
01 - Princess
02 - Toad
03 - Luigi
  • $0090 - Enemy 5
  • $0091 - Enemy 4
  • $0092 - Enemy 3
  • $0093 - Enemy 2
  • $0094 - Enemy 1
  • $0096 - Item pulled up from ground
  • $0099 - Graphics for when main character jumps
  • $009A - Drop through
  • $009B - Graphics for when main character walks
  • $00C7 - Character's status

Sprite HP

  • $0465 - Enemy 5
  • $0466 - Enemy 4
  • $0467 - Enemy 3
  • $0468 - Enemy 2
  • $0469 - Enemy 1

Main character

  • $04C2 - Current life in the life meter
0F - One heart
1F - Two hearts
2F - Three hearts
3F - Four hearts
  • $04C3 - Number of bars in the life meter (for visual purposes only)
FF - One bar (doesn't work very well)
00 - Two bars (default)
01 - Three bars
02 - Four bars

Timers

  • $0085 - Amount of time left until main character becomes vulnerable
  • $0086 - Amount of time left for unknown
  • $0087 - Amount of time left before Bob Omb 5 explodes
  • $0088 - Amount of time left before Bob Omb 4 explodes
  • $0089 - Amount of time left before Bob Omb 3 explodes
  • $008A - Amount of time left before Bob Omb 2 explodes
  • $008B - Amount of time left before Bob Omb 1 explodes
  • $008C - Amount of time left before Bomb 1 explodes
  • $008D - Amount of time left before Bomb 2 explodes
  • $008E - Amount of time left before Bomb 3 explodes
  • $00B9 - Current time left to use Pidget's carpet
  • $04FF - Current amount of time left from the stop watch
  • $14CA - Timer for crouch jump power (0 - 3C)

Item flags

  • $009C - Holding an item?
00 = no
01 = yes
  • $009D - Character's mirroring, etc. (not palette)
  • $00A3 - Changes once for everytime Tweeter jumps
  • $00AD - Is key held?
00 - no
01 - yes -  Key appears above head even if thrown, but then not chased.
  • $00AE - Item in hand height (used for different character sizes?)

Misc.

  • $00BA - Screen speed moving left and right
  • $0100 - (screen hold?)
  • $0415 - the rising of the heart
  • $0416 - Height of whale's spout after peaking.
  • $0456 - Current time left Hawkmouth (before Wart) is open
  • $04EC - I can't describe this one.
00 - normal game play
01 - begin the same level and area again (like dying revive)
02 - game over
03 - end level, go to bonus game
04 - warp
  • $06F6 - Character growing or shrinking

Button Related

  • $00F5 - Button pressed (Controller 1)
  • $00F6 - Button pressed (Controller 2)
  • $00F7 - Button held (Controller 1)
  • $00F8 - Button held (Controller 2)
Directional Pad
*0 - no movement
*1 - Right
*2 - Left
*3 - Left + Right
*4 - Down
*5 - Down + Right
*6 - Down + Left
*7 - Down + Left + Right
*8 - Up
*9 - Up + Right
*A - Up + Left
*B - Up + Left + Right
*C - Up + Down
*D - Up + Down + Right
*E - Up + Down + Left
*F - Up + Down + Left + Right
Buttons
0* - not pressed
1* - Start
2* - Select
3* - Start + Select
4* - B
5* - Start + B
6* - Select + B
7* - Start + Select + B
8* - A
9* - Start + A
A* - Select + A
B* - Start + Select + A
C* - A + B
D* - Start + A + B
E* - Select + A + B
F* - Start + Select + A + B

Sprite Flags

  • $04B4 - Something to do with the Hawkmouth opening and closing
  • $04AD - Current number of enemies defeated to grab a heart.
  • $04B0 - Has Key been used on lock?
00 - no
01 - yes - If yes, then it won't reappear.
  • $04B4 - How wide Hawkmouth is open
  • $04B5 - Has the Crystal been obtained? If yes, effect will last while in area.
00 - no
01 - yes
  • $04B6 - look into
  • $04BE - Time counts up for how long the door takes to open
  • $04C4 - Amount of time left for the screen to shake after POW
  • $04C5 - Height to raise and lower the "level" for shake
  • $04C6 - Amount of time left for bomb flash in background
  • $04CA - Amount of time to build up to charged jump
  • $04E0 - Current Starman time length left

Regeneration properties

  • $04E7 - Area
  • $04E8 - Sub-area
  • $04E9 - Page

Mushroom Flags

  • $04FB - Has First Mushroom been pulled? If yes, then it won't reappear.
00 - no
01 - yes
  • $04FC - Has Second Mushroom been pulled? If yes, then it won't reappear.
00 - no
01 - yes
  • $0620 - Has 1-up been pulled?
00 - no
01 - yes - If yes, then it won't reappear.

Subspace Related Properites

  • $0621 - Number of times leaving Subspace aftering grabbing a coin
00 - 1st chance to grab coins
01 - 2nd chance to grab coins
02 - No more chances, get vegetables.
  • $0628 - In subspace?
00 - no
02 - yes (doesn't work for vertical areas)
  • $0629 - look into

Level in Memory

$0531 - Current level loaded

00 - 1-1
01 - 1-2
02 - 1-3
03 - 2-1
04 - 2-2
05 - 2-3
06 - 3-1
07 - 3-2
08 - 3-3
09 - 4-1
0A - 4-2
0B - 4-3
0C - 5-1
0D - 5-2
0E - 5-3
0F - 6-1
10 - 6-2
11 - 6-3
12 - 7-1
13 - 7-2

Character Properties

  • $0546 - Pickup Speed Animation 1
  • $0547 - Pickup Speed Animation 2
  • $0548 - Pickup Speed Animation 3
  • $0549 - Pickup Speed Animation 4
  • $054A - Pickup Speed Animation 5
  • $054B - Pickup Speed Animation 6
  • $054D - Standing Jump Height
  • $054E - Crouching Power Jump Height
  • $0550 - Running Jump Height
  • $0551 - Running Jump Height while carrying object
  • $0553 - Float Timer (set to 0 for everyone but Princess)
  • $0555 - Character's Jumping physics?

Music and Sound Properties

  • $05EE - Current music track?
  • $05EF - Current music track?
  • $0600 - Loads the current song track
  • $0601 - Plays a sound effect
  • $0602 - Plays a sound effect
  • $0603 - Plays a small clip of music (and also for ending sequence)
  • $0604 - Character's sound effects
  • $0605 - POW sound effects
  • $0606 - Stores sound effect from $0603 played
  • $0607 - Stores sound effect from $0602 played
  • $0608 - Stores sound effect from $0601 played
  • $0609 - Stores music track from $0600 played
  • $0612 - Current music tempo

World Properites

  • $0635 - Current World number (loads characteristics of world such as Ice)

Graphics Tileset

  • $06F7 - Current Level Tileset (1st half of the right Table)
  • $06F8 - Current Cycling Sprite Tileset (2nd half of the right Table)
  • $06F9 - Current Character (Appearance,not stats) (1st quarter of left Table)
00 - Large Mario
01 - Large Luigi
02 - Large Princess
03 - Large Toad
04 - Small Mario
05 - Small Luigi
06 - Small Princess
07 - Small Toad
  • $06FA - Current standard sprites (Snifits, Hawkmouth, etc.) (2nd quarter of left Table)
  • $06FB - Current standard sprites (1-Up, Birdo, etc.) (3rd quarter of left Table)
  • $06FC - Current changable sprites (Ostro, Pidget, Pokey, etc.) (4th quarter of left Table)
  • $06FD - Current animation of $06F8 (Cycling sprites)

Level Layout

  • $0700 ~ $07FF - Subspace and jars
  • $6000 - $695F - Currently loaded level (Almost half the SRAM)

References

http://www.tekhacks.net/forum - lost when forum was removed (recovered by internet archieve) http://board.acmlm.org - lost when board was remade (recovered by internet archive) http://bmf.rustedmagick.com/