mirror of
https://github.com/bobbimanners/Applecorn.git
synced 2024-07-01 08:29:36 +00:00
SOUND ignores non-internal channels
This commit is contained in:
parent
6bcb59575e
commit
762d2ea13e
|
@ -7,7 +7,12 @@
|
||||||
* OSWORD &07 - Make a sound
|
* OSWORD &07 - Make a sound
|
||||||
* On entry: (OSCTRL),Y points to eight byte parameter block (2 bytes each for
|
* On entry: (OSCTRL),Y points to eight byte parameter block (2 bytes each for
|
||||||
* channel, amplitude, pitch, duration)
|
* channel, amplitude, pitch, duration)
|
||||||
WORD07 LDA (OSCTRL),Y ; Get channel number/flush byte
|
WORD07 INY
|
||||||
|
LDA (OSCTRL),Y ; Get channel system bits
|
||||||
|
DEY
|
||||||
|
CMP #$20 ; Sound system is %000xxxxx:xxxxxxxx
|
||||||
|
BCS :RTS ; *TO DO* Should pass to service call
|
||||||
|
LDA (OSCTRL),Y ; Get channel number/flush byte
|
||||||
ORA #$04 ; Convert to buffer number 4-7
|
ORA #$04 ; Convert to buffer number 4-7
|
||||||
AND #$0F ; Mask off flush nybble
|
AND #$0F ; Mask off flush nybble
|
||||||
PHA ; Stash
|
PHA ; Stash
|
||||||
|
@ -25,6 +30,7 @@ WORD07 LDA (OSCTRL),Y ; Get channel number/flush byte
|
||||||
EOR #$80
|
EOR #$80
|
||||||
JSR KBDCHKESC ; Was Escape pressed?
|
JSR KBDCHKESC ; Was Escape pressed?
|
||||||
BIT ESCFLAG
|
BIT ESCFLAG
|
||||||
|
* ; *TO DO* Replace above with JSR ESCPOLL
|
||||||
BMI :ESCAPE ; If so, bail!
|
BMI :ESCAPE ; If so, bail!
|
||||||
:NOKEY PLX ; Buffer num -> X
|
:NOKEY PLX ; Buffer num -> X
|
||||||
PHX
|
PHX
|
||||||
|
@ -64,7 +70,7 @@ WORD08 LDA (OSCTRL),Y ; Get envelope number
|
||||||
TAX
|
TAX
|
||||||
LDA #$00
|
LDA #$00
|
||||||
:L0 CPX #$00 ; Calculate EnvNum * 13
|
:L0 CPX #$00 ; Calculate EnvNum * 13
|
||||||
BEQ :S1
|
BEQ :S1 ; Faster to do n*12+n to get n*13
|
||||||
CLC
|
CLC
|
||||||
ADC #13
|
ADC #13
|
||||||
DEX
|
DEX
|
||||||
|
|
Loading…
Reference in New Issue
Block a user