The AY-3-8910 is a 3-voice programmable sound generator (PSG) designed by General Instrument (GI) in 1978, initially for use with their 16-bit CP1610 or one of the PIC1650 series of 8-bit microcomputers. It has three channels of sound with a wide frequency response that can produce almost all of the notes on an 88-key piano. These can be modified by a shared envelope generator and random noise channel that can be added to produce sound effects. The AY-3-8910 and its variants were used in many arcade video games—Konami's Gyruss contains five—and Bally 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, Tiki 100 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 GI'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. The chips are no longer made, but functionally-identical clones are still in active production. An unofficial VHDL description based on the YM2149 is freely available for use with FPGAs.
Description
Bus system The AY-3-8910 is a simple finite-state machine. Its state of sixteen 8-bit registers are programmed over an 8-bit bus, which is used both for addressing and data. Reading or writing requires two cycles. For instance, a typical setup cycle puts the bus into "address mode" and writes the value onto the bus to select a register, and then switches 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. There are only 16 registers, requiring only four bits of the 8-bit value indicated while in "address mode". In most examples, the four MSB bits of the value 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. GI did take orders for customized versions that responded only to MSB values other than '0000'. These allow the same processor to control more than one AY chip on the same bus (e.g. TurboSound for ZX Spectrum), using the MSB values as a chip select. 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.
Tones The system has three output channels, A, B and C, which are produced by mixing several possible inputs. Six registers, R0 through R5, control the pitches produced in the three primary tone generators. The frequency to generate is held in two 8-bit registers dedicated to each channel, the fine and coarse tuning registers. Channel A had fine control in R0 and coarse in R1, channel B used R2 and R3, etc. The upper four bits of the coarse registers are unused, leaving twelve bits to produce values from 1 to 4,095 (0 is treated as a 1 for technical reasons). The 12-bit value is used as the frequency divider on the input clock, producing an output tone in the corresponding channel. The 8910 is capable of running on an input clock of 4 MHz, or 6 MHz with the YM2149F. This allows it to generate tones with fundamental frequencies up to 125 kHz, well beyond human hearing range and into the ultrasonic range. The existence of ultrasonic values is a consequence of the frequency-divider design; in order to have adequate resolution at audible frequencies it is necessary for the overall clock rate (and thus the output at small divisors) to be considerably higher than the audible range. Only divisors below 5 give entirely-ultrasonic output frequencies. Frequencies equivalent to the top octave of a piano keyboard can be defined with reasonable accuracy versus the accepted note values for the even-tempered scale, to nearly 1 Hz precision in the A440 range and even more finely at lower pitches. Despite the high maximum frequency, the ability to divide that figure by 4096 means the lowest directly definable output frequency is 30.6 Hz, roughly equal to B0, the third lowest note on a normal 88-key piano, and as good as subsonic with everyday speaker systems. In essence, the chip is able to produce decently musical output at all reasonable pitches found in most compositions. By contrast, the competing Texas Instruments SN76489 only has 10 bits of precision for its frequency dividers. Having the same base frequency of 125 kHz, it should in theory lack the two lowest octaves of the 8910. To get around this, the SN76489 plays its tone generators one octave lower than their calculated frequency, giving it one octave less in the bass and one octave less in the top compared to the 8910.
… excerpt ends here. Continue reading the full article.





