1986 · Micro Power

Doctor Who and the Mines of Terror

This minisite was curated by unorig, air.

The time bonus drops only once every 21.8 minutes, and saving your game wipes it from memory the moment the save finishes.

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). The game never 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

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. Players do miss it: standing on the lift or the carrier sometimes leaves the Doctor behind, and a jump that lands him at the right height lets him board.9

Quirk

The code lock sets a flag the security gate never uses

Entering the code opens the wall in front of the PASS CARD, and it also 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 a gate. The code opens them only by letting the Doctor reach the PASS CARD (Solution).

Quirk

Drowning tells you THE DOCTOR REGENERATES AFTER GAME OVER

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

Code the game never runs

WhatWhereWhy it never runs
A prologue that clears a page of memory$4800-$484Cthe game starts at $484D, just after it
Sixteen bytes of codeorphan_fragment_2d40 $2D40the game never calls it

Open questions

What the code does not settle