home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
8bitfiles.net/archives
/
archives.tar
/
archives
/
genie-commodore-file-library
/
C64Software
/
JB.1520-4.B.SFX
/
rays
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
1990-02-12
|
4KB
|
114 lines
1000 REM PLOTTING SHED 1987
1010 :
1020 REM SET UP SOUND REGISTERS
1030 :
1040 : GOSUB2070: REM SOUND ROUTINE
1050 :
1060 REM SET UP SCREEN COLORS
1070 : POKE 53280,12 :REM BORDER MEDIUM GRAY
1080 : POKE 53281,15 :REM BACKGROUND LIGHT GRAY
1090 : POKE 646,11 :REM TEXT DARK GRAY
1100 :
1110 REM TEST IF PLOTTER PRESENT
1120 : PRINT "[147]" :REM POSITION CURSOR
1130 : SC$="" :REM RED REVERSE VIDEO
1140 : OPEN 4,6,0 :REM OPEN ASCII PORT
1150 : CLOSE 4 :REM CLOSE PORT, ST=0 IF PRESENT
1160 : IF ST=0 THEN1310 :REM GO OPEN PRINTER PORTS
1170 : IF BL=0 THEN BL=1: GOSUB1980 :REM SOUND BELL, ONCE
1180 : PRINT "[145][145][145][145][145][145]" :REM CURSOR UP TO OVERLAY
1190 : PRINT TAB(8);"[213][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][201]"
1200 : PRINT TAB(8);"[221]";SC$;" [146][151][221]"
1210 : PRINT TAB(8);"[221]";SC$;" MAKE PLOTTER READY [146][151][221]"
1220 : PRINT TAB(8);"[221]";SC$;" [146][151][221]"
1230 : PRINT TAB(8);"[202][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][203]"
1240 : IF SC$="" THEN SC$="[155]": GOTO1260 :REM ALTERNATE BETWEEN INVISIBLE
1250 : IF SC$="[155]" THEN SC$="" :REM (LIGHT GRAY) AND RED REVERSE
1260 : GT=TI :REM SAVE TIMER VALUE
1270 : IF TI-GT<60 THEN1270 :REM LOOP FOR 60 JIFFIES
1280 : GOTO1140 :REM GO RETRY PLOTTER
1290 :
1300 REM PLOTTER IS PRESENT OPEN THE PORTS
1310 : OPEN 1,6,1 :REM PLOTTING
1320 : OPEN 2,6,2 :REM PEN COLOR
1330 : OPEN 3,6,3 :REM CHARACTER SIZE
1340 : OPEN 4,6,0 :REM ASCII PORT
1350 :
1360 REM CLEAR SCREEN DRAW BANNER
1370 : PRINT "[147] [176][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][174][146]"
1380 : PRINT " [221] * RANDOM RAYS * [221][146]"
1390 : PRINT " [221] FOR THE 1520 PLOTTER [221][146]"
1400 : PRINT " [221] FROM [221][146]"
1410 : PRINT " [221] 'THE PLOTTING SHED' [221][146]"
1420 : PRINT " [173][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][189][151][146]"
1430 :
1440 : PRINT" ************ WARNING[144]! **************"
1450 : PRINT" * THIS PROGRAM WILL RUN FOREVER! [146] *"
1460 : PRINT" * USE RUN/STOP KEY TO STOP *"
1470 : PRINT" ************************************"
1480 :
1490 REM GET PEN COLOR SELECTION FROM THE USER
1500 : PRINT" CHOOSE PEN COLOR ([144]0 1 2 3[151])"
1510 : PRINT" R[146]ANDOM COLOR"
1520 : PRINT" Q[146]UIT"
1530 : INPUT" SELECTION Q[157][157][157]";PC$
1540 : PC=ASC(PC$+" ")
1550 : IF PC=81 THENPRINT"[147]":GOTO1900 :REM END PROGRAM
1560 : IF PC=82 GOTO1640 :REM RANDOM
1570 : IF PC<48 OR PC>51 THEN PRINT "[145]";TAB(28)" [145]" :GOTO1500
1580 : PC=PC-48
1590 : PRINT#2,PC :REM CHANGE PEN TO SELECTED COLOR
1600 : GOTO1780
1610 :
1620 REM ********* RANDOM COLOR
1630 :
1640 : PRINT#1,"M",0,-240
1650 : PRINT#4
1660 : FOR A=1 TO INT(RND(1)*10)+5
1670 : PRINT#1,"M";240,0
1680 : X=INT(RND(1)*480)
1690 : Y=INT(RND(1)*480)-240
1700 : PRINT#1,"D";X,Y
1710 : NEXT
1720 : C=INT(RND(1)*4)
1730 : PRINT#2,C
1740 : GOTO1660
1750 :
1760 REM ******** COLOR BY CHOICE
1770 :
1780 : PRINT#1,"M",0,-240
1790 : PRINT#4
1800 : FOR A=1 TO INT(RND(1)*10)+5
1810 : PRINT#1,"M";240,0
1820 : X=INT(RND(1)*480)
1830 : Y=INT(RND(1)*480)-240
1840 : PRINT#1,"D";X,Y
1850 : NEXT
1860 : PRINT#2,PC
1870 : GOTO1800
1880 :
1890 REM CLOSE FILES
1900 : CLOSE 1
1910 : CLOSE 2
1920 : CLOSE 3
1930 : CLOSE 4
1940 :
1950 END
1960 :
1970 REM SOUND BELL SUBROUTINE
1980 : POKE SD+24,15 :REM VOICE 1 VOLUME AND FILTER SELECT
1990 : POKE SD+4,17 :REM VOICE 1 CONTROL, START ATTACK
2000 : POKE SD+4,16 :REM VOICE 1 CONTROL, START RELEASE
2010 : TB=TI
2020 : IF (TI-TB)<60 THEN2020
2030 : POKE SD+24,0 :REM VOICE 1 CONTROL, CLEAR VOLUME
2040 : RETURN
2050 :
2060 REM SET UP SID REGISTERS FOR BELL SOUND
2070 : SD=54272 :REM ADDRESS OF SID CHIP
2080 : POKE SD, 100 :REM VOICE 1 FREQUENCY, LOW BYTE
2090 : POKE SD+ 1,56 :REM VOICE 1 FREQUENCY, HIGH BYTE
2100 : POKE SD+ 5, 8 :REM VOICE 1 ATTACK/DECAY
2110 : POKE SD+ 6,(9*16+10) :REM VOICE 1 SUSTAIN/RELEASE
2120 : RETURN