mirror of
https://github.com/cc65/cc65.git
synced 2025-01-11 11:30:13 +00:00
fix tab indentation
This commit is contained in:
parent
30df733c31
commit
29a80065cc
@ -9,31 +9,31 @@
|
|||||||
.import popa
|
.import popa
|
||||||
; play sound, arguments: voice, pitch, distortion, volume. same as BASIC
|
; play sound, arguments: voice, pitch, distortion, volume. same as BASIC
|
||||||
.proc _sound
|
.proc _sound
|
||||||
sta STORE2 ;save volume
|
sta STORE2 ;save volume
|
||||||
jsr popa ;get distortion
|
jsr popa ;get distortion
|
||||||
sta STORE1 ;save distortion
|
sta STORE1 ;save distortion
|
||||||
jsr popa ;get pitch
|
jsr popa ;get pitch
|
||||||
pha ;save in stack
|
pha ;save in stack
|
||||||
jsr popa ;get voice
|
jsr popa ;get voice
|
||||||
asl a ;adjust voice *2 for offset in x
|
asl a ;adjust voice *2 for offset in x
|
||||||
tax
|
tax
|
||||||
pla ;get pitch from stack
|
pla ;get pitch from stack
|
||||||
sta AUDF1,x ; store pitch
|
sta AUDF1,x ;store pitch
|
||||||
lda #0
|
lda #0
|
||||||
sta AUDCTL
|
sta AUDCTL
|
||||||
lda #3
|
lda #3
|
||||||
stx SKCTL ;init sound
|
stx SKCTL ;init sound
|
||||||
lda STORE1 ;get distortion
|
lda STORE1 ;get distortion
|
||||||
asl a ;ignore the high nibble
|
asl a ;ignore the high nibble
|
||||||
asl a
|
asl a
|
||||||
asl a
|
asl a
|
||||||
asl a
|
asl a
|
||||||
clc ; setup for adding volume
|
clc ;setup for adding volume
|
||||||
adc STORE2 ; add volume
|
adc STORE2 ;add volume
|
||||||
sta AUDC1,x ; volume + distortion in control channel
|
sta AUDC1,x ;volume + distortion in control channel
|
||||||
rts
|
rts
|
||||||
.endproc
|
.endproc
|
||||||
; reserve 2 bytes for temp storage
|
;reserve 2 bytes for temp storage
|
||||||
.bss
|
.bss
|
||||||
STORE1: .res 1
|
STORE1: .res 1
|
||||||
STORE2: .res 1
|
STORE2: .res 1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user