1 'this is test program for sine wave attenuation - mod feedback - see line 113 10 'GR8NET implementation FM test program 15 vdp(10)=vdp(10)and&hfd:'60 Hz mode 20 print:print"1. Decay test":print"2. Decay test 2":PRINT"3. Attack test":print"4. Attack test 2":PRINT"5. SL test" 21 print"6. AM/VIB":print"7. Decay test 3":print"8. Modulator feedback":print"9. Wave shape" 30 input"Choice";a:onagoto50,55,60,90,70,80,100,110,120 40 end 50 'decay test: mute mod, 23=F;43=0;63=Fx;83=4F;E3=0;A0=0;C0=31;B0=32/12 51 out&hc4,&h40:out&hc5,63:out&hc4,&h23:out&hc5,&hf:out&hc4,&h43:out&hc5,0:out&hc4,&h83:out&hc5,&h4f:out&hc4,&he3:out&hc5,0 52 out&hc4,&ha0:out&hc5,0:out&hc4,&hc0:out&hc5,&h31 53 fori=0to15:printi;chr$(13);:out&hc4,&h63:out&hc5,15*16+i:out&hc4,&hb0:out&hc5,&h32 54 d=300-fix(i/4)*60:gosub2000:out&hc5,&h12:d=20:gosub2000:nexti:goto20 55 'decay test 2 (testing 4 consecutive rates): mute mod, 23=4;43=0;63=F4;83=4F;E3=0;A0=0;C0=31;B0=32/12 56 out&hc4,&h40:out&hc5,63:out&hc4,&h23:out&hc5,&h4:out&hc4,&h43:out&hc5,0:out&hc4,&h83:out&hc5,&h4f:out&hc4,&he3:out&hc5,0 57 out&hc4,&ha0:out&hc5,0:out&hc4,&hc0:out&hc5,&h31:out&hc4,&h63:out&hc5,&hf4 58 fori=0to3:printi;chr$(13);:forj=0to3:out&hc4,&hb0:out&hc5,&h22+i*8 59 d=100:gosub2000:out&hc5,2+i*8:d=20:gosub2000:nextj:nexti:goto20 60 'attack test: mute mod, 23=F;43=0;63=xF;83=FF;E3=0;A0=0;C0=31;B0=32/12 61 out&hc4,&h40:out&hc5,63:out&hc4,&h23:out&hc5,&hf:out&hc4,&h43:out&hc5,0:out&hc4,&h83:out&hc5,&hff:out&hc4,&he3:out&hc5,0 62 out&hc4,&ha0:out&hc5,0:out&hc4,&hc0:out&hc5,&h31:gosub66 63 out&hc4,&h83:out&hc5,&h80:out&hc4,&h23:out&hc5,&h2f:out&hc4,&hb0:out&hc5,&h32:d=100:gosub2000:out&hc5,&h12:gosub66 64 out&hc4,&h63:out&hc5,&h24:out&hc4,&hb0:out&hc5,&h32:d=10:gosub2000:out&hc4,&h63:out&hc5,&hf4:d=10:gosub2000 65 out&hc4,&h63:out&hc5,&h24:d=100:gosub2000:out&hc4,&hb0:out&hc5,&h12:d=100:gosub2000:goto20 66 fori=0to15:printi;chr$(13);:out&hc4,&h63:out&hc5,i*16+15:out&hc4,&hb0:out&hc5,&h32 67 d=150-fix(i/4)*30:gosub2000:out&hc5,&h12:d=20:gosub2000:nexti:return 70 'sustain level test: mute mod, 23=xF;43=0;63=F1;83=xF;E3=0;A0=0;C0=31;B0=32/12 71 out&hc4,&h40:out&hc5,63:out&hc4,&h43:out&hc5,0:out&hc4,&h63:out&hc5,&hf1:out&hc4,&he3:out&hc5,0 72 out&hc4,&ha0:out&hc5,0:out&hc4,&hc0:out&hc5,&h31 73 forj=0to1:out&hc4,&h23:out&hc5,15+j*32:fori=0to15:printi+j*16;chr$(13); 74 out&hc4,&h83:out&hc5,15+i*16:out&hc4,&hb0:out&hc5,&h32 75 d=300+fix(i/4)*300:gosub2000:out&hc5,&h12:d=20:gosub2000:nexti:nextj:goto20 80 'am/vibrato test: mute mod, 23=26;43=0;63=F0;83=00;E3=0;A0=0;C0=31;B0=32/12 81 out&hc4,&hbd:out&hc5,0:out&hc4,&h40:out&hc5,63:out&hc4,&h23:out&hc5,&h26:out&hc4,&h43:out&hc5,0:out&hc4,&h63:out&hc5,&hf0:out&hc4,&h83:out&hc5,0:out&hc4,&he3:out&hc5,0 82 out&hc4,&ha0:out&hc5,0:out&hc4,&hc0:out&hc5,&h31:out&hc4,&hb0:out&hc5,&h32 83 d=100:gosub2000:out&hc4,&h23:out&hc5,&h66:gosub2000:out&hc4,&h23:out&hc5,&h26:out&hc4,&hbd:out&hc5,&h40 84 out&hc4,&h23:out&hc5,&h66:gosub2000:out&hc4,&h23:out&hc5,&h26:out&hc4,&hbd:out&hc5,0:gosub2000 85 out&hc4,&h23:out&hc5,&ha6:gosub2000:out&hc4,&h23:out&hc5,&h26:gosub2000:out&hc4,&hbd:out&hc5,&h80 86 out&hc4,&h23:out&hc5,&ha6:gosub2000:out&hc4,&h23:out&hc5,&h26:gosub2000:out&hc4,&hbd:out&hc5,0:out&hc4,&hb0:out&hc5,&h12:gosub2000:goto20 90 'attack test 2, testing all rates: mute mod, 23=24;43=0;63=xf;83=4f;E3=0;A0=0;C0=31;B0=32/12 91 out&hc4,&h40:out&hc5,63:out&hc4,&h23:out&hc5,&h24:out&hc4,&h43:out&hc5,0:out&hc4,&h83:out&hc5,&h4f:out&hc4,&he3:out&hc5,0 92 out&hc4,&ha0:out&hc5,0:out&hc4,&hc0:out&hc5,&h31:out&hc4,&h63:out&hc5,&h1f:out&hc0,&h18:out&hc1,1:out&hc0,&h19:out&hc1,1:out&ha,0 93 restore96:fori=0to10:reada:poke&h9000+i,a:nexti:defusr=&h9000 94 fori=1to15:printi;chr$(13);:out&hc4,&h63:out&hc5,15+i*16:forj=0to3:out&hc4,&hb0:poke&h9006,&h22+j*8:poke&h9002,255:a=usr(0) 95 d=250:gosub2000:poke&h9002,0:poke&h9006,2+j*8:a=usr(0):d=100:gosub2000:nextj:nexti:goto20 96 data &hf3,&h3e,255,&hd3,10,&h3e,0,&hd3,&hc5,&hfb,&hc9 100 'decay test 3 - testing all possible rates: mute mod, 23=4;43=0;63=Fx;83=4F;E3=0;A0=0;C0=31;B0=32/12 101 out&hc4,&h40:out&hc5,63:out&hc4,&h23:out&hc5,&h4:out&hc4,&h43:out&hc5,0:out&hc4,&h83:out&hc5,&h4f:out&hc4,&he3:out&hc5,0 102 out&hc4,&ha0:out&hc5,0:out&hc4,&hc0:out&hc5,&h31 103 forj=1to15:fori=0to3:printi+j*4;chr$(13);:out&hc4,&h63:out&hc5,&hf0+j:out&hc4,&hb0:out&hc5,&h22+i*8 104 d=450-j*25:gosub2000:out&hc5,2+i*8:d=20:gosub2000:nexti:nextj:goto20 110 ' modulator feedback (CNT=1): mute carr, 43=3F;20=21;40=0;60=F0;80=0F;E0=0;A0=0;C0=31..3F;B0=32/12 111 out&hc4,&hfe:out&hc5,0:form=0to1023:printhex$(m);" "; 112 out&hc4,&h43:out&hc5,63:out&hc4,&h20:out&hc5,&h21:out&hc4,&h40:out&hc5,0:out&hc4,&h60:out&hc5,240:out&hc4,&h80:out&hc5,&h0f:out&hc4,&he3:out&hc5,0 113 out&hc4,&ha0:out&hc5,0:out&hc4,&hc0:out&hc5,&h31:out&hc4,&hb0:out&hc5,&h32:d=50:gosub2000:d=20 114 fori=4to6:out&hc4,&hc0:out&hc5,&h31+i*2:gosub2000:nexti:out&hc4,&hff:out&hc5,0:out&hc4,&hb0:out&hc5,&h12:nextm:goto20 120 'wave shape: mute mod, 23=4;43=0;63=F0;83=0F;E3=0x;A0=0;C0=31;B0=32/12 121 out&hc4,&h40:out&hc5,63:out&hc4,&h23:out&hc5,&h24:out&hc4,&h43:out&hc5,0:out&hc4,&h63:out&hc5,&hf0:out&hc4,&h83:out&hc5,&h0f 122 out&hc4,&ha0:out&hc5,0:out&hc4,&hc0:out&hc5,&h31:out&hc4,&hb0:out&hc5,&h32:out&hc6,5:out&hc7,3:d=10:gosub2000:d=100 123 fori=0to7:printi;chr$(13);:out&hc4,&he3:out&hc5,i:gosub2000:gosub2000:nexti:out&hc4,&hb0:out&hc5,&h12:goto20 2000 'delay, D=number of interrupts 2001 oninterval=dgosub2003:intervalon:v=0 2002 ifv=1thenreturnelsegoto2002 2003 v=1:return