# The VSU (Virtual Sound Unit) Source: STS "VSU - Virtual Sound Unit" (DOC, tier 3). - **Six channels:** 1-4 play 32-sample, 6-bit wave tables; 5 adds frequency sweep and modulation (from a 32-entry modulation table); 6 is noise from a 15-bit LFSR with a selectable tap. Every channel has an interval (duration) counter, 4-bit left/right levels and a 4-bit envelope that can grow or decay and repeat. - **Memory:** wave RAM 1-5 at 01000000-010002FF (128 bytes each, 32 samples on word boundaries), modulation RAM at 01000280-010002FF, registers at 01000400-010007FF: SxINT, SxLRV, SxFQL/SxFQH, SxEV0/SxEV1, SxRAM per channel, S5SWP, SSTOP. **Byte writes only**: 16- and 32-bit writes are undefined, all reads undefined. - **Clocks:** channels 1-5 step at 5 MHz / (2048 - frequency value), channel 6 at 500 kHz / (2048 - value); 11-bit frequency values with a "most recent" and a "current" copy (sweep/modulation changes only the current). - **Output:** per channel, (4-bit level x 4-bit envelope) >> 3 to 5 bits (+1 when both are non-zero), times the 6-bit sample; the sum's top 10 bits are the output, **10-bit stereo at 41,700 Hz**, maximum 685. Then an RC high-pass (100 Ω, 220 µF, cut-off ≈ 7.23 Hz) before the speakers or the headphone jack. - 41,700 Hz is STS's figure; 20 MHz / 480 = 41,666.7 Hz and 5 MHz / 120 likewise. Which divider the hardware uses is U11 (the sound rule makes this low-stakes: resample at the host). - STS's open notes: the VSU appears to reset to all zeroes but this is unverified (U12); the envelope and sweep clocks are given as procedures. **Chip rule:** the VSU has no other user in the family's plans (nor in MAME 0.285, whose `vboysound` device serves only `vboy`, OBSERVED from `-listdevices`): it stays in the board as `virtualboy_python.vsu`, behind an import boundary.