Atari POKEY
Encyclopedia
The Pot Keyboard Integrated Circuit (POKEY) is a digital I/O
chip
found in the Atari 8-bit family
of home computers and many arcade game
s in the 1980s. It was commonly used to sample (ADC) potentiometer
s (such as game paddle
s) and scan matrices of switches (such as a computer keyboard
). POKEY is also well known for its sound effect and music generation capabilities, producing a distinctive square wave
sound popular among chip tune aficionados. The LSI chip has 40 pins and is identified as C012294. POKEY was designed by Atari employee Doug Neubauer, who also programmed the original Star Raiders
.
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". This referred to POKEY's sound generation abilities. The inventors listed were Steven T. Mayer and Ronald E. Milner.
No longer manufactured, POKEY is emulated in software by classic arcade emulators (e.g. MAME
) and Atari 8-bit emulators.
music and sound effect
s of up to four channels. 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
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
.
It is now possible to emulate the POKEY's sound capabilities in software. This can be done with the SAP player http://asma.atari.org/.
Each channel has 8-bit frequency divider and 8-bit register to select noise and volume.
Bit 4: Frequency divider control "1" on, "0" off. When frequency dividier is set to off, constant sounds with volume wrote in bits 0-3 are being generated.
Bit 5-7: Shift register responsible for noises — distortion:
Input/output
In computing, input/output, or I/O, refers to the communication between an information processing system , and the outside world, possibly a human, or another information processing system. Inputs are the signals or data received by the system, and outputs are the signals or data sent from it...
chip
Microprocessor
A microprocessor incorporates the functions of a computer's central processing unit on a single integrated circuit, or at most a few integrated circuits. It is a multipurpose, programmable device that accepts digital data as input, processes it according to instructions stored in its memory, and...
found in the Atari 8-bit family
Atari 8-bit family
The Atari 8-bit family is a series of 8-bit home computers manufactured from 1979 to 1992. All are based on the MOS Technology 6502 CPU and were the first home computers designed with custom coprocessor chips...
of home computers and many arcade game
Arcade game
An arcade game is a coin-operated entertainment machine, usually installed in public businesses such as restaurants, bars, and amusement arcades. Most arcade games are video games, pinball machines, electro-mechanical games, redemption games, and merchandisers...
s in the 1980s. It was commonly used to sample (ADC) potentiometer
Potentiometer
A potentiometer , informally, a pot, is a three-terminal resistor with a sliding contact that forms an adjustable voltage divider. If only two terminals are used , it acts as a variable resistor or rheostat. Potentiometers are commonly used to control electrical devices such as volume controls on...
s (such as game paddle
Paddle (game controller)
A paddle is a game controller with a round wheel and one or more fire buttons, where the wheel is typically used to control movement of the player object along one axis of the video screen...
s) and scan matrices of switches (such as a computer keyboard
Computer keyboard
In computing, a keyboard is a typewriter-style keyboard, which uses an arrangement of buttons or keys, to act as mechanical levers or electronic switches...
). POKEY is also well known for its sound effect and music generation capabilities, producing a distinctive square wave
Square wave
A square wave is a kind of non-sinusoidal waveform, most typically encountered in electronics and signal processing. An ideal square wave alternates regularly and instantaneously between two levels...
sound popular among chip tune aficionados. The LSI chip has 40 pins and is identified as C012294. POKEY was designed by Atari employee Doug Neubauer, who also programmed the original Star Raiders
Star Raiders
Star Raiders is a video game for the Atari 8-bit family of computers, released in 1979 and programmed by Doug Neubauer. It was also later ported to other Atari computer and game platforms...
.
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". This referred to POKEY's sound generation abilities. The inventors listed were Steven T. Mayer and Ronald E. Milner.
No longer manufactured, POKEY is emulated in software by classic arcade emulators (e.g. MAME
MAME
MAME is an emulator application designed to recreate the hardware of arcade game systems in software on modern personal computers and other platforms. The intention is to preserve gaming history by preventing vintage games from being lost or forgotten...
) and Atari 8-bit emulators.
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 volumeVolumeVolume is the quantity of three-dimensional space enclosed by some closed boundary, for example, the space that a substance or shape occupies or contains....
, frequencyFrequencyFrequency is the number of occurrences of a repeating event per unit time. It is also referred to as temporal frequency.The period is the duration of one cycle in a repeating event, so the period is the reciprocal of the frequency...
, and waveformWaveformWaveform means the shape and form of a signal such as a wave moving in a physical medium or an abstract representation.In many cases the medium in which the wave is being propagated does not permit a direct visual image of the form. In these cases, the term 'waveform' refers to the shape of a graph...
(square waveSquare waveA square wave is a kind of non-sinusoidal waveform, most typically encountered in electronics and signal processing. An ideal square wave alternates regularly and instantaneously between two levels...
with variable duty cycleDuty cycleIn engineering, the duty cycle of a machine or system is the time that it spends in an active state as a fraction of the total time under consideration....
or pseudorandomLinear feedback shift registerA linear feedback shift register is a shift register whose input bit is a linear function of its previous state.The most commonly used linear function of single bits is XOR...
noise) - High-pass filterHigh-pass filterA high-pass filter is a device that passes high frequencies and attenuates frequencies lower than its cutoff frequency. A high-pass filter is usually modeled as a linear time-invariant system...
- Keyboard scan (up to 64 keys)
- PotentiometerPotentiometerA potentiometer , informally, a pot, is a three-terminal resistor with a sliding contact that forms an adjustable voltage divider. If only two terminals are used , it acts as a variable resistor or rheostat. Potentiometers are commonly used to control electrical devices such as volume controls on...
ports (8 independent ports, each with 8-bit resolution) - Timers (audio channels 1, 2, and 4 can be configured to cause timer interrupts when they cross zero)
- Random number generator (8 bits of a 17-bit polynomial counter can be read)
- SerialSerial communicationsIn telecommunication and computer science, serial communication is the process of sending data one bit at a time, sequentially, over a communication channel or computer bus. This is in contrast to parallel communication, where several bits are sent as a whole, on a link with several parallel channels...
I/OI/OI/O may refer to:* Input/output, a system of communication for information processing systems* Input-output model, an economic model of flow prediction between sectors...
port - IRQ interrupts
POKEY music
The design of the POKEY made it possible for games to have polyphonicPolyphony
In music, polyphony is a texture consisting of two or more independent melodic voices, as opposed to music with just one voice or music with one dominant melodic voice accompanied by chords ....
music and sound effect
Sound effect
For the album by The Jam, see Sound Affects.Sound effects or audio effects are artificially created or enhanced sounds, or sound processes used to emphasize artistic or other content of films, television shows, live performance, animation, video games, music, or other media...
s of up to four channels. POKEY's sound is distinctive: when the four channels are used independently, there is noticeable detuning of parts of the 12-tone equal temperament
Equal temperament
An equal temperament is a musical temperament, or a system of tuning, in which every pair of adjacent notes has an identical frequency ratio. As pitch is perceived roughly as the logarithm of frequency, this means that the perceived "distance" from every note to its nearest neighbor is the same for...
scale, due to lack of pitch accuracy. Channels may be paired for higher accuracy; in addition, multiple forms of distortion
Distortion
A distortion is the alteration of the original shape of an object, image, sound, waveform or other form of information or representation. Distortion is usually unwanted, and often many methods are employed to minimize it in practice...
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
Gary Gilbertson
Gary Gilbertson was a music composer for the Atari 8-bit family of home computers. His music made use of the AMP engine for the Atari POKEY chip which was programmed by Philip Price...
.
It is now possible to emulate the POKEY's sound capabilities in software. This can be done with the SAP player http://asma.atari.org/.
Generating sound with POKEY
Pokey contains four audio channel, with separate frequency, noise and voice level control.Each channel has 8-bit frequency divider and 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)
AUDIOC1-4 registers description
Bit 0-3: Control over volume level, from 0 to F.Bit 4: Frequency divider control "1" on, "0" off. When frequency dividier is set to off, constant sounds with volume wrote in bits 0-3 are being generated.
Bit 5-7: Shift register responsible for noises — distortion:
- 000
- 5- and 17-bit register
- 001
- 5-bit register
- 010
- 5- and 4-bit register
- 011
- 5-bit register — doubled, non-used
- 100
- 17-bit register
- 101
- without shift register — pure tones
- 110
- 4-bit register
- 111
- without shift register — doubled, non-used
- four 8-bit channels
- two 8-bit channels and one 16-bit channel
- two 16-bit channels
- serial input line
- serial output line
- serial clock output line
- two-way serial clock data line
- registers SKRES, SEROUT, SERIN, SKCTL, SKSTAT
- Three timers, which uses audio channel. When timer is being used, audio channels are reset.
- Random number generator.
- Atari 8-bit TIA (CTIA and GTIA)
- ANTICANTICAlphanumeric Television Interface Controller is an early video system chip used in the Atari 8-bit family of microcomputers as well as the Atari 5200 in the 1980s. The chip was patented by Atari, Inc. in 1981...
- Sound chipSound chipA sound chip is an integrated circuit designed to produce sound . It might be doing this through digital, analog or mixed-mode electronics...
- ChiptuneChiptuneA chiptune, also known as chip music, is synthesized electronic music often produced with the sound chips of vintage computers and video game consoles, as well as with other methods such as emulation. In the early 1980s, personal computers became cheaper and more accessible than they had previously...
- AMP engine
- MOS Technology SIDMOS Technology SIDThe MOS Technology 6581/8580 SID is the built-in Programmable Sound Generator chip of Commodore's CBM-II, Commodore 64, Commodore 128 and Commodore MAX Machine home computers...
- General Instruments AY-3-8912
- Atari SAP music formatAtari SAP music formatAtari SAP music format is a format that stores music data from Atari 8-bit computers that uses the famous Atari POKEY sound chip.Most popular tunes for Atari 8 bits were written between 1981-1987....
- ASMA — Atari SAP Music Archive A collection of POKEY chip-music (SAP) players and SAP music from various Atari 8-bit games.
- ASAP - Another Slight Atari Player An Atari module player/plugin for foobar2000Foobar2000foobar2000 is a freeware audio player for Windows developed by Peter Pawlowski, a former freelance contractor for Nullsoft. It is known for its highly modular design and extensive SDK which allows third-party developers to do such things as completely replace the interface...
, WinampWinampWinamp is a media player for Windows-based PCs and Android devices, written by Nullsoft, now a subsidiary of AOL. It is proprietary freeware/shareware, multi-format, extensible with plug-ins and skins, and is noted for its graphical sound visualization, playlist, and media library features.Winamp...
, XMMSXMMSThe X Multimedia System is a free audio player for Unix-like systems.-History:XMMS was originally written as X11Amp by Peter and Mikael Alm in November 1997. The player was made to resemble Winamp, which was first released in May that year. As such, XMMS has supported Winamp 2 "classic" skins...
, and more. - POKEY Player for the iPhone based on the ASMA Archive.
- POKEY chip data sheet scanned to PDF.
- POKEY chip data sheet as HTML document.
- POKEY made from small-scale logic chips
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 probed independently by four audio channels in channel's divider's rate.
AUDIOCTL register description
"1" means "on", if not descripted:Bit 0: (15 kHz), choice of frequency divider rate "0" - 64 kHz, "1" - 15 kHz 1
Bit 1: (FI2+4), high-pass filter for channel 2 rated by frequency of channel 4
Bit 2: (FI1+3), high-pass filter for channel 1 rated by frequency of channel 3
Bit 3: (CH4+3), connection of dividers 4+3 to obtain 16-bit accuracy
Bit 4: (CH2+1), connection of dividers 2+1 to obtain 16-bit accuracy
Bit 5: (1,79CH3), set channel 3 frequency "0" - 1.77 MHz PAL, "1" - 1.79 MHz NTSC
Bit 6: (1,79CH1), set channel 1 frequency "0" - 1.77 MHz PAL, "1" - 1.79 MHz NTSC
Bit 7: (POLY9), switch shift register "0" - 17-bit, "1" – 9-bit
All frequency dividers (AUDIOF) can be at the same time driven 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:
Additional information
Each input/outputInput/output
In computing, input/output, or I/O, refers to the communication between an information processing system , and the outside world, possibly a human, or another information processing system. Inputs are the signals or data received by the system, and outputs are the signals or data sent from it...
operation causes the CPU'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.
Serial input output port
Contains:POKEY is a sort of UART. 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.
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.Potentiometers
Eight ports to measurement increase of 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. Each input has drop transistor, which can be set on or off from software. The timers can also be used to support a light penLight pen
A light pen is a computer input device in the form of a light-sensitive wand used in conjunction with a computer's CRT TV set or monitor. It allows the user to point to displayed objects, or draw on the screen, in a similar way to a touch screen but with greater positional accuracy...
, by connecting a photodiode
Photodiode
A photodiode is a type of photodetector capable of converting light into either current or voltage, depending upon the mode of operation.The common, traditional solar cell used to generateelectric solar power is a large area 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.
Additional features
POKEY register table
Register | Write | Read | ||
---|---|---|---|---|
Name | Description | Name | Description | |
$D200 | AUDF1 | channel 1 frequency | POT0 | potentiometer 0 |
$D201 | AUDC1 | channel 1 generator | POT1 | potentiometer 1 |
$D202 | AUDF2 | channel 2 frequency | POT2 | potentiometer 2 |
$D203 | AUDC2 | channel 2 generator | POT3 | potentiometer 3 |
$D204 | AUDF3 | channel 3 frequency | POT4 | potentiometer 4 |
$D205 | AUDC3 | channel 3 generator | POT5 | potentiometer 5 |
$D206 | AUDF4 | channel 4 frequency | POT6 | potentiometer 6 |
$D207 | AUDC4 | channel 4 generator | POT7 | potentiometer 7 |
$D208 | AUDCTL | control over audio channels | POTSTAT | read of all 8 potentiometers port lines |
$D209 | STIMER | timer start | KBCODE | last pressed key code |
$D20A | SKRES | serial port status reset | RANDOM | random number generator value |
$D20B | POTGO | start port scanning sequence | ||
$D20C | ||||
$D20D | SEROUT | serial port output register | SERIN | serial port input register |
$D20E | IRQEN | IRQ interrupts activation | IRQSTAT | IRQ interrupts status |
$D20F | SKCTL | control over serial port | SKSTAT | serial port status |