The AY-3-8910 is a 3-voice programmable sound generator (PSG) designed by General Instrument in 1978, initially for use with their 16-bit CP1610 or one of the PIC1650 series of 8-bit microcomputers. The AY-3-8910 and its variants were used in many arcade games—Konami's Gyruss contains five—and pinball machines as well as being the sound chip in the Intellivision and Vectrex video game consoles, and the Amstrad CPC, Oric-1, Colour Genie, Elektor TV Games Computer, MSX, and later ZX Spectrum home computers. It was also used in the Mockingboard and Cricket sound cards for the Apple II and the Speech/Sound Cartridge for the TRS-80 Color Computer.
After General Instrument's spinoff of Microchip Technology in 1987, the chip was sold for a few years under the Microchip brand. It was also manufactured under license by Yamaha (with a selectable clock divider pin and a double-resolution and double-rate volume envelope table) as the YM2149F; the Atari ST uses this version. It produces very similar results to the Texas Instruments SN76489 and was on the market for a similar period.
The chips are no longer made, but functionally-identical clones are still in active production. An unofficial VHDL description is freely available for use with FPGAs.
Description
The AY-3-8910 was essentially a state machine, with the state being set up in a series of sixteen 8-bit registers. These were programmed over an 8-bit bus that was used both for addressing and data by toggling one of the external pins. For instance, a typical setup cycle would put the bus into "address mode" to select a register, and then switch to "data mode" to set the contents of that register. This bus was implemented natively on GI's own CPUs, but it had to be recreated in glue logic or with the help of an additional interface adapter such as the MOS Technology 6522 when the chip was used with the much more common MOS Technology 6502 or Zilog Z80 CPUs.
Six registers controlled the pitches produced in the three primary channels. The wavelength to generate was held in two eight-bit registers dedicated to each channel, but the value was limited to 12-bits for other reasons, for a total of 4095 (the register value is used as the frequency divider and 0 is treated as 1) different pitches. Another register controlled the period of a pseudo-random noise generator (a total of 31 different cycle times), while another controlled the mixing of this noise into the three primary channels.
Three additional registers controlled the volume of the channels, as well as turning on or off the optional envelope controls on them. Finally the last three registers controlled the times of the envelope controller, by setting the envelope type and envelope cycle time. A total of eight envelope types include sawtooth shape or triangle shape, starting on either maximum or minimum. The shape can also be set to repeat for a cycling effect. A total of 65535 different cycle times can be set. As there was only one envelope shared between all three channels, many programmers ignored it and programmed their own envelope controllers in software (controlling volume directly). A well known trick was to run the hardware envelope at cycle times above 20 Hz to produce sawtooth or triangle-wave like bass sounds.
Although there are only 16 registers, the four MSB bits of the 8-bit bus must be set to the factory default '0000' value when selecting a register. Incorrectly setting the MSB bits causes the chip to ignore the register change. General Instruments did take orders for customized MSB bits (factory set to other than '0000'). The chips made with customize-set MSB register bits allow the same processor to control more than one AY chip on the same bus (e.g. TurboSound for ZX Spectrum). There are many new-old-stock (NOS) chips on the secondary market with MSB bits factory set to a non-'0000' value. The non-0000 value can cause significant developmental troubles for designers and repair technicians. Software must be written to identify the correct value of the MSB bits on any given chip. Also, software must be changed or hardware added to allow these factory set MSB chips to be used in place of the default '0000' chips.