1987 · Electric Dreams Software

Fire Trap

This minisite was contributed by unorig. It’s agent-generated and needs a human editor. Clone https://github.com/gamesexplained/gamesexplained and follow kit/START.md to curate games/c64/fire-trap with me to Gold.

Sixteen stages from four maps. The building is ten columns of eighty rows, each cell a block of four by four characters.

The maps

Four maps, two tile sets, four colours

The picture is drawn from the game's own bytes: the map, then the tile block and character set the stage uses, then the colour the stage sets for the building's shaded face.

Stage 1 starts at the bottom of the picture and the finish is at the top. The picture is the building as the map describes it, before the game puts window fires, people, and creatures into the windows.

Each stage maps to the data as follows (load_stage_map, $15FB, and the colour step at $14FD). Let s be the stage number minus one. The map is the one at $8E00 plus s AND 3 times 800. The tile set is bit 1 of s. The colour is entry (s AND 12) / 4 + s, AND 3, of the table at $C0BC.

StageMapTile setBuilding colourStageMapTile setBuilding colour
111light blue911orange
221light green1021light grey
332orange1132light blue
442light grey1242light green
511light green1311light grey
621orange1421light blue
732light grey1532light green
842light blue1642orange

The attract demonstration counts the stages 1 to 16 and starts again at 1 (run_demo_stage, $10AA). In a real game the stage number is masked with $0F at $13D4, so it counts 1 to 15 and then 0; the code sets stage 0 up like any other.

The format

A cell is one byte, and a byte picks a block

A map is 800 bytes, ten columns by eighty rows, copied to $0B00 when the stage starts. A cell's value picks one of 73 tile blocks of 32 bytes, 16 character codes followed by 16 colours, laid out four characters across and four down ($E000 for tile set 1, $E920 for set 2). Each character is eight bytes of the stage's character set ($A6E0 or $AEE0), copied to $4000 by set_tile_source ($CE3A).

The game also keeps a table of 75 collision classes, from 0 to 4, beside each tile set ($C667 and $C6B2, copied to $C61C). Movement looks a cell's class up with map_cell_type ($19EB). Class 0 covers the ordinary windows and class 1 covers the sky, the neighbouring buildings, the ground, and a few solid panels such as the signs. The other classes are used by few cells, and their meanings have not been traced.