Overview
The AY-3-8910 Programmable Sound Generator (PSG) was ubiquitous in 1980s computing. Its three square wave channels, noise generator, and hardware envelopes provided a consistent sound across platforms. While not as characterful as the SID, its widespread adoption made it the common tongue of chiptune.
Fast facts
- Manufacturer: General Instrument (later Microchip).
- Channels: 3 tone generators + 1 noise generator.
- Output: mono (some systems mixed to stereo).
- Variants: AY-3-8912 (fewer I/O pins), AY-3-8913 (no I/O), YM2149 (Yamaha clone).
Architecture
| Feature | Specification |
|---|
| Tone channels | 3 × 12-bit frequency divider |
| Noise | 5-bit frequency, LFSR-based |
| Mixer | per-channel tone/noise enable |
| Envelopes | 1 shared envelope generator |
| Volume | 4-bit per channel (16 levels) |
Register map
| Register | Purpose |
|---|
| R0-R1 | Channel A frequency (12-bit) |
| R2-R3 | Channel B frequency (12-bit) |
| R4-R5 | Channel C frequency (12-bit) |
| R6 | Noise frequency (5-bit) |
| R7 | Mixer control |
| R8-R10 | Channel volumes (4-bit each) |
| R11-R12 | Envelope period (16-bit) |
| R13 | Envelope shape |
| R14-R15 | I/O ports (if present) |
Mixer register (R7)
| Bit | Function (0 = enabled) |
|---|
| 0 | Channel A tone |
| 1 | Channel B tone |
| 2 | Channel C tone |
| 3 | Channel A noise |
| 4 | Channel B noise |
| 5 | Channel C noise |
| 6-7 | I/O port direction |
Envelope shapes (R13)
| Value | Shape | Description |
|---|
| $00-$03 | \__ | Decay then hold low |
| $04-$07 | / | __ |
| $08 | \\ | Repeating decay |
| $09 | \__ | Single decay |
| $0A | \/\/ | Decay-attack cycle |
| $0B | \‾‾ | Decay then hold high |
| $0C | //// | Repeating attack |
| $0D | /‾‾ | Single attack, hold high |
| $0E | /\/\ | Attack-decay cycle |
| $0F | / | __ |
ZX Spectrum 128K
- Access: port $FFFD (register select), port $BFFD (data write).
- Clock: 1.7734 MHz (PAL).
- Stereo: ABC arrangement via Melodik interface or software mixing.
Amstrad CPC
- Access: via PPI (8255), more complex addressing.
- Clock: 1 MHz.
- Stereo: hardware stereo (A left, B centre, C right).
MSX
- Access: ports $A0-$A2.
- Clock: varies by region.
Atari ST
- Chip: YM2149 (Yamaha clone).
- Access: memory-mapped at $FF8800-$FF8802.
- Stereo: three fixed channels via microwire.
Programming techniques
- Arpeggios: rapid note changes simulate chords.
- Software envelopes: bypass limited hardware envelope for flexibility.
- Noise drums: mix noise with short tone bursts for percussion.
- Digidrum: fast volume register updates for sample playback.
- Buzzer bass: envelope-driven bass using the single envelope generator.
AY-3-8910 vs AY-3-8912
| Feature | 8910 | 8912 |
|---|
| I/O ports | 2 | 1 |
| Pin count | 40 | 28 |
| Sound | Identical | Identical |
See also