mirror of
https://github.com/cc65/cc65.git
synced 2024-12-23 19:29:37 +00:00
Update sound driver
git-svn-id: svn://svn.cc65.org/cc65/trunk@5974 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
8a7b84247c
commit
0137681d77
@ -1101,7 +1101,6 @@ set0: ldy SndOffsets,x
|
||||
_ENDIF
|
||||
rts
|
||||
|
||||
|
||||
_lynx_snd_play:
|
||||
sta ptr1
|
||||
stx ptr1+1
|
||||
@ -1123,8 +1122,8 @@ start0: lda SndActive,x
|
||||
SndStartSoundx:
|
||||
php
|
||||
pha
|
||||
|
||||
start1: sei
|
||||
start1:
|
||||
sei
|
||||
pla
|
||||
sta SndPtrLo,x
|
||||
tya
|
||||
@ -1140,12 +1139,12 @@ start1: sei
|
||||
rts
|
||||
SndStartSound2:
|
||||
pha
|
||||
|
||||
lda SndActive,x ; check default
|
||||
beq start20 ; inactive => ok
|
||||
phx
|
||||
ldx #3 ; search free channel
|
||||
start21: lda SndActive,x
|
||||
start21:
|
||||
lda SndActive,x
|
||||
beq start22 ; found =>
|
||||
dex
|
||||
bpl start21
|
||||
@ -1153,18 +1152,19 @@ start21: lda SndActive,x
|
||||
dec SndReqStop,x ; stop default-channel
|
||||
lda #1
|
||||
sta SndDelay,x
|
||||
start23: lda SndActive,x
|
||||
start23:
|
||||
lda SndActive,x
|
||||
bne start23
|
||||
bra start20
|
||||
start22: pla ; clear stack
|
||||
|
||||
start20: pla
|
||||
start22:
|
||||
pla ; clear stack
|
||||
start20:
|
||||
pla
|
||||
phx
|
||||
jsr SndStartSoundx ; launch new sound
|
||||
plx
|
||||
rts
|
||||
|
||||
|
||||
_lynx_snd_stop:
|
||||
ldx #3
|
||||
lda SndActive,x
|
||||
@ -1179,7 +1179,7 @@ stop1: lda SndActive,x
|
||||
bpl stop0
|
||||
rts
|
||||
|
||||
SndStopChannel:
|
||||
_lynx_snd_stop_channel:
|
||||
lda SndActive,x
|
||||
_IFNE
|
||||
dec SndReqStop,x
|
||||
@ -1190,7 +1190,7 @@ stopc1: lda SndActive,x
|
||||
_ENDIF
|
||||
rts
|
||||
|
||||
SndChannelsActive:
|
||||
_lynx_snd_active:
|
||||
ldx #3
|
||||
lda #0
|
||||
act0: ldy SndActive,x
|
||||
@ -1201,8 +1201,8 @@ act0: ldy SndActive,x
|
||||
bpl act0
|
||||
rts
|
||||
|
||||
|
||||
_lynx_snd_pause: php
|
||||
_lynx_snd_pause:
|
||||
php
|
||||
sei
|
||||
lda STIMCTLA
|
||||
sta SndPauseOff1+1
|
||||
@ -1219,12 +1219,14 @@ _lynx_snd_pause: php
|
||||
plp
|
||||
rts
|
||||
|
||||
|
||||
_lynx_snd_continue: php
|
||||
_lynx_snd_continue:
|
||||
php
|
||||
sei
|
||||
SndPauseOff1: lda #0 ; Selbsmodifizierter Code!!!
|
||||
SndPauseOff1:
|
||||
lda #0 ; Selbsmodifizierter Code!!!
|
||||
sta STIMCTLA
|
||||
SndPauseOff2: lda #0 ; Selbsmodifizierter Code!!!
|
||||
SndPauseOff2:
|
||||
lda #0 ; Selbsmodifizierter Code!!!
|
||||
sta MSTEREO
|
||||
|
||||
lda #$18
|
||||
@ -1238,7 +1240,8 @@ SndPauseOff2: lda #0 ; Selbsmodifizierter Code!!!
|
||||
|
||||
.rodata
|
||||
|
||||
SndMask: .byte 1,2,4,8
|
||||
SndMask:
|
||||
.byte 1,2,4,8
|
||||
|
||||
SndPrescaler:
|
||||
.byte $00,$06,$06,$06,$06,$05,$05,$05,$05,$05,$05,$05,$04,$04,$04,$04
|
||||
|
Loading…
Reference in New Issue
Block a user