1
0
mirror of https://github.com/cc65/cc65.git synced 2024-11-18 15:05:14 +00:00
cc65/libsrc/pce/psg.s

30 lines
869 B
ArmAsm
Raw Normal View History

2015-07-12 12:27:24 +00:00
.include "pce.inc"
.export psg_init
psg_init:
2015-07-12 12:27:24 +00:00
clx
stx $0800 ; Select channel
psg_clear_loop:
2015-07-12 12:27:24 +00:00
stz $0801 ; Clear global balance
stz $0802 ; Clear frequency LSB
stz $0803 ; Clear frequency MSB
stz $0804 ; Clear volume
stz $0805 ; Clear balance
stz $0807 ; Clear noise control
stz $0808 ; Clear LFO frequency
stz $0809 ; Clear LFO control
2015-07-12 12:27:24 +00:00
cly
psg_clear_waveform: stz $0806 ; Clear waveform byte
2015-07-12 12:27:24 +00:00
iny
cpy #$20
bne psg_clear_waveform
inx
cpx #$06
bne psg_clear_loop
rts