Metroid/RAM map

From Data Crystal
Jump to navigation Jump to search

Chip tiny.png The following article is a RAM map for Metroid.


Given non-RAM address values: $Hexadecimal value(Decimal value), ex. $63(99)

Any values less than $0A(10) will only show the Hex value.


RAM Function Details
$0049 Scroll direction 0=top, 1=bottom, 2=left, 3=right, updates onscroll only
$004F Vertical page Denotes vertical page in the loaded map. Not sure about offset. It's also changing when you change direction. Does not update when $00FC is 0, but does when higher.
$0050 Horizontal page This denotes the horizontal page in the current loaded map. I'm not sure about the offset. It's also changing when you change direction. Does not update when $00FD is 0, but does when higher.
$0051 Samus' x position on screen
$0052 Samus' y position on screen
$00FC Vertical page offset. Page y number + offset gives you mapcoords of top.
$00FD Horizontal page offset. Page x number + offset gives you mapcoords of left.
$0064 Jump State $00=Unable to jump, $01=Able to jump
$0070 Temporary Invulnerability $00=Damageable, $01-$FF(255)=Count down to 0, undamageable
$0106 Samus' Energy (Byte 1) High nybble contains the "ones" place of the amount of energy Samus currently has.
$0107 Samus' Energy (Byte 2) Low nybble contains the "tens" place of the amount of energy Samus currently has. High nybble contains number of full tanks.
$010E Weapon selection $00=Arm Cannon, $01=Missles
$0200-02FF Sprite DMA
$0316 Horizontal movement in air Keep below $3F(63) to avoid graphical glitches. Keep at $2F(47) and below (?) to avoid door entry glitches--such will cause you to exit two screen widths in the opposite direction you entered.
$0400/6F Enemy data 1 There is space for 6 enemies. Screen XY is saved here, as well as HP. This is only part of the data. Some of it is kept in the SRAM and some of it is unknown.
$6877 Number of tanks collected. Keep to $06 or below to avoid redraw errors.
$6878 Special items Samus is currently carrying Each bit represents one of eight special items. Hex values are as follows:
Hex Decimal Item
$01 1 Bombs
$02 2 Hi-Jump
$04 4 Long Beam
$08 8 Screw Attack
$10 16 Maru Mari
$20 32 Varia
$40 64 Wave Beam
$80 128 Ice Beam

For multiple weapons, add values in hex. (Ex: $16(22) for Maru Mari, Long Beam, and Hi-Jump)

$6879 The current number of missiles that Samus is carrying $00-$FF(255)
$687A The maximum number of missiles that Samus may carry $00-$FF(255)
$687B Kraid defeated/statue $00=Kraid alive, $01=Kraid dead/Statue ready to be raised, $02-7F=Kraid dead/Statue unraisable,$80-FF=Kraid dead/Statue raised
$687C Ridley defeated/statue $00=Ridley alive, $01=Ridley dead/Statue ready to be raised, $02-7F=Ridley dead/Statue unraisable, $80-FF=Ridley dead/Statue raised
$69B3 Suit state $00=Wearing suit, $01-$FF(255)=Not wearing suit
$6B14 Enemy data 2 Some more enemy data. Tells enemy type, sprite table, whether it's drawn and other stuff. This list does NOT seem to be synced with Enemy data 1.