Changes

Jump to: navigation, search

Datasheet AY-8913

487 bytes added, 10:39, 24 June 2008
The principle element of the PSG is the array of 16 read/write control registers. These 16 registers look to the CPU as a block of memory and as such occupy a 16 word block out of 1,024 possible addresses. The 10 address bits (8 bits on the common data/address bus, and 2 seperate address bits A8 and /A9) are decoded as follows:
{|{{Prettytable|width: 700px; font-size: 2em;}}
|'''/A9*'''||'''A8'''||'''DA7'''||'''DA6'''||'''DA5'''||'''DA4'''||'''DA3'''||'''DA2'''||'''DA1'''||'''DA0'''
|-
|0||1||0||0||0||0||0||0||0||0
|}
/A9* A8 DA7 DA6 DA5 DA4 DA3 DA2 DA1 DA0 '''THRU'''0 1 0 0 0 0 0 0 0 0 {|{{Prettytable|width: 700px; font-size: 2em;}}|-THRU |'''0 '''||'''1 '''||'''0 '''||'''0 '''||'''0 '''||'''0 '''||'''1 '''||'''1 '''||'''1 '''||'''1 ''' |-|colspan=4|High Order (Chip Select) ||colspan=4|Low order (Register No.) |}
* /A9 is not provided on the AY-3-8912
The basic blocks in the PSG which produce the programmed sounds include:
* Tone Generators produce the basic square wave tone frequencies for each channel (A,B,C)  * Noise Generator produces a frequency modulated pseudo random pulse width square wave output.  * Mixers combine the outputs of the Tone Generators and the Noise Generator. One for each channel (A,B,C)  * Amplitude Control provides the D/A Converters with either a fixed or variable amplitude pattern. The fixed amplitude is under direct CPU control; the variable amplitude is accomplished by using, the output of the Envelope Generator.  * Envelope Generator produces an evelope pattern which can be used to amplitude modulate the output of each Mixer.  * D/A Converters the three D/A Converters each produce up to a 16 level output signal as determined by the Amplitude Control.
== I/O PORTS ==
Since all functions of the PSG are controlled by the processor via a series of register loads, a detailed description of the PSG operation can best be acomplished by relating each PSG function to the control of its corresponding register. The function of creating or programming a specific sound or sound effect logically follows the control sequence listed:
{|{{Prettytable|width: 700px; font-size: 2em;}}|'''Operation '''|'''Registers '''|'''Function '''|-|Tone Generator Control ||R0--R5 ||Program tone periods. |-|Noise Generator Control ||R6 ||Program noise period. |-|Mixer Control ||R7 ||Enable tone and/or noise on selected channels. |-|Amplitude Control ||R10--R12 ||Select "fixed" or "envelope-variable" amplitudes. |-|Envelope Generator Control ||R13--R15 ||Program envelope period and select envelope pattern. |}
== Tone Generator Control (Registers R0,R1,R2,R3,R4,R5) ==
The frequency of each square wave generated by the three Tone Generators (one each for Channels A,B and C) is obtained in the PSG by first counting down the input clock by 16, then by furthur counting down the result by the programmed 12-bit Tone Period value. Each 12-bit value is obtained in the PSG by combining the contents of the relative Course and Fine Tune registers, as illustrated in the following:
{|{{Prettytable|width: 700px; font-size: 2em;}}|'''Course Tone Register '''|'''Channel '''|'''Fine Tune Register ''|-|R1 ||A ||R0 |-|R3 ||B ||R2 |-|R5 ||C ||R4 |}
Course Tone Register Fine Tune Register
12,273
edits