Sonic Jam 6/RAM map

From Data Crystal
Jump to navigation Jump to search

Chip tiny.png The following article is a RAM map for Sonic Jam 6.

Control pad variables
Offset Size Description
$FF001A byte Buttons held by Player 1
$FF001C byte Buttons pressed by Player 1
$FF001E byte Buttons held by Player 2
$FF0020 byte Buttons pressed by Player 2
$FF0022 byte Buttons held by current player
$FF0024 byte Buttons pressed by current player
Title screen and Demo
Offset Size Description
$FF0038 word Demo mode flag
$FF003A word Perform controller data playback during demo
$FF003C word Current demo
  • 01: World 1-1
  • 02: World 1-2
  • 03: World 2-1
  • 04: World 2-2
  • 05: World 2-4 (unused)
$FF003E word Title screen timer/Demo current frame (for controller data playback)
$FF0040 word Residual variable set to 1 when the demo ends
Gameplay variables
Offset Size Description
$FF0042 word Current level
  • See Notes for a full list of level IDs
$FF0044 word Next screen to load
$FF0046 word Screen parity
$FF0048 word Update scrolling flag
$FF004A word Scroll offset
$FF004C word Scroll lock
$FF004E word Total screens crossed
$FF0050 word Backdrop scrolling offset
$FF0052 word Global frame timer
$FF0054 word Player acceleration to the left (flag)
$FF0056 word Player acceleration to the right (flag)
$FF0058 word Floor tile ID (what tile the player is standing on)
$FF005A word Side tile ID (what tile the player is walking into)
$FF005C word Hit tile ID (what tile the player is hitting by jumping)
$FF005E word Player moving flag, mainly used for sprite animation
$FF0060 word Player size
$FF0062 word Tile collision X
$FF0064 word Tile collision Y
$FF0066 word Moving tile position X
$FF0068 word Moving tile position Y
$FF006A word Hit tile index in the original level data, to put back the original tile after doing the moving tile animation
$FF006C word Sprite drift, how much to move them back when scrolling, to sync them with background
$FF006E word Coin block timer, the block will solidify when this reaches 1
$FF0070 word Coin block subtimer, which is a frame counter to know when to decrease the previous variable
$FF0072 word Horizontal pos of left side of player bounding box
$FF0074 word Vertical pos of top side of player bounding box
$FF0076 word Horizontal pos of right side of player bounding box
$FF0078 word Vertical pos of bottom side of player bounding box
$FF007A word Horizontal pos of left side of enemy bounding box
$FF007C word Vertical pos of top side of enemy bounding box
$FF007E word Horizontal pos of right side of enemy bounding box
$FF0080 word Vertical pos of bottom side of enemy bounding box
$FF0082 word Player intersect enemy flag
$FF0084 word Enemy index, tracks which enemy in the level enemy data to load next
$FF0086 word Enemy height, how many tiles to look ahead for a collision, vertically
$FF0088 word Enemy width, how many tiles to look ahead for a collision, horizontally
$FF008C word Substitute variable used for the player's current sprite when they are flashing
$FF008E word Player horizontal starting position
$FF0090 word Player vertical starting position
$FF0092 word How many coins are held by the player
$FF0094 word How many lives the player has
$FF0096 word Level timer
$FF0098 word Star power blinking flag
$FF009A word Star timer
$FF009C word Flag to give fire power to the player when a level begins
$FF00A4 word Water level flag, gives swimming ability
Game state variables
Offset Size Description
$FF0034 word Pause flag
$FF008A word Transition control
  • 01: show transition screen
  • 02: warp into the room directly
$FF00A0 word End of level flag, set after reaching the flagpole
$FF00A2 word "Castle fight stage"
  • 01: boss is defeated
  • 02: retainer is rescued
$FF00A6 word 1P/2P mode
  • 00: 1 player mode
  • 01: 2 player mode
$FF00A8 word Reset to title flag (set if the player doesn't press any button to continue after a gameover)
$FF00AA word Transition screen timer
$FF00AC word "Special sprite" palette
$FF00AE word Loop command, for castle levels such as 4-4 and 7-4
$FF00B0 word Princess rescued flag, set after beating 8-4
$FF00B2 word Ending cutscene current frame
Off-screen player stats
Offset Size Description
$FF00B4 word Current player
$FF00B6 word Mario size
$FF00B8 word Luigi size
$FF00BA word Mario live count
$FF00BC word Luigi live count
$FF00BE word Mario current level
$FF00C0 word Luigi current level
$FF00C2 word Mario fiery flag
$FF00C4 word Luigi fiery flag
$FF00C6 word Mario current screen
$FF00C8 word Luigi current screen
$FF00CA word Mario current screen scrolling offset
$FF00CC word Luigi current screen scrolling offset
$FF00CE word Mario backdrop scrolling offset
$FF00D0 word Luigi backdrop scrolling offset
$FF00D2 word Mario horizontal starting position
$FF00D4 word Luigi horizontal starting position
$FF00D6 word Mario vertical starting position
$FF00D8 word Luigi vertical starting position
$FF00DA word Mario enemy index
$FF00DC word Luigi enemy index
$FF00DE word Mario coin count
$FF00E0 word Luigi coin count
Other game variables
Offset Size Description
$FF00E2 word Game over flag
$FF00E4 word Player walk speed
$FF00E6 word Jump button held duration
$FF00E8 word Residual variable. it's no use!
$FF00EA word Same thing here!
Memory buffers
Offset Size Description
$FF1000 0x80 Buffer for palette fade in effect
$FF1080 0x80 Buffer for palette fade out effect
$FF1100 0x780 Buffer for level tile data
$FF1880 6*word Buffer for current player's score digits
$FF188C 6*word Buffer for mario's score digits
$FF1898 6*word Buffer for luigi's score digits
Sound driver
Offset Size Description
$FF6C00 0x400 Memory region used by the sound driver (please help decompiling!!!)
Address    Size    Description
------     ----    -----------
; memory region for sprites enemies etc
E07005        1    Current sprite frame used for pause animation
                   * See Notes for a full list of sprite frame IDs
E07140        2    X position of player in relation to the screen
E07142        2    Y position of player
E07149        1    Triggers jump if set to 02
E07158        1    Fireballs flag
E0715A        1    Invulnerability flag
E0715C        1    Star flag
E072C0        2    Sprite #1 X position
E072C2        2    Sprite #1 Y position
E072C5        2    Sprite #1 current sprite frame
E072C9        2    Sprite #1 current sprite bank
                   * See Notes for a full list of sprite IDs (and their banks)
E072D1        2    Sprite #1 current sprite ID
E072E0        2    Sprite #2 X position
E072E2        2    Sprite #2 Y position
E072E5        2    Sprite #2 current sprite frame
E072E9        2    Sprite #2 current sprite bank
E072F1        2    Sprite #2 current sprite ID
E07300        2    Sprite #3 X position
E07302        2    Sprite #3 Y position
E07305        2    Sprite #3 current sprite frame
E07309        2    Sprite #3 current sprite bank
E07311        2    Sprite #3 current sprite ID
E07320        2    Sprite #4 X position
E07322        2    Sprite #4 Y position
E07325        2    Sprite #4 current sprite frame
E07329        2    Sprite #4 current sprite bank
E07331        2    Sprite #4 current sprite ID
E07340        2    Sprite #5 X position
E07342        2    Sprite #5 Y position
E07345        2    Sprite #5 current sprite frame
E07349        2    Sprite #5 current sprite bank
E07351        2    Sprite #5 current sprite ID
E07360        2    Sprite #6 X position
E07362        2    Sprite #6 Y position
E07365        2    Sprite #6 current sprite frame
E07369        2    Sprite #6 current sprite bank
E07371        2    Sprite #6 current sprite ID
E07380        2    Sprite #7 X position
E07382        2    Sprite #7 Y position
E07385        2    Sprite #7 current sprite frame
E07389        2    Sprite #7 current sprite bank
E07391        2    Sprite #7 current sprite ID
E073A0        2    Sprite #8 X position
E073A2        2    Sprite #8 Y position
E073A5        2    Sprite #8 current sprite frame
E073A9        2    Sprite #8 current sprite bank
E073B1        2    Sprite #8 current sprite ID
E073C0        2    Sprite #9 X position
E073C2        2    Sprite #9 Y position
E073C5        2    Sprite #9 current sprite frame
E073C9        2    Sprite #9 current sprite bank
E073D1        2    Sprite #9 current sprite ID
E073E0        2    Sprite #10 X position
E073E2        2    Sprite #10 Y position
E073E5        2    Sprite #10 current sprite frame
E072C9        2    Sprite #10 current sprite bank
E073F1        2    Sprite #10 current sprite ID
E07400        2    Sprite #11 X position
E07402        2    Sprite #11 Y position
E07405        2    Sprite #11 current sprite frame
E072C9        2    Sprite #11 current sprite bank
E07411        2    Sprite #11 current sprite ID
E07420        2    Sprite #12 X position
E07422        2    Sprite #12 Y position
E07425        2    Sprite #12 current sprite frame
E072C9        2    Sprite #12 current sprite bank
E07431        2    Sprite #12 current sprite ID
E07440        2    Sprite #13 X position
E07442        2    Sprite #13 Y position
E07445        2    Sprite #13 current sprite frame
E072C9        2    Sprite #13 current sprite bank
E07451        2    Sprite #13 current sprite ID
E07460        2    Sprite #14 X position
E07462        2    Sprite #14 Y position
E07465        2    Sprite #14 current sprite frame
E072C9        2    Sprite #14 current sprite bank
E07471        2    Sprite #14 current sprite ID
E07480        2    Sprite #15 X position
E07482        2    Sprite #15 Y position
E07485        2    Sprite #15 current sprite frame
E072C9        2    Sprite #15 current sprite bank
E07491        2    Sprite #15 current sprite ID
E074A0        2    Sprite #16 X position
E074A2        2    Sprite #16 Y position
E074A5        2    Sprite #16 current sprite frame
E072C9        2    Sprite #16 current sprite bank
E074B1        2    Sprite #16 current sprite ID
E074C0        2    Sprite #17 X position
E074C2        2    Sprite #17 Y position
E074C5        2    Sprite #17 current sprite frame
E072C9        2    Sprite #17 current sprite bank
E074D1        2    Sprite #17 current sprite ID
E074E0        2    Sprite #18 X position
E074E2        2    Sprite #18 Y position
E074E5        2    Sprite #18 current sprite frame
E072C9        2    Sprite #18 current sprite bank
E074F1        2    Sprite #18 current sprite ID
E07500        2    Sprite #19 X position
E07502        2    Sprite #19 Y position
E07505        2    Sprite #19 current sprite frame
E072C9        2    Sprite #19 current sprite bank
E07511        2    Sprite #19 current sprite ID
E07520        2    Sprite #20 X position
E07522        2    Sprite #20 Y position
E07525        2    Sprite #20 current sprite frame
E072C9        2    Sprite #20 current sprite bank
E07531        2    Sprite #20 current sprite ID
E07540        2    Sprite #21 X position
E07542        2    Sprite #21 Y position
E07545        2    Sprite #21 current sprite frame
E072C9        2    Sprite #21 current sprite bank
E07551        2    Sprite #21 current sprite ID
E07560        2    Sprite #22 X position
E07562        2    Sprite #22 Y position
E07565        2    Sprite #22 current sprite frame
E072C9        2    Sprite #22 current sprite bank
E07571        2    Sprite #22 current sprite ID
E07580        2    Sprite #23 X position
E07582        2    Sprite #23 Y position
E07585        2    Sprite #23 current sprite frame
E072C9        2    Sprite #23 current sprite bank
E07591        2    Sprite #23 current sprite ID
E075A0        2    Sprite #24 X position
E075A2        2    Sprite #24 Y position
E075A5        2    Sprite #24 current sprite frame
E072C9        2    Sprite #24 current sprite bank
E075B1        2    Sprite #24 current sprite ID
E075C0        2    Sprite #25 X position
E075C2        2    Sprite #25 Y position
E075C5        2    Sprite #25 current sprite frame
E072C9        2    Sprite #25 current sprite bank
E075D1        2    Sprite #25 current sprite ID
E075E0        2    Sprite #26 X position
E075E2        2    Sprite #26 Y position
E075E5        2    Sprite #26 current sprite frame
E072C9        2    Sprite #26 current sprite bank
E075F1        2    Sprite #26 current sprite ID
E07600        2    Sprite #27 X position
E07602        2    Sprite #27 Y position
E07605        2    Sprite #27 current sprite frame
E072C9        2    Sprite #27 current sprite bank
E07611        2    Sprite #27 current sprite ID
E07620        2    Sprite #28 X position
E07622        2    Sprite #28 Y position
E07625        2    Sprite #28 current sprite frame
E072C9        2    Sprite #28 current sprite bank
E07631        2    Sprite #28 current sprite ID
E07640        2    Sprite #29 X position
E07642        2    Sprite #29 Y position
E07645        2    Sprite #29 current sprite frame
E072C9        2    Sprite #29 current sprite bank
E07651        2    Sprite #29 current sprite ID

External links