home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FM Towns: Free Software Collection 5
/
FREESOFT.BIN
/
fb386
/
rac
/
rac.bas
next >
Wrap
BASIC Source File
|
1992-08-19
|
2KB
|
78 lines
10 '
20 '
30 ' RANDOM ACCESS CD PLAYER
50 '
60 '
70 CLS:CLEAR
80 SCREEN@ 0
90 WINDOW:VIEW
100 MOUSE 0:MOUSE 1,0,0,1
110 ON ERROR GOTO 700
120 '
130 DIM DA%(5)
140 CDINF DA%:HM=DA%(5)
150 PRINT USING "演奏時間 ##分 ##秒 ##フレーム ";DA%(2);DA%(3);DA%(4);
160 PRINT "曲数 ";HM
170 '
180 DIM T(HM),S(HM)
190 TOTAL=DA%(2)*60*75+DA%(3)*75+DA%(4)
200 FOR I=HM TO 1 STEP -1
210 C$=CDSTIME$(I)
220 T(I)=TOTAL-(VAL(MID$(C$,1,2))*60*75+VAL(MID$(C$,4,2))*75+VAL(MID$(C$,7,2)))
230 TOTAL=TOTAL-T(I)
240 NEXT
250 '
280 MAX=1
290 FOR I=2 TO HM
300 IF T(I)>T(MAX) THEN MAX=I
310 NEXT
320 '
330 K=638/T(MAX)
340 FOR I=1 TO HM
350 LINE (1,I*19-1)-(K*T(I),I*19+18),PSET,5,B
360 LINE (0,I*19-2)-(K*T(I)-1,I*19+17),PSET,7,B
370 LINE (1,I*19-1)-(K*T(I)-2,I*19+16),PSET,1,BF
380 NEXT
390 '
430 FOR I=1 TO HM
440 S(I)=T(I)/75
460 SY$="# "+STR$(I)
470 SYMBOL(0,I*19),SY$,1,1
480 NEXT
481 '
482 FOR I=1 TO S(MAX)\60
483 LINE (K*I*60*75,0)-(K*I*60*75,480),PSET,0
484 NEXT
490 '
500 DIM ST%(8)
510 ON MOUSE(2) GOSUB *L
520 ON MOUSE(4) GOSUB *R
530 MOUSE (2) ON :MOUSE (4) ON
540 '
550 CDSTAT ST%
560 LOCATE 50,0:PRINT USING"###.##分 ##秒" ;ST%(5);ST%(6);ST%(7)
580 GOTO 550
590 *L
600 Y=INT((MOUSE(1)+2)/19)
610 IF Y<1 OR HM<Y THEN RETURN
620 IF K*T(Y)<MOUSE(0) THEN RETURN
630 M=MOUSE(0)/K/75
640 CD PLAY (INT(M\60),INT(M MOD 60),0,Y):CP=0
650 RETURN
660 *R
670 IF CP=0 THEN CD PAUSE :CP=1 ELSE CD CONT :CP=0
680 RETURN
690 '
700 'ERROR
710 IF ERR=53 THEN MOUSE (2) OFF:MOUSE (4) OFF ELSE 770
720 LOCATE 14,23:PRINT"CDを入れ換えたのち、マウスをクリックしてください。"
730 WHILE MOUSE(2,0)+MOUSE(2,1)=0
740 WEND
750 GOTO 10
760 '
770 IF ERR=5 THEN LINE (1,1*19-1)-(K*T(1)-2,1*19+16),PSET,0,BF
780 LINE (1,1*19-1)-(K*T(1)-2,1*19-1 ),PSET,5
790 LINE (1,1*19-1)-(1 ,1*19+16),PSET,5
800 LOCATE 0,1:COLOR 2:PRINT"DATA TRACK ":COLOR 7
810 RESUME 650