On paper, the AY-3/YM2149 are disappointingly limited compared to the SID or 2A03
sound generators. They output only square waves and periodic noise. They do
feature a volume envelope, but it's shared between all 3 output channels, which is not very useful for musical voices. There's no support for digital samples.

Follow

Despite the sparse feature set, I've learned you can get a lot more out of these chips. There's
an undocumented feature (I haven't tried it yet) that allows you to disable a tone
oscillator by writing a 0 to its frequency register. This makes its output channel emit a level
waveform. Changing the volume register changes the value of the level waveform; by
changing the volume register very rapidly, you now have a 4-bit DAC at your disposal,
useful for playing samples.

I would think you should also be able to create triangle, sawtooth, and other types of waveforms with this technique, too. The 4-bit volume register is logarithmic, so every 2 steps makes the volume 2x louder or softer. For this reason, using the volume register technique on one channel is not really as good a 4-bit linear DAC.

The Atari STe (for example), added special hardware to officially support using these techniques on the volume register while making them less CPU intensive.

Show thread

I've only just started experimenting with a software ADSR envelope in my 6502 computer's music tracker software, increasing or decreasing the channel volume one or more times per note to create effects. I'm looking forward to trying these other techniques.

Show thread
Sign in to participate in the conversation
Fosstodon

Fosstodon is an English speaking Mastodon instance that is open to anyone who is interested in technology; particularly free & open source software.