BACKGROUND_HEADER
1x U8 Background fill pattern
1x U8 Flag indicating a grassy background
BLOCK_FILL_1x1_COMMAND
1x U8 Y coordinate
1x U8 X coordinate
1x U8 Width
1x U8 Height
1x U8 Pattern index
BLOCK_FILL_2x2_COMMAND
1x U8 Y coordinate
1x U8 X coordinate
1x U8 Width
1x U8 Height
1x U8 Base pattern index
LINEAR_COPY_COMMAND
1x U8 Y coordinate
1x U8 X coordinate
1x U8 Number of bytes to copy
1x U8 Source address index in table
BLOCK_COPY_COMMAND
1x U8 Y coordinate
1x U8 X coordinate
1x U16 Source address
Read a BACKGROUND_HEADER.
While the next byte is not equal to 0xFF or 0xFE:
Read a LINEAR_COPY_COMMAND.
If the next byte is equal to 0xFE:
Skip the next byte.
While the next byte is not equal to 0xFF:
Read a BLOCK_FILL_2x2_COMMAND.
Skip the next byte.
While the next byte is not equal to 0xFF:
Read a BLOCK_FILL_1x1_COMMAND.
Skip the next byte.
While the next byte is not equal to 0xFF:
Read a BLOCK_COPY_COMMAND.
End.
SPRITE_OBJECT
1x U8 Y coordinate
1x U8 X coordinate
1x U8 Type
NAMETABLE_OBJECT
1x U8 Y coordinate
1x U8 X coordinate
1x U8 Type
1x U8 Sub-type
While the next byte is not equal to 0xFF:
Read a SPRITE_OBJECT.
Skip the next byte.
While the next byte is not equal to 0xFF:
Read a NAMETABLE_OBJECT.
End.
Round | Level | Screen Table Address | Theme | Screen Table |
1-1 | 0x00 | 0x405C | 0 |
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x60, 0x00
|
1-2 | 0x01 | 0x4066 | 1 |
0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x61, 0x00
|
1-3 | 0x02 | 0x4070 | 2 |
0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x62, 0x00
|
1-4 | 0x03 | 0x407A | 3 |
0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x63, 0x00
|
1-5 | 0x04 | 0x4084 | 5 |
0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x65, 0x00
|
1-6 | 0x05 | 0x408E | 4 |
0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x64, 0x00
|
2-1 | 0x06 | 0x4098 | 0 |
0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x60, 0x00
|
2-2 | 0x07 | 0x40A2 | 1 |
0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x61, 0x66, 0x61, 0x00
|
2-3 | 0x08 | 0x40AE | 2 |
0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2A, 0x2B, 0x62, 0x00
|
2-4 | 0x09 | 0x40B8 | 3 |
0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x63, 0x00
|
2-5 | 0x0A | 0x40C2 | 5 |
0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0x5B, 0x65, 0x00
|
2-6 | 0x0B | 0x40CC | 4 |
0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, 0x64, 0x00
|
3-1 | 0x0C | 0x40D6 | 0 |
0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x60, 0x00
|
3-2 | 0x0D | 0x40E0 | 1 |
0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x61, 0xFF
|
3-3 | 0x0E | 0x40EA | 2 |
0x28, 0x29, 0x2A, 0x2B, 0x2C, 0x2D, 0x2E, 0x2F, 0x62, 0x67, 0x62, 0xFF
|
3-4 | 0x0F | 0x40F6 | 3 |
0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x63, 0x00
|
3-5 | 0x10 | 0x4100 | 5 |
0x58, 0x59, 0x5A, 0x5B, 0x5C, 0x5D, 0x5E, 0x5F, 0x65, 0x00
|
3-6 | 0x11 | 0x410A | 4 |
0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, 0x64, 0xFF
|
Address | Location | Purpose |
0x4038 | ROM | Array of screen table addresses, one for each level. |
0x4114 | ROM | Array of screen data addresses, one for each screen. |
0x4222 | ROM | Start of screen data. |
0x5700 | ROM | Sprite patterns for Chibi's animation when paused. |
0x6180 | ROM | Tile patterns for theme index < 4. |
0x6980 | ROM | Tile patterns for theme index >= 4. |
0x7180 | ROM | Tile colours for theme index < 4. |
0x7980 | ROM | Tile colours for theme index >= 4. |
0x8082 | ROM | Cheat-code conditions are checked here. |
0x81B2 | ROM | Code which resets in-game variables. |
0x840D | ROM | Array of 1-byte theme indices, one for each level. |
0x85D5 | ROM | Here the number of lives is decremented after losing a life. |
0x85F2 | ROM | Code which displays the GAME OVER message. |
0x8A5E | ROM | Tileset-loading routine. |
0x8B57 | ROM | Routine which fills in the HISCORE line in the nametable. |
0x8B63 | ROM | Routine which fills in the SCORE line in the nametable. |
0x8FBB | ROM | Routine which runs the whole CASIO logo animation. |
0x94D3 | ROM | Routine which handles transition to the next screen or the end of a level. |
0x99F7 | ROM | Loop body which calls LDIRVM to write one new nametable row from a 64x32-tile buffer, to perform the screen transition animation. |
0x9B15 | ROM | Main level screen loading routine. |
0x9C68 | ROM | Routine which calculates a nametable address from given X, Y coordinates. |
0x9C80 | ROM | Level data address calculation routine. |
0x9CCB | ROM | Code which decodes level object data. |
0xAD85 | ROM | Table of linear copy command source addresses. |
0xB000 | ROM | Array of object data addresses, one for each screen. |
0xE00B | RAM | Number of lives remaining. |
0xE010 | RAM | Frame counter. |
0xE023 | RAM | 0 -> Chibi is vulnerable, 1 -> Chibi is invulnerable. |
0xE039 | RAM | 0 -> No continues, 1 -> One continue, 2 -> Infinite continues. |
0xE03D | RAM | Current level index. |
0xE03E | RAM | Page index within the current level. |
0xE03F | RAM | Index of the current screen. |
0xE04A | RAM | Theme index of the current level. |
0xE700 | RAM | Shadow nametable in RAM, used for collision detection. |