1984 · Activision

Ghostbusters

This minisite was contributed by air, unorig. It’s currently claimed by unorig who is editing it to reach a Gold tier standard.

The theme song with its bouncing ball, and five phrases of speech in 2,738 bytes. Both are played here by ports of the game's own players.

The sing-along

The theme song, with a bouncing ball over 52 lines of lyrics

The title screen plays Ray Parker Jr.'s theme in Russell Lieblich's arrangement while a ball bounces along the words.45 The music stops when the song ends, four minutes later. In play the same tune loops quietly behind the game.

The game's own music player ($93E1-$95A4) ported to JavaScript and played through the site's model of the SID. The port was checked against the game's code, register write for register write: 223,366 writes over 111,904 frames matched. The lyric window follows the game's cue table ($68F0) and the ball's script ($92BC): each line and landing is at the frame the game shows it, measured in the simulator. Title is the sing-along, played once. In play is the loop at half volume.

The tune is three voices of patterns: a melody, a bass line and a percussion track, each a list of 109 pattern numbers ($A2BD, $A32B, $A399) into 71 patterns ($A407) and nine instruments ($A7EF). The player steps every fourth tick of a counter ($08) that the lyrics share, so the words and the notes cannot drift apart.

The game was written for American machines. At start-up it measures the screen's last raster line to tell a European (PAL) C64 from an American one (NTSC) and stores the answer at $EA73. A PAL machine draws 50 frames a second where an NTSC machine draws 60, so on PAL the counter takes an extra step whenever it lands on a value ending in binary 001: eight ticks in seven frames, 57.3 a second. The tempo comes out close to the American one. The pitch does not. The note table ($A1F4) holds the SID values for an NTSC clock, where note 57 is exactly 440 Hz. A PAL C64 runs 3.7 % slower, so every note of the song sounds 0.65 of a semitone flat.

Speech

Five phrases of speech from 2,738 bytes, and one the game never says

The game shouts "Ghostbusters!" at start-up and when the space bar is pressed on the title screen. It speaks four phrases in play. A fifth, phrase 0, is stored with the others and never asked for.

The game's speech player ($F080-$F4E9) ported to JavaScript and run on the stored phrases ($F4EA-$FF9B). The port writes the same 311,368 values to the volume register, at the same interrupts, as the game does in the simulator. Top: the four-bit level the player writes, 9,659 times a second. Middle: each frame of the phrase, blue where it is voiced and orange where it is noise. Bottom: the pitch of each voiced period. Heard here as a straight level; a real SID shapes it a little.

PhraseLengthWhen the game plays itWhat it says
00.94 sneverits first blocks are phrase 1's; probably a shorter "Ghostbusters" (inferred)
11.57 sstart-up; space on the title ($6393); a Slimer trapped ($8820)"Ghostbusters!"
21.32 sa man slimed ($874B)"He slimed me!" (inferred from where it plays)
32.68 sstart-up; a man caught at Zuul ($8AB9); the foreclosure ($8D1F)a laugh: nine voiced syllables (inferred)
42.22 sthe portal closing ($8C5A)unknown: a falling voice with no consonants

Speech on the C64 has no sound chip of its own. The player plays it through the SID's master volume register ($D418): a four-bit value written there moves the output level, and written fast enough it becomes a waveform. A timer in the second CIA chip interrupts the processor every 102 cycles, and each interrupt writes the next value. While a phrase plays the game does nothing else: the raster interrupt stands aside and the main loop waits ($8DB9).

Stored as raw samples, the 8.7 seconds of speech would take 42,140 bytes, two thirds of the machine. The player stores 2,738. A voiced sound is a short waveform chunk played forwards, then backwards, then a silence whose length sets the pitch; each new chunk is blended halfway into the last. A hiss is a one-bit pattern slid along as a window, with no pitch at all. Each frame of a phrase is four bytes that say which, how long and where its samples are.