POKEY

Year
1979
Type
Component
Category
Custom chip — sound, keyboard, serial I/O, timers
Manufacturer
Atari, Inc.
POKEY chip marked C012294-31 on a circuit board

Overview

POKEY — the name comes from POtentiometer and KEYboard — is the Atari 8-bit's input/output chip, and the source of its distinctive sound. It was designed by Doug Neubauer, who also wrote Star Raiders. Unlike the specialist sound chips of other machines, POKEY is a general-purpose I/O device whose four programmable frequency dividers happen to make excellent tone generators. The same chip:

  • generates the four audio voices;
  • scans the keyboard and reads the eight paddle ("pot") inputs;
  • runs the Serial I/O (SIO) bus to disk drives, recorders, printers and modems — including the two-tone audio used to record data on cassette;
  • provides hardware timers, several maskable interrupts (IRQs) and a random-number register.

POKEY lives at $D200–$D20F. Beyond the 8-bit computers and the 5200, Atari used it in some 40 coin-op arcade games from Missile Command (1980) to Tetris and Vindicators Part II (1989), and in the 7800 cartridges Ballblazer and Commando.

Specifications

Item Detail
Part number C012294 (single version for NTSC and PAL machines)
Voices 4 × 8-bit dividers, or 2 × 16-bit, or one 16-bit plus two 8-bit
Tone types Pure square wave plus 7 "distortion" (polynomial-counter noise) settings per voice
Volume 16 levels per voice; "volume only" mode gives 4-bit PCM sample playback
Clock sources Machine clock (1.79 MHz NTSC / 1.77 MHz PAL), ÷28 (≈64 kHz) or ÷114 (≈15.7 kHz)
Paddle inputs 8 pot lines, counted once per scan line, values 1–228
Serial SIO data in/out and clock lines; drives cassette FSK tones in two-tone mode
Other Keyboard scan, timer IRQs, BREAK key IRQ, serial IRQs, RANDOM register

How the sound works

Each voice divides one of three base clocks by a value in its AUDF register, and its AUDC register selects the waveform and volume. Channels 1 and 3 may run directly from the 1.79 MHz machine clock, and pairs can be joined into 16-bit channels for accurate pitches across a wide range; because the clocks derive from the machine clock, the same AUDF value plays very slightly differently on NTSC and PAL machines. The noise comes from three shared polynomial counters (4-bit, 5-bit, and a 17-bit one that can be shortened to 9 bits) running at the machine clock; they give POKEY its engine rumbles and explosions and also feed the RANDOM register. Output is mono; only the 400/800 put the keyclick on a separate internal speaker.

From BASIC, the SOUND voice,pitch,distortion,volume statement drives the same registers:

10 SOUND 0,121,10,8:REM DISTORTION 10 = PURE TONE
20 FOR I=1 TO 300:NEXT I
30 SOUND 0,0,0,0

Using it today / tips

  • Cassette and modem tricks. POKEY's two-tone mode creates the cassette data tones, and that the 1030 modem's tone dialling is produced by POKEY in volume-only mode.
  • Stereo. A popular unofficial modification piggy-backs a second POKEY selected by address line A4 — even register mirrors address the original chip, odd mirrors the second. Software written for "stereo POKEY" expects this layout. (Modern stereo and replacement-POKEY boards are covered in their own entries.)
  • Paddles and tablets are read through the pot lines, so a failing POKEY can show up as dead paddles or a dead keyboard as well as missing sound.
  • SIO speed. Standard disk I/O runs at 19,200 bit/s, but because POKEY's divisors are programmable, high-speed drive upgrades and SIO2PC-style devices push it far faster.

Credits