Sonic the Hedgehog 2 (Sega Master System)/RAM map

From Data Crystal
Jump to navigation Jump to search

Chip tiny.png The following article is a RAM map for Sonic the Hedgehog 2 (Sega Master System).

RAM Map

Addr    Size    Description
----    ----    -----------
C000    4096    Level Layout
D12B       1    Bank number
D12C       1    Level select flag (Change to 0D)
D137      16    Button pressed & held
D162       1    8x8 -> 32x32 mappings ROM bank
D163       1    level layout ROM bank
D164       2    8X8 -> 32X32 mappings pointer
D166       2    Level layout pointer
D168       2    ??? (affects level, part of Level Header)
D16A       2    Collision data?
D16C       2    Level width in tiles
D16E       2    Level height in tiles
D172       1    BG X Scroll
D173       1    BG Y Scroll
D174       2    Sonic X position
D176       2    Sonic Y position
D278       2    Camera position X&Y 32x32?
D27C       2    Fixed camera height?
D27E       2    Camera height in pixels?
D280       2    Fixed camera width?
D282       2    Camera Width in pixels?
D284       2    Camera X position
D286       2    Camera Y position
D288       1    Camera offset X
D289       1    Camera offset Y
D293       1    Pause flag
D295       1    Zone
D296       1    Act
D297       1    Lives you started the act with
D298       1    Lives
D299       1    Rings
D29B       4    Score 1
D29F       4    Score 2
D2A2       3    Time bonus
D2B9       2    Timer digits
D2BC       1    Time milliseconds
D2BD       1    Continues (turns first value into 8 after using 1)
D2C2       1    Act on Level Select
D2C3       2    Continue timer
D2C5       1    Chaos Emeralds
D2C6       1    Chaos Emerald collected
D2D4       2    Collision pointer
D2D6       1    Frames?
D2D7       1    Demo number
D2D8       1    Demo data bank
D2D9       2    Demo location
D34F       1    Animation frames for Sonic
D351       1    Ring frames
D395       2    Ring art location
D3A8       1    Lost rings trigger
D3A9       1    Invincibility blinking frames timer
D3AA       1    Timer for holding jump up (counts up when jump is held in air, sets to 20 if jump is let go)
D3B4       2    Timer for stalling
D3BA       2    Title card timer after ZONE
D467       1    Underwater flag
D468       1    Time spent underwater in milliseconds
D469       1    Time spent underwater in longer seconds
D4A0       1    Invincibility timer
D4A6       4    Palette cycle
D4C6      32    Palette | D4D3 Auto palette
D4E6       4    Load level/Sonic palette flags
D502       1    Current state
D506       1    Sonic sprite
D511       2    Sonic X physical position
D514       2    Sonic Y physical position
D516       2    Horizontal speed
D518       2    Jump gravity/Vertical Speed
D532       1    Powerup
DD00     400    Music | DD04 Music/SFX trigger