First commit main
authorHistorical Source <49599193+historicalsource@users.noreply.github.com>
Thu, 14 Oct 2021 06:25:39 +0000 (02:25 -0400)
committerHistorical Source <49599193+historicalsource@users.noreply.github.com>
Thu, 14 Oct 2021 06:25:39 +0000 (02:25 -0400)
A09114.RBN [new file with mode: 0644]
A09121.RBN [new file with mode: 0644]
A09122.XX [new file with mode: 0644]
A09124.RBN [new file with mode: 0644]
A09125.RBN [new file with mode: 0644]
A09126.RBN [new file with mode: 0644]
A09127.RBN [new file with mode: 0644]
A09823.RBN [new file with mode: 0644]
SUPBUG.DIR [new file with mode: 0644]
SUPDIG.MAC [new file with mode: 0644]
SUPMEM.MAC [new file with mode: 0644]

diff --git a/A09114.RBN b/A09114.RBN
new file mode 100644 (file)
index 0000000..aa6b3eb
Binary files /dev/null and b/A09114.RBN differ
diff --git a/A09121.RBN b/A09121.RBN
new file mode 100644 (file)
index 0000000..b56bdf4
Binary files /dev/null and b/A09121.RBN differ
diff --git a/A09122.XX b/A09122.XX
new file mode 100644 (file)
index 0000000..2caa9a9
--- /dev/null
+++ b/A09122.XX
@@ -0,0 +1,1652 @@
+       .TITLE  CTYSUP\r
+       .ASECT\r
+OPT    =2\r
+;OPT 0=WRWRD, OPT 1=PC DEV, OPT 2=PC ALONE\r
+       .IF     EQ,OPT\r
+       .=30000\r
+PLFDRM =004000\r
+MAP    =10000\r
+SPCTBL =11000\r
+CELTBL =20000\r
+ROM1   =20000\r
+ROM2   =30000\r
+ROM3   =34000\r
+ROM4   =40000\r
+CHKSM  =37765\r
+       .ENDC\r
+       .IF     GE,OPT-1\r
+       .=10000\r
+PLFDRM =02400\r
+MAP    =04000\r
+SPCTBL =05000\r
+CELTBL =06000\r
+ROM1   =04000\r
+ROM2   =10000\r
+ROM3   =14000\r
+ROM4   =20000\r
+CHKSM  =17765\r
+.ENDC\r
+CRSHIN =001006         ;BIT 7 TRUE = CRASH\r
+CRSHRS =000500         ;WRITE TO CLEAR CRASH LATCH\r
+STRFLG =001002         ;BIT 7 FALSE = STEER\r
+STRRST =000640\r
+SKIDIN =001006\r
+SKDRST =000540\r
+TMEOPT =001101\r
+GEAR32 =001000\r
+GEAR1  =001001\r
+GASIN  =001001\r
+COIN1  =001003\r
+COIN2  =001004\r
+CARROT =000600\r
+PVP    =000400\r
+PHP    =000440\r
+WTCHDG =000700\r
+ARROFF =000740\r
+MOTSND =001200\r
+CSHSND =001240\r
+SKDSND =001300\r
+SLAMSW =001007\r
+SCRRST =001003\r
+ATRCT  =142\r
+LTOFF  =142\r
+SRTLMP =143\r
+NOATRC =141\r
+CNMASK =001\r
+PROT   =064645\r
+STRTSW =001005\r
+TKSEL  =001007\r
+TSTSW  =001005\r
+TNEOUT =001040\r
+COINOP =001100\r
+XPOPT  =001102\r
+MESOPT =001103\r
+LOC0   =002000\r
+LOC1   =002020\r
+ANADD  =002000\r
+PRTCD  =012\r
+HISCR  =014\r
+ZERO   =015\r
+CN1RDY =016\r
+CN2RDY =017\r
+ADDSAV =020\r
+TNETME =022\r
+VELN   =023\r
+NTEMP  =024\r
+TKSLDB =026\r
+TKFG   =027            ;(2) SAVE AREA FOR LATCHED OUTPUTS\r
+RANOBJ =031            ;RANDOM SPECIAL OBJ FOR ATTRACT\r
+RANDOM =032            ;(2) RANDOM NUMBER\r
+SPECN  =034            ;MSB OF ADDRESS OF SELECTED MAPS SPECIAL TABLE\r
+MAPN   =035            ;MSB OF ADDRESS OF SELECTED MAP\r
+XTDSCR =036\r
+SCRCNT =037\r
+MODE   =040            ;0=GAME, 1=EXT. PLAY, 2=ATT\r
+COST   =041\r
+CN1DB  =042\r
+CN2DB  =043\r
+COINCT =044\r
+FUEL   =046\r
+FUELTM =047\r
+SCOREA =052\r
+CLIDLO =057\r
+HCRPOS =060\r
+VCRPOS =061\r
+CELLX  =062\r
+SPCLOC =063\r
+SPECCD =064\r
+SPCOBJ =065\r
+FRMCNT =066                    ;(2)\r
+MOLPNT =070                    ;(2)\r
+TEMP   =072                    ;(2)\r
+HPOS   =074                    ;(2)\r
+VPOS   =076                    ;(2)\r
+ROTREG =100\r
+VEL    =101\r
+VELX   =102\r
+VELY   =103\r
+CELLOC =104\r
+CELLID =105\r
+HPNT   =106\r
+VPNT   =107\r
+HPOSM  =111            ;(2)\r
+VPOSM  =113            ;(2)\r
+DIRPIC =114\r
+DIREC  =115\r
+PVPOUT =116\r
+PHPOUT =117\r
+GEAR   =120\r
+STRSAV =121\r
+SAVE   =122                    ;(2)\r
+MPOS   =124\r
+ROTOUT =125\r
+ROTPIC =126\r
+CELLX  =127\r
+VOUT   =130                    ;(16)\r
+HOUT   =150                    ;(16)\r
+MOLXV  =170\r
+MOLXH  =171\r
+CRSLIN =172\r
+CRSHSV =173\r
+CRSCNT =174\r
+HPFAC  =175\r
+VPFAC  =176\r
+CELROT =177\r
+       .MACRO  .MSG,STRING\r
+       .IRPC   ..1,STRING\r
+       .IF     LT,''..1-100\r
+       .IFT\r
+       .BYTE   ''..1-60\r
+       .IFF\r
+       .BYTE   ''..1-67\r
+       .ENDC\r
+       .ENDM\r
+       .ENDM\r
+       .SBTTL  POWER ON\r
+       .IF     LE,OPT-1\r
+       .IFT\r
+PWRON: LDX     I,NMI\r
+       STX     E,173641\r
+       LDX     I,IRQ\r
+       STX     E,173644\r
+       LDS     I,377\r
+       SEI\r
+       .IFF\r
+PWRON: LDS     I,377\r
+       .ENDC\r
+       LDX     I,177\r
+       CLRA\r
+P1:    STAA    X,0\r
+       DEX\r
+       BNE     P1\r
+       LDAA    I,02\r
+       STAA    D,MODE\r
+       JSR     E,INIT\r
+       .SBTTL  ATTRACT MODE\r
+ATTRAC:        JSR     E,SETUP\r
+       LDX     I,PROT          ;A "RANDOM" NUMBER TO SHOW WE'RE OK\r
+       STX     D,PRTCD\r
+       LDAA    E,TSTSW\r
+       RORA\r
+       BCC     1$\r
+       SEI\r
+       JMP     TEST\r
+1$:    LDAA    D,HPOS\r
+       ASLA\r
+       ASLA\r
+       ASLA\r
+       ASLA\r
+       LDAB    D,HPOS+1\r
+       LSRB\r
+       LSRB\r
+       LSRB\r
+       LSRB\r
+       ABA\r
+       SUBA    I,04\r
+       STAA    D,PHPOUT\r
+       LDAA    I,010\r
+       STAA    D,PVPOUT\r
+       LDAA    I,02\r
+       STAA    D,MODE\r
+       STAA    D,TKFG\r
+       CLRA\r
+       STAA    D,VPOS\r
+       STAA    D,VPOSM\r
+       STAA    D,SPECN\r
+       STAA    D,FRMCNT+1\r
+       STAA    D,MOLXV\r
+       STAA    E,MOTSND\r
+       LDAA    I,RANOBJ\r
+       STAA    D,CELLOC\r
+       LDX     D,TKFG\r
+       STAA    X,ATRCT\r
+       JSR     E,OPTN\r
+       LDAA    D,PHPOUT\r
+       ADDA    I,02\r
+       STAA    D,PHPOUT\r
+       LDAA    D,HPOS+1                ;INCREMENT LOCATION\r
+       ADDA    I,040\r
+       STAA    D,HPOS+1\r
+       BCC     AT2\r
+       LDAA    I,201\r
+       STAA    D,MOLXH\r
+       LDAA    D,HPOS\r
+       INCA\r
+       STAA    D,HPOS\r
+       ADDA    I,017\r
+       STAA    D,HPNT\r
+       ANDA    I,017\r
+       STAA    D,HPOSM\r
+       STAA    D,HPFAC\r
+       BNE     AT1\r
+       JSR     E,RANNUM                        ;RANDOM NUMBER IN A\r
+       ANDA    I,017\r
+       STAA    D,TEMP+1\r
+       LDAA    I,ATTMAP/400\r
+       STAA    D,TEMP\r
+       LDX     D,TEMP\r
+       LDAA    X,ATTMAP&377                    ;C(A)=RANDOM CELL\r
+       STAA    D,CELLID\r
+       LDAA    D,RANDOM\r
+       ANDA    I,007\r
+       STAA    D,TEMP+1\r
+       LDAA    I,ATTSPC/400\r
+       STAA    D,TEMP\r
+       LDX     D,TEMP\r
+       LDAA    X,ATTSPC&377            ;C(A)=LOW PART OF SPEC CODE\r
+       LDAB    D,RANDOM+1\r
+       ANDB    I,060                   ;ADD IN HIGH PART\r
+       ABA\r
+       STAA    D,RANOBJ\r
+       CLR     E,CELLX\r
+AT1:   LDAA    D,CELLID\r
+       JSR     E,RCLIDM\r
+       JSR     E,CONTH\r
+AT2:   STAA    E,WTCHDG\r
+       CLI\r
+       WAI\r
+AT3:   BRA     .-1\r
+       .SBTTL  THE GAME\r
+GAME:  CLR     E,MODE\r
+       JSR     E,RERITE                ;WRITE A FRESH ROAD\r
+       JSR     E,INIT\r
+       JSR     E,SETUP\r
+       LDX     D,TKFG\r
+       STAA    X,NOATRC\r
+GO:    LDAA    D,MODE                  ;MAKE SURE WE SHOULD BE HERE\r
+       CMPA    I,01\r
+       BLS     STEER\r
+       JMP     PWRON\r
+STEER: LDAA    D,ROTREG\r
+       LDAB    E,STRFLG                ;TEST FOR STEER\r
+       BMI     S1                      ;NO STEER, GO TO PICTURE UPDATE\r
+       STAB    D,STRSAV                ;SAVE DIRECTION FOR SKID ROUTINE\r
+       RORB                            ;C(CARRY)=DIRECTION FLAG\r
+       LDAB    D,CRSCNT                ;LOCKOUT STEERING DURING CRASH SEQUENCE\r
+       BNE     S1\r
+       LDAB    I,03\r
+       BCC     RIGHT\r
+LEFT:  NEGB\r
+RIGHT: ABA\r
+S1:    STAA    D,ROTREG                ;ADD IN STEER\r
+       JSR     E,CNVRT\r
+       STAA    D,ROTPIC\r
+       STAA    D,TEMP+1\r
+       LDAA    I,ROTTBL/400            ;GET VIDEO CODE\r
+       STAA    D,TEMP\r
+       LDX     D,TEMP\r
+       LDAA    X,ROTTBL&377\r
+       STAA    D,ROTOUT                ;LOAD ROTATION OUTPUT BUFFER\r
+       STAA    E,STRRST                ;RESET STEERING LATCH\r
+CRASH: LDAB    E,CRSHIN                ;IN=0, DONE\r
+       BPL     CREND\r
+       LDAA    D,CRSHSV                ;SV=0, CRASH\r
+       BPL     CRSH\r
+       LDAA    D,CRSCNT                ;COUNT NOT=0, CRASH\r
+       BEQ     CREND\r
+CRSH:  CLRA                            ;STOP CAR\r
+       STAA    D,VEL\r
+       STAA    D,VELN\r
+       LDAA    D,CRSCNT\r
+       STAA    E,CSHSND                ;OUTPUT CRASH SOUND\r
+       ADDA    I,004                   ;INCREMENT CRASH SEQUENCE\r
+       STAA    D,CRSCNT\r
+       LDAB    I,013\r
+       BITA    I,010\r
+       BEQ     CR1\r
+       NEGB\r
+CR1:   ADDB    D,ROTREG\r
+       STAB    D,ROTREG\r
+       BITA    I,017\r
+       BNE     CREND\r
+       LDAB    D,TKFG+1\r
+       EORB    I,004\r
+       STAB    D,TKFG+1\r
+       LDX     D,TKFG\r
+       STAA    X,NOATRC\r
+CREND: LDAB    E,CRSHIN\r
+       STAB    D,CRSHSV\r
+       LDAA    D,VELN\r
+       CMPA    I,065\r
+       BLS     SKID\r
+       STAA    E,CRSHRS                ;RESET CRASH LATCH\r
+SKID:  LDAA    D,FRMCNT\r
+       ANDA    I,03\r
+       BEQ     DIRECT\r
+       LDAA    E,SKIDIN                ;READ SKID LATCH\r
+       STAA    E,SKDRST                ;CLEAR LATCH\r
+       RORA\r
+       BCC     DIRECT                  ;IF NO SKID, GO TO NEXT ROUTINE\r
+       STAA    E,SKDSND                ;TURN ON SOUND\r
+       LDAB    D,VEL           ;AMOUNT OF SKID IS VEL/128+1\r
+       ROLB\r
+       ROLB\r
+       ANDB    I,01\r
+       INCB\r
+       LDAA    D,STRSAV        ;TEST LAST STEER DIRECTION\r
+       RORA\r
+       BCC     SK3             ;IF LEFT, NEGATE SKID CONSTANT\r
+       NEGB\r
+SK3:   ADDB    D,ROTREG                ;ADD SKID TO ROTATION\r
+       STAB    D,ROTREG\r
+DIRECT:        LDAA    D,VEL\r
+       ROLA\r
+       LDAA    I,03\r
+       SBCA    I,0             ;C(A)=3-(VEL/128)\r
+       LDAB    D,ROTREG        ;IF DIRECTION EQ. ROTATION, GO TO NEXT ROUTINE\r
+       SUBB    D,DIREC\r
+       BEQ     TONE\r
+       BPL     DI2             ;IF DIRECTION GT. ROTATION, NEGATE CONSTANTS\r
+       NEGA\r
+       NEGB\r
+DI2:   CMPB    I,06            ;SKID SOUND ON IF DIFFERENCE GT. 4\r
+       BLS     DI4             ;AND NOT IN A CRASH SEQUENCE\r
+       TST     E,CRSCNT\r
+       BNE     DI4\r
+       STAB    E,SKDSND\r
+DI4:   CMPB    I,02\r
+       BHI     DI3\r
+       LDAB    D,ROTREG\r
+       STAB    D,DIREC\r
+       BRA     TONE\r
+DI3:   ADDA    D,DIREC         ;UPDATE DIRECTION\r
+       STAA    D,DIREC\r
+TONE:  LDAB    D,TNETME        ;EX PLAY TONE\r
+       BEQ     SINCOS\r
+       DECB\r
+       STAB    D,TNETME\r
+       BITB    I,03\r
+       BNE     SINCOS\r
+       STAB    E,TNEOUT\r
+SINCOS:        LDAA    D,DIREC         ;GET DIRECTION REGISTER & CONVERT TO PICTURE\r
+       JSR     E,CNVRT\r
+       LDAB    D,VEL\r
+       STAA    D,DIRPIC\r
+       BEQ     DIR0            ;TEST FOR SPECIAL DIRECTIONS\r
+       CMPA    I,06\r
+       BEQ     DIR1\r
+       CMPA    I,14\r
+       BEQ     DIR0\r
+       CMPA    I,22\r
+       BEQ     DIR1\r
+       STAA    D,TEMP+1        ;GET SINE\r
+       LDAA    I,DIRTBL/400\r
+       STAA    D,TEMP\r
+       LDX     D,TEMP\r
+       LDAA    X,DIRTBL&377\r
+       ASLA\r
+       ASLA\r
+       ASLA\r
+       ASLA\r
+       JSR     E,SINMUL        ;B=(VEL)(SIN 0)\r
+       STAB    D,VELX\r
+       LDAB    D,VEL\r
+       LDAA    X,DIRTBL&377    ;GET COSINE\r
+       ANDA    I,360\r
+       JSR     E,SINMUL\r
+       STAB    D,VELY\r
+       BRA     VELSGN\r
+DIR0:  LSRB                    ;SIDEWAYS\r
+       LSRB\r
+       LSRB\r
+       STAB    D,VELY          ;VELY=VEL/8\r
+       CLR     E,VELX          ;VELX=0\r
+       BRA     VELSGN\r
+DIR1:  LSRB                    ;UP-DOWN\r
+       LSRB\r
+       LSRB\r
+       STAB    D,VELX          ;VELX=VEL/8\r
+       CLR     E,VELY          ;VELY=0\r
+VELSGN:        LDAA    D,DIRPIC        ;IF PICTURE IS MORE THAN 12, VELX IS NEGATIVE\r
+       CMPA    I,014\r
+       BLS     D2\r
+       NEG     E,VELX\r
+D2:    NEG     E,VELY\r
+       CMPA    I,006           ;IF PICTURE BETWEEN 6 AND 18, VELY IS NEGATIVE\r
+       BLS     SOUND\r
+       CMPA    I,022\r
+       BHI     SOUND\r
+       NEG     E,VELY\r
+SOUND: LDAA    I,RPMTBL/400            ;GET MULTIPLIER\r
+       STAA    D,TEMP\r
+       LDAA    D,GEAR\r
+       LSRA\r
+       LSRA\r
+       LSRA\r
+       LSRA\r
+       LSRA\r
+       STAA    D,TEMP+1\r
+       LDX     D,TEMP\r
+       LDAA    X,RPMTBL&377            ;C(A)=MULTIPLIER\r
+       LDAB    D,VELN\r
+       LSRB\r
+       LSRB\r
+       LSRB\r
+       STAB    D,TEMP\r
+       CLRB\r
+LOOP:  ADDB    D,TEMP                  ;MULTIPLY VEL/8 BY MULTIPLIER\r
+       DECA\r
+       BNE     LOOP\r
+       ASRB                            ;DIVIDE BY 4\r
+       ASRB\r
+       CMPB    I,017                   ;OVERFLOW?\r
+       BLS     RP1\r
+       LDAB    I,017                   ;SOUND TO MAX\r
+RP1:   STAB    E,MOTSND\r
+ACCEL: LDAA    D,FRMCNT                ;ONLY DO EVERY FOURTH FRAME\r
+       ANDA    I,03\r
+       BNE     SCORE\r
+       LDAA    I,140                   ;DETERMINE WHICH GEAR, THEN GO TO "GAS"\r
+       LDAB    E,GEAR32\r
+       BPL     SHIFT1\r
+       LDAA    I,100\r
+       BRA     GAS\r
+SHIFT1:        RORB\r
+       BCC     SHIFT2\r
+       LDAA    I,40\r
+       BRA     GAS\r
+SHIFT2:        TST     E,GEAR1\r
+       BPL     GAS\r
+       LDAA    I,00\r
+GAS:   STAA    D,GEAR\r
+       LDAB    D,VELN\r
+       CMPB    I,066                   ;IF IN CONTACT WITH AN OBJECT\r
+       BLS     G2                      ;MAX VELOCITY IS 066\r
+       TST     E,CRSHSV\r
+       BPL     G2\r
+       LDAA    I,377                   ;START DECELERATION\r
+       BRA     G3\r
+G2:    LSRB\r
+       LSRB\r
+       LSRB\r
+       ABA                             ;A=0GGV VVVV\r
+       STAA    D,TEMP+1\r
+       LDAA    I,ACCTBL/400\r
+       STAA    D,TEMP\r
+       LDX     D,TEMP\r
+       LDAA    X,ACCTBL&377            ;C(A)=ACCELERATION-DECELERATION\r
+       LDAB    E,GASIN\r
+       ASRB                    ;C=GAS IN\r
+       BCC     G1\r
+       ASLA                            ;SIGN EXTEND FROM BIT 3\r
+       ASLA\r
+       ASLA\r
+       ASLA\r
+G1:    ASRA\r
+       ASRA\r
+       ASRA\r
+       ASRA\r
+G3:    ADDA    D,VEL\r
+       STAA    D,VEL\r
+       LDAB    D,TKFG+1\r
+       BITB    I,010\r
+       BNE     S2\r
+       CMPA    I,010\r
+       BLS     S2\r
+       ADDA    I,030\r
+S2:    STAA    D,VELN\r
+SCORE: LDAA    D,HCRPOS\r
+       LDAB    D,VCRPOS\r
+       ANDB    I,360\r
+       LSRA\r
+       LSRA\r
+       LSRA\r
+       LSRA\r
+       ABA                             ;CELL THAT THE CAR IS IN\r
+       STAA    D,TEMP+1\r
+       LDAA    D,MAPN\r
+       STAA    D,TEMP\r
+       LDX     D,TEMP\r
+       LDAA    X,MAP&377\r
+       ROLA\r
+       ROLA\r
+       ROLA\r
+       ANDA    I,03                    ;C(A)=CHECKPOINT CODE\r
+       LDAB    D,SCRCNT\r
+       CBA\r
+       BNE     TIME\r
+       INCB\r
+       ANDB    I,03\r
+       STAB    D,SCRCNT\r
+       LDAA    D,SCOREA\r
+       INCA                            ;INCREMENT SCORE BY 25\r
+       DAA\r
+       STAA    D,SCOREA\r
+TIME:  DEC     E,FUELTM\r
+       BNE     CRSPIC                  ;READY TO DECREMENT FUEL?\r
+       LDAA    D,FUEL\r
+       BNE     TM1\r
+       LDAB    D,MODE\r
+       BNE     TM2\r
+       LDAB    D,XTDSCR\r
+       BEQ     TM2\r
+       CMPB    D,SCOREA                ;COMPARE SCORE TO EXT. PLAY REQUIREMENT\r
+       BHI     TM2\r
+       ADDA    I,100                   ;SET FUEL TO 40\r
+       STAA    D,FUEL\r
+       LDAB    I,01                    ;SET MODE TO INDICATE EXTENDED PLAY\r
+       STAB    D,MODE\r
+       LDAB    I,137\r
+       STAB    D,TNETME\r
+       LDAB    D,TKFG+1\r
+       EORB    I,004\r
+       STAB    D,TKFG+1\r
+       LDX     D,TKFG\r
+       STAA    X,NOATRC\r
+       BRA     TM1\r
+TM2:   STAA    E,SKDRST\r
+       CLRA\r
+       STAA    D,TKFG+1\r
+       STAA    D,MOLXV\r
+       STAA    D,HPOS\r
+       STAA    D,HPOS+1\r
+       LDAA    I,14\r
+       STAA    D,ROTOUT\r
+       LDAA    D,SCOREA\r
+       CMPA    D,HISCR\r
+       BLS     1$\r
+       STAA    D,HISCR\r
+1$:    JSR     E,RERITE                ;REWRITE SCREEN\r
+       JMP     E,ATTRAC\r
+TM1:   ADDA    I,231                   ;ADD 10'S COMPLIMENT OF -1\r
+       DAA\r
+       STAA    D,FUEL\r
+       LDAA    E,TMEOPT                ;GET TIME OPTION\r
+       ANDA    I,03\r
+       STAA    D,TEMP+1\r
+       LDAA    I,TMETBL/400\r
+       STAA    D,TEMP\r
+       LDX     D,TEMP\r
+       LDAA    X,TMETBL&377\r
+       STAA    D,FUELTM\r
+CRSPIC:        LDAA    D,CRSCNT                ;NO CRASH MESSAGE IF 0\r
+       BEQ     BLINK\r
+       LDAB    I,200                   ;SET MOLECULE CROSSING\r
+       STAB    D,MOLXH\r
+       LSRA\r
+       LSRA\r
+       ANDA    I,03\r
+       BEQ     CR2\r
+       DECA\r
+       STAA    D,CRSLIN\r
+       ADDA    D,HPOS                  ;MOVE HPNT TO CENTER OF SCREEN\r
+       ADDA    I,012\r
+       STAA    D,HPNT\r
+       TAB\r
+       ANDA    I,017\r
+       STAA    D,HPFAC\r
+       LDAA    D,VPOS\r
+       STAA    D,VPNT\r
+       CLR     E,CELLX\r
+       JSR     E,RCLLOC                ;GET LINE\r
+       JSR     E,NXTCLH\r
+       LDAA    D,CRSCNT                ;IF FINAL TINE,SKIP MESSAGE\r
+       CMPA    I,357\r
+       BHI     CR2\r
+       LDAA    I,007                   ;FILL COUNTER\r
+       STAA    D,SAVE\r
+       CLR     E,TEMP\r
+       LDAB    D,HPOS+1                ;RANDOM NUMBER\r
+       ANDB    I,03\r
+       LDAA    D,VPNT                  ;FIND CENTER OF SCREEN\r
+       ADDA    I,04\r
+       ABA\r
+       ANDA    I,017\r
+       STAA    D,TEMP+1\r
+       LDX     D,TEMP\r
+       LDAB    D,CRSLIN                ;GET LINE\r
+       EORB    I,03                    ;**\r
+       DECB\r
+       STAB    D,SAVE+1\r
+       ASLB                            ;MULTIPLY BY 8\r
+       ASLB\r
+       ASLB\r
+       SUBB    D,SAVE+1                ;SUBTRACT 1\r
+       ADDB    I,232                   ;C(B)=353+7(LINE)\r
+2$:    STAB    X,HOUT\r
+       DEC     E,SAVE\r
+       BEQ     CR2\r
+       INCA\r
+       ANDA    I,017\r
+       STAA    D,TEMP+1\r
+       LDX     D,TEMP\r
+       INCB\r
+       BRA     2$\r
+CR2:   JMP     E,READY\r
+BLINK: LDAA    D,FRMCNT\r
+       ANDA    I,007\r
+       CMPA    I,005                   ;ON 6, OFF 2\r
+       BLS     VUPDTE\r
+       STAA    E,ARROFF\r
+VUPDTE:        CLR     E,MOLXV\r
+       LDAA    D,VPOS+1\r
+       LDAB    D,VELY\r
+       ASLB\r
+       ADDB    D,VELY\r
+       BEQ     JMP2                    ;IF NO VERT. MOTION, SKIP VERTICAL ROUTINES\r
+       BPL     U1\r
+       NEGB\r
+       SBA\r
+       STAA    D,VPOS+1\r
+       BCC     VERT\r
+       DEC     E,VPOS\r
+       DEC     E,VCRPOS\r
+       LDAA    I,200\r
+       STAA    D,MOLXV\r
+       BRA     VERT\r
+U1:    ABA\r
+       STAA    D,VPOS+1\r
+       BCC     VERT\r
+       INC     E,VPOS\r
+       INC     E,VCRPOS\r
+       LDAA    I,201\r
+       STAA    D,MOLXV\r
+VERT:  LDAA    D,VPOS          ;FIGURE PVP\r
+       ASLA\r
+       ASLA\r
+       ASLA\r
+       ASLA\r
+       LDAB    D,VPOS+1\r
+       LSRB\r
+       LSRB\r
+       LSRB\r
+       LSRB\r
+       ABA\r
+       STAA    D,PVPOUT\r
+       ANDA    I,360\r
+       LDAB    D,MOLXV\r
+       BMI     V5\r
+JMP2:  JMP     E,HUPDTE\r
+V5:    RORB\r
+       BCC     V2\r
+       SUBA    I,020\r
+V2:    STAA    D,VPFAC\r
+       LDAA    D,VPOS\r
+       LDAB    D,MOLXV\r
+       RORB\r
+       BCC     V1\r
+       ADDA    I,017\r
+V1:    STAA    D,VPNT\r
+       LDAB    D,HPOS\r
+       STAB    D,HPNT\r
+       CLR     E,CELLX\r
+       JSR     E,RCLLOC\r
+NXTCLV:        JSR     E,RCELID\r
+CONTV: LDAB    D,CELLID\r
+       BITB    I,040\r
+       BEQ     R1B\r
+       SEC\r
+R1B:   BITB    I,020\r
+       BEQ     ROT0B\r
+       LDAB    D,HPOSM\r
+       LDAA    D,VPOSM\r
+       BCC     R6B\r
+       COMA\r
+       BRA     R4B\r
+ROT0B: LDAA    D,HPOSM\r
+       LDAB    D,VPOSM\r
+       BCC     R4B\r
+       COMA\r
+R6B:   COMB\r
+R4B:   ASLB\r
+       ASLB\r
+       ASLB\r
+       ASLB\r
+       ANDA    I,017\r
+       ABA\r
+       STAA    D,MPOS\r
+       LSRA\r
+       LSRA\r
+       ADDA    D,CLIDLO\r
+       STAA    D,MOLPNT+1\r
+       JSR     E,SPEC\r
+       TSTA\r
+       BNE     V4\r
+       LDX     D,MOLPNT\r
+       LDAA    X,0\r
+       LDAB    D,MPOS          ;DETERMINE WHICH TWO BITS\r
+       ANDB    I,03\r
+       CMPB    I,02\r
+       BHI     X3B\r
+       BEQ     X2B\r
+       CMPB    I,01\r
+       BEQ     X1B\r
+       LSRA\r
+       LSRA\r
+X1B:   LSRA\r
+       LSRA\r
+X2B:   LSRA\r
+       LSRA\r
+X3B:   ANDA    I,03\r
+       STAA    D,TEMP+1\r
+       LDAA    I,XPDTBL/400\r
+       STAA    D,TEMP\r
+       LDX     D,TEMP\r
+       LDAA    X,XPDTBL&377\r
+V4:    LDX     D,HPOSM-1\r
+       STAA    X,VOUT\r
+       LDAB    D,HPOSM\r
+       INCB\r
+       ANDB    I,017\r
+       STAB    D,HPOSM\r
+       LDAA    D,HPOS\r
+       ANDA    I,017\r
+       CBA\r
+       BEQ     HUPDTE\r
+       TSTB\r
+       BNE     CONTV\r
+       INC     E,CELLOC\r
+       LDAA    D,CELLOC\r
+       ANDA    I,017\r
+       BNE     V6\r
+       LDAA    D,CELLOC\r
+       SUBA    I,020\r
+       STAA    D,CELLOC\r
+V6:    JMP     E,NXTCLV\r
+HUPDTE:        CLR     E,MOLXH\r
+       LDAA    D,HPOS+1\r
+       LDAB    D,VELX\r
+       ASLB\r
+       ADDB    D,VELX\r
+       BEQ     JMP1            ;IF VELX=0, NO HORIZ COMPUTATION NECESSARY\r
+       BPL     U3\r
+       NEGB\r
+       SBA\r
+       STAA    D,HPOS+1\r
+       BCC     HORIZ\r
+       DEC     E,HPOS\r
+       DEC     E,HCRPOS\r
+       LDAA    I,200\r
+       STAA    D,MOLXH\r
+       BRA     HORIZ\r
+U3:    ABA\r
+       STAA    D,HPOS+1\r
+       BCC     HORIZ\r
+       INC     E,HPOS\r
+       INC     E,HCRPOS\r
+       LDAA    I,201\r
+       STAA    D,MOLXH\r
+HORIZ: LDAA    D,HPOS\r
+       ASLA\r
+       ASLA\r
+       ASLA\r
+       ASLA\r
+       LDAB    D,HPOS+1\r
+       LSRB\r
+       LSRB\r
+       LSRB\r
+       LSRB\r
+       ABA\r
+       SUBA    I,04\r
+       STAA    D,PHPOUT\r
+       LDAA    D,HPOS\r
+       LDAB    D,MOLXH\r
+       BMI     H5\r
+JMP1:  JMP     E,READY\r
+H5:    RORB\r
+       BCC     H1\r
+       ADDA    I,017\r
+H1:    STAA    D,HPNT\r
+       TAB\r
+       ANDA    I,017\r
+       STAA    D,HPFAC\r
+       LDAA    D,VPOS\r
+       STAA    D,VPNT\r
+       CLR     E,CELLX\r
+       JSR     E,RCLLOC\r
+       JSR     E,NXTCLH\r
+READY: LDAA    D,MODE\r
+       CMPA    I,01\r
+       BLS     1$\r
+       JMP     PWRON\r
+1$:    STAA    E,WTCHDG                ;RESET WATCHDOG\r
+       WAI\r
+       JMP     E,GO\r
+NXTCLH:        JSR     E,RCELID\r
+CONTH: LDAB    D,CELLID\r
+       BITB    I,040\r
+       BEQ     R1A\r
+       SEC\r
+R1A:   BITB    I,020\r
+       BEQ     ROT0A\r
+       LDAB    D,HPOSM\r
+       LDAA    D,VPOSM\r
+       BCC     R6A\r
+       COMA\r
+       BRA     R4A\r
+ROT0A: LDAA    D,HPOSM\r
+       LDAB    D,VPOSM\r
+       BCC     R4A\r
+       COMA\r
+R6A:   COMB\r
+R4A:   ASLB\r
+       ASLB\r
+       ASLB\r
+       ASLB\r
+       ANDA    I,017\r
+       ABA\r
+       STAA    D,MPOS\r
+       LSRA\r
+       LSRA\r
+       ADDA    D,CLIDLO\r
+       STAA    D,MOLPNT+1\r
+       JSR     E,SPEC\r
+       TSTA\r
+       BNE     H4\r
+       LDX     D,MOLPNT\r
+       LDAA    X,0\r
+       LDAB    D,MPOS          ;DETERMINE WHICH TWO BITS\r
+       ANDB    I,03\r
+       CMPB    I,02\r
+       BHI     X3A\r
+       BEQ     X2A\r
+       CMPB    I,01\r
+       BEQ     X1A\r
+       LSRA\r
+       LSRA\r
+X1A:   LSRA\r
+       LSRA\r
+X2A:   LSRA\r
+       LSRA\r
+X3A:   ANDA    I,03\r
+       STAA    D,TEMP+1\r
+       LDAA    I,XPDTBL/400\r
+       STAA    D,TEMP\r
+       LDX     D,TEMP\r
+       LDAA    X,XPDTBL&377\r
+H4:    LDX     D,VPOSM-1\r
+       STAA    X,HOUT\r
+       LDAB    D,VPOSM\r
+       INCB\r
+       ANDB    I,017\r
+       STAB    D,VPOSM\r
+       LDAA    D,VPOS\r
+       ANDA    I,017\r
+       CBA\r
+       BEQ     H6              ;ALL 16 COMPUTED. . . FINISHED\r
+       TSTB\r
+       BNE     CONTH\r
+       LDAA    D,CELLOC\r
+       ADDA    I,020\r
+       STAA    D,CELLOC\r
+       JMP     E,NXTCLH\r
+H6:    RTS\r
+CNVRT: CLRB\r
+       STAA    D,TEMP\r
+       ASLA                    ;MULTIPLY BY 3\r
+       ADCB    I,0\r
+       ADDA    D,TEMP\r
+       ADCB    I,0\r
+       ASRB                    ;DIVIDE BY 32\r
+       RORA\r
+       ASRB\r
+       RORA\r
+       LSRA\r
+       LSRA\r
+       LSRA\r
+       RTS\r
+SINMUL:        STAB    D,TEMP          ;MULTIPLICAND TO B\r
+       CLRB                    ;CLEAR PRODUCT\r
+       STAB    D,TEMP+1        ;CLEAR FLAG\r
+SIN3:  TSTA                    ;TEST MULTIPLIER\r
+       BPL     SIN1\r
+       ADDB    D,TEMP\r
+       BCC     SIN1\r
+       INC     E,TEMP+1        ;IF CARRY, SET FLAG\r
+SIN1:  ASLA\r
+       BEQ     SIN2\r
+       LSR     E,TEMP\r
+       BRA     SIN3\r
+SIN2:  TST     E,TEMP+1\r
+       BEQ     SIN4\r
+       SEC\r
+SIN4:  RORB                    ;DIVIDE BY 16\r
+       LSRB\r
+       LSRB\r
+       LSRB\r
+       RTS\r
+RCLLOC:        ANDA    I,360           ;C(A)=VPNT\r
+       LSRB                    ;C(B)=HPNT\r
+       LSRB\r
+       LSRB\r
+       LSRB\r
+       ABA                     ;LOCATION OF POINTER IN\r
+       STAA    D,CELLOC        ;MAP, CELL ADDRESS\r
+       LDAA    D,HPNT\r
+       ANDA    I,017\r
+       STAA    D,HPOSM\r
+       LDAB    D,VPNT\r
+       ANDB    I,017\r
+       STAB    D,VPOSM\r
+       RTS\r
+RCELID:        LDAA    D,CELLOC        ;GET ID OF CELL\r
+       STAA    D,TEMP+1        ;BEING POINTED TO\r
+       LDAB    D,MAPN          \r
+       STAB    D,TEMP          \r
+       LDX     D,TEMP\r
+       LDAA    X,0\r
+       STAA    D,CELLID\r
+RCLIDM:        CLRB\r
+       RORA                    ;SAVE TWO LSB FOR LATER\r
+       RORB\r
+       RORA\r
+       RORB\r
+       STAB    D,CLIDLO\r
+       TAB\r
+       ANDB    I,03            ;BUILD POINTER FOR CELL TABLE MSB\r
+       ADDB    I,CELTBL/400\r
+       STAB    D,MOLPNT\r
+       LSRA\r
+       LSRA\r
+       ANDA    I,03            ;GET CELL ROTATION\r
+       STAA    D,CELROT        \r
+       DEC     E,CELLX         ;SET CELL CROSSING POINTER\r
+       CLC                             ;CLEAR C FOR ROTATION ROUTINE\r
+       RTS\r
+SPEC:  LDAA    D,CELLX\r
+       BEQ     SPGO\r
+       LDAA    D,SPECN         ;SET UP X TO GET SPCTBL+CELLOC\r
+       STAA    D,TEMP\r
+       LDAA    D,CELLOC\r
+       STAA    D,TEMP+1\r
+       LDX     D,TEMP\r
+       LDAA    X,0                     ;C(A)=LLCC 0000\r
+       STAA    D,SPECCD                ;SAVE CODE\r
+       BEQ     SPEND\r
+       LDAB    I,LOCTBL/400            ;GET LOCATION\r
+       STAB    D,TEMP\r
+       LDAB    D,CELLID\r
+       ANDB    I,017\r
+       SUBB    I,04                    ;NO SPECIALS IN CELLS 0,1,2, OR 3\r
+       BMI     SPEND\r
+       ASLB\r
+       ASLB                            ;C(B)=4(CELL-4)\r
+       ROLA\r
+       ROLA\r
+       ROLA\r
+       ANDA    I,03\r
+       ABA\r
+       STAA    D,TEMP+1\r
+       LDX     D,TEMP\r
+       LDAB    X,LOCTBL&377            ;C(B)=SPECIAL LOCATION\r
+       STAB    D,SPCLOC\r
+       LDAA    I,SPCXPD/400\r
+       STAA    D,TEMP\r
+       LDAA    D,SPECCD\r
+       ANDA    I,017           ;C(A)=OBJECT CODE\r
+\r
+       STAA    D,TEMP+1\r
+       LDX     D,TEMP\r
+       LDAA    D,SPECCD\r
+       ASLA\r
+       ASLA\r
+       ANDA    I,300                   ;C(A)=COLOR CODE\r
+       ADDA    X,SPCXPD&377            ;C(A)=SPECIAL OBJECT\r
+       STAA    D,SPCOBJ\r
+SPGO:  LDAA    D,SPECCD                ;C(SAVE)=CODE FROM SPECIAL TABLE\r
+       BEQ     SPEND\r
+       LDAB    D,SPCLOC\r
+       ANDA    I,017\r
+       CMPA    I,003                   ;TEST FOR BIG OBJECTS\r
+       BLS     BIGOBJ\r
+       LDAA    D,SPCOBJ\r
+       CMPB    D,MPOS\r
+       BEQ     SPDONE\r
+       BRA     SPEND\r
+BIGOBJ:        LDAA    D,CELROT                ;ISOLATE ROTATION\r
+       ADDA    D,SPCOBJ                ;ADD IN OBJECT CODE\r
+       CMPB    D,MPOS\r
+       BEQ     SPDONE\r
+       DECB\r
+       INCA\r
+       BITA    I,03\r
+       BNE     SP1\r
+       SUBA    I,04\r
+SP1:   CMPB    D,MPOS\r
+       BEQ     SPDONE\r
+       SUBB    I,020\r
+       INCA\r
+       BITA    I,03\r
+       BNE     SP2\r
+       SUBA    I,04\r
+SP2:   CMPB    D,MPOS\r
+       BEQ     SPDONE\r
+       INCB\r
+       INCA\r
+       BITA    I,03\r
+       BNE     SP3\r
+       SUBA    I,04\r
+SP3:   CMPB    D,MPOS\r
+       BEQ     SPDONE\r
+SPEND: CLRA\r
+SPDONE:        CLR     E,CELLX\r
+       RTS\r
+RANNUM:        LDAB    I,04\r
+       LDAA    D,RANDOM+1\r
+RN1:   RORA\r
+       RORA\r
+       RORA\r
+       EORA    D,RANDOM\r
+       ROLA\r
+       ROR     E,RANDOM\r
+       LDAA    D,RANDOM+1\r
+       RORA\r
+       STAA    D,RANDOM+1\r
+       DECB\r
+       BNE     RN1\r
+       TSTA                            ;CHECK FOR ILLEGAL NUMBER\r
+       BNE     RN2\r
+       TST     E,RANDOM\r
+       BNE     RN2\r
+       COM     E,RANDOM\r
+RN2:   RTS\r
+       .SBTTL  VARIABLE INITIALIZATION\r
+INIT:  LDAA    I,MAP/400               ;MAP 1\r
+       LDAB    I,SPCTBL/400\r
+       TST     E,TKFG+1\r
+       BEQ     .+4\r
+       INCA\r
+       INCB\r
+       STAA    D,MAPN                  ;STORE MAP CHOSEN\r
+       STAB    D,SPECN\r
+       LDAB    I,STRTBL/400\r
+       STAB    D,TEMP\r
+       LDAB    D,RANDOM                ;GET A RANDOM NUMBER\r
+       ANDB    I,007\r
+       ORAB    D,TKFG+1\r
+       STAB    D,TEMP+1\r
+       LDX     D,TEMP\r
+       LDAB    X,STRTBL&377\r
+       TBA\r
+       ANDB    I,360\r
+       STAB    D,VPOS\r
+       ADDB    I,010\r
+       STAB    D,VCRPOS\r
+       ASLA\r
+       ASLA\r
+       ASLA\r
+       ASLA\r
+       STAA    D,HPOS\r
+       ADDA    I,010\r
+       STAA    D,HCRPOS\r
+       LDAA    I,220\r
+       STAA    D,FUEL\r
+       LDAA    I,010\r
+       STAA    D,PVPOUT\r
+       LDAA    I,200\r
+       STAA    D,VPOS+1\r
+       CLRA\r
+       STAA    D,VEL\r
+       STAA    D,CRSCNT\r
+       STAA    D,SCOREA\r
+       STAA    D,SCRCNT\r
+       STAA    D,MOLXH\r
+       STAA    D,MOLXV\r
+       STAA    D,VELN\r
+       STAA    D,HPOS+1\r
+       STAA    D,HPOSM-1\r
+       STAA    D,VPOSM-1\r
+       STAA    E,CRSHRS\r
+       STAA    E,SKDRST\r
+       STAA    E,MOTSND\r
+       STAA    E,STRRST\r
+       SUBA    I,04\r
+       STAA    D,PHPOUT\r
+       STAA    E,CSHSND\r
+OPTN:  LDAA    E,COINOP                ;READ COIN. OPTION SWITCH\r
+       ANDA    I,03                    ;COST IS THE SAME AS SWITCH UNLESS EQUAL TO 3\r
+       CMPA    I,03\r
+       BNE     CN70\r
+       INCA\r
+CN70:  STAA    D,COST\r
+       LDAA    E,TMEOPT\r
+       ANDA    I,03\r
+       STAA    D,TEMP+1\r
+       LDAA    I,TMETBL/400\r
+       STAA    D,TEMP\r
+       LDX     D,TEMP\r
+       LDAA    X,TMETBL&377\r
+       STAA    D,FUELTM\r
+       LDAA    E,XPOPT                 ;READ EXTENDED PLAY OPTION SWITCH\r
+       ANDA    I,03\r
+       ASLA\r
+       ASLA                            ;C(A)=4(XPOPT)\r
+       LDAB    E,TMEOPT                ;READ TIME OPTION SWITCH\r
+       ANDB    I,03\r
+       ABA                             ;C(A)=4(XPOPT)+TMEOPT\r
+       STAA    D,TEMP+1\r
+       LDAA    I,XPLTBL/400\r
+       STAA    D,TEMP\r
+       LDX     D,TEMP\r
+       LDAA    X,XPLTBL&377\r
+       STAA    D,XTDSCR\r
+       RTS\r
+       .SBTTL  WRITE SCREEN\r
+SETUP: LDAA    I,100\r
+       STAA    D,ROTREG\r
+       STAA    D,DIREC\r
+       LDAA    I,06\r
+       STAA    D,ROTPIC\r
+       LDAA    I,14\r
+       STAA    D,ROTOUT\r
+       RTS\r
+RERITE:        LDAB    I,017                   ;START LINE COUNT\r
+1$:    STAB    D,HPOSM\r
+       STAB    D,HPFAC\r
+       CLRA\r
+       STAA    D,ZERO\r
+       STAA    D,SPECN\r
+       STAA    D,CELLX\r
+       STAA    D,VPOS\r
+       STAA    D,VPOSM\r
+       LDAA    I,374\r
+       STAA    D,PHPOUT\r
+       LDAA    I,ZERO\r
+       STAA    D,CELLOC\r
+       LDAA    I,201\r
+       STAA    D,MOLXH\r
+       LDAA    I,24\r
+       STAA    D,CELLID\r
+       PSHB\r
+       JSR     E,RCLIDM                ;BUILD LINE\r
+       JSR     E,CONTH\r
+       PULB\r
+       STAA    E,WTCHDG\r
+       WAI\r
+       DECB\r
+       BPL     1$\r
+       RTS\r
+IRQ:   LDAA    D,MODE                  ;VERIFY ATTRACT\r
+       CMPA    I,02\r
+       BEQ     8$\r
+9$:    RTI\r
+8$:    LDX     D,PRTCD                 ;VERIFICATION\r
+       CPX     I,PROT\r
+       BEQ     10$\r
+       JMP     PWRON\r
+10$:   ROR     E,SLAMSW                ;LOOK FOR SLAM (B0=1)\r
+       BCS     9$\r
+       LDAB    D,COINCT\r
+       ANDB    I,017                   ;PROTECT AGAINST A BLITZ\r
+       TST     E,COIN1                 ;CHECK COIN AND CLEAR CARRY\r
+       BMI     1$\r
+       SEC\r
+1$:    LDAA    D,CN1DB                 ;ROTATE REGISTER\r
+       RORA\r
+       STAA    D,CN1DB\r
+       CMPA    I,377                   ;NO COIN FOR 16 MS.\r
+       BNE     2$\r
+       STAA    D,CN1RDY                ;SET READY FLAG\r
+2$:    CMPA    I,CNMASK                ;CHECK FOR COIN MATCH\r
+       BNE     3$\r
+       LDAA    D,CN1RDY                ;CHECK FOR READY FLAG\r
+       BPL     3$\r
+       ADDB    I,002                   ;GIVE CREDIT\r
+       CLR     E,CN1RDY                ;CLEAR READY\r
+3$:    TST     E,COIN2\r
+       BMI     4$\r
+       SEC\r
+4$:    LDAA    D,CN2DB\r
+       RORA\r
+       STAA    D,CN2DB\r
+       CMPA    I,377\r
+       BNE     5$\r
+       STAA    CN2RDY\r
+5$:    CMPA    I,CNMASK\r
+       BNE     6$\r
+       LDAA    D,CN2RDY\r
+       BPL     6$\r
+       ADDB    I,002\r
+       CLR     E,CN2RDY\r
+6$:    LDAA    E,COIN1                 ;NO START CHECK IF EITHER COIN PRESENT\r
+       ORAA    E,COIN2\r
+       BMI     CN1\r
+       LDX     D,TKFG\r
+       STAA    X,LTOFF                 ;START LIGHT OFF\r
+       CMPB    D,COST                  ;SUFFICIENT CREDIT?\r
+       BMI     CN1\r
+       TST     E,TKSEL                 ;TRACK CHANGE?\r
+       BMI     .+3\r
+       SEC\r
+       LDAA    D,TKSLDB\r
+       RORA\r
+       STAA    D,TKSLDB\r
+       CMPA    I,CNMASK\r
+       BNE     .+10\r
+       LDAA    I,010                   ;TOGGLE TRACK FLAG\r
+       EORA    D,TKFG+1\r
+       STAA    D,TKFG+1\r
+       LDAA    E,SCRRST\r
+       RORA\r
+       BCC     7$\r
+       CLR     E,HISCR\r
+7$:    LDAA    I,020                   ;BLINK START LITE\r
+       BITA    D,FRMCNT\r
+       BEQ     .+4\r
+       STAA    X,SRTLMP\r
+       LDAA    E,STRTSW                ;TEST START SWITCH\r
+       BPL     CN1                     ;EXIT IRQ IF OPEN\r
+       SUBB    D,COST\r
+       BPL     .+5\r
+       JMP     E,PWRON                 ;PROTECTION\r
+       STAA    X,SRTLMP                ;TURN ON START LAMP\r
+       TSX                             ;SET PSW & ALTER RETURN ADDRESS\r
+       LDAA    I,320\r
+       STAA    X,00    \r
+       LDAA    I,GAME/400\r
+       STAA    X,05\r
+       LDAA    I,GAME & 377\r
+       STAA    X,06\r
+CN1:   STAB    D,COINCT\r
+       RTI\r
+NMI:   LDX     D,PRTCD                 ;CHECK VERIFICATION\r
+       CPX     I,PROT\r
+       BNE     2$\r
+       STS     D,SAVE\r
+       LDAB    D,MODE\r
+       CMPB    I,002\r
+       BEQ     N7\r
+       BLS     GMEOUT\r
+2$:    ROR     E,TSTSW\r
+       BCS     1$\r
+       JMP     PWRON\r
+1$:    TSX                             ;RESTORE X\r
+       LDX     X,3\r
+       STAA    X,0                     ;TEST MODE\r
+       CLR     E,PVP\r
+       CLR     E,PHP\r
+       STAA    E,WTCHDG                ;WHEN TESTING, RESET WATCHDOG NO MATTER WHAT\r
+N5:    RTI\r
+GMEOUT:        LDAA    D,MOLXV                 ;ANY MOLECULE CROSSING?\r
+       BPL     N7                      ;NO? GO ON\r
+       LDAA    I,PLFDRM/400            ;BUILD ADDRESS\r
+       STAA    D,NTEMP\r
+       LDAB    I,020\r
+       LDAA    D,VPFAC\r
+       STAA    D,NTEMP+1\r
+       LDS     I,VOUT-1\r
+       LDX     D,NTEMP                 ;C(X)=(PLFD)+(PFP&F0)\r
+N2:    PULA\r
+       STAA    X,0\r
+       INX\r
+       DECB\r
+       BNE     N2\r
+N7:    LDAA    D,MOLXH                 ;ANY MOLECULE CROSSING\r
+       BPL     MESS                    ;NO? GO ON\r
+       LDAA    I,PLFDRM/400            ;BUILD ADDRESS\r
+       STAA    D,NTEMP\r
+       LDAB    D,HPFAC\r
+       STAB    D,NTEMP+1\r
+       LDS     I,HOUT-1\r
+N1:    LDX     D,NTEMP                 ;C(X)=(PFLD)+(PHP/10)\r
+       PULA\r
+       STAA    X,0\r
+       ADDB    I,020\r
+       STAB    D,NTEMP+1\r
+       BCC     N1\r
+       LDAA    D,MOLXH                 ;TEST. IF BOTH BOUNDARIES CROSSED,\r
+       ANDA    D,MOLXV                 ;SAVE TIME & SKIP OTHER MESSAGE\r
+       BMI     N3\r
+MESS:  LDAA    D,FRMCNT                ;4 POSSIBLE ROUTINES\r
+       ANDA    I,01\r
+       BNE     RTN4\r
+       JMP     E,RTN5\r
+OUTPUT:        STX     D,ADDSAV                ;SAVE RETURN ADDRESS\r
+       LDAA    E,MESOPT                ;MESS=MES0+15(B+13(OPT))+14\r
+       ANDA    I,03\r
+       BEQ     1$\r
+2$:    ADDB    I,015                   ;ADD 13(OPT)\r
+       DECA\r
+       BGT     2$\r
+1$:    STAB    D,NTEMP\r
+       ASLB                            ;MULT BY 15 (INTO A)\r
+       ROLA\r
+       ASLB\r
+       ROLA\r
+       ASLB\r
+       ROLA\r
+       ASLB\r
+       ROLA\r
+       SUBB    D,NTEMP\r
+       SBCA    I,00\r
+       ADDB    I,016\r
+       STAB    D,NTEMP+1\r
+       ADCA    I,MES0/400\r
+       STAA    D,NTEMP\r
+       LDX     D,NTEMP\r
+       LDAA    I,016\r
+TRANS: LDAB    X,MES0&377\r
+       PSHB\r
+       DEX\r
+       DECA\r
+       BPL     TRANS\r
+2$:    LDX     D,ADDSAV                ;GET RETURN ADDRESS\r
+       JMP     X,0\r
+N3:    LDS     D,SAVE\r
+       LDAA    D,PHPOUT\r
+       STAA    E,PHP\r
+       LDAA    D,PVPOUT\r
+       STAA    E,PVP\r
+       LDAA    D,ROTOUT\r
+       STAA    E,CARROT\r
+       TSX                             ;IN ATTRACT, ALTER RETURN ADDRESS TO TOP OF ATTRACT\r
+       LDX     X,05                    ;CHECK FOR CORRECT ENTRY\r
+       CPX     I,AT3\r
+       BNE     T2\r
+       TSX\r
+       LDAA    I,ATTRAC+3/400\r
+       STAA    X,05\r
+       LDAA    I,ATTRAC+3&377\r
+       STAA    X,06\r
+T2:    INC     E,FRMCNT\r
+       BNE     I7\r
+       INC     E,FRMCNT+1\r
+I7:    RTI\r
+RTN4:  LDAA    D,MODE\r
+       BITA    I,02\r
+       BEQ     1$\r
+       LDAA    D,FRMCNT\r
+       BMI     2$\r
+       LDAB    D,COST\r
+       ADDB    I,007\r
+       LDS     I,LOC0+16\r
+       LDX     I,N3\r
+       JMP     OUTPUT\r
+2$:    LDAB    I,00\r
+       LDS     I,LOC0+16\r
+       LDAA    D,XTDSCR\r
+       BEQ     3$\r
+       LDAB    I,012\r
+       LDX     I,4$\r
+       JMP     OUTPUT\r
+4$:    LDAA D,XTDSCR\r
+       LSRA\r
+       LSRA\r
+       LSRA\r
+       LSRA\r
+       BEQ     6$                      ;BLANK IF ZERO\r
+       STAA    E,LOC0+13\r
+6$:    LDAA    D,XTDSCR\r
+       ANDA    I,017\r
+       STAA    E,LOC0+14\r
+       JMP     E,N3\r
+1$:    LDAB    I,005\r
+       LDS     I,LOC0+16\r
+       LDX     I,5$\r
+       JMP     OUTPUT\r
+5$:    LDAA    D,FUEL\r
+       ANDA    I,017\r
+       STAA    E,LOC0+014\r
+       LDAA    D,FUEL\r
+       LSRA\r
+       LSRA\r
+       LSRA\r
+       LSRA\r
+       STAA    E,LOC0+013\r
+       JMP     N3\r
+3$:    LDX     I,N3                    ;ADDRESS AFTER OUTPUT\r
+       JMP     OUTPUT\r
+RTN5:  LDS     I,LOC1+16\r
+       LDAB    I,006\r
+       LDAA    D,MODE                  ;NO RATING DURING GAME\r
+       BITA    I,02\r
+       BEQ     3$\r
+       LDAA    D,FRMCNT\r
+       ROLA                            ;SKIP ON B6 EOR B7=0\r
+       BVS     3$\r
+       LDAA    D,FRMCNT\r
+       BMI     1$\r
+       LDAB    I,014\r
+       LDX     I,4$\r
+       JMP     OUTPUT\r
+4$:    LDAA    D,HISCR\r
+       ANDA    I,017\r
+       STAA    E,LOC1+015\r
+       LDAA    D,HISCR\r
+       LSRA\r
+       LSRA\r
+       LSRA\r
+       LSRA\r
+       BEQ     5$                      ;BLANK IF ZERO\r
+       STAA    E,LOC1+014\r
+5$:    JMP     N3\r
+1$:    LDAB    I,001\r
+       LDAA    D,SCOREA\r
+       CMPA    E,RATTBL\r
+       BLS     2$\r
+       INCB\r
+       CMPA    E,RATTBL+1\r
+       BLS     2$\r
+       INCB\r
+       CMPA    E,RATTBL+2\r
+       BLS     2$\r
+       INCB\r
+2$:    LDX     I,N3\r
+       JMP     OUTPUT\r
+3$:    LDX     I,N9\r
+       JMP     OUTPUT\r
+N9:    LDAA    D,SCOREA\r
+       ANDA    I,017\r
+       STAA    E,LOC1+014\r
+       LDAA    D,SCOREA\r
+       LSRA\r
+       LSRA\r
+       LSRA\r
+       LSRA\r
+       BEQ     1$                      ;BLANK IF ZERO\r
+       STAA    E,LOC1+013\r
+1$:    JMP     N3\r
+TEST:  LDAA    I,03                    ;TEST MODE\r
+       STAA    D,MODE\r
+       LDAB    I,02                    ;ALPHANUMERIC TEST . . . COUNT UP TWICE\r
+       CLRA\r
+TS0:   LDX     I,ANADD\r
+TS1:   WAI                             ;LOAD RAM\r
+       INX\r
+       INCA\r
+       BNE     TS1\r
+       DECB                            ;DO IT AGAIN\r
+       BNE     TS0\r
+       LDAB    I,02                    ;NOW COUNT DOWN\r
+TS18:  DECA\r
+       LDX     I,ANADD\r
+TS2:   WAI\r
+       INX\r
+       DECA\r
+       BNE     TS2\r
+       DECB\r
+       BNE     TS18\r
+       CLRA                            ;RAM TEST\r
+       LDX     I,0000\r
+TS4:   WAI\r
+       CMPA    X,0                     ;SEE IF IT IS THERE\r
+       BEQ     TS3\r
+TS19:  LDAA    I,00                    ;IF RAM FAILS, WRITE "0" TO SCREEN\r
+       STAA    E,LOC0\r
+       BRA     TS5\r
+TS3:   INX\r
+       INCA\r
+       BPL     TS4\r
+       LDS     I,177                   ;PUT STACK IN BOTTOM & TEST TOP\r
+1$:    WAI\r
+       CMPA    X,0\r
+       BNE     TS19\r
+       INX\r
+       INCA\r
+       BNE     1$\r
+TS5:   LDAB    I,02                    ;PLAYFIELD TEST\r
+       CLRA                            ;COUNTING UP\r
+TS7:   LDX     I,PLFDRM\r
+TS6:   WAI\r
+       INX\r
+       INCA\r
+       BNE     TS6\r
+       DECB                            ;DO IT TWICE\r
+       BNE     TS7\r
+       LDAB    I,02                    ;NOW COUNT DOWN TWICE\r
+TS9:   LDX     I,PLFDRM\r
+TS8:   WAI\r
+       INX\r
+       DECA\r
+       BNE     TS8\r
+       DECB\r
+       BNE     TS9\r
+       LDX     I,ROM1                  ;ROM TEST\r
+       CLRA\r
+TS10:  ADDA    X,0                     ;COMPUTE SUM\r
+       INX\r
+       CPX     I,ROM2\r
+       BNE     TS10\r
+       ADDA    E,CHKSM\r
+       BEQ     TS11                    ;IF ZERO, GO ON\r
+       LDAA    I,001                   ;WRITE "1" IF ROM1 BAD\r
+       LDX     I,LOC0+1\r
+       WAI\r
+TS11:  CLRA\r
+       LDX     I,ROM2\r
+TS12:  ADDA    X,0\r
+       INX\r
+       CPX     I,ROM3\r
+       BNE     TS12\r
+       ADDA    E,CHKSM+1\r
+       BEQ     TS13\r
+       LDAA    I,002                   ;WRITE "2" IF ROM2 BAD\r
+       LDX     I,LOC0+2\r
+       WAI\r
+TS13:  CLRA\r
+       LDX     I,ROM3\r
+TS14:  ADDA    X,0\r
+       INX\r
+       CPX     I,ROM4\r
+       BNE     TS14\r
+       ADDA    E,CHKSM+2\r
+       BEQ     TS15\r
+       LDAA    I,003                   ;WRITE "3" IF ROM3 BAD\r
+       LDX     I,LOC0+3\r
+       WAI\r
+TS15:  LDX     I,0000                  ;DUMMY ADDRESS FOR NMI\r
+       STAA    E,001151                ;START LAMP ON,ATTRACT OFF\r
+       CLRA                            ;SWITCH TEST\r
+       STAA    E,SKDRST                ;TURN OFF SKID\r
+       LDAA    E,GEAR32                ;"OR" ALL SWITCHES\r
+       ORAA    E,GEAR1\r
+       ORAA    E,SLAMSW\r
+       ORAA    E,SCRRST\r
+       TAB                             ;ROTATE BIT 0\r
+       RORB\r
+       RORB\r
+       STAB    D,TEMP\r
+       ORAA    D,TEMP\r
+       ORAA    E,COIN1\r
+       ORAA    E,COIN2\r
+       ORAA    E,STRTSW\r
+       BPL     TS16\r
+       STAA    E,SKDSND                ;TURN ON SKID           \r
+TS16:  LDAA    I,010                   ;STEERING TEST\r
+       LDAB    E,STRFLG\r
+       STAB    E,STRRST                ;CLEAR FLAG\r
+       BMI     TS17                    ;NO STEER\r
+       LDAA    I,017\r
+       RORB\r
+       BCC     TS17\r
+       CLRA\r
+TS17:  STAA    E,MOTSND\r
+       WAI\r
+       BRA     TS15\r
+ROTTBL:        .BYTE   20,21,22,23,16,15,14,05,06,33,32,31,30\r
+       .BYTE   35,36,37,02,01,10,11,12,27,26,25\r
+DIRTBL:        .BYTE   000,364,350,273,216,117,000,117,216,273,350,364,000\r
+       .BYTE   364,350,273,216,117,000,117,216,273,350,364\r
+XPDTBL:        .BYTE   010,331,230,010\r
+ACCTBL:        .BYTE   007,367,366,345,323,302,261,240,220,237,237,237,236,236,236,235\r
+       .BYTE   235,235,234,234,234,233,233,233,232,232,232,231,231,231,231,231\r
+       .BYTE   001,301,261,261,301,322,324,326,326,326,305,263,241,220,220,220\r
+       .BYTE   237,237,237,237,237,236,236,236,236,236,235,235,235,235,234,234\r
+       .BYTE   001,241,221,221,221,221,221,221,221,241,261,301,322,323,324,325\r
+       .BYTE   325,325,303,261,240,220,220,237,237,237,237,237,236,236,236,236\r
+       .BYTE   001,221,221,221,221,221,221,221,221,221,221,221,221,221,221,221\r
+       .BYTE   241,261,301,302,303,303,303,303,303,303,303,303,303,303,303,300\r
+XPLTBL:        .BYTE   000,000,000,000,011,024,031,044,020,026,042,047,022,030,044,060\r
+TMETBL:        .BYTE   050,074,120,144\r
+RPMTBL:        .BYTE   011,004,003,002\r
+LOCTBL:        .BYTE   230,045,007,225,074,026,010,217,207,213,204,110,210,114,330,217\r
+       .BYTE   252,074,017,204,106,345,370,033,170,106,113,233,367,355,010,103\r
+       .BYTE   021,345,270,146,253,166,250,017,210,247,106,132,210,232,107,164\r
+SPCXPD:        .BYTE   000,020,024,004,000,000,000,000,012,013,014,015,016,017,010,011\r
+STRTBL:        .BYTE   127,201,243,325,342,037,370,127,252,300,052,227,252,214,314,300\r
+;\r
+;LETTER CROSS-REFERENCE\r
+;A-A   G-G     P-M     X-S\r
+;B-B   I-H     R-N     Y-T\r
+;C-C   J-I     S-O     Z-U\r
+;D-D   L-J     T-P      -V\r
+;E-E   M-K     U-Q     O-0\r
+;F-F   N-L     .-R\r
+;\r
+MES0:   .MSG   VVVVVVVVVVVVVVV         ;BLANK\r
+       .MSG    VVVVVO0NNTVVVVV         ;SORRY\r
+       .MSG    VVVVVO0VO0VVVVV         ;SO-SO\r
+       .MSG    VVVVVG00DVVVVVV         ;GOOD\r
+       .MSG    VVVVVVACEVVVVVV         ;ACE\r
+       .MSG    VVFQEJVVVVVVVVV         ;FUEL\r
+       .MSG    VVOC0NEVVVVVV0V         ;SCORE\r
+       .MSG    VVVFNEEVMJATVVV         ;FREE PLAY\r
+       .MSG    1VC0HLVV2VMJATO         ;1 COIN/2 PLAY\r
+       .MSG    V1VC0HLV1VMJATV         ;1 COIN/1 PLAY\r
+       .MSG    VB0LQOVF0NVVV0V         ;BONUS FOR\r
+       .MSG    2VC0HLOVV1VMJAT         ;2 COIN/PLAY\r
+       .MSG    VP0MVOC0NEVVVV0         ;TOP SCORE\r
+FRENCH:        .MSG    VVVVVVVVVVVVVVV         ;BLANK\r
+       .MSG    VVVVDEO0JEVVVVV         ;SORRY\r
+       .MSG    VVVMAOOABJEVVVV         ;SO-SO\r
+       .MSG    VVVVVBHELVVVVVV         ;GOOD\r
+       .MSG    VVVVVVAOVVVVVVV         ;ACE\r
+       .MSG    VVEOOELCEVVVVVV         ;FUEL\r
+       .MSG    VVOC0NEVVVVVV0V         ;SCORE\r
+       .MSG    MANPHEVGNAPQHPE         ;FREE PLAY\r
+       .MSG    1VMHECEVV2VIEQS         ;1 COIN/2 PLAY\r
+       .MSG    V1VMHECEV1VIEQV         ;1 COIN/PLAY\r
+       .MSG    B0LQOVM0QNVVV0V         ;BONUS\r
+       .MSG    2VMHECEOVV1VIEQ         ;2 COIN/PLAY\r
+       .MSG    VOC0NEVKASRVVV0         ;MAX SCORE\r
+SPANISH: .MSG  VVVVVVVVVVVVVVV         ;BLANK\r
+       .MSG    VVVJ0VOHELP0VVV         ;SORRY\r
+       .MSG    VVVVAOHVAOHVVVV         ;SO-SO\r
+       .MSG    VVVVVBQEL0VVVVV         ;GOOD\r
+       .MSG    VVVVVVAOVVVVVVV         ;ACE\r
+       .MSG    VVGAOVVVVVVVVVV         ;FUEL\r
+       .MSG    NEOQJPAD0OVVV0V         ;SCORE\r
+       .MSG    VIQGADAVGNAPHOV         ;FREE PLAY\r
+       .MSG    V1VKDARV2VIG0OR         ;1 COIN/2 PLAY\r
+       .MSG    V1VKDARV1VIG0RV         ;1 COIN/PLAY\r
+       .MSG    VB0L0OVM0NVVV0V         ;BONUS\r
+       .MSG    V2VKDAORV1VIG0R         ;2 COIN/PLAY\r
+       .MSG    VKASROC0NEVVVV0         ;TOP SCORE\r
+GERMAN:        .MSG    VVVVVVVVVVVVVVV         ;BLANK\r
+       .MSG    VVVVBEDAQNEVVVV         ;SORRY\r
+       .MSG    VVVVVO0VO0VVVVV         ;SO-SO\r
+       .MSG    VVVVVVGQPVVVVVV         ;GOOD\r
+       .MSG    VVVVVVAOVVVVVVV         ;ACE\r
+       .MSG    VVGAOVVVVVVVVVV         ;FUEL\r
+       .MSG    VVPNEFFENVVVV0V         ;SCORE\r
+       .MSG    VVFNEHEOVOMHEJV         ;FREE PLAY\r
+       .MSG    1VKQLUEV2VOMHEJ         ;1 COIN/2 PLAY\r
+       .MSG    1VKQLUEV1VOMHEJ         ;1 COIN/PLAY\r
+       .MSG    VB0LQOVFQNVVV0V         ;BONUS\r
+       .MSG    2VKQLUEV1VOMHEJ         ;2 COIN/PLAY\r
+       .MSG    P0MVPNEFFENVVV0         ;TOP SCORE\r
+RATTBL:        .BYTE   005,020,024\r
+ATTMAP:        .BYTE   024,024,024,024,064,064,064,064,033,031,006,046,006,046,027,067\r
+ATTSPC:        .BYTE   000,000,100,301,301,301,003,103\r
+       FILL    =37764-.\r
+       .IF     GE,OPT-1\r
+       FILL    =17764-.\r
+       .ENDC\r
+       .REPT   FILL\r
+       .BYTE   00\r
+       .ENDR\r
+SUMPAR: .BYTE  00                      ;MAKE CHECKSUM3 EVEN WITH 0 OR 1\r
+       .BYTE   00,00,00\r
+       .WORD   IRQ,PWRON,NMI,PWRON\r
+       .END\r
+\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0
\ No newline at end of file
diff --git a/A09124.RBN b/A09124.RBN
new file mode 100644 (file)
index 0000000..4c42f86
Binary files /dev/null and b/A09124.RBN differ
diff --git a/A09125.RBN b/A09125.RBN
new file mode 100644 (file)
index 0000000..ce0c851
Binary files /dev/null and b/A09125.RBN differ
diff --git a/A09126.RBN b/A09126.RBN
new file mode 100644 (file)
index 0000000..e6db553
Binary files /dev/null and b/A09126.RBN differ
diff --git a/A09127.RBN b/A09127.RBN
new file mode 100644 (file)
index 0000000..11b9cb5
Binary files /dev/null and b/A09127.RBN differ
diff --git a/A09823.RBN b/A09823.RBN
new file mode 100644 (file)
index 0000000..8f87923
Binary files /dev/null and b/A09823.RBN differ
diff --git a/SUPBUG.DIR b/SUPBUG.DIR
new file mode 100644 (file)
index 0000000..85d2f09
Binary files /dev/null and b/SUPBUG.DIR differ
diff --git a/SUPDIG.MAC b/SUPDIG.MAC
new file mode 100644 (file)
index 0000000..1ec07c1
Binary files /dev/null and b/SUPDIG.MAC differ
diff --git a/SUPMEM.MAC b/SUPMEM.MAC
new file mode 100644 (file)
index 0000000..61abb05
Binary files /dev/null and b/SUPMEM.MAC differ