1985 · Domark

A View to a Kill: the source

This minisite was contributed by air, 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/a-view-to-a-kill with me to Gold.

Every routine, table and variable the game uses, with the names and descriptions given to them. Click an operand to follow it; the counter beside a label lists what refers to it. The reference below the fold is rendered from the game's facts file.

This game is in 5 parts, and the same addresses hold something else in each. Each part has a listing of its own.

Technical reference: memory map, timing, tables, cheats

City Hall

File 3 of the copy studied. Every fact names the routine or table it comes from, in this part's listing.

Memory

VIC bank 0, screen $0400, character set $3800; $01 = $36 in play. The only interrupt is the KERNAL's, through $0314 = $4022 (raster_irq, five bands). CIA 1's timer A is stopped at $7000.

RangeWhat
$1000-$10DCcode_prompt, read_code and the code "CCPHJ" at $10D8
$1300-$13FFmission_complete and its text at $1334
$1800-$19FFmemo_page and memo_text ($1837)
$2000-$34FFsprites: Bond, Stacey, the gauge figures (built into $3400-$34FF)
$4000-$9FFFthe code, the room records ($4222), furniture bitmaps ($49E0-$57EF), the items ($63D0), the screen and colour images ($8D20, $9108)
$A000-$AA10pristine copies of the tables a new game restores
$C640-$C7B5the music player, the same bytes as the intro's
$E000-$E965the tune, under the KERNAL

Starting and ending

The building

Items and words

Fire, gauges and clock

Shared with the other parts

The music player ($C621-$C7FE) is the intro's, byte for byte, and the tune is the intro's too. read_joystick ($4700) is the mine's $17A0, tick_clock is Paris's $4170, and the "OK" sound ($6B50) is the mine's $3B7D.

Leftovers

Open

The whole game

Current truth for this game. The workflow lives in kit/skills/; how this understanding developed lives in agent-history.md. Every fact names the routine or table it comes from. Unless marked live, a fact comes from reading the code in the snapshots named in orientation.md.

The game is five programs, and each has its own facts, listing and symbols under parts/<id>/: parts/intro/facts.md, parts/paris/facts.md, parts/city-hall/facts.md, parts/mine/facts.md, parts/finale/facts.md. An address is always an address in the part named with it. This file holds what spans the parts.

Build

Five programs, loaded one at a time from a menu, each unpacked over the whole of memory and started at its own entry (orientation.md):

PartEntryInterrupt in playScreenSound
intro$8020$CC00bitmap, banks 1 and 2the Bond theme, speech
Paris$43B0, then $5A00$5026$0400the theme, effects, speech
City Hall$1000$4022$0400the intro's tune, effects
mine$5660$1022$4000Paris's tune, effects
finale$8000the KERNAL'sbitmap $2000, $6000none

Nothing is loaded once a part runs, and no part loads the next: the player goes back to the menu for each.

The codes

The three later parts start at a KERNAL "PLEASE ENTER CODE" prompt with the same routine (read_code: City Hall $1088, mine $5707, finale $804C): five characters through CHRIN, compared with a fixed string. A match stores 1 in $1BA0; RETURN before five characters stores 0 and plays on without the code (the finale goes back to its prompt instead); a wrong code is read again, with no limit on tries.

Given byWhere it is shownCodeChecked by
Paris, on a catchthe telex, Paris $8140CCPHJCity Hall $10D8
City Hall, on escapemission_complete, City Hall $1334DB4CTmine $5757
the mine, on defusingmission_complete, mine $0AFEILVCTfinale $809C
  • Every code is fixed text. No part computes one from play: there is no score, no time or result in them (read in each part's end routine).
  • $1BA0 is the same address in all three parts, and a part reads it once, at its end:
  • City Hall ($7096): with the code, reaching room 76 with Stacey shows DB4CT; without it the game starts again ($8600).
  • mine ($25F2): with the code, the right bomb digits show ILVCT; without it the bomb goes off, whatever the digits (game_over, $25D0).
  • finale: written, never read. The ending plays only after ILVCT.
  • Live, 30 September 2026: CCPHJ, DB4CT and ILVCT were each accepted at their prompts. City Hall's end with and without CCPHJ, and the mine's with and without DB4CT, behaved as above (parts/city-hall/facts.md, parts/mine/facts.md). The finale compared only five characters: ILVCTX was accepted.
  • So a part can be played from the menu without its code, but only Paris gives a code without one: City Hall and the mine can be finished only by a player who typed the code that came before.

Code the parts share

Bytes identical at the same addresses, compared in the unpacked images:

WhatWhere
the three-voice music driverintro and City Hall $C621-$C7FE
the Bond theme's notesintro $E000, City Hall $E000 (and intro $8500, the copy it moves there)
the second tune's notesParis and mine $E000-$FFFF
read_joystickCity Hall $4700, mine $17A0
tick_clockParis $4170, City Hall $6E40
the "OK" soundCity Hall $6B50, mine $3B7D
read_codeCity Hall $1088, mine $5707, finale $804C, apart from the addresses they name
mission_complete and its text with ILVCTmine $0A00-$0B04, and the same bytes in City Hall, where nothing calls them

All four playable parts read the joystick in port 2 only ($DC00) and stop CIA 1's timer A, so the KERNAL never scans the keyboard during play; the keyboard is used only at the code prompts.

Layers of the copy studied

Each part carries leftovers of earlier work on the game, none of which runs:

  • intro: a crack's menu and title ("THE DYNAMIC-DUO PRESENTS"), $8020 onwards, overwritten by a 14-byte patch (parts/intro/facts.md).
  • Paris: an earlier crack's BASIC line and depacker at $0800.
  • City Hall: an older code prompt (code "QRS21", $967B), an older end screen ("WEBL DONE 007 YOUR CODE IS 111122", $7E5A), and the mine's end screen at $0A00.
  • mine: stretches that match City Hall at the same addresses ($0B04-$0FFF).
  • finale: memory the part's packer never writes, holding bytes that match Paris's code in part.

Whether the code prompts and end screens are the original game's or the crackers' is open. For the crackers: the older prompt and end screen left in City Hall, and the mine's prompt placed in character-set glyphs the mine's tiles do not use. Against: the memos, which are plainly the game's, also print through the KERNAL. The published game is documented with the three codes (C64-Wiki, features.md).

Live tests

TestPartResult
each code at its prompt; a wrong code; RETURNCity Hall, mine, finaleas above
four intro boots, start moved a tenth of a second each timeintrothe credits stalled in one (parts/intro/facts.md)
Bond's room set burning, with and without CCPHJCity Hallthe DB4CT screen; a new game
end_check run with set digits, with and without DB4CTmineILVCT; game_over
RESTORE after the endingfinalethe prompt again, blind
holding fire for 1.2 s on Paris's instruction pageParisthe chase started normally; a stuck start seen once earlier was not reproduced

Cheats

Pokes that change the game within its own parameters. Each one names the variable it changes and whether it has been tested live. Untested pokes are labelled as candidates. Addresses are in the part named.

EffectPokeStatus
Play City Hall or the mine without the previous codepress RETURN at "PLEASE ENTER CODE"live
Codes: City Hall CCPHJ, the mine DB4CT, the finale ILVCTtype at the promptlive
City Hall: end the part at once (with CCPHJ typed)set byte 12 of Bond's room record: POKE the address in $3F/$40 plus 12 with 1live
Mine: the bomb's combinationnumbered items 6, 7, 1, 3, 4 ($26F0)live, by storing the digits
Mine: stop the clock$1B80 = 1 (the PAUSE flag)candidate
Paris: repair the car$03A1 = 0 (damage, 40 loses)candidate
City Hall: refill Bond's energy figure$1B5B = 42 (the gauge never kills)candidate
routines tables variables strings branch labels

Loading listing…