TriOS-alt/zubehör/game boulderdash/sourcen/Regnatix-Code/test-snd2.spin

74 lines
3.7 KiB
Plaintext


CON
_CLKMODE = XTAL1 + PLL16X
_XINFREQ = 5_000_000
OBJ
ios: "ios"
num: "numbers"
CON
TIBLEN = 32
VAR
byte tib[TIBLEN] 'tastatur-input-buffer
PUB main | a,b,c,key,n
ios.start
ios.startram 'code für test im ram, sollte bei bin-datei auskommentiert werden
ios.screeninit(@prompt1,4)
repeat
repeat 32
a?
a := a & $FF
byte[@fx_puffer+2] := a
ios.sfx_setslot2(@fx_puffer,15)
ios.sfx_fire(15,1)
printfx(@fx_puffer)
waitcnt(clkfreq / 20 + cnt)
printfx(@fx_puffer)
'key := ios.keywait
ios.wav_play(@wav1)
'key := ios.keywait
ios.print(string($0d,"Wave : "))
repeat b from 55 to 0 step 5
ios.printdec(b)
ios.printchar(" ")
waitcnt(clkfreq * 5 + cnt)
ios.wav_stop
pub printfx(adr)| i,a
ios.printchar(ios#char_nl)
repeat i from 0 to 11
a := byte[adr+i]
ios.print(string("$"))
ios.printhex(a,2)
ios.print(string(" "))
DAT
prompt1 byte "▶SND-Test"
byte $0d,"Basisschwingung Modulation Hüllkurve "
byte $0d,"Wav Len Fre Vol LFO LFW FMa AMa Att Dec Sus Rel"
byte $0d,"[01] [02] [03] [04] [05] [06] [07] [08] [09] [0A] [0B] [0C] [M] ",$0
wav1 byte "bd2.wav",0
wav2 byte "bd2.hss",0
'basisschwingung modulation hüllkurve
'Wav Len Fre Vol LFO LFW FMa AMa Att Dec Sus Rel
fx_puffer byte $01, $01, $80, $0F, $00, $00, $00, $00, $FF, $00, $00, $80
byte $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00