Sega Master System / Mark III / Game Gear
Sega8bit & SMS Power! 2013 Event - 10th August 7 weeks and 1 day from now
C004 : Current sound to be played (range is 80-FF) C005 : First slot for a requested sound to be played C006 : Second slot for a requested sound to be played C007 : Third slot for a requested sound to be played C008 : Sound related C106 : Status of reset button in bit 4. (1= not pressed, 0= pressed) C108 : RNG temporary value (16 bits) C10A : Last byte generated during RNG update ($069E) C10B : Territory flag (affects # of continues given) C10E : Copy of value written to banking register $FFFF C110 : Demo play loop count (0=J.J. #1, J.J. #2, Apple, Champ) C11E : Pending item from scene display list ($FF=continue current one) C11F : Current item from scene display list C112 : Number of continues remaining C127 : Current character (0= J.J., 1= Champ, 2= Apple) C129 : Number of blue ID cards C12A : Number of red ID cards C12B : Number of floppy disks C14x : Stats for currently selected character (16 bytes) C15x : Stats for J.J. C16x : Stats for Champ C17x : Stats for Apple C198 : Room position (+$08 per row, +$01 per column) Used relating to map display and secret messages. C1A1 : Pause flag C1A2 : When bit 7 is set, demo play is enabled. Pressing any key restarts the game. C1A8 : 1P input (current) C1A9 : 1P input (changed from last frame) C1AA : 2P input (current) C1AB : 2P input (changed from last frame) C1B6 : 16-bit down counter used to time duration of title screen and other scenes. C1BA : Pointer to input data used for demo play C1CD : Animation counter for doors opening. Set to $08 to force one open. C1CF : Computer type (0= normal, 1= main) C1F0 : Randomly generated password for "DOOR OPEN" command. (4 bytes) C26A : Infrared beam alarm is triggered when bit 2 is set. C280 : Password buffer, which you load when operating the computer. (4 bytes) C287 : Key which cursor is pointing to on computer screen. (0-A=symbols, B=backspace, C=enter, D=exit) C288 : Number of text message to print by routine @ $1629. C300 : Sprite attributes, 32 entries of 32 bytes C324 : Horizontal room position (0-7) C329 : Vertical room position (0-F) C700 : Copy of VDP sprite table C800 : Copy of name table #1 CF00 : Map of visited rooms (16x16 array, 00=not visited, 80=visited) D000 : Copy of name table #2 D800 : Copy of name table #3 DE00 : Text output buffer (*1)
Scene display list:
00 - J.J. shooting animation 01 - Title screen 02 - Demo play 03 - J.J. shooting animation 04 - Black screen 05 - Mission briefing 06 - Emi wishing you good luck 07 - Emi instructing you about the recovery device 08 - Computer screen 09 - Pause screen 0A - J.J. shooting animation 0B - Start of game immediately outside ship 0C - Main computer room 0D - Credits (but they don't start) 0E - Character stats, then credits roll 0F - J.J. shooting animation
1.) During gameplay this buffer stores a 16x6 array that describes room pieces in 16x32 pixel units:
'0' : Wall segment (such as those that flank the left/right sides of a room) '<' : Area that you can only crawl through '9' : Background ';' : Background with floor tile along bottom ':' : Background with shading along top
Other information such as the location of shock beams, infrared beams, barrels, and doors that can open are not stored in this array. It seems to relate to the tiles displayed and movability characters have when going through those areas.
The game maintains three name tables which are used to store the current room ($C800), an adjacent area ($D000, used for real-time scrolling between rooms/tunnels), and a work area that is typically loaded with a tunnel or room adjacent to your map position ($D800). Room data is compressed and loaded from ROM, tunnel sections are stored as raw name table data in ROM.
+0 : Character is 0=not available, 1=alive, 2=dead +1 : Maximum life, used to check when adding life after eating bread +3 : Current life +5 : Character level, plus one +6 : Zillion power level, plus one +7 : Character attribute index (0-3) +8 : Jump level, plus one +9 : Scope (zero= no scope, non-zero= have scope) +A : Damage rating.
The game reloads the current character data from the other three arrays when leaving the pause screen.
The level-up data table is stored at ROM offset $7CC8. It consists of eight entries (one for each level) of four bytes each, with this structure repeating three times for J.J., Champ, and Apple. The byte values are: Maximum life, Jump level, Attribute index, Damage rating.
The damage rating is subtracted from your life when you take damage. As you gain levels this value becomes smaller and smaller. If you set it to zero, you are invincible.
The character attribute index increases as you gain rank and seems to increase the speed and responsiveness of your character. Apple maxes out this attribute at level 4, J.J at level 8, and Champ can only attain the next-to-fastest index at level 6.
The character attribute table is at offset $7CA0. It is four groups of ten bytes. Within each group, the first byte corresponds to how quickly your running animation cycles.
At ROM offset $1704 is a table of four pointers:
$530B - List of messages for normal computer (Japanese, $2E total) $5369 - List of messages for main computer (Japanese, ?? total) $53A1 - List of messages for normal computer (English, $4A total) $53FF - List of messages for main computer (English, $1C total)
The list is a sequence of pointers, each one pointing to a string consisting of one word (VRAM write command), an inner loop count byte, an outer loop count byte, and then the text itself. The lists are not terminated.
The normal and main computers have different sets of messages, including ones from the developers about other games (Pit-Pot, Alex Kidd in Miracle World) and hidden item locations.
Text is encoded using RLE. When parsing the text:
For each byte X,
Text is mostly ASCII, but the punctuation is somewhat scrambled. Block text is achieved simply by encoding appropriate numbers of spaces to wrap to the next line. Line length is not stored in the same place as the text.
Researched by Charles MacDonald