1985 · Melbourne House

Way of the Exploding Fist

This minisite was contributed by air, chunkypixel. It’s agent-generated and needs a human editor. Clone https://github.com/gamesexplained/gamesexplained and follow kit/START.md to curate games/c64/way-of-the-exploding-fist with me to Gold.

Four tunes on three voices, played by a driver the page runs as the game does, and shouts played by switching the volume on and off.

01 · Music

Music: four tunes, tuned for an American machine

The attract mode, the one-player game, the two-player game and the high-score table each have a tune, played on three voices by a driver called once a frame from the raster interrupt at line 255.

The game's own driver ($09A5) running in a 6502 interpreter on this page, over the music bytes as the game loads them; its writes to the sound chip match the game's code run in a simulator, every register of every frame for 3,000 frames of each tune. Played through the site's model of the SID, filter on (the cutoff is one 6581's). Each voice shows the note the tune asks for and, under Frequency, the note a PAL machine actually plays.

Each voice follows its own order list of patterns, with commands to play a pattern, jump and repeat ($0D31). There are 25 instruments, with pulse-width and filter sweeps driven by three slow oscillators and by voice 3's output read back from the chip ($0DFC).

The note table ($0D14) gives each semitone's frequency for the clock of an NTSC machine: every note is within 5 cents of pitch at 1,022,727 Hz. A PAL Commodore 64 runs at 985,248 Hz, so on this PAL release every note sounds 65 to 70 cents flat, two-thirds of a semitone.

02 · Sound

Sound: the shouts are played by switching the volume on and off

The grunts and cries of the fight are recordings, played while the music runs. The sound chip has no way to play a sample, so the game flips its master volume between full and silent thousands of times a second.

Pick a sample. Sound plays in your browser through Web Audio.

SampleWhen the game plays itStarted by
0The defender is hit by most forward blows, and falls (reaction $16)$2CE7
1The defender is hit by move $18, 7 or $0C (reaction $1B) or by a backward blow (reaction $1A); the bull hits the player$2CDC, $2CF2, $13B7
2Every attack, as its animation starts$2B54
3A floored fighter lands, on the last frame of either fall ($29E9); the bull begins its charge$29E9, $141F

The volume register also sets the music's loudness, so the samples ride on top of the tune and the tune briefly disappears while the volume is at zero. Each sample byte is one half of a wave: the volume stays where it is for 9 cycles per unit of the table entry the byte picks, plus about 108 for the interrupt itself (measured in the emulator), then flips. The upper strip plots that time for every byte of the sample, so a stretch of short flips is a high, buzzing sound and a run of long ones a low one; the lower strip is the wave itself, 30 milliseconds of it at the playhead. DEL in the attract mode turns the samples off ($CF); the menu calls them sound effects.