PSG

From Intellivision Wiki
Revision as of 23:57, 19 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

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

   if (channel.toneEnabled || channel.noiseEnabled) {
       if (
       channel
   }
   else
       channel.output = ;
   channel0.output =
       (((channel0.toneDisabled | channel0.tone) &
           (channel0.noiseDisabled | noise))
         ? (channel0.envelope ? envelopeVolume
         : channel0.volume) : 0);

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.