home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD1.iso / Source / pheno.lha / pha / VectorStars.S < prev    next >
Encoding:
Text File  |  1987-12-17  |  24.5 KB  |  717 lines

  1. ;------------------------------------------------------------------------
  2. ;-                                    -
  3. ;-                 Vector-Stars                -
  4. ;-                                    -
  5. ;------------------------------------------------------------------------
  6.  
  7. org    $20000
  8. load    $20000
  9.  
  10.         AntStars:    =    93
  11.  
  12. ;------------------------------------------------------------------------
  13.  
  14. S:        movem.l    d0-d7/a0-a6,-(sp)
  15.         lea.l    $dff000,a6
  16.         bsr    Startup
  17.         bsr    InitRutin
  18.         bsr    StartCop
  19.         bsr    MainLoop
  20.         bsr    RestoreCop
  21.         movem.l    (sp)+,d0-d7/a0-a6
  22.         rts
  23.  
  24. Startup:    move.w    2(a6),d0
  25.         bset    #15,d0
  26.         move.w    d0,OldDma
  27.         move.w    $1c(a6),d0
  28.         bset    #15,d0
  29.         move.w    d0,OldIrq
  30.         move.l    $4,a6
  31.         lea.l    Lib(pc),a1
  32.         moveq    #0,d0
  33.         jsr    -408(a6)
  34.         move.l    d0,a0
  35.         move.l    $26(a0),OldCop
  36.         lea.l    $dff000,a6
  37.         rts
  38.  
  39. StartCop:    move.l    #CopperList,$80(a6)
  40.         tst.w    $88(a6)
  41.         move.w    #$7fff,$96(a6)
  42.         move.w    #$87c0,$96(a6)
  43.         move.w    #$7fff,$9a(a6)
  44.         move.w    #$c000,$9a(a6)
  45.         rts
  46.  
  47. RestoreCop:    move.l    OldCop(pc),$80(a6)
  48.         tst.w    $88(a6)
  49.         move.w    OldDma(pc),$96(a6)
  50.         move.w    OldIrq(pc),$9a(a6)
  51.         rts
  52.  
  53.     ;-----------------------------------------------------
  54.         OldCop:        dc.l    0
  55.         OldDma:        dc.w    0
  56.         OldIrq:        dc.w    0
  57.         Lib:        dc.b    'graphics.library',0
  58.                 even
  59.     ;-----------------------------------------------------
  60.  
  61. ;------------------------------------------------------------------------
  62.  
  63. BlitWait:    btst    #14,2(a6)
  64.         bne.S    BlitWait
  65.         rts
  66.  
  67. ClearScreen:    bsr.S    BlitWait
  68.         move.l    #-1,$44(a6)
  69.         move.l    #$01000000,$40(a6)
  70.         move.w    d2,$66(a6)
  71.         move.l    d0,$54(a6)
  72.         move.w    d1,$58(a6)
  73.         rts
  74.  
  75. ;------------------------------------------------------------------------
  76.  
  77. InitRutin:    move.l    Screen(pc),d0
  78.         move.w    #116*64+24,d1
  79.         moveq    #0,d2
  80.         bsr    ClearScreen
  81.         move.l    Screen+4(pc),d0
  82.         bsr    ClearScreen
  83.  
  84.         lea.l    Positioner(pc),a0
  85.         lea.l    $6(a6),a1
  86.         move.w    #1245,d1
  87.         move.w    #13,d2
  88.         move.w    #2,d3
  89.         move.w    #AntStars-1,d7
  90. RNDLoop:    move.w    (a1),d0
  91.         ext    d0
  92.         muls    d1,d0
  93.         and.w    #$1ff,d0
  94.         ;cmp.w    #320,d0
  95.         ;bls.S    NoD1
  96.         sub.w    #256,d0
  97. NoD1:        move.w    d0,(a0)+
  98.         muls    d2,d1
  99.         add.w    d3,d2
  100.         move.w    (a1),d0
  101.         ext    d0
  102.         muls    d1,d0
  103.         and.w    #$1ff,d0
  104.         ;cmp.w    #200,d0
  105.         ;bls.S    NoD2
  106.         sub.w    #256,d0
  107. NoD2:        move.w    d0,(a0)+
  108.         muls    d2,d1
  109.         add.w    d3,d2
  110.         move.w    (a1),d0
  111.         ext    d0
  112.         muls    d1,d0
  113.         and.w    #$1ff,d0
  114.         sub.w    #256,d0
  115.         move.w    d0,(a0)+
  116.         muls    d2,d1
  117.         add.w    d3,d2
  118.         dbra    d7,RNDLoop
  119.  
  120.         lea.l    MulsList,a0
  121.         moveq    #0,d0
  122.         move.w    #300-1,d7
  123. MulsLoop:    move.w    d0,(a0)+
  124.         add.w    #44,d0
  125.         dbra    d7,MulsLoop
  126.         rts
  127.  
  128. MulsList:    =    $6d000
  129.  
  130. ;------------------------------------------------------------------------
  131.  
  132. MainLoop:    cmp.b    #-1,$6(a6)
  133.         bne.S    MainLoop
  134.  
  135.         ;move.w    #$4,$180(a6)
  136.         bsr    Stars
  137.         ;move.w    #$40,$180(a6)
  138.  
  139.         btst    #6,$bfe001
  140.         bne.S    MainLoop
  141.         rts
  142.  
  143. ;------------------------------------------------------------------------
  144.  
  145. Stars:        bsr    Buffra
  146.         bsr    Rensa
  147.         bsr    VinkelAdd
  148.         bsr    AddZ
  149.         bsr    Rakna
  150.         bsr    Plotta
  151.         rts
  152.  
  153. Buffra:        move.l    Screen(pc),d0
  154.         move.l    Screen+4(pc),Screen
  155.         move.l    d0,Screen+4
  156.         lea.l    BMap(pc),a0
  157.         moveq    #2-1,d7
  158. BMapLoop:    swap    d0
  159.         move.w    d0,2(a0)
  160.         swap    d0
  161.         move.w    d0,6(a0)
  162.         addq.l    #8,a0
  163.         add.l    #BmapSize,d0
  164.         dbra    d7,BMapLoop
  165.         rts
  166.  
  167. Rensa:        move.l    Screen(pc),d0
  168.         moveq    #0,d2
  169.         move.w    #280*64*2+22,d1
  170.         bsr    ClearScreen
  171.         rts
  172.  
  173. VinkelAdd:    lea.l    Vinklar(pc),a0
  174.         lea.l    VAdds(pc),a1
  175.         move.w    #720,d1
  176.         moveq    #3-1,d7
  177. VAddLoop:    move.w    (a0),d0
  178.         add.w    (a1)+,d0
  179.         cmp.w    d1,d0
  180.         bls.S    Nothing
  181.         sub.w    d1,d0
  182. Nothing:    move.w    d0,(a0)+
  183.         dbra    d7,VAddLoop
  184.         rts
  185.  
  186. AddZ:        lea.l    Positioner+4(pc),a0
  187.         move.w    #511,d0
  188.         move.w    #256,d3
  189.         move.w    #-8,d1
  190.         move.w    #AntStars-1,d7
  191. ZLoop:        move.w    (a0),d2
  192.         add.w    d3,d2
  193.         add.w    d1,d2
  194.         and.w    d0,d2
  195.         sub.w    d3,d2
  196.         move.w    d2,(a0)
  197.         addq.l    #6,a0
  198.         dbra    d7,ZLoop
  199.         rts
  200.  
  201. Rakna:        lea.l    Positioner(pc),a0
  202.         lea.l    Sinus+180(pc),a1
  203.         lea.l    Sinus(pc),a2
  204.         lea.l    Vinklar(pc),a3
  205.         lea.l    Posses(pc),a4
  206.         lea.l    Djup+200(pc),a5
  207.  
  208.         lea.l    CalcUp(pc),a6
  209.         move.w    (a3),d0
  210.         move.w    (a1,d0.W),(a6)+
  211.         move.w    (a2,d0.W),(a6)+
  212.         move.w    4(a3),d0
  213.         move.w    (a1,d0.W),(a6)+
  214.         move.w    (a2,d0.W),(a6)+
  215.         move.w    2(a3),d0
  216.         move.w    (a1,d0.W),(a6)+
  217.         move.w    (a2,d0.W),(a6)+
  218.  
  219.         lea.l    CalcUp(pc),a1
  220.         lea.l    MulsList,a6
  221.         move.w    #AntStars-1,d7
  222.  
  223. RakneLoop:    move.w    (a1)+,d1
  224.         move.w    (a1)+,d2
  225.  
  226.         move.w    2(a0),d3
  227.         muls    d2,d3
  228.         move.w    4(a0),d4
  229.         muls    d1,d4
  230.         sub.l    d4,d3
  231.         asl.l    #2,d3
  232.         swap    d3        ;Y
  233.         move.w    2(a0),d4
  234.         muls    d1,d4
  235.         move.w    4(a0),d5
  236.         muls    d2,d5
  237.         add.l    d5,d4
  238.         asl.l    #2,d4
  239.         swap    d4        ;Z
  240.  
  241.         move.w    (a1)+,d1
  242.         move.w    (a1)+,d2
  243.         move.w    (a0),d5
  244.         muls    d2,d5
  245.         move.w    d3,d6
  246.         muls    d1,d6
  247.         sub.l    d6,d5
  248.         asl.l    #2,d5
  249.         swap    d5        ;X
  250.         move.w    (a0),d6
  251.         muls    d1,d6
  252.         muls    d2,d3
  253.         add.l    d6,d3
  254.         asl.l    #2,d3
  255.         swap    d3        ;Y
  256.  
  257.         move.w    (a1)+,d1
  258.         move.w    (a1)+,d2
  259.         move.w    d5,d0
  260.         muls    d2,d0
  261.         move.w    d4,d6
  262.         muls    d1,d6
  263.         sub.l    d6,d0
  264.         asl.l    #2,d0
  265.         swap    d0        ;X
  266.         muls    d1,d5
  267.         muls    d2,d4
  268.         add.l    d5,d4
  269.         asl.l    #2,d4
  270.         swap    d4        ;Z
  271.  
  272.         add.w    #256,d4
  273.         add.w    d4,d4
  274.         move.w    (a5,d4.W),d2
  275.         muls    d2,d0
  276.         muls    d2,d3
  277.         lsl.l    #4,d0
  278.         lsl.l    #4,d3
  279.         swap    d0
  280.         swap    d3
  281.  
  282.         addq.l    #6,a0
  283.  
  284.         add.w    #176,d0
  285.         cmp.w    #352,d0
  286.         bls.S    NN
  287.         move.w    #351,d0
  288. NN:        add.w    #140,d3
  289.         cmp.w    #280,d3
  290.         bls.S    NN2
  291.         move.w    #281,d3
  292. NN2:
  293.         move.w    d0,d1
  294.         lsr.w    #3,d0
  295.         eor.w    #$7,d1
  296.         add.w    d3,d3
  297.         move.w    (a6,d3.W),d3
  298.         add.w    d3,d0
  299.  
  300.         move.w    d0,(a4)+
  301.         move.w    d1,(a4)+
  302.         move.w    d4,(a4)+
  303.         lea.l    -12(a1),a1
  304.         dbra    d7,RakneLoop
  305.         lea.l    $dff000,a6
  306.         rts
  307.  
  308. Plotta:        lea.l    Posses(pc),a0
  309.         move.l    Screen(pc),a1
  310.         move.l    #BMapSize,d3
  311.         move.w    #1024,d4
  312.         move.w    #AntStars-1,d7
  313. PlotLoop:    move.w    (a0)+,d0
  314.         move.w    (a0)+,d1
  315.         move.w    (a0)+,d2
  316.         cmp.w    d3,d0
  317.         bhi.S    NoPlot2
  318.         cmp.w    d4,d2
  319.         bhi.S    NoPlot2
  320.         btst    #8,d2
  321.         beq.S    NoPlot1
  322.         bset    d1,(a1,d0.W)
  323. NoPlot1:    add.w    d3,d0
  324.         btst    #9,d2
  325.         beq.S    NoPlot2
  326.         bset    d1,(a1,d0.W)
  327. NoPlot2:    dbra    d7,PlotLoop
  328.         rts
  329.  
  330.     ;--------------------------------------------------
  331.  
  332.         Screen:        dc.l    $60000
  333.                 dc.l    $70000
  334.  
  335.         BMapSize:    =    280*44
  336.  
  337.         Posses:        blk.w    AntStars*3,0
  338.         Positioner:    blk.w    AntStars*3,0
  339.         CalcUp:        blk.w    3*2,0
  340.  
  341.         Vinklar:    dc.w    0
  342.                 dc.w    0
  343.                 dc.w    0
  344.  
  345.         VAdds:        dc.w    6
  346.                 dc.w    4
  347.                 dc.w    4
  348.  
  349.     ;--------------------------------------------------
  350.  
  351. ;------------------------------------------------------------------------
  352.  
  353. CopperList:    dc.l    $008e2066,$009038c6,$00920030,$009400d8
  354.         dc.l    $01020000,$01040000,$01080000,$010a0000
  355.  
  356.         dc.l    $01800000,$01820ccd,$01840889,$01860446
  357. BMap:        dc.l    $00e00000,$00e20000,$00e40000,$00e60000
  358.         dc.l    $01002000
  359.  
  360.         dc.l    -2
  361.  
  362. ;------------------------------------------------------------------------
  363.  
  364. DJUP:
  365.     dc.w    $6a00,$6000,$5a00,$5200,$4d00,$4800,$4400,$4000
  366.     DC.W    $3D12,$3BF4,$3AE0,$39D6,$38D6,$37DE,$36EE,$3606
  367.     DC.W    $3526,$344C,$337A,$32AE,$31E9,$3129,$306F,$2FBA
  368.     DC.W    $2F0B,$2E60,$2DBB,$2D1A,$2C7D,$2BE4,$2B50,$2ABF
  369.     DC.W    $2A32,$29A9,$2923,$28A0,$2821,$27A5,$272B,$26B5
  370.     DC.W    $2641,$25D0,$2562,$24F6,$248C,$2425,$23C0,$235D
  371.     DC.W    $22FD,$229E,$2241,$21E7,$218E,$2137,$20E1,$208E
  372.     DC.W    $203C,$1FEB,$1F9C,$1F4F,$1F03,$1EB9,$1E70,$1E28
  373.     DC.W    $1DE2,$1D9C,$1D59,$1D16,$1CD4,$1C94,$1C55,$1C17
  374.     DC.W    $1BD9,$1B9D,$1B62,$1B28,$1AEF,$1AB7,$1A7F,$1A49
  375.     DC.W    $1A13,$19DF,$19AB,$1978,$1946,$1914,$18E3,$18B3
  376.     DC.W    $1884,$1855,$1827,$17FA,$17CE,$17A2,$1776,$174C
  377.     DC.W    $1721,$16F8,$16CF,$16A7,$167F,$1658,$1631,$160B
  378.     DC.W    $15E5,$15C0,$159B,$1577,$1553,$1530,$150D,$14EA
  379.     DC.W    $14C8,$14A7,$1486,$1465,$1445,$1425,$1405,$13E6
  380.     DC.W    $13C7,$13A9,$138B,$136D,$1350,$1333,$1316,$12FA
  381.     DC.W    $12DE,$12C3,$12A7,$128C,$1271,$1257,$123D,$1223
  382.     DC.W    $1209,$11F0,$11D7,$11BE,$11A6,$118E,$1176,$115E
  383.     DC.W    $1147,$112F,$1118,$1102,$10EB,$10D5,$10BF,$10A9
  384.     DC.W    $1094,$107E,$1069,$1054,$103F,$102B,$1017,$1002
  385.     DC.W    $0FEF,$0FDB,$0FC7,$0FB4,$0FA1,$0F8E,$0F7B,$0F68
  386.     DC.W    $0F56,$0F43,$0F31,$0F1F,$0F0E,$0EFC,$0EEB,$0ED9
  387.     DC.W    $0EC8,$0EB7,$0EA6,$0E96,$0E85,$0E75,$0E64,$0E54
  388.     DC.W    $0E44,$0E34,$0E25,$0E15,$0E06,$0DF6,$0DE7,$0DD8
  389.     DC.W    $0DC9,$0DBA,$0DAC,$0D9D,$0D8F,$0D81,$0D72,$0D64
  390.     DC.W    $0D56,$0D48,$0D3B,$0D2D,$0D20,$0D12,$0D05,$0CF8
  391.     DC.W    $0CEB,$0CDE,$0CD1,$0CC4,$0CB7,$0CAB,$0C9E,$0C92
  392.     DC.W    $0C86,$0C79,$0C6D,$0C61,$0C55,$0C49,$0C3E,$0C32
  393.     DC.W    $0C26,$0C1B,$0C0F,$0C04,$0BF9,$0BEE,$0BE3,$0BD8
  394.     DC.W    $0BCD,$0BC2,$0BB7,$0BAC,$0BA2,$0B97,$0B8D,$0B82
  395.     DC.W    $0B78,$0B6E,$0B64,$0B5A,$0B50,$0B46,$0B3C,$0B32
  396.     DC.W    $0B28,$0B1E,$0B15,$0B0B,$0B02,$0AF8,$0AEF,$0AE6
  397.     DC.W    $0ADC,$0AD3,$0ACA,$0AC1,$0AB8,$0AAF,$0AA6,$0A9D
  398.     DC.W    $0A95,$0A8C,$0A83,$0A7B,$0A72,$0A69,$0A61,$0A59
  399.     DC.W    $0A50,$0A48,$0A40,$0A38,$0A2F,$0A27,$0A1F,$0A17
  400.     DC.W    $0A0F,$0A08,$0A00,$09F8,$09F0,$09E8,$09E1,$09D9
  401.     DC.W    $09D2,$09CA,$09C3,$09BB,$09B4,$09AD,$09A5,$099E
  402.     DC.W    $0997,$0990,$0989,$0981,$097A,$0973,$096C,$0966
  403.     DC.W    $095F,$0958,$0951,$094A,$0943,$093D,$0936,$0930
  404.     DC.W    $0929,$0922,$091C,$0915,$090F,$0909,$0902,$08FC
  405.     DC.W    $08F6,$08EF,$08E9,$08E3,$08DD,$08D7,$08D1,$08CB
  406.     DC.W    $08C5,$08BF,$08B9,$08B3,$08AD,$08A7,$08A1,$089B
  407.     DC.W    $0895,$0890,$088A,$0884,$087F,$0879,$0873,$086E
  408.     DC.W    $0868,$0863,$085D,$0858,$0852,$084D,$0848,$0842
  409.     DC.W    $083D,$0838,$0832,$082D,$0828,$0823,$081E,$0819
  410.     DC.W    $0813,$080E,$0809,$0804,$07FF,$07FA,$07F5,$07F0
  411.     DC.W    $07EB,$07E7,$07E2,$07DD,$07D8,$07D3,$07CE,$07CA
  412.     DC.W    $07C5,$07C0,$07BC,$07B7,$07B2,$07AE,$07A9,$07A4
  413.     DC.W    $07A0,$079B,$0797,$0792,$078E,$0789,$0785,$0781
  414.     DC.W    $077C,$0778,$0774,$076F,$076B,$0767,$0762,$075E
  415.     DC.W    $075A,$0756,$0751,$074D,$0749,$0745,$0741,$073D
  416.     DC.W    $0739,$0735,$0731,$072C,$0728,$0724,$0720,$071D
  417.     DC.W    $0719,$0715,$0711,$070D,$0709,$0705,$0701,$06FD
  418.     DC.W    $06FA,$06F6,$06F2,$06EE,$06EB,$06E7,$06E3,$06DF
  419.     DC.W    $06DC,$06D8,$06D4,$06D1,$06CD,$06CA,$06C6,$06C2
  420.     DC.W    $06BF,$06BB,$06B8,$06B4,$06B1,$06AD,$06AA,$06A6
  421.     DC.W    $06A3,$069F,$069C,$0699,$0695,$0692,$068E,$068B
  422.     DC.W    $0688,$0684,$0681,$067E,$067A,$0677,$0674,$0671
  423.     DC.W    $066D,$066A,$0667,$0664,$0661,$065D,$065A,$0657
  424.     DC.W    $0654,$0651,$064E,$064B,$0648,$0645,$0641,$063E
  425.     DC.W    $063B,$0638,$0635,$0632,$062F,$062C,$0629,$0626
  426.     DC.W    $0623,$0620,$061E,$061B,$0618,$0615,$0612,$060F
  427.     DC.W    $060C,$0609,$0607,$0604,$0601,$05FE,$05FB,$05F8
  428.     DC.W    $05F6,$05F3,$05F0,$05ED,$05EB,$05E8,$05E5,$05E2
  429.     DC.W    $05E0,$05DD,$05DA,$05D8,$05D5,$05D2,$05D0,$05CD
  430.     DC.W    $05CA,$05C8,$05C5,$05C3,$05C0,$05BE,$05BB,$05B8
  431.     DC.W    $05B6,$05B3,$05B1,$05AE,$05AC,$05A9,$05A7,$05A4
  432.     DC.W    $05A2,$059F,$059D,$059A,$0598,$0595,$0593,$0591
  433.     DC.W    $058E,$058C,$0589,$0587,$0585,$0582,$0580,$057D
  434.     DC.W    $057B,$0579,$0576,$0574,$0572,$056F,$056D,$056B
  435.     DC.W    $0569,$0566,$0564,$0562,$055F,$055D,$055B,$0559
  436.     DC.W    $0556,$0554,$0552,$0550,$054E,$054B,$0549,$0547
  437.     DC.W    $0545,$0543,$0541,$053E,$053C,$053A,$0538,$0536
  438.     DC.W    $0534,$0532,$0530,$052D,$052B,$0529,$0527,$0525
  439.     DC.W    $0523,$0521,$051F,$051D,$051B,$0519,$0517,$0515
  440.     DC.W    $0513,$0511,$050F,$050D,$050B,$0509,$0507,$0505
  441.     DC.W    $0503,$0501,$04FF,$04FD,$04FB,$04F9,$04F7,$04F5
  442.     DC.W    $04F3,$04F1,$04F0,$04EE,$04EC,$04EA,$04E8,$04E6
  443.     DC.W    $04E4,$04E2,$04E0,$04DF,$04DD,$04DB,$04D9,$04D7
  444.     DC.W    $04D5,$04D4,$04D2,$04D0,$04CE,$04CC,$04CB,$04C9
  445.     DC.W    $04C7,$04C5,$04C3,$04C2,$04C0,$04BE,$04BC,$04BB
  446.     DC.W    $04B9,$04B7,$04B5,$04B4,$04B2,$04B0,$04AE,$04AD
  447.     DC.W    $04AB,$04A9,$04A8,$04A6,$04A4,$04A3,$04A1,$049F
  448.     DC.W    $049E,$049C,$049A,$0499,$0497,$0495,$0494,$0492
  449.     DC.W    $0490,$048F,$048D,$048C,$048A,$0488,$0487,$0485
  450.     DC.W    $0484,$0482,$0480,$047F,$047D,$047C,$047A,$0478
  451.     DC.W    $0477,$0475,$0474,$0472,$0471,$046F,$046E,$046C
  452.     DC.W    $046B,$0469,$0468,$0466,$0465,$0463,$0461,$0460
  453.     DC.W    $045E,$045D,$045C,$045A,$0459,$0457,$0456,$0454
  454.     DC.W    $0453,$0451,$0450,$044E,$044D,$044B,$044A,$0449
  455.     DC.W    $0447,$0446,$0444,$0443,$0441,$0440,$043F,$043D
  456.     DC.W    $043C,$043A,$0439,$0438,$0436,$0435,$0433,$0432
  457.     DC.W    $0431,$042F,$042E,$042D,$042B,$042A,$0429,$0427
  458.     DC.W    $0426,$0424,$0423,$0422,$0420,$041F,$041E,$041C
  459.     DC.W    $041B,$041A,$0419,$0417,$0416,$0415,$0413,$0412
  460.     DC.W    $0411,$040F,$040E,$040D,$040C,$040A,$0409,$0408
  461.     DC.W    $0406,$0405,$0404,$0403,$0401,$0400,$03FF,$03FE
  462.     DC.W    $03FC,$03FB,$03FA,$03F9,$03F7,$03F6,$03F5,$03F4
  463.     DC.W    $03F3,$03F1,$03F0,$03EF,$03EE,$03ED,$03EB,$03EA
  464.     DC.W    $03E9,$03E8,$03E7,$03E5,$03E4,$03E3,$03E2,$03E1
  465.     DC.W    $03DF,$03DE,$03DD,$03DC,$03DB,$03DA,$03D8,$03D7
  466.     DC.W    $03D6,$03D5,$03D4,$03D3,$03D2,$03D0,$03CF,$03CE
  467.     DC.W    $03CD,$03CC,$03CB,$03CA,$03C9,$03C7,$03C6,$03C5
  468.     DC.W    $03C4,$03C3,$03C2,$03C1,$03C0,$03BF,$03BD,$03BC
  469.     DC.W    $03BB,$03BA,$03B9,$03B8,$03B7,$03B6,$03B5,$03B4
  470.     DC.W    $03B3,$03B2,$03B1,$03AF,$03AE,$03AD,$03AC,$03AB
  471.     DC.W    $03AA,$03A9,$03A8,$03A7,$03A6,$03A5,$03A4,$03A3
  472.     DC.W    $03A2,$03A1,$03A0,$039F,$039E,$039D,$039C,$039B
  473.     DC.W    $039A,$0399,$0398,$0397,$0396,$0395,$0394,$0393
  474.     DC.W    $0392,$0391,$0390,$038F,$038E,$038D,$038C,$038B
  475.     DC.W    $038A,$0389,$0388,$0387,$0386,$0385,$0384,$0383
  476.     DC.W    $0382,$0381,$0380,$037F,$037E,$037D,$037C,$037B
  477.     DC.W    $037A,$0379,$0378,$0378,$0377,$0376,$0375,$0374
  478.     DC.W    $0373,$0372,$0371,$0370,$036F,$036E,$036D,$036C
  479.     DC.W    $036B,$036B,$036A,$0369,$0368,$0367,$0366,$0365
  480.     DC.W    $0364,$0363,$0362,$0362,$0361,$0360,$035F,$035E
  481.     DC.W    $035D,$035C,$035B,$035A,$035A,$0359,$0358,$0357
  482.     DC.W    $0356,$0355,$0354,$0353,$0353,$0352,$0351,$0350
  483.     DC.W    $034F,$034E,$034D,$034D,$034C,$034B,$034A,$0349
  484.     DC.W    $0348,$0347,$0347,$0346,$0345,$0344,$0343,$0342
  485.     DC.W    $0342,$0341,$0340,$033F,$033E,$033E,$033D,$033C
  486.     DC.W    $033B,$033A,$0339,$0339,$0338,$0337,$0336,$0335
  487.     DC.W    $0335,$0334,$0333,$0332,$0331,$0331,$0330,$032F
  488.     DC.W    $032E,$032D,$032D,$032C,$032B,$032A,$0329,$0329
  489.     DC.W    $0328,$0327,$0326,$0326,$0325,$0324,$0323,$0323
  490.     DC.W    $0322,$0321,$0320,$031F,$031F,$031E,$031D,$031C
  491.     DC.W    $031C,$031B,$031A,$0319,$0319,$0318,$0317,$0316
  492.     DC.W    $0316,$0315,$0314,$0313,$0313,$0312,$0311,$0310
  493.     DC.W    $0310,$030F,$030E,$030E,$030D,$030C,$030B,$030B
  494.     DC.W    $030A,$0309,$0308,$0308,$0307,$0306,$0306,$0305
  495.     DC.W    $0304,$0303,$0303,$0302,$0301,$0301,$0300,$02FF
  496.     DC.W    $02FF,$02FE,$02FD,$02FC,$02FC,$02FB,$02FA,$02FA
  497.     DC.W    $02F9,$02F8,$02F8,$02F7,$02F6,$02F6,$02F5,$02F4
  498.     DC.W    $02F3,$02F3,$02F2,$02F1,$02F1,$02F0,$02EF,$02EF
  499.     DC.W    $02EE,$02ED,$02ED,$02EC,$02EB,$02EB,$02EA,$02E9
  500.     DC.W    $02E9,$02E8,$02E7,$02E7,$02E6,$02E5,$02E5,$02E4
  501.     DC.W    $02E3,$02E3,$02E2,$02E2,$02E1,$02E0,$02E0,$02DF
  502.     DC.W    $02DE,$02DE,$02DD,$02DC,$02DC,$02DB,$02DA,$02DA
  503.     DC.W    $02D9,$02D9,$02D8,$02D7,$02D7,$02D6,$02D5,$02D5
  504.     DC.W    $02D4,$02D3,$02D3,$02D2,$02D2,$02D1,$02D0,$02D0
  505.     DC.W    $02CF,$02CF,$02CE,$02CD,$02CD,$02CC,$02CB,$02CB
  506.     DC.W    $02CA,$02CA,$02C9,$02C8,$02C8,$02C7,$02C7,$02C6
  507.     DC.W    $02C5,$02C5,$02C4,$02C4,$02C3,$02C2,$02C2,$02C1
  508.     DC.W    $02C1,$02C0,$02BF,$02BF,$02BE,$02BE,$02BD,$02BD
  509.     DC.W    $02BC,$02BB,$02BB,$02BA,$02BA,$02B9,$02B8,$02B8
  510.     DC.W    $02B7,$02B7,$02B6,$02B6,$02B5,$02B4,$02B4,$02B3
  511.     DC.W    $02B3,$02B2,$02B2,$02B1,$02B0,$02B0,$02AF,$02AF
  512.     DC.W    $02AE,$02AE,$02AD,$02AC,$02AC,$02AB,$02AB,$02AA
  513.     DC.W    $02AA,$02A9,$02A9,$02A8,$02A7,$02A7,$02A6,$02A6
  514.     DC.W    $02A5,$02A5,$02A4,$02A4,$02A3,$02A3,$02A2,$02A1
  515.     DC.W    $02A1,$02A0,$02A0,$029F,$029F,$029E,$029E,$029D
  516.     DC.W    $029D,$029C,$029C,$029B,$029B,$029A,$0299,$0299
  517.     DC.W    $0298,$0298,$0297,$0297,$0296,$0296,$0295,$0295
  518.     DC.W    $0294,$0294,$0293,$0293,$0292,$0292,$0291,$0291
  519.     DC.W    $0290,$0290,$028F,$028F,$028E,$028E,$028D,$028C
  520.     DC.W    $028C,$028B,$028B,$028A,$028A,$0289,$0289,$0288
  521.     DC.W    $0288,$0287,$0287,$0286,$0286,$0285,$0285,$0284
  522.     DC.W    $0284,$0283,$0283,$0282,$0282,$0281,$0281,$0281
  523.     DC.W    $0280,$0280,$027F,$027F,$027E,$027E,$027D,$027D
  524.     DC.W    $027C,$027C,$027B,$027B,$027A,$027A,$0279,$0279
  525.     DC.W    $0278,$0278,$0277,$0277,$0276,$0276,$0275,$0275
  526.     DC.W    $0274,$0274,$0274,$0273,$0273,$0272,$0272,$0271
  527.     DC.W    $0271,$0270,$0270,$026F,$026F,$026E,$026E,$026D
  528.     DC.W    $026D,$026D,$026C,$026C,$026B,$026B,$026A,$026A
  529.     DC.W    $0269,$0269,$0268,$0268,$0268,$0267,$0267,$0266
  530.     DC.W    $0266,$0265,$0265,$0264,$0264,$0264,$0263,$0263
  531.     DC.W    $0262,$0262,$0261,$0261,$0260,$0260,$0260,$025F
  532.     DC.W    $025F,$025E,$025E,$025D,$025D,$025C,$025C,$025C
  533.     DC.W    $025B,$025B,$025A,$025A,$0259,$0259,$0259,$0258
  534.     DC.W    $0258,$0257,$0257,$0256,$0256,$0256,$0255,$0255
  535.     DC.W    $0254,$0254,$0253,$0253,$0253,$0252,$0252,$0251
  536.     DC.W    $0251,$0250,$0250,$0250,$024F,$024F,$024E,$024E
  537.     DC.W    $024E,$024D,$024D,$024C,$024C,$024B,$024B,$024B
  538.     DC.W    $024A,$024A,$0249,$0249,$0249,$0248,$0248,$0247
  539.     DC.W    $0247,$0247,$0246,$0246,$0245,$0245,$0245,$0244
  540.     DC.W    $0244,$0243,$0243,$0243,$0242,$0242,$0241,$0241
  541.     DC.W    $0241,$0240,$0240,$023F,$023F,$023F,$023E,$023E
  542.     DC.W    $023D,$023D,$023D,$023C,$023C,$023B,$023B,$023B
  543.     DC.W    $023A,$023A,$023A,$0239,$0239,$0238,$0238,$0238
  544.     DC.W    $0237,$0237,$0236,$0236,$0236,$0235,$0235,$0235
  545.     DC.W    $0234,$0234,$0233,$0233,$0233,$0232,$0232,$0231
  546.     DC.W    $0231,$0231,$0230,$0230,$0230,$022F,$022F,$022E
  547.     DC.W    $022E,$022E,$022D,$022D,$022D,$022C,$022C,$022C
  548.     DC.W    $022B,$022B,$022A,$022A,$022A,$0229,$0229,$0229
  549.     DC.W    $0228,$0228,$0228,$0227,$0227,$0226,$0226,$0226
  550.     DC.W    $0225,$0225,$0225,$0224,$0224,$0224,$0223,$0223
  551.     DC.W    $0222,$0222,$0222,$0221,$0221,$0221,$0220,$0220
  552.     DC.W    $0220,$021F,$021F,$021F,$021E,$021E,$021E,$021D
  553.     DC.W    $021D,$021C,$021C,$021C,$021B,$021B,$021B,$021A
  554.     DC.W    $021A,$021A,$0219,$0219,$0219,$0218,$0218,$0218
  555.     DC.W    $0217,$0217,$0217,$0216,$0216,$0216,$0215,$0215
  556.     DC.W    $0215,$0214,$0214,$0214,$0213,$0213,$0213,$0212
  557.     DC.W    $0212,$0212,$0211,$0211,$0211,$0210,$0210,$0210
  558.     DC.W    $020F,$020F,$020F,$020E,$020E,$020E,$020D,$020D
  559.     DC.W    $020D,$020C,$020C,$020C,$020B,$020B,$020B,$020A
  560.     DC.W    $020A,$020A,$0209,$0209,$0209,$0208,$0208,$0208
  561.     DC.W    $0207,$0207,$0207,$0206,$0206,$0206,$0205,$0205
  562.     DC.W    $0205,$0204,$0204,$0204,$0204,$0203,$0203,$0203
  563.     DC.W    $0202,$0202,$0202,$0201,$0201,$0201,$0200,$0200
  564.     DC.W    $0200,$01FF,$01FF,$01FF,$01FE,$01FE,$01FE,$01FE
  565.     DC.W    $01FD,$01FD,$01FD,$01FC,$01FC,$01FC,$01FB,$01FB
  566.     DC.W    $01FB,$01FA,$01FA,$01FA,$01FA,$01F9,$01F9,$01F9
  567.     DC.W    $01F8,$01F8,$01F8,$01F7,$01F7,$01F7,$01F7,$01F6
  568.     DC.W    $01F6,$01F6,$01F5,$01F5,$01F5,$01F4,$01F4,$01F4
  569.     DC.W    $01F4,$01F3,$01F3,$01F3,$01F2,$01F2,$01F2,$01F1
  570.     DC.W    $01F1,$01F1,$01F1,$01F0,$01F0,$01F0,$01EF,$01EF
  571.     DC.W    $01EF,$01EF,$01EE,$01EE,$01EE,$01ED,$01ED,$01ED
  572.     DC.W    $01EC,$01EC,$01EC,$01EC,$01EB,$01EB,$01EB,$01EA
  573.     DC.W    $01EA,$01EA,$01EA,$01E9,$01E9,$01E9,$01E8,$01E8
  574.     DC.W    $01E8,$01E8,$01E7,$01E7,$01E7,$01E6,$01E6,$01E6
  575.     DC.W    $01E6,$01E5,$01E5,$01E5,$01E4,$01E4,$01E4,$01E4
  576.     DC.W    $01E3,$01E3,$01E3,$01E3,$01E2,$01E2,$01E2,$01E1
  577.     DC.W    $01E1,$01E1,$01E1,$01E0,$01E0,$01E0,$01DF,$01DF
  578.     DC.W    $01DF,$01DF,$01DE,$01DE,$01DE,$01DE,$01DD,$01DD
  579.     DC.W    $01DD,$01DC,$01DC,$01DC,$01DC,$01DB,$01DB,$01DB
  580.     DC.W    $01DB,$01DA,$01DA,$01DA,$01DA,$01D9,$01D9,$01D9
  581.     DC.W    $01D8,$01D8,$01D8,$01D8,$01D7,$01D7,$01D7,$01D7
  582.     DC.W    $01D6,$01D6,$01D6,$01D6,$01D5,$01D5,$01D5,$01D4
  583.     DC.W    $01D4,$01D4,$01D4,$01D3,$01D3,$01D3,$01D3,$01D2
  584.     DC.W    $01D2,$01D2,$01D2,$01D1,$01D1,$01D1,$01D1,$01D0
  585.     DC.W    $01D0,$01D0,$01D0,$01CF,$01CF,$01CF,$01CF,$01CE
  586.     DC.W    $01CE,$01CE,$01CE,$01CD,$01CD,$01CD,$01CD,$01CC
  587.     DC.W    $01CC,$01CC,$01CB,$01CB,$01CB,$01CB,$01CA,$01CA
  588.     DC.W    $01CA,$01CA,$01C9,$01C9,$01C9,$01C9,$01C8,$01C8
  589.     DC.W    $01C8,$01C8,$01C7,$01C7,$01C7,$01C7,$01C6,$01C6
  590.     DC.W    $01C6,$01C6,$01C6,$01C5,$01C5,$01C5,$01C5,$01C4
  591.     DC.W    $01C4,$01C4,$01C4,$01C3,$01C3,$01C3,$01C3,$01C2
  592.     DC.W    $01C2,$01C2,$01C2,$01C1,$01C1,$01C1,$01C1,$01C0
  593.     DC.W    $01C0,$01C0,$01C0,$01BF,$01BF,$01BF,$01BF,$01BE
  594.     DC.W    $01BE,$01BE,$01BE,$01BE,$01BD,$01BD,$01BD,$01BD
  595.     DC.W    $01BC,$01BC,$01BC,$01BC,$01BB,$01BB,$01BB,$01BB
  596.     DC.W    $01BA,$01BA,$01BA,$01BA,$01BA,$01B9,$01B9,$01B9
  597.     DC.W    $01B9,$01B8,$01B8,$01B8,$01B8,$01B7,$01B7,$01B7
  598.     DC.W    $01B7,$01B7,$01B6,$01B6,$01B6,$01B6,$01B5,$01B5
  599.     DC.W    $01B5,$01B5,$01B4,$01B4,$01B4,$01B4,$01B4,$01B3
  600.     DC.W    $01B3,$01B3,$01B3,$01B2,$01B2,$01B2,$01B2,$01B2
  601.     DC.W    $01B1,$01B1,$01B1,$01B1,$01B0,$01B0,$01B0,$01B0
  602.     DC.W    $01B0,$01AF,$01AF,$01AF,$01AF,$01AE,$01AE,$01AE
  603.     DC.W    $01AE,$01AE,$01AD,$01AD,$01AD,$01AD,$01AC,$01AC
  604.     DC.W    $01AC,$01AC,$01AC,$01AB,$01AB,$01AB,$01AB,$01AA
  605.     DC.W    $01AA,$01AA,$01AA,$01AA,$01A9,$01A9,$01A9,$01A9
  606.     DC.W    $01A9,$01A8,$01A8,$01A8,$01A8,$01A7,$01A7,$01A7
  607.     DC.W    $01A7,$01A7,$01A6,$01A6,$01A6,$01A6,$01A6,$01A5
  608.     DC.W    $01A5,$01A5,$01A5,$01A4,$01A4,$01A4,$01A4,$01A4
  609.     DC.W    $01A3,$01A3,$01A3,$01A3,$01A3,$01A2,$01A2,$01A2
  610.     DC.W    $01A2,$01A2,$01A1,$01A1,$01A1,$01A1,$01A1,$01A0
  611.     DC.W    $01A0,$01A0,$01A0,$019F,$019F,$019F,$019F,$019F
  612.     DC.W    $019E,$019E,$019E,$019E,$019E,$019D,$019D,$019D
  613.     DC.W    $019D,$019D,$019C,$019C,$019C,$019C,$019C,$019B
  614.     DC.W    $019B,$019B,$019B,$019B,$019A,$019A,$019A,$019A
  615.     DC.W    $019A,$0199,$0199,$0199,$0199,$0199,$0198,$0198
  616.     DC.W    $0198,$0198,$0198,$0197,$0197,$0197,$0197,$0197
  617.     DC.W    $0197,$0197,$0197,$0197,$0197,$0197,$0197,$0197
  618.     DC.W    $0197,$0197,$0197,$0197,$0196,$0196,$0196,$0196
  619.     DC.W    $0196,$0196,$0196,$0196,$0196,$0196,$0196,$0196
  620.     DC.W    $0196,$0196,$0196,$0196,$0196,$0196,$0196,$0196
  621.     DC.W    $0196,$0196,$0196,$0196,$0196,$0196,$0196,$0196
  622.  
  623. Sinus:    dc.w    16384,16382,16374,16362,16344,16322,16294,16262
  624.     dc.w    16225,16182,16135,16083,16026,15964,15897,15826
  625.     dc.w    15749,15668,15582,15491,15396,15296,15191,15082
  626.     dc.w    14967,14849,14726,14598,14466,14330,14189,14044
  627.     dc.w    13894,13741,13583,13421,13255,13085,12911,12733
  628.     dc.w    12551,12365,12176,11982,11786,11585,11381,11174
  629.     dc.w    10963,10749,10531,10311,10087,9860,9630,9397
  630.     dc.w    9162,8923,8682,8438,8192,7943,7692,7438
  631.     dc.w    7182,6924,6664,6401,6137,5871,5603,5334
  632.     dc.w    5063,4790,4516,4240,3963,3685,3406,3126
  633.     dc.w    2845,2563,2280,1996,1712,1427,1142,857
  634.     dc.w    571,285,0,-285,-571,-857,-1142,-1428
  635.     dc.w    -1712,-1996,-2280,-2563,-2845,-3126,-3406,-3685
  636.     dc.w    -3963,-4240,-4516,-4790,-5063,-5334,-5603,-5871
  637.     dc.w    -6137,-6401,-6664,-6924,-7182,-7438,-7692,-7943
  638.     dc.w    -8192,-8438,-8682,-8923,-9162,-9397,-9630,-9860
  639.     dc.w    -10087,-10311,-10531,-10749,-10963,-11174,-11381,-11585
  640.     dc.w    -11786,-11982,-12176,-12365,-12551,-12733,-12911,-13085
  641.     dc.w    -13255,-13421,-13583,-13741,-13894,-14044,-14189,-14330
  642.     dc.w    -14466,-14598,-14726,-14849,-14967,-15082,-15191,-15296
  643.     dc.w    -15396,-15491,-15582,-15668,-15749,-15826,-15897,-15964
  644.     dc.w    -16026,-16083,-16135,-16182,-16225,-16262,-16294,-16322
  645.     dc.w    -16344,-16362,-16374,-16382,-16384,-16382,-16374,-16362
  646.     dc.w    -16344,-16322,-16294,-16262,-16225,-16182,-16135,-16083
  647.     dc.w    -16026,-15964,-15897,-15826,-15749,-15668,-15582,-15491
  648.     dc.w    -15396,-15296,-15191,-15082,-14968,-14849,-14726,-14598
  649.     dc.w    -14466,-14330,-14189,-14044,-13894,-13741,-13583,-13421
  650.     dc.w    -13255,-13085,-12911,-12733,-12551,-12365,-12176,-11982
  651.     dc.w    -11786,-11585,-11381,-11174,-10963,-10749,-10531,-10311
  652.     dc.w    -10087,-9860,-9630,-9397,-9162,-8923,-8682,-8438
  653.     dc.w    -8192,-7943,-7692,-7438,-7182,-6924,-6664,-6402
  654.     dc.w    -6137,-5871,-5604,-5334,-5063,-4790,-4516,-4240
  655.     dc.w    -3963,-3685,-3406,-3126,-2845,-2563,-2280,-1996
  656.     dc.w    -1712,-1428,-1143,-857,-572,-286,0,285
  657.     dc.w    571,857,1142,1427,1712,1996,2280,2562
  658.     dc.w    2844,3126,3406,3685,3963,4240,4515,4790
  659.     dc.w    5062,5334,5603,5871,6137,6401,6663,6924
  660.     dc.w    7182,7438,7691,7943,8192,8438,8682,8923
  661.     dc.w    9161,9397,9630,9860,10087,10310,10531,10748
  662.     dc.w    10963,11173,11381,11585,11785,11982,12175,12365
  663.     dc.w    12551,12732,12910,13085,13255,13421,13583,13740
  664.     dc.w    13894,14044,14189,14330,14466,14598,14726,14849
  665.     dc.w    14967,15081,15191,15296,15396,15491,15582,15668
  666.     dc.w    15749,15826,15897,15964,16026,16083,16135,16182
  667.     dc.w    16224,16262,16294,16322,16344,16361,16374,16382
  668.  
  669.     dc.w    16384,16382,16374,16362,16344,16322,16294,16262
  670.     dc.w    16225,16182,16135,16083,16026,15964,15897,15826
  671.     dc.w    15749,15668,15582,15491,15396,15296,15191,15082
  672.     dc.w    14967,14849,14726,14598,14466,14330,14189,14044
  673.     dc.w    13894,13741,13583,13421,13255,13085,12911,12733
  674.     dc.w    12551,12365,12176,11982,11786,11585,11381,11174
  675.     dc.w    10963,10749,10531,10311,10087,9860,9630,9397
  676.     dc.w    9162,8923,8682,8438,8192,7943,7692,7438
  677.     dc.w    7182,6924,6664,6401,6137,5871,5603,5334
  678.     dc.w    5063,4790,4516,4240,3963,3685,3406,3126
  679.     dc.w    2845,2563,2280,1996,1712,1427,1142,857
  680.     dc.w    571,285,0,-285,-571,-857,-1142,-1428
  681.     dc.w    -1712,-1996,-2280,-2563,-2845,-3126,-3406,-3685
  682.     dc.w    -3963,-4240,-4516,-4790,-5063,-5334,-5603,-5871
  683.     dc.w    -6137,-6401,-6664,-6924,-7182,-7438,-7692,-7943
  684.     dc.w    -8192,-8438,-8682,-8923,-9162,-9397,-9630,-9860
  685.     dc.w    -10087,-10311,-10531,-10749,-10963,-11174,-11381,-11585
  686.     dc.w    -11786,-11982,-12176,-12365,-12551,-12733,-12911,-13085
  687.     dc.w    -13255,-13421,-13583,-13741,-13894,-14044,-14189,-14330
  688.     dc.w    -14466,-14598,-14726,-14849,-14967,-15082,-15191,-15296
  689.     dc.w    -15396,-15491,-15582,-15668,-15749,-15826,-15897,-15964
  690.     dc.w    -16026,-16083,-16135,-16182,-16225,-16262,-16294,-16322
  691.     dc.w    -16344,-16362,-16374,-16382,-16384,-16382,-16374,-16362
  692.     dc.w    -16344,-16322,-16294,-16262,-16225,-16182,-16135,-16083
  693.     dc.w    -16026,-15964,-15897,-15826,-15749,-15668,-15582,-15491
  694.     dc.w    -15396,-15296,-15191,-15082,-14968,-14849,-14726,-14598
  695.     dc.w    -14466,-14330,-14189,-14044,-13894,-13741,-13583,-13421
  696.     dc.w    -13255,-13085,-12911,-12733,-12551,-12365,-12176,-11982
  697.     dc.w    -11786,-11585,-11381,-11174,-10963,-10749,-10531,-10311
  698.     dc.w    -10087,-9860,-9630,-9397,-9162,-8923,-8682,-8438
  699.     dc.w    -8192,-7943,-7692,-7438,-7182,-6924,-6664,-6402
  700.     dc.w    -6137,-5871,-5604,-5334,-5063,-4790,-4516,-4240
  701.     dc.w    -3963,-3685,-3406,-3126,-2845,-2563,-2280,-1996
  702.     dc.w    -1712,-1428,-1143,-857,-572,-286,0,285
  703.     dc.w    571,857,1142,1427,1712,1996,2280,2562
  704.     dc.w    2844,3126,3406,3685,3963,4240,4515,4790
  705.     dc.w    5062,5334,5603,5871,6137,6401,6663,6924
  706.     dc.w    7182,7438,7691,7943,8192,8438,8682,8923
  707.     dc.w    9161,9397,9630,9860,10087,10310,10531,10748
  708.     dc.w    10963,11173,11381,11585,11785,11982,12175,12365
  709.     dc.w    12551,12732,12910,13085,13255,13421,13583,13740
  710.     dc.w    13894,14044,14189,14330,14466,14598,14726,14849
  711.     dc.w    14967,15081,15191,15296,15396,15491,15582,15668
  712.     dc.w    15749,15826,15897,15964,16026,16083,16135,16182
  713.     dc.w    16224,16262,16294,16322,16344,16361,16374,16382
  714.  
  715.  
  716.  
  717.