PSG

From Intellivision Wiki
Revision as of 20:46, 20 January 2005 by Pingaso (talk | contribs)
Jump to: navigation, search

Various PSGs were used in the Intellivision from the AY-3-891x family, including the AY-3-8914, AY-3-8916 and AY-3-8917.

The text below is just a bunch of notes for now, to be organized into something meaningful eventually.

Clock speed is 3579545/16 (223721.5625 Hz)

Registers

RegisterData BitsOn BitsOff BitsDescription
$00$00FF$0000$FF00Lowest 8 bits of 12-bit period for channel 1. Note that a channel period value of zero actually indicates a period of $1000.
$01$00FF$0000$FF00Lowest 8 bits of 12-bit period for channel 2. Note that a channel period value of zero actually indicates a period of $1000.
$02$00FF$0000$FF00Lowest 8 bits of 12-bit period for channel 3. Note that a channel period value of zero actually indicates a period of $1000.
$03$00FF$0000$FF00Lowest 8 bits of 16-bit envelope period. The envelope period value is multiplied by two to determine the actual period. Note that an envelope period value of zero actually indicates a true envelope period of $20000.
$04$000F$0000$FFF0Upper 4 bits of 12-bit period for channels 1. Note that a channel period value of zero actually indicates a period of $1000.
$05$000F$0000$FFF0Upper 4 bits of 12-bit period for channels 2. Note that a channel period value of zero actually indicates a period of $1000.
$06$000F$0000$FFF0Upper 4 bits of 12-bit period for channels 3. Note that a channel period value of zero actually indicates a period of $1000.
$07$00FF$0000$FF00Upper 8 bits of 16-bit envelope period. The envelope period value is multiplied by two to determine the actual period. Note that an envelope period value of zero actually indicates a true envelope period of $20000.

Channels

square wave output optionally modified by the envelope generator and/or the noise generator Volume (0-15) Period (1-4096) Tone Enabled Envelope Enabled Noise Enabled

16 volume levels, independent to each channel


Envelope Generator

Period Atak, Cont, Hold, Altr Volume (0-15) 16-bit period value multiplied by two, from 2 PSG clock cycles to $20000


Noise Generator

The random noise generator adheres to the following formula once per PSG clock cycle.

   noise = (noise >> 1) ^ ((noise & 1) ? 0x14000 : 0);

The lowest bit resulting from this calculation is used to add noise to any channel with noise enabled.