Mega Man 5/RAM map

From Data Crystal
Jump to navigation Jump to search

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


Player Variables

Input

RAM Function Details
$0014-$---- Keys pressed on pad 1
$0015-$---- Always cleared
$0016-$---- Keys held on pad 1
$0017-$---- Always cleared

Camera & Scrolling

RAM Function Details
$0028-$---- Scrolling direction
$002A-$---- Maximum screen
$002B-$---- Current screen
$0044-$---- Previous scroll X
$0045-$---- Previous scroll Y
$00A2-$---- Current Y scroll
$00A4-$---- Current X scroll
$00F9-$---- Scroll X high
$00FA-$---- Scroll Y
$00FB-$---- Vertical screen offset
$00FC-$---- Scroll X
$00FD-$---- Current nametable

Life & Health

RAM Function Details
$00B0-$---- Life
$00BD-$---- E-Tanks
$00BE-$---- M-Tanks
$00BF-$---- Lives

Player State

RAM Function Details
$0030-$---- Current move
$0031-$---- Direction
$0032-$---- Current weapon
$0033-$---- Shooting timer
$0034-$---- Shooting flag
$0035-$---- Sliding timer
$0038-$---- Charge counter
$00AF-$---- Mega Man upside down

Collision / Damage

RAM Function Details
$0036-$---- Kill block type

F0 = Kill; 00 = Nothing; Others = decrease life by 1

$0042-$---- Largest block type found
$0043-$---- Number of destroyed blocks

Weapons & Abilities

Weapon Energy

RAM Function Details
$00B1-$00BC Weapon energy Array

Special Items

RAM Function Details
$005D-$---- Picked up M-Tank

Stage / Progress

RAM Function Details
$0026-$---- Current level
$0027-$---- PRG bank for level
$0029-$---- Area number
$0069-$---- Last screen visited
$006A-$---- Current boss in rematch
$006B-$---- Killed bosses in rematch
$006C-$---- Current Wily level
$006D-$---- Beat letters
$006E-$---- Levels cleared

Graphics & Display

Rendering / PPU

RAM Function Details
$0018-$---- Palette changed
$0019-$---- Draw horizontal data
$001A-$---- Draw vertical data
$001B-$---- Palette cycle stopped
$001C-$---- Update tile
$001E-$---- New tile position
$0023-$---- New tile number
$0047-$---- Block number to draw
$0048-$004F Block types in tested positions
$005A-$---- Animation disable
$0060-$---- Display updated
$00F0-$---- Screen disabled
$00FE-$---- Display settings 1
$00FF-$---- Display settings 2

Palette

RAM Function Details
$0600-$061F Palette
$0620-$063F Original palette
$05F0-$05F3 Palette animation
$05F4-$05F7 Palette frame
$05F8-$05FB Palette timer

Sprite / Object Arrays

RAM Function Details
$0300-$0317 Sprite type
$0318-$032F X position fraction
$0330-$0347 X position low
$0348-$035F X position high
$0360-$0377 Y position fraction
$0378-$038F Y position low
$0390-$03A7 Y position high
$03A8-$03BF X speed low
$03C0-$03D7 X speed high
$03D8-$03EF Y speed low
$03F0-$0407 Y speed high
$0408-$041F Sprite flags

7 = Hurts Mega Man; 6 = Shielded; 5–0 = Size

$0420-$0437 Direction
$0438-$044F Sprite number
$0450-$0467 Life
$0468-$047F Variable A
$0480-$0497 Variable B
$0498-$04AF Variable C
$04B0-$04C7 Variable D
$04C8-$04DF Variable E
$04E0-$04F7 Variable F
$04F8-$050F Variable G
$0510-$0527 Variable H
$0528-$053F Display flags

6 = Flipped; 5 = Mirrored; 4 = In background; 3 = Don’t destroy off-screen; 2 = Invisible

$0540-$0557 Animation frame
$0558-$056F Animation
$0570-$0587 Animation timer
$0588-$059F Enemy handler (low)
$05A0-$05B7 Enemy handler (high)
$05B8-$05CF Flash counter

Sound

RAM Function Details
$00C0-$---- In sound code
$00C7-$---- Song time increment
$00C8-$---- Song time low
$00C9-$---- Song speed high
$00CA-$---- Song speed low
$00CB-$---- Global transpose
$00CC-$---- SF channels playing
$00CF-$---- Current track bit
$00D0-$00D1 SF pointer
$00D2-$---- SF transpose
$00D3-$---- SF ontime
$00D4-$---- SF timer
$00D5-$---- SF on-timer
$00DA-$---- Sound queue write pointer
$00DB-$---- Sound queue read pointer
$00DC-$00E3 Sound queue

Memory / System

RAM Function Details
$0100-$011F Powerups taken in level
$0150-$016F Debug stack
$0170-$017F Main stack
$0190-$01AF Palette animation stack
$01B0-$01DF Game stack
$01E0-$01FF System stack
$0200-$02FF OAM table
$0680-$06BF Local destroyed blocks
$06C0-$06FF Destroyed blocks
$0700-$077F Channel variables
$0780-$07FF Drawing buffer
(Source: HHS)