1
0
mirror of https://github.com/cc65/cc65.git synced 2024-11-12 07:07:19 +00:00
cc65/libsrc/pce/psg.s

31 lines
888 B
ArmAsm
Raw Normal View History

2015-08-29 13:58:57 +00:00
.include "pce.inc"
2015-07-12 12:27:24 +00:00
2015-08-29 13:58:57 +00:00
.export psg_init
psg_init:
2015-08-29 13:58:57 +00:00
clx
2015-09-04 12:14:17 +00:00
stz PSG_GLOBAL_PAN ; Clear global balance
psg_clear_loop:
2015-09-04 12:14:17 +00:00
stx PSG_CHAN_SELECT ; Select channel
stz PSG_FREQ_LO ; Clear frequency LSB
stz PSG_FREQ_HI ; Clear frequency MSB
stz PSG_CHAN_CTRL ; Clear volume
stz PSG_CHAN_PAN ; Clear balance
stz PSG_NOISE ; Clear noise control
stz PSG_LFO_FREQ ; Clear LFO frequency
stz PSG_LFO_CTRL ; Clear LFO control
2015-08-29 13:58:57 +00:00
cly
psg_clear_waveform:
2015-09-04 12:14:17 +00:00
stz PSG_CHAN_DATA ; Clear waveform byte
2015-08-29 13:58:57 +00:00
iny
cpy #$20
bne psg_clear_waveform
2015-08-29 13:58:57 +00:00
inx
cpx #$06
bne psg_clear_loop
rts