1984 · Epyx

Impossible Mission

This minisite was contributed by chunkypixel, air. It’s agent-generated and needs a human editor. Clone https://github.com/gamesexplained/gamesexplained and follow kit/START.md to curate games/c64/impossible-mission with me to Gold.

The sampled voice that greets the agent, played here through a port of the game's own speech driver, the phone's real touch tones, and the musical lock of the two code rooms.

01 · Speech

Sound: eight voice lines, and one the game never plays

The voice is sampled, about 6 KB in its own file, words, loaded at $E000. Every line can be played here, through a port of the game's own speech driver.

Pick a line. Sound plays in your browser through Web Audio.

LineWhen the game plays it
2 and 3At start-up, after the load and after every restart: the greeting ($39AE)
1Entering a room after a game hour has passed
7The agent falls
5Time runs out
4Over Elvin's face at the end
0The end screen
6Never: no call to $BED9 asks for it

Descriptions of the game quote the greeting as "Another visitor. Stay a while, stay forever!" The words of each line were not transcribed for these pages; the player above is there to hear them.

How a line is played

No voice of the SID sounds while a line plays. The driver at $0880 writes each sample to the chip's master volume register, from a timer interrupt every 101 cycles: 9,755 times a second on a PAL machine and 10,126 on an NTSC one, so the same line is 3.8% faster in America ($0C71). While a line plays, the game swaps its raster interrupt for one that only counts frames, so the samples are not disturbed.

The samples are not stored as a recording. The driver builds each pitch period of the voice from a short window of decoded samples: it plays the window forwards, then backwards from where it stopped, then holds the volume at the middle level for a gap. The length of the gap sets the pitch, and a separate list of pitch commands for each line moves it up and down, a step every period ($0B1D). The lower strip of the player is a close-up of 600 interrupts that follows the playback: each period is a shape and its mirror image, then a flat stretch.

Frame encodingUsed forDecoder
Four bits a sample, two samples a byteMost frames of every line, and every frame of the fall$0AE5
One bit a sample: a step up or down around the middle levelSome frames of every line except the fall and the line over Elvin's face; the window slides along the samples a little every period ($0951)$0B73
Two bits a sample, from one of three level tablesNothing: the driver has it, and no frame of the eight lines uses it$0A68

Each frame header ($09B6) says how many periods the frame lasts, how it is encoded and where its samples are. Between two voiced frames the driver blends the old window into the new one, averaging the two ($0BFD), unless the header asks for a clean cut. A frame can also be a silence with no samples, and a flag marks the last one.

02 · The phone

Sound: the phone dials real touch tones

The pocket computer's phone key calls for help. The game dials one of two numbers, plays real touch-tone pairs, rings the line and answers.

Each key plays the two frequencies from the table at $7E6E. Sound plays in your browser through Web Audio.

The table holds two SID frequency values per key, one for voice 2 and one for voice 3. Converted at the American NTSC clock they come out as the touch-tone standard (DTMF): rows at 697, 770, 852 and 941 Hz, columns at 1209, 1336 and 1477 Hz. A PAL machine runs its SID 3.7% slower, so a European C64 dials slightly flat. The numbers are in $7E36; 555 is the prefix American films and television use for fictional numbers.

One number turns the two pieces in the memory window the right way up, and the other says whether the leftmost piece's puzzle can be finished (How it works).

03 · The code rooms

Sound: the code rooms play a C major scale

Two rooms hold a computer with a big chequered screen. Searching it starts a musical puzzle: find the hidden notes in rising order.

The eight notes of $A9F8, played on three voices an octave apart as $A950 does. At the NTSC clock they are C6 to C7 to within a cent; the second octave of tones is the same scale an octave lower. Sound plays in your browser through Web Audio.

The first visit hides two notes among 32 squares. Each success adds a note, up to 14, and pays a password: a lift init for an even number of notes, a snooze for an odd one ($A771). A note lower than the last one pressed starts the count again.

The phone on the pocket computer is the game's other musical instrument: it dials in touch tones (above).