1988 · Data East

RoboCop: music

This minisite was contributed by 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/robocop with me to Gold.

Jonathan Dunn's driver, five tunes, fourteen sound effects, and a voice played through the volume control. The players below run the game's own driver.

01 · Tunes

Five tunes, the same in every level

Press a tune to hear it. The page runs the driver from level one's file on the site's model of the 6502 processor, as the game does: the tune is started by $2480, and the player at $254F is called once a frame.

The driver's writes to the sound chip are the game's, write for write, as test_music.js checks against the game's code.

TunePlayedLength
0During play, on every walking stageRepeats
1The title screen and the high-score tableRepeats
2The photofit, in level two2402 calls (40.1 s)
3The start of each stage189 calls (3.2 s)
4Game over194 calls (3.2 s)

A call is one frame: about 59.8 a second on the American machine this disk was made for.

The driver says who wrote it, in text in level one's file: "MUSIC DRIVER V1.1 ALL CODE & MUSIC BY JONATHAN DUNN". A tune is six bytes in the tune table at $2DC2, the addresses of three order lists, one for each of the sound chip's voices. An order list names patterns; a pattern is a list of notes and their lengths, with commands to change the instrument, slide, arpeggiate, sweep the pulse width, or sweep the filter.

The player skips every sixth call: a counter at $EA runs from 0 to 5, and on 5 the player does nothing. So the music moves on five frames in six, about 50 times a second on an American machine, the speed it would have on a European one. Each level has its own copy of the driver at its own addresses, but the five tunes are the same in all three. Run on the kit's 6502, 6,000 frames of each tune and 400 of each effect, they write exactly the same values to the sound chip in every level, so tune 2, the photofit's, is also in levels one and three, which never play it.

02 · Sound effects

Fourteen effects, instead of the music

With the title's sound setting on ATMOSPHERICS, the music stops when play starts, and the game plays sound effects through the same driver instead ($2398). With it on AURAL AMBIENCE, the game asks for the effects all the same, but the driver ignores them.

EffectAsked for whenFrames
0The time bonus counts a second; a hit on the gunman; a bullet that hits an enemy (in levels two and three, only one that does not kill it)13
1RoboCop fires20
2An enemy fires20
3An enemy at a window falls; in levels two and three, an enemy is killed63
4RoboCop lands from a jump8
5RoboCop dies46
6RoboCop walks into an enemy, in levels two and three13
7A pickup is collected59
8The last of the better bullets is fired29
9A hostage is killed31
10Never13
11An enemy's death begins31
12Never133
13NeverNever ends

Frames are the calls until the driver marks all three voices finished. The table of effects is at $35A4: three bytes each, a pattern for each voice or $80 to leave it alone.

An effect starts by pointing each voice it uses at a pattern, and from then on it is played like a tune. Three of the fourteen are never asked for by any of the three levels, and the last of those never ends.

03 · Speech

A voice through the volume control

After fire on the title screen, a voice says "RoboCop". The game stops the music and writes four-bit samples, one after another, to the sound chip's volume register $D418 ($EC93). Each write moves the chip's output level, and fast enough, that is a recording. Nothing else runs while it plays. Level three plays a second sample the same way when RoboCop dies ($EB99). The players on this page do not include the speech.