1991 · Ocean Software

Toki

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

The sound chip, two modes, and a driver with three sets of tunes.

Sound

Sound effects or music, never both

The stage card asks for sound effects or music, and SPACE switches during play.

The choice is one flag $00DF. With music on, the game silences the sound chip and starts the music driver; with sound effects on, it clears the queue and starts the effects $5290. A request for a sound effect is ignored while music is on, and up to three can wait in the queue $0B8C. Each frame the game plays whatever is queued and then runs the driver $0BE2.

The driver

Three voices, each with its own small programs

The driver gives each of the SID chip's three voices a script and several tables that change it over time.

Each voice has its own script, which says what to play and for how long $6A09. Beside it, a program for the pulse width sweeps the sound's tone $6CBE, a pitch program slides the frequency $6D08, and an arpeggio steps through note offsets $6D81. One filter program, shared by the three voices, moves the filter cutoff $6DCE. The master volume can fade down or up, at a rate set by the game or by a script command $6ED8.

The effects are separate from the music. Ten sound effects each start from a group of four entries in a list $7C15, and ten short one-shot waveforms hold their steps $6FC2.

Tunes

Three sets of scripts, and the callers use one

The driver can start three sets of three voice scripts, and the game's own routines name the second.

A table holds three sets of start addresses, one address for each voice $70BA. The two places in the main code that start the music, at the start of a round and on SPACE, both pass 6, which picks the second set $808B. In VICE on 25 October 2026, switching music on with SPACE loaded that set's three start addresses into the driver, and a second press switched it off again. A third caller is command 31 of the objects' scripts, which starts the music with the set named by the byte after the command, and only while music is on $B33C. Which scripts use that command, and which set they name, has not been traced. Retro Gamer says the C64 version dropped one of the arcade's music tracks.3