[[Category:PSG]] The Programmable Sound Generator (PSG) is responsible for most of the Intellivision's sound generating capability. It also provides an interface to hand controllers and the ECS's keyboard and piano. 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== The PSG has 16 registers, numbered R0 through R15. They appear consecutively in the [[CP1610]]'s address map, with R0 at the starting address for the PSG, and R15 at the last address for the PSG. The Master Component's PSG registers appear at $01F0 - $01FF in the memory map, and the [[Entertainment Computer System|ECS]]'s PSG registers appear at $00F0 - $00FF in the memory map. Note: A related part, the AY-3-8910, uses different register numbers and has a different memory map. The AY-3-8910 and AY-3-8914 are otherwise nearly equivalent. Be aware of the memory map differences if you happen across AY-3-8910 documentation.
| Register | Address | Data Bits | On Bits | Off Bits | Description | |
|---|---|---|---|---|---|---|
| Master | ECS | |||||
| [[PSG Registers R0 - R2|R0]] | $01F0 | $00F0 | $00FF | $0000 | $FF00 | Lowest 8 bits of 12-bit period for channel A. Note that a channel period value of zero actually indicates a period of $1000. |
| [[PSG Registers R0 - R2|R1]] | $01F1 | $00F1 | $00FF | $0000 | $FF00 | Lowest 8 bits of 12-bit period for channel B. Note that a channel period value of zero actually indicates a period of $1000. |
| [[PSG Registers R0 - R2|R2]] | $01F2 | $00F2 | $00FF | $0000 | $FF00 | Lowest 8 bits of 12-bit period for channel C. Note that a channel period value of zero actually indicates a period of $1000. |
| [[PSG Register R3|R3]] | $01F3 | $00F3 | $00FF | $0000 | $FF00 | 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. |
| [[PSG Registers R4 - R6|R4]] | $01F4 | $00F4 | $000F | $0000 | $FFF0 | Upper 4 bits of 12-bit period for channel A. Note that a channel period value of zero actually indicates a period of $1000. |
| [[PSG Registers R4 - R6|R5]] | $01F5 | $00F5 | $000F | $0000 | $FFF0 | Upper 4 bits of 12-bit period for channel B. Note that a channel period value of zero actually indicates a period of $1000. |
| [[PSG Registers R4 - R6|R6]] | $01F6 | $00F6 | $000F | $0000 | $FFF0 | Upper 4 bits of 12-bit period for channel C. Note that a channel period value of zero actually indicates a period of $1000. |
| [[PSG Register R7|R7]] | $01F7 | $00F7 | $00FF | $0000 | $FF00 | 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. |
| [[PSG Register R8|R8]] | $01F8 | $00F8 | $00FF | $0000 | $FF00 | Channel enables for tone, noise. I/O port direction selection. |
| [[PSG Register R9|R9]] | $01F9 | $00F9 | $001F | $0000 | $FFE0 | Noise period |
| [[PSG Register R10|R10]] | $01FA | $00FA | $0000 | $0000 | $FFFF | Envelope characteristics / trigger register (write only) |
| [[PSG Registers R11 - R13|R11]] | $01FB | $00FB | $003F | $0000 | $FFC0 | 4-bit Volume / 2-bit Envelope Select for channel A |
| [[PSG Registers R11 - R13|R12]] | $01FC | $00FC | $003F | $0000 | $FFC0 | 4-bit Volume / 2-bit Envelope Select for channel B |
| [[PSG Registers R11 - R13|R13]] | $01FD | $00FD | $003F | $0000 | $FFC0 | 4-bit Volume / 2-bit Envelope Select for channel C |
| [[PSG Regosters R14 - R15|R14]] | $01FE | $00FE | $00FF | $0000 | $FF00 | 8 bit I/O port A |
| [[PSG Registers R14 - R15|R15]] | $01FF | $00FF | $00FF | $0000 | $FF00 | 8 bit I/O port B |