]> github.com/historicalsource and other repositories - space-duel.git/commitdiff
First commit main
authorHistorical Source <49599193+historicalsource@users.noreply.github.com>
Fri, 15 Oct 2021 01:27:19 +0000 (21:27 -0400)
committerHistorical Source <49599193+historicalsource@users.noreply.github.com>
Fri, 15 Oct 2021 01:27:19 +0000 (21:27 -0400)
69 files changed:
006X0.DAT [new file with mode: 0644]
006X1.DAT [new file with mode: 0644]
006X2.DAT [new file with mode: 0644]
285XX.DOC [new file with mode: 0644]
A2EARO.MAC [new file with mode: 0644]
A2GOOF.MAC [new file with mode: 0644]
A2HEXR.DAT [new file with mode: 0644]
A2IRQ.MAC [new file with mode: 0644]
A2NAME.MAC [new file with mode: 0644]
A2NEW3.DAT [new file with mode: 0644]
A2PENT.DAT [new file with mode: 0644]
A2PLN.DAT [new file with mode: 0644]
A2PYRM.DAT [new file with mode: 0644]
A2SAUC.DAT [new file with mode: 0644]
A2SHIP.LDA [new file with mode: 0644]
A2SHIP.MAC [new file with mode: 0644]
A2SHIP.SAV [new file with mode: 0644]
A2STAR.DAT [new file with mode: 0644]
AS2COI.MAC [new file with mode: 0644]
AS2CU2.DAT [new file with mode: 0644]
AS2CUN.DAT [new file with mode: 0644]
AS2DEC.MAC [new file with mode: 0644]
AS2FIL.MAC [new file with mode: 0644]
AS2MSG.MAC [new file with mode: 0644]
AS2POK.MAC [new file with mode: 0644]
AS2ROM.MAC [new file with mode: 0644]
AS2SAC.MAC [new file with mode: 0644]
AS2TST.MAC [new file with mode: 0644]
ASCVG.MAC [new file with mode: 0644]
AST2RD.LDA [new file with mode: 0644]
AST2RD.MAC [new file with mode: 0644]
AST2RT.MAC [new file with mode: 0644]
ASTRD2.LDA [new file with mode: 0644]
ASTRD2.MAC [new file with mode: 0644]
COIN65.MAC [new file with mode: 0644]
HLL65F.MAC [new file with mode: 0644]
SDGEN1.COM [new file with mode: 0644]
SDGEN2.COM [new file with mode: 0644]
SDUEL0.LDA [new file with mode: 0644]
STATE2.COM [new file with mode: 0644]
STATE2.MAC [new file with mode: 0644]
STATE2.MAP [new file with mode: 0644]
STATE2.SAV [new file with mode: 0644]
VGAN.MAC [new file with mode: 0644]
VGMC.MAC [new file with mode: 0644]
VGUTR2.MAC [new file with mode: 0644]
XYSIG.MAC [new file with mode: 0644]
revision/006X0.DAT [new file with mode: 0644]
revision/006X1.DAT [new file with mode: 0644]
revision/006X2.DAT [new file with mode: 0644]
revision/285XX.DOC [new file with mode: 0644]
revision/A2HEXR.DAT [new file with mode: 0644]
revision/A2NEW3.DAT [new file with mode: 0644]
revision/A2PENT.DAT [new file with mode: 0644]
revision/A2PLN.DAT [new file with mode: 0644]
revision/A2PYRM.DAT [new file with mode: 0644]
revision/A2SAUC.DAT [new file with mode: 0644]
revision/A2SHIP.LDA [new file with mode: 0644]
revision/A2STAR.DAT [new file with mode: 0644]
revision/AS2CU2.DAT [new file with mode: 0644]
revision/AS2CUN.DAT [new file with mode: 0644]
revision/AST2RD.LDA [new file with mode: 0644]
revision/AST2RD.MAC [new file with mode: 0644]
revision/SDGEN1.COM [new file with mode: 0644]
revision/SDGEN2.COM [new file with mode: 0644]
revision/STATE2.COM [new file with mode: 0644]
revision/STATE2.MAC [new file with mode: 0644]
revision/STATE2.MAP [new file with mode: 0644]
revision/STATE2.SAV [new file with mode: 0644]

diff --git a/006X0.DAT b/006X0.DAT
new file mode 100644 (file)
index 0000000..f00bfea
Binary files /dev/null and b/006X0.DAT differ
diff --git a/006X1.DAT b/006X1.DAT
new file mode 100644 (file)
index 0000000..ee8b25b
Binary files /dev/null and b/006X1.DAT differ
diff --git a/006X2.DAT b/006X2.DAT
new file mode 100644 (file)
index 0000000..90f2852
--- /dev/null
+++ b/006X2.DAT
@@ -0,0 +1,23 @@
+GINNING OF SECTION
+16$:   JSR VGRTSL
+       BNE 90$                 ;ALWAYS$
+20$:   LALJSR CNTSCL
+       LXHJSR CNTSCL
+       JSR VGADD2
+;NOT DONE IN ROM SO CAN CHANGE BRIGHTNESS
+;VECTOR TO CORRECT PLACE
+       LDA CABINET             ;FLIP?
+       BPL 25$                 ;NOPE
+       LDA GAME                ;NO FLIP ON GAME 3 (1 PLAYER, 2 SCORES)
+       CMP #3
+       BEQ 25$
+       LDY TEMP3+1             ;GET Y POINTER
+       LDA Y,130$              ;ELSE GET FLIP INFO
+25$:   STA UPDOWN
+       LDX TEMP3+1             ;GET COLOR OF SCORES
+       LDA X,SCRCLR
+       TAY                     ;PUT IN Y FOR VGSTAT INST
+       JSR VGSTAT
+       LDY TEMP3+1
+       LDA Y,100$              ;X/4
+       LDX #05B                ;T
\ No newline at end of file
diff --git a/285XX.DOC b/285XX.DOC
new file mode 100644 (file)
index 0000000..eac3ee5
--- /dev/null
+++ b/285XX.DOC
@@ -0,0 +1,309 @@
+GINNING OF SECTION
+16$:   JSR VGRTSL
+       BNE 90$                 ;ALWAYS$
+20$:   LALJSR CNTSCL
+       LXHJSR CNTSCL
+       JSR VGADD2
+;NOT DONE IN ROM SO CAN CHANGE BRIGHTNESS
+;VECTOR TO CORRECT PLACE
+       LDA CABINET             ;FLIP?
+       BPL 25$                 ;NOPE
+       LDA GAME                ;NO FLIP ON GAME 3 (1 PLAYER, 2 SCORES)
+       CMP #3
+       BEQ 25$
+       LDY TEMP3+1             ;GET Y POINTER
+       LDA Y,130$              ;ELSE GET FLIP INFO
+25$:   STA UPDOWN
+       LDX TEMP3+1             ;GET COLOR OF SCORES
+       LDA X,SCRCLR
+       TAY                     ;PUT IN Y FOR VGSTAT INST
+       JSR VGSTAT
+       LDY TEMP3+1
+       LDA Y,100$              ;X/4
+       LDX #05B                ;TGINNING OF SECTION
+16$:   JSR VGRTSL
+       BNE 90$                 ;ALWAYS$
+20$:   LALJSR CNTSCL
+       LXHJSR CNTSCL
+       JSR VGADD2
+;NOT DONE IN ROM SO CAN CHANGE BRIGHTNESS
+;VECTOR TO CORRECT PLACE
+       LDA CABINET             ;FLIP?
+       BPL 25$                 ;NOPE
+       LDA GAME                ;NO FLIP ON GAME 3 (1 PLAYER, 2 SCORES)
+       CMP #3
+       BEQ 25$
+       LDY TEMP3+1             ;GET Y POINTER
+       LDA Y,130$              ;ELSE GET FLIP INFO
+25$:   STA UPDOWN
+       LDX TEMP3+1             ;GET COLOR OF SCORES
+       LDA X,SCRCLR
+       TAY                     ;PUT IN Y FOR VGSTAT INST
+       JSR VGSTAT
+       LDY TEMP3+1
+       LDA Y,100$              ;X/4
+       LDX #05B                ;TGINNING OF SECTION
+16$:   JSR VGRTSL
+       BNE 90$                 ;ALWAYS$
+20$:   LALJSR CNTSCL
+       LXHJSR CNTSCL
+       JSR VGADD2
+;NOT DONE IN ROM SO CAN CHANGE BRIGHTNESS
+;VECTOR TO CORRECT PLACE
+       LDA CABINET             ;FLIP?
+       BPL 25$                 ;NOPE
+       LDA GAME                ;NO FLIP ON GAME 3 (1 PLAYER, 2 SCORES)
+       CMP #3
+       BEQ 25$
+       LDY TEMP3+1             ;GET Y POINTER
+       LDA Y,130$              ;ELSE GET FLIP INFO
+25$:   STA UPDOWN
+       LDX TEMP3+1             ;GET COLOR OF SCORES
+       LDA X,SCRCLR
+       TAY                     ;PUT IN Y FOR VGSTAT INST
+       JSR VGSTAT
+       LDY TEMP3+1
+       LDA Y,100$              ;X/4
+       LDX #05B                ;TGINNING OF SECTION
+16$:   JSR VGRTSL
+       BNE 90$                 ;ALWAYS$
+20$:   LALJSR CNTSCL
+       LXHJSR CNTSCL
+       JSR VGADD2
+;NOT DONE IN ROM SO CAN CHANGE BRIGHTNESS
+;VECTOR TO CORRECT PLACE
+       LDA CABINET             ;FLIP?
+       BPL 25$                 ;NOPE
+       LDA GAME                ;NO FLIP ON GAME 3 (1 PLAYER, 2 SCORES)
+       CMP #3
+       BEQ 25$
+       LDY TEMP3+1             ;GET Y POINTER
+       LDA Y,130$              ;ELSE GET FLIP INFO
+25$:   STA UPDOWN
+       LDX TEMP3+1             ;GET COLOR OF SCORES
+       LDA X,SCRCLR
+       TAY                     ;PUT IN Y FOR VGSTAT INST
+       JSR VGSTAT
+       LDY TEMP3+1
+       LDA Y,100$              ;X/4
+       LDX #05B                ;TGINNING OF SECTION
+16$:   JSR VGRTSL
+       BNE 90$                 ;ALWAYS$
+20$:   LALJSR CNTSCL
+       LXHJSR CNTSCL
+       JSR VGADD2
+;NOT DONE IN ROM SO CAN CHANGE BRIGHTNESS
+;VECTOR TO CORRECT PLACE
+       LDA CABINET             ;FLIP?
+       BPL 25$                 ;NOPE
+       LDA GAME                ;NO FLIP ON GAME 3 (1 PLAYER, 2 SCORES)
+       CMP #3
+       BEQ 25$
+       LDY TEMP3+1             ;GET Y POINTER
+       LDA Y,130$              ;ELSE GET FLIP INFO
+25$:   STA UPDOWN
+       LDX TEMP3+1             ;GET COLOR OF SCORES
+       LDA X,SCRCLR
+       TAY                     ;PUT IN Y FOR VGSTAT INST
+       JSR VGSTAT
+       LDY TEMP3+1
+       LDA Y,100$              ;X/4
+       LDX #05B                ;TGINNING OF SECTION
+16$:   JSR VGRTSL
+       BNE 90$                 ;ALWAYS$
+20$:   LALJSR CNTSCL
+       LXHJSR CNTSCL
+       JSR VGADD2
+;NOT DONE IN ROM SO CAN CHANGE BRIGHTNESS
+;VECTOR TO CORRECT PLACE
+       LDA CABINET             ;FLIP?
+       BPL 25$                 ;NOPE
+       LDA GAME                ;NO FLIP ON GAME 3 (1 PLAYER, 2 SCORES)
+       CMP #3
+       BEQ 25$
+       LDY TEMP3+1             ;GET Y POINTER
+       LDA Y,130$              ;ELSE GET FLIP INFO
+25$:   STA UPDOWN
+       LDX TEMP3+1             ;GET COLOR OF SCORES
+       LDA X,SCRCLR
+       TAY                     ;PUT IN Y FOR VGSTAT INST
+       JSR VGSTAT
+       LDY TEMP3+1
+       LDA Y,100$              ;X/4
+       LDX #05B                ;TGINNING OF SECTION
+16$:   JSR VGRTSL
+       BNE 90$                 ;ALWAYS$
+20$:   LALJSR CNTSCL
+       LXHJSR CNTSCL
+       JSR VGADD2
+;NOT DONE IN ROM SO CAN CHANGE BRIGHTNESS
+;VECTOR TO CORRECT PLACE
+       LDA CABINET             ;FLIP?
+       BPL 25$                 ;NOPE
+       LDA GAME                ;NO FLIP ON GAME 3 (1 PLAYER, 2 SCORES)
+       CMP #3
+       BEQ 25$
+       LDY TEMP3+1             ;GET Y POINTER
+       LDA Y,130$              ;ELSE GET FLIP INFO
+25$:   STA UPDOWN
+       LDX TEMP3+1             ;GET COLOR OF SCORES
+       LDA X,SCRCLR
+       TAY                     ;PUT IN Y FOR VGSTAT INST
+       JSR VGSTAT
+       LDY TEMP3+1
+       LDA Y,100$              ;X/4
+       LDX #05B                ;TGINNING OF SECTION
+16$:   JSR VGRTSL
+       BNE 90$                 ;ALWAYS$
+20$:   LALJSR CNTSCL
+       LXHJSR CNTSCL
+       JSR VGADD2
+;NOT DONE IN ROM SO CAN CHANGE BRIGHTNESS
+;VECTOR TO CORRECT PLACE
+       LDA CABINET             ;FLIP?
+       BPL 25$                 ;NOPE
+       LDA GAME                ;NO FLIP ON GAME 3 (1 PLAYER, 2 SCORES)
+       CMP #3
+       BEQ 25$
+       LDY TEMP3+1             ;GET Y POINTER
+       LDA Y,130$              ;ELSE GET FLIP INFO
+25$:   STA UPDOWN
+       LDX TEMP3+1             ;GET COLOR OF SCORES
+       LDA X,SCRCLR
+       TAY                     ;PUT IN Y FOR VGSTAT INST
+       JSR VGSTAT
+       LDY TEMP3+1
+       LDA Y,100$              ;X/4
+       LDX #05B                ;TGINNING OF SECTION
+16$:   JSR VGRTSL
+       BNE 90$                 ;ALWAYS$
+20$:   LALJSR CNTSCL
+       LXHJSR CNTSCL
+       JSR VGADD2
+;NOT DONE IN ROM SO CAN CHANGE BRIGHTNESS
+;VECTOR TO CORRECT PLACE
+       LDA CABINET             ;FLIP?
+       BPL 25$                 ;NOPE
+       LDA GAME                ;NO FLIP ON GAME 3 (1 PLAYER, 2 SCORES)
+       CMP #3
+       BEQ 25$
+       LDY TEMP3+1             ;GET Y POINTER
+       LDA Y,130$              ;ELSE GET FLIP INFO
+25$:   STA UPDOWN
+       LDX TEMP3+1             ;GET COLOR OF SCORES
+       LDA X,SCRCLR
+       TAY                     ;PUT IN Y FOR VGSTAT INST
+       JSR VGSTAT
+       LDY TEMP3+1
+       LDA Y,100$              ;X/4
+       LDX #05B                ;TGINNING OF SECTION
+16$:   JSR VGRTSL
+       BNE 90$                 ;ALWAYS$
+20$:   LALJSR CNTSCL
+       LXHJSR CNTSCL
+       JSR VGADD2
+;NOT DONE IN ROM SO CAN CHANGE BRIGHTNESS
+;VECTOR TO CORRECT PLACE
+       LDA CABINET             ;FLIP?
+       BPL 25$                 ;NOPE
+       LDA GAME                ;NO FLIP ON GAME 3 (1 PLAYER, 2 SCORES)
+       CMP #3
+       BEQ 25$
+       LDY TEMP3+1             ;GET Y POINTER
+       LDA Y,130$              ;ELSE GET FLIP INFO
+25$:   STA UPDOWN
+       LDX TEMP3+1             ;GET COLOR OF SCORES
+       LDA X,SCRCLR
+       TAY                     ;PUT IN Y FOR VGSTAT INST
+       JSR VGSTAT
+       LDY TEMP3+1
+       LDA Y,100$              ;X/4
+       LDX #05B                ;TGINNING OF SECTION
+16$:   JSR VGRTSL
+       BNE 90$                 ;ALWAYS$
+20$:   LALJSR CNTSCL
+       LXHJSR CNTSCL
+       JSR VGADD2
+;NOT DONE IN ROM SO CAN CHANGE BRIGHTNESS
+;VECTOR TO CORRECT PLACE
+       LDA CABINET             ;FLIP?
+       BPL 25$                 ;NOPE
+       LDA GAME                ;NO FLIP ON GAME 3 (1 PLAYER, 2 SCORES)
+       CMP #3
+       BEQ 25$
+       LDY TEMP3+1             ;GET Y POINTER
+       LDA Y,130$              ;ELSE GET FLIP INFO
+25$:   STA UPDOWN
+       LDX TEMP3+1             ;GET COLOR OF SCORES
+       LDA X,SCRCLR
+       TAY                     ;PUT IN Y FOR VGSTAT INST
+       JSR VGSTAT
+       LDY TEMP3+1
+       LDA Y,100$              ;X/4
+       LDX #05B                ;TGINNING OF SECTION
+16$:   JSR VGRTSL
+       BNE 90$                 ;ALWAYS$
+20$:   LALJSR CNTSCL
+       LXHJSR CNTSCL
+       JSR VGADD2
+;NOT DONE IN ROM SO CAN CHANGE BRIGHTNESS
+;VECTOR TO CORRECT PLACE
+       LDA CABINET             ;FLIP?
+       BPL 25$                 ;NOPE
+       LDA GAME                ;NO FLIP ON GAME 3 (1 PLAYER, 2 SCORES)
+       CMP #3
+       BEQ 25$
+       LDY TEMP3+1             ;GET Y POINTER
+       LDA Y,130$              ;ELSE GET FLIP INFO
+25$:   STA UPDOWN
+       LDX TEMP3+1             ;GET COLOR OF SCORES
+       LDA X,SCRCLR
+       TAY                     ;PUT IN Y FOR VGSTAT INST
+       JSR VGSTAT
+       LDY TEMP3+1
+       LDA Y,100$              ;X/4
+       LDX #05B                ;TGINNING OF SECTION
+16$:   JSR VGRTSL
+       BNE 90$                 ;ALWAYS$
+20$:   LALJSR CNTSCL
+       LXHJSR CNTSCL
+       JSR VGADD2
+;NOT DONE IN ROM SO CAN CHANGE BRIGHTNESS
+;VECTOR TO CORRECT PLACE
+       LDA CABINET             ;FLIP?
+       BPL 25$                 ;NOPE
+       LDA GAME                ;NO FLIP ON GAME 3 (1 PLAYER, 2 SCORES)
+       CMP #3
+       BEQ 25$
+       LDY TEMP3+1             ;GET Y POINTER
+       LDA Y,130$              ;ELSE GET FLIP INFO
+25$:   STA UPDOWN
+       LDX TEMP3+1             ;GET COLOR OF SCORES
+       LDA X,SCRCLR
+       TAY                     ;PUT IN Y FOR VGSTAT INST
+       JSR VGSTAT
+       LDY TEMP3+1
+       LDA Y,100$              ;X/4
+       LDX #05B                ;TGINNING OF SECTION
+16$:   JSR VGRTSL
+       BNE 90$                 ;ALWAYS$
+20$:   LALJSR CNTSCL
+       LXHJSR CNTSCL
+       JSR VGADD2
+;NOT DONE IN ROM SO CAN CHANGE BRIGHTNESS
+;VECTOR TO CORRECT PLACE
+       LDA CABINET             ;FLIP?
+       BPL 25$                 ;NOPE
+       LDA GAME                ;NO FLIP ON GAME 3 (1 PLAYER, 2 SCORES)
+       CMP #3
+       BEQ 25$
+       LDY TEMP3+1             ;GET Y POINTER
+       LDA Y,130$              ;ELSE GET FLIP INFO
+25$:   STA UPDOWN
+       LDX TEMP3+1             ;GET COLOR OF SCORES
+       LDA X,SCRCLR
+       TAY                     ;PUT IN Y FOR VGSTAT INST
+       JSR VGSTAT
+       LDY TEMP3+1
+       LDA Y,100$              ;X/4
+       LDX #05B                ;T
\ No newline at end of file
diff --git a/A2EARO.MAC b/A2EARO.MAC
new file mode 100644 (file)
index 0000000..4af3869
--- /dev/null
@@ -0,0 +1,934 @@
+       .TITLE  A2EARO-AST2RD EAROM\r
+       .RADIX 16\r
+       .CSECT A2EARO\r
+       .ENABL AMA\r
+       .SBTTL  **************************\r
+       .SBTTL  *                        *\r
+       .SBTTL  *MODULE-A2EARO           *\r
+       .SBTTL  *PROGRAMMER:DAVE THEURER *\r
+       .SBTTL  *FUNCTION:SPACE DUAL EAROM       *\r
+       .SBTTL  * STOLEN BY OWEN RUBIN   *\r
+       .SBTTL  *                        *\r
+       .SBTTL  **************************\r
+       .NLIST\r
+       .INCLUDE AS2DEC ;<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\r
+       .INCLUDE HLL65F ;<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\r
+       .LIST\r
+       .SBTTL  GLOBLS\r
+;ENTRY POINTS\r
+       .GLOBL VGADD2,DIGITS,VGSTAT,VGHALT,VGVTR5,INISOU\r
+       .GLOBL VGCNTR,VGVTR1,VGMSG5,GTOPTN,VGHEX,VGMSG4\r
+       .GLOBL VGHEX1,VGSCAL,BIGGOOF\r
+       .GLOBL EAUPD,EAZERO,REHIIN,WRHIIN,EAFLG,WRBOOK,EAZBOO,EAZHIS\r
+       .GLOBL EASETUP,EACOPY,SWTST,OPTND\r
+       .GLOBL BOOK,BKCOPY,MOVIN,DECIMAL\r
+       .GLOBL PWRON,POWERON,STESTA,START2\r
+;DATA\r
+       .GLOBL ULIVESHIP,LLIVESHIP\r
+       .GLOBL PLAYTIME,GAMES1,ONTIME,BONTIME,GTIME,GAME\r
+       .GLOBL EAZFLG,EAREQU,EARWRQ,EAFLG\r
+       .GLOBL EABC,EAX,EACNT,EASEL,EACS\r
+       .GLOBB EASRCE,LANG,FRAME,ATSTG,$USE\r
+       .GLOBL WHITE,BLUE,RED,GRBLUE,YELLOW,NROCKS\r
+       .GLOBL BONTIME\r
+       .GLOBL  EABAD\r
+       .GLOBL EABUF\r
+       .GLOBB TEMP7,TEMP8,TEMP9,TEMP1,TEMP4,TEMPB,TEMPC\r
+       .GLOBB TEMPA,TEMP12,TEMP11,ATRACT,DIFF\r
+       .GLOBB TEMP5,OBJ\r
+       .GLOBL SPINT,INITL,HSCORE\r
+       .GLOBB VGLIST\r
+       .GLOBL WNDSE8,WNDSE9,CNTSCL\r
+       .GLOBB $CMODE,HITS\r
+       .SBTTL  HARDWARE DEFINITIONS\r
+VECRAM =2000                   ;VECTOR RAM     \r
+       \r
+                               ;\r
+                               ;EAROM HARDWARE DEFINITIONS\r
+                               ;\r
+;EAROMRD\r
+EAIN   =0A00\r
+;EAIN                          ;HARDWARE READ PORT\r
+;EAROMWR\r
+EADAL  =0F00\r
+;EADAL                         ;BASE ADDRESS (STORE TO EADAL +OFFSET\r
+                               ;TO ENABLE ADDRESS)\r
+;EAROMCON\r
+EACTL  =0E80\r
+;EACTL                         ;EA CONTROL BATCH;NOT C1,C2 FUNCTION\r
+                               ;0 0 READ MODE\r
+                               ;1 0 WRITE MODE\r
+                               ;1 1 ERASE MODE\r
+EACK   =1                      ;CLOCK BIT\r
+EAC1   =4                      ;C1 (INVERTED TO CHIP)\r
+EAC2   =2                      ;C2\r
+EACE   =8                      ;CHIP SELECT\r
+EAERAS =80\r
+EAWRIT =40\r
+EAREAD =20\r
+                               ;\r
+\r
+       .SBTTL  TABLE FOR RAM-EAROM TRANSFER\r
+;\r
+;EAROM ACCESS TABLES:OTH BYTE IN TABLE CORRESPONDS TO D0 IN EAREQU/EARWRQ\r
+;\r
+       .MACRO ROML ...A        ;INPUT ...A=BYTES OF DATA TO ACCESS\r
+       .BYTE ...RPC            ;OFFSET INTO EAROM OF LOWEST BYTE TO ACCESS\r
+...RPC=...RPC+...A\r
+       .BYTE ...RPC            ;OFFSET INTO EAROM OF HIGHEST BYTE TO ACCESS\r
+...RPC=...RPC+1\r
+       .ENDM                   ; (CHECKSUM)\r
+       ...RPC  =0\r
+\r
+TEAX:                          ;EAROM OFFSET OF LOWEST BYTE IN GROUP\r
+...RPC =2                      ;SKIP 2 BYTES\r
+TEACNT =TEAX+1                 ;EAROM OFFSET OF HIGHEST BYTE IN GROUP (CHECKSUM)\r
+       ROML 27.                        ;INITIALS\r
+       ROML 32.                        ;BOOKKEEPPING\r
+TEASRL:\r
+TEASRH =TEASRL+1\r
+       .WORD EABUF\r
+       .WORD BONTIME\r
+       .PAGE\r
+       .SBTTL  EAROM APPLICATIONS\r
+\r
+                               ;\r
+                               ;ZERO EAROM\r
+                               ;\r
+EAZBOO:\r
+       LDA I,02\r
+       BNE GENZER              ;ZERO BOOKKEEPING ONLY\r
+EAZHIS:\r
+       LDA I,01\r
+       BNE GENZER              ;ZERO HI SCORES/INITIALS ONLY\r
+EAZERO:\r
+       LDA I,03\r
+GENZER:        LDY I,0FF               ;REQUEST ZERO EAROM\r
+       BNE GENREQ              ;REQUEST ALL BATCHES\r
+                               ;REQUEST WRITE\r
+\r
+                               ;\r
+                               ;\r
+WRHIIN:        LDA I,01                ;WRITE HIGH SCORES & INITIALS\r
+       BNE NOZERO\r
+WRBOOK:        LDA I,02                ;REQUEST BOOKKEEPING UPDATE\r
+NOZERO:        LDY I,0\r
+GENREQ:        STY EAZFLG              ;DO NOT ZERO EAROM\r
+       PHA\r
+       ORA EAREQU\r
+       STA EAREQU\r
+       PLA\r
+       ORA EARWRQ\r
+       STA EARWRQ\r
+       RTS\r
+REHIIN:        LDA I,03                ;READ IN EVERYTHING\r
+       STA EAREQU\r
+       LDA I,0\r
+       STA EARWRQ\r
+;      JMP EAUPD               ;GO GET IT NOW.\r
+       .PAGE\r
+       .SBTTL  EAROM IO MAINLINE\r
+;INPUT:EAFLG:0=NO ACTIVITY;80=ERASE;40=WRITE;20=READ\r
+;      EAX:INDEX INTO EADAL OF LOC TO ACCESS IN EAROM\r
+;      EABC:OFFSET FROM @EASRCE OF RAM DATA TO ACCESS\r
+;      EACNT:EAROM OFFSET OF LAST BYTE TO MODIFY (STOP WHEN EAX>EACNT)\r
+;\r
+;OUTPUT:EAROM ERASED, WRITTEN TOO, OR READ\r
+;\r
+EAUPD:\r
+       LDA EAFLG\r
+       IFEQ                    ;EA ACTIVITY?\r
+       LDA EAREQU              ;NO.\r
+       IFNE                    ;ANY REQUESTED?\r
+       LDX I,0                 ;YES\r
+       STX EABC                ;ZERO SOURCE INDEX\r
+       STX EACS                ;ZERO CHECKSUM\r
+       STX EASEL               ;ZERO SELECT BIT\r
+       LDX I,8\r
+       SEC\r
+       BEGIN                   ;LOOP UNTIL 1ST BIT ON LEFT IS FOUND\r
+       ROR EASEL\r
+       ASL\r
+       DEX\r
+       CSEND                   ;EXIT WHEN SET BIT IS FOUND\r
+       LDY I,EAERAS            ;DEFAULT TO ERASE/WRITE\r
+       LDA EASEL\r
+       AND EARWRQ\r
+       IFEQ                    ;READ OR ERASE/WRITE?\r
+       LDY I,EAREAD            ;READ\r
+       ENDIF\r
+       STY EAFLG               ;SAVE REQUEST\r
+       LDA EASEL\r
+       EOR EAREQU\r
+       STA EAREQU              ;TURN OFF REQUEST BIT\r
+       TXA\r
+       ASL\r
+       TAX\r
+       LDA X,TEAX              ;SET UP PARAMETERS FOR EAROM WRITE\r
+       STA EAX\r
+       LDA X,TEACNT\r
+       STA EACNT\r
+       LDA X,TEASRL\r
+       STA EASRCE\r
+       LDA X,TEASRH\r
+       STA EASRCE+1\r
+       ENDIF\r
+       ENDIF\r
+       LDY I,0                 ;DESELECT CHIP\r
+       STY EACTL\r
+       LDA EAFLG\r
+       IFEQ                    ;ANY ACTIVITY?\r
+       RTS                     ;NO. EXIT\r
+       ENDIF\r
+       LDY EABC                ;YES.\r
+       LDX EAX\r
+       ASL\r
+       IFCS                    ;YES. R/W OR ERASE?\r
+                               ;ERASE\r
+       STA X,EADAL             ;STORE ADDRESS\r
+       LDA I,EAWRIT            ;REQUEST WRITE\r
+       STA EAFLG\r
+       LDY #EAC1+EAC2+EACE     ;ERASE & SELECT CHIP\r
+\r
+       ELSE\r
+       IFMI                    ;NO. READ OR WRITE?\r
+       LDA I,EAERAS            ;WRITE A BYTE\r
+       STA EAFLG               ;REQUEST ERASE FOR NEXT BYTE\r
+\r
+       LDA EAZFLG\r
+       IFNE                    ;ZERO EAROM?\r
+       LDA I,0                 ;YES.\r
+       STA NY,EASRCE           ;CLEAR RAM TOO\r
+       ENDIF\r
+       LDA NY,EASRCE           ;GET RAM DATA (DEFAULT)\r
+       CPX EACNT\r
+       IFCS\r
+       LDA I,0                 ;ALL DONE. SET DONE FLAG\r
+       STA EAFLG\r
+       LDA EACS                ;GET CHECKSUM\r
+       ENDIF\r
+       STA X,EADAL             ;WRITE DATA\r
+       LDY #EAC1+EACE          ;SELECT WRITE MODE & CHIP SELECT\r
+       ELSE\r
+                               ;\r
+                               ;READ\r
+       LDA #EACE\r
+       STA EACTL               ;SELECT CHIP AND READ FUNCTION\r
+       STA X,EADAL             ;SELECT ADDRESS\r
+       LDA #EACE+EACK          ;\r
+       STA EACTL               ;SELECT CHIP & CLOCK & READ\r
+       NOP\r
+       LDA #EACE\r
+       STA EACTL               ;SELECT CHIP\r
+       CPX EACNT\r
+       LDA EAIN                ;READ EAROM\r
+       IFCS                    ;CHECKSUM?\r
+                               ;YES\r
+       EOR EACS                ;MATCH CHECKSUM?\r
+       IFNE                    ;\r
+       LDA I,0                 ;NO.\r
+       LDY EABC\r
+       BEGIN                   ;CLEAR BAD LOCS IN RAM\r
+       STA NY,EASRCE\r
+       DEY\r
+       MIEND\r
+       LDA EASEL               ;SET BAD FLAG\r
+       ORA EABAD\r
+       STA EABAD\r
+       ENDIF\r
+       LDA I,0\r
+       STA EAFLG               ;ALL DONE\r
+       ELSE\r
+                               ;NO. RAW DATA\r
+       STA NY,EASRCE           ;SAVE DATA IN RAM\r
+       ENDIF\r
+       LDY I,0                 ;DESELECT\r
+       ENDIF\r
+       CLC\r
+       ADC EACS\r
+       STA EACS                ;UPDATE CHECKSUM\r
+       INC EABC\r
+       INC EAX\r
+       ENDIF\r
+       STY EACTL\r
+       TYA\r
+       IFEQ                    ;READ?\r
+       JMP EAUPD               ;YES. DO ALL READS AT ONCE\r
+       ENDIF\r
+       RTS\r
+       .PAGE\r
+       .SBTTL EAROM SETUP AND COPY\r
+;\r
+;\r
+HSCNUM =5      ;NUMBER OF HIGH SCORE FOR EACH GAME\r
+;\r
+;TRANSFER HIGH SCORES TO BUFFER AREA FOR EAROM\r
+;\r
+EASETUP:\r
+       LDX #02         ;3 OF EACH\r
+       LDY #0          ;BUFFER POINTER\r
+10$:   LDA X,HSCORE    ;2 PLAYER FIGHTERS\r
+       STA Y,EABUF\r
+       INY\r
+       LDA X,HSCORE+<3*HSCNUM>         ;1 PLAYER FIGHTER\r
+       STA Y,EABUF\r
+       INY\r
+       LDA X,HSCORE+<3*HSCNUM*2>       ;2 PLAYER SPACE STATION\r
+       STA Y,EABUF\r
+       INY\r
+       LDA X,HSCORE+<3*HSCNUM*3>       ;1 PLAYER SPACE STATION\r
+       STA Y,EABUF\r
+       INY\r
+;\r
+;NOW INITIALS\r
+;\r
+       LDA X,INITL                     ;2 PLAYER FIGHTER\r
+       STA Y,EABUF\r
+       INY\r
+       LDA X,INITL+<3*HSCNUM>          ;1 PLAYER FIGHTER\r
+       STA Y,EABUF\r
+       INY\r
+       LDA X,INITL+<3*HSCNUM*2>        ;2 PLAYER SPACE STATION\r
+       STA Y,EABUF\r
+       INY\r
+       LDA X,SPINT                     ;2 PLR STATION, ALT SET\r
+       STA Y,EABUF\r
+       INY\r
+       LDA X,INITL+<3*HSCNUM*3>        ;1 PLAYER SPACE STATION\r
+       STA Y,EABUF\r
+       INY\r
+       DEX\r
+       BPL 10$                         ;NEXT INITIALS\r
+       RTS\r
+;\r
+;\r
+;COPY FROM BUFFER BACK TO RAM FOR DISPLAY\r
+;\r
+EACOPY:\r
+       LDX #02                 ;SAME COMMENTS AS ABOVE\r
+       LDY #0\r
+10$:   JSR CHKEA\r
+       STA X,HSCORE\r
+       INY\r
+       JSR CHKEA\r
+       STA X,HSCORE+<3*HSCNUM>\r
+       INY\r
+       JSR CHKEA\r
+       STA X,HSCORE+<3*HSCNUM*2>\r
+       INY\r
+       JSR CHKEA\r
+       STA X,HSCORE+<3*HSCNUM*3>\r
+       JSR CKLTR\r
+       STA X,INITL\r
+       JSR CKLTR\r
+       STA X,INITL+<3*HSCNUM>\r
+       JSR CKLTR\r
+       STA X,INITL+<3*HSCNUM*2>\r
+       JSR CKLTR\r
+       STA X,SPINT\r
+       JSR CKLTR\r
+       STA X,INITL+<3*HSCNUM*3>\r
+       INY\r
+       DEX\r
+       BPL 10$\r
+       LDA HSCORE\r
+       ORA HSCORE+1    ;IS THIS SCORE ALL 0?\r
+       ORA HSCORE+2\r
+       BNE 20$         ;IF NO, OK, ELSE....\r
+       LDA #05         ;...MUST HAVE JUST CLEARED EAROM\r
+       STA HSCORE+1    ;SO REINIT TOP SCORES\r
+       STA HSCORE+1+<3*HSCNUM>\r
+       STA HSCORE+1+<3*HSCNUM*2>\r
+       STA HSCORE+1+<3*HSCNUM*3>\r
+20$:   RTS\r
+;\r
+;CHECK NUMBER FOR VALID NUMBER\r
+;\r
+CHKEA: LDA Y,EABUF             ;SAVE COPY\r
+       PHA\r
+       CMP #9A\r
+       BCS 20$\r
+       AND #0F\r
+       CMP #0A\r
+       BCS 20$\r
+       PLA             ;RESTORE ORIGNAL DATA\r
+       RTS\r
+20$:   PLA             ;THROW AWAY OLD (BAD) DATA\r
+       LDA X,SUBNUM    ;REPLACE WITH SUB NUMBER\r
+       RTS\r
+;\r
+SUBNUM:        .BYTE 0,5,0\r
+;\r
+;CHECK LETTER FOR A VALID ASCII LETTER (VECTOR GEN INDEX)\r
+;\r
+CKLTR: INY             ;SAVE ORIGINAL\r
+       LDA Y,EABUF     ;INPUT \r
+       BEQ 30$         ;A BLANK IS OK\r
+       CMP #0A         ;A?\r
+       BCC 20$\r
+       CMP #25         ;Z?\r
+       BCC 30$\r
+20$:   LDA X,SUBL\r
+30$:   RTS\r
+;\r
+SUBL:  .BYTE 0C,0B,0E\r
+;\r
+;\r
+\r
+       .PAGE\r
+       .SBTTL BOOKKEEPPING\r
+;\r
+;UPDATE INFO AT END OF GAME\r
+;\r
+BOOK:\r
+       SED                             ;ALL IN DECIMAL\r
+       LDY #0\r
+       LDA GAME\r
+       ASL\r
+       ASL                             ;GAME #*4\r
+       TAX\r
+       CLC\r
+12$:   JSR ADGMTM\r
+       JSR ADGMTM              ;ADD IN LAST GAME TIME\r
+       JSR ADGMTM\r
+       JSR ADGMTM              ;4 BYTES OF TIME\r
+       LDX #0\r
+       LDY #3\r
+       CLC\r
+       BEGIN\r
+       LDA X,GTIME\r
+       ADC X,ONTIME\r
+       STA X,ONTIME            ;THIS COUNTER WAS OFF DURING THE GAME\r
+       INX\r
+       DEY\r
+       MIEND\r
+       LDA GAME\r
+       ASL\r
+       CLC\r
+       ADC GAME                ;*3 FOR GAME NUMBERS\r
+       TAX\r
+14$:\r
+       CLC\r
+       LDA X,GAMES1                    ;UPDATE NUMBER OF GAMES PLAYED\r
+       ADC #01\r
+       STA X,GAMES1\r
+       LDA X,GAMES1+1\r
+       ADC #0\r
+       STA X,GAMES1+1\r
+       LDA X,GAMES1+2\r
+       ADC #0\r
+       STA X,GAMES1+2\r
+       CLD\r
+       LDX #03                         ;MOVE ONTIME\r
+13$:   LDA X,ONTIME\r
+       STA X,BONTIME                   ;FOR EA ROM WRITE\r
+       DEX\r
+       BPL 13$\r
+       JMP WRBOOK                      ;START UPDATE\r
+;\r
+;ADD IN GAME TIME SUBROUTIME\r
+;\r
+ADGMTM:        LDA X,PLAYTIME\r
+       ADC Y,GTIME\r
+       STA X,PLAYTIME\r
+       INX\r
+       INY                     ;NEXT PLACE\r
+       RTS\r
+;\r
+;COPY ONTIME FROM BUFFER BACK TO ACTIVE COUNTER\r
+;\r
+BKCOPY:\r
+       SEI                             ;DONT LET IT UPDATE WHILE MOVING\r
+       LDX #03\r
+10$:   LDA X,BONTIME\r
+       STA X,ONTIME\r
+       DEX\r
+       BPL 10$\r
+       CLI\r
+       RTS\r
+       .PAGE\r
+       .SBTTL ACCOUNT FOR YOURSELF\r
+;\r
+;CALCULATE AVERAGE GAME TIME\r
+;\r
+GAMIX: .BYTE 0,3,6,9.\r
+TIMIX: .BYTE 0,4,8.,12.\r
+;\r
+AVERAG:\r
+       LDY #3\r
+       STY TEMPC\r
+       BEGIN\r
+       SED                             ;*********CAUTION...DECIMAL ***********\r
+       LDY TEMPC\r
+       LDX Y,GAMIX                     ;GET INDEX FOR # OF GAMES\r
+       LDY #0\r
+10$:   LDA X,GAMES1\r
+       STA Y,TEMP4                     ;MOVE TO TEMP\r
+       INX\r
+       INY\r
+       CPY #03\r
+       BNE 10$                         ;DO ALL 3 BYTES\r
+       LDY TEMPC                       ;RECALL GAME #\r
+       LDX Y,TIMIX                     ;GET INDEX FOR SECONDS\r
+       LDY #0                          ;0 GAMES?\r
+       STY TEMPA\r
+20$:   LDA X,PLAYTIME\r
+       STA Y,TEMP1                     ;MOVE TO TEMPS\r
+       ORA TEMPA\r
+       STA TEMPA                       ;TO CHECK FOR 0 GAMES\r
+       INX\r
+       INY\r
+       CPY #04                         ;4 BYTES\r
+       BNE 20$\r
+       LDY #1                          ;1 WILL GO TO 0 IF ERROR (BELOW)\r
+       LDA TEMPA                       ;0 GAMES?\r
+       BEQ 40$\r
+       DEY                             ;Y=0\r
+30$:   INY\r
+       BEQ 40$\r
+       LDA TEMP1 \r
+       SEC\r
+       SBC TEMP4                       ;SUBTRACT # OF GAMES FROM TOTAL TIME\r
+                                       ;UNTILL TOTAL TIME GOES NEGATIVE\r
+       STA TEMP1\r
+       LDA TEMP1+1\r
+       SBC TEMP4+1\r
+       STA TEMP1+1\r
+       LDA TEMP1+2\r
+       SBC TEMP4+2\r
+       STA TEMP1+2\r
+       LDA TEMP1+3\r
+       SBC #0                          ;COME ALONG CARRY\r
+       STA TEMP1+3\r
+       BPL 30$                         ;NOT DONE YET\r
+40$:   CLD                             ;****OUT OF DECIMAL******\r
+       DEY\r
+       TYA                     ;SAVE IN A\r
+       LDY TEMPC\r
+       STA Y,OBJ               ;A GOOD PLACE TO PUT IT NOW\r
+       DEY\r
+       STY TEMPC\r
+       MIEND\r
+       RTS\r
+       .PAGE\r
+       .SBTTL REPORT STATUS\r
+;\r
+;THIS ROUTINE WILL BE USED BY SELF TEST TO REPORT EAROM STUFF\r
+;\r
+STESTA:        STA STOPADD                     ;ALL STOP PLEASE\r
+       JSR INISOU                      ;TURN OFF SOUNDS\r
+       JSR AVERAG                      ;CALCULATE AVERAGES\r
+       LDA #0\r
+       STA ATRACT                      ;END ANY GAME HERE\r
+       STA LANG                        ;ALWAYS ENGLISH\r
+       STA $USE                        ;ALLOW COINS AGAIN\r
+       LDX #VECRAM/100\r
+       LDA #VECRAM&0FF\r
+       STA VGLIST\r
+       STX VGLIST+1\r
+       LAL WNDSE9\r
+       LXH WNDSE8                      ;PUT UP BEAM KILLER\r
+       JSR VGADD2\r
+       LDY #08                 ;'1 PLAYER'\r
+       JSR DOMSG\r
+       LDY #09                 ;'2 PLAYER'\r
+       JSR DOMSG\r
+       LDY #0A                 ;'SECONDS'\r
+       JSR DOMSG\r
+       LDY #0B                 ;'GAMES'\r
+       JSR DOMSG\r
+       LDY #0C                 ;'AVG GAME TIME'\r
+       JSR DOMSG\r
+       LDA #02                         ;PUT UP SPACE STATION / FIGHTERS\r
+       STA TEMP7                       ;SAVE INDEX\r
+10$:   JSR VGCNTR\r
+       LDY TEMP7                       ;RECALL INDEX\r
+       LDA #098\r
+       LDX Y,Y1POS                     ;Y POS\r
+       JSR VGVTR5\r
+       LDA #10                 ;'F'\r
+       JSR VGHEX1\r
+       JSR VGCNTR\r
+       LDY TEMP7                       ;RECALL INDEX\r
+       LDA #098\r
+       LDX Y,Y2POS                     ;Y POSIT\r
+       JSR VGVTR5\r
+       LDA #1D\r
+       JSR VGHEX1              ;'S'\r
+       DEC TEMP7                       ;NEXT USE\r
+       BPL 10$\r
+       LDA #0A8/2\r
+       LDX #0E2                ;SO NEXT SWAP GOES TO FIRST BUFFER\r
+       JSR VGADD2\r
+       JSR VGHALT              ;SO IT WILL HALT\r
+ST2:   BIT HALT\r
+       BVC ST2                 ;WAIT FOR HALT\r
+       LDA A,VECRAM+1+0A6\r
+       EOR #2\r
+       STA A,VECRAM+1+0A6      ;SWAP BUFFERS\r
+       STA WTCHDG              ;KEEP THE SLEEPING DOG SLEEPING\r
+       LDX #VECRAM/100\r
+       AND #02\r
+       BNE 12$\r
+       LDX #VECRAM/100+4\r
+12$:   LDA #VECRAM&0FF+2+0A6\r
+       STA VGLIST\r
+       STX VGLIST+1\r
+       STA GOADD\r
+       JSR BIGGOOF             ;GET DIFF READING\r
+       ADC #0D                         ;MESSAGE # OFFSET\r
+       TAY\r
+       JSR DOMSG\r
+       BIT CABINET\r
+       IFMI\r
+       JSR VGCNTR                      ;NEED C FOR COCKTAIL\r
+       LDA #-68\r
+       LDX #0\r
+       JSR VGVTR5\r
+       LDA #0D                         ;OUTPUT A 'C'\r
+       JSR VGHEX1\r
+       LDA #0          ;GUESS NORMAL\r
+       BIT STRT1\r
+       IFVS                    ;PRESSED\r
+       LDA #0C0\r
+       ENDIF\r
+       STA OUT1\r
+       ENDIF\r
+       JSR VGCNTR                      ;DISPLAY LIVES\r
+       LDA #96\r
+       LDX #0E\r
+       JSR VGVTR5\r
+       LDA #2\r
+       JSR VGSCAL\r
+       JSR GTOPTN\r
+       LDA LANG\r
+       PHA                     ;SAVE LANGUAGE\r
+       LDA #0\r
+       STA LANG                ;ALWAYS ENGLISH\r
+       LDA HITS\r
+       STA TEMP1\r
+       BEGIN\r
+       LDA LLIVESHIP\r
+       LDX ULIVESHIP\r
+       JSR VGADD2\r
+       DEC TEMP1\r
+       EQEND\r
+       LDA #1\r
+       JSR VGSCAL              ;RETURN TO NORMAL\r
+       JSR VGCNTR              ;CENTER\r
+       LDA #-60\r
+       LDX #0\r
+       JSR VGVTR5              ;POSITION FOR LANG LETTER\r
+       PLA\r
+       TAX                     ;LETTER INDEX\r
+       LDA X,LANGLT            ;GET LETTER\r
+       JSR VGHEX1              ;OUTPUT LETTER\r
+       BIT TWOCMN              ;2 COIN MIN??\r
+       IFVS                    ;YES\r
+       JSR VGCNTR              ;POSITION FOR 2\r
+       LDA #0D\r
+       LDX #4D\r
+       JSR VGVTR5\r
+       LDA #03\r
+       JSR VGHEX1              ;DISPLAY A '2' IF 2 COIN MIN\r
+       ENDIF\r
+       LDY #7                  ;'TOTAL ON TIME'\r
+       JSR DOMSG\r
+       LDX #03\r
+50$:   LDA X,ONTIME\r
+       STA X,TEMP7\r
+       DEX\r
+       BPL 50$                         ;MOVE TO 0 PAGE FOR DISPLAY\r
+       JSR X4                  ;SECONDS TIMES 4\r
+       LDY #4\r
+       JSR DIGIT4\r
+;\r
+;********************************************************************\r
+;************ TIME DISPLAY AND CALULATIONS HERE**********************\r
+;********************************************************************\r
+SHOTIMS:\r
+       LDA #3\r
+       STA TEMPC                       ;WILL HOLD GAME NUMBER HERE\r
+20$:   LDX TEMPC                       ;RECALL GAME NUMBER\r
+       LDY X,TIMIX                     ;OFFSET INTO RAM\r
+       LDX #0                          ;TRANSFER POINTER\r
+21$:   LDA Y,PLAYTIME\r
+       STA X,TEMP7\r
+       INX\r
+       INY\r
+       CPX #4                          ;4 BYTES?\r
+       BNE 21$\r
+       JSR VGCNTR                      ;CENTER BEAM\r
+       LDY TEMPC                       ;NEED THIS AGAIN\r
+       LDA Y,TIPOSX                    ;POSTION OF TIME DISPLAY (X)\r
+       LDX Y,TIPOSY\r
+       JSR VGVTR5                      ;POSITION BEAM\r
+       JSR X4                          ;TEMP * 4 FOR ACTUAL SECOND COUNT\r
+       LDY #4                          ;DISPLAY 4 BYTES (8 DIGITS)\r
+       JSR DIGIT4\r
+       JSR VGCNTR                      ;READY FOR NEXT\r
+       LDY TEMPC                       ;NEED THIS AGAIN\r
+       LDA Y,GMPOSX                    ;GAME COUNT POSITION\r
+       LDX Y,GMPOSY\r
+       JSR VGVTR5                      ;READY FOR DISPLAY\r
+       LDX TEMPC                       ;GET THIS AGAIN!\r
+       LDY X,GAMIX                     ;OFFSET INTO RAM FOR THIS NUMBER\r
+       LDX #0\r
+22$:   LDA Y,GAMES1                    ;TRANSFER TO TEMP FOR DISPLAY\r
+       STA X,TEMP7\r
+       INX\r
+       INY\r
+       CPX #03                         ;3 BYTES?\r
+       BNE 22$\r
+       LDY #03\r
+       JSR DIGIT4                      ;DISPLAY 3 BYTES (6 DIGITS)\r
+       JSR VGCNTR                      ;GET READY FOR NEXT DISPLAY\r
+       LDY TEMPC                       ;GUESS WHAT I NEED AGAIN\r
+       LDA Y,AVPOSX                    ;X POSITION OF AVG GAME TIME DISPLAY\r
+       LDX Y,AVPOSY                    ;Y POSIT.\r
+       JSR VGVTR5                      ;READY FOR DISPLAY\r
+       LDY TEMPC                       ;MAX AVG TIME IS 255 * 4 SECONDS\r
+       LDA Y,OBJ                       ;GET NUMBER\r
+       JSR DECIMAL                     ;CONVERT TO DECIMAL (RESULTS IN TEMP7&8)\r
+       JSR X4                          ;CONVERT TO 4 COUNT SECONDS\r
+       LDY #02\r
+       JSR DIGIT4                      ;DISPLAY 2 BYTES (4 DIGITS)\r
+       DEC TEMPC\r
+       BMI 30$                         ;DONE\r
+       JMP 20$                         ;DO NEXT\r
+30$:\r
+\r
+;\r
+;OPTIONS.........\r
+;\r
+       LDY #0                          ;''PUSH START & SELECT'\r
+       JSR DOMSG\r
+;\r
+;SELECT OPTIONS\r
+       LDA TEMP11\r
+       AND #03                 ;SELECTED OPTION 1 OF 4\r
+       TAY\r
+       INY                     ;CORRECT OPTION MESSAGE\r
+       JSR DOMSG\r
+       LDA STRT1                       ;CHECK FOR BOTH STARTS PUSHED\r
+       ASL                             ;D6=STARTS,MOVE TO D7\r
+       AND GAMSEL\r
+       BPL NOOPTN                      ;NOT BOTH PUSHED\r
+       JSR SSTATE\r
+NOOPTN:\r
+       LDA GAMSEL                      ;SELECT PUSHED?\r
+       BPL 10$                         ;YES\r
+       STA TEMP12                      ;NOT PUSHED, CLEAR FLAG\r
+       BMI 20$                         ;*****ALWAYS*******\r
+10$:   ORA TEMP12                      ;PUSHED BEFORE?\r
+       BPL 20$                         ;YES, SKIP\r
+       LDA #0\r
+       STA TEMP12                      ;CLEAR FLAG\r
+       INC TEMP11                      ;BUMP OPTION\r
+20$:   LDA EAFLG                       ;EAROM OPERATING?\r
+       BEQ 40$                 ;NO\r
+       LDA EAZFLG                      ;ERASEING?\r
+       BEQ 40$\r
+       LDY #05                 ;'ERASING'\r
+       JSR DOMSG\r
+;\r
+40$:   LDY #6                  ;'BONUS ADDRES\r
+       JSR DOMSG\r
+       LDA $CMODE              ;DISPLAY BONUS ADDER MODE\r
+       ROL\r
+       ROL\r
+       ROL\r
+       ROL                     ;MOVE TO BOTTOM 3 BITS\r
+       AND #07\r
+       TAX\r
+       LDA X,BONADT            ;GET DISPLAY INFO\r
+       STA TEMP7               ;PUT HERE FOR DISPLAY\r
+       CLC\r
+       LDY #01\r
+       JSR DIGIT4\r
+       JSR VGCNTR              ;CENTER BEAM THEN...\r
+       LDA #0D7\r
+       LDX #038                ;...POSITION BEAM FOR...\r
+       JSR VGVTR1\r
+       JSR OPTND               ;...OUTPUT OF OPTIONS\r
+       JSR VGHALT\r
+       LDA HALT\r
+       AND #ST.BIT             ;STILL TEST\r
+       BEQ 45$\r
+       LDA #0\r
+       STA FRAME               ;START ATTRACT OVER\r
+       STA FRAME+1\r
+       STA NROCKS\r
+       STA ATSTG\r
+       JMP PWRON               ;NOT TEST\r
+45$:   JSR SWTST               ;BEEP ON SWITCH PUSHED\r
+       JMP ST2                 ;CONTINUE HERE\r
+;\r
+;BONUS ADDRES TABLE FOR DISPLAY\r
+;\r
+BONADT:        .BYTE 0,12,14,24,15,0,0,0\r
+;\r
+;\r
+;X AND Y POSITIONS OF FIGHTERS AND SPACE STATION NAMES\r
+;\r
+Y1POS: .BYTE 0E8,0C8,0A8\r
+Y2POS: .BYTE 0E0,0C0,0A0\r
+TIPOSX:        .BYTE 0F8,40,0F8,40\r
+TIPOSY:        .BYTE 0E8,0E8,0E0,0E0\r
+GMPOSX:        .BYTE 4,4C,4,4C\r
+GMPOSY:        .BYTE 0C8,0C8,0C0,0C0\r
+AVPOSX:        .BYTE 10,58,10,58\r
+AVPOSY:        .BYTE 0A8,0A8,0A0,0A0\r
+LANGLT:        .BYTE 0F,11,10,1D\r
+;DIFFICULITY MESSAGE #\r
+       .PAGE\r
+       .SBTTL HEX TO BCD CONVERSION\r
+;\r
+;HEX TO BCD CONVERSION\r
+;INPUT: A=HEX\r
+;OUTPUT:       TEMP7=MSB       TEMP7+1=LSB\r
+;\r
+DECIMAL:\r
+       STA TEMP9\r
+       LDY #07                 ;BIT COUNT\r
+       LDA #0\r
+       STA TEMP7\r
+       STA TEMP7+1             ;CLEAR END REGS\r
+       SED                     ;****WARNING--DECIMAL MODE*******\r
+10$:   ASL TEMP9\r
+       LDA TEMP7\r
+       ADC TEMP7\r
+       STA TEMP7\r
+       LDA TEMP7+1\r
+       ADC TEMP7+1\r
+       STA TEMP7+1\r
+       DEY\r
+       BPL 10$\r
+       CLD\r
+       RTS\r
+;\r
+;DISPLAY X DIGITS FROM TEMP7 UP\r
+;INPUT:        X=NUMBER OF DIGITS\r
+;      TEMP7(UP)=BCD DIGITS TO DISPLAY\r
+;\r
+DIGIT4:        SEC                     ;SET 0 BALNKING\r
+DIGIT5:        LDA #TEMP7              ;POINTER TO DATA\r
+       JMP DIGITS\r
+\r
+;\r
+;MULTIPLY BY 2 DECIMAL\r
+;\r
+X2:    CLC\r
+       SED                     ;*******WARNING--DECIMAL MODE\r
+       LDX #0\r
+       LDY #02\r
+10$:   LDA X,TEMP7\r
+       ADC X,TEMP7\r
+       STA X,TEMP7\r
+       INX\r
+       DEY\r
+       BPL 10$\r
+       CLD\r
+       RTS\r
+;\r
+;TIMES 4 DECIMAL\r
+;\r
+X4:    JSR X2\r
+       JMP X2\r
+       .PAGE\r
+;\r
+;\r
+       .SBTTL GOSUB CASE ROUTIME FOR PRE-TEST\r
+;\r
+;JUMP TABLE OF ROUTINES\r
+;\r
+STJMP: .WORD POWERON-1                 ;DO SELF TEST\r
+       .WORD CLRHIS-1                  ;CLEAR SCORES\r
+       .WORD CLRBOO-1\r
+       .WORD CLRERO-1\r
+;\r
+;GO SUB ROUTINE\r
+SSTATE:        LDA TEMP11                      ;OPTION SELECTED\r
+       AND #03\r
+       ASL                     ;WORDS (X2)\r
+       TAX\r
+       LDA X,STJMP+1\r
+       PHA\r
+       LDA X,STJMP\r
+       PHA\r
+       RTS                     ;JUMP TO ROUTINE\r
+;RTS DOES THE EQUIV. OF A JUMP, THE OTHER ROUTINE WILL RTS FOR BOTH\r
+;\r
+;\r
+;CLEAR TIMES\r
+;\r
+CLRBOO:        JSR EAZBOO\r
+CLRBUF:        LDA #0\r
+       LDX #41.\r
+10$:   STA X,ONTIME            ;CLEAR RAM ALSO\r
+       STA X,OBJ               ;CLEAR TEMP BUFFER TOO\r
+       DEX\r
+       BPL 10$\r
+       RTS\r
+;\r
+;CLEAR BOTH\r
+;\r
+CLRERO:        JSR EAZERO\r
+       JSR CLRBUF\r
+       JMP MOVIN               ;RECOPY DEFAULT INITIALS\r
+;\r
+;CLEAR SCORES\r
+;\r
+CLRHIS:        JSR EAZHIS\r
+       JMP MOVIN               ;RECOPY DEFAULT INITIALS\r
+       .SBTTL DOMSG -- DO CORRECT MESSAGE AND COLOR\r
+;\r
+;PASS X = MESSAGE NUMBER IN THIS ROUTINE\r
+;\r
+DOMSG: STY TEMP5               ;SAVE Y\r
+       JSR VGCNTR\r
+       LDY TEMP5\r
+       LDA Y,X3POS             ;POSITION MESSAGE\r
+       LDX Y,Y3POS\r
+       JSR VGVTR5              ;POSITION\r
+       LDX TEMP5               ;DO COLOR MESSAGE\r
+       LDA X,MSGCOL            ;COLOR\r
+       LDY X,MSGNUM            ;MESSAGE NUMBER\r
+       JMP VGMSG4              ;(EXIT)\r
+;\r
+; MESSAGES\r
+;0     PUSH START AND SELECT\r
+;1     FOR SELF TEST\r
+;2     TO CLEAR SCORES\r
+;3     TO CLEAR TIME\r
+;4     TO CLEAR SCORES AND TIMES\r
+;5     ERASING\r
+;6     BONUS ADDRER\r
+;7     TOTAL ON TIME\r
+;8     1 PLAYER\r
+;9     2 PLAYERS\r
+;0A    SECONDS\r
+;0B    GAMES\r
+;0C    AVG TIME\r
+;0D    EASY\r
+;0E    NORMAL\r
+;0F    MEDIUM\r
+;10    HARD\r
+;\r
+X3POS: .BYTE -200./4,-80./4,-112./4,-96./4,-240./4\r
+       .BYTE -64./4,-144./4,-256./4,256./4,-16./4\r
+       .BYTE -464./4,-464./4,-464./4,-8,-8,-8,-8\r
+Y3POS: .BYTE 80./4,48./4,48./4,48./4,48./4\r
+       .BYTE 112./4,272./4,144./4,0,0\r
+       .BYTE -64./4,-192./4,-320./4,56,56,56,56\r
+MSGCOL:        .BYTE BLUE+0E0,BLUE+0E0,BLUE+0E0,BLUE+0E0,BLUE+0E0\r
+       .BYTE RED+0E0,GRBLUE+0E0,YELLOW+0E0,WHITE+0E0,WHITE+0E0\r
+       .BYTE WHITE+0E0,WHITE+0E0,WHITE+0E0,WHITE+0E0,WHITE+0E0\r
+       .BYTE WHITE+0E0,WHITE+0E0\r
+;MESSAGE NUMBER IN REAL MESSAGE ROUTINE\r
+MSGNUM:        .BYTE 22,1D,1E,1F,20,21,23,24,0B,0C,1A,1B,1C\r
+       .BYTE 19,10,11,25\r
+       HLL65\r
+       .END\r
+\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/A2GOOF.MAC b/A2GOOF.MAC
new file mode 100644 (file)
index 0000000..482f1ce
Binary files /dev/null and b/A2GOOF.MAC differ
diff --git a/A2HEXR.DAT b/A2HEXR.DAT
new file mode 100644 (file)
index 0000000..037f11b
Binary files /dev/null and b/A2HEXR.DAT differ
diff --git a/A2IRQ.MAC b/A2IRQ.MAC
new file mode 100644 (file)
index 0000000..6cacb4c
Binary files /dev/null and b/A2IRQ.MAC differ
diff --git a/A2NAME.MAC b/A2NAME.MAC
new file mode 100644 (file)
index 0000000..d0749d9
Binary files /dev/null and b/A2NAME.MAC differ
diff --git a/A2NEW3.DAT b/A2NEW3.DAT
new file mode 100644 (file)
index 0000000..b58d46b
Binary files /dev/null and b/A2NEW3.DAT differ
diff --git a/A2PENT.DAT b/A2PENT.DAT
new file mode 100644 (file)
index 0000000..b2743c6
Binary files /dev/null and b/A2PENT.DAT differ
diff --git a/A2PLN.DAT b/A2PLN.DAT
new file mode 100644 (file)
index 0000000..91035f9
Binary files /dev/null and b/A2PLN.DAT differ
diff --git a/A2PYRM.DAT b/A2PYRM.DAT
new file mode 100644 (file)
index 0000000..8db3994
Binary files /dev/null and b/A2PYRM.DAT differ
diff --git a/A2SAUC.DAT b/A2SAUC.DAT
new file mode 100644 (file)
index 0000000..be22322
Binary files /dev/null and b/A2SAUC.DAT differ
diff --git a/A2SHIP.LDA b/A2SHIP.LDA
new file mode 100644 (file)
index 0000000..83a0882
Binary files /dev/null and b/A2SHIP.LDA differ
diff --git a/A2SHIP.MAC b/A2SHIP.MAC
new file mode 100644 (file)
index 0000000..4853ba3
--- /dev/null
@@ -0,0 +1,1079 @@
+       .TITLE AS2EX3-FOR ASTERIODS 2 \r
+       .ASECT\r
+       .RADIX 16\r
+       .LIST MEB\r
+       .NLIST BYT\r
+;**************************************\r
+;*\r
+;*PROGRAMMER: OWEN RUBIN\r
+;*\r
+;*VAX FILE FOR SPACE DUEL SHIP PICTURES\r
+;*\r
+;**************************************\r
+       .GLOBL SHIPS\r
+;MUST BE ASECT\r
+;TAKES PARAMETER, SEE IF THAT MANY MORE BYTES,\r
+;WILL CROSS A PAGE. IF SO, PADS\r
+;NECESSARY BYTES.\r
+       .MACRO CRPAGE,AA\r
+       ...1=.&^H0FF00/^H100    ;CURRENT PAGE\r
+       ...2=.+AA-1\r
+       ...3=...2&^H0FF00/^H100 ;NEXT PAGE\r
+       .IF NE,...1-...3\r
+       .REPT ...3*^H100-.\r
+       .BYTE 0\r
+       .ENDR\r
+       .ENDC\r
+       .ENDM\r
+       \r
+;      .SBTTL TWBYPIC-TWO BYTE PICTURES\r
+;      .MACRO TWBYPIC XX,YY,BB,EE\r
+;      ...1=YY&^H7F+EE\r
+;      ...2=2*XX+BB\r
+;      .BYTE ...1,...2\r
+;      .ENDM\r
+       \r
+       .MACRO TWBYPIC XX,YY,BB,EE\r
+       .BYTE YY,XX\r
+       .ENDM\r
+;      .SBTTL PICEND-END OF PICTURE FLAG\r
+;      .MACRO PICEND\r
+;      .BYTE ^H80\r
+;      .ENDM\r
+       \r
+       .MACRO PICEND\r
+       .ENDM\r
+       .=^H2800\r
+SHIPS: .WORD SHPA0\r
+       .WORD SHPA1\r
+       .WORD SHPA2\r
+       .WORD SHPA3\r
+       .WORD SHPA4\r
+       .WORD SHPA5\r
+       .WORD SHPA6\r
+       .WORD SHPA7\r
+       .WORD SHPA8\r
+       .WORD SHPA9\r
+       .WORD SHPA10\r
+       .WORD SHPA11\r
+       .WORD SHPA12\r
+       .WORD SHPA13\r
+       .WORD SHPA14\r
+       .WORD SHPA15\r
+       .WORD SHPA16\r
+       .WORD SHPB0\r
+       .WORD SHPB1\r
+       .WORD SHPB2\r
+       .WORD SHPB3\r
+       .WORD SHPB4\r
+       .WORD SHPB5\r
+       .WORD SHPB6\r
+       .WORD SHPB7\r
+       .WORD SHPB8\r
+       .WORD SHPB9\r
+       .WORD SHPB10\r
+       .WORD SHPB11\r
+       .WORD SHPB12\r
+       .WORD SHPB13\r
+       .WORD SHPB14\r
+       .WORD SHPB15\r
+       .WORD SHPB16\r
+       .LENGTH=54.\r
+\f.RADIX 10\r
+       CRPAGE .LENGTH\r
+SHPA0:\r
+              TWBYPIC -12 , 20 , 0 , 0 \r
+              TWBYPIC  24 ,-16 , 1 , 0 \r
+              TWBYPIC  2 , 0 , 1 , 0 \r
+              TWBYPIC  0 , 6 , 1 , 0 \r
+              TWBYPIC  4 , 0 , 1 , 0 \r
+              TWBYPIC  2 ,-6 , 1 , 0 \r
+              TWBYPIC  4 , 0 , 1 , 0 \r
+              TWBYPIC  12 ,-4 , 1 , 0 \r
+              TWBYPIC -12 ,-4 , 1 , 0 \r
+              TWBYPIC -4 , 0 , 1 , 0 \r
+              TWBYPIC -7 ,-6 , 1 , 0 \r
+              TWBYPIC  1 , 0 , 1 , 0 \r
+              TWBYPIC  0 , 6 , 1 , 0 \r
+              TWBYPIC -2 , 0 , 1 , 0 \r
+              TWBYPIC -24 ,-16 , 1 , 0 \r
+              TWBYPIC -16 , 0 , 1 , 128 \r
+              TWBYPIC  0 , 10 , 1 , 0 \r
+              TWBYPIC -4 , 2 , 1 , 0 \r
+              TWBYPIC  0 , 16 , 1 , 0 \r
+              TWBYPIC  4 , 2 , 1 , 0 \r
+              TWBYPIC  0 , 10 , 1 , 0 \r
+              TWBYPIC  16 , 0 , 1 , 0 \r
+               TWBYPIC 12,-20,0,0\r
+              TWBYPIC -32 ,-8 , 0 , 128 \r
+              TWBYPIC -20 , 8 , 1 , 0 \r
+              TWBYPIC  20 , 8 , 1 , 0 \r
+              TWBYPIC  32 ,-8 , 0 , 0 \r
+              PICEND\r
+              CRPAGE .LENGTH\r
+SHPA1:\r
+              TWBYPIC -14 , 19 , 0 , 0 \r
+              TWBYPIC  26 ,-14 , 1 , 0 \r
+              TWBYPIC  2 , 0 , 1 , 0 \r
+              TWBYPIC -1 , 6 , 1 , 0 \r
+              TWBYPIC  4 , 1 , 1 , 0 \r
+              TWBYPIC  3 ,-6 , 1 , 0 \r
+              TWBYPIC  3 , 0 , 1 , 0 \r
+              TWBYPIC  13 ,-2 , 1 , 0 \r
+              TWBYPIC -12 ,-6 , 1 , 0 \r
+              TWBYPIC -4 , 0 , 1 , 0 \r
+              TWBYPIC -6 ,-7 , 1 , 0 \r
+              TWBYPIC  1 , 0 , 1 , 0 \r
+              TWBYPIC -1 , 6 , 1 , 0 \r
+              TWBYPIC -2 , 0 , 1 , 0 \r
+              TWBYPIC -22 ,-18 , 1 , 0 \r
+              TWBYPIC -16 ,-2 , 1 , 128 \r
+              TWBYPIC -1 , 10 , 1 , 0 \r
+              TWBYPIC -4 , 2 , 1 , 0 \r
+              TWBYPIC -2 , 16 , 1 , 0 \r
+              TWBYPIC  4 , 2 , 1 , 0 \r
+              TWBYPIC -1 , 10 , 1 , 0 \r
+              TWBYPIC  16 , 2 , 1 , 0 \r
+               TWBYPIC 14,-19,0,0\r
+              TWBYPIC -31 ,-11 , 0 , 128 \r
+              TWBYPIC -21 , 6 , 1 , 0 \r
+              TWBYPIC  19 , 10 , 1 , 0 \r
+              TWBYPIC  33 ,-5 , 0 , 0 \r
+              PICEND\r
+              CRPAGE .LENGTH\r
+SHPA2:\r
+              TWBYPIC -16 , 17 , 0 , 0 \r
+              TWBYPIC  27 ,-11 , 1 , 0 \r
+              TWBYPIC  2 , 1 , 1 , 0 \r
+              TWBYPIC -1 , 6 , 1 , 0 \r
+              TWBYPIC  4 , 0 , 1 , 0 \r
+              TWBYPIC  3 ,-5 , 1 , 0 \r
+              TWBYPIC  4 , 1 , 1 , 0 \r
+              TWBYPIC  12 ,-2 , 1 , 0 \r
+              TWBYPIC -11 ,-6 , 1 , 0 \r
+              TWBYPIC -4 ,-1 , 1 , 0 \r
+              TWBYPIC -5 ,-7 , 1 , 0 \r
+              TWBYPIC  1 , 0 , 1 , 0 \r
+              TWBYPIC -1 , 6 , 1 , 0 \r
+              TWBYPIC -2 ,-1 , 1 , 0 \r
+              TWBYPIC -21 ,-20 , 1 , 0 \r
+              TWBYPIC -16 ,-3 , 1 , 128 \r
+              TWBYPIC -2 , 10 , 1 , 0 \r
+              TWBYPIC -4 , 1 , 1 , 0 \r
+              TWBYPIC -3 , 16 , 1 , 0 \r
+              TWBYPIC  4 , 2 , 1 , 0 \r
+              TWBYPIC -2 , 10 , 1 , 0 \r
+              TWBYPIC  15 , 3 , 1 , 0 \r
+               TWBYPIC 16,-17,0,0\r
+              TWBYPIC -30 ,-14 , 0 , 128 \r
+              TWBYPIC -21 , 4 , 1 , 0 \r
+              TWBYPIC  18 , 12 , 1 , 0 \r
+              TWBYPIC  33 ,-2 , 0 , 0 \r
+              PICEND\r
+              CRPAGE .LENGTH\r
+SHPA3:\r
+              TWBYPIC -17 , 16 , 0 , 0 \r
+              TWBYPIC  27 ,-9 , 1 , 0 \r
+              TWBYPIC  2 , 1 , 1 , 0 \r
+              TWBYPIC -2 , 6 , 1 , 0 \r
+              TWBYPIC  4 , 1 , 1 , 0 \r
+              TWBYPIC  4 ,-5 , 1 , 0 \r
+              TWBYPIC  4 , 1 , 1 , 0 \r
+              TWBYPIC  12 ,-1 , 1 , 0 \r
+              TWBYPIC -10 ,-7 , 1 , 0 \r
+              TWBYPIC -4 ,-1 , 1 , 0 \r
+              TWBYPIC -5 ,-8 , 1 , 0 \r
+              TWBYPIC  1 , 0 , 1 , 0 \r
+              TWBYPIC -1 , 6 , 1 , 0 \r
+              TWBYPIC -2 , 0 , 1 , 0 \r
+              TWBYPIC -19 ,-23 , 1 , 0 \r
+              TWBYPIC -15 ,-4 , 1 , 128 \r
+              TWBYPIC -3 , 9 , 1 , 0 \r
+              TWBYPIC -4 , 1 , 1 , 0 \r
+              TWBYPIC -5 , 15 , 1 , 0 \r
+              TWBYPIC  3 , 3 , 1 , 0 \r
+              TWBYPIC -3 , 10 , 1 , 0 \r
+              TWBYPIC  16 , 5 , 1 , 0 \r
+               TWBYPIC 17,-16,0,0\r
+              TWBYPIC -28 ,-17 , 0 , 128 \r
+              TWBYPIC -22 , 2 , 1 , 0 \r
+              TWBYPIC  17 , 13 , 1 , 0 \r
+              TWBYPIC  33 , 2 , 0 , 0 \r
+              PICEND\r
+              CRPAGE .LENGTH\r
+SHPA4:\r
+              TWBYPIC -19 , 14 , 0 , 0 \r
+              TWBYPIC  29 ,-6 , 1 , 0 \r
+              TWBYPIC  1 , 1 , 1 , 0 \r
+              TWBYPIC -2 , 6 , 1 , 0 \r
+              TWBYPIC  4 , 1 , 1 , 0 \r
+              TWBYPIC  4 ,-5 , 1 , 0 \r
+              TWBYPIC  4 , 2 , 1 , 0 \r
+              TWBYPIC  12 , 1 , 1 , 0 \r
+              TWBYPIC -9 ,-9 , 1 , 0 \r
+              TWBYPIC -4 ,-1 , 1 , 0 \r
+              TWBYPIC -4 ,-8 , 1 , 0 \r
+              TWBYPIC  1 , 0 , 1 , 0 \r
+              TWBYPIC -3 , 6 , 1 , 0 \r
+              TWBYPIC -1 ,-1 , 1 , 0 \r
+              TWBYPIC -16 ,-24 , 1 , 0 \r
+              TWBYPIC -15 ,-6 , 1 , 128 \r
+              TWBYPIC -4 , 9 , 1 , 0 \r
+              TWBYPIC -5 , 0 , 1 , 0 \r
+              TWBYPIC -6 , 15 , 1 , 0 \r
+              TWBYPIC  3 , 4 , 1 , 0 \r
+              TWBYPIC -4 , 9 , 1 , 0 \r
+              TWBYPIC  15 , 6 , 1 , 0 \r
+               TWBYPIC 19,-14,0,0\r
+              TWBYPIC -27 ,-20 , 0 , 128 \r
+              TWBYPIC -21 , 0 , 1 , 0 \r
+              TWBYPIC  15 , 15 , 1 , 0 \r
+              TWBYPIC  33 , 5 , 0 , 0 \r
+              PICEND\r
+              CRPAGE .LENGTH\r
+SHPA5:\r
+              TWBYPIC -20 , 12 , 0 , 0 \r
+              TWBYPIC  29 ,-3 , 1 , 0 \r
+              TWBYPIC  1 , 1 , 1 , 0 \r
+              TWBYPIC -2 , 5 , 1 , 0 \r
+              TWBYPIC  3 , 2 , 1 , 0 \r
+              TWBYPIC  5 ,-4 , 1 , 0 \r
+              TWBYPIC  3 , 2 , 1 , 0 \r
+              TWBYPIC  13 , 2 , 1 , 0 \r
+              TWBYPIC -9 ,-9 , 1 , 0 \r
+              TWBYPIC -3 ,-2 , 1 , 0 \r
+              TWBYPIC -4 ,-9 , 1 , 0 \r
+              TWBYPIC  1 , 1 , 1 , 0 \r
+              TWBYPIC -3 , 5 , 1 , 0 \r
+              TWBYPIC -2 ,-1 , 1 , 0 \r
+              TWBYPIC -13 ,-25 , 1 , 0 \r
+              TWBYPIC -14 ,-8 , 1 , 128 \r
+              TWBYPIC -5 , 9 , 1 , 0 \r
+              TWBYPIC -4 , 0 , 1 , 0 \r
+              TWBYPIC -8 , 14 , 1 , 0 \r
+              TWBYPIC  3 , 4 , 1 , 0 \r
+              TWBYPIC -5 , 8 , 1 , 0 \r
+              TWBYPIC  14 , 8 , 1 , 0 \r
+               TWBYPIC 20,-12,0,0\r
+              TWBYPIC -24 ,-22 , 0 , 128 \r
+              TWBYPIC -22 ,-3 , 1 , 0 \r
+              TWBYPIC  14 , 17 , 1 , 0 \r
+              TWBYPIC  32 , 8 , 0 , 0 \r
+              PICEND\r
+              CRPAGE .LENGTH\r
+SHPA6:\r
+              TWBYPIC -21 , 10 , 0 , 0 \r
+              TWBYPIC  29 , 0 , 1 , 0 \r
+              TWBYPIC  1 , 1 , 1 , 0 \r
+              TWBYPIC -3 , 5 , 1 , 0 \r
+              TWBYPIC  3 , 2 , 1 , 0 \r
+              TWBYPIC  5 ,-4 , 1 , 0 \r
+              TWBYPIC  4 , 3 , 1 , 0 \r
+              TWBYPIC  12 , 3 , 1 , 0 \r
+              TWBYPIC -8 ,-10 , 1 , 0 \r
+              TWBYPIC -3 ,-2 , 1 , 0 \r
+              TWBYPIC -3 ,-9 , 1 , 0 \r
+              TWBYPIC  1 , 0 , 1 , 0 \r
+              TWBYPIC -3 , 5 , 1 , 0 \r
+              TWBYPIC -2 ,-1 , 1 , 0 \r
+              TWBYPIC -11 ,-26 , 1 , 0 \r
+              TWBYPIC -13 ,-9 , 1 , 128 \r
+              TWBYPIC -6 , 8 , 1 , 0 \r
+              TWBYPIC -4 , 0 , 1 , 0 \r
+              TWBYPIC -9 , 13 , 1 , 0 \r
+              TWBYPIC  2 , 4 , 1 , 0 \r
+              TWBYPIC -5 , 8 , 1 , 0 \r
+              TWBYPIC  13 , 9 , 1 , 0 \r
+               TWBYPIC 20,-12,0,0\r
+              TWBYPIC -22 ,-24 , 0 , 128 \r
+              TWBYPIC -21 ,-5 , 1 , 0 \r
+              TWBYPIC  12 , 18 , 1 , 0 \r
+              TWBYPIC  31 , 11 , 0 , 0 \r
+              CRPAGE .LENGTH\r
+SHPA7:\r
+              TWBYPIC -22 , 8 , 0 , 0 \r
+              TWBYPIC  29 , 3 , 1 , 0 \r
+              TWBYPIC  1 , 1 , 1 , 0 \r
+              TWBYPIC -4 , 5 , 1 , 0 \r
+              TWBYPIC  4 , 2 , 1 , 0 \r
+              TWBYPIC  5 ,-3 , 1 , 0 \r
+              TWBYPIC  3 , 2 , 1 , 0 \r
+              TWBYPIC  12 , 5 , 1 , 0 \r
+              TWBYPIC -7 ,-11 , 1 , 0 \r
+              TWBYPIC -3 ,-2 , 1 , 0 \r
+              TWBYPIC -2 ,-9 , 1 , 0 \r
+              TWBYPIC  1 , 0 , 1 , 0 \r
+              TWBYPIC -4 , 5 , 1 , 0 \r
+              TWBYPIC -1 ,-1 , 1 , 0 \r
+              TWBYPIC -9 ,-28 , 1 , 0 \r
+              TWBYPIC -12 ,-10 , 1 , 128 \r
+              TWBYPIC -6 , 8 , 1 , 0 \r
+              TWBYPIC -5 ,-1 , 1 , 0 \r
+              TWBYPIC -10 , 12 , 1 , 0 \r
+              TWBYPIC  2 , 4 , 1 , 0 \r
+              TWBYPIC -6 , 8 , 1 , 0 \r
+              TWBYPIC  12 , 10 , 1 , 0 \r
+               TWBYPIC 22,-8,0,0\r
+              TWBYPIC -20 ,-26 , 0 , 128 \r
+              TWBYPIC -20 ,-7 , 1 , 0 \r
+              TWBYPIC  10 , 19 , 1 , 0 \r
+              TWBYPIC  30 , 14 , 0 , 0 \r
+              PICEND\r
+              CRPAGE .LENGTH\r
+SHPA8:\r
+              TWBYPIC -23 , 6 , 0 , 0 \r
+              TWBYPIC  29 , 5 , 1 , 0 \r
+              TWBYPIC  1 , 2 , 1 , 0 \r
+              TWBYPIC -4 , 4 , 1 , 0 \r
+              TWBYPIC  3 , 3 , 1 , 0 \r
+              TWBYPIC  5 ,-3 , 1 , 0 \r
+              TWBYPIC  3 , 3 , 1 , 0 \r
+              TWBYPIC  11 , 5 , 1 , 0 \r
+              TWBYPIC -5 ,-11 , 1 , 0 \r
+              TWBYPIC -3 ,-3 , 1 , 0 \r
+              TWBYPIC -1 ,-9 , 1 , 0 \r
+              TWBYPIC  1 , 1 , 1 , 0 \r
+              TWBYPIC -4 , 4 , 1 , 0 \r
+              TWBYPIC -2 ,-1 , 1 , 0 \r
+              TWBYPIC -5 ,-29 , 1 , 0 \r
+              TWBYPIC -12 ,-11 , 1 , 128 \r
+              TWBYPIC -7 , 7 , 1 , 0 \r
+              TWBYPIC -4 ,-1 , 1 , 0 \r
+              TWBYPIC -11 , 11 , 1 , 0 \r
+              TWBYPIC  1 , 4 , 1 , 0 \r
+              TWBYPIC -7 , 7 , 1 , 0 \r
+              TWBYPIC  11 , 12 , 1 , 0 \r
+              TWBYPIC  23 ,-6 , 0 , 0 \r
+              TWBYPIC -17 ,-28 , 0 , 128 \r
+              TWBYPIC -20 ,-9 , 1 , 0 \r
+              TWBYPIC  9 , 20 , 1 , 0 \r
+              TWBYPIC  28 , 17 , 0 , 0 \r
+              PICEND\r
+              CRPAGE .LENGTH\r
+SHPA9:\r
+              TWBYPIC -23 , 3 , 0 , 0 \r
+              TWBYPIC  28 , 9 , 1 , 0 \r
+              TWBYPIC  1 , 1 , 1 , 0 \r
+              TWBYPIC -5 , 4 , 1 , 0 \r
+              TWBYPIC  3 , 3 , 1 , 0 \r
+              TWBYPIC  6 ,-2 , 1 , 0 \r
+              TWBYPIC  2 , 3 , 1 , 0 \r
+              TWBYPIC  11 , 7 , 1 , 0 \r
+              TWBYPIC -5 ,-12 , 1 , 0 \r
+              TWBYPIC -2 ,-3 , 1 , 0 \r
+              TWBYPIC  0 ,-9 , 1 , 0 \r
+              TWBYPIC  1 , 0 , 1 , 0 \r
+              TWBYPIC -5 , 4 , 1 , 0 \r
+              TWBYPIC -1 ,-1 , 1 , 0 \r
+              TWBYPIC -3 ,-29 , 1 , 0 \r
+              TWBYPIC -10 ,-12 , 1 , 128 \r
+              TWBYPIC -8 , 6 , 1 , 0 \r
+              TWBYPIC -4 ,-2 , 1 , 0 \r
+              TWBYPIC -12 , 10 , 1 , 0 \r
+              TWBYPIC  1 , 5 , 1 , 0 \r
+              TWBYPIC -8 , 6 , 1 , 0 \r
+              TWBYPIC  10 , 12 , 1 , 0 \r
+       TWBYPIC 23,-3,0,0\r
+              TWBYPIC -14 ,-30 , 0 , 128 \r
+              TWBYPIC -19 ,-10 , 1 , 0 \r
+              TWBYPIC  7 , 20 , 1 , 0 \r
+              TWBYPIC  26 , 20 , 0 , 0 \r
+              PICEND\r
+              CRPAGE .LENGTH\r
+SHPA10:\r
+              TWBYPIC -23 , 1 , 0 , 0 \r
+              TWBYPIC  26 , 11 , 1 , 0 \r
+              TWBYPIC  1 , 2 , 1 , 0 \r
+              TWBYPIC -5 , 3 , 1 , 0 \r
+              TWBYPIC  3 , 4 , 1 , 0 \r
+              TWBYPIC  6 ,-2 , 1 , 0 \r
+              TWBYPIC  2 , 3 , 1 , 0 \r
+              TWBYPIC  10 , 8 , 1 , 0 \r
+              TWBYPIC -3 ,-12 , 1 , 0 \r
+              TWBYPIC -3 ,-4 , 1 , 0 \r
+              TWBYPIC  2 ,-9 , 1 , 0 \r
+              TWBYPIC  0 , 1 , 1 , 0 \r
+              TWBYPIC -5 , 3 , 1 , 0 \r
+              TWBYPIC -1 ,-1 , 1 , 0 \r
+              TWBYPIC  0 ,-29 , 1 , 0 \r
+              TWBYPIC -9 ,-13 , 1 , 128 \r
+              TWBYPIC -8 , 5 , 1 , 0 \r
+              TWBYPIC -4 ,-2 , 1 , 0 \r
+              TWBYPIC -13 , 9 , 1 , 0 \r
+              TWBYPIC  0 , 4 , 1 , 0 \r
+              TWBYPIC -8 , 6 , 1 , 0 \r
+              TWBYPIC  9 , 13 , 1 , 0 \r
+               TWBYPIC 23,-1,0,0\r
+              TWBYPIC -11 ,-31 , 0 , 128 \r
+              TWBYPIC -18 ,-12 , 1 , 0 \r
+              TWBYPIC  5 , 21 , 1 , 0 \r
+              TWBYPIC  24 , 22 , 0 , 0 \r
+              PICEND\r
+              CRPAGE .LENGTH\r
+SHPA11:\r
+              TWBYPIC -23 ,-1 , 0 , 0 \r
+              TWBYPIC  25 , 13 , 1 , 0 \r
+              TWBYPIC  1 , 2 , 1 , 0 \r
+              TWBYPIC -5 , 3 , 1 , 0 \r
+              TWBYPIC  2 , 4 , 1 , 0 \r
+              TWBYPIC  6 ,-1 , 1 , 0 \r
+              TWBYPIC  2 , 3 , 1 , 0 \r
+              TWBYPIC  9 , 9 , 1 , 0 \r
+              TWBYPIC -2 ,-13 , 1 , 0 \r
+              TWBYPIC -2 ,-3 , 1 , 0 \r
+              TWBYPIC  2 ,-9 , 1 , 0 \r
+              TWBYPIC  0 , 1 , 1 , 0 \r
+              TWBYPIC -5 , 2 , 1 , 0 \r
+              TWBYPIC -1 ,-1 , 1 , 0 \r
+              TWBYPIC  3 ,-29 , 1 , 0 \r
+              TWBYPIC -8 ,-14 , 1 , 128 \r
+              TWBYPIC -8 , 5 , 1 , 0 \r
+              TWBYPIC -4 ,-3 , 1 , 0 \r
+              TWBYPIC -14 , 8 , 1 , 0 \r
+              TWBYPIC  0 , 4 , 1 , 0 \r
+              TWBYPIC -9 , 5 , 1 , 0 \r
+              TWBYPIC  8 , 14 , 1 , 0 \r
+               TWBYPIC 23,1,0,0\r
+              TWBYPIC -8 ,-32 , 0 , 128 \r
+              TWBYPIC -17 ,-14 , 1 , 0 \r
+              TWBYPIC  3 , 22 , 1 , 0 \r
+              TWBYPIC  22 , 24 , 0 , 0 \r
+              PICEND\r
+              CRPAGE .LENGTH\r
+SHPA12:\r
+              TWBYPIC -23 ,-3 , 0 , 0 \r
+              TWBYPIC  24 , 16 , 1 , 0 \r
+              TWBYPIC  1 , 1 , 1 , 0 \r
+              TWBYPIC -6 , 3 , 1 , 0 \r
+              TWBYPIC  2 , 3 , 1 , 0 \r
+              TWBYPIC  6 , 0 , 1 , 0 \r
+              TWBYPIC  1 , 4 , 1 , 0 \r
+              TWBYPIC  9 , 9 , 1 , 0 \r
+              TWBYPIC -1 ,-12 , 1 , 0 \r
+              TWBYPIC -2 ,-4 , 1 , 0 \r
+              TWBYPIC  3 ,-9 , 1 , 0 \r
+              TWBYPIC  1 , 1 , 1 , 0 \r
+              TWBYPIC -6 , 2 , 1 , 0 \r
+              TWBYPIC -1 ,-1 , 1 , 0 \r
+              TWBYPIC  6 ,-29 , 1 , 0 \r
+              TWBYPIC -6 ,-15 , 1 , 128 \r
+              TWBYPIC -9 , 4 , 1 , 0 \r
+              TWBYPIC -4 ,-3 , 1 , 0 \r
+              TWBYPIC -15 , 6 , 1 , 0 \r
+              TWBYPIC  0 , 5 , 1 , 0 \r
+              TWBYPIC -9 , 4 , 1 , 0 \r
+              TWBYPIC  6 , 15 , 1 , 0 \r
+               TWBYPIC 23,3,0,0\r
+              TWBYPIC -5 ,-33 , 0 , 128 \r
+              TWBYPIC -15 ,-15 , 1 , 0 \r
+              TWBYPIC  0 , 21 , 1 , 0 \r
+              TWBYPIC  20 , 27 , 0 , 0 \r
+              PICEND\r
+              CRPAGE .LENGTH\r
+SHPA13:\r
+              TWBYPIC -23 ,-6 , 0 , 0 \r
+              TWBYPIC  23 , 19 , 1 , 0 \r
+              TWBYPIC  0 , 2 , 1 , 0 \r
+              TWBYPIC -6 , 1 , 1 , 0 \r
+              TWBYPIC  2 , 4 , 1 , 0 \r
+              TWBYPIC  6 , 0 , 1 , 0 \r
+              TWBYPIC  1 , 4 , 1 , 0 \r
+              TWBYPIC  7 , 10 , 1 , 0 \r
+              TWBYPIC  1 ,-12 , 1 , 0 \r
+              TWBYPIC -1 ,-4 , 1 , 0 \r
+              TWBYPIC  3 ,-8 , 1 , 0 \r
+              TWBYPIC  1 , 0 , 1 , 0 \r
+              TWBYPIC -6 , 2 , 1 , 0 \r
+              TWBYPIC -1 ,-2 , 1 , 0 \r
+              TWBYPIC  9 ,-27 , 1 , 0 \r
+              TWBYPIC -5 ,-16 , 1 , 128 \r
+              TWBYPIC -10 , 3 , 1 , 0 \r
+              TWBYPIC -3 ,-3 , 1 , 0 \r
+              TWBYPIC -15 , 5 , 1 , 0 \r
+              TWBYPIC -1 , 4 , 1 , 0 \r
+              TWBYPIC -9 , 3 , 1 , 0 \r
+              TWBYPIC  4 , 15 , 1 , 0 \r
+               TWBYPIC 23,6,0,0\r
+              TWBYPIC -2 ,-33 , 0 , 128 \r
+              TWBYPIC -13 ,-17 , 1 , 0 \r
+              TWBYPIC -2 , 22 , 1 , 0 \r
+              TWBYPIC  17 , 28 , 0 , 0 \r
+              PICEND\r
+              CRPAGE .LENGTH\r
+SHPA14:\r
+              TWBYPIC -22 ,-8 , 0 , 0 \r
+              TWBYPIC  20 , 21 , 1 , 0 \r
+              TWBYPIC  1 , 2 , 1 , 0 \r
+              TWBYPIC -6 , 1 , 1 , 0 \r
+              TWBYPIC  1 , 4 , 1 , 0 \r
+              TWBYPIC  6 , 0 , 1 , 0 \r
+              TWBYPIC  1 , 4 , 1 , 0 \r
+              TWBYPIC  6 , 11 , 1 , 0 \r
+              TWBYPIC  2 ,-12 , 1 , 0 \r
+              TWBYPIC -1 ,-4 , 1 , 0 \r
+              TWBYPIC  4 ,-8 , 1 , 0 \r
+              TWBYPIC  1 , 1 , 1 , 0 \r
+              TWBYPIC -6 , 1 , 1 , 0 \r
+              TWBYPIC -1 ,-2 , 1 , 0 \r
+              TWBYPIC  11 ,-27 , 1 , 0 \r
+              TWBYPIC -3 ,-15 , 1 , 128 \r
+              TWBYPIC -10 , 2 , 1 , 0 \r
+              TWBYPIC -2 ,-4 , 1 , 0 \r
+              TWBYPIC -16 , 3 , 1 , 0 \r
+              TWBYPIC -1 , 4 , 1 , 0 \r
+              TWBYPIC -10 , 2 , 1 , 0 \r
+              TWBYPIC  3 , 16 , 1 , 0 \r
+               TWBYPIC 22,8,0,0\r
+              TWBYPIC  2 ,-33 , 0 , 128 \r
+              TWBYPIC -12 ,-18 , 1 , 0 \r
+              TWBYPIC -4 , 21 , 1 , 0 \r
+              TWBYPIC  14 , 30 , 0 , 0 \r
+              PICEND\r
+              CRPAGE .LENGTH\r
+SHPA15:\r
+              TWBYPIC -21 ,-10 , 0 , 0 \r
+              TWBYPIC  18 , 22 , 1 , 0 \r
+              TWBYPIC  0 , 2 , 1 , 0 \r
+              TWBYPIC -6 , 1 , 1 , 0 \r
+              TWBYPIC  1 , 4 , 1 , 0 \r
+              TWBYPIC  6 , 1 , 1 , 0 \r
+              TWBYPIC  0 , 4 , 1 , 0 \r
+              TWBYPIC  6 , 12 , 1 , 0 \r
+              TWBYPIC  2 ,-13 , 1 , 0 \r
+              TWBYPIC  0 ,-3 , 1 , 0 \r
+              TWBYPIC  5 ,-8 , 1 , 0 \r
+              TWBYPIC  0 , 1 , 1 , 0 \r
+              TWBYPIC -6 , 1 , 1 , 0 \r
+              TWBYPIC  0 ,-2 , 1 , 0 \r
+              TWBYPIC  14 ,-26 , 1 , 0 \r
+              TWBYPIC -2 ,-16 , 1 , 128 \r
+              TWBYPIC -10 , 1 , 1 , 0 \r
+              TWBYPIC -2 ,-4 , 1 , 0 \r
+              TWBYPIC -16 , 2 , 1 , 0 \r
+              TWBYPIC -2 , 4 , 1 , 0 \r
+              TWBYPIC -10 , 1 , 1 , 0 \r
+              TWBYPIC  2 , 16 , 1 , 0 \r
+               TWBYPIC 21,10,0,0\r
+              TWBYPIC  5 ,-33 , 0 , 128 \r
+              TWBYPIC -10 ,-19 , 1 , 0 \r
+              TWBYPIC -6 , 21 , 1 , 0 \r
+              TWBYPIC  11 , 31 , 0 , 0 \r
+              PICEND\r
+              CRPAGE .LENGTH\r
+SHPA16:\r
+              TWBYPIC -20 ,-12 , 0 , 0 \r
+              TWBYPIC  16 , 24 , 1 , 0 \r
+              TWBYPIC  0 , 2 , 1 , 0 \r
+              TWBYPIC -6 , 0 , 1 , 0 \r
+              TWBYPIC  0 , 4 , 1 , 0 \r
+              TWBYPIC  6 , 2 , 1 , 0 \r
+              TWBYPIC  0 , 4 , 1 , 0 \r
+              TWBYPIC  4 , 12 , 1 , 0 \r
+              TWBYPIC  4 ,-12 , 1 , 0 \r
+              TWBYPIC  0 ,-4 , 1 , 0 \r
+              TWBYPIC  6 ,-7 , 1 , 0 \r
+              TWBYPIC  0 , 1 , 1 , 0 \r
+              TWBYPIC -6 , 0 , 1 , 0 \r
+              TWBYPIC  0 ,-2 , 1 , 0 \r
+              TWBYPIC  16 ,-24 , 1 , 0 \r
+              TWBYPIC  0 ,-16 , 1 , 128 \r
+              TWBYPIC -10 , 0 , 1 , 0 \r
+              TWBYPIC -2 ,-4 , 1 , 0 \r
+              TWBYPIC -16 , 0 , 1 , 0 \r
+              TWBYPIC -2 , 4 , 1 , 0 \r
+              TWBYPIC -10 , 0 , 1 , 0 \r
+              TWBYPIC  0 , 16 , 1 , 0 \r
+              TWBYPIC  20 , 12 , 0 , 0 \r
+              TWBYPIC  8 ,-32 , 0 , 128 \r
+              TWBYPIC -8 ,-20 , 1 , 0 \r
+              TWBYPIC -8 , 20 , 1 , 0 \r
+              TWBYPIC  8 , 32 , 0 , 0 \r
+              PICEND\r
+       .LENGTH=50.\r
+CRPAGE .LENGTH\r
+SHPB0:\r
+              TWBYPIC -24 , 20 , 0 , 0 \r
+              TWBYPIC  20 , 0 , 1 , 0 \r
+              TWBYPIC  4 ,-8 , 1 , 0 \r
+              TWBYPIC -8 , 1 , 1 , 0 \r
+              TWBYPIC  4 ,-7 , 1 , 0 \r
+              TWBYPIC  16 , 0 , 1 , 0 \r
+              TWBYPIC  24 ,-4 , 1 , 0 \r
+              TWBYPIC  0 ,-4 , 1 , 0 \r
+              TWBYPIC -24 ,-4 , 1 , 0 \r
+              TWBYPIC -16 , 0 , 1 , 0 \r
+              TWBYPIC -4 ,-6 , 1 , 0 \r
+              TWBYPIC  8 , 0 , 1 , 0 \r
+              TWBYPIC -4 ,-8 , 1 , 0 \r
+              TWBYPIC -20 , 0 , 1 , 128 \r
+              TWBYPIC -8 , 8 , 1 , 0 \r
+              TWBYPIC  8 , 0 , 1 , 0 \r
+              TWBYPIC  4 , 12 , 1 , 0 \r
+              TWBYPIC -4 , 12 , 1 , 0 \r
+              TWBYPIC -8 , 0 , 1 , 0 \r
+              TWBYPIC  8 , 8 , 1 , 0 \r
+              TWBYPIC  24 ,-20 , 0 , 0 \r
+              TWBYPIC -24 , 12 , 0 , 128 \r
+              TWBYPIC -16 ,-12 , 1 , 0 \r
+              TWBYPIC  16 ,-12 , 1 , 0 \r
+              TWBYPIC  24 , 12 , 0 , 0 \r
+              PICEND\r
+CRPAGE .LENGTH\r
+SHPB1:\r
+              TWBYPIC -26 , 18 , 0 , 0 \r
+              TWBYPIC  20 , 2 , 1 , 0 \r
+              TWBYPIC  5 ,-8 , 1 , 0 \r
+              TWBYPIC -8 , 0 , 1 , 0 \r
+              TWBYPIC  4 ,-6 , 1 , 0 \r
+              TWBYPIC  16 , 1 , 1 , 0 \r
+              TWBYPIC  25 ,-1 , 1 , 0 \r
+              TWBYPIC  0 ,-4 , 1 , 0 \r
+              TWBYPIC -23 ,-7 , 1 , 0 \r
+              TWBYPIC -16 ,-1 , 1 , 0 \r
+              TWBYPIC -4 ,-7 , 1 , 0 \r
+              TWBYPIC  8 , 1 , 1 , 0 \r
+              TWBYPIC -3 ,-8 , 1 , 0 \r
+              TWBYPIC -20 ,-2 , 1 , 128 \r
+              TWBYPIC -9 , 7 , 1 , 0 \r
+              TWBYPIC  8 , 1 , 1 , 0 \r
+              TWBYPIC  3 , 12 , 1 , 0 \r
+              TWBYPIC -5 , 12 , 1 , 0 \r
+              TWBYPIC -8 ,-1 , 1 , 0 \r
+              TWBYPIC  7 , 9 , 1 , 0 \r
+              TWBYPIC  26 ,-18 , 0 , 0 \r
+              TWBYPIC -25 , 10 , 0 , 128 \r
+              TWBYPIC -15 ,-14 , 1 , 0 \r
+              TWBYPIC  17 ,-10 , 1 , 0 \r
+              TWBYPIC  23 , 14 , 0 , 0 \r
+              PICEND\r
+CRPAGE .LENGTH\r
+SHPB2:\r
+              TWBYPIC -27 , 15 , 0 , 0 \r
+              TWBYPIC  19 , 4 , 1 , 0 \r
+              TWBYPIC  6 ,-7 , 1 , 0 \r
+              TWBYPIC -8 ,-1 , 1 , 0 \r
+              TWBYPIC  5 ,-6 , 1 , 0 \r
+              TWBYPIC  16 , 3 , 1 , 0 \r
+              TWBYPIC  24 , 1 , 1 , 0 \r
+              TWBYPIC  1 ,-4 , 1 , 0 \r
+              TWBYPIC -23 ,-9 , 1 , 0 \r
+              TWBYPIC -16 ,-3 , 1 , 0 \r
+              TWBYPIC -3 ,-6 , 1 , 0 \r
+              TWBYPIC  8 , 1 , 1 , 0 \r
+              TWBYPIC -2 ,-8 , 1 , 0 \r
+              TWBYPIC -20 ,-4 , 1 , 128 \r
+              TWBYPIC -9 , 6 , 1 , 0 \r
+              TWBYPIC  8 , 2 , 1 , 0 \r
+              TWBYPIC  1 , 12 , 1 , 0 \r
+              TWBYPIC -6 , 11 , 1 , 0 \r
+              TWBYPIC -8 ,-1 , 1 , 0 \r
+              TWBYPIC  7 , 9 , 1 , 0 \r
+              TWBYPIC  27 ,-15 , 0 , 0 \r
+              TWBYPIC -26 , 7 , 0 , 128 \r
+              TWBYPIC -13 ,-15 , 1 , 0 \r
+              TWBYPIC  18 ,-8 , 1 , 0 \r
+              TWBYPIC  21 , 16 , 0 , 0 \r
+              PICEND\r
+CRPAGE .LENGTH\r
+SHPB3:\r
+              TWBYPIC -29 , 12 , 0 , 0 \r
+              TWBYPIC  19 , 6 , 1 , 0 \r
+              TWBYPIC  7 ,-7 , 1 , 0 \r
+              TWBYPIC -8 ,-1 , 1 , 0 \r
+              TWBYPIC  5 ,-5 , 1 , 0 \r
+              TWBYPIC  16 , 4 , 1 , 0 \r
+              TWBYPIC  24 , 3 , 1 , 0 \r
+              TWBYPIC  1 ,-3 , 1 , 0 \r
+              TWBYPIC -22 ,-11 , 1 , 0 \r
+              TWBYPIC -15 ,-5 , 1 , 0 \r
+              TWBYPIC -2 ,-7 , 1 , 0 \r
+              TWBYPIC  7 , 3 , 1 , 0 \r
+              TWBYPIC -1 ,-9 , 1 , 0 \r
+              TWBYPIC -19 ,-6 , 1 , 128 \r
+              TWBYPIC -10 , 5 , 1 , 0 \r
+              TWBYPIC  8 , 3 , 1 , 0 \r
+              TWBYPIC  0 , 12 , 1 , 0 \r
+              TWBYPIC -7 , 11 , 1 , 0 \r
+              TWBYPIC -8 ,-3 , 1 , 0 \r
+              TWBYPIC  5 , 10 , 1 , 0 \r
+              TWBYPIC  29 ,-12 , 0 , 0 \r
+              TWBYPIC -26 , 5 , 0 , 128 \r
+              TWBYPIC -12 ,-17 , 1 , 0 \r
+              TWBYPIC  19 ,-6 , 1 , 0 \r
+              TWBYPIC  19 , 18 , 0 , 0 \r
+              PICEND\r
+CRPAGE .LENGTH\r
+SHPB4:\r
+              TWBYPIC -30 , 9 , 0 , 0 \r
+              TWBYPIC  19 , 8 , 1 , 0 \r
+              TWBYPIC  6 ,-6 , 1 , 0 \r
+              TWBYPIC -7 ,-3 , 1 , 0 \r
+              TWBYPIC  6 ,-4 , 1 , 0 \r
+              TWBYPIC  15 , 6 , 1 , 0 \r
+              TWBYPIC  23 , 6 , 1 , 0 \r
+              TWBYPIC  2 ,-4 , 1 , 0 \r
+              TWBYPIC -21 ,-13 , 1 , 0 \r
+              TWBYPIC -14 ,-6 , 1 , 0 \r
+              TWBYPIC -2 ,-7 , 1 , 0 \r
+              TWBYPIC  8 , 3 , 1 , 0 \r
+              TWBYPIC -1 ,-9 , 1 , 0 \r
+              TWBYPIC -19 ,-8 , 1 , 128 \r
+              TWBYPIC -10 , 5 , 1 , 0 \r
+              TWBYPIC  7 , 3 , 1 , 0 \r
+              TWBYPIC  0 , 12 , 1 , 0 \r
+              TWBYPIC -9 , 10 , 1 , 0 \r
+              TWBYPIC -7 ,-3 , 1 , 0 \r
+              TWBYPIC  4 , 10 , 1 , 0 \r
+              TWBYPIC  30 ,-9 , 0 , 0 \r
+              TWBYPIC -27 , 2 , 0 , 128 \r
+              TWBYPIC -10 ,-17 , 1 , 0 \r
+              TWBYPIC  19 ,-5 , 1 , 0 \r
+              TWBYPIC  18 , 20 , 0 , 0 \r
+              PICEND\r
+CRPAGE .LENGTH\r
+SHPB5:\r
+              TWBYPIC -31 , 6 , 0 , 0 \r
+              TWBYPIC  18 , 10 , 1 , 0 \r
+              TWBYPIC  7 ,-5 , 1 , 0 \r
+              TWBYPIC -7 ,-4 , 1 , 0 \r
+              TWBYPIC  7 ,-4 , 1 , 0 \r
+              TWBYPIC  14 , 8 , 1 , 0 \r
+              TWBYPIC  23 , 8 , 1 , 0 \r
+              TWBYPIC  2 ,-4 , 1 , 0 \r
+              TWBYPIC -20 ,-15 , 1 , 0 \r
+              TWBYPIC -14 ,-7 , 1 , 0 \r
+              TWBYPIC  0 ,-7 , 1 , 0 \r
+              TWBYPIC  7 , 3 , 1 , 0 \r
+              TWBYPIC  0 ,-9 , 1 , 0 \r
+              TWBYPIC -18 ,-9 , 1 , 128 \r
+              TWBYPIC -11 , 3 , 1 , 0 \r
+              TWBYPIC  7 , 4 , 1 , 0 \r
+              TWBYPIC -2 , 13 , 1 , 0 \r
+              TWBYPIC -9 , 8 , 1 , 0 \r
+              TWBYPIC -7 ,-4 , 1 , 0 \r
+              TWBYPIC  3 , 11 , 1 , 0 \r
+              TWBYPIC  31 ,-6 , 0 , 0 \r
+              TWBYPIC -27 ,-1 , 0 , 128 \r
+              TWBYPIC -8 ,-18 , 1 , 0 \r
+              TWBYPIC  19 ,-3 , 1 , 0 \r
+              TWBYPIC  16 , 22 , 0 , 0 \r
+              PICEND\r
+CRPAGE .LENGTH\r
+SHPB6:\r
+              TWBYPIC -31 , 3 , 0 , 0 \r
+              TWBYPIC  17 , 11 , 1 , 0 \r
+              TWBYPIC  7 ,-4 , 1 , 0 \r
+              TWBYPIC -7 ,-4 , 1 , 0 \r
+              TWBYPIC  7 ,-3 , 1 , 0 \r
+              TWBYPIC  14 , 9 , 1 , 0 \r
+              TWBYPIC  22 , 10 , 1 , 0 \r
+              TWBYPIC  2 ,-4 , 1 , 0 \r
+              TWBYPIC -18 ,-16 , 1 , 0 \r
+              TWBYPIC -13 ,-9 , 1 , 0 \r
+              TWBYPIC  0 ,-7 , 1 , 0 \r
+              TWBYPIC  7 , 4 , 1 , 0 \r
+              TWBYPIC  1 ,-9 , 1 , 0 \r
+              TWBYPIC -17 ,-11 , 1 , 128 \r
+              TWBYPIC -11 , 2 , 1 , 0 \r
+              TWBYPIC  7 , 5 , 1 , 0 \r
+              TWBYPIC -4 , 12 , 1 , 0 \r
+              TWBYPIC -10 , 8 , 1 , 0 \r
+              TWBYPIC -6 ,-5 , 1 , 0 \r
+              TWBYPIC  2 , 11 , 1 , 0 \r
+              TWBYPIC  31 ,-3 , 0 , 0 \r
+              TWBYPIC -27 ,-3 , 0 , 128 \r
+              TWBYPIC -6 ,-19 , 1 , 0 \r
+              TWBYPIC  20 ,-1 , 1 , 0 \r
+              TWBYPIC  13 , 23 , 0 , 0 \r
+              PICEND\r
+CRPAGE .LENGTH\r
+SHPB7:\r
+              TWBYPIC -31 , 0 , 0 , 0 \r
+              TWBYPIC  15 , 13 , 1 , 0 \r
+              TWBYPIC  8 ,-4 , 1 , 0 \r
+              TWBYPIC -6 ,-4 , 1 , 0 \r
+              TWBYPIC  7 ,-3 , 1 , 0 \r
+              TWBYPIC  12 , 10 , 1 , 0 \r
+              TWBYPIC  22 , 12 , 1 , 0 \r
+              TWBYPIC  2 ,-3 , 1 , 0 \r
+              TWBYPIC -16 ,-18 , 1 , 0 \r
+              TWBYPIC -12 ,-10 , 1 , 0 \r
+              TWBYPIC  0 ,-7 , 1 , 0 \r
+              TWBYPIC  7 , 5 , 1 , 0 \r
+              TWBYPIC  2 ,-9 , 1 , 0 \r
+              TWBYPIC -16 ,-13 , 1 , 128 \r
+              TWBYPIC -11 , 1 , 1 , 0 \r
+              TWBYPIC  6 , 5 , 1 , 0 \r
+              TWBYPIC -4 , 12 , 1 , 0 \r
+              TWBYPIC -11 , 7 , 1 , 0 \r
+              TWBYPIC -6 ,-5 , 1 , 0 \r
+              TWBYPIC  1 , 11 , 1 , 0 \r
+              TWBYPIC  31 , 0 , 0 , 0 \r
+              TWBYPIC -26 ,-6 , 0 , 128 \r
+              TWBYPIC -5 ,-19 , 1 , 0 \r
+              TWBYPIC  20 , 0 , 1 , 0 \r
+              TWBYPIC  11 , 25 , 0 , 0 \r
+              PICEND\r
+CRPAGE .LENGTH\r
+SHPB8:\r
+              TWBYPIC -31 ,-3 , 0 , 0 \r
+              TWBYPIC  14 , 14 , 1 , 0 \r
+              TWBYPIC  9 ,-3 , 1 , 0 \r
+              TWBYPIC -6 ,-5 , 1 , 0 \r
+              TWBYPIC  7 ,-2 , 1 , 0 \r
+              TWBYPIC  11 , 12 , 1 , 0 \r
+              TWBYPIC  20 , 14 , 1 , 0 \r
+              TWBYPIC  3 ,-3 , 1 , 0 \r
+              TWBYPIC -14 ,-20 , 1 , 0 \r
+              TWBYPIC -12 ,-11 , 1 , 0 \r
+              TWBYPIC  2 ,-7 , 1 , 0 \r
+              TWBYPIC  5 , 6 , 1 , 0 \r
+              TWBYPIC  3 ,-9 , 1 , 0 \r
+              TWBYPIC -14 ,-14 , 1 , 128 \r
+              TWBYPIC -11 , 0 , 1 , 0 \r
+              TWBYPIC  6 , 6 , 1 , 0 \r
+              TWBYPIC -6 , 11 , 1 , 0 \r
+              TWBYPIC -11 , 6 , 1 , 0 \r
+              TWBYPIC -6 ,-6 , 1 , 0 \r
+              TWBYPIC  0 , 11 , 1 , 0 \r
+              TWBYPIC  31 , 3 , 0 , 0 \r
+              TWBYPIC -25 ,-8 , 0 , 128 \r
+              TWBYPIC -3 ,-20 , 1 , 0 \r
+              TWBYPIC  20 , 3 , 1 , 0 \r
+              TWBYPIC  8 , 25 , 0 , 0 \r
+              PICEND\r
+CRPAGE .LENGTH\r
+SHPB9:\r
+              TWBYPIC -31 ,-6 , 0 , 0 \r
+              TWBYPIC  13 , 16 , 1 , 0 \r
+              TWBYPIC  9 ,-2 , 1 , 0 \r
+              TWBYPIC -6 ,-6 , 1 , 0 \r
+              TWBYPIC  8 ,-1 , 1 , 0 \r
+              TWBYPIC  10 , 12 , 1 , 0 \r
+              TWBYPIC  18 , 16 , 1 , 0 \r
+              TWBYPIC  3 ,-2 , 1 , 0 \r
+              TWBYPIC -12 ,-22 , 1 , 0 \r
+              TWBYPIC -10 ,-12 , 1 , 0 \r
+              TWBYPIC  2 ,-7 , 1 , 0 \r
+              TWBYPIC  5 , 6 , 1 , 0 \r
+              TWBYPIC  4 ,-8 , 1 , 0 \r
+              TWBYPIC -13 ,-15 , 1 , 128 \r
+              TWBYPIC -11 ,-1 , 1 , 0 \r
+              TWBYPIC  5 , 6 , 1 , 0 \r
+              TWBYPIC -7 , 11 , 1 , 0 \r
+              TWBYPIC -12 , 4 , 1 , 0 \r
+              TWBYPIC -5 ,-6 , 1 , 0 \r
+              TWBYPIC -1 , 11 , 1 , 0 \r
+              TWBYPIC  31 , 6 , 0 , 0 \r
+              TWBYPIC -25 ,-11 , 0 , 128 \r
+              TWBYPIC  0 ,-20 , 1 , 0 \r
+              TWBYPIC  19 , 5 , 1 , 0 \r
+              TWBYPIC  6 , 26 , 0 , 0 \r
+              PICEND\r
+CRPAGE .LENGTH\r
+SHPB10:\r
+              TWBYPIC -30 ,-9 , 0 , 0 \r
+              TWBYPIC  11 , 17 , 1 , 0 \r
+              TWBYPIC  9 ,-1 , 1 , 0 \r
+              TWBYPIC -5 ,-7 , 1 , 0 \r
+              TWBYPIC  8 , 0 , 1 , 0 \r
+              TWBYPIC  9 , 13 , 1 , 0 \r
+              TWBYPIC  16 , 18 , 1 , 0 \r
+              TWBYPIC  4 ,-2 , 1 , 0 \r
+              TWBYPIC -10 ,-22 , 1 , 0 \r
+              TWBYPIC -9 ,-14 , 1 , 0 \r
+              TWBYPIC  3 ,-6 , 1 , 0 \r
+              TWBYPIC  4 , 6 , 1 , 0 \r
+              TWBYPIC  4 ,-7 , 1 , 0 \r
+              TWBYPIC -11 ,-17 , 1 , 128 \r
+              TWBYPIC -11 ,-2 , 1 , 0 \r
+              TWBYPIC  5 , 6 , 1 , 0 \r
+              TWBYPIC -8 , 10 , 1 , 0 \r
+              TWBYPIC -12 , 4 , 1 , 0 \r
+              TWBYPIC -5 ,-7 , 1 , 0 \r
+              TWBYPIC -2 , 11 , 1 , 0 \r
+              TWBYPIC  30 , 9 , 0 , 0 \r
+              TWBYPIC -23 ,-13 , 0 , 128 \r
+              TWBYPIC  1 ,-20 , 1 , 0 \r
+              TWBYPIC  19 , 6 , 1 , 0 \r
+              TWBYPIC  3 , 27 , 0 , 0 \r
+              PICEND\r
+CRPAGE .LENGTH\r
+SHPB11:\r
+              TWBYPIC -29 ,-12 , 0 , 0 \r
+              TWBYPIC  9 , 18 , 1 , 0 \r
+              TWBYPIC  9 , 0 , 1 , 0 \r
+              TWBYPIC -4 ,-7 , 1 , 0 \r
+              TWBYPIC  8 , 0 , 1 , 0 \r
+              TWBYPIC  7 , 14 , 1 , 0 \r
+              TWBYPIC  15 , 20 , 1 , 0 \r
+              TWBYPIC  4 ,-2 , 1 , 0 \r
+              TWBYPIC -8 ,-23 , 1 , 0 \r
+              TWBYPIC -8 ,-14 , 1 , 0 \r
+              TWBYPIC  4 ,-7 , 1 , 0 \r
+              TWBYPIC  4 , 7 , 1 , 0 \r
+              TWBYPIC  5 ,-7 , 1 , 0 \r
+              TWBYPIC -10 ,-18 , 1 , 128 \r
+              TWBYPIC -11 ,-3 , 1 , 0 \r
+              TWBYPIC  4 , 7 , 1 , 0 \r
+              TWBYPIC -8 , 9 , 1 , 0 \r
+              TWBYPIC -13 , 2 , 1 , 0 \r
+              TWBYPIC -4 ,-7 , 1 , 0 \r
+              TWBYPIC -3 , 11 , 1 , 0 \r
+              TWBYPIC  29 , 12 , 0 , 0 \r
+              TWBYPIC -22 ,-16 , 0 , 128 \r
+              TWBYPIC  3 ,-19 , 1 , 0 \r
+              TWBYPIC  18 , 8 , 1 , 0 \r
+              TWBYPIC  1 , 27 , 0 , 0 \r
+              PICEND\r
+CRPAGE .LENGTH\r
+SHPB12:\r
+              TWBYPIC -28 ,-15 , 0 , 0 \r
+              TWBYPIC  8 , 19 , 1 , 0 \r
+              TWBYPIC  9 , 1 , 1 , 0 \r
+              TWBYPIC -4 ,-8 , 1 , 0 \r
+              TWBYPIC  8 , 2 , 1 , 0 \r
+              TWBYPIC  6 , 14 , 1 , 0 \r
+              TWBYPIC  13 , 21 , 1 , 0 \r
+              TWBYPIC  4 ,-2 , 1 , 0 \r
+              TWBYPIC -6 ,-23 , 1 , 0 \r
+              TWBYPIC -6 ,-15 , 1 , 0 \r
+              TWBYPIC  4 ,-6 , 1 , 0 \r
+              TWBYPIC  3 , 7 , 1 , 0 \r
+              TWBYPIC  6 ,-6 , 1 , 0 \r
+              TWBYPIC -8 ,-19 , 1 , 128 \r
+              TWBYPIC -10 ,-4 , 1 , 0 \r
+              TWBYPIC  3 , 7 , 1 , 0 \r
+              TWBYPIC -10 , 9 , 1 , 0 \r
+              TWBYPIC -12 , 0 , 1 , 0 \r
+              TWBYPIC -3 ,-7 , 1 , 0 \r
+              TWBYPIC -5 , 10 , 1 , 0 \r
+              TWBYPIC  28 , 15 , 0 , 0 \r
+              TWBYPIC -20 ,-18 , 0 , 128 \r
+              TWBYPIC  5 ,-19 , 1 , 0 \r
+              TWBYPIC  17 , 10 , 1 , 0 \r
+              TWBYPIC -2 , 27 , 0 , 0 \r
+              PICEND\r
+CRPAGE .LENGTH\r
+SHPB13:\r
+              TWBYPIC -26 ,-17 , 0 , 0 \r
+              TWBYPIC  6 , 19 , 1 , 0 \r
+              TWBYPIC  9 , 1 , 1 , 0 \r
+              TWBYPIC -3 ,-7 , 1 , 0 \r
+              TWBYPIC  7 , 2 , 1 , 0 \r
+              TWBYPIC  5 , 15 , 1 , 0 \r
+              TWBYPIC  11 , 22 , 1 , 0 \r
+              TWBYPIC  3 ,-1 , 1 , 0 \r
+              TWBYPIC -3 ,-24 , 1 , 0 \r
+              TWBYPIC -4 ,-16 , 1 , 0 \r
+              TWBYPIC  4 ,-5 , 1 , 0 \r
+              TWBYPIC  2 , 8 , 1 , 0 \r
+              TWBYPIC  7 ,-7 , 1 , 0 \r
+              TWBYPIC -6 ,-19 , 1 , 128 \r
+              TWBYPIC -10 ,-5 , 1 , 0 \r
+              TWBYPIC  3 , 8 , 1 , 0 \r
+              TWBYPIC -11 , 7 , 1 , 0 \r
+              TWBYPIC -12 , 0 , 1 , 0 \r
+              TWBYPIC -3 ,-8 , 1 , 0 \r
+              TWBYPIC -5 , 10 , 1 , 0 \r
+              TWBYPIC  26 , 17 , 0 , 0 \r
+              TWBYPIC -18 ,-19 , 0 , 128 \r
+              TWBYPIC  6 ,-19 , 1 , 0 \r
+              TWBYPIC  17 , 12 , 1 , 0 \r
+              TWBYPIC -5 , 26 , 0 , 0 \r
+              PICEND\r
+CRPAGE .LENGTH\r
+SHPB14:\r
+              TWBYPIC -24 ,-20 , 0 , 0 \r
+              TWBYPIC  4 , 20 , 1 , 0 \r
+              TWBYPIC  8 , 2 , 1 , 0 \r
+              TWBYPIC -2 ,-7 , 1 , 0 \r
+              TWBYPIC  7 , 2 , 1 , 0 \r
+              TWBYPIC  3 , 16 , 1 , 0 \r
+              TWBYPIC  9 , 23 , 1 , 0 \r
+              TWBYPIC  4 ,-1 , 1 , 0 \r
+              TWBYPIC -1 ,-24 , 1 , 0 \r
+              TWBYPIC -3 ,-16 , 1 , 0 \r
+              TWBYPIC  5 ,-5 , 1 , 0 \r
+              TWBYPIC  2 , 8 , 1 , 0 \r
+              TWBYPIC  7 ,-6 , 1 , 0 \r
+              TWBYPIC -4 ,-19 , 1 , 128 \r
+              TWBYPIC -9 ,-7 , 1 , 0 \r
+              TWBYPIC  1 , 8 , 1 , 0 \r
+              TWBYPIC -11 , 6 , 1 , 0 \r
+              TWBYPIC -12 ,-1 , 1 , 0 \r
+              TWBYPIC -2 ,-8 , 1 , 0 \r
+              TWBYPIC -6 , 9 , 1 , 0 \r
+              TWBYPIC  24 , 20 , 0 , 0 \r
+              TWBYPIC -16 ,-21 , 0 , 128 \r
+              TWBYPIC  8 ,-18 , 1 , 0 \r
+              TWBYPIC  15 , 13 , 1 , 0 \r
+              TWBYPIC -7 , 26 , 0 , 0 \r
+              PICEND\r
+CRPAGE .LENGTH\r
+SHPB15:\r
+              TWBYPIC -22 ,-22 , 0 , 0 \r
+              TWBYPIC  2 , 20 , 1 , 0 \r
+              TWBYPIC  8 , 3 , 1 , 0 \r
+              TWBYPIC -1 ,-8 , 1 , 0 \r
+              TWBYPIC  7 , 4 , 1 , 0 \r
+              TWBYPIC  1 , 16 , 1 , 0 \r
+              TWBYPIC  7 , 23 , 1 , 0 \r
+              TWBYPIC  4 , 0 , 1 , 0 \r
+              TWBYPIC  1 ,-25 , 1 , 0 \r
+              TWBYPIC -1 ,-16 , 1 , 0 \r
+              TWBYPIC  5 ,-4 , 1 , 0 \r
+              TWBYPIC  1 , 8 , 1 , 0 \r
+              TWBYPIC  8 ,-5 , 1 , 0 \r
+              TWBYPIC -2 ,-20 , 1 , 128 \r
+              TWBYPIC -9 ,-7 , 1 , 0 \r
+              TWBYPIC  1 , 8 , 1 , 0 \r
+              TWBYPIC -12 , 5 , 1 , 0 \r
+              TWBYPIC -12 ,-3 , 1 , 0 \r
+              TWBYPIC -1 ,-8 , 1 , 0 \r
+              TWBYPIC -7 , 9 , 1 , 0 \r
+              TWBYPIC  22 , 22 , 0 , 0 \r
+              TWBYPIC -14 ,-23 , 0 , 128 \r
+              TWBYPIC  10 ,-17 , 1 , 0 \r
+              TWBYPIC  14 , 15 , 1 , 0 \r
+              TWBYPIC -10 , 25 , 0 , 0 \r
+              PICEND\r
+CRPAGE .LENGTH\r
+SHPB16:\r
+              TWBYPIC -20 ,-24 , 0 , 0 \r
+              TWBYPIC  0 , 20 , 1 , 0 \r
+              TWBYPIC  8 , 4 , 1 , 0 \r
+              TWBYPIC -1 ,-8 , 1 , 0 \r
+              TWBYPIC  7 , 4 , 1 , 0 \r
+              TWBYPIC  0 , 16 , 1 , 0 \r
+              TWBYPIC  4 , 24 , 1 , 0 \r
+              TWBYPIC  4 , 0 , 1 , 0 \r
+              TWBYPIC  4 ,-24 , 1 , 0 \r
+              TWBYPIC  0 ,-16 , 1 , 0 \r
+              TWBYPIC  6 ,-4 , 1 , 0 \r
+              TWBYPIC  0 , 8 , 1 , 0 \r
+              TWBYPIC  8 ,-4 , 1 , 0 \r
+              TWBYPIC  0 ,-20 , 1 , 128 \r
+              TWBYPIC -8 ,-8 , 1 , 0 \r
+              TWBYPIC  0 , 8 , 1 , 0 \r
+              TWBYPIC -12 , 4 , 1 , 0 \r
+              TWBYPIC -12 ,-4 , 1 , 0 \r
+              TWBYPIC  0 ,-8 , 1 , 0 \r
+              TWBYPIC -8 , 8 , 1 , 0 \r
+              TWBYPIC  20 , 24 , 0 , 0 \r
+              TWBYPIC -12 ,-24 , 0 , 128 \r
+              TWBYPIC  12 ,-16 , 1 , 0 \r
+              TWBYPIC  12 , 16 , 1 , 0 \r
+              TWBYPIC -12 , 24 , 0 , 0 \r
+              PICEND\r
+       .RADIX 16\r
+R      =2FFF-.\r
+       .NLIST\r
+       .REPT R\r
+       .BYTE 0\r
+       .ENDR\r
+       .LIST\r
+       .=2FFF\r
+CKUM0::        .BYTE 8A\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
\ No newline at end of file
diff --git a/A2SHIP.SAV b/A2SHIP.SAV
new file mode 100644 (file)
index 0000000..a0b7860
Binary files /dev/null and b/A2SHIP.SAV differ
diff --git a/A2STAR.DAT b/A2STAR.DAT
new file mode 100644 (file)
index 0000000..6db1f5c
Binary files /dev/null and b/A2STAR.DAT differ
diff --git a/AS2COI.MAC b/AS2COI.MAC
new file mode 100644 (file)
index 0000000..e41d8ad
Binary files /dev/null and b/AS2COI.MAC differ
diff --git a/AS2CU2.DAT b/AS2CU2.DAT
new file mode 100644 (file)
index 0000000..19b0c4e
Binary files /dev/null and b/AS2CU2.DAT differ
diff --git a/AS2CUN.DAT b/AS2CUN.DAT
new file mode 100644 (file)
index 0000000..33b8895
Binary files /dev/null and b/AS2CUN.DAT differ
diff --git a/AS2DEC.MAC b/AS2DEC.MAC
new file mode 100644 (file)
index 0000000..c3d4db3
Binary files /dev/null and b/AS2DEC.MAC differ
diff --git a/AS2FIL.MAC b/AS2FIL.MAC
new file mode 100644 (file)
index 0000000..3a6d6ef
Binary files /dev/null and b/AS2FIL.MAC differ
diff --git a/AS2MSG.MAC b/AS2MSG.MAC
new file mode 100644 (file)
index 0000000..4654b8f
--- /dev/null
@@ -0,0 +1,383 @@
+       .TITLE AS2MSG-ASTERIODS 2 MESSAGES\r
+       .CSECT AS2MSG\r
+       .RADIX 16\r
+       .LIST MEB                       ;LIST ASCIN EXPANSION\r
+       .NLIST BYT\r
+       .NOCROSS ..1,..2,..3,..4,..C,..N\r
+;********************************\r
+;*\r
+;*THIS PROGRAM HANDLES ALL MESSAGES FOR THE GAME OF ASTEROIDS II.\r
+;*SEE AST2RD.MAC FOR HARDWARE CONFIGURATION.\r
+;*\r
+;********************************\r
+       .SBTTL ******************\r
+       .SBTTL *\r
+       .SBTTL *PROGRAMMER: OWEN RUBIN\r
+       .SBTTL *\r
+       .SBTTL * MODELLED AFTER ED LOGG'S\r
+       .SBTTL * DISK 77 & B49\r
+       .SBTTL ******************\r
+;\r
+;ENTRY POINTS\r
+       .GLOBL VGMSG,VGMSG5,VGMSG3,VGMSG4       ;MESSAGE PROCESSOR\r
+       .GLOBL MESGPOS,LANGOFF\r
+;\r
+;ZERO PAGE DECLARATIONS\r
+;\r
+       .GLOBB TEMP1,VGLIST,TEMP2,OPTN1,LANG\r
+       .GLOBL UPDOWN\r
+;\r
+;EXTERNAL ENTRY POINTS\r
+;\r
+       .GLOBL VGVTR5,VGADD2\r
+       .GLOBL VGVTR,VGADD,VGSCA1,VGCNTR,VGSTAT ;VECTOR UTILITY ROUTINES\r
+       .GLOBL VGMSGA,VGMSGU,L0,L02             ;JSRL CHARACTER TABLE\r
+       .GLOBL CNTR8,CNTR9\r
+       .NLIST\r
+       .INCLUDE AS2DEC ;<<<<<<<<<<<<<<<<<<<<<<<<\r
+       .INCLUDE VGMC   ;<<<<<<<<<<<<<<<<<<<<<<<<<\r
+       .LIST\r
+;\r
+;************************************************************\r
+;* ABOVE THIS THERE ARE 2 INCLUDES..........................*\r
+;* ONE IS FOR VGMC, THE OTHER FOR AS2DEC.                   *\r
+;************************************************************\r
+;ASCIN - TAKE AN ASCII STRING AND MAP 3 CHARACTERS TO 2 BYTES\r
+;\r
+;THIS MACRO PACKS 3 ASCII CHARACTERS (BLANK, A THRU Z,0,1 OR 2) INTO 2\r
+;BYTES IN THE FORMAT\r
+;      AAAAABBB BBCCCCCD\r
+;WHERE D=1 MEANS END OF LIST\r
+;      AAAAA,BBBBB,CCCCC=INDEX AS FOLLOWS\r
+;      0=END OF LIST\r
+;      1=BLANK\r
+;      2=0\r
+;      3=1\r
+;      4=2\r
+;      5=A\r
+;      ETC.\r
+       .MACRO ASCIN STRING\r
+       ..N=0\r
+       .NCHR ..C,<STRING>\r
+       .ENABL M68\r
+       .IRPC ..5,<STRING>\r
+       ..4=''..5\r
+       ..C=..C-1\r
+       ..3=0\r
+       .IIF EQ,..4-^H20,..3=1\r
+       .IF GE,..4-^H30\r
+       .IIF LT,..4-^H33,..3=..4-^H30+2\r
+       .ENDC\r
+       .IF GE,..4-^H41\r
+       .IIF LT,..4-^H5B,..3=..4-^H41+5\r
+       .ENDC\r
+       .IIF EQ,..N,..1=..3\r
+       .IIF EQ,..N-1,..2=..3\r
+       ..N=..N+1\r
+       .IF EQ,..N-3\r
+       ..N=0\r
+       .IIF EQ,..C,.WORD <..1*^H800>+<..2*^H40>+<..3*2>+1\r
+       .IIF NE,..C,.WORD <..1*^H800>+<..2*^H40>+<..3*2>\r
+       .ENDC\r
+       .ENDM\r
+       .IIF EQ,..N-1,.WORD ..1*^H800\r
+       .IIF EQ,..N-2,.WORD <..1*^H800>+<..2*^H40>\r
+       .DSABL M68\r
+       .ENDM\r
+       \r
+       \r
+       .SBTTL VGMSG-VECTOR GENERATOR MESSAGE PROCESSOR\r
+       .SBTTL  POSITION ROUTINE\r
+;\r
+; PASS XPOS=A, YPOS=X\r
+; WILL DO A CENTER THEN A CLEAR VECTOR TO POSITION\r
+;\r
+; AUX ROUTINE TO ADD OFFSET FOR FOREIGN LANGUAGES\r
+LANGOFF:\r
+; ADD OFFSET IN X DIR ONLY \r
+; ENTER X=OFFSET INDEX....THIS ROUTINE CHECKS LANG\r
+; ALL MESSAGES ASSUMED CORRECT FOR ENGLISH\r
+       LDA LANG\r
+       BNE 10$\r
+       RTS\r
+10$:   TXA\r
+       ASL\r
+       ASL\r
+       CLC\r
+       ADC LANG\r
+       TAY\r
+       LDA Y,OFFSET\r
+       LDX #0\r
+       JMP VGVTR5\r
+OFFSET:        .BYTE 0,-0B,-0B,-0B\r
+       .BYTE 0,-20,-20,-08\r
+       .BYTE 0,-1B,-0A,-0B\r
+       .BYTE 0,-12,-12,-20\r
+       .BYTE 0,1A,-08,3D\r
+       .BYTE 0,-0E,-0E,08\r
+       .BYTE 0,-16,0EE,0\r
+       .PAGE\r
+\r
+MESGPOS:\r
+       PHA                     ;SAVE X & Y\r
+       TXA\r
+       PHA\r
+       LAL CNTR9\r
+       LXH CNTR8               ;CENTER SCALE\r
+       JSR VGADD2\r
+       PLA\r
+       TAX\r
+       PLA\r
+       JMP VGVTR5              ;POSITION\r
+;VGMSG-VECTOR GENERATOR MESSAGE PROCESSOR\r
+;\r\r
+;ENTRY (Y)=MESSAGE NUMBER (0,1,2,...)\r
+;(X)=BRIGHTNESS\r
+;USES  A,X,Y(TEMP1,TEMP1+1),TEMP2,(VGLIST,VGLIST+1)\r
+VGMSG: LDX #0D6                ;DEFAULT COLOR IS YELLOW\r
+VGMSG3:        TXA                     ;BRIGHTNESS\r
+VGMSG4:        STY TEMP2               ;PASS COLOR IN A\r
+       TAY\r
+       JMP VGMSG7\r
+VGMSG5:\r
+       STY TEMP2\r
+       LDY #0D2                ;GREEN MESSAGES\r
+VGMSG7:        JSR VGSTAT\r
+       LDY TEMP2\r
+VGMSG6:\r
+;MESSAGES MAY OVERFOW ONE PAGE\r
+       LDA LANG                ;READ OPTIONS\r
+       ASL\r
+       ASL                     ;LANG *4\r
+       CPY I,21.\r
+       BCC 5$                  ;NO OVERFLOW\r
+       ADC I,2-1               ;ADD TWO\r
+       TAX\r
+       TYA\r
+       SEC\r
+       SBC I,21.               ;REDUCE RELATIVE MESSAGE NUMBER\r
+       TAY\r
+       BPL 7$                  ;ALWAYS\r
+5$:    TAX                     ;4*LANGUAGE (0,4,8,OR 12.)\r
+7$:    LDA AX,VGMSGT+1\r
+       STA TEMP1+1\r
+       LDA AX,VGMSGT           ;CARRY IS CLEAR FROM ASL ABOVE\r
+       STA TEMP1               ;TEMP1 SETUP NOW\r
+       CLC\r
+       ADC NY,TEMP1            ;RELATIVE ADDRESS TO START OF MESSAGE\r
+       STA TEMP1\r
+       BCC 10$                 ;NO OVERFLOW\r
+       INC TEMP1+1\r
+10$:\r
+       LDY I,0                 ;Y DOUBLES AS INDEX FOR VGLIST AND TEMP1\r
+       LDX I,0\r
+20$:   LDA NX,TEMP1\r
+       STA TEMP2\r
+       LSR\r
+       LSR                     ;2*INDEX\r
+       JSR VGMSG1              ;PUT OUT CHARACTER AND UPDATE TEMP1\r
+       LDA NX,TEMP1\r
+       ROL\r
+       ROL TEMP2\r
+       ROL\r
+       LDA TEMP2\r
+       ROL\r
+       ASL\r
+       JSR VGMSG2              ;PUT OUT CHARACTER\r
+       LDA NX,TEMP1\r
+       STA TEMP2\r
+       JSR VGMSG1              ;PUT OUT CHARACTER AND UPDATE TEMP1\r
+       LSR TEMP2\r
+       BCC 20$                 ;NOT END OF LIST\r
+VGMSG0:        DEY\r
+       JMP VGADD               ;UPDATE VGLIST POINTER\r
+\r
+VGMSG1:        INC TEMP1               ;UPDATE INDIRECT POINTER TO CHARACTERS\r
+       BNE VGMSG2              ;NO OVERFLOW\r
+       INC TEMP1+1\r
+VGMSG2:        AND I,3E\r
+       BNE 5$                  ;NOT END OF LIST\r
+       PLA\r
+       PLA                     ;PURGE RTS\r
+       BNE VGMSG0              ;RETURN\r
+       \r
+5$:    CMP I,10.\r
+       BCC 10$                 ;IF BLANK, 0,1 OR 2\r
+       ADC I,13.               ;SET CORRECT INDEX (ADD 14.)\r
+10$:   TAX\r
+       LDA A,UPDOWN\r
+       ASL                     ;SET CARRY\r
+       LDA AX,VGMSGA-2         ;10. FOR A, 12. FOR B, ....\r
+       BCC 20$                 ;NORMAL\r
+       LDA AX,VGMSGU-2         ;UPSIDE DOWN LETTERS\r
+20$:   STA NY,VGLIST           ;PUT JSRL INTO VECTOR LIST\r
+       INY\r
+       LDA AX,VGMSGA-1\r
+       BCC 30$                 ;NORMAL\r
+       LDA AX,VGMSGU-1\r
+30$:   STA NY,VGLIST\r
+       INY\r
+       LDX I,0\r
+       RTS\r
+VGMSGT:        .WORD L0                ;LANGUAGE TABLE POINTERS (SEE OPTSW 1)\r
+       .WORD L02\r
+       .WORD L1\r
+       .WORD L12\r
+       .WORD L2\r
+       .WORD L22\r
+       .WORD L3\r
+       .WORD L32\r
+L0:    .BYTE 10$-L0,11$-L0,12$-L0,13$-L0,14$-L0\r
+       .BYTE 15$-L0,16$-L0,17$-L0,18$-L0,19$-L0\r
+       .BYTE 20$-L0\r
+       .BYTE 21$-L0,22$-L0\r
+       .BYTE 51$-L0,52$-L0,53$-L0\r
+       .BYTE 55$-L0,56$-L0,57$-L0,58$-L0\r
+       .BYTE 59$-L0\r
+10$:   ASCIN ^/HIGH SCORES/\r
+11$:   ASCIN ^/PLAYER /\r
+12$:   ASCIN ^/GREAT SCORE/\r
+13$:   ASCIN ^/PLEASE ENTER YOUR INITIALS/\r
+14$:   ASCIN ^/PRESS ROTATE TO SELECT LETTER/\r
+15$:   ASCIN ^/PRESS SHIELDS WHEN LETTER IS CORRECT/\r
+16$:   ASCIN ^/ SELECT GAME/\r
+17$:   ASCIN ^/GAME OVER/\r
+18$:   ASCIN ^/1 COIN 2 PLAYERS/\r
+19$:   ASCIN ^/1 COIN 1 PLAYER/\r
+20$:   ASCIN ^/2 COINS 1 PLAYER/\r
+21$:   ASCIN ^/1 PLAYER/\r
+22$:   ASCIN ^/2 PLAYERS/\r
+51$:   ASCIN ^/ PRESS START/   \r
+52$:   ASCIN ^/BONUS EVERY /\r
+53$:   ASCIN ^/COMBINED SCORE/\r
+55$:   ASCIN ^/NORMAL/\r
+56$:   ASCIN ^/MEDIUM/\r
+57$:   ASCIN ^/2 COIN MINIMUM/\r
+58$:   ASCIN   ^/ANOTHER COIN/\r
+59$:   ASCIN ^/BONUS LEVEL /\r
+L02:   .BYTE 10$-L02,11$-L02,12$-L02,13$-L02,14$-L02\r
+       .BYTE 17$-L02,18$-L02,19$-L02\r
+       .BYTE 20$-L02,21$-L02,22$-L02,23$-L02,24$-L02\r
+       .BYTE 25$-L02,26$-L02,27$-L02,28$-L02\r
+10$:   ASCIN ^/1 COIN 2 GAMES/\r
+11$:   ASCIN ^/1 COIN 1 GAME/\r
+12$:   ASCIN ^/2 COINS 1 GAME/\r
+13$:   ASCIN ^/CREDITS /\r
+14$:   ASCIN ^/EASY/\r
+17$:   ASCIN ^/SECONDS/\r
+18$:   ASCIN ^/GAMES/\r
+19$:   ASCIN ^/AVG TIMES/\r
+20$:   ASCIN ^/FOR SELF TEST/\r
+21$:   ASCIN ^/TO CLEAR SCORES/\r
+22$:   ASCIN ^/TO CLEAR TIMES/\r
+23$:   ASCIN ^/TO CLEAR TIMES AND SCORES/\r
+24$:   ASCIN ^/ERASING/\r
+25$:   ASCIN ^/PUSH START AND SELECT/\r
+26$:   ASCIN ^/BONUS ADDER/\r
+27$:   ASCIN ^/TOTAL ON TIME/\r
+28$:   ASCIN ^/HARD/\r
+;********************************************************************************\r
+;*             GERMAN                                                          *\r
+;***********************************************************************************\r
+L1:    .BYTE 10$-L1,11$-L1,12$-L1,13$-L1,14$-L1\r
+       .BYTE 15$-L1,16$-L1,17$-L1,18$-L1,19$-L1\r
+       .BYTE 20$-L1,21$-L1,22$-L1,51$-L1,52$-L1,53$-L1\r
+       .BYTE 55$-L1,56$-L1,57$-L1,58$-L1\r
+       .BYTE 59$-L1\r
+10$:   ASCIN   ^/HOECHSTERGEBNISSE/\r
+11$:   ASCIN   ^/SPIELER /\r
+12$:   ASCIN   ^/GROSSARTIGES ERGEBNIS/\r
+13$:   ASCIN   ^/BITTE GEBEN SIE IHRE INITIALEN EIN/\r
+14$:   ASCIN   ^/ZUR BUCHSTABENWAHL ROTATE DRUECKEN/\r
+15$:   ASCIN   ^/FIRE DRUECKEN WENN RICHTIG/\r
+16$:   ASCIN   ^/     SPIELWAHL     /\r
+17$:   ASCIN   ^/SPIELENDE/\r
+18$:   ASCIN   ^/1 MUENZE 2 SPIELER/\r
+19$:   ASCIN   ^/1 MUENZE 1 SPIELER/\r
+20$:   ASCIN   ^/2 MUENZEN 1 SPIELER/\r
+21$:   ASCIN   ^/1 SPIELER/\r
+22$:   ASCIN   ^/2 SPIELER/\r
+51$:   ASCIN   ^/STARTKNOPF DRUECKEN/\r
+52$:   ASCIN   ^/BONUS JEDE /\r
+53$:   ASCIN   ^/  TEAM PUNKTE /\r
+55$:   ;EASY, MEDIUM MESSAGES HAVE THESE PLACES\r
+56$:\r
+57$:   ASCIN   ^/MINDESTENS 2 MUENZEN/\r
+58$:   ASCIN   ^/  NOCH EINE MUENZE /\r
+59$:   ASCIN   ^/PUNKTZAHLEN ERHOEHT UM /\r
+L12:   .BYTE 10$-L12,11$-L12,12$-L12,13$-L12\r
+10$:   ASCIN   ^/1 MUENZE 2 SPIELE/\r
+11$:   ASCIN   ^/1 MUENZE 1 SPIEL/\r
+12$:   ASCIN   ^/2 MUENZEN 1 SPIEL/\r
+13$:   ASCIN   ^/KREDITE /\r
+14$:   .BYTE 0         ;SUPER EASY MESSAGE GOES HERE\r
+;*******************************************************************************\r
+;*             FRENCH                                                          *\r
+;***********************************************************************************\r
+L2:    .BYTE 10$-L2,11$-L2,12$-L2,13$-L2,14$-L2\r
+       .BYTE 15$-L2,16$-L2,17$-L2,18$-L2,19$-L2\r
+       .BYTE 20$-L2,21$-L2,22$-L2,51$-L2,52$-L2,53$-L2\r
+       .BYTE 55$-L2,56$-L2,57$-L2,58$-L2\r
+       .BYTE 59$-L2\r
+10$:   ASCIN   ^/MEILLEURS SCORE/\r
+11$:   ASCIN   ^/JOUEUR /\r
+12$:   ASCIN   ^/SPLENDIDE SCORE/\r
+13$:   ASCIN   ^/SVP ENTREZ VOS INITIALES/\r
+14$:   ASCIN   ^/POUSSEZ ROTATE POUR VOS INITIALES/\r
+15$:   ASCIN   ^/POUSSEZ SHIELDS QUAND LETTRE CORRECTE/\r
+16$:   ASCIN   ^/  CHOIX DU JEU   /\r
+17$:   ASCIN   ^/FIN DE PARTIE/\r
+18$:   ASCIN   ^/1 PIECE 2 JOUEURS/\r
+19$:   ASCIN   ^/1 PIECE 1 JOUEUR/\r
+20$:   ASCIN   ^/2 PIECES 1 JOUEUR/\r
+21$:   ASCIN   ^/1 JOUEUR/\r
+22$:   ASCIN   ^/2 JOUEURS/\r
+51$:   ASCIN   ^/APPUYEZ SUR START/\r
+52$:   ASCIN   ^/BONUS CHAQUE /\r
+53$:   ASCIN   ^/SCORE COMBINE/\r
+55$:   ;NORMAL DIFF MESSAGE\r
+56$:   ;MEDIUM  "     "\r
+57$:   ASCIN   ^/DUEX PIECES MINIMUM/\r
+58$:   ASCIN   ^/ UNE AUTRE PIECE /\r
+59$:   ASCIN   ^/     BONUS /\r
+L22:   .BYTE 10$-L22,11$-L22,12$-L22,13$-L22\r
+10$:   ASCIN   ^/1 PIECE 2 JOUEURS/\r
+11$:   ASCIN   ^/1 PIECE 1 JOUEUR/\r
+12$:   ASCIN   ^/2 PIECES 1 JOUEUR/\r
+13$:   ASCIN   ^/CREDITS /\r
+;*******************************************************************************\r
+;*             SPANISH                                                         *\r
+;*************************************************************************************\r
+L3:    .BYTE 10$-L3,11$-L3,12$-L3,13$-L3,14$-L3\r
+       .BYTE 15$-L3,16$-L3,17$-L3,18$-L3,19$-L3\r
+       .BYTE 20$-L3,21$-L3,22$-L3,51$-L3,52$-L3,53$-L3\r
+       .BYTE 55$-L3,56$-L3,57$-L3,58$-L3\r
+       .BYTE 59$-L3\r
+10$:   ASCIN   ^/  RECORDS  /\r
+11$:   ASCIN   ^/JUGADOR /\r
+12$:   ASCIN   ^/GRAN PUNTAJE/\r
+13$:   ASCIN   ^/POR FAVOR ENTRE SUS INICIALES/\r
+14$:   ASCIN   ^/OPRIMA ROTATE PARA SELECCIONAR LA LETRA/\r
+15$:   ASCIN   ^/OPRIMA SHIELDS/\r
+16$:   ASCIN   ^/ELEGIR JUEGO/\r
+17$:   ASCIN   ^/JUEGO TERMINADO/\r
+18$:   ASCIN   ^/1 FICHA 2 JUGADORES/\r
+19$:   ASCIN   ^/1 FICHA 1 JUGADOR/\r
+20$:   ASCIN   ^/2 FICHAS 1 JUGADOR/\r
+21$:   ASCIN   ^/1 JUGADOR/\r
+22$:   ASCIN   ^/2 JUGADORES/\r
+51$:   ASCIN   ^/PULSAR START/\r
+52$:   ASCIN   ^/EXTRA CADA /\r
+53$:   ASCIN   ^/SCORE DE AMBOS/\r
+55$:   ;MESSAGE NORMAL\r
+56$:   ;MESSAGE MEDIUM\r
+57$:   ASCIN   ^/DOS FICHAS MINIMO/    \r
+58$:   ASCIN   ^/ OTRA FICHA /\r
+59$:   ASCIN   ^/NIVEL DE BONIFICTION/\r
+L32:   .BYTE 10$-L32,11$-L32,12$-L32,13$-L32\r
+10$:   ASCIN   ^/1 FICHA 2 JUEGOS/\r
+11$:   ASCIN   ^/1 FICHA 1 JUEGO/\r
+12$:   ASCIN   ^/2 FICHAS 1 JUEGO/\r
+13$:   ASCIN   ^/CREDITOS /\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
\ No newline at end of file
diff --git a/AS2POK.MAC b/AS2POK.MAC
new file mode 100644 (file)
index 0000000..62e0ea9
--- /dev/null
@@ -0,0 +1,419 @@
+       .TITLE AS2POK - POKEY SOUNDS\r
+       .RADIX 16\r
+       .ENABL AMA\r
+       .NLIST\r
+       .INCLUDE AS2DEC         ;<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\r
+       .LIST\r
+       .INCLUDE HLL65F         ;<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\r
+       .PAGE\r
+       .SBTTL GLOBLS\r
+;ENTRY POINTS (AS SUBROUTINES)\r
+       .GLOBL SNDON,MODSND,INISOU\r
+                               ;\r
+NCHANL =10\r
+       .GLOBB SINDEX,POINT,CURRENT,FRAMES,COUNT\r
+       .GLOBB TEMPA,ATRACT,FRAME\r
+       .GLOBL HUM,SFREQ,COMTIMER\r
+       .GLOBL HSCFLG,COMTIM\r
+       .CSECT AS2POK\r
+       .PAGE\r
+       .SBTTL SOUND DESCRIPTION\r
+;THE FOLLOWING MUST BE DEFINED SOME WHERE IN YOUR RAM ALLOCATION\r
+;SOUND ROUTINE VARIABLES\r
+       \r
+       .REPT 0\r
+POINT: .BLKB NCHANL                    ;POINTER OFFSET INTO DATA TABLES(IF 0, CHANNEL NOT ACTIVE)\r
+CURRENT:.BLKB NCHANL                   ;OUTPUT VALUE\r
+FRAMES:        .BLKB NCHANL                    ;FRAMES UNTIL NEXT CHANGE\r
+COUNT: .BLKB NCHANL                    ;COUNT OF TOTAL CHANGES\r
+;*** NOTE: 'IDLEV' CAN BE REPLACED BY A 6 BYTE TABLE WITH\r
+;          NO CHANGE TO THE CODE. USING RAM ALLOWS YOU TO \r
+;         CHANGE THE OUTPUT SOUND WITHOUT USING 'STSOUND'\r
+;         BY SIMPLY PUTTING THE DESIRED SOUND INFORMATION\r
+;         INTO THE ABOVE 6 BYTE. THE SOUND ROUTINES WILL\r
+;         CONTINUE TO OUTPUT THIS 'FORCED' SOUND UNTIL\r
+;         YOU CALL 'STSOUND' OR PUT SOME OTHER VALUE INTO\r
+;         'IDLEV'. IF YOU USE A TABLE, THE FOLLOWING DATA\r
+;         IS RECOMENDED:\r
+;      IDLEV:  .BYTE 0C0,0,1F,80,0FE,80\r
+;*************************************************************\r
+;\r
+       .ENDR\r
+;EACH TABLE ENTRY IS 4 BYTES DESCRIBING A SEQUENCE, CONSISTING OF:\r
+STVAL  =0                      ;VALUE TO START SEQUENCE\r
+FRCNT  =1                      ;# OF FRAMES BEFORE ANY CHANGE\r
+CHANGE =2                      ;AMOUNT OF CHANGE\r
+NUMBER =3                      ;TOTAL NUMBER OF CHANGES IN THIS SEQUENCE\r
+AUDF1  =POKEY\r
+AUDCTL =POKEY+8\r
+AUD2F1 =POKEY2\r
+AUD2CT =POKEY2+8\r
+;EX1: 0FF,1,-1,6 DESCRIBES THE FOLLOWING SEQUENCE\r
+;      0FF,0FE,0FD,0FC,0FB,0FA,0F9\r
+;EX2: 0,45,0,1 WILL OUTPUT 0 FOR 46 FRAMES\r
+;\r
+       .PAGE\r
+       .SBTTL OFFSET MACROS FOR SOUND ROUTINES\r
+       .MACRO OFFSET,LABEL\r
+       .IRPC X,<12345678>\r
+       .IRPC Y,FA\r
+       .IF DF,LABEL''X''Y\r
+       .BYTE <LABEL''X''Y-SOUND>/2-2\r
+       .IFF\r
+       .BYTE 0\r
+       .ENDC\r
+       .ENDR\r
+       .ENDR\r
+       SID'LABEL=.-PNTRS-1\r
+       .ENDM\r
+;\r
+;THE ABOVE MACRO GENERATES THE OFFSETS FROM THE 'SOUND' BASE ADDRESS\r
+;FOR A CHANNEL OF DATA.\r
+;IF LESS THAN 6 CHANNELS ARE USED, THE REMAINING POINTERS ARE SET TO 0\r
+;A 0 VALUE POINTER INDICATES AN IDLE CHANNEL.\r
+;\r
+;EX: SOUND: .BYTE 0\r
+;\r
+;    CH1:   .BYTE 0,45,0,1\r
+;    CH2:   .BYTE 0,45,0,2,3,7,9,1\r
+;\r
+;BY CALLING 'OFFSET CH' , THE FOLLOWING WILL BE PLACED IN LINE\r
+;          .BYTE CH1-SOUND\r
+;          .BYTE CH2-SOUND\r
+;          .BYTE 0,0,0,0\r
+;\r
+       .SBTTL ROTBERG NOTE MACRO\r
+       .MACRO PLUCK DUR\r
+       .BYTE ^H0A6,4,^H0FF,4\r
+       .BYTE ^H0A2,DUR-^H10,0,1\r
+       .ENDM\r
+       .PAGE\r
+       .SBTTL SOUND TABLES\r
+;\r
+;TABLES OF OFFSET POINTER FOR SOUNDS. (6 BYTES PER SOUND NUMBER)\r
+CKUM5::        .BYTE 90\r
+PNTRS:\r
+       OFFSET SF               ;SAUCER FIRE (CH2)\r
+       OFFSET P0F              ;SHIP FIRE (CH1), PLAYER 0\r
+       OFFSET P1F              ;SHIP FIRE (CH4), PLAYER 1\r
+       OFFSET P0E              ;PLAYER 0 REENTER (CH1)\r
+       OFFSET  P1E             ;PLAYER 1 REENTER (CH4)\r
+       OFFSET EL               ;EXTRA LIFE (CH3)\r
+       OFFSET XP               ;EXPLOSION SOUND (CH 7 & 8)\r
+       OFFSET TH               ;THRUST SOUND (CH5)\r
+       OFFSET F0\r
+       OFFSET F1\r
+       OFFSET GK               ;GATES OF (HELL)\r
+       OFFSET S0               ;SHIELD SOUND (0)\r
+       OFFSET S1               ;SHIELD SOUND\r
+       OFFSET PP               ;POP!\r
+PTLEN  =.-PNTRS\r
+;AUDIO CONTROL CHANNEL VALUE (1 BYTE PRE SOUND NUMBER)\r
+AUDCV  =00\r
+AUDCV2 =00\r
+       \r
+;SOUND TABLES\r
+                               ;ALL OF THESE LABELS GO\r
+                               ;HRE SO THEY HAVE AN\r
+                               ;OFFSET OF 0, WHICH\r
+                               ;PREVENTS THE SOUND FROM\r
+                               ;AFFECTING THOSE CHANNELS\r
+                               ;WHICH HAVE AN OFFSET\r
+                               ;OF 0\r
+SOUND=.-6\r
+       .PAGE\r
+                               ;A GOOD PLACE FOR THE CHECKSUM\r
+;DATA STRUCTURE:\r
+;A CHANNEL CONSISTS OF A SERIES OF 4 BYTE SEQUENCES:\r
+;      BYTE            FUNCTION\r
+;       1               STARTING VALUE OF SEQUENCE\r
+;       2               # OF FRAMES BEFORE NEXT CHANGE\r
+;       3               AMOUNT OF CHANGE (SEE NOTE 1)\r
+;       4               TOTAL NUMBER OF CHANGES+1 (# OF DIFFERENT VALUES)\r
+;TO STOP A CHANNEL, PUT IN 0,0\r
+;TO LOOP BACK, PUT IN X,0, WHERE X=\r
+;<OFFSET FROM SOUND: OF RESTART LOC>/2\r
+;NOTE 1: FOR NOISE/AMPLITUDE CHANNEL, AMPLITUDE WILL\r
+;NOT OVERFLOW INTO NOISE\r
+;\r
+;\r
+; SAUCER FIRE\r
+SF2F:  .BYTE 1,8,2,10\r
+       .BYTE 0,0\r
+SF2A:  .BYTE 87,20,0FE,4\r
+       .BYTE 0,0\r
+;\r
+; SHIP FIRE, PLAYER 0\r
+P0F1F: .BYTE 24,01,3,40\r
+       .BYTE 0,0\r
+P0F1A: .BYTE 0A4,10,-1,04\r
+       .BYTE 0,0\r
+P0E1F: .BYTE 0A,0FF,0,10\r
+       .BYTE 0,0\r
+P0E1A: .BYTE 40,20,1,0A\r
+       .BYTE 4A,10,1,06\r
+       .BYTE 0,0\r
+;\r
+; SHIP FIRE, PLAYER 1\r
+P1F4F: .BYTE 24,01,3,40\r
+       .BYTE 0,0\r
+P1F4A=P0F1A\r
+P1E4F: .BYTE 09,0FF,0,10\r
+       .BYTE 0,0\r
+P1E4A=P0E1A\r
+; SHIELD SOUND\r
+S01F:  .BYTE 0B0,02,0,0F\r
+       .BYTE 0,0\r
+S01A:  .BYTE 0C0,1,2,0F\r
+       .BYTE 0,0\r
+S14F=S01F              ;OTHER PLAYER SAME SOUND\r
+S14A=S01A\r
+;\r
+; EXTRA LIFE\r
+EL3F:  .BYTE 06,0E0,0,1,5,0E0,0,1\r
+       .BYTE 0,0\r
+EL3A:  .REPT 6\r
+       .BYTE 0AF,10,0,1,0A0,10,0,1\r
+       .ENDR\r
+; FUSE SOUND\r
+F01F:  .BYTE 0,2,0,0A\r
+       .BYTE 0FF,1,0,4\r
+       .BYTE 0,2,0,10\r
+       .BYTE 0,0\r
+F01A:  .BYTE 07,10,1,20\r
+       .BYTE 0,0\r
+F14F=F01F\r
+F14A=F01A\r
+       .BYTE 0,0\r
+;\r
+; EXPLOSION SOUND\r
+XP7F:  .BYTE 0A0,1,0FE,8,0A0,1,0FE,4\r
+       .BYTE 098,10,4,10\r
+       .BYTE 0,0\r
+XP7A:  .BYTE 82,2,1,4,8C,8,0FF,3\r
+       .BYTE 80,4,0,1\r
+       .BYTE 8C,20,0FF,1,86,40,0FF,1\r
+       .BYTE 82,40,0FF,1\r
+       .BYTE 81,40,0FF,1\r
+       .BYTE 0,0\r
+XP8F:  .BYTE 0C0,10,4,10\r
+       .BYTE 0,0\r
+XP8A:  .BYTE 86,50,0FE,3\r
+       .BYTE 0,0\r
+TH5F:  .BYTE 2,7,0,1\r
+       .BYTE 0,0\r
+TH5A:  .BYTE 84,7,0,1\r
+       .BYTE 0,0\r
+GK1F:  .BYTE 0,1,4,0FF,0FF,1,4,0FF\r
+       .BYTE 0,0\r
+GK1A:  .BYTE 0AF,1,0,40,0A3,1,0,40\r
+       .BYTE 0AD,1,0,40,0A7,1,0,40\r
+       .BYTE 0A5,1,0,40,0A3,1,0,40\r
+       .BYTE 0A4,1,0,40,0A1,1,0,40\r
+       .BYTE 0,0\r
+\r
+PP2F:  .BYTE 20,1,0,3\r
+       .BYTE 80,1,10,6\r
+       .BYTE 0,0\r
+PP2A:  .BYTE 0AF,1,0FE,2\r
+       .BYTE 0A0,1,0,1\r
+       .BYTE 0A3,2,0FF,3\r
+       .BYTE 0,0\r
+       .PAGE\r
+POPSN::        LDA #SIDPP\r
+       BNE SNDON\r
+FU1SN::        LDA #SIDF1              ;FUSE, PLYR 1\r
+       BNE SNDON\r
+FU0SN::        LDA #SIDF0              ;FUSE, PLYR 0\r
+       BNE SNDON\r
+EN1SN::        LDA #SIDP1E             ;REENTER\r
+       BNE SNDON\r
+EN0SN::        LDA #SIDP0E             ;REENTER\r
+       BNE SNDON\r
+SH0SN::        LDA #SIDS0\r
+       BNE SNDON               ;SHIELD PLAYER 0\r
+SH1SN::        LDA #SIDS1\r
+       BNE SNDON               ;SHIELD, PLAYER 1\r
+SAUCSN::LDA #SIDSF             ;SAUCER FIRE\r
+       BNE SNDON\r
+PL0FIR::LDA #SIDP0F            ;PLAYER 0 FIRE\r
+       BNE SNDON\r
+PL1FIR::LDA #SIDP1F            ;PLAYER 1 FIRE\r
+       BNE SNDON\r
+EXTLIF::LDA #SIDEL             ;EXTRA LIFE\r
+       BNE SNDON\r
+EXPLOS::LDA #SIDXP             ;EXPLOSION\r
+       BNE SNDON\r
+THRUSN::LDA #SIDTH             ;THRUST SOUND\r
+       BNE SNDON\r
+GATES::        LDA #SIDGK\r
+       BNE SNDON\r
+SNDON: BIT HSCFLG              ;HIGH SCORE TUNE?\r
+       BMI BADHAB              ;DAVE T. DID THIS!!!!!\r
+       BIT ATRACT              ;ATTRACT MODE?\r
+       IFMI                    ;NO, OK TO START A SOUND\r
+BADHAB:        STX TEMPA\r
+       STY TEMPA+1\r
+       TAY                     ;USE AS INDEX\r
+       LDX I,NCHANL-1                  ;NO.\r
+       BEGIN                   ;--;LOOP FOR EACH 1/2 CHANNEL\r
+       LDA Y,PNTRS\r
+       IFNE                    ;IF POINTER 0 DONT TOUCH THIS CHANNEL\r
+       STX SINDEX\r
+       STA X,POINT             ;IF NOT SET UP POINTER \r
+       LDA I,1\r
+       STA X,FRAMES            ;DUMMY START, NO SOUND\r
+       STA X,COUNT             ;TILL MODSND STORES TO POKEY\r
+       LDA I,-1\r
+       STA SINDEX\r
+       THEN\r
+       DEY\r
+       DEX\r
+       MIEND\r
+       LDX TEMPA               ;RESTORE X & Y UPON RETURN\r
+       LDY TEMPA+1\r
+       THEN\r
+       RTS\r
+       .PAGE\r
+       .SBTTL SOUND ROUTINE\r
+;\r
+;CONTINUES A PREVIOUSLY STARTED SOUND\r
+;WHEN CHANNEL 1 GOES IDLE, ALL SOUND ENDS\r
+;\r
+MODSND:\r
+       LDX I,NCHANL-1                  ;8 CHANNELS\r
+       BEGIN\r
+       LDA X,POINT\r
+       IFNE                    ;1 SET OF FRAMES EXPIRED?\r
+       CPX SINDEX\r
+       IFNE\r
+       DEC X,FRAMES            ;YES\r
+       IFEQ                    ;SUBCHANNEL ACTIVE?\r
+       DEC X,COUNT             ;YES.\r
+       IFEQ                    ;MOVE TO NEXT CHANGE GROUP?\r
+RESOUN:        INC X,POINT             ;YES. START VALUE\r
+       INC X,POINT\r
+       LDA X,POINT\r
+       ASL\r
+       TAY\r
+       IFCC\r
+       LDA Y,SOUND+STVAL\r
+       STA X,CURRENT\r
+       LDA Y,SOUND+NUMBER\r
+       STA X,COUNT\r
+       LDA Y,SOUND+FRCNT\r
+       ELSE\r
+       LDA Y,SOUND+STVAL+100\r
+       STA X,CURRENT\r
+       LDA Y,SOUND+NUMBER+100\r
+       STA X,COUNT\r
+       LDA Y,SOUND+FRCNT+100\r
+       ENDIF\r
+       STA X,FRAMES\r
+       IFEQ                    ;CHANNEL STILL ALIVE?\r
+       STA X,POINT             ;NO. KILL IT\r
+       LDA X,CURRENT\r
+       IFNE                    ;RESTART CHANNEL?\r
+       STA X,POINT             ;YES. UPDATE PTR. WITH RESTART LOC\r
+       BNE RESOUN\r
+       ENDIF\r
+       ENDIF                   ;\r
+       ELSE                    ;NO. MAKE CHANGE IN OLD GROUP\r
+       ASL\r
+       TAY\r
+       IFCC\r
+       LDA Y,SOUND+FRCNT\r
+       STA X,FRAMES\r
+       LDA Y,SOUND+CHANGE\r
+       ELSE\r
+       LDA Y,SOUND+FRCNT+100\r
+       STA X,FRAMES\r
+       LDA Y,SOUND+CHANGE+100\r
+       ENDIF\r
+       LDY X,CURRENT\r
+       CLC\r
+       ADC X,CURRENT\r
+       STA X,CURRENT\r
+       TXA\r
+       LSR\r
+       IFCS\r
+       TYA\r
+       EOR X,CURRENT\r
+       AND I,0F0\r
+       EOR X,CURRENT\r
+       STA X,CURRENT\r
+       ENDIF\r
+       ENDIF\r
+       LDA X,CURRENT           ;UPDATE POKEY AUDIO CHANNEL\r
+       CPX I,8\r
+       IFCS\r
+       STA X,AUD2F1-8\r
+       ELSE\r
+       STA X,AUDF1\r
+       ENDIF\r
+       ENDIF\r
+       ENDIF\r
+       ENDIF\r
+       DEX\r
+       MIEND\r
+       RTS\r
+       .PAGE\r
+INISOU:        LDA I,0\r
+       STA A,AUDF1+0F\r
+       STA AUD2F1+0F\r
+       LDA I,7\r
+       STA A,AUDF1+0F\r
+       STA AUD2F1+0F\r
+       LDX I,7\r
+       LDA I,0\r
+       BEGIN\r
+       STA AX,AUDF1\r
+       STA X,AUD2F1\r
+       STA X,POINT\r
+       STA X,CURRENT\r
+       DEX\r
+       MIEND\r
+       LDA I,AUDCV\r
+       STA AUDCTL\r
+       LDX #0                  ;DEFAULT VALUE FOR AUDCV2\r
+       STX AUD2CT\r
+       RTS\r
+\f      HLL65\r
+       .PAGE\r
+       .SBTTL  HUM SOUND CONTROL\r
+;\r
+; HUM SOUND\r
+;\r
+HUM:   LDA COMTIMER            ;FORCE FIELD UP?\r
+       BNE 10$                 ;DO SOUND\r
+       STA POKEY2+CHAN2F       ;TURN OFF\r
+       STA POKEY2+CHAN2V\r
+       STA SFREQ\r
+       STA AUD2CT              ;SET BACK TO NORMAL FREQ.\r
+       TAX\r
+       LDA #0FF\r
+       BNE 25$                 ;*****ALWAYS**\r
+10$:   LDA #01\r
+       STA AUD2CT              ;LOWER FREQ OF HUM\r
+       LDA FRAME\r
+       AND #07\r
+       BNE 20$                 ;NO CHANGE\r
+       LDA SFREQ               ;UP FREQ\r
+       CMP #30                 ;MAX\r
+       BCC 20$\r
+;      CLC\r
+       SBC #01                 ;BMP UP\r
+       STA SFREQ\r
+20$:   LDA SFREQ               ;IN CASE WE CAME FROM 10$ ABOVE\r
+       STA POKEY2+CHAN2F\r
+       LDX #0A3                ;TONE\r
+       STX POKEY2+CHAN2V\r
+25$:   LDY POINT+4             ;IS CHAN 3 ACTIVE?\r
+       BNE 40$                 ;IF IN USE, DON'T TOUCH\r
+       CLC\r
+       ADC #01\r
+       STA POKEY+CHAN3F\r
+       STX POKEY+CHAN3V\r
+40$:   RTS\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
\ No newline at end of file
diff --git a/AS2ROM.MAC b/AS2ROM.MAC
new file mode 100644 (file)
index 0000000..4635531
--- /dev/null
@@ -0,0 +1,1122 @@
+       .TITLE AS2ROM\r
+       .ASECT\r
+       .RADIX 16\r
+       .SBTTL *************************\r
+       .SBTTL *\r
+       .SBTTL *PROGRAMMER: OWEN RUBIN\r
+       .SBTTL *\r
+       .SBTTL *************************\r
+       .REPT 0\r
+PROJECT #: 21503\r
+       \r
+DISK #: 77 B43\r
+\r
+OTHER SEE FILE "AST2RD"\r
+       \r
+       .ENDR\r
+;ENTRY POINTS\r
+       .GLOBL CUBNM8,CUBNM9\r
+       .GLOBL TEST1,L0,ASTMG8,ASTMG9,L02,WNDSET\r
+       .GLOBL QTST6,CNTSCL\r
+       .GLOBL CNTR8,CNTR9,CHAR12\r
+       .GLOBL CLPT28,CLPT29\r
+       .GLOBL LIVEPAR,LIVUDPAR,LLIVESHIP,ULIVESHIP\r
+       .GLOBL LLIVUDSHIP,ULIVUDSHIP,CNTHSC,QHEADER\r
+       .GLOBL FRCFLD,FRCFL8,FRCFL9\r
+       .GLOBL RHTSHP,LFTSHP,PLTLIV,LFUDSHIP,PAIRUD\r
+       .GLOBL PL0SET,PL1SET,CMSBSET,CMBSET\r
+;GLOBL TABLES\r
+       .GLOBL NAMES\r
+       .GLOBL VGMSGU\r
+;MISC GLOBALS\r
+       .GLOBL PL1COL,PL0COL,RODCOL,GRBLUE,RED,YELLOW,WHITE,PYR11,PYR12\r
+       .GLOBL BLUE,GREEN\r
+       .GLOBL PYR13,CVR11,CVR12,CVR13,VROCK1,VROCK2,VROCK3\r
+       .GLOBL VROCK4,SAU11,SAU12,SAU13,SAUCRC,CVR21,CVR22,CVR23\r
+       .GLOBL EXP9,EXP10,EXP11,EXP12,EXP13,EXP14,EXP15,EXP16\r
+       .IRPC X,<0123>\r
+       .GLOBL ROCK'X'1,ROCK'X'2,PYRM'X'1,CUBE'X'1,STAR'X'1\r
+       .GLOBL PLN'X'1,PENT'X'1\r
+       .ENDR\r
+       .GLOBL HEXA01,HEXA11,HEXA21,HEXA31\r
+       .GLOBL CNTSCL,SHOT,DWARF,COMET,SHIELD,MINE,SAUCER,EXPSHP\r
+       .GLOBL XPLPIECES\r
+MINBR  =12.            ;A GOOD SHOWING BRIGHTNESS\r
+       .NLIST\r
+       .INCLUDE AS2DEC ;<<<<<<<<<<<<<<<<<<<<<<<<<<\r
+       .INCLUDE VGMC   ;<<<<<<<<<<<<<<<<<<<<<<<<<<\r
+       .LIST\r
+       .SBTTL LABS\r
+       .MACRO LABS DX,DY\r
+       CNTR \r
+       VCTR DX,DY,0\r
+       .ENDM\r
+       \r
+;\r
+;VCTRSC-DRAW VECTOR INSTRUCTION\r
+;THIS INSTRUCTION DRAWS A VECTOR ON THE DISPLAY AREA\r
+;RELATIVE TO THE PREVIOUS BEAM POSITION BEFORE THE\r
+;INSTRUCTION IS EXECUTED. DX IS THE CHANGE IN BEAM X\r
+;POSITION; DY IS THE CHANGE IN BEAM Y POSITION; ZZ\r
+;SPECIFIES THE BEAM INTENSITY (0 THROUGH 7., 0 IS\r
+;NO INTENSITY, 7. IS BRIGHTEST INTENSITY).\r
+;..SCAL IS SCALE TO BE SET (1,2,4,8)\r
+;\r
+       .SBTTL VCTRSC\r
+       .MACRO VCTRSC DX,DY,ZZ\r
+       .IF GE,DX\r
+       ..1=DX+<..SCAL/2>/..SCAL\r
+       ..6=..1\r
+       .IFF\r
+       ..1=DX-<..SCAL/2>/..SCAL\r
+       ..6=-..1\r
+       .ENDC\r
+       .IF GE,DY\r
+       ..2=DY+<..SCAL/2>/..SCAL\r
+       ..7=..2\r
+       .IFF\r
+       ..2=DY-<..SCAL/2>/..SCAL\r
+       ..7=-..2\r
+       .ENDC\r
+       ..5=..6!..7\r
+       .IF EQ,..5&^H0FFE1\r
+       .WORD ^H4000+<ZZ*^H20>+<..1/2&^H1F>+<..2*^H80&^H1F00>\r
+       .MEXIT\r
+       .ENDC\r
+       .WORD ..2&^H1FFF,<ZZ*^H2000>+<..1&^H1FFF>\r
+       .ENDM\r
+;ASCIN - TAKE AN ASCII STRING AND MAP 3 CHARACTERS TO 2 BYTES\r
+;\r
+;THIS MACRO PACKS 3 ASCII CHARACTERS (BLANK, A THRU Z,0,1 OR 2) INTO 2\r
+;BYTES IN THE FORMAT\r
+;      AAAAABBB BBCCCCCD\r
+;WHERE D=1 MEANS END OF LIST\r
+;      AAAAA,BBBBB,CCCCC=INDEX AS FOLLOWS\r
+;      0=END OF LIST\r
+;      1=BLANK\r
+;      2=0\r
+;      3=1\r
+;      4=2\r
+;      5=A\r
+;      ETC.\r
+       .MACRO ASCIN STRING\r
+       ..N=0\r
+       .NCHR ..C,<STRING>\r
+       .ENABL M68\r
+       .IRPC ..5,<STRING>\r
+       ..4=''..5\r
+       ..C=..C-1\r
+       ..3=0\r
+       .IIF EQ,..4-^H20,..3=1\r
+       .IF GE,..4-^H30\r
+       .IIF LT,..4-^H33,..3=..4-^H30+2\r
+       .ENDC\r
+       .IF GE,..4-^H41\r
+       .IIF LT,..4-^H5B,..3=..4-^H41+5\r
+       .ENDC\r
+       .IIF EQ,..N,..1=..3\r
+       .IIF EQ,..N-1,..2=..3\r
+       ..N=..N+1\r
+       .IF EQ,..N-3\r
+       ..N=0\r
+       .IIF EQ,..C,.WORD <..1*^H800>+<..2*^H40>+<..3*2>+1\r
+       .IIF NE,..C,.WORD <..1*^H800>+<..2*^H40>+<..3*2>\r
+       .ENDC\r
+       .ENDM\r
+       .IIF EQ,..N-1,.WORD ..1*^H800\r
+       .IIF EQ,..N-2,.WORD <..1*^H800>+<..2*^H40>\r
+       .DSABL M68\r
+       .ENDM\r
+       \r
+       \r
+..SCAL =1                      ;DESAULT SCALE\r
+       ..TASS=-1/2             ;TEST MACRO\r
+.BRITE =1                      ;VECTOR BRIGHTNESS=STATUS INSTRUCTION\r
+.BRITR =7\r
+       .=^H3000\r
+       .PAGE\r
+       .SBTTL ATTRACT MODE BOXES\r
+;OUTSIDE BOX\r
+       HEAD BOXES\r
+       JSRL CNTSCL\r
+       VCTR -510.,248.,0\r
+       VCTR 1022.,0,1\r
+       VCTR 0,-560.,1\r
+       VCTR -1022.,0,1\r
+       VCTR 0,560.,1\r
+       VCTR 511.,0,0\r
+       VCTR 0,-560.,1\r
+       VCTR 508.,280.,0\r
+       VCTR -1023.,0,1\r
+       RTSL\r
+;CABERET BOX\r
+       HEAD BOXCB\r
+       JSRL CNTSCL\r
+       VCTR -255.,248.,0\r
+       VCTR 510.,0,1\r
+       VCTR 0,-560.,1\r
+       VCTR -510.,0,1\r
+       VCTR 0,560.,1\r
+       VCTR 0,-280.,0\r
+       VCTR 510.,0,1\r
+       RTSL\r
+;MOVING BOX #1\r
+       HEAD BOX1\r
+       VCTR 492.,0,1\r
+       VCTR 0,-260.,1\r
+       VCTR -492.,0,1\r
+       VCTR 0,260.,1\r
+       RTSL\r
+; MOVING BOX 2 .... INSIDE BOX 1\r
+;\r
+       HEAD BOX2\r
+;ASSUMES POSITIONED FOR BOX 1\r
+       VCTR 10.,-10.,0\r
+       VCTR 470.,0,1\r
+       VCTR 0,-240.,1\r
+       VCTR -472.,0,1\r
+       VCTR 0,240.,1\r
+       VCTR -10.,10.,0\r
+       RTSL\r
+;BOX 3 -- INSIDE BOX 2\r
+       HEAD BOX3\r
+;ASSUMES POSITIONED FOR BOX 1\r
+       VCTR 20.,-20.,0\r
+       VCTR 450.,0,1\r
+       VCTR 0,-220.,1\r
+       VCTR -450.,0,1\r
+       VCTR 0,220.,1\r
+       VCTR -20.,20.,0\r
+       RTSL\r
+;BOX 4 -- INSIDE BOX 3\r
+       HEAD BOX4\r
+;ASSUMES POSITIONED FOR BOX 1\r
+       VCTR 30.,-30.,0\r
+       VCTR 430.,0,1\r
+       VCTR 0,-200.,1\r
+       VCTR -430.,0,1\r
+       VCTR 0,200.,1\r
+       VCTR 30.,-30.,0\r
+       RTSL\r
+       .PAGE\r
+       .SBTTL MISC VECTOR STUFF\r
+LIVEPAR:\r
+       SCAL 2,0\r
+       VCTR 64.,0,0\r
+       RTSL\r
+LIVUDPAR:\r
+       SCAL 2,0\r
+       VCTR -64.,0,0\r
+       RTSL\r
+LLIVESHIP:\r
+       LBYJSR RHTSHP\r
+       LBYJSR LFTSHP\r
+       LBYJSR PLTLIV\r
+ULIVESHIP:\r
+       UBYJSR RHTSHP\r
+       UBYJSR LFTSHP\r
+       UBYJSR PLTLIV\r
+;FOR UPSIDEDOWN PICTURES\r
+LLIVUDSHIP:\r
+       LBYJSR LFUDSHIP\r
+       LBYJSR PAIRUD\r
+ULIVUDSHIP:\r
+       UBYJSR LFUDSHIP\r
+       UBYJSR PAIRUD\r
+       HEAD CNTRS\r
+CNTHSC:        CNTR\r
+       SCAL 3,0\r
+       RTSL\r
+QHEADER:CNTR\r
+       JSRL PL0SET\r
+       JSRL PL1SET\r
+       JMPL CMSBSET\r
+FRCFLD:\r
+       HEAD FRCFL\r
+       JSRL CNTSCL\r
+       HEAD FRBOX\r
+       VCTR -511.,-383.,0\r
+       VCTR 1023.,0,1\r
+       VCTR 0,767.,1\r
+       VCTR -1023.,0,1\r
+       VCTR 0,-767.,1\r
+       RTSL\r
+       .PAGE\r
+;\r
+       .INCLUDE VGAN           ;<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\r
+       JSRL CHAR12             ;ADD HALF FOR TEST\r
+       RTSL\r
+       .BRITE=5\r
+       .RADIX 10\r
+       HEAD HATCH\r
+;*********************************************************\r
+;* TEST PATTERN .. ASSUMES FRBOX IS CALLED IMMED. BEFORE *\r
+;*********************************************************\r
+TEST1: VCTR -512,-384,0\r
+       VCTR 767,767,.BRITE             ;DRAW 45 DEGREE LINES\r
+       VCTR 256,-256,.BRITE\r
+       VCTR -511,-511,.BRITE\r
+       VCTR -512,512,.BRITE\r
+       VCTR 256,255,.BRITE\r
+       VCTR 767,-767,.BRITE\r
+       LABS 511,383            ;DRAW THE OTHER 45 DEGREE LINES\r
+       VCTR -767,-767,.BRITE\r
+       VCTR -256,255,.BRITE\r
+       VCTR 512,512,.BRITE\r
+       VCTR 511,-511,.BRITE\r
+       VCTR -256,-256,.BRITE\r
+       VCTR -767,767,.BRITE\r
+       CNTR\r
+       VCTR -496.,-128.,0\r
+       JMPL VGMSGA\r
+;HALF CHAR\r
+       HEAD HALF\r
+CHAR12:        VCTR 16,24,6\r
+       VCTR -14,-10,0\r
+       SCAL 2\r
+       JSRL CHAR.1\r
+       VCTR -8,-28,1\r
+       JSRL CHAR.2\r
+       SCAL 1\r
+       RTSL\r
+UCHR.A:        VCTR 0,-16,.BRITE\r
+       VCTR -8,-8,.BRITE\r
+       VCTR -8,8,.BRITE\r
+       VCTR 0,16,.BRITE\r
+       VCTR 16,-8,0\r
+       VCTR -16,0,.BRITE\r
+       VCTR -8,8,0\r
+       RTSL\r
+       \r
+UCHR.B:        VCTR 0,-24,.BRITE\r
+       VCTR -12,0,.BRITE\r
+       VCTR -4,4,.BRITE                \r
+       VCTR 0,4,.BRITE\r
+       VCTR 4,4,.BRITE\r
+       VCTR 12,0,.BRITE\r
+       VCTR -12,0,0\r
+       VCTR -4,4,.BRITE\r
+       VCTR 0,4,.BRITE\r
+       VCTR 4,4,.BRITE\r
+       VCTR 12,0,.BRITE\r
+       JMPL UCHR.\r
+       \r
+UCHR.C:        VCTR 0,-24,.BRITE\r
+       VCTR -16,0,.BRITE\r
+       VCTR 16,24,0\r
+       JMPL UUNDERL\r
+       \r
+UCHR.D:        VCTR 0,-24,.BRITE\r
+       VCTR -8,0,.BRITE\r
+       VCTR -8,8,.BRITE\r
+       VCTR 0,8,.BRITE\r
+       VCTR 8,8,.BRITE\r
+       VCTR 8,0,.BRITE\r
+       JMPL UCHR.\r
+       \r
+UCHR.E:        VCTR -16,0,.BRITE\r
+       VCTR 16,0,0\r
+UCHR.F:        VCTR 0,-24,.BRITE\r
+       VCTR -16,0,.BRITE\r
+       VCTR 4,12,0\r
+       VCTR 12,0,.BRITE\r
+UCHRF1:        VCTR -24,12,0\r
+       RTSL\r
+       \r
+UCHR.G:        VCTR 0,-24,.BRITE\r
+       VCTR -16,0,.BRITE\r
+       VCTR 0,8,.BRITE\r
+       VCTR 8,8,0\r
+       VCTR -8,0,.BRITE\r
+       VCTR 0,8,.BRITE\r
+       JMPL UCHR01\r
+       \r
+UCHR.H:        VCTR 0,-24,.BRITE\r
+       VCTR 0,12,0\r
+       VCTR -16,0,.BRITE\r
+       VCTR 0,-12,0\r
+       JMPL UCHR72\r
+       \r
+UCHR.I:        VCTR -16,0,.BRITE\r
+       VCTR 16,-24,0\r
+UCHRI1:        VCTR -16,0,.BRITE\r
+       VCTR 8,0,0\r
+UCHRI2:        VCTR 0,24,.BRITE\r
+       VCTR -16,0,0\r
+       RTSL\r
+       \r
+UCHR.J:        VCTR 0,-8,0\r
+       VCTR -8,8,.BRITE\r
+       VCTR -8,0,.BRITE\r
+       JMPL UCHRU1\r
+       \r
+UCHR.K:        VCTR 0,-24,.BRITE\r
+       VCTR -12,0,0\r
+       VCTR 12,12,.BRITE\r
+       VCTR -12,12,.BRITE\r
+       VCTR -12,0,0\r
+       RTSL\r
+       \r
+UCHR.L:        VCTR 0,-24,0\r
+       VCTR 0,24,.BRITE\r
+       JMPL UUNDERL\r
+       \r
+UCHR.M:        VCTR 0,-24,.BRITE\r
+       VCTR -8,8,.BRITE\r
+       VCTR -8,-8,.BRITE\r
+       JMPL UCHR72\r
+       \r
+UCHR.N:        VCTR 0,-24,.BRITE\r
+       VCTR -16,24,.BRITE\r
+       JMPL UCHRU1\r
+       \r
+UCHR.O:        VCTR 0,-24,.BRITE\r
+       VCTR -16,0,.BRITE\r
+       VCTR 0,24,.BRITE\r
+UCHR01:        VCTR 16,0,.BRITE\r
+UCHR.: VCTR -24,0,0            ;BLANK\r
+       RTSL\r
+       \r
+UCHR.P:        VCTR 0,-24,.BRITE\r
+       VCTR -16,0,.BRITE\r
+       VCTR 0,12,.BRITE\r
+       VCTR 16,0,.BRITE\r
+       JMPL UCHRF1\r
+       \r
+UCHR.Q:        VCTR 0,-24,.BRITE\r
+       VCTR -16,0,.BRITE\r
+       VCTR 0,16,.BRITE\r
+       VCTR 8,8,.BRITE\r
+       VCTR 8,0,.BRITE\r
+       VCTR -8,-8,0\r
+       VCTR -8,8,.BRITE\r
+       JMPL UCHR21\r
+       \r
+UCHR.R:        VCTR 0,-24,.BRITE\r
+       VCTR -16,0,.BRITE\r
+       VCTR 0,12,.BRITE\r
+       VCTR 16,0,.BRITE\r
+       VCTR -4,0,0\r
+       VCTR -12,12,.BRITE\r
+       JMPL UCHR21\r
+       \r
+UCHR.S:        VCTR -16,0,.BRITE\r
+       VCTR 0,-12,.BRITE\r
+       VCTR 16,0,.BRITE\r
+       VCTR 0,-12,.BRITE\r
+       VCTR -16,0,.BRITE\r
+       JMPL UCHRU2\r
+       \r
+UCHR.T:        VCTR 0,-24,0\r
+       JMPL UCHRI1\r
+       \r
+UCHR.U:        VCTR 0,-24,0\r
+       VCTR 0,24,.BRITE\r
+       VCTR -16,0,.BRITE\r
+UCHRU1:        VCTR 0,-24,.BRITE\r
+UCHRU2:        VCTR -8,24,0\r
+       RTSL\r
+       \r
+UCHR.V:        VCTR 0,-24,0\r
+       VCTR -8,24,.BRITE\r
+       VCTR -8,-24,.BRITE\r
+       JMPL UCHRU2\r
+       \r
+UCHR.W:        VCTR 0,-24,0\r
+       VCTR 0,24,.BRITE\r
+       VCTR -8,-8,.BRITE\r
+       VCTR -8,8,.BRITE\r
+       JMPL UCHRU1\r
+       \r
+UCHR.X:        VCTR -16,-24,.BRITE\r
+       VCTR 16,0,0\r
+       VCTR -16,24,.BRITE\r
+       JMPL UCHR73\r
+       \r
+UCHR.Y:        VCTR -8,0,0\r
+       VCTR 0,-16,.BRITE\r
+       VCTR 8,-8,.BRITE\r
+       VCTR -16,0,0\r
+       VCTR 8,8,.BRITE\r
+       VCTR -16,16,0\r
+       RTSL\r
+       \r
+UCHR.Z:        VCTR 0,-24,0\r
+       VCTR -16,0,.BRITE\r
+       VCTR 16,24,.BRITE\r
+       JMPL UUNDERL\r
+       \r
+UCHR.0 =UCHR.O\r
+       \r
+UCHR.1:        VCTR -8,-24,0\r
+       JMPL UCHRI2\r
+       \r
+UCHR.2:        VCTR 0,-24,0\r
+       VCTR -16,0,.BRITE\r
+       VCTR 0,12,.BRITE\r
+       VCTR 16,0,.BRITE\r
+       VCTR 0,12,.BRITE\r
+UUNDERL:       VCTR -16,0,.BRITE\r
+UCHR21:        VCTR -8,0,0\r
+       RTSL\r
+       \r
+UCHR.3:        VCTR 0,-24,0\r
+UCHR31:        VCTR -16,0,.BRITE\r
+       VCTR 0,24,.BRITE\r
+       VCTR 16,0,.BRITE\r
+       VCTR 0,-12,0\r
+       VCTR -16,0,.BRITE\r
+       VCTR -8,12,0\r
+       RTSL\r
+       \r
+UCHR.4:        VCTR 0,-24,0\r
+       VCTR 0,12,.BRITE\r
+       VCTR -16,0,.BRITE\r
+       VCTR 0,-12,0\r
+       JMPL UCHR72\r
+       \r
+UCHR.5 =UCHR.S\r
+       \r
+UCHR.6:        VCTR 0,-12,0\r
+       VCTR -16,0,.BRITE\r
+       VCTR 0,12,.BRITE\r
+       VCTR 16,0,.BRITE\r
+       VCTR 0,-24,.BRITE\r
+       VCTR -24,24,0\r
+       RTSL\r
+       \r
+UCHR.7:        VCTR 0,-24,0\r
+UCHR71:        VCTR -16,0,.BRITE\r
+UCHR72:        VCTR 0,24,.BRITE\r
+UCHR73:        VCTR -8,0,0\r
+       RTSL\r
+       \r
+UCHR.8:        VCTR 0,-24,.BRITE\r
+       JMPL UCHR31\r
+       \r
+UCHR.9:        VCTR -16,-12,0\r
+       VCTR 16,0,.BRITE\r
+       VCTR 0,-12,.BRITE\r
+       JMPL UCHR71\r
+\r
+VGMSGU:        JSRL    UCHR.           ;ADDRESS OF LETTER ROUTINES\r
+       JSRL    UCHR.0\r
+       JSRL    UCHR.1\r
+       JSRL    UCHR.2\r
+       JSRL    UCHR.3\r
+       JSRL    UCHR.4\r
+       JSRL    UCHR.5\r
+       JSRL    UCHR.6\r
+       JSRL    UCHR.7\r
+       JSRL    UCHR.8\r
+       JSRL    UCHR.9\r
+       JSRL    UCHR.A\r
+       JSRL    UCHR.B\r
+       JSRL    UCHR.C\r
+       JSRL    UCHR.D\r
+       JSRL    UCHR.E\r
+       JSRL    UCHR.F\r
+       JSRL    UCHR.G\r
+       JSRL    UCHR.H\r
+       JSRL    UCHR.I\r
+       JSRL    UCHR.J\r
+       JSRL    UCHR.K\r
+       JSRL    UCHR.L\r
+       JSRL    UCHR.M\r
+       JSRL    UCHR.N\r
+       JSRL    UCHR.O\r
+       JSRL    UCHR.P\r
+       JSRL    UCHR.Q\r
+       JSRL    UCHR.R\r
+       JSRL    UCHR.S\r
+       JSRL    UCHR.T\r
+       JSRL    UCHR.U\r
+       JSRL    UCHR.V\r
+       JSRL    UCHR.W\r
+       JSRL    UCHR.X\r
+       JSRL    UCHR.Y\r
+       JSRL    UCHR.Z\r
+       .RADIX 16\r
+RTN:   VCTR -100,10,0\r
+       RTSL\r
+; SELF TEST COLOR PATTER DRMIV.\r
+       HEAD CLPAT\r
+       VCTR 100,0,7\r
+       JSRL RTN\r
+       HEAD CLPT2\r
+       VCTR 100,0,6\r
+       JSRL RTN\r
+       VCTR 100,0,5\r
+       JSRL RTN\r
+       VCTR 100,0,4\r
+       JSRL RTN\r
+       VCTR 100,0,3\r
+       JSRL RTN\r
+       VCTR 100,0,2\r
+       RTSL\r
+       HEAD CL73\r
+;SPECIAL FOR INTENSITY ADJUSTMENT\r
+       COLOR WHITE,1           ;FOR INTENSITY 1\r
+       VCTR 40,0,2             ;MAKE THIS LINE A BIT LONGER\r
+       VCTR -140,10,0\r
+       VCTR 100,0,1\r
+       RTSL\r
+       HEAD VLINE\r
+       VCTR 0,-767., 1\r
+       CNTR\r
+       RTSL\r
+       HEAD HLINE\r
+       VCTR 1023.,0,1\r
+       CNTR\r
+       RTSL\r
+       .RADIX 10\r
+;***** SELF TEST PATTERN **************\r
+       HEAD QTST6\r
+       COLOR 7,12\r
+       CNTR\r
+       JMPL TEST1\r
+;*******HYSTERSIS PATTERN**************\r
+       HEAD HYSTR\r
+       CNTR\r
+       SCAL 0,0\r
+       VCTR 0,192.,0\r
+       JSRL WAIT\r
+       VCTR 10,0,1\r
+       CNTR\r
+       VCTR 0,-192.,0\r
+       JSRL WAIT\r
+       VCTR 10.,0,1\r
+       CNTR\r
+       VCTR 256.,0,0\r
+       JSRL WAIT\r
+       VCTR 0,10,1\r
+       CNTR\r
+       VCTR -256.,0,0\r
+       JSRL WAIT\r
+       VCTR 0,10.,1\r
+       CNTR\r
+       RTSL\r
+WAIT:  COLOR WHITE,8.\r
+       CNTR\r
+       CNTR                    ;MAKE SURE IT GETS BACK.\r
+       RTSL\r
+       HEAD WNDSE\r
+WNDSET:        JSRL CNTSCL\r
+       VCTR -300.,-300.,0\r
+       STAT 0,0,0\r
+       VCTR 600.,600.,0\r
+       RTSL\r
+       .RADIX 10\r
+       ..SCAL=2\r
+;PICTURE FOR GAME SELECT OF LONE GAME\r
+       HEAD LONE\r
+RHTSHP:\r
+       COLOR PL0COL,12\r
+       VCTRSC 8,-32,0\r
+       VCTRSC 2,4,1\r
+       VCTRSC 10,0,1\r
+       VCTRSC 0,16,1\r
+       VCTRSC -16,24,1\r
+       VCTRSC 0,2,1\r
+       VCTRSC 6,0,1\r
+       VCTRSC 0,4,1\r
+       VCTRSC -6,2,1\r
+       VCTRSC 0,4,1\r
+       VCTRSC -4,12,1\r
+       VCTRSC -4,-12,1\r
+       VCTRSC 0,-4,1\r
+       VCTRSC -6,-7,1\r
+       VCTRSC 0,1,1\r
+       VCTRSC 6,0,1\r
+       VCTRSC 0,-2,1\r
+       VCTRSC -16,-24,1\r
+       VCTRSC 0,-15,1\r
+       VCTRSC 10,0,1\r
+       VCTRSC -4,-2,1\r
+       VCTRSC 16,0,1\r
+       VCTRSC -8+100,32-3,0    ;-3 IS AKLUDE\r
+       RTSL\r
+LFTSHP:        COLOR PL1COL,12\r
+LFTSH2:        VCTRSC 12,-24,0\r
+       VCTRSC 0,-8,1\r
+       VCTRSC 8,8,1\r
+       VCTRSC 0,20,1\r
+       VCTRSC -8,4,1\r
+       VCTRSC 1,-8,1\r
+       VCTRSC -7,4,1\r
+       VCTRSC 0,16,1\r
+       VCTRSC -4,24,1\r
+       VCTRSC -4,0,1\r
+       VCTRSC -4,-24,1\r
+       VCTRSC 0,-16,1\r
+       VCTRSC -6,-4,1\r
+       VCTRSC 0,8,1\r
+       VCTRSC -8,-4,1\r
+       VCTRSC 0,-20,1\r
+       VCTRSC 8,-8,1\r
+       VCTRSC 0,8,1\r
+       VCTRSC 12,4,1\r
+       VCTRSC 12,-4,1\r
+       VCTRSC -24+100,24,0\r
+       RTSL\r
+PAIRUD:\r
+       SCAL 2,0\r
+       COLOR PL0COL,12\r
+       VCTRSC -8,32,0\r
+       VCTRSC -2,-4,1\r
+       VCTRSC -10,0,1\r
+       VCTRSC 0,-16,1\r
+       VCTRSC 16,-24,1\r
+       VCTRSC 0,-2,1\r
+       VCTRSC -6,0,1\r
+       VCTRSC 0,-4,1\r
+       VCTRSC 6,-2,1\r
+       VCTRSC 0,-4,1\r
+       VCTRSC 4,-12,1\r
+       VCTRSC 4,12,1\r
+       VCTRSC 0,4,1\r
+       VCTRSC 6,7,1\r
+       VCTRSC 0,-1,1\r
+       VCTRSC -6,0,1\r
+       VCTRSC 0,2,1\r
+       VCTRSC 16,24,1\r
+       VCTRSC 0,15,1\r
+       VCTRSC -10,0,1\r
+       VCTRSC 4,2,1\r
+       VCTRSC -16,0,1\r
+       VCTR -10,-63,0\r
+       JSRL LFUDSHIP\r
+       VCTR 0,50,0\r
+       RTSL\r
+LFUDSHIP:\r
+       COLOR PL1COL,12\r
+       VCTRSC -12,24,0\r
+       VCTRSC 0,8,1\r
+       VCTRSC -8,-8,1\r
+       VCTRSC 0,-20,1\r
+       VCTRSC 8,-4,1\r
+       VCTRSC -1,8,1\r
+       VCTRSC 7,-4,1\r
+       VCTRSC 0,-16,1\r
+       VCTRSC 4,-24,1\r
+       VCTRSC 4,0,1\r
+       VCTRSC 4,24,1\r
+       VCTRSC 0,16,1\r
+       VCTRSC 6,4,1\r
+       VCTRSC 0,-8,1\r
+       VCTRSC 6,4,1\r
+       VCTRSC 0,-8,1\r
+       VCTRSC 8,4,1\r
+       VCTRSC 0,20,1\r
+       VCTRSC -8,8,1\r
+       VCTRSC 0,-8,1\r
+       VCTRSC -12,-4,1\r
+       VCTRSC -12,4,1\r
+       VCTRSC 24-100,-24,0\r
+       RTSL\r
+       ..SCAL=1                ;RESTORE NORMAL SCALE\r
+;PICTURE FOR DISPLAY OF GAME\r
+       HEAD FIGP\r
+       VCTR -100,0,0\r
+       JSRL LFTSHP\r
+       VCTR 100,0,0\r
+       JMPL RHTSHP\r
+       \r
+;DISPLAY FOR 1 PLAYER SPACE STATION ALL IN RED\r
+       HEAD SPONE\r
+       COLOR PL0COL,10\r
+       VCTR -100/2,0,0\r
+       JSRL LFTSH2\r
+       JMPL SPCONT\r
+       HEAD SPSTA\r
+       VCTR -100/2,0,0\r
+       JSRL LFTSHP\r
+SPCONT:        COLOR RODCOL,15\r
+       VCTR -100/2,0,0         ;BACK TO CENTER\r
+       VCTR 200/2,0,5          ;ROD\r
+       JMPL RHTSHP\r
+\fXPLPIECE:\r
+EXPSHP:        VCTR    -8,-12,.BRITR   ;PICTURES OF SHIP PIECES FOR EXPLOSION\r
+       VCTR    8,12,0\r
+       VCTR    4,-8,.BRITR     ;THESE MUST BE ALPH INSTRUCTIONS\r
+       VCTR    -4,8,0\r
+       VCTR    6,2,.BRITR\r
+       VCTR    -6,-2,0\r
+       VCTR    -8,8,.BRITR\r
+       VCTR    8,-8,0\r
+       VCTR    -6,2,.BRITR\r
+       VCTR    6,-2,0\r
+       VCTR    4,-4,.BRITR\r
+       VCTR    -4,4,0\r
+       \r
+       \r
+\r
+;THEN 0,0.BRITR CAN BE JSRL'S\r
+EXP16: COLOR   RED,11\r
+       VCTR    -16,0,0\r
+       VCTR    2,0,1\r
+       VCTR    -16,-16,0\r
+       VCTR    2,0,1\r
+       VCTR    16,-16,0\r
+       VCTR    2,0,1\r
+       VCTR    24,8,0\r
+       VCTR    2,0,1\r
+       VCTR    16,-8,0\r
+       VCTR    2,0,1\r
+       VCTR    0,16,0\r
+       VCTR    2,0,1\r
+       VCTR    8,24,0\r
+       VCTR    2,0,1\r
+       VCTR    -8,24,0\r
+       VCTR    2,0,1\r
+       VCTR    -32,-8,0\r
+       VCTR    2,0,1\r
+       VCTR    -24,8,0\r
+       VCTR    2,0,1\r
+       RTSL\r
+\r
+EXP14: COLOR   RED,13\r
+       VCTR    -14,0,0\r
+       VCTR    2,0,1\r
+       VCTR    -14,-14,0\r
+       VCTR    2,0,1\r
+       VCTR    14,-14,0\r
+       VCTR    2,0,1\r
+       VCTR    21,7,0\r
+       VCTR    2,0,1\r
+       VCTR    14,-7,0\r
+       VCTR    2,0,1\r
+       VCTR    0,14,0\r
+       VCTR    2,0,1\r
+       VCTR    7,21,0\r
+       VCTR    2,0,1\r
+       VCTR    -7,21,0\r
+       VCTR    2,0,1\r
+       VCTR    -28,-7,0\r
+       VCTR    2,0,1\r
+       VCTR    -21,7,0\r
+       VCTR    2,0,1\r
+       RTSL\r
+\r
+EXP12: COLOR   YELLOW,12\r
+       VCTR    -12,0,0\r
+       VCTR    2,0,1\r
+       VCTR    -12,-12,0\r
+       VCTR    2,0,1\r
+       VCTR    12,-12,0\r
+       VCTR    2,0,1\r
+       VCTR    18,6,0\r
+       VCTR    2,0,1\r
+       VCTR    12,-6,0\r
+       VCTR    2,0,1\r
+       VCTR    0,12,0\r
+       VCTR    2,0,1\r
+       VCTR    6,18,0\r
+       VCTR    2,0,1\r
+       VCTR    -6,18,0\r
+       VCTR    2,0,1\r
+       VCTR    -24,-6,0\r
+       VCTR    2,0,1\r
+       VCTR    -18,6,0\r
+       VCTR    2,0,1\r
+       RTSL\r
+\r
+EXP10: COLOR   WHITE,15\r
+       VCTR    -10,0,0\r
+       VCTR    2,0,1\r
+       VCTR    -10,-10,0\r
+       VCTR    2,0,1\r
+       VCTR    10,-10,0\r
+       VCTR    2,0,1\r
+       VCTR    15,5,0\r
+       VCTR    2,0,1\r
+       VCTR    10,-5,0\r
+       VCTR    2,0,1\r
+       VCTR    0,10,0\r
+       VCTR    2,0,1\r
+       \r
+       VCTR 5,15,0\r
+       VCTR 2,0,1\r
+       VCTR -5,15,0\r
+       VCTR 2,0,1\r
+       VCTR -20,-5,0\r
+       VCTR 2,0,1\r
+       VCTR -15,5,0\r
+       VCTR 2,0,1\r
+       RTSL\r
+EXP15: COLOR RED,12\r
+       VCTR -15,0,0\r
+       VCTR 2,0,1\r
+       VCTR -15,-15,0\r
+       VCTR 2,0,1\r
+       VCTR 15,-15,0\r
+       VCTR 2,0,1\r
+       VCTR 22,7,0\r
+       VCTR 2,0,1\r
+       VCTR 15,-7,0\r
+       VCTR 2,0,1\r
+       VCTR 0,15,0\r
+       VCTR 2,0,1\r
+       VCTR 7,22,0\r
+       VCTR 2,0,1\r
+       VCTR -7,22,0\r
+       VCTR 2,0,1\r
+       VCTR -30,-7,0\r
+       VCTR 2,0,1\r
+       VCTR -22,7,0\r
+       VCTR 2,0,1\r
+       RTSL\r
+\r
+EXP13: COLOR RED,14\r
+       VCTR -13,0,0\r
+       VCTR 2,0,1\r
+       VCTR -13,-13,0\r
+       VCTR 2,0,1\r
+       VCTR 13,-13,0\r
+       VCTR 2,0,1\r
+       VCTR 19,6,0\r
+       VCTR 2,0,1\r
+       VCTR 13,-6,0\r
+       VCTR 2,0,1\r
+       VCTR 0,13,0\r
+       VCTR 2,0,1\r
+       VCTR 6,19,0\r
+       VCTR 2,0,1\r
+       VCTR -6,19,0\r
+       VCTR 2,0,1\r
+       VCTR -26,-6,0\r
+       VCTR -2,0,1\r
+       VCTR -19,7,0\r
+       VCTR 2,0,1\r
+       RTSL\r
+EXP11: COLOR YELLOW,14\r
+       VCTR -11,0,0\r
+       VCTR 2,0,1\r
+       VCTR -11,-11,0\r
+       VCTR 2,0,1\r
+       VCTR 11,-11,0\r
+       VCTR 2,0,1\r
+       VCTR 17,6,0\r
+       VCTR 2,0,1\r
+       VCTR 11,-6,0\r
+       VCTR 2,0,1\r
+       VCTR 0,11,0\r
+       VCTR 2,0,1\r
+       VCTR 6,17,0\r
+       VCTR 2,0,1\r
+       VCTR -6,17,0\r
+       VCTR 2,0,1\r
+       VCTR -23,-6,0\r
+       VCTR 2,0,1\r
+       VCTR -17,6,0\r
+       VCTR 2,0,1\r
+       RTSL\r
+\r
+EXP9:  COLOR WHITE,15\r
+       VCTR -9,0,0\r
+       VCTR 2,0,1\r
+       VCTR -9,-9,0\r
+       VCTR 2,0,1\r
+       VCTR 9,-9,0\r
+       VCTR 2,0,1\r
+       VCTR 13,4,0\r
+       VCTR 2,0,1\r
+       VCTR 9,-4,0\r
+       VCTR 2,0,1\r
+       VCTR 0,9,0\r
+       VCTR 2,0,1\r
+       VCTR 4,13,0\r
+       VCTR 2,0,1\r
+       VCTR -4,9,0\r
+       VCTR 2,0,1\r
+       VCTR -17,-4,0\r
+       VCTR 2,0,1\r
+       VCTR -13,4,0\r
+       VCTR 2,0,1\r
+       RTSL\r
+       .NLIST CND\r
+       .MACRO SINIT\r
+...POS=.\r
+...X=0\r
+...Y=0\r
+       .ENDM\r
+       .MACRO ROCK\r
+       .IIF GT,<.-...POS>+2-...LRG,...LRG=.-...POS+2\r
+       .ENDM\r
+...LRG=0\r
+...CUR=0\r
+       .MACRO PVCTR X,Y,Z\r
+...1   =X-...X\r
+...2   =Y-...Y\r
+       .WORD ...1&^H1FFF,<Z*^H2000>+<...2&^H1FFF>\r
+...X   =X\r
+...Y   =Y\r
+       .ENDM\r
+;\r
+; ABOVE MACRO ALLOW ENTERING OF PICTURES AS ABSOLUTE POINTS\r
+;\r
+.B=.BRITE\r
+       ...Q1=10\r
+       .RADIX 10\r
+       .INCLUDE A2PENT.DAT     ;<<<<<<GARY'S PENT<<<\r
+       .INCLUDE A2PLN.DAT      ;<<<<<<PLANE<<<<<<<<<\r
+       .INCLUDE AS2CUN.DAT     ;<<<<<<GARY'S CUBE<<<<<\r
+       .INCLUDE AS2CU2.DAT     ;<<<<<<NAME CUBE <<<<<<\r
+       .INCLUDE A2PYRM.DAT     ;<<<<<<OCTAHEDREN<<<<<<\r
+       .INCLUDE A2NEW3.DAT     ;<<<<<<SPINNERS<<<<<<<<\r
+       .INCLUDE A2STAR.DAT     ;<<<<<<GARY'S STAR <<<<\r
+       .INCLUDE A2HEXR.DAT     ;<<<<<<OWEN'S HEXAGON\r
+       .RADIX ...Q1\r
+       HEAD COMET\r
+       SCAL 2,0\r
+       VCTRSC 8,0,0\r
+       VCTRSC 15,8,1\r
+       VCTRSC -16,-3,1\r
+       VCTRSC 7,15,1\r
+       VCTRSC -11,-12,1\r
+       VCTRSC -3,16,1\r
+       VCTRSC -3,-16,1\r
+       VCTRSC -11,12,1\r
+       VCTRSC 7,-15,1\r
+       VCTRSC -16,3,1\r
+       VCTRSC 15,-8,1\r
+       VCTRSC -15,-8,1\r
+       VCTRSC 16,3,1\r
+       VCTRSC -7,-15,1\r
+       VCTRSC 11,12,1\r
+       VCTRSC 3,-16,1\r
+       VCTRSC 3,16,1\r
+       VCTRSC 11,-12,1\r
+       VCTRSC -7,15,1\r
+       VCTRSC 16,-3,1\r
+       VCTRSC -15,8,1\r
+              RTSL\r
+       HEAD DWARF\r
+       COLOR GRBLUE,15\r
+       SCAL 2,0\r
+              VCTRSC  0 , 24 ,0\r
+              VCTRSC  4 ,-16 ,6\r
+              VCTRSC  18 , 0 ,6\r
+              VCTRSC -16 ,-10 ,6\r
+              VCTRSC 6 ,-18 ,6\r
+              VCTRSC -12 , 12 ,6\r
+              VCTRSC -12 ,-12 ,6\r
+              VCTRSC  6 , 18 ,6\r
+              VCTRSC -16 , 10 ,6\r
+              VCTRSC  18 , 0 ,6\r
+              VCTRSC  4 , 16 ,6\r
+              RTSL\r
+       \r
+       ...Q=10         ;SAVE CURRENT RADIX\r
+       .RADIX 10\r
+.INCLUDE A2SAUC.DAT    ;<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\r
+SAUCRC::\r
+       .IRPC X,<0123>\r
+       JSRL SAUC'X\r
+       .ENDR\r
+SAUCER:\r
+       VCTR 15.,5,0\r
+       VCTR -10,10,1\r
+       VCTR -10,0,1\r
+       VCTR -10,-10,1\r
+       VCTR 0,-10,1\r
+       VCTR 10,-10,1\r
+       VCTR 10,0,1\r
+       VCTR 10,10,1\r
+       VCTR 0,10,1\r
+       VCTR -15,-5,0\r
+;THE LAST ONE RETURNS US TO CENTER\r
+       RTSL\r
+MINE:\r
+       SCAL    1,0\r
+       VCTR    -8,0,0\r
+       VCTR    4,0,1\r
+       VCTR    4,4,1\r
+       VCTR    0,4,0\r
+       VCTR    0,-4,1\r
+       VCTR    4,-4,1\r
+       VCTR    4,0,0\r
+       VCTR    -4,0,1\r
+       VCTR    -4,-4,1\r
+       VCTR    0,-4,1\r
+       VCTR    0,4,1\r
+       VCTR    -4,4,1\r
+       RTSL\r
+SHOT:  SCAL 1,0\r
+       VCTR 2,0,1\r
+       VCTR -2,0,1\r
+       VCTR 2,0,1\r
+       VCTR 0,-2,1\r
+       RTSL\r
+PLTLIV:        SCAL 2,0\r
+       JSRL RHTSHP\r
+       VCTR -48,36,0\r
+       JSRL LFTSHP\r
+       VCTR 0,-36,0\r
+       RTSL\r
+SHIELD:\r
+; SCALE IS A KLUDGE FOR FOCUS GROUP\r
+       SCAL 1,0\r
+       VCTRSC -60*3/10,28*3/10,0\r
+       VCTRSC 32*3/10,32*3/10,1\r
+       VCTRSC 56*3/10,0,1\r
+       VCTRSC 32*3/10,-32*3/10,1\r
+       VCTRSC 0,-56*3/10,1\r
+       VCTRSC -32*3/10,-32*3/10,1\r
+       VCTRSC -56*3/10,0,1\r
+       VCTRSC -32*3/10,32*3/10,1\r
+       VCTRSC 0,56*3/10,1\r
+       VCTRSC 60*3/10,-28*3/10,0               ;RETURN TO CENTER.?IS THIS NEEDED?YES!\r
+       SCAL 2,0\r
+       RTSL\r
+;PARAMETERS FOR LIVES,IMMEDIATELY AFTER SCORE\r
+       HEAD CNTR\r
+CNTSCL:        CNTR\r
+       SCAL 1,0\r
+       RTSL\r
+       \r
+       \r
+       HEAD ASTMG\r
+ASTMSG:        SCAL 1,0\r
+       color 4,12\r
+       LABS -244.,-288.                ;ASTEROIDS COPY RIGHT MESSAGE\r
+       VCTR 0,4,0\r
+       VCTR 0,16,1\r
+       VCTR 4,4,1\r
+       VCTR 8,0,1\r
+       VCTR 4,-4,1\r
+       VCTR 0,-16,1\r
+       VCTR -4,-4,1\r
+       VCTR -8,0,1\r
+       VCTR -4,4,1\r
+       VCTR 12,4,0             ;C\r
+       VCTR -8,0,1\r
+       VCTR 0,8,1\r
+       VCTR 8,0,1\r
+       VCTR 12,-16,0\r
+       ALPHA <MCMLXXX ATARI IN>\r
+       JMPL CHAR.C\r
+FLARE::\r
+       COLOR WHITE,15.\r
+       SCAL 0,0\r
+       VCTR 0,-2,1\r
+       COLOR YELLOW,15.\r
+       VCTR 0,-3,1\r
+       COLOR YELLOW,10.\r
+       VCTR 0,-2,1\r
+       COLOR RED,12.\r
+       VCTR 0,-2,1\r
+       COLOR RED,10.\r
+       VCTR 0,-4,1\r
+       RTSL\r
+       .RADIX 16\r
+R      =3FFF-.\r
+       .NLIST\r
+       .REPT R\r
+       .BYTE 0\r
+       .ENDR\r
+       .LIST\r
+       .=3FFF\r
+CKUM1::        .BYTE 25\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
\ No newline at end of file
diff --git a/AS2SAC.MAC b/AS2SAC.MAC
new file mode 100644 (file)
index 0000000..99da9c8
Binary files /dev/null and b/AS2SAC.MAC differ
diff --git a/AS2TST.MAC b/AS2TST.MAC
new file mode 100644 (file)
index 0000000..611d0f5
--- /dev/null
@@ -0,0 +1,912 @@
+       .TITLE AS2TST-ASTEROIDS 2 SELF TEST\r
+       .SBTTL AS2SLF\r
+       .SBTTL ***************************\r
+       .SBTTL *\r
+       .SBTTL *PROGRAMMER: OWEN RUBIN\r
+       .SBTTL *\r
+       .SBTTL * DISK 77 & B49\r
+       .SBTTL *\r
+       .SBTTL ***************************\r
+       .ASECT\r
+       .RADIX 16\r
+       .=0A0\r
+TESTNM:        .BLKB 1         ;NEED A BYTE HERE\r
+FRAME: .BLKB 1\r
+       .=0F0\r
+PNTTBL:        .BLKB 8\r
+       .=080\r
+ERPLC: .BLKB 5\r
+       .CSECT\r
+       .INCLUDE HLL65F\r
+       .SBTTL POWERON\r
+       .GLOBL POWERON,PWRON,UPDOWN,REHIIN,EACOPY,BKCOPY\r
+       .GLOBL START,POKEY,CHAN3F,CHAN4F,EAZERO,XYINIT\r
+       .GLOBL CHAN1F,CHAN2F,CHAN1V,CHAN2V\r
+       .GLOBL VGCNTR,VGVTR,VGSTAT,VGJSRL,VGSCA1\r
+       .GLOBL VGMSGA,VGMSGU,VGVTR1,VGHEX,VGHEXZ,VGVTR5\r
+       .GLOBL VGADD2,VGHALT,DIGITS,VGSCAL,VGHEX1\r
+       .GLOBL HATCH8,HATCH9,QTST68,QTST69,WNDSE8,WNDSE9\r
+       .GLOBL CNTR8,CNTR9,WHITE\r
+       .GLOBL CLPT28,CLPT29\r
+       .GLOBL CLPAT9,CLPAT8,CL739,CL738\r
+       .GLOBL FRBOX8,FRBOX9,HYSTR9,HYSTR8\r
+       .GLOBL FRCFL9,FRCFL8\r
+       .GLOBL HLINE8,HLINE9,VLINE8,VLINE9\r
+       .GLOBL IRQ\r
+       .GLOBL STESTA,TSTCK,MOVIN\r
+       .GLOBL SWTST,OPTND\r
+       .GLOBL INISOU\r
+; GLOBAL TABLES\r
+       .GLOBL HSCBEG\r
+       .GLOBL HSCORE,INITL\r
+;GLOBAL VARIABLES\r
+       \r
+       .GLOBL EABAD,EAREQU,EAFLG\r
+       .GLOBL SPINT,FLSFLG\r
+       .GLOBB TEMP1,TEMP2,TEMP3,TEMP4,TEMP6,TEMP5,TEMP7\r
+       .GLOBB TEMP8,TEMP9,TEMPA,TEMPB,SYNC\r
+       .GLOBB VGBRIT,$CMODE\r
+       .GLOBB VGLIST\r
+       .ENABL AMA\r
+       .RADIX 16\r
+       .CSECT AS2TST\r
+       \r
+       .NLIST\r
+       .INCLUDE ASCVG  ;<<<<<<<<<<<<<<<<<<<<<<<<<\r
+       .PAGE\r
+       .INCLUDE VGMC   ;<<<<<<<<<<<<<<<<<<<<<<<\r
+       .INCLUDE AS2DEC         ;<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\r
+       .LIST\r
+;INITIAL INITIALS\r
+CKUM6::        .BYTE 0A\r
+ININITLS:\r
+       .BYTE 0,0,0             ; EAROM WILL OVERWRITE\r
+       .BYTE 19,1C,1C,1D,1C,0D\r
+       .BYTE 0E,0F,1D,14,17,1C\r
+       .BYTE 16,20,1C\r
+POWERON:SEI\r
+       LDX I,0FE               ;C  INIT STACKF\r
+       TXS\r
+       LDA I,0\r
+       STA STOPADD     ;C RESET VEC GEN\r
+       CLD\r
+       TAX\r
+       BEGIN\r
+       STA ZX,0\r
+       STA AX,100\r
+       STA AX,200\r
+       STA AX,300\r
+       STA AX,VECRAM\r
+       STA AX,VECRAM+100\r
+       STA AX,VECRAM+200\r
+       STA AX,VECRAM+300\r
+       STA AX,VECRAM+400\r
+       STA AX,VECRAM+500\r
+       STA AX,VECRAM+600\r
+       STA AX,VECRAM+700\r
+       STA X,POKEY1\r
+       STA X,POKEY2\r
+       STA WTCHDG\r
+       INX\r
+       EQEND\r
+       LDA #0C0\r
+       STA INVERTS\r
+       LDA #7\r
+       STA POKEY1+SKCTL        ;TURN ON POKEY\r
+       STA POKEY2+SKCTL\r
+       LDA STSTSW              ;D  IF SELF TEST\r
+       AND I,ST.BIT\r
+       IFEQ\r
+       JMP RAMTST\r
+       ENDIF\r
+       LDA I,1                 ;C  INIT VG BUFFER\r
+       STA VECRAM\r
+       LDA I,0E4\r
+       STA VECRAM+1\r
+       LDA I,20\r
+       STA VECRAM+3\r
+       STA VECRAM+403\r
+       LDA CABINET\r
+       STA UPDOWN              ;INIT UPDOWN OUTPUT POINTER\r
+       JSR MOVIN               ;MOVE IN INITIALS\r
+TSTCK: CLI             ;START THINGS RUNNING\r
+       LDX #60         ;EAROM WARM UP WAIT COUNTER\r
+       BEGIN\r
+       BEGIN\r
+       LSR SYNC\r
+       CSEND\r
+       STA WTCHDG      ;KEEP THING RUNNING\r
+       DEX\r
+       MIEND\r
+       JSR REHIIN              ;READ EA ROM INTO BUFFER\r
+       BEGIN\r
+       LDA EAFLG               ;STILL READING IN?\r
+       STA WTCHDG\r
+       EQEND\r
+       LDA EABAD               ;DATA OK?\r
+       LSR                     ;BIT 0\r
+       IFCC\r
+       PHA\r
+       JSR EACOPY              ;MOVE TO DISPLAY AREA\r
+       PLA\r
+       ENDIF\r
+       JSR BKCOPY              ;MOVE REST DOWN\r
+       JMP PWRON\r
+;SET UP INITIALS AND HIGH SCORE FOR EACH GAME\r
+MOVIN: LDY I,HSCNUM*3*4-1+1\r
+       BEGIN\r
+       LDX I,HSCNUM*3-1\r
+       BEGIN\r
+       LDA X,ININITLS\r
+       STA Y,INITL-1\r
+       LDA #0\r
+       STA Y,HSCORE-1\r
+       DEY\r
+       DEX\r
+       LDA I,5\r
+       STA AY,HSCORE-1\r
+       LDA X,ININITLS\r
+       STA Y,INITL-1\r
+       DEY\r
+       DEX\r
+       LDA X,ININITLS\r
+       STA Y,INITL-1\r
+       LDA #0\r
+       STA Y,HSCORE-1\r
+       DEY\r
+       DEX\r
+       MIEND\r
+       TYA                     ; SET STATUS\r
+       EQEND\r
+;MOVE IN SPECIAL INITIALS\r
+       LDX I,HSCNUM*3-1\r
+       BEGIN\r
+       LDA X,ININITLS\r
+       STA X,SPINT\r
+       DEX\r
+       MIEND\r
+       RTS\r
+       .PAGE\r
+       .SBTTL ZERO-PAGE TEST\r
+\r
+RAMTST:        LDX     I,11            ;BEGINNING PATTERN\r
+       TXS                     ;S HOLDS PATTERN\r
+       TXA\r
+       STX     Z,0             ;TEST CELL START @ 0\r
+       LDY     I,0\r
+2$:    LDX     I,1             ;ONE LESS COUNT BEFORE IT WRAPS\r
+;SCAN ALL FURLTE BYTES TO\r
+;SEE IF ANY ARE ON AS A\r
+;RESULT OF THIS LOAD\r
+3$:    INY                     ;SCAN FORWARD\r
+       LDA     AY,0            ;ZERO ?\r
+       BNE     5$              ;NO - ERROR (HIGH BITS BAD)\r
+       INX                     ;CHK HOW FAR SCANNED\r
+       BNE     3$              ;BRANCH - CONTINUE\r
+       TSX\r
+       TXA                     ;ACC = PATTERN\r
+       STA     A,WTCHDG        ;WTCHDGDOG\r
+       INY                     ;POINT TO TEST CELL\r
+       EOR     AY,0            ;DOES IT HAVE PATTERN ?\r
+       BNE     5$              ;N0 - ERROR (HIGH BITS BAD)\r
+       TXA                     ;ACC = PATTERN\r
+       LDX     I,0\r
+       STX     ZY,0            ;ELSE - CLEAR CELL\r
+       INY                     ;POINT TO NEXT TEST CELL\r
+       BNE     4$              ;IF PASS NOT COMPLETE\r
+       ASL                     ;ELSE SHIFT PATTERN\r
+       LDX     I,0             ;IF DONE (0 = GOOD)\r
+       BCS     STOP0           ;BRANCH - DONE (GOOD)\r
+4$:    TAX                     ;PATTERN -> X\r
+       TXS                     ;        -> S\r
+       STX     ZY,0            ;        -> NEXT TEST CELL\r
+       BNE     2$              ;ALWAYS - REPEAT SCAN\r
+5$:    TAX                     ;ANY HIGH BITS INDICATE BAD RAM\r
+7$:    TXA\r
+       LDY     I,82            ;ASSUME LOW NIBBLE IS GOOD\r
+       AND     I,0F            ;CHECK IT\r
+       BEQ     8$              ;BRANCH - LOW NIBBLE GOOD\r
+       LDY     I,12            ;ELSE - SET Y ACCORDINGLY\r
+8$:    TXA\r
+       LDX     I,82            ;ASSUME TOP NIBBLE IS GOOD\r
+       AND     I,0F0           ;CHECK IT\r
+       BEQ     9$              ;BRANCH - TOP NIBBLE GOOD\r
+       LDX     I,12            ;ELSE - SET X\r
+9$:\r
+       TYA\r
+       TXS                     ;S = HIGH NIBBLE STATUS\r
+       TAX                     ;X = LOW\r
+RT.LP: STX     A,POKEY         ;NOISE = LOWER NIBBLE STATUS\r
+       LDX     I,0A8\r
+       STX     A,POKEY+1\r
+       LDY     I,12.           ;Y = HIGH BYTE OF COUNTER\r
+10$:   LDX     I,100.          ;X = LOW BYTE OF COUNTER\r
+11$:   BIT     A,HALT\r
+       BMI     11$             ;BIT 7 (SIGN FLAG) OF HALT = 3000 HZ SQUARE WAVE\r
+12$:   BIT     A,HALT\r
+       BPL     12$\r
+       STA     A,WTCHDG\r
+       DEX\r
+       BNE     11$             ;INNER LOOP 255 * 333 US = 85 MS\r
+       CPY     I,5\r
+       BNE     13$\r
+       STX     A,POKEY+1       ;CLR NOISE\r
+13$:   DEY\r
+       BNE     10$             ;OUTER LOOP 8 *  85 MS = 580 MS\r
+       LSR                     ;TEST SIGN\r
+       BCS     14$             ;DONE\r
+       TSX\r
+       BNE     RT.LP           ;ALWAYS\r
+14$:\r
+       JMP STOP1               ;WAIT FOR SWITCH\r
+STOP0: LDX     I,0FF\r
+       TXS                     ;INITIALIZE STACK (USED IN ROM TESTS)\r
+       LDX I,0\r
+       TXA\r
+10$:   STA ZX,0                ;ZERO ZERO-PAGE\r
+       INX\r
+       BNE 10$\r
+       .PAGE\r
+;\r
+;      VECTOR GEN RAM TEST\r
+;\r
+       .SBTTL  VG RAM TEST\r
+;\r
+;\r
+;\r
+STEST1:        TAY                     ;Y=0\r
+       LDA     I,1\r
+5$:    STA     1               ;START @ PAGE 1 (NY,0)\r
+10$:   LDX     I,11            ;STARTING PATTERN\r
+       LDA     NY,0            ;D  IF BAD CELL\r
+       BNE     20$\r
+15$:   TXA\r
+16$:   STA     NY,0            ;WRITE\r
+       EOR     NY,0            ;AND COMPARE\r
+       BNE     20$             ;ERROR\r
+       TXA\r
+       ASL\r
+       TAX\r
+       BCC     16$             ;NEXT PATTERN\r
+       INY\r
+       BNE     10$             ;NEXT LOCATION\r
+       STA     A,WTCHDG        ;MUZZLE THAT BEAST\r
+       INC     1\r
+       LDX     1\r
+       CPX     I,04            ;PAGES 1 TO 3\r
+       BCC     10$             ;CHECK NEXT PAGE\r
+       LDA     I,VECRAM/100\r
+       CPX     I,VECRAM/100\r
+       BCC     5$              ;BEGIN NEXT @ 2000\r
+       CPX     I,VECRAM/100+8\r
+       BCC     10$             ;CHECK UP TO 27FF\r
+       JMP     STEST3          ;RAM IS GOOD\r
+20$:   LDX     1               ;X = MSB (ADDRESS) ACC=BAD PATTERN\r
+       CPX     I,VECRAM/100\r
+       STA     2               ;BAD PATTERN\r
+       BCC     30$\r
+       TXA\r
+       SBC     I,<VECRAM/100>-4\r
+30$:   LSR\r
+       LSR\r
+       AND     I,7\r
+       TAY                     ;Y = # OF 1K BLOCK BAD\r
+       LDA     2\r
+;THIS WILL BEEP TWO TONES FOR THE BAD RAM ONE OF THEM LOW\r
+;THEN FOR TWICE THE NUMBER OF RAM SPACES BELOW IT WILL BEEP HIGH\r
+STEST2:        STY     0               ;0 = BAD RAM #\r
+       STA     1               ;1 = BAD BITS\r
+5$:    LDA     I,1\r
+       STA     2\r
+10$:   LDX     I,0A8\r
+       LDY     I,82            ;ASSUME GOOD RAM\r
+       LDA     0\r
+       BNE     30$             ;IT IS\r
+       LDA     1\r
+       AND     I,0F            ;LOW NIBBLE\r
+       BEQ     30$             ;GOOD\r
+20$:   LDY     I,12            ;BAD\r
+30$:   STX     A,POKEY+1       ;TONE/VOLUME\r
+       STY     A,POKEY         ;FREQUENCY\r
+       LDA     I,9             ;BAD\r
+       CPY     I,12\r
+       BEQ     35$             ;YES\r
+       LDA     I,1\r
+35$:   TAY\r
+       LDX     I,0\r
+40$:   BIT     A,HALT\r
+       BMI     40$\r
+42$:   BIT     A,HALT\r
+       BPL     42$\r
+       STA     A,WTCHDG        ;NO WTCHDGIN' DOG\r
+       DEX\r
+       BNE     40$             ;COUNT 256/3000 OF A SECOND\r
+       DEY\r
+       BNE     40$\r
+       STX     A,POKEY+1       ;CLR SOUND\r
+       LDY     I,9\r
+50$:   BIT     A,HALT\r
+       BMI     50$\r
+52$:   BIT     A,HALT\r
+       BPL     52$\r
+       STA     A,WTCHDG                ;NO WTCHDGDOG\r
+       DEX\r
+       BNE     50$             ;256/3000\r
+       DEY\r
+       BNE     50$\r
+       LDA     0\r
+       BNE     60$\r
+       LDA     1\r
+       LSR\r
+       LSR\r
+       LSR\r
+       LSR\r
+       STA     1\r
+60$:   DEC     2\r
+       BEQ     10$\r
+       DEC 0\r
+       BPL     5$              ;ALWAYS\r
+STOP1: STA     A,WTCHDG        ;NO WTCHDGDOG\r
+       LDA #-1\r
+       STA ERPLC                       ;BAD RAM\r
+;\r
+       .PAGE\r
+       .SBTTL ROM TEST\r
+;\r
+;      ROM TEST\r
+;\r
+STEST3:        LDA     I,0             ;EOR CKSUM ROMS\r
+       TAX\r
+       BEGIN\r
+       STA X,100\r
+       STA X,200\r
+       STA X,300               ;CLEAR RAM\r
+       DEX\r
+       EQEND\r
+       TAY\r
+       STA     TEMP1\r
+       LDA     I,<VECROM/100>+8        ;WILL DO 2800 AS SPECIAL CASE....\r
+                               ;WILL START WITH 4K (16 PAGES) CHIPS\r
+       BEGIN\r
+       STA     TEMP1+1\r
+       LDA     I,16.\r
+6$:    STA     TEMP2           ;# PAGES\r
+       TXA                     ;SEED FOR CKSUM\r
+       BEGIN\r
+       BEGIN\r
+       EOR     NY,TEMP1\r
+       INY\r
+       EQEND\r
+       INC     TEMP1+1\r
+       STA     A,WTCHDG        ;NO WTCHDGDOG\r
+       DEC     TEMP2\r
+       EQEND\r
+       STA     ZX,PNTTBL+1     ;CKSUMS (SPACE LEFT FOR 2800))\r
+       INX\r
+       BEQ SNDERR                      ;IF 0, WAS SPECIAL CASE 2800\r
+       LDA     TEMP1+1\r
+       CMP     I,<VECROM/100>+18       ;6K OF VECROM\r
+       IFEQ\r
+       LDA     I,PRGROM/100\r
+       STA     TEMP1+1\r
+       ENDIF\r
+       CMP     I,90            ;UP TO 9000\r
+       CSEND\r
+;JUST FINISHED 4K ROMS...........\r
+;MUST NOW DO SPECIAL CASE 2K ROM AT 2800\r
+       LDX #-1                 ;WANT CHECKSUM AT PROPER LOCATION\r
+       LDA #VECROM/100\r
+       STA TEMP1+1             ;START LOCATION\r
+       LDA #8                  ;ONLY 8 PAGES HERE\r
+       BNE 6$                  ;********ALWAYS************\r
+;**********************************************************\r
+SNDERR:                                ;JUST A LABEL\r
+       LDA     PNTTBL\r
+       ORA     PNTTBL+1        ;ANY VGROM ERROR?\r
+       IFNE\r
+       LDA     I,0F0           ;IF YES, SOUND OFF\r
+       LDX     I,0A2\r
+       STA     A,POKEY+4\r
+       STX     A,POKEY+4+1\r
+       ENDIF\r
+;\r
+; (TEMP2,+1) = SCRATCH\r
+; (PNTTBL,+6) = 7 CHKSUMS FOR ROMS\r
+; (TEMP3)    = DIAG STEP #\r
+; (ERPLC,+3) = ERROR FLAGS FOR:\r
+;      ERPLC:          RAM ERROR\r
+;      ERPLC+1:        POKEY1\r
+;      ERPLC+2:        POKEY2\r
+;      ERPLC+3:        EAROM\r
+;\r
+       .PAGE\r
+       .SBTTL TEST POKEY & EAROM\r
+STEST4:        LDX #05\r
+       LDA POKRAN+POKEY1\r
+       BEGIN\r
+       CMP POKRAN+POKEY1       ;MAKE SURE ITS RUNNING\r
+       BNE OK1                 ;YES -- RANDOM #'S DIFFERENT\r
+       DEX                     ;ELSE CHECK 5 TIMES\r
+       MIEND\r
+       STA ERPLC+1             ;BAD POKEY1\r
+OK1:   LDX #05\r
+       LDA POKRAN+POKEY2\r
+       BEGIN\r
+       CMP POKRAN+POKEY2\r
+       BNE OK2\r
+       DEX\r
+       MIEND\r
+       STA ERPLC+2             ;BAD POKEY\r
+OK2:   CLI\r
+       JSR REHIIN              ;READ EAROM\r
+       LDY #02                 ;DEFAULT GOOD\r
+       LDA EABAD               ;ERROR??\r
+       IFNE\r
+       STA ERPLC+3             ;BAD EAROM\r
+       JSR EAZERO              ;CLEAR IT IF BAD\r
+       LDY #0\r
+       STY EABAD\r
+       ENDIF\r
+       STY TESTNM              ;WHICH STATE FIRST?\r
+       JMP DIAGM               ;DO DIAG MAIN LINE\r
+       .PAGE\r
+       .SBTTL BAD EAROM RECOVERY\r
+STEST5:        \r
+       LDA EAFLG\r
+       ORA EAREQU\r
+       IFEQ                    ;DONE ERASING?\r
+       JSR REHIIN              ;TRY ANOTHER READ\r
+       LDA EABAD\r
+       STA ERPLC+3             ;STILL BAD? (REPORT)\r
+       LDA #2\r
+       STA TESTNM              ;GO STRAIGHT TO REPORT\r
+       ENDIF\r
+       RTS\r
+\r
+       .PAGE\r
+       .SBTTL REPORT PROBLEMS & DISPLAY SWITCHES\r
+STEST6:        BIT CABINET             ;COCKTAIL??\r
+       IFMI\r
+       LDA #0\r
+       STA INVERTS\r
+       ENDIF\r
+       LDY #WHITE+0A0\r
+       JSR VGSTAT\r
+       LAL CNTR9\r
+       LXH CNTR8\r
+       JSR     VGADD2\r
+       LDA #-50\r
+       LDX #-10\r
+       JSR VGVTR5\r
+       LDA #0                  ;SCALE 0\r
+       JSR VGSCA1              ;BIG NUMBERS\r
+       JSR OPTN2               ;OUTPUT OPTION SWITCHES\r
+       LDA #1\r
+       JSR VGSCAL              ;RETURN TO NORMAL SCALE\r
+       LDX     I,46\r
+       STX     TEMP2+1         ;STARTING Y VALUE CHECK SUMS\r
+       LDX     I,6\r
+       BEGIN\r
+       LDA     ZX,PNTTBL\r
+       IFNE\r
+       STX     TEMP2           ;SAVE CHKSUM #\r
+       JSR     VGCNTR          ;CENTER BEAM\r
+       LDX     TEMP2+1\r
+       TXA\r
+       SEC\r
+       SBC     I,08            ;32. BELOW CURRENT LINE\r
+       STA     TEMP2+1\r
+       LDA     I,-10.\r
+       JSR     VGVTR5          ;POSITION BEAM\r
+       LDA     TEMP2\r
+       JSR     VGHEX           ;ROM #\r
+       LDA     I,24./4\r
+       LDX     I,0\r
+       JSR     VGVTR5\r
+       LDA TEMP2\r
+       CLC\r
+       ADC I,PNTTBL\r
+       LDY     I,1\r
+       JSR     DIGITS          ;DISPLAY 2 DIGITS\r
+       LDX     TEMP2\r
+       ENDIF\r
+       DEX\r
+       MIEND\r
+       JSR VGCNTR\r
+       LDA #-10.\r
+       LDX #50\r
+       JSR VGVTR5              ;POSITION FOR ERROR LIST\r
+       LDX #3\r
+       STX TEMP2\r
+       BEGIN\r
+       LDX TEMP2\r
+       LDY #0\r
+       LDA X,ERPLC             ;ANY BAD NEWS?\r
+       IFNE\r
+       LDY X,BADNWS\r
+       ENDIF\r
+       LDA Y,VGMSGA\r
+       LDX Y,VGMSGA+1          ;GET LETTER\r
+       JSR VGADD2\r
+       DEC TEMP2\r
+       MIEND\r
+       JSR SWTST               ;BEEP ON SWITCH CLOSURE\r
+       RTS\r
+;\r
+;\r
+       .PAGE\r
+       .SBTTL PATTERN TEST & ALPEHBET (TELL A FRIEND)\r
+STEST7:        LAL QTST69\r
+       LXH QTST68\r
+       JMP VGADD2\r
+       .SBTTL HYSTERSIS & SOUND TEST\r
+STEST8:        LDA FRAME\r
+       AND #03F\r
+       IFEQ\r
+       INC TEMP3\r
+       ENDIF\r
+       LDA TEMP3\r
+       AND #07\r
+       TAX\r
+       LDY X,SNDTBL-1\r
+       LDA #0\r
+       STA Y,13F1\r
+       LDY X,SNDTBL\r
+       LDA X,SNDFRQ\r
+       STA Y,13F0              ;FAKE POKEY ADDRESS\r
+       LDA #0A8\r
+       STA Y,13F1\r
+       LAL HYSTR9\r
+       LXH HYSTR8\r
+       JSR VGADD2\r
+       JSR VGCNTR\r
+       LDA TEMP3\r
+       AND #07\r
+       IFEQ\r
+       LDA #01                 ;DON'T ALOW 0\r
+       ENDIF\r
+       JSR VGSCA1              ;TEST SCALE\r
+       LAL FRBOX9\r
+       LXH FRBOX8\r
+       JMP VGADD2\r
+       .BYTE 16                ;SNDTBL UNDERFLOW\r
+SNDTBL:        .BYTE 0,10,2,12,4,14,6,16,0\r
+SNDFRQ:        .BYTE 10,10,40,40,90,90,0FF,0FF \r
+       .PAGE\r
+       .SBTTL COLOR BARS\r
+STEST9:        LDA #01                 ;SET SCALE 1\r
+       JSR VGSCA1              ;SET SCALE\r
+       LDY #06\r
+       STY TEMP3\r
+       BEGIN\r
+       JSR VGCNTR              ;CENTER\r
+       LDY TEMP3\r
+       LDA Y,POSIX             ;POSITION THIS GROUP\r
+       LDX Y,POSIY\r
+       JSR VGVTR5\r
+       LDA TEMP3\r
+       EOR #0FF\r
+       AND #07\r
+       TAY\r
+       JSR VGSTAT\r
+       LDA TEMP3               ;WHITE GROUP?\r
+       IFEQ\r
+       LAL CLPT29\r
+       LXH CLPT28              ;SPECIAL WHITE GROUP\r
+       ELSE\r
+       LAL CLPAT9\r
+       LXH CLPAT8\r
+       ENDIF\r
+       JSR VGADD2\r
+       DEC TEMP3\r
+       MIEND\r
+ST91:  LAL CL739               ;LAST ON IS WHITE\r
+       LXH CL738\r
+       JSR VGADD2\r
+       RTS\r
+;\r
+DECMEC:        .BYTE   1,4,5,6         ;DOLLAR MECH MULTIPLIERS\r
+;\r
+;X POSITION FOR BARS\r
+POSIX: .BYTE -22,-63,1F,-63,-22,1F,-22\r
+;Y POSITION\r
+POSIY: .BYTE -0C,-28,-28,10,-28,10,10\r
+\r
+BADNWS:        .BYTE 56.,52.,54.,30.\r
+       .PAGE\r
+       .SBTTL CHECKER BOARD\r
+STST10:        JSR VGCNTR\r
+       LDA #1\r
+       JSR VGSCA1\r
+       LDX #07                 ;NINE BARS HORIZ\r
+       STX TEMP2\r
+       JSR VGCNTR\r
+       BEGIN\r
+       LDY TEMP2\r
+       LDA #-512./4\r
+       LDX Y,HLPOS\r
+       JSR VGVTR5              ;POSITION FOR THIS LINE\r
+       LAL HLINE9\r
+       LXH HLINE8              ;DRAW LINE AND CENTER\r
+       JSR VGADD2\r
+       DEC TEMP2\r
+       MIEND\r
+       LDX #11.                ;THIRTEEN BARS VERT\r
+       STX TEMP2\r
+;      JSR VGCNTR              ;LAST LINE ABOVE CENTERED\r
+       BEGIN\r
+       LDY TEMP2\r
+       LDA Y,VLPOS\r
+       LDX #+384./4\r
+       JSR VGVTR5\r
+       LAL VLINE9\r
+       LXH VLINE8\r
+       JSR VGADD2\r
+       DEC TEMP2\r
+       MIEND\r
+       LDA GAMSEL\r
+       IFMI\r
+       ASL TEMPA               ;DEBOUNCE COLOR SWITCH\r
+       IFCS\r
+       INC TEMP8               ;NEXT COLOR\r
+       ENDIF\r
+       ELSE\r
+       LDA #20                 ;RESET NOT PUSHED\r
+       STA TEMPA\r
+       ENDIF\r
+       RTS\r
+HLPOS: .BYTE -298./4,-213./4,-128./4,-43./4,43./4\r
+       .BYTE 128./4,213./4,298./4\r
+VLPOS: .BYTE -433./4,-354./4,-276./4,-197./4,-118./4\r
+       .BYTE -40./4,40./4,118./4,197./4,276./4\r
+       .BYTE 354./4,433./4\r
+       .PAGE\r
+       .SBTTL DISPLAY OPTION SWITCHES\r
+;\r
+;              \r
+OPTND: JSR     VGCNTR          ;CENTER BEAM\r
+       LDA     I,-20./4\r
+       LDX     I,4D\r
+       JSR     VGVTR5          ;POSITION BEAM\r
+       LDA     I,1\r
+       JSR     VGHEX           ;1 FOR LEFT COIN MECH\r
+       STA POTGO+POKEY2\r
+       LDA ALLPOT+POKEY2       ;READ 'OPTN3'\r
+       STA $CMODE\r
+       AND     I,10\r
+       LSR\r
+       LSR\r
+       LSR\r
+       LSR                     ;0 OR 1\r
+       ADC     I,1             ;1 OR 2\r
+       JSR     VGHEX           ;PUT CENTER MECH VALUE\r
+       STA POTGO+POKEY2\r
+       LDA ALLPOT+POKEY2       ;READ 'OPTN3'\r
+       AND     I,0C\r
+       LSR\r
+       LSR\r
+       TAX\r
+       LDA     AX,DECMEC\r
+       JSR     VGHEX           ;DOLLAR MECH VALUE\r
+       LDA #-58.\r
+       LDX #-18.\r
+       JSR VGVTR5              ;POSITION FOR NEXT LINE\r
+       LDA #-1\r
+       STA TEMP3               ;FLAG FOR POSITION\r
+OPTN2: LDX     I,15.\r
+       STX     TEMP2\r
+       STA POTGO+POKEY1        ;READ OPTN1\r
+       LDA ALLPOT+POKEY1\r
+       STA     TEMP2+1\r
+       STA POTGO+POKEY2\r
+       LDA ALLPOT+POKEY2       ;READ 'OPTN3'\r
+       BEGIN\r
+       PHA\r
+       AND     I,1\r
+       JSR     VGHEX           ;DISPLAY 0 OR 1\r
+       LSR     TEMP2+1\r
+       PLA\r
+       ROR\r
+       DEC     TEMP2\r
+       MIEND\r
+       LDY #09F                ;GUESS MAIN TEST\r
+       BIT TEMP3\r
+       IFMI\r
+       LDY #09E\r
+       ENDIF\r
+       TYA\r
+       LDX #0F8                ;POSITION FOR NEXT LINE\r
+       JSR VGVTR5\r
+       LDX #7                  ;DO ALL OTHER SWITCHES\r
+       STX TEMP2\r
+       BEGIN\r
+       LDX TEMP2\r
+       LDA X,INPUT\r
+       ROL\r
+       ROL                     ;LOOK AT FIRST BIT\r
+       PHP                     ;SAVE COPY OF CARRY\r
+       AND #01\r
+       JSR VGHEX\r
+       PLP\r
+       ROL\r
+       AND #01\r
+       JSR VGHEX\r
+       DEC TEMP2\r
+       MIEND\r
+       LDY #09F\r
+       BIT TEMP3\r
+       IFMI\r
+       LDY #09E\r
+       ENDIF\r
+       TYA\r
+       LDX #0F8\r
+       JSR VGVTR5              ;POSITION FOR NEXT LINE\r
+       LDX #5\r
+       STX TEMP2\r
+       LDA STSTSW              ;REMAINING SWITCHES\r
+       AND #3F                 ;BIT 6 AND 7 DONT CARE\r
+       BEGIN\r
+       PHA\r
+       AND #01\r
+       JSR VGHEX\r
+       PLA\r
+       ROR\r
+       DEC TEMP2\r
+       MIEND\r
+       LDX #09                 ;FILL REST WITH 'X'\r
+       STX TEMP2\r
+       BEGIN\r
+       LDA #22\r
+       JSR VGHEX1\r
+       DEC TEMP2\r
+       MIEND\r
+       RTS\r
+       .SBTTL  SWITCH TEST (BEEP)\r
+\r
+SWTST: LDX #03\r
+       LDY #0\r
+       STY TEMPA\r
+       BEGIN\r
+       LDA X,INPUT\r
+       ASL\r
+       ROL TEMPA\r
+       ASL\r
+       ROL TEMPA\r
+       DEX\r
+       MIEND\r
+       LDA TEMPA\r
+       IFNE\r
+       ADC #40\r
+       STA POKEY1+CHAN1F\r
+       LDY #0A4\r
+       ENDIF\r
+       STY POKEY1+CHAN1V\r
+       LDY #0\r
+       STY TEMPA\r
+       LDA INPUT+4             ;BOTH BITS HERE\r
+       ASL\r
+       ROL TEMPA\r
+       ASL\r
+       ROL TEMPA\r
+       ASL INPUT+5\r
+       ROL TEMPA\r
+       ASL INPUT+6             ;ONLY BIT 7 HERE\r
+       ROL TEMPA\r
+       LDA $COINA\r
+       EOR #0FF                ;BACKWARDS\r
+       LSR\r
+       ROL TEMPA\r
+       LSR\r
+       ROL TEMPA\r
+       LSR\r
+       ROL TEMPA\r
+       LDA TEMPA\r
+       IFNE\r
+       ADC #40\r
+       STA POKEY1+CHAN1F+2\r
+       LDY #0A4\r
+       ENDIF\r
+       STY POKEY1+CHAN1V+2\r
+       RTS\r
+;\r
+;\r
+       .PAGE\r
+       .SBTTL MAIN LINE\r
+DIAGM:                         ;MAIN LINE DIAG LOOP\r
+       BEGIN\r
+10$:   LDX #18\r
+       BEGIN\r
+       BEGIN\r
+       BIT HALT                ;16MS WAIT\r
+       MIEND\r
+       BEGIN\r
+       BIT HALT\r
+       PLEND\r
+       DEX\r
+       MIEND\r
+       INC FRAME\r
+       BEGIN\r
+       BIT HALT                ;STOPPED?\r
+       VSEND\r
+VGLD:  LDA #VECRAM&0FF         ;RELOAD VG\r
+       STA VGLIST\r
+       LDA #VECRAM&0FF00/100\r
+       STA VGLIST+1\r
+       LDA $LAM\r
+       EOR #0FF\r
+       AND #$LMBIT!DIAGBIT     ;SWITCH PUSHED?\r
+       IFNE\r
+       ASL TEMP9\r
+       IFCS                    ;PRESSED LONG ENOUGH?\r
+       LDA GAMSEL\r
+       IFMI                    ;YES\r
+       JSR INISOU              ;SOUND OFF\r
+       JMP XYINIT              ;GONE TO SIG ANAL NOT TO RETURN\r
+       ENDIF\r
+       INC TESTNM\r
+       INC TESTNM              ;NEXT TEST\r
+       LDA #0\r
+       LDX #06\r
+       BEGIN\r
+       STA X,POKEY1+CHAN1V\r
+       STA X,POKEY2+CHAN1V\r
+       DEX\r
+       DEX\r
+       MIEND\r
+       ENDIF\r
+       ELSE\r
+       LDA #20\r
+       STA TEMP9               ;NOT PRESSED, RESTART TIMER\r
+       ENDIF\r
+       LDA TESTNM\r
+       CMP #0A                 ;SPECIAL COLORS HERE\r
+       IFEQ\r
+       LDA TEMP8\r
+       AND #07\r
+       IFEQ\r
+       LDA #01\r
+       ENDIF\r
+       ORA #0C0                ;INTENSITY\r
+       TAY\r
+       ELSE\r
+       LDY #WHITE+0A0          ;PUT UP WHITE BOX\r
+       ENDIF\r
+       JSR VGSTAT\r
+       LAL FRCFL9\r
+       LXH FRCFL8\r
+       JSR VGADD2              ;DO BOX\r
+       JSR DOSTATE             ;DO THIS ROUTINE\r
+       JSR VGCNTR\r
+       JSR VGHALT              ;CENTER AND HALT\r
+       STA GOADD               ;START DISPLAY  \r
+       STA WTCHDG\r
+       LDA STSTSW              ;STILL SELF TEST?\r
+       AND #ST.BIT\r
+       NEEND\r
+WDRST: BNE WDRST               ;WATCH-DOG RESET FOR EXIT\r
+       .PAGE\r
+       .SBTTL DO-CASE ROUTINE\r
+SFTJSR:\r
+       .WORD STEST5-1          ;EAROM ERROR CORRECTION\r
+       .WORD STEST6-1          ;DISPLAY SWITCHES & REPORT PROBLEMS\r
+       .WORD STEST7-1          ;CROSS HATCH $ ALPHA\r
+       .WORD STEST8-1          ;SOUND & HYSTERSIS\r
+       .WORD STEST9-1          ;COLOR BARS\r
+       .WORD STST10-1          ;HATCH\r
+SFTJSE:\r
+DOSTATE:\r
+       LDX TESTNM\r
+       CPX #SFTJSE-SFTJSR      ;NON VALID STATE?\r
+       IFCS\r
+       LDX #2\r
+       STX TESTNM              ;START OVER\r
+       ENDIF\r
+       LDA X,SFTJSR+1\r
+       PHA\r
+       LDA X,SFTJSR\r
+       PHA\r
+       RTS                     ;RTS (JUMP CASE)\r
+       .VCTRS 8FFA,POWERON,POWERON,IRQ\r
+       HLL65\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
\ No newline at end of file
diff --git a/ASCVG.MAC b/ASCVG.MAC
new file mode 100644 (file)
index 0000000..982680d
Binary files /dev/null and b/ASCVG.MAC differ
diff --git a/AST2RD.LDA b/AST2RD.LDA
new file mode 100644 (file)
index 0000000..051d9db
Binary files /dev/null and b/AST2RD.LDA differ
diff --git a/AST2RD.MAC b/AST2RD.MAC
new file mode 100644 (file)
index 0000000..bba3259
--- /dev/null
@@ -0,0 +1,6944 @@
+       .TITLE AST2RD-ASTERIODS 2 (28503)\r
+       .ASECT\r
+       .ENABLE AMA\r
+       .RADIX 16\r
+;***********************************************\r
+;*\r
+;*DATE INITIATED:              12-MARCH-80\r
+;*\r
+;*PROJECT CHARGE #:            28503\r
+;*\r
+;*DISK #:                      73 (BACKUP B4),((77 WHEN ASSEMBLING))\r
+;*\r
+;*HARDWARE REQUIREMENTS:       VECTOR HARDWARE WITH PAGE SELECT ON 2\r
+;*\r
+;*\r
+;*MEMORY REQUIREMENTS:         VECTOR RAM:  2000-27FF (2K)\r
+;*                             VECTOR ROM:  2800-3FFF (4K)\r
+;*                             PROGRAM ROM: 4000-7FFF (16K)\r
+;*                             SCRATCH:     PAGE 0\r
+;*                             STACK:       PAGE 1\r
+;*                                          PAGE 2\r
+;;*                                         PAGE 3\r
+;*\r
+;*INTERRUPTS:                  IRQ (4 MS)\r
+;*\r
+;*ASSEMBLY COMMAND STRING:     R MAC65\r
+;*                             ASTROD/A/C\r
+;*\r
+;*LINK COMMAND:                        OUTPUT(S)=DX1:AS2ROM,AST2RD,VGUTR2,AS2MSG,AS2POK,AS2TST,AS2COI\r
+;*                                     DX1:AS2PO2,AS2PO3\r
+;*\r
+;*SPECIAL ASSEMBLY INSTRUCTIONS: AS2DEC MUST BE SOMEWHERE IN THE SYSTEM\r
+;*\r
+;*PROGRAM DESCRIPTION:         THIRD PERSON VIEW OF TWO SPACE SHIPS\r
+;*                             WITH ASTEROIDS THROUGHOUT SPACE.\r
+;*                             LARGE ASTEROIDS BREAK UP WHEN\r
+;*                             HIT AND SMALLER ASTEROIDS DISINTEGRATE\r
+;*                             WHEN HIT. A LARGE AND SMALL\r
+;*                             SAUCER ALSO APPEAR TO SHOOT AT\r
+;*                             THE SHIP.\r
+;*                             INDESTRUCTIBLE KILLER MINES PROVIDE PROBLEMS.\r
+;*                             COMETS COME STRAIGT AT SHIPS, TURN INTO HEAT SEEKING\r
+;*                             ASTERISKS WHEN THEY REACH THE EDGE OF SCREEN\r
+;*                             VERSIONS INCLUDE:\r
+;*                             2 PLAYER ASTEROIDS, NOT DIE WHEN OTHER PLAYER SHOOTS YOU\r
+;*                             COOPERATIVE DEFENSE\r
+;*\r
+;*CONTROLS:                    TWO SETS OF:ROTATE LEFT, ROTATE RIGHT, THRUST, FIRE\r
+;*                             AND SHIELD BUTTONS\r
+;*\r
+;*******************************************************\r
+       .SBTTL ************************\r
+       .SBTTL *\r
+       .SBTTL *PROGRAMMER: RICHARD MAURER\r
+       .SBTTL *            OWEN RUBEN\r
+       .SBTTL *\r
+       .SBTTL ************************\r
+       .PAGE\r
+       .SBTTL GLOBAL SYMBOL DECLARATIONS\r
+;\r
+;ENTRY POINTS\r
+;\r
+       .GLOBL START,NAMSEL,STRTLOK,SUPRC,POPSN\r
+       .GLOBL DIGITS,FLASHCOL,SMINVEL,GTOPTN\r
+       .GLOBL LANGOFF,BIGBANG,PICSEL\r
+       .GLOBL HSCBEG,PICADH,PICADL\r
+       .GLOBL ROTAST,START2,FAN,ROCPIC\r
+\r
+;\r
+;\r
+;EXTERNAL ENTRY POINTS\r
+;\r
+;EAROM ROUTINE ENTRY/EXIT POINTS\r
+       .GLOBL EAUPD,EAZERO,REHIIN,WRHIIN,EASETUP\r
+       .GLOBL EAFLG,WRBOOK,EAZBOO,EAZHIS\r
+       .GLOBL BOOK,STESTA,MESGPOS\r
+       .GLOBL SAUCSN,PL0FIR,PL1FIR,EXTLIF,EXPLOS,THRUSN\r
+       .GLOBL EN0SN,EN1SN,SH0SN,SH1SN,FU0SN,FU1SN\r
+       .GLOBL VGHALT,VGVCTR,VGRTSL,VGMSGA,VGMSGU               ;UTILITY ROUTINES(SEE VECUT.MAC)\r
+       .GLOBL VGJMPL,VGJSRL,WNDSET,HUM,SFREQ,FRAME,COMTIMER\r
+       .GLOBL VGADD,VGCNTR\r
+       .GLOBL VGHEX,VGHEX1,VGHEXZ,VGVTR,VGNEG,VGVTR5\r
+       .GLOBL VGSCAL,VGSCA1,VGAD1B\r
+       .GLOBL VGSTAT,VGSTA1,VGCHAR\r
+       .GLOBL VGSETZ\r
+;AS2ROM GLOBALS\r
+       .GLOBL LIVEPAR,LIVUDPAR,LLIVESHIP,ULIVESHIP\r
+       .GLOBL LLIVUDSHIP,ULIVUDSHIP,CNTHSC,QHEADER\r
+       .GLOBL FRCFLD,FRCFL8,FRCFL9\r
+       .GLOBL RHTSHP,LFTSHP,PLTLIV,LFUDSHIP,PAIRUD\r
+       .GLOBL PL0SET,PL1SET,CMSBSET,CMBSET\r
+       .GLOBL PYR11,PYR12,PYR13,CVR11,CVR12,CVR13\r
+       .GLOBL CVR21,CVR22,CVR23,VROCK1,VROCK2,VROCK3,VROCK4\r
+       .GLOBL SAU11,SAU12,SAU13,SAUCRC\r
+       .GLOBL EXP9,EXP10,EXP11,EXP12,EXP13,EXP14,EXP15,EXP16\r
+       .IRPC X,<0123>\r
+       .GLOBL ROCK'X'1,ROCK'X'2,PYRM'X'1,CUBE'X'1,HEXA'X'1\r
+       .GLOBL PLN'X'1,PENT'X'1\r
+       .ENDR\r
+       .GLOBL STAR01,STAR11,STAR21,STAR31\r
+       .GLOBL CUBNM8,CUBNM9\r
+       .GLOBL CNTSCL,SHOT,DWARF,COMET,SHIELD\r
+       .GLOBL FLARE\r
+;OTHER POORLY PLACED GLOBALS\r
+       .GLOBL POWERON,TOTOBJ\r
+       .GLOBL SHIPS,EXPPIC,ROCKA,SAUCER        ;PICTURES OF SHIP AND ASTEROIDS\r
+       .GLOBL MINE,SCSHSP,PRTDAMAGE,IANGLE,SANGLE\r
+       .GLOBL VGMSG,VGMSG5,VGMSG3,VGMSG4       ;MESSAGE PROCESSOR\r
+       .GLOBL PWRON,VGADD2,VGAD2B              ;ENTRY POINTS FOR AS2TST.MAC\r
+       .GLOBL EXPSHP,EXPDIR,UEXPDIR            ;EXPLODING SHIP PICTURES\r
+       .GLOBL ASTMG8,ASTMG9\r
+       .GLOBL SINCOS,TOGDRONE\r
+       .GLOBL XPLPIECE\r
+       .GLOBL IRQ,MOOLAH               ;SO CAN SEE ON LINKER LIST\r
+       .GLOBL INISOU,MODSND,GATES\r
+       .GLOBL DIGITS\r
+       .GLOBL HSCBEG\r
+;GLOBAL VARIABLES\r
+;EAROM VARIABLES\r
+       .GLOBL EAZFLG,EAREQU,EARWRQ,EABAD,EABUF\r
+       .GLOBL EAFLG,EABC,EAX,EACNT,EASEL\r
+       .GLOBL EACS,EASRCE\r
+;BOOKKEEPPING VARIABLES (FOR EA ROM)\r
+       .GLOBL PLAYTIME,GAMES1,ONTIME,BONTIME,GTIME,GAME\r
+       .GLOBL NAMES,SPINT,FLSFLG\r
+       .GLOBL INITL,HSCORE\r
+       .GLOBL UPDOWN                   ;MESSAGES, ESPECIALLY FOR COCKTAIL\r
+       .GLOBB FREXPLOSION,OPTN1,LANG,ATSTG,$USE\r
+;GLOBALS IN VGROM\r
+       .GLOBL WNDSE8,WNDSE9\r
+;\r
+       .GLOBL CNTRS8,CNTRS9\r
+       .GLOBL SAU11,SAU12,SAU13\r
+;ZERO PAGE GLOBALS\r
+;\r
+       .GLOBB TEMPA,TEMPB,TEMP12,TEMPC,SYNC\r
+       .GLOBB ATRACT,INTRPT,DIFF,HITS,NXTBON\r
+       .GLOBB OLDVEC,SAUMIN,BONLVA\r
+       .GLOBB XCOMP,TEMP1,VGLIST,VGBRIT,TEMP10,TEMP11,TEMP8,TEMP9\r
+       .GLOBB TEMP3,UPDFLG,FRAME,TEMP2,TEMP4,TEMP5,TEMP6,TEMP7\r
+       .GLOBB $CCTIM,$$CRDT,$CMODE,$PSTSL,$LMTIM,$CNCT,$CNSTT,$INTCT\r
+       .GLOBB $LAM,$BCCNT,$BC\r
+       .GLOBL SAUCIX,OBJXH,OBJXL,OBJYH,OBJYL,WAVE,SUPRSAC\r
+       .GLOBL XINC,YINC,SUPRTIM,SUPRDIS,NEXTEX,SECOND\r
+       .GLOBB OBJ,$TCMFLG\r
+       .GLOBL $LMBIT,$COINA,ASTERS,NROCKS,MODNUM\r
+       .GLOBL HSCFLG,ZSAUCER,ZCOMINES,NMCOMINES\r
+;OTHER GLOBALS.......................\r
+       .INCLUDE HLL65F\r
+       .INCLUDE AS2DEC         ;<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\r
+\r
+       .INCLUDE VGMC   ;<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\r
+       .SBTTL LABS\r
+       .MACRO LABS DX,DY,SCALE\r
+       CNTR 0\r
+       VCTR DX,DY,0\r
+       .ENDM\r
+\r
+;\r
+;VCTRSC-DRAW VECTOR INSTRUCTION\r
+;THIS INSTRUCTION DRAWS A VECTOR ON THE DISPLAY AREA\r
+;RELATIVE TO THE PREVIOUS BEAM POSITION BEFORE THE\r
+;INSTRUCTION IS EXECUTED. DX IS THE CHANGE IN BEAM X\r
+;POSITION; DY IS THE CHANGE IN BEAM Y POSITION; ZZ\r
+;SPECIFIES THE BEAM INTENSITY (0 THROUGH 7., 0 IS\r
+;NO INTENSITY, 7. IS BRIGHTEST INTENSITY).\r
+;...SCAL IS SCALE TO BE SET (1,2,4,8)\r\r
+;\r
+       .SBTTL VCTRSC\r
+       .MACRO VCTRSC DX,DY,ZZ\r
+       .IF GE,DX\r
+       ...1=DX+<...SCAL/2>/...SCAL\r
+       ...6=...1\r
+       .IFF\r
+       ...1=DX-<...SCAL/2>/...SCAL\r
+       ...6=-...1\r
+       .ENDC\r
+       .IF GE,DY\r
+       ...2=DY+<...SCAL/2>/...SCAL\r
+       ...7=...2\r
+       .IFF\r
+       ...2=DY-<...SCAL/2>/...SCAL\r
+       ...7=-...2\r
+       .ENDC\r
+       ...5=...6!...7\r
+       .IF EQ,...5&^H0FFE1\r
+       .WORD ^H4000+<ZZ*^H20>+<...1/2&^H1F>+<...2*^H80&^H1F00>\r
+       .MEXIT\r
+       .ENDC\r
+       .WORD ...2&^H1FFF,<ZZ*^H2000>+<...1&^H1FFF>\r
+       .ENDM\r
+;ASCIN - TAKE AN ASCII STRING AND MAP 3 CHARACTERS TO 2 BYTES\r
+;\r
+;THIS MACRO PACKS 3 ASCII CHARACTERS (BLANK, A THRU Z,0,1, OR 2) INTO 2\r
+;BYTES IN THE FORMAT\r
+;      AAAAABBB BBCCCCCD\r
+;WHERE D=1 MEANS END OF LIST\r
+;      AAAAA,BBBBB,CCCCC=INDEX AS FOLLOWS\r
+;      0=END OF LIST\r
+;      1=BLANK\r
+;      2=0\r
+;      3=1\r
+;      4=2\r
+;      5=A\r
+;      ETC.\r
+       .MACRO ASCIN STRING\r
+       ...N=0\r
+       .NCHR ...C,<STRING>\r
+       .ENABL M68\r
+       .IRPC ...5,<STRING>\r
+       ...4=''...5\r
+       ...C=...C-1\r
+       ...3=0\r
+       .IIF EQ,...4-^H20,...3=1\r
+       .IF GE,...4-^H30\r
+       .IIF LT,...4-^H33,...3=...4-^H30+2\r
+       .ENDC\r
+       .IF GE,...4-^H41\r
+       .IIF LT,...4-^H5B,...3=...4-^H41+5\r
+       .ENDC\r
+       .IIF EQ,...N,...1=...3\r
+       .IIF EQ,...N-1,...2=...3\r
+       ...N=...N+1\r
+       .IF EQ,...N-3\r
+       ...N=0\r
+       .IIF EQ,...C,.WORD <...1*^H800>+<...2*^H40>+<...3*2>+1\r
+       .IIF NE,...C,.WORD <...1*^H800>+<...2*^H40>+<...3*2>\r
+       .ENDC\r
+       .ENDM\r
+       .IIF EQ,...N-1,.WORD ...1*^H800\r
+       .IIF EQ,...N-2,.WORD <...1*^H800>+<...2*^H40>\r
+       .DSABL M68\r
+       .ENDM\r
+       .RADIX 16\r
+\r
+\r
+       .MACRO COLOR COL,LUM\r
+       .BYTE <LUM*^H10>+COL,^H64\r
+       .ENDM\r
+;\r
+;COLOR TABLE\r
+;\r
+BLACK  ==0\r
+BLUE   ==1\r
+GREEN  ==2\r
+GRBLUE ==3\r
+RED    ==4\r
+VIOLET ==5\r
+YELLOW ==6\r
+WHITE  ==7\r
+;\r
+RODCOL ==YELLOW\r
+PL0COL ==RED                   ;PLAYER 0 COLOR\r
+PL1COL ==GREEN                 ;PLAYER 1 COLOR\r
+       .MACRO MULBLD           ; MACRO TO BUILD MULTIPLY TABLE\r
+       .NIBH=0\r
+       .REPT 10\r
+       .NIBL=0\r
+       .REPT 10\r
+       .BYTE .NIBH*.NIBL\r
+       .NIBL=.NIBL+1\r
+       .ENDR\r
+       .NIBH=.NIBH+1\r
+       .ENDR\r
+       .ENDM\r
+; CONTIGUITY REQUIREMENTS\r
+; SHIPS FOLLOW SAUCER - EFIRE\r
+; COLLIDE HAS SOME RESTRICTIONS\r
+\r
+       .SBTTL PAGE 0 DECLARATIONS\r
+       \r
+VGBRIT:        .BLKB 1                 ;VECTOR BRIGHTNESS (0=OFF, F0=MAX, 20 INC)\r
+VGLIST:        .BLKB 2                 ;VECTOR LIST POINTER\r
+XCOMP: .BLKB 4                 ;X COMPONENT FOR VECTORS\r
+TEMP1: .BLKB 3                 ;SCRATCH-3 BYTES USED BY SELF-TEST\r
+TEMP1C =TEMP1+2\r
+TEMP2: .BLKB 2\r
+TEMP3: .BLKB 4                 ;TEMP3 USUALLY SAVES X.TEMP 3+1 FOR Y\r
+TEMP3C =TEMP3+2\r
+TEMP3D =TEMP3+3\r
+TEMP4: .BLKB 3\r
+TEMP5: .BLKB 1\r
+TEMP6: .BLKB 1\r
+TEMP7: .BLKB 1\r
+TEMP7B:        .BLKB 1\r
+TEMP8: .BLKB 1\r
+TEMP9: .BLKB 1\r
+TEMP10:        .BLKB 1\r
+TEMP11:        .BLKB 1\r
+TEMP12:        .BLKB 1\r
+TEMPA: .BLKB 1\r
+TEMPB: .BLKB 1\r
+TEMPC: .BLKB 1\r
+$TCMFLG: .BLKB 1               ;2 COIN MIN FLAG\r
+$$CRDT:        .BLKB 1                 ;COIN ROUTINE DEFINITION (SEE COIN65.MAC)       \r
+$INTCT:        .BLKB 1\r
+$BCCNT:        .BLKB 1\r
+$BC:   .BLKB 1\r
+$CMODE:        .BLKB 1\r
+$LMTIM:        .BLKB 1\r
+$CNCT: .BLKB 1\r
+$CCTIM:        .BLKB 3\r
+$PSTSL:        .BLKB 3\r
+$CNSTT:        .BLKB 3\r
+$USE:  .BLKB 1         ; COIN ROUTINE IN USE (IF POSITIVE)\r
+$LOCKCOIL:     .BLKB 1         ;OUTPUT BUFFER FOR:\r
+                               ;D7=Y INVERT\r
+                               ;D6=X INVERT\r
+                               ;D5=START LED (0=ON)\r
+                               ;D4=SELECT LED (0=ON)\r
+                               ;D3=COIN LOCKOUT (1=NO COINS)\r
+                               ;D2=LEFT COIN COUNTER\r
+                               ;D1=CENTER COIN COUNTER\r
+                               ;D0=RIGHT COIN COUNTER\r
+INTRPT:        .BLKB 1\r
+SYNC:  .BLKB 1\r
+GAME:  .BLKB 1\r
+SAVTOP:                                ;ALL RAM FROM NOW ON NEED NOT BE SAVED FROM GAME TO GAME\r
+ATRACT:        .BLKB 1                 ;POSITIVE GAME GOING, ZERO FOR ATTACT\r
+UPDINT:        .BLKB 2                 ;0,1, OR 2 TO INDICATE WHICH INITIAL IS BEING SELECTED\r
+UPDFLG:        .BLKB 2                 ;POSITIVE MEANS THIS PLAYER HAS SET NEW HIGH SCORE\r
+SCORE: .BLKB 3*2               ;PLAYER 1 AND 2 SCORES (LOW,MED,HIGH,BYTES)(BCD)\r
+CMBSCORE:.BLKB 3               ;COMBINED SCORE\r
+GENDING:       .BLKB 1         ;DELAY BEFORE ENDNG GAME IF NONZERO,COUNTS UP TO ZERO\r
+FRAME: .BLKB 3                 ;FRAME COUNTER\r
+HITS:  .BLKB 2                 ;NUMBER OF HITS REMAINING (=0 FOR ATTRACT MODE)\r
+LASTSW:        .BLKB NMSHIP            ;LAST SWITCH READING\r
+XINCL: .BLKB NMSHIP            ;SHIPS LSB FOR X INCREMENT\r
+YINCL: .BLKB NMSHIP            ;SHIPS LSB FOR Y INCREMENT\r
+       \r
+       \r
+TOGGLE:        .BLKB NMSHIP            ;SHLDON\r
+TOGDRONE:      .BLKB 1         ;(D7) DRONE PLAYER\r
+TOGCOMB:.BLKB 1                        ;(D7) COMBINED LIVES\r
+SCRFUL:        .BLKB 1                 ;(D7) SCREEN HAS MAXIMUM NUMBER OF OBJECTS\r
+KLMOFF:        .BLKB 1         ;(D7) KILLERMINE TO GO OFF SCREEN (D6) COMETS TO GO OFF)\r
+TSTBYTE:       .BLKB 1         ;SEE IF ENMOFF GETS CLOBBERED FROM ABOVE\r
+NCHANL==10\r
+POINT::        .BLKB NCHANL\r
+CURRENT::.BLKB NCHANL\r
+COUNT::        .BLKB NCHANL\r
+FRAMES::.BLKB NCHANL\r
+SINDEX::.BLKB 1\r
+OBJ:   .BLKB NMROCKS           ;ZERO IF OBJECT NOT ACTIVE- OTHERWISE PICTURE NUMBER\r
+OBCOMETS:.BLKB NMCOMETS\r
+OBKLMINES:.BLKB NMKLMINES              ; KILLER MINES\r
+OBSAUCER:.BLKB NMSAUCER\r
+OBSHIP:        .BLKB NMSHIPS\r
+OBPAIR:        .BLKB 1                 ;PAIR\r
+OBMINES:                       ;BEGINNING OF SHOTS\r
+OBCOMINES:.BLKB NMCOMINES      ;COMPUTER MINES\r
+OBP0MINES:.BLKB NMP0MINES      ;PLAYER 0 MINES\r
+OBP1MINES:.BLKB NMP0MINES      ;PLAYER 1 MINES\r
+                               ;BITS 0-2=SIZE, 1=SMALL, 2=MEDIUM, 4=LARGE\r
+                               ;BITS 3-6=PICTURE NUMBER\r
+EASRCE:        .BLKB 2                 ;EAROM POINTER\r
+KLMINC:        .BLKB NMKLMINES         ;COLOR OF MINES (SHOT COUNT-1)\r
+DIFCTY:        .BLKB 1         ;DIFFICULTY VALUE FOR STARTING SAUCERS\r
+OPTN1: .BLKB 1                 ;OPTION 1 READING\r
+LANG:  .BLKB 1                 ;LANGUAGE\r
+DIFF:  .BLKB 1                 ;DIFFICULITY LEVEL FROM OPTION SWITCHES\r
+SAUMIN:        .BLKB NMSAUCER          ;MINIUM VELOCITIES OF SAUCERS\r
+ROCKMIN:       .BLKB 2         ;ROCK MIN; + - VEL\r
+ROCKMAX:       .BLKB 2         ;ROCK VEL MAX\r
+SAVZTOP:\r
+LASTOBJECT=.-1\r
+NXTBON:        .BLKB 2                 ;NEXT BONUS\r
+BONLVA:        .BLKB 1                 ;BONUS LEVEL AMOUNT\r
+ATSTG: .BLKB 1                 ;ATTRACT STAGE FLAG\r
+HSCORE:        .BLKB 3*HSCNUM*4                ;HIGH SCORES (LOW,MIDDLE,HIGH)\r
+INITL: .BLKB 3*HSCNUM*4                ;INITIALS FOR HIGH SCORE (FIRST,SECOND,THRID)\r
+SPINT: .BLKB 3*HSCNUM                  ;EXTRA INITIALS FOR 2 PLR\r
+                                       ;SPACE STATION GAME\r
+EABUF: .BLKB 32.                       ;EA ROM READ/WRITE BUFFER AREA\r
+;EAROM VARIABLES\r
+EAZFLG:        .BLKB 1                         ;ZERO FLAG (NOT 0 = ZERO EAROM)\r
+EAREQU:        .BLKB 1                         ;ROM ACCESS REQUEST\r
+                                       ;IF A BIT=0 THEN NO ACTION REQUESTED\r
+                                       ;        =1 THEN ACCESS THAT DATA\r
+                                       ;D7 REPRESENTS 7TH BATCH OF DATA\r
+                                       ;D0 REPRESENTS 0TH BATCH OF DATA\r
+EARWRQ:        .BLKB 1                         ;ROM ACCESS TYPE (MATCHES EAREQU)\r
+                                       ;IF BIT=0 THEN READ, ELSE WRITE\r
+EABAD: .BLKB 1                         ;ROM ACCESS SUCESS(0), FAIL(1) \r
+                                       ;(MATCHES EAREQU)\r
+                                       ;\r
+                                       ;EA CONTROLL BYTES FOR 1 OPERATION\r
+                                       ;\r
+EAFLG: .BLKB 1                         ;D7=1=ERASE             ;=0=R/W\r
+                                       ;D6=1=WRITE             ;D5=1=READ\r
+                                       ;D4=1=ZERO EAROM (IF D6=WRITE)\r
+EAERAS =80\r
+EAWRIT =40\r
+EAREAD =20\r
+                                       ;\r
+EABC:  .BLKB 1                         ;BYTE INDEX INTO ADDRESS AT EASRCE\r
+                                       ;\r
+EAX:   .BLKB 1                         ;BYTE OFFSET INTO EAROM FOR NEXT ACCESS\r
+                                       ;\r
+EACNT: .BLKB 1                         ;BYTE OFFSET INTO EAROM FOR LAST ACCESS\r
+                                       ;\r
+EASEL: .BLKB 1                         ;INDEX CODE FOR CURRENT BATCH OPERATION\r
+                                       ;\r
+EACS:  .BLKB 1                         ;CHECKSUM\r
+ONTIME:        .BLKB 4                 ;ACTIVE ON TIME COUNTER\r
+BONTIME:       .BLKB 4         ;SAME USED FOR EA XFER\r
+PLAYTIME:      .BLKB 4*4               ;GAME PLAY TIME (1/2 PLAYER GAMES-4 EACH)\r
+GAMES1:        .BLKB 3*4                       ;1 PLAYER GAMES\r
+       .SBTTL PAGE 2 AND 3 DECLARATIONS\r
+\r
+       .=200\r
+\r
+XINC:  .BLKB TOTOBJ            ;X INCREMENT FOR UPDATING POSITION(S8999.BBB)\r
+YINC:  .BLKB TOTOBJ            ;Y INCREMENT FOR UPDATING POSITION(S9999.BBB)\r
+NROCKS:        .BLKB 1                 ;CURRENT NUMBER OF ROCKS\r
+ENMDEL:        .BLKB NMSHIPS           ;TIME TILL THIS SHIP IS A TARGET\r
+EDELAY:        .BLKB NMSAUCER          ;DELAY BEFORE ENEMY ENTRY OR FIRING\r
+SENMDEL:.BLKB NMSHIP           ;STARTING ENEMY DELAY\r
+RTIMER:        .BLKB NMSHIP            ;ROCK TIME - IF 0 SEND IN SAUCER ANYWAY\r
+SDELAY:        .BLKB NMSHIP            ;DELAY COUNT BEFORE ADDING SHIP (80=SHIP JUST DESTROYED)\r
+ETIMER:        .BLKB NMSAUCER          ;0 WHEN ALLOWED BACK IN\r
+RDELAY:        .BLKB 1                 ;DELAY COUNT BEFORE ADDING ROCKS\r
+THUMP3:        .BLKB 1                 ;STARTING VALUE FOR THUMP2\r
+SHLDENG:.BLKB NMSHIP           ;ENERGY LEFT IN SHIELDS\r
+LSHLDENG:.BLKB NMSHIP          ;"LOWER\r
+CSPEED:.BLKB NMCOMET           ;SPEED OF COMETS\r
+KSPEED:        .BLKB NMKLMINES         ;SPEED OF KILLER MINE\r
+CANGCH:        .BLKB NMCOMET           ;CHANGE IN ANGLE (LOW) FOR COMETS MINES\r
+KANGCH:        .BLKB NMKLMINES         ;CHANGE IN ANGLE (LOW) FOR KILLER MINES\r
+CANGLH:        .BLKB NMCOMETS          ;MSB ANGLE OF COMET\r
+\r
+KANGLH:        .BLKB NMKLMINES         ;MSB ANGLE OF KILLER MINE\r
+ANGLE: .BLKB NMSAUCER          ;ANGLE OF ROTATION OF SAUCER\r
+SANGLE:        .BLKB NMSHIPS           ;ANGLE OF SHIPS ORIENTATION\r
+CANGLL:        .BLKB NMCOMETS\r
+KANGLL:        .BLKB NMKLMINES         ;LSB ANGLE OF KILLER MINE\r
+BANGLE:        .BLKB 1                 ;BAR ANGLE\r
+BANGLL:        .BLKB 1                 ;BAR ANGLE LOWER\r
+OBJXH: .BLKB TOTOBJ            ;X POSITION OF OBJ (HIGH ORDER) (00099999)\r
+OBJYH: .BLKB TOTOBJ            ;Y POSITION OF OBJECT (HIGH ORDER)(00099999)\r
+ISNSP2:        .BLKB 1         ;INITIAL SPEED\r
+SNDBA2:        .BLKB 1                 ;BASE\r
+SNDSP2:        .BLKB 1                 ;SPEED\r
+SPARKANGLE:    .BLKB NMSPARK\r
+OBJXL: .BLKB TOTOBJ            ;X POSITION OF OBJECT (LOW ORDER)(99999.BBB)\r
+OBJYL: .BLKB TOTOBJ            ;Y POSITION OF OBJECT (LOW ORDER)(99999.BBB)\r
+UWBAR: .BLKB 1                 ;BAR ROTATION SPEED UPPER\r
+LWBAR: .BLKB 1                 ;BAR ROTATION SPEED LOWER\r
+BXINCL:        .BLKB 1                 ;BAR CENTER OF MASS XINC LOWER\r
+BYINCL:        .BLKB 1                 ;BAR CENTER OF MASS YINC LOWER\r
+PRTDAMAGE:.BLKB NMSHIPS                ;PARTIAL DAMAGE IF NON ZERO\r
+COLLIS:        .BLKB NMSHIP            ;LAST OBJECT THIS SHIP HIT. A1 IS SHIFTED INTO MSB EACH FRAME\r
+STRADDLE:      .BLKB 1         ;D7 (STRADDLE X) D6 (STRADDLE Y)\r
+COMOFF:        .BLKB 1         ;-1 WHEN COMETS TO GO OFF SCREEN\r
+       \r
+;TEMPORARIES\r
+OWNER: .BLKB 1                 ;WHO GETS POINTS (0,1),NEGATIVE FOR NOBODY\r
+COMTYP:        .BLKB NMCOMETS          ;DWARF (0), COMET (80)\r
+COMSTART:.BLKB NMSHIPS         ;WHERE TO START SEARCH FOR OPEN COMET\r
+PROBCOMET:.BLKB NMSHIPS                ;PROBABITLITY STARTS AS COMET\r
+DWFRMP:        .BLKB NMSHIPS           ;DWARF RAMPING SPEED\r
+SCSHSP:        .BLKB NMSHIPS           ;SAUCER SHOOTING SPEED (80=FAST)\r
+XINCROT:.BLKB 1                        ;TEMPORARIES\r
+YINCROT:.BLKB 1\r
+XPOSSAVE:.BLKB 1\r
+YPOSSAVE:.BLKB 1\r
+SHHIGH:        .BLKB 1         ;SHOW HIGH SCORE-IF NOW ZERO\r
+FREXPLOSION:.BLKB 1            ;EXPLOSION SOUND\r
+MXRTIMER:.BLKB NMSHIPS         ;MAXIMUM ROCK TIMER\r
+NWCACH:        .BLKB NMSHIPS           ;NEW PLANET CHANGE ANGLE\r
+NWCSPD:        .BLKB NMSHIPS           ;NEW COMET SPEED\r
+FCACH: .BLKB NMSHIPS           ;FIRST COMET CHANGE\r
+FCSPD: .BLKB NMSHIPS           ;FIRST COMET SPEED\r
+WAVE:  .BLKB 1                 ;USED FOR BONUS POINTS\r
+GTIME: .BLKB 4         ;GAME TIME USING INTERRUPTS\r
+BCOMSTART:     .BLKB NMSHIPS\r
+NCOMET:        .BLKB 1         ;NUMBER OF COMET\r
+COMTIMER:      .BLKB 1         ; HOW MUCH LONGER COMETS CAN STAY ACTIVE\r
+                               ; FOR RUSH AT END OF WAVE\r
+COMLIMIT:      .BLKB 1         ;LIMIT ON COMETS\r
+LNGTIMER:      .BLKB 2         ; LONG TIMER, IF NEGATIVE THEN SAUCERS\r
+                               ; COME OUT EVEN IF ROCKS, SHOOT FAST, OFTEN\r
+WHOSHOT:.BLKB NMSHIPS          ; WHO SHOT THIS SHIP (0=OPPONENT,FF=COMPUTER)\r
+NENTCOMETS:    .BLKB 1         ;NUMBER OF COMETS TO ENTER AT END OF WAVE\r
+NENTDWARF:     .BLKB 1         ;NUMBER OF DWARFS TO ENTER AT END\r
+ETARGET:.BLKB NMSAUCER         ;WHICH SHIP THE SAUCER IS TO TARGET;-1 FOR INACTIVE\r
+CTARGET:.BLKB NMCOMETS         ;WHICH OBJ TO TARGET FOR COMETS\r
+KTARGET:.BLKB NMKLMINES                ;WHICH OBJ TO TARGET FOR KILLER MINES\r
+SPARKTIME:.BLKB 1              ;DECREASING TIMER FOR SPARK BETWEEN SHIPS\r
+                               ;80=NEGATIVE FOR NO SPARK\r
+IANGLE:        .BLKB NMSHIP            ;BUFFER FOR SHIPS ANGLES\r
+LMONHITS:      .BLKB NMSHIPS           ;HOW MANY TIMES THIS PLAYER KILLED A MONSTER\r
+UMONHITS:      .BLKB NMSHIPS\r
+ASTERS:                .BLKB 8         ;ROCK ROTATIONS\r
+HSCFLG:        .BLKB 1                 ;FLAG TO INDICATE GETTING INITIALS TO SOUND ROUTINE\r
+;RODSTATUS, SINCE IT IS USED ONLY DURING MOTION, MAY NOT NEED A RESERVED BYTE\r
+RODSTATUS:     .BLKB 1         ;POSITIVE IF NEED TO DRAW (OR REDRAW) THE ROD.\r
+;RAM PAST HERE SHOULD BE SAVED\r
+SAVBOT:\r
+LASTGAM:.BLKB 1                        ;USED TO DEBOUNCE GAME SELECT\r
+PL0SCFLAG:     .BLKB 1         ;(MINUS SIGNIFIES THIS SCORE HAS BEEN CHANGED\r
+PL1SCFLAG:     .BLKB 1         ;MINUS AND V CHAR MEANS LIVES HAVE BEEN CHANGED)\r
+CMBSCFLAG:     .BLKB 1\r
+UPDOWN:        .BLKB 1                 ;NEGATIVE FOR UPSIDE DOWN VECTORS AND MESSAGE\r
+\r
+SECOND:        .BLKB 1                 ;1 SECOND TICKS\r
+FLASHCOL:      .BLKB 1                 ;FLASH COLOR\r
+ENTER: .BLKB 2                 ;ENTRY EFFECT TIMERS\r
+SFREQ: .BLKB 1                 ;OUTPUT FREQ OF HUM\r
+SPFLG: .BLKB 1                 ;FLAG FOR SPECIAL INITIALS\r
+                               ;SAME AS UPDFLG\r
+FLSFLG:        .BLKB 2                 ;FLASH LAST ENTERED INITIALS\r
+SAUCIX:        .BLKB 1\r
+STRTLOK:       .BLKB 1         ;START BUTTON LOCKOUT\r
+                               ;0=GAME IN PROGRESS\r
+                               ;80=NO STARTS ALLOWED\r
+                               ;40=SELECT PUSHED...STARTS OK\r
+EXPDEC:        .BLKB 2                 ;EXPLOSION SELECTION\r
+                               ;- = SHOW BOTH EXPLOSION\r
+                               ;+ = ONLY PIECES\r
+SUPRSAC: .BLKB 1               ;SUPER SAUCER FLAG (80=SUPER)\r
+SUPRTIM: .BLKB 1               ;SUPER SAUCER SHOT TIME\r
+SUPRDIS: .BLKB 1               ;SUPER SAUCER DISTANCE\r
+LASTG: .BLKB 1                 ;LAST GAME PLAYED FLAG\r
+NEXTEX:        .BLKB 1                 ;FAN FARE EXPLOSIONS\r
+SPECEX:        .BLKB 1                 ;SPECIAL FAN FARE FLAG\r
+INTEN: .BLKB 1                 ;INTENSITY PULSE BYTE \r
+                               ;TOP 4 BITS OF FRAME IN BOTTOM NIBBLE\r
+MODNUM:        .BLKB 1                 ;MODULO NUMBER\r
+DIFSW: .BLKB 1                 ;DIFF SWITCH READING (FOR DISPLAY)\r
+;RELATIVE OBJECT NUMBER\r
+;  DOES NOT WORK TO SAY OBSHIP-OBJ WHEN ONE IN ZERO PAGE\r
+ZCOMET =NMROCKS\r
+ZKLMINES=ZCOMET+NMCOMETS\r
+ZSAUCER=ZKLMINES+NMKLMINES\r
+ZSHIP=ZSAUCER+NMSAUCERS\r
+ZPAIR=ZSHIP+NMSHIPS\r
+ZMINES=ZPAIR+NMPAIR\r
+ZMINE  =ZMINES\r
+ZSHOT  =ZMINES\r
+ZCOMINES=ZMINES\r
+ZP0MINES=ZCOMINES+NMCOMINES\r
+ZP1MINES=ZP0MINES+NMP0MINES\r
+ZLAST=ZP1MINES+NMP1MINES-1\r
+ZCXBAR=ZLAST+1\r
+ZLENEMY=ZSHIP-1\r
+\r
+;RELATIVE TO SHIP\r
+ZZPAIR =ZPAIR-ZSHIP\r
+ZZMINES  =ZMINES-ZSHIP\r
+ZZCOMINES=ZCOMINES-ZSHIP\r
+ZZP0MINES=ZP0MINES-ZSHIP\r
+ZZP1MINES=ZP1MINES-ZSHIP\r
+ZZCXBAR=ZCXBAR-ZSHIP\r
+;RELATIVE TO SAUCER\r
+ZZZSHIP        =ZSHIP-ZSAUCER\r
+BXINC  =XINC+ZPAIR             ;BAR CENTER OF MASS XINC UPPER\r
+BYINC  =YINC+ZPAIR             ;BAR CENTER OF MASS YINC UPPER\r
+;OTHER EQUATES\r
+MAXSPEED       =3F             ;MAXIMUN SPEED ABSOLUTE VALUE\r
+;USED FOR APPROXIMATE REFLECTION IN CPYVEC\r
+\r
+REFLMASK=1C                    ;TO ONES COMPLEMENT A VECTOR\r
+;CONSTANTS USED IN TOGGLE\r
+SHLDON =80\r
+       \r
+MINSHENG=018                   ;MIMIMUM UPPER SHIELD ENERGY\r
+BGSHENG        =0F0\r
+;CONSTANT USED IN COLIS\r
+COLBIT =80                     ;A MESSUP BIT SHIFTED IN EACH FRAME\r
+THRENG =0F0*2                  ;THRUST ENERGY FOR ROTATE PAIR\r
+ROTENG =40.                    ;ROTATIONAL ENERGY\r
+TWOPI  =6\r
+FOURPI =13.\r
+XRIGHT =20                     ;RIGHT SIDE OF SCREEN\r
+YTOP   =18                     ;TOP OF SCREEN\r
+ENTZON =4              ;HOW MUCH ROOM TO LEAVE WHEN ENTERING ROCKS\r
+                               ;SO WHEN ADDING A RANDOM VLAUE DO NOT GO PAST EDGE\r
+                               ;READY TO COME BARK WHEN INCREMENTED TO 80\r
+SHPALIVE       =2              ;VALUE FOR SIP WHEN ALIVE\r
+MAXGAME        =3                      ;MAXIMUM AME NUMBER (INTERNAL GAME NUMBERS ARE\r
+                               ;ONE LESS THEN ON SCREEN (0,1,..., MAXGAME)\r
+MXPTDAMAGE=80                  ;MAXIMUM PARTIAL DAMAGE (NEGATIVE GOING)\r
+\r
+MXSPKTIME=060                  ;MAXIMUM SPARK TIME (THEN OTHER SHIP DIES)\r
+;GAME EQUATES\r
+ALONEGAME=1                    ;ONE SHIP ONLY\r
+TWINGAME=3                     ;SPACE STATION, ONE PLAYER CONTROLS BOTH\r
+LANGBTS        =30                     ;LANGUAGE BITS\r
+;COMET EQUATES\r
+IGENDING       =40             ; INITIAL GAME ENDING VALUE\r
+HSBIT  =4\r
+; SPECIAL DEFINING FOR A WHILE\r
+.=VECRAM+290\r
+; BUILD ROCKS HERE\r
+VROCK1:        .BLKB 2                 ;JMPL TO PROPER ROCK PICTURE\r
+CVR11: .BLKB 4                 ;1ST COLOR INST AND RTSL\r
+CVR12: .BLKB 4                 ;2ND   "    "    "   "\r
+CVR13: .BLKB 4                 ;3RD   "    "    "   "\r
+VROCK2:        .BLKB 2                 ;JMPL TO PROPER ROCK PICTURE\r
+CVR21: .BLKB 4                 ;1ST COLOR INST AND RTSL\r
+CVR22: .BLKB 4                 ;2ND   "    "    "   "\r
+CVR23: .BLKB 4                 ;3RD   "    "    "   "\r
+VROCK3:        .BLKB 2                 ;JMPL FOR PYRM\r
+PYR11: .BLKB 4                 ;COLOR AS ABOVE BUT FOR PYRM\r
+PYR12: .BLKB 4\r
+PYR13: .BLKB 4\r
+VROCK4:        .BLKB 2                 ;JMPL FOR CUBE\r
+VROCK5:        .BLKB 2                 ;ROCKS 4,5,6,7,8 WILL USE ABOVE COLORS\r
+VROCK6:        .BLKB 2\r
+VROCK7:        .BLKB 2\r
+VROCK8:        .BLKB 2\r
+;\r
+;DYNAMIC SAUCER PICS COLOR AND RTSL INSTRUCTIONS\r
+;\r
+SAU11: .BLKB 4\r
+SAU12: .BLKB 4\r
+SAU13: .BLKB 4\r
+;\r
+SPARKB:        .BLKB 20        ;SPARK BUFFER\r
+\fPL0SET=VECRAM+300\r
+PL1SET =VECRAM+30A\r
+CMBSET =VECRAM+314\r
+CMSBSET =VECRAM+342                    ;SPECIAL INVERTED COMB SCORE\r
+;INSIDE OF VGRAM WILL HAVE\r
+;SOME VECTOR CODE THAT WILL BE JSRLD TO\r
+;THE ONLY CRITICAL PAIRING IS HSAREA\r
+;WHICH IMMEDIATELY PRECEDES PL0AREA\r
+;2 FOR HIGH SCORE SET UP 10 FOR DIGITS\r
+;2 FOR GAME SET UP 4 FOR DIGITS\r
+PL0AREA=VECRAM+380\r
+PL1AREA=VECRAM+3C0\r
+CMSBAREA =VECRAM+736\r
+CMBAREA=VECRAM+780\r
+       .=VECRAM+700\r
+SH0XPCOORD:    .BLKB 4*NMXPLPIECES             ;EXPLOSION PICTURE COORDINATES\r
+                                               ;(Y LSB,Y MSB,X LSB,X MSB)\r
+SH1XPCOORD:    .BLKB 4*NMXPLPIECES     ;EXPLOSION PIC COORD\r
+                                       ;(Y LSB, Y MSB, X LSB, X MSB)\r
+...SCAL        =1                      ;DESAULT SCALE\r
+       ..TASS=1/2              ;TEST MACRO\r
+.BRITE =5                      ;VECTOR BRIGHTNESS\r
+.BRITR =.BRITE+2\r
+.SHPSC =1                      ;SHIP SCALING FACTOR\r
+       .RADIX 10\r
+       .=VECROM\r
+\r
+;THE SHIP TABLES COMBINED ARE\r
+;NOT TO BE MORE THAN ONE PAGE\r
+SHIPS:\r
+       .CSECT MULTB\r
+       .RADIX 16\r
+MULTBL:\r
+       MULBLD\r
+       .CSECT EXPIC\r
+EXPPIC:        JSRL    EXP9\r
+       JSRL    EXP10\r
+       JSRL    EXP11\r
+       JSRL    EXP12\r
+       JSRL    EXP13\r
+       JSRL    EXP14\r
+       JSRL    EXP15\r
+       JSRL    EXP16\r
+EXPSP: JSRL EXP9+2             ;SO NO COLOR INCLUDED\r
+       JSRL EXP10+2\r
+       JSRL EXP11+2\r
+       JSRL EXP12+2\r
+       JSRL EXP13+2\r
+       JSRL EXP14+2\r
+       JSRL EXP15+2\r
+       JSRL EXP16+2\r
+       .CSECT ROCKDAT\r
+CKUM4::        .BYTE 089\r
+ROCKA::        .WORD VROCK1,VROCK2,VROCK3,VROCK4\r
+       .WORD VROCK5,VROCK6,VROCK7,VROCK8\r
+RSOURC::\r
+       .IRPC X,<0123>\r
+       JMPL ROCK'X'1\r
+       JMPL ROCK'X'2\r
+       JMPL PYRM'X'1\r
+       JMPL CUBE'X'1           ;(FUTURE CUBE PLACE)\r
+       JMPL STAR'X'1\r
+       JMPL PENT'X'1\r
+       JMPL PLN'X'1\r
+       JMPL HEXA'X'1\r
+       .ENDR\r
+       \r
+ROCKSA::JSRL VROCK1\r
+       JSRL VROCK2\r
+       JSRL VROCK3\r
+       JSRL VROCK4\r
+       JSRL VROCK5\r
+       JSRL VROCK6\r
+       JSRL VROCK7\r
+       JSRL VROCK8\r
+ROCPIC:\r
+;PIC SELECT BITS FOR OBJ BITS 3,4,5 ARE SELECT\r
+       .BYTE 0         ;SPINNERS\r
+       .BYTE 8         ;SPINNERS OPPISITE DIR\r
+       .BYTE 10        ;OCTEHEDREONS\r
+       .BYTE 18        ;CUBES\r
+       .BYTE 28        ;"HAT BOX"\r
+       .BYTE 30        ;"BOOK"\r
+       .BYTE 20        ;STARGON\r
+       .BYTE 38        ;HEXARAHEADON\r
+\f      .SBTTL MAIN LINE LOOP\r
+       .RADIX 16\r
+       .ASECT\r
+       .=4000\r
+CKUM2::        .BYTE 055                       ;CHECKSUM FOR 4000\r
+ATARI: .BYTE 2,0BB,05A,30,5F,0EE,07D,0A8\r
+;COPYRIGHT 1980 ATARI\r
+       JMP POWERON\r
+START: JSR INIT                ;INITIALIZE PLAYER 1 FOR START OF GAME\r
+START1:        JSR NEWAST              ;START UP NEW ASTEROIDS\r
+START2:\r
+\r
+5$:    JSR GTOPTN\r
+       LDA STSTSW              ;CHECK FOR SELF TEST\r
+       AND #STSTBIT\r
+       BNE 6$\r
+       JMP STESTA              ;GO DO SELF TEST\r
+6$:    BIT HALT\r
+       BVC 6$\r
+       JSR ROTAST\r
+8$:    LSR SYNC\r
+       BCC 8$                  ;NOT 1/60 SEC YET\r
+       STA A,WTCHDG\r
+       LDA FRAME               ;MOVE FLASH COLOR POINTER\r
+       AND #0F\r
+       ORA #0E0                ;FULL BRIGHT ON FLASH\r
+       STA FLASHCOL\r
+       LDX #1\r
+9$:    LDA X,ENTER\r
+       BEQ 10$                 ;NO TOUCH\r
+       CLC\r
+       ADC #02\r
+       STA X,ENTER\r
+       BNE 10$                 ;NOT FULLY BACK\r
+       LDA #40                 ;GIVE AN 8 SECOND BONUS...\r
+       JSR LONGTIMER\r
+10$:   DEX\r
+       BPL 9$\r
+       LDA VECRAM+1            ;SWAP BUFFERS AND...\r
+       EOR I,2\r
+       STA VECRAM+1\r
+       STA GOADD               ;GO\r
+11$:   LDA A,VECRAM+1          ;PICK BUFFER TO BUILD IN\r
+       LDX I,VECRAM/100\r
+       AND I,02\r
+       BNE 12$                 ;USE LOWER BUFFER\r
+       LDX I,VECRAM/100+04     ;USE UPPER BUFFER\r
+12$:   LDA I,VECRAM&0FF+2\r
+       STA VGLIST\r
+       STX VGLIST+1            ;RESET VECTOR LIST POINTER\r
+       .SBTTL  ADD SPOT KILLER\r
+       LAL WNDSE9\r
+       LXH WNDSE8              ;SPOT KILLER\r
+       JSR VGADD2\r
+       LDA ATRACT              ;0=ATTRACT\r
+       ORA $$CRDT              ;OR ANY CREDIT\r
+       ORA $CNCT               ;OR ANY COINS\r
+       BNE 14$\r
+       LDA UPDFLG\r
+       AND UPDFLG+1            ;NOT DURING INITIAL ENTRY EITHER\r
+       BPL 14$\r
+       LAL ASTMG9              ;COPYRIGHT MSG\r
+       LXH ASTMG8\r
+       JSR VGADD2\r
+; ADD BONUS MESSAGE\r
+       LDA BONLVA              ;BONUS LEVEL OBTAINED IN 'GTOPTN'\r
+       BEQ  14$\r
+       PHA\r
+       LDA #-36\r
+       LDX #-3E                ;POSITION FOR MESSAGE\r
+       JSR MESGPOS\r
+       LDY #0E\r
+       LDA #BLUE+0E0\r
+       JSR VGMSG4\r
+       PLA\r
+       STA TEMP1+1             ;SAVE BONUS AMOUNT\r
+       LDA #0\r
+       STA TEMP1               ;FOR DISPLAY\r
+       SEC                     ;ZERO SUPRESSION\r
+       LDA #TEMP1              ;PAGE 0 POINTER\r
+       LDY #2                  ;2 ZERO PAGE LOCATIONS\r
+       JSR DIGITS              ;DISPLAY LEVEL\r
+       LDA #0\r
+       JSR VGHEX               ;ADD ANOTHER 0\r
+14$:   JSR CHKST               ;CHECK FOR START\r
+\r
+       BCC 15$\r
+       JMP START               ;BUTTON PUSHED-START OVER\r
+15$:   LDA ATRACT\r
+       BNE 20$\r
+       JSR GETINT              ;GET INITIALS FOR ANY NEW HIGH SCORE\r
+       BCC 55$                 ;NOT DONE YET\r
+       JMP 5$                  ;DONE---RESTART EVERYTHING\r
+55$:   LDA UPDFLG\r
+       AND UPDFLG+1\r
+       BPL 60$\r
+       LDA SHHIGH              ;FORCE DISPLAY OF HIGH SCORES\r
+       BNE 13$\r
+       LDA $$CRDT\r
+       ORA $CNCT               ;ANY COINS OR CREDITS?\r
+       BNE 60$                 ;IF YES...NO TABLE NEEDED\r
+13$:   JSR SCORES              ;DO SCORE TABLE\r
+       BCS 60$                 ;DOING SCORE TABLE\r
+20$:   BIT TOGDRONE\r
+       BMI 30$                 ;NOT DO SHIP 1\r
+       LDX I,1\r
+       JSR FIRE                ;FIRE SHIPS TORPEDOES\r
+30$:   LDX I,0\r
+       JSR FIRE\r
+31$:   LDX I,1\r
+       JSR MOVE                ;MOVE SHIP BY CONTROLS\r
+       LDX I,0\r
+       JSR MOVE\r
+       JSR DOCOMETS\r
+       JSR ONSLAUGHT\r
+       JSR QEND                ;QUICK RESTART\r
+       JSR KLMINES             ;DO KILLER MINES - FALL INTO "ENEMY" ROUTINE\r
+       JSR MOTION              ;MOVE OBJECTS\r
+       JSR DOSHIELD\r
+       JSR COLIDE              ;CHECK FOR COLLISIONS\r
+60$:   JSR ENTPARAMS           ;DISPLAY SCORE AND OTHER PARAMETERS\r
+       JSR HUM                 ;HUM?\r
+       JSR VGCNTR              ;POSITION BEAM FOR MINIMUM CURRENT\r
+       JSR VGHALT              ;ADD HALT TO VECTOR LIST\r
+       JSR SPARK2              ;MOVE THE SPARKS\r
+       JSR FRCALC\r
+       LDA RDELAY\r
+       BEQ 70$                 ;NO DELAY TO DECREMENT\r
+       DEC RDELAY\r
+       BNE 80$\r
+70$:   LDA ATRACT\r
+       IFMI                    ;IF NOT ATRACT\r
+       LDA $CMODE\r
+       AND #03                 ;FREE PLAY??\r
+       IFEQ                    ;YES IF 0\r
+       BIT TWOCMN              ;FREE PLAY AND 2 COIN MIN?\r
+       IFVS                    ;YES\r
+       LDA GAMSEL\r
+       ASL\r
+       ROR LASTGAM             ;DEBOUNCE SWITCH\r
+       IFCS                    ;WAS PRESSED 9 AGO\r
+       IFEQ\r
+       LDA #-10\r
+       STA NROCKS              ;FORCE TO NEXT WAVE\r
+       ENDIF\r
+       ENDIF\r
+       ENDIF\r
+       ENDIF\r
+       ENDIF\r
+       LDA NROCKS\r
+       BMI 75$         ;INCASE IT GOES PAST 0\r
+       BNE 80$                 ;LOOP FOR NEXT PASS\r
+75$:   BIT ATRACT              ;ATTRACT PLAY?\r
+       BMI 76$                 ;NO\r
+       LDA FRAME+1\r
+       AND #03\r
+       CMP #03                 ;ONLY BUMP IF HELD AT 3\r
+       BNE 80$\r
+       INC FRAME+1             ;FORCE TO NEXT STAGE\r
+76$:   JMP START1              ;START NEW SET OF ASTEROIDS\r
+80$:   JMP START2\r
+\f      .SBTTL CHKST-CHECK FOR START/END OF GAME\r
+;CHKST -CHECK FOR START/END OF GAME\r
+;\r
+;EXIT  (C)=SET IF STARTING A NEW GAME\r
+CHKST:\r
+\r
+       .SBTTL CKSWITCHES-CHECK SWITCHES\r
+5$:\r
+       LDA ATRACT\r
+       BEQ 10$                 ;GAME NOT IN PROGRESS\r
+       LDA GENDING\r
+       BNE 6$                  ;STILL ENDING\r
+       JMP CHKST1              ;GAME IN PROGRESS\r
+6$:    INC GENDING\r
+       BEQ 7$                  ;NOT OVER YET\r
+       LDA #0E4\r
+       LDX #04\r
+       JSR MESGPOS             ;POSITION MESSAGE\r
+       LDY I,7                 ;GAME OVER MESSAGE\r
+       STY UPDOWN              ;NORMAL MESSAGE ALWAYS\r
+       JSR VGMSG\r
+       LDA #0\r
+       STA COMTIMER            ;END ONSLAUGHT\r
+       LDA #0FF                ;SHOW HIGH SCORES ONCE\r
+       STA SHHIGH\r
+       CLC                     ;NO NEW GAME\r
+       RTS                     ;(EXIT)\r
+7$:    JSR INISOU              ;TURN OFF SOUNDS\r
+       JSR BIGBANG             ;REMOVE ALL\r
+       LDA UPDFLG\r
+       AND UPDFLG+1\r
+       BMI 65$\r
+       JSR GATES               ;HIGH SCORE SOUND\r
+       LDA #0\r
+       STA SPECEX\r
+\r
+65$:   LDA I,0\r
+       STA ATRACT\r
+       STA RDELAY\r
+       STA SCRFUL              ;ALLOW ROCKS BACK\r
+       STA SDELAY\r
+       STA SDELAY+1\r
+       STA OBSHIP\r
+       STA OBSHIP+1\r
+       CLC\r
+       RTS\r
+       .SBTTL  ATTRACT LOOP CHECKS\r
+10$:   LDA $$CRDT\r
+       ORA $CNCT                       ;NOT IF CREDIT OR COINS\r
+       ORA FRAME                       ;THIS MUST BE 0 TOO\r
+       BNE 3$\r
+       LDA FRAME+1\r
+       AND #<HSBIT*2>-1\r
+       EOR #02\r
+       BNE 3$                  ;MUST ALSO BE 0\r
+       LDY #0\r
+       JSR NXTSTEP             ;STEP TO NEXT GAME\r
+       BEQ 4$\r
+       CMP #2\r
+       BCC 4$\r
+       LDY #80\r
+4$:    STY TOGCOMB\r
+       JSR GTOPTN              ;READ OPTION SWITCHES AND GET LIVES\r
+       LDA #20                 ;MAKE SHIP APPEAR\r
+       STA SDELAY\r
+       STA SDELAY+1\r
+       LDA #80\r
+       STA SCSHSPEED           ;WANT SAUCERS MAD\r
+       STA SCSHSPEED+1\r
+       LDA #0\r
+       STA OBJ+ZSHIP           ;TURN OFF OLD SHIP\r
+       STA OBJ+ZSHIP+1\r
+       STA IANGLE                      ;POINT STRAIGHT UP\r
+       STA IANGLE+1\r
+3$:    LDY $USE                ;STILL DOING COINR ROUTINE?\r
+       BMI 11$                 ;NOPE--NOT IF MINUS\r
+       LDA I,LOCKIN\r
+; LIMIT CREDITS TO TEN\r
+       LDY $$CRDT\r
+       CPY I,18.\r
+       BCC 1$                  ; NOT LIMITED YET\r
+       LDY I,18.\r
+       STY $$CRDT\r
+11$:   LDA I,LOCKOUT\r
+1$:    STA $LOCKCOIL\r
+       LDA SHHIGH\r
+       BEQ 8$\r
+       DEC SHHIGH              ;FORCE DISPLAY OF HIGH SCORES\r
+8$:    LDA I,0                 ;DEFAULT TO SELL PLAYERS\r
+       STA TEMP5\r
+       STA KLMOFF              ;FOR ATRACT\r
+       LDY I,8\r
+;DECIDE IF CHARGING GAMES\r
+;PER CREDIT OR PLAYERS PER CREDIT\r
+       BIT SELLGAME\r
+       BVC 12$                 ;SELLING GAMES????\r
+       DEC TEMP5               ;IF POSITIVE\r
+12$:   INY                     ;CHARGE BY THE PLAYER\r
+       SEI\r
+       STA POTGO+POKEY2\r
+       LDA ALLPOT+POKEY2\r
+       CLI                     ;INTERRUPTS OK NOW\r
+       EOR #02                 ;CORRECT FOR ALL OFF\r
+       STA $CMODE\r
+       AND I,03\r
+       BNE 35$\r
+       LDA #02                 ;FREE PLAY\r
+       STA $$CRDT\r
+       STA $TCMFLF             ;NO 2 COIN MIN\r
+       BNE 15$\r
+35$:   CLC\r
+       ADC I,07\r
+       BIT TEMP5\r
+       BPL 9$\r
+       ADC #0D                 ;COIN MODE MESSAGE\r
+9$:    TAY\r
+       LDA #YELLOW+0C0\r
+       STA TEMP9\r
+80$:   BIT TWOCMN              ;2 COIN MINIUM\r
+       IFVS\r
+       LDA $$CRDT\r
+       IFEQ\r
+       LDA #80\r
+       STA $TCMFLG\r
+       ELSE\r
+       CMP #01\r
+       BNE 82$                 ;EASY WAY OUT\r
+       ENDIF                   ;1 CREDIT IF HERE\r
+       BIT $TCMFLG\r
+       BPL 83$                 ;1 CREDIT, MIMIMUN SATIFIED\r
+       LDA FRAME\r
+       AND #20\r
+       IFEQ\r
+       LDY #12                 ;ALT MESSAGE\r
+       LDA #RED+0C0\r
+       STA TEMP9\r
+       ENDIF\r
+       ELSE\r
+82$:   LDA #0\r
+       STA $TCMFLG             ;DON'T ALLOW THIS TO HAPPEN\r
+83$:   LDA FRAME\r
+       AND #20\r
+       BNE 15$                 ;HERE WE FLASH THE MESSAGE\r
+       ENDIF\r
+81$:   LDA UPDFLG\r
+       AND UPDFLG+1    \r
+       BPL 15$                 ;IF UPDATING INITIALS\r
+       LDA SHHIGH              ;SKIP WHILE HIGH SCORE TBL\r
+       BNE 15$\r
+       TYA\r
+       PHA                     ;SAVE Y FOR LATER\r
+       LDA #0D3\r
+       LDX #49\r
+       JSR MESGPOS\r
+       LDX #0                  ;OFFSET FOR LANGUAGES\r
+       JSR LANGOFF\r
+       LDX TEMP9\r
+       PLA\r
+       TAY                     ;RESTORE Y\r
+       JSR VGMSG3\r
+15$:   LDY $$CRDT\r
+       BNE 16$                 ;NO CREDIT-NO PLAY\r
+       LDY $CNCT               ;ANY COINS???\r
+       BEQ 14$                 ;NOPE--END\r
+       JMP 47$                 ;GO DO GAME DISPLAY\r
+14$:   LDA $LOCKCOIL\r
+       ORA #30                 ;TURN OF LIGHTS\r
+       STA $LOCKCOIL\r
+       CLC\r
+       RTS\r
+16$:   LDA GAMSEL\r
+       ASL\r
+       ROR LASTGAM             ;DEBOUNCE GAME SELECT SWITCH\r
+;\r
+17$:   ;CHECK START BUTTON\r
+       BIT STRTLOK             ;LOCKED OUT (NO SELECT YET)?\r
+       BMI 40$                 ;YEP\r
+       BIT $TCMFLG\r
+       BMI 40$                 ;STARTS LOCKED OUT\r
+;HAVE AT LEAST 1 CREDIT AT THIS POINT\r
+       BIT STRT1                       ;START PUSHED\r
+;\r
+;NOTE: THE GAME SELECT LOGIC WILL NOT ALLOW A\r
+;GAME TO BE SELECTED THAT SUFFICIENT CREDIT IS NOT PRESENT FOR.\r
+;SO ONLY NEED TO DETERMIN HOW MANY CREDITS TO REMOVE\r
+\r
+;\r
+       BVC 40$                 ;NO START\r
+       BIT TEMP5                       ;THIS IS MINUS IF SELLING GAMES\r
+       BMI 20$\r
+       LDA GAME                        ;SELLING PLAYERS......HOW MUCH THIS COST?\r
+       LSR                             ;ODD GAMES ARE 1 PLAYER GAMES\r
+       BCS 20$\r
+       DEC $$CRDT                      ;COST 2 CREDITS...THIS IS 2\r
+20$:   DEC $$CRDT                      ;AND THIS IS ONE!!!!!!\r
+       LDA $LOCKCOIL                   ;TURN ON START LAMP\r
+       AND #0DF\r
+       STA $LOCKCOIL\r
+       LDA #0\r
+       STA STRTLOK                     ;RESET START LOCKOUT FLAG\r
+       STA SPECEX                      ;IN CASE THIS WAS ON\r
+       LDA #0FF\r
+       STA FLSFLG              ;NO NEW HIGH SCORES\r
+       STA FLSFLG+1\r
+       LDA GAME\r
+       STA LASTG               ;SAVE LAST GAME\r
+       JSR GTOPTN              ;SET DIFF LEVEL FOR THIS GAME\r
+       SEC                     ;SIGNIFY STARTING OF NEW GAME\r
+       RTS\r
+       \r
+40$:\r
+;SEE IF NEW GAME SELECTED\r
+       LDA FRAME\r
+       AND #18\r
+       ASL                     ;FLASH RATE\r
+       BIT LASTGAM\r
+       BPL 43$                 ;NOT PRESSED\r
+       BVS 43$                 ;WAS PRESSED LAST TIME\r
+       BIT $TCMFLG             ;HOLDING BECAUSE OF THIS NONSENSE???\r
+       BMI 43$\r
+       BIT STRTLOK             ;WAS THIS FIRST PRESS OF PUTTON????\r
+       BPL 41$                 ;NOPE\r
+       LDA LASTG\r
+       AND #03                 ;JUST IN CASE NOT INITIALIZED\r
+       STA GAME\r
+       JMP 42$\r
+41$:   LDX #0\r
+       STX SHHIGH              ;NO HIGH SCORE\r
+44$:\r
+       JSR NXTSTEP   &nbs