File 44 of disk 1 (module f44) is the debugger Konami used to test the script. It is on the disk that was sold, but it is never loaded:
ret right before: 0xC12D calls
0xC0C7 (a ret) instead of 0xC0C8, which put bank 8 at 0x6000 and jumped there; 0xC351 and the sound driver
(0x8259, 0x8276) call 0xC102 (another ret) instead of 0xC103.jr that skips the load
(0x40B1).What it did can be read in its code. It recognises 21 letters (table 0x62DF), but only 10 have an order (table 0x60EF):
| Letter | Banner | What it does |
|---|---|---|
| S | STP SET MODE | asks for 4 digits and puts them in 0xB540: jumps to that scene of the script |
| H | HISTORY | shows the history: the loader logged every disk read there and the sound driver every request |
| K | KEY DISP MODE | shows 8 x 8 script variables from the one asked for |
| W | WORK DISPLAY | asks for a bank and an address and dumps 16 x 8 bytes |
| E | CLOSE MODE (Y?) | leaves the debugger |
| M | KEY SET MODE | sets a script variable |
| L | COMMAND LISTING | lists 17 script orders from an address, with their names |
| N | KILL (C:CHR_LD/S:SOUND/D:DEBUGER/L:LIFE_CNTL (R:CHR_REC)) | switches parts of the game off (below) |
| A | KEY ALL CLEAR? (Y) | clears the variables |
| I | removes the pending error |
KILL writes ret into the code: with S, into the per-frame sound and the sound requests; with D, into the
stop on error (0xC26F). The banner also promises C (CHR_LD) and R (CHR_REC), but both do the same as
S. And with L (LIFE_CNTL) it sets bit 0 of 0xB566: the hero takes no more damage. The engine's damage
routine (dano, 0x6D99) still checks that bit and returns if it is set; in the game as sold nothing else
touches it.
To list the script, the debugger carries the names of 95 orders (0x690B): end, if, then, else,
new_pos, talk, scene_set, cmd_load… The engine that was sold has a table of 137 (0x502A): 43 give an
error and 31 do nothing; the script on the disks uses the rest.
In the engine, at 0x5694, there is a routine with no call at all. It looks at the last thing typed on the keyboard (0xB750, where the hero's name goes): if it starts with «ドイ» (Doi, Shift-JIS 0x8368 0x8344) and is followed by 12 hex digits (6 bytes) whose bytes 0, 2 and 4, and 1, 3 and 5, give 0 when XORed, it sets the script variable given by bytes 3 and 1 to the value of byte 4: any variable, to any value. No module contains the bytes 94 56 (the address); on the disks they only appear inside texts and graphics.
In shoot-outs the aim has 9 cells laid out like a numeric keypad (table 0x7EE2, 1 to 9: 1-3 at the bottom,
7-9 at the top). You fire with the digit or with J K L (1, 2, 3) and U I O (4, 5, 6): the top row has
no letter (0x7D57, and the same in module f0C). Shots are counted in BCD at 0xB5A2 and the count stops at
99 (daa and ret z).
Every letter a character writes sounds with a beep (loader 0xC8EF). There is not one per character: the table at 0xC94C gives each one of 6 beeps, and 7 have no voice. 0xDB80 and bit 1 of 0xB880 switch them off.
At 0x4E2A there is or 0xAF (F6 AF). But the engine also calls 0x4E2B, the second byte: there that AF is
xor a, and what follows sets 0xB51F to 0. One string of bytes, two routines.
The engine's name table (0x700C) is the game's cast: Gillian, Metal Gear, Mika, the receptionist, the chief, Harry, Gibson, Katrina, Napoleon, Isabella, Jamie, Ivan, Lisa, Chin Shuuhou... and some curious extras: «お面ライダー» (Omen Rider: お面 means "mask"; it sounds like Kamen Rider), «レゲエのおっさん» (the reggae guy), an «エイリヤン» (alien) and «福井さん» (Fukui-san), who gives Neo Kobe's weather forecast («本日のネオ・コウベの天気予報を御伝えします»).
Each disk carries its number in byte 0x1D of its sector 0 (0, 1 and 2). The loader (0xC301) reads that sector and returns it; script order 0x78 says which disk is needed and the engine compares (0x4D79).
Some menus ask you to type something on the keyboard: a phone number, a password, a name. Script order 0x6A compares what was typed (0xB750) word by word with what follows it, and every right answer has its own 0x6A. Among them: the phone numbers 691107 and 395644 (both at positions 0x0724 and 0x076E of each disk's menu file), Napoleon's passwords «オワッタ» (0x0CFE) and «テンカ» (0x0DE6), and 815883 for the door of Gibson's house (disk 3).
And in the Gaudi's file of people (disk 2's menus, from 0x4414 to 0x45B4), among the names you can look up, there are sixteen of Konami's team, in katakana: マツイナオキ, オオタヨシヒコ, コジマヒデオ, キノシタトミハル, アダチトシヤ, トヨハラコウジ, オザワマサヒコ, フクイヒロユキ, ミナミヨシキ, サクライマサシ, イワモトシュウコ, シクマサノリ, ナカニシヨシカズ, イカリコマサヒロ, ミズタニイク and グシケンノリコ. Among them, コジマヒデオ: Hideo Kojima. Each one follows its own 0x6A order, like the real answers.
FX (Félix Espina) found it while translating the game; it is checked here against the disks.
tools/dibujos.py paints the backgrounds by
running the engine's loading routine, but those objects do not come out. That is why 17 pictures are not
published: 9 black or single-coloured, 5 with the hole of an object, 2 pieces of a sequence and 1 odd one
(listed in tools/contenido_web.py, DIBUJOS_FUERA).