Autore Topic: Sorgente Basic Di Rox64  (Letto 4137 volte)

iAN CooG

  • Utente
  • **
  • Post: 1774
    • http://iancoog.altervista.org
  • Gioco Preferito: Turbo Assembler, ActionReplay Monitor, DiskDemon
Sorgente Basic Di Rox64
« il: 12 Luglio 2004, 01:55:23 »
 Non ricordo piu' dove l'ho pescato ma era qui sul mio HD da un po'...
Codice: [Seleziona]
start tok64 rox64.prg
1 REM ****rox-64****
2 REM by jeff minter
3 REM   16/09/1982
4 REM **************
5 REM **llamasoft!**
6 REM **************
9 REM ***black screen+ limit memory***
10 POKE53280,0:POKE53281,0:POKE56,48:CLR
19 REM***sprite bases***
20 FORx=0TO6:s(x)=192+x:NEXT x:v=53248
25 DIMsc$(10),sc(10):FORx=1TO10:sc$(x)="***{156}rox{cyan}64{yellow}***":sc(x)=0:NEXT x
30 FORx=s(0)*64TOs(6)*64+64:POKEx,0:NEXTx
35 REM***mothership***
36 FORx=0TO50:READa:POKEs(1)*64+6+x,a:NEXT x:POKE2041,s(1)
37 DATA64,20,1,16,170,4,11,255,224,21,85,88,148,0,22,144,0,6,144,0,6,144,0,6
38 DATA144,0,6,144,0,6,159,255,246,4,0,16,4,0,16,16,0,4,16,0,4,64,0,1,64,0,1
39 REM***define sprite #0***
40 FORx=0TO7:READa:POKEs(0)*64+25+x*3,a:NEXT x
45 DATA24,62,124,255,254,126,94,8
49 REM***sprite #1***
50 FORx=0TO56:READa:POKEs(6)*64+x,a:NEXT x:POKE2046,s(6)
55 DATA2,0,0,2,0,0,2,0,0,20,0,0,8,16,0,20,255,0,226,0,128,4,124,64
56 DATA5,66,64,4,66,64,2,66,128,1,67,0,2,254,128,4,56,64,8,40,32,16,56,16
57 DATA16,40,16,16,56,16,56,40,56
59 REM***sprite #2***
60 FORx=0TO7:READa:POKEs(2)*64+25+x*3,a:NEXT x:POKE2042,s(2)
65 DATA192,224,118,56,24,20,2,0
67 FORx=0TO9:READg(x):NEXT x:DATA160,227,247,248,98,121,111,100,32,32
69 REM***sprite #3***
70 FORx=0TO7:READa:POKEs(3)*64+25+x*3,a:NEXT x:POKE2043,s(3)
75 DATA8,20,28,28,28,28,42,8
79 REM***sprite #4***
80 FORx=0TO7:READa:POKEs(4)*64+25+x*3,a:NEXT x:POKE2044,s(4)
85 DATA3,7,14,60,24,40,64,0
86 REM***explosion sprite***
87 FORx=0TO7:READa:POKEs(5)*64+25+x*3,a:NEXT x:POKE2045,s(5)
88 DATA66,0,4,32,0,34,128,16
89 REM***sound registers***
90 vo=54296:wa=54276:at=54277:h=54273:lo=54272:ph=54275:pl=54274:su=54278
95 POKEvo,15:fi=0:a$="":key=197:POKEat+14,32:POKEsu+14,255
98 FORx=waTOwa+14STEP7:POKEx,17:POKEx,0:NEXT
99 REM***print up planet***
100 GOSUB20000:PRINT"{clear}":FORx=1TO18:PRINT"{down}";:NEXT
110 PRINT"{yellow}{cm d}{cm i}{cm d}{cm p}{cm d}{cm i}{cm d}{cm i}{cm p}{cm i}{cm d}{cm p}{cm d}{cm p}{cm @*2}{cm i}{reverse on}{cm y*5}{reverse off}{cm i}{cm d}{cm p*2}{cm d}{cm @}{cm d}{cm p}{cm d}{cm @}{cm d*2}{cm p}{cm @}{cm d}{cm p}{cm d}{cm p}";
120 PRINT"{reverse on}{space*40}{reverse off}";
130 PRINT"{home}{white}lunar eva module #5{.*3} landing site scan";
135 FORx=0TO30:POKE1104+RND(1)*600,46:NEXT:da=25:pa=3:nh=0:pt=0
140 v=53248:co=7:POKE2040,s(0):POKEv+16,0:POKEv+45,3:POKEv+21,127:aw=1
160 GOSUB5000:df=5:co=8:GOSUB7500
170 FORx=v+41TOv+43:POKEx,5:NEXT
180 POKEv+44,1
190 df=df+2:rox=11:co=co-1
199 REM***rock initialise***
200 sx=180:sy=10:POKEv,sx:POKEv+1,sy:POKEv+39,co:hi=0:rox=rox-1:IFrox=0THEN8000
210 xo=RND(1):IFRND(1)<.5THENxo=-xo
220 yo=.5:s=df:IFs>20THENs=20
230 POKEwa,129:POKEh,200:POKElo,255:POKEvo,1:POKEv+30,0:POKEv+16,0
299 REM***main motion loop***
300 sx=sx+xo*(s/3):sy=sy+yo*s
305 IFsx>255ANDhi=0THENhi=1:POKEv+16,PEEK(v+16)+1:sx=0
310 POKEv,sx:POKEv+1,sy:IFsy>190THEN1000
315 IFfiTHENGOSUB6000:IFerTHEN7000
320 s=s+.3:IFs>20THENs=20
330 POKEvo,s/2
340 IF(PEEK(v+30)AND65)=65THEN10000
400 p=PEEK(key):IFp<>64THEN3000
410 IF fiTHENGOSUB6000:IFerTHEN7000
500 GOTO300
999 REM***do impact surface***
1000 t=sx+256*hi:sp=INT(t/8)-2:POKEv,0:POKEv+1,0:POKEv+16,0:POKEvo,15:POKEh,1
1010 POKEwa+14,0:fi=0:POKEry,0:FORz=1TORND(1)*4:da=da-1:IFda=0THEN12000
1016 GOSUB7500
1020 FORx=1TO10:POKEv+17,26:FORd=1TO10:NEXT:POKEv+17,27:POKEvo,15-(x/2)
1030 FORd=1TO10:NEXTd,x
1040 q=1784+sp:p=PEEK(q):IFp=32THENq=1824+sp:p=PEEK(q):POKEwa,0
1050 gr=0:FORx=0TO9:IFp=g(x)THENgr=x:x=10
1060 NEXT x:POKEq,g(gr+1):NEXT z
1100 GOTO200
2999 REM***action for keys***
3000 IFfiTHEN4000
3005 IFp<>31ANDp<>28ANDp<>39THEN4000
3010 IFp<>31THEN3100
3020 mx=164:my=170:rx=v+4:ry=v+5:xc=-1:n=4:GOTO3500
3100 IFp<>28THEN3200
3110 mx=164:my=170:rx=v+6:ry=v+7:xc=0:n=8:GOTO3500
3200 IFp<>39THEN4000
3210 mx=164:my=170:rx=v+8:ry=v+9:xc=1:n=16
3500 FORx=v+4TOv+9:POKEx,0:NEXT:POKErx,mx:POKEry,my:h2=0:n=n+1
3505 POKEwa+14,129:POKEh+14,255-my:POKEv+16,hi
3510 fi=1:GOTO410
4000 IFp=10THEN4500
4002 IFp=41THEN4700
4005 IFp<>60ORpa=0THEN410
4006 pa=pa-1:POKEwa,19:POKEvo,15:mx=sx:my=sy
4010 FORx=1TO30:POKE53281,3:POKEh,29:POKE53281,0:POKEh,200:NEXT:GOSUB7500
4020 GOTO7000
4499 REM***abort mission***
4500 POKEv+21,64:POKEwa,129:POKEwa+7,0:POKEwa+14,0:POKEvo,0
4505 PRINT"{home}{pink}***{space*2}m i s s i o n{space*5}a b o r t e d ***"
4510 FORx=1TO15STEP.3:POKEvo,x:yy=yy-.05*x:POKEv+13,yy:NEXT x
4520 POKEwa,17:POKEwa+7,17:POKEh,32:POKEh+7,33:POKElo,yy:POKElo+7,yy+10
4530 yy=yy-.75:POKEv+13,yy:POKEh,255-yy:POKEh+7,249-yy:IFyy>6THEN4530
4540 GOTO11000
4699 REM***pause feature***
4700 PRINT"{home}{black}{space*3}*** pause mode - 'p' to restart ***"
4705 POKE53281,1:IFPEEK(key)<>64THEN4700
4710 IFPEEK(key)<>41THEN4710
4715 IFPEEK(key)<>64THEN4715
4720 POKE53281,0:PRINT"{home}{space*38}":GOTO410
4999 REM***lem display***
5000 POKEat,32:POKEsu,255:POKEat+7,32:POKEsu+7,255:POKEh,17:POKElo,3
5001 POKEvo,15:POKEwa,17:POKEwa+7,17
5002 POKEh+7,16
5005 POKElo+7,3:POKEph,8:POKEpl,8
5010 yy=3:l=s(6)*64+13:POKEv+12,168
5020 POKEl,16:POKEl-3,16:FORx=1TO8:yy=yy+.3:POKEv+13,yy:POKElo,yy:POKElo+7,yy
5025 NEXTx
5030 GOSUB5500:IFyy>175THEN5060
5040 POKEl,0:POKEl-3,0:FORx=1TO8:yy=yy+.3:POKEv+13,yy:POKElo,yy:POKElo+7,yy
5050 NEXT x:GOTO5020
5060 PRINT"{home}{space*7}{pink}retro thrusters firing{.*3}{space*8}";
5062 POKEwa,129:POKEwa+7,129:POKEh,7:FORx=15TO1STEP-.08:POKEvo,x:GOSUB5500
5065 yy=yy+.04:POKEv+13,yy:NEXT x
5067 PRINT"{home}{green}{space*5}*** planetfall successful ***{space*6}";
5070 POKEwa,17:POKEwa+7,0
5080 POKEvo,15:FORx=1TO5:PRINT"{home}{down*2}{right*11}{pink}0":POKEh,20:FORdl=1TO100:NEXT
5090 PRINT"{home}{down*2}{right*11}{white}0":POKEh,0:FORdl=1TO100:NEXT:NEXT
5100 PRINT"{home}{down*2}{space*21}"
5110 FORdl=1TO1000:NEXT:PRINT"{home}{black}meteor shower{.*3} man all rocket stations";
5115 POKEwa,17:FORx=1TO9:POKE53281,x:FORz=0TO40STEP.5
5120 POKEh,z:NEXT z:NEXT x:POKE53281,0
5200 PRINT"{home}{space*40}";:RETURN
5500 PRINT"{home}{down*2}{156}altitude{space*2}{cyan}";185-INT(yy);"{left} "
5510 RETURN
5999 REM***move my rocket***
6000 mx=mx+xc*8:IFmx>255THENmx=mx-255:POKEv+16,PEEK(v+16)+16
6010 my=my-8:IFmy<50THENPOKEry,0:fi=0:POKEwa+14,0:RETURN
6020 POKErx,mx:POKEry,my:er=0:POKEh+14,255-my:POKEvo,15
6025 IF(PEEK(v+30)ANDn)=nTHEN6200
6100 RETURN
6200 er=1:POKEwa+14,0:pt=pt+aw*100:GOTO7500
6999 REM***do an explosion***
7000 POKEh,6:POKEvo,15:POKEv+1,0:POKEry,0:nh=nh+1:POKEwa,129
7005 IFhi=1THENPOKEv+16,32
7010 FORx=15TO0STEP-.3:POKEv+10,sx:POKEv+11,sy:POKEvo,x:POKEv+29,32:POKEv+23,32
7020 POKEv+10,sx:POKEv+11,sy+4:POKEvo,x:POKEv+29,0:POKEv+23,0:NEXT x
7030 POKEv+11,0:fi=0:GOTO200
7499 REM***status***
7500 PRINT"{home}{down*21}{156}score:";pt;"{left}{space*3}{cyan}panics:";pa;"{left} ";
7505 PRINT"{space*2}{156}high:";sc(1)
7506 c$="{156}":IFda<10THENc$="{pink}"
7507 x=FRE(0):REM avoids garbage collection
7508 IFda=0THENPRINT"{down}{right*9}{space*2}":RETURN
7510 PRINT"{down}{yellow}% damage:{reverse on}";c$;:FORx=1TOda:PRINT"P";:NEXT x:PRINT"{reverse off} ";:RETURN
7999 REM***attack waves***
8000 PRINT"{home}{black}{space*6}rox attack";aw;"{left} completed!!"
8010 PRINT"{down*2}{space*8}bonus of 100 *";aw
8020 pt=pt+aw*100:POKEvo,15:POKEwa,33:FORx=0TO10:POKE53281,RND(1)*16:FORy=0TO60
8030 POKEh,y:NEXTy:NEXTx:POKEwa,0:POKE53281,0
8040 PRINT"{home}{space*39}"
8045 PRINT"{down*2}{space*25}":GOSUB7500
8050 aw=aw+1:IFaw<7THEN190
8060 GOTO15000
9999 REM***do in moonbase***
10000 PRINT"{home}{white}{space*5}*** moon base done in !! ***{space*7}"
10010 POKEv+21,32:POKEwa,129:POKEh,RND(1)*254:FORx=15TO0STEP-.1
10020 POKEv+10,170:POKEv+11,180:POKEv+23,0:POKEv+29,0:POKEvo,x
10030 POKEv+10,166:POKEv+11,174:POKEv+23,32:POKEv+29,32:POKEvo,0:NEXT x
10040 POKEv+21,0:POKEwa,0:bl=1
10999 REM***endgame scoring***
11000 PRINT"{clear}{white}your score was .. ";pt
11005 POKEwa,0:POKEwa+7,0:POKEwa+14,0
11010 PRINT"{down}to this is added a bonus for your";INT(nh*100/60)
11020 PRINT"{down}percent shooting accuracy.":b1=INT((nh/60)*5000)
11030 PRINT"{down}bonus:";b1:pt=pt+b1
11040 IFbl=1THENbl=0:GOTO11100
11050 PRINT"{down*2}and an additional bonus- for finishing"
11060 PRINT"{down}with an intact moon base!!"
11070 PRINT"{down}bonus: 5{0*3} pts.":pt=pt+5000
11100 PRINT"{down*2}{yellow}your final score was thus{cyan}";pt
11110 FORx=0TO20:GETa$:NEXT x:z=0:FORx=1TO10:IFpt>sc(x)THENz=x:x=11
11120 NEXT x:IFz=0THEN11500
11130 PRINT"{down}enter text for score table:";
11140 INPUTa$:IFLEN(a$)>15THENa$=LEFT$(a$,15)
11150 IFz=10THEN11200
11160 FORx=9TOzSTEP-1:sc(x+1)=sc(x):sc$(x+1)=sc$(x):NEXT x
11200 sc(z)=pt:sc$(z)=a$:fi=0
11500 PRINT"{clear}{right*7}{yellow}rox-64 all time best"
11510 PRINT"{right*7}{156}{cm y*20}"
11520 FORx=1TO10:PRINT"{down}{cyan}#";x;TAB(10);"{white}";sc(x);TAB(23);"{yellow}";sc$(x)
11530 NEXT x:x=FRE(0)
11540 PRINT"{down}{green}{space*5}press 'space' for a new game"
11550 p=PEEK(key):IFp<>60THEN11550
11560 GOTO100
11999 REM***moonquake!!***
12000 PRINT"{home}{space*6}***excess seismic activity***":GOSUB7500
12010 POKEwa,129:POKEh,5:FORx=15TO0STEP-.07:POKEv+17,26:FORd=1TO10:NEXT
12020 POKEv+17,27:FORd=1TO10:NEXT:POKEvo,x:NEXT x:GOTO 10000
14999 REM***mothership pickup***
15000 POKEv+21,66:POKEv+28,2:POKEv+37,7:POKEv+38,2:REM enable multicolour sprit
15005 PRINT"{white}{home}mission completed. mothership bonus 5{0*3}"
15010 POKEv+23,2:POKEv+29,2:POKEv+40,4:POKEvo,15:POKEwa,33:POKEwa+7,33
15015 pt=pt+5000:GOSUB7500
15020 POKEh,2:POKEh+7,2:POKElo,1:POKElo+7,6:POKEv+3,70
15030 FORx=0TO156STEP.2:POKEv+2,x:cl=cl+.3:IFcl>15THENcl=0
15040 POKEv+40,cl:POKEv+37,15-cl:NEXT x
15060 POKEwa+14,129:FORx=15TO0STEP-.1:yy=yy-.05*(15-x):POKEv+13,yy:POKEv+38,x
15065 NEXT x:POKEwa+14,17
15070 yy=yy-.75:POKEv+13,yy:POKEh+14,200-yy:IFyy>77THEN15070
15080 POKEv+38,2:POKEwa+14,0
15090 FORx=156TO226STEP.2:POKEv+2,x
15095 yy=yy-.2:POKEv+13,yy:POKEv+12,x+12:cl=cl+1:IFcl>15THENcl=0
15096 POKEv+40,cl:POKEv+37,15-cl
15100 POKEv+3,227-x:NEXT x:GOTO11000
19999 REM***intro titles***
20000 PRINT"{clear}{yellow}{Q*4}{space*3}{Q*3}{space*2}Q{space*3}Q{space*5}{red}QQ{cyan}QQ{156}Q {yellow}Q {blue}{space*2}{green}Q{space*3}{white}by"
20010 PRINT"{yellow}Q{space*3}Q Q{space*3}Q{space*2}Q Q{space*6}{cyan}Q{space*5}{blue}Q{space*3}{red}Q"
20020 PRINT"{yellow}{Q*4}{space*2}Q{space*3}Q{space*3}Q{space*7}{156}QQ{yellow}QQ{blue}Q {green}QQ{red}QQ{cyan}Q{space*2}{white}jeff"
20030 PRINT"{yellow}Q Q{space*3}Q{space*3}Q{space*2}Q Q{space*6}Q{space*3}{green}Q{space*5}{156}Q"
20040 PRINT"{yellow}Q{space*2}Q{space*3}{Q*3}{space*2}Q{space*3}Q{space*5}{blue}QQ{green}QQ{red}Q{space*5}{yellow}Q {white}minter"
20050 PRINT"{down}{white}* an arcade-style game for commodore-64*"
20060 PRINT"{down}defend your lunar module by firing off"
20070 PRINT"{down}rockets to intercept incoming meteors."
20080 PRINT"{down}too many ground impacts result in an"
20085 PRINT"{down}earthquake! survive 60 meteors for bonus"
20090 PRINT"and rescue by mothership!"
20100 PRINT"{down}{yellow}controls: {cyan}v,b,n {yellow}fire rockets. {cyan}space bar"
20110 PRINT"{down}{yellow}activates panic destructor. {cyan}a{yellow} to abort!!"
20120 FORx=53248TO53248+16:POKEx,0:NEXT
20130 PRINT"press {cyan}s{yellow} to start game!";
20140 IFPEEK(197)<>13THEN20140
20150 RETURN
stop tok64
(bastext 1.02)

Puo' servire per prendere spunti.
-=[]=--- iAN CooG/HVSC^C64Intros ---=[]=-
- http://hvsc.c64.org - http://intros.c64.org -

pyrat2703

  • Utente
  • **
  • Post: 267
  • Gioco Preferito: Ghost'n'Goblin
Sorgente Basic Di Rox64
« Risposta #1 il: 12 Luglio 2004, 18:56:37 »
 ciao mitico copyato e archiviato grassie...
anzi una domanda folle come al mio solito ....

non è che si puo fare copia e incolla invece che digitare sul emulatore c64 ?

 :overkiller:

anche se credo di no ma comunque domandare non si sa mai  :mattsid:  :hail:  :c64:  
WOPR EXECUTION ORDER
K36.948.3

PART ONE  : R O N C T T L
PART TWO : 07:20:35

LAUNCH CODE : D L G 2 2 0 9 T V X

hiryu

  • Utente
  • **
  • Post: 649
    • http://hiryu.netsons.org/
  • Gioco Preferito: Wizard Of Wor
Sorgente Basic Di Rox64
« Risposta #2 il: 12 Luglio 2004, 19:01:44 »
 non è proprio un copia e incolla, ma puoi usare TOK 64 (qui) che legge in ingeresso un TXT con un programma BASIC, e lo trasforma in un PRG eseguibile sul C64 o su un emulatore
Elwood: "E' partito un pistone"
Jake: "Poi torna?"
________________________________________________________
Hiryu @ http://hiryu.netsons.org | http://www.virb.com/hiryu