Z80 Assembly 39: Software Sound Synthesis (Beyond the Square Wave)

Limitations of the Beeper (Square Wave) The simple beeper (Part 28) can only produce a square wave (a harsh, buzzy tone) because it only switches the speaker ON or OFF. To create richer sounds, like music that sounds closer to a sine wave, or complex speech effects, we need to simulate varying amplitude (volume). Pulse-Width Modulation (PWM) Synthesis Since the Z80 cannot vary the voltage to the speaker, we simulate varying amplitude using Pulse-Width Modulation (PWM). ...

September 27, 2025