Loading listing…
1985 · Domark
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.
File 4 of the copy studied. Every fact names the routine or table it comes from, in this part's listing.
VIC bank 1: screen $4000, the panel's character set $4800, the mine's multicolour character set $5000. $01 = $36 in play; the interrupt is raster_irq ($1022) through $0314.
| Range | What |
|---|---|
$0A00-$0B04 | mission_complete and win_text, the code ILVCT at $0AFE-$0B02 |
$1000-$3FFF | the code, the panel screen ($1D50-$1F17), the variables ($1B00-$1BA0) |
$4400-$47FF | May Day's sprites ($10-$1F) |
$5660-$575F | code_prompt, read_code and "DB4CT" ($5757) |
$5800-$7AFF | Bond: four stacked sprites, 35 shapes each ($60-$EB) |
$7B40-$7CC7 | the music player |
$7CD0 | welcome_page |
$8000-$BA97 | the mine: 100 rows of 150 tiles |
$BB01-$BCB7, $BD00-$BFFF | the panel's colours; the objects as placed |
$E000-$FFFF | the tune, under the KERNAL: the same bytes as Paris's |
code_prompt ($5660) and read_code ($5707) compare five CHRIN characters with "DB4CT" ($5757): a match stores 1 in $1BA0 ($572D), RETURN stores 0 ($5747), and both go on to welcome_page ($7CD0) and, on fire, start_game ($2540). A second "DB4CT" at $575C is never read.
$FB (irq_panel, $103E, which also runs the clock, the music, the stick and the scroll), the mine at $8A (irq_playfield, $107E) and its colours, hazards and belts at $91 (irq_mid, $10B9).scroll_engine, $2156). map_to_buffer ($1100) expands the 2 × 2 tiles into a buffer at $1400; buffer_to_screen ($1700) copies 14 rows of 41 characters.probe_front $2B4D, hazard_test $2B93, probe_feet $2BC1), not from the VIC's collision registers.player_control ($2700) runs one of six states in $1B25: standing, walking, jumping, falling, climbing and hurt. A fall of $41 passes or more hurts ($29FE). A hurt lasts 30 passes, each taking $30 more clock ticks ($2B2C-$2B38), about 29 s of the clock per hit. There are no lives and no score.
The clock starts at 90:00:00 and counts down two hundredths a frame (clock_tick, $1C20); at zero ($1B24) the part starts again at $2540. PAUSE sets $1B80, which the interrupt tests at $106C to skip the clock; the music plays on.
Fire opens the item list (item_menu, $2E80) and then the words (action_menu, $2D00): RETURN, EXAMINE, USE, GET LIFT, WINCH UP, WINCH DOWN, PAUSE, ABORT. EXAMINE finds an object at Bond's feet or just ahead ($36F6).
$3827); the detonator removes it with a shake and a flash ($39E0, $1170). Blasting rock fall 3 frees May Day ($3E00).$3A0D), which carry Bond ($1900, $2CA3).$3970, $8656); a rope hangs from Bond's tile ($38D8).$3A95, $3C01).$1B90). WINCH DOWN needs May Day freed and Bond at row $0D in the right of the mine ($3F23); WINCH UP needs the four parts and five digits entered, wherever Bond is ($3F8E).$389C-$38D3), and only in the right half of the mine above row $55 ($389E-$38A8). Each is stored at $1B73 + the count ($1B78).$375B).end_check ($25E0) runs when Bond reaches map column $15 carrying it. It compares the five digits with 6, 7, 1, 3, 4 ($26F0) and then reads $1BA0 ($25F2), its only reader. The right digits with the code entered go to mission_complete ($0A00): "CONGRATULATIONS 007 / MISSION COMPLETE / YOUR CODE FOR THE NEXT PROGRAM IS / ILVCT", fixed text, and a loop at $0A4D. Anything else goes to game_over ($25D0), four flashes of the explosion and a new start.main_loop, storing five digits and starting end_check directly: 6 7 1 3 4 after DB4CT reached $0A00 and the ILVCT screen; the same digits after RETURN, and 6 7 1 3 5 after DB4CT, both reached game_over.Three voices of note triples (frequency high, frequency low, length) from $E000, $EAD1 and $F755, stepping every 2 and 3 frames in turn, and looping when voice 1 reaches $EAD1 (music_play, $7BAB). sound_ok ($3B7D) and sound_fail ($3B9C) borrow voice 2 from the tune. No speech.
read_joystick ($17A0) is City Hall's $4700; $0A00-$0B03 is in City Hall at the same address; the tune is Paris's. Only port 2 is read ($DC00); CIA 1's timer A is stopped, so the KERNAL never scans the keys.
$38AA-$38B1): the 14th would land on $1B80 and stop the clock, the 46th on $1BA0. In principle a player without the code could set it this way and let the count wrap after 256 digits. Not tried.$1B16 = 0, touching some lit hazard glyphs spins the main loop for good at $2BAB-$2BB7. Not tried.$3000) reads ($C7 - row + column) / 21, rising to the right and upwards. Whether it is the "Geiger counter" the sources name is not known.welcome_page does LDX $FF, TXS ($7D1D), putting 7 in the stack pointer; LDX #$FF was probably meant. start_level resets the stack.$1B16, May Day's freed flag $1B96, or the per-type counters $1B11-$1B23.$54, which no object is, so the branch at $8651 never runs.$CC-$EB), and City Hall holds the same $0A00 routine.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.
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):
| Part | Entry | Interrupt in play | Screen | Sound |
|---|---|---|---|---|
| intro | $8020 | $CC00 | bitmap, banks 1 and 2 | the Bond theme, speech |
| Paris | $43B0, then $5A00 | $5026 | $0400 | the theme, effects, speech |
| City Hall | $1000 | $4022 | $0400 | the intro's tune, effects |
| mine | $5660 | $1022 | $4000 | Paris's tune, effects |
| finale | $8000 | the KERNAL's | bitmap $2000, $6000 | none |
Nothing is loaded once a part runs, and no part loads the next: the player goes back to the menu for each.
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 by | Where it is shown | Code | Checked by |
|---|---|---|---|
| Paris, on a catch | the telex, Paris $8140 | CCPHJ | City Hall $10D8 |
| City Hall, on escape | mission_complete, City Hall $1334 | DB4CT | mine $5757 |
| the mine, on defusing | mission_complete, mine $0AFE | ILVCT | finale $809C |
$1BA0 is the same address in all three parts, and a part reads it once, at its end:$7096): with the code, reaching room 76 with Stacey shows DB4CT; without it the game starts again ($8600).$25F2): with the code, the right bomb digits show ILVCT; without it the bomb goes off, whatever the digits (game_over, $25D0).parts/city-hall/facts.md, parts/mine/facts.md). The finale compared only five characters: ILVCTX was accepted.Bytes identical at the same addresses, compared in the unpacked images:
| What | Where |
|---|---|
| the three-voice music driver | intro and City Hall $C621-$C7FE |
| the Bond theme's notes | intro $E000, City Hall $E000 (and intro $8500, the copy it moves there) |
| the second tune's notes | Paris and mine $E000-$FFFF |
read_joystick | City Hall $4700, mine $17A0 |
tick_clock | Paris $4170, City Hall $6E40 |
| the "OK" sound | City Hall $6B50, mine $3B7D |
read_code | City Hall $1088, mine $5707, finale $804C, apart from the addresses they name |
mission_complete and its text with ILVCT | mine $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.
Each part carries leftovers of earlier work on the game, none of which runs:
$8020 onwards, overwritten by a 14-byte patch (parts/intro/facts.md).$0800.$967B), an older end screen ("WEBL DONE 007 YOUR CODE IS 111122", $7E5A), and the mine's end screen at $0A00.$0B04-$0FFF).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).
| Test | Part | Result |
|---|---|---|
| each code at its prompt; a wrong code; RETURN | City Hall, mine, finale | as above |
| four intro boots, start moved a tenth of a second each time | intro | the credits stalled in one (parts/intro/facts.md) |
| Bond's room set burning, with and without CCPHJ | City Hall | the DB4CT screen; a new game |
end_check run with set digits, with and without DB4CT | mine | ILVCT; game_over |
| RESTORE after the ending | finale | the prompt again, blind |
| holding fire for 1.2 s on Paris's instruction page | Paris | the chase started normally; a stuck start seen once earlier was not reproduced |
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.
| Effect | Poke | Status |
|---|---|---|
| Play City Hall or the mine without the previous code | press RETURN at "PLEASE ENTER CODE" | live |
| Codes: City Hall CCPHJ, the mine DB4CT, the finale ILVCT | type at the prompt | live |
| 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 1 | live |
| Mine: the bomb's combination | numbered 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 |