1987 · Thalamus

Delta

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/delta with me to Gold.

Rob Hubbard's driver and all thirteen of its tunes, run from the game's own bytes, and the sound effects the player hears by default.

01 · Rob Hubbard's score

Music: thirteen tunes, three in use

The game carries a complete Hubbard music driver with thirteen tunes. Only three are ever requested.

The game's own driver, run in the page. The buttons start each tune through set_tune at $C357, and every frame calls music_play at $BDE4, both executed by a small 6502 interpreter over the bytes $BC00-$CFFF as the game loads them. Checked against the same code run in the kit's 6502 simulator: every SID register write matched for every tune (9,000 frames for tunes 0, 11 and 12, 1,500 for the rest). The filter is one chip's: a 6581's cutoff curve. The drums' lowest notes sit under 100 Hz, which laptop and phone speakers barely play.

The game asks for a tune by writing its number plus one into $117D, and the sound routine at $9D60 passes it on once a frame. Tune 11 starts with the title screen (a direct call at $17C3) and comes back at game over and name entry. Tune 12 plays when all 32 stages are cleared (game_completed, $9D00). Tune 0 is the in-game music, requested whenever play starts and at each player's turn.

By default the player never hears tune 0. In play, the game uses the SID for its sound effects ($0FFD = 1). Pressing F5 on the title swaps the effects for the music, and then the request for tune 0 starts it. With the effects on, the same request only hands the three voices back to the effect player at $0406.

Tunes 1 to 10 are short pieces of a few seconds that end on their own. They sit in the tune table at $C4F4 with the rest, and nothing in the game asks for them.

02 · Sound effects

Sound: 21 effects and an engine that tells you what is coming

The sound effects have their own player at $0406, with 21 effects of two eight-byte records each: pitch scripts, sweeps and alternating waveforms. The main loop's only job besides waiting for the raster is to feed it (sfx_queue_service, $9D60).

Voices 1 and 2 take turns playing an engine drone, and which drone plays depends on the wave: effect $50 while an enemy that cannot be destroyed is on screen, $4B for any other enemy, and otherwise the next of three background effects. With the effects on, the drone gives away when an indestructible enemy is on screen.

F5 on the title chooses between the effects and the in-game tune; the two never play together in play.

The game's own effect player, run in the page. Each button starts one effect the way the game does: it stops the three voices through sfx_stop at $0403, then writes $40 plus the effect's number into the request byte at $0400. Every frame calls sfx_play_frame at $0406. Both run in a small 6502 interpreter over the bytes $0400-$07FF, plus the music's note table at $C226, which the effects read their pitches from. Checked against the same code run in the kit's 6502 simulator: for all 21 effects, every SID register write matched on every frame, and each effect ended on the same frame. An effect lasts from 23 frames (effect 17) to 510 (effects 7 and 8). The drones sit low, under 100 Hz, where laptop and phone speakers barely play.

The names on the buttons come from the code that asks for each effect:

EffectRequested by
1, 5, 18the three background engine drones ($07C2-$07C4)
3a double laser shot (sfx_double)
4collecting an extra weapon (sfx_extra)
6a laser shot (sfx_laser)
7losing a credit (credit_lose)
9an extra life (sfx_extra_life)
10buying in the shop (sfx_buy)
11the drone while an enemy is on screen ($4B)
16the drone while an indestructible enemy is on screen ($50)
17an enemy firing (sfx_enemy_fire)

When the ship is destroyed, the death pattern plays effects 5, 11 and 18 on voices 1 and 2 ($07C7). For effects 0, 2, 8, 12 to 15, 19 and 20, no instruction that writes their request was found. They play in full from their records, and they may be unused, or asked for through a route the search missed.