1 REM ***************************** 2 REM * EM INTERFACE MIDI DELAY * 3 REM * * 4 REM * 4/27/86 * 5 REM *===========================* 6 REM * (C) 1986 BY TIME DOWTY * 7 REM * ALL COMERCIAL RIGHTS RESVD* 8 REM ***************************** 10 C$=CHR$(147):M$="MIDI DELAY BY TIM DOWTY":R$="(REQUIRES EM INTERFACE CARD)" 20 L$="LOADING MACHINE CODE. . ." 30 D$="[D]ELAY CHANGE":T$="[T]RANSPOSE CHANGE" 40 V$="[V]ELOCITY ADJUST":Q$="[Q]UIT" 100 GOSUB 1000:PRINT TAB(10);L$:GOSUB 2000:GOSUB 4000:IF CSM%=771 THEN 120 110 GOSUB 1000:PRINT " CHECKSUM ERROR! CHECK DATA STATEMENTS":PRINT:END 120 GOTO 800 130 GOSUB 1000 140 DT=(PEEK(49162)*256+PEEK(49161))/20 150 GOSUB 1000:PRINT TAB(5);D$;TAB(30);"(";DT;")" 160 S$="+":T=PEEK(49163):IFT>231 THEN T=T-256:S$="" 170 PRINT:PRINT TAB(5);T$;TAB(30);"(";S$;T;")" 180 S$="+":V=PEEK(49164):IFV>128 THEN V=V-256:S$="" 190 PRINT:PRINT TAB(5);V$;TAB(30);"(";S$;V;")" 200 PRINT:PRINT TAB(5);Q$ 210 PRINT:PRINT:PRINT"YOUR CHOICE[?]"; 220 GET A$:IF A$="" THEN 220 230 IF A$="D" THEN 500 240 IF A$="T" THEN 600 250 IF A$="V" THEN 700 260 IF A$="Q" THEN 999 270 GOTO 150 500 GOSUB 1000 510 PRINT"NEW DELAY TIME":PRINT 520 INPUT"IN MILLISECONDS (1 TO 3000) ";D 530 D=D*20 540 DH=INT(D/256):DL=D-(DH*256) 550 POKE 49161,DL:POKE 49162,DH 599 GOTO 800 600 GOSUB 1000 610 PRINT"NEW TRANSPOSE INTERVAL":PRINT:INPUT"IN SEMMITONES (-24 TO +24) ";T 620 IF T<0 THEN T=256+T 630 POKE 49163,T 699 GOTO 800 700 GOSUB 1000 710 PRINT"NEW VELOCITY ADJUSTMENT":PRINT:INPUT"(-127 TO +127) ";V 720 IF V<0 THEN V=256+V 730 POKE 49164,V 799 GOTO 800 800 GOSUB 1000 810 PRINT TAB(9);CHR$(18);"DELAY ON";CHR$(146) 820 PRINT:PRINT TAB(5);"HIT A KEY TO RETURN TO MENU" 830 SYS SADRS 899 GOTO 130 999 PRINT C$:END 1000 REM ****************************** 1001 REM * SUB CLEARS SCREEN, PRINTS * 1002 REM *SIGN-ON MESSAGE & POSITIONS * 1003 REM * CURSOR. * 1004 REM ****************************** 1010 PRINT C$;TAB(8);M$:PRINT:PRINT TAB(5);R$ 1020 FOR I=1 TO 9:PRINT:NEXTI 1999 RETURN 2000 REM ****************************** 2001 REM * SUB POKES MACHINE LANGUAGE * 2002 REM * CODE INTO RAM. * 2003 REM ****************************** 2010 SADRS=49152:EADRS=49679 2020 FOR I=SADRS TO EADRS 2030 READ OP$:GOSUB 3000 2040 POKE I,OP 2050 NEXT I 2999 RETURN 3000 REM ****************************** 3001 REM * SUB CONVERTS STRING IN DATA* 3002 REM * STATEMENT TO 'POKE'ABLE * 3003 REM * DECIMAL NUMBER * 3004 REM ****************************** 3010 OH$=LEFT$(OP$,1):OL$=RIGHT$(OP$,1) 3020 OH=VAL(OH$):IF OH=0 AND OH$<>"0" THEN OH=ASC(OH$)-55 3030 OL=VAL(OL$):IF OL=0 AND OL$<>"0" THEN OL=ASC(OL$)-55 3040 OP=OH*16+OL 3999 RETURN 4000 REM ****************************** 4001 REM * SUB CALCULATES CHECKSUM OF * 4002 REM * POKED MACHINE CODE * 4003 REM ****************************** 4010 CSM%=0 4020 FOR I=SADRS TO EADRS 4030 CSM%=CSM%+PEEK(I) 4040 I=I+1 4050 CSM%=CSM%-PEEK(I) 4060 NEXT I 4999 RETURN 5000 DATA 4C,0F,C0,00,00,00,00,00,00,E8,03,0C,00,00,00,20 5001 DATA 2B,C0,20,9F,FF,20,E4,FF,C9,00,F0,F6,20,D8,C1,60 5002 DATA A9,03,8D,00,DE,A9,95,8D,00,DE,60,78,20,3D,C0,20 5003 DATA 52,C0,20,6C,C0,20,83,C0,20,20,C0,58,60,A9,7F,8D 5004 DATA 0D,DC,A9,31,8D,04,DC,A9,00,8D,05,DC,A9,11,8D,0E 5005 DATA DC,60,A9,7F,8D,0D,DD,A9,31,8D,04,DD,A9,00,8D,05 5006 DATA DD,A9,13,8D,0E,DD,A9,82,8D,0D,DD,60,AD,14,03,8D 5007 DATA 10,C2,AD,15,03,8D,11,C2,A9,9A,8D,14,03,A9,C0,8D 5008 DATA 15,03,60,AD,18,03,8D,12,C2,AD,19,03,8D,13,C2,A9 5009 DATA CB,8D,18,03,A9,C0,8D,19,03,60,AD,02,DE,4A,B0,21 5010 DATA 4A,90,27,AD,06,C0,D0,07,A9,95,8D,00,DE,30,18,AC 5011 DATA 07,C0,EE,07,C0,CE,06,C0,B9,14,C3,8D,01,DE,4C,C7 5012 DATA C0,AD,03,DE,20,07,C1,4C,7E,EA,00,48,8A,48,98,48 5013 DATA AD,0D,DD,20,AA,C1,C9,FF,F0,06,20,B7,C1,4C,D3,C0 5014 DATA AD,03,C0,F0,1C,20,AA,C1,8D,06,DD,20,AA,C1,8D,07 5015 DATA DD,A9,80,8D,0D,C0,A9,59,8D,0F,DD,68,A8,68,AA,68 5016 DATA 40,4E,0D,C0,4C,FB,C0,48,30,34,AD,0E,C0,30,1C,F0 5017 DATA 1C,2C,0E,C0,70,03,20,5C,C1,CE,0E,C0,AD,0E,C0,29 5018 DATA 3F,8D,0E,C0,68,20,0B,C2,4C,9D,C1,68,60,A9,01,8D 5019 DATA 0E,C0,68,20,FA,C1,20,9D,C1,A9,FF,4C,9D,C1,29,F0 5020 DATA C9,90,F0,0B,C9,80,F0,07,A9,80,8D,0E,C0,30,DC,20 5021 DATA 5C,C1,68,20,9D,C1,A9,41,8D,0E,C0,60,2C,0D,C0,30 5022 DATA 18,AD,09,C0,8D,06,DD,AD,0A,C0,8D,07,DD,A9,59,8D 5023 DATA 0F,DD,A9,80,8D,0D,C0,30,16,AD,06,DC,49,FF,C9,FF 5024 DATA D0,02,29,FE,20,9D,C1,AD,07,DC,49,FF,20,9D,C1,A9 5025 DATA FF,8D,06,DC,8D,07,DC,A9,59,8D,0F,DC,60,AC,05,C0 5026 DATA EE,05,C0,EE,03,C0,99,14,C2,60,AE,04,C0,EE,04,C0 5027 DATA CE,03,C0,BD,14,C2,60,48,AD,02,DE,29,02,D0,14,AE 5028 DATA 08,C0,68,9D,14,C3,EE,08,C0,EE,06,C0,A9,B5,8D,00 5029 DATA DE,30,04,68,8D,01,DE,60,78,AD,10,C2,8D,14,03,AD 5030 DATA 11,C2,8D,15,03,AD,12,C2,8D,18,03,AD,13,C2,8D,19 5031 DATA 03,A9,03,8D,00,DE,20,84,FF,60,F0,0E,18,6D,0C,C0 5032 DATA 30,06,D0,06,A9,01,D0,02,A9,7F,60,18,6D,0B,C0,60