1985 · Epyx

Summer Games II: 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/summer-games-ii with me to Gold.

Thirty-five tunes in two music drivers: eighteen anthems and two fanfares in the menu, five in the ceremonies, and one or two for each event, every one played here by the game's own code.

01 · The anthems

Eighteen anthems and two fanfares

Each country plays its anthem when a player chooses it, when its player wins an event, and when its player is champion. The menu holds all eighteen, with the tune of the final standings and the tune of the world records.

The player calls the menu's own snd_init and play_tune, then tune_step twice a frame, as the menu's two raster interrupts do, on a copy of the C64's processor in the page, over the menu's bytes from the Source tab. The player's clock runs on for 3 seconds past the length in the table, while the last note fades.

The anthems use the simplest driver on the disk. A tune is rows of four bytes: a note number for each of the three voices and a code for the row's length (note_lengths). Voices 1 and 2 play pulse waves and voice 3 a sawtooth, and near the end of each row the notes are released, so every chord is struck afresh. The addresses of the twenty tunes are at tune_table, and tune_by_country finds a country's.

TuneCountry or useLength to the last note

02 · The ceremonies

The opening and closing ceremonies

The opening ceremony plays one tune as the torch is carried up the steps. The closing ceremony plays four, one after another: Zzap!64 heard Ride of the Valkyries as the jet-pack flyer came in, and the 1812 Overture over the fireworks.

The opening's tune is started by start_tune and stepped once a frame by tune_step, a copy of the menu's driver. The closing's tunes are started by start_tune and played by music_step, the driver the events share.

TuneWhen it playsLength to the last note

The closing ceremony moves from tune to tune in next_tune: the second starts when the first has ended, the third when the fireworks begin and the second is over, and the fourth with the blimp's banner. The last two repeat until a joystick ends the ceremony.

03 · The events

A tune for each event

Most events play a tune while the players get ready and stop it when the action starts. Show jumping plays its gallop all through the ride, and Fencing has a fanfare for the salute and a tune for its menu.

Each tune is started as its event starts it, then stepped once a frame by that event's copy of the shared driver, from the event's own bytes.

TuneWhen it playsLength to the last note

The events' driver (Rowing's music_step, for one) gives each voice its own list of bytes. A byte below $80 is a note, followed by how many times the set length it lasts; $FD sets that length, $FE jumps elsewhere in the list, $FC writes pairs of a SID register and its value, and $FF ends the voice. Javelin, Kayaking, and Fencing start their tunes through a second layer, sounds on channels with priorities, so that an effect can take a voice from the tune and give it back.

Show jumping's gallop is the one tune that changes with play. Its note length is a byte inside the tune, gallop_length, which the ride rewrites from the horse's pace (pace_tune), so the hoofbeats quicken as the horse speeds up. The slider above sets the pace as the ride does (pace_tune): a note length of 15 when the horse stands, 8 at pace 1, 6 at pace 2, and 3 from pace 3 up.