| void PSG_SetRegister( |
| ) |
Set the value of a given register
| reg u8 | Register to set |
| value u8 | Value to set |
| u8 PSG_GetRegister( |
| ) |
Get the value of a given register
| reg u8 | Register to get |
Value of the register
| void PSG_SetTone( |
| ) |
Set the tone period of a given channel (tone generator control register)
| chan u8 | Channel to set (0 to 2; or PSG_CHANNEL_A, PSG_CHANNEL_B, PSG_CHANNEL_C) |
| period u16 | Period to set (12-bits value) |
| void PSG_SetNoise( |
| ) |
Set the noise period (noise generator control register)
| period u8 | Period to set (5-bits value) |
| void PSG_SetMixer( |
| ) |
Setup mixer by enabling tune and noise generators for each channel (mixer control enable register)
| mix u8 | Mixer value to set |
| void PSG_SetVolume( |
| ) |
Set the volume of a given channel (Amplitude control register)
| chan u8 | Channel to set (0 to 2; or PSG_CHANNEL_A, PSG_CHANNEL_B, PSG_CHANNEL_C) |
| vol u8 | Volume to set (4-bits value) |
| void PSG_SetEnvelope( |
| ) |
Set the envelope period (Envelope priod control register)
| period u16 | Period to set (16-bits value) |
| void PSG_SetShape( |
| ) |
Set the envelope shape (Envelope shape control register)
| shape u8 | Shape to set (4-bits value) |
| void PSG_EnableTone( |
| ) |
Enable/disable tone on the given channel
| chan u8 | Channel to set (0 to 2; or PSG_CHANNEL_A, PSG_CHANNEL_B, PSG_CHANNEL_C) |
| val bool | TRUE to enable, FALSE to disable |
| void PSG_EnableNoise( |
| ) |
Enable/disable noise on the given channel
| chan u8 | Channel to set (0 to 2; or PSG_CHANNEL_A, PSG_CHANNEL_B, PSG_CHANNEL_C) |
| val bool | TRUE to enable, FALSE to disable |
| void PSG_EnableEnvelope( |
| ) |
Enable/disable envelope on the given channel
| chan u8 | Channel to set (0 to 2; or PSG_CHANNEL_A, PSG_CHANNEL_B, PSG_CHANNEL_C) |
Silent the PSG (set according registers)
Resume PSG sound
Send data to PSG registers #0 to #13