Home » Personal collection » Acorn ADFS disks » Archimedes » Dominic_4.ADF » BioBot/6502/Sim

BioBot/6502/Sim

This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.

Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.

Tape/disk: Home » Personal collection » Acorn ADFS disks » Archimedes » Dominic_4.ADF
Filename: BioBot/6502/Sim
Read OK:
File size: 1216 bytes
Load address: FFFFFB47
Exec address: FD36358F
Duplicates

There are 2 duplicate copies of this file in the archive:

File contents
   10 REM BallBot Tennis Court Simulation V5.0 for BBC
   20 REM (C) Dominic Ford 1997
   30 :
   40 MODE4:HIMEM=&3000:@%=&905:PRINT" BallBot Tennis Simulation Tester V5.0"'"Programmed and Designed by Dominic Ford"''SPC(16);"(C) 1997"''"Installing AI module..."'
   50 *AI
   60 PRINT'''"1. Do specific run"''"2. Logged Continuous Runs"
   70 REPEAT type$=GET$:UNTIL type$="1" OR type$="2"
   80 ON ERROR OSCLI"CLOSE":REPORT:PRINT" at line ";ERL:END
   90 current=0:DIMball(4,1):bbx=640:bby=950:dir=270:idle=TRUE
  100 IF type$="1" THEN MODE2:PRINT"Enter Data:"':FORb=0TO4:PRINT"Ball ";b+1;:INPUTball(b,0),ball(b,1):NEXT:PROCdrawfull
  110 IF type$="2" THEN MODE3:c%=0:idle=FALSE:INPUT"Filename";f$:REMOSCLI"SPOOL "+f$
  120 :
  130 REPEAT:T=TIME
  140 IF type$="1" THEN PROCuser ELSE PROCcompmon
  150 IF idle THEN UNTIL FALSE
  160 PROCsense
  170 CALL&E03
  180 mov=?&80
  190 left=(mov AND 1)<>0
  200 right=(mov AND 2)<>0
  210 turbo=(mov AND 4)<>0
  220 idle=(mov AND 8)<>0
  230 reverse=(mov AND 16)<>0
  240 PROCmoveit
  250 IF type$="1" THEN PRINTTAB(15,0)TIME-T;TAB(0,31)left,right,fd$;fb$;fa$;fc$;
  260 c%=c%+1
  270 UNTIL FALSE
  280 :
  290 DEFPROCdrawfull
  300 VDU19,0,2,0,0,0:VDU19,1,1,0,0,0:VDU19,2,7,0,0,0:VDU19,3,1,0,0,0
  310 VDU19,4,3,0,0,0:VDU19,5,0,0,0,0:VDU19,6,3,0,0,0
  320 CLS:GCOL0,5:MOVE640,100:DRAW640,923
  330 PROCdrawmini
  340 ENDPROC
  350 DEFPROCdrawmini
  360 IF type$="2" THEN ENDPROC
  370 GCOL3,4:FORb=0TO4
  380 IF ball(b,0)<>0 OR ball(b,1)<>0 THEN MOVE ball(b,0),ball(b,1):DRAW ball(b,0),ball(b,1)
  390 NEXT
  400 GCOL3,3:MOVE bbx,bby:DRAW bbx,bby
  410 ENDPROC
  420 :
  430 DEFPROCuser
  440 x=0:y=0:c=-2*INKEY(-99)
  450 IF (c AND 2)<>0 THEN idle=FALSE:CALL&E00:c%=0
  460 ENDPROC
  470 :
  480 DEFPROCmoveit
  490 LOCAL speed
  500 IF idle THEN ENDPROC
  510 IF left AND (NOT right) THEN dir=dir-(2.5*(1-3*turbo))*(1-2*reverse):speed=0.1+0.2*reverse
  520 IF right AND (NOT left) THEN dir=dir+(2.5*(1-3*turbo))*(1-2*reverse):speed=0.1+0.2*reverse
  530 IF left AND right THEN speed=1+2*reverse
  540 :
  550 REM Get direction in range 0<theta<360
  560 REPEAT IF dir<0 THEN dir=dir+360
  570 IF dir>=360 THEN dir=dir-360
  580 UNTIL dir>=0 AND dir<360
  590 :
  600 PROCdrawmini:bbx=bbx+15*SIN(PI*dir/180)*speed*(.75*-turbo+.25)
  610 bby=bby+20*COS(PI*dir/180)*speed*(.75*-turbo+.25)
  620 FORball=0TO4:IF ABS(bbx-ball(ball,0))<10 AND ABS(bby-ball(ball,1))<10 THEN ball(ball,0)=0
  630 NEXT:PROCdrawmini
  640 ENDPROC
  650 :
  660 DEFFNback(freq,min,max)
  670 mnr=RAD(min+.0001):mxr=RAD(max+.0001)
  680 REM Set up initial outside range settings
  690 h%=0:d%=9999:da%=9999:ha%=0:REM LOCAL h%,d%,ha%,da%
  700 REM If straight at net is in range, will be shortest.
  710 IF(bbx<640ANDmin<=90ANDmax>=90)OR(bbx>640ANDmin<=270ANDmax>=270) AND (bby>100 AND bby<923) THEN h%=bby:d%=ABS(bbx-640):min=0:max=0
  720 REM Otherwise find shortest extreme of range
  730 d%=(640-bbx)/SIN(mnr):h%=bby+(640-bbx)/TAN(mnr)
  740 da%=(640-bbx)/SIN(mxr):ha%=bby+(640-bbx)/TAN(mxr)
  750 REM Just check if post in middle of range
  760 IF bbx<640 AND h%>100 AND (ha%<100 OR da%<0) AND d%>0 THEN ha%=100:da%=SQR((bbx-640)^2+(bby-100)^2)
  770 IF bbx<640 AND ha%<923 AND (h%>923 OR d%<0) AND da%>0 THEN h%=923:d%=SQR((bbx-640)^2+(bby-923)^2)
  780 IF bbx>640 AND ha%>100 AND (h%<100 OR d%<0) AND da%>0 THEN h%=100:d%=SQR((bbx-640)^2+(bby-100)^2)
  790 IF bbx>640 AND h%<923 AND (ha%>923 OR da%<0) AND d%>0 THEN ha%=923:da%=SQR((bbx-640)^2+(bby-923)^2)
  800 REM Pick best to send off!
  810 IF d%<0 OR (da%<d% AND ha%>100 AND ha%<923) THEN d%=da%:h%=ha%
  820 IF h%>923 OR h%<100 OR d%<0 THEN ftype$="U":=freq+RND(6)-3
  830 IF h%>900 OR h%<123 THEN ftype$="P":=d%
  840 ftype$="N"
  850 =d%
  860 :
  870 DEFPROCsense
  880 REM LOCAL freqa,freqb,freqc,freqd,fa$,fb$,fc$,fd$
  890 freq=RND(250)+1500
  900 freqa=FNback(freq,dir-15,dir+15):fa$=ftype$
  910 freqb=FNback(freq,dir-45,dir-15):fb$=ftype$
  920 freqc=FNback(freq,dir+15,dir+45):fc$=ftype$
  930 freqd=FNback(freq,dir-75,dir-45):fd$=ftype$
  940 FORball=0TO4
  950 d%=SQR((ball(ball,0)-bbx)^2+(ball(ball,1)-bby)^2)
  960 IF ball(ball,0)=0 THEN d%=9999
  970 a=FNangle(ball(ball,0),ball(ball,1),bbx,bby)-dir:IFa>180 THEN a=a-360
  980 IF ABS(a)<15 AND freqa>d% THEN freqa=d%:fa$="B"
  990 IF a>-46 AND a<=-15 AND freqb>d% THEN freqb=d%:fb$="B"
 1000 IF a>=15 AND a<46 AND freqc>d% THEN freqc=d%:fc$="B"
 1010 IF a>-76 AND a<=-75 AND freqd>d% THEN freqd=d%:fd$="B"
 1020 NEXT
 1030 ?&70=INT(freqa/4):?&71=INT(freqb/4):?&72=INT(freqc/4):?&73=INT(freqd/4)
 1040 ?&74=ASC(fa$):?&75=ASC(fb$):?&76=ASC(fc$):?&77=ASC(fd$)
 1050 IF type$="2" THEN ENDPROC
 1060 PRINTTAB(0,0)INT(c%*0.15/60);":";INT(c%*0.15)MOD60;" "
 1070 ENDPROC
 1080 DEFFNangle(x1,y1,x2,y2)
 1090 IF y2=y1 THEN ang=90 ELSE ang=180*ATN((x2-x1)/(y2-y1))/PI
 1100 IF (y2>y1) THEN ang=ang+180
 1110 IF ang<0 THEN ang=ang+360
 1120 =ang MOD 360
 1130 :
 1140 DEFPROCcompmon
 1150 IF idle AND (ball(0,0)<>0 OR ball(1,0)<>0 OR ball(2,0)<>0 OR ball(3,0)<>0 OR ball(4,0)<>0) THEN st$="Fail" ELSE st$="Pass"
 1160 IF idle THEN PRINTst$,INT(c%*0.15/60);":";INT(c%*0.15)MOD60;" "
 1170 IF c%>2000 THEN idle=TRUE:PRINT"Time","****"
 1180 IFbbx>635ANDbbx<645ANDbby>105ANDbby<920THENidle=TRUE:PRINT"Crash","****"
 1190 IF idle THEN bbx=640:bby=950:dir=270:CALL&E00:start=TIME:FORb=0TO4:ball(b,0)=RND(1180):ball(b,1)=RND(1024):ball(b,0)=ball(b,0)-100*((ball(b,0) DIV 100)=6):NEXT
 1200 IF idle THEN PRINT"[";ball(0,0);",";ball(0,1);"] [";ball(1,0);",";ball(1,1);"] [";ball(2,0);",";ball(2,1);"] [";ball(3,0);",";ball(3,1);"] [";ball(4,0);",";ball(4,1);"]",;:idle=FALSE
 1210 ENDPROC

3 � BallBot Tennis Court Simulation V5.0 for BBC
 � (C) Dominic Ford 1997
 :
(� �4:�=&3000:@%=&905:�" BallBot Tennis Simulation Tester V5.0"'"Programmed and Designed by Dominic Ford"''�(16);"(C) 1997"''"Installing AI module..."'
2 *AI
<: �'''"1. Do specific run"''"2. Logged Continuous Runs"
F& � type$=�:� type$="1" � type$="2"
P$ � � �"CLOSE":�:�" at line ";�:�
Z8 current=0:�ball(4,1):bbx=640:bby=950:dir=270:idle=�
d[ � type$="1" � �2:�"Enter Data:"':�b=0�4:�"Ball ";b+1;:�ball(b,0),ball(b,1):�:�drawfull
nB � type$="2" � �3:c%=0:idle=�:�"Filename";f$:�OSCLI"SPOOL "+f$
x :
�
 �:T=�
�# � type$="1" � �user � �compmon
� � idle � � �
� �sense
�
 �&E03
�
 mov=?&80
� left=(mov � 1)<>0
� right=(mov � 2)<>0
� turbo=(mov � 4)<>0
� idle=(mov � 8)<>0
� reverse=(mov � 16)<>0
� �moveit
�? � type$="1" � �15,0)�-T;�0,31)left,right,fd$;fb$;fa$;fc$;
 c%=c%+1
 � �
 :
" ��drawfull
,< �19,0,2,0,0,0:�19,1,1,0,0,0:�19,2,7,0,0,0:�19,3,1,0,0,0
6. �19,4,3,0,0,0:�19,5,0,0,0,0:�19,6,3,0,0,0
@ �:�0,5:�640,100:�640,923
J �drawmini
T �
^ ��drawmini
h � type$="2" � �
r �3,4:�b=0�4
|P � ball(b,0)<>0 � ball(b,1)<>0 � � ball(b,0),ball(b,1):� ball(b,0),ball(b,1)
� �
� �3,3:� bbx,bby:� bbx,bby
� �
� :
� ��user
� x=0:y=0:c=-2*�(-99)
�% � (c � 2)<>0 � idle=�:�&E00:c%=0
� �
� :
�
 ��moveit
� � speed
� � idle � �
�W � left � (� right) � dir=dir-(2.5*(1-3*turbo))*(1-2*reverse):speed=0.1+0.2*reverse
W � right � (� left) � dir=dir+(2.5*(1-3*turbo))*(1-2*reverse):speed=0.1+0.2*reverse
' � left � right � speed=1+2*reverse
 :
&) � Get direction in range 0<theta<360
0 � � dir<0 � dir=dir+360
: � dir>=360 � dir=dir-360
D � dir>=0 � dir<360
N :
X= �drawmini:bbx=bbx+15*�(�*dir/180)*speed*(.75*-turbo+.25)
b3 bby=bby+20*�(�*dir/180)*speed*(.75*-turbo+.25)
lQ �ball=0�4:� �(bbx-ball(ball,0))<10 � �(bby-ball(ball,1))<10 � ball(ball,0)=0
v �:�drawmini
� �
� :
� ݤback(freq,min,max)
�& mnr=�(min+.0001):mxr=�(max+.0001)
�, � Set up initial outside range settings
�6 h%=0:d%=9999:da%=9999:ha%=0:� LOCAL h%,d%,ha%,da%
�8 � If straight at net is in range, will be shortest.
�t �(bbx<640�min<=90�max>=90)�(bbx>640�min<=270�max>=270) � (bby>100 � bby<923) � h%=bby:d%=�(bbx-640):min=0:max=0
�/ � Otherwise find shortest extreme of range
�0 d%=(640-bbx)/�(mnr):h%=bby+(640-bbx)/�(mnr)
�2 da%=(640-bbx)/�(mxr):ha%=bby+(640-bbx)/�(mxr)
�, � Just check if post in middle of range
�[ � bbx<640 � h%>100 � (ha%<100 � da%<0) � d%>0 � ha%=100:da%=�((bbx-640)^2+(bby-100)^2)
Y � bbx<640 � ha%<923 � (h%>923 � d%<0) � da%>0 � h%=923:d%=�((bbx-640)^2+(bby-923)^2)
Y � bbx>640 � ha%>100 � (h%<100 � d%<0) � da%>0 � h%=100:d%=�((bbx-640)^2+(bby-100)^2)
[ � bbx>640 � h%<923 � (ha%>923 � da%<0) � d%>0 � ha%=923:da%=�((bbx-640)^2+(bby-923)^2)
  � Pick best to send off!
*: � d%<0 � (da%<d% � ha%>100 � ha%<923) � d%=da%:h%=ha%
47 � h%>923 � h%<100 � d%<0 � ftype$="U":=freq+�(6)-3
>' � h%>900 � h%<123 � ftype$="P":=d%
H ftype$="N"
R =d%
\ :
f ��sense
p4 � LOCAL freqa,freqb,freqc,freqd,fa$,fb$,fc$,fd$
z freq=�(250)+1500
�/ freqa=�back(freq,dir-15,dir+15):fa$=ftype$
�/ freqb=�back(freq,dir-45,dir-15):fb$=ftype$
�/ freqc=�back(freq,dir+15,dir+45):fc$=ftype$
�/ freqd=�back(freq,dir-75,dir-45):fd$=ftype$
� �ball=0�4
�4 d%=�((ball(ball,0)-bbx)^2+(ball(ball,1)-bby)^2)
� � ball(ball,0)=0 � d%=9999
�E a=�angle(ball(ball,0),ball(ball,1),bbx,bby)-dir:�a>180 � a=a-360
�, � �(a)<15 � freqa>d% � freqa=d%:fa$="B"
�3 � a>-46 � a<=-15 � freqb>d% � freqb=d%:fb$="B"
�1 � a>=15 � a<46 � freqc>d% � freqc=d%:fc$="B"
�3 � a>-76 � a<=-75 � freqd>d% � freqd=d%:fd$="B"
� �
D ?&70=�(freqa/4):?&71=�(freqb/4):?&72=�(freqc/4):?&73=�(freqd/4)
4 ?&74=�(fa$):?&75=�(fb$):?&76=�(fc$):?&77=�(fd$)
 � type$="2" � �
$. �0,0)�(c%*0.15/60);":";�(c%*0.15)�60;" "
. �
8 ݤangle(x1,y1,x2,y2)
B4 � y2=y1 � ang=90 � ang=180*�((x2-x1)/(y2-y1))/�
L � (y2>y1) � ang=ang+180
V � ang<0 � ang=ang+360
` =ang � 360
j :
t ��compmon
~r � idle � (ball(0,0)<>0 � ball(1,0)<>0 � ball(2,0)<>0 � ball(3,0)<>0 � ball(4,0)<>0) � st$="Fail" � st$="Pass"
�6 � idle � �st$,�(c%*0.15/60);":";�(c%*0.15)�60;" "
�& � c%>2000 � idle=�:�"Time","****"
�< �bbx>635�bbx<645�bby>105�bby<920�idle=�:�"Crash","****"
�� � idle � bbx=640:bby=950:dir=270:�&E00:start=�:�b=0�4:ball(b,0)=�(1180):ball(b,1)=�(1024):ball(b,0)=ball(b,0)-100*((ball(b,0) � 100)=6):�
�� � idle � �"[";ball(0,0);",";ball(0,1);"] [";ball(1,0);",";ball(1,1);"] [";ball(2,0);",";ball(2,1);"] [";ball(3,0);",";ball(3,1);"] [";ball(4,0);",";ball(4,1);"]",;:idle=�
� �
�
00000000  0d 00 0a 33 20 f4 20 42  61 6c 6c 42 6f 74 20 54  |...3 . BallBot T|
00000010  65 6e 6e 69 73 20 43 6f  75 72 74 20 53 69 6d 75  |ennis Court Simu|
00000020  6c 61 74 69 6f 6e 20 56  35 2e 30 20 66 6f 72 20  |lation V5.0 for |
00000030  42 42 43 0d 00 14 1c 20  f4 20 28 43 29 20 44 6f  |BBC.... . (C) Do|
00000040  6d 69 6e 69 63 20 46 6f  72 64 20 31 39 39 37 0d  |minic Ford 1997.|
00000050  00 1e 06 20 3a 0d 00 28  99 20 eb 34 3a d3 3d 26  |... :..(. .4:.=&|
00000060  33 30 30 30 3a 40 25 3d  26 39 30 35 3a f1 22 20  |3000:@%=&905:." |
00000070  42 61 6c 6c 42 6f 74 20  54 65 6e 6e 69 73 20 53  |BallBot Tennis S|
00000080  69 6d 75 6c 61 74 69 6f  6e 20 54 65 73 74 65 72  |imulation Tester|
00000090  20 56 35 2e 30 22 27 22  50 72 6f 67 72 61 6d 6d  | V5.0"'"Programm|
000000a0  65 64 20 61 6e 64 20 44  65 73 69 67 6e 65 64 20  |ed and Designed |
000000b0  62 79 20 44 6f 6d 69 6e  69 63 20 46 6f 72 64 22  |by Dominic Ford"|
000000c0  27 27 89 28 31 36 29 3b  22 28 43 29 20 31 39 39  |''.(16);"(C) 199|
000000d0  37 22 27 27 22 49 6e 73  74 61 6c 6c 69 6e 67 20  |7"''"Installing |
000000e0  41 49 20 6d 6f 64 75 6c  65 2e 2e 2e 22 27 0d 00  |AI module..."'..|
000000f0  32 08 20 2a 41 49 0d 00  3c 3a 20 f1 27 27 27 22  |2. *AI..<: .'''"|
00000100  31 2e 20 44 6f 20 73 70  65 63 69 66 69 63 20 72  |1. Do specific r|
00000110  75 6e 22 27 27 22 32 2e  20 4c 6f 67 67 65 64 20  |un"''"2. Logged |
00000120  43 6f 6e 74 69 6e 75 6f  75 73 20 52 75 6e 73 22  |Continuous Runs"|
00000130  0d 00 46 26 20 f5 20 74  79 70 65 24 3d be 3a fd  |..F& . type$=.:.|
00000140  20 74 79 70 65 24 3d 22  31 22 20 84 20 74 79 70  | type$="1" . typ|
00000150  65 24 3d 22 32 22 0d 00  50 24 20 ee 20 85 20 ff  |e$="2"..P$ . . .|
00000160  22 43 4c 4f 53 45 22 3a  f6 3a f1 22 20 61 74 20  |"CLOSE":.:." at |
00000170  6c 69 6e 65 20 22 3b 9e  3a e0 0d 00 5a 38 20 63  |line ";.:...Z8 c|
00000180  75 72 72 65 6e 74 3d 30  3a de 62 61 6c 6c 28 34  |urrent=0:.ball(4|
00000190  2c 31 29 3a 62 62 78 3d  36 34 30 3a 62 62 79 3d  |,1):bbx=640:bby=|
000001a0  39 35 30 3a 64 69 72 3d  32 37 30 3a 69 64 6c 65  |950:dir=270:idle|
000001b0  3d b9 0d 00 64 5b 20 e7  20 74 79 70 65 24 3d 22  |=...d[ . type$="|
000001c0  31 22 20 8c 20 eb 32 3a  f1 22 45 6e 74 65 72 20  |1" . .2:."Enter |
000001d0  44 61 74 61 3a 22 27 3a  e3 62 3d 30 b8 34 3a f1  |Data:"':.b=0.4:.|
000001e0  22 42 61 6c 6c 20 22 3b  62 2b 31 3b 3a e8 62 61  |"Ball ";b+1;:.ba|
000001f0  6c 6c 28 62 2c 30 29 2c  62 61 6c 6c 28 62 2c 31  |ll(b,0),ball(b,1|
00000200  29 3a ed 3a f2 64 72 61  77 66 75 6c 6c 0d 00 6e  |):.:.drawfull..n|
00000210  42 20 e7 20 74 79 70 65  24 3d 22 32 22 20 8c 20  |B . type$="2" . |
00000220  eb 33 3a 63 25 3d 30 3a  69 64 6c 65 3d a3 3a e8  |.3:c%=0:idle=.:.|
00000230  22 46 69 6c 65 6e 61 6d  65 22 3b 66 24 3a f4 4f  |"Filename";f$:.O|
00000240  53 43 4c 49 22 53 50 4f  4f 4c 20 22 2b 66 24 0d  |SCLI"SPOOL "+f$.|
00000250  00 78 06 20 3a 0d 00 82  0a 20 f5 3a 54 3d 91 0d  |.x. :.... .:T=..|
00000260  00 8c 23 20 e7 20 74 79  70 65 24 3d 22 31 22 20  |..# . type$="1" |
00000270  8c 20 f2 75 73 65 72 20  8b 20 f2 63 6f 6d 70 6d  |. .user . .compm|
00000280  6f 6e 0d 00 96 11 20 e7  20 69 64 6c 65 20 8c 20  |on.... . idle . |
00000290  fd 20 a3 0d 00 a0 0b 20  f2 73 65 6e 73 65 0d 00  |. ..... .sense..|
000002a0  aa 0a 20 d6 26 45 30 33  0d 00 b4 0d 20 6d 6f 76  |.. .&E03.... mov|
000002b0  3d 3f 26 38 30 0d 00 be  16 20 6c 65 66 74 3d 28  |=?&80.... left=(|
000002c0  6d 6f 76 20 80 20 31 29  3c 3e 30 0d 00 c8 17 20  |mov . 1)<>0.... |
000002d0  72 69 67 68 74 3d 28 6d  6f 76 20 80 20 32 29 3c  |right=(mov . 2)<|
000002e0  3e 30 0d 00 d2 17 20 74  75 72 62 6f 3d 28 6d 6f  |>0.... turbo=(mo|
000002f0  76 20 80 20 34 29 3c 3e  30 0d 00 dc 16 20 69 64  |v . 4)<>0.... id|
00000300  6c 65 3d 28 6d 6f 76 20  80 20 38 29 3c 3e 30 0d  |le=(mov . 8)<>0.|
00000310  00 e6 1a 20 72 65 76 65  72 73 65 3d 28 6d 6f 76  |... reverse=(mov|
00000320  20 80 20 31 36 29 3c 3e  30 0d 00 f0 0c 20 f2 6d  | . 16)<>0.... .m|
00000330  6f 76 65 69 74 0d 00 fa  3f 20 e7 20 74 79 70 65  |oveit...? . type|
00000340  24 3d 22 31 22 20 8c 20  f1 8a 31 35 2c 30 29 91  |$="1" . ..15,0).|
00000350  2d 54 3b 8a 30 2c 33 31  29 6c 65 66 74 2c 72 69  |-T;.0,31)left,ri|
00000360  67 68 74 2c 66 64 24 3b  66 62 24 3b 66 61 24 3b  |ght,fd$;fb$;fa$;|
00000370  66 63 24 3b 0d 01 04 0c  20 63 25 3d 63 25 2b 31  |fc$;.... c%=c%+1|
00000380  0d 01 0e 08 20 fd 20 a3  0d 01 18 06 20 3a 0d 01  |.... . ..... :..|
00000390  22 0f 20 dd f2 64 72 61  77 66 75 6c 6c 0d 01 2c  |". ..drawfull..,|
000003a0  3c 20 ef 31 39 2c 30 2c  32 2c 30 2c 30 2c 30 3a  |< .19,0,2,0,0,0:|
000003b0  ef 31 39 2c 31 2c 31 2c  30 2c 30 2c 30 3a ef 31  |.19,1,1,0,0,0:.1|
000003c0  39 2c 32 2c 37 2c 30 2c  30 2c 30 3a ef 31 39 2c  |9,2,7,0,0,0:.19,|
000003d0  33 2c 31 2c 30 2c 30 2c  30 0d 01 36 2e 20 ef 31  |3,1,0,0,0..6. .1|
000003e0  39 2c 34 2c 33 2c 30 2c  30 2c 30 3a ef 31 39 2c  |9,4,3,0,0,0:.19,|
000003f0  35 2c 30 2c 30 2c 30 2c  30 3a ef 31 39 2c 36 2c  |5,0,0,0,0:.19,6,|
00000400  33 2c 30 2c 30 2c 30 0d  01 40 1d 20 db 3a e6 30  |3,0,0,0..@. .:.0|
00000410  2c 35 3a ec 36 34 30 2c  31 30 30 3a df 36 34 30  |,5:.640,100:.640|
00000420  2c 39 32 33 0d 01 4a 0e  20 f2 64 72 61 77 6d 69  |,923..J. .drawmi|
00000430  6e 69 0d 01 54 06 20 e1  0d 01 5e 0f 20 dd f2 64  |ni..T. ...^. ..d|
00000440  72 61 77 6d 69 6e 69 0d  01 68 14 20 e7 20 74 79  |rawmini..h. . ty|
00000450  70 65 24 3d 22 32 22 20  8c 20 e1 0d 01 72 10 20  |pe$="2" . ...r. |
00000460  e6 33 2c 34 3a e3 62 3d  30 b8 34 0d 01 7c 50 20  |.3,4:.b=0.4..|P |
00000470  e7 20 62 61 6c 6c 28 62  2c 30 29 3c 3e 30 20 84  |. ball(b,0)<>0 .|
00000480  20 62 61 6c 6c 28 62 2c  31 29 3c 3e 30 20 8c 20  | ball(b,1)<>0 . |
00000490  ec 20 62 61 6c 6c 28 62  2c 30 29 2c 62 61 6c 6c  |. ball(b,0),ball|
000004a0  28 62 2c 31 29 3a df 20  62 61 6c 6c 28 62 2c 30  |(b,1):. ball(b,0|
000004b0  29 2c 62 61 6c 6c 28 62  2c 31 29 0d 01 86 06 20  |),ball(b,1).... |
000004c0  ed 0d 01 90 1d 20 e6 33  2c 33 3a ec 20 62 62 78  |..... .3,3:. bbx|
000004d0  2c 62 62 79 3a df 20 62  62 78 2c 62 62 79 0d 01  |,bby:. bbx,bby..|
000004e0  9a 06 20 e1 0d 01 a4 06  20 3a 0d 01 ae 0b 20 dd  |.. ..... :.... .|
000004f0  f2 75 73 65 72 0d 01 b8  18 20 78 3d 30 3a 79 3d  |.user.... x=0:y=|
00000500  30 3a 63 3d 2d 32 2a a6  28 2d 39 39 29 0d 01 c2  |0:c=-2*.(-99)...|
00000510  25 20 e7 20 28 63 20 80  20 32 29 3c 3e 30 20 8c  |% . (c . 2)<>0 .|
00000520  20 69 64 6c 65 3d a3 3a  d6 26 45 30 30 3a 63 25  | idle=.:.&E00:c%|
00000530  3d 30 0d 01 cc 06 20 e1  0d 01 d6 06 20 3a 0d 01  |=0.... ..... :..|
00000540  e0 0d 20 dd f2 6d 6f 76  65 69 74 0d 01 ea 0c 20  |.. ..moveit.... |
00000550  ea 20 73 70 65 65 64 0d  01 f4 0f 20 e7 20 69 64  |. speed.... . id|
00000560  6c 65 20 8c 20 e1 0d 01  fe 57 20 e7 20 6c 65 66  |le . ....W . lef|
00000570  74 20 80 20 28 ac 20 72  69 67 68 74 29 20 8c 20  |t . (. right) . |
00000580  64 69 72 3d 64 69 72 2d  28 32 2e 35 2a 28 31 2d  |dir=dir-(2.5*(1-|
00000590  33 2a 74 75 72 62 6f 29  29 2a 28 31 2d 32 2a 72  |3*turbo))*(1-2*r|
000005a0  65 76 65 72 73 65 29 3a  73 70 65 65 64 3d 30 2e  |everse):speed=0.|
000005b0  31 2b 30 2e 32 2a 72 65  76 65 72 73 65 0d 02 08  |1+0.2*reverse...|
000005c0  57 20 e7 20 72 69 67 68  74 20 80 20 28 ac 20 6c  |W . right . (. l|
000005d0  65 66 74 29 20 8c 20 64  69 72 3d 64 69 72 2b 28  |eft) . dir=dir+(|
000005e0  32 2e 35 2a 28 31 2d 33  2a 74 75 72 62 6f 29 29  |2.5*(1-3*turbo))|
000005f0  2a 28 31 2d 32 2a 72 65  76 65 72 73 65 29 3a 73  |*(1-2*reverse):s|
00000600  70 65 65 64 3d 30 2e 31  2b 30 2e 32 2a 72 65 76  |peed=0.1+0.2*rev|
00000610  65 72 73 65 0d 02 12 27  20 e7 20 6c 65 66 74 20  |erse...' . left |
00000620  80 20 72 69 67 68 74 20  8c 20 73 70 65 65 64 3d  |. right . speed=|
00000630  31 2b 32 2a 72 65 76 65  72 73 65 0d 02 1c 06 20  |1+2*reverse.... |
00000640  3a 0d 02 26 29 20 f4 20  47 65 74 20 64 69 72 65  |:..&) . Get dire|
00000650  63 74 69 6f 6e 20 69 6e  20 72 61 6e 67 65 20 30  |ction in range 0|
00000660  3c 74 68 65 74 61 3c 33  36 30 0d 02 30 1c 20 f5  |<theta<360..0. .|
00000670  20 e7 20 64 69 72 3c 30  20 8c 20 64 69 72 3d 64  | . dir<0 . dir=d|
00000680  69 72 2b 33 36 30 0d 02  3a 1d 20 e7 20 64 69 72  |ir+360..:. . dir|
00000690  3e 3d 33 36 30 20 8c 20  64 69 72 3d 64 69 72 2d  |>=360 . dir=dir-|
000006a0  33 36 30 0d 02 44 17 20  fd 20 64 69 72 3e 3d 30  |360..D. . dir>=0|
000006b0  20 80 20 64 69 72 3c 33  36 30 0d 02 4e 06 20 3a  | . dir<360..N. :|
000006c0  0d 02 58 3d 20 f2 64 72  61 77 6d 69 6e 69 3a 62  |..X= .drawmini:b|
000006d0  62 78 3d 62 62 78 2b 31  35 2a b5 28 af 2a 64 69  |bx=bbx+15*.(.*di|
000006e0  72 2f 31 38 30 29 2a 73  70 65 65 64 2a 28 2e 37  |r/180)*speed*(.7|
000006f0  35 2a 2d 74 75 72 62 6f  2b 2e 32 35 29 0d 02 62  |5*-turbo+.25)..b|
00000700  33 20 62 62 79 3d 62 62  79 2b 32 30 2a 9b 28 af  |3 bby=bby+20*.(.|
00000710  2a 64 69 72 2f 31 38 30  29 2a 73 70 65 65 64 2a  |*dir/180)*speed*|
00000720  28 2e 37 35 2a 2d 74 75  72 62 6f 2b 2e 32 35 29  |(.75*-turbo+.25)|
00000730  0d 02 6c 51 20 e3 62 61  6c 6c 3d 30 b8 34 3a e7  |..lQ .ball=0.4:.|
00000740  20 94 28 62 62 78 2d 62  61 6c 6c 28 62 61 6c 6c  | .(bbx-ball(ball|
00000750  2c 30 29 29 3c 31 30 20  80 20 94 28 62 62 79 2d  |,0))<10 . .(bby-|
00000760  62 61 6c 6c 28 62 61 6c  6c 2c 31 29 29 3c 31 30  |ball(ball,1))<10|
00000770  20 8c 20 62 61 6c 6c 28  62 61 6c 6c 2c 30 29 3d  | . ball(ball,0)=|
00000780  30 0d 02 76 10 20 ed 3a  f2 64 72 61 77 6d 69 6e  |0..v. .:.drawmin|
00000790  69 0d 02 80 06 20 e1 0d  02 8a 06 20 3a 0d 02 94  |i.... ..... :...|
000007a0  19 20 dd a4 62 61 63 6b  28 66 72 65 71 2c 6d 69  |. ..back(freq,mi|
000007b0  6e 2c 6d 61 78 29 0d 02  9e 26 20 6d 6e 72 3d b2  |n,max)...& mnr=.|
000007c0  28 6d 69 6e 2b 2e 30 30  30 31 29 3a 6d 78 72 3d  |(min+.0001):mxr=|
000007d0  b2 28 6d 61 78 2b 2e 30  30 30 31 29 0d 02 a8 2c  |.(max+.0001)...,|
000007e0  20 f4 20 53 65 74 20 75  70 20 69 6e 69 74 69 61  | . Set up initia|
000007f0  6c 20 6f 75 74 73 69 64  65 20 72 61 6e 67 65 20  |l outside range |
00000800  73 65 74 74 69 6e 67 73  0d 02 b2 36 20 68 25 3d  |settings...6 h%=|
00000810  30 3a 64 25 3d 39 39 39  39 3a 64 61 25 3d 39 39  |0:d%=9999:da%=99|
00000820  39 39 3a 68 61 25 3d 30  3a f4 20 4c 4f 43 41 4c  |99:ha%=0:. LOCAL|
00000830  20 68 25 2c 64 25 2c 68  61 25 2c 64 61 25 0d 02  | h%,d%,ha%,da%..|
00000840  bc 38 20 f4 20 49 66 20  73 74 72 61 69 67 68 74  |.8 . If straight|
00000850  20 61 74 20 6e 65 74 20  69 73 20 69 6e 20 72 61  | at net is in ra|
00000860  6e 67 65 2c 20 77 69 6c  6c 20 62 65 20 73 68 6f  |nge, will be sho|
00000870  72 74 65 73 74 2e 0d 02  c6 74 20 e7 28 62 62 78  |rtest....t .(bbx|
00000880  3c 36 34 30 80 6d 69 6e  3c 3d 39 30 80 6d 61 78  |<640.min<=90.max|
00000890  3e 3d 39 30 29 84 28 62  62 78 3e 36 34 30 80 6d  |>=90).(bbx>640.m|
000008a0  69 6e 3c 3d 32 37 30 80  6d 61 78 3e 3d 32 37 30  |in<=270.max>=270|
000008b0  29 20 80 20 28 62 62 79  3e 31 30 30 20 80 20 62  |) . (bby>100 . b|
000008c0  62 79 3c 39 32 33 29 20  8c 20 68 25 3d 62 62 79  |by<923) . h%=bby|
000008d0  3a 64 25 3d 94 28 62 62  78 2d 36 34 30 29 3a 6d  |:d%=.(bbx-640):m|
000008e0  69 6e 3d 30 3a 6d 61 78  3d 30 0d 02 d0 2f 20 f4  |in=0:max=0.../ .|
000008f0  20 4f 74 68 65 72 77 69  73 65 20 66 69 6e 64 20  | Otherwise find |
00000900  73 68 6f 72 74 65 73 74  20 65 78 74 72 65 6d 65  |shortest extreme|
00000910  20 6f 66 20 72 61 6e 67  65 0d 02 da 30 20 64 25  | of range...0 d%|
00000920  3d 28 36 34 30 2d 62 62  78 29 2f b5 28 6d 6e 72  |=(640-bbx)/.(mnr|
00000930  29 3a 68 25 3d 62 62 79  2b 28 36 34 30 2d 62 62  |):h%=bby+(640-bb|
00000940  78 29 2f b7 28 6d 6e 72  29 0d 02 e4 32 20 64 61  |x)/.(mnr)...2 da|
00000950  25 3d 28 36 34 30 2d 62  62 78 29 2f b5 28 6d 78  |%=(640-bbx)/.(mx|
00000960  72 29 3a 68 61 25 3d 62  62 79 2b 28 36 34 30 2d  |r):ha%=bby+(640-|
00000970  62 62 78 29 2f b7 28 6d  78 72 29 0d 02 ee 2c 20  |bbx)/.(mxr)..., |
00000980  f4 20 4a 75 73 74 20 63  68 65 63 6b 20 69 66 20  |. Just check if |
00000990  70 6f 73 74 20 69 6e 20  6d 69 64 64 6c 65 20 6f  |post in middle o|
000009a0  66 20 72 61 6e 67 65 0d  02 f8 5b 20 e7 20 62 62  |f range...[ . bb|
000009b0  78 3c 36 34 30 20 80 20  68 25 3e 31 30 30 20 80  |x<640 . h%>100 .|
000009c0  20 28 68 61 25 3c 31 30  30 20 84 20 64 61 25 3c  | (ha%<100 . da%<|
000009d0  30 29 20 80 20 64 25 3e  30 20 8c 20 68 61 25 3d  |0) . d%>0 . ha%=|
000009e0  31 30 30 3a 64 61 25 3d  b6 28 28 62 62 78 2d 36  |100:da%=.((bbx-6|
000009f0  34 30 29 5e 32 2b 28 62  62 79 2d 31 30 30 29 5e  |40)^2+(bby-100)^|
00000a00  32 29 0d 03 02 59 20 e7  20 62 62 78 3c 36 34 30  |2)...Y . bbx<640|
00000a10  20 80 20 68 61 25 3c 39  32 33 20 80 20 28 68 25  | . ha%<923 . (h%|
00000a20  3e 39 32 33 20 84 20 64  25 3c 30 29 20 80 20 64  |>923 . d%<0) . d|
00000a30  61 25 3e 30 20 8c 20 68  25 3d 39 32 33 3a 64 25  |a%>0 . h%=923:d%|
00000a40  3d b6 28 28 62 62 78 2d  36 34 30 29 5e 32 2b 28  |=.((bbx-640)^2+(|
00000a50  62 62 79 2d 39 32 33 29  5e 32 29 0d 03 0c 59 20  |bby-923)^2)...Y |
00000a60  e7 20 62 62 78 3e 36 34  30 20 80 20 68 61 25 3e  |. bbx>640 . ha%>|
00000a70  31 30 30 20 80 20 28 68  25 3c 31 30 30 20 84 20  |100 . (h%<100 . |
00000a80  64 25 3c 30 29 20 80 20  64 61 25 3e 30 20 8c 20  |d%<0) . da%>0 . |
00000a90  68 25 3d 31 30 30 3a 64  25 3d b6 28 28 62 62 78  |h%=100:d%=.((bbx|
00000aa0  2d 36 34 30 29 5e 32 2b  28 62 62 79 2d 31 30 30  |-640)^2+(bby-100|
00000ab0  29 5e 32 29 0d 03 16 5b  20 e7 20 62 62 78 3e 36  |)^2)...[ . bbx>6|
00000ac0  34 30 20 80 20 68 25 3c  39 32 33 20 80 20 28 68  |40 . h%<923 . (h|
00000ad0  61 25 3e 39 32 33 20 84  20 64 61 25 3c 30 29 20  |a%>923 . da%<0) |
00000ae0  80 20 64 25 3e 30 20 8c  20 68 61 25 3d 39 32 33  |. d%>0 . ha%=923|
00000af0  3a 64 61 25 3d b6 28 28  62 62 78 2d 36 34 30 29  |:da%=.((bbx-640)|
00000b00  5e 32 2b 28 62 62 79 2d  39 32 33 29 5e 32 29 0d  |^2+(bby-923)^2).|
00000b10  03 20 1d 20 f4 20 50 69  63 6b 20 62 65 73 74 20  |. . . Pick best |
00000b20  74 6f 20 73 65 6e 64 20  6f 66 66 21 0d 03 2a 3a  |to send off!..*:|
00000b30  20 e7 20 64 25 3c 30 20  84 20 28 64 61 25 3c 64  | . d%<0 . (da%<d|
00000b40  25 20 80 20 68 61 25 3e  31 30 30 20 80 20 68 61  |% . ha%>100 . ha|
00000b50  25 3c 39 32 33 29 20 8c  20 64 25 3d 64 61 25 3a  |%<923) . d%=da%:|
00000b60  68 25 3d 68 61 25 0d 03  34 37 20 e7 20 68 25 3e  |h%=ha%..47 . h%>|
00000b70  39 32 33 20 84 20 68 25  3c 31 30 30 20 84 20 64  |923 . h%<100 . d|
00000b80  25 3c 30 20 8c 20 66 74  79 70 65 24 3d 22 55 22  |%<0 . ftype$="U"|
00000b90  3a 3d 66 72 65 71 2b b3  28 36 29 2d 33 0d 03 3e  |:=freq+.(6)-3..>|
00000ba0  27 20 e7 20 68 25 3e 39  30 30 20 84 20 68 25 3c  |' . h%>900 . h%<|
00000bb0  31 32 33 20 8c 20 66 74  79 70 65 24 3d 22 50 22  |123 . ftype$="P"|
00000bc0  3a 3d 64 25 0d 03 48 0f  20 66 74 79 70 65 24 3d  |:=d%..H. ftype$=|
00000bd0  22 4e 22 0d 03 52 08 20  3d 64 25 0d 03 5c 06 20  |"N"..R. =d%..\. |
00000be0  3a 0d 03 66 0c 20 dd f2  73 65 6e 73 65 0d 03 70  |:..f. ..sense..p|
00000bf0  34 20 f4 20 4c 4f 43 41  4c 20 66 72 65 71 61 2c  |4 . LOCAL freqa,|
00000c00  66 72 65 71 62 2c 66 72  65 71 63 2c 66 72 65 71  |freqb,freqc,freq|
00000c10  64 2c 66 61 24 2c 66 62  24 2c 66 63 24 2c 66 64  |d,fa$,fb$,fc$,fd|
00000c20  24 0d 03 7a 15 20 66 72  65 71 3d b3 28 32 35 30  |$..z. freq=.(250|
00000c30  29 2b 31 35 30 30 0d 03  84 2f 20 66 72 65 71 61  |)+1500.../ freqa|
00000c40  3d a4 62 61 63 6b 28 66  72 65 71 2c 64 69 72 2d  |=.back(freq,dir-|
00000c50  31 35 2c 64 69 72 2b 31  35 29 3a 66 61 24 3d 66  |15,dir+15):fa$=f|
00000c60  74 79 70 65 24 0d 03 8e  2f 20 66 72 65 71 62 3d  |type$.../ freqb=|
00000c70  a4 62 61 63 6b 28 66 72  65 71 2c 64 69 72 2d 34  |.back(freq,dir-4|
00000c80  35 2c 64 69 72 2d 31 35  29 3a 66 62 24 3d 66 74  |5,dir-15):fb$=ft|
00000c90  79 70 65 24 0d 03 98 2f  20 66 72 65 71 63 3d a4  |ype$.../ freqc=.|
00000ca0  62 61 63 6b 28 66 72 65  71 2c 64 69 72 2b 31 35  |back(freq,dir+15|
00000cb0  2c 64 69 72 2b 34 35 29  3a 66 63 24 3d 66 74 79  |,dir+45):fc$=fty|
00000cc0  70 65 24 0d 03 a2 2f 20  66 72 65 71 64 3d a4 62  |pe$.../ freqd=.b|
00000cd0  61 63 6b 28 66 72 65 71  2c 64 69 72 2d 37 35 2c  |ack(freq,dir-75,|
00000ce0  64 69 72 2d 34 35 29 3a  66 64 24 3d 66 74 79 70  |dir-45):fd$=ftyp|
00000cf0  65 24 0d 03 ac 0e 20 e3  62 61 6c 6c 3d 30 b8 34  |e$.... .ball=0.4|
00000d00  0d 03 b6 34 20 64 25 3d  b6 28 28 62 61 6c 6c 28  |...4 d%=.((ball(|
00000d10  62 61 6c 6c 2c 30 29 2d  62 62 78 29 5e 32 2b 28  |ball,0)-bbx)^2+(|
00000d20  62 61 6c 6c 28 62 61 6c  6c 2c 31 29 2d 62 62 79  |ball(ball,1)-bby|
00000d30  29 5e 32 29 0d 03 c0 1f  20 e7 20 62 61 6c 6c 28  |)^2).... . ball(|
00000d40  62 61 6c 6c 2c 30 29 3d  30 20 8c 20 64 25 3d 39  |ball,0)=0 . d%=9|
00000d50  39 39 39 0d 03 ca 45 20  61 3d a4 61 6e 67 6c 65  |999...E a=.angle|
00000d60  28 62 61 6c 6c 28 62 61  6c 6c 2c 30 29 2c 62 61  |(ball(ball,0),ba|
00000d70  6c 6c 28 62 61 6c 6c 2c  31 29 2c 62 62 78 2c 62  |ll(ball,1),bbx,b|
00000d80  62 79 29 2d 64 69 72 3a  e7 61 3e 31 38 30 20 8c  |by)-dir:.a>180 .|
00000d90  20 61 3d 61 2d 33 36 30  0d 03 d4 2c 20 e7 20 94  | a=a-360..., . .|
00000da0  28 61 29 3c 31 35 20 80  20 66 72 65 71 61 3e 64  |(a)<15 . freqa>d|
00000db0  25 20 8c 20 66 72 65 71  61 3d 64 25 3a 66 61 24  |% . freqa=d%:fa$|
00000dc0  3d 22 42 22 0d 03 de 33  20 e7 20 61 3e 2d 34 36  |="B"...3 . a>-46|
00000dd0  20 80 20 61 3c 3d 2d 31  35 20 80 20 66 72 65 71  | . a<=-15 . freq|
00000de0  62 3e 64 25 20 8c 20 66  72 65 71 62 3d 64 25 3a  |b>d% . freqb=d%:|
00000df0  66 62 24 3d 22 42 22 0d  03 e8 31 20 e7 20 61 3e  |fb$="B"...1 . a>|
00000e00  3d 31 35 20 80 20 61 3c  34 36 20 80 20 66 72 65  |=15 . a<46 . fre|
00000e10  71 63 3e 64 25 20 8c 20  66 72 65 71 63 3d 64 25  |qc>d% . freqc=d%|
00000e20  3a 66 63 24 3d 22 42 22  0d 03 f2 33 20 e7 20 61  |:fc$="B"...3 . a|
00000e30  3e 2d 37 36 20 80 20 61  3c 3d 2d 37 35 20 80 20  |>-76 . a<=-75 . |
00000e40  66 72 65 71 64 3e 64 25  20 8c 20 66 72 65 71 64  |freqd>d% . freqd|
00000e50  3d 64 25 3a 66 64 24 3d  22 42 22 0d 03 fc 06 20  |=d%:fd$="B".... |
00000e60  ed 0d 04 06 44 20 3f 26  37 30 3d a8 28 66 72 65  |....D ?&70=.(fre|
00000e70  71 61 2f 34 29 3a 3f 26  37 31 3d a8 28 66 72 65  |qa/4):?&71=.(fre|
00000e80  71 62 2f 34 29 3a 3f 26  37 32 3d a8 28 66 72 65  |qb/4):?&72=.(fre|
00000e90  71 63 2f 34 29 3a 3f 26  37 33 3d a8 28 66 72 65  |qc/4):?&73=.(fre|
00000ea0  71 64 2f 34 29 0d 04 10  34 20 3f 26 37 34 3d 97  |qd/4)...4 ?&74=.|
00000eb0  28 66 61 24 29 3a 3f 26  37 35 3d 97 28 66 62 24  |(fa$):?&75=.(fb$|
00000ec0  29 3a 3f 26 37 36 3d 97  28 66 63 24 29 3a 3f 26  |):?&76=.(fc$):?&|
00000ed0  37 37 3d 97 28 66 64 24  29 0d 04 1a 14 20 e7 20  |77=.(fd$).... . |
00000ee0  74 79 70 65 24 3d 22 32  22 20 8c 20 e1 0d 04 24  |type$="2" . ...$|
00000ef0  2e 20 f1 8a 30 2c 30 29  a8 28 63 25 2a 30 2e 31  |. ..0,0).(c%*0.1|
00000f00  35 2f 36 30 29 3b 22 3a  22 3b a8 28 63 25 2a 30  |5/60);":";.(c%*0|
00000f10  2e 31 35 29 83 36 30 3b  22 20 22 0d 04 2e 06 20  |.15).60;" ".... |
00000f20  e1 0d 04 38 19 20 dd a4  61 6e 67 6c 65 28 78 31  |...8. ..angle(x1|
00000f30  2c 79 31 2c 78 32 2c 79  32 29 0d 04 42 34 20 e7  |,y1,x2,y2)..B4 .|
00000f40  20 79 32 3d 79 31 20 8c  20 61 6e 67 3d 39 30 20  | y2=y1 . ang=90 |
00000f50  8b 20 61 6e 67 3d 31 38  30 2a 99 28 28 78 32 2d  |. ang=180*.((x2-|
00000f60  78 31 29 2f 28 79 32 2d  79 31 29 29 2f af 0d 04  |x1)/(y2-y1))/...|
00000f70  4c 1c 20 e7 20 28 79 32  3e 79 31 29 20 8c 20 61  |L. . (y2>y1) . a|
00000f80  6e 67 3d 61 6e 67 2b 31  38 30 0d 04 56 1a 20 e7  |ng=ang+180..V. .|
00000f90  20 61 6e 67 3c 30 20 8c  20 61 6e 67 3d 61 6e 67  | ang<0 . ang=ang|
00000fa0  2b 33 36 30 0d 04 60 0f  20 3d 61 6e 67 20 83 20  |+360..`. =ang . |
00000fb0  33 36 30 0d 04 6a 06 20  3a 0d 04 74 0e 20 dd f2  |360..j. :..t. ..|
00000fc0  63 6f 6d 70 6d 6f 6e 0d  04 7e 72 20 e7 20 69 64  |compmon..~r . id|
00000fd0  6c 65 20 80 20 28 62 61  6c 6c 28 30 2c 30 29 3c  |le . (ball(0,0)<|
00000fe0  3e 30 20 84 20 62 61 6c  6c 28 31 2c 30 29 3c 3e  |>0 . ball(1,0)<>|
00000ff0  30 20 84 20 62 61 6c 6c  28 32 2c 30 29 3c 3e 30  |0 . ball(2,0)<>0|
00001000  20 84 20 62 61 6c 6c 28  33 2c 30 29 3c 3e 30 20  | . ball(3,0)<>0 |
00001010  84 20 62 61 6c 6c 28 34  2c 30 29 3c 3e 30 29 20  |. ball(4,0)<>0) |
00001020  8c 20 73 74 24 3d 22 46  61 69 6c 22 20 8b 20 73  |. st$="Fail" . s|
00001030  74 24 3d 22 50 61 73 73  22 0d 04 88 36 20 e7 20  |t$="Pass"...6 . |
00001040  69 64 6c 65 20 8c 20 f1  73 74 24 2c a8 28 63 25  |idle . .st$,.(c%|
00001050  2a 30 2e 31 35 2f 36 30  29 3b 22 3a 22 3b a8 28  |*0.15/60);":";.(|
00001060  63 25 2a 30 2e 31 35 29  83 36 30 3b 22 20 22 0d  |c%*0.15).60;" ".|
00001070  04 92 26 20 e7 20 63 25  3e 32 30 30 30 20 8c 20  |..& . c%>2000 . |
00001080  69 64 6c 65 3d b9 3a f1  22 54 69 6d 65 22 2c 22  |idle=.:."Time","|
00001090  2a 2a 2a 2a 22 0d 04 9c  3c 20 e7 62 62 78 3e 36  |****"...< .bbx>6|
000010a0  33 35 80 62 62 78 3c 36  34 35 80 62 62 79 3e 31  |35.bbx<645.bby>1|
000010b0  30 35 80 62 62 79 3c 39  32 30 8c 69 64 6c 65 3d  |05.bby<920.idle=|
000010c0  b9 3a f1 22 43 72 61 73  68 22 2c 22 2a 2a 2a 2a  |.:."Crash","****|
000010d0  22 0d 04 a6 8e 20 e7 20  69 64 6c 65 20 8c 20 62  |".... . idle . b|
000010e0  62 78 3d 36 34 30 3a 62  62 79 3d 39 35 30 3a 64  |bx=640:bby=950:d|
000010f0  69 72 3d 32 37 30 3a d6  26 45 30 30 3a 73 74 61  |ir=270:.&E00:sta|
00001100  72 74 3d 91 3a e3 62 3d  30 b8 34 3a 62 61 6c 6c  |rt=.:.b=0.4:ball|
00001110  28 62 2c 30 29 3d b3 28  31 31 38 30 29 3a 62 61  |(b,0)=.(1180):ba|
00001120  6c 6c 28 62 2c 31 29 3d  b3 28 31 30 32 34 29 3a  |ll(b,1)=.(1024):|
00001130  62 61 6c 6c 28 62 2c 30  29 3d 62 61 6c 6c 28 62  |ball(b,0)=ball(b|
00001140  2c 30 29 2d 31 30 30 2a  28 28 62 61 6c 6c 28 62  |,0)-100*((ball(b|
00001150  2c 30 29 20 81 20 31 30  30 29 3d 36 29 3a ed 0d  |,0) . 100)=6):..|
00001160  04 b0 af 20 e7 20 69 64  6c 65 20 8c 20 f1 22 5b  |... . idle . ."[|
00001170  22 3b 62 61 6c 6c 28 30  2c 30 29 3b 22 2c 22 3b  |";ball(0,0);",";|
00001180  62 61 6c 6c 28 30 2c 31  29 3b 22 5d 20 5b 22 3b  |ball(0,1);"] [";|
00001190  62 61 6c 6c 28 31 2c 30  29 3b 22 2c 22 3b 62 61  |ball(1,0);",";ba|
000011a0  6c 6c 28 31 2c 31 29 3b  22 5d 20 5b 22 3b 62 61  |ll(1,1);"] [";ba|
000011b0  6c 6c 28 32 2c 30 29 3b  22 2c 22 3b 62 61 6c 6c  |ll(2,0);",";ball|
000011c0  28 32 2c 31 29 3b 22 5d  20 5b 22 3b 62 61 6c 6c  |(2,1);"] [";ball|
000011d0  28 33 2c 30 29 3b 22 2c  22 3b 62 61 6c 6c 28 33  |(3,0);",";ball(3|
000011e0  2c 31 29 3b 22 5d 20 5b  22 3b 62 61 6c 6c 28 34  |,1);"] [";ball(4|
000011f0  2c 30 29 3b 22 2c 22 3b  62 61 6c 6c 28 34 2c 31  |,0);",";ball(4,1|
00001200  29 3b 22 5d 22 2c 3b 3a  69 64 6c 65 3d a3 0d 04  |);"]",;:idle=...|
00001210  ba 06 20 e1 0d ff                                 |.. ...|
00001216
BioBot/6502/Sim.m0
BioBot/6502/Sim.m1
BioBot/6502/Sim.m2
BioBot/6502/Sim.m4
BioBot/6502/Sim.m5