         ttl     Primitive drawing routines for L1 Graphics
         macg
         tab
         bin
         incl    inc:module.asm
stack    set     66
         module  grafpack
         aliasexport  vline,external,FRED_GRAPHICS_VLINE
         aliasexport  hline,external,FRED_GRAPHICS_HLINE
         aliasexport  offset,external,FRED_GRAPHICS_OFFSET
         aliasexport  colour,external,FRED_GRAPHICS_COLOUR
         aliasexport  enable,external,FRED_GRAPHICS_ENABLE
         aliasexport  clear,external,FRED_GRAPHICS_CLEAR
         aliasexport  line,external,FRED_GRAPHICS_LINE
         aliasexport  fill,external,FRED_GRAPHICS_FILL
         aliasexport  cfill,external,FRED_GRAPHICS_CFILL
         aliasexport  bwfill,external,FRED_GRAPHICS_BWFILL
         aliasexport  plot,external,FRED_GRAPHICS_PLOT
         aliasexport  triangle,external,FRED_GRAPHICS_TRIANGLE
         aliasexport  trapeze,external,FRED_GRAPHICS_TRAPEZE
         aliasexport  paint,external,FRED_GRAPHICS_PAINT
         aliasexport  textat,external,FRED_GRAPHICS_TEXTAT
         aliasexport  showsym,external,FRED_GRAPHICS_SHOWSYM
         aliasexport  showstr,external,FRED_GRAPHICS_SHOWSTR
         aliasexport  showcst,external,FRED_GRAPHICS_SHOWCST
         aliasexport  font,external,FRED_GRAPHICS_FONT
         aliasexport  upcmap,external,FRED_GRAPHICS_UPCMAP
         aliasexport  hclear,external,FRED_GRAPHICS_HCLEAR
         aliasexport  mousex,external,FRED_GRAPHICS_MOUSEX
         aliasexport  mousey,external,FRED_GRAPHICS_MOUSEY
         aliasexport  mouseb,external,FRED_GRAPHICS_MOUSEB
         aliasexport  fontht,external,FRED_GRAPHICS_FONTHT
         aliasexport  fontdp,external,FRED_GRAPHICS_FONTDP
         aliasexport  fontwx,external,FRED_GRAPHICS_FONTWX
         aliasexport  fontwn,external,FRED_GRAPHICS_FONTWN
         aliasexport  stringwd,external,FRED_GRAPHICS_STRNGW
         aliasexport  charwd,external,FRED_GRAPHICS_CHARWD
         aliasexport  charht,external,FRED_GRAPHICS_CHARHT
         aliasexport  chardp,external,FRED_GRAPHICS_CHARDP
         aliasexport  textxpos,external,FRED_GRAPHICS_XPOS
         aliasexport  textypos,external,FRED_GRAPHICS_YPOS

********************************
*                              *
* Primitive drawing routines   *
*   for level 1 graphics.      *
*                              *
* Copyright M.R.King 1984,1985 *
*    All rights reserved       *
*                              *
********************************

fsbase   set     $E00000
fspwrten set     fsbase+$20000     bits 0-3 of byte
fscolour set     fsbase+$20001     bits 0-3 of byte
fsorigin set     fsbase+$20002     X bits 0-5, Y bits 6-15
fscolmap set     fsbase+$30000
mousexr  set     $7F400
mouseyr  set     $7F402
duartinp set     $7F45B

black    set     $0
red      set     $1
green    set     $2
yellow   set     $3
blue     set     $4
magenta  set     $5
cyan     set     $6
white    set     $7

movel30  macro
\*       move.l  \1,(\2)+   1
         move.l  \1,(\2)+   2
         move.l  \1,(\2)+   3
         move.l  \1,(\2)+   4
         move.l  \1,(\2)+   5
         move.l  \1,(\2)+   6
         move.l  \1,(\2)+   7
         move.l  \1,(\2)+   8
         move.l  \1,(\2)+   9
         move.l  \1,(\2)+   10
         move.l  \1,(\2)+   11
         move.l  \1,(\2)+   12
         move.l  \1,(\2)+   13
         move.l  \1,(\2)+   14
         move.l  \1,(\2)+   15
         move.l  \1,(\2)+   16
         move.l  \1,(\2)+   17
         move.l  \1,(\2)+   18
         move.l  \1,(\2)+   19
         move.l  \1,(\2)+   20
         move.l  \1,(\2)+   21
         move.l  \1,(\2)+   22
         move.l  \1,(\2)+   23
         move.l  \1,(\2)+   24
         move.l  \1,(\2)+   25
         move.l  \1,(\2)+   26
         move.l  \1,(\2)+   27
         move.l  \1,(\2)+   28
         move.l  \1,(\2)+   29
         move.l  \1,(\2)+   30
         endm

         code

         dc.b    'Level 1 Graphics primitive routines. '
         dc.b    'Copyright M.R.King, 26/3/1984. '
         dc.b    'All rights reserved.'
         ds.w    0

mousethr equ     1023

mousex   move.w  mousexr,d0
         move.w  #0,mousexr
         cmp.w   #mousethr,d0
         bgt.s   mouseig
         cmp.w   #-mousethr,d0
         blt.s   mouseig
         ext.l   d0
         rts

mousey   move.w  mouseyr,d0
         move.w  #0,mouseyr
         cmp.w   #mousethr,d0
         bgt.s   mouseig
         cmp.w   #-mousethr,d0
         blt.s   mouseig
         ext.l   d0
         rts

mouseig  move.l  #0,d0
         rts

mouseb   lea     currbutt,a0
         move.l  #%1110,d0
         and.b   duartinp,d0
         move.w  mousetab(d0.w),d0
mouselp  cmp.w   (a0),d0
         beq.s   mousebrt
         move.l  d0,d1
         move.w  #10000,d0
mousewt  dbra    d0,mousewt
         move.l  #%1110,d0
         and.b   duartinp,d0
         move.w  mousetab(d0.w),d0
         cmp.w   d0,d1
         bne     mouselp
         move.w  d0,(a0)
mousebrt rts
mousetab dc.w    %000,%100,%010,%110,%001,%101,%011,%111

vline    move.l  #$03FF,d3    d0=x, d1=y1, d2=y2
         and.l   d3,d1
         and.l   d3,d2
         move.w  d0,d3
         and.w   #$03F0,d0
         lsr.w   #3,d0
         lea     fsbase,a0
         add.w   d0,a0
         not.w   d3
         and.w   #$F,d3
         clr.w   d0
         bset.l  d3,d0
         sub.w   d1,d2
         bcc.s   vlininy3
         add.w   d2,d1
         neg.w   d2
vlininy3 lsl.l   #7,d1
         add.l   d1,a0
         move.l  #-128,d1
         lsr.w   #1,d2
         bcc.s   vlinele3
vlinelp3 move.w  d0,(a0)
         sub.l   d1,a0
vlinele3 move.w  d0,(a0)
         sub.l   d1,a0
         dbra    d2,vlinelp3
         rts

hline    move.l  d4,-(sp)    d0=x1, d1=x2, d2=y
         move.l  #$03FF,d3
         and.w   d3,d0
         and.w   d3,d1
         and.l   d3,d2
         lsl.l   #7,d2
         lea     fsbase,a0
         add.l   d2,a0
         cmp.w   d0,d1
         bcc.s   hlininx3
         exg     d0,d1
hlininx3 move.w  d0,d2
         and.w   #$001F,d2
         move.l  #-1,d3
         lsr.l   d2,d3
         move.w  d1,d2
         not.w   d2
         and.w   #$001F,d2
         move.l  #-1,d4
         lsl.l   d2,d4
         and.w   #$03E0,d0
         and.w   #$03E0,d1
         lsr.w   #3,d0
         lsr.w   #3,d1
         add.w   d0,a0
         sub.w   d1,d0
         bne.s   hlinbig3
         and.l   d3,d4
         move.l  d4,(a0)
         move.l  (sp)+,d4
         rts
hlinbig3 asr.w   d0
         move.l  d3,(a0)+
         move.l  #-1,d1
         jmp     hlinend3(d0.w)
         movel30 d1,a0
         move.l  d4,(a0)
hlinend3 move.l  (sp)+,d4
         rts

offset   lsr.w   #4,d0    d0=x, d1=y
         and.w   #63,d0
         add.w   #511,d1
         lsl.w   #6,d1
         or.w    d1,d0
         move.w  d0,fsorigin
         rts

colour   lea     curpandc+1,a0   d0 = colour
         move.b  d0,(a0)
         move.b  d0,fscolour
         rts

enable   lea     curpandc,a0  d0 = mask
         move.b  d0,(a0)
         move.b  d0,fspwrten
         rts

fill     movem.l d4-d5,-(sp)    d0=x1, d1=y1, d2=x2, d3=y2
         move.l  #$03FF,d4
         and.w   d4,d0
         and.l   d4,d1
         and.w   d4,d2
         and.l   d4,d3
         lea     fsbase,a1
         cmp.w   d0,d2
         bcc.s   boxincx3
         exg     d0,d2
boxincx3 sub.w   d1,d3
         bcc.s   boxincy3
         add.w   d3,d1
         neg.w   d3
boxincy3 lsl.l   #7,d1
         add.l   d1,a1
         move.w  d0,d1
         and.w   #$001F,d1
         move.l  #-1,d4
         lsr.l   d1,d4
         move.w  d2,d1
         not.w   d1
         and.w   #$001F,d1
         move.l  #-1,d5
         lsl.l   d1,d5
         move.w  #128,d1
         and.w   #$03E0,d0
         and.w   #$03E0,d2
         lsr.w   #3,d0
         lsr.w   #3,d2
         add.w   d0,a1
         sub.w   d2,d0
         bne.s   bigbox3
         and.l   d4,d5
smalblp3 move.l  d5,(a1)
         add.w   d1,a1
         dbra    d3,smalblp3
         movem.l (sp)+,d4-d5
         rts

bigbox3  asr.w   #1,d0
         lea     boxend3(d0.w),a2
         move.l  #-1,d0
boxloop3 move.l  a1,a0
         move.l  d4,(a0)+
         jmp     (a2)
         movel30 d0,a0
         move.l  d5,(a0)
boxend3  add.w   d1,a1
         dbra    d3,boxloop3
         movem.l (sp)+,d4-d5
         rts

cfill    move.l  #$07FF,d4   %integer x0,y0,x1,y1, %integer %name b
         lea     fsbase,a1
         lea     fscolour,a2
         lea     cfillt,a3
         and.w   d4,d0
         and.w   d4,d2
         and.w   d4,d3
         and.w   d1,d4
         cmp.w   d0,d2
         bpl.s   cfillix
         exg     d2,d0
cfillix  sub.w   d4,d3
         bpl.s   cfilliy
         add.w   d3,d4
         neg.w   d3
cfilliy  lsl.l   #7,d4
         move.l  #7,d1
         and.w   d0,d1
         lsr.w   #3,d0
         add.w   d0,d4
         add.l   d4,a1      Frame start address in a4
         move.l  #7,d4
         and.w   d2,d4
         add.w   d4,d4
         move.w  0(a3,d4.w),d4
         lea     0(a3,d4.w),a3
         lsr.w   #3,d2
         sub.w   d2,d0
         bne.s   cfillln
         lea     52(a3),a3
cfillln  add.w   d1,d1
         move.w  d1,d4
         add.w   d4,d4
         add.w   d4,d1
         lea     0(a3,d1.w),a3
         move.w  d0,d2
         neg.w   d2
         sub.w   #1,d2
         move.w  d2,d1
         add.w   #127,d0
         clr     d4
         jmp     (a3)
cfillt   dc.w    cfill0-cfillt,cfill1-cfillt,cfill2-cfillt,cfill3-cfillt
         dc.w    cfill4-cfillt,cfill5-cfillt,cfill6-cfillt,cfill7-cfillt
cfilllp  add.l   d0,a1
         move.l  d2,d1
         jmp     (a3)
cfilln   macro
\*       move.b  (a0)+,(a2)
         move.b  #$80>>\1,(a1)
         endm
cfillm   macro
\*       cfilln  0
         cfilln  1
         cfilln  2
         cfilln  3
         cfilln  4
         cfilln  5
         cfilln  6
         move.b  (a0)+,(a2)
         move.b  #1,(a1)+
         dbra    d1,\*
         endm
cfillo   macro
         move.b  (a0)+,(a2)
         move.b  #$80>>\1,(a1)+
         dbra    d3,cfilllp
         move.b  curpandc+1,(a2)
         rts
         endm
cfill0   cfillm
         cfillo  0
cfill1   cfillm
         cfilln  0
         cfillo  1
cfill2   cfillm
         cfilln  0
         cfilln  1
         cfillo  2
cfill3   cfillm
         cfilln  0
         cfilln  1
         cfilln  2
         cfillo  3
cfill4   cfillm
         cfilln  0
         cfilln  1
         cfilln  2
         cfilln  3
         cfillo  4
cfill5   cfillm
         cfilln  0
         cfilln  1
         cfilln  2
         cfilln  3
         cfilln  4
         cfillo  5
cfill6   cfillm
         cfilln  0
         cfilln  1
         cfilln  2
         cfilln  3
         cfilln  4
         cfilln  5
         cfillo  6
cfill7   cfillm
         cfilln  0
         cfilln  1
         cfilln  2
         cfilln  3
         cfilln  4
         cfilln  5
         cfilln  6
         cfillo  7

bwfill   movem.l d4/a4,-(sp)   %integer x0,y0,x1,y1, %integer %name b,t
         move.l  #$07FF,d4
         lea     fsbase,a4
         lea     fscolour,a2
         lea     bfillt,a3
         and.w   d4,d0
         and.w   d4,d2
         and.w   d4,d3
         and.w   d1,d4
         cmp.w   d0,d2
         bpl.s   bfillix
         exg     d2,d0
bfillix  sub.w   d4,d3
         bpl.s   bfilliy
         add.w   d3,d4
         neg.w   d3
bfilliy  lsl.l   #7,d4
         move.l  #7,d1
         and.w   d0,d1
         lsr.w   #3,d0
         add.w   d0,d4
         add.l   d4,a4      Frame start address in a4
         move.l  #7,d4
         and.w   d2,d4
         add.w   d4,d4
         move.w  0(a3,d4.w),d4
         lea     0(a3,d4.w),a3
         lsr.w   #3,d2
         sub.w   d2,d0
         bne.s   bfillln
         lea     52(a3),a3
bfillln  add.w   d1,d1
         move.w  d1,d4
         lsl.w   #2,d4
         add.w   d4,d1
         lea     0(a3,d1.w),a3
         move.w  d0,d2
         neg.w   d2
         sub.w   #1,d2
         move.w  d2,d1
         add.w   #127,d0
         clr     d4
         jmp     (a3)
bfillt   dc.w    bfill0-bfillt,bfill1-bfillt,bfill2-bfillt,bfill3-bfillt
         dc.w    bfill4-bfillt,bfill5-bfillt,bfill6-bfillt,bfill7-bfillt
bfilllp  add.l   d0,a4
         move.l  d2,d1
         jmp     (a3)
bfilln   macro
\*       move.b  (a0)+,d4
         move.b  0(a1,d4.w),(a2)
         move.b  #$80>>\1,(a4)
         endm
bfillm   macro
\*       bfilln  0
         bfilln  1
         bfilln  2
         bfilln  3
         bfilln  4
         bfilln  5
         bfilln  6
         move.b  (a0)+,d4
         move.b  0(a1,d4.w),(a2)
         move.b  #1,(a4)+
         dbra    d1,\*
         endm
bfillo   macro
         move.b  (a0)+,d4
         move.b  0(a1,d4.w),(a2)
         move.b  #$80>>\1,(a4)+
         dbra    d3,bfilllp
         move.b  curpandc+1,(a2)
         movem.l (sp)+,d4/a4
         rts
         endm
bfill0   bfillm
         bfillo  0
bfill1   bfillm
         bfilln  0
         bfillo  1
bfill2   bfillm
         bfilln  0
         bfilln  1
         bfillo  2
bfill3   bfillm
         bfilln  0
         bfilln  1
         bfilln  2
         bfillo  3
bfill4   bfillm
         bfilln  0
         bfilln  1
         bfilln  2
         bfilln  3
         bfillo  4
bfill5   bfillm
         bfilln  0
         bfilln  1
         bfilln  2
         bfilln  3
         bfilln  4
         bfillo  5
bfill6   bfillm
         bfilln  0
         bfilln  1
         bfilln  2
         bfilln  3
         bfilln  4
         bfilln  5
         bfillo  6
bfill7   bfillm
         bfilln  0
         bfilln  1
         bfilln  2
         bfilln  3
         bfilln  4
         bfilln  5
         bfilln  6
         bfillo  7

hclear   movem.l d4-d7/a4,-(sp)
         movem.l hclrdata,d1-d7/a0-a4
         move.w  #$FF00,fspwrten
         and.l   #1,d0
         swap    d0
         add.l   d0,a4
         move.l  #127,d0
hclrloop lea     -40(a4),a4
         movem.l d1-d7/a0-a3,-(a4)
         movem.l d1-d7/a0-a3,-(a4)
         lea     -40(a4),a4
         movem.l d1-d7/a0-a3,-(a4)
         movem.l d1-d7/a0-a3,-(a4)
         lea     -40(a4),a4
         movem.l d1-d7/a0-a3,-(a4)
         movem.l d1-d7/a0-a3,-(a4)
         lea     -40(a4),a4
         movem.l d1-d7/a0-a3,-(a4)
         movem.l d1-d7/a0-a3,-(a4)
         dbra    d0,hclrloop
         move.w  curpandc,fspwrten
         movem.l (sp)+,d4-d7/a4
         rts
hclrdata dc.l    -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,fsbase+$10000

clear    move.w  #$FF00,fspwrten
         movem.l d4-d7/a4-a6,-(sp)
         movem.l cleardat,d0-d7/a0-a6
fsclrlp  movem.l d0-d6/a0-a5,-(a6)
         movem.l d0-d6/a0-a5,-(a6)
         movem.l d0-d6/a0-a5,-(a6)
         movem.l d0-d6/a0-a5,-(a6)
         movem.l d0-d6/a0-a5,-(a6)
         movem.l d0-d6/a0-a5,-(a6)
         movem.l d0-d6/a0-a5,-(a6)
         movem.l d0-d6/a0-a5,-(a6)
         movem.l d0-d6/a0-a5,-(a6)
         movem.l d0-d6/a0-a3,-(a6)
         dbra    d7,fsclrlp
         move.w  curpandc,fspwrten
         movem.l (sp)+,d4-d7/a4-a6
         rts
cleardat dc.l    -1,-1,-1,-1,-1,-1,-1,$FF,-1,-1,-1,-1,-1,-1,fsbase+$20000

plot     lea     fsbase,a0     d0=x, d1=y
         and.l   #$03FF,d1
         lsl.l   #7,d1
         add.l   d1,a0
         move.w  d0,d1
         lsr.w   #3,d1
         and.w   #$007F,d1
         and.w   #$0007,d0
         move.b  bitab(d0.w),0(a0,d1.w)
         rts
bitab    dc.b    %10000000,%01000000
         dc.b    %00100000,%00010000
         dc.b    %00001000,%00000100
         dc.b    %00000010,%00000001
         ds.w    0

upcmap   movem.l d4-d7/a4-a6,-(sp)
         move.l  #fscolmap+1024,a1
loop     movem.w 494(a0),d0-d7/a2
         movem.l d0-d7/a2,-(a1)
         movem.w 468(a0),d0-d7/a2-a6
         movem.l d0-d7/a2-a6,-(a1)
         movem.w 442(a0),d0-d7/a2-a6
         movem.l d0-d7/a2-a6,-(a1)
         movem.w 416(a0),d0-d7/a2-a6
         movem.l d0-d7/a2-a6,-(a1)
         movem.w 390(a0),d0-d7/a2-a6
         movem.l d0-d7/a2-a6,-(a1)
         movem.w 364(a0),d0-d7/a2-a6
         movem.l d0-d7/a2-a6,-(a1)
         movem.w 338(a0),d0-d7/a2-a6
         movem.l d0-d7/a2-a6,-(a1)
         movem.w 312(a0),d0-d7/a2-a6
         movem.l d0-d7/a2-a6,-(a1)
         movem.w 286(a0),d0-d7/a2-a6
         movem.l d0-d7/a2-a6,-(a1)
         movem.w 260(a0),d0-d7/a2-a6
         movem.l d0-d7/a2-a6,-(a1)
         movem.w 234(a0),d0-d7/a2-a6
         movem.l d0-d7/a2-a6,-(a1)
         movem.w 208(a0),d0-d7/a2-a6
         movem.l d0-d7/a2-a6,-(a1)
         movem.w 182(a0),d0-d7/a2-a6
         movem.l d0-d7/a2-a6,-(a1)
         movem.w 156(a0),d0-d7/a2-a6
         movem.l d0-d7/a2-a6,-(a1)
         movem.w 130(a0),d0-d7/a2-a6
         movem.l d0-d7/a2-a6,-(a1)
         movem.w 104(a0),d0-d7/a2-a6
         movem.l d0-d7/a2-a6,-(a1)
         movem.w 78(a0),d0-d7/a2-a6
         movem.l d0-d7/a2-a6,-(a1)
         movem.w 52(a0),d0-d7/a2-a6
         movem.l d0-d7/a2-a6,-(a1)
         movem.w 26(a0),d0-d7/a2-a6
         movem.l d0-d7/a2-a6,-(a1)
         movem.w (a0),d0-d7/a2-a6
         movem.l d0-d7/a2-a6,-(a1)
         movem.l (sp)+,d4-d7/a4-a6
         rts

font     tst.l   d0
         bne.s   notdefnt
         lea     defont,a0
         move.l  a0,d0
notdefnt lea     curfont,a0
         move.l  d0,(a0)
         rts

fontht   move.l  curfont,a0
         move.w  512(a0),d0
         ext.l   d0
         rts

fontdp   move.l  curfont,a0
         move.w  514(a0),d0
         ext.l   d0
         rts

fontwx   move.l  curfont,a0
         move.w  516(a0),d0
         ext.l   d0
         rts

fontwn   move.l  curfont,a0
         move.w  518(a0),d0
         ext.l   d0
         rts

charwd   move.l  curfont,a0
         add.w   d0,d0
         and.w   #$01FE,d0
         add.w   0(a0,d0.w),a0
         move.w  2(a0),d0
         ext.l   d0
         rts

stringwd move.l  curfont,a1
         move.l  #0,d0
         move.l  #0,d1
         move.b  (a0)+,d1
         bra.s   strngwls
strngwlp move.l  #0,d2
         move.b  (a0)+,d2
         add.w   d2,d2
         move.w  0(a1,d2.w),d2
         move.w  2(a1,d2.w),d3
         bpl.s   strngwad
         sub.w   d3,d0
         dbra    d1,strngwlp
         rts
strngwad add.w   d3,d0
strngwls dbra    d1,strngwlp
         rts

charht   move.l  curfont,a0
         add.w   d0,d0
         and.w   #$01FE,d0
         add.w   0(a0,d0.w),a0
         move.w  (a0),d0
         add.w   4(a0),d0
         ext.l   d0
         rts

chardp   move.l  curfont,a0
         add.w   d0,d0
         and.w   #$01FE,d0
         add.w   0(a0,d0.w),a0
         move.w  4(a0),d0
         neg.w   d0
         ext.l   d0
         rts

textxpos move.w  xpos,d0
         ext.l   d0
         rts

textypos move.w  ypos,d0
         ext.l   d0
         rts

textat   lea     curpandc,a0
         and.w   #$3FF,d0
         and.w   #$3FF,d1
         move.w  d0,2(a0)
         move.w  d1,4(a0)
         rts

showstr  move.l  d4,-(sp)
         move.l  #0,d4
         move.l  a0,a2
         move.b  (a2)+,d4
         bra.s   showslps
showslp  move.b  (a2)+,d0
         bsr.s   showsym
showslps dbra    d4,showslp
         move.l  (sp)+,d4
         rts

showcst  move.l  a0,a2
         bra.s   showcbe
showclp  bsr     showsym
showcbe  move.b  (a2)+,d0
         bne     showclp
         rts

showsym  movem.l d4-d5,-(sp)
         add.w   d0,d0
         and.w   #$01FE,d0
         move.l  curfont,a0
         add.w   0(a0,d0.w),a0
         move.w  (a0)+,d4
         lea     xpos,a1
         move.w  (a1),d0
         move.w  d0,d3
         move.w  (a0)+,d1
         bmi.s   sdsym
         add.w   d1,d3
         and.w   #$3FF,d3
         move.w  d3,(a1)
         lea     fsbase,a1
         move.l  #0,d1
         move.w  ypos,d1
         add.w   (a0)+,d1
         lsl.l   #7,d1
         move.w  d0,d3
         lsr.w   #3,d0
         and.w   #$007E,d0
         add.w   d0,a1
         move.l  #-128,d2
         move.l  #$1FFFF,d5
         neg.w   d3
         and.w   #$000F,d3
         beq.s   shsymfls
         bra.s   shsymlps
shsymlp  move.l  #0,d0
         move.w  (a0)+,d0
         lsl.l   d3,d0
         move.l  d0,0(a1,d1.l)
         sub.l   d2,d1
shsymlps and.l   d5,d1
         dbra    d4,shsymlp
         movem.l (sp)+,d4-d5
         rts
shsymflp move.w  (a0)+,0(a1,d1.l)
         sub.l   d2,d1
shsymfls and.l   d5,d1
         dbra    d4,shsymflp
         movem.l (sp)+,d4-d5
         rts
sdsym    sub.w   d1,d3
         and.w   #$3FF,d3
         move.w  d3,(a1)
         lea     fsbase,a1
         move.l  #0,d1
         move.w  ypos,d1
         add.w   (a0)+,d1
         lsl.l   #7,d1
         move.w  d0,d3
         lsr.w   #3,d0
         and.w   #$007E,d0
         add.w   d0,a1
         move.l  #-128,d2
         move.l  #$1FFFF,d5
         neg.w   d3
         and.w   #$000F,d3
         beq.s   sdsymfls
         bra.s   sdsymlps
sdsymlp  move.l  #0,d0
         move.w  (a0)+,d0
         lsl.l   d3,d0
         move.l  d0,0(a1,d1.l)
         move.l  #0,d0
         move.w  (a0)+,d0
         lsl.l   d3,d0
         move.l  d0,2(a1,d1.l)
         sub.l   d2,d1
sdsymlps and.l   d5,d1
         dbra    d4,sdsymlp
         movem.l (sp)+,d4-d5
         rts
sdsymflp move.l  (a0)+,0(a1,d1.l)
         sub.l   d2,d1
sdsymfls and.l   d5,d1
         dbra    d4,sdsymflp
         movem.l (sp)+,d4-d5
         rts

paint   movem.l d4-d5,-(sp)
        movem.l 12(sp),d4-d5
        bsr.s   paint3
        movem.l (sp)+,d4-d5
        rts

***********************************************
*                                             *
* paint copies a rectangular raster from      *
* main memory to the frame store.             *
*                                             *
* d0 = x0                                     *
* d1 = y0                                     *
* d2 = x1                                     *
* d3 = y1                                     *
* d4 = bit offset for source raster           *
* d5 = line stride for source in bytes        *
* a0 = start of source raster.                *
*                                             *
***********************************************
paint3   move.w  ccr,-(sp)
         movem.l d0-d7/a0-a5,-(sp)
         move.l  #$03FF,d6
         and.w   d6,d0
         and.l   d6,d1
         and.w   d6,d2
         and.l   d6,d3
         and.w   #$000F,d4
         lea     fsbase,a1
         cmp.w   d0,d2
         bcc.s   paintinx
         exg     d0,d2
paintinx sub.w   d1,d3
         bcc.s   paintiny
         add.w   d3,d1
         neg.w   d3
paintiny lsl.l   #7,d1
         add.l   d1,a1
         move.w  d0,d1
         and.w   #$000F,d1
         sub.w   d1,d4
         move.l  #$FFFF,d6
         lsr.w   d1,d6
         move.w  d2,d1
         not.w   d1
         and.w   #$000F,d1
         move.l  #-1,d7
         lsl.w   d1,d7
         move.w  #128,a5
         and.w   #$03F0,d0
         and.w   #$03F0,d2
         lsr.w   #3,d0
         lsr.w   #3,d2
         add.w   d0,a1
         sub.w   d0,d2
         bne.s   paintb
         and.l   d6,d7
         neg.w   d4
         add.w   #16,d4
spaintlp move.l  (a0),d0
         lsr.l   d4,d0
         and.w   d7,d0
         move.w  d0,(a1)
         add.l   d5,a0
         add.l   a5,a1
         dbra    d3,spaintlp
         movem.l (sp)+,d0-d7/a0-a5
         rtr
paintb   lsr.w   #1,d2
         sub.w   #1,d2
         move.w  d2,a4
         neg.w   d4
         bpl.s   bpaintlp
         and.w   #15,d4
cpaintlp move.l  a0,a2
         move.l  a1,a3
         move.w  a4,d2
         move.l  (a2)+,d0
         ror.l   d4,d0
         and.l   d6,d0
         bra.s   paintlpt
jpaintlp move.l  #0,d1
         move.w  (a2)+,d1
         ror.l   d4,d1
         clr.w   d0
         swap    d0
         or.l    d1,d0
paintlpt move.w  d0,(a3)+
         dbra    d2,jpaintlp
         move.w  (a2),d1
         ror.w   d4,d1
         swap    d0
         or.w    d1,d0
         and.w   d7,d0
         move.w  d0,(a3)
         add.l   d5,a0
         add.l   a5,a1
         dbra    d3,cpaintlp
         movem.l (sp)+,d0-d7/a0-a5
         rtr
bpaintlp move.l  a0,a2
         move.l  a1,a3
         move.w  a4,d2
         move.l  #0,d0
         move.w  (a2)+,d0
         ror.l   d4,d0
         and.w   d6,d0
         bra.s   paintlps
ipaintlp move.l  #0,d1
         move.w  (a2)+,d1
         ror.l   d4,d1
         clr.w   d0
         swap    d0
         or.l    d1,d0
paintlps move.w  d0,(a3)+
         dbra    d2,ipaintlp
         move.w  (a2),d1
         ror.w   d4,d1
         swap    d0
         or.w    d1,d0
         and.w   d7,d0
         move.w  d0,(a3)
         add.l   d5,a0
         add.l   a5,a1
         dbra    d3,bpaintlp
         movem.l (sp)+,d0-d7/a0-a5
         rtr

linebits dc.b    $80,$40,$20,$10,$08,$04,$02,$01
linevdot lsl.l   #7,d1
         add.w   d0,d1
         and.w   #$0007,d2
         move.b  linebits(d2.w),0(a0,d1.l)
         movem.l (sp)+,d4-d6
         rts
linev    move.w  d0,d2
         lsr.w   #3,d0
         sub.w   d1,d3
         beq.s   linevdot
         bcc.s   linevup
         add.w   d3,d1
         neg.w   d3
linevup  move.l  #128,d4
         and.w   #$007E,d0
         and.w   #$000F,d2
         add.w   d2,d2
         lsl.l   #7,d1
         add.w   d0,d1
         add.l   d1,a0
         move.w  linedots(d2.w),d0
         lsr.w   #1,d3
         bcc.s   linevle
linevlp  move.w  d0,(a0)
         add.l   d4,a0
linevle  move.w  d0,(a0)
         add.l   d4,a0
         dbra    d3,linevlp
         movem.l (sp)+,d4-d6
         rts
linedots dc.w    $8000,$4000,$2000,$1000,$0800,$0400,$0200,$0100
         dc.w    $0080,$0040,$0020,$0010,$0008,$0004,$0002,$0001
line     movem.l d4-d6,-(sp)
         lea     fsbase,a0
         move.l  #$3FF,d4
         and.w   d4,d0
         and.l   d4,d1
         and.w   d4,d2
         and.l   d4,d3
         sub.w   d0,d2
         beq.s   linev
         bcs.s   linedecx
         exg     d1,d3
         add.w   d2,d0
         neg.w   d2
linedecx neg.w   d2
         move.l  #128,d4
         sub.w   d1,d3
         beq     lineh
         bcc.s   lineincy
         move.l  #-128,d4
         neg.w   d3
lineincy lsl.l   #7,d1
         add.l   d1,a0
         move.w  d0,d1
         lsr.w   #3,d1
         and.w   #$007E,d1
         add.w   d1,a0
         and.w   #$000F,d0
         add.w   d0,d0
         move.w  linedots(d0.w),d1
         cmp.w   d2,d3
         beq     lined
         bcc     linedy

         move.w  d2,d0
         move.w  d2,d5
         add.w   d2,d2
         add.w   d3,d3
         cmp.w   d0,d3
         bcc.s   linedxst
         bra.s   lineoxst

lineoxa  move.w  d6,(a0)
lineoxar add.l   d4,a0
         add.w   d2,d0
lineoxst move.w  d1,d6
         add.w   d1,d1
         dbcs    d5,lineoxlp
         dbcc    d5,lineoxrt
         move.w  d6,(a0)
         movem.l (sp)+,d4-d6
         rts
lineoxrt move.w  d6,(a0)
         sub.l   #2,a0
         move.l  #1,d1
         sub.w   d3,d0
         bcs.s   lineoxar
         move.w  d1,d6
         add.w   d1,d1
         dbra    d5,lineoxlp
         move.w  d6,(a0)
         movem.l (sp)+,d4-d6
         rts
lineoxlp sub.w   d3,d0
         bcs.s   lineoxa
         or.w    d1,d6
         add.w   d1,d1
         dbcs    d5,lineoxlp
         dbcc    d5,lineoxrt
         move.w  d6,(a0)
         movem.l (sp)+,d4-d6
         rts

linedxlp sub.w   d3,d0
         bcc.s   linedxst
         add.w   d2,d0
         add.l   d4,a0
linedxst move.w  d1,(a0)
         add.w   d1,d1
         dbcs    d5,linedxlp
         dbcc    d5,linedxrt
         movem.l (sp)+,d4-d6
         rts
linedxrt move.l  #1,d1
         sub.w   d3,d0
         bcc.s   linedxna
         add.w   d2,d0
         add.l   d4,a0
linedxna move.w  d1,-(a0)
         add.w   d1,d1
         dbra    d5,linedxlp
         movem.l (sp)+,d4-d6
         rts

linedlp  add.l   d4,a0
         add.w   d1,d1
lined    move.w  d1,(a0)
         dbmi    d2,linedlp
         dbpl    d2,linedrt
         movem.l (sp)+,d4-d6
         rts
linedrt  move.l  #1,d1
         add.l   d4,a0
         move.w  d1,-(a0)
         dbra    d2,linedlp
         movem.l (sp)+,d4-d6
         rts

linedy   move.w  d3,d0
         move.w  d3,d5
         add.w   d2,d2
         add.w   d3,d3
         bra.s   linedyst

linedya  add.w   d3,d0
         add.w   d1,d1
         bcs.s   linedyrt
linedylp add.l   d4,a0
linedyst move.w  d1,(a0)
         sub.w   d2,d0
         dbcs    d5,linedylp
         dbcc    d5,linedya
         movem.l (sp)+,d4-d6
         rts
linedyrt move.l  #1,d1
         add.l   d4,a0
         move.w  d1,-(a0)
         sub.w   d2,d0
         dbcs    d5,linedylp
         dbcc    d5,linedya
         movem.l (sp)+,d4-d6
         rts

lineh    lsl.l   #7,d1
         add.l   d1,a0
         sub.w   d2,d0
         add.w   d0,d2
         move.w  d0,d1
         and.w   #$001F,d1
         move.l  #-1,d3
         lsr.l   d1,d3
         move.w  d2,d1
         not.w   d1
         and.w   #$001F,d1
         move.l  #-1,d4
         lsl.l   d1,d4
         and.w   #$03E0,d0
         and.w   #$03E0,d2
         lsr.w   #3,d0
         lsr.w   #3,d2
         add.w   d0,a0
         sub.w   d2,d0
         bne.s   linehbig
         and.l   d3,d4
         move.l  d4,(a0)
         movem.l (sp)+,d4-d6
         rts
linehbig asr.w   d0
         move.l  d3,(a0)+
         move.l  #-1,d2
         jmp     linehend(d0.w)
         movel30 d2,a0
         move.l  d4,(a0)
linehend movem.l (sp)+,d4-d6
         rts

triangle movem.l d4-d5,-(sp)
         movem.l 12(sp),d4-d5
         bsr.s   triangle3
         movem.l (sp)+,d4-d5
         rts

triangle3 move.w  ccr,-(sp)
         movem.l d0-d7,-(sp)
         cmp.w   d1,d3
         bge.s   tri2big3
         cmp.w   d1,d5
         bge.s   trifswp3
         exg     d0,d4
         exg     d1,d5
         bra.s   trifinc3
tri2big3 cmp.w   d3,d5
         bge.s   trihard3
         exg     d2,d4
         exg     d3,d5
trifinc3 cmp.w   d1,d3
         bge.s   trihard3
trifswp3 exg     d0,d2
         exg     d1,d3
trihard3 cmp.w   d3,d5
         beq.s   trilow3
         cmp.w   d1,d3
         beq.s   trihigh3
         move.w  d3,d6
         sub.w   d1,d6
         move.w  d4,d7
         sub.w   d0,d7
         muls    d6,d7
         move.w  d5,d6
         sub.w   d1,d6
         add.l   d7,d7
         divs    d6,d7
         add.w   #1,d7
         asr.w   #1,d7
         add.w   d0,d7
         exg     d0,d7
         move.w  d1,d6
         move.w  d2,d1
         move.w  d3,d2
         move.w  d4,d3
         bsr.s   trapeze3
         move.w  d0,d3
         move.w  d1,d4
         move.w  d2,d5
         move.w  d7,d0
         move.w  d0,d1
         move.w  d6,d2
         bra.s   tritrap3
trilow3  move.w  d2,d3
         move.w  d1,d2
         move.w  d0,d1
         bra.s   tritrap3
trihigh3 move.w  d2,d1
         move.w  d3,d2
         move.w  d4,d3
tritrap3 bsr.s   trapeze3
         movem.l (sp)+,d0-d7
         rtr

trapeze  movem.l d4-d5,-(sp)
         movem.l 12(sp),d4-d5
         bsr.s   trapeze3
         movem.l (sp)+,d4-d5
         rts

trapeze3 move.w  ccr,-(sp)
         movem.l d0-d7/a0-a5,-(sp)
         move.l  #$03FF,d6
         and.w   d6,d0
         lsl.w   #2,d0
         and.w   d6,d1
         lsl.w   #2,d1
         and.l   d6,d2
         and.w   d6,d3
         lsl.w   #2,d3
         and.w   d6,d4
         lsl.w   #2,d4
         and.l   d6,d5
         lea     fsbase,a1
         lea     rtab,a5
         move.w  #128,a2
         cmp.w   d0,d1
         bcc.s   trpincb3
         exg     d0,d1
trpincb3 cmp.w   d3,d4
         bcc.s   trpinct3
         exg     d3,d4
trpinct3 sub.w   d2,d5
         beq     trpline3
         bge.s   trpincy3
         add.w   d5,d2
         neg.w   d5
         exg     d0,d3
         exg     d1,d4
trpincy3 lsl.l   #7,d2
         add.l   d2,a1
         sub.w   d0,d3
         ext.l   d3
         sub.w   d1,d4
         ext.l   d4
         move.w  d5,d7
         add.w   d7,d7
         divs    d5,d3
         move.l  d3,d6
         swap    d3
         clr.w   d3
         clr.w   d6
         divs    d7,d6
         ext.l   d6
         add.l   d6,d6
         add.l   d6,d3
         divs    d5,d4
         move.l  d4,d6
         swap    d4
         clr.w   d4
         clr.w   d6
         divs    d7,d6
         ext.l   d6
         add.l   d6,d6
         add.l   d6,d4
         move.l  d3,a3
         move.l  d4,a4
         swap    d0
         swap    d1
         move.l  #-1,d7
         move.w  #$8000,d0
         move.w  d0,d1
         tst.l   d3
         bpl.s   trpincl3
         asr.l   #1,d3
         add.l   d3,d0
         move.l  d0,d3
         bra.s   trptst43
trpincl3 move.l  d3,d6
         move.l  d0,d3
         asr.l   #1,d6
         sub.l   d6,d0
trptst43 tst.l   d4
         bpl.s   trpincr3
         move.l  d4,d6
         move.l  d1,d4
         asr.l   #1,d6
         sub.l   d6,d1
         bra.s   trplpst3
trpincr3 asr.l   #1,d4
         add.l   d4,d1
         move.l  d1,d4
         bra.s   trplpst3
trpline3 lsl.l   #7,d2
         add.l   d2,a1
         move.l  #-1,d7
         cmp.w   d0,d3
         ble.s   trpbtms3
         exg     d0,d3
trpbtms3 cmp.w   d1,d4
         bge.s   trptopb3
         exg     d1,d4
trptopb3 swap    d3
         swap    d4
         bra.s   trplpst3
trploop3 tst.w   d5
         bne.s   trpnorm3
         move.l  a4,d4
         bmi.s   traprok3
         asr.l   #1,d4
         sub.l   d4,d1
traprok3 move.l  a3,d3
         bpl.s   trpnorm3
         asr.l   #1,d3
         sub.l   d3,d0
trpnorm3 move.l  d0,d3
         move.l  d1,d4
trplpst3 swap    d3
         swap    d4
         move.w  d3,d6
         move.w  d4,d2
         and.w   #$007C,d6
         and.w   #$007C,d2
         and.w   #$0F80,d3
         and.w   #$0F80,d4
         lsr.w   #5,d3
         lsr.w   #5,d4
         lea     0(a1,d3),a0
         sub.w   d4,d3
         bne.s   trphuge3
         move.l  -128(a5,d6.w),d6
         and.l   0(a5,d2.w),d6
         move.l  d6,(a0)
         add.l   a3,d0
         add.l   a4,d1
         add.l   a2,a1
         dbra    d5,trploop3
         movem.l (sp)+,d0-d7/a0-a5
         rtr
trphuge3 asr.w   #1,d3
         move.l  -128(a5,d6.w),(a0)+
         jmp     trpbase3+2(d3.w)
         movel30 d7,a0
trpbase3 move.l  0(a5,d2.w),(a0)
         add.l   a3,d0
         add.l   a4,d1
         add.l   a2,a1
         dbra    d5,trploop3
         movem.l (sp)+,d0-d7/a0-a5
         rtr
         dc.l    %11111111111111111111111111111111
         dc.l    %01111111111111111111111111111111
         dc.l    %00111111111111111111111111111111
         dc.l    %00011111111111111111111111111111
         dc.l    %00001111111111111111111111111111
         dc.l    %00000111111111111111111111111111
         dc.l    %00000011111111111111111111111111
         dc.l    %00000001111111111111111111111111
         dc.l    %00000000111111111111111111111111
         dc.l    %00000000011111111111111111111111
         dc.l    %00000000001111111111111111111111
         dc.l    %00000000000111111111111111111111
         dc.l    %00000000000011111111111111111111
         dc.l    %00000000000001111111111111111111
         dc.l    %00000000000000111111111111111111
         dc.l    %00000000000000011111111111111111
         dc.l    %00000000000000001111111111111111
         dc.l    %00000000000000000111111111111111
         dc.l    %00000000000000000011111111111111
         dc.l    %00000000000000000001111111111111
         dc.l    %00000000000000000000111111111111
         dc.l    %00000000000000000000011111111111
         dc.l    %00000000000000000000001111111111
         dc.l    %00000000000000000000000111111111
         dc.l    %00000000000000000000000011111111
         dc.l    %00000000000000000000000001111111
         dc.l    %00000000000000000000000000111111
         dc.l    %00000000000000000000000000011111
         dc.l    %00000000000000000000000000001111
         dc.l    %00000000000000000000000000000111
         dc.l    %00000000000000000000000000000011
         dc.l    %00000000000000000000000000000001
rtab     dc.l    %10000000000000000000000000000000
         dc.l    %11000000000000000000000000000000
         dc.l    %11100000000000000000000000000000
         dc.l    %11110000000000000000000000000000
         dc.l    %11111000000000000000000000000000
         dc.l    %11111100000000000000000000000000
         dc.l    %11111110000000000000000000000000
         dc.l    %11111111000000000000000000000000
         dc.l    %11111111100000000000000000000000
         dc.l    %11111111110000000000000000000000
         dc.l    %11111111111000000000000000000000
         dc.l    %11111111111100000000000000000000
         dc.l    %11111111111110000000000000000000
         dc.l    %11111111111111000000000000000000
         dc.l    %11111111111111100000000000000000
         dc.l    %11111111111111110000000000000000
         dc.l    %11111111111111111000000000000000
         dc.l    %11111111111111111100000000000000
         dc.l    %11111111111111111110000000000000
         dc.l    %11111111111111111111000000000000
         dc.l    %11111111111111111111100000000000
         dc.l    %11111111111111111111110000000000
         dc.l    %11111111111111111111111000000000
         dc.l    %11111111111111111111111100000000
         dc.l    %11111111111111111111111110000000
         dc.l    %11111111111111111111111111000000
         dc.l    %11111111111111111111111111100000
         dc.l    %11111111111111111111111111110000
         dc.l    %11111111111111111111111111111000
         dc.l    %11111111111111111111111111111100
         dc.l    %11111111111111111111111111111110
         dc.l    %11111111111111111111111111111111

reset    equ     *
begin    lea     curpandc,a0
         move.w  #$FF07,(a0)
         move.l  #0,2(a0)
         move.l  #0,4(a0)
         lea     defont,a1
         move.l  a1,6(a0)
         lea     berrexit,a0
         move.l  $1008,a1
         move.l  a0,$1008
         move.l  #$FF077FC0,fspwrten
         lea     fscolmap,a0
         move.w  #15,d0
cmaplp   move.w  #$0000,2(a0)
         move.w  #$001F,6(a0)
         move.w  #$03E0,10(a0)
         move.w  #$03FF,14(a0)
         move.w  #$7C00,18(a0)
         move.w  #$7C1F,22(a0)
         move.w  #$7FE0,26(a0)
         move.w  #$7FFF,30(a0)
         move.w  #$7FFF,34(a0)
         move.w  #$7FE0,38(a0)
         move.w  #$7C1F,42(a0)
         move.w  #$7C00,46(a0)
         move.w  #$03FF,50(a0)
         move.w  #$03E0,54(a0)
         move.w  #$001F,58(a0)
         move.w  #$0000,62(a0)
         lea     64(a0),a0
         dbra    d0,cmaplp
         move.l  #0,mousexr
         move.l  a1,$1008
         rts
berrexit add.l   #14,sp
         move.l  a1,$1008
         and.w   #$DFFF,sr
         rts
         data
currbutt dc.w    0
curpandc dc.w    0
xpos     dc.w    0
ypos     dc.w    0
curfont  dc.l    0
defont   dc.w    $020E,$0216,$0234,$0252,$0266,$0278,$028C,$029C
         dc.w    $02B4,$02C4,$02CE,$02E2,$02FA,$030C,$0320,$033E
         dc.w    $035C,$0374,$0388,$03A0,$03B2,$03C6,$03DA,$03EE
         dc.w    $0402,$0416,$042A,$043E,$0452,$0466,$047A,$0492
         dc.w    $04AA,$04B0,$04C8,$04D4,$04EC,$0504,$051C,$0534
         dc.w    $0542,$055A,$0572,$0586,$059A,$05A8,$05B0,$05BA
         dc.w    $05CE,$05E6,$05FE,$0616,$062E,$0646,$065E,$0676
         dc.w    $068E,$06A6,$06BE,$06D0,$06E6,$06FA,$0706,$071A
         dc.w    $0732,$074A,$0762,$077A,$0792,$07AA,$07C2,$07DA
         dc.w    $07F2,$080A,$0822,$083A,$0852,$086A,$0882,$089A
         dc.w    $08B2,$08CA,$08E2,$08FA,$0912,$092A,$0942,$095A
         dc.w    $0972,$098A,$09A2,$09BA,$09D2,$09E6,$09FE,$0A0C
         dc.w    $0A14,$0A22,$0A34,$0A4C,$0A5E,$0A76,$0A88,$0AA0
         dc.w    $0AB6,$0ACE,$0AE4,$0AFE,$0B16,$0B2E,$0B40,$0B52
         dc.w    $0B64,$0B7A,$0B90,$0BA2,$0BB4,$0BCA,$0BDC,$0BEE
         dc.w    $0C00,$0C12,$0C28,$0C3A,$0C52,$0C6A,$0C82,$0C8E
         dc.w    $0CA6,$0CC4,$0CE2,$0CFA,$0D16,$0D2A,$0D42,$0D52
         dc.w    $0D62,$0D76,$0D8A,$0D9E,$0DAE,$0DC6,$0DCE,$0DDE
         dc.w    $0DF0,$0E02,$0E14,$0E28,$0E3C,$0E50,$0E64,$0E78
         dc.w    $0E8C,$0EA0,$0EB4,$0EC8,$0EDC,$0EF4,$0F0C,$0F24
         dc.w    $0F34,$0F4C,$0F60,$0F74,$0F8C,$0FA4,$0FB8,$0FCC
         dc.w    $0FDC,$0FEC,$0FFE,$1010,$1028,$1040,$1050,$1060
         dc.w    $1070,$1080,$1090,$10A0,$10B4,$10C8,$10D8,$10E8
         dc.w    $1104,$111C,$112E,$113E,$114A,$1156,$1162,$116E
         dc.w    $117A,$1186,$119E,$11B6,$11CE,$11E6,$11FE,$1216
         dc.w    $122E,$1246,$125E,$1276,$128E,$12A6,$12BE,$12D6
         dc.w    $12EE,$1306,$131E,$1336,$134E,$1366,$137E,$1396
         dc.w    $13AE,$13C6,$13E2,$13FE,$141A,$1436,$1452,$146E
         dc.w    $148A,$149A,$14AC,$14C8,$14DE,$14F6,$1508,$1524
         dc.w    $153A,$1552,$1564,$1576,$158E,$15A4,$15B6,$15D2
         dc.w    $15E4,$15F6,$160C,$161E,$1630,$1642,$165E,$1670
         dc.w    $168C,$169E,$16B0,$16C4,$16D8,$16EC,$1700,$171A
         dc.w    $000C,$0002,$0008,$0008,$0000,$0000,$0000,$0001
         dc.w    $0008,$0003,$FF00,$000C,$0008,$FFFE,$0800,$0800
         dc.w    $0800,$0800,$0800,$0800,$0800,$0800,$0800,$0800
         dc.w    $0800,$0800,$000C,$0008,$FFFE,$0800,$0800,$0800
         dc.w    $0800,$0800,$FF00,$0800,$0800,$0800,$0800,$0800
         dc.w    $0800,$0007,$0008,$0003,$FF00,$0800,$0800,$0800
         dc.w    $0800,$0800,$0800,$0006,$0008,$FFFE,$0800,$0800
         dc.w    $0800,$0800,$0800,$FF00,$0007,$0008,$0003,$0F00
         dc.w    $0800,$0800,$0800,$0800,$0800,$0800,$0005,$0008
         dc.w    $0004,$7000,$8800,$8800,$8800,$7000,$0009,$0008
         dc.w    $0000,$FE00,$0000,$1000,$1000,$1000,$FE00,$1000
         dc.w    $1000,$1000,$0005,$0008,$0001,$0800,$0400,$FE00
         dc.w    $0400,$0800,$0002,$0008,$0000,$C600,$C600,$0007
         dc.w    $0008,$0001,$3000,$3000,$0000,$FC00,$0000,$3000
         dc.w    $3000,$0009,$0008,$0000,$1000,$3800,$5400,$1000
         dc.w    $1000,$1000,$1000,$1000,$1000,$0006,$0008,$FFFE
         dc.w    $0800,$0800,$0800,$0800,$0800,$F800,$0007,$0008
         dc.w    $0003,$F800,$0800,$0800,$0800,$0800,$0800,$0800
         dc.w    $000C,$0008,$FFFE,$0800,$0800,$0800,$0800,$0800
         dc.w    $0F00,$0800,$0800,$0800,$0800,$0800,$0800,$000C
         dc.w    $0008,$FFFE,$0800,$0800,$0800,$0800,$0800,$F800
         dc.w    $0800,$0800,$0800,$0800,$0800,$0800,$0009,$0008
         dc.w    $0000,$1000,$1000,$FE00,$1000,$FE00,$2800,$4400
         dc.w    $8200,$8200,$0007,$0008,$0001,$1000,$7800,$8400
         dc.w    $8000,$8400,$7800,$1000,$0009,$0008,$0000,$FE00
         dc.w    $4000,$4000,$4000,$E000,$4000,$4000,$4200,$3C00
         dc.w    $0006,$0008,$FFFE,$0800,$0800,$0800,$0800,$0800
         dc.w    $0F00,$0007,$0008,$FFFE,$7000,$8800,$C800,$A800
         dc.w    $9800,$8800,$7000,$0007,$0008,$FFFE,$F800,$2000
         dc.w    $2000,$2000,$A000,$6000,$2000,$0007,$0008,$FFFE
         dc.w    $F800,$4000,$2000,$1000,$0800,$8800,$7000,$0007
         dc.w    $0008,$FFFE,$F000,$0800,$0800,$3000,$0800,$0800
         dc.w    $F000,$0007,$0008,$FFFE,$1000,$1000,$F800,$9000
         dc.w    $5000,$3000,$1000,$0007,$0008,$FFFE,$7000,$8800
         dc.w    $0800,$0800,$F000,$8000,$F800,$0007,$0008,$FFFE
         dc.w    $7000,$8800,$8800,$F000,$8000,$4000,$3800,$0007
         dc.w    $0008,$FFFE,$4000,$4000,$4000,$2000,$1000,$0800
         dc.w    $F800,$0007,$0008,$FFFE,$7000,$8800,$8800,$7000
         dc.w    $8800,$8800,$7000,$0007,$0008,$FFFE,$E000,$1000
         dc.w    $0800,$7800,$8800,$8800,$7000,$0009,$0008,$0000
         dc.w    $1200,$1200,$1200,$1200,$7200,$F200,$F200,$F200
         dc.w    $7E00,$0009,$0008,$0000,$1E00,$1000,$1C00,$1000
         dc.w    $9E00,$8000,$E000,$9000,$E000,$0000,$0008,$000A
         dc.w    $0009,$0008,$0000,$0800,$0800,$0000,$0000,$0800
         dc.w    $0800,$0800,$0800,$0800,$0003,$0008,$0006,$4800
         dc.w    $4800,$4800,$0009,$0008,$0000,$2800,$2800,$2800
         dc.w    $FE00,$2800,$FE00,$2800,$2800,$2800,$0009,$0008
         dc.w    $0000,$1000,$FC00,$1200,$1200,$7C00,$9000,$9000
         dc.w    $7E00,$1000,$0009,$0008,$0000,$0400,$8A00,$4400
         dc.w    $2000,$1000,$0800,$4400,$A200,$4000,$0009,$0008
         dc.w    $0000,$7200,$8C00,$8C00,$5200,$2000,$5000,$8800
         dc.w    $8800,$7000,$0004,$0008,$0005,$2000,$1000,$1800
         dc.w    $1800,$0009,$0008,$0000,$0800,$1000,$2000,$2000
         dc.w    $2000,$2000,$2000,$1000,$0800,$0009,$0008,$0000
         dc.w    $2000,$1000,$0800,$0800,$0800,$0800,$0800,$1000
         dc.w    $2000,$0007,$0008,$0001,$1000,$9200,$5400,$3800
         dc.w    $5400,$9200,$1000,$0007,$0008,$0001,$1000,$1000
         dc.w    $1000,$FE00,$1000,$1000,$1000,$0004,$0008,$FFFE
         dc.w    $4000,$2000,$3000,$3000,$0001,$0008,$0004,$FE00
         dc.w    $0002,$0008,$0000,$3000,$3000,$0007,$0008,$0001
         dc.w    $8000,$4000,$2000,$1000,$0800,$0400,$0200,$0009
         dc.w    $0008,$0000,$7C00,$8200,$C200,$A200,$9200,$8A00
         dc.w    $8600,$8200,$7C00,$0009,$0008,$0000,$7C00,$1000
         dc.w    $1000,$1000,$1000,$1000,$5000,$3000,$1000,$0009
         dc.w    $0008,$0000,$FE00,$4000,$2000,$1000,$0800,$0400
         dc.w    $0200,$8200,$7C00,$0009,$0008,$0000,$7C00,$8200
         dc.w    $0200,$0200,$3C00,$0200,$0200,$8200,$7C00,$0009
         dc.w    $0008,$0000,$0400,$0400,$FC00,$8400,$4400,$2400
         dc.w    $1400,$0C00,$0400,$0009,$0008,$0000,$7800,$8400
         dc.w    $0200,$0200,$0400,$F800,$8000,$8000,$FC00,$0009
         dc.w    $0008,$0000,$7C00,$8200,$8200,$8200,$FC00,$8000
         dc.w    $8000,$4000,$3C00,$0009,$0008,$0000,$2000,$2000
         dc.w    $2000,$2000,$1000,$0800,$0400,$8200,$FE00,$0009
         dc.w    $0008,$0000,$7C00,$8200,$8200,$8200,$7C00,$8200
         dc.w    $8200,$8200,$7C00,$0009,$0008,$0000,$7800,$0400
         dc.w    $0200,$0200,$7E00,$8200,$8200,$8200,$7C00,$0006
         dc.w    $0008,$0000,$3000,$3000,$0000,$0000,$3000,$3000
         dc.w    $0008,$0008,$FFFE,$4000,$2000,$3000,$3000,$0000
         dc.w    $0000,$3000,$3000,$0007,$0008,$0001,$0600,$1800
         dc.w    $6000,$8000,$6000,$1800,$0600,$0003,$0008,$0003
         dc.w    $7C00,$0000,$7C00,$0007,$0008,$0001,$C000,$3000
         dc.w    $0C00,$0200,$0C00,$3000,$C000,$0009,$0008,$0000
         dc.w    $1000,$0000,$1000,$1000,$0800,$0400,$4200,$4200
         dc.w    $3C00,$0009,$0008,$0000,$3C00,$4000,$8000,$BC00
         dc.w    $AA00,$AA00,$9A00,$4200,$3C00,$0009,$0008,$0000
         dc.w    $8200,$8200,$8200,$8200,$FE00,$8200,$8200,$4400
         dc.w    $3800,$0009,$0008,$0000,$FC00,$4200,$4200,$4200
         dc.w    $7C00,$4200,$4200,$4200,$FC00,$0009,$0008,$0000
         dc.w    $3C00,$4200,$8000,$8000,$8000,$8000,$8000,$4200
         dc.w    $3C00,$0009,$0008,$0000,$F800,$4400,$4200,$4200
         dc.w    $4200,$4200,$4200,$4400,$F800,$0009,$0008,$0000
         dc.w    $FE00,$8000,$8000,$8000,$F000,$8000,$8000,$8000
         dc.w    $FE00,$0009,$0008,$0000,$8000,$8000,$8000,$8000
         dc.w    $F000,$8000,$8000,$8000,$FE00,$0009,$0008,$0000
         dc.w    $3C00,$4200,$8200,$9E00,$8000,$8000,$8000,$4200
         dc.w    $3C00,$0009,$0008,$0000,$8200,$8200,$8200,$8200
         dc.w    $FE00,$8200,$8200,$8200,$8200,$0009,$0008,$0000
         dc.w    $7C00,$1000,$1000,$1000,$1000,$1000,$1000,$1000
         dc.w    $7C00,$0009,$0008,$0000,$7C00,$8200,$8200,$0200
         dc.w    $0200,$0200,$0200,$0200,$0200,$0009,$0008,$0000
         dc.w    $8200,$8400,$8800,$D000,$A000,$9000,$8800,$8400
         dc.w    $8200,$0009,$0008,$0000,$FE00,$8000,$8000,$8000
         dc.w    $8000,$8000,$8000,$8000,$8000,$0009,$0008,$0000
         dc.w    $8200,$8200,$8200,$8200,$9200,$9200,$AA00,$C600
         dc.w    $8200,$0009,$0008,$0000,$8200,$8200,$8200,$8600
         dc.w    $8A00,$9200,$A200,$C200,$8200,$0009,$0008,$0000
         dc.w    $3800,$4400,$8200,$8200,$8200,$8200,$8200,$4400
         dc.w    $3800,$0009,$0008,$0000,$8000,$8000,$8000,$8000
         dc.w    $FC00,$8200,$8200,$8200,$FC00,$0009,$0008,$0000
         dc.w    $3A00,$4400,$8A00,$9200,$8200,$8200,$8200,$4400
         dc.w    $3800,$0009,$0008,$0000,$8200,$8400,$8800,$9000
         dc.w    $FC00,$8200,$8200,$8200,$FC00,$0009,$0008,$0000
         dc.w    $7C00,$8200,$0200,$0200,$7C00,$8000,$8000,$8200
         dc.w    $7C00,$0009,$0008,$0000,$1000,$1000,$1000,$1000
         dc.w    $1000,$1000,$1000,$1000,$FE00,$0009,$0008,$0000
         dc.w    $7C00,$8200,$8200,$8200,$8200,$8200,$8200,$8200
         dc.w    $8200,$0009,$0008,$0000,$1000,$1000,$2800,$2800
         dc.w    $4400,$4400,$8200,$8200,$8200,$0009,$0008,$0000
         dc.w    $8200,$C600,$AA00,$9200,$9200,$8200,$8200,$8200
         dc.w    $8200,$0009,$0008,$0000,$8200,$8200,$4400,$2800
         dc.w    $1000,$2800,$4400,$8200,$8200,$0009,$0008,$0000
         dc.w    $1000,$1000,$1000,$1000,$1000,$2800,$4400,$8200
         dc.w    $8200,$0009,$0008,$0000,$FE00,$8000,$4000,$2000
         dc.w    $1000,$0800,$0400,$0200,$FE00,$0009,$0008,$0000
         dc.w    $7800,$4000,$4000,$4000,$4000,$4000,$4000,$4000
         dc.w    $7800,$0007,$0008,$0001,$0200,$0400,$0800,$1000
         dc.w    $2000,$4000,$8000,$0009,$0008,$0000,$7800,$0800
         dc.w    $0800,$0800,$0800,$0800,$0800,$0800,$7800,$0004
         dc.w    $0008,$0005,$8200,$4400,$2800,$1000,$0001,$0008
         dc.w    $0000,$FE00,$0004,$0008,$0005,$0800,$1000,$3000
         dc.w    $3000,$0006,$0008,$0000,$7A00,$8400,$8400,$7C00
         dc.w    $0400,$7800,$0009,$0008,$0000,$B800,$C400,$8400
         dc.w    $8400,$C400,$B800,$8000,$8000,$8000,$0006,$0008
         dc.w    $0000,$7800,$8400,$8000,$8000,$8400,$7800,$0009
         dc.w    $0008,$0000,$7400,$8C00,$8400,$8400,$8C00,$7400
         dc.w    $0400,$0400,$0400,$0006,$0008,$0000,$7800,$8000
         dc.w    $8000,$FC00,$8400,$7800,$0009,$0008,$0000,$2000
         dc.w    $2000,$2000,$2000,$F800,$2000,$2000,$2400,$1800
         dc.w    $0008,$0008,$FFFE,$7800,$8400,$8400,$7800,$4000
         dc.w    $7000,$8800,$7400,$0009,$0008,$0000,$8400,$8400
         dc.w    $8400,$8400,$C400,$B800,$8000,$8000,$8000,$0008
         dc.w    $0008,$0000,$3800,$1000,$1000,$1000,$1000,$3000
         dc.w    $0000,$1000,$000A,$0008,$FFFE,$3800,$4400,$0400
         dc.w    $0400,$0400,$0400,$0400,$0C00,$0000,$0400,$0009
         dc.w    $0008,$0000,$8400,$8800,$D000,$A000,$9000,$8800
         dc.w    $8000,$8000,$8000,$0009,$0008,$0000,$3800,$1000
         dc.w    $1000,$1000,$1000,$1000,$1000,$1000,$3000,$0006
         dc.w    $0008,$0000,$9200,$9200,$9200,$9200,$9200,$EC00
         dc.w    $0006,$0008,$0000,$8400,$8400,$8400,$8400,$C400
         dc.w    $B800,$0006,$0008,$0000,$7800,$8400,$8400,$8400
         dc.w    $8400,$7800,$0008,$0008,$FFFE,$8000,$8000,$8000
         dc.w    $B800,$C400,$8400,$C400,$B800,$0008,$0008,$FFFE
         dc.w    $0400,$0400,$0400,$7400,$8C00,$8400,$8C00,$7400
         dc.w    $0006,$0008,$0000,$8000,$8000,$8000,$8000,$C400
         dc.w    $B800,$0006,$0008,$0000,$7800,$8400,$1800,$6000
         dc.w    $8400,$7800,$0008,$0008,$0000,$1800,$2400,$2000
         dc.w    $2000,$2000,$F800,$2000,$2000,$0006,$0008,$0000
         dc.w    $7400,$8C00,$8400,$8400,$8400,$8400,$0006,$0008
         dc.w    $0000,$1000,$2800,$4400,$8200,$8200,$8200,$0006
         dc.w    $0008,$0000,$6C00,$9200,$9200,$9200,$9200,$8200
         dc.w    $0006,$0008,$0000,$8400,$4800,$3000,$3000,$4800
         dc.w    $8400,$0008,$0008,$FFFE,$7800,$8400,$0400,$7400
         dc.w    $8C00,$8400,$8400,$8400,$0006,$0008,$0000,$FC00
         dc.w    $4000,$2000,$1000,$0800,$FC00,$0009,$0008,$0000
         dc.w    $1800,$2000,$2000,$2000,$4000,$2000,$2000,$2000
         dc.w    $1800,$0009,$0008,$0000,$1000,$1000,$1000,$1000
         dc.w    $0000,$1000,$1000,$1000,$1000,$0009,$0008,$0000
         dc.w    $3000,$0800,$0800,$0800,$0400,$0800,$0800,$0800
         dc.w    $3000,$0003,$0008,$0006,$0C00,$9200,$6000,$0009
         dc.w    $0008,$0000,$2400,$9200,$4800,$2400,$9200,$4800
         dc.w    $2400,$9200,$4800,$000C,$0008,$FFFE,$FF00,$8100
         dc.w    $8100,$8100,$8100,$8100,$8100,$8100,$8100,$8100
         dc.w    $8100,$FF00,$000C,$0008,$FFFE,$FF00,$FF00,$FF00
         dc.w    $FF00,$FF00,$FF00,$FF00,$FF00,$FF00,$FF00,$FF00
         dc.w    $FF00,$0009,$0008,$0000,$2000,$D000,$5000,$0800
         dc.w    $0800,$0400,$0400,$0200,$0200,$000B,$0008,$FFFE
         dc.w    $4000,$A000,$2000,$2000,$1000,$1000,$1000,$0800
         dc.w    $0800,$0A00,$0400,$0007,$0008,$0001,$FE00,$8200
         dc.w    $8200,$8200,$8200,$8200,$FE00,$0009,$0008,$0000
         dc.w    $EC00,$5200,$5200,$5200,$5200,$5200,$5200,$D200
         dc.w    $4C00,$0005,$0008,$0001,$3800,$7C00,$7C00,$7C00
         dc.w    $3800,$0005,$0008,$0001,$3800,$4400,$4400,$4400
         dc.w    $3800,$0007,$0008,$0001,$8200,$4400,$2800,$1000
         dc.w    $2800,$4400,$8200,$0007,$0008,$0001,$3800,$5400
         dc.w    $9200,$FE00,$9200,$5400,$3800,$0007,$0008,$0001
         dc.w    $3800,$4400,$AA00,$9200,$AA00,$4400,$3800,$0005
         dc.w    $0008,$0001,$2000,$4000,$FE00,$4000,$2000,$0009
         dc.w    $0008,$0000,$1000,$1000,$1000,$1000,$1000,$1000
         dc.w    $5400,$3800,$1000,$0001,$0008,$0006,$F800,$0005
         dc.w    $0008,$0004,$2000,$2000,$F800,$2000,$2000,$0006
         dc.w    $0008,$0003,$2000,$A800,$7000,$7000,$A800,$2000
         dc.w    $0006,$0008,$0003,$4000,$4000,$4000,$4000,$E000
         dc.w    $4000,$0006,$0008,$0003,$4000,$E000,$4000,$4000
         dc.w    $E000,$4000,$0007,$0008,$0003,$7000,$8800,$C800
         dc.w    $A800,$9800,$8800,$7000,$0007,$0008,$0003,$F800
         dc.w    $2000,$2000,$2000,$A000,$6000,$2000,$0007,$0008
         dc.w    $0003,$F800,$4000,$2000,$1000,$0800,$8800,$7000
         dc.w    $0007,$0008,$0003,$F000,$0800,$0800,$3000,$0800
         dc.w    $0800,$F000,$0007,$0008,$0003,$1000,$1000,$F800
         dc.w    $9000,$5000,$3000,$1000,$0007,$0008,$0003,$7000
         dc.w    $8800,$0800,$0800,$F000,$8000,$F800,$0007,$0008
         dc.w    $0003,$7000,$8800,$8800,$F000,$8000,$4000,$3800
         dc.w    $0007,$0008,$0003,$4000,$4000,$4000,$2000,$1000
         dc.w    $0800,$F800,$0007,$0008,$0003,$7000,$8800,$8800
         dc.w    $7000,$8800,$8800,$7000,$0007,$0008,$0003,$E000
         dc.w    $1000,$0800,$7800,$8800,$8800,$7000,$0009,$0008
         dc.w    $0000,$FE00,$0200,$0200,$0200,$1E00,$0200,$0200
         dc.w    $0200,$FE00,$0009,$0008,$0000,$3800,$4400,$8200
         dc.w    $8200,$FE00,$8200,$8200,$8200,$8200,$0009,$0008
         dc.w    $0000,$0600,$1800,$6600,$9800,$6000,$8000,$6000
         dc.w    $1800,$0600,$0005,$0008,$0002,$7C00,$0000,$7C00
         dc.w    $0000,$7C00,$0009,$0008,$0000,$C000,$3000,$CC00
         dc.w    $3200,$0C00,$0200,$0C00,$3000,$C000,$0007,$0008
         dc.w    $0001,$3C00,$4000,$8000,$8000,$8000,$4000,$3C00
         dc.w    $0007,$0008,$0001,$F000,$0800,$0400,$0400,$0400
         dc.w    $0800,$F000,$0009,$0008,$0000,$7C00,$0000,$3C00
         dc.w    $4000,$8000,$8000,$8000,$4000,$3C00,$0009,$0008
         dc.w    $0000,$F800,$0000,$F000,$0800,$0400,$0400,$0400
         dc.w    $0800,$F000,$0007,$0008,$0001,$3C00,$4000,$8000
         dc.w    $FC00,$8000,$4000,$3C00,$0007,$0008,$0001,$F000
         dc.w    $0800,$0400,$FC00,$0400,$0800,$F000,$0005,$0008
         dc.w    $0001,$8200,$8200,$8200,$4400,$3800,$0005,$0008
         dc.w    $0001,$3800,$4400,$8200,$8200,$8200,$0006,$0008
         dc.w    $0000,$4400,$4400,$2800,$2800,$1000,$1000,$0006
         dc.w    $0008,$0000,$1000,$1000,$2800,$2800,$4400,$4400
         dc.w    $0009,$0008,$0000,$0400,$0800,$1000,$2000,$4000
         dc.w    $2000,$1000,$0800,$0400,$0009,$0008,$0000,$4000
         dc.w    $2000,$1000,$0800,$0400,$0800,$1000,$2000,$4000
         dc.w    $0005,$0008,$0001,$2000,$7C00,$8000,$7C00,$2000
         dc.w    $0005,$0008,$0001,$2800,$7C00,$8200,$7C00,$2800
         dc.w    $0005,$0008,$0001,$0800,$7C00,$0200,$7C00,$0800
         dc.w    $0005,$0008,$0001,$2000,$4200,$FE00,$4200,$2000
         dc.w    $0005,$0008,$0001,$2800,$4400,$FE00,$4400,$2800
         dc.w    $0005,$0008,$0001,$0800,$8400,$FE00,$8400,$0800
         dc.w    $0007,$0008,$0001,$4000,$4000,$4000,$7C00,$4000
         dc.w    $4000,$4000,$0007,$0008,$0001,$0400,$0400,$0400
         dc.w    $7C00,$0400,$0400,$0400,$0005,$0008,$0001,$FE00
         dc.w    $1000,$1000,$1000,$1000,$0005,$0008,$0001,$1000
         dc.w    $1000,$1000,$1000,$FE00,$000B,$0008,$FFFE,$3800
         dc.w    $4400,$0400,$3800,$4400,$4400,$4400,$3800,$4000
         dc.w    $4400,$3800,$0009,$0008,$0000,$3800,$4400,$9200
         dc.w    $AA00,$A200,$AA00,$9200,$4400,$3800,$0006,$0008
         dc.w    $0002,$0800,$5400,$2000,$0800,$5400,$2000,$0005
         dc.w    $0008,$0003,$7C00,$0000,$0800,$5400,$2000,$0003
         dc.w    $0008,$0003,$0400,$0400,$7C00,$0003,$0008,$0006
         dc.w    $8000,$C000,$4000,$0003,$0008,$0006,$9000,$D800
         dc.w    $4800,$0003,$0008,$0006,$2000,$1000,$0800,$0003
         dc.w    $0008,$0006,$0800,$1000,$2000,$0003,$0008,$0006
         dc.w    $4400,$2800,$1000,$0009,$0008,$0000,$C600,$8200
         dc.w    $8200,$7C00,$4400,$2800,$2800,$1000,$1000,$0009
         dc.w    $0008,$0000,$FC00,$C200,$4200,$4200,$7C00,$4200
         dc.w    $4200,$C200,$FC00,$0009,$0008,$0000,$E000,$4000
         dc.w    $4000,$4000,$4000,$4000,$4000,$4200,$7E00,$0009
         dc.w    $0008,$0000,$FE00,$8200,$8200,$4400,$4400,$2800
         dc.w    $2800,$1000,$1000,$0009,$0008,$0000,$FE00,$8200
         dc.w    $8000,$8800,$F800,$8800,$8000,$8200,$FE00,$0009
         dc.w    $0008,$0000,$FE00,$8200,$4000,$2000,$1000,$0800
         dc.w    $0400,$8200,$FE00,$0009,$0008,$0000,$C600,$8200
         dc.w    $8200,$8200,$FE00,$8200,$8200,$8200,$C600,$0009
         dc.w    $0008,$0000,$3800,$4400,$8200,$AA00,$BA00,$AA00
         dc.w    $8200,$4400,$3800,$0009,$0008,$0000,$3800,$1000
         dc.w    $1000,$1000,$1000,$1000,$1000,$1000,$3800,$0009
         dc.w    $0008,$0000,$E600,$4400,$4800,$5000,$6000,$5000
         dc.w    $4800,$4400,$E600,$0009,$0008,$0000,$C600,$8200
         dc.w    $8200,$4400,$4400,$2800,$2800,$1000,$1000,$0009
         dc.w    $0008,$0000,$C600,$9200,$9200,$AA00,$AA00,$C600
         dc.w    $C600,$8200,$8200,$0009,$0008,$0000,$C200,$8600
         dc.w    $8A00,$8A00,$9200,$A200,$A200,$C200,$8600,$0009
         dc.w    $0008,$0000,$FE00,$8200,$0000,$4400,$7C00,$4400
         dc.w    $0000,$8200,$FE00,$0009,$0008,$0000,$7C00,$8200
         dc.w    $8200,$8200,$8200,$8200,$8200,$8200,$7C00,$0009
         dc.w    $0008,$0000,$EE00,$4400,$4400,$4400,$4400,$4400
         dc.w    $4400,$4400,$FE00,$0009,$0008,$0000,$E000,$4000
         dc.w    $4000,$4000,$7C00,$4200,$4200,$4200,$FC00,$0009
         dc.w    $0008,$0000,$FE00,$4200,$2000,$1000,$0800,$1000
         dc.w    $2000,$4200,$FE00,$0009,$0008,$0000,$3800,$1000
         dc.w    $1000,$1000,$1000,$1000,$1000,$9200,$FE00,$0009
         dc.w    $0008,$0000,$3800,$1000,$1000,$1000,$1000,$2800
         dc.w    $4400,$8200,$C600,$0009,$0008,$0000,$3800,$7C00
         dc.w    $9200,$9200,$9200,$9200,$9200,$7C00,$3800,$0009
         dc.w    $0008,$0000,$C600,$8200,$4400,$2800,$1000,$2800
         dc.w    $4400,$8200,$C600,$0009,$0008,$0000,$3800,$1000
         dc.w    $1000,$1000,$7C00,$9200,$9200,$9200,$BA00,$0009
         dc.w    $0008,$0000,$EE00,$2800,$4400,$8200,$8200,$8200
         dc.w    $8200,$4400,$3800,$000B,$0008,$FFFE,$0C00,$1200
         dc.w    $8C00,$5200,$2C00,$1000,$E800,$4400,$4200,$C000
         dc.w    $4000,$000B,$0008,$FFFE,$0200,$1E00,$8A00,$4600
         dc.w    $2200,$1000,$E800,$4400,$4200,$C000,$4000,$000B
         dc.w    $0008,$FFFE,$0C00,$1200,$8C00,$5200,$2C00,$1000
         dc.w    $E800,$1400,$6200,$1000,$E000,$000B,$0008,$FFFE
         dc.w    $1E00,$0800,$8400,$4200,$2C00,$1000,$E800,$4400
         dc.w    $4200,$C000,$4000,$000B,$0008,$FFFE,$0C00,$1200
         dc.w    $8C00,$5200,$2C00,$1000,$E800,$1400,$E200,$8000
         dc.w    $F000,$000B,$0008,$FFFE,$0200,$1E00,$8A00,$4600
         dc.w    $2200,$1000,$E800,$1400,$6200,$1000,$E000,$000B
         dc.w    $0008,$FFFE,$0C00,$1200,$8C00,$5200,$2C00,$1000
         dc.w    $8800,$4400,$2200,$1000,$F000,$0005,$0008,$0001
         dc.w    $6C00,$9200,$9200,$9200,$6C00,$0006,$0008,$0000
         dc.w    $7200,$9400,$8800,$8800,$4C00,$3200,$000B,$0008
         dc.w    $FFFE,$8000,$8000,$F800,$4400,$4400,$4400,$7800
         dc.w    $2400,$2200,$2200,$1C00,$0008,$0008,$FFFE,$4000
         dc.w    $2000,$2000,$1000,$1000,$2800,$A400,$4200,$0009
         dc.w    $0008,$0000,$3000,$4800,$8400,$8400,$4800,$3000
         dc.w    $4000,$4800,$3000,$0006,$0008,$0000,$7000,$8800
         dc.w    $4000,$3000,$4400,$3800,$000B,$0008,$FFFE,$7000
         dc.w    $0800,$7000,$8000,$8000,$4000,$4000,$4000,$2000
         dc.w    $2000,$5800,$0008,$0008,$FFFE,$0800,$0800,$4400
         dc.w    $4400,$2200,$2200,$A200,$5C00,$0009,$0008,$0000
         dc.w    $7000,$8800,$8800,$8800,$3C00,$4400,$4400,$4400
         dc.w    $3800,$0006,$0008,$0000,$1000,$2800,$2000,$2000
         dc.w    $1000,$1000,$0006,$0008,$0000,$8800,$9000,$A000
         dc.w    $5000,$4800,$4400,$0009,$0008,$0000,$8200,$4200
         dc.w    $2400,$1400,$0800,$0800,$1000,$1000,$6000,$0008
         dc.w    $0008,$FFFE,$8000,$8000,$F400,$8A00,$8800,$4400
         dc.w    $4400,$4400,$0006,$0008,$0000,$1000,$1800,$1400
         dc.w    $2400,$A200,$4200,$000B,$0008,$FFFE,$7000,$0800
         dc.w    $7000,$8000,$8000,$7000,$4000,$4000,$2000,$3800
         dc.w    $4000,$0006,$0008,$0000,$7000,$8800,$8800,$4400
         dc.w    $4400,$3800,$0006,$0008,$0000,$4800,$4800,$4800
         dc.w    $2400,$A400,$7E00,$0008,$0008,$FFFE,$8000,$8000
         dc.w    $7800,$4400,$4400,$4400,$2400,$1800,$0006,$0008
         dc.w    $0000,$7000,$8800,$8800,$8800,$4800,$3E00,$0006
         dc.w    $0008,$0000,$2000,$2000,$2000,$1000,$9000,$7C00
         dc.w    $0006,$0008,$0000,$3800,$4400,$4400,$2400,$A200
         dc.w    $4200,$000B,$0008,$FFFE,$2000,$2000,$2000,$3800
         dc.w    $5400,$9200,$5400,$3800,$0800,$0800,$0800,$0006
         dc.w    $0008,$0000,$8800,$5400,$3000,$3000,$A800,$4400
         dc.w    $000B,$0008,$FFFE,$2000,$2000,$7800,$9400,$9400
         dc.w    $5400,$5200,$9200,$0800,$0800,$0800,$0006,$0008
         dc.w    $0000,$6C00,$9200,$9200,$5200,$4200,$2400,$0006
         dc.w    $0008,$0000,$7000,$8800,$1000,$2000,$4000,$3C00
         dc.w    $0007,$0008,$0002,$C400,$2A00,$4800,$8800,$6E00
         dc.w    $0800,$0800,$0007,$0008,$0002,$A600,$AA00,$AA00
         dc.w    $AA00,$C600,$0200,$0200,$0007,$0008,$0002,$8600
         dc.w    $8A00,$8A00,$AA00,$4600,$0200,$0200,$0007,$0008
         dc.w    $0002,$4A00,$AA00,$8A00,$8A00,$EC00,$8800,$8800
         dc.w    $000A,$0008,$FFFE,$1000,$3800,$1000,$3800,$4400
         dc.w    $8200,$8200,$8200,$4400,$3800,$0009,$0008,$0000
         dc.w    $3800,$4400,$8200,$8200,$8200,$4400,$3A00,$0600
         dc.w    $0E00,$0000,$0000,$0000,$0000,$0000,$0000,$0000
         endmodule
         end
