User:Synthetoonz/sandbox

WP:COPYARTICLE, old copy of POKEY which this user had just edited, except for the following draft additions:

W I P

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.

AUDF1 $D200 Write
Audio Channel 1 Frequency

AUDF1 $D202 Write
Audio Channel 2 Frequency

AUDF1 $D204 Write
Audio Channel 3 Frequency

AUDF1 $D206 Write
Audio Channel 4 Frequency

Each AUDF* register is an 8-bit value providing a countdown timer or divisor for the pulses from the POKEY clock. The values $0hex/0dec to $FFhex/255dec are incremented by POKEY to range from $1hex/1dec to $100hex/256dec. So, smaller values permit more frequent output of pulses from POKEY, and larger values, less frequent. The actual audible sound pitch is dependent on the POKEY clock frequency and distortion values chosen. See Audio Channel Control and Audio Control.

AUDF1 $D201 Write
Audio Channel 1 Control

AUDF1 $D203 Write
Audio Channel 2 Control

AUDF1 $D205 Write
Audio Channel 3 Control

AUDF1 $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 it produced only by setting volume bits 0:3.

Bit 5-7: Shift register responsible 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 probed independently by four audio channels in channel's divider's rate.

AUDCTL $D208 Write
Audio Control