-
Notifications
You must be signed in to change notification settings - Fork 2
/
basic.bas
148 lines (148 loc) · 4.14 KB
/
basic.bas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
100 POKE56,32:POKE55,0:CLR:POKE788,52
110 BA=49152
114 :
115 DEF FN EY(X)=INT(((X/100-INT(X/100))*10)+.5)
116 DEF FN EX(X)=INT(((X/10-INT(X/10))*10)+.5)
117 DEF FN ED(X)=FN EX(X)*(FN EX(X)<4)*(FN EY(X)<>1)
120 :
130 DIM NA$(5),SC(5),SG(5),PF(5),ES(5),KI(5),IP$(5),ED$(3),IX(5),KD(5),PS(5)
132 ED$(0)="TH":ED$(1)="ST":ED$(2)="ND":ED$(3)="RD"
133 F1=12:F2=0
134 FA$="Ÿœž•–—˜™š›":PRINT"“"
135 :
140 IF F1=1 THEN 191
141 BL$=MID$(FA$,F2+1,1)
142 POKE 53281,F1:POKE53280,F1
145 PRINT "MASTERS' DESIGN GROUP'S ULTIMATE TRON II"
150 PRINT" WRITTEN BY OLIVER STILLER"BL$
160 PRINT"DEVELOPMENT HISTORY:"
170 PRINT"ULTIMATE TRON PUBLISHED BY 64'ER IN 1988"
172 PRINT"ATARI ST ESCAPE-TRON WRITTEN AT COLOGNE UNIVERSITY IN";
174 PRINT" AUGUST '88"
176 PRINT"HEX-TRON WRITTEN IN MAY '89, PLAYED BY MDG AND CYBERSTYLE"
178 PRINT"IMPROVED VERSION: 'ULTIMATE TRON II' PROGRAMMED IN NOVEMBER 1989"
180 PRINT"PRESS: FUNCTION KEYS TO MODIFY COLOR"
185 PRINT" SPACE TO GO ON"
190 GET A$
191 IF A$="…" THEN F1=F1+1 AND 15:GOTO140
192 IF A$="†" THEN F1=F1+15 AND 15:GOTO140
193 IF A$="‡" THEN F2=F2+1 AND 15:GOTO140
194 IF A$="ˆ" THEN F2=F2+15 AND 15:GOTO140
195 IF (A$<>" ") OR (F1=F2) THEN 190
210 GOSUB 2070
220 GOSUB 2200
222 FOR T=0 TO 5
223 IX(T)=T
225 NEXT T
270 :
330 DATA "COMMODORE AND STOP"
340 DATA "Z AND X"
350 DATA "B AND N"
360 DATA ". AND /"
370 DATA "* AND HOME"
380 DATA "F1 AND F3"
385 :
387 REM *** MAIN LOOP
390 :
410 FOR T=0 TO 5
420 POKE BA+3+T,PF(T)
425 POKE BA+9+T,0
430 NEXT
431 P=0
432 IF RL>=PR THEN RL=0
433 FOR T=0 TO PR-1
434 RI= T+RL
435 IF RI>=PR THEN RI=RI-PR
436 IF PF(P)=0 THEN P=P+1:GOTO 436
437 POKE BA+83+P,PS(RI):P=P+1
438 NEXT T:RL=RL+1
480 PRINT BL$"PRESS ANY KEY TO PLAY...":POKE198,0
490 WAIT 198,1:POKE53265,3
495 POKE 780,F1+16*F2
500 SYS BA:POKE53265,3
505 GA=GA+1
510 PRINT"“"BL$;GA""ED$(FN ED(GA))". GAME'S RESULTS..."
515 POKE53272,21:POKE53265,27
520 FOR T=0 TO 5
530 SC(T)=0
532 NEXT T
533 FOR T=0 TO 5
535 IF PEEK(BA+29+T)=128 THEN 545
536 KR=PEEK(BA+29+T):KD=PEEK(BA+23+T)
537 SC(KR)=SC(KR)+PR:PRINT NA$(KR)BL$" KILLS "NA$(KD)
538 KI(KR)=KI(KR)+1:KD(KD)=KD(KD)+1
540 NEXT
545 ES=PEEK(49152+16)
550 IF ES=128 THEN 560
555 SC(ES)=SC(ES)+PR*3:PRINTNA$(ES)BL$" ESCAPED!!!":ES(ES)=ES(ES)+1:GOTO 600
560 WI=PEEK(49152+15)
570 FOR T=0 TO 5
572 SC(T)=SC(T)+PEEK(BA+9+T)
574 NEXT
580 IF WI<128 THEN SC(WI)=SC(WI)+PR*2:PRINT NA$(WI)BL$" WINS GAME!":GOTO 600
585 PRINT"ALL PLAYERS CRASHED!":GOTO 600
590 :
600 PRINTBL$"SCORES: GAME KILLS KILLED ESCAPE TOTAL "
610 FOR T=0 TO 5
612 SG(T)=SG(T)+SC(T)
615 NEXT T
616 FL=0
617 FOR T=0 TO 4
618 IF SG(IX(T))<SG(IX(T+1)) THEN X=IX(T):IX(T)=IX(T+1):IX(T+1)=X:FL=1
619 NEXT T
620 IF FL THEN 616
627 FOR T=0 TO 5
628 G=IX(T)
629 IF PF(G)=0 THEN 640
630 PRINT BL$NA$(G)"";
632 PRINT TAB(8)SC(G)TAB(14)KI(G)TAB(20)KD(G)TAB(27)ES(G)TAB(33)SG(G)
640 NEXT T
650 PRINT:FOR T=0 TO 1500:NEXT T:GOTO 390
1999 :
2000 REM *** GET KEYBORD OFFSET
2005 KY$="ZXBN./*†…"
2010 GET A$
2015 FOR T=1 TO 11
2020 IF MID$(KY$,T,1)=A$ THEN A= T AND 14:RETURN
2030 NEXT T
2040 IF PEEK(653)=2 THEN A=0:RETURN
2050 GOTO 2010
2060 :
2070 REM *** ENTER PLAYERS' NAMES
2075 PRINT BL$"“PLEASE ENTER ALL PLAYERS' NAMES!"
2077 PRINT" (PRESS RETURN TO SKIP PLAYER)"
2078 FOR T=0 TO 47
2079 POKE BA+35+T,0
2080 NEXT T
2081 PL=0:PR=0
2090 FOR T=0 TO 2
2100 PRINT
2110 FOR G=0 TO 1
2120 PRINT TAB(G*15)BL$"PLAYER"PL+1" ";
2125 A$="---"
2130 INPUT A$
2134 A$=LEFT$(A$,8):IF A$="---" THEN 2140
2135 NA$(PL)=A$:PF(PL)= 1:PS(PR)=PL:PR=PR+1
2136 FOR W= 1 TO LEN(A$)
2137 P=ASC(MID$(A$,W,1))-64:IFP>=0 AND P<32 THEN POKE BA+35+8*PL+W-1,P
2138 NEXT W
2140 PRINT "‘"TAB(G*15)" ";A$;
2145 PL=PL+1
2150 NEXT G,T
2155 IF PR<2 THEN PRINT:PRINT BL$"AT LEAST TWO PLAYERS!":PRINT"":GOTO 2080
2160 RETURN
2170 :
2200 REM *** INPUT CONTROL KEYS
2205 PRINT BL$"“ SELECT ALL PLAYERS' KEYS FROM:"
2207 PRINT"COMMO’/STOP’ Z’/X’ B’/N’ .’//’ *’/HOME’ F1’/F3’"
2210 FOR T=0 TO 5
2220 READ IP$(T)
2230 NEXT T
2250 FOR TC=0 TO 5
2260 IF PF(TC)=0 THEN 2300
2265 PRINTNA$(TC)TAB(15);
2270 GOSUB 2000
2280 IF IP$(INT(A/2))<>""THENPOKE BA+17+TC,A:PRINTIP$(A/2):IP$(A/2)="":GOTO 2300
2290 GOTO 2270
2300 NEXT TC
2310 RETURN