Very basic PSG interface library. It provides the channel activation and frequency conversion maths.
A minimal interface for the Commodore 128's SID is included.
Convert a frequency value to pulse count for the PSG data
Send data to the psg. “sound(reg, value)” is a valid alias.
Read the PSG register. Not supported on SID, use the SID specific calls.
Init the PSG (reset sound etc..) Not supported on SID.
Set a given tone for the channel (0-2)
Set the global noise period
Set channel's volume (not channel restricted on SID)
Set the volume envelope of number \a waveform, with the given period, on a group of channels (ORed bits)
Set noise or tone generation on a group of channels (ORed bits). Not supported on SID.
Get the group of channels currently generating tone (ORed bits). Not supported on SID.
extern unsigned char LIB psg_tone_channels();
Get the group of channels currently generating noise (ORed bits). Not supported on SID.