POKEY


POKEY is a digital I/O chip designed by Doug Neubauer at Atari, Inc. for the Atari 8-bit computers. It was first released with the Atari 400 and Atari 800 in 1979 and is included in all later models and the Atari 5200 console.
POKEY combines functions for reading paddle controllers and computer keyboards as well as sound generation and a source for pseudorandom numbers. It produces four voices of distinctive square wave audio, either as clear tones or modified with distortion settings. Neubauer also developed the Atari 8-bit killer application Star Raiders which makes use of POKEY features.
POKEY chips are used for audio in many arcade video games of the 1980s including Centipede, Missile Command, Asteroids Deluxe, and Gauntlet. Some of Atari's arcade systems use multi-core versions with 2 or 4 POKEYs in a single package for more audio channels. The Atari 7800 console allows a game cartridge to contain a POKEY, providing better sound than the system's audio chip. Three licensed games make use of this: the ports of Ballblazer, Commando, and Tiger-Heli.
The LSI chip has 40 pins and is identified as C012294. The USPTO granted U.S. Patent 4,314,236 to Atari on February 2, 1982 for an "Apparatus for producing a plurality of audio sound effects". The inventors listed are Steven T. Mayer and Ronald E. Milner.

Features

By part number:
  • C012294 — Used in all Atari 8-bit computers, including the Atari XEGS, and the Atari 5200 console. The suffix on the chip refers to the manufacturer:
  • *C012294B-01 — AMI
  • *C012294-03 — Signetics
  • *C012294-19 — National Semiconductor
  • *C012294-22 — OKI Semiconductor
  • *C012294-31 — IMP
  • 137430-001 — Part number sometimes used in Atari arcade machines for POKEY.
  • 137324-1221 — Quad-Core POKEY used in Atari arcade machines Major Havoc, I, Robot, Firefox, and Return of the Jedi.
Atari used several different manufacturers for the chip, however AMI produced most of them in 1983 onward. Early chips were manufactured on a 5 micrometer process, this was later shrunk to 3 micrometers. AMI-produced POKEYs have been reported as having a high failure rate compared with other brands of the chip; the reasons for this are unclear, but speculated to be a fault of the chip packaging or bonding wires. Some limited success in reviving nonfunctional POKEYs by heating them in an oven has been reported. There also exist modern FPGA replacements such as POKEYOne.

Pinout

Pin NamePin NumberDescription
A0 - A336, 35, 34, 33Memory Address Input
ACLK27Serial Clock Output
AUD37Audio Output
BCLK26Bi-direction Clock I/O
CS030Chip Select
CS131Chip Select
D0 - D738, 39, 40, 2, 3, 4, 5, 6Data Bus I/O
IRQ29Interrupt Request Output
K0 - K523, 22, 21, 20, 19, 18Keyboard Scan Output
KR1 - KR225, 16Keyboard Row strobe Input
P0 - P714, 15, 12, 13, 10, 11, 8, 9Potentiometer Scan
R/W32Read/Write I/O Control
SID24Serial Input Data
SOD28Serial Output Data
Vcc17Power +5 Volts
Vss1Ground
Ø27Phase 2 Clock Input

Registers

The Atari 8-bit computers map POKEY to the $D2xxhex page and the Atari 5200 console maps it to the $E8xxhex page.
POKEY provides 29 Read/Write registers controlling Sound, Paddle input, keyboard input, serial input/output, and interrupts. Many POKEY register addresses have dual purposes performing different functions as a Read vs a Write register. Therefore, no code should read Hardware registers expecting to retrieve the previously written value.
This problem is solved for some registers by Operating System "Shadow" registers implemented in regular RAM that mirror the values of hardware registers. During the Vertical Blank the Operating System copies the Shadow registers in RAM for Write registers to the corresponding hardware register, and updates Shadow values for Read registers from the hardware accordingly. Therefore, writes to hardware registers which have corresponding shadow registers will be overwritten by the value of the Shadow registers during the next vertical blank.
Reading values directly from hardware at an unknown stage in the display cycle may return inconsistent results. Operating System Shadow registers for Read registers would usually be the preferred source of information.
Some Write hardware registers do not have corresponding Shadow registers. They can be safely written by an application without the value being overwritten during the vertical blank. If the application needs to know the last value written to the register then it is the responsibility of the application to implement its own shadow value to remember what it wrote.
NameDescriptionRead/WriteHex AddrDec AddrShadow NameShadow Hex AddrShadow Dec Addr
AUDF1Audio Channel 1 FrequencyWrite$D20053760
POT0Potentiometer 0Read$D20053760PADDL0$0270624
AUDC1Audio Channel 1 ControlWrite$D20153761
POT1Potentiometer 1Read$D20153761PADDL1$0271625
AUDF2Audio Channel 2 FrequencyWrite$D20253762
POT2Potentiometer 2Read$D20253762PADDL2$0272626
AUDC2Audio Channel 2 ControlWrite$D20353763
POT3Potentiometer 3Read$D20353763PADDL3$0273627
AUDF3Audio Channel 3 FrequencyWrite$D20453764
POT4Potentiometer 4Read$D20453764PADDL4$0274628
AUDC3Audio Channel 3 ControlWrite$D20553765
POT5Potentiometer 5Read$D20553765PADDL5$0275629
AUDF4Audio Channel 4 FrequencyWrite$D20653766
POT6Potentiometer 6Read$D20653766PADDL6$0276630
AUDC4Audio Channel 4 ControlWrite$D20753767
POT7Potentiometer 7Read$D20753767PADDL7$0277631
AUDCTLAudio ControlWrite$D20853768
ALLPOTRead 8 Line POT Port StateRead$D20853768
STIMERStart TimersWrite$D20953769
KBCODEKeyboard CodeRead$D20953769CH$02FC764
SKRESTReset Serial Status Write$D20A53770
RANDOMRandom Number GeneratorRead$D20A53770
POTGOStart POT Scan SequenceWrite$D20B53771
SEROUTSerial Port Data OutputWrite$D20D53773
SERINSerial Port Data InputRead$D20D53773
IRQENInterrupt Request EnableWrite$D20E53774POKMSK$1016
IRQSTIRQ StatusRead$D20E53774
SKCTLSerial Port ControlWrite$D20F53775SSKCTL$0232562
SKSTATSerial Port StatusRead$D20F53775

In the individual register listings below the following legend applies:
Bit ValueDescription
0Bit must be 0
1Bit must be 1
?Bit may be either 0 or 1, and is used for a purpose.
-Bit is unused, or should not be expected to be a certain value
labelRefer to a later explanation for the purpose of the bit.