home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / Assembler / dse-src3.dms / in.adf / Source / Masters / Masters.lha / Masters.Good.s < prev    next >
Encoding:
Text File  |  1993-01-03  |  17.2 KB  |  631 lines

  1. ***********************************************************
  2. * This demo was originally an absolute-address, stomp-on-system,
  3. * go-out-of-our-way-to-break-the-rules, sort of demo.  I went through
  4. * it and took out all of the clears to custom chip regs, optimized it a
  5. * bit, and fixed his startup code.
  6. *
  7. * This uses my TakeSystem and ResotreSystem routines that I now use
  8. * in all my demos.  I am spreading them in hopes to get rid of the
  9. * crapy coding pracitces that people have had since the C64 days.
  10. * I'd like to thank Comrade J for his excelent "howtocode" files.
  11. * A lot of the stuff here is based on his words of wisdom. :^).  Anyway,
  12. * these routines, as of version 3.0, handle the following:
  13. *        Getting the VBR.
  14. *        Saving DMACON.
  15. *        Saving and reseting WB view modes.
  16. *        Owning/Disowning the blitter.
  17. *        Pal/Ntsc/AGA modes.
  18. *        Killing multitasking.
  19. *        Killing interrupts.
  20. *
  21. * If you have any questions/comments/suggestions, PLEASE contact me at
  22. * either:
  23. *        idr@rigel.cs.pdx.edu        (internet)
  24. *    - or -
  25. *        Epsilon
  26. *        P.O.B.    1914
  27. *        Beaverton, OR  97075-1914
  28. *        U.S.A.
  29. *
  30. * Many of you may not like the fact that I use includes and system calls,
  31. * I know I don't :), but it is the ONLY SAFE WAY TO TAKE THE SYSTEM!  To
  32. * insure that your demo will work on any system, it's what you have to do.
  33. *
  34. ***********************************************************
  35. * Includes
  36. ***********************************************************
  37.         incdir    'df1:StartupCode/'
  38.         include    'custom.i'
  39.  
  40.         incdir    "DevpacAm:include/"
  41.         include    "exec/exec_lib.i"
  42.         include    "exec/execbase.i"
  43.         include    "graphics/gfxbase.i"
  44.         include    "graphics/graphics_lib.i"
  45.  
  46. ***********************************************************
  47. * Other Macros
  48. ***********************************************************
  49.  
  50. CALL        MACRO
  51.         jsr    _LVO\1(a6)
  52.         ENDM
  53.  
  54. WaitVblank    MACRO
  55. .\@:        move.l    $4-2(a5),d0
  56.         andi.l    #$3ff00,d0
  57.         cmpi.l    #$0f400,d0
  58.         bne.b    .\@
  59.         ENDM
  60.  
  61. ***********************************************************
  62. * Other Equates
  63. ***********************************************************
  64.  
  65.  IFND    gb_ActiView
  66. gb_ActiView    EQU    32
  67.  ENDIF
  68.  
  69.  IFND    gb_CopInit
  70. gb_CopInit    EQU    36
  71.  ENDIF
  72.  
  73. ***********************************************************
  74.  
  75. BEGINish:    movem.l    d0-d7/a0-a6,-(a7)
  76.         bsr.b    TakeSystem
  77.         bsr.w    FixSineList
  78.         bsr.w    Copperinit
  79.  
  80.         lea    screen,a0
  81.         move.w    #$d00,d0
  82.         bsr    blitclear
  83.  
  84.         move.l #copper,$80-2(a5)
  85.  
  86. TestButton:    WaitBlit
  87.  
  88.         bsr.w    copperfuck
  89.         bsr.w    Texta
  90.         bsr.w    Bitch
  91.  
  92.         btst.b    #6,$bfe001
  93.         bne.b    TestButton
  94.  
  95.         bsr.w    RestoreSystem
  96.         movem.l    (a7)+,d0-d7/a0-a6
  97.         rts
  98.  
  99. ***********************************************************
  100.  
  101. TakeSystem:    movea.l    4.w,a6        ; exec base
  102.         lea    $dff002,a5    ; custom chip base + 2
  103.  
  104.         lea    GraphicsName,a1    ; "graphics.library"
  105.         moveq    #0,d0        ; any version
  106.         CALL    OpenLibrary    ; open it.
  107.         move.l    d0,gfx_base    ; save pointer to gfx base
  108.         beq.b    .exit        ; if we got a NULL, then exit
  109.         move.l    d0,a6        ; for later callls...
  110.  
  111.         move.l  gb_ActiView(a6),OldView    ; save old view
  112.  
  113.         move.w    #0,a1        ; clears full long-word
  114.         CALL    LoadView    ; Open a NULL view (resets display
  115.                     ;   on any Amiga)
  116.  
  117.         CALL    WaitTOF        ; Wait twice so that an interlace
  118.         CALL    WaitTOF        ;   display can reset.
  119.  
  120.         CALL    OwnBlitter    ; take over the blitter and...
  121.         CALL    WaitBlit    ;   wait for it to finish so we
  122.                     ;   safely use it as we please.
  123.  
  124.         movea.l    4.w,a6        ; exec base
  125.         CALL    Forbid        ; kill multitasking
  126.         CALL    Disable        ; kill interrupts so that we can
  127.                     ;   safely install our own.
  128.  
  129.         cmpi.b    #50,VblankFrequency(a6)    ; is vblank rate pal?
  130.         beq.b    .pal        ; yup.
  131.         st    ntsc        ; set NTSC flag.
  132.  
  133. .pal:        move.w    $7c-2(a5),d0    ; AGA register...
  134.         cmpi.b    #$f8,d0        ; are we AGA?
  135.         bne.b    .not_aga    ; nope.
  136.         st    AGA        ; set the AGA flag.
  137.  
  138. .not_aga:    bsr.b    GetVBR        ; get the vector base pointer
  139.         move.l    d0,VectorBase    ; save it for later.
  140.  
  141.         move.w    dmaconr-2(a5),d0    ; old DMACON bits
  142.         ori.w    #$8000,d0    ; or it set bit for restore
  143.         move.w    d0,OldDMACon    ; save it
  144. .exit:        rts
  145.  
  146. ***********************************************************
  147.  
  148. RestoreSystem:    lea    $dff002,a5    ; custom chip base + 2
  149.         move.w    OldDMACon,dmacon-2(a5)    ; restore old dma bits
  150.  
  151.         move.l    OldView,a1    ; old Work Bench view
  152.         move.l    gfx_base,a6    ; gfx base
  153.         CALL    LoadView    ; Restore the view
  154.         CALL    DisOwnBlitter    ; give blitter back to the system.
  155.  
  156.         move.l    gb_CopInit(a6),$80-2(a5) ; restore system clist
  157.         move.l    a6,a1
  158.         movea.l    4.w,a6        ; exec base
  159.         CALL    CloseLibrary
  160.  
  161.         movea.l    4.w,a6        ; exec base
  162.         CALL    Enable        ; restore ints.
  163.         CALL    Permit         ; restart multitasking
  164.         rts
  165.  
  166. ***********************************************************
  167. * This function provides a method of obtaining a pointer to the base of the
  168. * interrupt vector table on all Amigas.  After getting this pointer, use
  169. * the vector address as an offset.  For example, to install a level three
  170. * interrupt you would do the following:
  171. *
  172. *        bsr    _GetVBR
  173. *        move.l    d0,a0
  174. *        move.l    $6c(a0),OldIntSave
  175. *        move.l    #MyIntCode,$6c(a0)
  176. *
  177. ***********************************************************
  178. * Inputs: none
  179. * Output: d0 contains vbr.
  180.  
  181. GetVBR:        move.l    a5,-(sp)        ; save it.
  182.         moveq    #0,d0            ; clear
  183.         movea.l    4.w,a6            ; exec base
  184.         btst.b    #AFB_68010,AttnFlags+1(a6); are we at least a 68010?
  185.         beq.b    .1            ; nope.
  186.         lea.l    vbr_exception(pc),a5    ; addr of function to get VBR
  187.         jsr    _LVOSuperVisor(a6)    ; supervisor state
  188. .1:        move.l    (sp)+,a5        ; restore it.
  189.         rts                ; return
  190.  
  191. vbr_exception:
  192.     ; movec vbr,Xn is a priv. instr.  You must be supervisor to execute!
  193. ;        movec   vbr,d0
  194.     ; many assemblers don't know the VBR, if yours doesn't, then use this
  195.     ; line instead.
  196.         dc.w    $4e7a,$0801
  197.         rte                ; back to user state code
  198.  
  199. ***********************************************************
  200.  
  201. Bitch:        lea    Screen+[141*40]+34,a0
  202.         lea    intVector,a1
  203.         move.l    (a1)+,(a0)
  204.         move.l    (a1)+,40(a0)
  205.         move.l    (a1)+,80(a0)
  206.         move.l    (a1)+,120(a0)
  207.         move.l    (a1)+,160(a0)
  208.         rts
  209.  
  210. ;---------------------------------------------------------------
  211. clear:        clr.b    (a0)+
  212.         cmp.l    a0,a1
  213.         bne.s    clear
  214.         rts
  215. ;---------------------------------------------------------------
  216.  
  217. blitclear:    WaitBlit
  218.         move.l    a0,$54-2(a5)
  219.         move.w    #$100,$40-2(a5)
  220.         move.w    #0,$42-2(a5)
  221.         move.l    #0,$44-2(a5)
  222.         move.l    #-1,$64-2(a5)
  223.         move.w    d0,$58-2(a5)
  224.         rts
  225.  
  226. ;---------------------------------------------------------------
  227.  
  228. TEXTA:        cmp.w    #1,Wait
  229.         bne.s    Noclear
  230.         lea    screen,a0
  231.         move.w    #$b00,d0
  232.         bsr    blitclear
  233.  
  234. Noclear:    tst.w    Wait
  235.         beq.s    NoHalt
  236.         subq.w    #1,Wait
  237.         rts
  238.  
  239. NoHalt:        move.l    TextP,a0
  240.         tst.b    (a0)
  241.         bne.s    NoEndLine
  242.         move.w    #0,Xpos
  243.         addq.w    #1,Ypos
  244.         addq.l    #1,TextP
  245.         rts
  246.  
  247. NoEndLine:    cmp.b    #$1,(a0)
  248.         bne.s    NoEnd
  249.         move.w    #0,Xpos
  250.         move.w    #0,Ypos
  251.         move.w    #400,Wait
  252.  
  253.         addq.l    #1,Textp
  254.         move.l    textp,a0
  255.         cmp.b    #2,(a0)
  256.         bne.s    MorePages
  257.         move.l    #text,TextP
  258. MorePages:    rts
  259.  
  260. NoEnd:        moveq    #0,d0
  261.         moveq    #0,d1
  262.         move.b    (a0),d0
  263.         sub.b    #32,d0
  264.         lsl.w    #1,d0
  265.         move.w    d0,d1
  266.         divu    #40,d0
  267.         mulu    #11*40,d0
  268.         add.l    d0,d1
  269.         lea    font,a0
  270.         lea    (a0,d1.w),a0
  271.  
  272.         lea    Screen,a1
  273.         move.w    Xpos,d0
  274.         lea    (a1,d0.w),a1
  275.         move.w    Ypos,d0
  276.         mulu    #12*40,d0
  277.         lea    (a1,d0.w),a1
  278.  
  279.         moveq    #11,d7
  280. CopyChar:    move.w    (a0),(a1)
  281.         lea    40(a0),a0
  282.         lea    40(a1),a1
  283.         dbf    d7,Copychar
  284.  
  285.         addq.l    #1,TextP
  286.         add.w    #2,Xpos
  287.         rts
  288.  
  289. ;---------------------------------------------------------------
  290. CopLines=126
  291. CopInst=48
  292.  
  293. copperfuck:    cmp.l    #sineEnd,SinePos
  294.         blt.s    MoreList
  295.         sub.l    #sinesize/2,sinepos
  296. MoreList:    cmp.l    #colsEnd,ColsPos
  297.         blt.s    Morecollist
  298.         sub.l    #collistsize,colspos
  299. MoreColList:    lea    CopperBlock+6,a0
  300.         move.l    ColsPos,a1
  301.         move.l    SinePos,a2
  302.         move.w    #copLines-1,d7
  303. DoDisplay:    move.w    (a2)+,d1
  304.         lea    (a1,d1.w),a3
  305.  
  306. WaitCrap:    WaitBlit
  307.  
  308.         move.l    a3,$50-2(a5)
  309.         move.l    a0,$54-2(a5)
  310.         move.l    #$09f00000,$40-2(a5)
  311.         move.l    #$00000002,$64-2(a5)
  312.         move.l    #-1,$44-2(a5)
  313.         move.w    #(copinst-2)*64+1,$58-2(a5)
  314.  
  315.         add.l    #(copinst-2)*2,a3
  316. ;        addq.l    #2,a1
  317.         lea    CopInst*4(a0),a0
  318.         dbf    d7,DoDisplay
  319.  
  320.         tst.w    ChangeWait
  321.         beq.s    NextPattern
  322.         move.l    sineadd,d0
  323.         move.l    colsadd,d1
  324.         add.l    d0,SinePos
  325.         add.l    d1,ColsPos
  326.         subq.w    #1,changewait
  327.         rts
  328.  
  329. NextPattern:    move.l    ChangeAdr,a0
  330.         cmp.b    #-1,(a0)
  331.         bne.L    Morechg
  332.  
  333.         tst.w    Op1
  334.         beq.s    NoAdd
  335.         addq.l    #2,a1
  336. Noadd:        move.l    #changelist,Changeadr
  337.         bra.s    NextPattern
  338. Morechg:    moveq    #0,d0
  339.         moveq    #0,d1
  340.         moveq    #0,d2
  341.         move.b    (a0)+,d0
  342.         move.b    (a0)+,d1
  343.         move.b    (a0)+,d2
  344.         move.w    d2,Op1
  345.         move.l    d0,sineadd
  346.         move.l    d1,colsadd
  347.         move.w    #300,Changewait
  348.         addq.l    #3,changeadr
  349.         rts
  350.  
  351. ;---------------------------------------------------------------
  352.  
  353. copperinit:    lea    CopperBlock,a0
  354.         move.w    #copLines-1,d7
  355.         move.w    #$772f,d0
  356. DoDisplay2:    move.w    d0,(a0)+
  357.         move.w    #$fffe,(a0)+
  358.  
  359.         moveq    #Copinst-3,d6
  360. DoLine2:    move.l    #$01800000,(a0)+
  361.         dbf    d6,DoLine2
  362.         add.w    #$0100,d0
  363.  
  364.         move.l    #$01800000,(a0)+
  365.         dbf    d7,DoDisplay2
  366.  
  367.         lea    bmapptrs+2,a0
  368.         move.l    #Logo,d0
  369.         move.w    d0,4(a0)
  370.         swap    d0
  371.         move.w    d0,(a0)
  372.  
  373.         move.l    #Logo+$be0,d0
  374.         move.w    d0,12(a0)
  375.         swap    d0
  376.         move.w    d0,8(a0)
  377.  
  378.         move.l    #Logo+(2*$be0),d0
  379.         move.w    d0,20(a0)
  380.         swap    d0
  381.         move.w    d0,16(a0)
  382.  
  383.         move.l    #Logo+(3*$be0),d0
  384.         move.w    d0,28(a0)
  385.         swap    d0
  386.         move.w    d0,24(a0)
  387.  
  388.         move.l    #Logo+(4*$be0),d0
  389.         move.w    d0,36(a0)
  390.         swap    d0
  391.         move.w    d0,32(a0)
  392.  
  393.         lea    textptrs+2,a0
  394.         move.l    #screen+$190,d0
  395.         move.w    d0,4(a0)
  396.         swap    d0
  397.         move.w    d0,(a0)
  398.  
  399.         move.l    #screen+$190+$28,d0
  400.         move.w    d0,12(a0)
  401.         swap    d0
  402.         move.w    d0,8(a0)
  403.         rts
  404.  
  405. ;----------------------------------------------------------------
  406.  
  407. FixSineList:    lea    SineList,a0
  408.         move.w    #sineSize/2-1,d7
  409. FixPos:        moveq    #0,d0
  410.         move.w    (a0),d0
  411.         sub.b    #$69,d0
  412.         lsl.w    #1,d0
  413.         move.w    d0,(a0)+
  414.         dbf    d7,FixPos
  415.         rts
  416.  
  417. ***********************************************************
  418.  
  419.         section    spam,data
  420.  
  421. GraphicsName:    dc.b    "graphics.library",0
  422.         even
  423.  
  424. Wait:        dc.w    1
  425.  
  426. ChangeAdr:    dc.l    Changelist
  427.  
  428. ChangeList:    dc.b    2,2,0,4,2,0,6,2,0,8,2,0
  429.         dc.b    2,4,0,4,4,0,6,4,0,8,4,0
  430.         dc.b    2,2,1,4,2,1,6,2,1,8,2,1
  431.         dc.b    2,4,1,4,4,1,6,4,1,8,4,1
  432.         dc.b    -1
  433.         even
  434.  
  435. SinePos:    dc.l    SineList
  436.  
  437. SineList:
  438.  dc.w    $69,$69,$69,$69,$69,$69,$69,$69,$6a,$6a,$6a,$6b,$6b,$6b,$6c,$6c
  439.  dc.w    $6d,$6d,$6e,$6e,$6f,$70,$70,$71,$71,$72,$73,$74,$74,$75,$76,$77
  440.  dc.w    $77,$78,$79,$7a,$7b,$7c,$7c,$7d,$7e,$7f,$80,$81,$82,$82,$83,$84
  441.  dc.w    $85,$86,$86,$87,$88,$89,$8a,$8b,$8b,$8c,$8d,$8e,$8f,$8f,$90,$91
  442.  dc.w    $92,$92,$93,$94,$94,$95,$96,$96,$97,$97,$98,$98,$99,$99,$9a,$9a
  443.  dc.w    $9a,$9b,$9b,$9b,$9b,$9b,$9c,$9c,$9c,$9c,$9c,$9c,$9c,$9c,$9c,$9b
  444.  dc.w    $9b,$9b,$9b,$9b,$9a,$9a,$9a,$99,$99,$98,$98,$97,$97,$96,$96,$95
  445.  dc.w    $94,$94,$93,$92,$92,$91,$90,$8f,$8f,$8e,$8d,$8c,$8b,$8b,$8a,$89
  446.  dc.w    $88,$87,$86,$86,$85,$84,$83,$82,$82,$81,$80,$7f,$7e,$7d,$7c,$7c
  447.  dc.w    $7b,$7a,$79,$78,$77,$77,$76,$75,$74,$74,$73,$72,$71,$71,$70,$70
  448.  dc.w    $6f,$6e,$6e,$6d,$6d,$6c,$6c,$6b,$6b,$6b,$6a,$6a,$6a,$69,$69,$69
  449.  dc.w    $69,$69,$69,$69,$69
  450. SineEnd:
  451.  dc.w    $69,$69,$69,$69,$69,$69,$69,$69,$6a,$6a,$6a,$6b,$6b,$6b,$6c,$6c
  452.  dc.w    $6d,$6d,$6e,$6e,$6f,$70,$70,$71,$71,$72,$73,$74,$74,$75,$76,$77
  453.  dc.w    $77,$78,$79,$7a,$7b,$7c,$7c,$7d,$7e,$7f,$80,$81,$82,$82,$83,$84
  454.  dc.w    $85,$86,$86,$87,$88,$89,$8a,$8b,$8b,$8c,$8d,$8e,$8f,$8f,$90,$91
  455.  dc.w    $92,$92,$93,$94,$94,$95,$96,$96,$97,$97,$98,$98,$99,$99,$9a,$9a
  456.  dc.w    $9a,$9b,$9b,$9b,$9b,$9b,$9c,$9c,$9c,$9c,$9c,$9c,$9c,$9c,$9c,$9b
  457.  dc.w    $9b,$9b,$9b,$9b,$9a,$9a,$9a,$99,$99,$98,$98,$97,$97,$96,$96,$95
  458.  dc.w    $94,$94,$93,$92,$92,$91,$90,$8f,$8f,$8e,$8d,$8c,$8b,$8b,$8a,$89
  459.  dc.w    $88,$87,$86,$86,$85,$84,$83,$82,$82,$81,$80,$7f,$7e,$7d,$7c,$7c
  460.  dc.w    $7b,$7a,$79,$78,$77,$77,$76,$75,$74,$74,$73,$72,$71,$71,$70,$70
  461.  dc.w    $6f,$6e,$6e,$6d,$6d,$6c,$6c,$6b,$6b,$6b,$6a,$6a,$6a,$69,$69,$69
  462.  dc.w    $69,$69,$69,$69,$69
  463. xxx:
  464. SineSize=xxx-SineList
  465.  
  466. textp:         dc.l    text
  467. IntVector:     dc.l    $0739e791,$08451451,$087d144a
  468.          dc.l    $08451444,$0745e784
  469.  
  470. ;---------------------------------------------------------------
  471. ;- EACH LINE MUST END WITH A ZERO, PAGE ENDS WITH 1,0
  472. ;- END OF TEXT ENDS WITH 1,2 - EACH LINE CAN BE ANYLENGTH...
  473. ;- PAGES ARE 10 LINES LONG
  474. Text:
  475.         dc.b    0
  476.         dc.b    "** M A S T E R S **",0
  477.         dc.b    0
  478.         dc.b    0
  479.         dc.b    "   ARE HERE WITH",0
  480.         dc.b    0
  481.         dc.b    "  ANOTHER RELEASE",0
  482.         dc.b    0
  483.         dc.b    0
  484.         dc.b    0
  485.         dc.b    "FIRST WITH THE BEST",1,0
  486.  
  487.         dc.b    " CALL THESE BOARDS ",0
  488.         dc.b    " ----------------- ",0
  489.         dc.b    "MASTER'S WHQ   ",0
  490.         dc.b    "       XXXXXXXX",0,0
  491.         dc.b    "CRYPTIC DEAD   ",0
  492.         dc.b    "       BLA BLA",0,0
  493.         dc.b    "TEMPEST BBS:   ",0
  494.         dc.b    "       -----------",1,0
  495.  
  496.         dc.b    "OPTICAL ILLUSION",0
  497.         dc.b    "       DEPARTED ",0,0
  498.         dc.b    "PRIME TIME",0
  499.         dc.b    "       ----------",0,0
  500.         dc.b    "CHERNOBYL BBS",0
  501.         dc.b    "      +++++++++++++",0
  502.         dc.b    "                   ",0
  503.         dc.b    " ALL BOARDS R 9600+ ",1,0
  504.  
  505.         dc.b    " MINI CREDITS:     ",0
  506.         dc.b    " -------------     ",0
  507.         dc.b    " CODING-     CADDY ",0
  508.         dc.b    "                   ",0
  509.         dc.b    " LOGO-  METALLIKAT ",0
  510.         dc.b    "                   ",0
  511.         dc.b    " FONT-   DIGIT/PNS ",0
  512.         dc.b    "                   ",0
  513.         dc.b    " MUSIC-  DIGIT/PNS ",0
  514.         dc.b    " SAY GOODNIGHT BILL",1,2
  515.         even
  516.  
  517. ***********************************************************
  518.  
  519.         section    gfx,data_c
  520.  
  521. ;----------------------------------------------------------------
  522. ; dc.w    000,010,020,030,040,050,060,070,080,090,0a0,0b0,0c0,0d0,0e0,0f0
  523. ; dc.w    0f0,1f0,2f0,3f0,4f0,5f0,6f0,7f0,8f0,9f0,af0,bf0,cf0,df0,ef0,ff0
  524. ; dc.w    ff0,fe1,fd2,fc3,fb4,fa5,f96,f87,f78,f69,f5a,f4b,f3c,f2d,f1e,f0f
  525. ; dc.w    f0f,e0e,d0d,c0c,b0b,a0a,909,808,707,606,505,404,303,202,101,000
  526. ;----------------------------------------------------------------
  527. ColsPos:     dc.l    CopperCols
  528. CopperCols:
  529.  dc.w    $ff0,$fe1,$fd2,$fc3,$fb4,$fa5,$f96,$f87,$f78,$f69,$f5a,$f4b,$f3c,$f2d,$f1e,$f0f
  530.  dc.w    $f0f,$f1e,$f2d,$f3c,$f4b,$f5a,$f69,$f78,$f87,$f96,$fa5,$fb4,$fc3,$fd2,$fe1,$ff0
  531.  dc.w    $ff0,$fe1,$fd2,$fc3,$fb4,$fa5,$f96,$f87,$f78,$f69,$f5a,$f4b,$f3c,$f2d,$f1e,$f0f
  532.  dc.w    $f0f,$f1e,$f2d,$f3c,$f4b,$f5a,$f69,$f78,$f87,$f96,$fa5,$fb4,$fc3,$fd2,$fe1,$ff0
  533.  
  534.  dc.w    $ff0,$fe1,$fd2,$fc3,$fb4,$fa5,$f96,$f87,$f78,$f69,$f5a,$f4b,$f3c,$f2d,$f1e,$f0f
  535.  dc.w    $f0f,$f1e,$f2d,$f3c,$f4b,$f5a,$f69,$f78,$f87,$f96,$fa5,$fb4,$fc3,$fd2,$fe1,$ff0
  536.  dc.w    $ff0,$fe1,$fd2,$fc3,$fb4,$fa5,$f96,$f87,$f78,$f69,$f5a,$f4b,$f3c,$f2d,$f1e,$f0f
  537.  dc.w    $f0f,$f1e,$f2d,$f3c,$f4b,$f5a,$f69,$f78,$f87,$f96,$fa5,$fb4,$fc3,$fd2,$fe1,$ff0
  538. xxxx:
  539. CollistSize=xxxx-coppercols
  540.  
  541. ColsEnd:
  542.  dc.w    $ff0,$fe1,$fd2,$fc3,$fb4,$fa5,$f96,$f87,$f78,$f69,$f5a,$f4b,$f3c,$f2d,$f1e,$f0f
  543.  dc.w    $f0f,$f1e,$f2d,$f3c,$f4b,$f5a,$f69,$f78,$f87,$f96,$fa5,$fb4,$fc3,$fd2,$fe1,$ff0
  544.  dc.w    $ff0,$fe1,$fd2,$fc3,$fb4,$fa5,$f96,$f87,$f78,$f69,$f5a,$f4b,$f3c,$f2d,$f1e,$f0f
  545.  dc.w    $f0f,$f1e,$f2d,$f3c,$f4b,$f5a,$f69,$f78,$f87,$f96,$fa5,$fb4,$fc3,$fd2,$fe1,$ff0
  546.  dc.w    $ff0,$fe1,$fd2,$fc3,$fb4,$fa5,$f96,$f87,$f78,$f69,$f5a,$f4b,$f3c,$f2d,$f1e,$f0f
  547.  dc.w    $f0f,$f1e,$f2d,$f3c,$f4b,$f5a,$f69,$f78,$f87,$f96,$fa5,$fb4,$fc3,$fd2,$fe1,$ff0
  548.  dc.w    $ff0,$fe1,$fd2,$fc3,$fb4,$fa5,$f96,$f87,$f78,$f69,$f5a,$f4b,$f3c,$f2d,$f1e,$f0f
  549.  dc.w    $f0f,$f1e,$f2d,$f3c,$f4b,$f5a,$f69,$f78,$f87,$f96,$fa5,$fb4,$fc3,$fd2,$fe1,$ff0
  550.  
  551.  dc.w    $ff0,$fe1,$fd2,$fc3,$fb4,$fa5,$f96,$f87,$f78,$f69,$f5a,$f4b,$f3c,$f2d,$f1e,$f0f
  552.  dc.w    $f0f,$f1e,$f2d,$f3c,$f4b,$f5a,$f69,$f78,$f87,$f96,$fa5,$fb4,$fc3,$fd2,$fe1,$ff0
  553.  dc.w    $ff0,$fe1,$fd2,$fc3,$fb4,$fa5,$f96,$f87,$f78,$f69,$f5a,$f4b,$f3c,$f2d,$f1e,$f0f
  554.  dc.w    $f0f,$f1e,$f2d,$f3c,$f4b,$f5a,$f69,$f78,$f87,$f96,$fa5,$fb4,$fc3,$fd2,$fe1,$ff0
  555.  dc.w    $ff0,$fe1,$fd2,$fc3,$fb4,$fa5,$f96,$f87,$f78,$f69,$f5a,$f4b,$f3c,$f2d,$f1e,$f0f
  556.  dc.w    $f0f,$f1e,$f2d,$f3c,$f4b,$f5a,$f69,$f78,$f87,$f96,$fa5,$fb4,$fc3,$fd2,$fe1,$ff0
  557.  dc.w    $ff0,$fe1,$fd2,$fc3,$fb4,$fa5,$f96,$f87,$f78,$f69,$f5a,$f4b,$f3c,$f2d,$f1e,$f0f
  558.  dc.w    $f0f,$f1e,$f2d,$f3c,$f4b,$f5a,$f69,$f78,$f87,$f96,$fa5,$fb4,$fc3,$fd2,$fe1,$ff0
  559.  
  560. copper:        dc.l    $00960020        ; kill sprites
  561.         dc.l    $01440000,$01460000,$014c0000,$014e0000,$01540000
  562.         dc.l    $01560000,$015c0000,$015e0000,$01640000,$01660000
  563.         dc.l    $016c0000,$016e0000,$01740000,$01760000,$017c0000
  564.         dc.l    $017e0000
  565.         dc.l    $008e2071,$009030c8
  566.         dc.l    $00920038,$009400d0
  567.         dc.l    $01020000,$01800000,$01040003
  568.         dc.l    $01080000,$010a0000,$01000000
  569. bmapptrs:    dc.l    $00e00000,$00e20000
  570.         dc.l    $00e40000,$00e60000
  571.         dc.l    $00e80000,$00ea0000
  572.         dc.l    $00ec0000,$00ee0000
  573.         dc.l    $00f00000,$00f20000
  574.  
  575.         dc.w    $0180,$0000,$0182,$0fff,$0184,$0fc6,$0186,$0e94
  576.         dc.w    $0188,$0d96,$018a,$0fca,$018c,$0fea,$018e,$0731
  577.         dc.w    $0190,$0a36,$0192,$0814,$0194,$0c05,$0196,$0c26
  578.         dc.w    $0198,$0d48,$019a,$0d79,$019c,$0e9b,$019e,$0a15
  579.         dc.w    $01a0,$0620,$01a2,$0e52,$01a4,$0a52,$01a6,$0a53
  580.         dc.w    $01a8,$000d,$01aa,$011d,$01ac,$023d,$01ae,$044d
  581.         dc.w    $01b0,$0226,$01b2,$066e,$01b4,$088e,$01b6,$099e
  582.         dc.w    $01b8,$0aae,$01ba,$0ccf,$01bc,$0ddf,$01be,$044b
  583.  
  584.         dc.l    $260ffffe,$01005000,$720ffffe,$01000000
  585. textptrs:    dc.l    $00e00000,$00e20000,$00e40000,$00e60000
  586.         dc.l    $01820000,$01840fff,$01860fff
  587.  
  588.         dc.l    $730ffffe,$01800000,$740ffffe,$01800099
  589.         dc.l    $750ffffe,$018000cc,$760ffffe,$018000ff
  590.         dc.l    $770ffffe,$01002000,$01020089,$01800000
  591.  
  592. CopperBlock:    blk.l    Coplines*copInst,-1
  593. endblock:    dc.l    $f50ffffe,$018000ff,$f60ffffe,$018000cc
  594.         dc.l    $f70ffffe,$01800099,$f80ffffe,$01800000,$01001000
  595.         dc.l    $fa0ffffe,$01820fff,$fb0ffffe,$01820eee
  596.         dc.l    $fc0ffffe,$01820ddd,$fd0ffffe,$01820ccc
  597.         dc.l    $fe0ffffe,$01820bbb,$ff0ffffe,$01000000
  598.         dc.l    $fffffffe,$fffffffe    ; some revs of the copper
  599.                         ;   skip the first end.
  600.  
  601.         incdir    ''
  602. Logo:        incbin "df1:masters/katlogo.b"
  603. Font:        incbin "df1:masters/digfont.b"
  604.  
  605. ***********************************************************
  606.  
  607.         section    textscreen,bss_c
  608.  
  609. screen:        ds.b    $5000
  610.  
  611. ***********************************************************
  612.  
  613.         section    OldPointers_and_such,bss
  614.  
  615. gfx_base    ds.l    1        ; pointer to graphics base
  616. OldView        ds.l    1        ; old Work Bench view addr.
  617. VectorBase:    ds.l    1        ; pointer to the Vector Base
  618.  
  619. OldDMACon:    ds.w    1        ; old dmacon bits
  620.  
  621. ntsc:        ds.b    1        ; 0 = pal, 1 = ntsc
  622. AGA:        ds.b    1        ; 0 = ESC/standard, 1 = AGA
  623.  
  624. SineAdd:    ds.l    1
  625. Colsadd:    ds.l    1
  626. Op1:        ds.w    1
  627. Xpos:        ds.w    1
  628. Ypos:        ds.w    1
  629. ChangeWait:    ds.w    1
  630.  
  631.