PSG registers. | |
Registers. | |
psgport | PSG port. |
psg_mainvol | Global sound volume. |
psg_freq_lo | Fine frequency adjust. |
psg_freq_hi | Rough frequency adjust. |
psg_ctrl | Control register. |
psg_pan | Channel balance. |
psg_wavebuf | Channel sound data. |
psg_noise | Noise control. |
psg_lfofreq | LFO frequency. |
psg_lfoctrl | LFO trigger and control. |
Control Register Flags. | |
PSG_CTRL_CHAN_ON | PSG control register bit masks 1 - Channel on 0 - Channel off |
PSG_CTRL_WRITE_RESET | Reset waveform write index to 0 |
PSG_CTRL_DDA_ON | DDA output. |
PSG_CTRL_VOL_MASK | Channel volume. |
PSG_CTRL_FULL_VOLUME | Channel maximum volume (bit 5 is unused) |
PSG port.
psgport = $0800
Global sound volume.
psg_mainvol = psgport+1
Fine frequency adjust.
psg_freq_lo = psgport+2
Rough frequency adjust.
psg_freq_hi = psgport+3
Control register.
psg_ctrl = psgport+4
Channel balance.
psg_pan = psgport+5
Channel sound data.
psg_wavebuf = psgport+6
Noise control.
psg_noise = psgport+7
LFO frequency.
psg_lfofreq = psgport+8
LFO trigger and control.
psg_lfoctrl = psgport+9
PSG control register bit masks 1 - Channel on 0 - Channel off
PSG_CTRL_CHAN_ON = %10000000
Reset waveform write index to 0
PSG_CTRL_WRITE_RESET = %01000000
DDA output.
PSG_CTRL_DDA_ON = %11000000
Channel volume.
PSG_CTRL_VOL_MASK = %00011111
Channel maximum volume (bit 5 is unused)
PSG_CTRL_FULL_VOLUME = %00111111