Difference between revisions of "PSG"

From Intellivision Wiki
Jump to: navigation, search
Line 7: Line 7:
  
 
==Registers==
 
==Registers==
 +
<table border>
  
 +
<tr><th>Register</th><th>Data Bits</th><th>On Bits</th><th>Off Bits</th><th>Description</th></tr>
 +
 +
<tr><td>[[STIC Register $00|$00]]</td><td>$00FF</td><td>$0000</td><td>$FF00</td><td>Lowest 8 bits of 12-bit period for channel 1.  Note that a channel period value of zero actually indicates a period of $1000.</td></tr>
 +
 +
<tr><td>[[STIC Register $01|$01]]</td><td>$00FF</td><td>$0000</td><td>$FF00</td><td>Lowest 8 bits of 12-bit period for channel 2.  Note that a channel period value of zero actually indicates a period of $1000.</td></tr>
 +
 +
<tr><td>[[STIC Register $02|$02]]</td><td>$00FF</td><td>$0000</td><td>$FF00</td><td>Lowest 8 bits of 12-bit period for channel 3.  Note that a channel period value of zero actually indicates a period of $1000.</td></tr>
 +
 +
<tr><td>[[STIC Register $03|$03]]</td><td>$00FF</td><td>$0000</td><td>$FF00</td><td>Lowest 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.</td></tr>
 +
 +
<tr><td>[[STIC Register $07|$04]]</td><td>$000F</td><td>$0000</td><td>$FFF0</td><td>Upper 4 bits of 12-bit period for channels 1.  Note that a channel period value of zero actually indicates a period of $1000.</td></tr>
 +
 +
<tr><td>[[STIC Register $07|$05]]</td><td>$000F</td><td>$0000</td><td>$FFF0</td><td>Upper 4 bits of 12-bit period for channels 2.  Note that a channel period value of zero actually indicates a period of $1000.</td></tr>
 +
 +
<tr><td>[[STIC Register $07|$06]]</td><td>$000F</td><td>$0000</td><td>$FFF0</td><td>Upper 4 bits of 12-bit period for channels 3.  Note that a channel period value of zero actually indicates a period of $1000.</td></tr>
 +
 +
<tr><td>[[STIC Register $07|$07]]</td><td>$00FF</td><td>$0000</td><td>$FF00</td><td>Upper 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.</td></tr>
 +
 +
</table>
  
 
==Channels==
 
==Channels==

Revision as of 20:46, 20 January 2005

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.