Initial import. master
authorSimon Morgan <sjm@sjm.io>
Fri, 26 Jun 2015 17:05:10 +0000 (18:05 +0100)
committerSimon Morgan <sjm@sjm.io>
Fri, 26 Jun 2015 17:05:10 +0000 (18:05 +0100)
21 files changed:
PATCH.S [new file with mode: 0644]
SCOLON.S [new file with mode: 0644]
SDEF.S [new file with mode: 0644]
SGAME.S [new file with mode: 0644]
SGNDOBJ.S [new file with mode: 0644]
SGRAPH8.S [new file with mode: 0644]
SGRAPHA.S [new file with mode: 0644]
SGRAPHC.S [new file with mode: 0644]
SHSC.S [new file with mode: 0644]
SINIT.S [new file with mode: 0644]
SKERNEL.S [new file with mode: 0644]
SMAGIC.S [new file with mode: 0644]
SMCP.S [new file with mode: 0644]
SNILE.S [new file with mode: 0644]
SOBJ.S [new file with mode: 0644]
SPHINX.S [new file with mode: 0644]
SSCROBJ.S [new file with mode: 0644]
SSCROLL.S [new file with mode: 0644]
SSUBRS.S [new file with mode: 0644]
STUNES.S [new file with mode: 0644]
ZERODEF.S [new file with mode: 0644]

diff --git a/PATCH.S b/PATCH.S
new file mode 100644 (file)
index 0000000..c5a4d55
--- /dev/null
+++ b/PATCH.S
@@ -0,0 +1,290 @@
+;\r
+;      This is code that was added to finish up this game.  Instead\r
+;      of inserting code in other places, which could overflow banks,\r
+;      I JSR here.\r
+;\r
+;\r
+;===================================================\r
+;      Extra initialization when switching\r
+;      from title page to auto play screen.\r
+;===================================================\r
+;\r
+EXTRAINIT:\r
+       JSR     MCPINIT         ;Initialize master control.\r
+       RTS\r
+;\r
+;\r
+;============================================================\r
+;      Decrement power timer and change power color.\r
+;============================================================\r
+\r
+\r
+decTimer:\r
+       lda     #$38            ;Change color of power text to red.\r
+       sta     P1C2SHDB\r
+\r
+       dec     PTIMER\r
+       beq     .endPower\r
+\r
+       ldx     PLAYER\r
+       lda     PGPOWER,x\r
+       cmp     #9              ;Is the power warp?\r
+       beq     .flash          ;Always flash when warping.\r
+;\r
+       lda     PTIMER\r
+       cmp     #5              ;Time almost up?\r
+       bcs     .exit\r
+.flash:        lda     #$1F\r
+       sta     ROTATE          ;Start power text blinking.\r
+.exit: rts\r
+;\r
+.endPower:\r
+       JSR     CLRPFLGS        ;CLEAR TIMED POWER FLAGS\r
+       jsr     powerOff        ;Clear power text.\r
+       rts\r
+;\r
+;\r
+;=======================================================\r
+;      Make some powers automatic, user doesn't\r
+;      have to press the right button to invoke.\r
+;=======================================================\r
+;\r
+; Called from SGAME.S just before the right button is read.\r
+;\r
+;   IN:        PLAYER = player number.\r
+;      PGPOWER = current power waiting to be selected.\r
+;      ptCount = number of times left to increment score.\r
+;\r
+;  OUT:        Carry clear to continue (check fire button).\r
+;      Carry set to act like right button was selected.\r
+;\r
+autoPower:\r
+\r
+       ldx     PLAYER          ;Get player number.\r
+       lda     PGPOWER,x       ;Is there a power waiting?\r
+       beq     exit\r
+       cmp     #2              ;Is the power POINTS?\r
+       bne     next1\r
+\r
+\r
+; --- Auto POINTS -------------------------------------------------------\r
+\r
+       lda     ptCount         ;Have I already started adding score?\r
+       bne     cont1\r
+\r
+       lda     #50             ;Add ten points 50 times.\r
+       sta     ptCount\r
+\r
+cont1: lda     #10             ;Add ten points to score.\r
+       sta     TENS\r
+       jsr     ADDSCORE\r
+       jmp     doAuto2\r
+\r
+\r
+; --- Other Auto powers -----------------------------------------------\r
+\r
+next1: cmp     #7              ;Extra bonus power?\r
+       beq     doAuto\r
+\r
+       cmp     #18             ;Slowdown power?\r
+       beq     doAuto\r
+\r
+       cmp     #1              ;Extra life power?\r
+       beq     doAuto\r
+\r
+       cmp     #19             ;Random power?\r
+       beq     doAuto\r
+\r
+       cmp     #12             ;Can't hop power?\r
+       beq     doAuto\r
+\r
+       cmp     #13             ;Can't swim power?\r
+       beq     doAuto\r
+\r
+       cmp     #14             ;Can't fly power?\r
+       bne     exit\r
+\r
+doAuto:        \r
+       lda     ptCount\r
+       bne     doAuto2\r
+       lda     #40\r
+       sta     ptCount\r
+doAuto2:\r
+       dec     ptCount\r
+       bne     exit\r
+       sec                     ;Act like right button was pressed\r
+       rts\r
+\r
+exit:  clc                     ;else, continue as normal.\r
+       rts\r
+\r
+\r
+;===================================================================\r
+;      Allow only certain power in certain rounds and levels.\r
+;===================================================================\r
+;\r
+;   IN:        a = desired power index.\r
+;      DIFCULTY = 0 for novice, 1 for standard, 2 for advanced, 3 for expert.\r
+;      RACK = round number (0 is the first round).\r
+;\r
+;  OUT:        a = allowed power.\r
+;      x = same as in (saved).\r
+;      y = same as in (saved).\r
+;\r
+maskPower:\r
+       stx     saveX\r
+       sty     saveY\r
+       pha\r
+\r
+       ldx     PLAYER\r
+       lda     #0              ;Turn off any current power.\r
+       sta     PTIMER\r
+       sta     PGPOWER,x\r
+\r
+       lda     RACK,x\r
+       tax\r
+       pla\r
+       cpx     #4              ;Allow everything in rounds 4 and above.\r
+       bcs     .exit\r
+\r
+       asl                     ;Given power times 4 to access tables,\r
+       asl\r
+       ora     DIFCULTY        ;plus diffculty.\r
+       tay\r
+\r
+       txa                     ;Which table to access?\r
+       bne     .next1\r
+\r
+; --- Round 1 --------------\r
+\r
+       lda     #0              ;Reset help timer while here.\r
+       sta     helpTime\r
+\r
+       lda     Table1,y\r
+       jmp     .exit\r
+\r
+; --- Round 2 --------------\r
+\r
+.next1:        cmp     #1\r
+       bne     .next2\r
+\r
+       lda     Table2,y\r
+       jmp     .exit\r
+\r
+; --- Round 3 --------------\r
+\r
+.next2:        lda     Table3,y        \r
+\r
+\r
+.exit: ldx     saveX\r
+       ldy     saveY\r
+       rts\r
+\r
+; Mask powers for round one:\r
+;\r
+;      Form of table:\r
+;              novice,standard,advanced,expert\r
+Table1:\r
+       .dc.b   0,0,0,0         ;Never happens.\r
+       .dc.b   21,21,21,21     ;Extra life.\r
+       .dc.b   2,2,2,2         ;Points.\r
+       .dc.b   8,8,3,3         ;Air bombs.\r
+       .dc.b   15,15,15,15     ;Kill Minis.\r
+       .dc.b   22,22,22,22     ;Kill pots.\r
+       .dc.b   6,6,6,6         ;Kill sphinx.\r
+       .dc.b   7,7,7,7         ;Extra bonus time.\r
+       .dc.b   8,8,8,8         ;Kill uwes.\r
+       .dc.b   20,20,9,9       ;Warp.\r
+       .dc.b   22,22,22,10     ;Air freeze.\r
+       .dc.b   11,11,11,11     ;Decoy.\r
+       .dc.b   2,2,12,12       ;Can't hop.\r
+       .dc.b   2,2,13,13       ;Can't swim.\r
+       .dc.b   2,2,14,14       ;Can't fly.\r
+       .dc.b   15,15,15,15     ;Paralize sphinx.\r
+       .dc.b   21,21,21,16     ;Hover.\r
+       .dc.b   8,8,17,17       ;Afterburner.\r
+       .dc.b   18,18,18,18     ;Slowdown.\r
+       .dc.b   19,19,19,19     ;Random hieros.\r
+       .dc.b   20,20,20,20     ;Kill everything.\r
+       .dc.b   21,21,21,21     ;Supersonic shots.\r
+       .dc.b   22,22,22,22     ;Invincibility.\r
+\r
+\r
+\r
+; Mask powers for round two:\r
+;\r
+;      Form of table:\r
+;              novice,standard,advanced,expert\r
+Table2:\r
+       .dc.b   0,0,0,0         ;Never happens.\r
+       .dc.b   21,21,21,21     ;Extra life.\r
+       .dc.b   2,2,2,2         ;Points.\r
+       .dc.b   3,3,3,3         ;Air bombs.\r
+       .dc.b   15,15,15,15     ;Kill Minis.\r
+       .dc.b   5,5,5,5         ;Kill pots.\r
+       .dc.b   6,6,6,6         ;Kill sphinx.\r
+       .dc.b   7,7,7,7         ;Extra bonus time.\r
+       .dc.b   8,8,8,8         ;Kill uwes.\r
+       .dc.b   9,9,9,9         ;Warp.\r
+       .dc.b   22,22,10,10     ;Air freeze.\r
+       .dc.b   11,11,11,11     ;Decoy.\r
+       .dc.b   2,2,12,12       ;Can't hop.\r
+       .dc.b   2,2,13,13       ;Can't swim.\r
+       .dc.b   2,2,14,14       ;Can't fly.\r
+       .dc.b   15,15,15,15     ;Paralize sphinx.\r
+       .dc.b   21,21,16,16     ;Hover.\r
+       .dc.b   17,17,17,17     ;Afterburner.\r
+       .dc.b   18,18,18,18     ;Slowdown.\r
+       .dc.b   19,19,19,19     ;Random hieros.\r
+       .dc.b   20,20,20,20     ;Kill everything.\r
+       .dc.b   21,21,21,21     ;Supersonic shots.\r
+       .dc.b   22,22,22,22     ;Invincibility.\r
+\r
+\r
+\r
+; Mask powers for round three:\r
+;\r
+;      Form of table:\r
+;              novice,standard,advanced,expert\r
+Table3:\r
+       .dc.b   0,0,0,0         ;Never happens.\r
+       .dc.b   1,1,1,1         ;Extra life.\r
+       .dc.b   2,2,2,2         ;Points.\r
+       .dc.b   3,3,3,3         ;Air bombs.\r
+       .dc.b   4,4,4,4         ;Kill Minis.\r
+       .dc.b   5,5,5,5         ;Kill pots.\r
+       .dc.b   6,6,6,6         ;Kill sphinx.\r
+       .dc.b   7,7,7,7         ;Extra bonus time.\r
+       .dc.b   8,8,8,8         ;Kill uwes.\r
+       .dc.b   9,9,9,9         ;Warp.\r
+       .dc.b   21,10,10,10     ;Air freeze.\r
+       .dc.b   11,11,11,11     ;Decoy.\r
+       .dc.b   2,12,12,12      ;Can't hop.\r
+       .dc.b   2,13,13,13      ;Can't swim.\r
+       .dc.b   2,14,14,14      ;Can't fly.\r
+       .dc.b   15,15,15,15     ;Paralize sphinx.\r
+       .dc.b   21,16,16,16     ;Hover.\r
+       .dc.b   17,17,17,17     ;Afterburner.\r
+       .dc.b   18,18,18,18     ;Slowdown.\r
+       .dc.b   19,19,19,19     ;Random hieros.\r
+       .dc.b   20,20,20,20     ;Kill everything.\r
+       .dc.b   21,21,21,21     ;Supersonic shots.\r
+       .dc.b   22,22,22,22     ;Invincibility.\r
+\r
+;\r
+;======================================\r
+;      Check if an auto power.\r
+;======================================\r
+;\r
+;   IN:        y = power number.\r
+;\r
+;  OUT:        Equal flag TRUE if auto power.\r
+;\r
+checkAuto:\r
+;\r
+       lda     autoTable-1,y\r
+       rts\r
+;\r
+autoTable:\r
+       .dc.b   0,0,1,1,1,1,0,1,1,1,1,0,0,0,1,1,1,0,0,1,1,1\r
+;\r
diff --git a/SCOLON.S b/SCOLON.S
new file mode 100644 (file)
index 0000000..f8792cb
--- /dev/null
+++ b/SCOLON.S
@@ -0,0 +1,208 @@
+********  SCOLON.S    COLLISION SHIT\r
+\r
+       org     $D000\r
+\r
+*         IGNORE THE FOLLOWING DOCUMENTATION ITS ALL BEEN CHANGED\r
+*\r
+* SUBROUTINE TO DETECT COLLISIONS\r
+*\r
+* THIS ROUTINE TAKES A POINT AS INPUT (COLPX,COLPY,COLPZ) AND COMPARES IT TO\r
+* ALL OF THE BOXES STORED IN THE COLLISIN TABLES.  IF IT FINDS AN ACTIVE BOX\r
+* THAT CONTAINS THE PASSED POINT, THEN THE COLSTAT OF THE OBJECT IS RETURNED.\r
+* THIS IS THE OBJECT TABLE INDEX OF THE BOXES CORRESPONDING OBJECT ON THE SCREEN\r
+* CARE MUST BE TAKEN HERE ON BOUNDARIES OF THE COLLISION RANGES.\r
+* CURRENTLY, THE BIRD ITS SHOTS ARE NOT IN THE TABLES TO AVOID REDUNDANT CHECKS.\r
+*\r
+\r
+BUFZONE   EQU     15                     ; CUTOFF FOR PUNTING\r
+\r
+COLDET:   BIT     GCOARSE                ;NO COLLIISION DETECT ON COARSE SCROLL\r
+          BPL     COLDTNC\r
+          JMP     PUNTCOL\r
+\r
+COLDTNC:  STX     TEMPX                  ;SAVE INDEX OF OBJECT BEING TESTED\r
+          LDA     DXTBL,X                ;GET DC OF OBJECT BEING TESTED\r
+          SEC\r
+          SBC     #BUFZONE               ; BUFFER ZONE\r
+          STA     JTEMP\r
+\r
+COLOOP1:  LDA     RLTBL,X                ;GET RIGHT LINK\r
+          BMI     NEXLOOP                ;END OF LIST SO GO OTHER DIRECTION\r
+          TAX\r
+          LDA     DFTBL,X                ;GET DF OF POTENTIALLY COLLIDING OBJECT\r
+          CMP     JTEMP\r
+          BCC     NEXLOOP                ;WE'RE DONE GOING RIGHT\r
+\r
+          CPX     #ZREF0                 ;DON'T ATTEMPT TO DO COLLISION ON REF.\r
+          BCS     COLOOP1                ;POINT\r
+\r
+;DBG1:\r
+          LDA     COLSTAT,X\r
+          BEQ     COLOOP1\r
+\r
+          LDA     COLPZ                  ;CHECK EXTENTS\r
+          CMP     COLZ1,X\r
+          BCC     COLOOP1\r
+          CMP     COLZ2,X\r
+          BCS     COLOOP1\r
+\r
+          LDA     COLPX\r
+          CMP     COLX1,X\r
+          BCC     COLOOP1\r
+          CMP     COLX2,X\r
+          BCS     COLOOP1\r
+\r
+          LDA     COLPY\r
+          CMP     COLY1,X\r
+          BCC     COLOOP1\r
+          CMP     COLY2,X\r
+          BCS     COLOOP1\r
+\r
+          LDA     COLSTAT,X              ;YES A COLLISION SO RETURN WITH\r
+          RTS                            ;INDEX IN X AND ID IN ACCUMULATOR\r
+\r
+\r
+\r
+NEXLOOP:  LDX     TEMPX                  ;RETRIEVE INDEX OF OBJECT TO BE TESTED\r
+          LDA     DFTBL,X                ;GET DF OF OBJECT BEING TESTED\r
+          CLC\r
+          ADC     #BUFZONE               ; BUFFER ZONE\r
+          BCC     ZADDOK\r
+          LDA     #$FF                   ; DON'T LET IT WRAP AROUND\r
+ZADDOK:   STA     JTEMP\r
+COLOOP2:  LDA     LLTBL,X                ;NOW GO DOWN THE LEFT LINKS\r
+          TAX\r
+          CMP     #ZREF0                 ;ON REFERENCE POINT GO TO NEXT ITEM\r
+          BCS     COLOOP2\r
+          CMP     #LASTPNT               ;END POINT TO THE LEFT\r
+          BCS     PUNTCOL                ;\r
+          LDA     JTEMP                  ; DF OF OBJECT BEING TESTED + 10\r
+          CMP     DXTBL,X\r
+          BCC     PUNTCOL\r
+\r
+DBG2:\r
+          LDA     COLSTAT,X\r
+          BEQ     COLOOP2\r
+\r
+          LDA     COLPZ                  ;CHECK EXTENTS\r
+          CMP     COLZ1,X\r
+          BCC     COLOOP2\r
+          CMP     COLZ2,X\r
+          BCS     COLOOP2\r
+\r
+          LDA     COLPX\r
+          CMP     COLX1,X\r
+          BCC     COLOOP2\r
+          CMP     COLX2,X\r
+          BCS     COLOOP2\r
+\r
+          LDA     COLPY\r
+          CMP     COLY1,X\r
+          BCC     COLOOP2\r
+          CMP     COLY2,X\r
+          BCS     COLOOP2\r
+\r
+          LDA     COLSTAT,X              ;PUT ID OF COLLIDED OBJECT IN ACC.\r
+          RTS\r
+\r
+PUNTCOL:  LDA     #0\r
+          RTS\r
+\r
+; THIS ROUTINE CHECKS TO SEE IF THE BIRD IS OVER A HIEROGLYPH\r
+\r
+HIERODET: LDX     #ZREF0                 ; START FROM REF PNT WITH DX = FC\r
+HIEROLP:  LDA     LLTBL,X                ; AND SEARCH LEFT\r
+          BMI     PUNTCOL                ; PUNT IF AT END\r
+\r
+          TAX\r
+          LDA     DXTBL,X\r
+          CMP     #$FF\r
+          BNE     HIEROLP                ; ONLY CHECK HIERO'S\r
+\r
+          LDA     #ZBIRDZ+3              ;CHECK EXTENTS\r
+          CMP     COLZ1,X\r
+          BCC     HIEROLP\r
+          CMP     COLZ2,X\r
+          BCS     HIEROLP\r
+\r
+          LDA     XTBL+ZBIRD\r
+          CMP     COLX1,X\r
+          BCC     HIEROLP\r
+          CMP     COLX2,X\r
+          BCS     HIEROLP\r
+\r
+          LDA     COLSTAT,X              ;PUT ID OF COLLIDED OBJECT IN ACC.\r
+          RTS\r
+\r
+*\r
+* SUBROUTINE TO FIND THE CHARACTER NUMBER CORRESPONDING TO X AND Z\r
+*         X = OBJECT INDEX\r
+*         A = Z OFFSET FROM REFERENCE POINT\r
+*         THE RESULT IS RETURNED IN A\r
+*\r
+\r
+GRNDTYPE:\r
+          STA     TEMP4\r
+          STX     TEMP3\r
+          LDA     VPTBL,X\r
+GRNDFLO:  CMP     #SCRENBOT+1\r
+          BCS     GRACEFUL\r
+          STY     TEMP5                  ;PRESERVE Y\r
+\r
+          SEC\r
+          SBC     TEMP4\r
+          SEC                            ;THIS CALCULATES ZONE NUMBER FROM VP\r
+          SBC     ZONEOFF                ;WHICH IS CORRECTED BY ZOFFSET\r
+          CLC\r
+          ADC     #18                    ;14 FROM LOADER PLUS 4 TO GET TO\r
+          CLC                            ;BOTTOM OF STAMP\r
+          ADC     YTBL,X\r
+\r
+\r
+          LSR     \r
+          LSR     \r
+          LSR     \r
+          LSR                           ;ZONE NUMBER\r
+          TAX                            ;PUT ZONE NUMBER INTO X\r
+\r
+          LDA     HIBYE,X                ;USE ZONE NUMBER TO FIND DISPLAY LIST\r
+          STA     PTR0+1                 ;HIGH BYTE OF DLIST\r
+          LDX     #0                     ;CHARACTER MAP IS AT BEGINNING, SO\r
+          STX     PTR0                   ;LOW BYTE OF DLIST IS 0\r
+\r
+          LDA     (PTR0,X)               ;READ CHAR MAP POINTER FROM DLIST\r
+          STA     PTR1                   ;LOW BYTE OF CHAR MAP\r
+          LDY     #2\r
+          LDA     (PTR0),Y\r
+          STA     PTR1+1                 ;HIGH BYTE OF CHAR MAP\r
+\r
+          LDX     TEMP3\r
+;         LDA     XTBL,X                 ;THIS IS X+Z\r
+ ;        CLC\r
+  ;       ADC     ZTBL,X\r
+     ;    CLC\r
+      ;   ADC     #-NUMBER\r
+\r
+          LDA     HPTBL,X\r
+          CLC\r
+          ADC     TEMP4                  ;ZOFFSET\r
+          CLC\r
+          ADC     #$9\r
+\r
+          CLC\r
+          ADC     JERKOFF                ;HPOS CORRECTED BY SCROLL\r
+\r
+          LSR                           ;DIVIDE BY EIGHT TO GET CHAR NUMBER\r
+          LSR     \r
+          LSR     \r
+          TAY                            ;CHAR NUMBER\r
+\r
+          LDA     (PTR1),Y               ;CHAR VALUE\r
+          LDY     TEMP5\r
+          RTS\r
+\r
+GRACEFUL:\r
+          LDA     #0                     ;GUARANTEED LAND CHAR EXIT\r
+          RTS\r
+\r
+;          END\r
diff --git a/SDEF.S b/SDEF.S
new file mode 100644 (file)
index 0000000..32013bc
--- /dev/null
+++ b/SDEF.S
@@ -0,0 +1,344 @@
+;      Desert Falcon - SDEF.S\r
+\r
+       .subttl "RAM allocation."\r
+\r
+\r
+          ORG     $1800\r
+\r
+DL0:      .ds.b     80      ;80             ;DISPLAY LIST ZERO\r
+\r
+PL1MAP:   .ds.b     10                     ;PLAYER 1 SCORE\r
+TOPMSMAP: .ds.b     20                     ;TOP OF MESSAGE MAP\r
+PL2MAP:   .ds.b     10      ;40             ;PLAYER 2 SCORE\r
+\r
+SWIMMING: .ds.b     1                      ;BIT 7 HIGH IF SWIMMING\r
+SPNCNT:   .ds.b     1                      ;DELAY BETWEEN SPAWNINGS\r
+RESERVD:  .ds.b     1       ;3              ;OBJ SLOTS RESERVED\r
+\r
+SHOTSTAT: .ds.b     4                      ;STATUS OF SHOTS\r
+SCRLLCNT: .ds.b     1                      ;SCROLL COUNTER\r
+OSCRLCNT: .ds.b     1       ;6              ;OLD SCROLL COUNTER\r
+\r
+LEFTBUT:  .ds.b     2                      ;LEFT BUTTON SOFTWARE REGISTER\r
+RIGHTBUT: .ds.b     2                      ;RIGHT BUTTON SOFTWARE REGISTER\r
+ONEBUT:   .ds.b     1                      ;BITS 2-4? SET IFF ONE-BUTTON JOYSTICK\r
+ETIMER:   .ds.b     1                      ;EAST JOYSTICK MOVEMENT TIMER\r
+WTIMER:   .ds.b     1                      ;WEST JOYSTICK MOVEMENT TIMER\r
+TITCNT:   .ds.b     1                      ;TITLE PAGE COUNTER FOR FRAMES SORTA\r
+STIMER:   .ds.b     1                      ;SELECT TIMER\r
+OTIMER:   .ds.b     1       ;10             ;OVERALL SELECT TIMER\r
+\r
+P5C2SHAD: .ds.b     1                      ;SHADOWS FOR PALETTES OF BOTTOM OF\r
+P1C2SHAD: .ds.b     1                      ;SCREEN DISPLAY\r
+P2C2SHAD: .ds.b     1\r
+P0C2SHAD: .ds.b     1\r
+P1C2SHDB: .ds.b     1\r
+GRMCPCNT: .ds.b     1\r
+\r
+TAKEOVER: .ds.b     1                      ;ARE THESE NEEDED ANYMORE GUYS\r
+ROLLER:   .ds.b     1\r
+WHTUWANT: .ds.b     1\r
+SCRFLAG:  .ds.b     1                      ;FLAG FROM MAINLOOP TO TALK TO INTERR.\r
+MINITBL:  .ds.b     6                      ;MINI SPHINX INDEX TABLE\r
+MINIOVER: .ds.b     6       ;16             ;MINI SPHINX OVERLAY SLOT TABLE\r
+\r
+PTRTBLLO: .ds.b     4                      ;LOOKAHEAD CHAR MAP POINTERS\r
+PTRTBLHI: .ds.b     4                      ; " "\r
+STUFFDEX: .ds.b     1                      ;INDEX IN POINTER TABLE USED TO STUFF\r
+LOADFDEX: .ds.b     1                      ;INDEX IN PTR TABLE USED TO LOAD FROM\r
+LEFTMASK: .ds.b     4                      ;LEFT SIDE OF CHAR MAP MASK\r
+MIDMASK:  .ds.b     4                      ;MIDDLE OF CHAR MAP MASK\r
+RIGTMASK: .ds.b     4       ;22             ;RIGHT SIDE OF CHAR MAP MASK\r
+\r
+HSLSTEXP: .ds.b     4                      ;HSC DIF LEVEL FLAGS 0 MEANS PRESENT\r
+HSCIN:    .ds.b     1                      ;HSC IN FLAG 0 = NOT PRESENT\r
+DIFNAM:   .ds.b     26      ;31             ;TEMPORARY HSC RAM: DIF NAME 26 BYTES\r
+\r
+STATIMER: .ds.b     1                      ;STATE TIMER\r
+JOYCNT:   .ds.b     1                      ;DELAY ON READING JOYSTICK\r
+DEATH:    .ds.b     1                      ;FLAG FOR DEAD BIRD\r
+IOSIM:    .ds.b     1                      ;JOYSTICK SIMULATION BYTE FOR AUTOPLAY\r
+PERIOD:   .ds.b     1                      ;USED BY FREEZE FRAMER\r
+HOWMANY:  .ds.b     1                      ;USED BY FREEZE FRAMER\r
+NEXFRAME: .ds.b     1                      ;WHAT THE FUCK???\r
+FREE:     .ds.b     1                      ;COUNT OF FREE SLOTS\r
+GSCRFLAG: .ds.b     1                      ;FLAG FOR MAINLOOP, SAYING WE SCROLLED\r
+GCOARSE:  .ds.b     1                      ;MORE SCROLLING FLAGS FOR THE MASSES\r
+FUCKFLAG: .ds.b     1       ;11             ;WHO THE FUCK KNOWS!\r
+\r
+TRDSPFLG: .ds.b     1       ;1              ;0 = DON'T DISPLAY, <> 0 = DISPLAY\r
+\r
+ROTATE:   .ds.b     1                      ;ROTATE HIERO DISPLAY COUNTER\r
+\r
+          .ds.b     1                      ;UNUSED\r
+BNSTIMER: .ds.b     1                      ;CURRENT TIMER VALUE FOR B RACK\r
+BNSTIME:  .ds.b     2                      ;PLAYER'S TIME FOR UPCOMING B RACK\r
+BNSHTHS:  .ds.b     1                      ;SCORE FOR BONUS RACK\r
+BNSHUNDS: .ds.b     1\r
+BNSTENS:  .ds.b     1       ;7\r
+SECOND:   .ds.b     1                      ;COUNTER\r
+TUNREPT0: .ds.b     1                      ;TUNE REPEAT COUNTER\r
+TUNREPT1: .ds.b     1                      ;TUNE REPEAT COUNTER\r
+SPHNXNSX: .ds.b     1                      ;SPHINX NOSE X POSITION\r
+SEXP1:    .ds.b     1                      ;SPHINX EXPLOSION INDEX\r
+SEXP2:    .ds.b     1                      ;SPHINX EXPLOSION INDEX\r
+SEXP3:    .ds.b     1                      ;SPHINX EXPLOSION INDEX\r
+WARP:     .ds.b     1                      ;WARP POWER FLAG\r
+ptCount:       .ds.b   1       ;Point counter for decrementing.\r
+saveX:         .ds.b   1       ;Save x register.\r
+saveY:         .ds.b   1       ;Save y register.\r
+helpTime:      .ds.b   1       ;Timer for switching in "R BUTTON" message.\r
+\r
+ENDRAM18:                      ;253 used, 5 left free.\r
+\r
+MININUMB  EQU     6\r
+\r
+          ORG     $1900\r
+DL1:      .ds.b     80                     ;DISPLAY LIST 1\r
+COLSTAT:  .ds.b     63                     ;COLLISION STATUSES\r
+COLX1:    .ds.b     63                     ;COLLISION X'S\r
+\r
+SWCHBIO:  .ds.b     1                      ;CURRENT SWCHB IO STATE\r
+OLDSWCHB: .ds.b     1                      ;OLD SWCHB\r
+\r
+WAITCNT:  .ds.b     1                      ;WAIT COUNTER\r
+WAVECNT:  .ds.b     1                      ;WAVE PROGRAM COUNTER\r
+WAITING:  .ds.b     1                      ;WAIT COUNTER\r
+\r
+PARAM:    .ds.b     1                      ;PARAMETER VALUE FOR MICROROUTINES\r
+SPNCLASS: .ds.b     1                      ;CLASS OF FLEA\r
+\r
+SPNX:     .ds.b     1                      ;SPAWN X COORD\r
+SPNY:     .ds.b     1\r
+SPNZ:     .ds.b     1                      ;UPDATE THIS GUYS???\r
+\r
+VRUN:     .ds.b     2                      ;VOLUME RUN LENGTH\r
+\r
+DBK0:     .ds.b     2                      ;THESE ARE FOR RUNNING THE BACKGROUND\r
+TBINDX0:  .ds.b     2                      ;TUNE IN THE BACKGROUND\r
+CBINDX0:  .ds.b     2\r
+VBINDX0:  .ds.b     2\r
+VBRUN:    .ds.b     2\r
+\r
+ENDCOUNT:      .ds.b   1       ;Counter that waits for end of game tune.\r
+;\r
+ENDRAM19:         ;219,39 TTL,LEFT\r
+\r
+\r
+          ORG     $1A00\r
+DL2:      .ds.b     80                     ;DISPLAY LIST 2\r
+\r
+COLY1:    .ds.b     63                     ;COLLISION Y'S\r
+COLY2:    .ds.b     63                     ;COLLISON Y EXTENTS\r
+UWESTATE: .ds.b     3                      ;UWESTATES  (SEE UWE DRIVER FOR SPECS.)\r
+UWEOK:    .ds.b     1                      ;CAN WE BRING OUT A UWE?\r
+WANIMCNT: .ds.b     3\r
+UWETYPE:  .ds.b     3                      ;DESIGNATES DIFFICULTY OF UWE\r
+FLEATYPE: .ds.b     8                      ;FLEA TYPE AND SUBTYPE\r
+FXRUN:    .ds.b     8                      ;X VELOCITY\r
+FYRUN:    .ds.b     8                      ;Y    "\r
+FZRUN:    .ds.b     8                      ;Z    "\r
+FLEACNT:  .ds.b     8                      ;TIMERS\r
+ENDRAM1A:         ;256,0 TTL,LEFT\r
+\r
+\r
+          ORG     $1B00\r
+DL3:      .ds.b     80                     ;DISPLAY LIST 3\r
+\r
+COLZ1:    .ds.b     63                     ;COLLISION Z'S\r
+COLZ2:    .ds.b     63                     ;COLLISON Z EXTENTS\r
+PL1LVMAP: .ds.b     10                     ;PLAYER 1 LIVES MAP\r
+BOTMSMAP: .ds.b     20                     ;BOTTOM OF MESSAGE MAP\r
+PL2LVMAP: .ds.b     10                     ;PLAYER 2 LIVES MAP\r
+SPHXSHTD: .ds.b     1                      ;SPHINX SHOT DELAY\r
+SXSHTSTT: .ds.b     4                      ;SPHINX SHOT TABLE\r
+SHOTDEL:  .ds.b     4                      ;SPHINX SHOT TABLE AGAIN\r
+HIEROSLT: .ds.b     1                      ;SLOT NUMBER OF HIERO BEING ANIMATED\r
+\r
+ENDRAM1B:         ;256,0 TTL,LEFT\r
+\r
+\r
+          ORG     $1C00\r
+DL4:      .ds.b     80                     ;DISPLAY LIST 4\r
+\r
+SHTBL:    .ds.b     84                     ;HI BYTE OF GRAPHICS.  MIGHT BE ROMMED\r
+DXTBL:    .ds.b     84                     ;Z-X+100'S FOR LOADER\r
+LOWFACE:  .ds.b     1                      ;INDEX OF BOTTOM OF SPHINX FACE\r
+HIFACE:   .ds.b     1                      ;INDEX OF TOP OF SPHINX FACE\r
+FACER:    .ds.b     1                      ;SPHINX FACE ANIMATION\r
+PHASE:    .ds.b     1                      ;0=NORMAL,+=BATTLE,-=BONUS\r
+ENDRAM1C:         ;252,4 TTL,LEFT\r
+\r
+\r
+          ORG     $1D00\r
+DL5:      .ds.b     80                     ;DISPLAY LIST 5\r
+\r
+SMTBL:    .ds.b     84                     ;MAX HIGH BYTE OF GRAPHICS FOR LOADER\r
+                                         ;REF PTS. MIGHT NOT HAVE VALUES HERE\r
+\r
+STAMPID:  .ds.b     10                     ;SCROLLING OBJECT BUFFERS\r
+HPOS:     .ds.b     10\r
+ZONESBK:  .ds.b     10\r
+FRBUFSTK: .ds.b     10                     ;STACK OF FREE BUFFER LOCATIONS\r
+FRBUFPTR: .ds.b     1                      ;STACK POINTER\r
+\r
+FIRENUMB  EQU     6                      ;NUMBER OF FIREPOT SLOTS\r
+FIRETIP:  .ds.b     FIRENUMB\r
+FIRECOL1: .ds.b     FIRENUMB\r
+FIRECOL2: .ds.b     FIRENUMB\r
+FIREANIM: .ds.b     FIRENUMB\r
+FIREHGHT: .ds.b     FIRENUMB\r
+FIREGOAL: .ds.b     FIRENUMB\r
+FIREMODE: .ds.b     FIRENUMB\r
+ENDRAM1D:         ;247,9  TTL,LEFT\r
+\r
+\r
+          ORG     $1E00\r
+DL6:      .ds.b     80                     ;DISPLAY LIST 6\r
+\r
+XTBL:     .ds.b     84                     ;X POS FOR OBJECTS REF PTS MITE BE NULL\r
+YTBL:     .ds.b     84                     ;Y POS FOR OBJECTS REF PTS AND SHADOWS\r
+ENDRAM1E:         ;248,8  TTL,LEFT        MITE BE NULL\r
+\r
+\r
+          ORG     $1F00\r
+DL7:      .ds.b     80                     ;DISPLAY LIST 7\r
+ZTBL:     .ds.b     84                     ;Z POS FOR OBJECTS\r
+VPTBL:    .ds.b     84                     ;VPOS FOR LOADER\r
+ENDRAM1F:         ;248,8  TTL,LEFT\r
+\r
+\r
+          ORG     $2000                  ;ONLY 64 UNSHADOWED BYTES HERE\r
+COLX2:    .ds.b     63                     ;COLLISION X EXTENTS\r
+ENDRAM20:         ;63,1  TTOUT OF 64\r
+\r
+\r
+          ORG     $2100                  ;ONLY 64 UNSHADOWED BYTES HERE\r
+SVDIST:   .ds.b     4\r
+SVHDIST:  .ds.b     4\r
+PSRANDA1: .ds.b     4\r
+PSRANDA2: .ds.b     4\r
+PSRANDB1: .ds.b     4\r
+PSRANDB2: .ds.b     4\r
+SVGRNDPC: .ds.b     4\r
+SVOBJTYP: .ds.b     4\r
+SVNEWBLK: .ds.b     4\r
+SVBLOCK:  .ds.b     4\r
+SVBAND:   .ds.b     4\r
+VAR1:     .ds.b     1\r
+VAR2:     .ds.b     1\r
+VAR3:     .ds.b     1\r
+VAR4:     .ds.b     1\r
+CRISVARS:\r
+VAR5:     .ds.b     1\r
+\r
+JEWCNT:   .ds.b     2                      ;JEWEL COUNTER\r
+EGGCNT:   .ds.b     2                      ;SILVER BAR COUNTER\r
+BARCNT:   .ds.b     2                      ;GOLDEN EGG COUNTER\r
+\r
+ENDRAM21:         ;49,15  TTOUT OF 64\r
+\r
+\r
+          ORG     $2200\r
+DL10:     .ds.b     80                     ;DISPLAY LIST 10\r
+LLTBL:    .ds.b     84                     ;LEFT LINKS IN LIST\r
+SLTBL:    .ds.b     84                     ;LOW BYTE OF GRAPHICS FOR LOADER\r
+\r
+HSGAMDAT  EQU     DL10                   ;HSC DATA FIELDS: MAX LENGTH 2 PAGES\r
+\r
+ENDRAM22:         ;248,8  TTL,LEFT\r
+\r
+\r
+          ORG     $2300\r
+DL11:     .ds.b     80                     ;DISPLAY LIST 11\r
+\r
+DLY:      .ds.b     20                     ;DISPLAY LIST FOR SCORE\r
+DLZ:      .ds.b     20                     ;DISPLAY LIST FOR EXTRA BIRDS\r
+PWTBL:    .ds.b     84                     ;PALLETTE/WIDTH FOR LOADER\r
+SLOTQ:    .ds.b     43                     ;SHOULD EQUAL PYRSTOP-PYRSTART+1\r
+SLOTGPTR: .ds.b     1                      ;POINTER TO FIRST AVAILABLE SLOT\r
+SLOTRPTR: .ds.b     1                      ;POINTER TO FIRST EMPTY POSITION\r
+ENDRAM23:         ;249,7  TTL,LEFT\r
+\r
+\r
+          ORG     $2400\r
+ZBUFF0:   .ds.b     33                     ;CHARACTER BUFFERS\r
+ZBUFF1:   .ds.b     33                     ;ALSO USED FOR TITLE PAGE SHIT\r
+ZBUFF2:   .ds.b     33\r
+ZBUFF3:   .ds.b     33\r
+ZBUFF4:   .ds.b     33\r
+ZBUFF5:   .ds.b     33\r
+ZBUFF6:   .ds.b     33\r
+\r
+WINGMAP0  EQU     ZBUFF0                 ;TITLE PAGE MAPS USE SAME RAM AS GAME\r
+WINGMAP1  EQU     ZBUFF1                 ;PLAY MAPS\r
+WINGMAP2  EQU     ZBUFF2\r
+WINGMAP3  EQU     ZBUFF3\r
+WINGMAP4  EQU     ZBUFF4\r
+WINGMAP5  EQU     ZBUFF5\r
+CRSTMAP1  EQU     ZBUFF6\r
+CRSTMAP2  EQU     CRSTMAP1+12            ;MOST OF THESE LABELS CAN GO AWAY\r
+CRSTMAP3  EQU     CRSTMAP2+10            ;BECAUSE THE CREST IS PRETTY MUCH\r
+CRSTMAP4  EQU     CRSTMAP3+4             ;HARDWIRED IN SINIT\r
+CRSTMAP5  EQU     CRSTMAP4+2\r
+\r
+PTIMER:   .ds.b     1                      ;POWER TIMER\r
+\r
+TPSTART:                                 ;BEGINNING OF TIMED POWER FLAGS\r
+NOHOMING: .ds.b     1\r
+CANTHOP:  .ds.b     1\r
+CANTSWIM: .ds.b     1\r
+CANTFLY:  .ds.b     1\r
+HOVER:    .ds.b     1\r
+SPEEDUP:  .ds.b     1\r
+SLOWDOWN: .ds.b     1\r
+QUIKSHOT: .ds.b     1\r
+INVINCBL: .ds.b     1\r
+TPSTOP:\r
+PARASPHX: .ds.b     1\r
+\r
+TPNUMB    EQU     TPSTOP-TPSTART         ;NUMBER OF TIMED POWER FLAGS\r
+\r
+ENDRAM24:         ;242,14 TTL,LEFT\r
+\r
+\r
+          ORG     $2500\r
+ZBUFF7:   .ds.b     33                     ;MORE CHARACTER MAP BUFFERS\r
+ZBUFF8:   .ds.b     33\r
+ZBUFF9:   .ds.b     33\r
+ZBUFFA:   .ds.b     33\r
+ZBUFFB:   .ds.b     33\r
+CRMAP     EQU     ZBUFF8                 ;CRIGHT MESSAGE MAP\r
+NOVMAP    EQU     ZBUFF9                 ;NOVICE MAP\r
+STDMAP    EQU     NOVMAP+6               ;STANDARD MAP\r
+ADVMAP    EQU     STDMAP+8               ;ADVANCED MAP\r
+EXPMAP    EQU     ADVMAP+8               ;EXPERTMAP\r
+\r
+HPTBL:    .ds.b     84                     ;HPOS FOR LOADER\r
+\r
+ENDRAM25:         ;251,5  TTL,LEFT\r
+\r
+\r
+          ORG     $2600\r
+\r
+DL8:      .ds.b     80                     ;DISPLAY LIST 8\r
+\r
+RLTBL:    .ds.b     84                     ;RIGHT LINKS IN LIST\r
+DFTBL:    .ds.b     84                     ;FAR DX TABLE\r
+ENDRAM26:         ;248,8  TTL,LEFT\r
+\r
+\r
+          ORG     $2700\r
+DL9:      .ds.b     80                     ;DISPLAY LIST 9\r
+DLLIST:   .ds.b     84                     ;DISPLAY LIST LIST. DEFINED TO ACCOM.\r
+                                         ;PAL DLLIST + 3 EXTRA FOR YUCKS\r
+NULHDR:   .ds.b     2                      ;HEADER OF TWO ZEROS\r
+\r
+ENDRAM27:         ;166,90 TTL,LEFT\r
+\r
+          ORG     $7000                  ;FOR RAM CARD ONLY!!!!!!!!!!!!!!\r
+TESTLIST: .ds.b     84                     ;FOR LINKED LIST DIAGNOSTICS\r
+ORDTEST:  .ds.b     84                     ;FOR LINKED LIST DIAGNOSTICS\r
+\r
+;          END\r
+\r
diff --git a/SGAME.S b/SGAME.S
new file mode 100644 (file)
index 0000000..6effdf0
--- /dev/null
+++ b/SGAME.S
@@ -0,0 +1,1858 @@
+*         SPHINX--SGAME.S\r
+\r
+\r
+       org     $E000\r
+\r
+* THIS ROUTINE DRIVES THE BIRD AND ITS SHOTS.  IT HANDLES ANIMATING THE BIRD\r
+* THROUGH ITS STATE MACHINE, COLLISIONS FOR BIRD, MOVING AND GENERATING SHOTS,\r
+* AND THEIR COLLISIONS.  IT BRINGS BIRD BACK TO LIFE AND SUCH.\r
+\r
+ZBIRDZ    EQU     80                     ;Z COORDINATE OF BIRD\r
+ZXLIMLOW  EQU     56                     ;LIMITS ON X MOTION\r
+ZXLIMHI   EQU     121\r
+ZYLIMLOW  EQU     5                      ;Y WHEN BIRD ON GROUND\r
+ZYLIMHI   EQU     45                     ;LIMIT ON Y MOTION\r
+\r
+*         GAME\r
+GAME:\r
+          LDA     #0                     ;CLEAR MOVEMENT FLAG\r
+          STA     TEMP7                  ; MOVEMENT FLAG IS TEMP7 (OBVIOUSLY)\r
+\r
+          LDA     DEATH                  ;DON'T READ JOYSTICK WHEN BIRD IS DEAD\r
+          BEQ     LIVE\r
+          JMP     DIE                    ;INSTEAD, GO TO DEAD BIRD HANDLER\r
+\r
+\r
+*         READ JOYSTICK OR SIMULATED JOYSTICK\r
+LIVE:\r
+       jsr     autoPower       ;Check for auto powers.\r
+       bcs     ok2             ;Invoke power automatically?\r
+\r
+       LDX     PLAYER\r
+       LDA     RIGHTBUT,X             ;CHECK FIRE BUTTON FOR POWER\r
+       BMI     STKCHK\r
+\r
+ok2:   JSR     GIVPOWER               ;RIGHT BUTTON PRESSED SO POWER???\r
+\r
+STKCHK:   BIT     AUTOPLAY               ;AUTOPLAY MODE??\r
+          BPL     LDASWCHA               ;IF NO AUTOPLAY, LOAD JOYSTICK\r
+\r
+          LDA     MAINCNT                ;DO WE CHANGE INPUT VECTOR?\r
+          AND     #$1F                   ;CHANGE INPUT EVERY 32 MAINCNTS\r
+\r
+          BEQ     THIS2                  ;YES, GOTO THIS2\r
+          LDA     IOSIM                  ;NO JUST USE IOSIM AS USUAL\r
+          JMP     LSRA\r
+\r
+THIS2:    JSR     RANDOM                 ;GENERATE NEW INPUT VECTOR\r
+          AND     #$0F\r
+          TAX                            ;READ VALUE OUT OF TABLE\r
+          LDA     JOYSIM,X\r
+          STA     IOSIM\r
+          BNE     LSRA                   ;WATCHOUT!\r
+\r
+LDASWCHA: BIT     WARP\r
+          BPL     LDASWCH1\r
+\r
+\r
+          LDA     PHASE                  ;SEE IF WARP IS LEGAL\r
+          BEQ     LDAWARP\r
+\r
+          LDA     #0                     ;THIS HAPPENS WHEN WE REACH THE SPHINX\r
+          STA     WARP\r
+       jsr     powerOff\r
+       jmp     LDASWCH1\r
+\r
+\r
+LDAWARP:  LDA     #$0D                   ;FORCE CLIMB DURING WARP POWER\r
+          BNE     LDXXTBL\r
+\r
+\r
+LDASWCH1: LDA     SWCHA                  ; CHECK JOYSTICK\r
+          LDX     PLAYER\r
+          BEQ     LSRA\r
+          AND     #$0F                   ;IF IT AINT 1 THEN ITS 2 SO\r
+          BNE     LDXXTBL                ;JOYSTICK CAN NEVER BE 0\r
+\r
+LSRA:     LSR                            ;LOOK AT PLAYER1 FOR NOW (TOP NIBBLE)\r
+          LSR\r
+          LSR\r
+          LSR\r
+\r
+\r
+*         TURN BACK ON THOSE BITS THAT ARE TO BE IGNORED\r
+LDXXTBL:  LDX     XTBL+ZBIRD             ; SET BITS FOR DIRS HE CANT MOVE\r
+          CPX     #ZXLIMLOW+1            ;BY CHECKING LIMITS OF MOTION\r
+          BCS     CKBIRDXH\r
+          ORA     #4                     ; SET WEST BIT\r
+          BNE     CKBIRDYH\r
+\r
+CKBIRDXH: CPX     #ZXLIMHI\r
+          BCC     CKBIRDYH\r
+          ORA     #8                     ; SET EAST BIT\r
+\r
+CKBIRDYH: LDX     YTBL+ZBIRD\r
+          CPX     #ZYLIMHI\r
+          BCC     CKBIRDON\r
+          ORA     #2                     ; SET SOUTH BIT\r
+\r
+CKBIRDON:\r
+          STA     TEMP0                  ;THIS IS "FIXED" JOYSTICK VALUE\r
+\r
+;         LDX     YTBL+ZBIRD             ;ALREADY IN X\r
+          CPX     #ZYLIMLOW\r
+          BNE     INTHEAIR\r
+\r
+          BIT     SWIMMING\r
+          BPL     CLLTYPE\r
+\r
+          BIT     CANTSWIM               ;HACK FOR CANT SWIM POWER\r
+          BPL     SWIMFOO\r
+          LDA     TEMP0\r
+          ORA     #$D                    ;PROHIBIT ANY BUT SOUTH\r
+          STA     TEMP0\r
+SWIMFOO:\r
+          LDX     #ZBIRD                 ;BIRD'S OBJECT NUMBER\r
+          LDA     #0                     ;Z OFFSET IS 0\r
+\r
+          STA     TEMP4                  ;IF SWIMMING, ENTER GRNDTYPE WITH\r
+          STX     TEMP3                  ;FIXED VP TO AVOID SANDFUCKER MODE\r
+          LDA     VPTBL,X\r
+          SEC\r
+          SBC     #3                     ;VP ADJUST FOR SWIMMING\r
+          JSR     GRNDFLO\r
+          JMP     POSTGTFL\r
+\r
+CLLTYPE:\r
+          BIT     CANTHOP\r
+          BPL     HOPFOO\r
+          LDA     TEMP0\r
+          ORA     #$D\r
+          STA     TEMP0\r
+HOPFOO:\r
+          LDX     #ZBIRD                 ;BIRD'S OBJECT NUMBER\r
+          LDA     #0                     ;Z OFFSET IS 0\r
+          JSR     GRNDTYPE               ; CHECK CHAR UNDER BIRD\r
+\r
+POSTGTFL: CMP     #126                   ;A MAGIC NUMBER IF I EVER SAW ONE\r
+          BCC     NOWATER\r
+\r
+          LDA     #$80\r
+          STA     SWIMMING\r
+\r
+          LDA     TEMP0                  ;JOYSTICK\r
+          CMP     #$F\r
+          BEQ     NOSWIM2                ;ONLY MAKE SWIMMING SOUND WHEN MOVING\r
+\r
+          LDA     #SWIM                  ;START SWIM SOUND\r
+          CMP     TUNNUM\r
+          BEQ     JOHNTMPS\r
+          CMP     TUNNUM+1\r
+          BEQ     JOHNTMPS\r
+          JSR     TUNIN\r
+\r
+          JMP     JOHNTMPS\r
+\r
+INTHEAIR:\r
+          BIT     CANTFLY\r
+          BPL     NOWATER\r
+          LDA     #$E\r
+          STA     TEMP0\r
+NOWATER:  LDA     SWIMMING\r
+          AND     #$7F\r
+          STA     SWIMMING\r
+NOSWIM2:  LDA     #SWIM\r
+          JSR     SCRAPONE\r
+\r
+JOHNTMPS:\r
+\r
+          LDX     TEMP0                  ;JOYSTICK\r
+          LDA     JOYTBL,X               ;GET ACTION FROM TABLE\r
+\r
+          LDY     YTBL+ZBIRD             ;BIRD'S Y AFFECTS ACTION\r
+          CPY     #5+ZYLIMLOW            ;5 + 4 ARE SPECIAL SYNCHRONIZED STATES\r
+          BCS     NOSWAP\r
+          CPY     #4+ZYLIMLOW\r
+          BEQ     SWAP\r
+\r
+                  ;IF Y IS <=3 THEN LOOK TO SEE IF THERE IS WATER\r
+\r
+          BIT     SWIMMING               ;WATER ALSO AFFECTS\r
+          BMI     NOSWAP                 ; DON'T SWAP IF OVER WATER\r
+\r
+SWAP:     LSR                            ;SHIFT TO TOP NIBBLE IF OVER WATER\r
+          LSR\r
+          LSR\r
+          LSR\r
+\r
+NOSWAP:\r
+          AND     #$F\r
+          STA     TEMP1\r
+          LDA     BIRDSTAT\r
+          LSR\r
+          LSR\r
+          LSR\r
+          LSR\r
+          TAX                            ;THIS REPLACES THE HUGE ANIM TABLE\r
+          LDA     BIRDATBL,X\r
+          BPL     BADIRECT\r
+          AND     #$7F\r
+          CLC\r
+          ADC     TEMP1\r
+          TAX\r
+          LDA     BIRDAI,X\r
+BADIRECT: STA     TEMP4\r
+\r
+          AND     #$1F\r
+          TAY\r
+\r
+          LDA     TEMP1                  ;PREPARE X FOR STATE LOOKUP\r
+          ORA     BIRDSTAT               ;ORA ON BIRDSTAT FOR TOP BITS\r
+          TAX\r
+\r
+          LDA     BIRDANAD,Y             ;GET POINTER TO GRAPHCS\r
+          STA     SLTBL+ZBIRD\r
+\r
+          LDA     SHADANAD,Y             ;GET GRAPHCS FOR SHADOW\r
+          STA     SLTBL+ZSHAD\r
+\r
+          STY     TEMP8                  ; SAVE FOR GETTING OFFSETS IN PROJECT\r
+\r
+TESTPNT:  LDA     STATETBL,X             ;USE STATE TO GET SCROLL RATE\r
+          AND     #$F\r
+          TAY\r
+\r
+          LDA     YTBL+ZBIRD\r
+          CMP     #ZYLIMLOW\r
+          BNE     PUNTRUN                ;FOR TAKEOFF\r
+\r
+          BIT     SWIMMING\r
+          BMI     PUNTRUN\r
+\r
+          LDA     TEMP0\r
+          CMP     #$F\r
+          BEQ     PUNTRUN\r
+\r
+          LDA     #$40\r
+          STA     SWIMMING\r
+\r
+          LDA     #RUNNING\r
+          CMP     TUNNUM\r
+          BEQ     DOSCROLL\r
+          CMP     TUNNUM+1\r
+          BEQ     DOSCROLL\r
+\r
+          JSR     TUNIN\r
+          JMP     DOSCROLL\r
+\r
+PUNTRUN:\r
+          LDA     #RUNNING\r
+          JSR     SCRAPONE\r
+\r
+          LDA     SWIMMING\r
+          AND     #$BF\r
+          STA     SWIMMING\r
+\r
+DOSCROLL: LDA     PHASE\r
+          CMP     #2\r
+          BEQ     ZROSCRAT               ;SPHINX IS STOPPED\r
+\r
+          CPY     #$F\r
+          BEQ     SAMSCRAT               ;STAY STATE\r
+\r
+          CPY     #$E\r
+          BNE     NMLSCRAT               ;NOT HOPPING\r
+          LDA     TEMP0                  ;JOYSTICK VALUE\r
+          CMP     #$07                   ;EAST\r
+          BEQ     ZROSCRAT\r
+          CMP     #$0B                   ;WEST\r
+          BEQ     ZROSCRAT\r
+\r
+NMLSCRAT: BIT     WARP\r
+          BPL     NMLSCRA1\r
+          LDA     #$20\r
+          BPL     STRSCRAT\r
+\r
+NMLSCRA1: LDA     SCRATBL,Y\r
+          BPL     STRSCRAT               ;NEAR GROUND - ABSOLUTE CONTROL\r
+\r
+          BIT     HOVER\r
+          BMI     ZROSCRAT\r
+\r
+          STX     TEMP6                  ;SAVE X\r
+\r
+          LDX     PLAYER\r
+          LDA     RACK,X\r
+\r
+          LDX     #2                     ;MININUM FLYING SCRATE\r
+\r
+          CMP     #1\r
+          BCC     BNSSCRAT\r
+          INX\r
+\r
+          CMP     #3\r
+          BCC     BNSSCRAT\r
+          INX\r
+\r
+          CMP     #7\r
+          BCC     BNSSCRAT\r
+          INX\r
+\r
+          CMP     #12\r
+          BCC     BNSSCRAT\r
+          INX\r
+\r
+          CMP     #20\r
+          BCC     BNSSCRAT\r
+          INX\r
+\r
+BNSSCRAT: TXA\r
+          CLC\r
+          ADC     DIFCULTY             ;Range 0-3\r
+\r
+          LDX     PHASE\r
+          CPX     #$FE                   ;ACTUAL BONUS\r
+          BNE     ENDSCRAT\r
+\r
+          CLC\r
+          ADC     #2\r
+\r
+ENDSCRAT: BIT     SPEEDUP\r
+          BPL     ENDSCRA2\r
+          ASL\r
+          JMP     ENDSCRA3\r
+\r
+ENDSCRA2: LDX     SLOWDOWN\r
+          BPL     ENDSCRA3\r
+          LSR\r
+\r
+ENDSCRA3: CMP     #3\r
+          BNE     ENDSCRA1\r
+          LDA     #2                     ;SCRATE = 3 LOOKS TOO SHITTY\r
+ENDSCRA1: STA     SCRATE\r
+          LDX     TEMP6                  ;RESTORE X\r
+\r
+          LDA     YTBL+ZBIRD\r
+          SEC\r
+          SBC     #ZYLIMLOW\r
+          BEQ     SAMSCRAT               ;ON GROUND\r
+\r
+          CMP     SCRATE\r
+          BCS     SAMSCRAT               ;SCRATE OK\r
+\r
+          STA     SCRATE                 ;LIMIT SCRATE NEAR GROUND\r
+          BCC     SAMSCRAT               ;ALWAYS\r
+\r
+ZROSCRAT: LDA     #0\r
+STRSCRAT: STA     SCRATE\r
+\r
+SAMSCRAT: LDA     ADELTBL,Y              ;CHECK FOR CHANGE OF AIMATION\r
+          INC     BIRDACNT\r
+          CMP     BIRDACNT\r
+          BCS     NONEWSTA               ; NOT TIME FOR NEXT ANIMATION\r
+\r
+          LDA     #0                     ;DO NEW ANIMATION\r
+          STA     BIRDACNT\r
+          LDA     STATETBL,X             ;TOP OF STATE IS NEW BIRDSTAT\r
+          AND     #$F0\r
+          STA     BIRDSTAT\r
+\r
+NONEWSTA: LDA     SCRATE\r
+          LSR\r
+          LSR\r
+          CLC\r
+          ADC     #2\r
+          STA     TEMP10\r
+\r
+          LDA     TEMP0                  ;THIS IS JOYSTICK VALUE\r
+          LDX     YMODTBL,Y              ;CHECK FOR Y MOTION\r
+          BEQ     NONEWY\r
+          BMI     YMOVE\r
+\r
+          STX     YTBL+ZBIRD\r
+          LDX     #$FF\r
+          STX     TEMP7                  ; SET MOVEMENT FLAG\r
+          JMP     NONEWY\r
+\r
+YMOVE:    LSR     \r
+          BCS     CKUP                   ;LOOK FOR DOWN BIT (NORTH)\r
+\r
+          TAX\r
+\r
+          LDA     YTBL+ZBIRD\r
+          SEC\r
+          SBC     TEMP10\r
+\r
+          BMI     FIXYNEG\r
+          CMP     #ZYLIMLOW+3\r
+          BCS     GOTYDN\r
+FIXYNEG:  LDA     #ZYLIMLOW+3\r
+\r
+GOTYDN:   STA     YTBL+ZBIRD\r
+          TXA\r
+\r
+          LDX     #$FF\r
+          STX     TEMP7                  ; SET MOVEMENT FLAG\r
+          LSR     \r
+          JMP     CKNEWX\r
+\r
+CKUP:     LSR                           ;CHECK FOR UP (SOUTH)\r
+          BCS     CKNEWX\r
+\r
+          TAX\r
+\r
+          LDA     YTBL+ZBIRD\r
+          CLC\r
+          ADC     TEMP10\r
+\r
+          CMP     #ZYLIMHI\r
+          BCC     GOTYUP\r
+          LDA     #ZYLIMHI\r
+\r
+GOTYUP:   STA     YTBL+ZBIRD\r
+          TXA\r
+\r
+          LDX     #$FF\r
+          STX     TEMP7                  ; SET MOVEMENT FLAG\r
+          JMP     CKNEWX\r
+\r
+NONEWY:   LSR                           ;THIS CATCHES A UP IN SHIFTING\r
+          LSR     \r
+\r
+CKNEWX:   INC     BIRDXCNT               ;MOVE IN X DIR IN SAME WAY.\r
+          LDX     XDELTBL,Y\r
+          BEQ     PROJ\r
+\r
+          CPX     BIRDXCNT\r
+          BCS     PROJ                   ; NOT TIME TO UPDATE X\r
+\r
+          LDX     #1                     ;RESET X COUNTER\r
+          STX     BIRDXCNT\r
+\r
+          LSR                           ;LOOK FOR WEST\r
+          BCS     CKRIGHT\r
+\r
+          LDA     XTBL+ZBIRD             ;DO THIS ON WEST\r
+          SEC\r
+          SBC     TEMP10\r
+          STA     XTBL+ZBIRD\r
+\r
+          LDX     #$FF\r
+          STX     TEMP7                  ; SET MOVEMENT FLAG\r
+          BMI     PROJ                   ;JMP\r
+\r
+CKRIGHT:  LSR                           ;LOOK FOR EAST\r
+          BCS     PROJ\r
+          LDA     XTBL+ZBIRD             ;DO THIS ON EAST\r
+\r
+          CLC\r
+          ADC     TEMP10\r
+          STA     XTBL+ZBIRD\r
+\r
+          LDX     #$FF\r
+          STX     TEMP7                  ; SET MOVEMENT FLAG\r
+\r
+PROJ:     JSR     PROJECT                ;MAP X,Y,Z TO HP,VP\r
+\r
+\r
+*         COLLISION DETECTION FOR BIRD IS DONE HERE\r
+\r
+          BIT     WARP\r
+          BMI     SURVIVE                ;DON'T DETECT COLISIONS DURING WARP\r
+\r
+          JSR     DOCOL                  ;DO COLLISION DETECTION\r
+          CMP     #TREASCOL              ;SURVIVE IF ZERO RETURNED OR IF\r
+          BCC     SURVIVE                ;IT HIT A HIERO\r
+\r
+       CMP     #FLEACOL                ;Did the bird run into a flea?\r
+       BNE     CC1\r
+;\r
+       lda     FLEANIM-FLEADEX,x       ;Is flea blowing up?\r
+       cmp     #15\r
+       bcc     .kill\r
+       cmp     #24\r
+       bcc     SURVIVE\r
+       cmp     #29\r
+       bcc     .kill\r
+       cmp     #33\r
+       bcc     SURVIVE\r
+       cmp     #37\r
+       bcc     .kill\r
+       cmp     #41\r
+       bcc     SURVIVE\r
+;\r
+.kill: JSR     KILLFLEA                ;Kill flea when run into by bird.\r
+       JMP     STOP1                   ;Bird is also killed in the collision.\r
+\r
+CC1:      CMP     #SXSHTCOL              ;WAS IT WITH A SPHINX SHOT\r
+          BNE     CC2\r
+          LDA     #0\r
+          STA     SXSHTSTT-SPHXSHOT,X\r
+          JSR     OBJDEL                 ;DELETE SHOT WHICH HIT YOU\r
+          TXA\r
+          CLC\r
+          ADC     #SPXSHTSH-SPHXSHOT\r
+          TAX\r
+          JSR     OBJDEL                 ;DELETE SHADOW AS WELL\r
+          JMP     STOP1\r
+\r
+CC2:   CMP     #UWECOL                 ;Did bird run into a uwe?\r
+       bne     .ok2\r
+;\r
+       lda     WANIMCNT-UWEDEX,x       ;Is the uwe exploding?\r
+       cmp     #13                     ;If yes, don't kill again.\r
+       bcc     STOP1                   ;Kill bird.\r
+       bcs     SURVIVE                 ;Just ran into uwe dust, bird is OK.\r
+       \r
+;\r
+.ok2:  CMP     #TREASCOL+3             ;Was it a treasure?\r
+       bcs     ckBad\r
+\r
+          JSR     GOTTREAS               ;TAKE CARE OF TREASURE\r
+\r
+SURVIVE:  LDA     YTBL+ZBIRD             ;CHECK FOR HIERO'S\r
+          CMP     #ZYLIMLOW\r
+          BNE     NOLUCK                 ;BIRD NOT ON GROUND\r
+\r
+       BIT     AUTOPLAY                ;DON'T PICKUP HIEROS IN AUTO.\r
+       BMI     NOLUCK                  ;!!!!!!!!!!!!!!\r
+;\r
+          JSR     HIERODET               ;SPECIALIZED COLISION DETECT\r
+\r
+          BEQ     NOLUCK\r
+          CMP     #TREASCOL\r
+          BCS     NOLUCK\r
+          JSR     GOTHIERO\r
+\r
+NOLUCK:   JSR     DOSHOTS                ;DO SHOT CODE\r
+          RTS\r
+\r
+ckBad: cmp     #SXSHTCOL+1\r
+       bcs     SURVIVE\r
+;\r
+;\r
+;         INITIATE DEATH\r
+STOP1:\r
+;      JMP     SURVIVE                 ;!!!!!!!!!Never Die!!!!!DEBUG\r
+       BIT     INVINCBL                ;Is the Player invincable?\r
+       BMI     SURVIVE\r
+STOP:  JSR     CLRPFLGS                ;CLEAR TIMED POWER FLAGS\r
+;\r
+       LDA     #0\r
+       STA     SCRATE                  ;ON DEATH STOP SCROLLING\r
+;\r
+       LDA     #1\r
+       STA     BIRDACNT\r
+       LDA     #VHDEATH\r
+       JSR     TUNIN\r
+       LDA     #ALADIN0\r
+       JSR     SCRAPONE                ;KILL BASS LINE OF OPENING TUNE IF\r
+;\r
+       LDA     ptCount                 ;Is there an auto power in effect?\r
+       BNE     .turnOff                ;If yes, turn it off.\r
+       LDA     PTIMER                  ;Is there a power in effect?\r
+       BEQ     DIE\r
+.turnOff:\r
+       JSR     powerOff                ;Turn off the power in effect.\r
+;\r
+;\r
+*         ROUTINE (YOU MEAN CODE FRAGMENT) TO DO DEATH ANIMATION\r
+DIE:\r
+          DEC     BIRDACNT               ;CHECK ANIMATION DELAY\r
+          BMI     FALLING\r
+          BNE     DIEDONE\r
+\r
+          INC     DEATH                  ;ADVANCE DEATH STATE\r
+          LDX     DEATH\r
+          LDA     DEATHDEL-1,X           ;CHECK FOR RESTART\r
+          BEQ     RESTART\r
+          STA     BIRDACNT\r
+\r
+          LDA     DEATHANI-1,X           ;POINTER TO GRAPHICS FOR BIRD\r
+          STA     SLTBL+ZBIRD            ;EXPLOSION\r
+          STA     SLTBL+ZSHAD\r
+\r
+DIEDONE:\r
+          LDA     #$1B\r
+          CLC\r
+          ADC     DEATH\r
+          STA     TEMP8\r
+          JSR     PROJECT\r
+          JMP     SURVIVE\r
+\r
+NODEC:\r
+          INC     BIRDACNT\r
+          JMP     RESTART1               ;GO TO WAIT FOR END OF TUNES\r
+                                         ;DON'T DEC LIVES AGAIN\r
+FALLING:\r
+          LDA     YTBL+ZBIRD\r
+          CMP     #5\r
+          BCC     NODEC\r
+\r
+          DEC     YTBL+ZBIRD             ;ONLY DEC IF GREATER THAN 4\r
+          LDX     #$FF                   ;FUCK WITH THE MOVEMENT FLAG\r
+          STX     TEMP7\r
+          INC     BIRDACNT\r
+          LDA     YTBL+ZBIRD\r
+          CMP     #5\r
+          BCS     DIEDONE\r
+\r
+* HIT THE GROUND *\r
+          LDA     #CUCKOO1\r
+          JSR     TUNIN\r
+          LDA     #CUCKOO2\r
+          JSR     TUNIN\r
+          LDA     #1\r
+          STA     BIRDACNT\r
+          BNE     DIEDONE                ;ALWAYS BRANCHES\r
+\r
+*         TWO PLAYER SWITCH CODE\r
+GMVRTBL:  .dc.b      BLANKCHR&$FF,BLANKCHR&$FF\r
+          .dc.b      BLANKCHR&$FF,BLANKCHR&$FF,BLANKCHR&$FF\r
+         .dc.b      G&$FF,AA&$FF,M&$FF,E&$FF\r
+          .dc.b      BLANKCHR&$FF,O&$FF,V&$FF,E&$FF,R&$FF\r
+         .dc.b      BLANKCHR&$FF,BLANKCHR&$FF\r
+          .dc.b      BLANKCHR&$FF,BLANKCHR&$FF,BLANKCHR&$FF,BLANKCHR&$FF\r
+\r
+*         CODE TO RESTART AFTER DEATH\r
+\r
+RESTART:  BIT     AUTOPLAY               ;IN AUTO PLAY, DO IT FAST\r
+          BMI     SAMEPLYR\r
+\r
+          LDA     PHASE\r
+          BMI     SAMEPLYR               ;DON'T DO LIVES IF BONUS RACK\r
+\r
+          LDX     PLAYER                 ;WHICH PLAYER IS UP\r
+          DEC     PL1LIVES,X             ;DECREMENT LIVES\r
+          BNE     NOTGOVER\r
+\r
+          LDA     #42                    ;MOVE HPOS TO ALLOW CENTERING\r
+          STA     DLY+9\r
+\r
+          LDY     #19                    ;PUT GAMEPOVER MESSAGE\r
+GMVRLP:   LDA     GMVRTBL,Y\r
+          STA     TOPMSMAP,Y\r
+          DEY\r
+          BPL     GMVRLP\r
+\r
+          LDA     #ENDGAM1               ;START ENDGAME TUNE\r
+          JSR     TUNIN2               ;TUNIN2 doesn't check end of game.\r
+          LDA     #ENDGAM0\r
+          JSR     TUNIN2\r
+;\r
+       lda     #200            ;Start end of game counter.\r
+       sta     ENDCOUNT\r
+;\r
+;\r
+RESTART1:      lda     ENDCOUNT        ;End of game tune had enough time?\r
+               BNE     WTEOT           ;If yes, then end game.\r
+; JSR     ZOUNDS\r
+;          BNE     WTEOT\r
+\r
+NOTGOVER: LDX     PLAYER\r
+          LDA     NUMPLYRS               ;IF TWO PLAYER THEN GOTO TWOPLYR\r
+          CMP     #2\r
+          BEQ     TWOPLYR\r
+\r
+          LDA     PL1LIVES,X  ; NO X BFR ;ELSE ONE PLAYER.  SEE IF THERE ARE\r
+          BEQ     GAMEOVER               ;ANY LEFT\r
+\r
+          LDA     PHASE\r
+          BNE     LDA0E                  ;NEED TO RESTART IF IN BATTLE\r
+          BEQ     SAMEPLYR               ;OTHERWISE JUST DO PLACEMENT\r
+\r
+TWOPLYR:  TXA                            ;TRANSFER PLAYER TO ACCUMULATOR\r
+          EOR     #$01                   ;AND TWIDDLE BIT TO GET OTHER PLAYER\r
+          TAY\r
+          LDA     PL1LIVES,Y             ;GET NUMBER OF LIVES FOR OTHER PLAYER\r
+          BEQ     UTTERWAY               ;IF ZERO GOTO UTTERWAY\r
+          STY     PLAYER                 ;ELSE STORE OTHER PLAYER TO PLAYER,CONT\r
+          JMP     LDA0E\r
+\r
+UTTERWAY: LDA     PL1LIVES,X             ;IF NONE LEFT THEN PUNT\r
+          BEQ     GAMEOVER\r
+\r
+SAMEPLYR:\r
+          JSR     CLEAN\r
+          JSR     SCRAPALL               ;KILL ALL TUNES\r
+          JSR     PLACEMNT\r
+WTEOT:    RTS\r
+\r
+LDA0E:\r
+          LDA     #$FF\r
+          STA     NEWPLYR\r
+          RTS\r
+;\r
+;\r
+;===========================\r
+;      End of game.\r
+;===========================\r
+;\r
+GAMEOVER:\r
+       jsr     powerOff                ;Turn off any power.\r
+;\r
+       LDX     #$FF\r
+       STX     GAMEOVR\r
+       RTS\r
+;\r
+;\r
+*         DOSHOTS  THIS IS THE SHOT ROUTINE\r
+DOSHOTS:\r
+          LDA     DEATH                  ;IF DEAD THEN DON'T ALLOW FOR NEW\r
+          BNE     JDONT                  ;SHOTS\r
+\r
+          LDA     PHASE\r
+          CMP     #(-2)&$FF\r
+          BEQ     JDONT                  ;CAN'T SHOOT DURING BONUS RACK\r
+\r
+          DEC     FIRECNT                ;CHECK FOR FIRING (DELAY)\r
+          BNE     JDONT\r
+\r
+          LDA     #1\r
+          STA     FIRECNT\r
+\r
+JOHNTMP2: BIT     AUTOPLAY               ;FORCE FIRING IN AUTOPLAY\r
+          BPL     NORMAL\r
+\r
+          BIT     FRMCNT\r
+          BMI     SHOTTER                ;SHOT ON NEGATIVE FRAMES\r
+          BPL     JDONT                  ;DON'T ON POSITIVE FRAMES\r
+\r
+NORMAL:   LDX     PLAYER\r
+          LDA     LEFTBUT,X\r
+          BPL     SHOTTER              ;!!!!FIRE!!!!!!!!!!!!\r
+;      jmp     SHOTTER                 ;!!!!!!!!!!!!!!!!\r
+JDONT:    JMP     DONTFIRE\r
+\r
+SHOTTER:\r
+          LDX     SHOTCNT                ;COMMENT THIS\r
+          INX\r
+          TXA\r
+          AND     #3\r
+          TAX                            ;SHOT NUMBER\r
+          LDA     SHOTSTAT,X             ;IF SHOT IS STILL AROUND\r
+          BNE     JDONT                  ;THEN DON'T SHOOT\r
+\r
+          STX     SHOTCNT\r
+\r
+          LDA     #5\r
+          STA     FIRECNT\r
+\r
+*         ADJUST X FOR TURNING\r
+          LDA     #8                     ; EAST\r
+          BIT     TEMP0                  ; JOYSTICK VALUE\r
+          BEQ     ADJXEAST\r
+          LDA     #4                     ; WEST\r
+          BIT     TEMP0\r
+          BEQ     ADJXWEST\r
+          LDA     XTBL+ZBIRD\r
+          BNE     ADJXDONE               ; ALWAYS\r
+ADJXEAST: LDA     XTBL+ZBIRD\r
+          CLC\r
+          ADC     #2\r
+          BNE     ADJXDONE               ; ALWAYS\r
+ADJXWEST: LDA     XTBL+ZBIRD\r
+          SEC\r
+          SBC     #2\r
+ADJXDONE: STA     XTBL+ZSHOT1,X          ;SET SHOT COORDINATES (SAME X AS BIRD)\r
+          STA     XTBL+SHOTSHAD,X        ;SHADOW IS SAME, TOO.\r
+\r
+*         ADJUST Y FOR GROUND, WATER, OR AIR\r
+          LDA     YTBL+ZBIRD             ;SAME Y AS BIRD\r
+          CMP     #ZYLIMLOW              ;BYTE SAVING POSSIBLE\r
+          BNE     ADJYAIR\r
+          BIT     SWIMMING\r
+          BMI     ADJYH2O                ; IF IN WATER\r
+          LDA     #7\r
+          BNE     ADJYDONE\r
+ADJYH2O:  LDA     #3\r
+          BNE     ADJYDONE               ;NEVER HAPPENS.  WHAT DA FUCK??\r
+ADJYAIR:  CLC                            ;WHAT GIVES FOLKS??\r
+          ADC     #1\r
+ADJYDONE: STA     YTBL+ZSHOT1,X\r
+\r
+          LDA     #ZBIRDZ+6              ;Z IS SAME FOR SHOT AND SHADOW\r
+          STA     ZTBL+ZSHOT1,X\r
+          STA     ZTBL+SHOTSHAD,X\r
+\r
+          LDA     #0                     ;Y OF SHADOW IS 0\r
+          STA     YTBL+SHOTSHAD,X\r
+\r
+NOHACK:   LDA     #$80                   ;SET SHOT STATUS\r
+          STA     SHOTSTAT,X\r
+\r
+          LDA     #SHOTAN0&$FF            ; INITIAL ANIMATION ADDRESS\r
+          STA     SLTBL+ZSHOT1,X\r
+          STA     SLTBL+SHOTSHAD,X\r
+\r
+\r
+*         CODE TO DO PROJECTION FOR NEW SHOT.  CALCULATES HP AND VP FROM X,Y,Z\r
+          LDA     XTBL+ZSHOT1,X\r
+          CLC\r
+          ADC     ZTBL+ZSHOT1,X\r
+          ADC     #(-NUMBER-7)&$FF     ;-7 IS HPOFF FOR BOTH SHOT ANIMATIONS\r
+          STA     HPTBL+ZSHOT1,X         ;HERE ARE THE SHOT AND SHADOW HP'S\r
+          STA     HPTBL+SHOTSHAD,X\r
+\r
+          LDA     XTBL+ZSHOT1,X\r
+          SEC\r
+          SBC     ZTBL+ZSHOT1,X\r
+          CLC\r
+          ADC     #NUMBER\r
+          STA     VPTBL+SHOTSHAD,X       ;HERE IS SHADOW VP\r
+          SEC\r
+          SBC     YTBL+ZSHOT1,X\r
+          STA     VPTBL+ZSHOT1,X         ;HERE IS SHOT VP\r
+\r
+* CALCULATE PRIORITY AND INSERT NEW SHOT IN OBJECT LIST\r
+          LDA     #$FE\r
+          STA     TEMP6                  ;PRIORITY OF SHADOW IS FE\r
+          STA     TEMP10\r
+          STX     TEMPX\r
+          TXA\r
+          CLC\r
+          ADC     #SHOTSHAD              ;INDEX OF SHADOW\r
+          TAX\r
+          JSR     OBJINS                 ;INSERT IT\r
+          LDX     TEMPX\r
+\r
+          LDA     ZTBL+ZSHOT1,X          ; Z-X+NUMBER+OFFSET\r
+          SEC\r
+          SBC     XTBL+ZSHOT1,X\r
+          CLC\r
+          ADC     #NUMBER+DXADJ          ; THIS IS DF\r
+          STA     TEMP10\r
+          SEC\r
+          SBC     #5                     ; THIS IS DS\r
+          STA     TEMP6                  ;PRIORITY OF SHOT\r
+          TXA\r
+          CLC\r
+          ADC     #ZSHOT1\r
+          TAX\r
+          JSR     OBJINS                 ; INSERT NEW SHOT IN LIST\r
+\r
+          LDA     #BRDSHOT               ; SOUND OF SHOT\r
+          JSR     TUNIN\r
+\r
+\r
+*         MOVE THE FOUR HERO SHOTS\r
+DONTFIRE:\r
+          LDX     #ZSHOT1+4              ; INDEX INTO OBJECT TABLES\r
+\r
+NEXTSHOT: DEX                            ;LOOP THROUGH ALL SHOTS\r
+          CPX     #ZSHOT1\r
+          BCS     DOSHOT\r
+\r
+* SETBACK IS NOT CALLED ANYMORE\r
+;         JSR     SETBACK                ; MOVE THIS TO MAIN LOOP\r
+          RTS                            ; DONE MOVING SHOTS\r
+\r
+DOSHOT:   LDA     SHOTSTAT-ZSHOT1,X\r
+          BEQ     NEXTSHOT               ; SHOT X IS INACTIVE\r
+\r
+* CODE TO ANIMATE SHOT (EXPLODE)\r
+          BMI     MOVESHOT               ;IF TOP BIT IS CLEAR, IT IS EXPLODING\r
+          DEC     SHOTSTAT-ZSHOT1,X\r
+\r
+          LDA     SHOTSTAT-ZSHOT1,X\r
+          BNE     DOSHOTAN\r
+JKILLSHT: JMP     KILLSHOT               ;REMOVE SHOT WHEN IT IS DONE EXPLODING\r
+\r
+DOSHOTAN: AND     #$3\r
+          BNE     NEXTSHOT\r
+          LDA     SLTBL,X                ;ADJUST LOW BYTE OF GRAPHICS\r
+          CLC\r
+          ADC     #2                     ; EXPLOSION STAMPS FOLLOW SHOT STAMPS\r
+          STA     SLTBL,X\r
+          STA     SLTBL+SHOTDIFF,X       ;SHADOW TOO!\r
+          JMP     NEXTSHOT\r
+\r
+* MOVE SHOT\r
+MOVESHOT:\r
+          LDA     ZTBL,X                 ; DO SHOT Z CALCULATION\r
+          CLC\r
+          ADC     QUIKSHOT               ;SHOTS MOVE THREE Z AT A TIME\r
+          STA     ZTBL,X\r
+          STA     ZTBL+SHOTDIFF,X\r
+\r
+          STA     COLPZ                  ; FOR COLLISION DETECTION CALLS BELOW\r
+\r
+          CMP     #ZBIRDZ+27             ; WAS 25\r
+          BCC     NOBIGGER\r
+\r
+          LDA     #(SHOTAN0+2)&$FF     ;THIS CORRECTS SHOT GRAPHICS WHEN THEY\r
+          STA     SLTBL,X              ;SHOULD BE MAX SIZE\r
+          STA     SLTBL+SHOTDIFF,X\r
+\r
+NOBIGGER: LDA     HPTBL,X                ;HP CHANGES BY THREE\r
+          CLC\r
+          ADC     QUIKSHOT\r
+          STA     HPTBL,X\r
+          STA     HPTBL+SHOTDIFF,X       ;SHADOW, TOO!\r
+\r
+          CMP     #160                   ; OFF RIGHT SIDE OF SCREEN?\r
+BKILLSHT: BCS     JKILLSHT\r
+\r
+          LDA     VPTBL,X                ;TAKE AWAY THREE FROM VP\r
+          SEC\r
+          SBC     QUIKSHOT\r
+          STA     VPTBL,X\r
+          CLC\r
+          ADC     YTBL,X\r
+          STA     VPTBL+SHOTDIFF,X\r
+\r
+          LDA     VPTBL+SHOTDIFF,X       ;DON'T FORGET THAT PESKY SHADOW\r
+          CMP     #SCRENBOT\r
+          BCC     NOKILLSH\r
+          CMP     #(-8)&$FF\r
+\r
+          BCS     BKILLSHT               ;THIS BCS'S TO ANOTHER BCS\r
+\r
+NOKILLSH: LDA     DXTBL,X\r
+;         CLC\r
+          ADC     QUIKSHOT\r
+          STA     TEMP6\r
+\r
+          LDA     DFTBL,X\r
+          CLC\r
+          ADC     QUIKSHOT\r
+          STA     TEMP10\r
+\r
+          JSR     OBJMOV                 ; MOVE SHOT IN LIST\r
+\r
+\r
+*         DO COLLISION DETECTION FOR SHOT\r
+          LDA     XTBL,X                 ;CHECK X,Y,Z\r
+          STA     COLPX\r
+          LDA     YTBL,X\r
+          STA     COLPY\r
+          STX     TEMP0                  ;X HERE IS SHOT INDEX\r
+          JSR     COLDET                 ;IN THE COLLISION LIST\r
+          BNE     ASHOTT                 ;YES, A COLLISION\r
+          LDX     TEMP0\r
+\r
+          LDA     COLPZ\r
+          SEC\r
+          SBC     QUIKSHOT\r
+          STA     COLPZ\r
+          JSR     COLDET\r
+          BNE     ASHOTT\r
+SAVESHOT: LDX     TEMP0\r
+\r
+          JMP     NEXTSHOT\r
+\r
+\r
+*         INITIATE SHOT EXPLOSION ANIMATION\r
+EXPLSHOT:\r
+          LDX     TEMP0\r
+          LDA     #RICCHET               ; CALL SOUND OF SHOT RICCOCHET\r
+          JSR     TUNIN\r
+          LDA     #$8                    ; INITIAL EXPLOSION STATE + 1\r
+          STA     SHOTSTAT-ZSHOT1,X\r
+          LDA     #(SHOTAN0+4)&$FF     ;GRAPHICS FOR SPLAT\r
+          STA     SLTBL,X\r
+          STA     SLTBL+SHOTDIFF,X\r
+          JMP     NEXTSHOT               ;LOOP FOR NEXT SHOT\r
+\r
+\r
+*         DETEMINE WHAT THE SHOT COLLIDED WITH AND ACT APPROPRIATELY\r
+ASHOTT:\r
+       BIT     AUTOPLAY                ;!!!!!!!!!!!!\r
+       BPL     .SKIP\r
+          JSR     KILLSPHX\r
+          JMP     EXPLSHOT\r
+;\r
+.SKIP:\r
+          CMP     #FLEACOL               ;HOW ABOUT A FLEA?\r
+          BNE     ASHOT1\r
+;\r
+       lda     FLEANIM-FLEADEX,x               ;Is flea blowing up?\r
+       cmp     #15\r
+       bcc     .ok1\r
+       cmp     #24\r
+       bcc     .noHit\r
+       cmp     #29\r
+       bcc     .ok1\r
+       cmp     #33\r
+       bcc     .noHit\r
+       cmp     #37\r
+       bcc     .ok1\r
+       cmp     #41\r
+       bcs     .ok1\r
+.noHit:        jmp     EXPLSHOT                ;If blowing up, no hit.\r
+.ok1:\r
+;\r
+          JSR     KILLFLEA               ;BLOW FLEAS DOORS OFF\r
+          BIT     TRDSPFLG               ;IF DISPLAY ALREADY UP THEN DON'T\r
+          BMI     EXPLSHOT               ;PUT IT UP AGAIN\r
+          JSR     INITRSMP               ;PUT UP TREASURE DISPLAY\r
+          JMP     EXPLSHOT\r
+\r
+ASHOT1:   CMP     #UWECOL                ;WHAT ABOUT A UWE\r
+          BNE     ASHOT2\r
+       lda     WANIMCNT-UWEDEX,x       ;Is the uwe exploding?\r
+       cmp     #13                     ;If yes, don't kill again.\r
+       bcc     .ok1\r
+       jmp     SAVESHOT\r
+.ok1:\r
+          JSR     KILLUWE\r
+          JMP     EXPLSHOT\r
+\r
+ASHOT2:   CMP     #MINICOL               ;A MINI SPHINX?\r
+          BNE     ASHOT3\r
+          JSR     MINIKILL\r
+          JMP     EXPLSHOT\r
+\r
+ASHOT3:   CMP     #SPHNXCOL              ;THE BIG SPHINX?\r
+          BNE     ASHOT4\r
+;\r
+       BIT     AUTOPLAY                ;DON'T KILL SPHINX IN AUTOPLAY.\r
+       BMI     .SKIP                   ;!!!!!!!!!!\r
+;\r
+       JSR     KILLSPHX\r
+.SKIP: JMP     EXPLSHOT\r
+\r
+ASHOT4:   CMP     #FIRECOL               ; FIRE??????\r
+          BNE     ASHOT5\r
+          JMP     SAVESHOT               ; DON'T EXPLODE IT\r
+\r
+ASHOT5:   CMP     #TREASCOL              ; A TREASURE ????\r
+          BCC     ASHOT6                 ; NO\r
+          CMP     #TREASCOL+3\r
+          BCS     ASHOT6                 ; NO\r
+          JSR     HITTREAS               ; YES\r
+          JMP     EXPLSHOT\r
+\r
+ASHOT6:   JMP     EXPLSHOT\r
+\r
+*         CHANGE SHOT TO INACTIVE STATE\r
+KILLSHOT: LDA     #0                     ;RESET SHOTSTAT\r
+          STA     SHOTSTAT-ZSHOT1,X\r
+\r
+          JSR     OBJDEL                 ;REMOVE SHOT FROM LIST\r
+\r
+          STX     TEMPX\r
+          TXA\r
+          CLC\r
+          ADC     #SHOTDIFF\r
+          TAX\r
+          JSR     OBJDEL                 ;REMOVE SHADOW FROM LIST\r
+          LDX     TEMPX\r
+          JMP     NEXTSHOT\r
+          RTS\r
+\r
+*         SIMULATAED GAMEPLAY FROM AUTOPLAY\r
+JOYSIM:   .dc.b      $F0,$F0,$F0,$D0,$70,$D0,$E0,$50,$60,$70,$90,$A0,$B0,$D0,$E0\r
+          .dc.b      $F0\r
+\r
+; TABLE TO TRANSLATE SWCHA TO ACTION, HIGH NIBBLE FOR NEAR GROUND\r
+;\r
+JOYTBL:   .dc.b      $00                   ; N S W E - ILLEGAL\r
+          .dc.b      $00                   ;   S W E - ILLEGAL\r
+          .dc.b      $00                   ; N   W E - ILLEGAL\r
+          .dc.b      $00                   ;     W E - ILLEGAL\r
+          .dc.b      $00                   ; N S   E - ILLEGAL\r
+          .dc.b      $B7                   ;   S   E\r
+          .dc.b      $E5                   ; N     E\r
+          .dc.b      $C3                   ;       E\r
+          .dc.b      $00                   ; N S W   - ILLEGAL\r
+          .dc.b      $B8                   ;   S W\r
+          .dc.b      $F6                   ; N   W\r
+          .dc.b      $D4                   ;     W\r
+          .dc.b      $00                   ; N S     - ILLEGAL\r
+          .dc.b      $B2                   ;   S\r
+          .dc.b      $A1                   ; N\r
+          .dc.b      $90                   ; NONE\r
+\r
+; TABLE TO TRANSLATE STATE AND ACTION INTO NEW STATE (HIGH) AND CONTROL CODE\r
+;\r
+STATETBL: .dc.b      $10                   ; F0 A     FLIGHT STATES\r
+          .dc.b      $11                   ; F0 AN\r
+          .dc.b      $12                   ; F0 AS\r
+          .dc.b      $13                   ; F0 AE\r
+          .dc.b      $13                   ; F0 AW\r
+          .dc.b      $14                   ; F0 ANE\r
+          .dc.b      $14                   ; F0 ANW\r
+          .dc.b      $15                   ; F0 ASE\r
+          .dc.b      $15                   ; F0 ASW\r
+          .dc.b      $16                   ; F0 G\r
+          .dc.b      $16                   ; F0 GN\r
+          .dc.b      $12                   ; F0 GS,GSE,GSW\r
+          .dc.b      $16                   ; F0 GE\r
+          .dc.b      $16                   ; F0 GW\r
+          .dc.b      $16                   ; F0 GNE\r
+          .dc.b      $16                   ; F0 GNW\r
+          .dc.b      $20                   ; F1 A\r
+          .dc.b      $11                   ; F1 AN\r
+          .dc.b      $22                   ; F1 AS\r
+          .dc.b      $23                   ; F1 AE\r
+          .dc.b      $23                   ; F1 AW\r
+          .dc.b      $14                   ; F1 ANE\r
+          .dc.b      $14                   ; F1 ANW\r
+          .dc.b      $25                   ; F1 ASE\r
+          .dc.b      $25                   ; F1 ASW\r
+          .dc.b      $26                   ; F1 G\r
+          .dc.b      $47                   ; F1 GN\r
+          .dc.b      $22                   ; F1 GS,GSE,GSW\r
+          .dc.b      $26                   ; F1 GE\r
+          .dc.b      $26                   ; F1 GW\r
+          .dc.b      $47                   ; F1 GNE\r
+          .dc.b      $47                   ; F1 GNW\r
+          .dc.b      $30                   ; F2 A\r
+          .dc.b      $31                   ; F2 AN\r
+          .dc.b      $32                   ; F2 AS\r
+          .dc.b      $33                   ; F2 AE\r
+          .dc.b      $33                   ; F2 AW\r
+          .dc.b      $34                   ; F2 ANE\r
+          .dc.b      $34                   ; F2 ANW\r
+          .dc.b      $35                   ; F2 ASE\r
+          .dc.b      $35                   ; F2 ASW\r
+          .dc.b      $36                   ; F2 G\r
+          .dc.b      $36                   ; F2 GN\r
+          .dc.b      $32                   ; F2 GS,GSE,GSW\r
+          .dc.b      $36                   ; F2 GE\r
+          .dc.b      $36                   ; F2 GW\r
+          .dc.b      $36                   ; F2 GNE\r
+          .dc.b      $36                   ; F2 GNW\r
+          .dc.b      $00                   ; F3 A\r
+          .dc.b      $01                   ; F3 AN\r
+          .dc.b      $02                   ; F3 AS\r
+          .dc.b      $03                   ; F3 AE\r
+          .dc.b      $03                   ; F3 AW\r
+          .dc.b      $04                   ; F3 ANE\r
+          .dc.b      $04                   ; F3 ANW\r
+          .dc.b      $05                   ; F3 ASE\r
+          .dc.b      $05                   ; F3 ASW\r
+          .dc.b      $06                   ; F3 G\r
+          .dc.b      $06                   ; F3 GN\r
+          .dc.b      $02                   ; F3 GS,GSE,GSW\r
+          .dc.b      $06                   ; F3 GE\r
+          .dc.b      $06                   ; F3 GW\r
+          .dc.b      $06                   ; F3 GNE\r
+          .dc.b      $06                   ; F3 GNW\r
+          .dc.b      $58                   ; S0 A     STALL STATES\r
+          .dc.b      $58                   ; S0 AN\r
+          .dc.b      $3F                   ; S0 AS\r
+          .dc.b      $58                   ; S0 AE\r
+          .dc.b      $58                   ; S0 AW\r
+          .dc.b      $58                   ; S0 ANE\r
+          .dc.b      $58                   ; S0 ANW\r
+          .dc.b      $3F                   ; S0 ASE\r
+          .dc.b      $3F                   ; S0 ASW\r
+          .dc.b      $58                   ; S0 G\r
+          .dc.b      $58                   ; S0 GN\r
+          .dc.b      $3F                   ; S0 GS,GSE,GSW\r
+          .dc.b      $58                   ; S0 GE\r
+          .dc.b      $58                   ; S0 GW\r
+          .dc.b      $58                   ; S0 GNE\r
+          .dc.b      $58                   ; S0 GNW\r
+          .dc.b      $49                   ; S1 A\r
+          .dc.b      $69                   ; S1 AN\r
+          .dc.b      $49                   ; S1 AS\r
+          .dc.b      $49                   ; S1 AE\r
+          .dc.b      $49                   ; S1 AW\r
+          .dc.b      $69                   ; S1 ANE\r
+          .dc.b      $69                   ; S1 ANW\r
+          .dc.b      $49                   ; S1 ASE\r
+          .dc.b      $49                   ; S1 ASW\r
+          .dc.b      $49                   ; S1 G\r
+          .dc.b      $69                   ; S1 GN\r
+          .dc.b      $49                   ; S1 GS,GSE,GSW\r
+          .dc.b      $49                   ; S1 GE\r
+          .dc.b      $49                   ; S1 GW\r
+          .dc.b      $69                   ; S1 GNE\r
+          .dc.b      $69                   ; S1 GNW\r
+          .dc.b      $7B                   ; L0 A     LANDING STATES\r
+          .dc.b      $7B                   ; L0 AN\r
+          .dc.b      $CF                   ; L0 AS\r
+          .dc.b      $7B                   ; L0 AE\r
+          .dc.b      $7B                   ; L0 AW\r
+          .dc.b      $7B                   ; L0 ANE\r
+          .dc.b      $7B                   ; L0 ANW\r
+          .dc.b      $CF                   ; L0 ASE\r
+          .dc.b      $CF                   ; L0 ASW\r
+          .dc.b      $7B                   ; L0 G\r
+          .dc.b      $7B                   ; L0 GN\r
+          .dc.b      $CF                   ; L0 GS,GSE,GSW\r
+          .dc.b      $7B                   ; L0 GE\r
+          .dc.b      $7B                   ; L0 GW\r
+          .dc.b      $7B                   ; L0 GNE\r
+          .dc.b      $7B                   ; L0 GNW\r
+          .dc.b      $8C                   ; L1 A\r
+          .dc.b      $8C                   ; L1 AN\r
+          .dc.b      $BF                   ; L1 AS\r
+          .dc.b      $8C                   ; L1 AE\r
+          .dc.b      $8C                   ; L1 AW\r
+          .dc.b      $8C                   ; L1 ANE\r
+          .dc.b      $8C                   ; L1 ANW\r
+          .dc.b      $BF                   ; L1 ASE\r
+          .dc.b      $BF                   ; L1 ASW\r
+          .dc.b      $8C                   ; L1 G\r
+          .dc.b      $8C                   ; L1 GN\r
+          .dc.b      $BF                   ; L1 GS,GSE,GSW\r
+          .dc.b      $8C                   ; L1 GE\r
+          .dc.b      $8C                   ; L1 GW\r
+          .dc.b      $8C                   ; L1 GNE\r
+          .dc.b      $8C                   ; L1 GNW\r
+          .dc.b      $8D                   ; H0 A     HOPPING STATES\r
+          .dc.b      $8E                   ; H0 AN\r
+          .dc.b      $AF                   ; H0 AS\r
+          .dc.b      $8E                   ; H0 AE\r
+          .dc.b      $8E                   ; H0 AW\r
+          .dc.b      $8E                   ; H0 ANE\r
+          .dc.b      $8E                   ; H0 ANW\r
+          .dc.b      $AF                   ; H0 ASE\r
+          .dc.b      $AF                   ; H0 ASW\r
+          .dc.b      $8D                   ; H0 G\r
+          .dc.b      $9D                   ; H0 GN\r
+          .dc.b      $9D                   ; H0 GS,GSE,GSW\r
+          .dc.b      $9D                   ; H0 GE\r
+          .dc.b      $9D                   ; H0 GW\r
+          .dc.b      $9D                   ; H0 GNE\r
+          .dc.b      $9D                   ; H0 GNW\r
+          .dc.b      $8D                   ; H1 A\r
+          .dc.b      $8E                   ; H1 AN\r
+          .dc.b      $8E                   ; H1 AS\r
+          .dc.b      $8E                   ; H1 AE\r
+          .dc.b      $8E                   ; H1 AW\r
+          .dc.b      $8E                   ; H1 ANE\r
+          .dc.b      $8E                   ; H1 ANW\r
+          .dc.b      $8E                   ; H1 ASE\r
+          .dc.b      $8E                   ; H1 ASW\r
+          .dc.b      $8E                   ; H1 G\r
+          .dc.b      $8E                   ; H1 GN\r
+          .dc.b      $AF                   ; H1 GS,GSE,GSW  WAS 8E\r
+          .dc.b      $8E                   ; H1 GE\r
+          .dc.b      $8E                   ; H1 GW\r
+          .dc.b      $8E                   ; H1 GNE\r
+          .dc.b      $8E                   ; H1 GNW\r
+          .dc.b      $8F                   ; T0 A     TAKE-OFF STATES\r
+          .dc.b      $8F                   ; T0 AN\r
+          .dc.b      $BC                   ; T0 AS\r
+          .dc.b      $8F                   ; T0 AE\r
+          .dc.b      $8F                   ; T0 AW\r
+          .dc.b      $8F                   ; T0 ANE\r
+          .dc.b      $8F                   ; T0 ANW\r
+          .dc.b      $BC                   ; T0 ASE\r
+          .dc.b      $BC                   ; T0 ASW\r
+          .dc.b      $8F                   ; T0 G\r
+          .dc.b      $8F                   ; T0 GN\r
+          .dc.b      $BC                   ; T0 GS,GSE,GSW\r
+          .dc.b      $8F                   ; T0 GE\r
+          .dc.b      $8F                   ; T0 GW\r
+          .dc.b      $8F                   ; T0 GNE\r
+          .dc.b      $8F                   ; T0 GNW\r
+          .dc.b      $7F                   ; T1 A\r
+          .dc.b      $7F                   ; T1 AN\r
+          .dc.b      $CB                   ; T1 AS\r
+          .dc.b      $7F                   ; T1 AE\r
+          .dc.b      $7F                   ; T1 AW\r
+          .dc.b      $7F                   ; T1 ANE\r
+          .dc.b      $7F                   ; T1 ANW\r
+          .dc.b      $CB                   ; T1 ASE\r
+          .dc.b      $CB                   ; T1 ASW\r
+          .dc.b      $7F                   ; T1 G\r
+          .dc.b      $7F                   ; T1 GN\r
+          .dc.b      $CB                   ; T1 GS,GSE,GSW\r
+          .dc.b      $7F                   ; T1 GE\r
+          .dc.b      $7F                   ; T1 GW\r
+          .dc.b      $7F                   ; T1 GNE\r
+          .dc.b      $7F                   ; T1 GNW\r
+          .dc.b      $4F                   ; T2 A\r
+          .dc.b      $6F                   ; T2 AN\r
+          .dc.b      $2A                   ; T2 AS\r
+          .dc.b      $4F                   ; T2 AE\r
+          .dc.b      $4F                   ; T2 AW\r
+          .dc.b      $6F                   ; T2 ANE\r
+          .dc.b      $6F                   ; T2 ANW\r
+          .dc.b      $2A                   ; T2 ASE\r
+          .dc.b      $2A                   ; T2 ASW\r
+          .dc.b      $4F                   ; T2 G\r
+          .dc.b      $6F                   ; T2 GN\r
+          .dc.b      $2A                   ; T2 GS,GSE,GSW\r
+          .dc.b      $4F                   ; T2 GE\r
+          .dc.b      $4F                   ; T2 GW\r
+          .dc.b      $6F                   ; T2 GNE\r
+          .dc.b      $6F                   ; T2 GNW\r
+\r
+; TABLE TO TRANSLATE STATE AND ACTION TO ANIMATION NUMBER\r
+;\r
+BIRDATBL: .dc.b      $80                    ;F0\r
+          .dc.b      $90                    ;F1\r
+          .dc.b      $80                    ;F2\r
+          .dc.b      $A0                    ;F3\r
+          .dc.b      $A                     ;S0\r
+          .dc.b      $9                     ;S1\r
+          .dc.b      $B                     ;L0\r
+          .dc.b      $C                     ;L1\r
+          .dc.b      $B0                    ;H0\r
+          .dc.b      $C0                    ;H1\r
+          .dc.b      $13                    ;T0\r
+          .dc.b      $14                    ;T1\r
+          .dc.b      $15                    ;T2\r
+\r
+BIRDAI:   .dc.b      $0                     ; F0 A\r
+          .dc.b      $0                     ; F0 AN\r
+          .dc.b      $0                     ; F0 AS\r
+          .dc.b      $3                     ; F0 AE\r
+          .dc.b      $6                     ; F0 AW\r
+          .dc.b      $3                     ; F0 ANE\r
+          .dc.b      $6                     ; F0 ANW\r
+          .dc.b      $3                     ; F0 ASE\r
+          .dc.b      $6                     ; F0 ASW\r
+          .dc.b      $0                    ; F0 G\r
+          .dc.b      $0                    ; F0 GN\r
+          .dc.b      $0                    ; F0 GS,GSE,GSW\r
+          .dc.b      $3                    ; F0 GE\r
+          .dc.b      $6                    ; F0 GW\r
+          .dc.b      $3                    ; F0 GNE\r
+          .dc.b      $6                    ; F0 GNW\r
+          .dc.b      $1                     ; F1 A\r
+          .dc.b      $1                     ; F1 AN\r
+          .dc.b      $1                     ; F1 AS\r
+          .dc.b      $4                     ; F1 AE\r
+          .dc.b      $7                     ; F1 AW\r
+          .dc.b      $4                     ; F1 ANE\r
+          .dc.b      $7                     ; F1 ANW\r
+          .dc.b      $4                     ; F1 ASE\r
+          .dc.b      $7                     ; F1 ASW\r
+          .dc.b      $1                    ; F1 G\r
+          .dc.b      $1                    ; F1 GN\r
+          .dc.b      $1                    ; F1 GS,GSE,GSW\r
+          .dc.b      $4                    ; F1 GE\r
+          .dc.b      $7                    ; F1 GW\r
+          .dc.b      $4                    ; F1 GNE\r
+          .dc.b      $7                    ; F1 GNW\r
+          .dc.b      $2                     ; F3 A\r
+          .dc.b      $2                     ; F3 AN\r
+          .dc.b      $2                     ; F3 AS\r
+          .dc.b      $5                     ; F3 AE\r
+          .dc.b      $8                     ; F3 AW\r
+          .dc.b      $5                     ; F3 ANE\r
+          .dc.b      $8                     ; F3 ANW\r
+          .dc.b      $5                     ; F3 ASE\r
+          .dc.b      $8                     ; F3 ASW\r
+          .dc.b      $2                    ; F3 G\r
+          .dc.b      $2                    ; F3 GN\r
+          .dc.b      $2                    ; F3 GS,GSE,GSW\r
+          .dc.b      $5                    ; F3 GE\r
+          .dc.b      $8                    ; F3 GW\r
+          .dc.b      $5                    ; F3 GNE\r
+          .dc.b      $8                    ; F3 GNW\r
+          .dc.b      $96                   ; H0 A\r
+          .dc.b      $97                   ; H0 AN\r
+          .dc.b      $96                   ; H0 AS\r
+          .dc.b      $98                   ; H0 AE\r
+          .dc.b      $99                   ; H0 AW\r
+          .dc.b      $9A                   ; H0 ANE\r
+          .dc.b      $9B                   ; H0 ANW\r
+          .dc.b      $96                   ; H0 ASE\r
+          .dc.b      $96                   ; H0 ASW\r
+          .dc.b      $E                    ; H0 G\r
+          .dc.b      $E                    ; H0 GN\r
+          .dc.b      $E                    ; H0 GS,GSE,GSW\r
+          .dc.b      $10                   ; H0 GE\r
+          .dc.b      $12                   ; H0 GW\r
+          .dc.b      $10                   ; H0 GNE\r
+          .dc.b      $12                   ; H0 GNW\r
+          .dc.b      $D                    ; H1 A\r
+          .dc.b      $D                    ; H1 AN\r
+          .dc.b      $D                    ; H1 AS\r
+          .dc.b      $F                    ; H1 AE\r
+          .dc.b      $11                   ; H1 AW\r
+          .dc.b      $F                    ; H1 ANE\r
+          .dc.b      $11                   ; H1 ANW\r
+          .dc.b      $D                    ; H1 ASE\r
+          .dc.b      $D                    ; H1 ASW\r
+          .dc.b      $D                    ; H1 G\r
+          .dc.b      $D                    ; H1 GN\r
+          .dc.b      $D                    ; H1 GS,GSE,GSW\r
+          .dc.b      $F                    ; H1 GE\r
+          .dc.b      $11                   ; H1 GW\r
+          .dc.b      $F                    ; H1 GNE\r
+          .dc.b      $11                   ; H1 GNW\r
+\r
+; TABLE TO TRANSLATE CONTROL CODE INTO SCROLLING RATE\r
+;\r
+SCRATBL:  .dc.b      -1                     ; NORMAL FLIGHT\r
+          .dc.b      -1                     ; DIVING\r
+          .dc.b      -1                     ; CLIMBING\r
+          .dc.b      -1                     ; TURNING\r
+          .dc.b      -1                     ; DIVING + TURNING\r
+          .dc.b      -1                     ; CLIMBING + TURNING\r
+          .dc.b      2                      ; LAST FLAP     THESE ARE ABSOLUTE\r
+          .dc.b      2                      ; LAST GLIDE\r
+          .dc.b      1                      ; STALL 0\r
+          .dc.b      1                      ; STALL 1\r
+          .dc.b      1                      ; H = 3\r
+          .dc.b      1                      ; H = 2\r
+          .dc.b      1                      ; H = 1\r
+          .dc.b      0                      ; STAND\r
+          .dc.b      2                      ; HOP\r
+          .dc.b      0                      ; STAY          NO CHANGE\r
+\r
+; TABLE TO TRANSLATE CONTROL CODE INTO ANIMATION DELAY\r
+;\r
+ADELTBL:  .dc.b      3                      ; NORMAL FLIGHT\r
+          .dc.b      2                      ; DIVING\r
+          .dc.b      2                      ; CLIMBING\r
+          .dc.b      3                      ; TURNING\r
+          .dc.b      2                      ; DIVING + TURNING\r
+          .dc.b      2                      ; CLIMBING + TURNING\r
+          .dc.b      4                      ; LAST FLAP\r
+          .dc.b      2                      ; LAST GLIDE\r
+          .dc.b      3                      ; STALL 0\r
+          .dc.b      3                      ; STALL 1\r
+          .dc.b      2                      ; H = 3\r
+          .dc.b      2                      ; H = 2\r
+          .dc.b      3                      ; H = 1\r
+          .dc.b      2                      ; STAND\r
+          .dc.b      2                      ; HOP\r
+          .dc.b      2                      ; STAY       WAS 1\r
+\r
+; TABLE TO TRANSLATE CONTROL CODE INTO X UPDATE DELAY\r
+;\r
+XDELTBL:  .dc.b      0                      ; NORMAL FLIGHT\r
+          .dc.b      0                      ; DIVING\r
+          .dc.b      0                      ; CLIMBING\r
+          .dc.b      1                      ; TURNING\r
+          .dc.b      1                      ; DIVING + TURNING\r
+          .dc.b      1                      ; CLIMBING + TURNING\r
+          .dc.b      1                      ; LAST FLAP\r
+          .dc.b      1                      ; LAST GLIDE\r
+          .dc.b      2                      ; STALL 0\r
+          .dc.b      2                      ; STALL 1\r
+          .dc.b      0                      ; H = 3\r
+          .dc.b      0                      ; H = 2\r
+          .dc.b      0                      ; H = 1\r
+          .dc.b      2                      ; STAND\r
+          .dc.b      2                      ; HOP\r
+          .dc.b      2                      ; STAY\r
+\r
+; TABLE TO TRANSLATE CONTROL CODE INTO Y UPDATE MODES\r
+\r
+;         0       DON'T UPDATE Y\r
+;         -1      INCREMENT OR DECREMENT Y DEPENDING ON JOYSTICK\r
+;         N > 0   SET Y TO N\r
+YMODTBL:  .dc.b      0                      ; NORMAL FLIGHT\r
+          .dc.b      -1                     ; DIVING\r
+          .dc.b      -1                     ; CLIMBING\r
+          .dc.b      0                      ; TURNING\r
+          .dc.b      -1                     ; DIVING + TURNING\r
+          .dc.b      -1                     ; CLIMBING + TURNING\r
+          .dc.b      (ZYLIMLOW+4)&$FF             ; LAST FLAP\r
+          .dc.b      (ZYLIMLOW+4)&$FF             ; LAST GLIDE\r
+          .dc.b      (ZYLIMLOW+3)&$FF             ; STALL 0\r
+          .dc.b      (ZYLIMLOW+3)&$FF             ; STALL 1\r
+          .dc.b      (ZYLIMLOW+6)&$FF             ; H = 6\r
+          .dc.b      (ZYLIMLOW+3)&$FF             ; H = 3\r
+          .dc.b      (ZYLIMLOW+1)&$FF             ; H = 1\r
+          .dc.b      (ZYLIMLOW)&$FF               ; STAND\r
+          .dc.b      (ZYLIMLOW)&$FF               ; HOP\r
+          .dc.b      0                      ; STAY\r
+\r
+; TABLE TO TRANSLATE ANIMATION NUMBER TO BIRD ANIMATION ADDRESS\r
+;\r
+BIRDANAD: .dc.b      BIRDFMS&$FF             ; 0\r
+          .dc.b      BIRDFUS&$FF             ; 1\r
+          .dc.b      BIRDFDS&$FF             ; 2\r
+          .dc.b      BIRDFMR&$FF             ; 3\r
+          .dc.b      BIRDFUR&$FF             ; 4\r
+          .dc.b      BIRDFDR&$FF             ; 5\r
+          .dc.b      BIRDFML&$FF             ; 6\r
+          .dc.b      BIRDFUL&$FF             ; 7\r
+          .dc.b      BIRDFDL&$FF             ; 8\r
+          .dc.b      BIRDSU&$FF              ; 9\r
+          .dc.b      BIRDSD&$FF              ; A\r
+          .dc.b      BIRDLU&$FF              ; B\r
+          .dc.b      BIRDLD&$FF              ; C\r
+          .dc.b      BIRDHUS&$FF             ; D\r
+          .dc.b      BIRDHDS&$FF             ; E\r
+          .dc.b      BIRDHUR&$FF             ; F\r
+          .dc.b      BIRDHDR&$FF             ; 10\r
+          .dc.b      BIRDHUL&$FF             ; 11\r
+          .dc.b      BIRDHDL&$FF             ; 12\r
+          .dc.b      BIRDTU1&$FF             ; 13\r
+          .dc.b      BIRDTD&$FF              ; 14\r
+          .dc.b      BIRDTU2&$FF             ; 15\r
+          .dc.b      BIRDWS&$FF             ; 16\r
+          .dc.b      BIRDWS&$FF             ; 17\r
+          .dc.b      BIRDWR&$FF             ; 18\r
+          .dc.b      BIRDWL&$FF             ; 19\r
+          .dc.b      BIRDWR&$FF             ; 1A\r
+          .dc.b      BIRDWL&$FF             ; 1B\r
+\r
+; TABLE TO TRANSLATE ANIMATION NUMBER TO SHADOW ANIMATION ADDRESS\r
+;\r
+SHADANAD: .dc.b      BIRDFMS&$FF             ; 0\r
+          .dc.b      BIRDFUS&$FF             ; 1\r
+          .dc.b      BIRDFDS&$FF             ; 2\r
+          .dc.b      BIRDFMR&$FF             ; 3\r
+          .dc.b      BIRDFUR&$FF             ; 4\r
+          .dc.b      BIRDFDR&$FF             ; 5\r
+          .dc.b      BIRDFML&$FF             ; 6\r
+          .dc.b      BIRDFUL&$FF             ; 7\r
+          .dc.b      BIRDFDL&$FF             ; 8\r
+          .dc.b      SHADSU&$FF              ; 9\r
+          .dc.b      SHADSD&$FF              ; A\r
+          .dc.b      BIRDLU&$FF              ; B\r
+          .dc.b      BIRDLD&$FF              ; C\r
+          .dc.b      SHADHUS&$FF              ; D\r
+          .dc.b      SHADHDS&$FF              ; E\r
+          .dc.b      SHADHUR&$FF              ; F\r
+          .dc.b      SHADHDR&$FF              ; 10\r
+          .dc.b      SHADHUL&$FF              ; 11\r
+          .dc.b      SHADHDL&$FF              ; 12\r
+          .dc.b      BIRDTU1&$FF             ; 13\r
+          .dc.b      BIRDTD&$FF              ; 14\r
+          .dc.b      BIRDTU2&$FF             ; 15\r
+          .dc.b      UWEBLANK&$FF            ; 16\r
+          .dc.b      UWEBLANK&$FF            ; 17\r
+          .dc.b      UWEBLANK&$FF            ; 18\r
+          .dc.b      UWEBLANK&$FF            ; 19\r
+          .dc.b      UWEBLANK&$FF            ; 1A\r
+          .dc.b      UWEBLANK&$FF            ; 1B\r
+\r
+DOFF1     EQU     0\r
+DOFF2     EQU     2\r
+DOFF3     EQU     5\r
+DOFF4     EQU     7\r
+DOFF5     EQU     8\r
+DOFF6     EQU     8\r
+\r
+; TABLE TO TRANSLATE ANIMATION NUMBER TO BIRD HORIZONAL POSITION OFFSET\r
+;         - NUMBER + OFFSET\r
+BHPOFF:   .dc.b      (-NUMBER-7)              ; 0\r
+          .dc.b      (-NUMBER-7)             ; 1\r
+          .dc.b      (-NUMBER-7)             ; 2\r
+          .dc.b      (-NUMBER-7)             ; 3\r
+          .dc.b      (-NUMBER-7)             ; 4\r
+          .dc.b      (-NUMBER-7)             ; 5\r
+          .dc.b      (-NUMBER-7)             ; 6\r
+          .dc.b      (-NUMBER-7)             ; 7\r
+          .dc.b      (-NUMBER-7)             ; 8\r
+          .dc.b      (-NUMBER-7)             ; 9\r
+          .dc.b      (-NUMBER-7)             ; A\r
+          .dc.b      (-NUMBER-8)             ; B\r
+          .dc.b      (-NUMBER-7)             ; C\r
+          .dc.b      (-NUMBER-7)             ; D\r
+          .dc.b      (-NUMBER-7)             ; E\r
+          .dc.b      (-NUMBER-6)             ; F\r
+          .dc.b      (-NUMBER-6)             ; 10\r
+          .dc.b      (-NUMBER-7)             ; 11\r
+          .dc.b      (-NUMBER-7)             ; 12\r
+          .dc.b      (-NUMBER-7)             ; 13\r
+          .dc.b      (-NUMBER-7)             ; 14\r
+          .dc.b      (-NUMBER-7)             ; 15\r
+          .dc.b      (-NUMBER-7)             ; 16\r
+          .dc.b      (-NUMBER-7)             ; 17\r
+          .dc.b      (-NUMBER-7)             ; 18\r
+          .dc.b      (-NUMBER-7)             ; 19\r
+          .dc.b      (-NUMBER-7)             ; 1A\r
+          .dc.b      (-NUMBER-7)             ; 1B\r
+          .dc.b      (-NUMBER-7-DOFF1)    ;D1\r
+          .dc.b      (-NUMBER-7-DOFF2)    ;D2\r
+          .dc.b      (-NUMBER-7-DOFF3)    ;D3\r
+          .dc.b      (-NUMBER-7-DOFF4)    ;D4\r
+          .dc.b      (-NUMBER-7-DOFF5)    ;D5\r
+          .dc.b      (-NUMBER-7-DOFF6)    ;D6\r
+          .dc.b      (-NUMBER-7-DOFF5)    ;D5\r
+          .dc.b      (-NUMBER-7-DOFF6)    ;D6\r
+          .dc.b      (-NUMBER-7-DOFF5)    ;D5\r
+          .dc.b      (-NUMBER-7-DOFF6)    ;D6\r
+\r
+; TABLE TO TRANSLATE ANIMATION NUMBER TO BIRD VERTICAL POSITION OFFSET\r
+;         NUMBER + OFFSET\r
+BVPOFF:   .dc.b      (NUMBER-7)&$FF              ; 0\r
+          .dc.b      (NUMBER-7)&$FF          ; 1\r
+          .dc.b      (NUMBER-7)&$FF          ; 2\r
+          .dc.b      (NUMBER-8)&$FF          ; 3\r
+          .dc.b      (NUMBER-8)&$FF          ; 4\r
+          .dc.b      (NUMBER-6)&$FF               ; 5\r
+          .dc.b      (NUMBER-4)&$FF               ; 6\r
+          .dc.b      (NUMBER-4)&$FF               ; 7\r
+          .dc.b      (NUMBER-5)&$FF               ; 8\r
+          .dc.b      (NUMBER-8)&$FF               ; 9\r
+          .dc.b      (NUMBER-8)&$FF               ; A\r
+          .dc.b      (NUMBER-4)&$FF               ; B\r
+          .dc.b      (NUMBER-4)&$FF               ; C\r
+          .dc.b      (NUMBER-7)&$FF               ; D\r
+          .dc.b      (NUMBER-7)&$FF               ; E\r
+          .dc.b      (NUMBER-9)&$FF               ; F\r
+          .dc.b      (NUMBER-7)&$FF               ; 10 WAS -8\r
+          .dc.b      (NUMBER-9)&$FF               ; 11\r
+          .dc.b      (NUMBER-8)&$FF               ; 12\r
+          .dc.b      (NUMBER-9)&$FF               ; 13\r
+          .dc.b      (NUMBER-6)&$FF               ; 14\r
+          .dc.b      (NUMBER-7)&$FF               ; 15\r
+          .dc.b      (NUMBER-4)&$FF               ; 16\r
+          .dc.b      (NUMBER-4)&$FF               ; 17\r
+          .dc.b      (NUMBER-7)&$FF               ; 18\r
+          .dc.b      (NUMBER-7)&$FF               ; 19\r
+          .dc.b      (NUMBER-7)&$FF               ; 1A\r
+          .dc.b      (NUMBER-7)&$FF               ; 1B\r
+          .dc.b      (NUMBER-7+DOFF1)&$FF         ; D1\r
+          .dc.b      (NUMBER-7+DOFF2)&$FF         ; D2\r
+          .dc.b      (NUMBER-7+DOFF3)&$FF         ; D3\r
+          .dc.b      (NUMBER-7+DOFF4)&$FF         ; D4\r
+          .dc.b      (NUMBER-7+DOFF5)&$FF         ; D5\r
+          .dc.b      (NUMBER-7+DOFF6)&$FF         ; D6\r
+          .dc.b      (NUMBER-7+DOFF5)&$FF         ; D5\r
+          .dc.b      (NUMBER-7+DOFF6)&$FF         ; D6\r
+          .dc.b      (NUMBER-7+DOFF5)&$FF         ; D5\r
+          .dc.b      (NUMBER-7+DOFF6)&$FF         ; D6\r
+\r
+; TABLE TO TRANSLATE ANIMATION NUMBER TO SHADOW VERTICAL POSITION OFFSET\r
+;         NUMBER + OFFSET\r
+SVPOFF:   .dc.b      (NUMBER-7)&$FF               ; 0\r
+          .dc.b      (NUMBER-8)&$FF               ; 1\r
+          .dc.b      (NUMBER-5)&$FF               ; 2\r
+          .dc.b      (NUMBER-8)&$FF               ; 3\r
+          .dc.b      (NUMBER-9)&$FF               ; 4\r
+          .dc.b      (NUMBER-5)&$FF               ; 5\r
+          .dc.b      (NUMBER-4)&$FF               ; 6\r
+          .dc.b      (NUMBER-5)&$FF               ; 7\r
+          .dc.b      (NUMBER-4)&$FF               ; 8\r
+          .dc.b      (NUMBER-10)&$FF              ; 9\r
+          .dc.b      (NUMBER-10)&$FF              ; A\r
+          .dc.b      (NUMBER-7)&$FF               ; B\r
+          .dc.b      (NUMBER-7)&$FF               ; C\r
+          .dc.b      (NUMBER-11)&$FF              ; D\r
+          .dc.b      (NUMBER-11)&$FF              ; E\r
+          .dc.b      (NUMBER-12)&$FF              ; F\r
+          .dc.b      (NUMBER-12)&$FF              ; 10\r
+          .dc.b      (NUMBER-11)&$FF              ; 11\r
+          .dc.b      (NUMBER-11)&$FF              ; 12\r
+          .dc.b      (NUMBER-8)&$FF               ; 13\r
+          .dc.b      (NUMBER-5)&$FF               ; 14\r
+          .dc.b      (NUMBER-8)&$FF               ; 15\r
+          .dc.b      (NUMBER-11)&$FF              ; 16\r
+          .dc.b      (NUMBER-11)&$FF              ; 17\r
+          .dc.b      (NUMBER-11)&$FF              ; 18\r
+          .dc.b      (NUMBER-11)&$FF              ; 19\r
+          .dc.b      (NUMBER-11)&$FF              ; 1A\r
+          .dc.b      (NUMBER-11)&$FF              ; 1B\r
+          .dc.b      (NUMBER-11+DOFF1)&$FF        ;D1\r
+          .dc.b      (NUMBER-11+DOFF2)&$FF        ; D2\r
+          .dc.b      (NUMBER-11+DOFF3)&$FF        ; D3\r
+          .dc.b      (NUMBER-11+DOFF4)&$FF        ; D4\r
+          .dc.b      (NUMBER-11+DOFF5)&$FF        ; D5\r
+          .dc.b      (NUMBER-11+DOFF6)&$FF        ; D6\r
+          .dc.b      (NUMBER-11+DOFF5)&$FF        ; D5\r
+          .dc.b      (NUMBER-11+DOFF6)&$FF        ; D6\r
+          .dc.b      (NUMBER-11+DOFF5)&$FF        ; D5\r
+          .dc.b      (NUMBER-11+DOFF6)&$FF        ; D6\r
+\r
+; TABLE OF DEATH ANIMATION ADDRESSES\r
+;\r
+DEATHANI: .dc.b      BDS1&$FF\r
+          .dc.b      BDS2&$FF\r
+          .dc.b      BDS3&$FF\r
+          .dc.b      BDS4&$FF\r
+          .dc.b      BDS5&$FF\r
+          .dc.b      BDS6&$FF\r
+          .dc.b      BDS5&$FF\r
+          .dc.b      BDS6&$FF\r
+          .dc.b      BDS5&$FF\r
+          .dc.b      BDS6&$FF\r
+          .dc.b      0\r
+\r
+; TABLE OF DEATH ANIMATION DELAYS\r
+;\r
+DEATHDEL: .dc.b      3\r
+          .dc.b      4\r
+          .dc.b      5\r
+          .dc.b      $FF\r
+          .dc.b      6\r
+          .dc.b      6\r
+          .dc.b      6\r
+          .dc.b      6\r
+          .dc.b      6\r
+          .dc.b      6\r
+          .dc.b      0\r
+\r
+BIRDROOM  EQU     3\r
+\r
+RESETXLO: LDA     #$48\r
+          STA     TEMP4                  ;AND I HOPE I CAN USE TEMP4\r
+          BNE     NORESTX\r
+\r
+* WE NEED TO DEAL WITH THIS NOT BEING ABLE TO FIND A PLACE\r
+PLACEMNT:\r
+          LDA     #6\r
+          STA     TEMP0                  ;HOPEFULLY I CAN USE TEMP0\r
+\r
+          LDA     #ZYLIMLOW              ;THE BIRD WILL BE ON THE GROUND\r
+          STA     YTBL+ZBIRD\r
+          LDA     #$E\r
+          STA     TEMP8                  ; ANIMATION NUMBER FOR PROJECT\r
+          STA     TEMP7                  ; MOVEMENT FLAG\r
+\r
+TRYPLAC:\r
+          DEC     TEMP0\r
+          BEQ     RESETXLO\r
+          BPL     USERAND\r
+\r
+NORESTX:  LDA     TEMP4\r
+          CLC\r
+          ADC     #2\r
+          STA     TEMP4\r
+          CMP     #ZXLIMHI\r
+          BCC     FLOWINX\r
+          LDA     #ZXLIMLOW              ;IF OVER, TRY LOWEND\r
+          STA     TEMP4\r
+          BNE     FLOWINX\r
+\r
+USERAND:  JSR     RANDOM                 ;TRY TO PLACE THE BIRD SAFELY\r
+          LSR     \r
+          LSR     \r
+          ADC     #ZXLIMLOW\r
+          CMP     #ZXLIMHI               ;MAKE SURE IT IS IN X RANGE\r
+          BCS     TRYPLAC\r
+\r
+FLOWINX:  CLC\r
+          ADC     #BIRDROOM\r
+          STA     XTBL+ZBIRD\r
+          LDA     #ZBIRDZ+8\r
+          STA     ZTBL+ZBIRD\r
+          JSR     PROJECT                ; X+3,Z+8\r
+          JSR     DOCOL\r
+          BNE     TRYPLAC\r
+\r
+          LDA     #ZBIRDZ\r
+          STA     ZTBL+ZBIRD\r
+          JSR     PROJECT                ; X+3,Z\r
+          JSR     DOCOL\r
+          BNE     TRYPLAC\r
+\r
+          LDA     XTBL+ZBIRD\r
+          SEC\r
+          SBC     #BIRDROOM*2\r
+          STA     XTBL+ZBIRD\r
+          JSR     PROJECT                ; X-3,Z\r
+          JSR     DOCOL\r
+          BNE     TRYPLAC\r
+\r
+          LDA     #ZBIRDZ+8\r
+          STA     ZTBL+ZBIRD\r
+          JSR     PROJECT                ; X-3,Z+8\r
+          JSR     DOCOL\r
+          BNE     TRYPLAC\r
+\r
+          LDA     XTBL+ZBIRD\r
+          CLC\r
+          ADC     #BIRDROOM\r
+          STA     XTBL+ZBIRD\r
+          JSR     PROJECT                ; X,Z+8\r
+          JSR     DOCOL\r
+BTRYPLC:  BNE     TRYPLAC\r
+\r
+          LDA     #ZBIRDZ\r
+          STA     ZTBL+ZBIRD\r
+          JSR     PROJECT                ; X,Z    - THIS IS WHERE IT STAYS\r
+          JSR     DOCOL\r
+          BNE     BTRYPLC\r
+\r
+          LDA     #0                     ;PLACE BIRD BECAUSE WE MADE IT\r
+          STA     DEATH                  ;RESET DEATH STATE\r
+\r
+          LDA     #(BIRDHDS)&$FF       ;GRAPHICS OF STANDING BIRD\r
+          STA     SLTBL+ZBIRD\r
+          STA     SLTBL+ZSHAD\r
+\r
+          LDA     #$80                   ; HOP MODE\r
+          STA     BIRDSTAT\r
+\r
+          LDA     #$FF                   ;JOYSTICK VALUE (NO MOTION)\r
+          STA     TEMP0\r
+\r
+PUNTSHIT:\r
+\r
+          RTS\r
+\r
+*         DOCOL   SUBROUTINE TO DO COLLISION DETECTION FOR BIRD\r
+* LEAVES RESULT IN ACCUMULATOR\r
+* MORE WORK SHOULD BE DONE ON DECIDING WHICH POINTS TO USE\r
+DOCOL:    LDA     XTBL+ZBIRD             ;STORE X,Y,AND Z FOR FIRST CALL\r
+          STA     COLPX\r
+          LDA     YTBL+ZBIRD\r
+          STA     COLPY\r
+          LDA     ZTBL+ZBIRD\r
+          CLC\r
+          ADC     #2\r
+          STA     COLPZ\r
+          LDX     #ZBIRD\r
+          JSR     COLDTNC\r
+          BNE     COLDONE                ;Z FLAG SHOULD BE SET\r
+\r
+* SHOULD CHECK NARROWER IF ON GROUND OR WATER\r
+          LDA     XTBL+ZBIRD             ;TRY X+3,Y,Z-2\r
+          CLC\r
+          ADC     #3\r
+          STA     COLPX\r
+          LDA     ZTBL+ZBIRD\r
+          SEC\r
+          SBC     #2\r
+          STA     COLPZ\r
+          LDX     #ZBIRD\r
+          JSR     COLDTNC                ;SECOND CALL\r
+          BNE     COLDONE                ;Z FLAG SHOULD BE SET\r
+\r
+          LDA     XTBL+ZBIRD             ;TRY X-3,Y,Z-2\r
+          SEC\r
+          SBC     #3\r
+          STA     COLPX\r
+          LDX     #ZBIRD\r
+          JSR     COLDTNC                ;THIRD CALL\r
+COLDONE:  RTS\r
+\r
+PROJECT:  LDY     TEMP8                  ; ANIMATION NUMBER FOR OFFSETS\r
+\r
+          LDA     XTBL+ZBIRD             ; CALCULATE BIRD AND SHADOW HP\r
+          CLC\r
+          ADC     ZTBL+ZBIRD\r
+          ADC     BHPOFF,Y               ; HPOFF-NUMBER\r
+          STA     HPTBL+ZBIRD            ; HP OF BIRD AND SHADOW\r
+          STA     HPTBL+ZSHAD\r
+\r
+          LDA     XTBL+ZBIRD             ; CALCULATE SHADOW VP\r
+          CLC\r
+          ADC     SVPOFF,Y               ; VPOFF+NUMBER\r
+          SEC\r
+          SBC     ZTBL+ZBIRD\r
+          STA     VPTBL+ZSHAD            ; VP OF SHADOW\r
+\r
+          LDA     XTBL+ZBIRD             ; CALCULATE BIRD VP\r
+          SEC\r
+          SBC     YTBL+ZBIRD\r
+          CLC\r
+          ADC     BVPOFF,Y               ; VPOFF+NUMBER\r
+          SEC\r
+          SBC     ZTBL+ZBIRD\r
+          STA     VPTBL+ZBIRD            ; VP OF BIRD\r
+\r
+          LDA     TEMP7                  ;DON'T DO OBJMOV IF IT DIDN'T\r
+          BEQ     ONLYCOL\r
+\r
+WEMOVED:  LDA     #NUMBER-7+DXADJ        ; NUMBER+OFFSET\r
+          SEC\r
+          SBC     XTBL+ZBIRD\r
+          CLC\r
+          ADC     ZTBL+ZBIRD             ; THIS IS DC\r
+          STA     TEMP6\r
+          ADC     #14                    ; THIS IS DF\r
+          STA     TEMP10\r
+          LDX     #ZBIRD\r
+          JSR     OBJMOV\r
+ONLYCOL:\r
+          RTS\r
+\r
+ZOUNDS:   LDA     TUNNUM               ;Check if tunes are done.\r
+          CMP     #$FF\r
+          BNE     NOZOUND\r
+          LDA     TUNNUM+1\r
+          CMP     #$FF\r
+                                         ;SET Z FLAG\r
+NOZOUND:  RTS\r
+\r
+;          END\r
diff --git a/SGNDOBJ.S b/SGNDOBJ.S
new file mode 100644 (file)
index 0000000..5de3910
--- /dev/null
+++ b/SGNDOBJ.S
@@ -0,0 +1,1469 @@
+*******   SGNDOBJ.S    THE AMAZING SPHINX\r
+* THIS FILE CONTAINS THE CODE THAT ANIMATES AND CONTROLS THE BIG SPHINX, THE\r
+* MINI SPHINXES, AND THE FIRE POTS.\r
+\r
+\r
+       org     $B000\r
+\r
+\r
+MINIINIT: LDY     #MININUMB-1            ; CALLED WITH SLOT NUMBER IN X\r
+MINILP:   LDA     MINITBL,Y\r
+          BMI     MINIFND\r
+          DEY\r
+          BPL     MINILP\r
+          RTS                            ; IGNORE IF NO SLOT AVAILABLE\r
+\r
+MINIFND:  TXA                            ; X IS THE LOADER TABLE SLOT NUMBER\r
+          STA     MINITBL,Y\r
+          LDA     #0                     ; ALIVE STATE\r
+          STA     XTBL,X                 ; THIS IS WHERE MINISTATE IS KEPT NOW\r
+          RTS\r
+\r
+KAMINIS:  LDY     #MININUMB-1            ; KILL ALL MINIS\r
+KAMINILP: LDX     MINITBL,Y\r
+          BMI     KNMINI                 ; THIS ONES DEAD\r
+          JSR     MINIKILL\r
+KNMINI:   DEY\r
+          BPL     KAMINILP\r
+          RTS\r
+\r
+MINIKILL: LDA     XTBL,X\r
+          BNE     MINIDEAD               ; MINI IS ALREADY DYING OR DEAD\r
+          LDA     #1\r
+          STA     XTBL,X                 ; SET MINI STATE TO START EXPLOSION\r
+          LDA     #MINIBM                ;THE BIG BANG\r
+          JSR     TUNIN\r
+          LDA     #$10\r
+          STA     HUNDS\r
+          JSR     ADDSCORE\r
+MINIDEAD: RTS\r
+\r
+; ANIMATE MINI SPHINX EXPLOSION IF NECESSARY - CONTROLLED BY MINISTAT\r
+;\r
+;                 0                      ; STILL ALIVE\r
+;                 1                      ; START EXPLOSION\r
+MXREM     EQU     2                      ; REMOVE OVERLAY\r
+MXREP     EQU     4                      ; REPLACE OVERLAY\r
+MXLOW     EQU     15                     ; LOWER OVERLAY AND REMOVE HEAD\r
+MXDONE    EQU     21                     ; EXPLOSION IS OVER\r
+\r
+; XTBL IS USED TO STORE THE MINI STATE SO THAT IT CAN EASILY BE SET TO ONE\r
+; TO INITIATE THE EXPLOSION WHEN A COLISION IS DETECTED\r
+\r
+DOMINIS:  LDY     #MININUMB-1\r
+DOMINILP: LDA     MINITBL,Y\r
+          BMI     DOMINIDN               ; NO MINI HERE\r
+          TAX\r
+          LDA     VPTBL,X\r
+          CMP     #SCRENBOT+1\r
+          BNE     DOMINI1\r
+          LDA     #$FF\r
+          STA     MINITBL,Y\r
+DOMINIDN: DEY\r
+          BPL     DOMINILP\r
+          RTS\r
+\r
+DOMSHOTS: LDA     SPHXSHTD\r
+          BNE     MINIDONE\r
+\r
+          LDA     COLX1,X                ;THE OFFSETS NEED ADJUSTING\r
+          CLC\r
+          ADC     #3                     ;FUDGE FACTOR\r
+          STA     TEMP2                  ; X POS FOR LAUNCHER\r
+          SEC\r
+          SBC     XTBL+ZBIRD\r
+          CMP     #$F8                   ;LAUNCH SHOT WHEN BIRD IS IN FRONT\r
+          BCS     ENOGINIM               ;OF MINI SPHINX (FOR NOW)\r
+          CMP     #8\r
+          BCS     MINIDONE\r
+\r
+ENOGINIM: LDA     VPTBL,X                ; MINI SPHINX MUST BE ON THE SCREEN\r
+          CMP     #SCRENBOT-25\r
+          BCS     MINIDONE\r
+\r
+          LDA     HPTBL,X\r
+          CMP     #15\r
+          BCC     MINIDONE\r
+          CMP     #145\r
+          BCS     MINIDONE\r
+\r
+          LDA     #0\r
+          STA     TEMP0                  ;TEMP0 = 0 MEANS MINI SPHINX\r
+          LDA     #15                    ; Y POS\r
+          STA     TEMP7\r
+          LDA     COLZ1,X\r
+          SEC\r
+          SBC     #1                     ; PREVENT SUICIDE\r
+          STA     TEMP9\r
+          JSR     LAUNCHER\r
+\r
+MINIDONE: LDY     TEMP1\r
+          JMP     DOMINIDN\r
+\r
+DOMINI1:  STY     TEMP1\r
+          LDA     XTBL,X                 ; THIS IS THE MINI STATE\r
+          BEQ     DOMSHOTS               ; THE MINI IS ALIVE\r
+RBOOR:    CMP     #MXDONE                ; THE MINI IS DEAD OR DYING\r
+          BEQ     MINIDONE               ; ALREADY DEAD\r
+          INC     XTBL,X                 ; NEXT STATE NEXT TIME\r
+          STX     TEMP0\r
+          CMP     #1\r
+          BEQ     MEXPINIT               ; START THE EXPLOSION UP\r
+\r
+          LDX     TEMP1                  ; OTHERWISE CONTINUE ANIMATION\r
+          LDY     MINIOVER,X             ; Y IS OVERLAY SLOT NUMBER\r
+          TAX                            ; X IS CURRENT ANIMATION NUMBER\r
+          LDA     MINIEXSL-2,X\r
+          STA     SLTBL,Y\r
+          LDA     MINIEXPW-2,X\r
+          STA     PWTBL,Y\r
+\r
+          CPX     #MXREM\r
+          BEQ     MEXPREM                ; REMOVE OVERLAY\r
+          CPX     #MXREP\r
+          BEQ     MEXPREP                ; REPLACE OVERLAY\r
+          CPX     #MXLOW\r
+          BEQ     MEXPLOW                ; LOWER OVERLAY\r
+\r
+MEXPFNSH: LDX     TEMP0\r
+          JMP     MINIDONE               ; ALL DONE WITH THIS ANIMATION\r
+\r
+MEXPREM:  LDA     #200                   ; OFF SCREEN HP\r
+          STA     HPTBL,Y                ; OVERLAY'S HP\r
+          JMP     MEXPFNSH\r
+\r
+MEXPREP:  LDX     TEMP1                  ; GET MINI SPHINX NUMBER\r
+          LDA     MINITBL,X              ; GET SLOT NUMBER OF TOP\r
+          TAX\r
+          LDA     HPTBL,X\r
+          STA     HPTBL,Y                ; RESTORE HP\r
+          JMP     MEXPFNSH\r
+\r
+MEXPLOW:  LDA     VPTBL,Y                ; LOWER THE OVERLAY\r
+          CLC\r
+          ADC     #3\r
+          STA     VPTBL,Y\r
+\r
+          LDX     TEMP1                  ; AND REMOVE THE HEAD FROM THE TOP\r
+          LDA     MINITBL,X\r
+          TAX\r
+          LDA     SLTBL,X\r
+          CLC\r
+          ADC     #3\r
+          STA     SLTBL,X                ; BYPASS HEAD IN STAMP\r
+          LDA     HPTBL,X\r
+          CLC\r
+          ADC     #12\r
+          STA     HPTBL,X                ; NEW HP FOR TOP\r
+          LDA     PWTBL,X\r
+          CLC\r
+          ADC     #3\r
+          STA     PWTBL,X                ; AND SHRINK THE WIDTH\r
+          LDA     COLY2,X\r
+          SEC\r
+          SBC     #10\r
+          STA     COLY2,X                ; ALSO LOWER TOP OF COLISION BOX\r
+          BNE     MEXPFNSH\r
+\r
+MEXPINIT: JSR     GETASLOT               ; X IS NOW OVERLAY SLOT NUMBER\r
+          BMI     MEXPWAIT               ; NO SLOT AVAILABLE\r
+          LDY     TEMP1                  ; Y IS NOW MINI SPHINX NUMBER\r
+          TXA\r
+          STA     MINIOVER,Y\r
+          LDA     MINITBL,Y\r
+          TAY                            ; Y IS NOW TOP SLOT NUMBER\r
+          LDA     VPTBL,Y\r
+          CLC\r
+          ADC     #5\r
+          STA     VPTBL,X                ; OVERLAY INITIAL VP\r
+          LDA     HPTBL,Y\r
+          STA     HPTBL,X                ; OVERLAY HP\r
+          LDA     YTBL,Y\r
+          CLC\r
+          ADC     #6\r
+          STA     YTBL,X                 ; OVERLAY Y\r
+\r
+          LDA     #MINIEXP1&$FF\r
+          STA     SLTBL,X                ; FIRST EXPLOSION ANIMATION\r
+          LDA     #MINIEXP1/256\r
+          STA     SHTBL,X\r
+          LDA     #$9C                   ; FIRST EXPLOSION PALETTE\r
+          STA     PWTBL,X                ;PALW/WIDTH\r
+          LDA     #(MINIEXP1+$1700-$1600)/256\r
+          STA     SMTBL,X\r
+\r
+          LDA     DXTBL,Y\r
+          SEC\r
+          SBC     #6\r
+          STA     TEMP6\r
+          CLC\r
+          ADC     #2\r
+          STA     TEMP10\r
+\r
+          LDA     #0                     ; NO COLISION BOX FOR OVERLAY\r
+          STA     COLSTAT,X\r
+\r
+          JSR     OBJINS                 ; INSERT OVERLAY INTO LINKED LIST\r
+\r
+          JMP     MEXPFNSH\r
+\r
+MEXPWAIT: LDX     TEMP0\r
+          DEC     XTBL,X                 ; RESTORE OLD STATE FOR NEXT TIME\r
+          JMP     MINIDONE\r
+\r
+; TABLES FOR MINI SPHINX EXPLOSION ANIMATION - STARTING WITH SECOND ANIMATION\r
+MINIEXSL: .dc.b      0                      ; 2 - NO OVERLAY\r
+          .dc.b      0                      ; 3 - NO OVERLAY\r
+          .dc.b      MINIEXP1&$FF            ; 4\r
+          .dc.b      MINIEXP1&$FF            ; 5\r
+          .dc.b      MINIEXP2&$FF            ; 6\r
+          .dc.b      MINIEXP1&$FF            ; 7\r
+          .dc.b      MINIEXP1&$FF            ; 8\r
+          .dc.b      MINIEXP2&$FF            ; 9\r
+          .dc.b      MINIEXP2&$FF            ; 10\r
+          .dc.b      MINIEXP1&$FF            ; 11\r
+          .dc.b      MINIEXP1&$FF            ; 12\r
+          .dc.b      MINIEXP2&$FF            ; 13\r
+          .dc.b      MINIEXP1&$FF            ; 14\r
+          .dc.b      MINIEXP3&$FF            ; 15\r
+          .dc.b      MINIEXP1&$FF            ; 16\r
+          .dc.b      MINIEXP2&$FF            ; 17\r
+          .dc.b      MINIEXP3&$FF            ; 18\r
+          .dc.b      MINIEXP1&$FF            ; 19\r
+          .dc.b      MINIEXP3&$FF            ; 20\r
+\r
+MINIEXPW: .dc.b      $9C                     ; 2 - NO OVERLAY\r
+          .dc.b      $9C                     ; 3 - NO OVERLAY\r
+          .dc.b      $9C                     ; 4\r
+          .dc.b      $9C                     ; 5\r
+          .dc.b      $9C                     ; 6\r
+          .dc.b      $9C                     ; 7\r
+          .dc.b      $9C                     ; 8\r
+          .dc.b      $9C                     ; 9\r
+          .dc.b      $9C                     ; 10\r
+          .dc.b      $9C                     ; 11\r
+          .dc.b      $9C                     ; 12\r
+          .dc.b      $9C                     ; 13\r
+          .dc.b      $9C                     ; 14\r
+          .dc.b      $FC                     ; 15\r
+          .dc.b      $9C                     ; 16\r
+          .dc.b      $9C                     ; 17\r
+          .dc.b      $FC                     ; 18\r
+          .dc.b      $9C                     ; 19\r
+          .dc.b      $FC                     ; 20\r
+\r
+SXFLINIT: LDA     PHASE\r
+          BNE     SLIDONE                ; PUNT IF NOT NORMAL GAME PLAY\r
+\r
+          TXA                          ; REMEMBER INDEX OF BOTTOM OF SPHINX FACE\r
+          STA     LOWFACE\r
+\r
+          LDA     COLX1,X                ; GET X POSITION OF SPHINX NOSE\r
+          CLC\r
+          ADC     #2\r
+          STA     SPHNXNSX\r
+\r
+          LDA     #3                     ; ADJUST THIS\r
+          SEC\r
+          SBC     DIFCULTY\r
+          STA     TEMP4                  ; AMOUNT OF EXTRA COLISION BOX\r
+\r
+          LDA     COLX1,X\r
+          SEC\r
+          SBC     TEMP4\r
+          STA     COLX1,X\r
+\r
+          LDA     COLX2,X\r
+          CLC\r
+          ADC     TEMP4\r
+          STA     COLX2,X\r
+\r
+          LDA     COLY1,X\r
+          SEC\r
+          SBC     TEMP4\r
+          STA     COLY1,X\r
+\r
+          LDA     COLY2,X\r
+          CLC\r
+          ADC     TEMP4\r
+          STA     COLY2,X\r
+\r
+SLIDONE:  RTS\r
+\r
+SXFHINIT: LDA     PHASE\r
+          BNE     SLIDONE                ; PUNT IF NOT NORMAL GAME PLAY\r
+          TXA                            ; REMEMBER INDEX OF TOP OF SPHINX FACE\r
+          STA     HIFACE\r
+          INC     PHASE                  ; SET TO PHASE 1\r
+          LDA     #0\r
+          STA     FACER                  ; INITIALIZE ANIMATION\r
+          RTS\r
+\r
+DSEXCLPS: LDA     #CRATERL&$FF\r
+          LDX     LOWFACE\r
+          STA     SLTBL,X\r
+\r
+          LDA     #CRATERH&$FF\r
+          LDX     HIFACE\r
+          STA     SLTBL,X\r
+\r
+          JMP     DSEXANIM\r
+\r
+DSEXDONE: LDX     SEXP1                  ; DELETE THE OVERLAYS\r
+          JSR     OBJDEL\r
+          JSR     RETASLOT\r
+\r
+          LDX     SEXP2\r
+          JSR     OBJDEL\r
+          JSR     RETASLOT\r
+\r
+          LDX     SEXP3\r
+          JSR     OBJDEL\r
+          JSR     RETASLOT\r
+\r
+          LDA     #$FE                   ; GO TO TIMED BONUS PHASE\r
+          STA     PHASE\r
+\r
+          RTS\r
+\r
+DSEXINIT: LDX     LOWFACE\r
+\r
+          LDA     HPTBL,X\r
+          STA     TEMP3\r
+\r
+          LDA     VPTBL,X\r
+          STA     TEMP4\r
+\r
+          LDA     DXTBL,X\r
+          SEC\r
+          SBC     #4\r
+          STA     TEMP6                  ; ASSUMING THIS DOESN'T GO AWAY\r
+          CLC\r
+          ADC     #2\r
+          STA     TEMP10                 ; SAME HERE\r
+\r
+          LDY     #2\r
+\r
+DSEXINLP: JSR     GETASLOT\r
+          TXA\r
+          STA     SEXP1,Y\r
+\r
+          LDA     #SPHXGLMR/256\r
+          STA     SHTBL,X\r
+\r
+          LDA     #(SPHXGLMR+1700-1600)/256\r
+          STA     SMTBL,X\r
+\r
+          LDA     #$9E\r
+          STA     PWTBL,X\r
+\r
+          LDA     #30\r
+          STA     YTBL,X\r
+\r
+          LDA     TEMP3\r
+          CLC\r
+          ADC     SEXHPOFF,Y\r
+          STA     HPTBL,X\r
+\r
+          LDA     TEMP4\r
+          CLC\r
+          ADC     SEXVPOFF,Y\r
+          STA     VPTBL,X\r
+\r
+          LDA     #0\r
+          STA     COLSTAT,X\r
+\r
+          JSR     OBJINS\r
+\r
+          DEY\r
+          BPL     DSEXINLP\r
+\r
+          LDY     #0\r
+          JMP     DSEXANIM\r
+\r
+DSEXPL:   CMP     #$FF                   ; PHASE IS IN A\r
+          BNE     ANRTS                  ; PHASE EQUALS -1 DURING EXPLOSION\r
+\r
+          LDA     MAINCNT\r
+          LSR     \r
+          BCC     ANRTS\r
+\r
+          INC     FACER\r
+\r
+          LDY     FACER\r
+          CPY     #0\r
+          BEQ     DSEXINIT\r
+          CPY     #15\r
+          BEQ     DSEXDONJ\r
+          CPY     #11\r
+          BNE     DSEXANIM\r
+          JMP     DSEXCLPS\r
+\r
+DSEXDONJ: JMP     DSEXDONE\r
+\r
+DSEXANIM: LDX     SEXP1\r
+          LDA     SEXAN1,Y\r
+          STA     SLTBL,X\r
+\r
+          LDX     SEXP2\r
+          LDA     SEXAN2,Y\r
+          STA     SLTBL,X\r
+\r
+          LDX     SEXP3\r
+          LDA     SEXAN3,Y\r
+          STA     SLTBL,X\r
+\r
+ANRTS:    RTS\r
+\r
+\r
+SPHNXNSY  EQU     22\r
+\r
+DOSPHINX: LDX     LOWFACE\r
+\r
+          LDA     PHASE\r
+          BEQ     ANRTS                  ; IF IN NORMAL PLAY\r
+          BMI     DSEXPL                 ; IF IN EXPLOSION OR BONUS PHASE\r
+\r
+          CMP     #1\r
+          BNE     DSTUNE                 ; ALREADY STOPPED SCROLLING\r
+\r
+          LDA     COLZ1,X\r
+          CMP     #140\r
+          BCS     DSTUNE                 ; KEEP SCROLLING\r
+\r
+          INC     PHASE                  ; NOW IN PHASE 2\r
+\r
+DSTUNE:   LDA     #SFINKS\r
+          CMP     TUNNUM\r
+          BEQ     DSSHOOT                ; STILL PLAYING\r
+          CMP     TUNNUM+1\r
+          BEQ     DSSHOOT                ; STILL PLAYING\r
+\r
+          JSR     TUNIN                  ; PLAY AGAIN - IT GOT BOOTED\r
+\r
+DSSHOOT:\r
+          BIT     PARASPHX\r
+          BMI     ANRTS\r
+\r
+          LDA     SPHXSHTD\r
+          BNE     DSSPAWN\r
+\r
+          LDA     #1\r
+          STA     TEMP0                  ;TEMP0 = 1 MEANS BIG SPHINX\r
+\r
+          LDA     SPHNXNSX\r
+          STA     TEMP2\r
+\r
+          LDA     #SPHNXNSY+7            ; Y POS\r
+          STA     TEMP7\r
+\r
+          LDA     COLZ1,X\r
+          SEC\r
+          SBC     #6                     ; PREVENT SUICIDE\r
+          STA     TEMP9\r
+\r
+          JSR     LAUNCHER\r
+\r
+DSSPAWN:  LDA     PHASE\r
+          CMP     #2\r
+          BNE     DSANIM                 ; SPAWN ONLY WHEN SCROLLING IS STOPPED\r
+\r
+          DEC     SPNCNT\r
+          BNE     DSANIM\r
+\r
+          LDX     LOWFACE\r
+\r
+          LDA     #20\r
+          STA     SPNCNT\r
+\r
+          LDA     SPHNXNSX\r
+          STA     SPNX\r
+\r
+          LDA     #SPHNXNSY-6\r
+          STA     SPNY\r
+\r
+          LDA     COLZ1,X\r
+          SEC\r
+          SBC     #5\r
+          STA     SPNZ\r
+\r
+          JSR     RANDOM\r
+          AND     #3\r
+          LDX     PLAYER\r
+          ADC     RACK,X\r
+          CMP     #$C\r
+          BCC     DSSPCLS\r
+          LDA     #$B\r
+DSSPCLS:\r
+          STA     SPNCLASS\r
+\r
+          JSR     SPAWN\r
+\r
+DSANIM:   LDA     MAINCNT\r
+          AND     #3\r
+          BNE     DSDONE\r
+\r
+          LDY     FACER\r
+          LDA     FACEADV,Y\r
+          BPL     FACESTA\r
+          LDA     RNDOM\r
+          AND     #4\r
+FACESTA:  STA     FACER\r
+          TAY\r
+\r
+          LDA     FACEHI,Y\r
+          LDX     HIFACE\r
+          STA     SLTBL,X\r
+          LDA     FACELO,Y\r
+          LDX     LOWFACE\r
+          STA     SLTBL,X\r
+\r
+DSDONE:   RTS\r
+\r
+FACEADV:  .dc.b      1,2,3,$80,5,6,7,$80\r
+\r
+SEXHPOFF: .dc.b      0,5,3\r
+\r
+SEXVPOFF: .dc.b      -17,-16,-8\r
+\r
+SEXAN1:   .dc.b      SPHXGLMR&$FF            ;0\r
+          .dc.b      BLANK&$FF               ;1\r
+          .dc.b      SPHXGLMR&$FF            ;2\r
+          .dc.b      SPHXFLSH&$FF            ;3\r
+          .dc.b      SPHXGLMR&$FF            ;4\r
+          .dc.b      SPHXGLMR&$FF            ;5\r
+          .dc.b      SPHXFLSH&$FF            ;6\r
+          .dc.b      SPHXEXPL&$FF            ;7\r
+          .dc.b      SPHXFLSH&$FF            ;8\r
+          .dc.b      SPHXEXPL&$FF            ;9\r
+          .dc.b      SPHXEXPL&$FF            ;10\r
+          .dc.b      SPHXEXPL&$FF            ;11\r
+          .dc.b      SPHXFLSH&$FF            ;12\r
+          .dc.b      SPHXEXPL&$FF            ;13\r
+          .dc.b      SPHXEXPL&$FF            ;14\r
+\r
+SEXAN2:   .dc.b      BLANK&$FF               ;0\r
+          .dc.b      SPHXGLMR&$FF            ;1\r
+          .dc.b      BLANK&$FF               ;2\r
+          .dc.b      SPHXGLMR&$FF            ;3\r
+          .dc.b      SPHXFLSH&$FF            ;4\r
+          .dc.b      SPHXGLMR&$FF            ;5\r
+          .dc.b      SPHXGLMR&$FF            ;6\r
+          .dc.b      SPHXFLSH&$FF            ;7\r
+          .dc.b      SPHXEXPL&$FF            ;8\r
+          .dc.b      SPHXEXPL&$FF            ;9\r
+          .dc.b      SPHXFLSH&$FF            ;10\r
+          .dc.b      SPHXEXPL&$FF            ;11\r
+          .dc.b      SPHXEXPL&$FF            ;12\r
+          .dc.b      SPHXFLSH&$FF            ;13\r
+          .dc.b      SPHXEXPL&$FF            ;14\r
+\r
+SEXAN3:   .dc.b      BLANK&$FF               ;0\r
+          .dc.b      BLANK&$FF               ;1\r
+          .dc.b      SPHXGLMR&$FF            ;2\r
+          .dc.b      BLANK&$FF               ;3\r
+          .dc.b      SPHXGLMR&$FF            ;4\r
+          .dc.b      SPHXFLSH&$FF            ;5\r
+          .dc.b      SPHXGLMR&$FF            ;6\r
+          .dc.b      SPHXFLSH&$FF            ;7\r
+          .dc.b      SPHXEXPL&$FF            ;8\r
+          .dc.b      SPHXFLSH&$FF            ;9\r
+          .dc.b      SPHXEXPL&$FF            ;10\r
+          .dc.b      SPHXEXPL&$FF            ;11\r
+          .dc.b      SPHXFLSH&$FF            ;12\r
+          .dc.b      SPHXEXPL&$FF            ;13\r
+          .dc.b      SPHXEXPL&$FF            ;14\r
+\r
+\r
+FACELO:   .dc.b      SPFACE1L&$FF,SPFACE4L&$FF,SPFACE5L&$FF\r
+         .dc.b      SPFACE4L&$FF,SPFACE1L&$FF\r
+          .dc.b      SPFACE2L&$FF,SPFACE1L&$FF,SPFACE3L&$FF\r
+\r
+FACEHI:   .dc.b      SPFACE1H&$FF,SPFACE4H&$FF,SPFACE5H&$FF\r
+         .dc.b      SPFACE4H&$FF,SPFACE1H&$FF\r
+          .dc.b      SPFACE2H&$FF,SPFACE1H&$FF,SPFACE3H&$FF\r
+\r
+KILLSPHX: LDA     PHASE                  ; A SHOT HIT THE SPHINX\r
+          BEQ     KSDONE\r
+          BMI     KSDONE                 ; ITS ALREADY BEEN HIT\r
+\r
+          JSR     INITBNS                ; TELL STUFF IN SMAGIC\r
+          LDA     #$FF\r
+          STA     FACER                  ; START OF FACE EXPLOSION ANIMATION\r
+\r
+          LDA     #SFINKS                ; DO WE NEED THIS IF WE HAVE A TWO\r
+          JSR     SCRAPONE               ; CHANNEL SOUND??\r
+\r
+          LDA     #SPHXBM0\r
+          JSR     TUNIN\r
+\r
+          LDA     #SPHXBM1\r
+          JSR     TUNIN\r
+\r
+          LDA     RACK                   ;SCORE FOR SPHINX IS (RACK+5)*1000\r
+          ASL                           ;RACK STARTS AT 0\r
+          ASL     \r
+          ASL     \r
+          ASL                           ;MOVE TO UPPER NIBBLE\r
+          SED\r
+          CLC\r
+          ADC     #$50                   ;ADD RACK TO 5000\r
+          STA     HUNDS\r
+          LDA     #0\r
+          ADC     #0\r
+          STA     HUNTHOUS\r
+          CLD\r
+          JSR     ADDSCORE\r
+\r
+KSDONE:   RTS\r
+\r
+*         KILL ALL FIRE POTS POWER\r
+\r
+KAFIRES:  LDX     #FIRENUMB-1            ; KILL ALL FIRES\r
+\r
+KAFIRELP: LDA     FIRETIP,X\r
+          BMI     KNFIRE                 ; NOT AN ACTIVE FIRE POT\r
+\r
+          LDA     #0\r
+          STA     FIREGOAL,X\r
+\r
+KNFIRE:   DEX\r
+          BPL     KAFIRELP\r
+          RTS\r
+\r
+FIREINIT: LDY     #FIRENUMB-1            ; CALLED WITH SLOT NUMBER IN X\r
+FIRELP:   LDA     FIRETIP,Y\r
+          BMI     FIREFND\r
+          DEY\r
+          BPL     FIRELP\r
+FIREKILL: LDA     #SCRENBOT+1\r
+          STA     VPTBL,X\r
+          JSR     OBJDEL                 ; DELETE FIRE IF WE CAN'T ANIMATE IT\r
+          JSR     RETASLOT\r
+          RTS\r
+\r
+FIREFND:  STX     TEMP2                  ; TIP SLOT NUMBER\r
+\r
+          TXA                            ; TIP SLOT IN A AND X\r
+          STA     FIRETIP,Y\r
+\r
+          JSR     RANDOM                 ; START WITH RANDOM ANIMATION\r
+          STA     FIREANIM,Y\r
+\r
+          LDA     #2\r
+          STA     FIREHGHT,Y\r
+\r
+;         LDA     #2                     ;2 IS ALREADY IN A\r
+          STA     FIREGOAL,Y\r
+\r
+          LDA     DIFIND                 ;0 IS LOW DIFF., 255 IS HIGH\r
+          ASL                           ;PUT TOP TWO BITS INTO BOTTOM TWO BITS\r
+          ROL                           ;SHIFTED TOP BIT INTO BIT0\r
+          ROL                           ;SHIFTED NEXT BIT INTO BIT0\r
+          AND     #$3                    ;MASK OUT REMAINING BITS\r
+                  ;NOW WE HAVE TWO LOW ORDER BITS  BASED ON DIFFICULTY\r
+          STA     TEMP3                  ;I KNOW I CAN USE THIS\r
+\r
+          JSR     RANDOM\r
+          AND     #$0C\r
+          ORA     TEMP3\r
+          TAX\r
+          LDA     MODETABL,X\r
+\r
+          STA     FIREMODE,Y\r
+\r
+          LDA     #$FF\r
+          STA     FIRECOL1,Y\r
+          STA     FIRECOL2,Y\r
+\r
+          STY     TEMP3                  ; FIRE TABLE INDEX\r
+                  ;Y HAS NOT CHANGED, BUT I USED TEMP3 AS A TEMP ABOVE\r
+\r
+          RTS\r
+\r
+MODETABL:\r
+          .dc.b      0,2,2,1,1,1,1,3,0,0,2,2,1,1,0,3\r
+\r
+DOFIRE:   LDX     #FIRENUMB-1\r
+DFLOOP:   LDY     FIRETIP,X\r
+          BPL     DFYES                  ; AN ACTIVE ENTRY\r
+DFNEXT:   DEX\r
+          BPL     DFLOOP\r
+          RTS\r
+\r
+DFFREE:   LDA     #$FF\r
+          STA     FIRETIP,X              ; MARK TABLE ENTRY AS UNUSED\r
+          BMI     DFNEXT                 ; ALWAYS\r
+\r
+DFYES:    STX     TEMP0                  ; FIRE TABLE INDEX\r
+          STY     TEMP1                  ; TIP SLOT NUMBER\r
+\r
+          LDA     VPTBL,Y\r
+          CMP     #SCRENBOT+1\r
+          BEQ     DFFREE                 ; THE TIP HAS SCROLLED OFF\r
+\r
+          INC     FIREANIM,X\r
+          LDA     FIREANIM,X\r
+          AND     #3\r
+          BNE     DFNEXT                 ; ONLY DO EVERY 4TH GAME LOOP\r
+\r
+          LDA     FIREHGHT,X             ; COMPARE HEIGHT AND GOAL TO GET\r
+          CMP     FIREGOAL,X             ; DIRECTION TO MOVE\r
+          BEQ     DFMCFALL               ; DF IS A RELATIVE OF ROSALIE\r
+          BCC     JDRISE\r
+          JMP     DFFALL\r
+JDRISE:   JMP     DFRISE\r
+\r
+HIBND:    .dc.b      17,49,49,49            ;TABLE OF FLAME HI BOUNDS BY MODE\r
+GOALBASE: .dc.b      40,2                   ;BASE OF SPAZ GOAL\r
+\r
+DFMCFALL:\r
+;THERE ARE FOUR FIREMODES -- 0) MELLOW 1) RANDOM 2) SPASTIC 3) HARDCORE\r
+          LDA     FIREMODE,X\r
+          TAY                            ; MODE STAYS IN Y FOR NOW\r
+\r
+          JSR     RANDOM                 ; GET NEW GOAL\r
+          AND     #$3F\r
+          CMP     #2\r
+          BCC     DFANIM                 ; LEAVE SAME IF TO LOW\r
+          CMP     HIBND,Y                ; GET HIGH BOUND BASED ON MODE\r
+          BCS     DFANIM                 ; LEAVE SAME IF TO HIGH\r
+\r
+          CPY     #2                     ; LOOK FOR MORE COMPLICATED MODES\r
+          BCC     STGOAL                 ; IF SIMPLE, STORE GOAL\r
+\r
+;THIS IS WHERE THE FUN BEGINS -- WE NEED SOME GOAL SELECTION INTELLIGENCE\r
+\r
+          STA     TEMP2                  ; SAVE CALCULATED RANDOM GOAL FOR LATER\r
+          BEQ     SPAZ                   ; IF MODE = 2, GO TO SPAZ DRIVER\r
+\r
+          ;THIS MUST BE THE HARDCORE DRIVER.  WE KEEP GOAL RANDOM IF NOT IN\r
+          ;RANGE OF X.  IF IN X RANGE, WE KEEP GOAL LOW UNTIL IN Z RANGE.  THEN\r
+          ;WE RAISE GOAL TO ZAP THE DESERT FUCKIN' FALCON\r
+\r
+;SEE IF BIRD IS NEAR\r
+          LDY     TEMP1                  ;INDEX OF TIP\r
+          LDA     COLX1,Y                ;9 BIT AVERAGE OF COLLISION X'ES\r
+          CLC\r
+          ADC     COLX2,Y\r
+          ROR                           ;DON'T LOSE TOP BIT\r
+          SEC\r
+          SBC     XTBL                   ;COMPARE TO BIRD'S X\r
+          CMP     #$EE                   ;IF OUT OF X RANGE, USE RANDOM GOAL\r
+          BCS     CHEQUEZ\r
+          CMP     #18\r
+          BCS     USETE2                 ;WE TAKE THIS BRANCH TO USE RANDOM GOAL\r
+\r
+;NOW WE KNOW IT IS IN X RANGE\r
+;CHECK Z RANGE FOR LOW OR HIGH GOAL\r
+CHEQUEZ:\r
+          LDA     COLZ1,Y                ;9 BIT AVERAGE OF COLLISION Z'ES\r
+          CLC\r
+          ADC     COLZ2,Y\r
+          ROR                           ;DON'T LOSE TOP BIT\r
+          SEC\r
+          SBC     ZTBL\r
+          BMI     USETE2                 ;POT IS BEHIND BIRD\r
+\r
+          CMP     #$1C                   ;LOTS O' LEAD TIME\r
+          LDA     #0                     ;CARRY SET MAKES THIS A 1 (>= 1C)\r
+          ROL                           ;USE CARRY TO MAKE THIS A 0 OR 1.  0 IS\r
+                                         ;FOR HIGOAL, 1 IS FOR LOW GOAL\r
+          TAY                            ;SAVE THIS FOR INDEXING SOON\r
+\r
+\r
+          JSR     RANDOM                 ;GET RANDOM GOAL BASED IN RGHT PLACE\r
+          AND     #7\r
+          ADC     GOALBASE,Y\r
+          BNE     STGOAL                 ;JMP\r
+\r
+\r
+SPAZ:\r
+          TAY                            ;SAVE TEMP2 IN Y ALSO FOR QUICK COMPARE\r
+\r
+          LDA     #16                    ;SEE WHAT LAST GOAL WAS (HI OR LO)\r
+          CMP     FIREGOAL,X\r
+          TYA                            ;GET RANDOM GOAL IN A\r
+          BCS     HIGOAL                 ;IF GOAL >16, THEN MAKE NEW ONE <16\r
+          CMP     #16                    ;CHECK NEW GOAL FOR LOWNESS\r
+          BCS     DFANIM\r
+          BCC     STGOAL\r
+\r
+HIGOAL:\r
+          CMP     #40                    ;IS GOAL HIGH ENOUGH?\r
+          BCC     DFANIM                 ;IF NOT, DON'T CHANGE GOAL\r
+\r
+USETE2:\r
+          LDA     TEMP2                  ;I KNOW THIS IS ALREADY IN A\r
+\r
+STGOAL:\r
+          STA     FIREGOAL,X\r
+\r
+\r
+DFANIM:   LDA     FIREANIM,X             ; DERIVE ANIMATION INDEX\r
+          LSR     \r
+          LSR     \r
+          CMP     #6\r
+          BCC     DFANIMOK\r
+          LDA     #0\r
+          STA     FIREANIM,X\r
+\r
+DFANIMOK: TAY\r
+          LDA     COLANIM,Y\r
+          STA     TEMP2\r
+\r
+          LDA     TIPANIM,Y\r
+          LDY     TEMP1                  ; INDEX OF TIP\r
+          STA     SLTBL,Y\r
+\r
+          LDY     FIRECOL1,X             ; DO UPPER COLUMN\r
+          BMI     DFC1GONE               ; IT MUST HAVE SCROLLED OFF\r
+\r
+          LDA     VPTBL,Y                ; SEE IF IT JUST SCROLLED OFF\r
+          CMP     #SCRENBOT+1\r
+          BNE     DFC1HERE               ; NOPE\r
+          LDA     #$FF\r
+          STA     FIRECOL1,X             ; MARK IT\r
+          BMI     DFC1GONE               ; ALWAYS\r
+\r
+DFC1HERE: LDA     TEMP2                  ; COLUMN ANIMATION\r
+          STA     SLTBL,Y\r
+\r
+DFC1GONE: LDY     FIRECOL2,X             ; DO LOWER COLUMN\r
+          BMI     DFNEXTJ                ; IT MUST HAVE SCROLLED OFF\r
+\r
+          LDA     VPTBL,Y                ; SEE IF IT JUST SCROLLED OFF\r
+          CMP     #SCRENBOT+1\r
+          BNE     DFC2HERE               ; NOPE\r
+          LDA     #$FF\r
+          STA     FIRECOL2,X             ; MARK IT\r
+          BMI     DFNEXTJ                ; ALWAYS\r
+\r
+DFC2HERE: LDA     TEMP2                  ; COLUMN ANIMATION\r
+          STA     SLTBL,Y\r
+DFNEXTJ:  JMP     DFNEXT\r
+\r
+DFRISE:   LDA     VPTBL,Y\r
+          CMP     #$F6\r
+          BCS     DFRISE1                ; LET IT GO PAST TOP OF SCREEN\r
+          CMP     #$EC\r
+          BCC     DFRISE1                ; BUT NOT TOO FAR\r
+\r
+          DEC     FIREGOAL,X             ; TO PREVENT IT FROM STICKING HERE\r
+          JMP     DFDONE\r
+\r
+DFRISE1:  JSR     RANDOM                 ; HOW MUCH DO WE RISE ?\r
+          AND     #7\r
+          STA     TEMP3\r
+          INC     TEMP3                  ; MAKE BETWEEN 1 AND 8\r
+\r
+          LDA     FIREHGHT,X\r
+          STA     TEMP5                  ; NEED TO KEEP OLD HEIGHT\r
+          CLC\r
+          ADC     TEMP3\r
+          CMP     #49\r
+          BCS     DFDONE                 ; DON'T GET TOO HIGH\r
+          STA     FIREHGHT,X\r
+          STA     TEMP7                  ; NEED THIS LATER WITHOUT INDEXING\r
+\r
+          LDX     TEMP1                  ; FIRE TIP SLOT\r
+          LDY     TEMP0                  ; FIRE TABLE INDEX\r
+\r
+          LDA     COLY2,X                ; ADJUST COLISION BOX\r
+          CLC\r
+          ADC     TEMP3\r
+          STA     COLY2,X\r
+\r
+          LDA     VPTBL,X                ; DO TIP FIRST\r
+          SEC\r
+          SBC     TEMP3\r
+          STA     VPTBL,X\r
+\r
+          LDA     TEMP7                  ; NEW HEIGHT\r
+          CMP     #17\r
+          BCC     DFDONE                 ; NO OTHER PIECES\r
+\r
+          LDA     TEMP5                  ; OLD HEIGHT\r
+          CMP     #17                    ; DOES COLUMN 1 ALREADY EXIST\r
+          BCC     DFADDC1J               ; NEED A NEW PIECE\r
+\r
+          LDA     TEMP7                  ; NEW HEIGHT\r
+          CMP     #33\r
+          BCC     DFDONE                 ; NO OTHER PIECES\r
+\r
+          LDA     TEMP5                  ; OLD HEIGHT\r
+          CMP     #33                    ; DOES COLUMN 2 ALREADY EXIST\r
+          BCC     DFADDC2J               ; NEED A NEW PIECE\r
+\r
+DFDONE:   LDX     TEMP0\r
+          LDY     TEMP1\r
+          JMP     DFANIM\r
+\r
+DFADDC1J: JMP     DFADDC1\r
+DFADDC2J: JMP     DFADDC2\r
+DFDELC1J: JMP     DFDELC1\r
+DFDELC2J: JMP     DFDELC2\r
+\r
+DFFALL:   JSR     RANDOM                 ; HOW MUCH DO WE FALL ?\r
+          AND     #7\r
+          STA     TEMP3\r
+          INC     TEMP3                  ; MAKE BETWEEN 1 AND 8\r
+\r
+          LDA     FIREHGHT,X\r
+          STA     TEMP5                  ; NEED TO KEEP OLD HEIGHT\r
+          SEC\r
+          SBC     TEMP3\r
+\r
+          CMP     #2\r
+          BCC     DFLOW                  ; DON'T GET TOO LOW\r
+          CMP     #$F8\r
+          BCS     DFLOW                  ; WATCH FOR NEGATIVES\r
+\r
+          STA     FIREHGHT,X\r
+          STA     TEMP7                  ; NEED THIS LATER WITHOUT INDEXING\r
+\r
+          LDX     TEMP1                  ; FIRE TIP SLOT\r
+          LDY     TEMP0                  ; FIRE TABLE INDEX\r
+\r
+          LDA     COLY2,X                ; ADJUST COLISION BOX\r
+          SEC\r
+          SBC     TEMP3\r
+          STA     COLY2,X\r
+\r
+          LDA     VPTBL,X                ; DO TIP FIRST\r
+          CLC\r
+          ADC     TEMP3\r
+          STA     VPTBL,X\r
+\r
+          LDA     TEMP5                  ; OLD HEIGHT\r
+          CMP     #17\r
+          BCC     DFDONE                 ; NO OTHER PIECES\r
+\r
+          LDA     TEMP7                  ; NEW HEIGHT\r
+          CMP     #17                    ; DOES COLUMN 1 ALREADY EXIST\r
+          BCC     DFDELC1J               ; DELETE A PIECE\r
+\r
+          LDA     TEMP5                  ; OLD HEIGHT\r
+          CMP     #33\r
+          BCC     DFDONE                 ; NO OTHER PIECES\r
+\r
+          LDA     TEMP7                  ; NEW HEIGHT\r
+          CMP     #33                    ; DOES COLUMN 2 ALREADY EXIST\r
+          BCC     DFDELC2J               ; DELETE A PIECE\r
+\r
+          JMP     DFDONE\r
+\r
+DFLOW:    LDA     FIREGOAL,X             ; CALLED WHEN FIRE HEIGHT LESS THAN 2\r
+          BNE     DFDONE\r
+\r
+          LDY     FIRETIP,X\r
+          LDA     #$FF\r
+          STA     FIRETIP,X\r
+\r
+          TYA\r
+          TAX\r
+\r
+          JSR     FIREKILL               ; EXTINGUISH IT\r
+\r
+          LDX     TEMP0\r
+          JMP     DFNEXT\r
+\r
+DFADDC1:  JSR     GETASLOT               ; GET COLUMN SLOT NUMBER IN X\r
+          BMI     DFDONEJ                ; THIS NEEDS TO BE HANDLED BETTER\r
+\r
+          LDY     TEMP1                  ; TIP SLOT NUMBER\r
+\r
+          LDA     VPTBL,Y                ; COL1 VP = TIP VP + HGHT - 16\r
+          CLC\r
+          ADC     TEMP7                  ; NEW HEIGHT\r
+          SEC\r
+          SBC     #16\r
+          STA     VPTBL,X\r
+\r
+          LDA     #0\r
+          STA     COLSTAT,X              ; NO COLISION BOX\r
+\r
+          LDA     HPTBL,Y\r
+          SEC\r
+          SBC     #2\r
+          STA     HPTBL,X\r
+\r
+          LDA     #COL1/256\r
+          STA     SHTBL,X\r
+\r
+          LDA     #COL1&$FF\r
+          STA     SLTBL,X\r
+\r
+          LDA     #(COL1+$1100-$1000)/256   ; NON-HACKED STAMP\r
+          STA     SMTBL,X\r
+\r
+          LDA     #$9D\r
+          STA     PWTBL,X\r
+\r
+          LDA     #16\r
+          STA     YTBL,X\r
+\r
+          LDA     DXTBL,Y                ; SAME DX AS TIP\r
+          STA     TEMP6\r
+          LDA     DFTBL,Y\r
+          STA     TEMP10\r
+\r
+          JSR     OBJINS\r
+\r
+          LDY     TEMP0                  ; FIRE SLOT NUMBER\r
+          TXA\r
+          STA     FIRECOL1,Y             ; MARK IT\r
+\r
+DFDONEJ:  JMP     DFDONE\r
+\r
+DFADDC2:  JSR     GETASLOT               ; GET COLUMN SLOT NUMBER IN X\r
+          BMI     DFDONEJ                ; THIS NEEDS TO BE HANDLED BETTER\r
+\r
+          LDY     TEMP1                  ; TIP SLOT NUMBER\r
+\r
+          LDA     VPTBL,Y                ; COL2 VP = TIP VP + HGHT - 32\r
+          CLC\r
+          ADC     TEMP7                  ; NEW HEIGHT\r
+          SEC\r
+          SBC     #32\r
+          STA     VPTBL,X\r
+\r
+          LDA     #0\r
+          STA     COLSTAT,X              ; NO COLISION BOX\r
+\r
+          LDA     HPTBL,Y\r
+          SEC\r
+          SBC     #2\r
+          STA     HPTBL,X\r
+\r
+          LDA     #COL1/256\r
+          STA     SHTBL,X\r
+\r
+          LDA     #COL1&$FF\r
+          STA     SLTBL,X\r
+\r
+          LDA     #(COL1+$1100-$1000)/256   ; NON-HACKED STAMP\r
+          STA     SMTBL,X\r
+\r
+          LDA     #$9D\r
+          STA     PWTBL,X\r
+\r
+          LDA     #32\r
+          STA     YTBL,X\r
+\r
+          LDA     DXTBL,Y                ; SAME DX AS TIP\r
+          STA     TEMP6\r
+          LDA     DFTBL,Y\r
+          STA     TEMP10\r
+\r
+          JSR     OBJINS\r
+\r
+          LDY     TEMP0                  ; FIRE SLOT NUMBER\r
+          TXA\r
+          STA     FIRECOL2,Y             ; MARK IT\r
+\r
+          JMP     DFDONE\r
+\r
+DFDELC1:  LDX     FIRECOL1,Y\r
+          BMI     DFDONEJ\r
+\r
+          LDA     #SCRENBOT+1\r
+          CMP     VPTBL,X\r
+          BEQ     DFDONEJ\r
+          STA     VPTBL,X\r
+\r
+          JSR     OBJDEL\r
+          JSR     RETASLOT\r
+\r
+          LDY     TEMP0                  ; FIRE SLOT NUMBER\r
+          LDA     #$FF\r
+          STA     FIRECOL1,Y\r
+\r
+          JMP     DFDONE\r
+\r
+DFDELC2:  LDX     FIRECOL2,Y\r
+          BMI     DFDONEJ\r
+\r
+          LDA     #SCRENBOT+1\r
+          CMP     VPTBL,X\r
+          BEQ     DFDONEJ\r
+          STA     VPTBL,X\r
+\r
+          JSR     OBJDEL\r
+          JSR     RETASLOT\r
+\r
+          LDY     TEMP0                  ; FIRE SLOT NUMBER\r
+          LDA     #$FF\r
+          STA     FIRECOL2,Y\r
+\r
+          JMP     DFDONE\r
+\r
+          ;SEQUENCE OF FLAME ANIMATIONS\r
+COLANIM:  .dc.b      COL1&$FF,COL2&$FF,COL1&$FF,COL2&$FF,COL1&$FF,COL2&$FF\r
+\r
+TIPANIM:  .dc.b      TIP1&$FF,TIP2&$FF,TIP3&$FF,TIP1&$FF,TIP2&$FF,TIP3&$FF\r
+\r
+; ROUTINE TO LAUNCH SPHINX AND MINISPHINX SHOTS\r
+\r
+;         TYPE    = TEMP0\r
+;         X       = TEMP2\r
+;         Y       = TEMP7\r
+;         Z       = TEMP9\r
+\r
+LAUNCHER:\r
+          LDX     #3\r
+LOOK4SHT: LDA     SXSHTSTT,X\r
+          BEQ     AFREESHT\r
+          DEX\r
+          BPL     LOOK4SHT\r
+          RTS\r
+\r
+AFREESHT:\r
+          LDY     TEMP0\r
+          INY                            ;1 FOR MINI SPHINX, 2 FOR SPHINX\r
+          TYA\r
+          STA     SXSHTSTT,X             ;MARK SHOT AS USED\r
+\r
+          LDA     #MINISHOT\r
+          JSR     TUNIN\r
+\r
+          JSR     RANDOM                 ; DELAY TIL NEXT SHOT\r
+          AND     #$4F\r
+          LDY     DIFCULTY\r
+          CLC\r
+          ADC     SXSHTMTD,Y\r
+          STA     SPHXSHTD\r
+\r
+          LDA     TEMP2\r
+          STA     XTBL+SPHXSHOT,X\r
+          STA     XTBL+SPXSHTSH,X\r
+          SEC\r
+          SBC     #3\r
+          STA     COLX1+SPHXSHOT,X\r
+          CLC\r
+          ADC     #7\r
+          STA     COLX2+SPHXSHOT,X\r
+\r
+          LDA     TEMP7\r
+          STA     YTBL+SPHXSHOT,X\r
+          SEC\r
+          SBC     #3\r
+          STA     COLY1+SPHXSHOT,X\r
+          CLC\r
+          ADC     #7\r
+          STA     COLY2+SPHXSHOT,X\r
+\r
+          LDA     #0\r
+          STA     YTBL+SPXSHTSH,X\r
+\r
+          LDA     TEMP9\r
+          STA     ZTBL+SPHXSHOT,X\r
+          STA     ZTBL+SPXSHTSH,X\r
+          SEC\r
+          SBC     #3\r
+          STA     COLZ1+SPHXSHOT,X\r
+          CLC\r
+          ADC     #7\r
+          STA     COLZ2+SPHXSHOT,X\r
+\r
+          LDA     TEMP2                  ; PROJECT HP'S\r
+          CLC\r
+          ADC     TEMP9\r
+          ADC     #(-NUMBER-7)&$FF     ;-7 IS HPOFF FOR BOTH SHOT ANIMATIONS\r
+          STA     HPTBL+SPHXSHOT,X       ;HERE ARE THE SHOT AND SHADOW HP'S\r
+          STA     HPTBL+SPXSHTSH,X\r
+\r
+          LDA     TEMP2                  ; PROJECT VP'S\r
+          SEC\r
+          SBC     TEMP9\r
+          CLC\r
+          ADC     #NUMBER\r
+          STA     VPTBL+SPXSHTSH,X       ;HERE IS SHADOW VP\r
+          SEC\r
+          SBC     TEMP7\r
+          STA     VPTBL+SPHXSHOT,X       ;HERE IS SHOT VP\r
+\r
+          LDA     TEMP9                  ; CALCULATE DX AND DF\r
+          SEC\r
+          SBC     TEMP2\r
+          CLC\r
+          ADC     #NUMBER+DXADJ+10       ; THIS IS DF\r
+          STA     TEMP10\r
+          SEC\r
+          SBC     #5                     ; THIS IS DS\r
+          STA     TEMP6                  ;PRIORITY OF SHOT\r
+\r
+          LDA     #SXSHTCOL\r
+          STA     COLSTAT+SPHXSHOT,X     ;STORE THE COLSTAT\r
+\r
+          TXA                            ; GET REAL INDEX FOR SHOT\r
+          CLC\r
+          ADC     #SPHXSHOT\r
+          TAX\r
+          JSR     OBJINS\r
+\r
+          LDA     #$FE\r
+          STA     TEMP6\r
+          STA     TEMP10\r
+\r
+          TXA                            ; GET REAL INDEX FOR SHADOW\r
+          CLC\r
+          ADC     #SPXSHTSH-SPHXSHOT\r
+          TAX\r
+          JSR     OBJINS\r
+\r
+          RTS\r
+\r
+SXSHTMTD: .dc.b      18,14,10,8             ; MINIMUM SPHINX SHOT DELAY\r
+\r
+;THIS DRIVES SPHINX AND MINI SPHINX SHOTS\r
+\r
+DOSXSHTS: DEC     SPHXSHTD\r
+          BPL     MVSHOTS\r
+          LDA     #0\r
+          STA     SPHXSHTD\r
+\r
+MVSHOTS:  LDX     #3\r
+MVSHOTLP: LDA     SXSHTSTT,X\r
+          BNE     SHOTALIV               ; SEE IF SHOT EXISTS\r
+NEXTSHOT2: \r
+         DEX\r
+          BPL     MVSHOTLP\r
+          RTS\r
+\r
+SHOTALIV: STX     TEMP9                  ; SAVE FOR LATER\r
+\r
+          LDA     #0\r
+          STA     TEMP4                  ; DEFAULT X MOTION\r
+          STA     TEMP5                  ; DEFAULT Y MOTION\r
+\r
+          LDA     DIFCULTY\r
+          BEQ     GOLEVEL                ; DON'T TRACK AT NOVICE LEVEL\r
+\r
+          LDA     ZTBL+SPHXSHOT,X\r
+          CMP     #ZBIRDZ+10\r
+          BCC     GOLEVEL                ; DON'T TRACK ONCE PAST BIRD\r
+\r
+          LDA     XTBL+SPHXSHOT,X        ; CALCULATE X MOTION\r
+          SEC\r
+          SBC     XTBL+ZBIRD\r
+          BEQ     GOSTRAIT\r
+          BMI     GORIGHT\r
+\r
+          LDA     #$FF\r
+          BNE     STOREX                 ; ALWAYS\r
+\r
+GORIGHT:  LDA     #1\r
+\r
+STOREX:   STA     TEMP4                  ; X MOTION\r
+\r
+GOSTRAIT: LDA     SXSHTSTT,X             ; CALCULATE Y MOTION\r
+          CMP     #2\r
+          BNE     GOLEVEL                ; DO Y ONLY FOR BIG SPHINX\r
+\r
+          LDA     DIFCULTY\r
+          CMP     #2\r
+          BCC     GOLEVEL                ; TRACK IN Y ONLY AT ADV AND EXP LEVELS\r
+\r
+          LDA     YTBL+SPHXSHOT,X\r
+          SEC\r
+          SBC     YTBL+ZBIRD\r
+          BEQ     GOLEVEL\r
+          BMI     GOUP\r
+\r
+          LDA     #$FF\r
+          BNE     STOREY                 ; ALWAYS\r
+\r
+GOUP:     LDA     #1\r
+\r
+STOREY:   STA     TEMP5                  ; Y MOTION\r
+\r
+GOLEVEL:  LDA     RACK                   ; CALCULATE Z MOTION\r
+          LSR     \r
+;         LSR     \r
+          CLC\r
+          ADC     SXSHTSTT,X\r
+          ADC     SCROLLS                ; MAKE RELATIVE TO GROUND\r
+          STA     TEMP7                  ; Z MOTION - TOWARDS SCREEN\r
+\r
+          LDA     HPTBL+SPHXSHOT,X       ; DO SHOT AND SHAD HP\r
+          CLC\r
+          ADC     TEMP4                  ; X\r
+          SEC\r
+          SBC     TEMP7                  ; Z\r
+          STA     HPTBL+SPHXSHOT,X\r
+          STA     HPTBL+SPXSHTSH,X\r
+\r
+          LDA     VPTBL+SPHXSHOT,X       ; DO SHOT VP\r
+          CLC\r
+          ADC     TEMP4                  ; X\r
+          SEC\r
+          SBC     TEMP5                  ; Y\r
+          CLC\r
+          ADC     TEMP7                  ; Z\r
+          CMP     #$E0\r
+          BCS     VPOKAY\r
+          CMP     #SCRENBOT\r
+          BCS     SXSHTDEL               ; IT'S OFF THE BOTTOM OF THE SCREEN\r
+VPOKAY:   STA     VPTBL+SPHXSHOT,X\r
+\r
+          LDA     VPTBL+SPXSHTSH,X       ; DO SHAD VP\r
+          CLC\r
+          ADC     TEMP4                  ; X\r
+          CLC\r
+          ADC     TEMP7                  ; Z\r
+          STA     VPTBL+SPXSHTSH,X\r
+\r
+          LDA     XTBL+SPHXSHOT,X        ; DO SHOT X\r
+          CLC\r
+          ADC     TEMP4                  ; X\r
+          STA     XTBL+SPHXSHOT,X\r
+          STA     COLPX\r
+\r
+          LDA     YTBL+SPHXSHOT,X        ; DO SHOT Y\r
+          CLC\r
+          ADC     TEMP5                  ; Y\r
+          STA     YTBL+SPHXSHOT,X\r
+          STA     COLPY\r
+\r
+          LDA     ZTBL+SPHXSHOT,X        ; DO SHOT Z\r
+          SEC\r
+          SBC     TEMP7                  ; Z\r
+          STA     ZTBL+SPHXSHOT,X\r
+          STA     COLPZ\r
+\r
+          LDA     COLX1+SPHXSHOT,X       ; DO COLISION X'S\r
+          CLC\r
+          ADC     TEMP4                  ; X\r
+          STA     COLX1+SPHXSHOT,X\r
+          CLC\r
+          ADC     #7\r
+          STA     COLX2+SPHXSHOT,X\r
+\r
+          LDA     COLY1+SPHXSHOT,X       ; DO COLISION Y'S\r
+          CLC\r
+          ADC     TEMP5                  ; Y\r
+          STA     COLY1+SPHXSHOT,X\r
+          CLC\r
+          ADC     #7\r
+          STA     COLY2+SPHXSHOT,X\r
+\r
+          LDA     COLZ1+SPHXSHOT,X       ; DO COLISION Z'S\r
+          SEC\r
+          SBC     TEMP7                  ; Z\r
+          STA     COLZ1+SPHXSHOT,X\r
+          CLC\r
+          ADC     #7\r
+          STA     COLZ2+SPHXSHOT,X\r
+\r
+          LDA     DXTBL+SPHXSHOT,X       ; DO SHOT DX AND DF\r
+          SEC\r
+          SBC     TEMP4                  ; X\r
+          SEC\r
+          SBC     TEMP7                  ; Z\r
+          STA     TEMP6\r
+          CLC\r
+          ADC     #5\r
+          STA     TEMP10\r
+\r
+          TXA                            ; GET REAL SLOT NUMBER\r
+          CLC\r
+          ADC     #SPHXSHOT\r
+          TAX\r
+\r
+          JSR     OBJMOV                 ; MOVE THE SHOT\r
+\r
+          JSR     COLDET\r
+          BNE     SXSHTDEL\r
+\r
+          LDX     TEMP9\r
+          JMP     NEXTSHOT2               ; DO NEXT SHOT\r
+\r
+\r
+SXSHTDEL: LDX     TEMP9\r
+\r
+          LDA     #0\r
+          STA     SXSHTSTT,X\r
+\r
+          TXA                            ; GET REAL SHOT INDEX\r
+          CLC\r
+          ADC     #SPHXSHOT\r
+          TAX\r
+\r
+          JSR     OBJDEL                 ; DELETE SHOT\r
+\r
+          TXA                            ; GET REAL SHADOW INDEX\r
+          CLC\r
+          ADC     #SPXSHTSH-SPHXSHOT\r
+          TAX\r
+\r
+          JSR     OBJDEL                 ; DELETE SHADOW\r
+\r
+          LDX     TEMP9\r
+          JMP     NEXTSHOT2               ; DO NEXT SHOT\r
+\r
+; REMOVE A TREASURE FROM THE SCREEN - INDEX IN X\r
+\r
+DELTREAS: LDA     #SCRENBOT+1\r
+          STA     VPTBL,X\r
+          JSR     OBJDEL\r
+          JSR     RETASLOT\r
+          RTS\r
+\r
+; START THE GLOW ANIMATION FOR A HIEROGLYPH\r
+\r
+GLOHIERO: STX     TEMP1                  ; REMEMBER WHERE IT IS\r
+          STA     TEMP0                  ; REMEMBER WHAT IT IS\r
+\r
+          LDX     HIEROSLT               ; SEE IF ONE IS STILL ANIMATING\r
+          BMI     NOPROB\r
+\r
+          JSR     DHDONE                 ; REMOVE OLD ONE\r
+\r
+NOPROB:   LDX     TEMP1                  ; SLOT NUMBER\r
+          STX     HIEROSLT\r
+\r
+          LDA     #0\r
+          STA     COLSTAT,X              ; DISABLE FURTHER COLISIONS\r
+\r
+          LDA     #$FE                   ; TWO BYTES, FIRE PALETTE\r
+          STA     TEMP6                  ; INCREASE ITS PRIORITY ABOVE THAT\r
+          STA     TEMP10                 ; OF SHADOWS\r
+          JSR     OBJMOV\r
+\r
+          LDA     #30\r
+          STA     XTBL,X                 ; SET ANIMATION TIMER\r
+\r
+          RTS\r
+\r
+; CODE TO ANIMATE A HIERO\r
+\r
+DOHIEROS: LDX     HIEROSLT\r
+          BMI     DHNONE                 ; NO HIERO BEING ANIMATED\r
+\r
+          LDA     VPTBL,X\r
+          CMP     #SCRENBOT+1\r
+          BEQ     DHGONE                 ; IT SCROLLED OFF THE SCREEN\r
+\r
+          DEC     XTBL,X\r
+          BEQ     DHDONE                 ; THE ANIMATION IS DONE\r
+\r
+          LDA     PWTBL,X\r
+          CLC\r
+          ADC     #$20\r
+          STA     PWTBL,X\r
+\r
+DHNONE:   RTS\r
+\r
+DHDONE:   LDA     #SCRENBOT+1\r
+          STA     VPTBL,X\r
+\r
+          JSR     OBJDEL\r
+\r
+          JSR     RETASLOT\r
+\r
+DHGONE:   LDA     #$FF\r
+          STA     HIEROSLT               ; MARK THAT ITS GONE\r
+          RTS\r
+\r
+;          END\r
diff --git a/SGRAPH8.S b/SGRAPH8.S
new file mode 100644 (file)
index 0000000..241c7ff
--- /dev/null
+++ b/SGRAPH8.S
@@ -0,0 +1,2336 @@
+*         SPHINX  SGRAPH8.S\r
+* THE GRAPHICS ARE ORGANIZED AS FOLLOWS:\r
+* 8000 - 8FFF ARE ALL CHARACTERS (16 PAGES)  SOME ARE 8 HIGH AND SOME ARE 16\r
+*         WITH THE FONT AND THE HEIROS IN THE TOP 8 AND THE TITLE PAGE CHARS IN\r
+*         THE BOTTOM 8 PAGES\r
+* A000 - AFFF ARE ALL GRAPHICS (16 PAGES)  INCLUDING SCROLLING STAMPS\r
+* C000 - CFFF ARE ????\r
+*GROUND CHARACTERS 192 AND 214 ARE NOT NEEDED.   4/20/84   JM\r
+*ONLY LETTERS WE NEED IN 320 FONT IS P,L,A,Y,E,R O,N T,W V,I,C S,D X G\r
+\r
+;          ZERODEF\r
+\r
+          ORG     $8000\r
+;ALL CHARS ARE 16X8\r
+CHARS:\r
+NUMBERS:\r
+ZERO0:         .dc.b      $38                    ;ZERO0\r
+               .dc.b      $7E\r
+               .dc.b      $FE\r
+THREE3:                .dc.b      $7C\r
+               .dc.b      $0C\r
+               .dc.b      $78\r
+               .dc.b      $38\r
+               .dc.b      $30\r
+               .dc.b      $38\r
+               .dc.b      $78\r
+\r
+LCANE:    .dc.b      $00,$70                ;LCANE,RCANE\r
+LMWS:     .dc.b      $16,$60                ;LMWS,RMWS\r
+LFEATH:   .dc.b      $00,$60                ;LFEATH,RFEATH\r
+LEYE:     .dc.b      $1F,$00                ;LEYE,REYE\r
+LPAUSE:   .dc.b      $00,$00                ;LPAUSE,RPAUSE    TO BE NUKED\r
+LAHNK:    .dc.b      $01,$80                ;LAHNK,RAHNK\r
+LBIRD:    .dc.b      $09,$00                ;LBIRD,RBIRD\r
+\r
+          .dc.b      $00,$00                ;25  ALL CHARS START HERE\r
+          .dc.b      $00,$00                ;27\r
+          .dc.b      $00,$00                ;29\r
+          .dc.b      $00,$00                ;31\r
+          .dc.b      $00,$00                ;33\r
+          .dc.b      $00,$00                ;35\r
+          .dc.b      $00,$00                ;37\r
+          .dc.b      $00,$00                ;39\r
+          .dc.b      $00,$00                ;41\r
+          .dc.b      $00,$00                ;43\r
+          .dc.b      $00,$00                ;45\r
+          .dc.b      $00,$20                ;47\r
+          .dc.b      $00,$10                ;49\r
+          .dc.b      $00,$00                ;51\r
+          .dc.b      $00,$00                ;53\r
+          .dc.b      $00,$00                ;55\r
+          .dc.b      $00,$00                ;57\r
+          .dc.b      $00,$00                ;59\r
+          .dc.b      $00,$00                ;61\r
+          .dc.b      $04,$10                ;63\r
+          .dc.b      $00,$00                ;65\r
+          .dc.b      $00,$00                ;67\r
+          .dc.b      $00,$00                ;69\r
+          .dc.b      $00,$00                ;71\r
+          .dc.b      $00,$00                ;73\r
+          .dc.b      $00,$00                ;75\r
+          .dc.b      $00,$00                ;77\r
+          .dc.b      $FF,$F8                ;79\r
+          .dc.b      $FF,$FB                ;81\r
+          .dc.b      $00,$00                ;83\r
+          .dc.b      $3F,$FB                ;85\r
+          .dc.b      $00,$00                ;87\r
+          .dc.b      $00,$00                ;89\r
+          .dc.b      $0F,$FB                ;91\r
+          .dc.b      $FF,$FB                ;93\r
+          .dc.b      $3F,$FB                ;95\r
+          .dc.b      $00,$00                ;97\r
+          .dc.b      $00,$00                ;99\r
+          .dc.b      $00,$00                ;101\r
+          .dc.b      $FF,$F8                ;103\r
+          .dc.b      $00,$00                ;105\r
+          .dc.b      $00,$00                ;107\r
+          .dc.b      $01,$00                ;109\r
+          .dc.b      $FF,$00                ;111\r
+          .dc.b      $3F,$FB                ;113\r
+          .dc.b      $00,$00                ;115\r
+          .dc.b      $FF,$FC                ;117\r
+          .dc.b      $00,$00                ;119\r
+          .dc.b      $00,$00                ;121\r
+          .dc.b      $00,$00                ;123\r
+          .dc.b      $FF,$FB                ;125\r
+          .dc.b      $FF,$EC                ;127\r
+          .dc.b      $00,$00                ;129\r
+          .dc.b      $3F,$FB                ;131\r
+          .dc.b      $FF,$FB                ;133\r
+          .dc.b      $FF,$F8                ;135\r
+          .dc.b      $FF,$FB                ;137\r
+          .dc.b      $00,$00                ;139\r
+          .dc.b      $FF,$FB                ;141\r
+          .dc.b      $FF,$FB                ;143\r
+          .dc.b      $FF,$FB                ;145\r
+          .dc.b      $00,$00                ;147\r
+          .dc.b      $00,$00                ;149\r
+          .dc.b      $00,$00                ;151\r
+          .dc.b      $FF,$FB                ;153\r
+          .dc.b      $FF,$FB                ;155\r
+          .dc.b      $00,$00                ;157\r
+          .dc.b      $00,$00                ;159\r
+          .dc.b      $00,$00                ;161\r
+          .dc.b      $FF,$FB                ;163\r
+          .dc.b      $00,$00                ;165\r
+          .dc.b      $3F,$F8                ;167\r
+          .dc.b      $3F,$FB                ;169\r
+          .dc.b      $00,$00                ;171\r
+          .dc.b      $00,$00                ;173\r
+          .dc.b      $3F,$FB                ;175\r
+          .dc.b      $00,$00                ;177\r
+BLANKCHR:\r
+          .dc.b      $00,$00                ;179 THIS IS ALSO A BLANK CHAR\r
+          .dc.b      $FF,$FB                ;181\r
+          .dc.b      $FF,$FB                ;183\r
+          .dc.b      $FF,$FB                ;185\r
+          .dc.b      $FF,$FB                ;187\r
+          .dc.b      $3F,$FB                ;189\r
+          .dc.b      $FF,$F8                ;191\r
+TWOBYTES: .dc.b      $00,$30                ;193    TWO FREE BYTES\r
+          .dc.b      $FF,$F8                ;195\r
+          .dc.b      $FF,$00                ;197\r
+          .dc.b      $00,$40                ;299\r
+          .dc.b      $00,$00                ;201\r
+          .dc.b      $FF,$FB                ;203\r
+          .dc.b      $00,$00                ;205\r
+          .dc.b      $FF,$FB                ;207\r
+          .dc.b      $3F,$FB                ;209\r
+          .dc.b      $FF,$F8                ;211\r
+          .dc.b      $FF,$FB                ;213\r
+BARCON:   .dc.b      $E0                    ;214 BARCON\r
+\r
+CRIGHT:   .dc.b      $7C                    ;215    CRIGHT  COPYRIGHT\r
+XTRA:     .dc.b      $46                    ;XTRA LIFE     216\r
+\r
+AA:       .dc.b      $C6                    ;A             217\r
+B:        .dc.b      $FC                    ;B             218\r
+C:        .dc.b      $70                    ;C             219\r
+D:        .dc.b      $F8                    ;D             220\r
+E:        .dc.b      $FE                    ;E             221\r
+F:        .dc.b      $C0                    ;F             222\r
+G:        .dc.b      $3E                    ;G             223\r
+H:        .dc.b      $C6                    ;H             224\r
+I:        .dc.b      $7E                    ;I             225\r
+J:        .dc.b      $38                    ;J             226\r
+K:        .dc.b      $CE                    ;K             227\r
+L:        .dc.b      $FE                    ;L             228\r
+M:        .dc.b      $C6                    ;M             229\r
+N:        .dc.b      $C6                    ;N             230\r
+O:        .dc.b      $38                    ;O             231\r
+P:        .dc.b      $C0                    ;P             232\r
+Q:        .dc.b      $36                    ;Q             233\r
+R:        .dc.b      $CE                    ;R             234\r
+S:        .dc.b      $7C                    ;S             235\r
+T:        .dc.b      $18                    ;T             236\r
+U:        .dc.b      $7C                    ;U             237\r
+V:        .dc.b      $10                    ;V             238\r
+W:        .dc.b      $6C                    ;W             239\r
+X:        .dc.b      $C6                    ;X             240\r
+Y:        .dc.b      $30                    ;Y             241\r
+Z:        .dc.b      $FE                    ;Z             242\r
+QUEST:    .dc.b      $18                    ;QUEST         243\r
+EXCLAM:   .dc.b      $30                    ;EXCLAM        244\r
+HYPHEN:   .dc.b      $00                    ;HYPHEN        245\r
+\r
+JEWCON:   .dc.b      $10                    ;JEWCON\r
+EGGCON:   .dc.b      $00                    ;EGGCON\r
+LSUN:     .dc.b      $66,$66                ;LSUN,RSUN              248,249\r
+LBOWL:    .dc.b      $07,$C0                ;LBOWL,RBOWL            250,251\r
+PLUS:     .dc.b      $00                    ;PLUS                   252\r
+EQUALS:   .dc.b      $00                    ;EQUALS                 253\r
+LCLEAR:   .dc.b      $00,$00                ;LCLEAR,RCLEAR    TO BE 254,255 NUKED\r
+                                         ;THIS BANK IS FULL!!!\r
+\r
+          ORG     $8100\r
+          .dc.b      $EE                    ;NUMS              TW0\r
+          .dc.b      $18\r
+          .dc.b      $C0\r
+          .dc.b      $CE\r
+          .dc.b      $0C\r
+          .dc.b      $EE\r
+          .dc.b      $EE\r
+          .dc.b      $30\r
+          .dc.b      $EE\r
+          .dc.b      $0C\r
+\r
+          .dc.b      $00,$70                ;LCANE,RCANE\r
+          .dc.b      $12,$20                ;LMWS,RMWS\r
+          .dc.b      $00,$60                ;LFEATH,RFEATH\r
+          .dc.b      $61,$80                ;LEYE,REYE\r
+          .dc.b      $00,$00                ;LPAUSE,RPAUSE\r
+          .dc.b      $01,$80                ;LAHNK,RAHNK\r
+          .dc.b      $04,$80                ;LBIRD\r
+\r
+          .dc.b      $01,$00                ;25\r
+          .dc.b      $01,$00                ;27\r
+          .dc.b      $01,$00                ;29\r
+          .dc.b      $01,$00                ;31\r
+          .dc.b      $01,$02                ;33\r
+          .dc.b      $01,$00                ;35\r
+          .dc.b      $01,$00                ;37\r
+          .dc.b      $01,$00                ;39\r
+          .dc.b      $01,$00                ;41\r
+          .dc.b      $01,$02                ;43\r
+          .dc.b      $01,$00                ;45\r
+          .dc.b      $01,$00                ;47\r
+          .dc.b      $01,$02                ;49\r
+          .dc.b      $01,$00                ;51\r
+          .dc.b      $01,$00                ;53\r
+          .dc.b      $00,$00                ;55\r
+          .dc.b      $01,$00                ;57\r
+          .dc.b      $01,$00                ;59\r
+          .dc.b      $01,$00                ;61\r
+          .dc.b      $41,$00                ;63\r
+          .dc.b      $11,$00                ;65\r
+          .dc.b      $01,$00                ;67\r
+          .dc.b      $01,$00                ;69\r
+          .dc.b      $01,$00                ;71\r
+          .dc.b      $01,$00                ;73\r
+          .dc.b      $01,$00                ;75\r
+          .dc.b      $F1,$00                ;77\r
+          .dc.b      $FF,$FC                ;79\r
+          .dc.b      $FF,$FF                ;81\r
+          .dc.b      $01,$00                ;83\r
+          .dc.b      $2F,$FF                ;85\r
+          .dc.b      $01,$00                ;87\r
+          .dc.b      $01,$00                ;89\r
+          .dc.b      $03,$FF                ;91\r
+          .dc.b      $FF,$FF                ;93\r
+          .dc.b      $3F,$FF                ;95\r
+          .dc.b      $01,$03                ;97\r
+          .dc.b      $01,$00                ;99\r
+          .dc.b      $01,$00                ;101\r
+          .dc.b      $3F,$FF                ;103\r
+          .dc.b      $C1,$00                ;105\r
+          .dc.b      $C0,$00                ;107\r
+          .dc.b      $00,$00                ;109\r
+          .dc.b      $FF,$00                ;111\r
+          .dc.b      $3F,$FF                ;113\r
+          .dc.b      $01,$00                ;115\r
+          .dc.b      $FF,$C0                ;117\r
+          .dc.b      $00,$03                ;119\r
+          .dc.b      $C1,$00                ;121\r
+          .dc.b      $01,$00                ;123\r
+          .dc.b      $FF,$FF                ;125\r
+          .dc.b      $FF,$F0                ;127\r
+          .dc.b      $01,$03                ;129\r
+          .dc.b      $3F,$FF                ;131\r
+          .dc.b      $FF,$FF                ;133\r
+          .dc.b      $FF,$FC                ;135\r
+          .dc.b      $FF,$FF                ;137\r
+          .dc.b      $01,$00                ;139\r
+          .dc.b      $FF,$FF                ;141\r
+          .dc.b      $FF,$FF                ;143\r
+          .dc.b      $FF,$FF                ;145\r
+          .dc.b      $C1,$00                ;147\r
+          .dc.b      $01,$00                ;149\r
+          .dc.b      $C1,$00                ;151\r
+          .dc.b      $FF,$FF                ;153\r
+          .dc.b      $FF,$FF                ;155\r
+          .dc.b      $01,$03                ;157\r
+          .dc.b      $F1,$00                ;159\r
+          .dc.b      $01,$00                ;161\r
+          .dc.b      $FF,$FF                ;163\r
+          .dc.b      $00,$03                ;165\r
+          .dc.b      $FF,$FC                ;167\r
+          .dc.b      $FF,$FF                ;169\r
+          .dc.b      $00,$03                ;171\r
+          .dc.b      $FC,$43                ;173\r
+          .dc.b      $3F,$FF                ;175\r
+          .dc.b      $00,$03                ;177\r
+          .dc.b      $00,$00                ;179\r
+          .dc.b      $FF,$FF                ;181\r
+          .dc.b      $FF,$FF                ;183\r
+          .dc.b      $FF,$FF                ;185\r
+          .dc.b      $FF,$FF                ;179\r
+          .dc.b      $FF,$FF                ;189\r
+          .dc.b      $FF,$FF                ;191\r
+          .dc.b      $C4,$FF                ;193\r
+          .dc.b      $FF,$FF                ;195\r
+          .dc.b      $FF,$40                ;197\r
+          .dc.b      $F1,$FF                ;199\r
+          .dc.b      $F0,$4F                ;201\r
+          .dc.b      $FF,$FF                ;203\r
+          .dc.b      $F3,$0F                ;205\r
+          .dc.b      $FF,$FF                ;207\r
+          .dc.b      $3F,$FF                ;209\r
+          .dc.b      $FF,$FF                ;211\r
+          .dc.b      $FF,$FF                ;213\r
+          .dc.b      $D0                    ;214    BARCON\r
+\r
+          .dc.b      $82                    ;CRIGHT\r
+          .dc.b      $EE                    ;XTRA\r
+\r
+          .dc.b      $C6                    ;A\r
+          .dc.b      $C6                    ;B\r
+          .dc.b      $DC                    ;C\r
+          .dc.b      $CC                    ;D\r
+          .dc.b      $C0                    ;E\r
+          .dc.b      $C0                    ;F\r
+          .dc.b      $E6                    ;G\r
+          .dc.b      $C6                    ;H\r
+          .dc.b      $18                    ;I\r
+          .dc.b      $CC                    ;J\r
+          .dc.b      $CC                    ;K\r
+          .dc.b      $FE                    ;L\r
+          .dc.b      $C6                    ;M\r
+          .dc.b      $C6                    ;N\r
+          .dc.b      $EE                    ;O\r
+          .dc.b      $C0                    ;P\r
+          .dc.b      $EC                    ;Q\r
+          .dc.b      $CC                    ;R\r
+          .dc.b      $C6                    ;S\r
+          .dc.b      $18                    ;T\r
+          .dc.b      $EE                    ;U\r
+          .dc.b      $38                    ;V\r
+          .dc.b      $7C                    ;W\r
+          .dc.b      $C6                    ;X\r
+          .dc.b      $30                    ;Y\r
+          .dc.b      $C6                    ;Z\r
+          .dc.b      $00                    ;QUEST\r
+          .dc.b      $00                    ;EXCLAM\r
+          .dc.b      $00                    ;HYPHEN\r
+\r
+          .dc.b      $38                    ;JEWCON\r
+          .dc.b      $78                    ;EGGCON\r
+          .dc.b      $19,$98                ;LSUN,RSUN\r
+          .dc.b      $1F,$F0                ;LBOWL,RBOWL\r
+          .dc.b      $18                    ;PLUS\r
+          .dc.b      $00                    ;EQUALS\r
+          .dc.b      $40,$E0                ;LCLEAR,RCLEAR\r
+\r
+          ORG     $8200\r
+          .dc.b      $E6                    ;NUMS                 THREE\r
+          .dc.b      $18\r
+          .dc.b      $60\r
+          .dc.b      $04\r
+          .dc.b      $FE\r
+          .dc.b      $02\r
+          .dc.b      $C6\r
+          .dc.b      $30\r
+          .dc.b      $EE\r
+          .dc.b      $06\r
+\r
+          .dc.b      $00,$70                ;LCANE,RCANE\r
+          .dc.b      $13,$E8                ;LMWS,RMWS\r
+          .dc.b      $00,$E0                ;LFEATH,RFEATH\r
+          .dc.b      $CC,$FE                ;LEYE,REYE\r
+          .dc.b      $00,$00                ;LPAUSE,RPAUSE\r
+          .dc.b      $0F,$F0                ;LAHNK,RAHNK\r
+          .dc.b      $03,$FC                ;LBIRD,RBIRD\r
+\r
+          .dc.b      $00,$00                ;25\r
+          .dc.b      $00,$00                ;27\r
+          .dc.b      $00,$00                ;29\r
+          .dc.b      $00,$00                ;31\r
+          .dc.b      $00,$00                ;33\r
+          .dc.b      $00,$01                ;35\r
+          .dc.b      $00,$00                ;37\r
+          .dc.b      $00,$02                ;39\r
+          .dc.b      $00,$01                ;41\r
+          .dc.b      $00,$00                ;43\r
+          .dc.b      $00,$00                ;45\r
+          .dc.b      $20,$00                ;47\r
+          .dc.b      $00,$00                ;49\r
+          .dc.b      $00,$00                ;51\r
+          .dc.b      $80,$08                ;53\r
+          .dc.b      $00,$00                ;55\r
+          .dc.b      $00,$00                ;57\r
+          .dc.b      $00,$00                ;59\r
+          .dc.b      $00,$10                ;61\r
+          .dc.b      $00,$11                ;63\r
+          .dc.b      $00,$00                ;65\r
+          .dc.b      $00,$00                ;67\r
+          .dc.b      $00,$10                ;69\r
+          .dc.b      $00,$00                ;71\r
+          .dc.b      $00,$00                ;73\r
+          .dc.b      $00,$00                ;75\r
+          .dc.b      $FF,$00                ;77\r
+          .dc.b      $FF,$FC                ;79\r
+          .dc.b      $FF,$FF                ;81\r
+          .dc.b      $00,$00                ;83\r
+          .dc.b      $07,$FF                ;85\r
+          .dc.b      $00,$00                ;87\r
+          .dc.b      $00,$00                ;89\r
+          .dc.b      $00,$3F                ;91\r
+          .dc.b      $FF,$FF                ;93\r
+          .dc.b      $0F,$FF                ;95\r
+          .dc.b      $00,$0F                ;97\r
+          .dc.b      $00,$00                ;99\r
+          .dc.b      $00,$00                ;101\r
+          .dc.b      $0F,$EF                ;103\r
+          .dc.b      $FC,$00                ;105\r
+          .dc.b      $FC,$00                ;107\r
+          .dc.b      $00,$00                ;109\r
+          .dc.b      $FC,$00                ;111\r
+          .dc.b      $0F,$FF                ;113\r
+          .dc.b      $00,$00                ;115\r
+          .dc.b      $FF,$00                ;117\r
+          .dc.b      $00,$0F                ;119\r
+          .dc.b      $C0,$00                ;121\r
+          .dc.b      $C0,$00                ;123\r
+          .dc.b      $FF,$FF                ;125\r
+          .dc.b      $FC,$00                ;127\r
+          .dc.b      $00,$3F                ;129\r
+          .dc.b      $3F,$FF                ;131\r
+          .dc.b      $FF,$FF                ;133\r
+          .dc.b      $FF,$FC                ;135\r
+          .dc.b      $FF,$FF                ;137\r
+          .dc.b      $00,$00                ;139\r
+          .dc.b      $FF,$FF                ;141\r
+          .dc.b      $FF,$FF                ;143\r
+          .dc.b      $FF,$FF                ;145\r
+          .dc.b      $FC,$00                ;147\r
+          .dc.b      $00,$00                ;149\r
+          .dc.b      $F0,$00                ;151\r
+          .dc.b      $FF,$FF                ;153\r
+          .dc.b      $FF,$FF                ;155\r
+          .dc.b      $00,$3F                ;157\r
+          .dc.b      $FC,$00                ;159\r
+          .dc.b      $00,$00                ;161\r
+          .dc.b      $FF,$FF                ;163\r
+          .dc.b      $00,$3F                ;165\r
+          .dc.b      $FF,$FC                ;167\r
+          .dc.b      $FF,$FF                ;169\r
+          .dc.b      $04,$3F                ;171\r
+          .dc.b      $FF,$FF                ;173\r
+          .dc.b      $0F,$FF                ;175\r
+          .dc.b      $00,$3F                ;177\r
+          .dc.b      $00,$00                ;179\r
+          .dc.b      $FF,$FF                ;181\r
+          .dc.b      $FF,$FF                ;183\r
+          .dc.b      $FF,$FF                ;185\r
+          .dc.b      $FF,$FF                ;187\r
+          .dc.b      $FF,$FF                ;189\r
+          .dc.b      $FF,$FF                ;191\r
+          .dc.b      $FF,$FF                ;193\r
+          .dc.b      $FF,$FF                ;195\r
+          .dc.b      $FF,$00                ;197\r
+          .dc.b      $FF,$FF                ;199\r
+          .dc.b      $FF,$FF                ;201\r
+          .dc.b      $FF,$FF                ;203\r
+          .dc.b      $FF,$FF                ;205\r
+          .dc.b      $FF,$FF                ;207\r
+          .dc.b      $7F,$FF                ;209\r
+          .dc.b      $FF,$FF                ;211\r
+          .dc.b      $FF,$FF                ;213\r
+          .dc.b      $C8                    ;214    BARCON\r
+\r
+          .dc.b      $BA                    ;CRIGHT\r
+          .dc.b      $7C                    ;XTRA\r
+          .dc.b      $FE                    ;A\r
+          .dc.b      $C6                    ;B\r
+          .dc.b      $C0                    ;C\r
+          .dc.b      $C6                    ;D\r
+          .dc.b      $C0                    ;E\r
+          .dc.b      $C0                    ;F\r
+          .dc.b      $C6                    ;G\r
+          .dc.b      $C6                    ;H\r
+          .dc.b      $18                    ;I\r
+          .dc.b      $CC                    ;J\r
+          .dc.b      $D8                    ;K\r
+          .dc.b      $C0                    ;L\r
+          .dc.b      $C6                    ;M\r
+          .dc.b      $CE                    ;N\r
+          .dc.b      $C6                    ;O\r
+          .dc.b      $F8                    ;P\r
+          .dc.b      $DC                    ;Q\r
+          .dc.b      $C8                    ;R\r
+          .dc.b      $0E                    ;S\r
+          .dc.b      $18                    ;T\r
+          .dc.b      $C6                    ;U\r
+          .dc.b      $6C                    ;V\r
+          .dc.b      $D6                    ;W\r
+          .dc.b      $6C                    ;X\r
+          .dc.b      $30                    ;Y\r
+          .dc.b      $60                    ;Z\r
+          .dc.b      $08                    ;QUEST\r
+          .dc.b      $30                    ;EXCLAM\r
+          .dc.b      $00                    ;HYPHEN\r
+\r
+          .dc.b      $7C                    ;JEWCON\r
+          .dc.b      $E4                    ;EGGCON\r
+          .dc.b      $00,$00                ;LSUN,RSUN\r
+          .dc.b      $7F,$FC                ;LBOWL,RBOWL\r
+          .dc.b      $18                    ;PLUS\r
+          .dc.b      $7E                    ;EQUALS\r
+          .dc.b      $40,$40                ;LCLEAR,RCLEAR\r
+\r
+          ORG     $8300\r
+          .dc.b      $D6                    ;NUMS          FOUR\r
+          .dc.b      $18\r
+          .dc.b      $38\r
+          .dc.b      $38\r
+          .dc.b      $CC\r
+          .dc.b      $0E\r
+          .dc.b      $DC\r
+          .dc.b      $18\r
+          .dc.b      $38\r
+          .dc.b      $76\r
+\r
+          .dc.b      $00,$70                ;LCANE,RCANE\r
+          .dc.b      $1B,$E8                ;LMWS,RMWS\r
+          .dc.b      $01,$E0                ;LFEATH,RFEATH\r
+          .dc.b      $61,$80                ;LEYE,REYE\r
+          .dc.b      $02,$00                ;LPAUSE,RPAUSE\r
+          .dc.b      $03,$C0                ;LAHNK,RAHNK\r
+          .dc.b      $07,$F0                ;LBIRD,RBIRD\r
+\r
+          .dc.b      $00,$00                ;25\r
+          .dc.b      $00,$00                ;27\r
+          .dc.b      $00,$00                ;29\r
+          .dc.b      $00,$00                ;31\r
+          .dc.b      $00,$00                ;33\r
+          .dc.b      $00,$20                ;35\r
+          .dc.b      $00,$00                ;37\r
+          .dc.b      $08,$00                ;39\r
+          .dc.b      $00,$00                ;41\r
+          .dc.b      $00,$00                ;43\r
+          .dc.b      $00,$80                ;45\r
+          .dc.b      $00,$82                ;47\r
+          .dc.b      $00,$00                ;49\r
+          .dc.b      $00,$00                ;51\r
+          .dc.b      $02,$00                ;53\r
+          .dc.b      $00,$00                ;55\r
+          .dc.b      $00,$00                ;57\r
+          .dc.b      $00,$00                ;59\r
+          .dc.b      $00,$01                ;61\r
+          .dc.b      $04,$40                ;63\r
+          .dc.b      $40,$00                ;65\r
+          .dc.b      $00,$00                ;67\r
+          .dc.b      $10,$00                ;69\r
+          .dc.b      $00,$00                ;71\r
+          .dc.b      $00,$00                ;73\r
+          .dc.b      $00,$00                ;75\r
+          .dc.b      $FF,$C0                ;77\r
+          .dc.b      $FF,$E0                ;79\r
+          .dc.b      $FF,$EF                ;81\r
+          .dc.b      $00,$00                ;83\r
+          .dc.b      $03,$2F                ;85\r
+          .dc.b      $00,$00                ;87\r
+          .dc.b      $00,$00                ;89\r
+          .dc.b      $00,$03                ;91\r
+          .dc.b      $FF,$EF                ;93\r
+          .dc.b      $0F,$EF                ;95\r
+          .dc.b      $00,$0F                ;97\r
+          .dc.b      $3C,$00                ;99\r
+          .dc.b      $00,$00                ;101\r
+          .dc.b      $00,$FF                ;103\r
+          .dc.b      $FF,$C0                ;105\r
+          .dc.b      $FF,$E0                ;107\r
+          .dc.b      $00,$04                ;109\r
+          .dc.b      $FC,$00                ;111\r
+          .dc.b      $03,$EF                ;113\r
+          .dc.b      $00,$00                ;115\r
+          .dc.b      $FF,$00                ;117\r
+          .dc.b      $00,$2F                ;119\r
+          .dc.b      $C0,$00                ;121\r
+          .dc.b      $C0,$00                ;123\r
+          .dc.b      $FF,$EF                ;125\r
+          .dc.b      $C0,$00                ;127\r
+          .dc.b      $00,$EF                ;129\r
+          .dc.b      $0F,$EF                ;131\r
+          .dc.b      $FF,$EF                ;133\r
+          .dc.b      $FF,$E0                ;135\r
+          .dc.b      $FF,$EF                ;137\r
+          .dc.b      $00,$00                ;139\r
+          .dc.b      $FF,$EF                ;141\r
+          .dc.b      $FF,$EF                ;143\r
+          .dc.b      $FF,$EF                ;145\r
+          .dc.b      $FF,$C0                ;147\r
+          .dc.b      $00,$00                ;149\r
+          .dc.b      $F0,$00                ;151\r
+          .dc.b      $FF,$EF                ;153\r
+          .dc.b      $FF,$EF                ;155\r
+          .dc.b      $00,$EF                ;157\r
+          .dc.b      $FF,$00                ;159\r
+          .dc.b      $00,$00                ;161\r
+          .dc.b      $FF,$EF                ;163\r
+          .dc.b      $03,$EF                ;165\r
+          .dc.b      $FF,$EC                ;167\r
+          .dc.b      $FF,$EF                ;169\r
+          .dc.b      $00,$EF                ;171\r
+          .dc.b      $FF,$EF                ;173\r
+          .dc.b      $0F,$EF                ;175\r
+          .dc.b      $0F,$EF                ;177\r
+          .dc.b      $00,$00                ;179\r
+          .dc.b      $FF,$EF                ;181\r
+          .dc.b      $FF,$EF                ;183\r
+          .dc.b      $FF,$EF                ;185\r
+          .dc.b      $FF,$EF                ;187\r
+          .dc.b      $FF,$EF                ;189\r
+          .dc.b      $FF,$EF                ;191\r
+          .dc.b      $FF,$EF                ;193\r
+          .dc.b      $FF,$EF                ;195\r
+          .dc.b      $FF,$00                ;197\r
+          .dc.b      $FF,$EF                ;199\r
+          .dc.b      $FF,$EF                ;201\r
+          .dc.b      $FF,$EF                ;203\r
+          .dc.b      $FF,$EF                ;205\r
+          .dc.b      $FF,$EF                ;207\r
+          .dc.b      $3F,$EF                ;209\r
+          .dc.b      $FF,$EF                ;211\r
+          .dc.b      $FF,$EF                ;213\r
+          .dc.b      $64                    ;214   BARCON\r
+\r
+          .dc.b      $A2                    ;CRIGHT\r
+          .dc.b      $38                    ;XTRA\r
+          .dc.b      $C6                    ;A\r
+          .dc.b      $FC                    ;B\r
+          .dc.b      $C0                    ;C\r
+          .dc.b      $C6                    ;D\r
+          .dc.b      $F8                    ;E\r
+          .dc.b      $F8                    ;F\r
+          .dc.b      $CE                    ;G\r
+          .dc.b      $FE                    ;H\r
+          .dc.b      $18                    ;I\r
+          .dc.b      $0C                    ;J\r
+          .dc.b      $F0                    ;K\r
+          .dc.b      $C0                    ;L\r
+          .dc.b      $D6                    ;M\r
+          .dc.b      $DE                    ;N\r
+          .dc.b      $C6                    ;O\r
+          .dc.b      $CE                    ;P\r
+          .dc.b      $C6                    ;Q\r
+          .dc.b      $F8                    ;R\r
+          .dc.b      $3C                    ;S\r
+          .dc.b      $18                    ;T\r
+          .dc.b      $C6                    ;U\r
+          .dc.b      $C6                    ;V\r
+          .dc.b      $D6                    ;W\r
+          .dc.b      $38                    ;X\r
+          .dc.b      $30                    ;Y\r
+          .dc.b      $30                    ;Z\r
+          .dc.b      $0C                    ;QUEST\r
+          .dc.b      $30                    ;EXCLAM\r
+          .dc.b      $7C                    ;HYPHEN\r
+\r
+          .dc.b      $C6                    ;JEWCON\r
+          .dc.b      $F2                    ;EGGCON\r
+          .dc.b      $03,$C0                ;LSUN,RSUN\r
+          .dc.b      $FF,$FE                ;LBOWL,RBOWL\r
+          .dc.b      $7E                    ;PLUS\r
+          .dc.b      $00                    ;EQUALS\r
+          .dc.b      $44,$00                ;LCLEAR,RCLEAR\r
+\r
+          ORG     $8400\r
+          .dc.b      $CE                    ;NUMS         FIVE\r
+          .dc.b      $18\r
+          .dc.b      $0C\r
+          .dc.b      $04\r
+          .dc.b      $6C\r
+          .dc.b      $F8\r
+          .dc.b      $C0\r
+          .dc.b      $0C\r
+          .dc.b      $EE\r
+          .dc.b      $C6\r
+\r
+          .dc.b      $0E,$70                ;LCANE,RCANE\r
+          .dc.b      $17,$F0                ;LMWS,RMWS\r
+          .dc.b      $03,$E0                ;LFEATH,RFEATH\r
+          .dc.b      $1F,$00                ;LEYE,REYE\r
+          .dc.b      $06,$00                ;LPAUSE,RPAUSE\r
+          .dc.b      $02,$40                ;LAHNK,RAHNK\r
+          .dc.b      $0F,$C0                ;LBIRD,RBIRD\r
+\r
+          .dc.b      $00,$04                ;25\r
+          .dc.b      $00,$04                ;27\r
+          .dc.b      $00,$04                ;29\r
+          .dc.b      $00,$04                ;31\r
+          .dc.b      $00,$84                ;33\r
+          .dc.b      $00,$04                ;35\r
+          .dc.b      $00,$04                ;37\r
+          .dc.b      $00,$04                ;39\r
+          .dc.b      $00,$04                ;41\r
+          .dc.b      $00,$04                ;43\r
+          .dc.b      $00,$04                ;45\r
+          .dc.b      $00,$04                ;47\r
+          .dc.b      $00,$04                ;49\r
+          .dc.b      $00,$44                ;51\r
+          .dc.b      $00,$04                ;53\r
+          .dc.b      $00,$04                ;55\r
+          .dc.b      $00,$04                ;57\r
+          .dc.b      $00,$04                ;59\r
+          .dc.b      $00,$04                ;61\r
+          .dc.b      $40,$04                ;63\r
+          .dc.b      $00,$04                ;65\r
+          .dc.b      $00,$04                ;67\r
+          .dc.b      $00,$04                ;69\r
+          .dc.b      $00,$04                ;71\r
+          .dc.b      $00,$04                ;73\r
+          .dc.b      $00,$04                ;75\r
+          .dc.b      $FF,$84                ;77\r
+          .dc.b      $FF,$84                ;79\r
+          .dc.b      $FF,$BF                ;81\r
+          .dc.b      $00,$04                ;83\r
+          .dc.b      $00,$07                ;85\r
+          .dc.b      $00,$04                ;87\r
+          .dc.b      $00,$04                ;89\r
+          .dc.b      $00,$00                ;91\r
+          .dc.b      $2F,$BF                ;93\r
+          .dc.b      $0F,$BF                ;95\r
+          .dc.b      $00,$3F                ;97\r
+          .dc.b      $0F,$04                ;99\r
+          .dc.b      $00,$04                ;101\r
+          .dc.b      $00,$3F                ;103\r
+          .dc.b      $FF,$BF                ;105\r
+          .dc.b      $FF,$BF                ;107\r
+          .dc.b      $10,$00                ;109\r
+          .dc.b      $FF,$04                ;111\r
+          .dc.b      $03,$BF                ;113\r
+          .dc.b      $00,$04                ;115\r
+          .dc.b      $FC,$04                ;117\r
+          .dc.b      $00,$3F                ;119\r
+          .dc.b      $F0,$04                ;121\r
+          .dc.b      $F0,$04                ;123\r
+          .dc.b      $FF,$BC                ;125\r
+          .dc.b      $00,$04                ;127\r
+          .dc.b      $0C,$BF                ;129\r
+          .dc.b      $0F,$BF                ;131\r
+          .dc.b      $FF,$BF                ;133\r
+          .dc.b      $FF,$BC                ;135\r
+          .dc.b      $FF,$BF                ;137\r
+          .dc.b      $00,$04                ;139\r
+          .dc.b      $FF,$BF                ;141\r
+          .dc.b      $FF,$BF                ;143\r
+          .dc.b      $FF,$BF                ;147\r
+          .dc.b      $FF,$BF                ;147\r
+          .dc.b      $00,$04                ;149\r
+          .dc.b      $FF,$04                ;151\r
+          .dc.b      $FF,$BF                ;153\r
+          .dc.b      $FF,$BF                ;155\r
+          .dc.b      $03,$BF                ;157\r
+          .dc.b      $FF,$84                ;159\r
+          .dc.b      $00,$04                ;161\r
+          .dc.b      $FF,$BF                ;163\r
+          .dc.b      $13,$BF                ;165\r
+          .dc.b      $FF,$B0                ;167\r
+          .dc.b      $FF,$BF                ;169\r
+          .dc.b      $0F,$BF                ;171\r
+          .dc.b      $FF,$BF                ;173\r
+          .dc.b      $0F,$BF                ;175\r
+          .dc.b      $FF,$BF                ;177\r
+          .dc.b      $00,$00                ;179\r
+          .dc.b      $FF,$BF                ;181\r
+          .dc.b      $FF,$BF                ;183\r
+          .dc.b      $FF,$BF                ;185\r
+          .dc.b      $FF,$BF                ;187\r
+          .dc.b      $FF,$BF                ;189\r
+          .dc.b      $FF,$BF                ;191\r
+          .dc.b      $FF,$BF                ;193\r
+          .dc.b      $FF,$BF                ;195\r
+          .dc.b      $FF,$04                ;197\r
+          .dc.b      $FF,$BF                ;199\r
+          .dc.b      $FF,$BF                ;201\r
+          .dc.b      $FF,$BF                ;203\r
+          .dc.b      $FF,$BF                ;205\r
+          .dc.b      $FF,$BF                ;207\r
+          .dc.b      $FF,$BF                ;209\r
+          .dc.b      $FF,$BF                ;211\r
+          .dc.b      $FF,$BF                ;213\r
+          .dc.b      $32                    ;214    BARCON\r
+\r
+          .dc.b      $BA                    ;CRIGHT\r
+          .dc.b      $70                    ;XTRA\r
+          .dc.b      $6C                    ;A\r
+          .dc.b      $C8                    ;B\r
+          .dc.b      $C0                    ;C\r
+          .dc.b      $C6                    ;D\r
+          .dc.b      $C0                    ;E\r
+          .dc.b      $C0                    ;F\r
+          .dc.b      $C0                    ;G\r
+          .dc.b      $C6                    ;H\r
+          .dc.b      $18                    ;I\r
+          .dc.b      $0C                    ;J\r
+          .dc.b      $D0                    ;K\r
+          .dc.b      $C0                    ;L\r
+          .dc.b      $EE                    ;M\r
+          .dc.b      $F6                    ;N\r
+          .dc.b      $C6                    ;O\r
+          .dc.b      $C6                    ;P\r
+          .dc.b      $C6                    ;Q\r
+          .dc.b      $CE                    ;R\r
+          .dc.b      $E0                    ;S\r
+          .dc.b      $18                    ;T\r
+          .dc.b      $C6                    ;U\r
+          .dc.b      $C6                    ;V\r
+          .dc.b      $C6                    ;W\r
+          .dc.b      $38                    ;X\r
+          .dc.b      $38                    ;Y\r
+          .dc.b      $18                    ;Z\r
+          .dc.b      $06                    ;QUEST\r
+          .dc.b      $30                    ;EXCLAM\r
+          .dc.b      $00                    ;HYPHEN\r
+\r
+          .dc.b      $BA                    ;JEWCON\r
+          .dc.b      $FA                    ;EGGCON\r
+          .dc.b      $07,$E0                ;LSUN,RSUN\r
+          .dc.b      $FF,$FE                ;LBOWL,RBOWL\r
+          .dc.b      $18                    ;PLUS\r
+          .dc.b      $7E                    ;EQUALS\r
+          .dc.b      $0C,$00                ;LCLEAR,RCLEAR\r
+\r
+          ORG     $8500\r
+          .dc.b      $EE                    ;NUMS           SIX\r
+          .dc.b      $78\r
+          .dc.b      $C6\r
+          .dc.b      $CE\r
+          .dc.b      $3C\r
+          .dc.b      $C0\r
+          .dc.b      $E0\r
+          .dc.b      $CE\r
+          .dc.b      $EE\r
+          .dc.b      $EC\r
+\r
+          .dc.b      $0E,$70                ;LCANE,RCANE\r
+          .dc.b      $10,$00                ;LMWS,RMWS\r
+          .dc.b      $03,$E0                ;LFEATH,RFEATH\r
+          .dc.b      $40,$7E                ;LEYE,REYE\r
+          .dc.b      $0E,$00                ;LPAUSE,RPAUSE\r
+          .dc.b      $06,$60                ;LAHNK.RAHNK\r
+          .dc.b      $0F,$80                ;LBIRD,RBIRD\r
+\r
+          .dc.b      $00,$00                ;25\r
+          .dc.b      $00,$00                ;27\r
+          .dc.b      $00,$00                ;29\r
+          .dc.b      $00,$40                ;31\r
+          .dc.b      $00,$00                ;33\r
+          .dc.b      $00,$50                ;35\r
+          .dc.b      $00,$00                ;37\r
+          .dc.b      $00,$00                ;39\r
+          .dc.b      $02,$00                ;41\r
+          .dc.b      $02,$00                ;43\r
+          .dc.b      $00,$00                ;45\r
+          .dc.b      $00,$00                ;47\r
+          .dc.b      $00,$00                ;49\r
+          .dc.b      $00,$00                ;51\r
+          .dc.b      $20,$00                ;53\r
+          .dc.b      $00,$00                ;55\r
+          .dc.b      $00,$00                ;57\r
+          .dc.b      $00,$00                ;59\r
+          .dc.b      $00,$01                ;61\r
+          .dc.b      $01,$00                ;63\r
+          .dc.b      $00,$00                ;65\r
+          .dc.b      $00,$00                ;67\r
+          .dc.b      $01,$00                ;69\r
+          .dc.b      $00,$00                ;71\r
+          .dc.b      $00,$00                ;73\r
+          .dc.b      $00,$00                ;75\r
+          .dc.b      $FB,$F0                ;77\r
+          .dc.b      $F8,$00                ;79\r
+          .dc.b      $FB,$FF                ;81\r
+          .dc.b      $00,$00                ;83\r
+          .dc.b      $00,$03                ;85\r
+          .dc.b      $00,$00                ;87\r
+          .dc.b      $00,$00                ;89\r
+          .dc.b      $00,$00                ;91\r
+          .dc.b      $03,$FF                ;93\r
+          .dc.b      $0B,$FF                ;95\r
+          .dc.b      $00,$3F                ;97\r
+          .dc.b      $03,$00                ;99\r
+          .dc.b      $00,$00                ;101\r
+          .dc.b      $00,$0F                ;103\r
+          .dc.b      $FB,$FF                ;105\r
+          .dc.b      $FB,$FF                ;107\r
+          .dc.b      $C0,$00                ;109\r
+          .dc.b      $FB,$00                ;111\r
+          .dc.b      $03,$FF                ;113\r
+          .dc.b      $10,$3F                ;115\r
+          .dc.b      $F8,$00                ;117\r
+          .dc.b      $00,$FF                ;119\r
+          .dc.b      $F0,$00                ;121\r
+          .dc.b      $E0,$00                ;123\r
+          .dc.b      $FB,$C0                ;125\r
+          .dc.b      $00,$00                ;127\r
+          .dc.b      $0B,$FF                ;129\r
+          .dc.b      $3B,$FF                ;131\r
+          .dc.b      $FB,$FF                ;133\r
+          .dc.b      $FB,$F0                ;135\r
+          .dc.b      $FB,$FF                ;137\r
+          .dc.b      $00,$00                ;139\r
+          .dc.b      $FB,$FF                ;141\r
+          .dc.b      $FB,$FF                ;143\r
+          .dc.b      $FB,$FF                ;145\r
+          .dc.b      $FB,$FF                ;147\r
+          .dc.b      $F0,$00                ;149\r
+          .dc.b      $FF,$00                ;151\r
+          .dc.b      $FB,$FF                ;153\r
+          .dc.b      $FB,$FF                ;155\r
+          .dc.b      $03,$FF                ;157\r
+          .dc.b      $FB,$C0                ;159\r
+          .dc.b      $F8,$00                ;161\r
+          .dc.b      $FB,$FF                ;163\r
+          .dc.b      $03,$FF                ;165\r
+          .dc.b      $FB,$F4                ;167\r
+          .dc.b      $FB,$FF                ;169\r
+          .dc.b      $3B,$FF                ;171\r
+          .dc.b      $FB,$FF                ;173\r
+          .dc.b      $0B,$FF                ;175\r
+          .dc.b      $FB,$FF                ;177\r
+          .dc.b      $00,$00                ;179\r
+          .dc.b      $FB,$FF                ;181\r
+          .dc.b      $FB,$FF                ;183\r
+          .dc.b      $FB,$FF                ;185\r
+          .dc.b      $FB,$FF                ;187\r
+          .dc.b      $FB,$FF                ;189\r
+          .dc.b      $FB,$FF                ;191\r
+          .dc.b      $FB,$FF                ;193\r
+          .dc.b      $FB,$FF                ;195\r
+          .dc.b      $FB,$C0                ;197\r
+          .dc.b      $FB,$FF                ;199\r
+          .dc.b      $FB,$FF                ;201\r
+          .dc.b      $FB,$FF                ;203\r
+          .dc.b      $FB,$FF                ;205\r
+          .dc.b      $FB,$FF                ;207\r
+          .dc.b      $FB,$FF                ;209\r
+          .dc.b      $FB,$FF                ;211\r
+          .dc.b      $FB,$FF                ;213\r
+          .dc.b      $1A                    ;214    BARCON\r
+\r
+          .dc.b      $82                    ;CRIGHT\r
+          .dc.b      $E4                    ;XTRA\r
+          .dc.b      $78                    ;A\r
+          .dc.b      $CC                    ;B\r
+          .dc.b      $DC                    ;C\r
+          .dc.b      $CC                    ;D\r
+          .dc.b      $C0                    ;E\r
+          .dc.b      $C0                    ;F\r
+          .dc.b      $E0                    ;G\r
+          .dc.b      $C6                    ;H\r
+          .dc.b      $18                    ;I\r
+          .dc.b      $0C                    ;J\r
+          .dc.b      $C8                    ;K\r
+          .dc.b      $C0                    ;L\r
+          .dc.b      $C6                    ;M\r
+          .dc.b      $E6                    ;N\r
+          .dc.b      $EE                    ;O\r
+          .dc.b      $CE                    ;P\r
+          .dc.b      $EE                    ;Q\r
+          .dc.b      $CE                    ;R\r
+          .dc.b      $E6                    ;S\r
+          .dc.b      $7E                    ;T\r
+          .dc.b      $C6                    ;U\r
+          .dc.b      $C6                    ;V\r
+          .dc.b      $C6                    ;W\r
+          .dc.b      $6C                    ;X\r
+          .dc.b      $6C                    ;Y\r
+          .dc.b      $CC                    ;Z\r
+          .dc.b      $66                    ;QUEST\r
+          .dc.b      $30                    ;EXCLAM\r
+          .dc.b      $00                    ;HYPHEN\r
+\r
+          .dc.b      $7C                    ;JEWCON\r
+          .dc.b      $7A                    ;EGGCON\r
+          .dc.b      $07,$E0                ;LSUN,RSUN\r
+          .dc.b      $00,$00                ;LBOWL,RBOWL\r
+          .dc.b      $18                    ;PLUS\r
+          .dc.b      $00                    ;EQUALS\r
+          .dc.b      $1C,$02                ;LCLEAR,RCLEAR\r
+\r
+          ORG     $8600\r
+          .dc.b      $38                    ;NUMS   SEVEN\r
+          .dc.b      $38\r
+          .dc.b      $7C\r
+          .dc.b      $7C\r
+          .dc.b      $1C\r
+          .dc.b      $FE\r
+          .dc.b      $38\r
+          .dc.b      $FE\r
+          .dc.b      $38\r
+          .dc.b      $38\r
+\r
+          .dc.b      $0F,$F0                ;LCANE,RCANE\r
+          .dc.b      $39,$C0                ;LMWS,RMWS\r
+          .dc.b      $03,$E0                ;LFEATH,RFEATH\r
+          .dc.b      $3F,$C0                ;LEYE,REYE\r
+          .dc.b      $7F,$80                ;LPAUSE,RPAUSE\r
+          .dc.b      $06,$60                ;LAHNK.RAHNK\r
+          .dc.b      $77,$00                ;LBIRD,RBIRD\r
+\r
+          .dc.b      $10,$00                ;25\r
+          .dc.b      $10,$40                ;27\r
+          .dc.b      $10,$10                ;29\r
+          .dc.b      $10,$00                ;31\r
+          .dc.b      $10,$09                ;33\r
+          .dc.b      $12,$08                ;35\r
+          .dc.b      $10,$00                ;37\r
+          .dc.b      $10,$40                ;39\r
+          .dc.b      $10,$00                ;41\r
+          .dc.b      $10,$00                ;43\r
+          .dc.b      $10,$00                ;45\r
+          .dc.b      $10,$00                ;47\r
+          .dc.b      $10,$40                ;49\r
+          .dc.b      $10,$00                ;51\r
+          .dc.b      $10,$80                ;53\r
+          .dc.b      $10,$00                ;55\r
+          .dc.b      $00,$00                ;57\r
+          .dc.b      $00,$00                ;59\r
+          .dc.b      $10,$44                ;61\r
+          .dc.b      $10,$04                ;63\r
+          .dc.b      $10,$00                ;65\r
+          .dc.b      $10,$00                ;67\r
+          .dc.b      $10,$11                ;69\r
+          .dc.b      $10,$00                ;71\r
+          .dc.b      $10,$00                ;73\r
+          .dc.b      $10,$00                ;75\r
+          .dc.b      $FF,$C0                ;77\r
+          .dc.b      $C0,$00                ;79\r
+          .dc.b      $F0,$C0                ;81\r
+          .dc.b      $10,$00                ;83\r
+          .dc.b      $10,$00                ;85\r
+          .dc.b      $10,$00                ;87\r
+          .dc.b      $10,$00                ;89\r
+          .dc.b      $10,$00                ;91\r
+          .dc.b      $10,$0F                ;93\r
+          .dc.b      $13,$FF                ;95\r
+          .dc.b      $10,$3F                ;97\r
+          .dc.b      $13,$F0                ;99\r
+          .dc.b      $10,$00                ;101\r
+          .dc.b      $10,$03                ;103\r
+          .dc.b      $FF,$FF                ;105\r
+          .dc.b      $FF,$FF                ;107\r
+          .dc.b      $FF,$C0                ;109\r
+          .dc.b      $FF,$00                ;111\r
+          .dc.b      $10,$FF                ;113\r
+          .dc.b      $03,$FF                ;115\r
+          .dc.b      $FC,$00                ;117\r
+          .dc.b      $00,$FF                ;119\r
+          .dc.b      $F0,$00                ;121\r
+          .dc.b      $FC,$00                ;123\r
+          .dc.b      $FF,$00                ;125\r
+          .dc.b      $10,$00                ;127\r
+          .dc.b      $1F,$FF                ;129\r
+          .dc.b      $3F,$FF                ;131\r
+          .dc.b      $FF,$FF                ;133\r
+          .dc.b      $FF,$F0                ;135\r
+          .dc.b      $FF,$FF                ;137\r
+          .dc.b      $10,$00                ;139\r
+          .dc.b      $FF,$FF                ;141\r
+          .dc.b      $FF,$FF                ;143\r
+          .dc.b      $FF,$FF                ;145\r
+          .dc.b      $FF,$FF                ;147\r
+          .dc.b      $FF,$C0                ;149\r
+          .dc.b      $FB,$C0                ;151\r
+          .dc.b      $FF,$FF                ;153\r
+          .dc.b      $FF,$FF                ;155\r
+          .dc.b      $13,$FF                ;157\r
+          .dc.b      $FF,$C0                ;159\r
+          .dc.b      $FF,$F0                ;161\r
+          .dc.b      $FF,$FF                ;163\r
+          .dc.b      $0F,$FF                ;165\r
+          .dc.b      $FF,$F0                ;167\r
+          .dc.b      $FF,$FF                ;169\r
+          .dc.b      $3F,$FF                ;171\r
+          .dc.b      $FF,$FF                ;173\r
+          .dc.b      $0F,$FF                ;175\r
+          .dc.b      $FF,$FF                ;177\r
+          .dc.b      $00,$00                ;179\r
+          .dc.b      $FF,$FF                ;181\r
+          .dc.b      $FF,$FF                ;183\r
+          .dc.b      $FF,$FF                ;185\r
+          .dc.b      $FF,$FF                ;187\r
+          .dc.b      $FF,$FF                ;189\r
+          .dc.b      $FF,$FF            &n