History
The AY-3-8910 sound chip was introduced by General Instrument in the late seventies. The chip came in different variants and was used in many home computers during the eighties (Atari ST, Amstrad CPC and MSX among others). In 1985 Sinclair released the ZX Spectrum 128 which included the AY-3-8912 sound chip (a variant of AY-3-8910 with fewer pins) to complement the simple beeper used in previous models. General functions The sound chip has three channels, each with a square tone generator and a white noise generator. There is also a volume envelope function which can be applied to modify the signal's attack and decay (also in repeating patterns). Only one envelope can be applied at any time across all three channels but it can be switched on or off per channel. An important point is that the sound chip works like a state machine, meaning that if you set a parameter to a value, this parameter will stay the same until you change it. So, you can't tell the sound chip to produce a signal for a certain time period - you have to tell it exactly when to turn the signal on and off. Registers The AY-3-8910 sound chip has 14 registers for different parameters: Register Function Range 0 Channel A fine tone period 8-bit(0-255) 1 Channel A coarse tone period 4-bit(0-15) 2 Channel B fine tone period 8-bit(0-255) 3 Channel B coarse tone period 4-bit(0-15) 4 Channel C fine tone period 8-bit(0-255) 5 Channel C coarse tone period 4-bit(0-15) 6 Noise period 5-bit(0-31) 7 Mixer 8-bit 8 Channel A volume 4-bit(0-15) 9 Channel B volume 4-bit(0-15) 10 Channel C volume 4-bit(0-15) 11 Envelope fine period 8-bit(0-255) 12 Envelope coarse period 8-bit(0-255) 13 Envelope shape 4-bit(0-15)
Notes about the registers:
Value Shape 0-3: \__________ (decay - silence) 4-7: /|_________ (attack - silence) 8: \|\|\|\|\|\ (repeated decay) 9: \__________ (decay - silence) 10: \/\/\/\/\/\ (repeated decay/attack) 11: \|^^^^^ (decay - max volume) 12: /|/|/|/|/|/ (repeated attack) 13: /^^^^^ (attack - max volume) 14: /\/\/\/\/\/ (repeated attack/decay) 15: /|_________ (attack - silence)
How the Spectrum interacts with the sound chip
The Spectrum controls the sound chip registers by first placing the register number on port $FFFD and then placing the parameter value on port $BFFD.
1 Comment
7/31/2023 03:04:52 pm
Great stuff this and the other related posts really helped me write my ZX Spectrum emulator.
Reply
Leave a Reply. |
Archives
November 2020
Categories
All
|