Home » Personal collection » Acorn ADFS disks » Greaseweazled » dfs_box04_disk02b_eug_scripts.adf » TDSAI

TDSAI

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 » Greaseweazled » dfs_box04_disk02b_eug_scripts.adf
Filename: TDSAI
Read OK:
File size: 0C53 bytes
Load address: 0000
Exec address: FFFFFFFF
File contents
( TDS 9090 AI Routines for BallBot)
( Dominic Ford - Oct98)   

66 CONSTANT BALL ( Item type ID codes)
78 CONSTANT NET
80 CONSTANT POST
85 CONSTANT UNID

88 USER BIDLE    ( Variables)
89 USER BNEAR
90 USER BSEARCHING
91 USER BLEFT
92 USER BRIGHT
93 USER BSTEER
94 USER BTENDING
95 USER BREVING
96 USER BSTAGE
97 USER BTURBO
98 USER BREVERSE
99 USER BFREQA
100 USER BFREQB
101 USER BFREQC
102 USER BFREQD
103 USER BFA
104 USER BFB
105 USER BFC
106 USER BFD
107 USER TEMP

CODE SETUPBB ( Initialise BallBot AI routines)
 0 ## A LDA,
 BREVING A STA,
 BLEFT A STA,
 BRIGHT A STA,
 BSEARCHING A STA,
 BNEAR A STA,
 BSTEER A STA,
 BSTAGE A STA,
 BIDLE A STA,
 1 ## A LDA,
 BTENDING A STA,
END-CODE

CODE RELEASEB ( Spit out balls at end)
 255 ## A LDA,
 BLEFT A STA,
 BRIGHT A STA,
 BREVERSE A STA,
 BTURBO A STA,
 BNEAR INC,
 BNEAR A LDA,
 10 ## A CMP,
 CS NOT, IF,
  0 ## A LDA,
  BNEAR A STA,
  255 ## A LDA,
  BIDLE A STA,
 THEN,
END-CODE

CODE ROTATE ( If no ball in sight, continue rotation)
 BSEARCHING INC,
 0 ## A LDA,
 BSTEER A STA,
 BTURBO A STA,
 BSEARCHING A LDA,
 6 ## A CMP,
 CS NOT, IF,
  255 ## A LDA,
  BTURBO A STA,
 THEN,
 255 ## B LDA,
 BTENDING A LDA,
 EQ NOT, IF,
  BRIGHT B STA,
 ELSE,
  BLEFT B STA,
 THEN,
 BSEARCHING A LDA,
 5 ## A CMP,
 EQ IF,
  BTENDING A LDA,
  1 ## A EOR,
  BTENDING A STA,
 THEN,
 BSEARCHING A LDA,
 50 ## A CMP,
 EQ IF,
  BSTAGE INC,
 THEN,
END-CODE

CODE HUNTDIR ( Go left or right for ball in sight)
 BFA A LDA,
 BALL ## A CMP,
 EQ IF,
  0 ## B LDA,
  BSTEER B STA, ( Patch for video low-angle)
  BSTEER A LDA,
  1 ## A CMP,
  EQ IF,
   255 ## B LDA,
  THEN,
  BLEFT B STA,
  0 ## B LDA,
  255 ## A CMP,
  EQ IF,
   255 ## B LDA,
  THEN,
  BRIGHT B STA,
  0 ## A LDA,
  BSTEER A STA,
  BSEARCHING LSR,
  0 B ## LDA,
  BFREQA A LDA,
  25 ## A CMP,
  CS NOT, IF,
   255 ## B LDA,
  THEN,
  BTURBO B STA,
 ELSE,
  BFB A LDA,
  BALL ## A CMP,
  EQ IF,
   255 ## A LDA,
   BSTEER A STA,
   BLEFT A STA,
  ELSE,
   BFC A LDA,
   BALL ## A CMP,
   EQ IF,
    1 ## A LDA,
    BSTEER A STA,
    255 ## A LDA,
    BRIGHT A STA,
   ELSE,
    ' ROTATE JMP,
   THEN,
  THEN,
 THEN,
END-CODE

CODE FACEBALL ( Rotate to face ball)
 BFB A LDA,
 BALL ## A CMP,
 EQ IF,
  BFREQB A LDA,
  38 ## A CMP,
  CS NOT, IF,
   0 ## A LDA,
   BTENDING A STA,
  THEN,
 THEN,
 BFC A LDA,
 BALL ## A CMP,
 EQ IF,
  BFREQC A LDA,
  38 ## A CMP,
  CS NOT, IF,
   1 ## A LDA,
   BTENDING A STA,
  THEN,
 THEN,
( Pick best ball to aim at - may be left/right)
 BFREQA A LDA,
 A LSR,
 A LSR,
 TEMP A STA,
 A ASL,
 TEMP A ADD,
 TEMP A STA,
 BFREQB A CMP,
 CS NOT, IF,
  BFB A LDA,
  BALL ## A CMP,
  EQ IF,
   255 ## A LDA,
   BLEFT A STA,
   BSTEER A STA,
  THEN,
 THEN,
 TEMP A LDA,
 BFREQC A CMP,
 CS NOT, IF,
  BFC A LDA,
  BALL ## CMP,
  EQ IF,
   255 ## A LDA,
   BRIGHT A STA,
   0 ## A LDA,
   BLEFT A STA,
   1 ## A LDA,
   BSTEER A STA,
  THEN,
 THEN,
 BLEFT A LDA,
 0 ## A CMP,
 EQ IF,
  BRIGHT A LDA,
  0 ## A CMP,
  EQ IF,
   ' HUNTDIR JMP,
  THEN,
 THEN,
END-CODE

CODE AI ( Main AI routine entry point)
 0 ## A LDA,
 BLEFT A STA,
 BRIGHT A STA,
 BTURBO A STA,
 BREVERSE A STA,
 BSTAGE A LDA,
 4 ## A CMP,
 ' FACEBALL JMP,
END-CODE
00000000  0d 28 20 54 44 53 20 39  30 39 30 20 41 49 20 52  |.( TDS 9090 AI R|
00000010  6f 75 74 69 6e 65 73 20  66 6f 72 20 42 61 6c 6c  |outines for Ball|
00000020  42 6f 74 29 0d 28 20 44  6f 6d 69 6e 69 63 20 46  |Bot).( Dominic F|
00000030  6f 72 64 20 2d 20 4f 63  74 39 38 29 20 20 20 0d  |ord - Oct98)   .|
00000040  0d 36 36 20 43 4f 4e 53  54 41 4e 54 20 42 41 4c  |.66 CONSTANT BAL|
00000050  4c 20 28 20 49 74 65 6d  20 74 79 70 65 20 49 44  |L ( Item type ID|
00000060  20 63 6f 64 65 73 29 0d  37 38 20 43 4f 4e 53 54  | codes).78 CONST|
00000070  41 4e 54 20 4e 45 54 0d  38 30 20 43 4f 4e 53 54  |ANT NET.80 CONST|
00000080  41 4e 54 20 50 4f 53 54  0d 38 35 20 43 4f 4e 53  |ANT POST.85 CONS|
00000090  54 41 4e 54 20 55 4e 49  44 0d 0d 38 38 20 55 53  |TANT UNID..88 US|
000000a0  45 52 20 42 49 44 4c 45  20 20 20 20 28 20 56 61  |ER BIDLE    ( Va|
000000b0  72 69 61 62 6c 65 73 29  0d 38 39 20 55 53 45 52  |riables).89 USER|
000000c0  20 42 4e 45 41 52 0d 39  30 20 55 53 45 52 20 42  | BNEAR.90 USER B|
000000d0  53 45 41 52 43 48 49 4e  47 0d 39 31 20 55 53 45  |SEARCHING.91 USE|
000000e0  52 20 42 4c 45 46 54 0d  39 32 20 55 53 45 52 20  |R BLEFT.92 USER |
000000f0  42 52 49 47 48 54 0d 39  33 20 55 53 45 52 20 42  |BRIGHT.93 USER B|
00000100  53 54 45 45 52 0d 39 34  20 55 53 45 52 20 42 54  |STEER.94 USER BT|
00000110  45 4e 44 49 4e 47 0d 39  35 20 55 53 45 52 20 42  |ENDING.95 USER B|
00000120  52 45 56 49 4e 47 0d 39  36 20 55 53 45 52 20 42  |REVING.96 USER B|
00000130  53 54 41 47 45 0d 39 37  20 55 53 45 52 20 42 54  |STAGE.97 USER BT|
00000140  55 52 42 4f 0d 39 38 20  55 53 45 52 20 42 52 45  |URBO.98 USER BRE|
00000150  56 45 52 53 45 0d 39 39  20 55 53 45 52 20 42 46  |VERSE.99 USER BF|
00000160  52 45 51 41 0d 31 30 30  20 55 53 45 52 20 42 46  |REQA.100 USER BF|
00000170  52 45 51 42 0d 31 30 31  20 55 53 45 52 20 42 46  |REQB.101 USER BF|
00000180  52 45 51 43 0d 31 30 32  20 55 53 45 52 20 42 46  |REQC.102 USER BF|
00000190  52 45 51 44 0d 31 30 33  20 55 53 45 52 20 42 46  |REQD.103 USER BF|
000001a0  41 0d 31 30 34 20 55 53  45 52 20 42 46 42 0d 31  |A.104 USER BFB.1|
000001b0  30 35 20 55 53 45 52 20  42 46 43 0d 31 30 36 20  |05 USER BFC.106 |
000001c0  55 53 45 52 20 42 46 44  0d 31 30 37 20 55 53 45  |USER BFD.107 USE|
000001d0  52 20 54 45 4d 50 0d 0d  43 4f 44 45 20 53 45 54  |R TEMP..CODE SET|
000001e0  55 50 42 42 20 28 20 49  6e 69 74 69 61 6c 69 73  |UPBB ( Initialis|
000001f0  65 20 42 61 6c 6c 42 6f  74 20 41 49 20 72 6f 75  |e BallBot AI rou|
00000200  74 69 6e 65 73 29 0d 20  30 20 23 23 20 41 20 4c  |tines). 0 ## A L|
00000210  44 41 2c 0d 20 42 52 45  56 49 4e 47 20 41 20 53  |DA,. BREVING A S|
00000220  54 41 2c 0d 20 42 4c 45  46 54 20 41 20 53 54 41  |TA,. BLEFT A STA|
00000230  2c 0d 20 42 52 49 47 48  54 20 41 20 53 54 41 2c  |,. BRIGHT A STA,|
00000240  0d 20 42 53 45 41 52 43  48 49 4e 47 20 41 20 53  |. BSEARCHING A S|
00000250  54 41 2c 0d 20 42 4e 45  41 52 20 41 20 53 54 41  |TA,. BNEAR A STA|
00000260  2c 0d 20 42 53 54 45 45  52 20 41 20 53 54 41 2c  |,. BSTEER A STA,|
00000270  0d 20 42 53 54 41 47 45  20 41 20 53 54 41 2c 0d  |. BSTAGE A STA,.|
00000280  20 42 49 44 4c 45 20 41  20 53 54 41 2c 0d 20 31  | BIDLE A STA,. 1|
00000290  20 23 23 20 41 20 4c 44  41 2c 0d 20 42 54 45 4e  | ## A LDA,. BTEN|
000002a0  44 49 4e 47 20 41 20 53  54 41 2c 0d 45 4e 44 2d  |DING A STA,.END-|
000002b0  43 4f 44 45 0d 0d 43 4f  44 45 20 52 45 4c 45 41  |CODE..CODE RELEA|
000002c0  53 45 42 20 28 20 53 70  69 74 20 6f 75 74 20 62  |SEB ( Spit out b|
000002d0  61 6c 6c 73 20 61 74 20  65 6e 64 29 0d 20 32 35  |alls at end). 25|
000002e0  35 20 23 23 20 41 20 4c  44 41 2c 0d 20 42 4c 45  |5 ## A LDA,. BLE|
000002f0  46 54 20 41 20 53 54 41  2c 0d 20 42 52 49 47 48  |FT A STA,. BRIGH|
00000300  54 20 41 20 53 54 41 2c  0d 20 42 52 45 56 45 52  |T A STA,. BREVER|
00000310  53 45 20 41 20 53 54 41  2c 0d 20 42 54 55 52 42  |SE A STA,. BTURB|
00000320  4f 20 41 20 53 54 41 2c  0d 20 42 4e 45 41 52 20  |O A STA,. BNEAR |
00000330  49 4e 43 2c 0d 20 42 4e  45 41 52 20 41 20 4c 44  |INC,. BNEAR A LD|
00000340  41 2c 0d 20 31 30 20 23  23 20 41 20 43 4d 50 2c  |A,. 10 ## A CMP,|
00000350  0d 20 43 53 20 4e 4f 54  2c 20 49 46 2c 0d 20 20  |. CS NOT, IF,.  |
00000360  30 20 23 23 20 41 20 4c  44 41 2c 0d 20 20 42 4e  |0 ## A LDA,.  BN|
00000370  45 41 52 20 41 20 53 54  41 2c 0d 20 20 32 35 35  |EAR A STA,.  255|
00000380  20 23 23 20 41 20 4c 44  41 2c 0d 20 20 42 49 44  | ## A LDA,.  BID|
00000390  4c 45 20 41 20 53 54 41  2c 0d 20 54 48 45 4e 2c  |LE A STA,. THEN,|
000003a0  0d 45 4e 44 2d 43 4f 44  45 0d 0d 43 4f 44 45 20  |.END-CODE..CODE |
000003b0  52 4f 54 41 54 45 20 28  20 49 66 20 6e 6f 20 62  |ROTATE ( If no b|
000003c0  61 6c 6c 20 69 6e 20 73  69 67 68 74 2c 20 63 6f  |all in sight, co|
000003d0  6e 74 69 6e 75 65 20 72  6f 74 61 74 69 6f 6e 29  |ntinue rotation)|
000003e0  0d 20 42 53 45 41 52 43  48 49 4e 47 20 49 4e 43  |. BSEARCHING INC|
000003f0  2c 0d 20 30 20 23 23 20  41 20 4c 44 41 2c 0d 20  |,. 0 ## A LDA,. |
00000400  42 53 54 45 45 52 20 41  20 53 54 41 2c 0d 20 42  |BSTEER A STA,. B|
00000410  54 55 52 42 4f 20 41 20  53 54 41 2c 0d 20 42 53  |TURBO A STA,. BS|
00000420  45 41 52 43 48 49 4e 47  20 41 20 4c 44 41 2c 0d  |EARCHING A LDA,.|
00000430  20 36 20 23 23 20 41 20  43 4d 50 2c 0d 20 43 53  | 6 ## A CMP,. CS|
00000440  20 4e 4f 54 2c 20 49 46  2c 0d 20 20 32 35 35 20  | NOT, IF,.  255 |
00000450  23 23 20 41 20 4c 44 41  2c 0d 20 20 42 54 55 52  |## A LDA,.  BTUR|
00000460  42 4f 20 41 20 53 54 41  2c 0d 20 54 48 45 4e 2c  |BO A STA,. THEN,|
00000470  0d 20 32 35 35 20 23 23  20 42 20 4c 44 41 2c 0d  |. 255 ## B LDA,.|
00000480  20 42 54 45 4e 44 49 4e  47 20 41 20 4c 44 41 2c  | BTENDING A LDA,|
00000490  0d 20 45 51 20 4e 4f 54  2c 20 49 46 2c 0d 20 20  |. EQ NOT, IF,.  |
000004a0  42 52 49 47 48 54 20 42  20 53 54 41 2c 0d 20 45  |BRIGHT B STA,. E|
000004b0  4c 53 45 2c 0d 20 20 42  4c 45 46 54 20 42 20 53  |LSE,.  BLEFT B S|
000004c0  54 41 2c 0d 20 54 48 45  4e 2c 0d 20 42 53 45 41  |TA,. THEN,. BSEA|
000004d0  52 43 48 49 4e 47 20 41  20 4c 44 41 2c 0d 20 35  |RCHING A LDA,. 5|
000004e0  20 23 23 20 41 20 43 4d  50 2c 0d 20 45 51 20 49  | ## A CMP,. EQ I|
000004f0  46 2c 0d 20 20 42 54 45  4e 44 49 4e 47 20 41 20  |F,.  BTENDING A |
00000500  4c 44 41 2c 0d 20 20 31  20 23 23 20 41 20 45 4f  |LDA,.  1 ## A EO|
00000510  52 2c 0d 20 20 42 54 45  4e 44 49 4e 47 20 41 20  |R,.  BTENDING A |
00000520  53 54 41 2c 0d 20 54 48  45 4e 2c 0d 20 42 53 45  |STA,. THEN,. BSE|
00000530  41 52 43 48 49 4e 47 20  41 20 4c 44 41 2c 0d 20  |ARCHING A LDA,. |
00000540  35 30 20 23 23 20 41 20  43 4d 50 2c 0d 20 45 51  |50 ## A CMP,. EQ|
00000550  20 49 46 2c 0d 20 20 42  53 54 41 47 45 20 49 4e  | IF,.  BSTAGE IN|
00000560  43 2c 0d 20 54 48 45 4e  2c 0d 45 4e 44 2d 43 4f  |C,. THEN,.END-CO|
00000570  44 45 0d 0d 43 4f 44 45  20 48 55 4e 54 44 49 52  |DE..CODE HUNTDIR|
00000580  20 28 20 47 6f 20 6c 65  66 74 20 6f 72 20 72 69  | ( Go left or ri|
00000590  67 68 74 20 66 6f 72 20  62 61 6c 6c 20 69 6e 20  |ght for ball in |
000005a0  73 69 67 68 74 29 0d 20  42 46 41 20 41 20 4c 44  |sight). BFA A LD|
000005b0  41 2c 0d 20 42 41 4c 4c  20 23 23 20 41 20 43 4d  |A,. BALL ## A CM|
000005c0  50 2c 0d 20 45 51 20 49  46 2c 0d 20 20 30 20 23  |P,. EQ IF,.  0 #|
000005d0  23 20 42 20 4c 44 41 2c  0d 20 20 42 53 54 45 45  |# B LDA,.  BSTEE|
000005e0  52 20 42 20 53 54 41 2c  20 28 20 50 61 74 63 68  |R B STA, ( Patch|
000005f0  20 66 6f 72 20 76 69 64  65 6f 20 6c 6f 77 2d 61  | for video low-a|
00000600  6e 67 6c 65 29 0d 20 20  42 53 54 45 45 52 20 41  |ngle).  BSTEER A|
00000610  20 4c 44 41 2c 0d 20 20  31 20 23 23 20 41 20 43  | LDA,.  1 ## A C|
00000620  4d 50 2c 0d 20 20 45 51  20 49 46 2c 0d 20 20 20  |MP,.  EQ IF,.   |
00000630  32 35 35 20 23 23 20 42  20 4c 44 41 2c 0d 20 20  |255 ## B LDA,.  |
00000640  54 48 45 4e 2c 0d 20 20  42 4c 45 46 54 20 42 20  |THEN,.  BLEFT B |
00000650  53 54 41 2c 0d 20 20 30  20 23 23 20 42 20 4c 44  |STA,.  0 ## B LD|
00000660  41 2c 0d 20 20 32 35 35  20 23 23 20 41 20 43 4d  |A,.  255 ## A CM|
00000670  50 2c 0d 20 20 45 51 20  49 46 2c 0d 20 20 20 32  |P,.  EQ IF,.   2|
00000680  35 35 20 23 23 20 42 20  4c 44 41 2c 0d 20 20 54  |55 ## B LDA,.  T|
00000690  48 45 4e 2c 0d 20 20 42  52 49 47 48 54 20 42 20  |HEN,.  BRIGHT B |
000006a0  53 54 41 2c 0d 20 20 30  20 23 23 20 41 20 4c 44  |STA,.  0 ## A LD|
000006b0  41 2c 0d 20 20 42 53 54  45 45 52 20 41 20 53 54  |A,.  BSTEER A ST|
000006c0  41 2c 0d 20 20 42 53 45  41 52 43 48 49 4e 47 20  |A,.  BSEARCHING |
000006d0  4c 53 52 2c 0d 20 20 30  20 42 20 23 23 20 4c 44  |LSR,.  0 B ## LD|
000006e0  41 2c 0d 20 20 42 46 52  45 51 41 20 41 20 4c 44  |A,.  BFREQA A LD|
000006f0  41 2c 0d 20 20 32 35 20  23 23 20 41 20 43 4d 50  |A,.  25 ## A CMP|
00000700  2c 0d 20 20 43 53 20 4e  4f 54 2c 20 49 46 2c 0d  |,.  CS NOT, IF,.|
00000710  20 20 20 32 35 35 20 23  23 20 42 20 4c 44 41 2c  |   255 ## B LDA,|
00000720  0d 20 20 54 48 45 4e 2c  0d 20 20 42 54 55 52 42  |.  THEN,.  BTURB|
00000730  4f 20 42 20 53 54 41 2c  0d 20 45 4c 53 45 2c 0d  |O B STA,. ELSE,.|
00000740  20 20 42 46 42 20 41 20  4c 44 41 2c 0d 20 20 42  |  BFB A LDA,.  B|
00000750  41 4c 4c 20 23 23 20 41  20 43 4d 50 2c 0d 20 20  |ALL ## A CMP,.  |
00000760  45 51 20 49 46 2c 0d 20  20 20 32 35 35 20 23 23  |EQ IF,.   255 ##|
00000770  20 41 20 4c 44 41 2c 0d  20 20 20 42 53 54 45 45  | A LDA,.   BSTEE|
00000780  52 20 41 20 53 54 41 2c  0d 20 20 20 42 4c 45 46  |R A STA,.   BLEF|
00000790  54 20 41 20 53 54 41 2c  0d 20 20 45 4c 53 45 2c  |T A STA,.  ELSE,|
000007a0  0d 20 20 20 42 46 43 20  41 20 4c 44 41 2c 0d 20  |.   BFC A LDA,. |
000007b0  20 20 42 41 4c 4c 20 23  23 20 41 20 43 4d 50 2c  |  BALL ## A CMP,|
000007c0  0d 20 20 20 45 51 20 49  46 2c 0d 20 20 20 20 31  |.   EQ IF,.    1|
000007d0  20 23 23 20 41 20 4c 44  41 2c 0d 20 20 20 20 42  | ## A LDA,.    B|
000007e0  53 54 45 45 52 20 41 20  53 54 41 2c 0d 20 20 20  |STEER A STA,.   |
000007f0  20 32 35 35 20 23 23 20  41 20 4c 44 41 2c 0d 20  | 255 ## A LDA,. |
00000800  20 20 20 42 52 49 47 48  54 20 41 20 53 54 41 2c  |   BRIGHT A STA,|
00000810  0d 20 20 20 45 4c 53 45  2c 0d 20 20 20 20 27 20  |.   ELSE,.    ' |
00000820  52 4f 54 41 54 45 20 4a  4d 50 2c 0d 20 20 20 54  |ROTATE JMP,.   T|
00000830  48 45 4e 2c 0d 20 20 54  48 45 4e 2c 0d 20 54 48  |HEN,.  THEN,. TH|
00000840  45 4e 2c 0d 45 4e 44 2d  43 4f 44 45 0d 0d 43 4f  |EN,.END-CODE..CO|
00000850  44 45 20 46 41 43 45 42  41 4c 4c 20 28 20 52 6f  |DE FACEBALL ( Ro|
00000860  74 61 74 65 20 74 6f 20  66 61 63 65 20 62 61 6c  |tate to face bal|
00000870  6c 29 0d 20 42 46 42 20  41 20 4c 44 41 2c 0d 20  |l). BFB A LDA,. |
00000880  42 41 4c 4c 20 23 23 20  41 20 43 4d 50 2c 0d 20  |BALL ## A CMP,. |
00000890  45 51 20 49 46 2c 0d 20  20 42 46 52 45 51 42 20  |EQ IF,.  BFREQB |
000008a0  41 20 4c 44 41 2c 0d 20  20 33 38 20 23 23 20 41  |A LDA,.  38 ## A|
000008b0  20 43 4d 50 2c 0d 20 20  43 53 20 4e 4f 54 2c 20  | CMP,.  CS NOT, |
000008c0  49 46 2c 0d 20 20 20 30  20 23 23 20 41 20 4c 44  |IF,.   0 ## A LD|
000008d0  41 2c 0d 20 20 20 42 54  45 4e 44 49 4e 47 20 41  |A,.   BTENDING A|
000008e0  20 53 54 41 2c 0d 20 20  54 48 45 4e 2c 0d 20 54  | STA,.  THEN,. T|
000008f0  48 45 4e 2c 0d 20 42 46  43 20 41 20 4c 44 41 2c  |HEN,. BFC A LDA,|
00000900  0d 20 42 41 4c 4c 20 23  23 20 41 20 43 4d 50 2c  |. BALL ## A CMP,|
00000910  0d 20 45 51 20 49 46 2c  0d 20 20 42 46 52 45 51  |. EQ IF,.  BFREQ|
00000920  43 20 41 20 4c 44 41 2c  0d 20 20 33 38 20 23 23  |C A LDA,.  38 ##|
00000930  20 41 20 43 4d 50 2c 0d  20 20 43 53 20 4e 4f 54  | A CMP,.  CS NOT|
00000940  2c 20 49 46 2c 0d 20 20  20 31 20 23 23 20 41 20  |, IF,.   1 ## A |
00000950  4c 44 41 2c 0d 20 20 20  42 54 45 4e 44 49 4e 47  |LDA,.   BTENDING|
00000960  20 41 20 53 54 41 2c 0d  20 20 54 48 45 4e 2c 0d  | A STA,.  THEN,.|
00000970  20 54 48 45 4e 2c 0d 28  20 50 69 63 6b 20 62 65  | THEN,.( Pick be|
00000980  73 74 20 62 61 6c 6c 20  74 6f 20 61 69 6d 20 61  |st ball to aim a|
00000990  74 20 2d 20 6d 61 79 20  62 65 20 6c 65 66 74 2f  |t - may be left/|
000009a0  72 69 67 68 74 29 0d 20  42 46 52 45 51 41 20 41  |right). BFREQA A|
000009b0  20 4c 44 41 2c 0d 20 41  20 4c 53 52 2c 0d 20 41  | LDA,. A LSR,. A|
000009c0  20 4c 53 52 2c 0d 20 54  45 4d 50 20 41 20 53 54  | LSR,. TEMP A ST|
000009d0  41 2c 0d 20 41 20 41 53  4c 2c 0d 20 54 45 4d 50  |A,. A ASL,. TEMP|
000009e0  20 41 20 41 44 44 2c 0d  20 54 45 4d 50 20 41 20  | A ADD,. TEMP A |
000009f0  53 54 41 2c 0d 20 42 46  52 45 51 42 20 41 20 43  |STA,. BFREQB A C|
00000a00  4d 50 2c 0d 20 43 53 20  4e 4f 54 2c 20 49 46 2c  |MP,. CS NOT, IF,|
00000a10  0d 20 20 42 46 42 20 41  20 4c 44 41 2c 0d 20 20  |.  BFB A LDA,.  |
00000a20  42 41 4c 4c 20 23 23 20  41 20 43 4d 50 2c 0d 20  |BALL ## A CMP,. |
00000a30  20 45 51 20 49 46 2c 0d  20 20 20 32 35 35 20 23  | EQ IF,.   255 #|
00000a40  23 20 41 20 4c 44 41 2c  0d 20 20 20 42 4c 45 46  |# A LDA,.   BLEF|
00000a50  54 20 41 20 53 54 41 2c  0d 20 20 20 42 53 54 45  |T A STA,.   BSTE|
00000a60  45 52 20 41 20 53 54 41  2c 0d 20 20 54 48 45 4e  |ER A STA,.  THEN|
00000a70  2c 0d 20 54 48 45 4e 2c  0d 20 54 45 4d 50 20 41  |,. THEN,. TEMP A|
00000a80  20 4c 44 41 2c 0d 20 42  46 52 45 51 43 20 41 20  | LDA,. BFREQC A |
00000a90  43 4d 50 2c 0d 20 43 53  20 4e 4f 54 2c 20 49 46  |CMP,. CS NOT, IF|
00000aa0  2c 0d 20 20 42 46 43 20  41 20 4c 44 41 2c 0d 20  |,.  BFC A LDA,. |
00000ab0  20 42 41 4c 4c 20 23 23  20 43 4d 50 2c 0d 20 20  | BALL ## CMP,.  |
00000ac0  45 51 20 49 46 2c 0d 20  20 20 32 35 35 20 23 23  |EQ IF,.   255 ##|
00000ad0  20 41 20 4c 44 41 2c 0d  20 20 20 42 52 49 47 48  | A LDA,.   BRIGH|
00000ae0  54 20 41 20 53 54 41 2c  0d 20 20 20 30 20 23 23  |T A STA,.   0 ##|
00000af0  20 41 20 4c 44 41 2c 0d  20 20 20 42 4c 45 46 54  | A LDA,.   BLEFT|
00000b00  20 41 20 53 54 41 2c 0d  20 20 20 31 20 23 23 20  | A STA,.   1 ## |
00000b10  41 20 4c 44 41 2c 0d 20  20 20 42 53 54 45 45 52  |A LDA,.   BSTEER|
00000b20  20 41 20 53 54 41 2c 0d  20 20 54 48 45 4e 2c 0d  | A STA,.  THEN,.|
00000b30  20 54 48 45 4e 2c 0d 20  42 4c 45 46 54 20 41 20  | THEN,. BLEFT A |
00000b40  4c 44 41 2c 0d 20 30 20  23 23 20 41 20 43 4d 50  |LDA,. 0 ## A CMP|
00000b50  2c 0d 20 45 51 20 49 46  2c 0d 20 20 42 52 49 47  |,. EQ IF,.  BRIG|
00000b60  48 54 20 41 20 4c 44 41  2c 0d 20 20 30 20 23 23  |HT A LDA,.  0 ##|
00000b70  20 41 20 43 4d 50 2c 0d  20 20 45 51 20 49 46 2c  | A CMP,.  EQ IF,|
00000b80  0d 20 20 20 27 20 48 55  4e 54 44 49 52 20 4a 4d  |.   ' HUNTDIR JM|
00000b90  50 2c 0d 20 20 54 48 45  4e 2c 0d 20 54 48 45 4e  |P,.  THEN,. THEN|
00000ba0  2c 0d 45 4e 44 2d 43 4f  44 45 0d 0d 43 4f 44 45  |,.END-CODE..CODE|
00000bb0  20 41 49 20 28 20 4d 61  69 6e 20 41 49 20 72 6f  | AI ( Main AI ro|
00000bc0  75 74 69 6e 65 20 65 6e  74 72 79 20 70 6f 69 6e  |utine entry poin|
00000bd0  74 29 0d 20 30 20 23 23  20 41 20 4c 44 41 2c 0d  |t). 0 ## A LDA,.|
00000be0  20 42 4c 45 46 54 20 41  20 53 54 41 2c 0d 20 42  | BLEFT A STA,. B|
00000bf0  52 49 47 48 54 20 41 20  53 54 41 2c 0d 20 42 54  |RIGHT A STA,. BT|
00000c00  55 52 42 4f 20 41 20 53  54 41 2c 0d 20 42 52 45  |URBO A STA,. BRE|
00000c10  56 45 52 53 45 20 41 20  53 54 41 2c 0d 20 42 53  |VERSE A STA,. BS|
00000c20  54 41 47 45 20 41 20 4c  44 41 2c 0d 20 34 20 23  |TAGE A LDA,. 4 #|
00000c30  23 20 41 20 43 4d 50 2c  0d 20 27 20 46 41 43 45  |# A CMP,. ' FACE|
00000c40  42 41 4c 4c 20 4a 4d 50  2c 0d 45 4e 44 2d 43 4f  |BALL JMP,.END-CO|
00000c50  44 45 0d                                          |DE.|
00000c53
TDSAI.m0
TDSAI.m1
TDSAI.m2
TDSAI.m4
TDSAI.m5