;  "Space Fortress"
;  For the Bally/Astrocade
;
;                   SPACE FORTRESS #2012
;                 Programmed by Bob Odgon
;             Copyright 1981, Astrovision, Inc.
;
;  Disassembly Started Sept. 5, 2012 by AJT
;
;  This game is based on Midway's "Space Zap" game released in 1980.
;
;  This program can be assembled usign ZMAC.  Make sure that HVGLIB.H
;  is in the same directory and then type:
;      zmac -i -m -o spacefor.bin -x spacefor.lst spacefor.asm
;
;  Version History:
;    .01 (Sept. 9, 2012) - First public release
;                
INCLUDE "HVGLIB.H"  ; Home Video Game Library

; Equates
        L0228   EQU   $0228     ; "# OF PLAYERS" Text String Address
        LIVES   EQU   $4F4C     ; Number of Player Bases (or "Lives")
        GAMDIF  EQU   $4F4E     ; Game Difficulty Setting
        NUMPLY  EQU   $4FF3     ; Number of Players

        ORG     FIRSTC          ; FIRST address in Cartridge

        DB      "U"             ; User Cartridge Sentinel
        
        DW      MENUST          ; Link to Head of On-Board MENU STart
        DW      L2886           ; Address of "SPACE FORTRESS" menu text
        DW      L2F5E           ; Jump here if "SPACE FORTRESS" selected

;  Reset Vector Jumps - Used with RST Instruction
        JP      L202A           ; Reset VECTor #1 /  8 / $08
        JP      L2046           ; Reset VECTor #2 / 16 / $10
        JP      L2533           ; Reset VECTor #3 / 24 / $18
        JP      L2088           ; Reset VECTor #4 / 32 / $20
        JP      L2BAE           ; Reset VECTor #5 / 40 / $28
        JP      L28AF           ; Reset VECTor #6 / 48 / $30

;  User's Macro Subroutine $80
;  ---------------------------
;    JumP address          = $2027 ($1FA7 + $80)
;    Mask ARGument address = $2029 ($1FE9 + ($80/2))
;  User Macro $80 has two arguments based on a mask of 0000 0011B
;  Registers D and E are loaded when the User Macro is SYSSUKed. 
;  See BIOS listing for more details.
L2019:  EXX     
        LD      HL,L2025
        PUSH    HL
        LD      HL,($010D)
        PUSH    HL
        EXX     
        DI      
        RET     

L2025:  EI      
        RET

;  
L2027:  DW      L2019           ; User's Macro Subroutine $80, JumP address
L2029:  DB      00000011B       ; User's Macro Subroutine $80, Mask ARGument 

; Interrupt Service Routine #1
L202A:  LD      E,A
        LD      D,$00
L202D:  ADD     HL,DE
        ADD     HL,DE
        LD      E,(HL)
        INC     HL
        LD      D,(HL)
        RET     


L2033:  ADD     A,C
        DAA     
        OR      A
        SBC     HL,DE
        JR      NC,L2033
        ADD     HL,DE
        SUB     C
        DAA     
        RET     
 
 
;  Color Table
COLORS: DB      $7F             ; Color 3 Left (COL3L)
        DB      $53             ; Color 2 Left (COL2L)
        DB      $F4             ; Color 1 Left (COL1L)
        DB      $00             ; Color 0 Left (COL0L)
        DB      $7F             ; Color 3 Right (COL3R)
        DB      $53             ; Color 2 Right (COL2R)
        DB      $F4             ; Color 1 Right (COL1R)
        DB      $00             ; Color 0 Right (COL0R)


;  Interrupt Service Routine #2
L2046:  DI      
        LD      A,D
        LD      D,$00
        LD      HL,$4FD5
        ADD     HL,DE
        LD      (HL),A
        LD      HL,$4E66
        ADD     HL,DE
        ADD     HL,DE
        POP     DE
        LD      (HL),E
        INC     HL
        LD      (HL),D
        EI      
        RET     


L205A:  LD      A,($4F4B)
        LD      HL,$4F40
        RST     $08              ;  User ReStarT #1 of 6
        EX      DE,HL
        RET     
        
        
L2063:  ADD     HL,HL
L2064:  LD      (IX+$04),H
        LD      (IX+$03),L
        RET     


L206B:  LD      (IX+$09),H
        LD      (IX+$08),L
        RET     


L2072:  PUSH    DE
        LD      DE,$0000
        EX      DE,HL
        OR      A
        SBC     HL,DE
        POP     DE
        RET     


L207C:  LD      H,(IX+$09)
        LD      L,(IX+$08)
        CALL    L2072
        JP      L206B


; Interrupt Service Routine #4
L2088:  LD      HL,$4F51
        LD      C,$0B
        XOR     A
L208E:  LD      (HL),A
        INC     HL
        DEC     C
        JR      NZ,L208E
        RET     


L2094:  XOR     A
        LD      HL,$4F51
        CP      (HL)
        JR      Z,L20C5
        CP      (IY+$03)
        JR      Z,L20C5
        DEC     (IY+$03)
        JR      NZ,L20C5
        LD      A,(IY+$04)
        LD      (IY+$03),A
        LD      A,(IY+$00)
        CP      (IY+$02)
        JR      Z,L20BD
        ADD     A,(IY+$01)
        LD      (IY+$00),A
        OUT     (C),A
        JR      L20C5
L20BD:  XOR     A
        LD      (IY+$03),A
        OUT     ($15),A
        OUT     ($16),A
L20C5:  RET     


L20C6:  LD      IY,$4F57
        LD      C,$17
        CALL    L2094
        LD      IY,$4F52
        LD      C,$10
        JR      L2094
        JR      NZ,L20DA
        CPL     
L20DA:  LD      BC,$0006
        LD      BC,$0110
        RLCA    
        LD      L,$59
        ADD     A,L
        NOP     
        INC     E
        XOR     D
L20E7:  RST     $20              ;  User ReStarT #4 of 6
        SYSSUK  MOVE             ;  UPI MOVE block transfer
        DW      $4F52            ;  ... Destination Address = 
        DW      5                ;  ... Byte Count = 5
        DW      $20DC            ;  ... Source Address = 8412
        ;
        SYSSUK  MOVE             ;  UPI MOVE block transfer
        DW      $4F57            ;  ... Destination Address = 
        DW      5                ;  ... Byte Count = 5
        DW      $20D7            ;  ... Source Address = 8407
        ;
        LD      HL,$20E1
L20FB:  LD      BC,$0610
L20FE:  INC     C
        OUTI    
        JR      NZ,L20FE
        LD      A,$01
        LD      ($4F51),A
        JP      L20C6


;  MOVE the next 5 bytes to $4F52
L210B:  DB      $06
        DB      $03
        DB      $2D
        DB      $01
        DB      $01

L2110:  DB      $64
        DB      $42
        DB      $2C
        DB      $00
        DB      $08
        DB      $77
        DB      $16
        DB      $1E
        DB      $2F
        DB      $50

L211A:  DEC     A
        LD      HL,$2116
        LD      E,A
        LD      D,$00
        ADD     HL,DE
        LD      A,(HL)
        RET     


L2124:  RST     $20              ;  User ReStarT #4 of 6
        SYSSUK  MOVE             ;  UPI MOVE block transfer
        DW      $4F52            ;  ... Destination Address = 
        DW      $0005            ;  ... Byte Count = 5
        DW      $210B            ;  ... Source Address = 8459
        ;
        LD      A,($4F17)
        CALL    $211A
        SUB     $10
        LD      ($4F52),A
        ADD     A,$27
        LD      ($4F54),A
        LD      HL,L2110
        JP      L20FB


L2143:  PUSH    BC
        CALL    L2124
        XOR     A
        LD      ($4F55),A
        LD      A,($4EFF)
        RLA     
        OUT     ($14),A
        POP     BC
        RET     


;  Data for 5 byte MOVE
L2153:  DB      $16
        DB      $FE
        DB      $02
        DB      $01
        DB      $01
        
; Address loaded in HL ??
L2158:  DB      $8D
        DB      $4A
        DB      $1F
        DB      $00
        DB      $17
        DB      $66


; Data for MOVE of 5 Bytes
L215E:  DB      $14
        DB      $01
        DB      $3C
        DB      $01
        DB      $02

; Next Address loaded in HL ??
L2163:  DB      $64
        DB      $42
        DB      $2C
        DB      $00
        DB      $17
        DB      $66

L2169:  RST     $20              ;  User ReStarT #4 of 6
        SYSSUK  MOVE             ;  UPI MOVE block transfer
        DW      $4F52            ;  ... Destination Address = 
        DW      5                ;  ... Byte Count = 5
        DW      L215E            ;  ... Source Address = 8542
        ;
        LD      A,($4F32)
        CALL    $211A
        SUB     $02
        LD      ($4F52),A
        ADD     A,$28
        LD      ($4F54),A
        SUB     $3C
        OUT     ($17),A
        LD      HL,$2163
        JP      $20FB


;  Pattern ??
L218C:  DB      0,0             ; X,Y Displacement
        DB      3,9             ; X,Y Size
        DB      $55,$55,$C0     ; 1 1 1 1 1 1 1 1 3 . . .
        DB      $6A,$56,$80     ; 1 2 2 2 1 1 1 2 2 . . .
        DB      $5A,$AA,$C0     ; 1 1 2 2 2 2 2 2 3 . . .
        DB      $76,$FF,$C0     ; 1 3 1 2 3 3 3 3 3 . . .
        DB      $76,$F6,$D0     ; 1 3 1 2 3 3 1 2 3 1 . .
        DB      $7A,$F9,$D8     ; 1 3 2 2 3 3 2 1 3 1 2 .
        DB      $FB,$FF,$D8     ; 3 3 2 3 3 3 3 3 3 1 2 .
        DB      $00,$15,$5C     ; . . . . . 1 1 1 1 1 3 .
        DB      $00,$02,$BC     ; . . . . . . . 2 2 3 3 .

;  Pattern ??
L21AB:  DB      0,0             ; X,Y Displacement
        DB      3,9             ; X,Y Size
        DB      $00,$02,$BC     ;  . . . . . . . 2 2 3 3 .
        DB      $00,$15,$5C     ;  . . . . . 1 1 1 1 1 3 .
        DB      $FB,$FF,$D8     ;  3 3 2 3 3 3 3 3 3 1 2 .
        DB      $7A,$F9,$D8     ;  1 3 2 2 3 3 2 1 3 1 2 .
        DB      $76,$F6,$D0     ;  1 3 1 2 3 3 1 2 3 1 . .
        DB      $76,$FF,$C0     ;  1 3 1 2 3 3 3 3 3 . . .
        DB      $5A,$AA,$C0     ;  1 1 2 2 2 2 2 2 3 . . .
        DB      $6A,$56,$80     ;  1 2 2 2 1 1 1 2 2 . . .
        DB      $55,$55,$C0     ;  1 1 1 1 1 1 1 1 3 . . .

;  Pattern ?? [Not sure where this is called from]        
L21CA:  DB      0,0             ; X,Y Displacement
        DB      3,10            ; X,Y Size
        DB      $00,$05,$40     ; . . . . . . 1 1 1 . . .
        DB      $00,$17,$00     ; . . . . . 1 1 3 . . . .
        DB      $00,$5F,$C0     ; . . . . 1 1 3 3 3 . . .
        DB      $3C,$7F,$C0     ; . 3 3 . 1 3 3 3 3 . . .
        DB      $EF,$FF,$40     ; 3 2 3 3 3 3 3 3 1 . . .
        DB      $EF,$FF,$40     ; 3 2 3 3 3 3 3 3 1 . . .
        DB      $3C,$7F,$C0     ; . 3 3 . 1 3 3 3 3 . . .
        DB      $00,$5F,$C0     ; . . . . 1 1 3 3 3 . . .
        DB      $00,$17,$00     ; . . . . . 1 1 3 . . . .
        DB      $00,$05,$40     ; . . . . . . 1 1 1 . . .

;  Pattern ??
L21EC:  DB      0,6             ; X,Y Displacement
        DB      3,8             ; X,Y Size
        DB      $00,$F0,$00     ; . . . . 3 3 . . . . . .
        DB      $03,$AC,$00     ; . . . 3 2 2 3 . . . . .
        DB      $03,$FC,$00     ; . . . 3 3 3 3 . . . . .
        DB      $00,$F0,$00     ; . . . . 3 3 . . . . . .
        DB      $05,$F5,$00     ; . . 1 1 3 3 1 1 . . . .
        DB      $1F,$FD,$40     ; . 1 3 3 3 3 3 1 1 . . .
        DB      $7F,$FF,$D0     ; 1 3 3 3 3 3 3 3 3 1 . .
        DB      $43,$5C,$10     ; 1 . . 3 1 1 3 . . 1 . .

;  Pattern ??
L2208:  DB      0,0             ; X,Y Displacement
        DB      3,8             ; X,Y Size
        DB      $43,$5C,$10     ; 1 . . 3 1 1 3 . . 1 . .
        DB      $7F,$FF,$D0     ; 1 3 3 3 3 3 3 3 3 1 . .
        DB      $1F,$FD,$40     ; . 1 3 3 3 3 3 1 1 . . .
        DB      $05,$F5,$00     ; . . 1 1 3 3 1 1 . . . .
        DB      $00,$F0,$00     ; . . . . 3 3 . . . . . .
        DB      $03,$FC,$00     ; . . . 3 3 3 3 . . . . .
        DB      $03,$AC,$00     ; . . . 3 2 2 3 . . . . .
        DB      $00,$F0,$00     ; . . . . 3 3 . . . . . .

;  Pattern ??
L2224:  DB      0,0             ; X,Y Displacement
        DB      3,7             ; X,Y Size
        DB      $3F,$FF,$F0     ; . 3 3 3 3 3 3 3 3 3 . .
        DB      $03,$33,$00     ; . . . 3 . 3 . 3 . . . .
        DB      $0F,$FF,$C0     ; . . 3 3 3 3 3 3 3 . . .
        DB      $33,$FF,$30     ; . 3 . 3 3 3 3 3 . 3 . .
        DB      $C0,$FC,$0C     ; 3 . . . 3 3 3 . . . 3 .
        DB      $00,$30,$00     ; . . . . . 3 . . . . . .
        DB      $00,$30,$00     ; . . . . . 3 . . . . . .
        
;  Pattern ??
        DB      0,0             ; X,Y Displacement
        DB      3,7             ; X,Y Size
        DB      $00,$30,$00     ; . . . . . 3 . . . . . .
        DB      $00,$30,$00     ; . . . . . 3 . . . . . .
        DB      $C0,$FC,$0C     ; 3 . . . 3 3 3 . . . 3 .
        DB      $33,$FF,$30     ; . 3 . 3 3 3 3 3 . 3 . .
        DB      $0F,$FF,$C0     ; . . 3 3 3 3 3 3 3 . . .
        DB      $03,$33,$00     ; . . . 3 . 3 . 3 . . . .
        DB      $3F,$FF,$F0     ; . 3 3 3 3 3 3 3 3 3 . .
        
;  Pattern ??
L2256:  DB      0,0             ; X,Y Displacement
        DB      2,11            ; X,Y Size
        DB      $00,$C0         ; . . . . 3 . . .
        DB      $03,$00         ; . . . 3 . . . .
        DB      $CC,$00         ; 3 . 3 . . . . .
        DB      $FF,$00         ; 3 3 3 3 . . . .
        DB      $CF,$C0         ; 3 . 3 3 3 . . .
        DB      $FF,$FC         ; 3 3 3 3 3 3 3 .
        DB      $CF,$C0         ; 3 . 3 3 3 . . .
        DB      $FF,$00         ; 3 3 3 3 . . . .
        DB      $CC,$00         ; 3 . 3 . . . . .
        DB      $03,$00         ; . . . 3 . . . .
        DB      $00,$C0         ; . . . . 3 . . .

;  Pattern ??
L2270:  DB      -3,-3           ; X,Y Displacement
        DB      2,6             ; X,Y Size
        DB      $0A,$00         ; . . 2 2 . . . .
        DB      $2C,$A0         ; . 2 3 . 2 2 . .
        DB      $0F,$00         ; . . 3 3 . . . .
        DB      $BA,$E0         ; 2 3 2 2 3 2 . .
        DB      $0F,$A0         ; . . 3 3 2 2 . .
        DB      $28,$80         ; . 2 2 . 2 . . .

;  Pattern ??
L2280:  DB      -3,-3           ; X,Y Displacement
        DB      2,6             ; X,Y Size
        DB      $22,$80         ; . 2 . 2 2 . . .
        DB      $23,$A0         ; . 2 . 3 2 2 . .
        DB      $8E,$C0         ; 2 . 3 2 3 . . .
        DB      $BE,$E0         ; 2 3 3 2 3 2 . .
        DB      $23,$20         ; . 2 . 3 . 2 . .
        DB      $02,$00         ; . . . 2 . . . .

;  Pattern ??        
L2290:  DB      -3,-3           ; X,Y Displacement
        DB      2,6             ; X,Y Size
        DB      $22,$80         ; . 2 . 2 2 . . .
        DB      $AF,$00         ; 2 2 3 3 . . . .
        DB      $BA,$E0         ; 2 3 2 2 3 2 . .
        DB      $0F,$00         ; . . 3 3 . . . .
        DB      $A3,$80         ; 2 2 . 3 2 . . .
        DB      $0A,$00         ; . . 2 2 . . . .

;  Pattern ??
L22A0:  DB      -3,-3           ; X,Y Displacement
        DB      2,6             ; X,Y Size
        DB      $08,$00         ; . . 2 . . . . .
        DB      $8C,$80         ; 2 . 3 . 2 . . .
        DB      $BB,$E0         ; 2 3 2 3 3 2 . .
        DB      $3B,$20         ; . 3 2 3 . 2 . .
        DB      $AC,$80         ; 2 2 3 . 2 . . .
        DB      $28,$80         ; . 2 2 . 2 . . .

;  Pattern Address Table ??
L22B0:  LD      BC,L2270
        LD      BC,L2280
        LD      BC,L2290
        LD      BC,L22A0

        DB      $00             ; NOP or End of table Marker ??

;  Pattern ??
L22BD:  DB      -2,-2           ; X,Y Displacement
        DB      2,5             ; X,Y Size
        DB      $09,$80         ; . . 2 1 2 . . .
        DB      $90,$00         ; 2 1 . . . . . .
        DB      $0B,$20         ; . . 2 3 . 2 . .
        DB      $30,$40         ; . 3 . . 1 . . .
        DB      $22,$00         ; . 2 . 2 . . . .

;  Pattern ??
L22CB:  DB      -4,-4           ; X,Y Displacement
        DB      2,8             ; X,Y Size
        DB      $03,$20         ; . . . 3 . 2 . .
        DB      $26,$37         ; . 2 1 2 . 3 1 3
        DB      $33,$20         ; . 3 . 3 . 2 . .
        DB      $C8,$06         ; 3 . 2 . . . 1 2
        DB      $30,$73         ; . 3 . . 1 3 . 3
        DB      $13,$20         ; . 1 . 3 . 2 . .
        DB      $0C,$1C         ; . . 3 . . 1 3 .
        DB      $02,$00         ; . . . 2 . . . .

;  Pattern ??        
L22DF:  DB      -5,-5           ; X,Y Displacement
        DB      3,10            ; X,Y Size
        DB      $00,$10,$00     ; . . . . . 1 . . . . . .
        DB      $00,$00,$00     ; . . . . . . . . . . . .
        DB      $13,$00,$00     ; . 1 . 3 . . . . . . . .
        DB      $00,$20,$40     ; . . . . . 2 . . 1 . . .
        DB      $04,$00,$0C     ; . . 1 . . . . . . . 3 .
        DB      $30,$10,$80     ; . 3 . . . 1 . . 2 . . .
        DB      $42,$00,$00     ; 1 . . 2 . . . . . . . .
        DB      $08,$30,$00     ; . . 2 . . 3 . . . . . .
        DB      $00,$04,$00     ; . . . . . . 1 . . . . .
        DB      $01,$00,$80     ; . . . 1 . . . . 2 . . .

;  Pattern Address Table ??
L2301:  DB      $05
        DW      L22BD
        DB      $05
        DW      L22CB
        DB      $FF
        DW      L22DF

        DB      $00             ; NOP or End of table Marker ??

;  Pattern ??
L230B:  DB      -6,-4           ; X,Y Displacement
        DB      3,7             ; X,Y Size
        DB      $40,$54,$04     ; 1 . . . 1 1 1 . . . 1 .
        DB      $41,$65,$04     ; 1 . . 1 1 2 1 1 . . 1 .
        DB      $45,$B9,$44     ; 1 . 1 1 2 3 2 1 1 . 1 .
        DB      $56,$FE,$54     ; 1 1 1 2 3 3 3 2 1 1 1 .
        DB      $45,$B9,$44     ; 1 . 1 1 2 3 2 1 1 . 1 .
        DB      $41,$65,$04     ; 1 . . 1 1 2 1 1 . . 1 .
        DB      $40,$54,$04     ; 1 . . . 1 1 1 . . . 1 .

L2324:  DB      -6,-4           ; X,Y Displacement
        DB      3,7             ; X,Y Size
        DB      $00,$A8,$00     ; . . . . 2 2 2 . . . . .
        DB      $42,$BA,$04     ; 1 . . 2 2 3 2 2 . . 1 .
        DB      $4A,$DE,$84     ; 1 . 2 2 3 1 3 2 2 . 1 .
        DB      $6B,$57,$A4     ; 1 2 2 3 1 1 1 3 2 2 1 .
        DB      $4A,$DE,$84     ; 1 . 2 2 3 1 3 2 2 . 1 .
        DB      $42,$BA,$04     ; 1 . . 2 2 3 2 2 . . 1 .
        DB      $00,$A8,$00     ; . . . . 2 2 2 . . . . .

L233D:  DB      -6,-4           ; X,Y Displacement
        DB      3,7             ; X,Y Size
        DB      $00,$FC,$00     ; . . . . 3 3 3 . . . . .
        DB      $03,$DF,$00     ; . . . 3 3 1 3 3 . . . .
        DB      $4F,$67,$C4     ; 1 . 3 3 1 2 1 3 3 . 1 .
        DB      $7D,$A9,$F4     ; 1 3 3 1 2 2 2 1 3 3 1 .
        DB      $4F,$67,$C4     ; 1 . 3 3 1 2 1 3 3 . 1 .
        DB      $03,$DF,$00     ; . . . 3 3 1 3 3 . . . .
        DB      $00,$FC,$00     ; . . . . 3 3 3 . . . . .

;  Pattern Table ??
L2356:  DB      $04
        DW      L230B
        DB      $04
        DW      L2324
        DB      $04
        DW      L233D
        DB      $04
        DW      L2324
        
        DB      $00             ; NOP or End of table Marker ??
        
L2363:  BIT     0,B
        RET     Z
        LD      A,$01
        RET     


L2369:  BIT     3,B
        RET     Z
        LD      A,$02
        RET     


L236F:  BIT     1,B
        RET     Z
        LD      A,$03
        RET     


L2375:  BIT     2,B
        RET     Z
        LD      A,$04
        RET     


L237B:  CALL    L2363
L237E:  CALL    Z,L2369
        CALL    Z,L2375
        RET     


L2385:  CALL    L236F
        JR      L237E
        CALL    L2375
L238D:  CALL    Z,L236F
        CALL    Z,L2363
        RET     


L2394:  CALL    L2369
        JR      L238D

; Address loaded in HL ??
L2399:  DB      $85
        DB      $23
        DB      $8A
        DB      $23
        DB      $7B
        DB      $23
        DB      $94
        DB      $23
        DB      $8A
        DB      $05
        DB      $23
        DB      $3D
        DB      $22
        DB      $CE
        DB      $06
        DB      $21
        DB      $56
        DB      $22
        DB      $AA
        DB      $08
        DB      $23
        DB      $24
        DB      $22
        DB      $C9
        DB      $06
        DB      $60
        DB      $56
        DB      $22
        

L23B5:  Ld      A,($4f19)
        LD      E,A
        LD      A,(IX+$01)
        AND     $83
        CP      $80
        JR      NZ,L23D5
        LD      A,H
        SUB     L
        JR      NC,L23C7
        XOR     A
L23C7:  BIT     0,E
        JR      NZ,L23CF
        SRL     A
        SRL     A
L23CF:  SET     0,(IX+$01)
        JR      L23F7
L23D5:  LD      A,($4F31)
        CP      E
        JR      NZ,L23F6
        LD      HL,$4EFA
        SET     0,(HL)
        LD      ($4F33),A
        XOR     A
        LD      ($4EFD),A
        LD      ($4EFC),A
        LD      ($4F02),A
        LD      ($4F01),A
        LD      ($4F31),A
        LD      A,B
        JR      L23F7
L23F6:  LD      A,C
L23F7:  LD      ($4F1C),A
        RET     


L23FB:  LD      IX,$4E91
        LD      A,($4E9C)
        LD      L,A
        LD      H,$23
        LD      B,$1A
        LD      C,$22
        JP      L23B5


L240C:  LD      IX,$4EAB
        LD      A,($4EB1)
        LD      H,A
        LD      L,$60
        LD      B,$0C
        LD      C,$0E
        JP      L23B5


L241D:  LD      IX,$4EC5
        LD      A,($4ED0)
        LD      H,A
        LD      L,$3D
        LD      B,$16
        LD      C,$1E
        JP      L23B5


L242E:  LD      IX,$4EDF
        LD      A,($4EE5)
        LD      L,A
        LD      H,$40
        LD      B,$0C
        LD      C,$0E
        JP      L23B5


L243F:  DB      $FB
        DB      $23
        DB      $64
        DB      $05
        DB      $D8
        DB      $FF
        DB      $40
        DB      $0C
        DB      $24
        DB      $98
        DB      $07
        DB      $01
        DB      $00
        DB      $55
        DB      $1D
        DB      $24
        DB      $C4
        DB      $09
        DB      $28
        DB      $00
        DB      $40
        DB      $2E
        DB      $24
        DB      $8F
        DB      $07
        DB      $FF
        DB      $FF
        DB      $55


L245B:  LD      A,($4F1F)
        OR      A
        RET     Z

        LD      A,($4F19)
        LD      B,A
        LD      HL,$2438
        LD      DE,$0007
L246A:  ADD     HL,DE
        DJNZ    L246A
        LD      E,(HL)
        INC     HL
        LD      D,(HL)
        INC     HL
        LD      A,($4F18)
        OR      A
        JR      Z,L247F
        PUSH    HL
        LD      BC,L247E
        PUSH    BC
        EX      DE,HL
        JP      (HL)


L247E:  POP     HL
L247F:  LD      C,(HL)
        INC     HL
        LD      B,(HL)
        INC     HL
        LD      E,(HL)
        INC     HL
        LD      D,(HL)
        INC     HL
        LD      A,$20
        OUT     ($0C),A
        PUSH    BC
        LD      A,($4F1C)
        LD      B,A
        OR      A
        LD      A,(HL)
        POP     HL
        RET     Z

L2494:  LD      (HL),A
        ADD     HL,DE
        DJNZ    L2494
        RET     


L2499:  LD      HL,$4F2D
        LD      A,($4F15)
        LD      C,A
        LD      A,($4F1D)
        LD      B,A
        IN      A,(C)
        AND     $10
        LD      ($4F1D),A
        CP      B
        JR      Z,L24C1
        OR      A
        JR      Z,L24C1
        LD      A,($4F2C)
        OR      A
        RET     NZ

        LD      A,$03
        LD      (HL),A
        LD      ($4F1E),A
        PUSH    HL
        CALL    L2124
        POP     HL
L24C1:  LD      A,($4F18)
        OR      A
        JR      Z,L24D6
        LD      HL,$4F1B
        DEC     (HL)
        JR      NZ,L24D4
        XOR     A
        LD      ($4F18),A
        CALL    L245B
L24D4:  JR      $2504
L24D6:  LD      A,($4F2C)
        OR      A
        RET     NZ

        LD      A,(HL)
        OR      A
        JR      Z,$2504
        DEC     (HL)
        LD      A,($4F17)
        LD      D,A
        LD      HL,$4F19
        CP      (HL)
        JR      NZ,$24EF
        LD      A,($4F1E)
        JR      $24F1
        LD      A,$01
        LD      ($4F1F),A
        XOR     A
        LD      ($4F1E),A
        LD      (HL),D
        LD      A,$01
        LD      ($4F1B),A
        LD      ($4F18),A
        CALL    L245B
        RET      



L2505:  LD      L,(IX+$0F)
        LD      H,(IX+$10)
        SYSTEM  VWRITR           ;  UPI Vector WRITe Relative
        ;
        LD      (IX+$0E),D
        LD      (IX+$0D),E
        LD      (IX+$00),A
        RET     


L2517   PUSH    HL
        LD      L,(IX+$0F)
        LD      H,(IX+$10)
        INC     HL
        INC     HL
        LD      C,(HL)
        INC     HL
        LD      B,(HL)
        INC     HL
        LD      E,(IX+$0D)
        LD      D,(IX+$0E)
        LD      A,(IX+$00)
        OUT     (MAGIC),A       ;  Port $0C, write MAGIC register
        SYSTEM  WRITA           ;  UPI Screen WRITe Absolute
        ;
        POP     HL
        RET     


;  Interrupt Service Routine #3
L2533   BIT     7,(IX+$01)
        RET     Z
        ;
        BIT     5,(IX+$01)
        CALL    Z,L2517
        RES     5,(IX+$01)
        BIT     1,(IX+$01)
        JP      Z,L255B
        DEC     (IX+$19)
        JR      NZ,L2558
        RES     7,(IX+$01)
        XOR     A
        LD      ($4F2F),A
        RET     


L2558:  JP      L25EA


L255B:  BIT     0,(IX+$01)
        JP      Z,L25EA


L2562:  SET     1,(IX+$01)
        LD      (IX+$13),$00
        LD      (IX+$14),$01
        LD      (IX+$19),$0C
        LD      A,($4F2B)
        OR      A
        JR      NZ,L25D5
        LD      A,($4F2F)
        OR      A
        JR      Z,L2587
        LD      A,$02
        LD      ($4F2E),A
        LD      A,$96
        JR      L25B8
L2587:  LD      A,$19
        LD      DE,$4EF9
        PUSH    IX
        POP     HL
        SBC     HL,DE
        JR      NZ,L25B8
        PUSH    AF
        LD      A,($4F33)
        CP      $03
        JR      NZ,L25A6
        LD      HL,($4F06)
        LD      DE,$00A0
        SBC     HL,DE
        LD      ($4F06),HL
L25A6:  CALL    L2124
        LD      A,$1C
        OUT     ($15),A
        LD      A,($4F52)
        ADD     A,$0C
        OUT     ($17),A
        POP     AF
        ADD     A,A
        JR      L25BD
L25B8:  PUSH    AF
        CALL    L20E7
        POP     AF
L25BD:  LD      ($4F48),A
        LD      C,A
        LD      B,$00
        LD      HL,($4F36)
        ADD     HL,BC
        JR      NC,L25CA
        DEC     H
L25CA:  LD      ($4F36),HL
        CALL    L205A
        ADD     HL,BC
        EX      DE,HL
        LD      (HL),D
        DEC     HL
        LD      (HL),E
L25D5:  BIT     2,(IX+$01)
        JR      NZ,L25EA
        LD      H,(IX+$04)
        LD      L,(IX+$03)
        CALL    L2072
        CALL    L2064
        CALL    L207C
L25EA:  BIT     1,(IX+$01)
        JR      Z,L25F8
        LD      L,(IX+$17)
        LD      H,(IX+$18)
        JR      L25FE
L25F8:  LD      L,(IX+$15)
        LD      H,(IX+$16)
L25FE:  DEC     (IX+$14)
        JR      NZ,L262B
        PUSH    HL
        LD      A,(IX+$13)
        INC     A
        JR      Z,L2611
        LD      DE,$0003
        LD      B,A
L260E:  ADD     HL,DE
        DJNZ    L260E
L2611:  LD      B,A
        LD      A,(HL)
        POP     DE
        OR      A
        JR      NZ,L261B
        EX      DE,HL
        LD      A,(HL)
        LD      B,$00
L261B:  LD      (IX+$14),A
        INC     HL
        LD      A,(HL)
        LD      (IX+$0F),A
        INC     HL
        LD      A,(HL)
        LD      (IX+$10),A
        LD      (IX+$13),B
L262B:  BIT     3,(IX+$01)
        JP      NZ,L2517
        LD      L,(IX+$11)
        LD      H,(IX+$12)
        LD      (IX+$02),$01
        SYSTEM  VECT             ;  UPI VECTor move coordinate 
        ;
        BIT     3,(IX+$07)
        JR      NZ,L2648
        BIT     3,(IX+$0C)
L2648:  JR      Z,L2671
        LD      A,$01
        LD      (IX+$19),A
        BIT     1,(IX+$01)
        JR      NZ,L2671
        LD      ($4F2B),A
        LD      ($4F2C),A
        LD      HL,$4F2F
        LD      (HL),$00
        LD      HL,$4FDC
        CP      (HL)
        JR      NC,L2667
        LD      (HL),A
L2667:  CALL    L20E7
        LD      HL,$4E78
        LD      A,$0D
        OR      (HL)
        LD      (HL),A
L2671:  JP      L2505


; Address loaded in HL ??
L2674:  DB      $00
        DB      $01
        DB      $01
        DB      $01
        DB      $01
        DB      $00
        DB      $00
        DB      $00
        DB      $10
        DB      $50
        DB      $30
        DB      $70
        DB      $50
        DB      $50
        DB      $30
        DB      $30

L2684:  RST     $18              ;  User ReStarT #3 of 6
        LD      A,($4F29)
        OR      A
        RET     Z

        LD      A,($4F23)
        BIT     0,A
        LD      HL,$4F31
        JR      Z,L269D
        LD      D,(IX+$06)
        BIT     7,(IX+$04)
        JR      $26A4
L269D:  LD      D,(IX+$0B)
        BIT     7,(IX+$09)
        LD      A,($4F24)
        LD      E,A
        JR      NZ,L26C6
        SUB     $1C
        CP      D
        JR      NC,L26B1
        LD      (HL),$00
L26B1:  LD      A,E
        SUB     $06
        CP      D
        JR      NC,L26BB
        LD      A,($4F23)
        LD      (HL),A
L26BB:  LD      A,E
        CP      D
        JR      NC,L26C4
        LD      A,$01
        LD      ($4F28),A
L26C4:  JR      L26E0
L26C6:  ADD     A,$1C
        CP      D
        JR      C,L26CD
        LD      (HL),$00
L26CD:  LD      A,E
        ADD     A,$06
        CP      D
        JR      C,L26D7
        LD      A,($4F23)
        LD      (HL),A
L26D7:  LD      A,E
        CP      D
        JR      C,L26E0
        LD      A,$01
        LD      ($4F28),A
L26E0:  LD      A,($4F28)
        OR      A
        RET     Z

        LD      A,($4F23)
        LD      B,A
        DEC     A
        LD      HL,$267C
        RST     $08              ;  User ReStarT #1 of 6
        LD      (IX+$06),D
        LD      (IX+$0B),E
        CALL    L2143
        LD      HL,$4F29
        DEC     (HL)
        JR      NZ,L2707
        LD      A,$01
        LD      ($4F2E),A
        LD      HL,$4EFA
        RES     7,(HL)
L2707:  XOR     A
        LD      ($4F28),A
        LD      A,($4F27)
        OR      A
        LD      A,B
        JR      NZ,L271B
        INC     A
        CP      $05
        JR      C,L2719
        LD      A,$01
L2719:  JR      L2720
L271B:  DEC     A
        JR      NZ,L2720
        LD      A,$04
L2720:  LD      ($4F23),A
        LD      C,A
        BIT     0,A
        JR      Z,L272C
        LD      A,$50
        JR      $272E
L272C:  LD      A,$30
        LD      ($4F24),A
        LD      A,($4F27)
        OR      A
        JR      Z,L2738
        LD      C,B
L2738:  LD      A,C
        DEC     A
        LD      HL,$2674
        RST     $08              ;  User ReStarT #1 of 6
        LD      HL,($4F25)
        PUSH    HL
        BIT     0,D
        CALL    Z,L2072
        LD      A,E
        EX      DE,HL
        POP     HL
        OR      A
        CALL    Z,L2072
        LD      A,($4F27)
        OR      A
        JR      Z,L275C
        CALL    L2072
        EX      DE,HL
        CALL    L2072
        EX      DE,HL
L275C:  CALL    L206B
        EX      DE,HL
        JP      L2064


L2763:  LD      IX,$4EF9
        LD      A,($4EFA)
        BIT     7,A
        RET     Z

        AND     $03
        JP      NZ,L2533
        LD      A,($4F2F)
        OR      A
        JP      NZ,L2684
        LD      HL,$4F30
        BIT     0,(HL)
        JR      Z,L278D
        CALL    L2517
        RES     7,(IX+$01)
        RES     0,(HL)
        XOR     A
        LD      ($4F31),A
L278D:  BIT     2,(HL)
        RET     Z

        RES     2,(HL)
        LD      A,($4F32)
        LD      ($4F31),A
        JP      L2517 


L279B:  LD      IX,$4E77
        LD      A,($4E78)
        BIT     7,A
        RET     Z

        AND     $03
        JP      NZ,L2533
        LD      A,($4F15)
        LD      C,A
        LD      A,($4F16)
        LD      B,A
        IN      A,(C)
        AND     $0F
        RET     Z

        CP      B
        RET     Z

        LD      B,A
        LD      ($4F16),A
        LD      A,($4F17)
        DEC     A
        LD      HL,L2399
        RST     $08              ;  User ReStarT #1 of 6
        LD      HL,L27CC                          
        PUSH    HL
        XOR     A
        EX      DE,HL
        JP      (HL)
L27CC:  OR      A
        RET     Z

        LD      ($4F17),A
        PUSH    AF
        CALL    L2517
        POP     AF
        LD      B,A
        LD      DE,$0005
        LD      HL,$239C
L27DD:  ADD     HL,DE
        DJNZ    L27DD
        LD      A,(HL)
        LD      ($4E84),A
        INC     HL
        LD      A,(HL)
        LD      ($4E85),A
        INC     HL
        LD      A,(HL)
        LD      ($4E77),A
        INC     HL
        LD      A,(HL)
        LD      ($4E86),A
        INC     HL
        LD      A,(HL)
        LD      ($4E87),A
        JP      L2517

;  Interrupt Service Routine #1
;  ----------------------------
;
ISR1:   DI      
        PUSH    AF
        PUSH    HL
        PUSH    DE
        PUSH    BC
        PUSH    IX
        PUSH    IY
        LD      A,$68
        LD      HL,$4F13
        RLC     (HL)
        JR      NC,L280F
        LD      A,$CC
L280F:  OUT     (INLIN),A       ; Port $0F - write INterrupt LINe
        LD      HL,$4F14
        JR      NC,L2846
        BIT     7,(HL)
        JR      NZ,L281F
        CALL    L279B
        JR      L2829
L281F:  LD      IX,$4E91
        RST     $18              ; User ReStarT #3 of 6
        LD      IX,$4EAB           
        RST     $18              ; User ReStarT #3 of 6
L2829:  LD      BC,$0281
        LD      HL,$4E63
        CALL    CTIMER           ; Seconds and game TIMER, music
        LD      BC,$0340
        LD      HL,$4E64
        CALL    CTIMER           ; Seconds and game TIMER, music
        LD      BC,$133E
        LD      HL,$4E65
        CALL    CTIMER           ; Seconds and game TIMER, music
        JR      L2864
L2846:  LD      A,($4F1A)
        OUT     ($04),A
        RLC     (HL)
        JR      NC,L2857
        CALL    L2763
        CALL    L2499
        JR      L2861
L2857:  LD      IX,$4EDF
        RST     $18              ;  User ReStarT #3 of 6
        LD      IX,$4EC5
        RST     $18              ;  User ReStarT #3 of 6
L2861:  CALL    L20C6
L2864:  POP     IY
        POP     IX
        POP     BC
        POP     DE
        POP     HL
        POP     AF
        EI      
        RET     


L286E   DW      ISR1         ; Pointer to Interrupt Service Routine #1

;  Set-up Interrupt Vector
L2870   DI      
        LD      HL,L286E     ; Place $286E HL
        LD      A,H          ; Load A with High Byte of Interrupt Vector               
        LD      I,A          ; Load High byte of Interrupt Vector with $28
        LD      A,L          ; Load A with Low Byte of Interrupt Vector             
        OUT     (INFBK),A    ; Load Port $D (write INterrupt FeedBacK) with $6E
        IM      2
        RET     

;
L287D:  DB      $08
        DB      $2C
        DB      $56
        DB      $98
        DB      $38
        DB      $54
        DB      $08
        DB      $4A
        DB      $0E

L2886   DB      "SPACE FORTRESS",$00

        DB      $09

L2896   DB      "INTENSITY",$00

        DB      $05

L28A1   DB      "BASES",$00

        DB      $10
        DB      $02
        DB      $88
        DB      $02
        DB      $10
        DB      $0C
        DB      $88
        DB      $0C

L28AF:  CALL    L205A
        LD      IY,$4E60
        XOR     A
        LD      C,$01
        LD      DE,$2710
        CALL    L2033
        LD      (IY+$02),A
        XOR     A
        LD      C,$10
        LD      DE,$03E8
        CALL    L2033
        LD      C,$01
        LD      DE,$0064
        CALL    L2033
        LD      (IY+$01),A
        XOR     A
        LD      C,$10
        LD      DE,$000A
        CALL    L2033
        ADD     A,L
        LD      (IY+$00),A
        LD      HL,$28A7
        LD      A,($4F4B)
        RST     $08              ;  User ReStarT #1 of 6
        LD      BC,$C50C
        LD      A,($4F4A)
        LD      HL,$4F4B
        CP      (HL)
        JR      NZ,L28F8
        LD      C,$0D
L28F8:  LD      HL,$4E60
        LD      IX,$020D
        DI      
        SYSTEM  DISNUM           ;  UPI DISplay NUMber
        ;
        EI      
        RET     


L2904:  LD      HL,$4F48
        XOR     A
        CP      (HL)
        JR      Z,L290D
        LD      (HL),A
        RST     $30              ;  User ReStarT #6 of 6
L290D:  LD      DE,$0405
        RST     $10              ;  User ReStarT #2 of 6
        XOR     A
        JR      Z,L2904
L2914:  RLCA    
        NOP     
        LD      A,A
        NOP     
        RLCA    
        LD      A,(BC)
        LD      A,A
        LD      A,(BC)
L291C:  DI      
        LD      A,($4F4A)
        LD      HL,L2914
        RST     $08              ;  User ReStarT #1 of 6
        LD      BC,$0921
        LD      A,$55
        SYSTEM  RECTAN           ;  UPI paint a RECTANgle
        ;
        XOR     A
        LD      ($4F4B),A
        SYSSUK  CHRDIS           ;  UPI CHaRacter DISplay
        DB      $08              ;  ... X = 8
        DB      $01              ;  ... Y = 1
        DB      $1C              ;  ... Options = 28
        DB      $31              ;  ... Character = 49
        ;
        RST     $30              ;  User ReStarT #6 of 6
        DI      
        LD      A,($4FF3)
        CP      $01
        JR      C,L294A
        LD      HL,$4F4B
        INC     (HL)
        SYSSUK  CHRDIS           ;  UPI CHaRacter DISplay
        DB      $80              ;  ... X = 128
        DB      $01              ;  ... Y = 1
        DB      $1C              ;  ... Options = 28
        DB      $32              ;  ... Character = 50
        ;
        RST     $30              ;  User ReStarT #6 of 6
        DI      
L294A:  LD      A,($4FF3)
        CP      $02
        JR      C,$295D
        LD      HL,$4F4B
        INC     (HL)
        SYSSUK  CHRDIS           ;  UPI CHaRacter DISplay
        DB      $08              ;  ... X = 8
        DB      $0B              ;  ... Y = 11
        DB      $1C              ;  ... Options = 28
        DB      $33              ;  ... Character = 51
        ;
        RST     $30              ;  User ReStarT #6 of 6
        DI      
        LD      A,($4FF3)
        CP      $03
        JR      NZ,$2970
        LD      HL,$4F4B
        INC     (HL)
        SYSSUK  CHRDIS           ;  UPI CHaRacter DISplay
        DB      $80              ;  ... X = 128
        DB      $0B              ;  ... Y = 11
        DB      $1C              ;  ... Options = 28
        DB      $34              ;  ... Character = 52
        ;
        RST     $30              ;  User ReStarT #6 of 6
        DI      
        RET     

; Data for MOVE of 26 Bytes
L2971:  DB      $60
        DB      $00
        DB      $01
        DB      $00
        DB      $00
        DB      $00
        DB      $00
        DB      $00
        DB      $00
        DB      $00
        DB      $00
        DB      $00
        DB      $00
        DB      $C9
        DB      $06
        DB      $56
        DB      $22
        DB      $00
        DB      $00
        DB      $FF
        DB      $00
        DB      $00
        DB      $00
        DB      $01
        DB      $23
        DB      $18

L298B:  CALL    L205A
        LD      DE,($4F38)
        OR      A
        SBC     HL,DE
        JR      C,L29B7
        LD      HL,$09C4
        ADD     HL,DE
        LD      ($4F38),HL
        LD      HL,$4F3A
        LD      A,(HL)
        CP      $0B
        JR      C,L29AA
        SUB     $08
        JR      L29AC


L29AA:  LD      A,$0A
L29AC:  LD      (HL),A
        LD      HL,($4F21)
        LD      E,A
        LD      D,$00
        ADD     HL,DE
        LD      ($4F21),HL
L29B7:  LD      HL,$4F35
        DEC     (HL)
        JR      NZ,L29BE
        DEC     (HL)
L29BE:  LD      A,(HL)
        JP      P,L29C4
        NEG     
L29C4:  LD      HL,($4F36)
        SUB     H
        JP      P,L29CE
        LD      A,($4F50)
L29CE:  LD      HL,$4F50
        CP      (HL)
        JR      NC,L29D5
        LD      A,(HL)
L29D5:  LD      ($4F20),A
        LD      DE,$0203
        RST     $10              ;  User ReStarT #2 of 6
        XOR     A
        JR      Z,L298B          ; This will ALWAYS jump since A just cleared ??

; Next address loaded into HL ??
L29DF:  DB      $08
        DB      $22
        DB      $CA
        DB      $21
        DB      $EC
        DB      $21
        DB      $CA
        DB      $21
        DB      $23
        DB      $20
        DB      $23
        DB      $60
        DB      $12
        DB      $00
        DB      $DC
        DB      $06
        DB      $32
        DB      $0D
        DB      $BB
        DB      $06

;  Data for MOVE of 26 bytes
L29F3:  DB      $20
        DB      $20
        DB      $01
        DB      $00
        DB      $00
        DB      $00
        DB      $00
        DB      $00
        DB      $00
        DB      $00
        DB      $00
        DB      $00
        DB      $00
        DB      $00
        DB      $00
        DB      $00
        DB      $00
        DB      $00
        DB      $00
        DB      $FF
        DB      $01
        DB      $56
        DB      $23
        DB      $01
        DB      $23
        DB      $18

L2A0D:  LD      BC,($4F3C)
        LD      HL,$1321
        ADD     HL,BC
        PUSH    HL
        LD      HL,$2776
        ADC     HL,BC
        LD      DE,($4F3E)
        ADD     HL,DE
        EX      (SP),HL
        ADD     HL,BC
        EX      (SP),HL
        ADC     HL,DE
        EX      (SP),HL
        ADD     HL,BC
        EX      (SP),HL
        ADC     HL,DE
        EX      (SP),HL
        LD      D,E
        LD      E,B
        LD      B,C
        LD      C,$00
        ADD     HL,BC
        LD      ($4F3C),HL
        EX      (SP),HL
        ADC     HL,DE
        LD      ($4F3E),HL
        POP     DE
        RET     


;  Triggered when Kamikaze Ship appears on screen ?? 
L2A3C:  SYSSUK  MOVE             ;  UPI MOVE block transfer
        DW      $4EF9            ;  ... Destination Address = 
        DW      26               ;  ... Byte Count = 26
        DW      L29F3            ;  ... Source Address = 10739
        ;
        CALL    L2A0D
        LD      A,H
        AND     $01
        LD      ($4F27),A
        LD      A,E
        AND     $03
        LD      E,A
        INC     A
        LD      ($4F23),A
        LD      A,$01
        LD      ($4F28),A
        LD      A,($4F4F)
        RRA     
        INC     A
        SYSTEM  RANGED           ;  UPI RANGED random number
        ;
        INC     A
        LD      H,A
        LD      ($4F25),HL
        LD      A,D
        AND     $07
        LD      B,A
        CALL    L205A
        LD      A,($4F4F)
        LD      E,A
        LD      A,$0B
        SUB     E
        LD      E,A
        RLA     
        LD      C,$00
        LD      D,A
        LD      A,H
L2A7A:  SUB     D
        JR      C,$2A80
        INC     C
        JR      L2A7A
        LD      A,$09
        SUB     C
        JR      NC,L2A86
        XOR     A
L2A86:  ADD     A,E
        ADD     A,B
        LD      ($4F29),A
        LD      A,$01
        LD      ($4F2E),A
        XOR     A
        RET


L2A92:  DB      $20
        DB      $20
        DB      $01
        DB      $00
        DB      $00
        DB      $00
        DB      $50
        DB      $00
        DB      $00
        DB      $01
        DB      $00
        DB      $0A
        DB      $01
        DB      $00
        DB      $00
        DB      $00
        DB      $00
        DB      $7D
        DB      $28
        DB      $FF
        DB      $01
        DB      $B0
        DB      $22
        DB      $01
        DB      $23
        DB      $18
        DB      $20
        DB      $20
        DB      $01
        DB      $00
        DB      $FF
        DB      $00
        DB      $90
        DB      $01
        DB      $00
        DB      $00
        DB      $00
        DB      $31
        DB      $00
        DB      $00
        DB      $00
        DB      $00
        DB      $00
        DB      $7F
        DB      $28
        DB      $FF
        DB      $01
        DB      $B0
        DB      $22
        DB      $01
        DB      $23
        DB      $18
        DB      $20
        DB      $20
        DB      $01
        DB      $00
        DB      $00
        DB      $00
        DB      $50
        DB      $00
        DB      $00
        DB      $FF
        DB      $00
        DB      $54
        DB      $01
        DB      $00
        DB      $00
        DB      $00
        DB      $00
        DB      $81
        DB      $28
        DB      $FF
        DB      $01
        DB      $B0
        DB      $22
        DB      $01
        DB      $23
        DB      $18
        DB      $20
        DB      $20
        DB      $01
        DB      $00
        DB      $01
        DB      $00
        DB      $12
        DB      $01
        DB      $00
        DB      $00
        DB      $00
        DB      $31
        DB      $00
        DB      $00
        DB      $00
        DB      $00
        DB      $00
        DB      $83
        DB      $28
        DB      $FF
        DB      $01
        DB      $B0
        DB      $22
        DB      $01
        DB      $23
        DB      $18
        DB      $91
        DB      $4E
        DB      $AB
        DB      $4E
        DB      $C5
        DB      $4E
        DB      $DF
        DB      $4E
        DB      $7D
        DB      $28
        DB      $7F
        DB      $28
        DB      $81
        DB      $28
        DB      $83
        DB      $28
        DB      $DD
        DB      $21
        DB      $91
        DB      $4E
        DB      $DD
        DB      $CB
        DB      $01
        DB      $7E
        DB      $C0
        DB      $FF
        DB      $5F
        DB      $91
        DB      $4E
        DB      $1A
        DB      $00
        DB      $92
        DB      $2A
        DB      $2A
        DB      $21
        DB      $4F
        DB      $CD
        DB      $6B
        DB      $20
        DB      $DD
        DB      $CB
        DB      $01
        DB      $FE
        DB      $C3
        DB      $69
        DB      $21
        DB      $DD
        DB      $21
        DB      $AB
        DB      $4E
        DB      $DD
        DB      $CB
        DB      $01
        DB      $7E
        DB      $C0
        DB      $FF
        DB      $5F
        DB      $AB
        DB      $4E
        DB      $1A
        DB      $00
        DB      $AC
        DB      $2A
        DB      $2A
        DB      $21
        DB      $4F
        DB      $CD
        DB      $63
        DB      $20
        DB      $CD
        DB      $72
        DB      $20
        DB      $CD
        DB      $64
        DB      $20
        DB      $DD
        DB      $CB
        DB      $01
        DB      $FE
        DB      $18
        DB      $DA
        DB      $DD
        DB      $21
        DB      $C5
        DB      $4E
        DB      $DD
        DB      $CB
        DB      $01
        DB      $7E
        DB      $C0
        DB      $FF
        DB      $5F
        DB      $C5
        DB      $4E
        DB      $1A
        DB      $00
        DB      $C6
        DB      $2A
        DB      $2A
        DB      $21
        DB      $4F
        DB      $CD
        DB      $72
        DB      $20
        DB      $CD
        DB      $6B
        DB      $20
        DB      $DD
        DB      $CB
        DB      $01
        DB      $FE
        DB      $18
        DB      $BA
        DB      $DD
        DB      $21
        DB      $DF
        DB      $4E
        DB      $DD
        DB      $CB
        DB      $01
        DB      $7E
        DB      $C0
        DB      $FF
        DB      $5F
        DB      $DF
        DB      $4E
        DB      $1A
        DB      $00
        DB      $E0
        DB      $2A
        DB      $2A
        DB      $21
        DB      $4F
        DB      $CD
        DB      $63
        DB      $20
        DB      $DD
        DB      $CB
        DB      $01
        DB      $FE
        DB      $18
        DB      $9D

; Next Address loaded in HL ??
L2B88:  DB      $0A
        DB      $2B
        DB      $28
        DB      $2B
        DB      $4B
        DB      $2B
        DB      $6B
        DB      $2B
        DB      $04
        DB      $9A
        DB      $04
        DB      $56
        DB      $10
        DB      $25
        DB      $01
        DB      $00
        DB      $00
        DB      $00
        DB      $50
        DB      $01
        DB      $00
        DB      $00
        DB      $00
        DB      $31
        DB      $01
        DB      $00
        DB      $00
        DB      $00
        DB      $00
        DB      $90
        DB      $2B
        DB      $FF
        DB      $01
        DB      $B0
        DB      $22
        DB      $01
        DB      $23
        DB      $18

;  Interrupt Service Routine #5
;  Triggered when base blowns up ??
L2BAE:  PUSH    IX
        POP     DE
        LD      HL,$2B94
        LD      BC,$001A
        LDIR    
        CALL    L2A0D
        LD      A,H
        AND     $0F
        BIT     7,H
        LD      H,A
        JR      Z,L2BC7
        CALL    L2072
L2BC7:  CALL    L2064
        CALL    L2A0D
        LD      A,$07
        AND     H
        LD      H,A
        CALL    L206B
        XOR     A
        SYSTEM  RANGED           ;  UPI RANGED random number
        ;
        AND     $03
        JR      NZ,L2BDF
        LD      (IX+$00),$20
L2BDF:  RET


L2BE0:  LD      A,($4F4A)
        LD      HL,$4FF3
        CP      (HL)
        JR      NZ,$2C09
        LD      HL,$4F4C
        DEC     (HL)
        JR      NZ,L2C07
L2BEF:  CALL    L291C
        LD      HL,$4FF3
        DEC     (HL)
        LD      A,(HL)
        LD      ($4F4A),A
        JP      P,L2BEF
        DI      
        SYSSUK  RECTAN           ;  UPI paint a RECTANgle
        DB      $2A              ;  ... X = 42
        DB      $13              ;  ... Y = 19
        DB      $46              ;  ... Width = 70
        DB      $28              ;  ... Height = 40
        DB      $00              ;  ... Color = 0
        ;
        SYSTEM  QUIT             ;  UPI QUIT cassette execution


L2C07:  LD      A,$FF
        INC     A
        LD      ($4F4A),A
        ADD     A,$10
        LD      ($4F15),A
        SYSSUK  FILL             ;  UPI FILL memory with data
        DW      $4000            ;  ... Memory Address = 16384
        DW      $0E60            ;  ... Byte Count = 3680
        DB      $00              ;  ... Data = 0
        ;
        SYSSUK  COLSET           ;  UPI COLors SET
        DW      COLORS           ;  ... Table Address = 8254
        ;
        XOR     A
        LD      ($4F1A),A
        LD      A,$10
        OUT     ($0C),A
        LD      B,$7F
L2C27:  PUSH    BC
        CALL    L2A0D
        POP     BC
L2C2C:  LD      HL,$0E5F
        OR      A
        SBC     HL,DE
        JR      NC,L2C3D
        LD      HL,$0E00
        EX      DE,HL
        SBC     HL,DE
        EX      DE,HL
        JR      L2C2C
L2C3D:  EX      DE,HL
        LD      A,B
        AND     $03
        LD      (HL),A
        DJNZ    L2C27
        CALL    L291C
        SYSSUK  STRDIS           ;  UPI STRing DISplay
        DB      $74              ;  ... X = 116
        DB      $4D              ;  ... Y = 77
        DB      $08              ;  ... Options = 8
        DW      $28A1            ;  ... String Address = 10401
        ;
        SYSSUK  DISNUM           ;  UPI DISplay NUMber
        DB      $84              ;  ... X = 132
        DB      $55              ;  ... Y = 85
        DB      $08              ;  ... Options = 8
        DB      $01              ;  ... Extended = 1
        DW      $4F4C            ;  ... Number Address = 20300
        ;
        LD      A,($4F4A)
        LD      ($4F4B),A
        SYSSUK  RECTAN           ;  UPI paint a RECTANgle
        DB      $40              ;  ... X = 64
        DB      $23              ;  ... Y = 35
        DB      $20              ;  ... Width = 32
        DB      $1B              ;  ... Height = 27
        DB      $00              ;  ... Color = 0
        ;
        SYSSUK  WRITR            ;  UPI WRITe RELATIVE
        DB      $4F              ;  ... X = 79
        DB      $28              ;  ... Y = 40
        DB      $40              ;  ... Magic = 64
        DW      L21AB            ;  ... Pattern Address = 8619
        ;
        SYSSUK  WRITR            ;  UPI WRITe RELATIVE
        DB      $50              ;  ... X = 80
        DB      $28              ;  ... Y = 40
        DB      $00              ;  ... Magic = 0
        DW      L21AB            ;  ... Pattern Address = 8619
        ;
        SYSSUK  WRITR            ;  UPI WRITe RELATIVE
        DB      $4F              ;  ... X = 79
        DB      $30              ;  ... Y = 48
        DB      $40              ;  ... Magic = 64
        DW      L218C            ;  ... Pattern Address = 8588
        ;
        SYSSUK  WRITR            ;  UPI WRITe RELATIVE
        DB      $50              ;  ... X = 80
        DB      $30              ;  ... Y = 48
        DB      $00              ;  ... Magic = 0
        DW      L218C            ;  ... Pattern Address = 8588
        ;
        SYSSUK  WRITR            ;  UPI WRITe RELATIVE
        DB      $58              ;  ... X = 88
        DB      $2B              ;  ... Y = 43
        DB      $60              ;  ... Magic = 96
        DW      L2256            ;  ... Pattern Address = 8790
        ;
        SYSSUK  MOVE             ;  UPI MOVE block transfer
        DW      $4E77            ;  ... Destination Address = 
        DW      26               ;  ... Byte Count = 26
        DW      L2971            ;  ... Source Address = 10609
        ;
        LD      A,$04
        LD      ($4F17),A
        LD      ($4F16),A
        LD      A,$80
        LD      ($4E78),A
        EI      
        SYSSUK  FILL             ;  UPI FILL memory with data
        DW      $4F2B            ;  ... Memory Address = 20267
        DW      $000A            ;  ... Byte Count = 10
        DB      $00              ;  ... Data = 0
        ;
        SYSTEM  RANGED           ;  UPI RANGED random number
        ;
        LD      A,($4F15)
        LD      C,A
        IN      A,(C)
        JR      Z,$2CA3
        SYSSUK  MOVE             ;  UPI MOVE block transfer
        DW      $4F3C            ;  ... Destination Address = 
        DW      $0004            ;  ... Byte Count = 4
        DW      $4FEF            ;  ... Source Address = 20463
        ;
        LD      HL,($4F4D)
        LD      A,H
        LD      ($4F3A),A
        RRCA    
        LD      H,A
        LD      ($4F36),HL
        LD      DE,$0070
        LD      L,H
        LD      H,$00
        ADD     HL,DE
        LD      ($4F21),HL
        LD      HL,$09C4
        LD      ($4F38),HL
        LD      A,$80
        LD      ($4F20),A
        LD      ($4F35),A
        LD      A,$05
        LD      ($4F3B),A
L2CDE:  XOR     A
        LD      HL,$4F2A
        CP      (HL)
        JR      NZ,$2CF5
        SYSTEM  RANGED           ;  UPI RANGED random number
        ;
        AND     $1F
        LD      (HL),A
        LD      A,($4F4F)
        RLA     
        ADD     A,(HL)
        LD      (HL),A
        CALL    $2A3C
        JR      $2D6E
        DEC     (HL)
        SYSTEM  RANGED           ;  UPI RANGED random number
        ;
        AND     $03
        LD      C,A
        LD      HL,$29E7
        LD      E,A
        LD      D,$00
        ADD     HL,DE
        LD      A,(HL)
        LD      ($4EF9),A
        LD      HL,L29DF
        LD      A,C
        RST     $08              ;  User ReStarT #1 of 6
        LD      ($4F08),DE
        LD      HL,$29EB
        LD      A,C
        RST     $08              ;  User ReStarT #1 of 6
        LD      ($4F06),DE
        LD      A,C
        INC     A
        LD      ($4F32),A
        LD      A,$18
        LD      ($4F12),A
        LD      A,$FF
        LD      ($4F0C),A
        LD      HL,$2301
        LD      ($4F10),HL
        LD      A,$01
        LD      ($4F0D),A
        LD      A,$04
        LD      ($4F30),A
        LD      A,$8C
        LD      ($4EFA),A
        RST     $20              ;  User ReStarT #4 of 6
        SYSSUK  MOVE             ;  UPI MOVE block transfer
        DW      $4F52            ;  ... Destination Address = 
        DW      5                ;  ... Byte Count = 5
        DW      L2153            ;  ... Source Address = 8531
        ;
        LD      A,($4F32)
        CALL    $211A
        LD      ($4F52),A
        SUB     $14
        LD      ($4F54),A
        SUB     $02
        OUT     ($17),A
        LD      HL,$2158
        CALL    L20FB
        XOR     A
        LD      ($4F2E),A
        SYSTEM  RANGED           ;  UPI RANGED random number
        ;
        AND     $07
        JR      Z,$2D6B
        LD      A,($4F20)
        RRA     
        LD      ($4F34),A
        OR      A
        JP      NZ,$2E01
        LD      A,($4F2E)
        OR      A
        JP      Z,$2DFE
        LD      A,($4F2B)
        OR      A
        JP      NZ,L2E2F
        CALL    $2143
        LD      A,($4E92)
        LD      B,A
        LD      A,($4EAC)
        OR      B
        LD      B,A
        LD      A,($4EC6)
        OR      B
        LD      B,A
        LD      A,($4EE0)
        OR      B
        BIT     7,A
        JR      NZ,$2D79
        LD      A,$01
        LD      ($4F2F),A
        XOR     A
        LD      ($4F2E),A
        LD      HL,$4EFA
        SET     7,(HL)
L2DA7:  LD      DE,$0107
        RST     $10              ;  User ReStarT #2 of 6
        LD      A,($4F2E)
        CP      $01
        JR      NZ,$2DF1
        DI      
        LD      A,($4F31)
        OR      A
        JR      Z,$2DE4
        LD      BC,$7F17
        OUT     (C),B
        DEC     A
        LD      HL,$0000
        BIT     0,A
        JR      Z,$2DD0
        LD      ($4F01),HL
        LD      HL,$4F00
        LD      (HL),$01
        JR      $2DD8
        LD      ($4EFC),HL
        LD      HL,$4F05
        LD      (HL),$01
        LD      HL,$2B02
        RST     $08              ;  User ReStarT #1 of 6
        LD      ($4F0A),DE
        LD      A,$1C
        OUT     ($15),A
        LD      HL,$4EFA
        SET     7,(HL)
        XOR     A
        LD      ($4F2E),A
        EI      
        JP      L2E2F


L2DF1:  CP      $02
        JP      Z,L2E2F
        LD      A,($4EFF)
        OUT     ($10),A
        XOR     A
        JR      Z,L2DA7
        LD      A,($4F20)
        LD      E,$07
        LD      D,A
        RST     $10              ;  user restart #2 of 6
L2E05:  LD      A,($4F30)
        BIT     2,A
        JR      NZ,L2E05
        LD      A,($4F34)
        OR      A
        JR      Z,L2E2A
        LD      A,($4F31)
        OR      A
        JR      Z,L2E2A
        DEC     A
        LD      HL,L2B88
        RST     $08              ;  user restart #1 of 6
        LD      HL,L2E23
        PUSH    HL
        EX      DE,HL
        JP      (HL)


; Next Address loaded in HL ??
L2E23:  DB      $3A
        DB      $34
        DB      $4F
        DB      $1E
        DB      $07
        DB      $57
        DB      $D7

L2E2A:  LD      A,$01
        LD      ($4F30),A
L2E2F:  LD      A,($4F2B)
        OR      A
        JR      NZ,L2E3C
        LD      A,($4EFA)
        AND     $80
        JR      NZ,L2E2F
L2E3C:  LD      A,($4F2B)
        OR      A
        JP      Z,L2CDE
        DI      
        LD      C,$0D
        LD      HL,$4E92
        LD      DE,$001A
        LD      A,C
        OR      (HL)
        LD      (HL),A
        ADD     HL,DE
        LD      A,C
        OR      (HL)
        LD      (HL),A
        ADD     HL,DE
        LD      A,C
        OR      (HL)
        LD      (HL),A
        ADD     HL,DE
        LD      A,C
        OR      (HL)
        LD      (HL),A
        ADD     HL,DE
        LD      A,C
        OR      (HL)
        LD      (HL),A
        LD      B,$14
        LD      A,($4F4C)
        LD      ($4FDB),A
        DEC     A
        JR      NZ,L2E6C
        LD      A,$20
L2E6C:  ADD     A,B
        LD      ($4FD7),A
        EI      
L2E71:  LD      IX,$4E91
        BIT     7,(IX+$01)
        JR      NZ,L2E80
        RST     $28              ;  User ReStarT #5 of 6
        SET     7,(IX+$01)
L2E80:  LD      IX,$4EAB
        BIT     7,(IX+$01)
        JR      NZ,L2E8F
        RST     $28              ;  User ReStarT #5 of 6
        SET     7,(IX+$01)
L2E8F:  LD      IX,$4EF9
        BIT     7,(IX+$01)
        JR      NZ,L2E9E
        RST     $28              ;  User ReStarT #5 of 6
        SET     7,(IX+$01)
L2E9E:  LD      IX,$4EC5
        BIT     7,(IX+$01)
        JR      NZ,L2EB0
        RST     $28              ;  User ReStarT #5 of 6
        CALL    L207C
        SET     7,(IX+$01)
L2EB0:  LD      IX,$4EDF
        BIT     7,(IX+$01)
        JR      NZ,L2EC2
        RST     $28              ;  User ReStarT #5 of 6
        CALL    L207C
        SET     7,(IX+$01)
L2EC2:  LD      IX,$4E77
        BIT     7,(IX+$01)
        JR      NZ,L2ED4
        RST     $28              ;  User ReStarT #5 of 6
        CALL    L207C
        SET     7,(IX+$01)
L2ED4:  LD      DE,$0107
        RST     $10              ;  User ReStarT #2 of 6
        LD      A,($4FD7)
        OR      A
        JR      NZ,L2E71
        LD      DE,$7007
        RST     $10              ;  User ReStarT #2 of 6
        XOR     A
        JP      Z,L2BE0
        LD      A,($4FD7)
        OR      A
        JR      Z,L2F08
        CALL    L20E7
        CALL    L2A0D
        LD      C,$11
        OUT     (C),L
        INC     C
        OUT     (C),H
        INC     C
        LD      A,E
        AND     $1F
        OUT     (C),A
        LD      A,D
        LD      ($4F1A),A
        AND     $0F
        INC     A
        JR      L2F0A


L2F08:  LD      A,$01
L2F0A:  LD      D,A
        LD      E,$06
        RST     $10             ;  User ReStarT #2 of 6
        XOR     A
        LD      ($4F1A),A
        SYSSUK  RANGED          ;  UPI RANGED random number
        DB      $10             ;  ... Cutoff = 16
        ;
        INC     A
        LD      E,$06
        LD      D,A
        RST     $10             ;  User ReStarT #2 of 6
        XOR     A
        JR      Z,$2EE6         ; This will ALWAYS jump since A just cleared ??


; MOVE the next 19 bytes to $4E63 
L2F1D:  DB      $01
        DB      $03
        DB      $0F
        DB      $00
        DB      $00
        DB      $00
        DB      $00
        DB      $00
        DB      $00
        DB      $8B
        DB      $29
        DB      $00
        DB      $00
        DB      $04
        DB      $29
        DB      $E6
        DB      $2E
        DB      $E0
        DB      $2B

; MOVE the next 8 bytes to $4FD5
L2F30:  DB      $00
        DB      $00
        DB      $00
        DB      $01
        DB      $00
        DB      $04
        DB      $00
        DB      $08

L2F38:  LD      A,$03            ; Sentry, Counter-Timer 3 has counted down
L2F3A:  LD      HL,$4E66
        RST     $08              ; User ReStarT #1 of 6
        LD      A,E
        OR      D
        JR      Z,L2F44
        EX      DE,HL
        JP      (HL)
L2F44:  RET     

L2F45   LD      A,$05           ; Sentry, Counter-Timer 5 has counted down
        JR      L2F3A
L2F49   LD      A,$06           ; Sentry, Counter-Timer 6 has counted down
        JR      L2F3A
L2F4D   LD      A,$07           ; Sentry, Counter-Timer 7 has counted down
        JR      L2F3A

; DOIT Table
L2F51   JMPD    SCT7, L2F4D, $00  ; Sentry, Counter-Timer 7 has counted down
        JMPD    SCT3, L2F38, $00  ; Sentry, Counter-Timer 3 has counted down
        JMPD    SCT5, L2F45, $00  ; Sentry, Counter-Timer 5 has counted down
        JMPD    SCT6, L2F49, $00  ; Sentry, Counter-Timer 6 has counted down
        DB      $C0               ; End of DOIT Table

; Starting on screen line 92, FILL for 252 bytes (6.3 lines)  
L2F5E   SYSSUK  FILL            ;  UPI FILL memory with data
        DW      $4E60           ;  ... Address to begin filling at
        DW      252             ;  ... Number of bytes to fill 
        DB      $00             ;  ... Data to fill with

        LD      DE,L2886        ; Address of "SPACE FORTRESS" menu text
        LD      A,92*2          ; Vertinal Blank on line 92   
        OUT     (VERBL),A       ; Write VERtical Blanking Line

;  Get Number of Players
;  Check that a valid amount of players was supplied (1-4).
;  Repeat getting the number of players until value is valid
L2F6C   DI      
        SYSSUK  GETPAR          ; UPI GET game PARameter from 
        DW      L0228           ; ... "# OF PLAYERS" Text String Address
        DB      1               ; ... Digits = 1
        DW      NUMPLY          ; ... Parameter Address = 
        ;
        DI      
        LD      A,(NUMPLY)      ; Get ready to reduce players by 1 
        DEC     A               ; Reduce number of players by 1 for compare
        LD      (NUMPLY),A      ; Store new number of players
        CP      $04             ; Number of players greater than 4?
        JR      NC,L2F6C        ; Too many players, get # of players again 

;  Get Number of Lives ("BASES")
;  Check that a valid amount of bases was supplied (1-9).
;  Repeat getting the number of bases until value is valid
L2F80   DI
        SYSSUK  GETPAR          ;  UPI GET game PARameter from 
        DW      L28A1           ;  ... "BASES" Text String Address
        DB      $01             ;  ... Digits = 1
        DW      LIVES           ;  ... Parameter Address = 
        ;
        LD      A,(LIVES)       ; Get ready to check number of bases 
        OR      A               ; Number of players = 0?  
        JR      Z,L2F80         ; If player enter zero, then try again 

;  Get Game Difficulty ("INTENSITY")
;  Check that a valid play intensity was supplied (1-9).
;  Repeat getting the play intensity until value is valid
L2F8E   DI
        SYSSUK  GETPAR          ;  UPI GET game PARameter from 
        DW      L2896           ; Address of "INTENSITY" menu text
        DB      $01             ;  ... Digits = 1
        DW      GAMDIF          ;  ... Parameter Address = 
        ;
        LD      A,(GAMDIF)      ; Get ready to validate Game Difficulty 
        OR      A               ; Game Difficulty = 0?
        JR      Z,L2F8E         ; If player enter zero, then try again
        
        LD      A,(GAMDIF)
        LD      ($4F4F),A
        RLA     
        SUB     $14
        NEG     
        LD      ($4F50),A
        XOR     A               ; Zero-Out Accumulator
        LD      HL,GAMDIF       
        RLD

        DI      
        LD      A,$FF
        LD      ($4F4A),A
        SYSSUK  MOVE            ;  UPI MOVE block transfer
        DW      $4E63           ;  ... Destination Address = 
        DW      19              ;  ... Number of bytes to transfer
        DW      L2F1D           ;  ... Source Address = 12061
        ;
        SYSSUK  MOVE            ;  UPI MOVE block transfer
        DW      $4FD5           ;  ... Destination Address = 
        DW      8               ;  ... Number of bytes to transfer
        DW      L2F30           ;  ... Source Address = 12080
        ;
        LD      A,$01
        LD      ($4F2C),A
        LD      A,$62
        LD      ($4F1A),A
        LD      A,$AA
        LD      ($4F13),A
        LD      ($4F14),A
        CALL    L2870

; 
        LD      HL,$1FA7
        LD      ($4FFD),HL      ; $4FFD is USER Table Base + routine = JumP address
        LD      HL,$1FE9   
        LD      ($4FFB),HL      ; $4FFB is User Mask ARGument Table + (routine / 2)
        LD      A,R
        AND     $1C
        LD      ($4F2A),A
L2FEE   LD      HL,L2FEE        ; $2FEE is current program counter address 
        PUSH    HL
        EI      

;  Call User's Macro Subroutine $80
;  Requires two inline arguments.
;  Loads E and D (in that order)  
L2FF3:  SYSSUK  $80             ; User's MACRO routine $80
        DB      $14             ; Inline argument for register E 
        DB      $02             ; Inline argument for register D
        ;
        SYSSUK  DOIT             ;  UPI DOIT table, branch to translation handler
        DW      L2F51            ;  ... Table Address = 12113
        ;
        RET

;
        DB      $53
        DB      $26
        DB      $42
        DB      $00

        END                     ; End of "SPACE FORTRESS" Game

-------------------------------------------------------------------------------

"Space Fortress"
Bally Professional Videocade Cartridge #2012
Game Instructions


BACKGROUND

     You command a lonely outpost far away in the galaxy.  The alert sounds.  
You're being attacked by alien ships from all directions.  You destroy some-- 
but they keep coming faster and faster.  You'll find Space Fortress positively 
addicting.  It always keeps your interest because of the increasing speed of 
the enemy assault from all sides.  Up to 4 players.

LOADING INSTRUCTIONS

     1.  Turn on your Bally Professional Arcade and TV set.  Select
         channel 3 or 4, whichever is least active in your area.

     2.  Connect the hand controls by inserting control #1 into the first 
         jack on the back left side (as you face the front of the Arcade).
         From left to right, the jacks connect to players 1, 2, 4 and 3.

     3.  Insert the game cartridge, label side up, into the cartridge slot.
         Press down firmly to lock it into position.

     4.  Press the RESET button to display the menu of games on the cartridge.


SPACE FORTRESS (1 to 4 players)

     Deep, deep in space lies a defense base designed to guard our home galaxy 
against enemy alien invasion.  Its powerful laser weaponry is our only hope for 
warding off enemy invasion.

STARTING THE GAME

     Choose Space Fortress by pressing 1 on the keypad or by using remote game 
selection (pull the trigger on hand control #1, turn the knob until 1 appears 
on the screen, then pull the trigger again).

     The same procedure enters the numbers of players (1-4), the number of 
bases (1-9), and the intensity of play (1-9).  As soon as one base is 
destroyed, another appears (when more than 1 is entered).  Warfare intensity 
becomes greater as the intensity number increases.

PLAYING THE GAME

     Press the trigger on the hand control to begin the game.  Instantly enemy 
ships appear, hurling deadly fire balls toward the fortress.

     Aim the laser gun by shifting the joystick on the hand control toward the 
enemy ship.  Fire the laser by pulling the trigger.  Direct fire explodes the 
ships and neutralizes fire balls.  Fire quickly before the fire ball hits and 
explodes the fortress.

     Successful defense provokes the aliens to launch more fire balls, 
providing little chance for retaliation.  Be warned; as the battle continues, 
tension mounts!

     Randomly, an alien kamikaze ship zooms in for direct attack on the 
fortress.  Shoot accurately or it will ram the fortress with its highly 
radioactive energy core.

     Once a base is destroyed, another appears (if you selected a number 
greater than 1 prior to beginning the game).  Once all the bases have been 
destroyed by each player, the game is over.

SCORING

     Points are scored as follows:

     Fire Ball      25  points
     Alien Ship     50  points
     Kamikaze Ship  150 points

     Points for each player are shown in the upper portion of the screen.  Play 
continues until all bases have been destroyed.  The player with the most points 
at the end of the game wins.

STRATEGIES FOR WINNING

     Aim and fire quickly or the fortress will be destroyed.

     Fire not only at the alien ships, but also at fire balls launched toward 
the fortress.

     Learn to anticipate where the next alien ship will appear, and always be 
prepared to fire.

     When a kamikaze ship appears, aim slightly ahead of the ship in the path 
it is following.

     By moving the joystick while shooting, shots can be fired in more than one 
direction with one pull of the trigger.

PLAYING AGAIN

     To play Space Fortress again, press the RESET button, and follow the 
instructions for starting the game.


Copyright (c)1981 Astrovision. Inc.  All Rights Reserved.

Astrovision Inc.
6460 Busch Blvd., Suite 215
Columbus, Ohio 43229

Made in U.S.A.
