Actions

SCHG

Sonic Jam 6/RAM Editing

From Sonic Retro

SCHG: Sonic Jam 6
Main Article
ROM Editing
Editing ROM
Values
Functions
Title Screen
Levels
Bonus Level
Sound Driver
Play BGM
Play SFX
RAM Editing
Editing RAM
Art Editing
Editing Art
Title Screen
Title Screen Palette
Levels
Level Palettes
Value Reference
Value Reference
Level Map Numbers
SFX Numbers

Values

Offset Description Note
RAM:0096 Number of seconds left (unsigned short).
RAM:001a Buttons pressed on joypad (BYTE). Bits: 76543210 -> SACBRLDU
RAM:001c Buttons pressed on joypad (bits set only when button is pressed for the first time after being released) (BYTE). Bits: 76543210 -> SACBRLDU
RAM:0042 Number of current level map (WORD). See Level Map Numbers
RAM:00a4 Water level flag (0x0000 = disabled, 0x0001 = enabled).

If this is enabled, you swim, otherwise you don't (WORD).

RAM:008a '???' level flag (WORD). If this value is 0x0002 it is a continuing level, when you go into a pipe, the original level is continued and this level isn't treated as a seperate level.
RAM:0092 Number of coins (WORD).
RAM:0094 Number of lives (WORD).
RAM:00ba Number of lives "mirror" (WORD). This exists likely due to sloppy programming. At a place it's set to the number of lives you get when you start a new game, and then copied to 0xff0094 (the usual lives address). Other places in the game only copy from this to '0094 or the other way around. It is not updated when lives become 0, as the game won't run the code to copy '0094 back to '00ba then. All the checks on lives take place on '0094, so you don't need to care about this one.
RAM:7140 Character sprite X position on screen (WORD) (in genesis format, 0 = 0x80).
RAM:7142 Character sprite Y position on screen (WORD) (in genesis format, 0 = 0x80).