Changes

Jump to: navigation, search

PSG

235 bytes added, 00:10
/* PSG Registers */
== PSG Registers ==
The PSG has 16 read/writeable data registers, and a write-only index register. Both the index and data registers are accessed through [[8255|PPI Port A]], depending on the current setting of the BC1 and BDIR bits in [[8255|PPI]] Port C. The four possible combinations are: 0=inactive 2=write data 1=read data 3{| class=write index"wikitable"The procedure to write data to a specific register is as follows: Write the register number to [[8255|-!PPI]] Port A, set BC1/C!BDIR to Write Index !BC1!Function|- and back to |0||0||0||Inactive. Now write the data to PIO Port A, set BC1/BDIR to Write Data |- and back |1||0||1||Read from selected PSG register|-|2||1||0||Write to Inactive.selected PSG register|-|3||1||1||Select PSG register|}
The procedure to write data to a specific PSG register is quite tedious. It consists of the following steps:* Write the register number to PPI Port A* set BC1/BDIR to Write Index* and back to Inactive* Now write the data to PPI Port A* set BC1/BDIR to Write Data* and back to Inactive. Consult this article for more information: [[How to access the PSG via PPI]]
===00h - Channel A Tone Frequency Low (8bit)===
8,304
edits