"Formula-1" for Sharp PC-1500 or PC-1500A.
© Hebdogiciel (Shift editions). (*)
Author : Marcel Griessmann
Published in "Hebdogiciel" #25.
BASIC program - 3762 bytes.
CLOAD "FORMULA-1"
RUN or DEF A
Game: A racing game. Wait for the green light (G), then go as fast as possible while staying on the track and avoiding the other cars !
Keys:
SPACE - left
ENTER - right
1/2/3/4/5 - shift gears
(*) This software is made available for documentation purpose only, since the PC-1500 is now an obsolete computer. This is not a commercial site. If you own a copyright on this program and do not want it to be available from this site, please inform me and I will remove it.
BASIC program.
1 "FORMULA 1"
2 "Hebdogiciel #25"
3 "Right/Left: SPACE/ENTER
4 "Speeds: 1 2 3 4 5
7002 "A":POKE 29262,64:CLEAR :RANDOM :WAIT 50
7005 PRINT " ### formula-1 ###"
7010 BEEP 1,150,40:INPUT "Track length (1-3)? ";LP
7015 LP=INT LP:IF LP<1OR LP>3THEN 7010
7020 BEEP 1,150,40:CLS :CURSOR 10:PRINT "-";LP;"
-";:LP=LP*10
7030 DIM E$(15)*30
7031 E$(1)="00000000000008"
7032 E$(2)="0000000000080808"
7033 E$(3)="0000000000081C08"
7034 E$(4)="00000000001C1C1C"
7035 E$(5)="00000000081C3E1C08"
7036 E$(6)="000000002A1C3E1C2A"
7037 E$(7)="000000492A1C7F1C2A49
7038 E$(8)="000808492A1C7F1C2A490808"
7039 E$(9)="000808492A1C771C2A490808"
7040 E$(10)="000808492A0063002A490808"
7041 E$(11)="000808410000410000410808"
7042 E$(12)="080808000000000000000000080808"
7043 E$(13)="080800000000000000000000000808"
7044 E$(15)="0000000000000000000000000000000000"
7050 DIM V$(7)*31
7051 V$(1)="7C7C7D7D1117393D3917117D7D7C7C"
7052 V$(2)="00707072222E323A322E2272707000"
7053 V$(3)="000000606028283828286060000000"
7054 V$(4)="000000000060283828600000000000"
7055 V$(5)="000000000000406040000000000000"
7056 V$(6)="000000000000004000000000000000"
7057 V$(7)=LEFT$ (E$(15),30)
7060 G$="605028147F",D$="7F14285060"
7061 DIM S$(12)*60:S$(0)=V$(7)+LEFT$ (E$(15),26)
7062 S$(1)="081C2A080870"
7063 S$(2)="0000000008552307"
7064 S$(3)="3818284004027F020440281838"
7065 S$(4)="7E0109113E1008"
7066 S$(5)="04027F02040000000E060A1060"
7067 S$(6)="081C2A0808080808080000"+V$(1)
7068 S$(7)="7008050307"
7069 S$(8)="0703050870"
7070 S$(9)=V$(1)+"000008080808082A1C08"
7071 S$(10)="08103E1109017E"
7072 S$(11)="7008082A1C08"
7079 A=68,K=50,V=A+10:CLS :WAIT 0
7080 GCURSOR A:GPRINT G$:GCURSOR A+K:GPRINT D$:GCURSOR V:GPRINT
V$(1);"0000000000";V$(1)
7085 GCURSOR 10:GPRINT "7F415D5D5D417F41414141417F":CURSOR
0:PRINT "R":CURSOR 4:PRINT "G"
7090 R=RND 80:IF INKEY$ <>""THEN BEEP 1,255,40
7091 IF R<>60THEN 7090
7092 GCURSOR 10:GPRINT "7F41414141417F415D5D5D417F"
7096 Y$=INKEY$ :IF Y$=""THEN 7096
7097 WAIT 0:FOR I=1TO 7:GCURSOR V:GPRINT V$(I),"0000000000";V$(I):BEEP
1,255-I*30,10:NEXT I
7098 V=A+K/2-7:GCURSOR V:GPRINT V$(1)
7099 FOR I=0TO 5:CURSOR I:PRINT CHR$ (32):NEXT I
7100 KV=1:GCURSOR 22:PRINT KV
7105 FOR N=1TO LP:R=RND 11:GCURSOR 0:GPRINT S$(R)
7110 O=7500+(R-1)*20:GOTO O
7115 GOSUB 7140
7118 LA=A,LK=K,A=A+INT (KC*KV),K=K-J
7120 P1=K+A:IF A<35OR P1>150LET A=LA
7121 IF (A=LA)AND (LK=K)THEN 7140
7130 GCURSOR LA:GPRINT "0000000000":GCURSOR A:GPRINT G$
7135 GCURSOR LK+LA:GPRINT "0000000000":GCURSOR A+K:GPRINT
D$
7136 P=A+K-15:IF V<(A+5)OR V>PTHEN GOSUB 7850
7137 GOSUB 7140:RETURN
7140 Y$=INKEY$ :IF Y$=""THEN RETURN
7145 Y1=VAL Y$:IF Y1>0AND Y1<6THEN 7300
7150 LV=V:Y2=ASC Y$:IF Y2=13LET V=V+3:GOTO 7160
7155 V=V-3
7160 GCURSOR LV:GPRINT V$(7):GCURSOR V:GPRINT V$(1)
7165 P=A+K-15:IF (V<(A+5))OR (V>P)GOSUB 7850
7170 RETURN
7200 FOR I=1TO M:GOSUB 7115:NEXT I
7210 D=D+KV:GCURSOR K+A:GPRINT "0000000000":K=U,LK=K:GCURSOR
A+K:GPRINT D$:GCURSOR 0:GPRINT S$(0):GCURSOR 22:PRINT KV
7212 IF ABS (A-67)>2THEN 7220
7215 NEXT N:GOTO 7900
7220 FOR Z=ATO 67STEP (SGN (67-A)*3):LA=A,A=Z:GOSUB 7120:NEXT Z:GOTO
7215
7300 IF ABS (Y1-KV)<>1THEN RETURN
7310 KV=Y1:GCURSOR 22:PRINT KV:RETURN
7500 J=0,M=7,KC=-3,U=50:GOTO 7200
7520 M=20,LK=K:FOR Z=1TO M:LA=A,A=A+(RND 3-2)*KV:GOSUB 7120:NEXT
Z:U=K:GOTO 7210
7540 J=0,R=RND 3-2:IF R=0THEN 7520
7545 KC=R*2,M=10,U=50,J=0:GOTO 7200
7560 J=0,M=9,U=50,LK=K
7565 M=3:FOR Z=1TO M:LA=A,A=A-3:GOSUB 7120:NEXT Z
7566 KC=4:GOTO 7200
7580 J=3,M=6,KC=RND 3-2,U=50:GOTO 7200
7600 U=50,J=0,KC=RND 3-1,M=5:FOR Z=1TO M:LA=A,LK=K,A=A+KV*KC:GOSUB
7120:NEXT Z
7610 WAIT 10:FOR Z=6TO 1STEP -1:GCURSOR A+29:GPRINT V$(Z):NEXT Z:WAIT
0
7615 IF V>(A+14)LET E=A+26:GOSUB 7800:GOTO 7210
7618 GCURSOR 29+A:GPRINT V$(7):GOTO 7210
7620 J=0,M=5,KC=1.5,U=50:GOTO 7200
7640 I=0,M=5,KC=1.5,U=50:GOTO 7200
7660 U=50,S=0,KC=RND 3-2,M=5:FOR Z=1TO M:LA=A,LK=K,A=A+KV*KC:GOSUB
7120:NEXT Z
7665 GCURSOR A+12:GPRINT V$(1):IF V<(A+27)LET E=V-4:GOSUB 7800:GOTO
7200
7670 WAIT 10:FOR Z=1TO 7:GCURSOR A+12:GPRINT V$(Z):NEXT Z:WAIT 0:GOTO
7210
7680 M=3,J=0,U=50:FOR Z=1TO M:LA=A,A=A+3,LK=K:GOSUB 7120:NEXT Z:M=9,KC=-4:GOTO
7200
7700 J=0,M=7,KC=3,U=50:GOTO 7200
7800 C=C+1:FOR L=1TO 14:GCURSOR E:GPRINT E$(L):BEEP 1,10,10:NEXT
L
7810 GCURSOR 35:FOR L=1TO 8:GPRINT V$(7);:NEXT L
7820 GCURSOR A:GPRINT G$:K=50:GCURSOR A+K:GPRINT D$:V=A+K/2-7:GCURSOR
V:GPRINT V$(1):KV=1:GCURSOR 22:PRINT KV:RETURN
7850 IF V<(A+5)LET E=V+1:GOTO 7800
7855 E=A+K-12:GOTO 7800
7900 WAIT 80:PRINT "Nb. of accidents : ";C;
7910 D=D/LP
7920 IF D<2LET VM=20,H=4:GOTO 7950
7925 IF D<3LET VM=60,H=5:GOTO 7950
7930 IF D<4LET VM=120,H=7:GOTO 7950
7935 VM=200,H=10
7950 A=(D-INT (D))*100,VM=VM+A
7960 WAIT 100:CURSOR 0:PRINT USING "####.###";"Average
speed : ";VM
7970 USING :WAIT 0:PRINT "play again (Y/N) ?"
7972 A$=INKEY$
7975 IF A$="N"THEN 7999
7980 IF A$="Y"THEN 7002
7995 GOTO 7972
7999 CLS :END