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.

Mega Man 2/RAM map: Difference between revisions

From Data Crystal
Jump to navigation Jump to search
No edit summary
(Re-organised the infomation into tables. May need more cleanup.)
Line 1: Line 1:
{{rammap|game=Mega Man 2}}
{{rammap|game=Mega Man 2}}


===Misc.===
===General===
* $0022 - Vertical position of screen scrolling
{| border="1" cellpadding="1"
* $0023 - Controller 1 Poll
|'''RAM'''  || '''Function''' || '''Details'''
* $0025 - Controller 1 Mirror
|-
* $0027 - Controller 1 Poll, only changes on first frame of state change. Crash Man checks this for jump code.
| $0022 || Vertical position of screen scrolling ||
** Bit 1: A
|-
** Bit 2: B
| $0023 || Controller 1 Poll ||
** Bit 3: Select
|-
** Bit 4: Start
| $0025 || Controller 1 Mirror ||
** Bit 5: Up
|-
** Bit 6: Down
| $0027 || Controller 1 Poll || Only changes on first frame of state change. Crash Man checks this for jump code.
** Bit 7: Left
|-
** Bit 8: Right
| $002A || Area selected ||
* $002A - Area selected
|-
* $0030 - Gravity.
| $0030 || Gravity ||
* $004B - Invincibility timer (when this is above $00, invincibility frames will start and this will count down at a rate of $01 per frame).
|-
| $004B || Invincibility timer || When above $00, invincibility frames will start and this will count down at a rate of $01 per frame.
|-
|}
 
Controller values for $0023/$0025/$0027:
{| border="1" cellpadding="1"
|'''Bits'''  || '''Button'''
|-
| <tt>0000 0001</tt> || A
|-
| <tt>0000 0010</tt> || B
|-
| <tt>0000 0100</tt> || Select
|-
| <tt>0000 1000</tt> || Start
|-
| <tt>0001 0000</tt> || Up
|-
| <tt>0010 0000</tt> || Down
|-
| <tt>0100 0000</tt> || Left
|-
| <tt>1000 0000</tt> || Right
|-
|}


===Sound===
===Sound===
* $0066 - Sound effects for $0580 : $01 - play
{| border="1" cellpadding="1"
* $0067 - Music playing for $0000 : $01 - play
|'''RAM'''  || '''Function''' || '''Details'''
* $0580 - Sound to play for $0066
|-
| $0066 || Sound effects strobe || Write $01 to play the SFX ID in address $0580
|-
| $0067 || Music strobe || Write $01 to play the Music in address $0000
|-
| $0580 || Sound effect queue ||
|-
|}
 
===Player properties===
{| border="1" cellpadding="1"
|'''RAM'''  || '''Function''' || '''Details'''
|-
| $06C0 || Mega Man's HP ||
|-
| $0460 || Mega Man's X location ||
|-
| $04A0 || Mega Man's Y location ||
|-
| $0036 || Shooting pose timer ||
|-
| $0032 || Ground type Mega Man is on (feet) ||
{|border="1" cellpadding="1"
|'''Value'''  || '''Type'''
|-
| $00 || Air
|-
| $01 || Ground
|-
| $02 || Ground
|-
| $05 || Right Conveyer
|-
| $02 || Left Conveyer
|-
| $07 || Ice
|-
|}
|-
| $0032 || Ground type Mega Man is on (center) || See above
|-
| $003D || Is Mega Man shooting? ||
|-
| $009A || Unlocked Weapons ||
{|border="1" cellpadding="1"
|'''Bits'''  || '''Hex''' || '''Weapon'''
|-
| <tt>0000 0001</tt> || $01 || Atomic Fire
|-
| <tt>0000 0010</tt> || $02 || Air Shooter
|-
| <tt>0000 0100</tt> || $04 || Leaf Shield
|-
| <tt>0000 1000</tt> || $08 || Bubble Lead
|-
| <tt>0001 0000</tt> || $10 || Quick Boomerang
|-
| <tt>0010 0000</tt> || $20 || Time Stopper
|-
| <tt>0100 0000</tt> || $40 || Metal Blade
|-
| <tt>1000 0000</tt> || $80 || Crash Bomb
|-
|}
|-
| $009B || Unlocked Items ||
{|border="1" cellpadding="1"
|'''Bits'''  || '''Hex''' || '''Item'''
|-
| <tt>0000 0001</tt> || $01 || Item 1 (Helicopter Platform)
|-
| <tt>0000 0010</tt> || $02 || Item 2 (Jet Sled)
|-
| <tt>0000 0100</tt> || $04 || Item 3 (Climbing Platform)
|-
|}
|-
| $009C || Atomic Fire Ammo ||
|-
| $009D || Air Shooter Ammo ||
|-
| $009E || Leaf Shield Ammo ||
|-
| $009F || Bubble Lead Ammo ||
|-
| $00A0 || Quick Boomerang Ammo ||
|-
| $00A1 || Time Stopper Ammo ||
|-
| $00A2 || Metal Blade Ammo ||
|-
| $00A3 || Crash Bomb Ammo ||
|-
| $00A4 || Item 1 Ammo ||
|-
| $00A5 || Item 2 Ammo ||
|-
| $00A6 || Item 3 Ammo ||
|-
| $00A7 || Number of Energy Tanks Remaining || Can go above $04, but will break passwords.
|-
| $00A8 || Number of Lives remaining || Looks glichy on the pause menu if greater than $64.
|-
| $00CB || Difficulty setting || When an enemy takes damage, if this value is $00 (Normal) the damage given will be bitshifted left, doubling it.
|-
| $0367-0369 || Mega Man's Color Palette ||
|-
|}
 
===Stage Select===
{| border="1" cellpadding="1"
|'''RAM'''  || '''Function''' || '''Details'''
|-
| $002A || Cursor position || $00 is Dr. Wily, $01-$08 goes clockwise starting from Bubble Man.
|-
| $0200 - $0203 || Heat Man's left eye sprite data ||
{|border="1" cellpadding="1"
|'''Address'''  || '''Property'''
|-
| $0200 || Y
|-
| $0201 || Tile
|-
| $0202 || Palette
|-
| $0203 || X
|-
|}
 
|-
| $0200 - $0203 || Heat Man's right eye sprite data ||
{|border="1" cellpadding="1"
|'''Address'''  || '''Property'''
|-
| $0204 || Y
|-
| $0205 || Tile
|-
| $0206 || Palette
|-
| $0207 || X
|-
|}


===Stats===
|-
* $06C0 - Mega Man's HP
|}


* $009A - Unlocked Weapons
===Password Screen===
0000 0001 = $80 = 128 - Atomic Fire (Heatman)
{| border="1" cellpadding="1"
0000 0010 = $40 = 64 - Air Shooter (Airman)
|'''RAM''' || '''Function''' || '''Details'''
0000 0100 = $20 = 32 - Leaf Shield (Woodman)
|-
0000 1000 = $10 = 16 - Bubble Lead (Bubbleman)
| $0420 - $0438 || If 01, this grid space contains a dot. || Goes from left to right, top to bottom.
  0001 0000 = $08 =  8 - Quick Boomerang (Quickman)
|-
0010 0000 = $04 =  4 - Time Stopper (Flashman)
| $0680 || Number of dots left on Password entering ||
0100 0000 = $02 =  2 - Metal Blade (Metalman)
|-
1000 0000 = $01 =  1 - Crash Bomb (Crashman)
| $0680  || Position of cursor on Password entering ||
* $009B - Item #s
|}
0000 0001 = $80 = 128 - Item 1 (Floating Platform)
 
0000 0010 = $40 =  64 - Item 2 (Horizontal Platform)
<!-- These need more detailed research. Commenting out for now.
  0000 0100 = $20 =  32 - Item 3 (Vertical Platform)
* $009C - Number of times Atomic Fire (Heatman) can be used
* $009D - Number of times Air Shooter (Airman) can be used
* $009E - Number of times Leaf Shield (Woodman) can be used
* $009F - Number of times Bubble Lead (Bubbleman) can be used
* $00A0 - Number of times Quick Boomerang (Quickman) can be used
* $00A1 - Number of times Time Stopper (Flashman) can be used
* $00A2 - Number of times Metal Blade (Metalman) can be used
* $00A3 - Number of times Crash Bomb (Crashman) can be used
* $00A4 - Number of times Item 1 can be used
* $00A5 - Number of times Item 2 can be used
* $00A6 - Number of times Item 3 can be used
* $00A7 - Number of Energy Tanks Remaining
* $00A8 - Number of Lives remaining
* $00CB - Difficulty setting


===Graphics Set Stuff===
===Graphics Set Stuff===
* $003A - A background-related boolean? (Changes to the rhythm of the flashing clouds of Airman's stage)
* $003A - A background-related boolean? (Changes to the rhythm of the flashing clouds of Airman's stage)
* $00F7 - Graphics Set
* $00F7 - Graphics Set
* $0200 - Y location of Heatman's left eye
 
* $0201 - Graphic for Heatman's left eye
===Title Screen===
* $0202 - Palette for Heatman's left eye
{| border="1" cellpadding="1"
* $0203 - X location of Heatman's left eye
|'''RAM'''  || '''Function''' || '''Details'''
* $0204 - Y location of Heatman's right eye
|-
* $0205 - Graphic for Heatman's right eye
| $04A2 || Windows' Y position ||
* $0206 - Palette for Heatman's right eye
|-
* $0207 - X location of Heatman's right eye
| $04A3 || Side of building's Y position ||
* $0367-0369 - Megaman's Color Palette
|-
| $04B0 || Mega Man's Y position ||
|-
|}


===Sprite stuff===
===Sprite stuff===
* $049F - Enemy 1's speed to the left
* $049F - Enemy 1's speed to the left
* $0460 - Mega Man's X location
* $04A0 - Mega Man's Y location
* $0033 - Is Mega Man on land
* $003D - Is Mega Man shooting
* $0036 - Shot timer
* $04A2 - Windows' Y position on Title Screen
* $04A3 - Side of building's Y position on Title Screen
* $04B0 - Mega Man's Y position on Title Screen
* $04BF - Enemy 1's Y location
* $04BF - Enemy 1's Y location


===Password Stuff===
-->
* $0420 - $0438 - If 01, this grid space contains a dot.
* $0680 - Number of dots left on Password entering
* $06A0 - Position of cursor on Password entering

Revision as of 23:45, 2 June 2022

Chip tiny.png The following article is a RAM map for Mega Man 2.

General

RAM Function Details
$0022 Vertical position of screen scrolling
$0023 Controller 1 Poll
$0025 Controller 1 Mirror
$0027 Controller 1 Poll Only changes on first frame of state change. Crash Man checks this for jump code.
$002A Area selected
$0030 Gravity
$004B Invincibility timer When above $00, invincibility frames will start and this will count down at a rate of $01 per frame.

Controller values for $0023/$0025/$0027:

Bits Button
0000 0001 A
0000 0010 B
0000 0100 Select
0000 1000 Start
0001 0000 Up
0010 0000 Down
0100 0000 Left
1000 0000 Right

Sound

RAM Function Details
$0066 Sound effects strobe Write $01 to play the SFX ID in address $0580
$0067 Music strobe Write $01 to play the Music in address $0000
$0580 Sound effect queue

Player properties

RAM Function Details
$06C0 Mega Man's HP
$0460 Mega Man's X location
$04A0 Mega Man's Y location
$0036 Shooting pose timer
$0032 Ground type Mega Man is on (feet)
Value Type
$00 Air
$01 Ground
$02 Ground
$05 Right Conveyer
$02 Left Conveyer
$07 Ice
$0032 Ground type Mega Man is on (center) See above
$003D Is Mega Man shooting?
$009A Unlocked Weapons
Bits Hex Weapon
0000 0001 $01 Atomic Fire
0000 0010 $02 Air Shooter
0000 0100 $04 Leaf Shield
0000 1000 $08 Bubble Lead
0001 0000 $10 Quick Boomerang
0010 0000 $20 Time Stopper
0100 0000 $40 Metal Blade
1000 0000 $80 Crash Bomb
$009B Unlocked Items
Bits Hex Item
0000 0001 $01 Item 1 (Helicopter Platform)
0000 0010 $02 Item 2 (Jet Sled)
0000 0100 $04 Item 3 (Climbing Platform)
$009C Atomic Fire Ammo
$009D Air Shooter Ammo
$009E Leaf Shield Ammo
$009F Bubble Lead Ammo
$00A0 Quick Boomerang Ammo
$00A1 Time Stopper Ammo
$00A2 Metal Blade Ammo
$00A3 Crash Bomb Ammo
$00A4 Item 1 Ammo
$00A5 Item 2 Ammo
$00A6 Item 3 Ammo
$00A7 Number of Energy Tanks Remaining Can go above $04, but will break passwords.
$00A8 Number of Lives remaining Looks glichy on the pause menu if greater than $64.
$00CB Difficulty setting When an enemy takes damage, if this value is $00 (Normal) the damage given will be bitshifted left, doubling it.
$0367-0369 Mega Man's Color Palette

Stage Select

RAM Function Details
$002A Cursor position $00 is Dr. Wily, $01-$08 goes clockwise starting from Bubble Man.
$0200 - $0203 Heat Man's left eye sprite data
Address Property
$0200 Y
$0201 Tile
$0202 Palette
$0203 X
$0200 - $0203 Heat Man's right eye sprite data
Address Property
$0204 Y
$0205 Tile
$0206 Palette
$0207 X

Password Screen

RAM Function Details
$0420 - $0438 If 01, this grid space contains a dot. Goes from left to right, top to bottom.
$0680 Number of dots left on Password entering
$0680 Position of cursor on Password entering