1986 · Micro Power

Doctor Who and the Mines of Terror

This minisite was contributed by air, unorig. It’s currently claimed by unorig who is editing it to reach a Gold tier standard.

The whole mine, 4,096 by 1,792 pixels, drawn from the map the game keeps under its operating system, with every object, danger, and restart point on it.

The mine

One map, seven kilobytes

The game never loads a level. The whole mine is one map, and the screen is a window onto it that scrolls wherever the Doctor goes. Drag across the map to move the magnifier. Choose an object to zoom in on it, then press Where it is used to step through the places it works. The dangers have a list of their own, and Gameplay says what each does. Switch on the restart points to see where the Doctor comes back after losing a regeneration.

Zoom

Yellow: the objects where a new game puts them, drawn in the magnifier as their own sprites from their starting frames ($1D30) and colours ($1850) (positions $1B70/$1BC0, $1C10/$1C60; names from $1770). Green: where an object does something, from the code that checks the Doctor's position. Red: blocks that kill or start the air running out. Drag the magnifier over a mark to read its label, or click a mark on the map to select it.

Every block drawn from the map at map_e000, the block shapes at $3000, the play-area characters at $4000, and each character's colour from $2F00. The orange cross is where the Doctor starts. The mine has seven zones, and each zone swaps in one of three sets of shapes and colours for sixteen characters (zone_classify, $AA3D; zone_graphics, $ABCF). This picture draws every zone with its own set.

Where the objects work

Most objects work only at certain points. When the Doctor uses the one he holds (F5), the game compares his position with that object's table of points (use_item_update, $BACC): the dig sites at $BC1C, the bolts at $BB94, and the escape pod's launch points at $BCDA. Choose an object above and press Where it is used to step through its points. With empty hands, F5 works the code lock's clue panel and its buttons (Solution). What every object is for is on the Gameplay tab.

The map fills $E000-$FBFF, the memory the Commodore's operating system (the KERNAL ROM) normally occupies. The game switches the ROMs out as it starts ($01 = $35), which leaves the RAM underneath free. The map holds 56 rows of 128 blocks, one byte a block. A block is four by four characters, sixteen bytes at $3000 + 16 × its number, so 256 block shapes build the whole mine. Row r starts at $FB80 − 128 × r. Row 0 is the bottom: the game measures heights upward from the floor of the mine.

Colour RAM, the Commodore's separate memory for the colour of each screen cell, is never stored for the map. As the game draws each new row or column onto the screen, it looks up the colour of every character in a 256-byte table (colour_from_chars, $8EB8). So a character is always the same colour, wherever it is.

Scrolling

Two screens, drawn in turn

The game keeps two copies of the play screen, at $7800 and $7C00. While one is shown, the game builds the next position of the mine in the other, spread over three frames (coarse_scroll_step, $8C32), and then swaps them. Between those steps the video chip's fine scroll moves the picture a pixel at a time, so the view glides in all eight directions.

Seven zones

The mine is split into seven zones by the Doctor's position, checked every eighth frame (zone_classify, $AA3D). Entering a zone puts the creatures of other zones to sleep, wakes that zone's own, and swaps in its shapes for sixteen characters (zone_graphics, $ABCF).

Restart points

Nine places to come back to

The mine has nine restart points, stored as four tables of nine bytes at $9059-$907C. When the Doctor comes close to one, that point becomes the current one (check_restart_points, $907D). After he loses a regeneration, the game puts him back at the current point.