# Salmon Run Stream Sound Demo A faithful recreation of the stream/water sound effect from Bill Williams' **Salmon Run** (APX, 1982) for the Atari 8-bit. ## Background This demo recreates the ambient stream sound heard in Salmon Run during idle gameplay. The original sound was reverse-engineered by disassembling the game and analyzing the POKEY register writes. ## How It Works The stream sound uses: - **AUDCTL = $00** (standard 64kHz clock) - **AUDF1 = RANDOM & $1F** (random frequency 0-31) - **AUDC1 = $A4** (pure tone distortion, volume 4) - **DLI timing** - frequency updated via Display List Interrupts, not a tight loop The key insight is that the sound texture comes from the **DLI update timing** - updating once per scanline creates a different character than updating as fast as the CPU can loop. ## Controls | Key | Function | |-----|----------| | **1** | Set volume to 1 (quiet) | | **2** | Set volume to 2 | | **3** | Set volume to 3 | | **4** | Set volume to 4 (original) | | **+** | Increase DLI skip rate (fewer updates, smoother) | | **-** | Decrease DLI skip rate (more updates, buzzier) | | **START** | Exit program | ## DLI Skip Rate The background color changes to indicate the current skip rate: - **Skip 1** = Update every DLI (most frequent, buzziest) - **Skip 2-8** = Update every Nth DLI (smoother texture) Experiment with the skip rate to find the sound that best matches your memory of the original game. ## Technical Details ### Display List Structure ``` $F0, $F0, $F0 ; 3x 8 blank lines with DLI $42, ; Mode 2 + LMS $82 x 23 ; 23 mode 2 lines with DLI $41, ; JVB (jump and wait for vblank) ``` Each `$82` byte triggers a DLI, which updates AUDF1 with a new random value. ### Original Salmon Run Parameters From disassembly analysis: - AUDF1 updated in DLI at $5000 - AUDC1 = $A4 (from variable $4032) - AUDC2 = $A0 (silent, from variable $4033) - AUDCTL = $00 ## Files - `salmon_run_stream_best.s` - Assembly source (ca65 format) - `salmon_run_stream_best.xex` - Atari executable ## Building ```bash ca65 -t atari salmon_run_stream_best.s -o salmon_run_stream_best.o ld65 -C atari.cfg -o salmon_run_stream_best.xex salmon_run_stream_best.o ``` ## Credits - **Original Game:** Bill Williams, Salmon Run (APX, 1982) - **Reverse Engineering & Demo:** Benj Edwards using Claude Code with Opus 4.5, January 2026