mirror of
https://github.com/jeremysrand/BuGS.git
synced 2025-01-01 01:30:27 +00:00
More rework from last night of the sound code to adopt new register writes.
This commit is contained in:
parent
0d681e3571
commit
25765e6975
@ -953,36 +953,27 @@ stopSpiderSound_doIt anop
|
||||
sta spiderSoundIsPlaying
|
||||
|
||||
short m
|
||||
_docWait
|
||||
|
||||
lda >SOUND_SYSTEM_VOLUME
|
||||
and #$0f
|
||||
ora #$20
|
||||
sta >SOUND_CONTROL_REG
|
||||
|
||||
lda #SOUND_REG_VOLUME+SPIDER_OSC_NUM
|
||||
sta >SOUND_ADDR_LOW
|
||||
lda #$0
|
||||
sta >SOUND_DATA_REG
|
||||
sta >SOUND_DATA_REG
|
||||
sta >SOUND_DATA_REG
|
||||
sta >SOUND_DATA_REG
|
||||
_writeReg #SOUND_REG_VOLUME+SPIDER_OSC_NUM,#0
|
||||
_writeReg #SOUND_REG_VOLUME+SPIDER_OSC_NUM+1,#0
|
||||
_writeReg #SOUND_REG_VOLUME+SPIDER_OSC_NUM+2,#0
|
||||
_writeReg #SOUND_REG_VOLUME+SPIDER_OSC_NUM+3,#0
|
||||
|
||||
lda #SOUND_REG_CONTROL+SPIDER_OSC_NUM
|
||||
sta >SOUND_ADDR_LOW
|
||||
lda #SOUND_ONE_SHOT_MODE+SOUND_RIGHT_SPEAKER
|
||||
sta >SOUND_DATA_REG
|
||||
sta >SOUND_DATA_REG
|
||||
lda #SOUND_ONE_SHOT_MODE+SOUND_LEFT_SPEAKER
|
||||
sta >SOUND_DATA_REG
|
||||
sta >SOUND_DATA_REG
|
||||
|
||||
lda #SOUND_REG_CONTROL+SPIDER_OSC_NUM
|
||||
sta >SOUND_ADDR_LOW
|
||||
lda #SOUND_ONE_SHOT_MODE+SOUND_HALTED+SOUND_RIGHT_SPEAKER
|
||||
sta >SOUND_DATA_REG
|
||||
sta >SOUND_DATA_REG
|
||||
lda #SOUND_ONE_SHOT_MODE+SOUND_HALTED+SOUND_LEFT_SPEAKER
|
||||
sta >SOUND_DATA_REG
|
||||
sta >SOUND_DATA_REG
|
||||
_writeReg #SOUND_REG_CONTROL+SPIDER_OSC_NUM,#SOUND_ONE_SHOT_MODE+SOUND_RIGHT_SPEAKER
|
||||
_writeReg #SOUND_REG_CONTROL+SPIDER_OSC_NUM+1,#SOUND_ONE_SHOT_MODE+SOUND_RIGHT_SPEAKER
|
||||
_writeReg #SOUND_REG_CONTROL+SPIDER_OSC_NUM+2,#SOUND_ONE_SHOT_MODE+SOUND_LEFT_SPEAKER
|
||||
_writeReg #SOUND_REG_CONTROL+SPIDER_OSC_NUM+3,#SOUND_ONE_SHOT_MODE+SOUND_LEFT_SPEAKER
|
||||
|
||||
_writeReg #SOUND_REG_CONTROL+SPIDER_OSC_NUM,#SOUND_ONE_SHOT_MODE+SOUND_HALTED+SOUND_RIGHT_SPEAKER
|
||||
_writeReg #SOUND_REG_CONTROL+SPIDER_OSC_NUM+1,#SOUND_ONE_SHOT_MODE+SOUND_HALTED+SOUND_RIGHT_SPEAKER
|
||||
_writeReg #SOUND_REG_CONTROL+SPIDER_OSC_NUM+2,#SOUND_ONE_SHOT_MODE+SOUND_HALTED+SOUND_LEFT_SPEAKER
|
||||
_writeReg #SOUND_REG_CONTROL+SPIDER_OSC_NUM+3,#SOUND_ONE_SHOT_MODE+SOUND_HALTED+SOUND_LEFT_SPEAKER
|
||||
long m
|
||||
|
||||
rtl
|
||||
@ -997,30 +988,31 @@ startScorpionSound_doIt anop
|
||||
stz scorpionSoundIsPlaying
|
||||
|
||||
short m
|
||||
_docWait
|
||||
|
||||
lda >SOUND_SYSTEM_VOLUME
|
||||
and #$0f
|
||||
ora #$20
|
||||
sta >SOUND_CONTROL_REG
|
||||
|
||||
lda #SOUND_REG_CONTROL+SCORPION_OSC_NUM
|
||||
sta >SOUND_ADDR_LOW
|
||||
lda #SCORPION_CONTROL+SOUND_HALTED+SOUND_RIGHT_SPEAKER
|
||||
sta >SOUND_DATA_REG
|
||||
lda #SCORPION_CONTROL+SOUND_RIGHT_SPEAKER
|
||||
sta >SOUND_DATA_REG
|
||||
lda #SCORPION_CONTROL+SOUND_HALTED+SOUND_LEFT_SPEAKER
|
||||
sta >SOUND_DATA_REG
|
||||
lda #SCORPION_CONTROL+SOUND_LEFT_SPEAKER
|
||||
sta >SOUND_DATA_REG
|
||||
_writeReg #SOUND_REG_CONTROL+SCORPION_OSC_NUM,#SCORPION_CONTROL+SOUND_HALTED+SOUND_RIGHT_SPEAKER
|
||||
_writeReg #SOUND_REG_CONTROL+SCORPION_OSC_NUM+1,#SCORPION_CONTROL+SOUND_RIGHT_SPEAKER
|
||||
_writeReg #SOUND_REG_CONTROL+SCORPION_OSC_NUM+2,#SCORPION_CONTROL+SOUND_HALTED+SOUND_LEFT_SPEAKER
|
||||
_writeReg #SOUND_REG_CONTROL+SCORPION_OSC_NUM+3,#SCORPION_CONTROL+SOUND_LEFT_SPEAKER
|
||||
|
||||
lda #SOUND_REG_VOLUME+SCORPION_OSC_NUM
|
||||
sta >SOUND_ADDR_LOW
|
||||
ldy #SOUND_REG_VOLUME+SCORPION_OSC_NUM
|
||||
lda tileRightVolume,x
|
||||
jsr writeReg
|
||||
iny
|
||||
lda tileRightVolume,x
|
||||
jsr writeReg
|
||||
iny
|
||||
lda tileRightVolume,x
|
||||
sta >SOUND_DATA_REG
|
||||
sta >SOUND_DATA_REG
|
||||
eor #$ff
|
||||
sta >SOUND_DATA_REG
|
||||
sta >SOUND_DATA_REG
|
||||
jsr writeReg
|
||||
iny
|
||||
lda tileRightVolume,x
|
||||
eor #$ff
|
||||
jsr writeReg
|
||||
long m
|
||||
rtl
|
||||
|
||||
@ -1032,19 +1024,25 @@ updateScorpionSound entry
|
||||
|
||||
updateScorpionSound_doIt anop
|
||||
short m
|
||||
_docWait
|
||||
lda >SOUND_SYSTEM_VOLUME
|
||||
and #$0f
|
||||
ora #$20
|
||||
sta >SOUND_CONTROL_REG
|
||||
|
||||
lda #SOUND_REG_VOLUME+SCORPION_OSC_NUM
|
||||
sta >SOUND_ADDR_LOW
|
||||
ldy #SOUND_REG_VOLUME+SCORPION_OSC_NUM
|
||||
lda tileRightVolume,x
|
||||
jsr writeReg
|
||||
iny
|
||||
lda tileRightVolume,x
|
||||
jsr writeReg
|
||||
iny
|
||||
lda tileRightVolume,x
|
||||
sta >SOUND_DATA_REG
|
||||
sta >SOUND_DATA_REG
|
||||
eor #$ff
|
||||
sta >SOUND_DATA_REG
|
||||
sta >SOUND_DATA_REG
|
||||
jsr writeReg
|
||||
iny
|
||||
lda tileRightVolume,x
|
||||
eor #$ff
|
||||
jsr writeReg
|
||||
long m
|
||||
|
||||
rtl
|
||||
|
Loading…
Reference in New Issue
Block a user