HOME

TheInfoList



OR:

POKEY, an acronym for Pot Keyboard Integrated Circuit, is a digital I/O
chip Chromatin immunoprecipitation (ChIP) is a type of immunoprecipitation experimental technique used to investigate the interaction between proteins and DNA in the cell. It aims to determine whether specific proteins are associated with specific genom ...
designed by
Doug Neubauer Doug Neubauer is an American integrated circuit designer, video game designer, and programmer best known for the logic design on Atari's POKEY chip and designing and programming the 1979 video game ''Star Raiders'' which became the killer app f ...
at Atari, Inc. for the
Atari 8-bit family The Atari 8-bit family is a series of 8-bit home computers introduced by Atari, Inc. in 1979 as the Atari 400 and Atari 800. The series was successively upgraded to Atari 1200XL , Atari 600XL, Atari 800XL, Atari 65XE, Atari 130XE, Atari 800XE, ...
of home 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 The Atari 5200 SuperSystem or simply Atari 5200 is a home video game console introduced in 1982 by Atari, Inc. as a higher-end complement for the popular Atari Video Computer System. The VCS was renamed to the Atari 2600 at the time of the 520 ...
console. POKEY combines functions for reading paddle controllers (
potentiometers A potentiometer is a three- terminal resistor with a sliding or rotating contact that forms an adjustable voltage divider. If only two terminals are used, one end and the wiper, it acts as a variable resistor or rheostat. The measuring instrum ...
) and
computer keyboard A computer keyboard is a peripheral input device modeled after the typewriter keyboard which uses an arrangement of buttons or keys to act as mechanical levers or electronic switches. Replacing early punched cards and paper tape technolog ...
s as well as sound generation and a source for pseduo-random numbers. It produces four voices of distinctive
square wave A square wave is a non-sinusoidal periodic waveform in which the amplitude alternates at a steady frequency between fixed minimum and maximum values, with the same duration at minimum and maximum. In an ideal square wave, the transitions b ...
audio, either as clear tones or modified with distortion settings. Neubauer also developed the Atari 8-bit
killer application In marketing terminology, a killer application (commonly shortened to killer app) is any computer program or software that is so necessary or desirable that it proves the core value of some larger technology, such as computer hardware, a video game ...
''
Star Raiders ''Star Raiders'' is a first-person space combat simulator for the Atari 8-bit family of computers. It was written by Doug Neubauer, an Atari employee, and released as a cartridge by Atari in March 1980. The game is considered the platform's kil ...
'' which makes use of POKEY features. POKEY chips are used for audio in many arcade video games of the 1980s including ''
Centipede Centipedes (from New Latin , "hundred", and Latin , " foot") are predatory arthropods belonging to the class Chilopoda (Ancient Greek , ''kheilos'', lip, and New Latin suffix , "foot", describing the forcipules) of the subphylum Myriapoda, ...
'', ''
Missile Command ''Missile Command'' is a 1980 shoot 'em up arcade video game developed and published by Atari, Inc. and licensed to Sega for Japanese and European releases. It was designed by Dave Theurer, who also designed Atari's vector graphics game '' Temp ...
'', ''
Asteroids Deluxe ''Asteroids Deluxe'' is a vector graphic multidirectional shooter released in arcades in April 1981 by Atari Inc. as the sequel to ''Asteroids''. It was followed by ''Space Duel'' in 1982 and ''Blasteroids'' in 1987. Key changes in ''Asteroids D ...
'', 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 The Atari 7800 ProSystem, or simply the Atari 7800, is a home video game console officially released by Atari Corporation in 1986 as the successor to both the Atari 2600 and Atari 5200. It can run almost all Atari 2600 cartridges, making it one ...
console allows a game cartridge to contain a POKEY, providing better sound than the system's audio chip. Only two licensed games make use of this: the ports of ''
Ballblazer ''Ballblazer'' is a futuristic sports game created by Lucasfilm Games and published in 1985 by Epyx. Along with ''Rescue on Fractalus!'', it was one of the initial pair of releases from Lucasfilm Games, ''Ballblazer'' was developed and first pu ...
'' and ''
Commando Royal Marines from 40 Commando on patrol in the Sangin">40_Commando.html" ;"title="Royal Marines from 40 Commando">Royal Marines from 40 Commando on patrol in the Sangin area of Afghanistan are pictured A commando is a combatant, or operativ ...
''. The LSI chip has 40 pins and is identified as C012294. The
USPTO The United States Patent and Trademark Office (USPTO) is an agency in the U.S. Department of Commerce that serves as the national patent office and trademark registration authority for the United States. The USPTO's headquarters are in Alexa ...
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. No longer manufactured, POKEY is emulated in software by arcade and Atari 8-bit emulators and also via the
Atari SAP music format SAP is a file format that stores music data from Atari 8-bit computers that uses the POKEY sound chip. Most popular tunes were written between 1981-1987. The format is similar to the SID, SPC or NSF formats, in that it is a music data format w ...
and associated player.


Features

* Audio ** 4 semi-independent audio channels ** Channels may be configured as one of: *** Four 8-bit channels *** Two 16-bit channels *** One 16-bit channel and two 8-bit channels ** Per-channel
volume Volume is a measure of occupied three-dimensional space. It is often quantified numerically using SI derived units (such as the cubic metre and litre) or by various imperial or US customary units (such as the gallon, quart, cubic inch). ...
,
frequency Frequency is the number of occurrences of a repeating event per unit of time. It is also occasionally referred to as ''temporal frequency'' for clarity, and is distinct from ''angular frequency''. Frequency is measured in hertz (Hz) which is eq ...
, and
waveform In electronics, acoustics, and related fields, the waveform of a signal is the shape of its graph as a function of time, independent of its time and magnitude scales and of any displacement in time.David Crecraft, David Gorham, ''Electro ...
(
square wave A square wave is a non-sinusoidal periodic waveform in which the amplitude alternates at a steady frequency between fixed minimum and maximum values, with the same duration at minimum and maximum. In an ideal square wave, the transitions b ...
with variable
duty cycle A duty cycle or power cycle is the fraction of one period in which a signal or system is active. Duty cycle is commonly expressed as a percentage or a ratio. A period is the time it takes for a signal to complete an on-and-off cycle. As a form ...
or
pseudorandom A pseudorandom sequence of numbers is one that appears to be statistically random, despite having been produced by a completely deterministic and repeatable process. Background The generation of random numbers has many uses, such as for rand ...
noise) ** 15 kHz or 64 kHz frequency divider. ** Two channels may be driven at the CPU clock frequency. **
High-pass filter A high-pass filter (HPF) is an electronic filter that passes signals with a frequency higher than a certain cutoff frequency and attenuates signals with frequencies lower than the cutoff frequency. The amount of attenuation for each frequency ...
* Keyboard scan (up to 64 keys) + 2 modifier bits (Shift, Control) + Break *
Potentiometer A potentiometer is a three-terminal resistor with a sliding or rotating contact that forms an adjustable voltage divider. If only two terminals are used, one end and the wiper, it acts as a variable resistor or rheostat. The measuring instrum ...
ports (8 independent ports, each with 8-bit resolution) * High Resolution Timers (audio channels 1, 2, and 4 can be configured to cause timer interrupts when they cross zero) *
Random number generator Random number generation is a process by which, often by means of a random number generator (RNG), a sequence of numbers or symbols that cannot be reasonably predicted better than by random chance is generated. This means that the particular outc ...
(8 bits of a 17-bit polynomial counter can be read) * Serial I/O port * Eight IRQ interrupts


Versions

By part number: * C012294 — Used in all
Atari 8-bit family The Atari 8-bit family is a series of 8-bit home computers introduced by Atari, Inc. in 1979 as the Atari 400 and Atari 800. The series was successively upgraded to Atari 1200XL , Atari 600XL, Atari 800XL, Atari 65XE, Atari 130XE, Atari 800XE, ...
computers, including the
Atari XEGS The Atari XE Video Game System (Atari XEGS) is an industrial redesign of the Atari 65XE home computer and the final model in the Atari 8-bit family. It was released by Atari Corporation in 1987 and marketed as a home video game console alongsid ...
, as well as 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 **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 ''Major Havoc'' (or ''The Adventures of Major Havoc'') is an arcade action game released by Atari, Inc. in 1983. A vector-based upright arcade cabinet, ''Major Havoc'' consists of several smaller game experiences played in succession, including ...
'', ''
I, Robot ''I, Robot'' is a fixup (compilation) novel of science fiction short stories or essays by American writer Isaac Asimov. The stories originally appeared in the American magazines ''Super Science Stories'' and '' Astounding Science Fiction'' be ...
'', ''
Firefox Mozilla Firefox, or simply Firefox, is a free and open-source web browser developed by the Mozilla Foundation and its subsidiary, the Mozilla Corporation. It uses the Gecko rendering engine to display web pages, which implements current ...
'', and ''
Return of the Jedi ''Return of the Jedi'' (also known as ''Star Wars: Episode VI – Return of the Jedi'' is a 1983 American epic space opera film directed by Richard Marquand. The screenplay is by Lawrence Kasdan and George Lucas from a story by Lucas, who ...
''.


Pinout


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 (an example: reading potentiometers). 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. In the individual register listings below the following legend applies:


Audio

Pokey contains a programmable sound generator; four audio channels with separate frequency, noise and voice level controls. Each channel has an 8-bit frequency divider and an 8-bit register to select noise and volume. *AUDF1 to AUDF4 – frequency register (AUDio Frequency) *AUDC1 to AUDC4 – volume and noise register (AUDio Control) *AUDCTL – general register, which controls generators (AUDio ConTroL) POKEY's sound is distinctive: when the four channels are used independently, there is noticeable detuning of parts of the 12-tone equal temperament scale, due to lack of pitch accuracy. Channels may be paired for higher accuracy; in addition, multiple forms of
distortion In signal processing, distortion is the alteration of the original shape (or other characteristic) of a signal. In communications and electronics it means the alteration of the waveform of an information-bearing signal, such as an audio signa ...
are available, allowing a thicker sound. The distortion is primarily used in music for bass parts. One of the sound-engines developed for the Atari 8-bit family was called the AMP engine (Advanced Music Processor). This was used by the musician Gary Gilbertson.


Audio Channel Frequency

The AUDF* registers control the frequency or pitch of the corresponding sound channels. The AUDF* values also control the POKEY hardware timers useful for code that must run in precise intervals more frequent than the vertical blank. Each AUDF* register is an 8-bit value providing a countdown timer or divisor for the pulses from the POKEY clock. So, smaller values permit more frequent output of pulses from POKEY, and larger values, less frequent. The values $0hex/0dec to $FFhex/255dec are incremented by POKEY to range from $1hex/1dec to $100hex/256dec. The actual audible sound pitch is dependent on the POKEY clock frequency and distortion values chosen. See Audio Channel Control and Audio Control.


AUDF1 $D200 Write

Audio Channel 1 Frequency


AUDF2 $D202 Write

Audio Channel 2 Frequency


AUDF3 $D204 Write

Audio Channel 3 Frequency


AUDF4 $D206 Write

Audio Channel 4 Frequency


Audio Channel Control

The Audio Channel control registers provide volume and distortion control over individual sound channels. Audio may also be generated independently of the POKEY clock by direct volume manipulation of a sound channel which is useful for playing back digital samples.


AUDC1 $D201 Write

Audio Channel 1 Control


AUDC2 $D203 Write

Audio Channel 2 Control


AUDC3 $D205 Write

Audio Channel 3 Control


AUDC4 $D207 Write

Audio Channel 4 Control Bit 0-3: Control over volume level, from 0 to F. Bit 4: Forced volume-only output. When this bit is set the channel ignores the AUDF timer, noise/distortion controls, and high-pass filter. Sound is produced only by setting volume bits 0:3 . This feature was used to create digital audio via
pulse-code modulation Pulse-code modulation (PCM) is a method used to digitally represent sampled analog signals. It is the standard form of digital audio in computers, compact discs, digital telephony and other digital audio applications. In a PCM Stream (comp ...
. Bit 5-7: Shift register settings for noises/distortion. Bit values described below: Generating random noises is served by reading 8 bits from top of 17-bit shift register. That registers are driven by frequency 1.79 MHz for NTSC or 1.77 MHz for PAL. Its outputs can by used independently by each audio channels' divider rate.


AUDCTL $D208 Write

Audio Control allows the choice of clock input used for the audio channels, control over the high-pass filter feature, merging two channels together allowing 16-bit frequency accuracy, selecting a high frequency clock for specific channels, and control over the "randomness" of the polynomial input. "1" means "on", if not described: ;Bit 0: $01: (15 kHz), choice of frequency divider rate "0" - 64 kHz, "1" - 15 kHz ;Bit 1: $02: (FI2 + 4), high-pass filter for channel 2 rated by frequency of channel 4 ;Bit 2: $04: (FI1 + 3), high-pass filter for channel 1 rated by frequency of channel 3 ;Bit 3: $08: (CH4 + 3), connection of dividers 4+3 to obtain 16-bit accuracy ;Bit 4: $10: (CH2 + 1), connection of dividers 2+1 to obtain 16-bit accuracy ;Bit 5: $20: (CH3 1.79), set channel 3 frequency "0" is 64 kHz. "1" is 1.79 MHz NTSC or 1.77 MHz PAL ;Bit 6: $40: (CH1 1.79), set channel 1 frequency "0" is 64 kHz. "1" is 1.79 MHz NTSC or 1.77 MHz PAL ;Bit 7: $80: (POLY 9), switch shift register "0" - 17-bit, "1" – 9-bit All frequency dividers (AUDF) can be driven at the same time by 64 kHz or 15 kHz rate. Frequency dividers 1 and 3 can be alternately driven by CPU clock (1.79 MHz NTSC, 1.77 MHz PAL). Frequency dividers 2 and 4 can be alternately driven by output of dividers 1 and 3. In this way, POKEY makes possible connecting of 8-bit channels to create sound with 16-bit accuracy. Possible channel configurations: * four 8-bit channels * two 8-bit channels and one 16-bit channel * two 16-bit channels


Potentiometers

POKEY has eight analog to digital converter ports most commonly used for potentiometers, also known as Paddle Controllers. The analog inputs are also used for the Touch Tablet controller, and the 12-button, video game Keyboard Controllers. Each input has a drop transistor, which can be set on or off from software. The timers can also be used to support a
light pen A light pen is a computer input device in the form of a light-sensitive wand used in conjunction with a computer's cathode-ray tube (CRT) display. It allows the user to point to displayed objects or draw on the screen in a similar way to a tou ...
, by connecting a photodiode to the drop transistor, which captures the timer when the electron beam in the television passes by the pen. The vertical position of the pen had to be read separately.


POT0 $D200 Read

SHADOW: PADDL0 $0270 Paddle Controller 0 Input


POT1 $D201 Read

SHADOW: PADDL1 $0271 Paddle Controller 1 Input


POT2 $D202 Read

SHADOW: PADDL2 $0272 Paddle Controller 2 Input


POT3 $D203 Read

SHADOW: PADDL3 $0273 Paddle Controller 3 Input


POT4 $D204 Read

SHADOW: PADDL4 $02704 Paddle Controller 4 Input


POT5 $D205 Read

SHADOW: PADDL5 $0275 Paddle Controller 5 Input


POT6 $D206 Read

SHADOW: PADDL6 $0276 Paddle Controller 6 Input


POT7 $D207 Read

SHADOW: PADDL7 $0277 Paddle Controller 7 Input Each input has 8-bit timer, counting time when each TV line is being displayed. This had the added advantage of allowing the value read out to be fed directly into screen coordinates of objects being driven by the paddles. The Atari Paddle values range from 0 to 228, though the maximum possible is 244. The Paddle controller reads 0 when turned to its maximum clockwise position, and returns increasing values as it is turned counter-clockwise ending at its maximum value. The Paddle reading process begins by writing to POTGO which resets the POT* values to 0, the ALLPOT value to $FF, and discharges the potentiometer read capacitors. The POT* values increment as they are being scanned until reaching the resistance value of the potentiometer. When the Paddle reading is complete the corresponding bit in ALLPOT is reset to 0. The Paddle scanning process can take the majority of a video frame to complete. The Atari Operating System takes care of Paddle reading automatically. The Paddles are read and paddle scanning initiated during the stage 2 vertical blank. Paddle values are copied to shadow registers. (Note that Paddle triggers are actually joystick direction input read from PIA.) A faster mode of scanning the Paddles is possible by setting a bit in SKCTL. The reading sequence completes in only a couple scan lines, but the value is less accurate.


ALLPOT $D208 Read

Potentiometer Scanning Status Each bit corresponds to one potentiometer input (the POT* registers). When paddle scanning is started by writing to POTGO each paddle's bit in ALLPOT is set to 1. When a paddle's scan is complete the corresponding bit in ALLPOT is reset to 0 indicating the value in the associated POT* register is now valid to read.


POTGO $D20B Write

Start Potentiometer Scan Writing to POTGO initiates the potentiometer (Paddle) scanning process. This resets the POT* values to 0, the ALLPOT value to $FF, and discharges the potentiometer read capacitors. As each potentiometer scan completes the bit corresponding to the potentiometer in ALLPOT is cleared indicating the value of the associated POT* register is valid for reading.


Serial input output port

Contains: * serial input line * serial output line * serial clock output line * two-way serial clock data line * registers SKREST, SEROUT, SERIN, SKCTL, SKSTAT POKEY is a sort of
UART A universal asynchronous receiver-transmitter (UART ) is a computer hardware device for asynchronous serial communication in which the data format and transmission speeds are configurable. It sends data bits one by one, from the least signific ...
. Usually one of the doubled audio channels is used as baud rate generator. The standard baud rate is 19.2 kbit/s, the maximum possible baud rate is 127 kbit/s. A byte put into the SEROUT register is automatically sent over the serial bus. The data frame contains 10 bits: 1 start bit, 8 data bits, 1 stop bit. The voltage levels are 0 V (logical 0) and +4 V (logical 1). It is possible to connect the Atari serial port with an RS-232 port by means of a simple voltage converter. Each
input/output In computing, input/output (I/O, or informally io or IO) is the communication between an information processing system, such as a computer, and the outside world, possibly a human or another information processing system. Inputs are the signals ...
operation causes POKEY's internal shift registers to change value, so when programming for POKEY, it is necessary to re-initialise some values after each operation is carried out.


SKREST $D20A Write

Reset Serial Port Status (SKSTAT). A write to this register will reset bits 5 through 7 of SKSTAT which are latches to 1. The latches flag keyboard overrun, Serial data input overrun, and Serial data input frame error.


SEROUT $D20D Write

Serial port data output byte. This is a parallel "holding" register for the eight bit (one byte) value that will be transferred to the serial shift register for output one bit at a time. When the port is ready to accept data for output a Serial Data Out interrupt informs the Operating System that it can write a byte to this output register.


SERIN $D20D Read

Serial port data input byte. Like SEROUT, also a parallel "holding" register. This holds the eight bit (one byte) value assembled by the serial shift register reading the data input one bit at a time. When a full byte is read a Serial Data In interrupt occurs informing the Operating System that it can read the byte from this register.


SKCTL $D20F Write

Serial Port Control Bit 0: Enable "debounce" scanning which is intended to eliminate noise or jitter from mechanical switches. A value of 1 enables POKEY to use an internal comparison register while scanning keys. A key must be detected in two simultaneous scans before it is identified as pressed, and it must be seen released for two consecutive scans to be considered released. This should be enabled to maintain normal keyboard handling with the Operating System. Bit 1: Set to 1 to enable keyboard scanning. This should be enabled to maintain normal keyboard handling with the Operating System. Bit 2: Set to 1 to enable fast, though less accurate Potentiometer scanning. Fast Pot scanning increments the counter on every cycle and returns a usable result within two scan lines. The Operating System uses the slow Pot Scanning which increments the counter once every 114 cycles (scan line) taking a frame (1/60th second) to produce a result. The OS reads the Pot values during its Vertical Blank Interrupt (VBI) and copies the result to the potentiometer Shadow registers in RAM. It then resets POTGO for the next read during the next VBI. Bit 3: Enable Serial port two-tone mode. When enabled, 1 and 0 bits output to the SIO bus are replaced by tones set by timers 1 and 2. This is ordinarily used for writing analog tones representing digital data to cassette tape. Bit 4-6: Clock Timing Control for serial port operation. Bit values described below: Bit 7: Forces a known 0 output, so that timer 2 can reset timer 1 in two-tone serial output mode.


SKSTAT $D20F Read

Serial Port Status


KBCODE $D209 Read

SHADOW: CH $02FC Keyboard Code


Eight IRQ interrupts

;BREAK: Break (BREAK key interrupt) ;K: Keyboard (keyboard interrupt) ;SIR: if Serial Input Ready (read interrupt from serial rail) ;ODN: if Output Data Needed (write interrupt from serial rail) ;XD: if eXmitend Data (serial transmission end interrupt) ;T1: Timer 1, timer 1 interrupt ;T2: Timer 2, timer 2 interrupt ;T4: Timer 4, timer 4 interrupt Interrupts can be set on or off from software by register IRQEN. IRQSTAT register contains interrupts status.


Keyboard

Six key register of actually pushed keys (K0 K5), which contains values from 00 to 3F. Contains 2 control values. One of them acts as decoder of all 6 values. Second control values is used to decode special key values — CTRL, SHIFT and BREAK.


References


External links


ASMA — Atari SAP Music Archive
A collection of POKEY chip-music (SAP) players and SAP music from various Atari 8-bit games.
POKEY chip data sheet scanned to PDF

Video of Atari 8-bit (using POKEY) emulating Commodore SID chip.
{{DEFAULTSORT:Pokey Atari 8-bit family Computer-related introductions in 1979 Sound chips Input/output integrated circuits Integrated circuits