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.

A time bonus that barely moves, a save that ends the game, tests that want one exact pixel, leftovers, and questions the code leaves open.

Bug

Bug: the time bonus goes down once every 21.8 minutes

The game keeps a time counter that starts at 10,800 and is added to the score when the Doctor escapes. The counter was meant to fall steadily as he plays. Instead, the counter falls by one every 65,536 frames. Step the frame counter to see when the time counter moves.

The test at $80E8-$810C: the frame counter's three bytes, $53-$55, and the time counter, $1B-$1D. A PAL Commodore shows 50 frames a second.

Once a frame, wait_frame_and_update_sprites ($80DA) adds one to a three-byte frame counter. The code after it tests AND #$3F, which is true once every 64 frames, and then takes one off the time counter in decimal. But two branches before that test skip it unless the counter's two lower bytes have both just rolled over to zero, which happens once every 65,536 frames. By then the AND #$3F test always passes.

The time counter starts at 10,800 on the first game ($4996) and at 10,805 on every game after it ($9408). No routine prints the counter. The game adds the counter to the score at the end ($91BC), unless the Doctor is low in the mine, so a player who escapes within 21 minutes gets all of it.

Quirk

Saving the game ends it

The save menu writes the game to tape or disc. Then it drops to the BASIC prompt, and the game is gone.

The save routine (save_menu, $94FF) copies the game's working memory, the table of objects, and the status bar into one block at $7800-$7D7F, marks it with $FF, and saves it as DRWHO. To use the Commodore's own save routine, save_menu switches the ROMs back in. When the save is done, save_menu jumps through the address at $A000. With the ROMs in, that address is BASIC's cold start, which resets BASIC, so the player is back at READY.

The game never loads a saved file itself: the disk's boot program does. Before the game loads, the boot program asks LOAD A SAVED POSITION (Y/N)? and clears $7800, so a game started without a save starts fresh. Answering Y loads DRWHO into $7800-$7D7F, where none of the game's three parts lands, and the game then loads around it.10 As the game starts, it looks at $7800, and if the marker is there it restores everything from the block and skips the TARDIS landing ($49C6, $745C).

Quirk

The save keys work in one place only

D, CTRL+D, and L all ask for the save menu, by putting a negative number in the game's event byte, $E8. The routine that updates the Doctor clears that byte again every pass unless he is standing on character $23 ($C902-$C909). Pressed beside the TARDIS, D does nothing. Where in the mine the Doctor can stand on character $23 is not known.

Quirk

Tests that want one exact pixel

The carrier takes the Doctor aboard only when his height is exactly $0450 ($A395). The lift takes him only when he is exactly eight pixels from its floor ($A294). One pixel either way and he stays where he is. Both look like tests where the programmer meant a range. Whether a player can arrive at the wrong height, and miss the ride, is not known.

Quirk

The code lock sets a flag that changes nothing

Entering the code sets the flag at $4E ($BF59). The routine that decides whether character $A0, the security gate, can be walked through tests that flag, but the PASS CARD test straight after it overwrites the result every time ($BB05-$BB25). So the flag never opens the gate, and only the PASS CARD does.

Quirk

A death message nothing prints, and GAME OVER as a cause

The game's messages include EXPOSURE TO RADIATION, but the table of causes of death ($90EF) has no entry that points to it, so it is never shown.

One cause points to the wrong message. When the rising level reaches the Doctor ($C0C2), the table sends the game to GAME OVER instead of a cause. A Doctor with lives left would read THE DOCTOR REGENERATES AFTER GAME OVER and carry on.

Leftovers

What the loader and older builds left behind

WhatWhereWhy it never runs
A loader routine that printed PLEASE WAIT -- STILL LOADING and started the game$7F00-$7F52the unpacker starts the game itself; the routine is overwritten by the second play screen
The release's loading picture$0400overwritten by the status bar at start-up
A prologue that clears a page of memory$4800-$484Cthe game starts at $484D, just after it
Sixteen bytes of codeorphan_fragment_2d40 $2D40nothing calls it
A copy of the shape of the operating system's jump tableloader_leftover_ff82 $FF82the game switches the ROM out and never jumps there

Open questions

What the code does not settle