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.

The tape's Mix-E-Load, a tune the player remixes while the game loads, then Rob Hubbard's driver with all thirteen of its tunes and the sound effects the player hears by default, all run from the game's own bytes.

01 · Mix-E-Load

Music: a Rob Hubbard tune you remix while the game loads

Delta's tape starts with a program of its own. While the rest of the game loads, Mix-E-Load plays a Rob Hubbard tune under the Delta logo, and the joystick changes its lead, bass, drums and effects as it plays.

Mix-E-Load's own code, run in the page. The program's bytes are as the tape leaves them when it starts the program. Every frame the page runs one pass of its main loop, music, joystick, flashing column, twinkle and scrolling message included, and draws the screen from the program's memory. Left and right choose a column, up and down scroll its list, and the name in the lit middle row is the one in use. Hold fire with up or down to bend the lead's note. On the tape the program ends when the game has loaded; here it plays until you stop it.

The mix is never quite the same twice in a minute. Every fifth frame the program draws a lead phrase and a bass transposition together at random ($CE6B), and each voice takes the latest draw when its phrase ends. The lead column picks which set of seven phrases the lead draws from, the bass and drums columns pick the pattern those voices repeat, and the FX column picks the lead's instrument. The draws come from a shift register ($CF36) that starts from the same bytes on every tape, so with the stick left alone the random tune is the same every time it loads.

The message along the bottom credits "ROBBBB HUBBARD" for the music, Bob Stevenson for the graphics and "GARG LIDDON" for the implementation, and adds "LOADER NOT BY JOHN TWIDDY". It advertises Mantrax and Starline from Thalamus, Wizball from Ocean and Morpheus from Graftgold. Then its thanks list turns into the cast of EastEnders, from Den and Angie to Dot, Pauline and the Queen Vic, and the message signs off with "ANYONE CAN FALL IN LOVE", the 1986 single Anita Dobson sang to the show's theme.

Bug: about a third of the twinkles on the logo are drawn off the screen. To put one twinkle past x 255, the program adds one to the register that holds the sprites' ninth x bit (inc $D010 at $CEC1) instead of setting the bit, and never clears it. From then until that twinkle comes round again, every other twinkle lands 256 pixels to the right of its place on the logo.

The bytes after the program's tables spell "HELLO TAZZS" ($BFF4). The game never reads them.

02 · 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 run over the bytes $BC00-$CFFF as the game loads them. 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 the game never asks for them.

03 · 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 over the bytes $0400-$07FF, plus the music's note table at $C226, which the effects read their pitches from. 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, the search found no instruction that writes their request. They play in full from their records, and they may be unused, or asked for through a route the search missed.