1989 · Domark

Licence To Kill: discoveries

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/licence-to-kill with me to Gold.

An extra life the panel does not show, a reset screen switched off by one byte, a tune nobody hears, and code nothing calls.

01 · A bug in your favour

Three lives, four attempts

The panel starts at LIVES 03, but the game does not end when it reaches 00. Bond plays on with none left, and only the next loss ends the game.

A new game sets the lives to 3 ($19F6). Each loss takes one away, and every routine that does so then tests whether the count has gone below zero, not whether it has reached zero: $14FB on level 1, $3997 on level 2, $F6A9 on level 5, and the loops of levels 3 and 4 the same way. In the emulator, a game with one life left and its energy emptied restarted the level with LIVES 00 in the panel; with none left, the next loss went to the end of the game.4 The panel draws a negative count as 0 (draw_score), but the game never shows one.

02 · A limit

Too tall to fly over

On level 1 the helicopter crashes into any character whose height, times 4, reaches its throttle (crashes). The throttle stops at 47, and two characters in level 1's table of heights have height 12, which needs 48 (heights_a). However high Bond flies, those two always crash him, so the only way past them is round.

03 · Determinism

The same dice after every lost life

The game's random numbers come from a 32-bit shift register (random). When a level starts again after a lost life, restart_level puts the same four bytes back into it every time, $DC275C0D, so the random choices that follow, such as which enemy fires and where level 4's bags float, start from the same point on every attempt.

04 · Cut content

"BOND WILL RETURN."

The game carries a screen for the reset button: black, with "BOND WILL RETURN." in light grey at the top. In this copy one wrong byte means it never appears.

A C64 that is reset looks at $8004 for the five bytes C3 C2 CD 38 30, "CBM80", which mark a cartridge, and if it finds them it jumps to the address at $8002 instead of starting BASIC. The game puts such a header at reset_header, pointing at its own handler, reset_bond_will_return, which sets the screen up again and prints str_bond_will_return, then waits for ever. In this disk's copy the first byte of the signature is $C0, so the reset never finds it. The other build of the game, on a second disk (see the copy studied), has $C3 there, and should show the message.

The handler has a slip of its own: it loads $FF into X to reset the stack, then uses TSX, which copies the stack pointer into X, where TXS, which copies X into the stack pointer, was meant. The stack is left as it was, which does no harm to a routine that never returns.

05 · Unheard music

A fifth tune

The tune table at tunes has five entries, and the game starts tunes from seven places, each with tune 0, 1, 2 or 3. Tune 4 has its own tempo and three tracks of its own, and plays and repeats when started, but nothing starts it. You can hear it on the Music tab. Ten of the 24 sound effects are not played by any call in the game either: numbers 5, 9, 11, 12, 13, 16, 19, 20, 21, and 22.

06 · Leftovers

Code that nothing calls

A dozen routines sit in the program with no call, jump, or vector that reaches them. Most do a job that other code does in the finished game, which suggests they were replaced.

RoutineWhat it would do
unused_fill_screensFill both play screens with one value, the job clear_screens does
unused_copy_screenCopy the screen at $4400 to $4000
unused_irq_panelA raster interrupt for the panel that nothing installs
unused_copy_pictureCopy a picture from the screen at $0400 to both play screens
unused_hit_lifeTake a life for every enemy shot on level 1: the jump just before it passes over it, so a shot costs only energy
unused_plane_stepStep level 3's plane through a table of speeds
unused_plane_flagsSet two of level 3's plane settings; it writes one byte before each of the operands it names, as if written for a slightly different layout of the code
unused_tanker_loopGo through the five tankers and do nothing: its branch leads to the next instruction either way
unused_pick_soundPlay the last of a list of requested sounds; the list at sound_requests is empty
unused_aim_tailAn alternative ending for the enemies' aiming routine
unused_buzz_pitch, unused_buzz_offSet the pitch of the sound driver's buzz on voice 2, and stop it: the buzz plays at the pitch it was loaded with
$8131An older rule for level 4's energy, which stopped the scroll when it reached exactly 0; the jump at $812E passes over it
unused_clear_bit7Clear a flag in an enemy slot

One routine that does run has a branch that never does. draw_explosions tests a flag at $0393 and draws the helicopter instead of the small explosions when it is clear; the game sets the flag to 1 and never clears it.

07 · Unused map data

Rows nobody flies over

Level 2's map stores six rows after its opening picture that are never read (map_l2), and level 5's two more ($BF8F). Level 3 looks up its map sections in a table of seven addresses (l3_section_addr): six of them name the same rows, and the seventh, $B885, is one no section number reaches. Level 5's character set reaches into the start of the level's tiles, so its upper characters are tile numbers that the copy brings along and the screen never shows (charset_l5).

08 · Credits

"BY QUIXEL"

Among the title's strings, beside "COPYRIGHT 1989 DOMARK", is the line "BY QUIXEL", the name of the team that made the C64 version. The credits that follow name the programmers of every version: Chris West, Paul Margrave, Bozz Boswell, and Marcus Goodey.