1987 · Electric Dreams Software

Fire Trap

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

Five stored tunes and six sound effects, played by a driver that runs seven times in six video frames.

The player

Play the stored sounds

The page runs the game's own sound driver, the bytes at $8000-$8DFF, and plays what it writes through a model of the SID chip with the filter modelled as one 6581's. Low notes are quiet on laptop and phone speakers.

The driver

Three voices, seven bytes of state each

The raster handler at line 230 calls the driver once a frame (play_music, $2AA6). Each call runs two ticks (music_play, $8003), and the phase counter $C0, which adds $33 a frame, carries on every sixth frame and makes the driver run a second time. The driver therefore runs seven times in six frames. A tick counts down a delay and then steps each of the three voices through seven bytes of state: its pattern pointer, its note, and the slide, vibrato, and pulse sweep (music_tick, $8083).

Each tune is a list of patterns for each voice, stored as pointers at $8530 (five tunes, three voices each). A pattern is read by music_next_note ($8191), which also starts a pending effect on the second voice and switches to a newly requested tune at the next note. A list ends with $FF, and music_end_of_tune ($83D1) then resets the voices and the tune starts again. Notes use the frequency tables at $843C and $8486.

SoundWhere the game starts itFrames to the end
Tune 0, the title screensthe start of the attract loop ($1017)5,102
Tune 1, the top of the building and the name entry$1B3E, $FC9B3,703
Tune 2, the building scrolling past before a stage$1681540
Tune 3, the music during a stage$16CF, when the Get Ready screen ends5,102
Tune 4nothing starts it; it plays no note83

Sound effects are requested by number through $B5 and play on the second voice. The game requests six: $1E from the spray, $1F from pickups and rescued people, $20 when a shot lands, $21 when the firefighter is hit, $22 from the movement code, and $24 when a fire goes out.