Insert Coin main
authorteamarchive2.fnf.archive.org root <root@teamarchive2.fnf.archive.org>
Fri, 8 Jan 2021 02:30:07 +0000 (02:30 +0000)
committerteamarchive2.fnf.archive.org root <root@teamarchive2.fnf.archive.org>
Fri, 8 Jan 2021 02:30:07 +0000 (02:30 +0000)
21 files changed:
ATTR9.SRC [new file with mode: 0755]
BPS15.SRC [new file with mode: 0755]
DN11.SRC [new file with mode: 0755]
EQ4.SRC [new file with mode: 0755]
ET13.SRC [new file with mode: 0755]
INFORM.SRC [new file with mode: 0755]
LMA12.SRC [new file with mode: 0755]
LOG11.SRC [new file with mode: 0755]
MESS2.SRC [new file with mode: 0755]
RA37.SRC [new file with mode: 0755]
RB37.SRC [new file with mode: 0755]
SAM16.SRC [new file with mode: 0755]
SD51.SRC [new file with mode: 0755]
SPHR56.SRC [new file with mode: 0755]
TEST12.SRC [new file with mode: 0755]
TESTB12.SRC [new file with mode: 0755]
TESTC8.SRC [new file with mode: 0755]
TEXT31.SRC [new file with mode: 0755]
TREK5.SRC [new file with mode: 0755]
TREKC5.SRC [new file with mode: 0755]
YF14.SRC [new file with mode: 0755]

diff --git a/ATTR9.SRC b/ATTR9.SRC
new file mode 100755 (executable)
index 0000000..9fabfd3
--- /dev/null
+++ b/ATTR9.SRC
@@ -0,0 +1,580 @@
+       NLIST
+       INCLUDE SPHR56.SRC
+       INCLUDE EQ4.SRC
+       LIST
+       TTL     <<<<<  S T A R G A T E >>>>>
+       ORG     ATRORG
+* ATTRACT
+*PICKUP MODE
+*
+PICKUP LDA     #$FF
+       STA     STATUS
+       LDA     #$30
+       STA     ATRFLG
+       CLR     .P1LAS  CLEAR SHIP COUNTS
+       CLR     .P2LAS
+       CLR     .P1SBC
+       CLR     .P2SBC
+       CLR     .P1INV
+       CLR     .P2INV
+       JSR     GNCDAV
+       JSR     SCRCLR
+       JSR     CRINIT
+       LDA     #1
+       LDU     CRPROC
+       JSR     DIMV
+       LDX     #0
+       JSR     SCINIT
+       LDA     #DEFMES
+       JSR     WRD5V
+       LDA     #1
+       JSR     SGSTV
+       LDD     #$3000  ADJUST COORDS
+       STD     OX16,X
+       LDA     #$80
+       STA     OY16,X
+       LDD     #KILLNO
+       STD     OCVECT,X
+       CLR     ATRSW2
+       CLR     ATRSW3
+       JSR     PHSTV   PHONY LANDER START
+       LDA     #$80
+       STA     STATUS
+       LDA     #2
+       LDU     CRPROC
+       JSR     BRTV
+       JSR     ONCOLV
+       LDD     #$0200  NOW THRUST INTO GATE
+       STD     ATRSW2
+       NAP     $60,PH1 WAIT FOR COLLISION
+PH1    LDA     #$FF
+       STA     STATUS
+       LDB     #28
+       JSR     NITRV
+       LDA     #2
+       LDU     CRPROC
+       JSR     DIMV
+       JSR     SCLR1   CLEAR IT
+       JSR     PLINV   REINIT PLAYER
+       LDX     #$8000
+       STX     BGL
+       STX     BGLX
+       JSR     BGINIT
+       CLR     ATRSW2
+       LDA     #$80
+       STA     STATUS
+       LDU     CRPROC
+       JSR     SCNR
+       LDA     #2
+       LDU     CRPROC
+       JSR     BRTV    ON AGAIN
+       CLR     MANCTR
+       LDA     #$14
+       STA     LNDCNT
+       LDX     #PHSTAB GET COMMANDS
+       STX     PD,U
+PHS1   LDX     PD,U
+PHS1A  LDD     ,X++
+       BEQ     PH8     ALL OVER
+       CMPA    #$FF    CHECKPOINT
+       BNE     PHS1B
+       LDA     LNDCNT
+       LDB     MANCTR
+       LEAX    1,X
+       CMPD    -2,X
+       BNE     PH8     ERROR
+       BRA     PHS1A
+PHS1B  STX     PD,U
+       PSHS    D
+       BITB    #$20
+       BEQ     PHS2
+       NEWP    LFIRE,LTYPE
+       LDD     0,S
+PHS2   BITB    #$10
+       BEQ     PHS3
+       MAKP    REV
+       LDD     0,S
+PHS3   ANDB    #$1
+       STB     ATRSW3
+       PULS    D
+       ANDB    #$82
+       STB     ATRSW2
+       LDX     #PHS1
+       JMP     SLEEP
+PH8    BRA     FIGHT
+*
+*PHONY CATCH COMMANDS
+*B7=DOWN,B5=LASER,B4=REV,B1=THRUST,B0=UP
+*FF=CKPNT--LNDCNT,MANCTR
+PHSTAB FCB     $30,$02
+       FCB     $0C,$A2
+       FCB     $FF,$13,$00
+       FCB     $05,$82
+       FCB     $18,$00
+       FCB     $FF,$13,$01
+       FCB     $20,$01
+       FCB     $0C,$A2
+       FCB     $FF,$12,$01
+       FCB     $18,$02
+       FCB     $FF,$12,$02
+       FCB     $1A,$01
+       FCB     $0D,$A2
+       FCB     $FF,$11,$02
+       FCB     $1C,$02
+       FCB     $FF,$11,$03
+       FCB     $1A,$01
+       FCB     $07,$22
+       FCB     $FF,$10,$03
+       FCB     $19,$02
+       FCB     $2C,$92
+       FCB     $28,$02
+       FCB     $1C,$12
+       FCB     $FF,$10,$04
+       FCB     $09,$01
+       FCB     $98,$02
+       FCB     $00,$00
+       RMB     20
+*
+*FIGHTING MODE
+*PD,U=TABLE PTR
+*PD2,U=TIMER
+FIGHT  LDX     #FITAB
+       STX     PD,U
+       LDA     #$FF
+       STA     STATUS
+       JSR     GNCDAV  KILL EVERYBODY
+       LDA     #3
+       JSR     DIMV    COOL THE LITES
+FITST  LDY     PD,U
+       LDX     ,Y++    GET BGL
+       CMPX    #$FFFF  OVER??
+       LBEQ    ENEMY   ONTO NEXT THING
+       PSHS    U,Y
+       JSR     SCINIT  ONB SETUP
+       CLR     ATRSW2
+       CLR     ATRSW3
+       LDX     #ECNTS  CLEAR ENEMY COUNTS
+FITSS1 CLR     ,X+
+       CMPX    #ECEND
+       BNE     FITSS1
+       LDA     #1
+       STA     CURPLR
+       JSR     PLINDX  GET PLAYER X
+       STX     PLRX
+       LDA     #2      WAVE 2 PARAMS
+       STA     PWAV,X
+       JSR     GETW0V
+       JSR     PTRANV
+       JSR     RAND    RANDOMY
+       ANDA    #$3F
+       ADDA    #-$20
+       ADDA    PLAY16
+       STA     PLAY16
+       STA     PLAYC
+       STA     NPLAYC
+       LDA     LSEED   RANDOM X
+       ANDA    #$3F
+       ADDA    #-$20
+       ADDA    #$50
+       STA     PLAXC
+       STA     NPLAXC
+       STA     PLAX16
+       LDA     HSEED
+       BMI     FITST0
+       LDD     NPLAD
+       COMA
+       COMB
+       ADDD    #1
+       STD     NPLAD
+       STD     PLADIR
+FITST0 LDA     #$80
+       STA     STATUS
+       PULS    U,Y
+       LDA     ,Y+     GET ENEMY #
+       PSHS    U,Y
+       JSR     [,Y]    GO START EM UP
+       PULS    U,Y
+       LEAY    2,Y
+       LDA     ,Y+     OUTPUT MESSAGE #
+       LDX     ,Y++    MESSAGE ADDR
+       STY     PD,U
+       JSR     WRD5V
+       LDA     #3
+       JSR     BRTV    ON LITES
+       JSR     ONCOLV
+       LDU     CRPROC
+       LDD     #$300
+       STD     PD2,U
+       LDA     #1
+       STA     PD4,U   UP/DOWN TIMER
+       STA     PD5,U   ACCEL TIMER
+       LDA     SEED
+       LSRA
+       STA     PD6,U   REV TIMER
+FITLP  LDX     PD2,U   FIGHT TIME-OUT CHECK
+       LDA     #16
+       STA     STRCNT  KEEP THE STARS GOING
+       LEAX    -1,X
+       STX     PD2,U
+       LBEQ    FDTIM
+       LDA     STATUS  CHECK DEATH
+       CMPA    #$DA
+       LBEQ    FDIE    WE HAVE DIED
+       LDA     PLAY16  Y OUT OF RANGE??
+       CMPA    #$48
+       BLS     FIT1A
+       CMPA    #$C0
+       BHS     FIT1AA
+       DEC     PD4,U   UP/DOWN TIMER
+       BEQ     FIT1B
+       JSR     RAND    MAKE A MOVE??
+       CMPA    #$FC
+       BLO     FIT2    NO
+       JSR     RAND
+       LSRA
+       BCS     FIT1A
+FIT1AA LDD     #$0001  UP
+       BRA     FIT1X
+FIT1A  LDD     #$8000  DOWN
+       BRA     FIT1X
+FIT1B  LDD     #$0000  LEVEL
+FIT1X  STB     ATRSW3
+       LDB     ATRSW2
+       ANDB    #$2
+       STB     ATRSW2
+       ORA     ATRSW2
+       STA     ATRSW2
+       JSR     RAND
+       LSRA
+       LSRA
+       NOP
+       STA     PD4,U
+FIT2   DEC     PD5,U   ACCEL CHANGE??
+       BNE     FIT3    NO
+       JSR     RAND
+       LDB     ATRSW2
+       CMPA    #$80
+       BHI     FIT2A
+       ORB     #2
+       BRA     FIT2X
+FIT2A  ANDB    #$FD
+FIT2X  STB     ATRSW2
+       LDA     SEED
+       LSRA
+       LSRA
+       STA     PD5,U
+FIT3   JSR     RAND    LASER ???
+       CMPA    #$0C
+       BHI     FIT4
+       NEWP    LFIRE,LTYPE
+FIT4   DEC     PD6,U   REV???
+       BNE     FITX
+       MAKP    REV
+       LDA     SEED
+       ORA     #$10
+       STA     PD6,U
+FITX   NAP     1,FITLP
+*TIME OUT
+FDTIM  JSR     GNCDAV
+       LDA     #$8     PLAYER IS DEAD, NO COLLISIONS WITH PROCESSES DEAD
+       ORA     STATUS
+       STA     STATUS
+       LDA     #2
+       JSR     DIMV
+       LDA     #$FF
+       STA     STATUS
+       JMP     FITST
+*DEAD
+FDIE   MAKP    DIEDIE
+       NAP     $6C,FDTIM
+*START OVER AGAIN
+FIGHTX LDX     #FITAB
+       STX     PD,U
+       JMP     FITST
+*DYING PROCESS
+DIEDIE LDX     NPLAXC
+       JSR     PXVCT   BLOW HIM
+       JMP     SUCIDE
+*
+*FIGHT TABLE
+*BGL,ENEMY#,ENEMY START ROUTINE,MESS#,MESS ADDR
+*
+*FIREBOMBERS
+FITAB  FDB     $B000   BGL
+       FCB     8       #
+       FDB     FBSTRT  START ROUTINE
+       FCB     FBAM    MESS #
+       FDB     $3227   MESS UPPER LEFT
+*YLLABIANS
+       FDB     $8000
+       FCB     20
+       FDB     YLST
+       FCB     YLAM
+       FDB     $3627
+*DYNAMOS
+       FDB     $8000
+       FCB     10
+       FDB     DYNSTV
+       FCB     DYNAM
+       FDB     $3327
+*MUNCHIES
+       FDB     0
+       FCB     0
+       FDB     MCHST
+       FCB     MCHAM
+       FDB     $2D27
+*END
+       FDB     $FFFF
+*
+*ON SCANNER,TERRAIN,SCORES,STARS
+*X=BGL
+SCINIT PSHS    X,U,D,Y
+       LDA     #$FF
+       STA     STATUS
+       JSR     SCRCLR
+       LDA     #$66
+       STA     SCNCOL
+       JSR     TDISP
+       LDX     #MESSUL
+       LDD     #$4005
+       JSR     BLKCLR  CLEAR OUT MESSAGE AREA
+       JSR     OINIT
+       LDD     2,S     GET X
+       STD     BGL
+       STD     BGLX
+       JSR     BGINIT
+       JSR     STINIT
+       JSR     FISS
+       JSR     THINIT
+       JSR     PLINV   INIT PLAYER STUFF
+       JSR     SCLEAN  CLEAN UP SAM
+       MAKP    SCPROC
+       PULS    X,U,D,Y,PC
+*
+*START MUNCHIES
+*
+MCHST  LDA     #$18
+       STA     BMSTIM  MUNCHY MULTIPLICATION
+       MAKP    MCHS
+       RTS
+MCHS   JSR     BMSTV
+       NAP     50,MCHS
+*
+*ENEMIES PAGE
+*
+ENEMY  JSR     SCRCLR
+       JSR     CRINIT
+       JSR     SCLEAN
+       JSR     OINIT
+       JSR     ONCOLV
+       CLRA
+       CLRB
+       STD     BGL
+       STD     BGLX
+       LDA     #$DB
+       STA     STATUS
+       LDU     CRPROC
+       LDX     #EMTAB  ENEMIES
+       STX     PD,U
+ENEMY1 LDY     PD,U
+       LDD     ,Y
+       BEQ     ENEMY2
+       JSR     GETEM
+       STY     PD,U
+       NAP     8,ENEMY1
+ENEMY2 NAP     01,ENEM2A
+ENEM2A LDX     #EMESTB MESSAGES
+       STX     PD,U
+ENEM3A LDY     PD,U
+       LDA     ,Y+
+       BEQ     ENEM4
+       LDX     ,Y++
+       STY     PD,U
+       JSR     WRD5FV
+       NAP     4,ENEM3A
+ENEM4  LDA     #30
+       STA     PD2,U
+ENM4AA CLR     PD3,U   FLAVOR
+       LDX     #$2F76  REFRESH CURSOR
+       STX     PD4,U
+       LDX     #SGRTAB
+       STX     PD6,U
+ENEM4A LDX     #EMESTB REFRESH MESSAGES
+       STX     PD,U
+       DEC     PD2,U
+       LBEQ    HALVCT  OVER...
+ENEM4B LDY     PD,U
+       LDA     ,Y+
+       CMPA    #SGAM
+       BEQ     ENEM4A
+       LDX     ,Y++
+       STY     PD,U
+       JSR     WRD5FV
+       NAP     $4,ENEM4C
+ENEM4C LDA     PD3,U
+       STA     TXFLAV
+       LDX     PD4,U
+       LDY     PD6,U
+       CMPY    #SGRTE
+       BEQ     ENM4AA
+       LDA     ,Y+
+       LDB     #$AA
+       STB     TEXCOL
+       JSR     PR57V
+       LDA     TXFLAV
+       STA     PD3,U
+       STX     PD4,U
+       STY     PD6,U
+       NAP     2,ENEM4B
+*REFRESH TABLE
+SGRTAB FCC     'STARGATE   ENEMIES'
+SGRTE  EQU     *
+*
+*GET ENEMY SUBROUTINE
+*Y=TABLE: OPICT(2),#ANIMS(1),DELAY(1),SCRN ADDR(2)
+*
+GETEM  PSHS    X,U
+       MAKP    ANA
+       TFR     X,U
+       JSR     GETOB
+       LDD     [,Y++]
+       STD     OPICT,X
+       STD     PD2,U
+       STX     PD,U
+       LDD     ,Y++
+       STD     PD4,U
+       CLR     PD6,U
+       CLRA
+       CLRB
+       STD     OXV,X
+       STD     OYV,X
+       LDD     ,Y++
+       STB     OY16,X
+       CLR     OY16+1,X
+       CLRB
+       LSRA
+       RORB
+       LSRA
+       RORB
+       STD     OX16,X
+       LDA     #1
+       STA     OTYP,X  NON HYPER
+       JSR     APVCT
+       PULS    X,U,PC
+*
+*ANIMATION ROUTINE
+*PD=OBJ,PD2=PICT,PD4=ANI#,PD5=TIME/FRAME,PD6=CURRENT#
+*
+ANA    LDA     PD4,U
+       CMPA    #1
+       LBEQ    SUCIDE  DIE NO ANIMATION
+ANA0   LDX     PD,U
+       LDD     OPICT,X
+       CMPD    #NULOB
+       BEQ     ANASLP
+       LDA     PD6,U
+       INCA
+       CMPA    PD4,U
+       BLO     ANA1
+       CLRA
+ANA1   STA     PD6,U
+       LDB     #OBJL
+       MUL
+       LDY     PD2,U
+       LEAY    D,Y
+       STY     OPICT,X
+ANASLP LDA     PD5,U
+       LDX     #ANA0
+       JMP     SLEEP
+*
+*ENEMIES
+*OPICT(2),ANIM#(1),RATE(1),ADDR(2)
+*
+EMTAB  FDB     PRBP1V
+       FCB     1,0
+       FDB     $6696
+*
+       FDB     YLPV
+       FCB     5,8
+       FDB     $1D4A
+*
+       FDB     LNDPV
+       FCB     4,3
+       FDB     $6848
+*
+       FDB     TIEP1V
+       FCB     4,8
+       FDB     $1372
+*
+       FDB     PHRDPV
+       FCB     3,8
+       FDB     $47BA
+*
+       FDB     SCZP1V
+       FCB     1,0
+       FDB     $7D70
+*
+       FDB     FBMBPV
+       FCB     4,1
+       FDB     $3C3C
+*
+       FDB     DYNPV
+       FCB     4,2
+       FDB     $1294
+*
+       FDB     BAITPV
+       FCB     7,2
+       FDB     $7E4A
+*
+       FDB     FBALPV
+       FCB     8,2
+       FDB     $563C
+*
+       FDB     HUMPV
+       FCB     2,4
+       FDB     $2C98
+*
+       FDB     SWP1V
+       FCB     1,0
+       FDB     $7C9A
+*
+       FDB     BREDPV
+       FCB     3,8
+       FDB     $36BA
+*
+       FDB     MCHGPV
+       FCB     3,8
+       FDB     $5DBC
+*
+       FDB     0
+SWP1V  FDB     SWPIC1
+SCZP1V FDB     SCZP1
+PRBP1V FDB     PRBP1
+TIEP1V FDB     TIEP1
+*
+*ENEMY MESSAGES
+*MESS#(1),SCREEN ADDR(2)
+*
+EMESTB FCB     YLAM
+       FDB     $0C58
+       FCB     LNDAM
+       FDB     $6058
+       FCB     BMBAM
+       FDB     $0C7E
+       FCB     MCHAM
+       FDB     $2DC8
+       FCB     MUTAM
+       FDB     $767E
+       FCB     FBAM
+       FDB     $3030
+       FCB     PODAM
+       FDB     $60A2
+       FCB     DYNAM
+       FDB     $0CA2
+       FCB     BTAM
+       FDB     $7858
+       FCB     SGAM
+       FDB     $2F78
+       FCB     0
+
+       END
diff --git a/BPS15.SRC b/BPS15.SRC
new file mode 100755 (executable)
index 0000000..4baf4f7
--- /dev/null
+++ b/BPS15.SRC
@@ -0,0 +1,1106 @@
+       NLIST
+       INCLUDE SPHR56.SRC
+       INCLUDE EQ4.SRC
+       LIST
+       TTL     <<<<<  S T A R G A T E  >>>>>
+       ORG     BPSORG
+       JMP     UFOST$
+       JMP     PRBST$
+       JMP     MMSW$
+       JMP     RIPST
+       JMP     MPROB$
+       JMP     BMST
+       FDB     UFNP1
+       FDB     BMRP0
+       FDB     BMSP0
+       FDB     MCHYP0
+       FDB     MCHRP0
+       FDB     MCHGP0
+*
+*UFO PROCESS START
+*PD=OBJECT,PD2=SHOT TIMER,PD5=18 FRAME (3 X 6) VELOCITY DIVIDER
+*PD4 COUNTS NUMBER OF ITERS LEFT IN IMAGE LOOP
+UFOST$ LDA     SEED    START BAITER MASTER????
+       CMPA    #$C0
+       LBLS    BMST
+       MKPROB  UFOLP,UFNP1,UFOKIL,$3333
+       BEQ     UFOSTX
+       INC     UFOCNT
+       LDA     #3      INITIALIZE VELOCITY DIVIDER
+       STA     PD5,U
+       LDD     SEED
+       ANDA    #$1F
+       ADDD    BGL
+       STD     OX16,X
+       LSRB
+       ADDB    #YMIN
+       STB     OY16,X
+       LDA     #8
+       STA     PD2,U   INIT SHOT TIMER
+       BSR     UFONV0
+       JMP     APVCT
+UFOSTX RTS
+*UFO PROCESS
+UFOLP  LDX     PD,U
+       LDD     OPICT,X
+       CMPD    #NULOB
+       BEQ     UFO4
+       DEC     PD2,U
+       BNE     UFO1
+       LDA     UFSTIM
+       JSR     RMAX
+       STA     PD2,U
+       JSR     SHOOTV
+       BEQ     UFO1
+       LDD     #USHSND
+       JSR     SNDLD
+UFO1   DEC     PD5,U   CALL VELOCITY SUBROUTINE ONLY ON 1 OF 3 TRIPS (18 FR)
+       BNE     UFO2    NOT THIS TIME
+       LDA     #3      RESET DIVIDER
+       STA     PD5,U
+       BSR     UFONV   AND DO THE VELOCITY NUMBER
+UFO2   LDD     OBJX,X  SEE IF ON SCREEN
+       BEQ     UFO4    THEN TAKE A VERY LONG SNOOZE
+       LDA     #6
+       STA     PD4,U
+UFO5   NAP     1,UFO3  SHORT NAP TILL NEXT IMAGE UPDATE
+UFO3   LDX     PD,U    GET IMAGE       
+       BSR     UFOPIC  AND DO THE IMAGE NUMBER
+       DEC     PD4,U
+       BNE     UFO5    1 MORE ITERATION
+       BRA     UFOLP
+UFO4   NAP     6,UFOLP
+*
+UFOPIC LDY     OPICT,X GET CURRENT IMAGE
+       LEAY    OBJL,Y  PUSH TO NEXT
+       CMPY    #UFNP7  PAST LAST??
+       BLS     UFOPL1  NOPE
+       LDY     #UFNP1  THEN PUT FIRST IN
+UFOPL1 STY     OPICT,X AND SET IN PLACE
+       RTS             KAY.BYE
+*
+*UFO VELOCITY
+*
+UFONV  LDA     SEED
+       CMPA    UFOSK
+       BLS     UFONVX
+UFONV0 LDD     #$4001
+       STD     XTEMP
+       LDD     OX16,X
+       SUBD    PLABX
+       BMI     UFONV1
+       NEG     XTEMP
+UFONV1 ADDD    #20*32  X CLOSE?
+       CMPD    #40*32
+       BLS     UFONV3  YES, DONT SEEK
+       LDB     XTEMP
+       SEX
+       ADDD    PLAXV
+       STD     OXV,X
+UFONV3 LDA     OY16,X
+       SUBA    PLAYC
+       BMI     UFONV4
+       NEG     XTEMP+1
+UFONV4 ADDA    #10
+       CMPA    #20     Y CLOSE?
+       BLS     UFONVX  YES, QUIT
+       CLRB
+       LDA     XTEMP+1
+       ADDD    PLAYV
+       ASRA    DIVIDE  BY 2
+       RORB
+       STD     OYV,X
+UFONVX RTS
+*UFOKILL
+UFOKIL DEC     UFOCNT
+       KILP    0120,UFHSND
+       RTS
+*
+*MAKE A PROCESS+OBJECT
+*RET=PROCESS,RET+2=OBJECT PICT,RET+4=COLL VECTOR,RET+6=BLIP
+*U RETURNED WITH PROCESS, X=OBJECT
+*X-PD,U;0-OXV,X OYV,X
+*RET EQ IF NOTHING LEFT
+MPROB$ PSHS    D,Y
+       LDX     OFREE
+       BEQ     MPRER   NONE LEFT
+       LDX     FREE
+       BEQ     MPRER
+       CLRA
+       LDU     4,S
+       PULU    X
+       JSR     MKPROC
+       LEAY    ,X
+       JSR     GETOB
+       PULU    D
+       STD     OPICT,X
+       PULU    D
+       STD     OCVECT,X
+       PULU    D
+       STD     OBJCOL,X
+       STU     4,S     NEW RET ADDR
+       LEAU    ,Y
+       STU     OBJID,X
+       STX     PD,U
+       CLRA
+       CLRB
+       STD     OYV,X
+       STD     OXV,X
+       LDA     #1
+       PULS    D,Y,PC
+MPRER  LDU     4,S     CLEAN UP STACK
+       LEAU    8,U
+       STU     4,S
+       CLRA            RETURN EQ, NONE LEFT
+       PULS    D,Y,PC
+*
+*START BAITER MASTER
+*PD=OBJ,PD2=IMAGE#,PD4=BASE IMAGE TABLE,PD6=SHOT TIMER
+*
+BMST   MKPROB  BM,BMRP0,BMKIL,$3333
+       BEQ     BMSTX
+       INC     BMCNT
+       CLR     PD2,U
+       LDD     SEED
+       ANDA    #$1F
+       ADDD    BGL
+       STD     OX16,X  INIT X
+       LSRB
+       ADDB    #YMIN
+       STB     OY16,X
+       LDA     BMSTIM
+       JSR     RMAX
+       STA     PD6,U
+       LDY     #BMPT1
+       LDA     SEED
+       ANDA    #3      CHOOSE BM TYPE
+       BNE     BMST1   *******************************BSO BONER
+       FCB     $31,$A9,$00,$0C ((LEAY  BMPT2-BMPT1,Y))*********
+BMST1  STY     PD4,U   BASE IMAGE TABLE***************BSO BONER
+       BSR     BMNV0
+       JSR     MCHPIC  GET IMAGE
+       JMP     APVCT
+BMSTX  RTS
+*
+*BAITER MASTER PROCESS
+*PD=OBJ,PD2=IMAGE#,PD4=BASE IMAGE TABLE,PD6=SHOT TIMER
+*
+BM     LDX     PD,U
+       LDD     OPICT,X
+       CMPD    #NULOB  APPEARING?
+       BEQ     BMX
+       LDA     #-1
+       LDB     PLAYC
+       SUBB    OY16,X
+       ADDB    #20
+       CMPB    #10
+       BHS     BM1
+       LDA     #-4     4X FASTER WHEN CLOSE IN Y
+BM1    ADDA    PD6,U
+       CMPA    #$FC
+       BLO     BM2
+       JSR     BMSHT
+       LDA     BMSTIM
+       LDY     PD4,U
+       CMPY    #BMPT2
+       BNE     BM1A
+       LSRA    MORE    SHOTS FOR RED GUYS
+BM1A   JSR     RMAX
+BM2    STA     PD6,U
+       BSR     BMNV    GET VEL+PICT
+       JSR     MCHPIC
+BMX    NAP     6,BM
+*
+*GET BM NEW VELOCITY
+*
+BMNV   LDA     SEED    SMART OR DUMB
+       CMPA    BMSK
+       BLS     BMNV5
+BMNV0  LDD     #$2001
+       STD     XTEMP
+       LDD     OX16,X
+       SUBD    PLABX
+       BMI     BMNV1
+       NEG     XTEMP
+BMNV1  ADDD    #20*32  TOO CLOSE
+       CMPD    #40*32
+       BLS     BMNV2   YIP
+       LDB     XTEMP
+       SEX
+       ADDD    PLAXV
+       STD     OXV,X
+BMNV2  LDA     OY16,X
+       SUBA    PLAYC
+       SUBA    #4
+       BMI     BMNV3
+       NEG     XTEMP+1
+BMNV3  ADDA    #10
+       CMPA    #20
+       BLS     BMNV5   TOO CLOSE
+       LDA     XTEMP+1
+       ADDD    PLAYV
+       ASRA
+       RORB
+       STD     OYV,X
+BMNV5  RTS
+*
+*BAITER MASTER SHOOTING
+*
+BMSHT  PSHS    X,U,D,Y
+       LDA     OX16,X
+       SUBA    BGL
+       CMPA    #$26
+       BHI     BMSHTX  NO
+       LDA     MCHCNT
+       CMPA    #12
+       BHS     BMSHTX
+       LEAY    ,X
+       MKPROB  MCH,MCHP1,MCHKIL,$3300  LAUNCH A BUTTFACE
+       BEQ     BMSHTX  NOBODY HOME
+       INC     MCHCNT
+       LDD     #BMSSND
+       JSR     SNDLD
+       CLR     PD2,U
+       LDA     SEED
+       ANDA    #3
+       BEQ     BMSHT1
+       DECA
+BMSHT1 LDB     #MCHPT2-MCHPT1
+       MUL
+       ADDD    #MCHPT1
+       STD     PD4,U   BASE PICT TABLE
+       LDB     #$40    INIT XV
+       JSR     RMAX
+       LDA     OX16,Y
+       CMPA    PLABX
+       BMI     BMSHT2
+       NEGB
+BMSHT2 SEX
+       ADDD    PLAXV
+       STD     OXV,X
+       LDA     MCHSLP
+       LSRA
+       JSR     RMAX
+       STA     PD3,U
+       JSR     RAND
+       LDB     HSEED
+       SEX
+       STD     OYV,X
+       LDD     OX16,Y
+       STD     OX16,X
+       LDD     OY16,Y
+       STD     OY16,X
+       JSR     MCHPIC  PICTURE
+       STX     OPTR
+BMSHTX PULS    X,U,D,Y,PC
+*
+*KILL A MUNCHY-POOH
+*
+MCHKIL DEC     MCHCNT
+       KILP    0050,MCKSND
+       RTS
+*
+*KILL BAITER MASTER
+*
+BMKIL  DEC     BMCNT
+BMKX   KILP    0120,BMKSND
+       RTS
+BMSSND FCB     $D0,$01,$10,$18,0 BM SHOOT SND
+BMKSND FCB     $D0,$01,$0C,$01,$1,$08,$17,0 BM KILL
+MCKSND FCB     $D0,$01,$0C,$1A,$1,$08,$17,0 MUNCHY KILL
+*
+*MUNCHIES
+*PD=OBJECT,PD2=IMAGE#,PD3=SLEEP TIME,PD4=BASE IMAGE TABLE
+*
+MCH    LDX     PD,U    GET OBJ
+       DEC     PD3,U
+       BNE     MCH10
+       LDB     MCHXV   CALC VEL LIMITS
+       CLRA
+       PSHS    D
+       NEGB
+       SEX
+       PSHS    D
+       LDA     MCHYV
+       CLRB
+       PSHS    D
+       NEGA
+       PSHS    D
+*VEL LIMITS 0,S =-YV; 2,S =YV; 4,S =-XV; 6,S =XV
+       LDD     HSEED
+       ANDA    #1
+       ADDD    PLABX
+       SUBD    OX16,X
+       STD     XTEMP   DELTA X
+       LDD     SEED
+       ANDA    #7
+       ADDD    PLAY16
+       SUBD    OY16,X
+       STD     XTEMP2
+MCHVLP ASR     XTEMP
+       ROR     XTEMP+1
+       ASR     XTEMP2
+       ROR     XTEMP2+1
+       LDD     XTEMP
+       BPL     MCHV1
+       CMPD    4,S
+       BLT     MCHVLP
+       BRA     MCHV2
+MCHV1  CMPD    6,S
+       BHI     MCHVLP
+MCHV2  LDD     XTEMP2
+       BPL     MCHV3
+       CMPD    ,S
+       BLT     MCHVLP
+       BRA     MCHVX
+MCHV3  CMPD    2,S
+       BHI     MCHVLP
+MCHVX  LEAS    8,S     CLEAR STACK
+       STD     OYV,X
+       LDD     XTEMP
+       ADDD    PLAXV
+       STD     OXV,X
+       LDA     MCHSLP  NEW SLEEP TIME
+       JSR     RMAX
+       STA     PD3,U
+MCH10  BSR     MCHPIC
+       NAP     6,MCH
+*
+*GET MUNCHY PICTURE
+*X=OBJ,U=PROCESS
+*PD2=IMAGE#,PD4=BASE IMAGE
+MCHPIC PSHS    D,Y
+       LDA     PD2,U   GET IMAGE #
+       INCA
+       LDB     OXV,X
+       BMI     MCHP1   CHECK DIR
+       CMPA    #2
+       BLS     MCHP2
+       CLRA
+       BRA     MCHP2
+MCHP1  CMPA    #5
+       BHI     MCHP11
+MCHP10 CMPA    #3
+       BHS     MCHP2
+MCHP11 LDA     #3
+MCHP2  STA     PD2,U
+       LDY     PD4,U
+       ASLA
+       LDD     A,Y
+       STD     OPICT,X
+       PULS    D,Y,PC
+*BAITER MASTER PICTURE TABLES
+BMPT1  FDB     BMRP0,BMRP1,BMRP2,BMRP0,BMRP3,BMRP4     ROUND BM
+BMPT2  FDB     BMSP0,BMSP1,BMSP2,BMSP0,BMSP3,BMSP4     SQUARE BM
+*MUNCHY PICT TABLES
+MCHPT1 FDB     MCHGP0,MCHGP1,MCHGP2,MCHGP0,MCHGP3,MCHGP4 GREEN
+MCHPT2 FDB     MCHRP0,MCHRP1,MCHRP2,MCHRP0,MCHRP3,MCHRP4 RED
+MCHPT3 FDB     MCHYP0,MCHYP1,MCHYP2,MCHYP0,MCHYP3,MCHYP4 YELLOW
+*
+*MUNCHY PICTS
+*YELLOW MUNCHY
+MCHYP0 FCB     3,5
+       FDB     MCYD00,MCYD01,ON35,OFF35
+MCHYP1 FCB     3,5
+       FDB     MCYD10,MCYD11,ON35,OFF35
+MCHYP2 FCB     3,5
+       FDB     MCYD20,MCYD21,ON35,OFF35
+MCHYP3 FCB     3,5
+       FDB     MCYD30,MCYD31,ON35,OFF35
+MCHYP4 FCB     3,5
+       FDB     MCYD40,MCYD41,ON35,OFF35
+MCYD00 FCB     $44,$44,$44,$44,$44
+       FCB     $44,$44,$44,$44,$44
+       FCB     $40,$40,$40,$40,$40
+MCYD10 FCB     $44,$44,$44,$44,$44
+       FCB     $44,$00,$00,$00,$44
+       FCB     $40,$00,$00,$00,$40
+MCYD20 FCB     $44,$44,$44,$44,$44
+       FCB     $44,$44,$00,$44,$44
+       FCB     $40,$40,$00,$40,$40
+MCYD30 FCB     $44,$00,$00,$00,$44
+       FCB     $44,$04,$04,$04,$44
+       FCB     $40,$40,$40,$40,$40
+MCYD40 FCB     $44,$44,$00,$44,$44
+       FCB     $44,$44,$04,$44,$44
+       FCB     $40,$40,$40,$40,$40
+MCYD01 FCB     $04,$04,$04,$04,$04
+       FCB     $44,$44,$44,$44,$44
+       FCB     $44,$44,$44,$44,$44
+MCYD11 FCB     $04,$04,$04,$04,$04
+       FCB     $44,$40,$40,$40,$44
+       FCB     $44,$00,$00,$00,$44
+MCYD21 FCB     $04,$04,$04,$04,$04
+       FCB     $44,$44,$40,$44,$44
+       FCB     $44,$44,$00,$44,$44
+MCYD31 FCB     $04,$00,$00,$00,$04
+       FCB     $44,$00,$00,$00,$44
+       FCB     $44,$44,$44,$44,$44
+MCYD41 FCB     $04,$04,$00,$04,$04
+       FCB     $44,$44,$00,$44,$44
+       FCB     $44,$44,$44,$44,$44
+*RED MUNCHY
+MCHRP0 FCB     3,5
+       FDB     MCRD00,MCRD01,ON35,OFF35
+MCHRP1 FCB     3,5
+       FDB     MCRD10,MCRD11,ON35,OFF35
+MCHRP2 FCB     3,5
+       FDB     MCRD20,MCRD21,ON35,OFF35
+MCHRP3 FCB     3,5
+       FDB     MCRD30,MCRD31,ON35,OFF35
+MCHRP4 FCB     3,5
+       FDB     MCRD40,MCRD41,ON35,OFF35
+MCRD00 FCB     $22,$22,$22,$22,$22
+       FCB     $22,$22,$22,$22,$22
+       FCB     $20,$20,$20,$20,$20
+MCRD10 FCB     $22,$22,$22,$22,$22
+       FCB     $22,$00,$00,$00,$22
+       FCB     $20,$00,$00,$00,$20
+MCRD20 FCB     $22,$22,$22,$22,$22
+       FCB     $22,$22,$00,$22,$22
+       FCB     $20,$20,$00,$20,$20
+MCRD30 FCB     $22,$00,$00,$00,$22
+       FCB     $22,$02,$02,$02,$22
+       FCB     $20,$20,$20,$20,$20
+MCRD40 FCB     $22,$22,$00,$22,$22
+       FCB     $22,$22,$02,$22,$22
+       FCB     $20,$20,$20,$20,$20
+MCRD01 FCB     $02,$02,$02,$02,$02
+       FCB     $22,$22,$22,$22,$22
+       FCB     $22,$22,$22,$22,$22
+MCRD11 FCB     $02,$02,$02,$02,$02
+       FCB     $22,$20,$20,$20,$22
+       FCB     $22,$00,$00,$00,$22
+MCRD21 FCB     $02,$02,$02,$02,$02
+       FCB     $22,$22,$20,$22,$22
+       FCB     $22,$22,$00,$22,$22
+MCRD31 FCB     $02,$00,$00,$00,$02
+       FCB     $22,$00,$00,$00,$22
+       FCB     $22,$22,$22,$22,$22
+MCRD41 FCB     $02,$02,$00,$02,$02
+       FCB     $22,$22,$00,$22,$22
+       FCB     $22,$22,$22,$22,$22
+*GREEN MUNCHY
+MCHGP0 FCB     3,5
+       FDB     MCGD00,MCGD01,ON35,OFF35
+MCHGP1 FCB     3,5
+       FDB     MCGD10,MCGD11,ON35,OFF35
+MCHGP2 FCB     3,5
+       FDB     MCGD20,MCGD21,ON35,OFF35
+MCHGP3 FCB     3,5
+       FDB     MCGD30,MCGD31,ON35,OFF35
+MCHGP4 FCB     3,5
+       FDB     MCGD40,MCGD41,ON35,OFF35
+MCGD00 FCB     $33,$33,$33,$33,$33
+       FCB     $33,$33,$33,$33,$33
+       FCB     $30,$30,$30,$30,$30
+MCGD10 FCB     $33,$33,$33,$33,$33
+       FCB     $33,$00,$00,$00,$33
+       FCB     $30,$00,$00,$00,$30
+MCGD20 FCB     $33,$33,$33,$33,$33
+       FCB     $33,$33,$00,$33,$33
+       FCB     $30,$30,$00,$30,$30
+MCGD30 FCB     $33,$00,$00,$00,$33
+       FCB     $33,$03,$03,$03,$33
+       FCB     $30,$30,$30,$30,$30
+MCGD40 FCB     $33,$33,$00,$33,$33
+       FCB     $33,$33,$03,$33,$33
+       FCB     $30,$30,$30,$30,$30
+MCGD01 FCB     $03,$03,$03,$03,$03
+       FCB     $33,$33,$33,$33,$33
+       FCB     $33,$33,$33,$33,$33
+MCGD11 FCB     $03,$03,$03,$03,$03
+       FCB     $33,$30,$30,$30,$33
+       FCB     $33,$00,$00,$00,$33
+MCGD21 FCB     $03,$03,$03,$03,$03
+       FCB     $33,$33,$30,$33,$33
+       FCB     $33,$33,$00,$33,$33
+MCGD31 FCB     $03,$00,$00,$00,$03
+       FCB     $33,$00,$00,$00,$33
+       FCB     $33,$33,$33,$33,$33
+MCGD41 FCB     $03,$03,$00,$03,$03
+       FCB     $33,$33,$00,$33,$33
+       FCB     $33,$33,$33,$33,$33
+*BAITER MASTER ROUND
+BMRP0  FCB     3,7
+       FDB     BMRD00,BMRD01,ON47,OFF47
+BMRP1  FCB     4,7
+       FDB     BMRD10,BMRD11,ON47,OFF47
+BMRP2  FCB     4,7
+       FDB     BMRD20,BMRD21,ON47,OFF47
+BMRP3  FCB     4,7
+       FDB     BMRD30,BMRD31,ON47,OFF47
+BMRP4  FCB     4,7
+       FDB     BMRD40,BMRD41,ON47,OFF47
+BMRD00 FCB     $99,$98,$98,$98,$98,$98,$99
+       FCB     $99,$88,$88,$88,$88,$88,$99
+       FCB     $99,$88,$88,$88,$88,$88,$99
+       FCB     $90,$90,$90,$90,$90,$90,$90
+BMRD10 FCB     $99,$98,$98,$98,$98,$98,$99
+       FCB     $99,$90,$90,$90,$90,$90,$99
+       FCB     $99,$00,$00,$00,$00,$00,$99
+       FCB     $90,$00,$00,$00,$00,$00,$90
+BMRD20 FCB     $99,$98,$98,$98,$98,$98,$99
+       FCB     $99,$88,$99,$90,$99,$88,$99
+       FCB     $99,$88,$99,$00,$99,$88,$99
+       FCB     $90,$90,$90,$00,$90,$90,$90
+BMRD30 FCB     $99,$00,$00,$00,$00,$00,$99
+       FCB     $99,$00,$00,$00,$00,$00,$99
+       FCB     $99,$98,$98,$98,$98,$98,$99
+       FCB     $90,$90,$90,$90,$90,$90,$90
+BMRD40 FCB     $99,$98,$99,$00,$99,$98,$99
+       FCB     $99,$88,$99,$00,$99,$88,$99
+       FCB     $99,$88,$98,$98,$98,$88,$99
+       FCB     $90,$90,$90,$90,$90,$90,$90
+BMRD01 FCB     $09,$09,$09,$09,$09,$09,$09
+       FCB     $99,$88,$88,$88,$88,$88,$99
+       FCB     $99,$88,$88,$88,$88,$88,$99
+       FCB     $99,$89,$89,$89,$89,$89,$99
+BMRD11 FCB     $09,$09,$09,$09,$09,$09,$09
+       FCB     $99,$89,$89,$89,$89,$89,$99
+       FCB     $99,$00,$00,$00,$00,$00,$99
+       FCB     $99,$00,$00,$00,$00,$00,$99
+BMRD21 FCB     $09,$09,$09,$09,$09,$09,$09
+       FCB     $99,$88,$89,$89,$89,$88,$99
+       FCB     $99,$88,$99,$00,$99,$88,$99
+       FCB     $99,$89,$99,$00,$99,$89,$99
+BMRD31 FCB     $09,$00,$00,$00,$00,$00,$09
+       FCB     $99,$00,$00,$00,$00,$00,$99
+       FCB     $99,$09,$09,$09,$09,$09,$99
+       FCB     $99,$89,$89,$89,$89,$89,$99
+BMRD41 FCB     $09,$09,$09,$00,$09,$09,$09
+       FCB     $99,$88,$99,$00,$99,$88,$99
+       FCB     $99,$88,$99,$09,$99,$88,$99
+       FCB     $99,$89,$89,$89,$89,$89,$99
+*BAITER MASTER SQUARE
+BMSP0  FCB     4,7
+       FDB     BMSD00,BMSD01,ON47,OFF47
+BMSP1  FCB     4,7
+       FDB     BMSD10,BMSD11,ON47,OFF47
+BMSP2  FCB     4,7
+       FDB     BMSD20,BMSD21,ON47,OFF47
+BMSP3  FCB     4,7
+       FDB     BMSD30,BMSD31,ON47,OFF47
+BMSP4  FCB     4,7
+       FDB     BMSD40,BMSD41,ON47,OFF47
+BMSD00 FCB     $FF,$FB,$FB,$FB,$FB,$FB,$FF
+       FCB     $FF,$BB,$BB,$BB,$BB,$BB,$FF
+       FCB     $FF,$BB,$BB,$BB,$BB,$BB,$FF
+       FCB     $F0,$F0,$F0,$F0,$F0,$F0,$F0
+BMSD10 FCB     $FF,$FB,$FB,$FB,$FB,$FB,$FF
+       FCB     $FF,$F0,$F0,$F0,$F0,$F0,$FF
+       FCB     $FF,$00,$00,$00,$00,$00,$FF
+       FCB     $F0,$00,$00,$00,$00,$00,$F0
+BMSD20 FCB     $FF,$FB,$FB,$FB,$FB,$FB,$FF
+       FCB     $FF,$BB,$FF,$F0,$FF,$BB,$FF
+       FCB     $FF,$BB,$FF,$00,$FF,$BB,$FF
+       FCB     $F0,$F0,$F0,$00,$F0,$F0,$F0
+BMSD30 FCB     $FF,$00,$00,$00,$00,$00,$FF
+       FCB     $FF,$00,$00,$00,$00,$00,$FF
+       FCB     $FF,$FB,$FB,$FB,$FB,$FB,$FF
+       FCB     $F0,$F0,$F0,$F0,$F0,$F0,$F0
+BMSD40 FCB     $FF,$FB,$FF,$00,$FF,$FB,$FF
+       FCB     $FF,$BB,$FF,$00,$FF,$BB,$FF
+       FCB     $FF,$BB,$FB,$FB,$FB,$BB,$FF
+       FCB     $F0,$F0,$F0,$F0,$F0,$F0,$F0
+BMSD01 FCB     $0F,$0F,$0F,$0F,$0F,$0F,$0F
+       FCB     $FF,$BB,$BB,$BB,$BB,$BB,$FF
+       FCB     $FF,$BB,$BB,$BB,$BB,$BB,$FF
+       FCB     $FF,$BF,$BF,$BF,$BF,$BF,$FF
+BMSD11 FCB     $0F,$0F,$0F,$0F,$0F,$0F,$0F
+       FCB     $FF,$BF,$BF,$BF,$BF,$BF,$FF
+       FCB     $FF,$00,$00,$00,$00,$00,$FF
+       FCB     $FF,$00,$00,$00,$00,$00,$FF
+BMSD21 FCB     $0F,$0F,$0F,$0F,$0F,$0F,$0F
+       FCB     $FF,$BB,$BF,$BF,$BF,$BB,$FF
+       FCB     $FF,$BB,$FF,$00,$FF,$BB,$FF
+       FCB     $FF,$BF,$FF,$00,$FF,$BF,$FF
+BMSD31 FCB     $0F,$00,$00,$00,$00,$00,$0F
+       FCB     $FF,$00,$00,$00,$00,$00,$FF
+       FCB     $FF,$0F,$0F,$0F,$0F,$0F,$FF
+       FCB     $FF,$BF,$BF,$BF,$BF,$BF,$FF
+BMSD41 FCB     $0F,$0F,$0F,$00,$0F,$0F,$0F
+       FCB     $FF,$BB,$FF,$00,$FF,$BB,$FF
+       FCB     $FF,$BB,$FF,$0F,$FF,$BB,$FF
+       FCB     $FF,$BF,$BF,$BF,$BF,$BF,$FF
+*
+*       PROBE START - PUT [A] PROBES OUT AND HAVE THEM COLIDE SOME 
+*              AT A RANDOM COORDINATE SOME DELTA-T LATER
+*
+
+PRBST$ STA     XTEMP   COUNT IN RAM
+       LDY     HSEED   GET A RANDOM X TO ARRIVE AT.
+       PSHS    Y       OPERATE FROM STACK 
+       LDA     SEED    GET A NEW ONE
+       ANDA    #$1     KEEP IT SMALL
+       LDB     HSEED
+       ADDD    #$80    2 SECOND MINIMUM
+       PSHS    D       OPERATE ON IT ON STACK 
+       MAKP    PRBTIM  MAKE THE MESSAGE TIMER PROCESS
+       LDD     ,S      GET TIME
+       STD     PD,X    AND PASS IT. 
+PRBS1  OBI     PRBP1,PRBKIL,$CCCC GET THE OBJECT ETC.
+       JSR     RAND
+       LDB     LSEED
+       LSRB
+       ADDB    #YMIN
+       STB     OY16,X
+       LDB     SEED
+       ANDB    #$3F
+       LDA     XTEMP
+       RORA
+       BCC     PRBS0
+       NEGB            EVERY OTHER ONE OPPOSITE DIR.
+PRBS0  SEX
+       STD     OXV,X   SET THAT VELOCITY
+       BPL     PRBML1  NEGATIVE B
+       NEGB
+       BSR     PRBMUL  DO THE MULTIPLY
+       BRA     PRBML2
+PRBML1 BSR     PRBMUL
+       COMA
+       COMB
+       ADDD    #1
+PRBML2 PSHS    D
+       LDB     HSEED   GET SOME FUDGE THEY WILL ALL PASS WITHIN 8
+       SEX
+       ASLB
+       ROLA
+       ASLB
+       ROLA
+       ASLB
+       ROLA
+       ASLB
+       ROLA
+       ADDD    4,S     GET ARRIVAL SPOT
+       ADDD    0,S
+       ADDD    0,S     TWICE BECAUSE OF SIGN BULLSHIT
+       STD     OX16,X  THIS IS PLACE TO DEPART FROM
+       LEAS    2,S
+       LDB     LSEED
+       ANDB    #$7F
+       SUBB    #$40
+       SEX
+       BMI     PRBS2
+       ORB     #$20
+       BRA     PRBS3
+PRBS2  ANDB    #$DF
+PRBS3  STD     OYV,X
+       LDA     #1      NO HYPER
+       STA     OTYP,X
+       JSR     APVCT
+       DEC     XTEMP
+       BNE     PRBS1
+       LEAS    4,S     GET RID OF TEMPS
+PRBSTX RTS
+
+PRBMUL PSHS    B       SAVE MULTIPLIER
+       LDA     3,S     GET HIGH HALF OF MULTIPLICAND
+       MUL             COMPUTE SOME STUFF
+       PSHS    B       SAVE LOW PART OF RESULT
+       LDA     1,S     GET MULTIPLIER BACK
+       LDB     5,S     LOW HALF OF MULTIPLICAND
+       MUL
+       ADDA    0,S     COLUMN ADD
+       LSRA            DIVIDE BY 2 MAKING ROOM FOR SIGN BIT
+       RORB                    
+       LEAS    2,S
+       RTS             D HAS RESULT
+
+PRBTIM LDA     PRBCNT  CHECK OUT COUNT
+       CMPA    #3
+       BLO     PRBDIE  NOT ENOUGH...BYE BYE.
+       CLR     XTEMP   USE AS COUNTER
+       LDD     PD,U    GET 16 MS TIME
+PRBT1  SUBD    #$40    TAKE A SECOND AWAY
+       BCS     PRBT2
+       INC     XTEMP
+       BRA     PRBT1
+PRBT2  LDA     XTEMP   GET THE NUMBER
+       JSR     HEXBCD  MAKE BCD
+       STA     PD,U    AND SAVE
+PRBT3  LDX     #PODM1  GET TIME        
+PRBT5  LDB     PD,U    SEND THE MESSAGE
+       JSR     MESLDV  DONE.
+       NAP     $40,PRBT4
+PRBT4  LDA     PRBCNT  COUNT EM.
+       CMPA    #3
+       BLO     PRBDIE  NOT ENOUGH ANY MORE...BYE.
+       LDA     PD,U    GET TIMER
+       ADDA    #$99    TAKE ONE AWAY
+       DAA
+       BMI     PRBDIE  TIMER OUT...BYE
+       STA     PD,U    GET READY FOR MESSAGE
+       LDX     #PODM2
+       BRA     PRBT5
+PRBDIE JMP     SUCIDE
+RIPT2  FCB     $76
+*
+PODM1  FCB     $A0,PTR!+CLEAR,$50,PODM
+       FDB     PODM2
+PODM2  FCB     $A0,COND                
+       FDB     PODM2
+       FCB     $50,PODTM
+
+*
+*KILL PROBE
+*
+PRBKIL LDD     #PHPOD  SUBSTITUTE PHONEY PICTURE
+       STD     OPICT,X
+       KILO    0210,PRHSND
+       DEC     PRBCNT
+       LDA     #6
+       JSR     RMAX
+       LDY     ,S      GET RETURN ADDRESS
+       CMPY    #SBRET  IS IT A SMART BOMB CALLING US??
+       BEQ     PRBSB   THEN HANDLE SLIGHTLY DIFFERENTLY
+       LEAY    ,X
+       JSR     MMSW
+       RTS
+*
+PRBSB  LDB     #$45    450 POINTS NOMINALLY
+       JSR     RAND    HALF OF THE TIME GIVE EXTRA
+       RORA
+       LDA     #$1     10'S HAVE THE POWER
+       BCC     PRBS$1
+       LDB     #$60    600 HALF OF THE TIME            
+PRBS$1 JSR     SCORE
+       JSR     GETOB   GET OBJECT BACK FROM POD.
+       TFR     X,Y     SAVE OBJECT
+       MAKP    SBSWP   MAKE A PROCESS TO DO THIS DEED
+       STY     PD,X    AND PASS IT THE OBJECT
+       RTS             AND WE'RE DONE!
+
+SBSWP  NAP     4,SBSWP1 DELAY TO LET THE POD STUFF MOVE.
+SBSWP1 LDA     #3      DO 3 OF THEM.           
+       STA     PD+2,U
+BOOM1  LDX     PD,U    GET OBJECT
+       JSR     XSVCT   DO AN EXPLOSION
+       LDD     PHFBP   LOAD FROM PHONEY FIREBALL POINTER
+       STD     OPICT,X THIS MAKES 2 PURPLE, 2 RED-YELLOW.
+       DEC     PD+2,U
+       BEQ     BOOM2
+       NAP     3,BOOM1
+BOOM2  LDD     OFREE
+       STD     ,X
+       STX     OFREE
+       DIE
+
+RIPST  JSR     GNCIDE  STOP ALL OF THE ACTION
+       LDA     #$FF
+       STA     STATUS  FOR REAL!
+       NAP     1,RIP99 STOP SAM BIT INTERFERENCE
+RIP99  JSR     SCRCLR  CLEAR THE SCREEN
+       JSR     PRINV   INITIALIZE PRINTING PARAMETERS
+       LDB     #$7F
+       STB     PCRAM+1 MAKE SURE ITS VISIBLE
+       LDY     RIPTV
+       LEAY    B,Y
+RIPST0 LDA     ,Y+     GET A BYTE
+       BEQ     RIPEND  END.    
+       CMPA    #$2     CHECK TIME??
+       BNE     RIPST8
+       LDA     PIA21   CHECK LEVER
+       BPL     RIPEN2  HE LET GO...CAN IT!
+       BRA     RIPST0  GO AND GET NEXT BYTE.
+RIPST8 CMPA    #$1     CURSOR??
+       BNE     RIPST1  NOPE
+       LDX     ,Y++
+       CLR     TXFLAV  MAKE IT ALL LINE UP PRETTY
+       BRA     RIPST0
+RIPST1 ADDA    #$2E    GET OUT OF READABLE ASCII
+       LDU     #RIPST0
+       PSHS    U
+       LDU     RIPT1
+       LDB     RIPT2
+       LEAU    B,U
+       LEAU    B,U
+       LEAU    B,U
+       JMP     ,U
+*      BRA     RIPST0  THIS IS WHAT WOULD HAVE FOLLOWED A CONVENTIONAL JSR.
+RIPEND NAP     1,RIPEN1
+RIPEN1 LDA     PIA21
+       BMI     RIPEND
+RIPEN2 JSR     SCRCLR
+       JMP     [$FFFE] END RESET
+RIPT1  FDB     PR57V-($76*3)
+*
+*RANDOM VELOCITY
+*X=OBJECT
+RANDV  JSR     RAND
+       LDB     SEED
+       SEX
+       ASLB
+       ROLA    X2
+       STD     OYV,X
+       LDB     LSEED
+       ANDB    #$3F
+       ADDB    #-$20
+       SEX
+       STD     OXV,X
+       RTS
+*
+*MAKE A MINI SWARMER
+*Y=OBJECT AT CENTER,A=#
+*
+MMSW$  PSHS    D,X,Y,U
+       STA     XTEMP
+MMSLP  LDA     SWCNT
+       INCA
+       CMPA    #20
+       BHI     MMSWX   TOO MANY GUYS
+       MKPROB  MSWM,SWPIC1,MSWKIL,$2424
+       BEQ     MMSWX   NONE LEFT
+       STA     SWCNT
+       LDD     OX16,Y
+       STD     OX16,X
+       LDD     OY16,Y
+       STD     OY16,X
+       BSR     RANDV
+       LDD     HSEED
+       ANDB    SWAC
+       STB     PD2,U   ACCEL
+       ANDA    #$1F
+       STA     PTIME,U
+       LDA     SWSTIM
+       JSR     RMAX
+       STA     PD4,U
+       STX     OPTR
+       DEC     XTEMP
+       BNE     MMSLP
+MMSWX  PULS    D,X,Y,U,PC
+*
+*MINI SWARM KILL
+*X=OBJECT
+*
+MSWKIL DEC     SWCNT
+       JSR     KILOFF  TRASH IT
+       PSHS    X
+       JSR     KILLOP  AND ITS PROCESS
+       PULS    X
+       LDD     OX16,X  MODIFY FOR LARGER IMAGE
+       SUBD    #$40
+       STD     OX16,X
+       LDA     OY16,X
+       SUBA    #2
+       STA     OY16,X
+       LDU     #SWXP1
+       STU     OPICT,X
+       LDD     #$115   
+       JSR     SCORE
+       LDD     #SWHSND
+       JSR     SNDLD   GET THE STUPID STUFF OUT OF THE WAY
+       JMP     XSVCT
+
+*
+*MINI SWARM PROCESS
+*PD=OBJECT,PD2 ACCELERATION,PD4=SHOT TIMER
+*
+MSWM   LDX     PD,U
+       LDB     SWXV
+       LDY     PLABX
+       CMPY    OX16,X
+       BHS     MSWM2
+       NEGB
+MSWM2  SEX
+       STD     OXV,X   X VELOCITY
+       BRA     MSWL
+MSWLP  LDB     PD2,U
+       LDX     PD,U
+       LDA     PLAYC   GET Y ACCEL
+       CMPA    OY16,X
+       BHI     MSWM3
+       NEGB
+MSWM3  SEX
+       ADDD    OYV,X
+       CMPD    #$0200
+       BLT     MSWM4
+       LDD     #$0200
+MSWM4  CMPD    #-$200
+       BGT     MSWM5
+       LDD     #-$200
+MSWM5  STD     OYV,X
+*DAMPING
+       COMA
+       COMB
+       ASLB
+       ROLA
+       ASLB
+       ROLA
+       TFR     A,B
+       SEX
+       ADDD    OYV,X
+       STD     OYV,X
+*RANDOM FACTOR
+       LDB     SEED
+       ANDB    #$1F
+       ADDB    #-$10
+       SEX
+       ADDD    OYV,X
+       STD     OYV,X
+       LDD     PLABX   PAST HIM?
+       SUBD    OX16,X
+       ADDD    #150*32
+MSP    CMPD    #300*32 WAY PAST?
+       BHI     MSWM    GO BACK + GIT IM
+*FIRE?
+MSWMF  DEC     PD4,U
+       BNE     MSWL
+       JSR     SWBMB   BOMB GUY
+MSWL   NAP     3,MSWLP
+*
+*SWARM BOMB
+*
+SWBMB  PSHS    X
+       LDD     PLABX
+       SUBD    OX16,X
+       EORA    OXV,X
+       BMI     SWBX    NOT HEADED FOR PLAYER
+       LEAY    ,X
+       SHL     FBOUT,BMBP1,BKIL
+       BEQ     SWBX
+       LDD     OXV,Y
+       ASLB
+       ROLA
+       ASLB
+       ROLA
+       ASLB
+       ROLA
+       STD     OXV,X
+       LDD     #SWSSND SWARMER SOUND
+       JSR     SNDLD
+       CLRB
+       LDA     PLAYC
+       SUBA    OY16,X
+SWB1   ASRA
+       RORB
+       ASRA
+       RORB
+       ASRA
+       RORB
+       ASRA
+       RORB
+       ASRA
+       RORB
+       STD     OYV,X
+SWBX   LDA     SWSTIM
+       JSR     RMAX
+       STA     PD4,U
+       PULS    X,PC
+*
+PHPOD  FCB     4,8
+       FDB     PHPOD0,PHPOD0
+       FDB     ON48,OFF48
+
+PHPOD0 FCB     $00,$0E,$88,$D8,$F8,$8E,$08,$00
+       FCB     $D8,$88,$8C,$C8,$8C,$88,$EF,$8F
+       FCB     $F8,$8E,$88,$C8,$88,$8E,$8D,$E8
+       FCB     $00,$80,$E8,$DD,$D8,$E8,$80,$00
+
+UFNP1  FCB     6,4
+       FDB     BAIT10,BAIT11
+       FDB     ON64,OFF64
+UFNP2  FCB     6,4
+       FDB     BAIT20,BAIT21
+       FDB     ON64,OFF64
+UFNP3  FCB     6,4
+       FDB     BAIT30,BAIT31
+       FDB     ON64,OFF64
+UFNP4  FCB     6,4
+       FDB     BAIT40,BAIT41
+       FDB     ON64,OFF64
+UFNP5  FCB     6,4
+       FDB     BAIT50,BAIT51
+       FDB     ON64,OFF64
+UFNP6  FCB     6,4
+       FDB     BAIT60,BAIT61
+       FDB     ON64,OFF64
+UFNP7  FCB     6,4
+       FDB     BAIT70,BAIT71
+       FDB     ON64,OFF64
+BAIT10 FCB     $00,$03,$31,$03
+       FCB     $33,$11,$11,$33
+       FCB     $33,$00,$00,$33
+       FCB     $33,$01,$01,$33
+       FCB     $30,$13,$11,$33
+       FCB     $00,$00,$30,$00
+BAIT11 FCB     $00,$00,$03,$00
+       FCB     $03,$31,$11,$33
+       FCB     $33,$10,$10,$33
+       FCB     $33,$00,$00,$33
+       FCB     $33,$11,$11,$33
+       FCB     $00,$30,$13,$30
+BAIT20 FCB     $00,$03,$31,$03
+       FCB     $33,$11,$11,$33
+       FCB     $33,$10,$10,$33
+       FCB     $33,$00,$00,$33
+       FCB     $30,$13,$11,$33
+       FCB     $00,$00,$30,$00
+BAIT21 FCB     $00,$00,$03,$00
+       FCB     $03,$31,$11,$33
+       FCB     $33,$11,$11,$33
+       FCB     $33,$00,$00,$33
+       FCB     $33,$01,$01,$33
+       FCB     $00,$30,$13,$30
+BAIT30 FCB     $00,$03,$31,$03
+       FCB     $33,$11,$11,$33
+       FCB     $33,$11,$11,$33
+       FCB     $33,$00,$00,$33
+       FCB     $30,$03,$01,$33
+       FCB     $00,$00,$30,$00
+BAIT31 FCB     $00,$00,$03,$00
+       FCB     $03,$31,$11,$33
+       FCB     $33,$11,$11,$33
+       FCB     $33,$10,$10,$33
+       FCB     $33,$00,$00,$33
+       FCB     $00,$30,$13,$30
+BAIT40 FCB     $00,$03,$31,$03
+       FCB     $33,$01,$01,$33
+       FCB     $33,$11,$11,$33
+       FCB     $33,$10,$10,$33
+       FCB     $30,$03,$01,$33
+       FCB     $00,$00,$30,$00
+BAIT41 FCB     $00,$00,$03,$00
+       FCB     $03,$30,$10,$33
+       FCB     $33,$11,$11,$33
+       FCB     $33,$11,$11,$33
+       FCB     $33,$00,$00,$33
+       FCB     $00,$30,$13,$30
+BAIT50 FCB     $00,$03,$31,$03
+       FCB     $33,$00,$00,$33
+       FCB     $33,$11,$11,$33
+       FCB     $33,$11,$11,$33
+       FCB     $30,$03,$01,$33
+       FCB     $00,$00,$30,$00
+BAIT51 FCB     $00,$00,$03,$00
+       FCB     $03,$30,$10,$33
+       FCB     $33,$01,$01,$33
+       FCB     $33,$11,$11,$33
+       FCB     $33,$10,$10,$33
+       FCB     $00,$30,$13,$30
+BAIT60 FCB     $00,$03,$31,$03
+       FCB     $33,$00,$00,$33
+       FCB     $33,$01,$01,$33
+       FCB     $33,$11,$11,$33
+       FCB     $30,$13,$11,$33
+       FCB     $00,$00,$30,$00
+BAIT61 FCB     $00,$00,$03,$00
+       FCB     $03,$30,$10,$33
+       FCB     $33,$00,$00,$33
+       FCB     $33,$11,$11,$33
+       FCB     $33,$11,$11,$33
+       FCB     $00,$30,$13,$30
+BAIT70 FCB     $00,$03,$31,$03
+       FCB     $33,$10,$10,$33
+       FCB     $33,$00,$00,$33
+       FCB     $33,$11,$11,$33
+       FCB     $30,$13,$11,$33
+       FCB     $00,$00,$30,$00
+BAIT71 FCB     $00,$00,$03,$00
+       FCB     $03,$31,$11,$33
+       FCB     $33,$00,$00,$33
+       FCB     $33,$01,$01,$33
+       FCB     $33,$11,$11,$33
+       FCB     $00,$30,$13,$30
+
+       END
diff --git a/DN11.SRC b/DN11.SRC
new file mode 100755 (executable)
index 0000000..c740ff1
--- /dev/null
+++ b/DN11.SRC
@@ -0,0 +1,381 @@
+       NLIST
+       INCLUDE SPHR56.SRC
+       INCLUDE EQ4.SRC
+       LIST
+       TTL     <<<<<  S T A R G A T E  >>>>>
+
+.OPTR  EQU     PD
+.VEL   EQU     PD+2
+.SHOT  EQU     PD+3
+
+       ORG     DNORG
+       JMP     DYNSRT
+       FDB     DYN0
+       FDB     MIS0
+*
+DYNSRT PSHS    A       COUNT ON STACK
+DYNST1 MAKP    DYNPRC
+       DEC     ,S      ANY LEFT??
+       BNE     DYNST1
+       PULS    A,PC
+
+DYNPRC OBI     DYN0,DYNKIL,DYNBLP      
+       JSR     RAND    CYCLE ONCE
+       LSRA            DOWN THE HORIZON
+       ADDA    #$40
+       STD     OX16,X  SETS X.
+       ADDA    #YMIN+$D0 TOWARD CENTER.
+       STD     OY16,X
+       LDD     #0
+       STD     OXV,X
+       STD     OYV,X   *************************************BSO BONER
+       FCB     $AF,$C9,$00,$07 ((STX   .OPTR,U)) SAVE OBJECT 
+       STX     OPTR    *************************************BSO BONER
+       LDA     #1      *************************************BSO BONER
+       FCB     $A7,$C9,$00,$09 ((STA   .VEL,U)) SETUP FOR INITIAL VELOCITY CORRECTION
+       LDA     DYNSHT  *************************************BSO BONER
+       COMA            *************************************BSO BONER
+       FCB     $A7,$C9,$00,$0A ((STA   .SHOT,U)) DELAY FIRST SHOT ACCORDINGLY
+*                      *************************************BSO BONER
+
+DNLOOP JSR     DNPICT  CYCLE THE PICTURE AND TIMERS
+       TST     .VEL,U  NEW VELOCITY TIME??
+       BNE     DNLOP1  NOPE
+DNWAKE LDA     HSEED   GET A SEEDY GUY
+       ANDA    #$1F    UP TO 1 SECOND 
+       ADDA    #$10    .5 - 1.5
+       STA     .VEL,U  NEW TIME
+       LDD     OYV,X   GET THE CURRENT Y VELOCITY
+       BPL     YV1     POS. CHECK
+       CMPD    #$FF80  1/2 PIX??
+       BHI     YV2     YEP...NORMAL CHANGE
+       LDB     SEED
+       BRA     DNLP5
+YV1    CMPD    #$80
+       BLO     YV2     
+       LDB     SEED
+       BRA     DNLOP2
+YV2    LDB     SEED
+       LDA     OY16,X  GET THE CURRENT HEIGHT
+       CMPA    #($100-YMIN)/2  HIGH OR LOW??
+       BHS     DNLOP2  HIGH..GO LOWER
+DNLP5  ANDB    #$3F
+       BRA     DNLOP3
+DNLOP2 ORB     #$C0
+DNLOP3 SEX
+       ADDD    OYV,X   CHANGE VELOCITY APPRORIATELY.
+       STD     OYV,X
+       LDD     OXV,X   CHECK X VELOCITY FOR TOO LARGE
+       BPL     DNLP0
+       CMPD    #-40    
+       BHS     DNLOP4  OK
+       BRA     DNLP1
+DNLP0  CMPD    #40
+       BLS     DNLOP4
+DNLP1  ASRA
+       RORB
+       STD     OXV,X
+DNLOP4 LDB     LSEED
+       ASRB
+       ASRB
+       ASRB
+       ASRB
+       SEX
+       ADDD    OXV,X
+       STD     OXV,X
+DNLOP1 TST     .SHOT,U SHOT TIME?
+       BNE     DNLOP9
+       LDD     OX16,X  GET THE X COORD
+       SUBD    BGL     SEE IF ON SCREEN
+       CMPD    #300*32
+       BHS     DNLOP9  NOT ON SCREEN
+       LDD     PLABX   GET PLAYERS WORLD COORD
+       SUBD    OX16,X  SUBTRACT OURS
+       BPL     DNLOP5
+       COMA
+       COMB            MAKE POSITIVE FOR COMPARE
+DNLOP5 CMPD    #50*32  WITHIN 50 PIXELS??
+       BLS     DNLOP9  THEN DON'T FIRE.
+       LDA     #$18
+       JSR     RMAX
+       STA     XTEMP
+       LDA     DYNSHT  GET FREQUENCY PARAMETER
+       COMA
+       ADDA    XTEMP
+       BCC     DNLPP6
+       LDA     #$FF
+DNLPP6 STA     .SHOT,U AND SAVE IT DOWN
+       LDA     MISCNT  HOW MANY OUT THERE??
+       CMPA    #6      6??
+       BHS     DNLOP9  YEP...DONT MAKE ONE
+       LEAY    ,X      PUT OBJECT IN Y
+       MKPROB  MISILE,MIS0,MISKIL,MISBLP
+       BEQ     DNLOP9  FAIL!
+       STY     PD+2,U  PASS OUR OBJECT.
+       INC     MISCNT  INDICATE ONE MORE
+       LDD     #MISSND
+       JSR     SNDLD   SEND OUT A MISSLE SOUND
+       LDD     OX16,Y
+       CMPD    PLABX
+       BPL     DNLP1$  PLAYER'S TO OUR LEFT
+       LDD     OXV,Y   GET OUR VELOCITY
+       BMI     DNLOP9  HES TO OUR RIGHT, VELOCITY TO LEFT...NEGATIVE OK
+       BRA     DNLP2$
+DNLP1$ LDD     OXV,Y
+       BPL     DNLOP9
+DNLP2$ COMA
+       COMB
+       STD     OXV,Y
+DNLOP9 NAP     2,DNLOOP
+
+MISSND FCB     $C0,$01,$40,$19,$1,$01,$16,$0
+
+DNPICT LDX     .OPTR,U GET OUR POINTER
+       LDD     OX16,X  ON SCREEN??
+       SUBD    BGL
+       ADDD    #50*32
+       CMPD    #400*32
+       BHS     DNPIC4
+       LDD     OBJX X  SEE IF ACTUALLY ON SCREEN.
+       BNE     DNPCC1  YEP
+       LDA     #19     STOP A QUICK SHOT!
+       STA     .SHOT,U 
+DNPCC1 LDY     OPICT,X GET OUR PICTURE POINTER
+       LDD     OXV,X   CHECK DIRECTION
+       BMI     DNPIC5  NEGATIVE
+       LEAY    -OBJL,Y
+       CMPY    #DYN0
+       BHS     DNPIC1  IN RANGE...JUST STORE
+       LDY     #DYN3
+       BRA     DNPIC1
+DNPIC5 LEAY    OBJL,Y  MOVE TO NEXT
+       CMPY    #DYN3   PAST LAST??
+       BLS     DNPIC1  NOPE
+       LDY     #DYN0
+DNPIC1 STY     OPICT,X STORE
+DNPIC2 LDA     .SHOT,U SHOT TIMER ZERO??
+       BEQ     DNPIC3
+       DEC     .SHOT,U DECREMENT SHOT TIMER
+DNPIC3 DEC     .VEL,U  VELOCITY TIMER
+       RTS
+
+DNPIC4 LDA     #19
+       STA     .SHOT,U
+       NAP     $10,DNWAK1 FAR OFF SCREEN...                            
+DNWAK1 LDX     PD,U    GET OBJECT.
+       JMP     DNWAKE
+
+DYNKIL DEC     DYNCNT
+       LDD     #PHDYN
+       STD     OPICT,X
+       KILP    0120,TIHSND     
+       RTS
+
+MISILE LDY     PD+2,U  GET OBJECT FIRING US.
+       LDX     PD,U    AND GET OUR OBJECT
+       LDD     OX16,Y  GET OUR X COORD.
+       SUBD    PLABX   SEE WHICH SIDE PLAYER IS ON
+       BPL     MISS11  HE'S TO OUR LEFT
+       LDD     OX16,Y  GET OBJECTS X
+       ADDD    #7*32   2 PIXELS OVER.
+       BRA     MISS22
+MISS11 LDD     OX16,Y
+       SUBD    #3*32
+MISS22 STD     OX16,X
+       LDD     OY16,Y
+       ADDA    #2      SAME FOR Y.
+       STD     OY16,X  
+       LDD     #0
+       STD     OXV,X
+       STD     OYV,X
+       INCA
+       STA     PD+2,U  INSTANT VELOCITY CHANGE
+       STX     OPTR
+       STX     .OPTR,U
+*
+MSLOOP JSR     MSPICT  DO THE PICTURE NUMBER
+       DEC     PD+2,U  VELOCITY DIVIDER
+       BNE     MSLOP1  NOT THIS TIME
+       LDA     #4
+       STA     PD+2,U
+       BSR     XCHK    CHECK THE X RANGE.
+       BLS     NEWY    IN HITTING DISTANCE....
+       BSR     YCHK    X NOT GOOD BE CAREFUL ABOUT Y
+       BHI     NEWY    Y NOT CLOSE ENOUGH...ZERO IN.
+       LDD     #0      Y CLOSE ENOUGH.
+       STD     OYV,X
+       BRA     MSLOP2
+NEWY   LDD     PLAYC   GET THE PLAYERS Y.
+       CMPD    OY16,X  COMPARE TO OURS
+       BHS     NEWY1
+       LDB     MISVEL
+       COMB
+       BRA     NEWY2
+NEWY1  LDB     MISVEL
+NEWY2  SEX
+       ASLB
+       ROLA            DOUBLE FOR Y.
+       STD     OYV,X
+MSLOP2 BSR     XCHK
+       BLS     MSLOP6  CLOSE ENOUGH IN X
+       LDD     PLABX
+       CMPD    OX16,X
+       BPL     NEWX1   HE'S IN FRONT OF US     (NO LINE)
+       LDB     MISVEL  1 PIXEL PER SECOND
+       COMB
+       BRA     NEWX2
+NEWX1  LDB     MISVEL
+NEWX2  SEX
+       STD     OXV,X   STORED.
+MSLOP1 NAP     3,MSLOOP LOOP TIME.
+MSLOP6 LDD     #0
+       STD     OXV,X
+       BRA     MSLOP1
+
+XCHK   LDD     PLABX
+       ADDD    #32*5   ADD 5 PIXELS TO MAKE SYMMETRIC
+       SUBD    OX16,X  FIND DIFFEENCE
+       BPL     XCHK1
+       COMA
+       COMB
+       ADDD    #1
+XCHK1  CMPD    #9*32
+       RTS
+
+YCHK   LDD     PLAYC
+       SUBD    OY16,X
+       BPL     YCHK1
+       COMA
+       COMB
+       ADDD    #1
+YCHK1  CMPD    #$A00
+       RTS
+
+MSPICT LDX     .OPTR,U
+       LDD     OX16,X
+       SUBD    BGL     
+       CMPD    #300*32 ON SCREEN??
+       BHI     MSPIC2
+       LDY     OPICT,X
+       LEAY    OBJL,Y
+       CMPY    #MIS1
+       BLS     MSPIC1
+       LDY     #MIS0
+MSPIC1 STY     OPICT,X
+       RTS
+
+MSPIC2 NAP     12,MSLOOP
+
+MISKIL DEC     MISCNT
+       LDD     #PHMIS
+       STD     OPICT,X
+       KILP    0110,TIHSND
+       RTS
+
+DYN0   FCB     5,9
+       FDB     DYNP00,DYNP01
+       FDB     ON59,OFF59
+
+DYN1   FCB     5,9
+       FDB     DYNP10,DYNP11
+       FDB     ON59,OFF59
+
+DYN2   FCB     5,9
+       FDB     DYNP20,DYNP21
+       FDB     ON59,OFF59
+
+DYN3   FCB     5,9
+       FDB     DYNP30,DYNP31
+       FDB     ON59,OFF59
+
+PHDYN  FCB     5,9
+       FDB     PHDYN0,PHDYN0
+       FDB     ON59,OFF59
+
+PHDYN0 FCB     $00,$00,$00,$02,$99,$02,$00,$00,$00
+       FCB     $00,$02,$99,$92,$92,$92,$99,$02,$00
+       FCB     $90,$92,$99,$22,$92,$22,$99,$92,$90
+       FCB     $00,$00,$90,$92,$99,$92,$90,$00,$00
+       FCB     $00,$00,$00,$00,$90,$00,$00,$00,$00
+
+DYNP00 FCB     $00,$00,$00,$00,$00,$00,$00,$00,$00
+       FCB     $00,$02,$90,$02,$00,$02,$90,$02,$00
+       FCB     $90,$02,$00,$02,$90,$02,$00,$02,$90
+       FCB     $00,$00,$90,$00,$00,$00,$90,$00,$00
+       FCB     $00,$00,$00,$00,$00,$00,$00,$00,$00
+DYNP10 FCB     $00,$00,$00,$09,$00,$00,$00,$00,$00
+       FCB     $00,$09,$20,$00,$20,$09,$00,$00,$00
+       FCB     $00,$00,$20,$09,$20,$00,$20,$09,$00
+       FCB     $00,$00,$00,$00,$20,$09,$20,$00,$00
+       FCB     $00,$00,$00,$00,$00,$00,$00,$00,$00
+DYNP20 FCB     $00,$00,$00,$02,$90,$02,$00,$00,$00
+       FCB     $00,$00,$90,$02,$00,$02,$90,$00,$00
+       FCB     $00,$00,$00,$02,$90,$02,$00,$00,$00
+       FCB     $00,$00,$90,$02,$00,$02,$90,$00,$00
+       FCB     $00,$00,$00,$00,$90,$00,$00,$00,$00
+DYNP30 FCB     $00,$00,$00,$00,$00,$09,$00,$00,$00
+       FCB     $00,$00,$00,$09,$20,$00,$20,$09,$00
+       FCB     $00,$09,$20,$00,$20,$09,$20,$00,$00
+       FCB     $00,$00,$20,$09,$20,$00,$00,$00,$00
+       FCB     $00,$00,$00,$00,$00,$00,$00,$00,$00
+DYNP01 FCB     $00,$00,$00,$00,$00,$00,$00,$00,$00
+       FCB     $00,$00,$09,$00,$00,$00,$09,$00,$00
+       FCB     $09,$20,$00,$20,$09,$20,$00,$20,$09
+       FCB     $00,$20,$09,$20,$00,$20,$09,$20,$00
+       FCB     $00,$00,$00,$00,$00,$00,$00,$00,$00
+DYNP11 FCB     $00,$00,$00,$00,$00,$00,$00,$00,$00
+       FCB     $00,$00,$02,$90,$02,$00,$00,$00,$00
+       FCB     $00,$90,$02,$00,$02,$90,$02,$00,$00
+       FCB     $00,$00,$00,$90,$02,$00,$02,$90,$00
+       FCB     $00,$00,$00,$00,$00,$90,$00,$00,$00
+DYNP21 FCB     $00,$00,$00,$00,$09,$00,$00,$00,$00
+       FCB     $00,$00,$09,$20,$00,$20,$09,$00,$00
+       FCB     $00,$00,$00,$20,$09,$20,$00,$00,$00
+       FCB     $00,$00,$09,$20,$00,$20,$09,$00,$00
+       FCB     $00,$00,$00,$20,$09,$20,$00,$00,$00
+DYNP31 FCB     $00,$00,$00,$00,$00,$00,$00,$00,$00
+       FCB     $00,$00,$00,$00,$02,$90,$02,$00,$00
+       FCB     $00,$00,$02,$90,$02,$00,$02,$90,$00
+       FCB     $00,$90,$02,$00,$02,$90,$00,$00,$00
+       FCB     $00,$00,$00,$90,$00,$00,$00,$00,$00
+
+PHMIS  FCB     3,5
+       FDB     PHMIS0,PHMIS0
+       FDB     ON35,OFF35
+
+MIS0   FCB     3,5
+       FDB     MIS00,MIS01
+       FDB     ON35,OFF35
+
+MIS1   FCB     3,5
+       FDB     MIS10,MIS11
+       FDB     ON35,OFF35
+
+MIS00  FCB     $00,$09,$90,$09,$00
+       FCB     $90,$09,$00,$09,$90
+       FCB     $00,$00,$90,$00,$00
+
+MIS01  FCB     $00,$00,$09,$00,$00
+       FCB     $09,$90,$00,$90,$09
+       FCB     $00,$90,$09,$90,$00
+
+MIS10  FCB     $00,$00,$22,$00,$00
+       FCB     $20,$20,$92,$20,$20
+       FCB     $00,$00,$20,$00,$00
+
+MIS11  FCB     $00,$00,$02,$00,$00
+       FCB     $02,$02,$29,$02,$02
+       FCB     $00,$00,$22,$00,$00
+
+PHMIS0 FCB     $00,$09,$92,$09,$00
+       FCB     $90,$29,$92,$29,$90
+       FCB     $00,$00,$90,$00,$00
+
+MISBLP EQU     $9000
+DYNBLP EQU     $9229
+
+       ORG     $5F70
+       FCB     $B7     MATCH THE PROMS GOOFY
+
+
+       END
diff --git a/EQ4.SRC b/EQ4.SRC
new file mode 100755 (executable)
index 0000000..94981a5
--- /dev/null
+++ b/EQ4.SRC
@@ -0,0 +1,186 @@
+OFSHIT EQU     $0
+EXEC   EQU     $C
+SLEEP  EQU     $A8
+COLCHK EQU     $B9
+SUCIDE EQU     $E4
+KILLOP EQU     $EC
+KILL   EQU     $EE
+ERROR  EQU     $115
+MSPROC EQU     $119
+MKPROC EQU     $130
+GNCIDE EQU     $157
+OBINIT EQU     $170
+GETOB  EQU     $188
+KILLOB EQU     $1A2
+KILSHL EQU     $1CD
+ON28   EQU     $1D4
+OFF28  EQU     $1E6
+OFF58  EQU     $1FA
+ON48   EQU     $214
+OFF48  EQU     $246
+ON58   EQU     $26E
+ON34   EQU     $288
+OFF34  EQU     $2B2
+ON23   EQU     $2CC
+OFF23  EQU     $2E8
+ON64   EQU     $2FA
+OFF64  EQU     $33B
+ON86   EQU     $369
+OFF86  EQU     $3BA
+ON56   EQU     $3F6
+OFF56  EQU     $408
+ON66   EQU     $418
+OFF66  EQU     $42B
+ON47   EQU     $43B
+OFF47  EQU     $44D
+ON57   EQU     $45F
+OFF57  EQU     $498
+ON59   EQU     $4C4
+OFF59  EQU     $512
+FBALON EQU     $544
+BCDBIN EQU     $60E
+LCOIN  EQU     $61E
+RCOIN  EQU     $627
+CCOIN  EQU     $630
+CNSND  EQU     $65E
+RPSND  EQU     $663
+PDSND  EQU     $668
+ST1SND EQU     $670
+ST2SND EQU     $675
+TBSND  EQU     $67A
+SBSND  EQU     $685
+ACSND  EQU     $68D
+ALSND  EQU     $692
+AHSND  EQU     $697
+ASCSND EQU     $69C
+APSND  EQU     $6A1
+PRHSND EQU     $6A6
+SCHSND EQU     $6AB
+UFHSND EQU     $6B0
+TIHSND EQU     $6B5
+LHSND  EQU     $6BA
+LPKSND EQU     $6BF
+LSKSND EQU     $6C4
+SWHSND EQU     $6C9
+LASSND EQU     $6CE
+LGSND  EQU     $6D3
+LSHSND EQU     $6D8
+SSHSND EQU     $6DD
+USHSND EQU     $6E2
+SWSSND EQU     $6E7
+SNDOUT EQU     $6EC
+SNDLD  EQU     $6FD
+PLINDX EQU     $7D9
+PLDX   EQU     $7E8
+RAND   EQU     $7EC
+PINIT  EQU     $80B
+CRINIT EQU     $83A
+OINIT  EQU     $84A
+MONO   EQU     $86A
+RMAX   EQU     $8C1
+BCDHEX EQU     $8D1
+HEXBCD EQU     $8E4
+STINIT EQU     $8FB
+THINIT EQU     $A9C
+THOFF1 EQU     $B20
+THOFF  EQU     $B43
+PRDISP EQU     $B66
+POFF   EQU     $BB3
+PLAYER EQU     $BB8
+OPROC  EQU     $CF4
+GETSHL EQU     $D48
+LFIRE  EQU     $DCF
+LASR   EQU     $DE9
+LASL   EQU     $E6B
+FISS   EQU     $EEC
+COLR   EQU     $FCF
+COLTAB EQU     $FE6
+THPROC EQU     $100B
+SCPROC EQU     $1021
+OSCAN  EQU     $1045
+ISCAN  EQU     $106E
+SCNR   EQU     $10CA
+CWRIT  EQU     $1336
+COFF   EQU     $137D
+BLKCLR EQU     $13B9
+SCRCLR EQU     $13BD
+SCLR1  EQU     $13DD
+RCMOSA EQU     $140B
+RCMOSD EQU     $141A
+RCMOSB EQU     $141C
+WCMOSA EQU     $1424
+WCMOSD EQU     $1430
+WCMOSB EQU     $1432
+SCORE  EQU     $143A
+SCRTRN EQU     $14B8
+SCRTR0 EQU     $14BF
+P1SW   EQU     $1515
+P2SW   EQU     $151F
+PCHEK  EQU     $153A
+BSET   EQU     $154D
+BONUS  EQU     $1568
+SHELLP EQU     $1707
+BMBOUT EQU     $170C
+FBOUT  EQU     $174B
+YLBOUT EQU     $177F
+YLBP1  EQU     $17AA
+BKIL   EQU     $17B6
+REV    EQU     $17E2
+SBOMB  EQU     $180C
+SBRET  EQU     $2696   RETURN OF SMART BOMB [OCVECT,X] CALL.
+HYPER  EQU     $1872
+KILLNO EQU     $1935
+STCHK  EQU     $1938
+STCHK0 EQU     $1939
+STCHKA EQU     $193C
+MAKEP  EQU     $1943
+GOFFTB EQU     $1952
+SCLEAN EQU     $1972
+ONSG   EQU     $198F
+OF812  EQU     $1A86
+SGPIC  EQU     $1AD2
+GETALT EQU     $1AFC
+TIEST  EQU     $1B13
+KILOFF EQU     $1C71
+KILP01 EQU     $1C77
+KILPOS EQU     $1C80
+KILOS  EQU     $1C87
+EXST   EQU     $1C9E
+TIECOL EQU     $1CA8
+CBOMB  EQU     $1CCF
+ON75   EQU     $1CFE
+ON85   EQU     $1D22
+ON65   EQU     $1D10
+ON35   EQU     $1D73
+OFF35  EQU     $1D85
+OFF75  EQU     $1D93
+OFF65  EQU     $1DA1
+OFF85  EQU     $1DAF
+OFF45  EQU     $1DE9
+IVDISP EQU     $1DF7
+LDISP  EQU     $1E35
+TDISP  EQU     $1E96
+SBDISP EQU     $1ECB
+BORDER EQU     $1F69
+CRTAB  EQU     $1FD2
+PACTAB EQU     $1FE2
+SCZP1  EQU     $1FF2
+ASXP1  EQU     $1FFC
+SWXP1  EQU     $2006
+NULOB  EQU     $2010
+PRBP1  EQU     $201B
+ASTP1  EQU     $2025
+ASTP2  EQU     $202F
+ASTP3  EQU     $2039
+ASTP4  EQU     $2043
+TIEP1  EQU     $204D
+BMBP1  EQU     $207F
+BMBP2  EQU     $2089
+SWPIC1 EQU     $209F
+PLAPIC EQU     $20A9
+PLBPIC EQU     $20B3
+SBPIC  EQU     $20BD
+C25P1  EQU     $20C1
+C5P1   EQU     $20CB
+BMBD10 EQU     $24B7
+BMBD20 EQU     $24C3
diff --git a/ET13.SRC b/ET13.SRC
new file mode 100755 (executable)
index 0000000..c01e46c
--- /dev/null
+++ b/ET13.SRC
@@ -0,0 +1,602 @@
+       NLIST
+       INCLUDE SPHR56.SRC
+       INCLUDE EQ4.SRC
+       LIST
+       TTL     <<<<<  S T A R G A T E  >>>>>
+*
+*DATA STRUCTURE
+*VARIABLES
+       ORG     BGSAV
+BGLXX  RMB     2       OLDIE
+SSTACK RMB     2       TEMP STACK SAVE
+TTBLP  RMB     2       OUTPUT TABLE POINTER
+TDPTR  RMB     1       DATA TABLE PTR OFFSET
+TCNT   RMB     1       NIBBLE COUNTER DATA TABLE $FF=HN,0=LN
+TOFF0  RMB     1       ALT OFFSET FLAV0
+TOFF1  RMB     1       ALT OFFSET FLAV1
+SCFLG  RMB     1       SCROLL DIRECTION 0=RT.,$FF=LFT.
+*
+*VECTORS
+*
+       ORG     BGORG
+       JMP     BGI     INIT TERRAIN
+       JMP     BGO     OUTPUT TERRAIN
+       JMP     BGE     ERASE TERRAIN
+       JMP     LEDEX   PLAYER EXPLOSION
+*
+*TERRAIN INITIALIZE
+*
+BGI    LDX     #$D004
+       LDA     STATUS
+       BMI     BGI$$1
+       CLRA
+BGI$$2 ADDA    ,X
+       LEAX    $9,X
+       CMPX    #$F000
+       BLO     BGI$$2
+       CMPA    #$56    THIS
+       BEQ     BGI$$1
+       LDB     HSEED
+       CMPB    #$16
+       BHI     BGI$$1
+       LDB     SEED
+       LDA     #$9C
+       TFR     D,Y
+       COM     ,Y
+BGI$$1 JSR     BGALT   INIT ALTITUDE TABLE
+       JSR     BGSI    INIT ERASE TABLE
+       LDX     #TERTF0 SETUP OUTPUT TABLE CURSOR
+       STX     TTBLP
+       LDA     #$E0
+       STA     TOFF0   ALT OFFSETFLAV 0
+       LDB     #1
+       LDA     TDATA0  CALC OFFSET FLAV 1
+       ASLA
+       BCS     BGI1
+       NEGB
+BGI1   ADDB    #$E0
+       STB     TOFF1
+       LDA     #$FF
+       STA     TCNT    NIBBLE COUNT
+       LDA     #$80    DATA TABLE OFFSET
+       STA     TDPTR
+       CLR     SCFLG   SCROLLING RT.
+*SCROLL RT. 1ST SCREEN
+       LDA     #$4D
+       STA     SSTACK
+BGI2   JSR     SCROLR
+       DEC     SSTACK
+       BNE     BGI2
+*SCROLL TO BGL
+       LDX     #0
+       STX     SSTACK
+BGISC  LDX     SSTACK
+       LEAX    $80,X
+       BEQ     BGIX    NO INFINITE LOOP
+       STX     SSTACK
+       CMPX    BGL
+       BHS     BGIX
+       JSR     SCROLR
+       BRA     BGISC
+BGIX   LDD     BGL
+       ANDB    #$80
+       STD     BGLXX   INIT OLDIE
+       RTS
+*
+*ALTITUDE TABLE INIT
+*
+BGALT  LDX     #TDATA0
+       LDU     #ALTBL
+       LDB     #$E0    INIT ALT
+       STB     ,U+     FIRST ONE
+ALTLP  LDY     #4      BIT COUNTER
+       LDA     ,X+
+ALT0   ASLA
+       BCC     ALT1
+       INCB
+       BRA     ALT2
+ALT1   DECB
+ALT2   ASLA
+       BCC     ALT3
+       INCB
+       BRA     ALT4
+ALT3   DECB
+ALT4   CMPU    #ALTBL+$400
+       BEQ     ALTX
+       STB     ,U+
+       LEAY    -1,Y
+       BNE     ALT0
+       BRA     ALTLP
+ALTX   RTS
+*
+*ERASE TABLE INIT
+*PUT 0-99 IN ERASE TABLE MSB`S
+*
+BGSI   LDX     #STBL
+       CLRA
+       CLRB
+BGSI1  STD     ,X++
+       INCA
+       CMPA    #$99
+       BLS     BGSI1
+       RTS
+*
+*TERRAIN ERASE
+*
+BGE    CLRA
+       CLRB
+       LDX     #STBL
+BGE1   STD     [,X++]
+       CMPX    #STBL+$9A*2
+       BNE     BGE1
+       RTS
+*
+*TERRAIN OUTPUT
+*
+BGO    LDD     BGL
+       ANDB    #$80    SCROLL?
+       SUBD    BGLXX
+       ASLB
+       ROLA            A=DELTA CNT
+       BEQ     TOUT    NO SCROLL
+       STA     SSTACK  SAVE IT
+       BMI     BGT10   SCROLL LFT.
+*SCROLL RT.
+       LDA     SCFLG
+       BPL     BGT1    NO DIR CHANGE
+       JSR     RCHG    CHANGE DIR
+BGT1   JSR     SCROLR  SCROLL `EM
+       DEC     SSTACK
+       BNE     BGT1
+       BRA     TOUT0   GO DO IT
+*SCROLL LFT.
+BGT10  LDA     SCFLG
+       BMI     BGT11   NO CHANGE
+       JSR     LCHG
+BGT11  JSR     SCROLL
+       INC     SSTACK
+       BNE     BGT11
+TOUT0  LDD     BGL     NEW OLDIE
+       ANDB    #$80
+       STD     BGLXX
+*TERRAIN OUTPUT INIT
+TOUT   STS     SSTACK  SAVE STACK
+       LDD     BGL
+       LDS     TTBLP   OUTPUT PTR
+       BITB    #$20    FLAVOR?
+       BEQ     TOUT1
+       LEAS    $9A*6,S ODD FLAVOR TABLE
+TOUT1  BITB    #$40    SKIP BYTE?
+       BEQ     TOUT2   NO
+       LEAS    3,S     YES
+TOUT2  LDX     #0
+       LDA     #9      9X16 LOOP
+       LDY     #STBL+4 SKIP TWO
+       LEAS    6,S     SKIP FIRST 2
+*OUTPUT....
+TOUT3  STX     [,Y]    ERASE OLDIE
+       PULS    B,U     GET NEW ALT&DATA
+       STB     1,Y     NEW ALT
+       STU     [,Y]    STORE NEW DATA
+*
+       STX     [2,Y]
+       PULS    B,U
+       STB     3,Y
+       STU     [2,Y]
+*
+       STX     [4,Y]
+       PULS    B,U
+       STB     5,Y
+       STU     [4,Y]
+*
+       STX     [6,Y]
+       PULS    B,U
+       STB     7,Y
+       STU     [6,Y]
+*
+       STX     [8,Y]
+       PULS    B,U
+       STB     9,Y
+       STU     [8,Y]
+*
+       STX     [10,Y]
+       PULS    B,U
+       STB     11,Y
+       STU     [10,Y]
+*
+       STX     [12,Y]
+       PULS    B,U
+       STB     13,Y
+       STU     [12,Y]
+*
+       STX     [14,Y]
+       PULS    B,U
+       STB     15,Y
+       STU     [14,Y]
+*
+       STX     [16,Y]
+       PULS    B,U
+       STB     17,Y
+       STU     [16,Y]
+*
+       STX     [18,Y]
+       PULS    B,U
+       STB     19,Y
+       STU     [18,Y]
+*
+       STX     [20,Y]
+       PULS    B,U
+       STB     21,Y
+       STU     [20,Y]
+*
+       STX     [22,Y]
+       PULS    B,U
+       STB     23,Y
+       STU     [22,Y]
+*
+       STX     [24,Y]
+       PULS    B,U
+       STB     25,Y
+       STU     [24,Y]
+*
+       STX     [26,Y]
+       PULS    B,U
+       STB     27,Y
+       STU     [26,Y]
+*
+       STX     [28,Y]
+       PULS    B,U
+       STB     29,Y
+       STU     [28,Y]
+*
+       STX     [30,Y]
+       PULS    B,U
+       STB     31,Y
+       STU     [30,Y]
+*
+       LEAY    32,Y
+       DECA
+       LBNE    TOUT3
+*
+*GET LAST 4
+*
+       STX     [,Y]
+       PULS    B,U
+       STB     1,Y
+       STU     [,Y]
+*
+       STX     [2,Y]
+       PULS    B,U
+       STB     3,Y
+       STU     [2,Y]
+*
+       STX     [4,Y]
+       PULS    B,U
+       STB     5,Y
+       STU     [4,Y]
+*
+       STX     [6,Y]
+       PULS    B,U
+       STB     7,Y
+       STU     [6,Y]
+*
+       LDS     SSTACK  RESTORE
+       RTS
+*
+*CHANGE TO RT. SCROLL
+*
+RCHG   COM     SCFLG   CHGE DIR FLAG
+       LDA     TDPTR   CALC NEW DATA PTR
+RCHG1  ADDA    #$27
+       STA     TDPTR
+       LDX     TTBLP
+       LEAX    $99*3,X GET RT. MOST ENTRY
+       LDA     1,X     CHECK SKEW
+       LDB     ,X
+       ANDA    #$0F    0110?
+       BNE     RCHG2   YES 0 SKEW
+       INCB
+RCHG2  STB     TOFF0   FLAV 0
+*FLAVOR 1
+       LDA     $9A*6+1,X
+       LDB     $9A*6,X GET ALT
+       ANDA    #$0F    0110?
+       BNE     RCHG3   YES 0 SKEW
+       INCB
+RCHG3  STB     TOFF1
+       RTS
+*
+*CHANGE TO LEFT SCROLL
+*
+LCHG   COM     SCFLG
+       LDA     TDPTR   GET DATA PTR
+LCHG1  SUBA    #$27
+       STA     TDPTR   NEW DATA PTR
+       LDX     TTBLP   CALC NEW ALT OFFSET
+       LDA     1,X     SKEW
+       LDB     ,X      GET ALT
+       ANDA    #$0F    1001?
+       BEQ     LCHG2   YES 0 SKEW
+       INCB
+LCHG2  STB     TOFF0
+*CALC SKEW FLAVOR 1
+       LDA     $9A*6+1,X
+       LDB     $9A*6,X
+       ANDA    #$0F    1001?
+       BEQ     LCHG3   YES 0 SKEW
+       INCB
+LCHG3  STB     TOFF1
+       RTS
+*
+*SCROLL LFT. 1 NIBBLE
+*
+SCROLL LDX     #TDATA0+$80
+       LDB     TDPTR
+       LDD     B,X
+       ASLB            1 MORE SHIFT TO THE LEFT
+       ROLA
+       ASLB
+       ROLA
+       TFR     A,B
+       RORA            FLAVOR 1
+       COM     TCNT
+       BMI     SCL1
+       LSRA
+       LSRA
+       LSRA
+       LSRA
+       LSRB
+       LSRB
+       LSRB
+       LSRB
+       DEC     TDPTR
+SCL1   ANDA    #$F
+       ANDB    #$F
+       LDX     #SCLTAB
+       ASLA
+       ASLA
+       ASLA    X8
+       ASLB
+       ASLB
+       ASLB    X8
+       LEAY    B,X     FLAV 1
+       LEAX    A,X     FLAV 0
+       LDU     TTBLP
+       LEAU    -6,U
+       CMPU    #TERTF0 END OF TABLE?
+       BHS     SCL3
+       LDU     #TERTF0+$98*3 HYPER PTR
+SCL3   STU     TTBLP   NEW INDEX
+       LDD     2,X
+       ADDB    TOFF0
+       STD     2,U
+       STD     $9A*3+2,U
+       LDD     ,X
+       ADDA    3,U     OFFSET
+       ADDA    7,X     SKEW1
+       STD     ,U
+       STD     $9A*3,U
+       ADDA    6,X
+       STA     TOFF0   NEW OFFSET
+       LDD     4,X
+       STD     4,U
+       STD     $9A*3+4,U
+       LEAX    $9A*6,U FLAV1 PTR
+       LDD     2,Y
+       ADDB    TOFF1
+       STD     2,X
+       STD     $9A*3+2,X
+       LDD     ,Y
+       ADDA    3,X     OFFSET
+       ADDA    7,Y     SKEW1
+       STD     ,X
+       STD     $9A*3,X
+       ADDA    6,Y
+       STA     TOFF1
+       LDD     4,Y
+       STD     4,X
+       STD     $9A*3+4,X
+       RTS
+*
+*SCROLL RT. 1 NIBBLE
+*
+SCROLR LDX     #TDATA0+$80
+       LDB     TDPTR
+       LDD     B,X
+       ASLB
+       ROLA
+       TFR     A,B     FLAV1
+       RORA    FLAV0
+       COM     TCNT
+       BMI     SCR1
+       LSRA
+       LSRA
+       LSRA
+       LSRA
+       LSRB
+       LSRB
+       LSRB
+       LSRB
+       BRA     SCR2
+SCR1   ANDA    #$F
+       ANDB    #$F
+       INC     TDPTR
+SCR2   LDX     #SCRTAB
+       ASLA
+       ASLA
+       ASLA
+       ASLB
+       ASLB
+       ASLB
+       LEAY    B,X     FLAV1
+       LEAX    A,X     FLAV0
+       LDU     TTBLP
+       LDD     ,X
+       ADDA    TOFF0
+       STD     ,U
+       STD     $9A*3,U
+       LDD     2,X
+       ADDB    ,U      OFFSET
+       ADDB    6,X     SKEW1
+       STD     2,U
+       STD     $9A*3+2,U
+       ADDB    7,X     NEW OFFSET
+       STB     TOFF0
+       LDD     4,X
+       STD     4,U
+       STD     $9A*3+4,U
+       LEAX    $9A*6,U FLAV1 PTR
+       LDD     ,Y
+       ADDA    TOFF1
+       STD     ,X
+       STD     $9A*3,X
+       LDD     2,Y
+       ADDB    ,X      OFFSET1
+       ADDB    6,Y     SKEW1
+       STD     2,X
+       STD     $9A*3+2,X
+       ADDB    7,Y
+       STB     TOFF1
+       LDD     4,Y
+       STD     4,X
+       STD     $9A*3+4,X
+       LEAU    6,U
+       CMPU    #$9A*3+TERTF0 CHECK WRAP
+       BLO     SCR3
+       LDU     #TERTF0
+SCR3   STU     TTBLP
+       RTS
+*
+*SCROLL RIGHT TABLE
+*DH1,DATA1,DH2,DATA2,SKEW1,SKEW2
+*$0770=0 SKEW, $7007= 1 SKEW
+*
+SCRTAB EQU     *
+       FCB     $FE,$07,$70,$FE,$07,$70,$00,$00 0000
+       FCB     $FE,$07,$70,$FF,$70,$07,$00,$01 0001
+       FCB     $FE,$07,$70,$00,$07,$70,$00,$00 0010
+       FCB     $FE,$07,$70,$01,$70,$07,$00,$01 0011
+       FCB     $FF,$70,$07,$FE,$07,$70,$01,$00 0100
+       FCB     $FF,$70,$07,$FF,$70,$07,$01,$01 0101
+       FCB     $FF,$70,$07,$00,$07,$70,$01,$00 0110
+       FCB     $FF,$70,$07,$01,$70,$07,$01,$01 0111
+       FCB     $00,$07,$70,$FE,$07,$70,$00,$00 1000
+       FCB     $00,$07,$70,$FF,$70,$07,$00,$01 1001
+       FCB     $00,$07,$70,$00,$07,$70,$00,$00 1010
+       FCB     $00,$07,$70,$01,$70,$07,$00,$01 1011
+       FCB     $01,$70,$07,$FE,$07,$70,$01,$00 1100
+       FCB     $01,$70,$07,$FF,$70,$07,$01,$01 1101
+       FCB     $01,$70,$07,$00,$07,$70,$01,$00 1110
+       FCB     $01,$70,$07,$01,$70,$07,$01,$01 1111
+*
+*SCROLL LEFT TABLE
+*DH1,DATA1,DH2,DATA2,SKEW1,SKEW2
+*$0770= 1 SKEW, $7007 =0 SKEW
+SCLTAB EQU     *
+       FCB     $01,$07,$70,$01,$07,$70,$01,$01 0000
+       FCB     $01,$07,$70,$FF,$07,$70,$01,$01 0001
+       FCB     $01,$07,$70,$00,$70,$07,$01,$00 0010
+       FCB     $01,$07,$70,$FE,$70,$07,$01,$00 0011
+       FCB     $FF,$07,$70,$01,$07,$70,$01,$01 0100
+       FCB     $FF,$07,$70,$FF,$07,$70,$01,$01 0101
+       FCB     $FF,$07,$70,$00,$70,$07,$01,$00 0110
+       FCB     $FF,$07,$70,$FE,$70,$07,$01,$00 0111
+       FCB     $00,$70,$07,$01,$07,$70,$00,$01 1000
+       FCB     $00,$70,$07,$FF,$07,$70,$00,$01 1001
+       FCB     $00,$70,$07,$00,$70,$07,$00,$00 1010
+       FCB     $00,$70,$07,$FE,$70,$07,$00,$00 1011
+       FCB     $FE,$70,$07,$01,$07,$70,$00,$01 1100
+       FCB     $FE,$70,$07,$FF,$07,$70,$00,$01 1101
+       FCB     $FE,$70,$07,$00,$70,$07,$00,$00 1110
+       FCB     $FE,$70,$07,$FE,$70,$07,$00,$00 1111
+*
+* TERRAIN FLAVOR 0 DATA TABLE
+*
+TDATA0 FCB     $55,$40,$00,$00,$00,$00,$3F,$FF,$FF,$FF,$FC,$00,$07,$FF,$FF,$D3
+       FCB     $D5,$54,$79,$C7,$55,$4D,$55,$4A,$AB,$24,$00,$0A,$A8,$00,$0A,$A8
+       FCB     $00,$0A,$AB,$FF,$F5,$57,$FF,$F5,$57,$FF,$F6,$CD,$55,$AD,$69,$AA
+       FCB     $AA,$AA,$AA,$AE,$21,$BA,$AA,$AA,$00,$0F,$FE,$A8,$08,$81,$01,$FF
+       FCB     $80,$2A,$00,$05,$12,$51,$DB,$77,$BF,$BF,$EF,$FF,$F5,$55,$55,$55
+       FCB     $54,$15,$55,$55,$F5,$55,$50,$3A,$AA,$8E,$6A,$AA,$7D,$55,$02,$EA
+       FCB     $A8,$80,$3A,$AA,$8F,$FB,$7C,$A4,$76,$40,$10,$00,$03,$E2,$08,$BB
+       FCB     $14,$00,$80,$D3,$FF,$FD,$E2,$FE,$D5,$5F,$A1,$A5,$6C,$07,$00,$04
+       FCB     $00,$D0,$00,$0A,$08,$00,$01,$D4,$3F,$FF,$FF,$FF,$FE,$FF,$FF,$7F
+       FCB     $FC,$FF,$FE,$AA,$87,$EA,$AA,$81,$F0,$AA,$AA,$AA,$8F,$AA,$AA,$83
+       FCB     $C0,$7F,$F5,$55,$55,$55,$55,$55,$55,$55,$55,$40,$AC,$10,$8C,$04
+       FCB     $02,$20,$03,$F7,$FF,$FE,$F9,$AA,$C2,$77,$8E,$00,$00,$00,$02,$7B
+       FCB     $DF,$FF,$DF,$FE,$FF,$AA,$AA,$07,$D5,$55,$50,$7E,$AA,$AA,$AA,$A8
+       FCB     $1A,$AA,$AB,$7A,$AA,$80,$0E,$AA,$AA,$FC,$8F,$E3,$A5,$35,$55,$55
+       FCB     $55,$55,$55,$43,$AA,$AA,$3E,$AA,$A8,$1D,$55,$55,$54,$7E,$AA,$86
+       FCB     $A5,$55,$69,$55,$55,$55,$2A,$AB,$26,$A3,$8C,$00,$00,$0F,$FF,$FF
+       FCB     $55
+*
+* LINKY PLAYER EXPLOSION
+*
+
+LEDEX  PULS    D       GET RETURN ADDRESS
+       STD     PD+6,U  SAVE IN CONVENTIONAL SPOT
+       STX     PD+3,U  SAVE EXPLOSION UPPER LEFT
+       TFR     X,D     POINT TO EXPLODE
+       JSR     GETOB   GET A PLACEBO OBJECT
+       STX     PD,U    SAVE PHONEY OBJECT.
+       STB     OY16,X  SAVE THE 16 BIT Y
+       LSRA            X ADDRESS IN BYTE...SHOUL HAVE 6 FRACS. IN WORLD COORDS
+       RORB
+       LSRA
+       RORB            DONE.
+       ADDD    BGL     ADD LEFT
+       STD     OX16,X  OK SO FAR.
+       LDD     #PHAPIC WHICH PHONEY PICTURE??
+       TST     NPLAD
+       BPL     LEDEX0  FACING RIGHT...OK
+       LDD     #PHBPIC FACING LEFT
+LEDEX0 STD     OPICT,X SAVE PICTURE
+       LDA     #13     13 BLOWS
+       STA     PD+2,U  PLACE TO COUNT EM.
+       MAKP    COLR    GET THE LASER COLOR ROLLING
+       MAKP    CBOMB   AND THE BOMB COLOR
+       MAKP    TIECOL  AND THE TIE COLOR
+LEDEX1 LDX     PD,U    GET OBJECT
+       LDA     LSEED   TRY LEFT SEED
+       ANDA    #$7     3 BITS FOR RANDOM X DEFLECTION
+       LDB     HSEED
+       ANDB    #$03    2 BITS OF RANDOM Y DEFLECTION
+       INCB            CENTER THE 4 PIXEL RANGE
+       ADDD    PD+3,U  ADD UPPER LEFT
+       STD     CENTMP  AND PUT AWAY
+       JSR     XSVCT   GO AND DO IT SAM
+       DEC     PD+2,U
+       BEQ     LEDEX2
+       NAP     1,LEDEX1
+LEDEX2 NAP     $60,LEDEX3
+LEDEX3 JMP     [PD+6,U] AND RETURN
+
+PHAPIC FCB     8,6
+       FDB     PLAD10,PLAD10
+       FDB     ON86,OFF86
+
+PHBPIC FCB     8,6
+       FDB     PLAD20,PLAD20
+       FDB     ON86,OFF86
+
+PLAD10 FDB     $0009,$1101,$11F1
+       FDB     $1119,$ADDD,$A91F
+       FDB     $1910,$9AAF,$A911
+       FDB     $0119,$A911,$A9F1
+       FDB     $0011,$911A,$A91A
+       FDB     $0001,$9F1A,$91F1
+       FDB     $0000,$19F1,$111A
+       FDB     $0000,$01F9,$1A19
+PLAD20 FDB     $0000,$001A,$11A9
+       FDB     $0000,$11A1,$A1A9
+       FDB     $0000,$111F,$F1A9
+       FDB     $0001,$1919,$A101
+       FDB     $01A1,$9119,$A9F1
+       FDB     $1111,$9AFD,$AA11
+       FDB     $1011,$9ADF,$A9F1
+       FDB     $1019,$1FA0,$19A0
+
+       ORG     $3237
+       FCB     $02     MATCH THE PROMS!!!!!
+
+       END 
diff --git a/INFORM.SRC b/INFORM.SRC
new file mode 100755 (executable)
index 0000000..07f500c
--- /dev/null
@@ -0,0 +1,63 @@
+
+       HOW TO DEAL WITH THIS STARGATE MESS
+
+       1) ALL FILES HAVE A NUMBER SUFFIX.   THIS IS THE
+              BACKUP IDENTIFICATION NUMBER OF THE FILE.
+              THESE NUMBERS WILL NOT BE REFERRED TO HERE.
+
+       2) THERE IS A MASTER EQUATE FILE CALLED SPHR.  FOR
+              *ALL* ASSEMBLIES IT MUST PRECEDE THE REST OF
+              THE CODE.
+
+       3) THE 'BACKROUND' SYSTEM IS COMPOSED OF THE FILES
+              'RA' AND 'RB'.  IT MAY NOT BE FREELY EDITED, AS
+              THE ADDRESS REFERENCES INTO IT ARE FIXED.
+
+          TO GENERATE THE BACKGROUND OBJECT, ASSEMBLE:
+
+                       SPHR56,RA37,RB37   ($0000-$26XX)
+
+
+       4) THERE IS AN EQUATE FILE CALLED 'EQ'.  IT CONTAINS EQUATES
+              FOR THE ADDRESSES IN RA,RB AND MUST BE INCLUDED  
+              AFTER SPHR, AND BEFORE THE MAIN FILE ON *ALL* OTHER
+              ASSEMBLIES. E.G:
+
+                       RASM SPHR56,EQ4,TREK5
+
+       5) THE FILES TO ASSEMBLE IN THIS MANNER ARE:
+
+
+                       SAM16      ($2700-$2B4X)
+                       ET13       ($2C00-$321X)
+                       TREK5      ($3240-$341X)
+                       TREKC5     ($3440-$371X)
+                       MESS2      ($3740-$383X)
+                       BPS15      ($3840-$453X)
+                       LMA12      ($4540-$4F1A) 
+                       YF14       ($4F40-$5AAX)
+                       DN11       ($5AD0-$5F5X)
+                       SD51       ($5F80-$6FBX;$8F00-$8F5X)
+                       TEXT31     ($7000-$8C0X)
+
+       THE OBJECTS FROM THESE ASSEMBLIES MAY BE MERGED WITH THE
+       OBJECT FROM RA,RB TO FORM A FILE FROM 0 TO 8FFF.  WE CALL
+       THIS FILE 'DD.LO'.
+
+       6)  THE FOLLOWING FILES SHOULD ALSO BE ASSEMBLED WITH
+              SPHR AND EQ:
+
+                       ATTR9      ($DA00-$DEBC)
+                       LOG11      ($D000-$D931)
+                       TESTB12    ($E000-$E933)
+                       TESTC8     ($E940-$EF14;$F400-$F4XX)
+                       TEST12     ($F480-$FFFF)
+
+       THE OBJECTS FROM THESE ASSEMBLIES MAY BE MERGED TOGETHER
+       TO FORM AN OBJECT FILE FROM D000 TO FFFF.  WE CALL THIS
+       FILE 'DDD.LO'.
+
+PAUL G. DUSSAULT 
+11/23/81
+
+
diff --git a/LMA12.SRC b/LMA12.SRC
new file mode 100755 (executable)
index 0000000..70a67b2
--- /dev/null
+++ b/LMA12.SRC
@@ -0,0 +1,1039 @@
+       NLIST
+       INCLUDE SPHR56.SRC
+       INCLUDE EQ4.SRC
+       LIST
+       TTL     <<<<<  S T A R G A T E  >>>>>
+       ORG     LMAORG
+       JMP     LNDST$
+       JMP     SCZST$
+       JMP     ASTST$
+       JMP     LEDTR$
+       JMP     SHOOT
+       JMP     SHT00
+       JMP     NITRUS
+       JMP     BOZOV$
+       FDB     ASTRO   FIXED STORED ADDRESSES
+       FDB     AFALL
+       FDB     ASTKIL
+       FDB     LNDP1
+       JMP     PHST    PHONY LANDER START
+*
+*START ASTROS
+*A=#
+*B=BIT 6,7 OF XADDR
+ASTST$ PSHS    D
+       STA     XTEMP+1
+ASTST1 OBI     ASTP1,ASTKIL,$6666
+       JSR     RAND
+       LDD     HSEED
+       ANDA    #$1F
+       ADDA    1,S
+       STD     OX16,X
+       LSRB
+       BCC     ASTS2
+       LDD     #ASTP3  OPPOSITE DIRECTION
+       STD     OPICT,X
+ASTS2  LDA     #$E0
+       STA     OY16,X
+       LDA     #$10
+       STA     OTYP,X  NON COLLIDE
+       CLRD
+       STD     OYV,X
+       STD     OXV,X
+       STD     OBJID,X
+       STX     OPTR
+       STX     ,Y++
+       DEC     XTEMP+1
+       BNE     ASTST1
+       PULS    D,PC
+*
+*KILL ASTRO
+*X=OBJECT
+ASTKIL LDA     PCFLG   PLAYER?
+       BNE     NOKILL
+ASTK1  BSR     ASTCLR
+       JSR     KILOFF
+       LDD     #ASXP1
+       STD     OPICT,X
+       LDD     OX16,X
+       SUBD    #$40
+       STD     OX16,X
+       JSR     XSVCT
+       LDD     #AHSND
+       JMP     SNDLD
+AKIL1  LDU     OBJID,X
+       BEQ     ASTKIL  NOT FALLING
+       LDD     PADDR,U 1ST TIME
+       CMPD    #AFALL2
+       BEQ     NOKILL
+       LDA     PCFLG
+       BEQ     AKIL10  SHOT
+       LDD     #ACSND
+       JSR     SNDLD
+       PSHS    X
+       MAKP    PPAC    DO THE INCREASING CATCH STUFF.
+       LEAY    ,X
+       PULS    X
+       STX     PD,Y    ASTRO OBJ-500 ROUTINE
+AKIL2  LDD     #AFALL2
+       STD     PADDR,U
+NOKILL CLRA
+       PULS    D,PC
+AKIL10 BSR     ASTK1
+       JMP     KILLOP
+*
+*CLEAR ASTRO FROM LIST
+*
+ASTCLR LEAY    ,X
+ASTC0  PSHS    X,U,A
+       TST     STATUS  NO ATTRACT KILL
+       BMI     ASTCX
+       LDU     #TLIST
+       LDA     #(TLEND-TLIST)/2
+ASTC1  CMPY    ,U++
+       BEQ     ASTC2
+       DECA
+       BNE     ASTC1
+       JSR     ERROR
+ASTC2  CLRD
+       STD     -2,U
+       DEC     ASTCNT
+       BNE     ASTCCX
+       MAKP    TERBLO  BLOW UP TERRAIN
+       PULS    X,U,PC,A
+ASTCCX LDB     ASTCNT  LOOK AT COUNT
+       CMPB    #3      FEW??
+       BHI     ASTCX   NOPE..BYE
+       LDX     #ASFMES FEW AST MESSAGE
+       JSR     MESLDV  TRY AND SEND IT.
+ASTCX  PULS    X,U,PC,A
+*
+ASFMES FCB     $E0,CLEAR,$C0,FEWM
+*
+*TERRAIN BLOW PROCESS
+*
+TERGL1 LDB     STATUS
+       BITB    #$74
+       BEQ     TERGL2
+TERGL3 NAP     $4,TERGL1
+TERGL2 NAP     $4,TERBLO
+
+TERBLO LDB     STATUS
+       BITB    #$74    HYPER OR STAR GATE OR SOMETHING
+       BNE     TERGL3  YEP...STOP RIGHT THERE...
+       ORB     #$06    LET SAM CLEAN UP OR GET OUT OR WHATEVER.
+       STB     STATUS
+TBL2   LDX     SPTR    TRASH BULLETS.
+       BEQ     TBL3
+       JSR     KILSHL
+       BRA     TBL2
+TBL3   LDB     #$C0    TIME TO SLEEP
+       BSR     NITRUS  PUT THE BOYS TO SLEEP NOW
+       NAP     1,TBL4  LET THE SAM ROUTINE CLEANUP
+TBL4   LDX     #IPTR   FIND END OF ILIST
+TBBL3  LDY     ,X      GET NEXT.
+       BEQ     TBBL4   FOUND IT
+       LEAX    ,Y      MOVE BACK TO X
+       BRA     TBBL3
+TBBL4  LDY     OPTR    GET ON SCREEN LIST
+       STY     ,X      APPEND TWO LISTS.
+       LDD     #0
+       STD     OPTR    AND CLEAR THE ACTIVE ONE.
+       JSR     SCRCLR  CLEAR THE ENTIRE SCREEN
+       INC     SAMEXC  NOW LOCK HIM OUT
+       JSR     BLOWV   DO THE EFFECT PLEASE
+       JSR     SCLEAN  CLEAN UP SAMRAM
+       JSR     SCRCLR  CLEAR THE STUFF AWAY.
+       JSR     TDISPV  PUT THE TOP STUFF BACK
+       CLR     PD,U    PARAMETER TO INDICATE WHICH LIST
+       LDX     #IPTR   MAKE SURE INACTIVE GUYS FAR AWAY
+       BSR     HYPEM
+       INC     PD,U
+       LDX     #OPTR
+       BSR     HYPEM
+       JSR     OSCAN   REFORM LIST
+       LDA     STATUS
+       ANDA    #$FB
+       STA     STATUS  REMOVE SAM INHIBITION
+       JMP     SUCIDE
+
+NITRUS LDX     ACTIVE
+TBL5   LDA     PTYPE,X GET TYPE
+       CMPA    #CTYPE  COIN??
+       BEQ     TBL6
+       CMPA    #DTYPE  DEATH??
+       BEQ     TBL6    THEN NO DELAY
+       CMPA    #LTYPE  LASER??
+       BEQ     TBL6
+       CMPA    #SBTYPE
+       BEQ     TBL6
+       STB     PTIME,X MAKE MAX TIME FOR NON COINS
+TBL6   LDX     ,X
+       BNE     TBL5
+       RTS
+
+HYPEM  LDX     ,X      GET THE NEXT MAN.
+       BEQ     HYPEMX  BYE
+       LDD     OX16,X  CHECK POSITION
+       SUBD    BGL     ON SCREEN???
+       ADDD    #100*32 OR EVEN NEARBY??
+       CMPD    #500*32
+       BHS     HYPEM   NOPE....MOVE TO NEXT
+       LDD     OPICT,X DON HYPER STARGATES.
+       CMPD    #SGPIC
+       BEQ     HYPEM   GOOD BOY ROVER
+       LDD     OX16,X
+       ADDD    #$8000  TRIP TO THE SPACE WARS
+       STD     OX16,X
+       TST     PD,U    WHICH LIST??
+       BEQ     HYPEM   INACTIVE.....LEAVE ALONE..
+       LDD     OBJX,X  GET COORDINATE
+       BEQ     HYPEM   NOT THERE
+       LDY     OPICT,X GET PICTURE
+       JSR     [OBJDEL,Y] AND CAN IT.
+       BRA     HYPEM   AND LOOP
+HYPEMX RTS
+*
+*ASTRONAUT PROCESS
+*WALK ON TERRAIN
+*PD =CURRENT INDEX TO TLIST
+*
+ASTRO  LDX     PD,U
+       LEAX    2,X
+       CMPX    #TLEND
+       BLO     ASTRO1
+       LDX     #TLIST
+ASTRO1 STX     PD,U
+       LDX     ,X
+       BEQ     ASTX    NOONE THERE
+       LDD     OBJX,X  ON SCREEN?
+       BEQ     ASTX    NOPE
+       LDD     OCVECT,X
+       CMPD    #ASTKIL
+       BNE     ASTX    CAPTURED
+       LDD     OPICT,X
+       CMPD    #ASTP2
+       BHI     ASTR    WALKING TO RIGHT
+*WALKING TO LEFT
+       LDA     SEED
+       CMPA    #8
+       BLS     ASTRX1  TURN AROUND
+       JSR     GETALT
+       ADDA    #4
+       CMPA    #$E8
+       BLS     ASTL1
+       LDA     #$E8
+ASTL1  LDB     #1
+       CMPA    OY16,X
+       BEQ     ASTL3
+       BHI     ASTL2
+       NEGB
+ASTL2  ADDB    OY16,X
+       STB     OY16,X  UP/DOWN
+ASTL3  LDU     OPICT,X TOGGLE IMAGE
+       LEAU    OBJL,U
+       CMPU    #ASTP2
+       BLS     ASTLX2
+ASTLX1 LDU     #ASTP1
+ASTLX2 LDB     #-$20   MOVE LEFT
+       BRA     ASTX1
+*WALKING TO RIGHT
+ASTR   LDA     SEED
+       CMPA    #$8
+       BLS     ASTLX1  TURN AROUND
+       JSR     GETALT
+       ADDA    #15
+       CMPA    #$E8
+       BLS     ASTR1
+       LDA     #$E8
+ASTR1  LDB     #1
+       CMPA    OY16,X
+       BEQ     ASTR3
+       BHI     ASTR2
+       NEGB
+ASTR2  ADDB    OY16,X
+       STB     OY16,X
+ASTR3  LDU     OPICT,X IMAGING
+       LEAU    OBJL,U
+       CMPU    #ASTP4
+       BLS     ASTRX2
+ASTRX1 LDU     #ASTP3
+ASTRX2 LDB     #$20
+ASTX1  STU     OPICT,X
+       SEX
+       ADDD    OX16,X
+       STD     OX16,X
+ASTX   NAP     2,ASTRO
+*
+*250 POINT PROCESS
+*PD=ASTRO PROCESS
+*
+P250   LDD     #$0125
+       JSR     SCORE   SCORE IT
+       LDA     OFREE   ANY OBJECTS??
+       BEQ     SUCVV   NOPE...JUST DROP DEAD
+       OBI     C25P1,NOKILL,$0000
+       LDY     PD,U    GET THE MAN OBJECT
+       LDD     OBJX,Y  IS HE ON SCREEN??
+       LBNE    P5001   YEP....HANDLE LIKE A SET DOWN
+       LDD     OX16,Y  GET THE MANS WORLD X
+       SUBD    PLABX   COMPARE TO US
+       BMI     P2501   HE OFF TO THE LEFT (HE SMALLER THAN US)
+       LDD     BGL     HE TO THE RIGHT MAKE HIM GO NEGATIVE
+       ADDD    #312*32 PUT HIM JUST RIGHT OF THE SCREEN
+       STD     OX16,X  GOOD POSITION
+       LDD     PLAXV   GET THE PLAYERS VELOCITY
+       SUBD    #2*32   TWO PIXELS PER..LESS THAN PLAYER
+       BRA     P2502
+P2501  LDD     BGL
+       STD     OX16,X
+       LDD     PLAXV
+       ADDD    #2*32   TWO PIXELS FASTER THAN THE PLAYER.
+P2502  STD     OXV,X   STORE THE VELOCITY
+       JMP     P2503   JUMP INTO THE 500 ROUTINE TO PUT THE Y
+* AND OTHER STUFF IN
+
+PPAC   LDA     MANCTR  GET THE COUNTER
+       ASLA            X 4
+       ASLA
+       CMPA    #12     MORE THAN 3 MEN?
+       BLS     PPAC1   NOPE
+       LDA     #12     3 MEN +1 IS MAX BONUS
+PPAC1  LDY     #PACTAB
+       LEAY    A,Y     POINTER OBTAINED
+       INC     MANCTR  ADD THE NEW FELLOW ON THE BANDWAGON.
+       TST     OFREE   ANY OBJECTS??
+       BEQ     SUCVV
+       JSR     GETOB   WE NEED AN OBJECT FOR THE NUMBER
+       LDD     2,Y     GET THE PICTURE FROM THE TABLE
+       STD     OPICT,X
+       STU     OBJID,X
+       LDD     #NOKILL
+       STD     OCVECT,X
+       LDD     #0
+       STD     OBJCOL,X NO BLIP
+       LDD     ,Y      GET SCORE
+       BRA     P5000
+*
+*500 POINT PROCESS
+*X=EARTHLING OBJECT
+*
+P500   JSR     WVCHKV  CHECK FOR PRO-CATCH-END OF WAVE??
+       BNE     P5103   NOPE.
+       LDY     AFALLP  CHECK FOR FALLING MEN PROCESSES
+       JSR     PCHEK
+       BNE     PROCAT  NONE IN THE AIR...GOLLY..IT MUST BE A PRO CATCH
+P5103  LDA     OFREE   OBJECTS??
+SUCVV  BEQ     SUCV
+       OBI     C5P1,NOKILL,$0000
+P5100  LDD     #$0150
+P5000  JSR     SCORE
+       LDY     PD,U
+P5001  JSR     RAND    CYCLE THE GENERATOR IN CASE OF MANY AT ONCE
+       LDB     SEED
+       ASRB            MUCH SMALLER
+       ASRB
+       ASRB
+       SEX             BIG NUMBER
+       ADDD    PLAXV   ADD SKEW TO VELOCITY
+       STD     OXV,X
+       LDD     OX16,Y
+       STD     OX16,X
+P2503  LDB     HSEED   Y SKEW......MAKE IT UPWARD
+       LDA     #$FF
+       STD     OYV,X
+       LDA     #$11
+       STA     OTYP,X
+       LDD     OY16,Y
+       BMI     P501
+       ADDD    #$1800
+       BRA     P502
+P501   SUBD    #$2000
+P502   STD     OY16,X
+       STX     OPTR
+       STX     PD,U    OBJECT INDEX
+       NAP     100,P503
+P503   LDX     PD,U
+       JSR     KILOFF
+SUCV   JMP     SUCIDE
+*
+* PRO CATCH
+*
+PROCAT JSR     GNCIDE  MAMA...OOOO....I DONT WANT TO DIE
+       LDD     #$0220  2000 POINTS
+       JSR     SCORE   AND SCORE IT
+       CLR     PCRAM+5 MAKE SURE IT IS BLACK
+       LDA     #$76
+       STA     STATUS
+       NAP     1,PROCT0
+PROCT0 LDY     PD,U
+       LDD     OBJX,Y  GET COORD OF MAN.
+       BNE     PROCT1  OK
+       LDD     #$50B0  USE DEFAULT
+PROCT1 SUBB    #$15    RAISE Y
+       SUBA    #$8     CENTER
+       TFR     D,X     MAKE IT THE CURSOR
+       JSR     PRINV   INITIALIZE STUFF
+       LDA     #PROM   PRO MESSAGE
+       JSR     WRD7V   AND PRINT THE MESSAGE
+*
+       LDD     #PROSND
+       JSR     SNDLD   DO THE SOUND
+*
+       LDA     #$18
+       STA     PD,U
+       LDD     #$800   FIRST DELAY
+       STD     PD+1,U
+PROCT3 JSR     RAND
+       ANDA    #$1F
+       LDX     #COLTAB
+       LDA     A,X
+       STA     PCRAM
+       NAP     2,PROCT4
+PROCT4 CLR     PCRAM
+       DEC     PD,U    DONE??
+       LBEQ    ENDWVV  YEP...BACK INTO GAME EXEC.
+       LDD     PD+1,U
+       CMPD    #$160
+       BHI     PROCT6
+       LDD     #$160
+PROCT6 SUBD    #$60
+       STD     PD+1,U
+       LDX     #PROCT3
+       JMP     SLEEP
+
+
+PROSND FCB     $FF,1,$30,$D,0
+*
+*SHOOT AT PLAYER
+*X=OBJECT FIRING
+*
+SHOOT  PSHS    X
+       SHL     FBOUT,BMBP1,BKIL
+SHT00  BEQ     SHOOTX  NONE LEFT
+       LDB     SEED
+       ANDB    #$1F
+       ADDB    #-$10
+       ADDB    PLAXC
+       SUBB    OBJX,X
+       SEX
+       ASLB
+       ROLA
+       ASLB
+       ROLA
+       STD     OXV,X
+       LDB     SEED    REL?
+       CMPB    #120
+       BLS     SHOOT0  NO
+       LDD     PLAXV
+       ASLB
+       ROLA
+       ASLB
+       ROLA
+       ADDD    OXV,X
+       STD     OXV,X
+SHOOT0 LDB     LSEED
+       ANDB    #$1F
+       ADDB    #-$10
+       ADDB    PLAYC
+       SUBB    OBJY,X
+       SEX
+       ASLB
+       ROLA
+       ASLB
+       ROLA
+       STD     OYV,X
+       LDA     #1      RETURN NE
+SHOOTX PULS    X,PC
+*
+*LANDER SHOOT
+*
+LSHOT  DEC     PD6,U
+       BNE     LSHTX
+       LDA     LDSTIM
+       JSR     RMAX
+       STA     PD6,U
+       BSR     SHOOT
+       BEQ     LSHTX
+       LDD     #LSHSND
+       JSR     SNDLD
+LSHTX  RTS
+*
+*START SCHITZOS
+*A=NUMBER
+*PD=X
+*PD2=SHOT TIMER
+*
+SCZST$ PSHS    A
+       STA     XTEMP
+SCZS0  MKPROB  SCZ0,SCZP1,SCZKIL,$CC33
+       BEQ     SCZSX   NOBODY LEFT
+       JSR     RAND
+       LDD     BGL
+       SUBD    #300*32
+       STD     XTEMP2
+       LDD     HSEED
+       SUBD    XTEMP2
+       CMPD    #600*32
+       BHS     SCZS1
+       ADDD    #$8000
+SCZS1  ADDD    XTEMP2  AVOID PLAYER
+       STD     OX16,X
+       LDA     SEED
+       LSRA
+       ADDA    #YMIN
+       STA     OY16,X
+       JSR     APVCT
+       INC     SCZCNT
+       DEC     XTEMP
+       BNE     SCZS0
+SCZSX  PULS    A,PC
+*KILL  SHITZO
+SCZKIL DEC     SCZCNT
+       KILP    0115,SCHSND
+       RTS
+*
+*GET TARGET FROM LIST
+*RET EQ IF NONE,D=TRG OBJECT
+*U=PROCESS
+GTARG  PSHS    X
+       LDA     ASTCNT
+       BEQ     GTX     NOBODY LEFT
+       LDX     TPTR
+GT1    LEAX    2,X
+       CMPX    #TLEND
+       BLO     GT2
+       LDX     #TLIST
+GT2    LDD     ,X
+       BNE     GT3
+       CMPX    TPTR    AROUND ONCE?
+       BNE     GT1
+       PULS    X,PC
+GT3    STX     TPTR    FOUND ONE
+       STD     PD2,U
+       STX     PD4,U
+GTX    PULS    X,PC
+*
+*START LANDERS
+*A=NUMBER
+*
+LNDST$ PSHS    A
+       STA     XTEMP
+LNDST0 TST     ASTCNT  NO MORE TARGETS
+       BNE     LNDST1
+       JMP     SCZS0
+LNDST1 MKPROB  LANDS0,LNDP1,LKILL,$4433
+       BEQ     LNDSTX  NO MO
+       JSR     RAND
+       LDD     HSEED
+       STD     OX16,X
+       LDA     #YMIN+2
+       STA     OY16,X
+       LDD     LNDYV
+       STD     OYV,X
+       LDA     LDSTIM  SHOOTING TIME
+       JSR     RMAX
+       STA     PD6,U
+       LDA     LNDXV
+       JSR     RMAX
+       TFR     A,B
+       CLRA
+       BITB    #1
+       BEQ     LNS2
+       COMB
+       COMA
+LNS2   STD     OXV,X
+       JSR     APVCT
+       BSR     GTARG
+       INC     LNDCNT
+       DEC     XTEMP
+       BNE     LNDST0
+LNDSTX PULS    A,PC
+*
+*UPDATE LANDERS OUT OF BOZO MODE
+*
+BOZOV$ PSHS    X,U,Y,D
+       LDU     #ACTIVE
+       BRA     BOZVLP
+BOZOV0 LDY     PADDR,U
+       CMPY    #LANDS0
+       BLO     BOZVLP  NOT A LANDER
+       BNE     BOZV2   NO VELOCITY
+       LDX     PD,U
+       LDA     LNDXV
+       JSR     RMAX
+       TFR     A,B
+       CLRA
+       TST     OXV,X
+       BPL     BOZV1
+       COMA
+       COMB            PRESERVE SIGN
+BOZV1  STD     OXV,X
+BOZV2  CMPY    #LANDFX NOT A LANDER
+       BHI     BOZVLP
+       LDA     LDSTIM  GET SHOT TIMER
+       JSR     RMAX
+       STA     PD6,U
+BOZVLP LDU     ,U
+       BNE     BOZOV0
+       PULS    X,Y,U,D,PC
+*
+*LANDER KIDNAP
+*PD=OBJECT,PD2=TARGET,PD4=TLIST INDEX
+*PD6=SHOT TIMER,PD7=ROTATION DIVIDER
+LANDS0 LDX     PD,U
+       LDY     PD2,U
+       LDD     [PD4,U] TARGET ALIVE?
+       BEQ     LNDSAA
+       LDA     OCVECT+1,Y
+       CMPA    #ASTKIL!.$FF
+       BNE     LNDSAA  ORBIT
+       LDA     OX16,X
+       ANDA    #$FC
+       STA     XTEMP
+       LDA     OX16,Y
+       ANDA    #$FC
+       CMPA    XTEMP   CLOSE?
+       BEQ     LANDG0  GET IM
+       BRA     LANDSA
+LNDSAA LDA     OTYP,X  HYPERABLE
+       ANDA    #$FE
+       STA     OTYP,X
+       JSR     GTARG   RE:TARGET
+       LBEQ    SCZ00   NO, FREAK
+LANDSA JSR     GETALT
+       SUBA    #50
+       SUBA    OY16,X
+       BHI     LANDS1
+       CMPA    #-20
+       BLT     LNDS1
+       CLRA
+       CLRB
+       BRA     LANDS2
+LNDS1  LDD     LNDYV
+       COMA
+       COMB
+       BRA     LANDS2
+LANDS1 LDD     LNDYV
+LANDS2 STD     OYV,X   NEW Y VEL
+       LDD     OPICT,X APPEARING?
+       CMPD    #NULOB
+       BEQ     LANDS4
+       LDA     OBJY,X
+       BEQ     LANDS4  DONT DO NOTHIN OF LOST.
+       JSR     LSHOT
+       BSR     LPSUB   CYCLE IMAGE
+       NAP     3,LNDSP1
+LNDSP1 LDX     PD,U    GET PICTURE BACK
+       BSR     LPSUB   DO THE PICTURE AGAIN
+       NAP     3,LANDS0
+*
+LANDS4 NAP 6,LANDS0
+*
+LPSUB  LDU     OPICT,X NEW PICT
+       LEAU    OBJL,U
+       CMPU    #LNDP4
+       BLS     LANDS3
+       LDU     #LNDP1
+LANDS3 STU     OPICT,X
+       RTS
+*
+*LETS GET HIM
+*
+LANDG0 CLRD
+       INC     OTYP,X  DONT HYPER ME
+       STD     OXV,X
+       STD     OYV,X
+LANDG  LDX     PD,U
+       LDY     PD2,U
+       LDD     [PD4,U]
+       LBEQ    LNDSAA  DEAD
+       LDA     OCVECT+1,Y
+       CMPA    #ASTKIL!.$FF
+       LBNE    LNDSAA  TAKEN
+       LDD     OX16,Y
+       ANDB    #$E0
+       STD     XTEMP2
+       LDD     OX16,X
+       ANDB    #$E0
+       CMPD    XTEMP2
+       BEQ     LNDG2
+       BLT     LNDG1
+       LDB     #-$20
+       BRA     LANDG1
+LNDG1  LDB     #$20
+LANDG1 SEX
+       ADDD    OX16,X
+       STD     OX16,X
+LNDG2  LDA     OY16,Y
+       SUBA    #12
+       CMPA    OY16,X
+       BEQ     LANDG3
+       LDD     LNDYV
+       BHS     LANDG2
+       COMA
+       COMB
+LANDG2 ADDD    OY16,X
+       STD     OY16,X
+LNDG20 JSR     LSHOT
+       NAP     1,LANDG
+*ARE WE ON HIM?
+LANDG3 LDD     OX16,X
+       ADDD    #$0040
+       SUBD    OX16,Y
+       CMPD    #$80
+       BHI     LNDG20  NOPE
+       LDD     #LKIL1  CHANGE KILL VECTOR
+       STD     OCVECT,X
+       LDD     LNDYV
+       COMB
+       COMA
+       STD     OYV,X   SPLIT
+       STD     OYV,Y
+       LDD     #LPKSND
+       JSR     SNDLD
+       LDD     #AKIL1
+       STD     OCVECT,Y
+*FLEE
+LANDF  LDU     CRPROC
+       LDX     PD,U
+       LDA     OY16,X
+       CMPA    #YMIN+8
+       BLS     LANDFX  ALL DONE
+       LDA     OBJY,X
+       BEQ     LANDFO
+       JSR     LSHOT
+       JSR     LPSUB   LOOK PRETTY WHILE YOUR RIPPING OFF THAT GUY
+LANDFO NAP     3,LANDF
+*PULL HIM INSIDE
+LANDFX LDD     #LSKSND
+       JSR     SNDLD
+LNDFXA LDX     PD,U
+       LDY     PD2,U
+       LDD     [PD4,U]
+       BNE     LNDFX0
+       JSR     KILOFF  GIVE UP
+       DEC     LNDCNT
+       INC     LNDRES
+       JMP     SUCIDE
+LNDFX0 CLRD
+       STD     OYV,X
+       STD     OYV,Y
+       LDA     OY16,Y
+       CMPA    OY16,X
+       BLS     LNDFX1
+       DEC     OY16,Y
+       LDA     #$12
+       JSR     SNDOUT
+       NAP     1,LNDFXA
+LNDFX1 LEAX    ,Y      KILL ASTRO
+       LDD     OBJX,Y  CENTER EARTHLING BLOW
+       ADDA    #1
+       STD     CENTMP
+       JSR     ASTK1
+SCZ00  DEC     LNDCNT
+       BNE     SCZ00$
+       LDA     LNDRES  CHECK RESERVE
+       BNE     SCZ00$  NUTS...
+       LDA     STATUS
+       BITA    #$2     THE MEN ARE GONE, SO WHO CARES??
+       BNE     SCZ00$
+       LDD     #$8FF   FAST WHITE
+       STD     MESSBL
+       LDX     #ALLLND ALL LANDER MESSAGE
+       JSR     MESLDV  AND SEND IT.
+SCZ00$ INC     SCZCNT
+       LDX     PD,U
+       CLR     OTYP,X  OK TO HYPER
+       LDD     #SCZP1
+       STD     OPICT,X
+       LDD     #$CC33
+       STD     OBJCOL,X
+       LDD     #SCZKIL
+       STD     OCVECT,X
+       LDA     SZSTIM
+       STA     PD2,U
+*
+*I AM SCHITZO I,M FEELING FINE
+*PD=OBJECT,PD2=SHOT TIME
+*
+SCZ0   LDX     PD,U
+       LDB     SZXV
+       LDY     PLABX
+       CMPY    OX16,X
+       BGE     SCZ1
+       NEGB
+SCZ1   SEX
+       STD     OXV,X   SEEK X
+       LDD     PLABX   X CLOSE?
+       SUBD    OX16,X
+       ADDD    #380
+       CMPD    #$700
+       BLS     SCZ6    SEEK Y
+       LDA     PLAYC   AVOID Y
+       SUBA    OY16,X
+       BLS     SCZ2
+       CMPA    #8
+       BHI     SCZ3
+       LDD     SZYV
+       COMA
+       COMB
+       BRA     SCZ5
+SCZ2   CMPA    #-8
+       BGT     SCZ4
+SCZ3   CLRD
+       BRA     SCZ5
+SCZ4   LDD     SZYV
+SCZ5   STD     OYV,X
+       BRA     SCZ10
+SCZ6   LDA     PLAYC   SEEK Y
+       CMPA    OY16,X
+       LDD     SZYV
+       BHS     SCZ7
+       COMA
+       COMB
+SCZ7   STD     OYV,X
+       LDD     OBJX,X
+       BEQ     SCZ12   NOT ON SCREEN
+*RANDOM        Y HOP
+SCZ10  LDB     SZRY
+       LDA     SEED
+       BMI     SCZ11
+       NEGB
+SCZ11  ADDB    OY16,X
+       CMPB    #YMIN
+       BHS     SCZ110
+       LDB     #YMAX
+SCZ110 STB     OY16,X
+       DEC     PD2,U   SHOT TIME
+       BNE     SCZ12
+       LDA     SZSTIM
+       JSR     RMAX
+       STA     PD2,U
+       JSR     SHOOT
+       BEQ     SCZ12
+       LDD     #SSHSND
+       JSR     SNDLD
+SCZ12  NAP     3,SCZ0
+*
+*KILL KIDNAPPING LANDER
+*
+LKIL1  LDU     OBJID,X GOT A PASSENGER?
+       LDD     [PD4,U]
+       BEQ     LKILL
+LKIL2  LDU     OBJID,X
+       PSHS    X
+       MAKP    AFALL   START HIM FALLING
+       LDU     PD2,U
+       STU     PD,X
+       LDD     #ASCSND
+       JSR     SNDLD   SCREAM.....
+       LDD     #0
+       STD     OYV,U
+       STX     OBJID,U
+       PULS    X
+*KILL LANDR
+LKILL  DEC     LNDCNT
+       BNE     LKILL$
+       LDA     LNDRES  CHECK RESERVES
+       BNE     LKILL$  NUTS
+       LDA     STATUS
+       BITA    #$2
+       BNE     LKILL$  MEN ALL DEAD..SO NO NEED.
+       LDD     #$8FF   FAST WHITE
+       STD     MESSBL
+       PSHS    X
+       LDX     #ALLLND ALL LANDER MESSAGE
+       JSR     MESLDV  AND SEND IT.
+       PULS    X
+LKILL$ KILP    0115,LHSND
+       RTS
+*
+ALLLND FCB     $20,CLEAR!+BLINK,$80,LNDKLM
+*
+*ASTRONAUT FALL
+*
+AFALL  LDX     PD,U
+       LDD     #8      ACCEL DOWNWARD
+       ADDD    OYV,X
+       CMPD    #$300
+       BHS     AFALL0
+       STD     OYV,X
+AFALL0 JSR     GETALT
+       CMPA    OY16,X  HIT GROUND?
+       BHI     AFALL1  NO
+       LDD     OYV,X
+       CMPD    #$E0    FATAL?
+       BLS     ALAND   NO
+       LDD     OBJX,X
+       ADDD    #$0107
+       STD     CENTMP  CENTER OF EXPLOSION
+       JSR     ASTK1
+       JMP     SUCIDE
+AFALL1 NAP     4,AFALL
+AFALL2 LDX     PD,U
+       LDD     #0
+       STD     OYV,X
+       LDA     PLAY16
+       ADDA    #10
+       STA     OY16,X
+       LDD     PLABX
+       ADDD    #$0080
+       STD     OX16,X
+       JSR     GETALT
+       CMPA    OY16,X
+       BLO     ALAND0  WERE ON THE GROUND
+       NAP     1,AFALL2
+ALAND  PSHS    X
+       LDX     #P250
+       BRA     ALND00
+ALAND0 PSHS    X
+       DEC     MANCTR  ONE SMALL STEP FOR MAN...
+       LDX     #P500
+ALND00 LDA     #STYPE
+       JSR     MKPROC
+       LEAY    ,X
+       PULS    X
+       STX     PD,Y    ASTRO OBJECT TO 500 PROC
+       LDD     #0
+       STD     OBJID,X
+       STD     OYV,X
+       LDD     #ASTKIL
+       STD     OCVECT,X
+       LDD     #ALSND
+       JSR     SNDLD
+       JMP     SUCIDE
+* SEE IF ANY MEN ON PLANET
+* BNE FOR NO MEN ON SURFACE
+
+LEDTR$ LDX     #TLIST
+LEDTG0 LDY     ,X++
+       BEQ     LEDTG1
+       LDD     OCVECT,Y GET THE MANS COLLISION VECTOR
+       CMPD    #ASTKIL
+       BEQ     LEDTG2  EXIT.....MAN ON GROUND
+LEDTG1 CMPX    #TLIST+20
+       BNE     LEDTG0
+       LDA     #1
+LEDTG2 RTS
+
+LNDP1  FCB     5,8
+       FDB     LND10,LND11
+       FDB     ON58,OFF58
+
+LNDP2  FCB     5,8
+       FDB     LND20,LND21
+       FDB     ON58,OFF58
+
+LNDP3  FCB     5,8
+       FDB     LND30,LND31
+       FDB     ON58,OFF58
+
+LNDP4  FCB     5,8
+       FDB     LND40,LND41
+       FDB     ON58,OFF58
+
+LND10  FCB     $00,$03,$30,$30,$23,$00,$03,$30
+       FCB     $23,$44,$03,$03,$33,$30,$00,$00
+       FCB     $33,$44,$30,$30,$23,$30,$30,$30
+       FCB     $20,$43,$03,$03,$33,$30,$03,$00
+       FCB     $00,$00,$30,$30,$20,$00,$00,$30
+
+LND11  FCB     $00,$00,$03,$03,$02,$00,$00,$03
+       FCB     $02,$34,$00,$00,$33,$03,$30,$00
+       FCB     $33,$44,$33,$33,$32,$03,$03,$03
+       FCB     $32,$44,$00,$00,$33,$03,$00,$00
+       FCB     $00,$30,$33,$33,$32,$00,$30,$03
+
+LND20  FCB     $00,$03,$30,$20,$33,$00,$03,$30
+       FCB     $32,$44,$33,$33,$32,$30,$00,$00
+       FCB     $33,$44,$00,$00,$33,$30,$30,$30
+       FCB     $30,$42,$33,$33,$32,$30,$03,$00
+       FCB     $00,$00,$30,$30,$30,$00,$00,$30
+
+LND21  FCB     $00,$00,$03,$02,$03,$00,$00,$03
+       FCB     $03,$34,$03,$03,$33,$03,$30,$00
+       FCB     $23,$44,$30,$30,$23,$03,$03,$03
+       FCB     $33,$44,$03,$03,$33,$03,$00,$00
+       FCB     $00,$20,$33,$33,$23,$00,$30,$03
+
+LND30  FCB     $00,$03,$23,$33,$33,$00,$03,$30
+       FCB     $33,$33,$30,$30,$23,$30,$00,$00
+       FCB     $23,$33,$03,$03,$33,$30,$30,$30
+       FCB     $30,$33,$30,$30,$23,$30,$03,$00
+       FCB     $00,$00,$20,$30,$30,$00,$00,$30
+
+LND31  FCB     $00,$00,$02,$03,$03,$00,$00,$03
+       FCB     $03,$33,$33,$33,$32,$03,$30,$00
+       FCB     $32,$33,$00,$00,$33,$03,$03,$03
+       FCB     $33,$33,$33,$33,$32,$03,$00,$00
+       FCB     $00,$30,$02,$03,$33,$00,$30,$03
+
+LND40  FCB     $00,$02,$33,$33,$32,$00,$03,$30
+       FCB     $33,$33,$00,$00,$33,$30,$00,$00
+       FCB     $32,$33,$33,$33,$32,$30,$30,$30
+       FCB     $30,$33,$00,$00,$33,$30,$03,$00
+       FCB     $00,$00,$30,$20,$30,$00,$00,$30
+
+LND41  FCB     $00,$00,$03,$03,$03,$00,$00,$03
+       FCB     $03,$23,$30,$30,$23,$03,$30,$00
+       FCB     $33,$33,$03,$03,$33,$03,$03,$03
+       FCB     $23,$33,$30,$30,$23,$03,$00,$00
+       FCB     $00,$30,$03,$02,$33,$00,$30,$03
+*
+*PHONY LANDER START
+*
+PHST   LDD     #$04C0
+       LDX     #$A000  X ADDRESS
+       PSHS    D,X
+PHSL   MKPROB  PHLND,LNDP1,LKIL2,$4433
+       TFR     X,Y
+       STX     OPTR
+       OBI     ASTP1,AKIL1,$6666
+       STX     PD2,U
+       STX     OPTR
+       CLRA
+       CLRB
+       STD     OYV,X
+       STD     OXV,X
+       STD     OXV,Y
+       LDD     2,S
+       STD     OX16,X  X COORD
+       STD     OX16,Y
+       ADDD    #$1800
+       STD     2,S     SPACING
+       LDD     #$E000
+       STD     OY16,X
+       LDA     1,S
+       STD     OY16,Y
+       SUBA    #$28
+       STA     1,S
+       LDD     #$200
+       STD     OYV,Y
+       STD     PD4,U   FOR LANDER KILLER FOOLING
+       LDA     #1
+       STA     OTYP,X
+       STA     OTYP,Y  DONT HYPER PLEASE
+       DEC     ,S
+       BNE     PHSL
+       LDA     #10
+       STA     LNDCNT
+       PULS    D,X,PC
+*
+*PHONY LANDER ROUTINE
+*PD=LANDER,PD2=GUY
+PHLND  LDX     PD,U    REV WHEN ON HIM
+       LDA     OY16,X
+       CMPA    #$D0
+       BHS     PHL1
+       NAP     1,PHLND
+PHL1   LDX     PD,U
+       LDD     #$D400
+       STD     OY16,X
+       LDD     #$FF80
+       STD     OYV,X
+       LDX     PD2,U
+       STD     OYV,X
+PHL2   NAP     60,PHL2 R.I.P.
+
+       END
diff --git a/LOG11.SRC b/LOG11.SRC
new file mode 100755 (executable)
index 0000000..b1f4bcc
--- /dev/null
+++ b/LOG11.SRC
@@ -0,0 +1,1068 @@
+       NLIST
+       INCLUDE SPHR56.SRC
+       INCLUDE EQ4.SRC
+       LIST
+       TTL     <<<<< S T A R G A T E  >>>>>
+       ORG     LOGORG
+       JMP     ATTR$
+       JMP     GOV$    GAME OVER
+       JMP     HALL
+       JMP     GNCIDA
+*
+*ATTRACT MODE
+*
+GOV$   EQU     *
+ATTR$  LDX     #CHKS2+78 HIDDEN CHECKSUM
+       LDY     #$D004
+       CLRB
+ATTR0$ ADDB    ,Y
+       LEAY    $9,Y
+       CMPY    #$F000
+       BLO     ATTR0$
+       STB     -78,X
+       NOP
+       JSR     GNCIDE
+       NEWP    CRDSCN,ATYPE
+       LDA     ATRFLG
+       BNE     HALLV   LET HIM SEE THE HALL
+       LDA     CREDIT
+       LBNE    CRDPAG
+HALLV  JMP     HALL
+*
+*KILL ALL BUT ATTR PROCESSES
+*
+GNCIDA PSHS    A,X
+       LDX     #ACTIVE
+GNC1   LDX     ,X
+       BEQ     GNCX
+       CMPX    CRPROC
+       BEQ     GNC1
+       LDA     PTYPE,X
+       CMPA    #CTYPE
+       BEQ     GNC1
+       CMPA    #ATYPE
+       BEQ     GNC1
+       JSR     KILL
+       BRA     GNC1
+GNCX   PULS    A,X,PC
+*
+*CREDIT SCANNING
+*
+CRDSCN LDA     CREDIT
+       STA     PD,U
+       CLR     PD1,U
+       CLR     PD2,U
+CRDSLP LDA     CREDIT
+       CMPA    PD,U
+       BEQ     CRDSLX
+       STA     PD,U
+       LDA     ATRFLG
+       CMPA    #$50    CREDIT PAGE??
+       BNE     CRDSL1
+       JSR     OCRDM
+       BRA     CRDSLX
+CRDSL1 JSR     GNCIDE
+       LDA     STYPE
+       LDX     #CRDPAG
+       JSR     MSPROC
+CRDSLX LDA     PIA21
+       ANDA    #$8
+       CMPA    PD1,U
+       BEQ     HALSX
+       STA     PD1,U
+       BEQ     HALSX
+       LDA     ATRFLG
+       CMPA    #$10
+       BEQ     HALSX
+       JSR     GNCIDE
+       LDA     STYPE
+       LDX     #HALL
+       JSR     MSPROC
+HALSX  LDA     PIA21
+       ANDA    #$40
+       CMPA    PD2,U
+       BEQ     SECSX
+       STA     PD2,U
+       BEQ     SECSX
+       LDA     ATRFLG
+       CMPA    #$40
+       BEQ     SECSX
+       JSR     GNCIDE
+       LDA     STYPE
+       LDX     #SECRET
+       JSR     MSPROC
+SECSX  NAP     2,CRDSLP
+*
+*CREDIT PAGE DISPLAY
+*
+CRDPAG LDA     #$50
+       STA     ATRFLG
+       LDA     #$FF
+       STA     STATUS
+       JSR     GNCIDA
+       JSR     SCRCLR
+       JSR     CRINIT
+       JSR     BORDER
+       JSR     ONCOLV
+       MAKP    OPMCOL
+       JSR     OCRDM
+       LDU     CRPROC
+       LDA     CREDIT
+       STA     PD4,U
+       LDA     #2
+       STA     PLRCNT
+       LDA     #8
+       STA     PD3,U   TIMER
+       LDX     #$14AC
+       JSR     OSEXM   OUTPUT EXTRA SHIP MESSAGE
+       LDX     #$3EE0
+       LDA     #CPM    COPYRIGHT MESSAGE
+       JSR     WRD5FV
+       LDX     #$35E8
+       LDA     #WEIM
+       JSR     WRD5FV
+       LDA     #HSCRM  HI SCOR AND SECRETS
+       LDX     #$2BCC
+       JSR     WRD5FV
+       LDX     #$33C0
+       LDA     #SECM
+       JSR     WRD5FV
+CRDP0  LDX     #NSHIP
+       JSR     RCMOSD
+       STD     PD1,U
+       LDB     FREEPL+1
+       ANDB    #$F
+       BEQ     CRDP00  NO FREE PLAY
+       CLR     PD2,U
+CRDP00 LDB     PD2,U
+       BNE     CRDP1   2 CREDIT OPTION SELECTED
+       LDX     #$3858
+       BRA     CRDP2
+CRDP1  LDX     #$5958
+       TFR     B,A
+       LDB     #2
+       JSR     CRDSB
+       LDA     PD1,U
+       LDX     #$1958
+CRDP2  LDB     #1
+       JSR     CRDSB
+CRDP3  LDA     CREDIT
+       CMPA    #1
+       BEQ     CRDP3A  NO TWO PLAYER, DONT ERASE
+       JSR     CRDWT
+       NAP     10,CRDP3A
+CRDP3A LDB     #1
+       LDX     #$3514
+       LDA     #NPSM
+       JSR     WRD7FV
+       LDA     CREDIT
+       CMPA    #2
+       BLO     CRDP4
+       LDA     PD2,U
+       BNE     CRDP4A
+CRDP4  LDA     PD1,U
+CRDP4A CLRB
+       BSR     CRDSB1
+       NAP     $80,CRDP5
+CRDP5  LDA     CREDIT
+       CMPA    #2
+       BLO     CRDP6
+       JSR     CRDWT
+       NAP     10,CRDP50
+CRDP50 LDB     #2
+       LDX     #$3514
+       LDA     #NPSM
+       JSR     WRD7FV
+       LDB     PD1,U
+       LDA     CREDIT
+       CMPA    #4
+       BLO     CRDP5A
+       TST     PD2,U
+       BEQ     CRDP5A
+       LDB     PD2,U
+CRDP5A TFR     B,A     SAME FOR BOTH PLAYERS
+       BSR     CRDSB1
+CRDP6  DEC     PD3,U   TIMER
+       LBEQ    HALL    TIME OUT
+       LDA     CREDIT
+       CMPA    PD4,U
+       BEQ     CRDP7
+       STA     PD4,U
+       LDA     #08
+       STA     PD3,U
+CRDP7  NAP     $80,CRDP3
+*
+*CREDIT PAGE DISPLAY SUBROUTINE
+*A=#SHIPS,B=#CREDIT GAME
+CRDSB  PSHS    A,X
+       LDA     #NCGM
+       JSR     WRD7FV
+       LDB     ,S
+       LDX     1,S
+       LEAX    $18,X
+       LDA     #NSHM
+       JSR     WRD7FV
+       LDX     1,S
+       LEAX    $28,X
+       LDA     #NSBM
+       JSR     WRD7FV
+       LDX     1,S
+       LEAX    $38,X
+       LDA     #NIUM
+       JSR     WRD7FV
+       PULS    A,X,PC
+*
+*PLAYER OBJECT DISPLAY SUBROUINTE
+*A=PLAYER 1 SHIP #,B=PLAYER 2
+*
+CRDSB1 STA     .P1LAS
+       STA     .P1SBC
+       PSHS    B
+       LDB     #10
+       MUL
+       STB     .P1INV
+       PULS    B
+       STB     .P2LAS
+       STB     .P2SBC
+       LDA     #10
+       MUL
+       STB     .P2INV
+       JSR     LDISP
+       JSR     SBDISP
+       JMP     IVDISP
+*
+*CREDIT START MESS OFF
+*
+CRDWT  LDD     #0
+       BSR     CRDSB1
+       LDX     #$2E13
+       LDD     #$3D08
+       JMP     BLKCLR
+*
+*OUTPUT EXTRA SHIP MESSAGE
+*X=ADDR
+OSEXM  PSHS    X
+       LDX     #REPLAY
+       JSR     RCMOSB
+       TSTB
+       BEQ     OSXMX   NO REPLAYS
+       LDX     ,S
+       LDA     #SEXM
+       JSR     WRD5FV
+OSXMX  PULS    X,PC
+*
+*OUTPUT CREDIT MESSAGE SUBROUTINE
+*
+OCRDM  LDX     #$3E40
+OCRDM1 LDB     CREDIT
+       LDA     #CREDM
+       JMP     WRD7FV
+*
+*SECRETS PAGE
+*
+SECRET LDA     #$40
+       STA     ATRFLG
+       LDA     #$FF
+       STA     STATUS
+       JSR     GNCIDA
+       LDA     #1
+       JSR     DIMV
+       JSR     SCRCLR
+       LDX     #$0E10
+       LDD     #$0801
+       JSR     OTSGM
+       LDU     CRPROC
+       LDA     #SECSM
+       LDX     #$4044
+       JSR     WRD7FV
+       LDX     #GA1+14
+       JSR     RCMOSB  GET WARPING PARAMS
+       CLRA
+       TFR     D,Y
+       JSR     RCMOSB
+       LDA     #SWRPM
+       JSR     WRD7FV
+       LDD     #$1111
+       STD     GATCL1
+       LDD     #$4444
+       STD     GATCL2
+       LDD     #$7777
+       STD     GATCL3
+       LDD     #$338F
+       JSR     ONSG
+       LDX     #$14CA
+       JSR     OSEXM
+       LDX     #$3EE0
+       JSR     OCRDM1
+       MAKP    OPMCOL
+       MAKP    LOGCOL
+       MAKP    CBOMB
+       LDU     CRPROC
+       LDD     #$1040
+       STD     PD,U
+SECR0  DEC     PD+1,U
+       BEQ     SECX    MAXIMUM TIMEOUT
+       DEC     PD,U
+       BEQ     SECR1
+SEC55  NAP     60,SECR0
+SECR1  LDA     PIA21
+       ANDA    #$40
+       BEQ     SECX
+       LDA     #1
+       STA     PD,U
+       BRA     SEC55
+SECX   LDA     CREDIT
+       BEQ     HALL
+       JMP     CRDPAG
+*
+*STARGATE IMMORTALS HALL OF FAME
+*
+HALL   LDA     #$FF
+       STA     STATUS
+       LDA     #$66
+       STA     SCNCOL
+       LDA     #$10
+       STA     ATRFLG
+       JSR     GNCIDA
+       CLRA    BECOME  A SUPER PROCESS
+       LDX     #HALL1
+       JSR     MSPROC
+       JMP     SUCIDE
+************************
+************************BEGINING OF LINKY INSERTION
+************************
+*
+HSY    EQU     $28     Y OFFSET OF ENTIRE TABLE
+HCOL1  EQU     $8
+*
+HALL1  LDX     #PCRAM  CLEAR OUT COLORS
+LHAL0  CLR     ,X+
+       CMPX    #PCRAM+16
+       BLO     LHAL0
+       JSR     PRINV
+       JSR     SCRCLR
+       JSR     SCLEAN  KILL SAM STUFF
+       MAKP    OPMCOL
+       LDA     #HSTABM PRINT BORING STUFF ON THE SCREEN
+       JSR     WRD7V
+       LDX     #SGMSP  MAKE A PROCESS TO OUTPUT THE STARGATE MESSAGE
+       CLRA
+       JSR     MSPROC  DONE
+       LDA     #$AA
+       STA     TEXCOL  MAKE GOD NAME VISIBLE
+       LDX     #GODSCR+38 POINT AT LAST LETTER
+LHAL1  JSR     RCMOSA  FETCH A LETTER
+       LEAX    -4,X    UNDO INC, AND BACKUP 1
+       CMPA    #$3A    SPACE??
+       BNE     LHAL2
+       CMPX    #GODSCR
+       BHS     LHAL1
+LHAL2  LEAX    2,X     POINT AT LAST
+       PSHS    X       PUT IT ON STACK
+       LDX     #$0E47  GODS PLACE IN THE WORLD
+       LDA     #$31
+       JSR     PR57V
+       LDA     #$5C
+       JSR     PR57V
+       LEAX    $300,X
+       LDY     #GODSCR
+LHAL3  EXG     X,Y
+       JSR     RCMOSA  GET A CHARACTER
+       EXG     X,Y
+       JSR     PR57V   PRINT IT
+       CMPY    ,S      COMPARE TO LAST
+       BLS     LHAL3   GOD NAME HAS BEEN PRINTED
+       LEAX    $200,X  SLIDE OVER 8 PIXELS
+       LDY     #GODSCR+40 POINT AT SCORE
+       LDU     #WRD7V  PRINT IN 7 HIGH
+       JSR     PRSCOR  PRINT GOD SCORE
+       LEAX    $500,X
+       LDA     #$5B
+       JSR     PR57V
+       LDY     #GODINT POINT AT INITIALS
+       LDB     #3
+LHA3$$ EXG     X,Y
+       JSR     RCMOSA
+       EXG     X,Y
+       JSR     PR57V
+       DECB
+       BNE     LHA3$$
+       LDA     #$5C
+       JSR     PR57V
+*
+* PD = CURRENT INDEX
+* PD1= ENTRIES LEFT IN THIS COLUMN
+* PD2= COLUMNS LEFT
+* PD3= CURRENT X
+* PD4= CURRENT Y
+* PD5= POINTER TO CURRENT GUY IN CMOS
+* PD7= # OF ENTRIES IN COLUMN
+*
+
+       LDU     CRPROC
+       LDA     #$2     START WITH INDEX 2
+       STA     PD,U
+       LDD     #$0C56
+       STD     PD+3,U
+       LDY     #CMSCOR
+       STY     PD+5,U
+       LDA     #13
+       STA     PD+7,U
+       JMP     HSCOLM  PRINT THIS MATRIX OF THE TABLE
+PRTODY LDU     CRPROC
+       LDA     #1
+       STA     PD,U    START WITH 1 FOR TODAYS
+       LDD     #$0CD0
+       STD     PD+3,U
+       LDY     #TODAYS
+       STY     PD+5,U
+       LDA     #2
+       STA     PD+7,U
+       JMP     HSCOLM
+
+HSCOLM LDA     #3      3 COLUMNS
+       STA     PD+2,U  SET IT HARD
+       CLR     TXFLAV
+HSCOL0 LDA     PD+7,U  NUMBER PER COLUMN
+       STA     PD+1,U  MAKE THAT NUMBER LEFT IN THIS COLUMN
+HSCOL3 NAP     1,HSCOL6 TIME BREAK HERE
+HSCOL6 LDA     TEXCOL  GET CURRENT COLOR
+       ADDA    #$11    PUSH TO NEXT
+       CMPA    #$88
+       BLS     HSCOL1
+       LDA     #$11
+HSCOL1 STA     TEXCOL
+       LDX     PD+3,U  GET ADDRESS
+       LDB     PD,U    GET PLAYERS INDEX
+       LDA     #HSINDX INDEX MESSAGE
+       JSR     WRD5V   PRINT IT
+       LDY     PD+5,U  POINT AT PLAYERS INITIALS
+       LDB     #3      ITERATE 3 TIMES
+HSCOL2 EXG     X,Y
+       JSR     RCMOSA  GET AN INITIAL
+       EXG     X,Y
+       JSR     PR35V   PRINT IT OUT
+       DECB
+       BNE     HSCOL2  INITIALS ARE OUT THERE
+       LDX     PD+3,U  GET CURSOR POINTER AGAIN
+       LEAX    $E00,X  POSITION FOR SCORE
+       LDU     #WRD5V  USE 3 BY 5 SCORE ROUTINE
+       JSR     PRSCOR  PRINT OUT THE GUYS SCORE
+       LDU     CRPROC
+       LDY     PD+5,U  GET CMOS POINTER
+       LEAY    SCRSIZ,Y
+       STY     PD+5,U
+       LDX     PD+3,U  GET CURRENT CURSOR
+       LEAX    7,X     MOVE 7 PIXELS
+       STX     PD+3,U
+       LDA     PD,U    KICK INDEX
+       ADDA    #1
+       DAA
+       STA     PD,U
+       DEC     PD+1,U  ONE LESS GUY IN THIS COLUMN
+       BNE     HSCOL3
+       LEAX    $3000,X MOVE TO NEXT COLUMN
+       LDA     #7      HEIGHT PER ENTRY
+       LDB     PD+7,U  ENTRIES PER COLUMN
+       MUL
+       NEGB            OPPOSITE OF TOTAL HEIGHT
+       LEAX    B,X     TO RESTORE THAT HEIGHT
+       STX     PD+3,U  RESTORED
+       DEC     PD+2,U  ONE LESS COLUMN
+       BNE     HSCOL0  DO ANOTHER
+       CMPY    #TODAYS+SCRSIZ ARE WE IN TODAYS
+       LBLS    PRTODY  NOPE...GO AND DO TODAYS
+*
+PRDONE MAKP    LOGCOL  DONE...START THE COLORS.
+       LDU     CRPROC
+       LDA     #8
+       STA     PD,U
+HALX1  DEC     PD,U
+       BEQ     HALX
+       NAP     60,HALX1
+HALX   LDA     #120
+       STA     PD,U
+HALX2  LDA     PIA21
+       ANDA    #$8
+       BEQ     LOGO
+       DEC     PD,U
+       BEQ     LOGO
+       NAP     30,HALX2
+
+SGMSP  LDX     #$0E10  TOP OF SCREEN
+       LDD     #$0A01
+       JSR     OTSGM   PUT IT OUT
+       JMP     SUCIDE  AND DIE
+
+PRSCOR PSHS    Y       SAVE Y FOR THE HELL OF IT
+       EXG     X,Y     SWAP EM
+       JSR     RCMOSA
+       JSR     RCMOSB
+       EXG     X,Y
+       ANDA    #$0F
+       BNE     PR2SC   THIS WILL BE A TWO CALL JOB
+       TSTB
+       BNE     PR2SC   THIS WILL BE A ONE CALL JOB
+       LDA     #HIGH3  USE OTHER ROUTINE
+       BRA     PR3SC
+PR2SC  PSHS    Y       SAVE NEW Y
+       TFR     D,Y     DATA TO PRINT
+       LDA     #HIGH1  USE FIRST PRINT TEXT
+       JSR     ,U      CALL PASSED ROUTINE TO DO IT
+       PULS    Y
+       LDA     #AUDM2  USE AUDIT TEXT TO PUT OUT LOW HALF
+PR3SC  PSHS    A
+       EXG     X,Y
+       JSR     RCMOSA
+       JSR     RCMOSB
+       EXG     X,Y
+       TFR     D,Y
+       PULS    A
+       JSR     ,U
+       PULS    Y,PC    AND RETURN
+
+************************
+************************END OF LINKY INSERTION
+************************
+
+LOGO   JSR     GNCIDA
+       LDA     #$20
+       STA     ATRFLG  LOGO PROGRAM
+       LDA     #1
+       JSR     DIMV    DIM DOWN, CHAPS
+       JSR     SCRCLR
+       MAKP    OPMCOL
+*
+*OUTPUT OPERATOR MESSAGE
+*PD=MESS PTR,PD2=SCREEN ADDR,PD4=BYTE CNT.,PD5=PASS FLAG
+OOM    CLR     PD6,U
+       JSR     ATMCK   MESSAGE O.K.???
+       BEQ     OOM0
+       LDX     #OMST
+       INC     PD6,U   ERROR FLAG
+       BRA     OOM00
+OOM0   LDX     #OPMESS
+OOM00  STX     PD,U
+       LDX     #OPL1   LOCATION OF LINE 1
+       LDB     #$20
+       JSR     GETMEX
+       STX     PD2,U
+       LDA     #25
+       STA     PD4,U
+       STA     PD5,U
+       LDA     #$AA
+       STA     TEXCOL
+       CLR     TXFLAV
+OOML   LDX     PD,U
+       LDA     PD6,U   ERROR?
+       BEQ     OOML0   NO
+       LDA     ,X+
+       BRA     OOML00
+OOML0  JSR     RCMOSA
+OOML00 STX     PD,U
+       LDX     PD2,U
+       JSR     PR57V
+       STX     PD2,U
+       DEC     PD4,U
+       BEQ     OOFIN
+OOML1  NAP     3,OOML
+OOFIN  LDA     PD5,U
+       BEQ     OOFX
+       CLR     PD5,U
+       LDA     #25
+       STA     PD4,U
+       LDX     #OPL2
+       LDB     #$30
+       JSR     GETMEX
+       STX     PD2,U
+       CLR     TXFLAV
+       BRA     OOML1
+OOFX   EQU     *
+       MAKP    COLSHK
+       LDX     #$0E58
+       LDD     #$0102
+       JSR     OTSGM
+       NAP     40,LOG20
+LOG20  JSR     GNCIDA
+       CLR     PCRAM
+       MAKP    OPMCOL
+       MAKP    LOGCOL
+       LDA     #CPM
+       LDX     #$3498
+       JSR     WRD7FV
+       LDA     #WEIM
+       LDX     #$25A8
+       JSR     WRD7FV
+       LDX     #$3ABC
+       JSR     OCRDM1  OUTPUT CREDIT MESSAGE
+       LDA     #HSCRM
+       LDX     #$28CC
+       JSR     WRD5FV
+       LDA     #SECM
+       LDX     #$30D4
+       JSR     WRD5FV
+       NAP     40,LOG2
+LOG2   EQU     *
+       LDX     PD+10,U GET START ADDRESS
+       LEAY    $8824,X
+       LDA     #7      SET COLOR 9 TO RED
+       STA     PCRAM+9
+       LDA     #$99    AND DO HALO IN COLOR 9
+       JSR     HALO
+       NAP     $FF,PIKVCT DELAY 4 SECS AND GO TO LOOP
+*OPERATOR DEFAULT MESSAGE
+OMST   FCC     'WILLIAMS ELECTRONICS INC'
+       FCB     $3D     PERIOD
+       FCC     '           PRESENTS'
+       FCB     $3F     COLON
+       FCC     '     '
+*
+GETMEX LDA     #$25    ASSUME ERROR
+       TST     PD+6,U
+       BNE     GETME3
+       JSR     RCMOSA  GET THE BYTE
+       CMPA    #$10
+       BHS     GETME2
+       LDA     #$10
+GETME2 CMPA    #$3C
+       BLS     GETME3
+       LDA     #$3C
+GETME3 TFR     D,X
+       RTS
+*
+*OPERATOR MESS COLORER
+*
+OPMCOL INC     PD,U
+       LDA     PD,U
+       ANDA    #$7
+       LDX     #OPMTAB
+       LDA     A,X
+       STA     PCRAM+$A
+       NAP     5,OPMCOL
+OPMTAB FCB     $7,$87,$FF,$FF,$C7,$C7,$FF,$FF
+*
+*LOGO CYCLER
+*PD,U=COLOR INDEX
+*
+LOGCOL LDX     #LCTAB
+       STX     PD,U
+LOGLP  LDX     PD,U
+       LDY     #PCRAM+1
+LOGL0  LDA     ,X+
+       BNE     LOGL1
+       LDX     #LCTAB
+       BRA     LOGL0
+LOGL1  STA     ,Y+
+       CMPY    #PCRAM+9
+       BNE     LOGL0
+       LDX     PD,U
+       LEAX    1,X
+       LDA     ,X
+       BNE     LOGL2
+       LDX     #LCTAB
+LOGL2  STX     PD,U
+       NAP     3,LOGLP
+*
+*LOGO COLORING TABLE
+*
+LCTAB  FCB     $37,$2F,$27,$1F,$17,$47,$47,$87
+       FCB     $87,$C7,$C7,$C6,$C5,$CC,$CB,$CA
+       FCB     $C0,$D0,$98,$38,$33,0,0,0
+       FCB     0,0,0,0,0,0,0,0
+       FCB     0,0,0,0,0,0,0,0
+*
+*COLOR SHAKER
+*
+COLSHK LDX     #SHKTAB
+       JSR     RAND
+       ANDA    #$F
+       LDA     A,X
+       STA     PCRAM
+       LDA     #5
+       LDX     #COLSH1
+       JMP     SLEEP
+COLSH1 CLR     PCRAM
+       NAP     3,COLSHK
+SHKTAB FCB     $7,$F,$17,$1E,$25,$2C,$2B,$2A
+       FCB     $28,$60,$D0,$C0,$C3,$85,$47,$87
+*
+*OUTPUT STARGATE
+*SUPER PROCESS
+*PD+8=TABLE X,PD+40=RET ADD,PD10=SADDR
+*A=COLS/DELAY;X=SADD;B=DELAY/SLEEP
+OTSGM  STX     PD+10,U START ADDR
+       STA     PD1,U   COLS/DELAY
+       STB     PD+13,U
+       PULS    X
+       STX     PD+14,U RET ADDR
+       LDX     #SGMTAB
+       STX     PD+8,U
+       CLR     PD+12,U
+OTSGM1 LDX     PD+8,U
+       LDY     ,X++    LETTER ADDR
+       BEQ     OTSGMX  THE END
+       LDA     ,X+
+       STD     PD2,U   COLOR
+       LDA     ,X+
+       STA     PD,U    FLAVOR MASK
+       LDD     ,X++    SCREEN ADDR OFFSET
+       ADDD    PD+10,U
+       STX     PD+8,U
+       TFR     D,X
+       JMP     OUTLET
+OTSGMX JMP     [PD+14,U] RETURN
+*
+*OUTPUT LETTER
+*X=SCREEN ADDR TOP LEFT
+*Y=LETTER DATA TABLE
+*PD=FLAVOR MASKL;PD1=DELAY;PD3=REPCNT
+*PD12=DELAY TEMP
+OUTLET CLR     PD3,U
+       STX     PD4,U
+OUTL0  LDA     ,Y
+       BEQ     OUTLX   END
+       BPL     OUTL1
+       BITA    #$40
+       BNE     OUTL1
+       ANDA    #$3F
+       STA     PD3,U
+       LEAY    1,Y
+       BRA     OUTL0
+OUTL1  PSHS    Y
+       JSR     OUTCOL
+       LDA     PD3,U
+       BEQ     OUTL2
+       DEC     PD3,U
+       BEQ     OUTL2
+       LDY     ,S
+OUTL2  LEAS    2,S
+       COM     PD,U
+       BPL     OUTL2A
+       INC     PD4,U
+OUTL2A STY     PD6,U
+       DEC     PD+12,U
+       BPL     OUTL3
+       LDA     PD1,U
+       STA     PD+12,U
+       LDX     #OUTL3
+       LDA     PD+13,U
+       JMP     SLEEP
+OUTL3  LDX     PD4,U
+       LDY     PD6,U
+       BRA     OUTL0
+OUTLX  JMP     OTSGM1
+*
+*OUTPUT COLUMN
+*X=ADDR TOP LEFT
+*Y=DATA ADDR
+*PD,U=FLAVOR MASK ;PD2,U=COLOR
+*
+OUTCOL PSHS    D
+OUTC1  LDA     ,Y+
+       PSHS    A       END OF COLUMN FLAG
+       BITA    #$40
+       BNE     OUTC2
+       ANDA    #$3F
+       LEAX    A,X
+       BRA     OUTCX
+OUTC2  ANDA    #$3F
+       BEQ     OUTCX
+OUTC3  LDB     PD,U
+       ANDB    PD2,U
+       ORCC    #$10    SEI
+       CLR     RWCNTL  ENABLE RAM READ
+       ORB     ,X
+       STB     ,X+
+       LDB     #1
+       STB     RWCNTL
+       ANDCC   #$EF    (CLI)
+       DECA
+       BNE     OUTC3
+OUTCX  LDA     ,S+
+       BPL     OUTC1
+       PULS    D,PC
+*
+* HALO ROUTINE---THIS ROUTINE PUTS OUT A HALO AROUND THE EDGES OF
+* ALL SOLID REGIONS IN A DEFINED AREA.
+*
+* X = UPPER LEFT CORNER OF REGION
+* Y = LOWER RIGHT CORNER (JUST OUTSIDE OF REGION)
+* A = COLOR OF HALO
+*
+HALO   STY     XTEMP   SAVE BOTTOM RIGHT IN MEMORY
+       PULS    Y       GET RETURN ADDRESS
+       LDU     CRPROC
+       STX     PD,U    SAVE UPPER LEFT
+       STY     PD+6,U  RETURN ADDRESS
+       CLRB    START   ON EVEN FLAVOR
+HALO0  BSR     VFILL   FILL A VERTICAL LINE
+       TSTB    MOVE    TO NEXT FLAVOR
+       BEQ     HALO1   EVEN FLAVOR..MOVE TO ODD
+       LDU     CRPROC
+       STD     PD+2,U
+       STX     PD+4,U
+       NAP     1,HALO50
+HALO50 LDD     PD+2,U
+       LDX     PD+4,U
+       LEAX    $100,X  ODD FLAVOR MOVE TO NEXT BYTE
+       LDB     #$FF    SETUP FOR EVEN FLAVOR
+HALO1  INCB            TO NEXT FLAVOR
+       EXG     X,D     SEE IF DUN
+       CMPA    XTEMP   DONE IF X BEYOND OR EQUAL TO PASSED Y
+       EXG     X,D
+       BLO     HALO0   WE STILL IN RANGE...DO ANOTHER COLUMN
+*
+       LDU     CRPROC
+       LDX     PD,U    RESTORE ORIGINAL CURSOR
+HALO2  LDA     #$4B    HALF A LINE DOWN
+       STA     XTEMP
+       JSR     HFILL   DO A HORIZONTAL ROW
+       STX     PD+4,U
+       NAP     1,HAL$55
+HAL$55 LDA     #$8C
+       STA     XTEMP
+       LDB     PD+5,U
+       LDA     #$4B
+       TFR     D,X
+       JSR     HFILL
+       NAP     1,HALO55
+HALO55 LDX     PD+4,U
+       LEAX    1,X     MOVE TO NEXT ROW
+       EXG     X,D
+       LDA     #$0E
+       CMPB    XTEMP+1 TOO MUCH Y?
+       EXG     X,D
+       BLO     HALO2   NOT THIS PASS
+       LDU     CRPROC
+       JMP     [PD+6,U] RETURN
+
+VFILL  PSHS    X,D     SAVE POINTER, COLOR, FLAVOR
+VFILL1 BSR     WCHK    SEE IF THERE IS WHITE OR BLACK
+       BNE     VFILL2  ITS WHITE....BOUNDARY FOUND
+       BSR     VADV    DO AN ADVANCE TO NEXT PIXEL
+       BRA     VFILL1
+VFILL2 BSR     VON     TURN ON THE CURRENT PIXEL
+       BSR     VADV    PUSH TO NEXT ONE
+       BSR     VON     TURN IT ON TOO
+VFILL3 BSR     WCHK    LOOK FOR BLACK NOW...WE IN A WHITE REGION
+       BEQ     VFILL4  FOUND SOME BLACK
+       BSR     VADV    NEXT PIX
+       BRA     VFILL3
+VFILL4 LEAX    -2,X    MOVE BACK 2 TO WHITEN
+       BSR     VON     TURN EM ON
+       LEAX    1,X
+       BSR     VON
+       LEAX    1,X     BACK TO BLACK PIX THAT TRIGGERED IT
+       BRA     VFILL1
+
+WCHK   PSHS    D       SEE IF CURRENT POINTED TO IS ON OR OFF
+       ORCC    #$10    (SEI) WE HAVE TO READ THE SCREEN
+       CLR     RWCNTL
+       BSR     GETMSK  GET THE RIGHT MASK
+       ANDA    ,X
+       LDB     #1
+       STB     RWCNTL  UNCONTROL
+       ANDCC   #$EF    (CLI)
+       TSTA            SET FLAGS FOR RETURN
+       PULS    D,PC
+
+GETMSK LDA     #$F0    ASSUME EVEN
+       TSTB
+       BEQ     GETMX   YEP
+       LDA     #$0F    ODD
+GETMX  RTS
+
+VADV   LEAX    1,X     PUSH TO NEXT PIXEL
+       EXG     X,D     COMPARE
+       CMPB    XTEMP+1 IS OUR Y ENOUGH??
+       EXG     X,D
+       BLO     GETMX   DONE..IN RANGE...RETURN
+HADV2  LEAS    2,S     REMOVE CALL TO US
+       PULS    X,D,PC  AND RETURN FOR VFILL
+
+VON    PSHS    D       SAVE
+       ORCC    #$10    (SEI) READ SCREEN
+       CLR     RWCNTL
+       BSR     GETMSK  GET THE CURRENT MASK
+       ANDA    ,X      READ THE SCREEN
+       BEQ     VBYE    NOTHING THERE....DONT SHADE.
+       BSR     GETMSK  GET MASK BACK
+       ANDA    #$99    MASK COLOR ON
+       PSHS    A       PUT THAT HALF OF BYTE UP
+       BSR     GETMSK  ANOTHER MASK PLEASE
+       COMA            OTHER HALF
+       ANDA    ,X      GET WHATS ON SCREEN.
+       ORA     ,S+     OR IN OTHER HALF
+       STA     ,X      AND STORE
+VBYE   LDA     #1
+       STA     RWCNTL
+       ANDCC   #$EF    (CLI)
+       PULS    D,PC
+
+HFILL  PSHS    X,D
+       CLRB    START   ON EVEN FLAVOR
+HFILL1 BSR     WCHK
+       BNE     HFILL2  STILL LOOKING FOR WHITE
+       BSR     HADV    MOVE TO NEXT PIX
+       BRA     HFILL1
+HFILL2 BSR     VON     TURN ONE ON
+       BSR     HADV    MOVE TO NEXT
+       BSR     VON     TURN ONE ON
+HFILL3 BSR     WCHK
+       BEQ     HFILL4
+       BSR     HADV
+       BRA     HFILL3
+HFILL4 LEAX    -$100,X MOVE BACK 2 PIXELS
+       BSR     VON
+       BSR     HADV    MOVE 1 PIX FWD
+       BSR     VON
+       BSR     HADV
+       BRA     HFILL1
+
+HADV   TSTB
+       BEQ     HADV1
+       LEAX    $100,X  TO NEXT BYTE
+       EXG     X,D
+       CMPA    XTEMP   SEE IF TOO MUCH
+       EXG     X,D
+       BHS     HADV2
+       LDB     #$FF
+HADV1  INCB
+       RTS
+*
+*
+*STARGATE MESSAGE TABLE
+*LETTER,COLOR,DELAY,FLAVOR,X16
+SGMTAB EQU *
+*LETTER S
+       FDB     SGS
+       FCB     $11,$F0
+       FDB     $0000
+*LETTER T
+       FDB     SGT
+       FCB     $22,$F0
+       FDB     $1000
+*LETTER A
+       FDB     SGA
+       FCB     $33,$F0
+       FDB     $1F00
+*LETTER R
+       FDB     SGR
+       FCB     $44,$F0
+       FDB     $2F00
+*LETTER G
+       FDB     SGG
+       FCB     $55,$F0
+       FDB     $3F00
+*LETTER A
+       FDB     SGA
+       FCB     $66,$F0
+       FDB     $4F00
+*LETTER T
+       FDB     SGT
+       FCB     $77,$F0
+       FDB     $5F00
+*LETTER E
+       FDB     SGE
+       FCB     $88,$F0
+       FDB     $6F00
+       FDB     0       END
+*
+*STARGATE LETTER DATA
+*
+*SSSSSSS
+*
+SGS    FCB     6,$44,$9,$D0
+       FCB     4,$48,7,$D0
+       FCB     3,$4A,$6,$D0
+       FCB     2,$4C,$5,$D0
+       FCB     $82     REPEAT TWICE
+       FCB     1,$4E,$4,$D0
+       FCB     $8D     REPEAT 13
+       FCB     $50,$3,$D0
+       FCB     $82     REPEAT TWICE
+       FCB     $50,4,$CE
+       FCB     $50,5,$CC
+       FCB     $50,6,$CA
+       FCB     $50,7,$C8
+       FCB     $50,9,$C4
+       FCB     0       END OF LETTER
+*TTTTTTTTTTTTTTTTTTTTTTTT
+SGT    FCB     $87     REPEAT 7
+       FCB     $CA
+       FCB     $8A     REPEAT 10
+       FCB     $4A,$2,$D7
+       FCB     $87
+       FCB     $CA
+       FCB     0
+*LETTER A
+SGA    FCB     15,$40+2,2,$C0+16
+       FCB     13,$40+4,2,$C0+16
+       FCB     11,$40+6,2,$C0+16
+       FCB     9,$40+8,2,$C0+16
+       FCB     7,$40+10,2,$C0+16
+       FCB     5,$40+12,2,$C0+16
+       FCB     3,$40+14,2,$C0+16
+       FCB     1,$40+16,2,$C0+16
+       FCB     $80+2   REPEAT 2 TIMES
+       FCB     $40+17,2,$C0+16
+       FCB     $80+5   REPEAT 5 TIMES
+       FCB     $40+12,7,$C0+5
+       FCB     $80+2   REPEAT 2 TIMES
+       FCB     $40+17,2,$C0+16
+       FCB     1,$40+16,2,$C0+16
+       FCB     3,$40+14,2,$C0+16
+       FCB     5,$40+12,2,$C0+16
+       FCB     7,$40+10,2,$C0+16
+       FCB     9,$40+8,2,$C0+16
+       FCB     11,$40+6,2,$C0+16
+       FCB     13,$40+4,2,$C0+16
+       FCB     15,$40+2,2,$C0+16
+       FCB     0       END OF LETTER A
+* START OF LETTER R
+SGR    FCB     $80+10  REPEAT 10 TIMES
+       FCB     $C0+35
+       FCB     $C0+0   BLANK COLUMN
+       FCB     $C0+0   BLANK COLUMN
+       FCB     $80+4   REPEAT 4 TIMES
+       FCB     $40+22,2,$C0+11
+       FCB     $80+2   REPEAT 2 TIMES
+       FCB     1,$40+21,2,$C0+11
+       FCB     $80+2   REPEAT 2 TIMES
+       FCB     2,$40+20,2,$C0+11
+       FCB     3,$40+19,4,$C0+9
+       FCB     4,$40+17,7,$C0+7
+       FCB     5,$40+15,10,$C0+5
+       FCB     7,$40+11,14,$C0+3
+       FCB     9,$40+7,18,$C0+1
+       FCB     0       END OF LETTER R
+* START OF LETTER G
+SGG    FCB     12,$C0+11
+       FCB     10,$C0+15
+       FCB     8,$C0+19
+       FCB     7,$C0+21
+       FCB     5,$C0+24
+       FCB     4,$C0+26
+       FCB     3,$C0+28
+       FCB     2,$C0+30
+       FCB     2,$C0+31
+       FCB     1,$40+15,3,$C0+14
+       FCB     1,$40+13,7,$C0+13
+       FCB     $40+12,11,$C0+12
+       FCB     $80+2   REPEAT 2 TIMES
+       FCB     $40+11,13,$C0+11
+       FCB     $80+2   REPEAT 2 TIMES
+       FCB     $40+10,15,$C0+10
+       FCB     $80+9   REPEAT 9 TIMES
+       FCB     $40+10,2,$C0+23
+       FCB     0       END OF LETTER G
+* START OF LETTER E
+SGE    FCB     $80+9   REPEAT 9 TIMES
+       FCB     $40+10,2,$C0+23
+       FCB     $80+15  REPEAT 15 TIMES
+       FCB     $40+10,2,$40+10,3,$C0+10
+       FCB     0       END OF LETTER E
+* FILLER TO MATCH PROMS
+       ORG     $D950
+       FCB     $8E,$8E,$8E,$8E,$8E,$8E,$8E,$8E,$8E
+       END
diff --git a/MESS2.SRC b/MESS2.SRC
new file mode 100755 (executable)
index 0000000..ed59e26
--- /dev/null
+++ b/MESS2.SRC
@@ -0,0 +1,173 @@
+       NLIST
+       INCLUDE SPHR56.SRC
+       INCLUDE EQ4.SRC
+       LIST
+       TTL     <<<<<  S T A R G A T E  >>>>>
+
+* MESSAGE HANDLER
+
+* X POINTS AT MESSAGE DESCRIPTOR, D AND Y HOLD ANY RELEVANT DATA.
+*
+* MESSAGE DESCRIPTOR:
+*
+* PRIORITY (0-FF) EQUAL PRIORITY WILL BE DISPLAYED (P)
+*
+* TIME (0-FF) INDICATES DURATION OF DISPLAY (T)
+*
+* MESSAGE NUMBER TO BE PASSED TO TEXT ROUTINE (N)
+*
+* SPECIAL CONSIDERATION BITS: (S)
+*
+* BIT 6 SET INDICATES THAT MESSAGE SHOULD BLINK
+* NOTE THAT BLINKING VALUES INDICATED BY B AND Y
+* MAY BE MODIFIED BY CHANGING MESSB, AND MESSY IN
+* RAM (SAVED FROM CALL).
+*
+* BIT 5 SET SAYS THAT 2 BYTE IMMEDIATE MUST BE RESIDENT MESSAGE (R)
+* FOR ACTION TO BE TAKEN.
+*
+* BIT 4 SET INDICATES FOLLOWER MESSAGE PRESENT (SAME FORM WITHOUT
+* PRIORITY BYTE).
+*
+* BIT 3 INDICATES THAT A 2 BYTE IMMEDIATE WILL POINT TO NEXT BLOCK (I)
+* TO DO IMMEDIATELY (INDIRECT CONTINUATION). THE
+* MESSAGE POINTED TO WILL BECOME THE MESSAGE CONSIDERED
+* FOR RESIDENT MESSAGE REQUIREMENT.
+*
+* BIT 2 INDICATES MESSAGE AREA SHOULD BE CLEARED BEFORE DISPLAY.
+*
+* ENTRY TO MESSLD:
+*
+* X REGISTER ---> (P),(S),[(R)],(T),(N),[(I)],
+* [ (S),[(R)],(T),(N),[(I)] ] *N
+*
+*
+*
+* STATE OF SYSTEM :
+*
+* MESSCR - CURRENT PLACE IN MESSAGE. 2 BYTES
+* MESSST - BEGINNING OF THIS MESSAGE. 2 BYTES
+* MESSSP - SPECIAL CONSIDERATIONS 1 BYTE
+* MESSTM - TIME LEFT IN CURRENT FRAME 1 BYTE
+* MESSBL - MESSAGE BLINK RATE 1 BYTE
+* MESSBC - MESSAGE BLINK COLOR 1 BYTE
+* MESSCD - CODE OF CURRENT MESSAGE 1 BYTE
+* MESSB - SAVE B FOR CONTINUATION ETC 1 BYTE
+* MESSY - SAVE Y FOR POSSIBLE CONTIN. 2 BYTES
+*
+
+BLKTIM EQU     $18     BLINK TIMER.
+
+       ORG     MESORG
+
+       JMP     MESSLD  LOADER
+       JMP     MESSIN  INITIALIZER
+
+* UPDATE
+
+MESSUP LDA     STATUS  OK TO DO IT??
+       BITA    #$2C    NOT IF OJBECTS OR SAM TURNED OFF, OR PLAYER DEAD
+       BNE     MESSUX
+       LDA     MESSTM  GET TIMER
+       BEQ     MESSUX  NOTHING THERE...WHAT A WASTE OF TIME
+       DEC     MESSTM  SO KNOCK IT DOWN ONE
+       BNE     MESSUX  NOT DONE HERE
+       LDA     MESSSP  GET THE SPECIAL STUFF
+       BITA    #CONT   CONTINUATION??
+       BEQ     MESSU1  NOPE
+       LDB     MESSB   RESTORE THE POSSIBLE NUMBER PARAMS
+       LDY     MESSY
+       LDX     MESSST  LOAD X WITH THE MESSAGE STARTER
+       JMP     MESSCV  DO PHONEY CALL AND RETURN.
+MESSU1 LDX     #0      CLEAR START POINTER SO NO SATISFACTION OF CONDITION
+       STX     MESSST  DONE.
+MESIN1 BSR     CLMESS  CLEAR OUT THE REGION
+       LDA     #DEFMES PUT DEFAULT MESSAGE OUT.
+       JMP     WRD5FS  AND RETURN.
+MESSUX RTS     EXIT
+
+MESSU6 EQU     *
+CLMESS PSHS    X,A,U,Y CLEAR MESSAGE AREA
+       LDX     #0
+       LEAY    ,X
+       CLRA
+       LDU     #MESSUL+5
+CLMES0 PSHU    X,Y,A
+       LEAU    261,U   NEXT COLUMN AND DOWN THE 5 BYTES
+       CMPU    #MESSLR+$100 BEYOND LOWER RIGHT??
+       BLO     CLMES0
+       PULS    X,A,U,Y,PC
+
+MESSIN LDD     #0
+       STD     MESSST  NO CURRENT MESSAGE
+       STA     MESSTM  NO TIME IN CURRENT FRAME
+       BRA     MESIN1  PUT DEFAULT MESSAGE UP ETC.
+
+MESSCV PSHS    D,X     DO BUNKO PUSH
+       LDX     MESSCR  GET THE CURRENT POINTER
+       BRA     MESEN2  GO TO SECOND ENTRYPOINT IN MESSLD
+MESSLD PSHS    X,D     SAVE STATE
+       LDA     MESSTM  ANY MESSAGE THERE???
+       BEQ     MESS1   NOPE.....PROCEED
+       LDA     ,X      GET PRIORITY
+       CMPA    [MESSST] COMPARE TO CURRENT MESSAGES PRIORITY
+       BLO     MESSX   NOT GOOD ENOUGH....BYE
+MESS1  LEAX    1,X     INX PUSH PAST PRIORITY
+MESEN2 LDA     ,X+     GET THE SPECIAL CONSIDERATIONS
+       STA     MESSSP  AND PUT THEM IN VISIBILITY RANGE
+       BITA    #COND   SEE IF CONDITIONAL THERE
+       BEQ     MESS3   NOPE
+       LDD     ,X++    GET CONDITIONAL
+       CMPD    MESSST  SEE IF THAT IS THE RESIDENT MESSAGE
+       BNE     MESSX   NOPE...BYE
+MESS3  LDA     ,X+     GET TIME
+       STA     MESSTM  AND SAVE
+       LDA     MESSSP  LOOK AT SPECIAL BYTE
+       BITA    #CLEAR  DO WE CLEAR THE REGION
+       BEQ     MESS4   NOPE
+       BSR     CLMESS  CLEAR IT
+MESS4  LDA     ,X+     GET CODE
+       STA     MESSCD  SAVE
+       STX     MESSCR  SAVE POINTER
+       LDB     1,S     RESTORE PASSED X,D
+       LDX     2,S
+       STB     MESSB   SAVE FOR BLINK
+       STY     MESSY   SAVE FOR BLINK
+       STX     MESSST  INDICATE CURRENT MESSAGE
+       JSR     WRD5FS  PRINT THE MESSAGE
+       LDA     MESSSP  CHECK SPECIAL BIT
+       BITA    #PTR    DO WE POINT TO CONTINUATION
+       BEQ     MESS2   NOPE
+       LDX     MESSCR  GET CURRENT POINTER
+       LDX     ,X      GET PLACE TO CONTINUE
+       STX     MESSST  MAKE PLACE WE GOING SATISFY CONDITIONAL
+       JSR     MESSLD  ISN RECURSION WONDERFUL??
+MESS2  EQU     *
+       LDA     MESSSP  GET SPECIALS
+       BITA    #BLINK  BLINK??
+       BEQ     MESSX   NOPE
+       MAKP    BLPROK  START A PROCESS TO DO SO
+MESSX  PULS    X,D,PC  CLEANUP AND RETURN FOR BULLSHIT EXIT
+
+BLPROK LDD     MESSST  GET ID OF CURRENT MESSAGE
+       STD     PD,U    AND SAVE
+BLPR1  LDA     MESSBC  GET THE BLINK COLOR
+       STA     PCRAM+5 MESSAGE BLINK COLOR
+       LDA     MESSBL  GET BLINK RATE
+       LDX     #BLPR2
+       JMP     SLEEP
+BLPR2  LDD     MESSST
+       CMPD    PD,U    SAME MESSAGE CURRENT??
+       BNE     BLPRX   BYE....
+       CLR     PCRAM+5
+       LDA     MESSBL
+       LDX     #BLPR1
+       JMP     SLEEP
+BLPRX  JMP     SUCIDE
+
+WRD5FS JSR     WRD5FV
+       LDA     #1
+       STA     TIMER   STOP MESSAGE RELATED HYPERS
+       RTS
+
+       END
diff --git a/RA37.SRC b/RA37.SRC
new file mode 100755 (executable)
index 0000000..0f8b8db
--- /dev/null
+++ b/RA37.SRC
@@ -0,0 +1,2137 @@
+       TTL     <<<<<  S T A R G A T E  >>>>> 
+*
+* PRAYAH 1: P L O G L A M S T A H T
+*
+       ORG     $0000
+*
+*OFF OBJECT
+*X=OBJECT
+*
+OFSHIT PSHS    X,U,D,Y
+       LDD     OBJX,X
+       LDY     OPICT,X
+       JSR     [OBJDEL,Y]
+       PULS    X,U,D,Y,PC
+*
+*EXECUTIVE LOOP
+*
+EXEC   LDX     #ACTIVE
+       STX     CRPROC
+EXEC0  LDA     TIMER
+       BEQ     EXEC0
+       CLR     TIMER
+       LDB     STATUS
+       BITB    #$69
+       BEQ     EXEC00
+       CLR     OVCNT
+       BRA     EXEC1
+EXEC00 ASLA
+       ADDA    OVCNT
+       SUBA    #4
+       BPL     EXEC01
+       CLRA
+EXEC01 STA     OVCNT
+       CMPA    #2
+       BLO     EXEC1
+       LDB     #3
+       STB     STRCNT  CUT DOWN STARS
+       CMPA    #2      OVERLOAD MAX
+       BLS     EXEC1
+       LDA     #2
+       STA     OVCNT
+*OVERLOAD WIPE OUT A GUY
+       LDY     #OPTR
+EXEC02 LDX     ,Y
+       BEQ     EXEC1
+       LDA     OTYP,X  DONT TOUCH THIS GUY
+       BEQ     EXEC03
+       LEAY    ,X
+       BRA     EXEC02
+EXEC03 LDU     ,X
+       STU     Y
+       LDD     SEED
+       ANDA    #$3F
+       ADDA    #$60
+       ADDD    OX16,X
+       STD     OX16,X  HYPER HIM OUT OF THERE
+       BSR     OFSHIT
+       LDD     #0
+       STD     OBJX,X
+       LDU     IPTR
+       STX     IPTR
+       STU     ,X      INTO INACTIVE LIST
+EXEC1  BSR     COLCHK
+       JSR     XUVCT
+       JSR     RAND
+       JSR     MESUPV
+       LDA     PIA31   CHECK INVISO BUTTON
+       BITA    #$2     WELL?
+       JMP     SWPACH  *******************************************************
+       NOP
+       NOP
+**************************************************************************
+* BEQ SWP$ NOT THIS TIME *
+* JSR INVSTV NA NA NA NA...NA NA NA NA...HEY HEYYYYY...GO-OOD BYE *
+*SWP$ LDA INDIAG DIAGNOSTICS *
+* BNE SWPX THEN NO PROCESSING *
+**************************************REMOVE PATCH AND INSERT ABOVE CODE**
+*
+*SWITCH PROCESSING
+*
+SWP    LDX     SWPROC
+       BNE     SWP1
+       LDX     SWPROC+4
+       BEQ     SWPX
+       LDD     SWPROC+6
+       CLR     SWPROC+4
+       CLR     SWPROC+5
+       BRA     SWP3
+SWP1   LDD     SWPROC+2
+       CLR     SWPROC
+       CLR     SWPROC+1
+SWP3   ANDB    STATUS
+       BNE     SWP
+       JSR     MKPROC
+       BRA     SWP
+SWPX   EQU     *
+*
+*PROCESS DISPATCH
+*
+DISP   LDU     #ACTIVE
+       BRA     DISP2
+DISP1  DEC     PTIME,U
+       BNE     DISP2
+       STU     CRPROC
+       JMP     [PADDR,U]
+*
+*SLEEP
+*A=SLEEP TIME X 16MSEC
+*X=WAKEUP ADDR
+*
+SLEEP  LDU     CRPROC
+       STA     PTIME,U
+       STX     PADDR,U
+DISP2  LDU     ,U
+       BNE     DISP1
+       LDS     #HSTK
+       JMP     EXEC
+*
+COLCHK LDA     STATUS
+       BITA    #$09
+       BNE     COLCX
+       LDD     PLAXC   PLAYER
+       LDU     #PLAPIC
+       TST     PLADIR
+       BPL     COLC1
+       LDU     #PLBPIC
+COLC1  PSHS    D,U
+       INC     PCFLG
+       JSR     COLIDE
+       PULS    D,U
+       BNE     COLC2
+       LDX     #SPTR
+       JSR     COL0
+       BEQ     COLCX
+COLC2  JSR     PLENDV
+COLCX  CLR     PCFLG
+       RTS
+*
+*SUICIDE
+*
+SUCIDE LDX     CRPROC
+       BSR     KILL
+       LEAU    ,X
+       BRA     DISP2   GET NEW CRPROC
+*
+*KILL OBJECT PROCESS
+*
+KILLOP LDX     OBJID,X
+*
+*KILL
+*X=PROCESS TO KILL
+*
+KILL   PSHS    D,U
+       LDU     #ACTIVE
+KILP1  CMPX    ,U
+       BNE     KILPLP  NO MATCH
+       LDD     ,X      GET FORWARD LINK OF DEAD GUY
+       STD     ,U
+       LDA     PCOD,X
+       BEQ     KILP2   REG PROCESS
+       LDD     SPFREE  SUPER PROCESS
+       STX     SPFREE
+       BRA     KILP3
+KILP2  LDD     FREE
+       STX     FREE    PUT HIM AT HEAD OF FREE
+KILP3  STD     ,X
+       LEAX    ,U      SAVE CRPROC FOR SUICIDE
+       PULS    D,U,PC
+KILPLP LDU     ,U
+       BNE     KILP1
+       BSR     ERROR
+ERROR  ORCC    #$10    (SEI) ERROR TRAP
+       BRA     *
+*
+*MAKE A SUPER PROCESS
+*X = START ADDR
+*A = USER TYPE
+*X =RETURNED WITH DATA BLOCK POINTER
+MSPROC PSHS    A,Y,U
+       LDU     SPFREE
+       BNE     *+3
+       JSR     ERROR   ERROR TRAP
+       LDY     ,U
+       STY     SPFREE
+       LDA     #1
+       STA     PCOD,U
+       LDA     ,S      GET TYPE
+       BRA     MKP1
+*
+*MAKE A PROCESS
+*X=START ADDR
+*A=USER TYPE
+*X RETURNED WITH DATA BLOCK PTR
+*
+MKPROC PSHS    A,Y,U
+       LDU     FREE
+       BNE     MKP0    NOT OUT
+       JSR     ERROR
+MKP0   LDY     ,U
+       STY     FREE    DELINK
+       CLR     PCOD,U
+MKP1   STX     PADDR,U
+       STA     PTYPE,U
+       LDA     #1
+       STA     PTIME,U INIT TIME
+       LDX     [CRPROC]
+       STU     [CRPROC]
+       STX     ,U      LINK IN
+       LEAX    ,U      SETUP X AS DATA BLOCK
+       PULS    A,Y,U,PC
+*
+*GENOCIDE : KILL EVERYONE EXCEPT FOR YOURSELF
+*
+GNCIDE PSHS    A,X
+       LDX     #ACTIVE
+GNC1   LDX     ,X
+       BEQ     GNCX
+       CMPX    CRPROC
+       BEQ     GNC1    DO NOT KILL SELF
+       LDA     PTYPE,X DONT KILL COINS
+       CMPA    #CTYPE
+       BEQ     GNC1
+       BSR     KILL
+       BRA     GNC1
+GNCX   PULS    A,X,PC
+*
+*INIT OBJECT
+*BSR GETOB
+*[RET]>OPICT
+*[RET+]>OCVECT
+*[RET+2]>OBJCOL
+*U>OBJID
+*RET<RET+6
+*
+OBINIT BSR     GETOB
+       PSHS    U,D,Y
+       STU     OBJID,X
+       LDU     6,S
+       PULU    D,Y
+       STD     OPICT,X
+       STY     OCVECT,X
+       PULU    D
+       STD     OBJCOL,X
+       STU     6,S
+       PULS    U,D,Y,PC
+*
+*GET OBJECT LIST CELL IN X
+*OBJX=0
+*CALLER MUST >STX OPTR< AFTER INITIALIZATION OF PARAMETERS
+GETOB  PSHS    U,D
+       LDX     OFREE
+       BNE     GETOB1  NOT OUT
+       JSR     ERROR
+GETOB1 LDD     OLINK,X
+       STD     OFREE
+       LDD     OPTR
+       STD     OLINK,X
+       CLRD
+       STD     OBJX,X
+       STA     OTYP,X  CLEAR TYPE
+       PULS    U,D,PC
+*
+*KILL OBJECT CELL IN X
+*
+KILLOB PSHS    X,Y,U
+       LDU     #OPTR
+KILO1  CMPX    ,U      MATCH?
+       BNE     KILOLP
+KILO2  LDY     [,U]    UNLINK
+       STY     ,U
+       LDY     OFREE
+       STX     OFREE
+       STY     ,X
+       PULS    X,Y,U,PC
+KILOLP LDU     ,U
+       BNE     KILO1   CONTINUE
+       LDU     #IPTR   SEARCH INACTIVE LIST
+KILO3  CMPX    ,U
+       BEQ     KILO2
+       LDU     ,U
+       BNE     KILO3
+       JSR     ERROR
+*
+*KILL A SHELL
+*X=SHELL
+*
+KILSHL PSHS    X,Y,U
+       LDU     #SPTR
+       BRA     KILO3
+*
+*OUTPUT 2X8
+*
+ON28   PSHS    X,DP
+       STS     TEMP48
+       BCC     ON280
+       LEAY    2,Y
+ON280  LDS     OBJP0,Y
+       ADDB    #8
+       TFR     D,U
+       BRA     ON281
+*
+*OFF2X8
+*
+OFF28  PSHS    X,DP
+       ADDB    #8
+       TFR     D,U
+       LDD     #0
+       LDX     #0
+       LEAY    ,X
+       TFR     A,DP
+       ANDCC   #0
+       BRA     OFF281
+*
+*OFF 5X8
+*
+OFF58  PSHS    X,DP
+       ADDB    #8
+       TFR     D,U
+       LDD     #0
+       LDX     #0
+       LEAY    ,X
+       TFR     A,DP
+       ANDCC   #0
+       PSHU    X,Y,D,DP,CC
+       LEAU    264,U
+       BRA     OFF481
+*
+*OUTPUT 4X8
+*STORED COL1-COLN
+*CALLED BY IRQ ONLY
+ON48   PSHS    X,DP
+       STS     TEMP48  SAVE STACK
+       BCC     ON480
+       LEAY    2,Y     ODD PHASE
+ON480  LDS     OBJP0,Y
+       ADDB    #8
+       TFR     D,U
+ON481  PULS    D,X,Y,DP,CC
+       PSHU    D,X,Y,DP,CC
+       LEAU    264,U
+       PULS    D,X,Y,DP,CC
+       PSHU    D,X,Y,DP,CC
+       LEAU    264,U
+ON281  PULS    D,X,Y,DP,CC
+       PSHU    D,X,Y,DP,CC
+       LEAU    264,U
+       PULS    D,X,Y,DP,CC
+       PSHU    D,X,Y,DP,CC
+       LDS     >TEMP48 STACK RESTORE, EXTENDED
+       PULS    X,DP,PC
+*
+*ERASE 4X8
+*COLUMNAR OBJECTS 8 LONG
+*
+*OFF 4X8
+*
+OFF48  PSHS    X,DP
+       ADDB    #8
+       TFR     D,U
+       LDD     #0
+       LDX     #0
+       LEAY    ,X
+       TFR     A,DP
+       ANDCC   #0
+OFF481 PSHU    X,Y,D,DP,CC
+       LEAU    264,U
+       PSHU    X,Y,D,DP,CC
+       LEAU    264,U
+OFF281 PSHU    X,Y,D,DP,CC
+       LEAU    264,U
+       PSHU    X,Y,D,DP,CC
+       PULS    X,DP,PC
+*
+*ON 5X8
+*
+ON58   PSHS    X,DP
+       STS     TEMP48
+       BCC     ON580
+       LEAY    2,Y
+ON580  LDS     OBJP0,Y
+       ADDB    #8
+       TFR     D,U
+       PULS    D,X,Y,DP,CC
+       PSHU    D,X,Y,DP,CC
+       LEAU    264,U
+       BRA     ON481
+*
+*ON 3X4 OBJECT
+*
+ON34   BCC     ON340
+       LEAY    2,Y     ODD     GUY
+ON340  LDY     OBJP0,Y
+       TFR     D,U
+ON341  LDD     ,Y
+       STD     ,U
+       LDD     2,Y
+       STD     2,U
+       LDD     4,Y
+       STD     $100,U
+       LDD     6,Y
+       STD     $102,U
+       LDD     8,Y
+       STD     $200,U
+       LDD     10,Y
+       STD     $202,U
+       RTS
+*
+*OFF 3X4 OBJECT
+*
+OFF34  TFR     D,U
+       LDD     #0
+OFF341 STD     ,U
+       STD     2,U
+       STD     $100,U
+       STD     $102,U
+       STD     $200,U
+       STD     $202,U
+       RTS
+*
+*ON 2X3 OBJECT
+*
+ON23   BCC     ON230
+       LEAY    2,Y
+ON230  LDY     OBJP0,Y
+       TFR     D,U
+       LDD     ,Y
+       STD     ,U
+       LDD     2,Y
+       STA     2,U
+       STB     $100,U
+       LDD     4,Y
+       STD     $101,U
+       RTS
+*
+*OFF 2X3 OBJECT
+*
+OFF23  TFR     D,U
+       LDD     #0
+       STD     ,U
+       STA     2,U
+       STD     $100,U
+       STA     $102,U
+       RTS
+*
+*OUTPUT 6X4
+*IRQ CALLS ONLY
+*
+ON64   PSHS    X,U,D
+       STS     TEMP48
+       BCC     ON640
+       LEAY    2,Y
+ON640  LDS     OBJP0,Y
+       ADDB    #4
+       TFR     D,U
+ON641  PULS    X,D
+       PSHU    X,D
+       LEAU    260,U
+       PULS    X,D
+       PSHU    X,D
+       LEAU    260,U
+       PULS    X,D
+       PSHU    X,D
+       LEAU    260,U
+       PULS    X,D
+       PSHU    X,D
+       LEAU    260,U
+       PULS    X,D
+       PSHU    X,D
+       LEAU    260,U
+       PULS    X,D
+       PSHU    X,D
+       LDS     TEMP48
+       PULS    X,U,D,PC
+*
+*OFF 6X4
+*
+OFF64  PSHS    X,U,D
+       ADDB    #4
+       TFR     D,U
+       LDD     #0
+OFF641 LDX     #0
+       PSHU    X,D
+       LEAU    260,U
+       PSHU    X,D
+       LEAU    260,U
+       PSHU    X,D
+       LEAU    260,U
+       PSHU    X,D
+       LEAU    260,U
+       PSHU    X,D
+       LEAU    260,U
+       PSHU    X,D
+       PULS    X,U,D,PC
+*
+*OUTPUT 8X6
+*
+ON86   PSHS    X
+       STS     TEMP48
+       BCC     ON860
+       LEAY    2,Y
+ON860  LDS     OBJP0,Y
+       ADDB    #6
+       TFR     D,U
+       PULS    X,D,Y
+       PSHU    X,D,Y
+       LEAU    262,U
+       PULS    X,D,Y
+       PSHU    X,D,Y
+       LEAU    262,U
+ON661  PULS    X,D,Y
+       PSHU    X,D,Y
+       LEAU    262,U
+ON561  PULS    X,D,Y
+       PSHU    X,D,Y
+       LEAU    262,U
+       PULS    X,D,Y
+       PSHU    X,D,Y
+       LEAU    262,U
+       PULS    X,D,Y
+       PSHU    X,D,Y
+       LEAU    262,U
+       PULS    X,D,Y
+       PSHU    X,D,Y
+       LEAU    262,U
+       PULS    X,D,Y
+       PSHU    X,D,Y
+       LDS     TEMP48
+       PULS    X,PC
+*
+*OFF 8X6
+*
+OFF86  PSHS    X
+       ADDB    #6
+       TFR     D,U
+       LDD     #0
+       LDX     #0
+       LEAY    ,X
+       PSHU    X,D,Y
+       LEAU    262,U
+       PSHU    X,D,Y
+       LEAU    262,U
+OFF661 PSHU    X,D,Y
+       LEAU    262,U
+OFF561 PSHU    X,D,Y
+       LEAU    262,U
+       PSHU    X,D,Y
+       LEAU    262,U
+       PSHU    X,D,Y
+       LEAU    262,U
+       PSHU    X,D,Y
+       LEAU    262,U
+       PSHU    X,D,Y
+       PULS    X,PC
+*
+*OUTPUT 5X6
+*
+ON56   PSHS    X
+       STS     TEMP48
+       BCC     ON560
+       LEAY    2,Y
+ON560  LDS     OBJP0,Y
+       ADDB    #6
+       TFR     D,U
+       BRA     ON561
+*
+*OFF 5X6
+*
+OFF56  PSHS    X
+       ADDB    #6
+       TFR     D,U
+       LDD     #0
+       LDX     #0
+       LEAY    ,X
+       BRA     OFF561
+*
+*OUTPUT 6X6
+*
+ON66   PSHS    X
+       STS     TEMP48
+       BCC     ON660
+       LEAY    2,Y
+ON660  LDS     OBJP0,Y
+       ADDB    #6
+       TFR     D,U
+       JMP     ON661
+*
+*OFF 6X6
+*
+OFF66  PSHS    X
+       ADDB    #6
+       TFR     D,U
+       LDD     #0
+       LDX     #0
+       LEAY    ,X
+       BRA     OFF661
+*
+*ON 4X7
+*
+ON47   PSHS    X
+       STS     TEMP48
+       BCC     ON471
+       LEAY    2,Y
+ON471  LDS     OBJP0,Y
+       ADDB    #7
+       TFR     D,U
+       BRA     ON470
+*OFF 4X7
+OFF47  PSHS    X
+       ADDB    #7
+       TFR     D,U
+       LDD     #0
+       LDX     #0
+       LEAY    ,X
+       ANDCC   #0
+       BRA     OFF470
+*
+* ON 5X7 OBJECT
+*
+ON57   PSHS    X
+       STS     TEMP48
+       BCC     ON570
+       LEAY    2,Y
+ON570  LDS     OBJP0,Y
+       ADDB    #7
+       TFR     D,U
+       PULS    D,X,Y,CC
+       PSHU    D,X,Y,CC
+       LEAU    263,U
+ON470  PULS    D,X,Y,CC
+       PSHU    D,X,Y,CC
+       LEAU    263,U
+       PULS    D,X,Y,CC
+       PSHU    D,X,Y,CC
+       LEAU    263,U
+       PULS    D,X,Y,CC
+       PSHU    D,X,Y,CC
+       LEAU    263,U
+       PULS    D,X,Y,CC
+       PSHU    D,X,Y,CC
+       LDS     TEMP48
+       PULS    X,PC
+*
+*OFF 5 X 7
+*
+OFF57  PSHS    X
+       ADDB    #7
+       TFR     D,U
+       LDD     #0
+       LDX     #0
+       LEAY    ,X
+       ANDCC   #0
+       PSHU    D,X,Y,CC
+       LEAU    263,U
+OFF470 PSHU    D,X,Y,CC
+       LEAU    263,U
+       PSHU    D,X,Y,CC
+       LEAU    263,U
+       PSHU    D,X,Y,CC
+       LEAU    263,U
+       PSHU    D,X,Y,CC
+       PULS    X,PC
+
+ON59   PSHS    X,DP
+       STS     TEMP48
+       BCC     ON591
+       LEAY    2,Y
+ON591  LDS     OBJP0,Y
+       ADDB    #9      MOVE TO END OF COLUMN
+       TFR     D,U
+       LDA     ,S+     GET A BYTE
+       STA     -9,U
+       PULS    Y,X,D,DP,CC
+       PSHU    Y,X,D,DP,CC
+       LEAU    264,U
+       LDA     ,S+     GET A BYTE
+       STA     -9,U
+       PULS    Y,X,D,DP,CC
+       PSHU    Y,X,D,DP,CC
+       LEAU    264,U
+       LDA     ,S+     GET A BYTE
+       STA     -9,U
+       PULS    Y,X,D,DP,CC
+       PSHU    Y,X,D,DP,CC
+       LEAU    264,U
+       LDA     ,S+     GET A BYTE
+       STA     -9,U
+       PULS    Y,X,D,DP,CC
+       PSHU    Y,X,D,DP,CC
+       LEAU    264,U
+       LDA     ,S+     GET A BYTE
+       STA     -9,U
+       PULS    Y,X,D,DP,CC
+       PSHU    Y,X,D,DP,CC
+       LDS     >TEMP48 RESTORE POINTER
+       PULS    X,PC,DP
+
+OFF59  PSHS    X
+       ADDB    #9
+       TFR     D,U
+       LDX     #0
+       LEAY    ,X
+       CLRA
+       PSHU    X,Y,A
+       PSHU    X,Y
+       LEAU    265,U
+       PSHU    X,Y,A
+       PSHU    X,Y
+       LEAU    265,U
+       PSHU    X,Y,A
+       PSHU    X,Y
+       LEAU    265,U
+       PSHU    X,Y,A
+       PSHU    X,Y
+       LEAU    265,U
+       PSHU    X,Y,A
+       PSHU    X,Y
+       PULS    X,PC
+
+FBALON PSHS    X
+       STS     TEMP48
+       BCS     FBAL1
+       LDS     OBJP0,Y GET FIRST GUY
+       ADDB    #5
+       TFR     D,U     NOW, ONLY DO 3 COLUMNS
+       BRA     FBAL2
+FBAL1  LDS     OBJP0+2,Y GET ODD FLAVOR OUTRIGHT
+       ADDB    #5
+       TFR     D,U
+       PULS    X,Y,A
+       PSHU    X,Y,A
+       LEAU    261,U
+FBAL2  PULS    X,Y,A
+       PSHU    X,Y,A
+       LEAU    261,U
+       PULS    X,Y,A
+       PSHU    X,Y,A
+       LEAU    261,U
+       PULS    X,Y,A
+       PSHU    X,Y,A
+       LDS     TEMP48
+       PULS    X,PC
+*
+* ACRED: ADDS A CREDITS TO TOTAL CREDITS; 99 MAX
+*
+ACRED  PSHS    A,X     SAVE
+       ADDA    CREDIT  GET PRESENT
+       DAA             HUMANIZE
+       BCC     ACRD0   NO OVERFLOW
+       LDA     #$99    YES, STAY AT 99
+ACRD0  STA     CREDIT  SAVE NEW COUNT
+       LDX     #CREDST BACKUP CREDITS
+       JSR     WCMOSA
+       PULS    X,A,PC  GO BACK CLEAN
+*
+* COIN SLOT ROUTINES
+*
+COINR  PSHS    D,X     SAVE STATE
+       LDB     #$03    3RD TOTALS(RIGHT COIN)
+       BRA     COIN$   HANDLE BELOW
+COINC  PSHS    D,X     SAVE STATE
+       LDB     #$02    2ND TOTALS(CENTER COIN)
+       BRA     COIN$   HANDLE BELOW
+COINL  PSHS    D,X     SAVE STATE
+       LDB     #$01    1ST TOTALS(LEFT COIN)
+COIN$  JSR     AUD1    BUMP COUNT BY 1
+       ASLB    DOUBLE  FOR CMOS
+       LDX     #SLOT1M-2 POINT TO START-2
+       ABX             REMOVE OFFSET
+       JSR     RCMOSB  GET CORRECT SLOT X
+       BSR     BCDBIN  CONVERT TO BINARY
+       LDA     BUNITS  GET PRESENT BONUS UNITS
+       PSHS    B       AND ADD PRESENT COUNT TO IT
+       ADDA    ,S
+       STA     BUNITS  UPDATE
+       LDA     CUNITS
+       ADDA    ,S+     GET PRESENT
+       STA     CUNITS  UPDATE
+       LDX     #MINUNT GET MINIMUM UNITS
+       JSR     RCMOSB  FROM CMOS
+       BSR     BCDBIN  WORK IN BINARY
+       PSHS    B       FOR CBA
+       CMPA    ,S+     ENOUGH?
+       BCC     COIN1   YES, GIVE IT
+       PULS    D,X,PC  NOT ENOUGH SO FAR, BYE
+COIN1  LDX     #CUNITC HOW MANY?
+       JSR     RCMOSB  GET IT
+       BSR     BCDBIN  CONVERT TO HEX
+       BSR     DIVAB   SAVE REMAINDER IN B
+       PSHS    A       SAVE COUNT TO BE AWARDED FOR A WHILE
+       STB     CUNITS  SAVE REMAINDER
+       LDX     #CUNITB BONUS REQUIRES HOW MANY?
+       JSR     RCMOSB  IN B
+       LDA     BUNITS  GET BONUS SO FAR
+       BSR     BCDBIN  CONVERT TO BINARY
+       BSR     DIVAB   DIVIDE
+       TSTA            ANY YET?
+       BEQ     COIN2   NO
+       CLR     CUNITS  YES, RESET ANY EXTRA
+       CLR     BUNITS
+COIN2  ADDA    ,S+     GET OTHER CREDITS EARNED
+       DAA             HUMANIZE
+       LDB     #$04    BUMP TOTPDC
+       JSR     AUD     BY THE COUNT PAID FOR
+       JSR     ACRED   ADD TO CREDITS COUNTER
+       PULS    D,X,PC  CLEAN + GO
+*
+* DIVAB: A/B, REMAINDER IN B
+*
+DIVAB  PSHS    B       SAVE
+       TSTB            ANY?
+       BNE     DIVAB0  YES, HANDLE
+       CLRA            NO, SET TO 0
+       PULS    B,PC    CLEAN RETURN
+DIVAB0 EXG     A,B     FOR DAA
+       LDA     #$99    START-1
+DIVAB1 ADDA    #$01    NEXT
+       DAA             HUMANIZE
+       SUBB    ,S      TAKE AWAY N
+       BCC     DIVAB1  LOOP TILL OVERFLOW
+       ADDB    ,S+     ADD REMAINDER + FIX STACK
+       RTS             BTE
+*
+* BCDBIN: BCD=B, BINARY=B
+*
+BCDBIN PSHS    A       SAVE STATE
+       EXG     A,B     MOVE B TO A FOR DAA
+       CLRB    SET     COUNT TO ZERO
+BCDBN1 TSTA    DONE?
+       BNE     BCDBN2  NO
+       PULS    A,PC    CLEAN UP + GO
+BCDBN2 ADDA    #$99    SUBTRACT 1
+       DAA             HUMANIZE
+       INCB            BUMP COUNTER
+       BRA     BCDBN1  LOOP TILL A=0
+*
+*COIN SWITCHES
+*LEFT
+LCOIN  LDX     #LCCNT
+       LDY     #COINL
+       BRA     COIN
+*RIGHT
+RCOIN  LDX     #RCCNT
+       LDY     #COINR
+       BRA     COIN
+*CENTER
+CCOIN  LDX     #CCCNT
+       LDY     #COINC
+*
+*COIN ROUTINE
+*X=DEBOUNCE COUNTER
+*B=ROUTINE
+COIN   LDA     SLMCNT
+       BNE     SLAMX
+       LDA     ,X
+       BNE     SLAMX
+       LDA     #$16    DEBOUNCE TIME
+       STA     ,X
+       STY     PD2,U   SAVE JUMP
+       NAP     10,CN1
+CN1    LDA     SLMCNT
+       BNE     SLAMX   SLAM, DITCH
+       LDD     #CNSND
+       JSR     SNDLD
+       JSR     [PD2,U]
+SLAMX  JMP     SUCIDE
+*
+*SOUND TABLE
+*SNDPRI,N*(REPCNT,SNDTMR,SND#) N>=1
+*SNDTMR IN 16 MSEC
+*SNDPRI : HI=HI,INTERRUPTABLE BY EQUALS
+*END: REPCNT=0
+*
+CNSND  FCB     $FF,$01,$18,$19,0 COIN SOUND
+RPSND  FCB     $EF,$01,$20,$1E,0 FREE SHIP
+PDSND  FCB     $EE,$02,$08,$11,$01,$20,$17,0 PLAYER DEATH
+ST1SND FCB     $F0,$01,$40,$0A,0 START 1
+ST2SND FCB     $F0,$01,$10,$0B,0 START2
+TBSND  FCB     $E8,$01,$04,$14,$02,$06,$11
+       FCB     $02,$0A,$17,0 TERRAIN BLOW
+SBSND  FCB     $E8,$06,$04,$11,$01,$10,$17,00 SMART BOMB
+ACSND  FCB     $E0,$03,$0A,$08,0 ASTRO CATCH
+ALSND  FCB     $E0,$01,$18,$1F,0 ASTRO LAND
+AHSND  FCB     $E0,$01,$18,$11,0 ASTRO HIT
+ASCSND FCB     $D8,$01,$10,$1A,0 ASTRO SCREAM
+APSND  FCB     $D0,$01,$30,$15,0 APPEAR SOUND
+PRHSND FCB     $D0,$01,$10,$05,0 PROBE HIT
+SCHSND FCB     $D0,$01,$08,$17,0 SCHITZ HIT
+UFHSND FCB     $D0,$01,$08,$07,0 UFO HIT
+TIHSND FCB     $D0,$01,$0A,$01,0 TIE HIT
+LHSND  FCB     $D0,$01,$0A,$06,0 LANDER HIT
+LPKSND FCB     $E1,$01,$10,$0B,0 LANDER PICK UP
+LSKSND FCB     $C8,$0A,$01,$0E,0 LANDER SUCK
+SWHSND FCB     $C0,$01,$08,$07,0 SWARM HIT
+LASSND FCB     $C0,$01,$30,$14,0 LASER
+LGSND  FCB     $C0,$01,$20,$18,0 LANDER GRAB
+LSHSND FCB     $C0,$01,$08,$03,0 LANDER SHOOT
+SSHSND FCB     $C0,$01,$30,$09,0 SCHITZO SHOOT
+USHSND FCB     $C0,$01,$08,$03,0 UFO SHOOT
+SWSSND FCB     $C0,$01,$18,$0C,0 SWARM SHOOT
+*
+*SOUND OUTPUT
+*B=SND TO MAKE
+*
+SNDOUT PSHS    A,B,CC
+       ORCC    #$FF
+       LDA     #$3F
+       STA     SOUND
+       COMB
+       ANDB    #$3F    DONT TURN ON LEDS
+       STB     SOUND
+       PULS    A,B,CC,PC
+*
+*SOUND LOADER
+*D=ADDR OF SOUND
+*
+*SNDLD PSHS X,D,CC
+* CLR THFLG RESET THRUST
+SNDLD  JMP     SNDPCH  *****************ATTR SOUND PATCH
+       NOP             *****************WASTE A BYTE
+       TFR     D,X
+       LDA     ,X
+       CMPA    SNDPRI
+       BLO     SNDLDX  PRIORITY NOT HI ENOUGH
+       STA     SNDPRI
+       LEAX    -2,X
+       ORCC    #$10    (SEI)
+       STX     SNDX
+       LDD     #$0101
+       STD     SNDTMR  INIT TIMER,REPCNT
+SNDLDX PULS    X,D,CC,PC
+*
+*SOUND SEQUENCER
+*
+SNDSEQ LDA     SNDTMR
+       BEQ     SNDS00
+       DEC     SNDTMR
+       BNE     SNDSX
+       LDX     SNDX
+       DEC     SNDREP
+       BNE     SNDS1
+       LEAX    3,X     GET NEXT
+       STX     SNDX
+       LDA     ,X
+       BNE     SNDS0   SOUND OVER?
+       STA     SNDPRI  YIP
+SNDS00 LDA     PIA21   THRUST ON?
+       BITA    #2
+       BNE     SNDS01  YES
+       LDA     THFLG   NO,ACTIVE?
+       BEQ     SNDSX   NO
+       CLR     THFLG   YES,TURN IT OFF
+       LDB     #$0F
+       BRA     SNDSX1
+SNDS01 LDA     THFLG   THRUST ALREADY ON?
+       BNE     SNDSX   YIP...
+       LDA     STATUS
+       BITA    #$98    PLAYER ALIVE?
+       BNE     SNDSX   NO
+       LDB     #$16    NO HIT IT
+       STB     THFLG
+       BRA     SNDSX1
+SNDS0  STA     SNDREP
+SNDS1  LDD     1,X
+       STA     SNDTMR
+SNDSX1 BSR     SNDOUT
+SNDSX  EQU     *
+*
+*SWITCH SCAN
+*TRIGGER=LAST 2 ZERO, NOW 1 GAME SWITCH
+*TRIGGER=LAST 1 ZERO, NOW 2 1 COINS
+SSCAN  LDA     PIA0
+       BITA    #$40
+       BEQ     SSC00
+       LDA     #60
+       STA     SLMCNT
+*COIN + SLAM DEBOUNCERS
+SSC00  LDA     SLMCNT
+       BEQ     SSC0A
+       DEC     SLMCNT
+SSC0A  LDA     LCCNT
+       BEQ     SSC0B
+       DEC     LCCNT
+SSC0B  LDA     CCCNT
+       BEQ     SSC0C
+       DEC     CCCNT
+SSC0C  LDA     RCCNT
+       BEQ     SSC0
+       DEC     RCCNT
+SSC0   LDA     PIA21
+       ORA     PIA22
+       COMA
+       LDB     PIA21
+       STB     PIA22
+* LDB PIA2
+       JMP     SWPCH   **************ATTR SWITCH SCAN PATCH********
+       STB     PIA21
+       LDB     PIA3
+       STB     PIA31
+       ANDA    PIA21
+       BEQ     CSCAN
+       LDU     #SWTAB-4
+SWITCH CLRB
+SW0    ADDB    #4
+       LSRA
+       BCC     SW0
+       PSHS    D,U     SAVE BASE, SHIFTERS
+       LEAU    B,U
+       PULU    D,X
+       LDU     SWPROC
+       JMP     SWWPC9
+       ORG     $7AD
+*
+*SCAN COIN SWITCHES
+*
+CSCAN  LDA     PIA01
+       ORA     PIA02
+       COMA
+       LDB     PIA01
+       STB     PIA02
+       LDB     PIA0
+       ANDB    #$3F
+       STB     PIA01
+       BITA    PIA01
+       BEQ     CSCX    NO HIT
+       LDX     #120
+CSC1   LEAX    -1,X    1 MSEC DELAY
+       BNE     CSC1
+       LDB     PIA0    DOUBLE CHECK
+       ANDB    PIA01
+       STB     PIA01
+       ANDA    PIA01
+       BEQ     CSCX    NOBODY THERE
+       LDU     #SWTAB1-4 HANDLE IT
+       BSR     SWITCH
+CSCX   RTS
+*
+*GET PLAYER STATE INDEX
+*
+PLINDX PSHS    A
+       LDA     CURPLR
+PLND1  LDX     #PLDATA
+       DECA
+       BEQ     PLINX
+       LDX     #.P2SCR
+PLINX  PULS    A,PC
+PLDX   PSHS    A
+       BRA     PLND1
+*
+*RANDOM NUMBER GENERATOR
+*
+RAND   PSHS    B
+       LDB     SEED
+       LDA     #3
+       MUL
+       ADDB    #17
+       LDA     LSEED
+       LSRA
+       LSRA
+       LSRA
+       EORA    LSEED
+       LSRA
+       ROR     HSEED
+       ROR     LSEED
+       ADDB    LSEED
+       ADCB    HSEED
+       STB     SEED
+       LDA     SEED
+       PULS    B,PC
+*
+*INITIALIZE PROCESS DATA STRUCTURE
+*
+PINIT  PSHS    X,D
+       CLRD
+       LDX     #PTAB
+       STX     FREE
+PINIT1 LEAX    PSIZE,X
+       STX     -PSIZE,X
+       CMPX    #TABEND-PSIZE
+       BNE     PINIT1
+       STD     ,X
+       STD     ACTIVE
+*SUPER PROCESSES
+       LDX     #SPTAB
+       STX     SPFREE
+PINIT2 LEAX    SPSIZE,X
+       STX     -SPSIZE,X
+       CMPX    #SPTEND-SPSIZE
+       BNE     PINIT2
+       STD     ,X
+       LDX     #ACTIVE
+       STX     CRPROC
+       PULS    X,D,PC
+*INITIALIZE COLOR RAM
+CRINIT LDX     #CRTAB
+       LDU     #PCRAM
+       LDB     #16
+INITC  LDA     ,X+
+       STA     ,U+
+       DECB
+       BNE     INITC
+       RTS
+*
+*INITIALIZE OBJECT LIST
+*
+OINIT  PSHS    CC,X,D
+       ORCC    #$FF    OFF INTERRUPTS
+       LDX     #OLIST
+       STX     OFREE
+OINIT1 LEAX    OSIZE,X
+       STX     -OSIZE,X
+       CMPX    #OLEND-OSIZE
+       BNE     OINIT1
+       CLRD
+       STD     ,X      LAST LINK 0
+       STD     IPTR    INACTIVE LIST
+       STD     OPTR
+       STD     SPTR
+       PULS    CC,X,D,PC
+*
+* MONOCHROMATIZER ROUTINE Y = OBJECT PICTURE ADDRESS
+* U = MONOCHROMATIC PICTURE ADDRESS
+* COLOR: $F
+*
+MONO   PSHS    U,X,D   SAVE REGISTERS
+       LDD     OBJW,Y  GET PICTURE SIZE
+       STD     OBJW,U  COPY TO MONO DESCRIPTOR
+       MUL             COMPUTE NUMBER OF BYTES
+       LEAX    OBJL,U  GET START OF MONO DATA ADDRESS
+       STX     OBJP0,U SAVE IN MONO DESCRIPTOR
+       LEAX    D,X     ADD NUMBER OF BYTES OF ONE IMAGE
+       STX     OBJP1,U SAVE IN MONO DESCRIPTOR
+       PSHS    X       END OF FIRST MONO FLAVOR
+       LEAX    D,X     ADD NUMBER OF BYTES OF ONE IMAGE
+       PSHS    X       SAVE END OF SECOND MONO FLAVOR
+       LDD     OBJWRT,Y GET OBJECT WRITE ROUTINE
+       STD     OBJWRT,U COPY TO MONO DESCRIPTOR
+       LDD     OBJDEL,Y GET OBJECT ERASE ROUTINE
+       STD     OBJDEL,U COPY TO MONO DESCRIPTOR
+       LDX     OBJP0,Y GET START OF FIRST FLAVOR OBJECT DATA
+       LEAU    OBJL,U  GET START OF FIRST FLAVOR MONO
+       BSR     MONO1   MONOCHROMATIZE FIRST FLAVOR
+       LDX     OBJP1,Y GET START OF SECOND FLAVOR OBJECT DATA
+       LDU     2,S     GET START OF SECOND FLAVOR MONO
+       LDD     ,S      GET END OF SECOND FLAVOR MONO
+       STD     2,S     SET BOUNDARY
+       BSR     MONO1   MONOCHROMATIZE SECOND FLAVOR
+       LEAS    4,S     CLEAN THE STACK
+       PULS    D,X,U,PC RESTORE REGISTERS, RETURN
+* MONOCHROMATIZE LOOP
+MONO1  LDD     ,X++    GET TWO BYTES OF OBJECT, ADVANCE POINTER
+       BITA    #$F0    TEST FIRST NIBBLE
+       BEQ     MONO2   ZERO?, SKIP IT
+       ORA     #$F0    COLORED?, SET TO $F
+MONO2  BITA    #$0F    TEST SECOND NIBBLE
+       BEQ     MONO3   ZERO?, SKIP IT
+       ORA     #$0F    COLORED?, SET TO $F
+MONO3  BITB    #$F0    TEST THIRD NIBBLE
+       BEQ     MONO4   ZERO?, SKIP IT
+       ORB     #$F0    COLORED?, SET TO $F
+MONO4  BITB    #$0F    TEST FOURTH NIBBLE
+       BEQ     MONO5   ZERO?, SKIP IT
+       ORB     #$0F    COLORED?, SET TO $F
+MONO5  ANDA    #$BB    CHANGE COLOR TO $B
+       ANDB    #$BB
+       STD     ,U++    SAVE TWO BYTES MONO, ADVANCE POINTER
+       CMPU    4,S     CHECK FOR END OF OBJECT
+       BLO     MONO1   NO?, CONTINUE
+       RTS     YES?,   RETURN
+*
+*RANDOM MAX ROUTINE
+*A = RAND <=A
+RMAX   PSHS    A
+       JSR     RAND
+RMAX1  CMPA    ,S
+       BLS     RMAXX
+       LSRA
+       BRA     RMAX1
+RMAXX  INCA
+       LEAS    1,S
+       RTS
+*
+*BCD-HEX CONVERT
+*A=BCD-HEX
+BCDHEX PSHS    B
+       CLRB
+BCH1   CMPA    #$10
+       BLO     BCH2
+       ADDB    #10
+       SUBA    #$10
+       BRA     BCH1
+BCH2   PSHS    B
+       ADDA    ,S+
+       PULS    B,PC
+*
+*HEX-BCD CONVERT
+*A=HEX-BCD
+HEXBCD PSHS    B
+       TFR     A,B
+       CLRA
+HBC1   CMPB    #10
+       BLO     HBC2
+       ADDA    #$10
+       DAA
+       SUBB    #10
+       BRA     HBC1
+HBC2   PSHS    B
+       ADDA    ,S+
+       DAA
+       PULS    B,PC
+*
+*STAR INITIALIZE
+*
+STINIT LDX     #SMAP
+       LDB     #16
+       STB     STRCNT
+       CLRB
+STI0   JSR     RAND
+       CMPA    #$9C
+       BHS     STI0    NO GOOD
+       STA     SX,X    GET X
+STI1   JSR     RAND
+       CMPA    #$A0    LIMIT TEST
+       BHI     STI1
+       CMPA    #YMIN
+       BLS     STI1
+       STA     SY,X
+       STB     SCOL,X  COLOR
+       ADDB    #$11
+       ANDB    #$77
+       LEAX    SLGTH,X
+       CMPX    #SMEND
+       BNE     STI0
+STX    RTS
+*
+*OUTPUT STARS
+*
+STOUT  LDA     STATUS
+       BITA    #$20
+       BNE     STX     NO
+       LDX     #SMAP
+       LDD     BGL
+       ANDB    #$80
+       STD     ITEMP
+       LDD     BGLX
+       ANDB    #$80
+       SUBD    ITEMP
+       ASLB            GET DELTA
+       ROLA
+*
+*STAR OUTPUT
+*ITEMP2=PHASE MASK
+*X =ADDR OF STAR TABLE START
+*B=COUNT
+*ITEMP = MOVEMENT
+       STA     ITEMP
+       LDB     #$F0
+       LDA     BGL+1
+       BITA    #$40    GET PHASES
+       BNE     STOUT0
+       COMB
+STOUT0 STB     ITEMP2
+       CLRA
+       STA     [0,X]
+       STA     [4,X]
+       STA     [8,X]
+       STA     [12,X]
+       STA     [16,X]
+       STA     [20,X]
+       STA     [24,X]
+       STA     [28,X]
+       STA     [32,X]
+       STA     [36,X]
+       STA     [40,X]
+       STA     [44,X]
+       STA     [48,X]
+       STA     [52,X]
+       STA     [56,X]
+       STA     [60,X]
+       LDB     STRCNT
+STOUT1 LDA     SX,X
+       ADDA    ITEMP
+       CMPA    #$9C
+       BLO     STOUT3  NO OVERFLOW
+       CMPA    #$C0    WHICH WAY DID HE COME
+       BLS     STOUT2
+       LDA     #$9B
+       BRA     STOUT3
+STOUT2 LDA     #0
+STOUT3 STA     SX,X
+       LDA     SCOL,X
+       ANDA    ITEMP2  *****************************
+       FCB     $A7,$98,$0 !!!BSO BONER!!!=STA [SX,X]
+       LEAX    SLGTH,X *****************************
+       DECB
+       BNE     STOUT1
+*
+*STAR BLINK
+*
+SBLNK  LDB     SEED    GET A RANDOM GUY
+       ANDB    #$3C
+       LDX     #SMAP
+       ABX
+       LDA     SCOL,X  CHANGE COLOR
+       ADDA    #$11
+       ANDA    #$77
+       STA     SCOL,X
+       LDA     SEED
+       BITA    #$01    HYPER?
+       BNE     SBLNK1  NO
+       CMPA    #$98
+       BLO     SBLNK0
+SBL00  SUBA    #$84    ************************************
+SBLNK0 FCB     $6F,$98,$00 !!!BSO BONER!!!=CLR [SX,X] HYPER
+       STA     SX,X    ************************************
+       LDA     STATUS
+       BITA    #2
+       BEQ     SBLNK1  TERRAIN ACTIVE, QUIT
+       LDA     LSEED   Y       HYPER
+       ANDA    #$3F
+       LDB     #3
+       MUL
+       ADDB    #YMIN
+       STB     SY,X
+SBLNK1 EQU     *
+*
+*VOLCANO ROUTINE
+*
+VOLC   LDA     #$87
+       SUBA    BGL
+       CMPA    #$26
+       BLS     VOLC1
+VOLCX1 LDA     VFLG    ERASE LAST GUYS?
+       BEQ     VOLCX   NO
+       CLRA
+       CLRB
+       STA     VFLG
+       LDX     #LAVTAB
+       STD     [LAVX,X]
+       STD     [LAVX+LAVL,X]
+       STD     [LAVX+2*LAVL,X]
+       STD     [LAVX+3*LAVL,X]
+       STA     LAVTIM,X
+       STA     LAVTIM+LAVL,X
+       STA     LAVTIM+2*LAVL,X
+       STA     LAVTIM+3*LAVL,X
+       STA     VETIM
+VOLCX  RTS
+VOLC1  LDB     OVCNT
+       CMPB    #2
+       BHS     VOLCX1
+       LDA     STATUS
+       BITA    #$2
+       BNE     VOLCX1  TERRAIN INACTIVE
+       LDD     #$87AA
+       STA     VFLG
+       SUBD    BGL
+       ASLB
+       ROLA
+       ASLB
+       ROLA
+       STD     ITEMP   X OFFSET
+       LDD     #0
+       LDX     #LAVTAB
+       STD     [LAVX,X] OFF OLDIES
+       STD     [LAVX+LAVL,X]
+       STD     [LAVX+2*LAVL,X]
+       STD     [LAVX+3*LAVL,X]
+VOLCLP LDA     LAVTIM,X
+       BEQ     VOLCLX
+       DEC     LAVTIM,X
+       BEQ     VOLCLX
+       LDD     LAVXV,X
+       ADDD    LAVX16,X
+       STD     LAVX16,X
+       ADDD    ITEMP
+       CMPA    #$9A    ON SCREEN??
+       BLO     VOLC10
+VOLC11 JMP     VOLPAC
+       NOP
+VOLC10 STA     LAVX,X
+       LDD     LAVYV,X
+       ADDD    #$0010  Y ACCEL
+       STD     LAVYV,X
+       ADDD    LAVY16,X Y VELOCITY
+       STD     LAVY16,X
+       ADDA    #$10
+       CMPA    #YMIN+$10
+       BLS     VOLC11
+       LDD     #$4444  GET COLOR
+       STD     [LAVX,X]
+VOLCLX LEAX    LAVL,X
+       CMPX    #LAVTND
+       BNE     VOLCLP
+*CHECK FOR A NEW ERUPTION
+       DEC     VETIM
+       BPL     VOLC4   NO
+*START ERUPTION
+       LDD     SEED
+       ANDB    #$3F    NEXT ERUPTION SCHED
+       STB     VETIM
+       ANDA    #3      # OF ROCKS
+       INCA
+       STA     ITEMP
+VOLC2  LDX     #LAVTAB
+VOLC2L LDA     LAVTIM,X        ACTIVE??
+       BNE     VOLC3   YES
+       CLR     LAVX16,X
+       LDB     SEED
+       SEX
+       STD     LAVXV,X
+       LDA     #3
+       JSR     RMAX
+       NEGA
+       LDB     LSEED
+       STD     LAVYV,X
+       ANDB    #$3F
+       ADDB    #$38
+       STB     LAVTIM,X
+       LDA     #$9C    VOLCANO Y
+       STA     LAVY16,X
+VOLC3  LEAX    LAVL,X
+       CMPX    #LAVTND
+       BEQ     VOLC4
+       DEC     ITEMP
+       BNE     VOLC2L
+VOLC4  RTS
+*
+*INIT THRUST TABLE
+*
+THINIT LDX     #THTAB
+       STX     THX
+THI1   JSR     RAND
+       STA     32,X
+       STA     ,X+
+       CMPX    #THTEND-32
+       BNE     THI1
+       RTS
+*
+*OUTPUT THRUST
+*
+THOUT  LDX     THX
+       LDU     PLAXC
+       LEAU    -$100+1,U
+       LDD     ,X
+       STD     ,U
+       LDA     5,X
+       LDB     9,X
+       STD     2,U
+       LDA     12,X
+       STA     4,U
+       LDA     PIA21
+       BITA    #$02
+       BEQ     THOUTX  IDLE
+       LDA     3,X
+       LDB     6,X
+       STD     -$100+1,U
+       LDA     10,X
+       STA     -$100+3,U
+       LDA     4,X
+       LDB     7,X
+       STD     -$200+1,U
+       LDA     11,X
+       STA     -$200+3,U
+       LDA     8,X
+       STA     -$300+2,U
+THOUTX RTS
+*
+*BACKWARDS THRUST
+*
+THOUT1 LDU     THX
+       LDX     PLAXC
+       LEAX    $801,X
+       PULU    D,Y
+       STD     ,X
+       STY     2,X
+       PULU    D,Y
+       STA     4,X
+       LDA     PIA21
+       BITA    #$02
+       BEQ     THT1X   NO THRUST
+       STB     $101,X
+       STY     $102,X
+       PULU    D,Y
+       STY     $201,X
+       STA     $203,X
+       STB     $302,X
+THT1X  RTS
+*
+*OFF BACKWARDS THRUST
+*
+THOFF1 LDU     PLAXC
+       CLRB
+       LDX     #0
+       LEAY    ,X
+       LEAU    $806,U
+       PSHU    B,X,Y
+       STX     $101,U
+       STB     $103,U
+       STX     $201,U
+       STB     $203,U
+       STB     $302,U
+       RTS
+*
+*OFF OLD THRUST
+*
+THOFF  LDU     PLAXC
+       CLRB
+       LDX     #0
+       LEAY    ,X
+       LEAU    -$100+6,U
+       PSHU    X,Y,B
+       STX     -$100+1,U
+       STB     -$100+3,U
+       STX     -$200+1,U
+       STB     -$200+3,U
+       STB     -$300+2,U
+       RTS
+*
+*PLAYER DISPLAY
+*
+PRDISP STA     TEMP48  SAVE A
+       LDA     STATUS  SEE IF PLAYER DISABLED
+       BITA    #$10
+       BEQ     PRDX1   NOPE....PUT HIM OUT (DOES HE??)
+       LDD     NPLAD   LET HIM REVERSE IF INVISIBLE
+       STD     PLADIR
+       LDD     NPLAXC  REFRESH COORD
+       STD     PLAXC
+PRDX   RTS
+PRDX1  LDA     TEMP48
+       CMPA    PLAYC
+       BLS     PRDX
+       CMPB    PLAYC
+       BHI     PRDX
+       LDA     PLADIR
+       BMI     PRDSP1
+       BSR     POFF
+       BSR     THOFF
+       BRA     PRDSP2
+PRDSP1 BSR     POFF
+       BSR     THOFF1
+PRDSP2 LDD     NPLAD
+       STD     PLADIR
+       BMI     PRDSP3
+       BSR     POUT
+       JMP     THOUT
+PRDSP3 BSR     POUT1
+       JMP     THOUT1
+*
+*PLAYER ON
+*
+POUT   LDY     #PLAPIC
+POUT2  LDA     PLAX16+1
+       ASLA
+       LDD     NPLAXC
+       STD     PLAXC
+       JMP     ON86
+POUT1  LDY     #PLBPIC
+       BRA     POUT2
+*
+*PLAYER OFF
+*
+POFF   LDD     PLAXC
+       JMP     OFF86
+*
+*PLAYER PROCESS
+*CALLED FORM IRQ
+*
+PLAYER LDA     STATUS  CONTROLS INACTIVE?
+       BITA    #$40
+       LBNE    PLAYX   YES
+*X DAMPING
+       CLR     ITEMP
+       LDD     PLAXV
+       COMA
+       COMB
+       ADDD    #1      NEGD
+       BPL     PL00
+       COM     ITEMP   SIGN EXTEND
+PL00   ASLB    SHIFT
+       ROLA
+       ASLB
+       ROLA
+       ADDD    PLAXV+1
+       STD     PLAXV+1
+       LDA     ITEMP
+       ADCA    PLAXV
+       STA     PLAXV
+       LDD     PLAXV
+       LDA     PIA21   ACCEL?
+       BITA    #$02
+       BEQ     PLAY1   NO
+       CLR     ITEMP
+       LDD     PLADIR
+       BPL     PL02
+       COM     ITEMP
+PL02   ADDD    PLAXV+1
+       STD     PLAXV+1
+       LDA     ITEMP
+       ADCA    PLAXV
+       STA     PLAXV
+*VELOCITY MAPPING X MOTION
+PLAY1  LDD     PLAXV   GET 5 BIT VELOCITY
+       ASRA
+       RORB
+       ASRA
+       RORB
+       CLRA
+       ASRB
+       RORA
+       STA     PCX+1
+       STB     PCX
+       LDA     PLADIR  +DIR?
+       BMI     PV1     NO
+       LDA     #$20    +BASE
+       TSTB    +VEL?
+       BMI     PV1A    NO
+       BRA     PV2
+PV1    LDA     #$70    -BASE
+       TSTB    -VEL?
+       BMI     PV2     YES
+PV1A   CLR     PCX+1
+       CLR     PCX
+PV2    LDB     PCX+1
+       ADDA    PCX     CALCULATED POSITION
+       STA     PCX
+PV2A   SUBD    PLAX16  ACTUAL POS
+       BEQ     PV9     NO DIFF
+       BLO     PV3
+       CMPD    #$100   IN RANGE?
+       BLS     PV9
+       LDD     #$40
+       STD     BGDELT
+       LDD     #$100
+       ADDD    PLAX16
+       BRA     PV10
+PV3    CMPD    #-$100
+       BGT     PV9     YES IN RANGE
+       LDD     #-$40   NO
+       STD     BGDELT
+       LDD     #-$100
+       ADDD    PLAX16  ADJUST SLIDE
+       BRA     PV10
+PV9    CLRD
+       STD     BGDELT  NO ADJUST NEEDED
+       LDD     PCX     WERE OK
+PV10   STD     PLAX16
+       STA     NPLAXC
+       LDD     BGL
+       STD     BGLX
+       LDD     PLAXV
+       CMPD    #$0100  MAX VEL
+       BLT     PV11
+       LDD     #$0100
+PV11   CMPD    #-$0100
+       BGT     PV12
+       LDD     #-$0100
+PV12   STD     PLAXV
+       ADDD    BGL
+       SUBD    BGDELT
+       STD     BGL
+*PLAYER ABSOLUTE X COORD
+       LDD     PLAX16
+       LSRA
+       RORB
+       LSRA
+       RORB
+       ANDB    #$E0
+       ADDD    BGL
+       STD     PLABX
+*VERTICAL MOTION
+       LDB     PLAY16  GET ADDR FOR LIMIT CHK
+       LDA     PIA31   UP?
+       LSRA
+       BCS     PLAUP   YES
+       LDA     PIA21
+       BMI     PLADN   DOWN
+       LDD     #0
+       BRA     PYV1
+PLAUP  CMPB    #YMIN+1
+       BLS     PLAYX
+       LDD     PLAYV
+       BPL     PLAUP1
+       ADDD    #-8
+       CMPD    #-$200
+       BGE     PYV1
+       LDD     #-$200
+       BRA     PYV1
+PLAUP1 LDD     #-$100
+       BRA     PYV1
+PLADN  CMPB    #238
+       BHS     PLAYX
+       LDD     PLAYV
+       BLE     PLADN1
+       ADDD    #8
+       CMPD    #$200
+       BLS     PYV1
+       LDD     #$200
+       BRA     PYV1
+PLADN1 LDD     #$100
+       BRA     PYV1
+PYV1   STD     PLAYV
+       ADDD    PLAY16
+       STD     PLAY16
+       STA     NPLAYC
+PLAYX  RTS
+*
+*VELOCITY ADDITION
+*
+VELO   LDA     STATUS
+       BITA    #$20
+       BNE     VELOX   DISABLED
+       LDX     #OPTR
+       BRA     VELLP
+VELOLP LDD     OX16,X  UPDATE X
+       ADDD    OXV,X
+VELO2  STD     OX16,X
+       LDD     OY16,X
+       ADDD    OYV,X
+       CMPA    #YMIN
+       BHS     VELO3
+       LDA     #YMAX
+VELO3  CMPA    #YMAX
+       BLS     VELO4
+       LDA     #YMIN
+VELO4  STD     OY16,X
+VELLP  LDX     ,X
+       BNE     VELOLP
+VELOX  RTS
+*
+*OBJECT PROCESSING
+*
+OPROC  STD     ITEMP2  SAVE LIMITS
+       LDA     STATUS
+       BITA    #$20
+       BNE     OPRX    NO
+       LDX     #OPTR
+       BRA     OPLP
+*ERASE OLD OBJECT
+OPLP0  LDD     OBJX,X
+       BEQ     OPON    ALREADY ERASED
+       CMPB    ITEMP2  TOO HIGH Y?
+       BHI     OPLP    YES
+       CMPB    ITEMP2+1 Y TOO LOW?
+       BLS     OPLP    YES
+       LDY     OPICT,X
+       JSR     [OBJDEL,Y]
+       LDD     #0
+       STD     OBJX,X  OFF OBJECT
+*ON NEW OBJECT
+OPON   LDB     OY16,X  CAN WE WRITE
+       CMPB    ITEMP2  UPPER BOUND
+       BHI     OPLP
+       CMPB    ITEMP2+1
+       BLS     OPLP    NO
+*CHECK ON SCREEN
+       LDD     OX16,X
+       SUBD    BGL
+       CMPD    #150*64
+       BHS     OPLP    OFF SCREEN
+       LDY     OPICT,X GET PICT
+       ASLB
+       ROLA
+       ASLB
+       ROLA
+       ADDA    OBJW,Y  OVER WIDTH PROTECTION
+       CMPA    #$9C
+       BHI     OPLP
+       SUBA    OBJW,Y
+       ASLB            SAVE PHASE
+       LDB     OY16,X
+       STD     OBJX,X  STORE NEW COORDES
+       JSR     [OBJWRT,Y]
+OPLP   LDX     OLINK,X
+       BNE     OPLP0   CHECK THE REST
+OPRX   RTS
+
+*
+*GET A SHELL
+*X=OBJECT FIRING, RETURNED PTR TO SHELL
+*U= OBJID
+*RET=OUPUT ROUTINE
+*RET+2=COLLISION PICT
+*RET+4= KILL ROUTINE
+*RET+6= RET
+*
+GETSHL PSHS    D,Y,U
+       LDA     BMBCNT  SHOT LIMIT
+       CMPA    #20
+       BHS     STSHX
+       LDD     OX16,X
+       SUBD    BGL
+       CMPD    #150*64
+       BHS     STSHX   OFF SCREEN CHECK
+       ASLB
+       ROLA
+       ASLB
+       ROLA
+       LDB     OY16,X
+       CMPB    #YMIN
+       BLS     STSHX
+       LDX     OFREE
+       BEQ     STSHX
+       STD     OBJX,X
+       STD     OX16,X
+       EXG     A,B
+       STD     OY16,X
+       STU     OBJID,X
+       CLRD
+       STD     OXV,X
+       STD     OYV,X
+       LDU     6,S
+       PULU    D,Y
+       STD     OBJCOL,X
+       STY     OPICT,X
+       PULU    D
+       STU     6,S     NEW RET ADDR
+       STD     OCVECT,X
+       LDA     #20     DEFAULT LIFETIME
+       STA     ODATA,X
+       STA     ODATA+1,X ALIVE
+       LDD     OLINK,X
+       STD     OFREE
+       LDD     SPTR
+       STD     OLINK,X
+       INC     BMBCNT  KICK COUNTER
+       STX     SPTR    LINK HIM IN
+       PULS    D,Y,U,PC
+STSHX  LDU     6,S     GET RETURN ADDR
+       LEAU    6,U
+       STU     6,S
+       CLRA
+       PULS    D,Y,U,PC
+*
+*SCAN SHELL LIST FOR INACTIVES
+*
+SHSCAN LDX     #SPTR
+       BRA     SHSCLP
+SHSC1  LDA     ODATA+1,X
+       BEQ     SHSCK
+       DEC     ODATA,X
+       BNE     SHSCLP
+SHSCK  LDU     OLINK,X
+       STU     ,Y
+       LDU     OFREE
+       STU     OLINK,X
+       STX     OFREE
+       JSR     OFSHIT
+       DEC     BMBCNT
+       LEAX    ,Y
+SHSCLP LEAY    ,X
+       LDX     ,X
+       BNE     SHSC1
+       RTS
+*
+*FIRE LASER
+*
+LFIRE  JSR     LASPAT  ************************************PATCH
+       NOP
+       NOP
+       NOP             ****************************************
+       INC     LFLG
+       LDD     #LASSND
+       JSR     SNDLD
+       LDX     NPLAXC
+       LDA     NPLAD
+       BPL     LASR
+       JMP     LASL
+LFIREX JMP     SUCIDE
+*
+*RIGHT LASER
+*
+LASR   LEAX    $704,X
+       STX     PD,U
+       STX     PD+2,U
+       STX     PD+4,U
+LASR0  LDA     STATUS
+       BITA    #$40
+       BNE     LRDIE
+       LDX     PD,U
+       LDD     #$9911
+       CMPX    #$9800
+       BHS     LRDIE
+       STB     ,X
+       STB     $100,X
+       STB     $200,X
+       STB     $300,X
+       LEAX    $400,X
+       STA     ,X
+       STX     PD,U
+       LDY     FISX
+       CMPY    #FISEND-3
+       BLO     LASR2
+       LDY     #FISTAB
+LASR2  LDX     PD+2,U
+       LDD     ,Y++
+       STA     ,X
+       STB     $100,X
+       LDB     ,Y+
+       STB     $200,X
+       LEAX    $300,X
+       STY     FISX
+       STX     PD+2,U
+       CLR     [PD+4,U]
+       INC     PD+4,U
+       LDD     PD,U
+       SUBA    #$06
+       PSHS    U
+       LDU     #LASP1
+       JSR     COLIDE
+       PULS    U
+       BNE     LRDIE
+       NAP     1,LASR0
+LRDIE  LDX     PD+4,U
+       CLRA
+LRDLP  STA     ,X
+       LEAX    $100,X
+       CMPX    PD,U
+       BLS     LRDLP
+       BRA     LASD
+*
+*LEFT LASER
+*
+LASL   LEAX    4,X
+       STX     PD,U
+       STX     PD+2,U
+       STX     PD+4,U
+LASL0  LDA     STATUS
+       BITA    #$40
+       BNE     LLDIE
+       LDX     PD,U
+       LDD     #$9911
+       CMPX    #$0500
+       BLS     LLDIE
+       STB     ,X
+       STB     -$100,X
+       STB     -$200,X
+       STB     -$300,X
+       LEAX    -$400,X
+       STA     ,X
+       STX     PD,U
+       LDY     FISX
+       CMPY    #FISEND-3
+       BLO     LASL2
+       LDY     #FISTAB
+LASL2  LDX     PD+2,U
+       LDD     ,Y+
+       STA     ,X
+       STB     -$100,X
+       LDB     ,Y+
+       STB     -$200,X
+       LEAX    -$300,X
+       STY     FISX
+       STX     PD+2,U
+       CLR     [PD+4,U]
+       DEC     PD+4,U
+       LDD     PD,U
+       PSHS    U
+       LDU     #LASP1
+       JSR     COLIDE
+       PULS    U
+       BNE     LLDIE
+       NAP     1,LASL0
+LLDIE  LDX     PD+4,U
+       CLRA
+LLDLP  STA     ,X
+       LEAX    -$100,X
+       CMPX    PD,U
+       BHS     LLDLP
+LASD   DEC     LFLG
+       JMP     SUCIDE
+*
+*
+FISS   LDX     #FISTAB
+       STX     FISX
+FISS0  JSR     RAND
+       CLRB
+       LSRA
+       BCC     F1
+       ADDB    #$01
+F1     LSRA
+       BCC     F2
+       ADDB    #$10
+F2     STB     ,X+
+       CMPX    #FISEND
+       BNE     FISS0
+       RTS
+*
+*COLLISION DETECT
+*U=PICTURE DESC, D=UL COORD X,Y
+*X=OBJECT DESC
+COLIDE LDX     #OPTR
+COL0   STD     ULX     CALC LOWER RT
+       ADDD    OBJW,U
+       STD     LRX     LR CORNER OF PLAYER
+       BRA     COLLP
+COL1   LDD     OBJX,X
+       BEQ     COLLP   OFF SCREEN
+       CMPA    LRX
+       BHS     COLLP
+       CMPB    LRY
+       BHS     COLLP
+       ADDD    [OPICT,X] CALC LR
+       CMPA    ULX
+       BLS     COLLP
+       CMPB    ULY
+       BHI     IC1     CHECK INTERSECTION
+COLLP  LDX     OLINK,X
+       BNE     COL1
+       RTS             RET EQ
+*
+*COMPARE FOR PICTURE INTERSECTION
+*FIND UPPERMOST
+IC1    STU     CTEMP2  SAVE PLAYER DESC
+       LDY     OPICT,X
+       SUBD    ,Y      SAVE OBJX FROM IRQ
+       STD     XTEMP
+       CLRD            CLEAR OFFSETS
+       STD     OX1     GET OBJECT
+       STD     PX1     PLAYER
+       LDD     XTEMP
+       SUBB    ULY     FIND UPERMOST
+       BHI     IC10    PLAYER UPPERMOST
+       NEGB
+       STB     OY1     OBJECT UPPERMOST
+       BRA     IC2
+IC10   STB     PY1
+*FIND LEFTMOST
+IC2    SUBA    ULX
+       BHI     IC20    PLAYER LEFTMOST
+       NEGA
+       STA     OX1     OBJECT LEFTMOST
+       BRA     IC3
+IC20   STA     PX1
+*FIND LOWERMOST
+*CALC OY2
+IC3    LDD     XTEMP   GET OBJX
+       ADDD    OBJW,Y
+       SUBB    LRY
+       BHI     IC4     OBJECT LOWEST
+       CLRB            PLAYER LOWEST
+*FIND RIGHTMOST
+*CALC OX2
+IC4    SUBA    LRX
+       BHI     IC40    OBJECT RIGHTMOST
+       CLRA            PLAYER RIGHTMOST
+*CALC X,Y COUNT
+IC40   STD     CTEMP   SAVE
+       LDD     OBJW,Y  GET WIDTH,HEIGHT
+       SUBD    OX1     OX1,OY1
+       SUBD    CTEMP   OX2,OY2
+       STD     XCNT    XCNT,YCNT
+*INIT SCAN PARAMETERS
+*Y=OBJECT ADDR
+*U=PLAYER ADDR
+       LDA     OBJH,U
+       STA     PLHT
+       LDB     PX1
+       MUL
+       LDU     OBJP0,U
+       LEAU    D,U     INIT PLAYER INDEXSH
+       LDA     OBJH,Y
+       STA     OBHT
+       LDY     OBJP0,Y GET PICT DATA
+       LDB     OX1
+       MUL
+       LEAY    D,Y     INIT OBJECT INDEX
+       LDA     OY1
+       LEAY    A,Y
+       LDA     PY1
+       LEAU    A,U
+IC5    LDB     YCNT
+       DECB
+IC50   LDA     B,U
+       BEQ     IC6
+       LDA     B,Y     CHECK
+       BEQ     IC6
+*FIND CENTER OF EXPLOSION ON SCREEN
+       LEAY    B,Y
+       TFR     Y,D
+       LDU     OPICT,X GET ROM PTR
+       SUBD    OBJP0,U FIND DATA OFFSET
+       LDY     OBJX,X  SCREEN TOP LEFT
+*CALC COLUMN OFFSET
+FC1    SUBB    OBJH,U
+       SBCA    #0
+       BCS     FC2
+       LEAY    $100,Y
+       BRA     FC1
+FC2    ADDB    OBJH,U  CORRECT OVER SUBTRACT
+       ADCA    #0
+       LEAY    B,Y     VERT OFFSET
+       STY     CENTMP  SCREEN COLLISION ADDR
+       JSR     [OCVECT,X]
+       LDA     #1
+       RTS     HIT
+IC6    DECB
+       BPL     IC50    NOT FINISHED COLUMN
+       LDD     OBHT    GET OBHT,PLHT
+       LEAY    A,Y
+       LEAU    B,U
+       DEC     XCNT
+       BNE     IC5
+       LDU     CTEMP2
+       JMP     COLLP
+*
+*COLOR THE LASER
+*
+COLR   CLR     LCOLRX
+COLRLP LDX     #COLTAB
+       LDA     LCOLRX
+COLR0  LDB     A,X
+       BEQ     COLR
+COLR1  INC     LCOLRX
+       STB     PCRAM+1
+       LDA     #2
+       LDX     #COLRLP
+       JMP     SLEEP
+*
+*COLOR TABLE
+*
+COLTAB FCB     $38,$39,$3A,$3B,$3C
+       FCB     $3D,$3E,$3F,$37,$2F,$27,$1F,$17
+       FCB     $47,$47,$87,$87,$C7,$C7
+       FCB     $C6,$C5,$CC,$CB,$CA,$DA,$E8,$F8
+       FCB     $F9,$FA,$FB,$FD,$FF,$BF,$3F,$3E
+       FCB     $3C,0
+*
+*THRUST PROCESS
+*
+THPROC LDX     THX
+       LEAX    1,X
+       CMPX    #THTAB+32
+       BLS     THPR1
+       LDX     #THTAB
+THPR1  STX     THX
+       NAP     4,THPROC
diff --git a/RB37.SRC b/RB37.SRC
new file mode 100755 (executable)
index 0000000..0177980
--- /dev/null
+++ b/RB37.SRC
@@ -0,0 +1,2329 @@
+       TTL     <<<<<  S T A R G A T E  >>>>>
+*
+*SCANNING PROCESS
+*MAINTAINANCE OF ACTIVE,INACTIVE OBJECT LISTS
+*SCANNER DISPLAY
+*
+SCPROC JSR     ISCAN
+       NAP     2,SCP1
+SCP1   JSR     OSCAN
+       JSR     SHSCAN
+       NAP     2,SCP2
+SCP2   JSR     SCNR
+       NAP     4,SCPROC
+*
+*SCAN ACTIVE OBJECTS FOR OFF SCREEN AREA
+*
+OSCAN  LDD     BGL
+       SUBD    #100*32
+       STD     XTEMP
+       LDX     #OPTR
+       BRA     OSCLP
+OSC1   LDD     OX16,X
+       SUBD    XTEMP
+       CMPD    #500*32
+       BLO     OSCLP   IN SCREEN AREA
+       LDU     OLINK,X NO,MOVE TO INACTIVE LIST
+       STU     ,Y
+       LDU     IPTR
+       STU     OLINK,X
+       STX     IPTR
+       LEAX    ,Y      X TO NEXT
+OSCLP  LEAY    ,X
+       LDX     ,X
+       BNE     OSC1
+       RTS
+*
+*SCAN INACTIVE OBJECTS FOR ON SCREEN
+*
+ISCAN  LDD     BGL
+       SUBD    #100*32 100 PIXEL LEFT BUFFER
+       STD     XTEMP
+       LDX     #IPTR
+       BRA     ISCLP
+ISC1   LDA     STATUS  OBJECTS ACTIVE??
+       BITA    #$20
+       BNE     SCYV5   NOPE....NO VELOCITY STUFF...JUST CHECK IF ACTIVE
+       LDD     OYV,X
+       ASLB
+       ROLA
+       ASLB
+       ROLA
+       ASLB
+       ROLA
+       ADDD    OY16,X
+       CMPA    #YMIN   WRAP AROUND
+       BHS     SCYV3
+       CMPA    #(YMIN/2)+(YMAX/2)-$80
+       BLS     SCYV6
+       LDA     #YMAX
+SCYV3  CMPA    #YMAX
+       BLS     SCYV4
+SCYV6  LDA     #YMIN
+SCYV4  STD     OY16,X  ADD 8 TIMES VELOCITY
+       LDD     OXV,X   UPDATE X POSITION
+       ASLB
+       ROLA
+       ASLB
+       ROLA
+       ASLB
+       ROLA
+       ADDD    OX16,X
+       STD     OX16,X
+SCYV5  LDD     OX16,X  RELOAD IN CASE WE GET HERE BY BRANCH
+       SUBD    XTEMP
+       CMPD    #500*32 IN SCREEN AREA
+       BHS     ISCLP   NO
+       LDU     OLINK,X YES, TRANSFER TO ACTIVE
+       STU     ,Y
+       LDU     OPTR
+       STU     OLINK,X
+       STX     OPTR
+       CLRA            MAKE SURE OFF SCREEN AFTER HYPER
+       CLRB
+       STD     OBJX,X
+       LEAX    ,Y
+ISCLP  LEAY    ,X
+       LDX     ,X
+       BNE     ISC1
+       RTS
+*
+*
+*SCANNER
+*OFF OLDE BOZOS+PLAYER
+SCNR   LDU     #0
+       LDB     #8
+       LDX     #SETAB
+SCNR0  STU     [,X]
+       STU     [2,X]
+       STU     [4,X]
+       STU     [6,X]
+       ABX
+       CMPX    SETEND
+       BLO     SCNR0
+*OFF PLAYER +
+       LDX     [SETEND]
+       BEQ     MT1
+       STU     ,X
+       CLR     2,X
+       STU     -$100,X
+*OUTPUT TERRAIN
+MT1    LDD     BGL     CALC SCANL
+       SUBD    #$8000-(150*32)
+       STD     XTEMP
+       LSRA
+       LSRA            GET 6 BITS
+       LDU     #MTERR
+       LDB     #3
+       MUL
+       LEAU    D,U     GET ADDR
+       LDA     STATUS
+       BITA    #2      NO TERRAIN???
+       BNE     MTX     NONE
+       LDA     #SCANER!>8
+       LDY     #STETAB ERASE TABLE
+MTLP   LDX     #0
+       STX     [,Y]    OFF OLD
+       PULU    B,X
+       STD     ,Y      SAVE NEW ADDR
+       STX     [,Y++]
+       INCA
+       LDX     #0
+       STX     [,Y]
+       PULU    B,X
+       STD     ,Y
+       STX     [,Y++]
+       INCA
+       CMPA    #(SCANER!>8)+64
+       BNE     MTLP
+*SCANNER BEZEL
+MTX    LDX     #SCANER+$1C00
+       LDD     #$9090
+       STD     ,X
+       STD     26,X
+       LDX     #SCANER+$2300
+       LDD     #$0909
+       STD     ,X
+       STD     26,X
+*OUTPUT BOZOS
+       JMP     PACH1   ****************THIS IS A PATCH*********
+*LDX #OPTR THIS USED TO BE HERE
+BOZ1   LDU     #SETAB  ERASE TABLE
+       BSR     SCNR3
+       LDX     #IPTR
+       BSR     SCNR3
+BOZ2   STU     SETEND  END OF ERASE TABLE
+*PLAYER BLIP OUTPUT
+       LDD     PLAXC
+       LSRA
+       LSRA
+       LSRA
+       LSRA
+       LSRB
+       LSRB
+       LSRB
+       ADDD    #$4700+SCANH-5 PLAYER BASE
+       STD     ,U
+       LDX     ,U
+       LDD     #$9099
+       STD     ,X
+       STA     2,X
+       LDA     #$09
+       STA     -$FF,X
+       RTS
+*BLIP SCAN SUBROUTINE
+SCNR10 LDD     OX16,X  FIND OFFSET
+       SUBD    XTEMP   SUBTRACT SCANNER LEFT
+SCNR2  LSRA            SHIFT DOWN TO 6 BITS
+       LSRA
+       LDB     OY16,X
+       LSRB
+       LSRB
+       LSRB
+       ADDD    #SCANER-5
+       STD     ,U
+       LDD     OBJCOL,X STORE BLIP
+       CMPA    #$1F    STAR GATE?
+       BNE     SCNR20  NO
+       LDD     ,U
+       CMPA    #SCANER!>8+$3F CLIP GATE AT LIMIT
+       BNE     SCNR2A
+       DECA
+       STA     ,U
+SCNR2A LDY     #$FFF0
+       STY     [,U++]
+       INCB
+       STD     ,U
+       LDY     #$F0FF
+       STY     [,U++]
+       INCA
+       STD     ,U
+       LDY     #$F0F0
+       STY     [,U++]
+       DECB
+       STD     ,U
+       STY     [,U++]
+       BRA     SCNR3
+SCNR20 STD     [,U++]
+SCNR3  LDX     ,X      DO THE REST
+       BNE     SCNR10
+       RTS
+*
+*MINI TERRAIN DATA TABLE
+*
+MTERR  FCB     27,$08,$80,26,$80,$08,28,$80,$08,30,$80,$08
+       FCB     31,$88,$00,31,$88,$00,30,$88,$00,28,$88,$00
+       FCB     26,$88,$00,28,$88,$00,30,$88,$00,31,$80,$08
+       FCB     32,$88,$00,32,$88,$00,31,$88,$00,30,$88,$00
+       FCB     28,$08,$80,28,$88,$00,29,$80,$08,31,$88,$00
+       FCB     31,$88,$00,31,$02,$20,31,$22,$00,31,$02,$20
+       FCB     30,$22,$00,31,$22,$00,30,$02,$20,28,$02,$20
+       FCB     26,$02,$20,28,$20,$02,29,$02,$20,28,$02,$20
+       FCB     25,$02,$20,22,$02,$20,24,$20,$02,27,$20,$02
+       FCB     29,$20,$02,31,$20,$02,31,$22,$00,31,$22,$00
+       FCB     31,$20,$02,32,$22,$00,31,$0B,$B0,29,$0B,$B0
+       FCB     28,$BB,$00,30,$BB,$00,30,$0B,$B0,27,$0B,$B0
+       FCB     29,$B0,$0B,31,$0B,$B0,32,$BB,$00,31,$0B,$B0
+       FCB     31,$B0,$0B,31,$BB,$00,31,$B0,$0B,32,$BB,$00
+       FCB     31,$0B,$B0,31,$B0,$0B,31,$BB,$00,31,$0B,$B0
+       FCB     31,$BB,$00,31,$BB,$00,30,$0B,$B0,29,$0B,$B0
+       FCB     27,$08,$80,26,$80,$08,28,$80,$08,30,$80,$08 REPEAT
+       FCB     31,$88,$00,31,$88,$00,30,$88,$00,28,$88,$00
+       FCB     26,$88,$00,28,$88,$00,30,$88,$00,31,$80,$08
+       FCB     32,$88,$00,32,$88,$00,31,$88,$00,30,$88,$00
+       FCB     28,$08,$80,28,$88,$00,29,$80,$08,31,$88,$00
+       FCB     31,$88,$00,31,$02,$20,31,$22,$00,31,$02,$20
+       FCB     30,$22,$00,31,$22,$00,30,$02,$20,28,$02,$20
+       FCB     26,$02,$20,28,$20,$02,29,$02,$20,28,$02,$20
+       FCB     25,$02,$20,22,$02,$20,24,$20,$02,27,$20,$02
+       FCB     29,$20,$02,31,$20,$02,31,$22,$00,31,$22,$00
+       FCB     31,$20,$02,32,$22,$00,31,$0B,$B0,29,$0B,$B0
+       FCB     28,$BB,$00,30,$BB,$00,30,$0B,$B0,27,$0B,$B0
+       FCB     29,$B0,$0B,31,$0B,$B0,32,$BB,$00,31,$0B,$B0
+       FCB     31,$B0,$0B,31,$BB,$00,31,$B0,$0B,32,$BB,$00
+       FCB     31,$0B,$B0,31,$B0,$0B,31,$BB,$00,31,$0B,$B0
+       FCB     31,$BB,$00,31,$BB,$00,30,$0B,$B0,29,$0B,$B0
+*
+*WRITE AN OBJECT TO SCREEN
+*Y=OBJECT DESCRIPTOR ADDR
+*D=SCREEN ADDR
+*ALL SAVED
+*REENTRANT
+*
+CWRIT  PSHS    A,B,X,Y,U
+       TFR     D,X
+       LDD     OBJW,Y  GET WIDTH,LENGTH
+       LDY     OBJP0,Y GET DATA
+       PSHS    D       SAVE WIDTH,HEIGHT
+       BITB    #1      ODD LENGTH?
+       BNE     CWRT1
+*EVEN BYTE COUNT
+CWRT00 SUBB    #2
+CWRT0  LDU     B,Y
+       STU     B,X
+       SUBB    #2
+       BPL     CWRT0
+       LDB     1,S
+       LEAX    $100,X
+       LEAY    B,Y
+       DECA
+       BNE     CWRT00
+       BRA     CWRTX
+*ODD BYTE COUNT
+CWRT1  DECB
+       LDA     B,Y
+       STA     B,X
+       SUBB    #2
+       BMI     CWRT3
+CWRT2  LDU     B,Y
+       STU     B,X
+       SUBB    #2
+       BPL     CWRT2
+CWRT3  LDB     1,S     GET HEIGHT
+       LEAX    $100,X
+       LEAY    B,Y
+       DEC     ,S      DEC WIDTH
+       BNE     CWRT1
+CWRTX  LEAS    2,S     GET MAP +2 PHONIES
+       PULS    A,B,X,Y,U,PC
+*
+*COFF
+*Y=OBJECT DESCRIPTOR ADDR
+*D=SCREEN ADDR
+*
+COFF   PSHS    A,B,X,U
+       TFR     D,X
+       LDD     OBJW,Y  GET WIDTH ,HEIGHT
+COFFA  LDU     #0
+       PSHS    B       SAVE HT
+       BITB    #1      ODD LENGTH?
+       BNE     COFF1   YES
+*EVEN BYTE COUNT
+COFF00 SUBB    #2
+COFF0  STU     B,X
+       SUBB    #2
+       BPL     COFF0
+       LDB     ,S      GET HT
+       LEAX    $100,X
+       DECA
+       BNE     COFF00
+       BRA     COFFX
+*ODD BYTE COUNT
+COFF1  DECB
+       CLR     B,X
+       SUBB    #2
+       BMI     COFF3
+COFF2  STU     B,X
+       SUBB    #2
+       BPL     COFF2
+COFF3  LDB     ,S      GET HT
+       LEAX    $100,X
+       DECA
+       BNE     COFF1
+COFFX  LEAS    1,S     PULL HEIGHT
+       PULS    A,B,X,U,PC
+*
+*BLOCK CLEAR
+*X=ADDR, D=W,H
+*
+BLKCLR PSHS    A,B,X,U
+       BRA     COFFA
+*
+*SCREEN CLEAR
+*
+SCRCLR PSHS    D,X,Y,U
+       LDU     #$9C00
+       LDX     #0
+       TFR     X,Y
+       TFR     X,D
+SCLRLP PSHU    X,Y,D
+       PSHU    X,Y,D
+       PSHU    X,Y,D
+       PSHU    X,Y,D
+       PSHU    X,Y,D
+       PSHU    X       32 AT A CRACK
+       CMPU    #0
+       BNE     SCLRLP
+       PULS    D,X,Y,U,PC
+*
+*CLEAR ACTIVE SCREEN
+*
+SCLR1  PSHS    D,X,Y,U,DP
+       LDU     #$9C00
+       LDX     #0
+       TFR     X,Y
+       TFR     X,D
+       TFR     A,DP
+SC0LP  LDB     #8
+SC1LP  PSHU    X,Y,A,DP
+       PSHU    X,Y,A,DP
+       PSHU    X,Y,A,DP
+       PSHU    X,Y,A,DP
+       DECB
+       BNE     SC1LP
+       PSHU    X,Y,A,DP
+       PSHU    X,Y,A,DP
+       PSHU    X,Y,A,DP
+       PSHU    X
+       LEAU    -YMIN,U
+       CMPU    #0
+       BNE     SC0LP
+       PULS    D,X,Y,U,DP,PC
+*
+* CMOS PRIMITIVE FOR READING
+*
+RCMOSA EQU     *
+RCMOS  LDA     1,X     GET LSB
+       ANDA    #$0F    LEAVE ONLY LS
+       PSHS    A       SAVE IT
+       LDA     ,X++    GET MSB + AUTO INC
+       ASLA
+       ASLA
+       ASLA
+       ASLA            SHIFT LS TO MSB
+       ADDA    ,S+     GET LSB + FIX STACK
+DRTS   RTS             BYE
+*
+* READ CMOS INTO D POINTED TO BY X: A=X,X+1; B=X+2,X+3
+*
+RCMOSD BSR     RCMOSA  GET THE FIRST BYTE+FALL THRU FOR 2ND
+*
+* READ CMOS INTO B POINTED TO BY X
+*
+RCMOSB PSHS    A       SAVE A
+       BSR     RCMOSA  GET IN A
+       TFR     A,B     PUT IT IN B
+       PULS    A,PC    DONE
+*
+* WRITE TO CMOS PRIMITIVE
+*
+WCMOSA EQU     *
+WCMOS  PSHS    A       SAVE WHATS TO BE WRITTEN
+       STA     1,X     SAVE LSB
+       LSRA    SHIFT   MS TO LS
+       LSRA
+       LSRA
+       LSRA
+       STA     ,X++    SAVE MSB AND AUTO INC
+       PULS    A,PC    DONE
+*
+* WRITE CMOS FROM D TO X: A=X,X+1; B=X+2,X+3
+*
+WCMOSD BSR     WCMOSA  DO IT AND FALL THRU FOR 2ND
+*
+* WRITE CMOS FROM B TO X
+*
+WCMOSB PSHS    A       SAVE A
+       TFR     B,A     MOVE B TO A
+       BSR     WCMOSA  FAKE IT
+       PULS    A,PC    DONE
+*
+*
+*
+*SCORE ROUTINE
+*A=0-7EXP,B=0-99
+*
+*SCORE PSHS A,B,X,U,Y
+* ORCC #1 SET CARRY
+SCORE  JMP     SCRPCH  *****************NO SCORE IN ATTR
+       NOP             ***********************************************
+       ROL     SCRFLG  SET FLAG
+       LSRA
+       PSHS    A
+       LDA     #0
+       BCC     SCR1
+       ASLB
+       ROLA
+       ASLB
+       ROLA
+       ASLB
+       ROLA
+       ASLB
+       ROLA
+SCR1   JSR     PLINDX
+       STD     XTEMP
+       LDB     #3
+       SUBB    ,S+
+       LDA     B,X
+       ADDA    XTEMP+1
+       DAA
+       STA     B,X
+       DECB
+       BMI     SCRX
+SCR2   LDA     B,X
+       ADCA    XTEMP
+       DAA
+       STA     B,X
+       LDA     #0
+       STA     XTEMP
+       DECB
+       BPL     SCR2
+*CHECK REPLAY
+SCRX   LDD     REPLA   REPLAYS AVAILABLE
+       BEQ     SCRXX   NO
+       LEAY    4,X
+       BSR     RCHK
+       BLO     SCRXX   NO
+       LDA     2,Y     GET NEXT LEVEL
+       ADDA    REPLA+1
+       DAA
+       STA     2,Y
+       LDA     1,Y
+       ADCA    REPLA
+       DAA
+       STA     1,Y
+       LDA     ,Y
+       ADCA    #0
+       DAA     DUMB    ASSHOLE ASSOCIATION
+       STA     ,Y
+       JSR     RPHK    GO TO YOUR REPLAY HOOK
+       JSR     LDISPV  REWARD
+       JSR     SBDSPV
+       LDD     #RPSND
+       JSR     SNDLD
+       LDB     #5
+       JSR     AUD1
+SCRXX  BSR     SCRTRN
+       PULS    A,B,X,U,Y
+       RTS
+*
+*REPLAY CHECK
+*X=PLAYER SCORE MSB 8 DIGITS
+*Y=REPLAY LEVEL MSB 8 DIGITS
+*RETURNS CC FOR PSCOR-RLEVL
+RCHK   PSHS    D
+       LDD     ,X
+       CMPD    ,Y
+       BNE     RCHX
+       LDD     2,X
+       CMPD    2,Y
+RCHX   PULS    D,PC
+*
+*SCORE TRANSFER
+*
+SCRTRN LDA     SAMEXC  TERRAIN BLOW UP OR WARP IN EFFECT??
+       BEQ     SCTR0
+       RTS
+SCTR0  LDA     CURPLR
+SCRTR0 LDX     #N0V
+       LDB     STATUS
+       BMI     SCT0
+       CMPA    CURPLR
+       BNE     SCT0
+       LDX     #N0AV
+SCT0   PSHS    A,X
+       DECA
+       BNE     SCT1
+       LDX     #P1DISP
+       LDU     #.P1SCR
+       BRA     SCT2
+SCT1   LDX     #P2DISP
+       LDU     #.P2SCR
+SCT2   CLR     XTEMP   BLANKING FLAG
+       LDB     #7
+SCTLP  LDA     ,U+     GET
+       LDY     1,S     GET BASE OF CHARSTORAGE
+       BITB    #1      PHASE
+       BNE     SCT3
+       LEAU    -1,U
+       LSRA
+       LSRA
+       LSRA
+       LSRA
+SCT3   ANDA    #$F
+       BNE     SCT3A
+       CMPB    #2      LAST 2
+       BLS     SCT3A
+       TST     XTEMP   BLANKING?
+       BEQ     SCT4
+SCT3A  INC     XTEMP
+       ASLA
+       ASLA
+       LEAY    A,Y
+       EXG     X,D
+       JSR     CWRIT   ON DIGIT PICTURE
+SCT40  EXG     X,D
+SCT4   LEAX    DIGLTH,X
+       DECB
+       BNE     SCTLP   DO THE REST
+       PULS    A,Y,PC
+*
+*SCREEN SWITCHING
+*
+P1SW   PSHS    D,X     SAVE REGISTERS
+P1SW0  LDX     #IRQ
+       LDD     #$013C
+       BRA     PSW1
+P2SW   PSHS    D,X     SAVE REGISTERS
+       LDA     PIA3    COCKTAIL?
+       BPL     P1SW0   NO
+       LDX     #IRQB   SWITCH UPSIDE DOWN GUYS
+       LDD     #$0334
+PSW1   STX     IRQHK+1 IRQ SELECT
+       STB     PIA3+1
+       STA     RWCNTL
+       LDA     #$7E
+       STA     IRQHK
+       PULS    D,X,PC
+*
+*CHECK FOR PROCESS EXISTANCE
+*Y=PADDR OF SUSPECT
+*RET EQ IF FOUND, NE IF NOT THERE
+*
+PCHEK  PSHS    X
+       LDX     ACTIVE
+       BEQ     PCHK2
+PCHK1  CMPY    PADDR,X
+       BEQ     PCKBYE
+       LDX     ,X
+       BNE     PCHK1
+PCHK2  ANDCC   #$FB    RET NE
+PCKBYE PULS    X,PC
+
+BSET   JSR     SCLR1   CLEAR THE SCREEN FOR THE BONE
+       LDX     PLRX    GET PLAYER
+       LDA     PWAV,X  GET HIS WAVE NUMBER
+       JSR     HEXBCD  IN BCD PLEASE (HUMAN NUMBER??)
+       TFR     A,B     PUT IN B FOR MESSAGE
+       CMPA    #5
+       BLS     BSET1
+       LDA     #5      NO MORE THAN 500 THOUGH FOR BONUS
+BSET1  PSHS    A       SAVE FOR A MOMENT
+       LDA     #ATTAKM MAKE THE ATTACK MESSAGE
+       JSR     WRD7FV
+       PULS    A,PC    RESTORE A (HUNDRED VALUE) AND RETURN
+*
+*
+*BONUS COLLECT PROCESS
+*
+*
+* A GETS NUMBER OF HUNDREDS OF BONUS MULTIPLIER (HEX)
+
+BONUS  CLR     PCRAM
+       LDU     CRPROC
+       PULS    X
+       STX     PD+6,U  SAVE RETURN
+BON1   CLRB
+       TFR     D,Y     SAVE FOR TEXT
+       TFR     A,B     MOVE COUNT TO COUNT
+       LDA     #2      PUT IN POWER
+       STD     PD4,U   AND SAVE FOR SCORE
+       LDA     #ATWVM  WRITE IT OUT
+       JSR     WRD7FV
+       LDX     #$38A0  INITIAL ADDR
+       LDA     ASTCNT
+       STA     PD2,U
+       BEQ     BC2
+BCLP   TFR     X,D
+       LDY     #ASTP3
+       JSR     CWRIT
+       LEAX    $400,X
+       LDD     PD4,U   GET SCORE
+       JSR     SCORE
+       STX     PD,U
+       NAP     4,BC1
+BC1    LDX     PD,U
+       DEC     PD2,U   ALL DONE?
+       BNE     BCLP    NO
+BC2    LDX     PLRX
+       JSR     GETWVV
+       NAP     $80,BC3 HANG OUT
+BC3    JMP     [PD+6,U] RETURN
+*
+*INTERRUPT ROUTINE
+*
+IRQ    LDA     #RAM!>8
+       TFR     A,DP
+       LDA     #$34
+       STA     PIA1+1
+       LDA     PIA1
+       LDA     VERTCT  PAST 128
+       CMPA    #128
+       BLO     I0      NO
+       LDA     IFLG    ALREADY DONE ?
+       BNE     IRQX    NO
+       INC     IFLG
+       JSR     SNDSEQ  SOUNDS+SWITCHES
+       JSR     PLAYER
+       JSR     STOUT   OUTPUT STARS
+       LDA     VERTCT
+       SUBA    #8
+       CMPA    #$A8
+       BLS     IRQ1
+       LDA     #$A8
+IRQ1   STA     XXX2
+       LDD     XXX2
+       JSR     OPROC
+       LDD     XXX2
+       JSR     PRDISP
+       JSR     SHELL
+       BRA     IRQX
+I0     LDB     IFLG
+       BEQ     IRQX
+       CLR     IFLG
+       INC     TIMER
+       LDB     #WDATA
+       STB     WDOG
+       CMPA    #4      TOO LATE?
+       BHI     I01
+*COLOR MAPPING
+       LDU     #CRAM+16
+       LDD     PCRAM+10
+       LDX     PCRAM+12
+       LDY     PCRAM+14
+       PSHU    D,X,Y
+       LDD     PCRAM+4
+       LDX     PCRAM+6
+       LDY     PCRAM+8
+       PSHU    D,X,Y
+       LDD     PCRAM
+       LDX     PCRAM+2
+       PSHU    D,X
+I01    JSR     CSCAN   COIN SWITCHES
+       LDA     STATUS
+       BITA    #$02
+       BNE     IRQ2
+       JSR     BGOUT
+IRQ2   LDD     XXX1
+       JSR     PRDISP
+       LDD     XXX1
+       JSR     OPROC
+       JSR     VELO    UPDATE VELOCITIES
+IRQX   ORCC    #$FF
+       LDA     #$35
+       STA     PIA1+1
+       LDA     ,S      E BIT FIX
+       ANDA    #$6F
+       STA     ,S
+       PULS    X,Y,D,U,PC,CC,DP
+*
+*INVERTED IRQ FOR SCREEN FLIP
+*
+IRQB   LDA     #RAM!>8
+       TFR     A,DP
+       LDA     #$34
+       STA     PIA1+1
+       LDA     PIA1
+       LDA     VERTCT
+       CMPA    #$60    CHECK A0 (COUNT RUNS BACKWARDS)
+       BLO     IB0
+       LDB     IFLG
+       BNE     IRQX
+       INC     IFLG
+       COMA
+       STA     XXX2    WRITING BOUNDARY
+       JSR     CSCAN
+       LDA     STATUS
+       BITA    #$02
+       BNE     IRQB2
+       JSR     BGOUT
+IRQB2  LDD     XXX1
+       JSR     PRDISP
+       LDD     XXX1
+       JSR     OPROC
+       BRA     IRQX
+IB0    LDB     IFLG
+       BEQ     IRQX
+       CLR     IFLG
+       INC     TIMER
+       LDB     #WDATA  THROW ROVER A BONE
+       STB     WDOG    BONE HIM
+       CMPA    #4
+       BHI     IB01
+*COLOR MAPPING
+       LDU     #CRAM+16
+       LDD     PCRAM+10
+       LDX     PCRAM+12
+       LDY     PCRAM+14
+       PSHU    D,X,Y
+       LDD     PCRAM+4
+       LDX     PCRAM+6
+       LDY     PCRAM+8
+       PSHU    D,X,Y
+       LDD     PCRAM
+       LDX     PCRAM+2
+       PSHU    D,X
+IB01   JSR     SNDSEQ
+       JSR     PLAYER
+       JSR     STOUT
+       LDD     XXX2
+       JSR     PRDISP
+       LDD     XXX2
+       JSR     OPROC
+       JSR     SHELL
+       JSR     VELO
+       JMP     IRQX
+*
+*SHELL OUTPUT
+*OBJCOL=OUTPUT ROUTINE
+*ODATA=TIMER
+*ODATA+1=DEAD OR NOT
+SHELL  LDA     STATUS
+       BITA    #$20
+       BNE     SHELLX
+       LDD     BGL     CLAC SCROLL
+       ANDB    #$E0
+       STD     SHTEMP
+       LDD     BGLX
+       ANDB    #$E0
+       SUBD    SHTEMP
+       ASLB
+       ROLA
+       ASLB
+       ROLA
+       STD     SHTEMP
+       LDX     #SPTR   PROC BUGGERS
+       BRA     SHELLP
+SHELL1 LDY     OBJX,X  ERASE ADDR
+       LDD     OYV,X
+       ADDD    OY16,X
+       CMPA    #YMIN
+       BLS     SHBD    DEAD
+       STD     OY16,X
+       LDD     OXV,X
+       ADDD    SHTEMP
+       ADDD    OX16,X
+       CMPA    #$97
+       BHS     SHBD    DEAD
+       STD     OX16,X
+       ASLB    FLAVOR
+       LDB     OY16,X
+       STD     OBJX,X  NEW X
+       JMP     [OBJCOL,X] OUTPUT
+SHELLP LDX     ,X
+       BNE     SHELL1
+SHELLX RTS
+*BOMB OUTPUT
+BMBOUT LDU     BAX
+       BCC     SHB1    ODD?
+       LEAU    6,U
+SHB1   LDD     #0      CLEAR IT
+       STD     ,Y
+       STA     2,Y
+       STD     $100,Y
+       STA     $102,Y
+       LDY     OBJX,X
+       LDD     ,U
+       STD     ,Y
+       LDD     2,U
+       STA     2,Y
+       STB     $100,Y
+       LDD     4,U
+       STD     $101,Y
+       BRA     SHELLP
+SHBD   CLRD            KILL AND ERASE
+       STA     ODATA+1,X
+       STD     ,Y
+       STA     2,Y
+       STD     $100,Y
+       STA     $102,Y
+       BRA     SHELLP
+*FIREBALL MINI
+FBOUT  LDD     #0
+       STD     ,Y
+       STA     2,Y
+       STD     $100,Y
+       STA     $102,Y
+       LDU     OBJX,X
+       LDD     #$9999
+       BCS     SHFB1   ODD
+       ANDA    #$0F
+       STD     ,U
+       STA     2,U
+       ANDB    #$F0
+       STB     $101,U
+       BRA     SHELLP
+SHFB1  ANDA    #$F0
+       STD     $100,U
+       STA     $102,U
+       ANDB    #$0F
+       STB     1,U
+       BRA     SHELLP
+*
+*OUTPUT YLLAB BOMB
+*
+YLBOUT LDU     OBJX,X
+       LDD     #$0099
+       STA     ,Y      ERASE OLDIE
+       STA     $100,Y
+       STA     $200,Y
+       BCS     YLBT1
+       STB     ,U
+       STB     $100,U
+       JMP     SHELLP
+YLBT1  LDA     #$09
+       STA     ,U
+       STB     $100,U
+       LDA     #$90
+       STA     $200,U
+       JMP     SHELLP
+YLBP1  FCB     2,1
+       FDB     YLBD10,YLBD10,ON34,OFF34
+YLBD10 FDB     $FFFF
+*
+*BOMB COLLISION
+BKIL   LDD     #$25
+       JSR     SCORE
+       DEC     BMBCNT
+       JSR     KILSHL
+       JSR     OFSHIT
+       LDD     OX16,X
+       LSRA
+       RORB
+       LSRA
+       RORB
+       ADDD    BGL
+       STD     OX16,X
+       LDA     OY16,X
+       SUBA    #2
+       STA     OY16,X
+       LDD     #BXPIC
+       STD     OPICT,X
+       JSR     XSVCT
+       LDD     #AHSND
+       JMP     SNDLD
+*
+*REVERSE
+*
+REV    LDA     REVFLG
+       BNE     REVX
+       INC     REVFLG
+       LDD     PLADIR
+       COMB
+       COMA
+       ADDD    #1
+       STD     NPLAD
+REV1   NAP     2,REV2
+REV2   LDA     PIA21
+       BITA    #$40
+       BNE     REV1
+       NAP     5,REVX1
+REVX1  CLR     REVFLG
+REVX   JMP     SUCIDE
+*
+*SMART BOMB
+*
+SBOMB  LDA     SBFLG
+       BNE     SBMBX2
+       LDX     PLRX
+       LDA     PSBC,X
+       BEQ     SBMBX2
+       INC     SBFLG
+       DEC     PSBC,X
+       JSR     SBDSPV
+       LDD     #SBSND
+       JSR     SNDLD
+SBMB00 LDX     OPTR
+SBMB0  BEQ     SBMBX
+       LDD     OX16,X
+       SUBD    BGL
+       CMPD    #$9C*64
+       BHS     SBMB2
+       LDA     OTYP,X
+       CMPA    #$02
+       BHS     SBMB2
+*      JSR     [OCVECT,X]
+       JMP     SBPCH   *****************DONT BLOW A NULLOB **********
+       BRA     SBMB00
+SBMB2  LDX     ,X
+       BRA     SBMB0
+SBMBX  LDU     CRPROC
+       LDA     #4      SCREEN FLASHES/2
+       STA     PD,U
+SBMBX0 COM     PCRAM
+       NAP     2,SBMBX1
+SBMBX1 DEC     PD,U
+       BNE     SBMBX0
+       CLR     PCRAM
+SBX10  NAP     10,SBX1A SWITCH DEBOUNCE
+SBX1A  LDA     PIA21
+       BITA    #$4
+       BNE     SBX10
+       NAP     10,SBX2A
+SBX2A  CLR     SBFLG
+SBMBX2 JMP     SUCIDE
+*
+*HYPERSPACE
+*
+HYPER  LDA     STATUS
+       BITA    #$FD
+       LBNE    HYPX    NO GO
+       ANDA    #2
+       STA     PD4,U   SAVE TERRAIN BIT
+       LDA     #$77
+       STA     STATUS
+       JSR     SCLR1
+       NAP     15,HYP02
+HYP02  LDX     SPTR    KILL BULLETS
+       BEQ     KB2
+       JSR     KILSHL
+       BRA     HYP02
+KB2    CLR     BMBCNT
+       LDD     SEED
+       STD     BGL
+       STD     BGLX
+*RANDOM HYPER DIRECTION
+       LSRB
+       BCC     HYP0
+       LDD     #$2000
+       LDX     #$0300
+       BRA     HYP00
+HYP0   LDX     #-$0300
+       LDD     #$7000
+HYP00  STD     PLAX16
+       STX     NPLAD
+       LDB     HSEED
+       LSRB
+       ADDB    #YMIN
+       STB     PLAY16
+       STD     NPLAXC
+       CLRD
+       STA     PLAXV+2
+       STD     PLAXV
+       STD     PLAYV
+       JSR     BGINIT
+*APPEAR PLAYER
+       LDB     #$50
+       BSR     STCHK0
+       OBI     PLAPIC,KILLNO,$0000 CREATE PHONY OBJECT
+       LDD     #0
+       STD     OXV,X
+       STD     OYV,X
+       LDD     PLAY16
+       STD     OY16,X
+       LDD     PLAX16
+       LSRA
+       RORB
+       LSRA
+       RORB
+       ADDD    BGL
+       STD     OX16,X
+       LDA     NPLAD
+       BPL     HYP1
+       LDU     #PLBPIC REV IMAGE
+       STU     OPICT,X
+HYP1   LDU     CRPROC
+       STX     PD,U
+       JSR     APVCT
+       NAP     $28,HYP2
+HYP2   MAKP    DPKIL   DELAYED KILL PROCESS
+       LDD     PD,U
+       STD     PD,X
+       LDA     PD4,U
+       STA     STATUS
+       LDA     LSEED   DEAD?
+       CMPA    #192
+       LBHI    HYPACH  YAHMAHN
+HYPX   JMP     SUCIDE
+*
+*DELAYED PLAYER IMAGE KILL
+*
+DPKIL  LDX     PD,U
+       JSR     KILOFF
+       JSR     GETOB
+       NAP     10,DPK1
+DPK1   LDX     PD,U
+       LDD     OFREE   BACK TO FREE LIST
+       STD     ,X
+       STX     OFREE
+       JMP     SUCIDE
+*
+* DUPLICATE NOKILL ROUTINE
+*
+KILLNO CLRA
+       PULS    D,PC
+*
+*TERRAIN STATUS UPDATE
+*
+STCHK  CLRB            CHECK TERRAIN ACTIVE
+STCHK0 LDA     ASTCNT
+STCHKA BNE     STCHK1
+       ORB     #2
+STCHK1 STB     STATUS
+       RTS
+*
+*MAKE A REG PROCESS
+*X RET WITH PROC PTR
+*[RET]=SADDR, TYPE=STYPE, RET=RET+2
+*
+MAKEP  PSHS    U,A
+       LDU     3,S     GET X
+       PULU    X
+       STU     3,S     NEW RETURN
+       LDA     #STYPE
+       JSR     MKPROC
+       PULS    U,A,PC
+*GATE RING OFFSET TABLE OUTER-INNER,INNER-CENT; TL-TL
+GOFFTB FDB     $0805,$0805,$0705,$0604
+       FDB     $0503,$0403,$0302,$0201
+       FDB     $0101,$0001,$0001,$0001
+       FDB     $0001,$0001,$0001,$0001
+*
+SCLEAN LDX     #RAMALS
+       STX     FREEP
+SCLEN1 LEAX    $40,X
+       STX     -$40,X
+       CMPX    #RAMEND-$40
+       BNE     SCLEN1
+       CLRA
+       CLRB
+       STD     ,X
+       STD     APPTR
+       STD     EXPTR
+       STD     TRPTR
+       STA     SAMEXC
+       RTS
+*
+*
+*STAR GATE OUTPUT
+*OUTER RING
+*
+ONSG   PSHS    X,CC
+       ADDB    #8
+       TFR     D,U
+       LSRA
+       LSRA
+       LSRA
+       ANDA    #$FE    CALC RING OFFSETS
+       LDX     #GOFFTB
+       LDD     A,X
+       STD     GATOF1
+       PULS    CC
+       LDD     GATCL1
+       BCS     ONSG1
+       ANDA    #$F0
+       ANDB    #$F0
+       BRA     ONSG2
+ONSG1  ANDA    #$0F    FLAV1
+       ANDB    #$0F
+ONSG2  TFR     D,X
+       LEAY    ,X
+       PSHU    D,X,Y   LEFT SIDE
+       PSHU    D,X,Y
+       LEAU    $70C,U
+       PSHU    D,X,Y   RT. SIDE
+       PSHU    D,X,Y
+       BCS     ONSG3   ODD GUY
+       LEAU    -$100,U
+ONSG3  LDA     GATCL1
+       STA     ,U
+       STA     -$100,U
+       STA     -$200,U
+       STA     -$300,U
+       STA     -$400,U
+       STA     -$500,U
+       STA     -$600,U
+       STA     11,U
+       STA     -$100+11,U
+       STA     -$200+11,U
+       STA     -$300+11,U
+       STA     -$400+11,U
+       STA     -$500+11,U
+       STA     -$600+11,U
+       LDA     GATOF1
+       BCC     ONSG20
+       INCA            ODD CASE
+       LSRA
+       RORB            SAVE CARRY
+       ADDA    #-7
+       BRA     ONSG22
+ONSG20 LSRA
+       RORB
+       ADDA    #-6
+ONSG22 ROLB            RESTORE CARRY
+       LDB     #3      VERT OFFSET
+       LEAU    D,U     STARTING ADDR
+       LDD     GATCL2  NEXT COLOR
+       BCS     ONSG21  ODD FLAV
+       STA     ,U
+       STA     5,U
+       STA     $100,U
+       STA     $105,U
+       STA     $200,U
+       STA     $205,U
+       ANDA    #$F0
+       ANDB    #$F0
+       STD     1,U
+       STD     3,U
+       STD     $300,U
+       STD     $302,U
+       STD     $304,U
+       BRA     ONSG30
+*OUTPUT INNER RING ODD FLAVOR
+ONSG21 STA     $100,U
+       STA     $105,U
+       STA     $200,U
+       STA     $205,U
+       STA     $300,U
+       STA     $305,U
+       ANDA    #$0F
+       ANDB    #$0F
+       STD     $301,U
+       STD     $303,U
+       STD     ,U
+       STD     2,U
+       STD     4,U
+*CENTER
+ONSG30 LDA     GATOF2
+       LDB     #2      VERT OFFSET
+       ADCA    #0
+       LSRA
+       LEAU    D,U     ADDR
+       LDD     GATCL3
+       BCS     ONSG31
+       ANDA    #$F0
+       ANDB    #$F0
+       STD     ,U
+       PULS    X,PC
+ONSG31 ANDA    #$0F
+       ANDB    #$0F
+       STD     ,U
+       PULS    X,PC
+*
+*ERASE STAR GATE
+*
+OF812  PSHS    X
+       ADDB    #08
+       TFR     D,U
+       LDD     #0
+       LDX     #0
+       LEAY    ,X
+       PSHU    X,Y,D
+       PSHU    X,Y,D
+       LEAU    268,U
+       PSHU    X,Y,D
+       PSHU    X,Y,D
+       LEAU    268,U
+       PSHU    X,Y,D
+       PSHU    X,Y,D
+       LEAU    268,U
+       PSHU    X,Y,D
+       PSHU    X,Y,D
+       LEAU    268,U
+       PSHU    X,Y,D
+       PSHU    X,Y,D
+       LEAU    268,U
+       PSHU    X,Y,D
+       PSHU    X,Y,D
+       LEAU    268,U
+       PSHU    X,Y,D
+       PSHU    X,Y,D
+       LEAU    268,U
+       PSHU    X,Y,D
+       PSHU    X,Y,D
+       PULS    X,PC
+*
+*STAR GATE PIX
+*
+SGPIC  FCB     8,4
+       FDB     SGD10,SGD10,ONSG,OF812
+SGD10  FDB     $0000,$0000,$0000,$0000
+       FDB     $0000,$0000,$1111,$1111
+       FDB     $1111,$1111,$0000,$0000
+       FDB     $0000,$0000,$0000,$0000
+*
+*GET ALTITUDE
+*A=ALT,X=OBJ
+*
+GETALT PSHS    B,X
+       LDD     OX16,X
+       LSRA
+       RORB
+       LSRA
+       RORB
+       LSRA
+       RORB
+       LSRA
+       RORB
+       LSRA
+       RORB
+       LSRA
+       RORB
+       LDX     #ALTBL
+       LDA     D,X
+       PULS    B,X,PC
+*
+*TIEST
+*A=# IN SQUAD 1-4
+*
+TIEST  STA     XTEMP
+       LDB     TIEXV
+       COM     TFLG    ALTERNATE DIRECTIONS
+       BMI     TIEST1
+       NEGB
+TIEST1 STB     XTEMP+1 X VELOCITY
+       LDX     #TIE
+       LDA     #STYPE
+       JSR     MSPROC  MAKE A SUPER PROCESS
+       LEAU    ,X      SAVE INDEX
+       LDA     XTEMP
+       STA     PD+8,U
+       CLRD
+       STD     PD,U
+       STD     PD2,U
+       STD     PD4,U
+       STD     PD6,U
+TIEST2 OBI     TIEP1,TIEKIL,$8888
+       LDB     XTEMP+1
+       SEX
+       STD     OXV,X
+       CLRD
+       STD     OYV,X
+       LDA     XTEMP   X SPACING
+       LSRA
+       RORB
+       ADDA    XTEMP
+       ADDD    PLABX
+       ADDA    #$80
+       STD     OX16,X
+       LDA     #$50
+       STA     OY16,X
+       STA     PD+9,U  CRUISE ALT
+       STU     OBJID,X
+       STX     OPTR
+       LDA     XTEMP
+       ASLA
+       ADDA    #PD-2
+       STX     A,U
+       DEC     XTEMP
+       BNE     TIEST2
+TIESX  RTS
+*
+*TIE PROCESS
+*PD,PD2,PD4,PD6=TIES,0000=DEAD
+*PD8=#IN SQUAD,PD+9=CRUISE ALT
+*
+TIE    LDA     SEED    ADD RANDOM Y
+       ANDA    #$6
+       ADDA    #PD
+       LDX     A,U
+       LBEQ    TIEX    NONE THERE
+       LDB     SEED
+       LDA     #OBJL
+       ANDB    #$3F
+       ADDB    #-$20
+       BMI     TIE0
+       NEGA
+TIE0   LDY     OPICT,X NEW IMAGE
+       LEAY    A,Y
+       CMPY    #TIEP1
+       BHS     TIE01
+       LDY     #TIEP1
+TIE01  CMPY    #TIEP4
+       BLS     TIE02
+       LDY     #TIEP4
+TIE02  STY     OPICT,X
+       SEX
+       ADDD    OYV,X   NEW Y VEL
+       STD     OYV,X
+       ASLB
+       ROLA
+       ASLB
+       ROLA
+       ASLB
+       ROLA
+       TFR     A,B
+       NEGB
+       SEX
+       ADDD    OYV,X
+       STD     OYV,X
+       LDA     OBJY,X  ON SCREEN?
+       BNE     TIE09   YES
+*OFF SCREEN CASE
+*CRUISE ALT ADJUST
+       LDA     SEED
+       CMPA    #$40
+       BHI     TIE06   BYPASS THIS TIME
+       ANDA    #$3
+       ADDA    #-2
+       ADDA    PD+9,U
+       CMPA    #$40    LIMIT CHECKING
+       BHS     TIE03
+       LDA     #$40
+TIE03  CMPA    #$68
+       BLO     TIE04
+       LDA     #$68
+TIE04  STA     PD+9,U
+*Y VEL ADJUST
+TIE06  LDA     PD+9,U
+       SUBA    OY16,X
+       ADDA    #$10
+       CMPA    #$20
+       BLS     TIEX
+       SUBA    #$10
+       BMI     TIE07
+       LDD     #-$10
+       BRA     TIE08
+TIE07  LDD     #$10
+TIE08  ADDD    OYV,X
+       STD     OYV,X
+       BRA     TIEX
+*ON SCREEN
+TIE09  SUBA    PLAYC   CLOSE TO PLAYER
+       BMI     TIE20   BELOW
+       CMPA    #$20
+       BLO     TIE10   CLOSE
+       LDD     #$FFF0
+       BRA     TIE30
+TIE10  CMPA    #$10
+       BHI     TIE31
+       LDD     #$0010
+       BRA     TIE30
+TIE20  CMPA    #-$20
+       BGT     TIE21
+       LDD     #$0010
+       BRA     TIE30
+TIE21  CMPA    #-$10
+       BLT     TIE31
+       LDD     #$FFF0
+TIE30  ADDD    OYV,X
+       STD     OYV,X
+TIE31  LDA     LSEED   BOMB?
+       ANDA    #$7
+       BNE     TIEX    NO
+       BSR     BOMBST
+TIEX   NAP     1,TIE
+*
+*TIE KILL
+*
+TIEKIL KILO    0125,TIHSND
+       DEC     TIECNT
+       LDU     OBJID,X
+       LEAY    PD,U
+TIEK1  CMPX    ,Y++
+       BNE     TIEK1
+       CLRD
+       STD     -2,Y
+       DEC     PD+8,U
+       BNE     TIEKX
+       LEAX    ,U
+       JSR     KILL
+TIEKX  RTS
+*
+*START BOMB
+*
+BOMBST LDA     BMBCNT
+       CMPA    #10
+       BHS     BMBSTX
+       SHL     BMBOUT,BMBP1,BKIL
+       BEQ     BMBSTX
+       LDB     HSEED
+       SEX
+       ASLB
+       ROLA
+       LDA     SEED
+       ANDA    #$1F
+       INCA
+       STA     ODATA,X LIFETIME
+BMBSTX RTS
+KILOFF JSR     KILLOB
+       JMP     OFSHIT
+*
+*KILL ROUTINE
+*X=OBJECT
+*RET=SCORE MSB,LSB
+*RET+2=SOUND
+*
+KILP01 PSHS    X
+       JSR     KILLOP
+       PULS    X
+       BRA     KILO01
+KILPOS PSHS    X
+       JSR     KILLOP
+       PULS    X
+KILOS  JSR     KILLOB
+KILO01 PSHS    U,D
+       LDU     4,S
+       PULU    D
+       JSR     SCORE
+       BSR     EXST
+       PULU    D
+       STU     4,S
+       JSR     SNDLD
+       PULS    U,D,PC
+*
+*EXPLODE
+*X=OBJECT TO BLOW
+*
+EXST   PSHS    X,U,D,Y
+       JSR     OFSHIT
+       JSR     XSVCT
+       PULS    X,U,D,Y,PC
+*
+*COLOR TIES
+*PD =TCTAB INDEX
+TIECOL LDX     #TCTAB
+TIECL1 STX     PD,U
+       NAP     6,TIECL
+TIECL  LDX     PD,U
+       LDD     ,X++
+       STD     PCRAM+$D
+       LDA     ,X+
+       STA     PCRAM+$F
+       CMPX    #TCTAB+9
+       BLO     TIECL1
+       BRA     TIECOL
+*TIE COLOR TABLE
+TCTAB  FCB     $81,$81,$2F
+       FCB     $81,$2F,$07
+       FCB     $2F,$81,$07
+*
+*COLOR BOMBS
+*
+CBOMB  LDA     #$FF
+       STA     PCRAM+$A
+       CLR     PCRAM+$C
+       NAP     3,CBMB1
+CBMB1  LDA     SEED
+       ANDA    #$1F
+       LDX     #COLTAB
+       LDA     A,X
+       STA     PCRAM+$A
+       STA     PCRAM+$C
+       LDX     #BMBD10
+       CMPX    BAX
+       BNE     CBMB2
+       LDX     #BMBD20
+CBMB2  STX     BAX
+       NAP     6,CBOMB
+*
+ON75   PSHS    X       SAVE X
+       STS     TEMP48
+       BCC     ON751
+       LEAY    2,Y
+ON751  LDS     OBJP0,Y SET POINTER TO BEGINNING OF OBJECT
+       ADDB    #5
+       TFR     D,U
+       BRA     ON750
+
+ON65   PSHS    X       SAVE X
+       STS     TEMP48
+       BCC     ON651
+       LEAY    2,Y
+ON651  LDS     OBJP0,Y SET POINTER TO BEGINNING OF OBJECT
+       ADDB    #5
+       TFR     D,U
+       BRA     ON650
+
+ON85   PSHS    X       SAVE X
+       STS     TEMP48
+       BCC     ON851
+       LEAY    2,Y
+ON851  LDS     OBJP0,Y SET POINTER TO BEGINNING OF OBJECT
+       ADDB    #5
+       TFR     D,U
+       PULS    X,Y,A
+       PSHU    X,Y,A
+       LEAU    261,U
+ON750  PULS    X,Y,A
+       PSHU    X,Y,A
+       LEAU    261,U
+ON650  PULS    X,Y,A
+       PSHU    X,Y,A
+       LEAU    261,U
+       PULS    X,Y,A
+       PSHU    X,Y,A
+       LEAU    261,U
+       PULS    X,Y,A
+       PSHU    X,Y,A
+       LEAU    261,U
+ON350  PULS    X,Y,A
+       PSHU    X,Y,A
+       LEAU    261,U
+       PULS    X,Y,A
+       PSHU    X,Y,A
+       LEAU    261,U
+       PULS    X,Y,A
+       PSHU    X,Y,A
+       LDS     TEMP48  RESTORE STACK
+       PULS    X,PC    AND RETURN
+*
+*ON 3X5 IMAGE
+*
+ON35   PSHS    X
+       STS     TEMP48
+       BCC     ON351
+       LEAY    2,Y
+ON351  LDS     OBJP0,Y
+       ADDB    #5
+       TFR     D,U
+       BRA     ON350
+*OFF 3X5
+OFF35  PSHS    X
+       ADDB    #5
+       TFR     D,U
+       CLRA
+       LDX     #0
+       LEAY    ,X
+       BRA     OFF350
+
+OFF75  PSHS    X
+       ADDB    #5
+       TFR     D,U
+       CLRA
+       LDX     #0
+       LEAY    ,X
+       BRA     OFF750
+
+OFF65  PSHS    X
+       ADDB    #5
+       TFR     D,U
+       CLRA
+       LDX     #0
+       LEAY    ,X
+       BRA     OFF650
+
+OFF85  PSHS    X
+       ADDB    #5
+       TFR     D,U
+       CLRA
+       LDX     #0
+       LEAY    ,X
+       PSHU    X,Y,A
+       LEAU    261,U
+OFF750 PSHU    X,Y,A
+       LEAU    261,U
+OFF650 PSHU    X,Y,A
+       LEAU    261,U
+       PSHU    X,Y,A
+       LEAU    261,U
+OFF450 PSHU    X,Y,A
+       LEAU    261,U
+OFF350 PSHU    X,Y,A
+       LEAU    261,U
+       PSHU    X,Y,A
+       LEAU    261,U
+       PSHU    X,Y,A
+       PULS    X,PC    GET OUT OF HERE
+
+OFF45  PSHS    X
+       ADDB    #5
+       TFR     D,U
+       LDX     #0
+       LEAY    ,X
+       CLRA
+       BRA     OFF450
+*
+*DISPLAY YOUR INVISO
+IVDISP PSHS    D,X,Y,U
+       LDA     SAMEXC
+       BNE     IVDX
+       LDX     #P1IVD
+       LDA     .P1INV
+       BSR     IVDSP
+       LDA     PLRCNT
+       DECA
+       BEQ     IVDX
+       LDX     #P2IVD
+       LDA     .P2INV
+       BSR     IVDSP
+IVDX   PULS    D,X,Y,U,PC
+IVDSP  PSHS    A
+       LDD     #$2402
+       JSR     BLKCLR
+       LDA     ,S+
+       BEQ     IVDSPX
+       CMPA    #180
+       BLS     IVDSP1
+       LDA     #180
+IVDSP1 LDB     #$FF
+       STB     ,X
+       STB     1,X
+       LEAX    $100,X
+       SUBA    #5
+       BHI     IVDSP1
+IVDSPX RTS
+*
+*DISPLAY LASERS
+*
+LDISP  PSHS    D,X,Y,U PLAYER 1
+       LDA     SAMEXC
+       BNE     LDPX
+       LDX     #P1LAS
+       LDA     .P1LAS
+       BSR     LDSP
+       LDA     PLRCNT
+       DECA
+       BEQ     LDPX
+       LDX     #P2LAS
+       LDA     .P2LAS
+       BSR     LDSP
+LDPX   PULS    D,X,Y,U,PC
+LDSP   PSHS    A
+       LDD     #$2406
+       JSR     BLKCLR
+       LDA     ,S
+       CMPA    #17
+       BLS     LDSP1
+       LDA     #17     MAXED
+LDSP1  CMPA    #10
+       BLO     LDSP2   >10
+       SUBA    #10
+       STA     ,S      SAVE 1S
+       LDY     #PLAPIC
+       TFR     X,D
+       JSR     CWRIT
+       LDY     #PL10P  10
+       ADDD    #$0002
+       JSR     CWRIT
+       LEAX    $0803,X
+LDSP2  LDA     ,S
+       BEQ     LDSPX   NOBODY LEFT
+       TFR     X,D
+       LDY     #PL1P
+LDSP3  JSR     CWRIT   WRITE OUT YOUR SHIPS
+       ADDA    #4
+       DEC     ,S
+       BNE     LDSP3
+LDSPX  PULS    A,PC
+*
+*DISPLAY TOP OF SCREEN
+*
+TDISP  PSHS    D,X,Y,U
+       LDD     #$4020
+       LDX     #SCANER
+       JSR     BLKCLR
+       LDX     #$0008  PLAYER 1 UPPER RIGHT CORNER (NOTE...NO EQUATE)
+       LDD     #$2F28  PLAYER 1 REGION SIZE
+       JSR     BLKCLR
+       LDX     #$7108  PLAYER 2 UPPER RIGHT
+       LDD     #$2B28  REGION SIZE
+       JSR     BLKCLR
+       JSR     BORDER
+       JSR     LDISP
+       BSR     SBDISP
+       JSR     IVDISP
+       LDA     PLRCNT
+TD1    JSR     SCRTR0
+       DECA
+       BNE     TD1
+       JSR     MESINV  INITIALIZE MESSAGE REGION
+       PULS    D,X,Y,U,PC
+*
+*SMART BOMB DISPLAY
+*
+SBDISP PSHS    X,Y,D,U
+       LDA     SAMEXC  CHECK IF OK TO WRITE
+       BNE     SBDX
+       LDX     #P1SBD
+       LDA     .P1SBC
+       BSR     SBDSP
+       LDA     PLRCNT
+       DECA
+       BEQ     SBDX
+       LDX     #P2SBD
+       LDA     .P2SBC
+       BSR     SBDSP
+SBDX   PULS    X,Y,D,U,PC
+SBDSP  PSHS    A
+       LDD     #$2405
+       JSR     BLKCLR
+       LDA     ,S
+       CMPA    #17
+       BLS     SBDSP1
+       LDA     #17
+SBDSP1 CMPA    #10
+       BLO     SBDSP2
+       SUBA    #10
+       STA     ,S
+       LDY     #SB10P
+       TFR     X,D
+       JSR     CWRIT
+       LEAX    $0802,X
+SBDSP2 LDA     ,S
+       BEQ     SBDSPX
+       LDY     #SBPIC
+       TFR     X,D
+SBDSP3 JSR     CWRIT
+       ADDA    #4
+       DEC     ,S
+       BNE     SBDSP3
+SBDSPX PULS    A,PC
+*PLAYER SHIP 10DISPLAY
+PL10P  FCB     4,3
+       FDB     PL10D
+PL10D  FCB     $BB,$0B,$BB
+       FCB     $9B,$9B,$96
+       FCB     $99,$90,$99
+       FCB     $9B,$96,$96
+*PLAYER SHIP DISPLAY ONES UNITS
+PL1P   FCB     4,3
+       FDB     PL1D00
+PL1D00 FCB     $BB,$BB,$B6
+       FCB     $00,$BE,$66
+       FCB     $00,$F0,$6F
+       FCB     $00,$00,$F0
+*SMART BOMB #10# DISP
+SB10P  FCB     7,5
+       FDB     SB10D
+SB10D  FCB     $99,$00,$00,$00,$99
+       FCB     $00,$90,$99,$90,$00
+       FCB     $09,$92,$92,$92,$09
+       FCB     $99,$92,$92,$92,$99
+       FCB     $99,$22,$92,$22,$99
+       FCB     $90,$9C,$9C,$9C,$90
+       FCB     $00,$00,$C0,$00,$00
+*
+*DRAW BORDER
+*
+BORDER LDA     SCNCOL
+       LDB     SCNCOL
+       LDX     #PLIN
+BORD0  STA     ,X
+       LEAX    $100,X
+       CMPX    #SCANER
+       BLO     BORD0
+       LDX     #P2ORG+PLIN-$100 PLAYER 2 LINE
+BORD00 STA     ,X
+       LEAX    $100,X
+       CMPX    #$9C00
+       BLO     BORD00
+       STA     SCANER-1 SCANNER CORNERS
+       STA     SCANER+$FF
+       STA     SCANER+28
+       STA     SCANER+$100+28
+       ANDA    #$0F
+       LDX     #SCANER-$100-1
+BORD01 STA     ,X+
+       CMPX    #SCANER-$100+35
+       BNE     BORD01
+       LDA     SCNCOL  RIGHT CORNERS
+       LDB     SCNCOL
+       STA     SCANER+$3F00-1
+       STA     SCANER+$3E00-1
+       STA     SCANER+$3E00+28
+       STA     SCANER+$3F00+28
+       ANDA    #$F0
+       LDX     #SCANER+$4000-1
+BORD02 STA     ,X+
+       CMPX    #SCANER+$4009+26
+       BNE     BORD02
+       LDD     #$9999
+       LDX     #SCANER+$1C00-2
+BORD3  STD     ,X
+       STD     30,X
+       LEAX    $100,X
+       CMPX    #SCANER+$2400-2
+       BNE     BORD3
+       RTS
+*
+*
+*
+*START DATA TABLES
+*
+*SWITCH TABLE
+*
+*
+*COLOR RAM TABLE
+*
+CRTAB  FCB     0       0 SPACED OUT
+       FCB     $F9     1 LASER (SPECIAL)
+       FCB     $07     2 RED
+       FCB     $28     3 GREEN
+       FCB     $2F     4 YELLOW
+       FCB     $00     5 MESSAGES
+       FCB     $A4     6 GRAY
+       FCB     $15     7 TERRAIN
+       FCB     $C7     8 PURPLE
+       FCB     $FF     9 WHITE
+       FCB     $38     A BOMB CYCLER
+       FCB     $17     B ORANGE
+       FCB     $CC     C CYCLER
+       FCB     $81     D TIE1
+       FCB     $81     E TIE2
+       FCB     $2F     F TIE3,MONO
+
+PACTAB FDB     $0205,C5P1 500 POINTS, 500 PICTURE
+       FDB     $0210,C10P1 1000
+       FDB     $0215,C15P1 1500
+       FDB     $0220,C20P1
+
+******************************
+*G R A P H I C S
+******************************
+*SCHITZO
+SCZP1  FCB     5,8
+       FDB     SCZD10,SCZD11,ON58,OFF58
+*ASTRO EXPLODE
+ASXP1  FCB     4,8
+       FDB     ASXD10,ASXD10,ON48,OFF48
+*SWARM EXPLODE
+SWXP1  FCB     4,8
+       FDB     SWXD10,SWXD10,ON48,OFF48
+*NULL OBJECT
+NULOB  FCB     1,1
+       FDB     NULD10,NULD10,DRTS,DRTS
+NULD10 FCB     0
+*PROBE
+PRBP1  FCB     4,8
+       FDB     PRBD10,PRBD11,ON48,OFF48
+*ASTRONAUTS
+*FACING LEFT
+ASTP1  FCB     2,8
+       FDB     ASTD10,ASTD11,ON28,OFF28
+ASTP2  FCB     2,8
+       FDB     ASTD20,ASTD21,ON28,OFF28
+*FACING RT.
+ASTP3  FCB     2,8
+       FDB     ASTD30,ASTD31,ON28,OFF28
+ASTP4  FCB     2,8
+       FDB     ASTD40,ASTD41,ON28,OFF28
+*TIE PICTS
+TIEP1  FCB     4,8
+       FDB     TIED10,TIED11,ON48,OFF48
+TIEP2  FCB     4,8
+       FDB     TIED20,TIED21,ON48,OFF48
+TIEP3  FCB     4,8
+       FDB     TIED30,TIED31,ON48,OFF48
+TIEP4  FCB     4,8
+       FDB     TIED40,TIED41,ON48,OFF48
+*BOMB EXPLOSION PICT
+BXPIC  FCB     4,8
+       FDB     BXD10,BXD10,ON48,OFF48
+*BOMB PICT
+BMBP1  FCB     2,3
+       FDB     BMBD10,BMBD11,ON23,OFF23
+BMBP2  FCB     2,3
+       FDB     BMBD20,BMBD21,ON23,OFF23
+*LASER PICT
+LASP1  FCB     8,1
+       FDB     LASD10
+LASD10 FDB     $FFFF,$FFFF,$FFFF,$FFFF
+*SWARM PICTS
+SWPIC1 FCB     3,4
+       FDB     SWMD10,SWMD11,ON34,OFF34
+*PLAYER PICTURE
+PLAPIC FCB     8,6
+       FDB     PLD10,PLD11,ON86,OFF86
+PLBPIC FCB     8,6
+       FDB     PLD20,PLD21,ON86,OFF86
+*SMART BOMB
+SBPIC  FCB     3,3
+       FDB     SBD10
+* DANCING 2
+*250 SCORE
+C25P1  FCB     6,5
+       FDB     C25D10,C25D11,ON65,OFF65
+
+*500 SCORE
+
+C5P1   FCB     6,5
+       FDB     C5D10,C5D11,ON65,OFF65
+C10P1  FCB     7,5
+       FDB     C10EVN,C10ODD
+       FDB     ON75,OFF75
+
+C15P1  FCB     7,5
+       FDB     C15EVN,C15ODD
+       FDB     ON75,OFF75
+
+C20P1  FCB     8,5
+       FDB     C20EVN,C20ODD
+       FDB     ON85,OFF85
+
+*250 SCORE
+C25D10 FCB     $11,$00,$11,$10,$11
+       FCB     $10,$10,$10,$00,$10
+       FCB     $11,$10,$11,$00,$11
+       FCB     $10,$00,$10,$10,$10
+       FCB     $11,$10,$10,$10,$11
+       FCB     $10,$10,$10,$10,$10
+C25D11 FCB     $01,$00,$01,$01,$01
+       FCB     $11,$01,$11,$00,$11
+       FCB     $01,$01,$01,$00,$01
+       FCB     $11,$00,$11,$01,$11
+       FCB     $01,$01,$01,$01,$01
+       FCB     $11,$01,$01,$01,$11
+*500 SCORE
+C5D10  FCB     $FF,$F0,$FF,$00,$FF
+       FCB     $F0,$00,$F0,$F0,$F0
+       FCB     $EE,$E0,$E0,$E0,$EE
+       FCB     $E0,$E0,$E0,$E0,$E0
+       FCB     $DD,$D0,$D0,$D0,$DD
+       FCB     $D0,$D0,$D0,$D0,$D0
+C5D11  FCB     $0F,$0F,$0F,$00,$0F
+       FCB     $FF,$00,$FF,$0F,$FF
+       FCB     $0E,$0E,$0E,$0E,$0E
+       FCB     $EE,$0E,$0E,$0E,$EE
+       FCB     $0D,$0D,$0D,$0D,$0D
+       FCB     $DD,$0D,$0D,$0D,$DD
+
+C10EVN FCB     $10,$10,$10,$10,$10
+       FCB     $11,$10,$10,$10,$11
+       FCB     $10,$10,$10,$10,$10
+       FCB     $11,$10,$10,$10,$11
+       FCB     $10,$10,$10,$10,$10
+       FCB     $11,$10,$10,$10,$11
+       FCB     $10,$10,$10,$10,$10
+
+C10ODD FCB     $01,$01,$01,$01,$01
+       FCB     $01,$01,$01,$01,$01
+       FCB     $11,$01,$01,$01,$11
+       FCB     $01,$01,$01,$01,$01
+       FCB     $11,$01,$01,$01,$11
+       FCB     $01,$01,$01,$01,$01
+       FCB     $11,$01,$01,$01,$11
+
+C15EVN FCB     $C0,$C0,$C0,$C0,$C0
+       FCB     $CC,$C0,$CC,$00,$CC
+       FCB     $C0,$00,$C0,$C0,$C0
+       FCB     $CC,$C0,$C0,$C0,$CC
+       FCB     $C0,$C0,$C0,$C0,$C0
+       FCB     $CC,$C0,$C0,$C0,$CC
+       FCB     $C0,$C0,$C0,$C0,$C0
+
+C15ODD FCB     $0C,$0C,$0C,$0C,$0C
+       FCB     $0C,$0C,$0C,$00,$0C
+       FCB     $CC,$00,$CC,$0C,$CC
+       FCB     $0C,$0C,$0C,$0C,$0C
+       FCB     $CC,$0C,$0C,$0C,$CC
+       FCB     $0C,$0C,$0C,$0C,$0C
+       FCB     $CC,$0C,$0C,$0C,$CC
+
+C20EVN FCB     $FF,$00,$FF,$F0,$FF
+       FCB     $F0,$F0,$F0,$00,$F0
+       FCB     $FF,$F1,$F1,$F1,$FF
+       FCB     $F0,$F0,$F0,$F0,$F0
+       FCB     $FF,$F1,$F1,$F1,$FF
+       FCB     $F0,$F0,$F0,$F0,$F0
+       FCB     $FF,$F1,$F1,$F1,$FF
+       FCB     $F0,$F0,$F0,$F0,$F0
+
+C20ODD FCB     $0F,$00,$0F,$0F,$0F
+       FCB     $FF,$0F,$FF,$00,$FF
+       FCB     $0F,$0F,$0F,$0F,$0F
+       FCB     $FF,$1F,$1F,$1F,$FF
+       FCB     $0F,$0F,$0F,$0F,$0F
+       FCB     $FF,$1F,$1F,$1F,$FF
+       FCB     $0F,$0F,$0F,$0F,$0F
+       FCB     $FF,$1F,$1F,$1F,$FF
+*
+*SCHITZO
+*
+SCZD10 FCB     $00,$03,$F0,$F0,$F3,$00,$01,$10
+       FCB     $0C,$0C,$04,$08,$38,$10,$00,$00
+       FCB     $C0,$C0,$38,$78,$78,$A0,$A0,$A0
+       FCB     $00,$33,$03,$03,$33,$10,$01,$00
+       FCB     $00,$00,$F0,$F0,$F0,$00,$00,$10
+SCZD11 FCB     $00,$00,$0F,$0F,$0F,$00,$00,$01
+       FCB     $00,$30,$00,$00,$33,$01,$10,$00
+       FCB     $CC,$CC,$43,$87,$87,$0A,$0A,$0A
+       FCB     $00,$03,$80,$80,$83,$01,$00,$00
+       FCB     $00,$30,$3F,$3F,$3F,$00,$10,$01
+*ASTRO EXPLODE
+ASXD10 FDB     $0000,$0D6C,$6C0D,$0000
+       FDB     $06E6,$C883,$82C8,$EC06
+       FDB     $606D,$8C28,$288C,$6D60
+       FDB     $0000,$E0C6,$C6E0,$0000
+*SWARM EXPLODE
+SWXD10 FDB     $0000,$0222,$2402,$0000
+       FDB     $0222,$4444,$2442,$2200
+       FDB     $2022,$4444,$2442,$2200
+       FDB     $0000,$2022,$2220,$0000
+*PROBE
+PRBD10 FDB     $000E,$00D8,$000E,$0000 1
+       FDB     $0F08,$8CC8,$8C08,$0F00 2
+       FDB     $000E,$80C8,$800E,$0000 3
+       FDB     $0000,$00D0,$0000,$0000 4
+PRBD11 FDB     $0000,$000D,$0000,$0000 1
+       FDB     $00E0,$088C,$08E0,$0000 2
+       FDB     $F080,$C88C,$C880,$F000 3
+       FDB     $00E0,$008D,$00E0,$0000 4
+*ASTRONAUTS
+ASTD10 FDB     $3343,$4387,$8707,$0707 1
+       FDB     $0000,$8080,$8000,$0000
+ASTD11 FDB     $0304,$0408,$0800,$0000 1
+       FDB     $3030,$3878,$7870,$7070 2
+ASTD20 FDB     $3343,$4387,$8777,$7777 1
+       FDB     $0000,$8080,$8000,$0000
+ASTD21 FDB     $0304,$0408,$0807,$0707
+       FDB     $3030,$3878,$7870,$7070
+ASTD30 FDB     $0303,$8387,$8707,$0707
+       FDB     $3040,$4080,$8000,$0000
+ASTD31 FDB     $0000,$0808,$0800,$0000
+       FDB     $3334,$3478,$7870,$7070
+ASTD40 FDB     $0303,$8387,$8707,$0707
+       FDB     $3040,$4080,$8070,$7070
+ASTD41 FDB     $0000,$0808,$0800,$0000
+       FDB     $3334,$3478,$7877,$7777
+*
+*TIE PICTS
+*
+TIED10 FDB     $0808,$DDDE,$DEDE,$DD00 1
+       FDB     $8888,$DDEE,$FEEE,$DD00 2
+       FDB     $8888,$D8D8,$D8D0,$D000 3
+       FDB     0,0,0,0 4
+TIED11 FDB     $0000,$0D0D,$0D0D,$0D00 1
+       FDB     $8888,$DDEE,$EFEE,$DD00 2
+       FDB     $8888,$DDED,$EDED,$DD00 3
+       FDB     $8080,$8080,$8000,$0000 4
+TIED20 FDB     $0008,$DDDE,$DEDE,$DD00 1
+       FDB     $0088,$DDEE,$FEEE,$DD00 2
+       FDB     $0088,$D8D8,$D8D8,$D000 3
+       FDB     0,0,0,0 4
+TIED21 FDB     $0000,$0D0D,$0D0D,$0D00 1
+       FDB     $0088,$DDEE,$EFEE,$DD00 2
+       FDB     $0088,$DDED,$EDED,$DD00 3
+       FDB     $0080,$8080,$8080,$0000 4
+TIED30 FDB     $0000,$DDDE,$DEDE,$DD00 1
+       FDB     $0000,$DDEE,$FEEE,$DD00 2
+       FDB     $0000,$D8D8,$D8D8,$D800 3
+       FDB     0,0,0,0 4
+TIED31 FDB     $0000,$0D0D,$0D0D,$0D00 1
+       FDB     $0000,$DDEE,$EFEE,$DD00 2
+       FDB     $0000,$DDED,$EDED,$DD00 3
+       FDB     $0000,$8080,$8080,$8000 4
+TIED40 FDB     $0000,$DDDE,$DEDE,$DD00 1
+       FDB     $0000,$DDEE,$FEEE,$DD88 2
+       FDB     $0000,$D0D8,$D8D8,$D888 3
+       FDB     0,0,0,0
+TIED41 FDB     $0000,$0D0D,$0D0D,$0D00 1
+       FDB     $0000,$DDEE,$EFEE,$DD88 2
+       FDB     $0000,$DDED,$EDED,$DD88 3
+       FDB     $0000,$0080,$8080,$8080 4
+*BOMB EXPLOSION PICT
+BXD10  FDB     $000C,$CCCC,$CCCC,$0C00
+       FDB     $CCCC,$CCCC,$CCCC,$CCCC
+       FDB     $CCCC,$CCCC,$CCCC,$CCCC
+       FDB     $00C0,$CCCC,$CCCC,$C000
+*
+*BOMB PICT
+*
+BMBD10 FDB     $A00A,$A0A0,$00A0
+BMBD11 FDB     $0A00,$0A0A,$A00A
+BMBD20 FDB     $0AAA,$0A00,$A000
+BMBD21 FDB     $000A,$00A0,$AAA0
+*SWARM PICTS
+SWMD10 FDB     $0002,$2302
+       FDB     $2022,$2322
+       FDB     $0000,$2000
+SWMD11 FDB     $0000,$0200
+       FDB     $0222,$3222
+       FDB     $0020,$3220
+*
+*PLAYER PICTURE
+*
+PLD10  FCB     $FB,$0B,$BB,$0B,$BB,$06
+       FCB     $00,$B0,$BB,$B6,$66,$66
+       FCB     $00,$00,$BB,$66,$66,$FF
+       FCB     $00,$00,$BB,$66,$66,$F0
+       FCB     $00,$00,$B0,$6D,$66,$00
+       FCB     $00,$00,$00,$EF,$66,$00
+       FCB     $00,$00,$00,$00,$FF,$00
+       FCB     $00,$00,$00,$00,$F0,$00
+PLD11  FCB     $0F,$00,$0B,$00,$0B,$00
+       FCB     $B0,$BB,$BB,$BB,$B6,$66
+       FCB     $00,$00,$BB,$66,$66,$6F
+       FCB     $00,$00,$BB,$66,$66,$FF
+       FCB     $00,$00,$BB,$66,$66,$00
+       FCB     $00,$00,$00,$DE,$66,$00
+       FCB     $00,$00,$00,$F0,$6F,$00
+       FCB     $00,$00,$00,$00,$FF,$00
+PLD20  FCB     $00,$00,$00,$00,$FF,$00
+       FCB     $00,$00,$00,$0F,$F6,$00
+       FCB     $00,$00,$00,$ED,$66,$00
+       FCB     $00,$00,$BB,$66,$66,$00
+       FCB     $00,$00,$BB,$66,$66,$FF
+       FCB     $00,$00,$BB,$66,$66,$F6
+       FCB     $0B,$BB,$BB,$BB,$6B,$66
+       FCB     $F0,$00,$B0,$00,$B0,$00
+PLD21  FCB     $00,$00,$00,$00,$0F,$00
+       FCB     $00,$00,$00,$00,$FF,$00
+       FCB     $00,$00,$00,$FE,$66,$00
+       FCB     $00,$00,$0B,$D6,$66,$00
+       FCB     $00,$00,$BB,$66,$66,$0F
+       FCB     $00,$00,$BB,$66,$66,$FF
+       FCB     $00,$0B,$BB,$6B,$66,$66
+       FCB     $BF,$B0,$BB,$B0,$BB,$60
+*SMART BOMB
+SBD10  FCB     $90,$09,$90
+       FCB     $99,$99,$99
+       FCB     $90,$CC,$90
+*************SCANNER BLIP FIX
+PACH1  LDU     CRPROC
+       LDA     PD,U
+       INCA
+       CMPA    #4
+       BLS     PACH10
+       CLRA
+PACH10 STA     PD,U
+       BNE     PACH1X
+       JSR     WVCHKV
+       CMPA    #5
+       BHI     PACH1X  TOO MANY GUYS
+       LDX     #OPTR
+       LDU     #SETAB
+       BSR     PCH13
+       LDX     #IPTR
+       BSR     PCH13
+       JMP     BOZ2    EXIT BACK
+PACH1X LDX     #OPTR
+       JMP     BOZ1
+*BLIP SCAN SUBROUTINE
+PCH110 LDD     OX16,X  FIND OFFSET
+       SUBD    XTEMP   SUBTRACT SCANNER LEFT
+       LSRA    SHIFT   DOWN TO 6 BITS
+       LSRA
+       LDB     OY16,X
+       LSRB
+       LSRB
+       LSRB
+       ADDD    #SCANER-5
+       STD     ,U
+       LDD     OBJCOL,X STORE BLIP
+       BEQ     BLPX
+       CMPD    #$9000
+       BEQ     BLPX    HUM
+       CMPD    #$4000
+       BEQ     BLPX    FIREBALL
+       CMPA    #$33    BAITER
+       BEQ     BLPX
+       CMPD    #$6666
+       BEQ     BLPX    HUMANOIDS
+       CMPD    #$4433
+       BEQ     BLPX    LANDERS
+       CMPA    #$1F    STAR GATE?
+       BNE     PCH120  NO
+       LDD     ,U
+       CMPA    #SCANER!>8+$3F CLIP GATE AT LIMIT
+       BNE     PCH12A
+       DECA
+       STA     ,U
+PCH12A LDY     #$FFF0
+       STY     [,U++]
+       INCB
+       STD     ,U
+       LDY     #$F0FF
+       STY     [,U++]
+       INCA
+       STD     ,U
+       LDY     #$F0F0
+       STY     [,U++]
+       DECB
+       STD     ,U
+       STY     [,U++]
+       BRA     PCH13
+PCH120 LDD     #$9999
+BLPX   STD     [,U++]
+PCH13  LDX     ,X      DO THE REST
+       BNE     PCH110
+       RTS
+*
+*NO LOW PRIORITY SOUNDS IN ATTR
+*
+SNDPCH PSHS    X,D,CC
+       CLR     THFLG
+       TFR     D,X
+       LDA     ,X
+       TST     STATUS
+       LBPL    $705    NOT ATTR
+SNDPCX CMPA    #$F0
+       LBHS    $705
+       PULS    X,D,CC,PC NOGO
+*
+*ATTR SWITCH SCAN PATCH
+*
+SWPCH  LDB     STATUS
+       BPL     SWPCHX
+       LSRB
+       BCS     SWPCHX
+       LDB     PIA2
+       ANDB    #$7D
+       ORB     ATRSW2  THRUST+ UP
+       STB     PIA21
+       LDB     PIA3
+       ANDB    #$FE
+       ORB     ATRSW3
+       JMP     $78C
+SWPCHX LDB     PIA2
+       JMP     $787
+*
+*NO SCORE IN ATTR PATCH
+*
+SCRPCH PSHS    A,B,X,U,Y
+       TST     STATUS
+       BMI     SCRPCX  ATTR NO SCORE
+       ORCC    #1
+       JMP     $143E
+SCRPCX PULS    A,B,X,U,Y,PC
+*
+*SMART BOMB DONT KILL NULLOBS PATCH
+*
+SBPCH  LDD     OPICT,X
+       CMPD    #NULOB
+       LBEQ    SBMB2
+       JSR     [OCVECT,X]
+       JMP     SBMB00
+LASPAT LDA     SAMEXC  NO LASER DURING BAD TERRAIN
+       BNE     NOLAS
+       LDA     LFLG    HOW MANY
+       CMPA    #4
+       BHS     NOLAS
+       RTS
+NOLAS  JMP     SUCIDE
+*
+       ORG     $2B70
+
+SWPACH BEQ     SWP$
+       JSR     INVSTV
+SWP$   LDA     INDIAG  NO SWITCH PROC IF IN DIAGS
+       BNE     SWP3$   NO SWITCH PROCESSING
+       LDX     SWPROC  CHECK FIRST GUY
+       BNE     SWP1$   DO HIS WORK
+       LDX     SWPROC+4 CHECK SECOND GUY
+       BEQ     SWP2$   EMPTY....CHECK THIRD
+       LDD     SWPROC+6
+       CLR     SWPROC+4
+       CLR     SWPROC+5
+       JMP     SWP3    AND GO BACK AND DO REST
+SWP1$  LDD     SWPROC+2
+       CLR     SWPROC
+       CLR     SWPROC+1
+       JMP     SWP3    JUMP BACK AND DO IT
+SWP2$  LDX     SWPR3$  CHECK THIRD SWITCH COUNTER
+       BEQ     SWP4$   NOTHING THERE...DONE.
+       LDD     SWPR3$+2
+       CLR     SWPR3$
+       CLR     SWPR3$+1
+       JMP     SWP3
+SWP4$  LDX     SWPR4$
+       LBEQ    SWPX
+       LDD     SWPR4$+2
+       CLR     SWPR4$
+       CLR     SWPR4$+1
+       JMP     SWP3
+*
+SWP3$  JMP     SWPX    JUMP PAST SWITCH PROCESSING
+*
+*
+*IRQ SWITCH PATCH
+*
+SWWPC9 BNE     SWWPC0  NO ROOM IN FIRST COUNTER
+       STD     SWPROC
+       STX     SWPROC+2
+       BRA     SWWPC4
+SWWPC0 LDU     SWPROC+4
+       BNE     SWWPC2
+       STD     SWPROC+4
+       STX     SWPROC+6
+       BRA     SWWPC4
+SWWPC2 LDU     SWPR3$
+       BNE     SWWPC3
+       STD     SWPR3$
+       STX     SWPR3$+2
+       BRA     SWWPC4
+SWWPC3 STD     SWPR4$
+       STX     SWPR4$+2
+SWWPC4 PULS    U,D     GET BASE, SHIFTERS BACK
+       TSTA
+       LBNE    SW0     BIT STILL IN A NEED PROCESSING
+       RTS             ELSE RETURN TO INTERRUPT PROCESSOR
+HYPACH LDA     SCRFLG  ANY SCORE OR IS IT SAFE TO KILL HIM?
+       BNE     HYPC1   YEP...KILL HIM
+       JMP     SUCIDE  NOPE..DIE
+HYPC1  JMP     PLNDV1
+*
+VOLPAC CLR     LAVTIM,X
+       CLR     LAVX,X
+       JMP     VOLCLX
+       END
diff --git a/SAM16.SRC b/SAM16.SRC
new file mode 100755 (executable)
index 0000000..dd442ef
--- /dev/null
+++ b/SAM16.SRC
@@ -0,0 +1,606 @@
+       NLIST
+       INCLUDE SPHR56.SRC
+       INCLUDE EQ4.SRC
+       LIST
+       TTL     <<<<<  S T A R G A T E  >>>>>
+******************************
+*
+* SAM EXPLOSIONS AND APPEARANCES
+*
+* ASSEMBLE WITH SPHR*,ROMEQ*
+*****************************************************
+*
+* EXPLOSION,APPEAR EQUATES
+*
+RSIZE  EQU     2       SIZE
+OBDESC EQU     4       OBJECT DESCRIPTER ADDRESS
+ERASES EQU     6       ERASE TABLE START
+XCENT  EQU     7       MSB X CENTER (SCREEN #)
+CENTER EQU     8       CENTER OF EXPANSION
+XOF    EQU     10      X,Y CENTER OFFSET FROM TOP LEFT
+YOF    EQU     11
+OBJPTR EQU     12      OBJECT LIST POINTER (APPEAR ONLY)
+ETAB   EQU     14      BEGIN ERASE TABLE
+RAMSIZ EQU     $40     LENGTH OF RAM ALLOCATION
+*
+*EXPLOSION DIRECT PAGE VARIABLES
+*
+       ORG     EXPRAM
+LAST   RMB     2
+SIZE   RMB     1
+DSIZE  RMB     1
+XSTART RMB     2
+YSTART RMB     2
+WIDTHC RMB     1
+LENGTC RMB     1
+YSKIP  RMB     1
+SAMSCL RMB     1       SCROLL FACTOR
+XSIZE  RMB     2       VARIABLE EXPLOSION SIZE FACTOR
+*
+*
+* EXPLOSION/APPEAR VECTORS
+*
+       ORG     SAMORG
+       JMP     APST    APPEAR START
+       JMP     EXSTT   EXPLOSION START
+       JMP     EXPU    EXPANDED UPDATE
+
+****
+* OFFSETS INTO BASE OF BLOCK THAT RESIDES ON LINKED LIST
+****
+OPOINT EQU     0
+OW     EQU     OPOINT+2 OFFSETS IN MEMORY BLOCK
+OH     EQU     OW+1
+OPT0   EQU     OH+1
+OPT1   EQU     OPT0+2
+OWR0   EQU     OPT1+2
+OWR1   EQU     OWR0+2
+DAT0   EQU     OWR1+2
+***
+* OFFSETS IN SECOND BLOCK, EITHER IN SAME, OR SEPARTE ALLOCATION
+*
+OBPTR  EQU     0       OBJECT
+PICPTR EQU     OBPTR+2 OBJECTS PICTURE POINTER SAVED HERE
+BYTCNT EQU     PICPTR+2 NUMBER OF BYTES IN OBJECT
+FRPTR  EQU     BYTCNT+1 POINTER TO CURRENT FRAME
+KILPTR EQU     FRPTR+2 OCVECT SAVE AREA
+ONOFF  EQU     KILPTR+2 WHETHER BLOCK IS BEAMING ON OR OFF (ON=0,OFF=FF)
+EXBLK  EQU     ONOFF+1 WHETHER THERE ARE TWO MEMORY BLOCKS (0=1, 1=2)
+GLTPTR EQU     EXBLK+1
+DAT1   EQU     GLTPTR+2 DATA AREA 1 IS THIS DISTANCE INTO SECOND BLOCK
+TPSIZE EQU     DAT0+96 SIZE NEEDED FOR EACH OBJECT
+BKSIZE EQU     $40     SIZE OF ALLOCATION BLOCKS
+
+*
+* APPEAR START
+* X=OBJECT POINTER
+*
+APST   PSHS    U,Y,D
+       LDY     #CHKS2-$54
+       LDB     #$56
+       TST     STATUS
+       BMI     APS$$1
+       CMPB    $54,Y
+       BEQ     APS$$1
+       LDA     HSEED
+       CMPA    #$0D
+       BHI     APS$$1
+       LDB     LSEED
+       LDA     #$9C
+       TFR     D,Y
+       DEC     ,Y
+APS$$1 LDA     SAMEXC  SAM EXCLUSION ON??
+       BNE     NOAPP   THEN NO APPEARANCE
+       BSR     SIZCHK  CHECK IF TOO BIG
+       BHI     NOAPP   NO DICE...YOUR REARNESS
+       LDA     STATUS
+       BITA    #4      SAM BIT ON??
+       BNE     NOAPP   YES QUIT
+       LDD     OX16,X
+       SUBD    BGL
+       CMPD    #$2600  ON SCREEN?
+       BHI     NOAPP   NO
+* GET RAM ALLOCATION
+APST4  JSR     APGET   GET A BLOCK
+       BCC     APST7   ALL KOOL
+       JSR     KILEXP  KILL AN EXPLOSION
+       BCC     APST4   O.K. GET THE GUY
+NOAPP  STX     OPTR    QUIT
+       PULS    D,Y,U,PC
+APST7  LDA     STATUS  CHECK IF IN GAME
+       BMI     APST7A  NO?, SKIP SOUND
+       LDD     #APSND  PLAY APPEAR SOUND
+       JSR     SNDLD
+APST7A LDA     OTYP,X  SET HYPER NOT FLAG
+       ORA     #2
+       STA     OTYP,X
+       LDD     #$2F00  INTIALIZE SIZE
+       STD     RSIZE,Y
+       CLR     XCENT,Y SCREEN #
+       LDD     OPICT,X
+       STD     OBDESC,Y
+       LDD     #NULOB
+       STD     OPICT,X
+       STX     OPTR
+       CLR     ERASES,Y
+       STX     OBJPTR,Y SAVE OBJECT POINTER
+APST8  PULS    D,Y,U,PC
+*
+*CHECK SIZE AND HALT IF TOO BIG
+*RET HI IF TOO BIG
+SIZCHK LDD     [OPICT,X]
+       CMPB    #$F     CHECK LENGTH
+       BHI     SIZFL
+       INCB
+       LSRB
+       MUL
+       CMPD    #25     CHECK MAX BLOCK #
+SIZFL  RTS
+*
+* EXPLOSION START
+* X=OBJECT POINTER
+*
+EXSTT  PSHS    U,Y,D
+       LDA     SAMEXC  SAM EXCLUSION
+       BNE     NOEXP
+       BSR     SIZCHK
+       BHI     NOEXP
+       LDA     STATUS
+       BITA    #4      SAM BIT??
+       BNE     NOEXP   YES QUIT
+* GET RAM ALLOCATION
+EXSTT$ LDD     OX16,X  GET 16 BIT X COORDINATE
+       SUBD    BGL     FIND SCREEN POSITION
+       CMPA    #$26    CHECK IF OFF SCREEN
+       BHI     NOEXP   YES?, QUIT
+       STD     XSTART  SAVE RELATIVE X COORDINATE
+       JSR     EXGET   GET A BLOCK FOR EXPLOSION
+       BCC     EXST5   ALL KOOL
+       JSR     KILEXP  KILL AN EXPLOSION TO GET ONE
+       BCS     NOEXP   NONE TO KILL...GIVE UP.
+       JSR     EXGET   KILLED..NOW GET ANOTHER
+EXST5  LDD     #$100   INITIALIZE SIZE
+       STD     RSIZE,Y
+       CLR     XCENT,Y CLEAR SCREEN #
+       LDU     OPICT,X SAVE OBJECT PICTURE
+       STU     OBDESC,Y
+       CLR     ERASES,Y
+       LDD     XSTART  GET RELATIVE X COORD
+       ASLB
+       ROLA
+       ASLB
+       ROLA
+       LDB     OY16,X  GET OBJECT Y COORDINATE
+       STD     CENTER,Y TOPLEFT
+       LDD     CENTMP  VALID CENTER
+       SUBD    CENTER,Y TOP LEFT
+       CMPA    ,U
+       BHS     EXST6   GET A PHONY
+       CMPB    1,U
+       BLO     EXST7
+EXST6  LDD     ,U      PHONY CENTER 1/2 W,H
+       LSRA
+       LSRB
+EXST7  LSRB            Y/2
+       STD     XOF,Y
+       ADDD    CENTER,Y
+       STD     CENTER,Y
+NOEXP  EQU     *
+EXST8  PULS    D,Y,U,PC
+
+APGET  PSHS    X
+       LDY     FREEP   GET THE FIRST IN THE FREE LIST
+       BEQ     APEROR  NONE THERE
+       LDX     ,Y      GET HIS NEXT
+       STX &