If you are still using the old URL (datacrystal.romhacking.net), please update your bookmarks! The old URL may stop working soon.
The current URL is datacrystal.tcrf.net.
The current URL is datacrystal.tcrf.net.
Mega Man 2/RAM map: Difference between revisions
Jump to navigation
Jump to search
Ice Ranger (talk | contribs) (Added a few RAM addresses) |
No edit summary |
||
(21 intermediate revisions by 10 users not shown) | |||
Line 1: | Line 1: | ||
{{rammap|game=Mega Man 2}} | |||
=== | ==General== | ||
{| border="1" cellpadding="1" | |||
|'''RAM''' || '''Function''' || '''Details''' | |||
|- | |||
| $001B || Camera state || | |||
{|border="1" cellpadding="0" | |||
|$00||Default | |||
|- | |||
|$01||Changing the nametable (E.g. scrolling within an area, creating the pause menu) | |||
|- | |||
|$02||Freeze before and after scrolling to a new area | |||
|- | |||
|$80||Scrolling vertically | |||
|- | |||
|} | |||
|- | |||
| $001F || Camera X position || | |||
|- | |||
| $0020 || Camera X screen || When $001F gets larger than $FF, this value increases by $01. | |||
|- | |||
| $0022 || Camera Y position || | |||
|- | |||
| $0023 || Controller 1 Poll || [[#controller|(1)]] | |||
|- | |||
| $0025 || Controller 1 Mirror || [[#controller|(1)]] | |||
|- | |||
| $0027 || Controller 1 Poll || Only changes on first frame of state change. Crash Man checks this for jump code. [[#controller|(1)]] | |||
|- | |||
| $0030 || Gravity || | |||
|- | |||
| $004B || Invincibility timer || When above $00, invincibility frames will start and this will count down at a rate of $01 per frame. | |||
|- | |||
| $00CB || Difficulty setting || When an enemy takes damage, if this value is $00 (Normal) the damage given will be bitshifted left, doubling it. | |||
|- | |||
| $002A || Stage select cursor position || $00 is Dr. Wily, $01-$08 goes clockwise starting from Bubble Man. | |||
|- | |||
| $06C1 || Boss HP || | |||
|- | |||
|} | |||
=== | ==Sound== | ||
{| border="1" cellpadding="1" | |||
|'''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== | ||
{| 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 | |||
|Tile type Mega Man is standing on (feet) | |||
|rowspan="3"| | |||
{|border="1" cellpadding="1" | |||
||'''Value''' || '''Type''' | |||
|- | |||
| $00 || Air | |||
|- | |||
| $01 || Ground | |||
|- | |||
| $02 || Ladder | |||
|- | |||
| $03 || Instadeath (Spikes, Lava) | |||
|- | |||
| $04 || Water | |||
|- | |||
| $05 || Right Conveyer | |||
|- | |||
| $06 || Left Conveyer | |||
|- | |||
| $07 || Ice | |||
|- | |||
|} | |||
|- | |||
| $0033 || Tile type Mega Man is standing on (center) | |||
|- | |||
| $0034 || Tile type Mega Man is overlapping | |||
|- | |||
| $003D || Is Mega Man shooting? || | |||
|- | |||
| $009A || Unlocked Weapons/Stages beaten || | |||
{|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. | |||
|- | |||
| $0367-0369 || Mega Man's Color Palette || | |||
|- | |||
|} | |||
<!-- Ported from Mega Man II/RAM map--> | |||
{| border="1" cellpadding="1" | |||
|'''RAM''' || '''Size (in bytes)''' || '''Description''' | |||
|- | |||
| $0F12 || 1 || Mega Man facing: $00: left, $01: right | |||
|- | |||
| $0F15 || 1 || Mega Man X coordinate | |||
|- | |||
| $0F16 || 1 || Mega Man Y coordinate | |||
|- | |||
| $0F39 || 1 || Frame counter for main gameplay (pauses during pause menu) | |||
|- | |||
|} | |||
==Graphics== | |||
{| border="1" cellpadding="1" | |||
|'''RAM''' || '''Function''' || '''Details''' | |||
|- | |||
| $0200-$2FF || Sprite memory || These values are constantly read and sent to OAM. [[#sprites|(2)]] | |||
|- | |||
| $0354 || Palette cycling pattern || Values seem level-dependent? | |||
|- | |||
| $0355 || Palette cycling speed || How many frames to wait before cycling the palette, $00 for no cycling. May glitch outside of levels. | |||
|- | |||
| $0356-$365 || Palette memory (background) || | |||
|- | |||
| $0366-$375 || Palette memory (sprites) || | |||
|- | |||
|} | |||
==Password Screen== | |||
{| border="1" cellpadding="1" | |||
|'''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 || | |||
|} | |||
==References== | |||
#<div id="controller">[https://www.nesdev.org/wiki/Standard_controller#Report NESDev controller bits reference]</div> | |||
#<div id="sprites">[https://www.nesdev.org/wiki/PPU_OAM#Byte_0 NESDev sprite format reference]</div> | |||
<!-- These need more detailed research. Commenting out for now. | |||
===Graphics Set Stuff=== | ===Graphics Set Stuff=== | ||
* $003A - A background-related boolean? (Changes to the rhythm of the flashing clouds of Airman's stage) | |||
* $00F7 - Graphics Set | * $00F7 - Graphics Set | ||
===Title Screen=== | |||
{| border="1" cellpadding="1" | |||
|'''RAM''' || '''Function''' || '''Details''' | |||
|- | |||
| $04A2 || Windows' Y position || | |||
|- | |||
| $04A3 || Side of building's Y position || | |||
|- | |||
| $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 | ||
* $04BF - Enemy 1's Y location | * $04BF - Enemy 1's Y location | ||
--> | |||
{{Internal Data}} | |||
Latest revision as of 20:54, 8 February 2024
The following article is a RAM map for Mega Man 2.
General
RAM | Function | Details | ||||||||
$001B | Camera state |
| ||||||||
$001F | Camera X position | |||||||||
$0020 | Camera X screen | When $001F gets larger than $FF, this value increases by $01. | ||||||||
$0022 | Camera Y position | |||||||||
$0023 | Controller 1 Poll | (1) | ||||||||
$0025 | Controller 1 Mirror | (1) | ||||||||
$0027 | Controller 1 Poll | Only changes on first frame of state change. Crash Man checks this for jump code. (1) | ||||||||
$0030 | Gravity | |||||||||
$004B | Invincibility timer | When above $00, invincibility frames will start and this will count down at a rate of $01 per frame. | ||||||||
$00CB | Difficulty setting | When an enemy takes damage, if this value is $00 (Normal) the damage given will be bitshifted left, doubling it. | ||||||||
$002A | Stage select cursor position | $00 is Dr. Wily, $01-$08 goes clockwise starting from Bubble Man. | ||||||||
$06C1 | Boss HP |
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 | Tile type Mega Man is standing on (feet) |
| |||||||||||||||||||||||||||
$0033 | Tile type Mega Man is standing on (center) | ||||||||||||||||||||||||||||
$0034 | Tile type Mega Man is overlapping | ||||||||||||||||||||||||||||
$003D | Is Mega Man shooting? | ||||||||||||||||||||||||||||
$009A | Unlocked Weapons/Stages beaten |
| |||||||||||||||||||||||||||
$009B | Unlocked Items |
| |||||||||||||||||||||||||||
$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. | |||||||||||||||||||||||||||
$0367-0369 | Mega Man's Color Palette |
RAM | Size (in bytes) | Description |
$0F12 | 1 | Mega Man facing: $00: left, $01: right |
$0F15 | 1 | Mega Man X coordinate |
$0F16 | 1 | Mega Man Y coordinate |
$0F39 | 1 | Frame counter for main gameplay (pauses during pause menu) |
Graphics
RAM | Function | Details |
$0200-$2FF | Sprite memory | These values are constantly read and sent to OAM. (2) |
$0354 | Palette cycling pattern | Values seem level-dependent? |
$0355 | Palette cycling speed | How many frames to wait before cycling the palette, $00 for no cycling. May glitch outside of levels. |
$0356-$365 | Palette memory (background) | |
$0366-$375 | Palette memory (sprites) |
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 |
References
Internal Data for Mega Man 2
| |
---|---|