PSG registers.

Summary
PSG registers.
Registers.
psgportPSG port.
psg_mainvolGlobal sound volume.
psg_freq_loFine frequency adjust.
psg_freq_hiRough frequency adjust.
psg_ctrlControl register.
psg_panChannel balance.
psg_wavebufChannel sound data.
psg_noiseNoise control.
psg_lfofreqLFO frequency.
psg_lfoctrlLFO trigger and control.
Control Register Flags.
PSG_CTRL_CHAN_ONPSG control register bit masks 1 - Channel on 0 - Channel off
PSG_CTRL_WRITE_RESETReset waveform write index to 0
PSG_CTRL_DDA_ONDDA output.
PSG_CTRL_VOL_MASKChannel volume.
PSG_CTRL_FULL_VOLUMEChannel maximum volume (bit 5 is unused)

Registers.

psgport

psgport = $0800

PSG port.

psg_mainvol

psg_mainvol = psgport+1

Global sound volume.

psg_freq_lo

psg_freq_lo = psgport+2

Fine frequency adjust.

psg_freq_hi

psg_freq_hi = psgport+3

Rough frequency adjust.

psg_ctrl

psg_ctrl = psgport+4

Control register.

psg_pan

psg_pan = psgport+5

Channel balance.

psg_wavebuf

psg_wavebuf = psgport+6

Channel sound data.

psg_noise

psg_noise = psgport+7

Noise control.

psg_lfofreq

psg_lfofreq = psgport+8

LFO frequency.

psg_lfoctrl

psg_lfoctrl = psgport+9

LFO trigger and control.

Control Register Flags.

PSG_CTRL_CHAN_ON

PSG_CTRL_CHAN_ON = %10000000

PSG control register bit masks 1 - Channel on 0 - Channel off

PSG_CTRL_WRITE_RESET

PSG_CTRL_WRITE_RESET = %01000000

Reset waveform write index to 0

PSG_CTRL_DDA_ON

PSG_CTRL_DDA_ON = %11000000

DDA output.  1 - on 0 - off

PSG_CTRL_VOL_MASK

PSG_CTRL_VOL_MASK = %00011111

Channel volume.

PSG_CTRL_FULL_VOLUME

PSG_CTRL_FULL_VOLUME = %00111111

Channel maximum volume (bit 5 is unused)

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