1
0
mirror of https://github.com/dschmenk/PLASMA.git synced 2025-01-09 13:33:26 +00:00

different test

This commit is contained in:
David Schmenk 2016-07-18 19:17:38 -07:00
parent dd3c897b0c
commit 7c30332427

View File

@ -66,33 +66,22 @@ export asm tone2(pitch1, pitch2, duration)
end
export asm tonePWM(sample, speed, len)
STX ESP
LDY ESTKH,X
LDA ESTKL,X
BEQ +
INC ESTKH,X
+ LDA ESTKL+2,X
INY
+ STY DSTH
STA DSTL
LDA ESTKL+2,X
STA SRCL
LDA ESTKH+2,X
STA SRCH
LDA ESTKL+1,X
BNE ++
LDY #$00
- LDA (SRC),Y
SEC
-- SBC #$01
BCS --
LDA $C030
LDY ESTKL+1,X
INY
BNE +
INC SRCH
+ LDX ESP
DEC ESTKL,X
BNE -
DEC ESTKH,X
BNE -
INX
RTS
++ STA TMPL
STY TMPL
LDY #$00
PHP
SEI
- LDA (SRC),Y
SEC
-- LDX TMPL
@ -104,18 +93,23 @@ export asm tonePWM(sample, speed, len)
INY
BNE +
INC SRCH
+ LDX ESP
DEC ESTKL,X
+ DEC DSTL
BNE -
DEC ESTKH,X
DEC DSTH
BNE -
PLP
LDX ESP
INX
INX
RTS
++
end
def toneTest
byte t
tonePWM($D000, 0, $2000)
for t = 2 to 128
tone2(t, t >> 1, 10)
tone(t, 50)
next
end
toneTest()
done