General Instrument AY-3-8910

From Wikipedia, the free encyclopedia
  (Redirected from YM2149)
Jump to: navigation, search
AY-3-8910 chip DIP 40

Problems playing this file? See media help.

The AY-3-8910 is a 3-voice Programmable Sound Generator (PSG) designed by General Instrument, 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 became popular chips in many arcade games, and were used on, among others, the Intellivision and Vectrex video game consoles and the MSX, Amstrad CPC, Oric 1, Colour Genie, Elektor TV Games Computer and Sinclair ZX Spectrum 128/+2/+3 home computers as well as the Mockingboard sound card for the Apple II family. It was also produced under license by Yamaha (with minor modifications, i.e. a selectable clock divider pin, and a double-resolution but double-rate volume envelope table) as the YM2149F; the Atari ST uses this version.

It produced very similar results to the Texas Instruments SN76489 and was on the market for a similar period.

After General Instrument's spinoff of Microchip Technology in 1987, the chip was produced for a few years under the Microchip Technology brand instead.

The chips are no longer made, but a declining stock is still obtainable for servicing vintage machines. A VHDL equivalent description has been written, for use in FPGA recreations of arcade machines and others like those mentioned above. The VHDL source code is available on the Internet, and compiles to fill about 10% of a Xilinx XC2S300 FPGA.




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 ADSR envelope controller, by setting the lengths of time for each stage of the cycle. Unlike most systems, the 8910 used fixed times for the sustain and release, and a repeatable attack and decay pattern. For instance, the system could repeat the AD cycle of the sound over and over, or alternately invert it, starting loud and reducing to the sustain level without any attack phase.


The AY-3-8910 generates sound at a sample rate of 111.86 kHz, considered high even for today's standards.


AY-3-8912 chip, 28-pin DIP package

The 8910 silicon chip was sold in three different packages.

YM2149F chip, 40-pin DIP package



The AY-3-8913 is the same chip in a 24-pin package, with both parallel ports not connected. Some users thought the small reduction in pin count over the 8912 made it less interesting, however, the I/O registers were rarely used by designers so General Instruments created this fully functional 24 pin alternative and released it approximately 6 months after the 8910 and 8912 chips. The goal was to reduced complexity for the designer and reduce the foot print on the PCB.


The Yamaha YM3439 is a CMOS version of the YM2149F. It exist in two packages: 40-pin DIP (YM3439-D) and 44-pin QFP (YM3439-F).

The Yamaha YMZ294 is one of the newest variants of the YM2149, but in a 18-pin package. Has no parallel ports and only one sound output with the three channels mixed.

The Yamaha YMZ284 is an even smaller variation of the YM2149, in a 16-pin package. It's basically YMZ294 without the 4/8 MHz selection pin and the /TEST pin.


The AY-3-8914 has the same pinout and is in the same 40-pin package as the AY-3-8910, except the control registers on the chip are shuffled around, and the 'expected input' on the A9 pin may be different. Otherwise it is exactly the same as the AY-3-8910. It was used on the Mattel Intellivision.


Advanced techniques[edit]

Although the chip wasn't designed to handle raw PCM data (digital sound), the effect could be simulated. The chip used a simple OR based mixing function for combining noise and tone on its three channels and could be persuaded to produce a level non-zero wave. By altering the volume this level wave could be shaped into a waveform. Obviously, this involved more CPU usage than chips designed for this purpose (such as the MOS Technology 8364 "Paula" as used in the Commodore Amiga), but it was nevertheless a technique widely used on platforms such as the Atari ST and less frequently the Amstrad CPC to play sampled music, and on the ZX Spectrum 128 and MSX to play short audio samples, in some games.

Doing the same thing fewer times per second (in the order of 30 to 300 per second) allows the use of an arbitrary software-defined envelope on each of the three channels individually. This takes negligible CPU power (provided there is some timer interrupt or vertical blank interrupt) and can be used in games.

In turn, the now useless envelope functionality can be set to very high frequency, actually generating a waveform that is not the usual square wave, thanks to the timbre-altering effects of amplitude modulation. However, to obtain harmonic results, the modulating envelope must be related to the pitch of the desired note, and because the granularity by which high-frequency envelopes can be set is low, music composed for the chip generally uses this technique only for bass lines.

Another method was to set one channel output to idle high, then use the volume control as a simple logarithmic 4-bit Digital-to-Analog Converter. This however resulted in poor audio quality, because it only had 16 output levels and these were logarithmically spaced.

A more sophisticated method was to use all three channels wired together, and exploit the non-linearity of the mixing to produce many intermediate output levels. Having modeled the non-linearity of the three channels, developers had to find suitable values by exhaustive search. Having done so, they produced an 8-bit to 3×4-bit lookup table. This allowed 8-bit audio samples to be played fairly adequately, though not as well as a real 8-bit D/A converter. The problem of this technique is that the player cannot change the volume of the three channels as a single operation. This implies unwanted output levels between two successive samples.

In 2006, two MSX developers created an advanced encoder that converts a wave file to optimal PSG channel transitions using a Viterbi search. They replayed a 44.1 kHz wave file on a 23-year-old MSX and achieved a higher signal-to-noise ratio than an 8-bit DAC. The Viterbi search is rather CPU intensive, so even though it would have been theoretically possible to use this method already in the 80's, there were no computers powerful enough to perform the analysis required.

The AY chip has been used by a number of groups, such as the AY Riders (see external link below). Some of the works by such groups are in the style of computer game music from the era, while others are art music in their own right.

Some programs have been created specifically for writing AY chip music, such as Vortex Tracker.

Related chips[edit]



External links[edit]