Skip to content

AY-3-8910

General Instrument's three-voice sound generator

General Instrument's programmable sound generator, documented in February 1979: three square-wave tone channels, a noise source, one envelope generator and two 8-bit I/O ports in a 40-pin package. Its 28-pin sibling and Yamaha's pin-compatible YM2149 put the same sixteen registers into the Spectrum 128, Amstrad CPC, MSX, Atari ST and Vectrex.

General Instrument’s data manual for the AY-3-8910 opens with the problem it was built to solve. A processor can make sound on its own, it says, but “video games need refreshing, keyboards need scanning”. Just to hold one channel on the C five octaves above middle C, “the signal needs attention every sixty microseconds”. The AY-3-8910 took that job away from the processor. A program loads a few registers, and the chip keeps three voices and a noise source running on its own until it is told to stop.

The manual is dated February 1979. By September that year the chip was on sale to hobbyists. A mail-order advertisement in BYTE offered it as a “NEW! G.I. COMPUTER SOUND CHIP” at $14.95, with the warning “Initial stock very limited”. Some later accounts date the chip to 1978, but no dated public source shows it before the February 1979 manual.

Fast facts

  • Maker: General Instrument. Yamaha made a pin-compatible part, the YM2149.
  • Voices: three square-wave tone channels plus one noise generator, which any channel can mix in.
  • Outputs: three separate analogue outputs, one per channel. Each machine decided how to mix them.
  • Volume: 16 levels per channel on a logarithmic scale, or a shared hardware envelope.
  • I/O: two general-purpose 8-bit ports on the 40-pin AY-3-8910.
  • Registers: sixteen, all readable as well as writable.

One design, several packages

General Instrument sold the same sound generator in three packages, and they differ in how many I/O ports survive:

Part I/O ports Pins
AY-3-8910 A and B 40
AY-3-8912 A only 28
AY-3-8913 none 24

The February 1979 manual covers only the 8910 and the 8912. The 24-pin 8913 appears in General Instrument’s later, undated data sheet. The sound hardware is the same in all three. The 8912 also drops the A9 chip-select input, and the 8913 adds a separate chip-select pin.

Yamaha’s YM2149 is “Pin compatible with AY-3-8910 manufactured by GI”, according to Yamaha’s data sheet, and uses the same sixteen registers. It differs in two ways a programmer can hear or measure. Its envelope has 5-bit resolution, so an envelope ramp takes 32 steps where General Instrument’s takes 16. It also has a SEL pin that can halve the input clock before the chip uses it.

General Instrument’s data sheet suggests driving the chip from its own processors, “the General Instrument 16-bit CP1610 or one of the PIC1650 series”. The CP1610 was the processor in Mattel’s Intellivision. The Intellivision II’s parts list names its sound chip as a General Instrument AY-3-8914, a separate part number.

What the chip does

A 12-bit period sets each tone. The chip divides its input clock by 16, then by the period, so a bigger number gives a lower note. The noise generator uses a 5-bit period and produces what the data sheet calls “a frequency modulated pseudo random pulse width square wave output”. The sixteen registers, in decimal:

Registers Job
R0–R5 Tone period for channels A, B and C: a fine byte and a coarse 4-bit nibble each
R6 Noise period, 5 bits
R7 Mixer and I/O direction
R8–R10 Channel volume: 4-bit level, plus a mode bit that hands the channel to the envelope
R11–R12 Envelope period, 16 bits (R11 fine, R12 coarse)
R13 Envelope shape
R14–R15 Data for I/O ports A and B

General Instrument numbers these registers in octal, R0 to R17. Its “Amplitude Control R10–R12” are decimal R8–R10, its envelope registers R13–R15 are decimal R11–R13, and its port registers R16–R17 are decimal R14–R15. The AY-3-8912 entry covers this trap and the Spectrum 128’s use of the chip in more detail.

Volume. The chip converts each channel’s 4-bit level in “logarithmic steps”, because, the data sheet explains, the sound is meant for “the highly imperfect amplitude detection mechanism of the human ear”.

Envelopes. The envelope generator divides the clock by 256, then by a 16-bit period, and steps a 4-bit counter up or down. Four bits of the shape register pick the pattern. General Instrument calls them Continue, Attack, Alternate and Hold. The data sheet’s drawing of all sixteen codes shows these shapes:

Code (hex) Shape
00–03 one fall to silence, then stays silent
04–07 one rise to full volume, then drops to silence and stays there
08 repeated falls, a sawtooth
09 one fall, then silent (same as 00)
0A fall-rise-fall, a repeating triangle
0B one fall, then jumps to full volume and holds
0C repeated rises, a rising sawtooth
0D one rise, then holds at full volume
0E rise-fall-rise, a repeating triangle
0F one rise, then silent (same as 04)

All three channels share the single envelope generator. Amstrad’s CPC firmware did its volume envelopes in software instead, by rewriting the volume registers. Its guide said the software envelopes “can achieve all that the sound chip is capable of unless very short attacks or decays are required”.

The register that does two jobs

The chip’s oddest feature is not in its sound. General Instrument heads register 7 “Mixer Control-I/O Enable”. Its low six bits switch tone and noise on each channel, and its top two bits set the direction of the I/O ports:

Bits Job
B0–B2 tone on channels A, B, C (0 = on)
B3–B5 noise on channels A, B, C (0 = on)
B6 port A direction (0 = input, 1 = output)
B7 port B direction (0 = input, 1 = output)

Every enable bit works back to front. The data sheet draws a bar over “Tone Enable”, “Noise Enable” and “Input Enable”, and Yamaha’s YM2149 data sheet spells it out: “Input is selected when ‘0’ is written to the register bits.” Amstrad’s manual for the Spectrum +2 prints the port bit the other way round, as “1 = input port, 0 = output port”. General Instrument, Yamaha and Abacus’s Atari ST Internals all say a 1 makes the port an output.

Machine designers put those ports to work, which is why the shared register mattered. A program that silences a channel is writing the same byte that decides whether a port reads or writes, so it has to put the top two bits back exactly as it found them. What was on the other end of the port differed from machine to machine:

  • Amstrad CPC. The keyboard and joysticks are read through the chip’s port. Amstrad’s firmware guide told programmers to write sound registers through its own MC SOUND REGISTER routine, “because the keyboard is attached to the I/O port of the sound chip” and “the keyboard scanning routine expects to find the sound chip in a standard state”.
  • Atari ST. Port A selects the floppy drive and the disk side and drives the RS-232 RTS and DTR lines and the Centronics strobe. Port B is the printer’s data port.
  • MSX. Port A reads the two joystick ports and the cassette input. Port B drives the joystick ports’ output pins and selects which of the two port A reads.
  • Spectrum 128, +2 and +3. The 8912’s one port runs the RS232/MIDI socket and the keypad connector.
  • Vectrex. The 8912’s port reads the four action buttons on the hand controllers, according to the service manual.
  • Intellivision. The service manual says the sound generator’s “two 8-bit general purpose I/O ports are provided for user interface via the hand controllers”.

Where it was used

The same sixteen registers turn up across home computers, consoles and coin-ops. The clock changes, though, so a table of note periods written for one machine plays out of tune on another.

Machine Part Clock How a program reaches it
ZX Spectrum 128, +2, +3 AY-3-8912 1.7734 MHz port $FFFD selects a register, $BFFD writes it
Amstrad CPC AY-3-8912 1.00 MHz through ports of the 8255 interface chip
MSX “GI AY-3-8910 compatible” 1.7897725 MHz ports A0h (register select), A1h (write), A2h (read)
Atari ST Yamaha YM2149 — $FF8800 selects or reads, $FF8802 writes
Vectrex AY-3-8912 — through the console’s peripheral interface adapter
Tatung Einstein AY-3-8910 — I/O addresses 00–07

The Amstrad and the Spectrum 128 used the same 28-pin part, but their clocks are 1.00 MHz and 1.7734 MHz, so the same period value gives two different notes. The MSX standard never required General Instrument’s own chip, only one “GI AY-3-8910 Compatible”, clocked at half the processor’s speed. On the CPC the three voices come out in stereo through the rear socket. Amstrad’s firmware guide says channels A and B are mixed for one side and B and C for the other, so B sits in the middle.

The chip also went into arcade boards. A Gremlin/Sega sound board drawn in September 1981, published with the schematics for Konami’s Frogger, carries an AY-3-8910.

Sources

  • General Instrument, AY-3-8910/8912 Programmable Sound Generator Data Manual (February 1979), title page and section 1, introduction: the date, the two parts covered, and the “sixty microseconds” problem.
  • General Instrument, AY-3-8910/8912/8913 Programmable Sound Generator data sheet (undated), pp. 5-18 to 5-22: packages and ports; the CP1610 and PIC1650; the sixteen readable registers in octal numbering; tone, noise and envelope dividers; the R7 mixer and I/O enable register; logarithmic D/A conversion; Fig. 1, the envelope shapes.
  • Yamaha, YM2149 SSG data sheet: pin compatibility with the AY-3-8910; the 5-bit envelope and D/A converter; the SEL clock divider; R7 port direction.
  • BYTE, September 1979, p. 247: Digital Research Computers (of Texas) advertisement for the AY-3-8910 at $14.95.
  • Sinclair ZX Spectrum +2 manual (Amstrad), Part 29, pp. 166–167: the AY-3-8912, ports $FFFD and $BFFD, the 1.7734 MHz clock, the RS232/MIDI and keypad ports, and the R7 bit description.
  • CPC464 Firmware (AMSOFT, 1984), section 1 and section 7.1: the AY-3-8912 and its I/O port reading the keyboard and joysticks; the 8255 connection; stereo mixing; software envelopes; appendix XII: the 1.00 MHz clock.
  • MSX Technical Data Book (ASCII Corporation), sections 1.3.6, 1.4.5 and 1.7.5, and the PSG port pin table, p. 44: the sound chip specification and clock, the PSG port addresses, and the joystick ports on the PSG.
  • Atari ST Internals (Abacus Software, 1986), section 1.6 and the $FF8800 register description, pp. 48–60: the YM-2149, its R7 port bits, and the use of ports A and B.
  • G.C.E. Vectrex Service Manual (1982), p. 8: the AY-3-8912 and its I/O port reading the action switches.
  • Intellivision II Service Manual (Mattel Electronics, 1982): the programmable sound generator and its hand-controller ports; parts list, p. 21 (U6, AY-3-8914).
  • Tatung Einstein hardware manual: parts list and I/O map (AY-3-8910, PSG at 00–07).
  • Gremlin/Sega, Sound Board schematic, drawing 834-0074, September 1981, as published by the International Arcade Museum with its Frogger schematics (web, secondary for the game attribution).

See also

Checked. Verified against primary sources and signed off by a person.