home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
UpTime Volume 1 #3
/
utv1n3s1.d64
/
digger
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-28
|
5KB
|
147 lines
0 rem *******************************
10 rem ** digger copyright (c) 1987 **
20 rem ** by richard caravella **
30 rem ** 105 phyllis drive **
40 rem ** lindenhurst ny 11757 **
50 rem *******************************
60 rem ** 041187 **
70 clr:poke53280,0:poke53281,0:poke783,0
75 print"[147]"chr$(8)chr$(142):a=rnd(-ti/79):gosub690
80 poke 52,48: poke 56,48: clr
90 for i=49152 to 49196: read a: poke i,a: next
100 sys 49152: rem xfer char rom
105 for i=49152 to 49188: read a: poke i,a: next: rem install seq reader
110 reada:ifa=-1then130
120 fori=0to7:readb:poke12288+a*8+i,b:next:goto110
130 poke53272,(peek(53272)and240)or12:gosub730
140 q=54272:w=54296:qw=54273:we=54276:g=54277:kk=54278:forj=qtow:next:pokew,15
150 pokeg,64:pokekk,48
160 poke53280,12:poke53281,0:s$="[152]+":s=hs
170 a=1024:b=55296:d$="[145][154]^ ":a$="[158][166][166][166][166][166][166][166][166][166][166]":m$="@"
180 c$="[152][166] [166]":rd=0:l=1:s=5:d=4:e$="[152]++++"
190 ifd<1then830
200 ifrd=3thenl=l+1:rd=0
210 ifl=10andrd=0thend=d+1
220 rd=rd+1:ll=l:ifll>=10thenll=10
230 fori=1tol:pokeqw,50+l:pokeq,100:pokewe,33:forz=1to20:next:pokewe,0:next
240 x=20:y=12:print"[147]":fori=1to18:print"[152][166]";:next:print"[155]____[152]";:fori=1to18
250 print"[152][166]";:next:fori=1to20:printc$;:next:fori=1to18:print"[152][166]";:next
260 print"[155]____[152]";:fori=1to17:print"[152][166]";:next:pokea+999,102:pokeb+999,12
270 fori=1to10:y1=int(rnd(1)*19)+4:x1=int(rnd(1)*33)+2
280 poke782,x1:poke781,y1:sys65520:printe$:next
290 fori=1to25:y1=int(rnd(1)*19)+4:x1=int(rnd(1)*36)+2:p=int(rnd(1)*3)+35
300 poke646,(rnd(1)*15):poke782,x1:poke781,y1:sys65520:printchr$(p):next
310 fori=1toll*2:y1=int(rnd(1)*19)+4:x1=int(rnd(1)*23)+2
320 poke782,x1:poke781,y1:sys65520:printa$:next
330 gosub480:print"[145][155] level"l" round"rd;" ";:fori=1tod:printd$;:next
340 get k$: if k$=chr$(140) then 1200
345 j%=peek(56320)and31:xx=x:yy=y:x=x+sgn(j%and4)-sgn(j%and8)
350 y=y+sgn(j%and1)-sgn(j%and2)
380 if(j%and16)=.thengoto560
390 ifpeek(a+x+40*y)=102thenx=xx:y=yy:goto460
400 ifpeek(a+x+40*y)=32thens=s-5
410 ifpeek(a+x+40*y)=35thens=s+10*l
420 ifpeek(a+x+40*y)=36thens=s+15*l
430 ifpeek(a+x+40*y)=37thens=s+20*l
440 ifpeek(a+x+40*y)=31then190
450 ifrnd(1)*1>.5andr>=1then520
460 pokea+xx+40*yy,43:pokea+x+40*y,30:pokeb+x+40*y,12
470 print""spc(45)"[155]score:"s;"[157] ":goto340
480 r=int(rnd(1)*4)+1
490 fori=1tor:m(i,1)=int(rnd(1)*19)+4:m(i,2)=int(rnd(1)*36)+2
500 pokeqw,40:pokeq,200:pokewe,33:forz=1to20:next:pokewe,0
510 poke782,m(i,2):poke781,m(i,1):sys65520:printm$:next:return
520 fori=1tor:x1=m(i,2):y1=m(i,1):poke782,x1:poke781,y1:sys65520:prints$;
530 y1=y1+sgn(y-y1):x1=x1+sgn(x-x1):poke782,x1:poke781,y1:sys65520:printm$;
540 ifx=x1andy=y1thend=d-1:goto190
550 m(i,1)=y1:m(i,2)=x1:next:goto460
560 h=x:v=y
570 h=h+sgn(j%and4)-sgn(j%and8):v=v+sgn(j%and1)-sgn(j%and2)
610 pokeqw,45:pokeq,100:pokewe,33:forz=1to5:next:pokewe,0
620 ifpeek(a+h+40*v)=0then650
630 ifpeek(a+h+40*v)<>43thengoto390
640 pokea+h+40*v,42:pokeb+h+40*v,2:pokea+h+40*v,43:pokeb+h+40*v,12:goto570
650 fori=1tor:x1=m(i,2):y1=m(i,1):poke782,x1:poke781,y1:sys65520:prints$;:next
660 pokeqw,45+r:pokeq,200:pokewe,33:forz=1to25:next:pokewe,0
670 s=s+20*l:r=r-1:ifr<=0thengoto390
680 gosub490:goto390
690 print"[147]":fori=1to9:forj=1to15:printtab(j)" digger[145]"
700 r=rnd(1)*14+1:poke646,r:fork=1to25:next:next:print"":next
710 print"[159]copyright (c) 1987 by richard caravella"
720 printtab(10)"all rights reserved"
725 print" published by softdisk publishing, inc.": return
730 print"[147]"tab(11)"[159]this is digger ^":printtab(10)"# = 20 pts. x level"
740 printtab(10)"[154]$ = 25 pts. x level":printtab(10)"[158]% = 50 pts. x level"
750 printtab(6)"[159]@ monster = 20 pts. x level":printtab(13)"+ = -5 points"
760 printtab(8)"[159]hit fire button to start"
765 printtab(8)"[158]hit f8[158] to exit to uptime"
770 printtab(4)"[154]hit any other key for directions"
775 get a$: if a$<>"" then 775
780 p=peek(56320):if(pand16)=.thenreturn
790 geta$: if a$=chr$(140) then 1200
795 if a$="" then 780
800 gosub 1300: rem read instr. file
810 if k$=chr$(140) then 1200
820 return
830 print"":printtab(14)"[144]game over":fori=1to3:forj=1to16:poke53280,j
840 pokeqw,45+j:pokeq,148+i:pokewe,33:forz=1to20:next:pokewe,0
850 next:next:poke53281,0:poke53280,0:print"[147]"
860 ts=s:ifs>hsthenhs=ts
870 printtab(12)"[154]final score:"s:printtab(12)"high score:"hs
880 printtab(5)"[159]hit fire button to play again"
881 printtab(8)"hit f8 to exit to uptime"
882 get k$: p=peek(56320)
883 if (p and 16)=. then 160
884 if k$<>chr$(140) then 882
885 goto 1200
886 rem *** char rom xfer.ml ***
890 data 120,165,001,041,251,133,001,169
895 data 208,162,048,160,000,133,252,134
900 data 254,132,251,132,253,162,008,177
905 data 251,145,253,200,208,249,230,252
910 data 230,254,202,208,242,165,001,009
920 data 004,133,001,088,096
925 rem *** seq reader.ml ***
930 data 162,002,160,000,024,032,240,255
940 data 162,002,032,198,255,032,165,255
950 data 166,144,134,002,201,047,240,009
960 data 032,210,255,165,002,041,064,240
970 data 236,032,204,255,096
995 rem *** redefined char data ***
1000 data 000,102,060,102,102,126,219,195,195
1010 data 035,112,024,024,126,255,255,126,60
1020 data 036,024,060,255,102,102,102,060,024
1030 data 037,006,012,024,060,126,255,255,126
1040 data 030,060,255,195,255,060,102,102,231
1050 data 031,016,025,153,255,255,153,136,128
1060 data 042,000,000,060,060,060,000,000,000
1070 data 043,255,255,255,255,255,255,255,255,-1
1200 sys (8*4096)+4
1300 open15,8,15,"i0"
1310 open2,8,2,"digger docs,s,r"
1320 gosub 1600: if en<>0 then gosub 1400: return
1325 p=0
1330 gosub 1500: rem instr. page header
1340 sys 49152: rem read seq file
1350 gosub 1600: if en<>0 then gosub 1400: return
1360 get k$: if k$<>"" then 1360
1362 get k$: if k$="" then 1362
1365 if k$="s" then 1380
1370 if k$<>chr$(13) then 1362
1375 if (peek(2) and 64)=0 then 1330
1380 close2: close15: return
1400 close2: close15
1410 print"[147]"spc(13)"[150]disk i/o error"
1420 printspc(7)"[159]press spacebar to continue"
1430 get k$: if k$<>chr$(32) then 1430
1440 return
1500 print"";: p=p+1
1510 printspc(25)"[159] page";p;"[157] 0f 6 "
1520 forx=1to20
1530 print" "
1540 next
1550 printspc(7)"press [153]s[159] to start the game"
1560 printspc(5)"press [158]return[159] for the next page"
1570 return
1600 input#15,en,em$,et,es: return