The cartridge

titleRastan Saga, Taito, 1988
machineMSX2 (V9938), SCREEN 5
size262,144 bytes: 32 banks of 8 KB
mapperASCII8
soundPSG, three channels
sha25603fa40fa0fa58f252ad9cd9e78b2bc01a0127b5509fe1babdb5a9443ec1f705e

The header is AB with INIT at 0x4011. Byte 0x4010 is the switch for the test cheat (see Findings).

The mapper

Four 8 KB windows, each with its register: 0x67F8, 0x6FF8, 0x77F8 and 0x7FF8. There are 54 writes with a fixed bank and 12 with a variable one (the maps, which come in the stage record), and all of them follow the rule: each bank always goes to the same window (tools/paginas.py mide). The only exception is bank 0, which p00:47E0 puts back at 0xA000 after drawing a block.

windowbanks
0x40000
0x60001, 3, 5, 6, 8, 11, 14
0x80002, 4, 7, 9, 12, 15, 16, 18, 20, 22, 24, 26, 28, 30
0xA00010, 13, 17, 19, 21, 23, 25, 27, 29, 31

What is in each bank

bankcodewhat it holds
05,966 Bstart-up, the interrupt, the tasks, the game loop, screens, sprites; the title
11,128 Bthe sound (player, music and effects) and loading the tiles into VRAM
2—more scores, the 24 stage records, their screens and their palettes
37,536 Bthe actors: how each type moves (task 3) and the hand-off to the bosses; their poses
42,769 Bthe five bosses, round 7 and the ending
51,340 Bthe DA20 things: scenery, doors, rocks, drops
66,722 BRastan: the controls, his three layers, the life bar and the status bar
74,359 Bwhat Rastan picks up, the points, the collisions and the hits
8-15—sprite patterns (and in 8, the bosses' definitions)
16-25—the tiles, which go to VRAM whole
26—the sprite definitions of Rastan and of types 0x18 onwards
27—the stages' block tables
28-31—the maps; 30 also holds the definitions of types 0x01-0x17

VRAM

The screen on display is page 0. The tiles (banks 0x10-0x19) are copied at start-up to 0xC000 and to pages 2 and 3 (p01:6077). Sprites are in mode 2: colours at 0x8400, attributes at 0x8600 and patterns at 0x8800; each pattern is copied from the ROM when it changes (p00:4534).

The RAM that matters

addresswhat
D5E5the stage
D5F0 / D5F1the screen's column and row
D8FC / D8FDRastan's x and y
D8F4 / D8F5his pose and what he carries
D910game bits: stage over, boss, no life lost
D17Dgame bits: end, demo
D933the screen's 6 actors, 38 bytes each
DA20the 8 enemies, 38 bytes each
D413the 32 sprite records, 11 bytes
D08Ethe four sound voices, 25 bytes