Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
POKEY
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==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]] are available, allowing a thicker sound. The distortion is primarily used in music for bass parts. ===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 $0<sub>hex</sub>/0<sub>dec</sub> to $FF<sub>hex</sub>/255<sub>dec</sub> are incremented by POKEY to range from $1<sub>hex</sub>/1<sub>dec</sub> to $100<sub>hex</sub>/256<sub>dec</sub>. The actual audible sound pitch is dependent on the POKEY clock frequency and distortion values chosen. See [[POKEY#Audio Channel Control|Audio Channel Control]] and [[POKEY#AUDCTL $D208 Write|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 {| class="wikitable" |- ! Bit 7 !! Bit 6 !! Bit 5 !! Bit 4 !! Bit 3 !! Bit 2 !! Bit 1 !! Bit 0 |- | ? || ? || ? || ? || ? || ? || ? || ? |} ===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 {| class="wikitable" |- ! Bit 7 !! Bit 6 !! Bit 5 !! Bit 4 !! Bit 3 !! Bit 2 !! Bit 1 !! Bit 0 |- | Noise 2 || Noise 1 || Noise 0 || Force Volume || Volume 3 || Volume 2 || Volume 1 || Volume 0 |} 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]]. Bit 5-7: Shift register settings for noises/distortion. Bit values described below: {| class="wikitable" |- ! Noise Value !! Bits Value !! Description |- | 0 0 0 || $00 || 5-bit then 17-bit polynomials |- | 0 0 1 || $20 || 5-bit poly only |- | 0 1 0 || $40 || 5-bit then 4-bit polys |- | 0 1 1 || $60 || 5-bit poly only |- | 1 0 0 || $80 || 17-bit poly only |- | 1 0 1 || $A0 || no poly (pure tone) |- | 1 1 0 || $C0 || 4-bit poly only |- | 1 1 1 || $E0 || no poly (pure tone) |} 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. {| class="wikitable" |- ! Bit 7 !! Bit 6 !! Bit 5 !! Bit 4 !! Bit 3 !! Bit 2 !! Bit 1 !! Bit 0 |- | 17 vs 9 Poly || CH1 1.79 || CH3 1.79 || CH2 + 1 || CH4 + 3 || FI1 + 3 || FI2 + 4 || 64 vs 15 kHz |} "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
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)