glokyfull

a cool fx of tile dots / devpac no file required

Apr 3rd, 2022
454
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. ;   circles of dots
  3. ;   code by gloky / mjj prod
  4. ;  
  5. ;
  6. ; nouvelle version
  7.  
  8.     TEXT
  9. standalone EQU 1        ; cette ligne en rem: source utilis‚ dans un merge de plusieur effet
  10.                 ; cette ligne activ‚: le source fonctionne en standalone
  11. tmach   equ 0
  12. tmachfin equ 0
  13.  
  14. DELAYVECTOR equ 1
  15. TYPEDELAYVECTOR equ 4       ; pour 4 plan de delay vector 0..3 n'est pas utilisé pour l'instant
  16.         ; equ 3     ; pour 3 plan 0..2
  17.         ; 2     pour 2 plan 0..1
  18.         ; 1     inutilis‚
  19. ;NBSCREEN   equ 2
  20.  
  21.    
  22. NBDOTPERCIRCLE  equ 32
  23. NB_POSDOTPERCIRCLE  equ 32*16
  24. NBCIRCLES   equ 70 54 52    38
  25. RAYON_START equ 4
  26. RAYON_STEP  equ 8       ; pas utilisé
  27. RAYONMIN    equ RAYON_START
  28. ANGLEWRAP   equ 16          ; combien de version du cercle pour angle
  29.    
  30.  
  31. nbscreen    equ 3
  32.  
  33.  
  34.     ;include 'moNd192.inc'
  35. ;
  36. ;   move.w #-192*9+$12,d0
  37. ;
  38. ;
  39. ;   nop
  40. ;;; modulo 192
  41. ;; d0 = entre
  42. ;   move.w #192,d2
  43. ;   tst.w d0
  44. ;   bmi.s .negatif
  45. ;.positif
  46. ;   cmp d2,d0
  47. ;   blt.s .ok
  48. ;   sub d2,d0
  49. ;   bra.s .positif
  50. ;.negatif
  51. ;   add.w d2,d0
  52. ;   bmi.s .negatif
  53. ;.ok
  54.    
  55. ;   illegal
  56. totopc
  57. mod192 macro \1,\2
  58.     move.w \2,-(sp)
  59.     move.w #192,\2
  60.     tst.w \1
  61.     dc.w $6b08
  62.     cmp \2,\1
  63.     dc.w $6d08
  64.     sub \2,\1
  65.     dc.w $60F8
  66.     add \2,\1
  67.     dc.w $6bfc
  68.     move.w (sp)+,\2
  69.     endm
  70. modnosp macro \1,\2
  71.     ;move.w \2,-(sp)
  72.     ;move.w #192,\2
  73.     tst.w \1
  74.     dc.w $6b08
  75.     cmp \2,\1
  76.     dc.w $6d08
  77.     sub \2,\1
  78.     dc.w $60F8
  79.     add \2,\1
  80.     dc.w $6bfc
  81.     ;move.w (sp)+,\2
  82.     endm
  83. mod96 macro \1,\2
  84.     move.w \2,-(sp)
  85.     move.w #96,\2
  86.     tst.w \1   
  87.     dc.w $6b08
  88.     cmp \2,\1
  89.     dc.w $6d08
  90.     sub \2,\1
  91.     dc.w $60F8
  92.     add \2,\1
  93.     dc.w $6bfc
  94.     move.w (sp)+,\2
  95.     endm
  96. mod96nosp macro \1,\2
  97.     ;move.w \2,-(sp)
  98.     move.w #96,\2
  99.     tst.w \1
  100.     dc.w $6b08
  101.     cmp \2,\1
  102.     dc.w $6d08
  103.     sub \2,\1
  104.     dc.w $60F8
  105.     add \2,\1
  106.     dc.w $6bfc
  107.     ;move.w (sp)+,\2
  108.     endm
  109.  
  110.  
  111. ;   mod192 d0,d3
  112.  
  113. CERC6_depart
  114.  
  115.     ifne STANDALONE
  116.     clr.l -(sp)
  117.     move.w #$20,-(sp)
  118.     trap #1
  119.     addq.l #6,sp
  120.     ENDC
  121.    
  122.     lea cossin4096amp16bit,a0
  123.     lea sinsin4096amp16bit,a2
  124.     lea cosinusSpot,a1
  125.     lea sinusSpot,a3
  126.     move.w #4096-1,d1
  127. .createsin
  128.     moveq #0,d0
  129.     move.w (a0)+,d0
  130.     mulu #399,d0
  131.     swap d0
  132.     move.w d0,(a1)+
  133.     moveq #0,d2
  134.     move.w (a2)+,d2
  135.     mulu #399,d2
  136.     swap d2
  137.     move.w d2,(a3)+
  138.     dbf d1,.createsin
  139.    
  140.    
  141.    
  142.     jsr makecodemodifpalette
  143.     jsr inittiles
  144.     lea ptrscr,a0
  145.     move.l #screen+256,d0
  146.     clr.b d0
  147.     move.l d0,(a0)+
  148.     add.l #32000,d0
  149.     move.l d0,(a0)+
  150.     add.l #32000,d0
  151.     move.l d0,(a0)+
  152.     add.l #32000,d0
  153.     move.l d0,(a0)+
  154.     add.l #32000,d0
  155.     move.l d0,(a0)+
  156.     add.l #32000,d0
  157.     move.l d0,(a0)+
  158.     jsr wvbl
  159.     move.b #0,$ffff8260.w
  160.     MOVE.L ptrscr,a0
  161.     moveq.l #0,d0
  162.     move.w #7999,d1
  163. cls
  164.     move.l d0,(a0)+
  165.     move.l d0,(a0)+
  166.     move.l d0,(a0)+
  167.     move.l d0,(a0)+
  168.     dbf d1,cls 
  169.  
  170.     jsr initsomething
  171.    
  172.  
  173.     movem.l $ffff8240.w,d0-d7
  174.     movem.l d0-d7,oldpalette
  175.     ifne standalone
  176.     move.w #$002,$ffff8240.w
  177.     move.w #$771,$ffff8242.w
  178.     endc   
  179.  
  180.  
  181.     move.w #100,d0
  182. .clearpos:
  183.     move.w d0,-(sp)
  184.     jsr calcSpot
  185.     move.w (sp)+,d0
  186.     dbf d0,.clearpos
  187.  
  188.     ifeq STANDALONE
  189.     rts
  190.     endc
  191.  
  192. CIRCLE_main
  193.     ifeq standalone
  194.     move.w #$135,$ffff8240.w
  195.     move.w #$777,$ffff8242.w
  196.     endc
  197.    
  198.     move.l ptrscr,d0
  199.     lsr.w #8,d0
  200.     move.l d0,$ffff8200.w
  201.  
  202.     move.l ptrscr,d0
  203.     move.l ptrscr+4,d1
  204.     move.l ptrscr+8,d2
  205.     ;move.l ptrscr+12,d3
  206.     ;move.l ptrscr+16,d4
  207.     ;move.l ptrscr+20,d5   
  208.  
  209.     move.l d1,ptrscr
  210.     move.l d2,ptrscr+4
  211.     move.l d0,ptrscr+8
  212.     ;move.l d4,ptrscr+12
  213.     ;move.l d5,ptrscr+16
  214.     ;move.l d0,ptrscr+20
  215.  
  216.     *not $ffff8240.w
  217.     ;not $ffff8240.w
  218.     ifne STANDALONE
  219.     jsr wvbl
  220.     endc
  221.  
  222.  
  223.     ifne DELAYVECTOR
  224.     jsr geredelayvector
  225.     endc
  226.     jsr majscroll
  227.  
  228.     cmp.b #$b9,$fffffc02.w
  229.     beq.w .fin
  230.    
  231.     jsr calcwave
  232.     ;move.w #0,$ffff8240.w
  233.     move.l ptrscr,a4
  234.     ;addq #6,a4
  235.     ifne DELAYVECTOR
  236.     move.w selplan0,d0
  237.     ;lsr #1,d0
  238.     ;and.b #$FE,d0
  239.     ext.l d0
  240.     add.l d0,a4
  241.     endc
  242.  
  243.     *not.b $ffff8240.w
  244.     jsr displaytiles
  245.     *not.b $ffff8240.w
  246.  
  247.     jsr cleartiles 
  248.  
  249.     ;move.w #$134,$ffff8240.w
  250.  
  251.     *not.w $ffff8240.w
  252.    
  253.     *not $ffff8240.w
  254.     IFNE STANDALONE
  255.     bra CIRCLE_main
  256.     ENDC
  257. .fin
  258.     ifeq STANDALONE
  259.     rts
  260.     endc
  261.     movem.l oldpalette,d0-d7
  262.     movem.l d0-d7,$ffff8240.w  
  263.     move.l $44e.w,d0
  264.     lsr.w #8,d0
  265.     move.l d0,$ffff8200.w
  266.  
  267.     move.w #$777,$ffff8240.w
  268.     move.b #1,$ffff8260.w
  269.  
  270.     clr.w -(sp)
  271.     trap #1
  272.    
  273.  
  274. wvbl:  
  275.         ifne tmachfin
  276.         not.w $ffff8240.w
  277.         not.w $ffff8240.w
  278.         endc
  279.  
  280.  
  281.         move.l $466.w,d0
  282. .loop   cmp.l $466.w,d0
  283.         beq.s .loop
  284.  
  285.    
  286.  
  287.         rts
  288.        
  289.        
  290.  
  291. init_generatedCode
  292.  
  293.     lea convX,a0
  294.     moveq #0,d0
  295.     move.w #19,d1
  296.     moveq #0,d2
  297. .0
  298.     move.w d0,(a0)+
  299.     addq #2,d0
  300.     move.w d2,(a0)+     ; offset
  301.     cmp.w #32,d0
  302.     bne.s .0
  303.     addq #2,d2      ; 2 au lieu de 8 offset +16 pixel
  304.     cmp.w #6*2,d2
  305.     blt .t
  306.     sub.w #6*2,d2
  307. .t
  308.     ;and.w #7*2,d2      ;***
  309.     moveq #0,d0
  310.     dbf d1,.0
  311.  
  312.  
  313.     lea lstptrcode,a3
  314.     lea bsscode,a1
  315.     lea convX,a2
  316.     lea lstorcount,a4
  317.     lea lstor0,a5
  318.        
  319.     moveq #NBCIRCLES-1,d7
  320. .looptaille:
  321.    
  322.     move.w d7,d6
  323.    
  324.    
  325.     add #RAYON_START,d6     ; =1,
  326.     add d6,d6           ; d6=64*2 au depart
  327.    
  328.     ;ADD D6,D6
  329.     add d7,D6
  330.     ;ADD D7,D6
  331.     ;:add d7,d6
  332.  
  333.     move.w #ANGLEWRAP-1,d5      ; 8-1
  334.     lea circletable,a0
  335.    
  336. .loopAngle:
  337.     ifeq STANDALONE
  338.     jsr test_exit_demo
  339.     endc
  340.     move.w d5,-(sp)
  341.    
  342.     ;move.l a1,(a3)+
  343.  
  344.  
  345.     moveq #0,d0
  346.     lea lstorcount,a4
  347.     rept 8
  348.     move.l d0,(a4)+
  349.     endr        ; effacer les 16 compteurs
  350.     lea lstorcount,a4
  351.     lea lstor0,a5
  352.    
  353.     move.w #96,d2
  354.     move.w #NBDOTPERCIRCLE-1,d5     ; 32-1 calcul d'un cercle de 32 dot
  355. .loopCircle
  356.     ifeq STANDALONE
  357.     jsr test_exit_demo
  358.     endc
  359.     move.w (a0)+,d0     ; x
  360.     move.w (a0)+,d1     ; y
  361.     ext.l d0
  362.     ext.l d1
  363.    
  364.     muls d6,d0
  365.     muls d6,d1
  366.     swap d0
  367.     swap d1
  368.     add.w #160,d0       ; + centre
  369.     add.w #100,d1
  370.     lsr #1,d6
  371.     add d6,d0
  372.     add d6,d1
  373.     add d6,d6
  374.  
  375.     ;add d0,d0
  376.     ;move.l a4,-(sp)
  377.     ;lea modulo96,a4
  378.     ;move.w (a4,d0),d0
  379.     ;add d0,d0
  380.     ;lsr #1,d0
  381.    
  382.  
  383.     modnosp d0,d2
  384.     modnosp d1,d2
  385. ;   add d1,d1
  386. ;   move.w (a4,d1),d1
  387.     ;add d1,d1
  388. ;   move.l (sp)+,a4
  389.    
  390.    
  391. ;   and.w #127,d0      nombre periodique sur le tile
  392. ;   and.w #127,d1
  393.     ;add.w #96,d0
  394.     ;add.w #96,d1
  395.  
  396.     ;move.w d6,d3      
  397.     ;lsr #2,d3
  398.     ;add d3,d0
  399.  
  400.     ; now a partir de d2 et d3 on creer un or.b dn,dep(a0)
  401.     ; a2 = convX 1 pixel (pas de subpixel)
  402.     ; d0 = x
  403.     move.w d0,d3
  404.     add d3,d3
  405.     add d3,d3
  406.     move.w (a2,d3),-(sp)        ; numero de bit*2
  407.     move.w 2(a2,d3),d4  ; offset x
  408.  
  409.     ; calcul de l'offset adequat: int(d2/16)*2+d3* 256 oixel/16
  410.    
  411.     ; mulu #160,d1
  412.     ;lsl #5,d1  *32 octect =256 pix (16 pix *16  word=32 octet
  413.     mulu #24,d1     ; *24 octet = 96 pix ? 
  414.    
  415.     ;move.w d1,d3
  416.     ; * 128 + *32
  417.     ;lsl #2,d3  *128;
  418.     ;add d3,d3
  419.     ;add d3,d3
  420.     ;add d3,d1  *160
  421.    
  422.     add d1,d4       ; d4 = offsetx+y
  423.  
  424. ;   move.l d4,(a1)+
  425.    
  426.     ;a4 = lstorcount
  427.     ;a5 = lstor0
  428.  
  429.     move.w (sp)+,d1         ; numero de bit*2
  430.  
  431.     move.w (a4,d1),d3       ; count lstX    (*2)
  432.     move.w d1,d0
  433.     lsl #5,d0
  434.     lea (a5,d0),a6      ; a6=lstX
  435.     add d3,a6           ; + countlstx
  436.  
  437.     move.w d4,(a6)      ; lstX+count*2=offsettotal
  438.     addq #2,d3
  439.     move.w d3,(a4,d1)
  440.    
  441.     dbra d5,.loopCircle
  442.  
  443. ;****** now on a 16 liste d'offsets ; on genere les 16 routine qui affiche le cercle
  444.     ; a4 = count lstX
  445.     ; a5 = lst0
  446. ;  
  447.  
  448.     ;lea whereIScode,a6
  449.     lea lstorcount+32,a4
  450.     move.w #15,d5       ; 16 decalage/routine
  451.     move.l a1,a6
  452. .loopcgmake1
  453.     move.l a1,(a3)+     ; a3  = lstptrroutine
  454.     *move.l a6,(a3)+
  455.     lea lstor0,a5
  456.    
  457.     move d5,d0
  458.     lsl #6,d0       ; *64
  459.     add d0,a5           ; a5 = lstF puis lstE etc  // deprecated: puis lst1 puis lst2 etc
  460.     move.w -(a4),d4         ; d4 = countX  
  461.     bne.s .dot
  462. ; nodot:
  463.     ** a a modifier ici
  464. ;   move.l #routinevide,-4(a3)
  465.     bra.s .nodot
  466. .dot
  467.     lsr #1,d4
  468.     subq #1,d4
  469. .bcl
  470.     move.w #$8168,(a1)+         ;$8128 or.w d0,$1234(a0)
  471.     move.w (a5)+,(a1)+
  472.     dbf d4,.bcl
  473. .nodot
  474.     ;move.w #RTS,(a1)+
  475.     move.w #$D040,(a1)+         ; add d0,d0 pour prochain points
  476.  
  477.     dbf d5,.loopcgmake1
  478.     move.l rtsjmp,(a1)+
  479.     move.w rtsjmp+4,(a1)+
  480. ;   move.w #$4e75,(a1)+
  481. ; ***
  482.  
  483. ;********  
  484.     move.w (sp)+,d5
  485.     dbra d5,.loopAngle
  486.     ifeq STANDALONE
  487.     jsr test_exit_demo
  488.     endc   
  489.     dbra d7,.looptaille
  490.  
  491. routinevide rts
  492.  
  493. signetoto   dc.w 0
  494. valeurtoto  dc.w 0
  495.    
  496. calcwave
  497.         ;lea result,a6
  498.  
  499.         lea calcsinbuffer,a5        ; buffer de 96 word
  500.  
  501.         move.w #NBCIRCLES-1,d7      ; 96-1
  502.         ifeq (ANGLEWRAP-8)
  503.         move.w #%000000111000000,d6
  504.         endc
  505.         ifeq (ANGLEWRAP-16)
  506.         move.w #%000001111000000,d6
  507.         endc
  508.  
  509. .loooop
  510.         move.w (a0)+,d0
  511.         add (a1)+,d0
  512.         add (a2)+,d0
  513.         ;add (a3)+,d0
  514.     *   lsr #3,d0
  515.     *   and #%0000000000011100,d0
  516.         ; d0 =angle*2 ,
  517.     *   lsl #5,d0   ; *32           ; angle*32 long
  518.  
  519.         ;add d0,d0
  520.         ;add d0,d0
  521.         and d6,d0
  522.  
  523.         move.w d0,(a5)+
  524.         dbf d7,.loooop
  525.        
  526. TOTO
  527.         *lea (a5,d0),a4
  528.         *move.l (a4)+,(a6)+     ; adresse appel         ; A MODIF
  529.         *move.l (a4)+,(a6)+     ; adresse ou il faut placer le rts
  530.        
  531.         *lea 32*4(a5),a5    ; passer au cercle suivant
  532.         *dbf d7,.loooop
  533.    
  534.         ; now dans calcsinbuffer on a 96 valeur correspondant au sinus
  535.        
  536.         jsr calcSpot        ; calcul de spot+scroll+realposition
  537.                
  538.         move.w #NBCIRCLES-1,d7  ;96-1
  539.         lea realposition,a6
  540.         lea calcsinbuffer,a5
  541.         lea lstptrcode,a4
  542.            
  543.         ;move.w #$4e75,d6
  544.         ;move.w #$8168,d5 la plupart du temps c'est 8168 sinon c'est un rts
  545.         move.l #$4ed1,d6    jmp (a1)
  546.         move.l #autototo,a1    
  547.  
  548.  
  549.         ;move.w (a5)+,d0        ; angle*16*4
  550. automodif   move.w #0,d4
  551.             lea (a4,d4),a4
  552. loooop2
  553.         move.l a4,a2        ; a2 = lstptrcode[cercle+angle]
  554.         move.l (a6)+,a0     ; adresse ecran resultat fonction
  555.         ;lea 8(a0),a1
  556.         move.l (a2),a3
  557.         add.w (a6)+,a2      ; decalage*8
  558.                                   ;add d1,a2
  559.         move.l (a2),a2      ; adresse routine
  560.         moveq #1,d0
  561.         jmp (a2)
  562. autoto2:
  563.         addq.l #2,a0
  564.         move.w (a2),d5
  565.         move.w d6,(a2)      ; d6=rts
  566.         jmp (a3)
  567. autototo:
  568.         move.w d5,(a2)
  569.         ;move.w d5,-4(a2)       ; d5=add d0,d0
  570.    
  571.         ; changement de cercle
  572.         lea 4*16*ANGLEWRAP(a4),a4       *8
  573.        
  574.         dbf d7,loooop2
  575.        
  576.  
  577.         tst.w signetoto
  578.         beq.s .1
  579.         move.w automodif+2,d0
  580.         sub.w #16*4,d0
  581.         tst.w d0
  582.         bpl.s .ok1
  583.         move.w #16*15*4,d0
  584.         move.w valeurtoto,d1
  585.         addq #1,d1
  586.         cmp.w #8,d1
  587.         bne.s .okok1
  588.         clr.w d1
  589.         not.w signetoto
  590. .okok1  move.w d1,valeurtoto
  591. .ok1        move.w d0,automodif+2
  592.         bra.s .suisuite
  593. .1
  594.         move.w automodif+2,d0
  595.         add.w #16*4,d0
  596.         cmp.w #16*16*4,d0
  597.         bne.s .ok
  598.         move.w #0,d0
  599.         move.w valeurtoto,d1
  600.         addq #1,d1
  601.         cmp.w #8,d1
  602.         bne.s .okok
  603.         clr.w d1
  604.         not.w signetoto
  605. .okok   move.w d1,valeurtoto
  606. .ok     move.w d0,automodif+2
  607. .suisuite
  608.  
  609.        
  610.         move.w curangle1,d0
  611.         add #5,d0
  612.         and #511,d0
  613.         move.w d0,curangle1
  614.        
  615.         move.w curangle2,d0
  616.         add #512-3,d0
  617.         and #511,d0
  618.         move.w d0,curangle2
  619.        
  620.         move.w curangle3,d0
  621.         add #2,d0
  622.         and #511,d0
  623.         move.w d0,curangle3
  624.  
  625.         move.w curangle4,d0
  626.         add #1,d0
  627.         and #511,d0
  628.         move.w d0,curangle4
  629.        
  630.         rts
  631. rtsjmp      jmp autoto2
  632.    
  633. prepareScaleTable
  634.     lea superScaleTable,a0          ; buffer de 200 word *96
  635.     move.w #NBCIRCLES-1,d7
  636. .loop0
  637.  
  638.     move.w d7,d2
  639.     add #RAYONMIN,d2
  640.      ;move.w #96,d2
  641.      ;sub d7,d2 ; taille du cercle correspondant
  642.      ;sub #1,d2
  643.     add d2,d2
  644.     move.w #300,d3
  645.     sub d2,d3   ; 199-taille du cercle = nb de pixel max
  646.    
  647.     ; scale[100] doit placer le cercle au milieu
  648.     ; d2 = taille du cercle
  649.     ; en 100,   placer en 100-d2/2
  650.     ; en 0 placer en 0
  651.     ; en 200    placer en 200-d2
  652.     ; donc de 0 a 200 = 0 a 200-d2
  653.     ; il faut ajouter a chaque fois (200-d2)/200  = d3/200
  654.    
  655.     moveq #0,d4
  656.     move.w d3,d4
  657.     swap d4             d3*65536
  658.     divu #300,d4        ;/200
  659.     swap d4
  660.     clr.w d4
  661.     swap d4
  662.    
  663.    
  664.     move.w #199,d1
  665.     moveq #0,d6
  666.     moveq #0,d5
  667. .oneTable:
  668.     move.w d5,d0
  669.     add.w #192,d0
  670. ;   tst.w d0
  671. ;   bpl.s .2
  672. ;.3 add.w #96*2,d0
  673. ;   bmi.s .3
  674. ;   bra.s .1
  675. ;.2
  676. ;   cmp.w #96*2,d0
  677. ;   blt.s .1
  678. ;.4 sub.w #96*2,d0
  679. ;   bpl.s .4
  680. ;   add.w #96*2,d0
  681. ;.1
  682.     ;and.w #127*2,d0
  683.  
  684.     ;divu #192,d0
  685.     ;clr.w d0
  686.     ;swap d0
  687.    
  688.     mod192 d0,d4
  689.  
  690.  
  691.     and.w #-2,d0
  692.     ;add d0,d0
  693.     move.w d0,(a0)+
  694.     add.l d4,d6
  695.     swap d6
  696.     move.w d6,d5
  697.     swap d6
  698.     add d5,d5
  699.    
  700.     dbf d1,.oneTable
  701.     dbf d7,.loop0
  702.     rts
  703.  
  704. initsomething
  705.     lea posSpot,a0
  706.     move.w #100,d0
  707.     move.w #100,d1
  708.     move.w #NBCIRCLES-1,d7
  709. .bcl
  710.     move.w d0,(a0)+
  711.     move.w d1,(a0)+
  712.     dbf d7,.bcl
  713.      
  714.     jsr prepareScaleTable
  715.     jsr init_generatedCode
  716.    
  717.     lea convX2,a0
  718.     moveq #0,d0
  719.     moveq #19,d7
  720.     moveq #0,d1
  721. .loop
  722.     move.w d0,(a0)+         ; decalage
  723.     move.w d1,(a0)+         ; offset
  724.     add.w #4,d0             ; decalage*8
  725.     cmp.w #16*4,d0
  726.     bne.s .loop
  727.     moveq #0,d0
  728.     add.w #2,d1     ;was 8 
  729.    
  730.     cmp.w #6*2,d1
  731.     blt.s .tt
  732.     sub.w #6*2,d1  
  733. .tt
  734. ;   and.w #7*2,d1                   ; ????
  735.     dbf d7,.loop
  736.    
  737.     lea convY,a0
  738.     move.w #0,d0
  739.     move.w #48,d1       ; 192 pix 1 plan
  740.     move.w #199-1,d7
  741. .loop2
  742.     move.w d0,(a0)+
  743.     add d1,d0
  744.     cmp.w #96*48,d0
  745.     blt.s .totototo
  746.     moveq #0,d0
  747. .totototo
  748.     dbf d7,.loop2
  749.    
  750.    
  751.     rts
  752.  
  753. majscroll:
  754.     lea scrollX,a0
  755.     move.w (a0),d0
  756.     add.w #3,d0
  757.     move.w #2047,d1
  758.     and.w d1,d0
  759.     move.w d0,(a0)+
  760.     move.w (a0),d0
  761.     add.w #2047,d0
  762.     and.w d1,d0
  763.     move.w d0,(a0)+
  764.     rts
  765.  
  766. scrollX dc.w 0
  767. scrollY dc.w 0
  768. calcSpot:
  769.     bsr scroll_posSpot      ; positione a2 a la fin du posSpot
  770.  
  771.     lea cosinusSpot,a0
  772.     lea sinusSpot,a1
  773.  
  774.     move.w cspot,d0     ; angle cosinus spot
  775.     add.w #12,d0
  776.     and.w #4095,d0
  777.     move.w d0,cspot
  778.     add d0,d0           ; angle*2
  779.     move.w (a0,d0),d1   ; d1 = (100+100*cos(angle))*2
  780.    
  781.     move.w sspot,d0
  782.     add.w #8,d0
  783.     and.w #4095,d0
  784.     move.w d0,sspot
  785.     add d0,d0
  786.     move.w (a1,d0),d2   ; d2 = 100+100*sin(angle)
  787.    
  788.  
  789.  
  790.     lea cosinusSpot,a0
  791.     move.w cspot+2,d0       ; angle cosinus spot
  792.     add.w #4096-14,d0
  793.     and.w #4095,d0
  794.     move.w d0,cspot+2
  795.     add d0,d0           ; angle*2
  796.     add.w (a0,d0),d1    ; d1 = (100+100*cos(angle))*2
  797.     move.w sspot+2,d0
  798.     add.w #11,d0
  799.     and.w #4095,d0
  800.     move.w d0,sspot+2
  801.     add d0,d0
  802.     add.w (a1,d0),d2    ; d2 = 100+100*sin(angle)
  803.    
  804.     lsr #1,d1
  805.     lsr #1,d2
  806.     and.w #$FFFE,d1
  807.     and.w #$FFFE,d2
  808.     ;lea posSpot,a0
  809.     move.w d1,(a2)+
  810.     move.w d2,(a2)+
  811.  
  812. ; *********
  813. ; conversion de posSpot a realposition:
  814. ; ********
  815.     lea superScaleTable,a0          ; buffer de 200 word *96
  816.     lea posSpot,a1
  817.     lea realposition,a2         ; buffer: offset,decalage
  818. titi:
  819.     lea convX2,a3
  820.     movem.w scrollX,d0/d1
  821.     lsr #3,d0
  822.     lsr #3,d1
  823.     ext.l d1
  824.     ext.l d0
  825. ;   move.w #127*2,d2
  826.     ;divu #192,d0
  827.     ;clr.w d0
  828.     ;swap d0
  829.  
  830.     move.w d5,-(sp)
  831.     move.w #192,d5
  832.     modnosp d0,d5
  833.  
  834.     ;divu #192,d1
  835.     ;clr.w d1
  836.     ;swap d1
  837.     modnosp d1,d5
  838.     and.w #-2,d0
  839.     and.W #-2,d1
  840.     ;and d2,d0
  841.     ;and d2,d1
  842.    
  843.     ;add d0,d0
  844.     ;add d0,a3
  845.     lea convY,a4
  846.     ;add d1,a4
  847.     ;add.w scrollY,a4
  848.     ;move.l ptrscr,a5           ; ecran courant             ; a modifier pour pointer sur buffer de 256x256 pix 1 plan
  849.     lea buffertile,a5
  850.  
  851.     ;move #320,d5
  852.     ;sub NBCIRCLES*4-40(a1),d5
  853.     ;move #200,d6
  854.     ;sub NBCIRCLES*4-38(a1),d6
  855.    
  856.     ;move.w scrollX,d0
  857.     ;move.w scrollY,d1
  858.     move.w #NBCIRCLES-1,d7
  859.     moveq #0,d2
  860.     ;move.w #192,d5
  861. .bcl
  862.    
  863.     move.w (a1)+,d2             ; premiere coord , cercle de rayon 1
  864.     ;add d5,d0
  865.     ;add d0,d0
  866.     move.w (a0,d2),d2           ; superScaleTable[d0]
  867.    
  868.  
  869.     ;divu #192,d2
  870.     ;clr.w d2
  871.     ;swap d2
  872.     modnosp d2,d5
  873.    
  874.    
  875.     ;and.w #127*2,d2
  876.     ;add d0,D2
  877.     add d2,d2
  878.     move.l (a3,d2),d3           ; d3 = decalage,offsetX
  879.    
  880.     move.w (a1)+,d2             ; y
  881.     ;add d6,d1
  882.     ;add d1,d1
  883.     ;moveq #0,d4
  884.     move.w (a0,d2),d4           ; superscaleTable[d1]
  885.     ;ADD d1,D4
  886.     ;and.w #127*2,d4
  887.    
  888.     ;divu #192,d4
  889.     ;clr.w d4
  890.     ;swap d4
  891.     modnosp d4,d5
  892.     lsr #1,d4
  893.     and.w #-2,d4
  894.     add.w (a4,d4),d3            ; d3= decalage,offsetX+offsetY
  895.     lea (a5,d3.w),a6
  896.     move.l a6,(a2)+             ; adresse ecran+offset
  897.     swap d3
  898.     move.w d3,(a2)+
  899.    
  900.     lea 400(a0),a0          ; passage au 'scaleur' suivant
  901.  
  902.  
  903.     dbf d7,.bcl
  904.  
  905.     move.w (sp)+,d5
  906.    
  907.     ; now realposition = liste de 96 (adresse ecran, decalage)
  908.     rts
  909.    
  910.  
  911.  
  912. dsptiledata2
  913.     move.w d0,$0(a4)
  914.     move.w d1,8(a4)
  915.     move.w d2,16(a4)
  916.     move.w d3,24(a4)
  917.     move.w d4,32(a4)
  918.     move.w d5,40(a4)
  919. ;   move.w d6,48(a4)
  920. ;   move.w d7,56(a4)
  921. dsptiledata3
  922.     lea 24(a0),a0       ; +32
  923.     lea 24(a2),a2
  924.     lea 24(a1),a1
  925.     lea 24(a3),a3
  926.    
  927.     ;add d1,a3
  928.  
  929.  
  930. flag    dc.b 0
  931.     even
  932. copyadd
  933.     tst.b flag
  934.     bne.s .1
  935.     lea dsptiledata3,a4
  936.     move.l (a4)+,(a1)+
  937.     move.l (a4)+,(a1)+
  938.     bra.s .2
  939. .1  lea dsptiledata3+8,a4
  940.     move.l (a4)+,(a1)+
  941.     move.l (a4)+,(a1)+
  942. .2  not.b flag
  943.     rts
  944.    
  945.  
  946. inittiles:
  947.     lea bsstileram,a1
  948.     moveq #95,d4
  949.     moveq #0,d6
  950.     bra .loopligne
  951. .loopligne0:
  952.     jsr copyadd
  953. .loopligne:
  954.     jsr cpdsptiledata4
  955.     lea dsptiledata2,a5
  956.     moveq #5,d7
  957. .loop:
  958.     move.l d6,d3
  959.     moveq #0,d5
  960.     move.w (a5)+,d0
  961.     move.w (a5)+,d1         ; d1 = 0..56
  962. .lp move.w d1,d2
  963.     move.w d0,(a1)+
  964.     move.w d1,(a1)
  965.     add.w d6,(a1)+
  966.     add.w #48,d1
  967.     move.w d0,(a1)+
  968.     move.w d1,(a1)
  969.     add.w d6,(a1)+
  970.     add.w #48,d1
  971.     move.w d0,(a1)+
  972.     move.w d1,(a1)
  973.     add.w d6,(a1)+
  974.     add.w #48,d1
  975.     cmp.w #160,d1
  976.     bpl.s .skip
  977.     move.w d0,(a1)+
  978.     move.w d1,(a1)
  979.     add d6,(a1)+
  980. .skip
  981.     sub.l #48*3,d1
  982.     add.l #96*160,d6
  983.     cmp.l #32000-160,d6
  984.     bpl.s .skip2
  985.     bra.s .lp
  986. .skip2
  987.     move.l d3,d6
  988. ;   sub.l #96*2*160,d6              *****
  989.     dbf d7,.loop
  990.     add.l #160,d6
  991.     dbf d4,.loopligne0
  992.     move.w #$4e75,(a1)+
  993.     rts
  994.  
  995. cpdsptiledata4
  996.             ;move.l a4,-(sp)
  997.     lea dsptiledata4,a6
  998.     lea findsp4,a4
  999.  
  1000. .1  move.w (a6)+,(a1)+
  1001.     cmp.l a6,a4
  1002.     bne.s .1
  1003.     rts
  1004.  
  1005. dsptiledata4
  1006.     movem.w (a0)+,d0-d5
  1007.     or.w (a1)+,d0
  1008.     or.w (a1)+,d1
  1009.     or.w (a1)+,d2
  1010.     or.w (a1)+,d3
  1011.     or.w (a1)+,d4
  1012.     or.w (a1)+,d5
  1013. ;   or.w (a1)+,d6
  1014. ;   or.w (a1)+,d7
  1015.  
  1016.     or.w (a2)+,d0
  1017.     or.w (a2)+,d1
  1018.     or.w (a2)+,d2
  1019.     or.w (a2)+,d3
  1020.     or.w (a2)+,d4
  1021.     or.w (a2)+,d5
  1022. ;   or.w (a2)+,d6;
  1023. ;   or.w (a2)+,d7
  1024.  
  1025.     or.w (a3)+,d0
  1026.     or.w (a3)+,d1
  1027.     or.w (a3)+,d2
  1028.     or.w (a3)+,d3
  1029.     or.w (a3)+,d4
  1030.     or.w (a3)+,d5
  1031. ;   or.w (a3)+,d6
  1032. ;   or.w (a3)+,d7
  1033. findsp4
  1034.  
  1035. cleartiles
  1036.     ifne tmach
  1037.     not.w $ffff8240.w
  1038.     endc
  1039.    lea buffertile+4608,a0
  1040.     moveq #0,d1
  1041.     move.l d1,d2
  1042.     move.l d1,d3
  1043.     move.l d1,d4
  1044.     move.l d1,d5
  1045.     move.l d1,d6
  1046.     move.l d1,d7
  1047.     move.l d1,d0
  1048.     move.l d0,a1
  1049.     move.l d0,a2
  1050.     move.l d0,a3
  1051.     move.l d0,a4
  1052.     move.l d0,a5
  1053.     move.l d0,a6
  1054.     rept 82
  1055.     movem.l d0-d7/a1-a6,-(a0)
  1056.     endr
  1057.     movem.l d0-d3,-(a0)
  1058.     ifne tmach
  1059.     not.w $ffff8240.w
  1060.     endc
  1061.     rts
  1062. displaytiles:
  1063.     ; a4 = ecran logique
  1064.     lea buffertile,a0
  1065.     lea 12(a0),a1
  1066.     lea 96*24(a0),a2
  1067.     lea 96*24+12(a0),a3
  1068.     jmp bsstileram
  1069.  
  1070.  
  1071.  
  1072. scroll_posSpot:
  1073.     lea posSpot,a1
  1074.     lea 4(a1),a0
  1075.     move.w #NBCIRCLES-2,d7
  1076.  
  1077. .1  move.l (a0)+,(a1)+
  1078.     dbf d7,.1
  1079.     move.l a1,a2
  1080.     rts
  1081.    
  1082.     DATA
  1083. circletable:
  1084.     ;   incbin 'cerc512.dat'
  1085.     dc.w 32766,0,32136,6392,30271,12539,27243,18203,23169,23169,18203,27243,12539,30271,6392,32136
  1086.     dc.w 0,32766,-6392,32136,-12539,30271,-18203,27243,-23169,23169,-27243,18203,-30271,12539,-32136,6392
  1087.     dc.w -32766,0,-32136,-6392,-30271,-12539,-27243,-18203,-23169,-23169,-18203,-27243,-12539,-30271,-6392,-32136
  1088.     dc.w 0,-32766,6392,-32136,12539,-30271,18203,-27243,23169,-23169,27243,-18203,30271,-12539,32136,-6392
  1089.     dc.w 32763,402,32055,6786,30115,12909,27018,18536,22882,23451,17868,27465,12166,30423,5997,32212
  1090.     dc.w -402,32763,-6786,32055,-12909,30115,-18536,27018,-23451,22882,-27465,17868,-30423,12166,-32212,5997
  1091.     dc.w -32763,-402,-32055,-6786,-30115,-12909,-27018,-18536,-22882,-23451,-17868,-27465,-12166,-30423,-5997,-32212
  1092.     dc.w 402,-32763,6786,-32055,12909,-30115,18536,-27018,23451,-22882,27465,-17868,30423,-12166,32212,-5997
  1093.     dc.w 32756,804,31969,7179,29954,13278,26788,18866,22593,23730,17529,27682,11792,30570,5601,32283
  1094.     dc.w -804,32756,-7179,31969,-13278,29954,-18866,26788,-23730,22593,-27682,17529,-30570,11792,-32283,5601
  1095.     dc.w -32756,-804,-31969,-7179,-29954,-13278,-26788,-18866,-22593,-23730,-17529,-27682,-11792,-30570,-5601,-32283
  1096.     dc.w 804,-32756,7179,-31969,13278,-29954,18866,-26788,23730,-22593,27682,-17529,30570,-11792,32283,-5601
  1097.     dc.w 32743,1206,31879,7570,29789,13644,26555,19194,22300,24006,17188,27895,11416,30712,5205,32349
  1098.     dc.w -1206,32743,-7570,31879,-13644,29789,-19194,26555,-24006,22300,-27895,17188,-30712,11416,-32349,5205
  1099.     dc.w -32743,-1206,-31879,-7570,-29789,-13644,-26555,-19194,-22300,-24006,-17188,-27895,-11416,-30712,-5205,-32349
  1100.     dc.w 1206,-32743,7570,-31879,13644,-29789,19194,-26555,24006,-22300,27895,-17188,30712,-11416,32349,-5205
  1101.     dc.w 32726,1607,31784,7961,29620,14009,26317,19518,22004,24278,16845,28104,11038,30850,4807,32411
  1102.     dc.w -1607,32726,-7961,31784,-14009,29620,-19518,26317,-24278,22004,-28104,16845,-30850,11038,-32411,4807
  1103.     dc.w -32726,-1607,-31784,-7961,-29620,-14009,-26317,-19518,-22004,-24278,-16845,-28104,-11038,-30850,-4807,-32411
  1104.     dc.w 1607,-32726,7961,-31784,14009,-29620,19518,-26317,24278,-22004,28104,-16845,30850,-11038,32411,-4807
  1105.     dc.w 32704,2009,31683,8350,29445,14371,26076,19840,21704,24546,16498,28308,10659,30983,4409,32467
  1106.     dc.w -2009,32704,-8350,31683,-14371,29445,-19840,26076,-24546,21704,-28308,16498,-30983,10659,-32467,4409
  1107.     dc.w -32704,-2009,-31683,-8350,-29445,-14371,-26076,-19840,-21704,-24546,-16498,-28308,-10659,-30983,-4409,-32467
  1108.     dc.w 2009,-32704,8350,-31683,14371,-29445,19840,-26076,24546,-21704,28308,-16498,30983,-10659,32467,-4409
  1109.     dc.w 32677,2410,31579,8739,29267,14731,25830,20158,21401,24810,16150,28509,10278,31112,4010,32519
  1110.     dc.w -2410,32677,-8739,31579,-14731,29267,-20158,25830,-24810,21401,-28509,16150,-31112,10278,-32519,4010
  1111.     dc.w -32677,-2410,-31579,-8739,-29267,-14731,-25830,-20158,-21401,-24810,-16150,-28509,-10278,-31112,-4010,-32519
  1112.     dc.w 2410,-32677,8739,-31579,14731,-29267,20158,-25830,24810,-21401,28509,-16150,31112,-10278,32519,-4010
  1113.     dc.w 32645,2811,31469,9125,29084,15090,25581,20474,21095,25071,15799,28705,9895,31236,3611,32566
  1114.     dc.w -2811,32645,-9125,31469,-15090,29084,-20474,25581,-25071,21095,-28705,15799,-31236,9895,-32566,3611
  1115.     dc.w -32645,-2811,-31469,-9125,-29084,-15090,-25581,-20474,-21095,-25071,-15799,-28705,-9895,-31236,-3611,-32566
  1116.     dc.w 2811,-32645,9125,-31469,15090,-29084,20474,-25581,25071,-21095,28705,-15799,31236,-9895,32566,-3611
  1117.     dc.w 32608,3211,31355,9511,28897,15445,25328,20786,20786,25328,15445,28897,9511,31355,3211,32608
  1118.     dc.w -3211,32608,-9511,31355,-15445,28897,-20786,25328,-25328,20786,-28897,15445,-31355,9511,-32608,3211
  1119.     dc.w -32608,-3211,-31355,-9511,-28897,-15445,-25328,-20786,-20786,-25328,-15445,-28897,-9511,-31355,-3211,-32608
  1120.     dc.w 3211,-32608,9511,-31355,15445,-28897,20786,-25328,25328,-20786,28897,-15445,31355,-9511,32608,-3211
  1121.     dc.w 32566,3611,31236,9895,28705,15799,25071,21095,20474,25581,15090,29084,9125,31469,2811,32645
  1122.     dc.w -3611,32566,-9895,31236,-15799,28705,-21095,25071,-25581,20474,-29084,15090,-31469,9125,-32645,2811
  1123.     dc.w -32566,-3611,-31236,-9895,-28705,-15799,-25071,-21095,-20474,-25581,-15090,-29084,-9125,-31469,-2811,-32645
  1124.     dc.w 3611,-32566,9895,-31236,15799,-28705,21095,-25071,25581,-20474,29084,-15090,31469,-9125,32645,-2811
  1125.     dc.w 32519,4010,31112,10278,28509,16150,24810,21401,20158,25830,14731,29267,8739,31579,2410,32677
  1126.     dc.w -4010,32519,-10278,31112,-16150,28509,-21401,24810,-25830,20158,-29267,14731,-31579,8739,-32677,2410
  1127.     dc.w -32519,-4010,-31112,-10278,-28509,-16150,-24810,-21401,-20158,-25830,-14731,-29267,-8739,-31579,-2410,-32677
  1128.     dc.w 4010,-32519,10278,-31112,16150,-28509,21401,-24810,25830,-20158,29267,-14731,31579,-8739,32677,-2410
  1129.     dc.w 32467,4409,30983,10659,28308,16498,24546,21704,19840,26076,14371,29445,8350,31683,2009,32704
  1130.     dc.w -4409,32467,-10659,30983,-16498,28308,-21704,24546,-26076,19840,-29445,14371,-31683,8350,-32704,2009
  1131.     dc.w -32467,-4409,-30983,-10659,-28308,-16498,-24546,-21704,-19840,-26076,-14371,-29445,-8350,-31683,-2009,-32704
  1132.     dc.w 4409,-32467,10659,-30983,16498,-28308,21704,-24546,26076,-19840,29445,-14371,31683,-8350,32704,-2009
  1133.     dc.w 32411,4807,30850,11038,28104,16845,24278,22004,19518,26317,14009,29620,7961,31784,1607,32726
  1134.     dc.w -4807,32411,-11038,30850,-16845,28104,-22004,24278,-26317,19518,-29620,14009,-31784,7961,-32726,1607
  1135.     dc.w -32411,-4807,-30850,-11038,-28104,-16845,-24278,-22004,-19518,-26317,-14009,-29620,-7961,-31784,-1607,-32726
  1136.     dc.w 4807,-32411,11038,-30850,16845,-28104,22004,-24278,26317,-19518,29620,-14009,31784,-7961,32726,-1607
  1137.     dc.w 32349,5205,30712,11416,27895,17188,24006,22300,19194,26555,13644,29789,7570,31879,1206,32743
  1138.     dc.w -5205,32349,-11416,30712,-17188,27895,-22300,24006,-26555,19194,-29789,13644,-31879,7570,-32743,1206
  1139.     dc.w -32349,-5205,-30712,-11416,-27895,-17188,-24006,-22300,-19194,-26555,-13644,-29789,-7570,-31879,-1206,-32743
  1140.     dc.w 5205,-32349,11416,-30712,17188,-27895,22300,-24006,26555,-19194,29789,-13644,31879,-7570,32743,-1206
  1141.     dc.w 32283,5601,30570,11792,27682,17529,23730,22593,18866,26788,13278,29954,7179,31969,804,32756
  1142.     dc.w -5601,32283,-11792,30570,-17529,27682,-22593,23730,-26788,18866,-29954,13278,-31969,7179,-32756,804
  1143.     dc.w -32283,-5601,-30570,-11792,-27682,-17529,-23730,-22593,-18866,-26788,-13278,-29954,-7179,-31969,-804,-32756
  1144.     dc.w 5601,-32283,11792,-30570,17529,-27682,22593,-23730,26788,-18866,29954,-13278,31969,-7179,32756,-804
  1145.     dc.w 32212,5997,30423,12166,27465,17868,23451,22882,18536,27018,12909,30115,6786,32055,402,32763
  1146.     dc.w -5997,32212,-12166,30423,-17868,27465,-22882,23451,-27018,18536,-30115,12909,-32055,6786,-32763,402
  1147.     dc.w -32212,-5997,-30423,-12166,-27465,-17868,-23451,-22882,-18536,-27018,-12909,-30115,-6786,-32055,-402,-32763
  1148.     dc.w 5997,-32212,12166,-30423,17868,-27465,22882,-23451,27018,-18536,30115,-12909,32055,-6786,32763,-402
  1149.    
  1150. curangle1   dc.w 0
  1151. curangle2   dc.w 2
  1152. curangle3   dc.w 10
  1153. curangle4   dc.w 100
  1154.  
  1155. cspot   dc.w 10
  1156.     dc.w 22
  1157. sspot   dc.w 60
  1158.     dc.w 40
  1159.    
  1160.  
  1161. col0    equ $11 12  $653
  1162. colA    equ  $777 $777 750 $347
  1163. colB    equ  $147 $555 640 $236
  1164. colC    equ  $236 $333  537 $125
  1165. colD    equ  $326 24 555   $623 $222 420 $014
  1166. ;col1   equ  $7 colA
  1167. ;col2   equ  $26 colB
  1168. ;col3   equ  $35 colC
  1169. ;col4   equ  $07 colD
  1170. col00   equ $37CA
  1171. codageplan0 dc.b 0,1,4,1,3,1,3,1,2,1,2,1,2,1,2,1        ;
  1172. codageplan1 dc.b 0,2,1,1,4,2,1,1,3,2,1,1,3,2,1,1
  1173. codageplan2 dc.b 0,3,2,2,1,1,1,1,4,3,2,2,1,1,1,1  P4 P0 P1 P2
  1174. codageplan3 dc.b 0,4,3,3,2,2,2,2,1,1,1,1,1,1,1,1
  1175.  
  1176. ; description codage plan en vue de raster split de palette
  1177. ; couleur 0 = 1 FOIS MOVE.W (A0)+,REGCOLOR
  1178. ; couleur 1 = 8 fois move.w (a0)+,d0  8x move.w d0,regcolor
  1179. ; couleur 2 = 4 fois move.w (a0)+,d0  4x move.w d0,regcolor
  1180. ; couleur 3 = 2 fois  ? move.w (a0),regcolor  move.w (a0)+,regcolor
  1181. ; couleur 4 = 1 fois move.w (a0)+,regcolor
  1182.  
  1183.             even        ; pas obligatoire
  1184. listecolor  dc.w col0,colA,colB,colC,colD
  1185.  
  1186. selplanpointer  dc.l selplantab
  1187. cossin4096amp16bit
  1188.     dc.w 65534,65533,65532,65530,65527,65524,65520,65515,65509,65503,65495,65487,65479,65469,65459,65448
  1189.     dc.w 65436,65424,65410,65396,65381,65366,65350,65333,65315,65296,65277,65257,65236,65214,65192,65169
  1190.     dc.w 65145,65120,65095,65069,65042,65015,64986,64957,64927,64897,64866,64834,64801,64767,64733,64698
  1191.     dc.w 64662,64626,64589,64551,64512,64473,64433,64392,64350,64308,64265,64222,64177,64132,64086,64040
  1192.     dc.w 63992,63944,63896,63846,63796,63745,63694,63642,63589,63535,63481,63426,63370,63314,63257,63199
  1193.     dc.w 63140,63081,63021,62961,62900,62838,62775,62712,62648,62584,62519,62453,62386,62319,62251,62183
  1194.     dc.w 62113,62044,61973,61902,61830,61758,61685,61611,61537,61462,61387,61310,61234,61156,61078,60999
  1195.     dc.w 60920,60840,60760,60678,60597,60514,60431,60348,60264,60179,60094,60008,59921,59834,59747,59658
  1196.     dc.w 59570,59480,59390,59300,59209,59117,59025,58932,58839,58745,58651,58556,58460,58364,58268,58171
  1197.     dc.w 58073,57975,57876,57777,57677,57577,57476,57375,57273,57171,57069,56965,56862,56757,56653,56547
  1198.     dc.w 56442,56336,56229,56122,56014,55906,55798,55689,55580,55470,55360,55249,55138,55026,54914,54802
  1199.     dc.w 54689,54575,54462,54347,54233,54118,54003,53887,53771,53654,53537,53420,53302,53184,53065,52946
  1200.     dc.w 52827,52707,52587,52467,52346,52225,52103,51982,51859,51737,51614,51491,51367,51244,51119,50995
  1201.     dc.w 50870,50745,50619,50494,50368,50241,50115,49988,49860,49733,49605,49477,49349,49220,49091,48962
  1202.     dc.w 48832,48703,48573,48443,48312,48181,48050,47919,47788,47656,47524,47392,47260,47127,46995,46862
  1203.     dc.w 46728,46595,46461,46328,46194,46059,45925,45791,45656,45521,45386,45251,45115,44980,44844,44708
  1204.     dc.w 44572,44436,44300,44163,44027,43890,43753,43616,43479,43342,43205,43067,42930,42792,42654,42516
  1205.     dc.w 42378,42240,42102,41964,41826,41687,41549,41410,41272,41133,40994,40855,40716,40578,40439,40300
  1206.     dc.w 40161,40021,39882,39743,39604,39465,39326,39186,39047,38908,38769,38629,38490,38351,38211,38072
  1207.     dc.w 37933,37793,37654,37515,37376,37237,37097,36958,36819,36680,36541,36402,36263,36124,35985,35847
  1208.     dc.w 35708,35569,35431,35292,35154,35015,34877,34739,34600,34462,34324,34187,34049,33911,33773,33636
  1209.     dc.w 33498,33361,33224,33087,32950,32813,32676,32540,32403,32267,32131,31995,31859,31723,31587,31452
  1210.     dc.w 31316,31181,31046,30911,30776,30642,30507,30373,30239,30105,29971,29837,29704,29571,29438,29305
  1211.     dc.w 29172,29040,28907,28775,28643,28512,28380,28249,28118,27987,27856,27725,27595,27465,27335,27206
  1212.     dc.w 27076,26947,26818,26689,26561,26433,26305,26177,26049,25922,25795,25668,25541,25415,25289,25163
  1213.     dc.w 25038,24912,24787,24662,24538,24414,24289,24166,24042,23919,23796,23673,23551,23429,23307,23185
  1214.     dc.w 23064,22943,22822,22702,22582,22462,22343,22223,22104,21986,21867,21749,21631,21514,21397,21280
  1215.     dc.w 21163,21047,20931,20815,20700,20585,20470,20356,20242,20128,20015,19902,19789,19676,19564,19452
  1216.     dc.w 19341,19230,19119,19008,18898,18788,18679,18569,18461,18352,18244,18136,18028,17921,17814,17708
  1217.     dc.w 17602,17496,17390,17285,17181,17076,16972,16868,16765,16662,16559,16457,16355,16253,16152,16051
  1218.     dc.w 15950,15850,15750,15651,15552,15453,15354,15256,15158,15061,14964,14867,14771,14675,14579,14484
  1219.     dc.w 14389,14295,14201,14107,14014,13921,13828,13736,13644,13552,13461,13370,13279,13189,13100,13010
  1220.     dc.w 12921,12832,12744,12656,12569,12482,12395,12308,12222,12136,12051,11966,11881,11797,11713,11630
  1221.     dc.w 11547,11464,11381,11299,11218,11136,11056,10975,10895,10815,10735,10656,10578,10499,10421,10344
  1222.     dc.w 10266,10189,10113,10037,9961,9886,9810,9736,9661,9587,9514,9441,9368,9295,9223,9151
  1223.     dc.w 9080,9009,8938,8868,8798,8728,8659,8590,8521,8453,8385,8318,8250,8184,8117,8051
  1224.     dc.w 7986,7920,7855,7791,7726,7662,7599,7535,7473,7410,7348,7286,7224,7163,7103,7042
  1225.     dc.w 6982,6922,6863,6804,6745,6687,6628,6571,6513,6456,6400,6343,6287,6232,6176,6121
  1226.     dc.w 6067,6012,5958,5904,5851,5798,5745,5693,5641,5589,5538,5487,5436,5386,5335,5286
  1227.     dc.w 5236,5187,5138,5090,5042,4994,4946,4899,4852,4805,4759,4713,4667,4622,4577,4532
  1228.     dc.w 4488,4444,4400,4356,4313,4270,4227,4185,4143,4101,4060,4019,3978,3937,3897,3857
  1229.     dc.w 3817,3778,3739,3700,3661,3623,3585,3547,3510,3473,3436,3399,3363,3327,3291,3255
  1230.     dc.w 3220,3185,3151,3116,3082,3048,3015,2981,2948,2915,2883,2850,2818,2787,2755,2724
  1231.     dc.w 2693,2662,2632,2601,2571,2541,2512,2483,2454,2425,2396,2368,2340,2312,2285,2257
  1232.     dc.w 2230,2203,2177,2150,2124,2098,2072,2047,2022,1997,1972,1947,1923,1899,1875,1851
  1233.     dc.w 1828,1804,1781,1759,1736,1714,1691,1669,1648,1626,1605,1584,1563,1542,1521,1501
  1234.     dc.w 1481,1461,1441,1421,1402,1383,1364,1345,1327,1308,1290,1272,1254,1236,1219,1202
  1235.     dc.w 1184,1167,1151,1134,1118,1101,1085,1069,1054,1038,1023,1008,993,978,963,948
  1236.     dc.w 934,920,906,892,878,864,851,838,825,812,799,786,773,761,749,737
  1237.     dc.w 725,713,701,690,678,667,656,645,634,624,613,603,592,582,572,562
  1238.     dc.w 552,543,533,524,515,505,496,488,479,470,461,453,445,437,428,420
  1239.     dc.w 413,405,397,390,382,375,368,360,353,346,340,333,326,320,313,307
  1240.     dc.w 301,295,289,283,277,271,265,260,254,249,244,238,233,228,223,218
  1241.     dc.w 213,209,204,199,195,191,186,182,178,174,169,166,162,158,154,150
  1242.     dc.w 147,143,140,136,133,129,126,123,120,117,114,111,108,105,102,100
  1243.     dc.w 97,94,92,89,87,84,82,80,77,75,73,71,69,67,65,63
  1244.     dc.w 61,59,58,56,54,52,51,49,48,46,45,43,42,40,39,38
  1245.     dc.w 37,35,34,33,32,31,30,29,28,27,26,25,24,23,22,21
  1246.     dc.w 20,20,19,18,17,17,16,15,15,14,14,13,13,12,12,11
  1247.     dc.w 11,10,10,9,9,9,8,8,8,7,7,7,6,6,6,5
  1248.     dc.w 5,5,5,5,4,4,4,4,4,4,3,3,3,3,3,3
  1249.     dc.w 3,3,3,2,2,2,2,2,2,2,2,2,2,2,2,2
  1250.     dc.w 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2
  1251.     dc.w 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2
  1252.     dc.w 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2
  1253.     dc.w 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2
  1254.     dc.w 2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3
  1255.     dc.w 3,3,3,3,3,3,3,4,4,4,4,4,4,5,5,5
  1256.     dc.w 5,5,6,6,6,7,7,7,8,8,8,9,9,9,10,10
  1257.     dc.w 11,11,12,12,13,13,14,14,15,15,16,17,17,18,19,20
  1258.     dc.w 20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35
  1259.     dc.w 37,38,39,40,42,43,45,46,48,49,51,52,54,56,58,59
  1260.     dc.w 61,63,65,67,69,71,73,75,77,80,82,84,87,89,92,94
  1261.     dc.w 97,100,102,105,108,111,114,117,120,123,126,129,133,136,140,143
  1262.     dc.w 147,150,154,158,162,166,169,174,178,182,186,191,195,199,204,209
  1263.     dc.w 213,218,223,228,233,238,244,249,254,260,265,271,277,283,289,295
  1264.     dc.w 301,307,313,320,326,333,340,346,353,360,368,375,382,390,397,405
  1265.     dc.w 413,420,428,437,445,453,461,470,479,488,496,505,515,524,533,543
  1266.     dc.w 552,562,572,582,592,603,613,624,634,645,656,667,678,690,701,713
  1267.     dc.w 725,737,749,761,773,786,799,812,825,838,851,864,878,892,906,920
  1268.     dc.w 934,948,963,978,993,1008,1023,1038,1054,1069,1085,1101,1118,1134,1151,1167
  1269.     dc.w 1184,1202,1219,1236,1254,1272,1290,1308,1327,1345,1364,1383,1402,1421,1441,1461
  1270.     dc.w 1481,1501,1521,1542,1563,1584,1605,1626,1648,1669,1691,1714,1736,1759,1781,1804
  1271.     dc.w 1828,1851,1875,1899,1923,1947,1972,1997,2022,2047,2072,2098,2124,2150,2177,2203
  1272.     dc.w 2230,2257,2285,2312,2340,2368,2396,2425,2454,2483,2512,2541,2571,2601,2632,2662
  1273.     dc.w 2693,2724,2755,2787,2818,2850,2883,2915,2948,2981,3015,3048,3082,3116,3151,3185
  1274.     dc.w 3220,3255,3291,3327,3363,3399,3436,3473,3510,3547,3585,3623,3661,3700,3739,3778
  1275.     dc.w 3817,3857,3897,3937,3978,4019,4060,4101,4143,4185,4227,4270,4313,4356,4400,4444
  1276.     dc.w 4488,4532,4577,4622,4667,4713,4759,4805,4852,4899,4946,4994,5042,5090,5138,5187
  1277.     dc.w 5236,5286,5335,5386,5436,5487,5538,5589,5641,5693,5745,5798,5851,5904,5958,6012
  1278.     dc.w 6067,6121,6176,6232,6287,6343,6400,6456,6513,6571,6628,6687,6745,6804,6863,6922
  1279.     dc.w 6982,7042,7103,7163,7224,7286,7348,7410,7473,7535,7599,7662,7726,7791,7855,7920
  1280.     dc.w 7986,8051,8117,8184,8250,8318,8385,8453,8521,8590,8659,8728,8798,8868,8938,9009
  1281.     dc.w 9080,9151,9223,9295,9368,9441,9514,9587,9661,9736,9810,9886,9961,10037,10113,10189
  1282.     dc.w 10266,10344,10421,10499,10578,10656,10735,10815,10895,10975,11056,11136,11218,11299,11381,11464
  1283.     dc.w 11547,11630,11713,11797,11881,11966,12051,12136,12222,12308,12395,12482,12569,12656,12744,12832
  1284.     dc.w 12921,13010,13100,13189,13279,13370,13461,13552,13644,13736,13828,13921,14014,14107,14201,14295
  1285.     dc.w 14389,14484,14579,14675,14771,14867,14964,15061,15158,15256,15354,15453,15552,15651,15750,15850
  1286.     dc.w 15950,16051,16152,16253,16355,16457,16559,16662,16765,16868,16972,17076,17181,17285,17390,17496
  1287.     dc.w 17602,17708,17814,17921,18028,18136,18244,18352,18461,18569,18679,18788,18898,19008,19119,19230
  1288.     dc.w 19341,19452,19564,19676,19789,19902,20015,20128,20242,20356,20470,20585,20700,20815,20931,21047
  1289.     dc.w 21163,21280,21397,21514,21631,21749,21867,21986,22104,22223,22343,22462,22582,22702,22822,22943
  1290.     dc.w 23064,23185,23307,23429,23551,23673,23796,23919,24042,24166,24289,24414,24538,24662,24787,24912
  1291.     dc.w 25038,25163,25289,25415,25541,25668,25795,25922,26049,26177,26305,26433,26561,26689,26818,26947
  1292.     dc.w 27076,27206,27335,27465,27595,27725,27856,27987,28118,28249,28380,28512,28643,28775,28907,29040
  1293.     dc.w 29172,29305,29438,29571,29704,29837,29971,30105,30239,30373,30507,30642,30776,30911,31046,31181
  1294.     dc.w 31316,31452,31587,31723,31859,31995,32131,32267,32403,32540,32676,32813,32950,33087,33224,33361
  1295.     dc.w 33498,33636,33773,33911,34049,34187,34324,34462,34600,34739,34877,35015,35154,35292,35431,35569
  1296.     dc.w 35708,35847,35985,36124,36263,36402,36541,36680,36819,36958,37097,37237,37376,37515,37654,37793
  1297.     dc.w 37933,38072,38211,38351,38490,38629,38769,38908,39047,39186,39326,39465,39604,39743,39882,40021
  1298.     dc.w 40161,40300,40439,40578,40716,40855,40994,41133,41272,41410,41549,41687,41826,41964,42102,42240
  1299.     dc.w 42378,42516,42654,42792,42930,43067,43205,43342,43479,43616,43753,43890,44027,44163,44300,44436
  1300.     dc.w 44572,44708,44844,44980,45115,45251,45386,45521,45656,45791,45925,46059,46194,46328,46461,46595
  1301.     dc.w 46728,46862,46995,47127,47260,47392,47524,47656,47788,47919,48050,48181,48312,48443,48573,48703
  1302.     dc.w 48832,48962,49091,49220,49349,49477,49605,49733,49860,49988,50115,50241,50368,50494,50619,50745
  1303.     dc.w 50870,50995,51119,51244,51367,51491,51614,51737,51859,51982,52103,52225,52346,52467,52587,52707
  1304.     dc.w 52827,52946,53065,53184,53302,53420,53537,53654,53771,53887,54003,54118,54233,54347,54462,54575
  1305.     dc.w 54689,54802,54914,55026,55138,55249,55360,55470,55580,55689,55798,55906,56014,56122,56229,56336
  1306.     dc.w 56442,56547,56653,56757,56862,56965,57069,57171,57273,57375,57476,57577,57677,57777,57876,57975
  1307.     dc.w 58073,58171,58268,58364,58460,58556,58651,58745,58839,58932,59025,59117,59209,59300,59390,59480
  1308.     dc.w 59570,59658,59747,59834,59921,60008,60094,60179,60264,60348,60431,60514,60597,60678,60760,60840
  1309.     dc.w 60920,60999,61078,61156,61234,61310,61387,61462,61537,61611,61685,61758,61830,61902,61973,62044
  1310.     dc.w 62113,62183,62251,62319,62386,62453,62519,62584,62648,62712,62775,62838,62900,62961,63021,63081
  1311.     dc.w 63140,63199,63257,63314,63370,63426,63481,63535,63589,63642,63694,63745,63796,63846,63896,63944
  1312.     dc.w 63992,64040,64086,64132,64177,64222,64265,64308,64350,64392,64433,64473,64512,64551,64589,64626
  1313.     dc.w 64662,64698,64733,64767,64801,64834,64866,64897,64927,64957,64986,65015,65042,65069,65095,65120
  1314.     dc.w 65145,65169,65192,65214,65236,65257,65277,65296,65315,65333,65350,65366,65381,65396,65410,65424
  1315.     dc.w 65436,65448,65459,65469,65479,65487,65495,65503,65509,65515,65520,65524,65527,65530,65532,65533
  1316.     dc.w 65534,65533,65532,65530,65527,65524,65520,65515,65509,65503,65495,65487,65479,65469,65459,65448
  1317.     dc.w 65436,65424,65410,65396,65381,65366,65350,65333,65315,65296,65277,65257,65236,65214,65192,65169
  1318.     dc.w 65145,65120,65095,65069,65042,65015,64986,64957,64927,64897,64866,64834,64801,64767,64733,64698
  1319.     dc.w 64662,64626,64589,64551,64512,64473,64433,64392,64350,64308,64265,64222,64177,64132,64086,64040
  1320.     dc.w 63992,63944,63896,63846,63796,63745,63694,63642,63589,63535,63481,63426,63370,63314,63257,63199
  1321.     dc.w 63140,63081,63021,62961,62900,62838,62775,62712,62648,62584,62519,62453,62386,62319,62251,62183
  1322.     dc.w 62113,62044,61973,61902,61830,61758,61685,61611,61537,61462,61387,61310,61234,61156,61078,60999
  1323.     dc.w 60920,60840,60760,60678,60597,60514,60431,60348,60264,60179,60094,60008,59921,59834,59747,59658
  1324.     dc.w 59570,59480,59390,59300,59209,59117,59025,58932,58839,58745,58651,58556,58460,58364,58268,58171
  1325.     dc.w 58073,57975,57876,57777,57677,57577,57476,57375,57273,57171,57069,56965,56862,56757,56653,56547
  1326.     dc.w 56442,56336,56229,56122,56014,55906,55798,55689,55580,55470,55360,55249,55138,55026,54914,54802
  1327.     dc.w 54689,54575,54462,54347,54233,54118,54003,53887,53771,53654,53537,53420,53302,53184,53065,52946
  1328.     dc.w 52827,52707,52587,52467,52346,52225,52103,51982,51859,51737,51614,51491,51367,51244,51119,50995
  1329.     dc.w 50870,50745,50619,50494,50368,50241,50115,49988,49860,49733,49605,49477,49349,49220,49091,48962
  1330.     dc.w 48832,48703,48573,48443,48312,48181,48050,47919,47788,47656,47524,47392,47260,47127,46995,46862
  1331.     dc.w 46728,46595,46461,46328,46194,46059,45925,45791,45656,45521,45386,45251,45115,44980,44844,44708
  1332.     dc.w 44572,44436,44300,44163,44027,43890,43753,43616,43479,43342,43205,43067,42930,42792,42654,42516
  1333.     dc.w 42378,42240,42102,41964,41826,41687,41549,41410,41272,41133,40994,40855,40716,40578,40439,40300
  1334.     dc.w 40161,40021,39882,39743,39604,39465,39326,39186,39047,38908,38769,38629,38490,38351,38211,38072
  1335.     dc.w 37933,37793,37654,37515,37376,37237,37097,36958,36819,36680,36541,36402,36263,36124,35985,35847
  1336.     dc.w 35708,35569,35431,35292,35154,35015,34877,34739,34600,34462,34324,34187,34049,33911,33773,33636
  1337.     dc.w 33498,33361,33224,33087,32950,32813,32676,32540,32403,32267,32131,31995,31859,31723,31587,31452
  1338.     dc.w 31316,31181,31046,30911,30776,30642,30507,30373,30239,30105,29971,29837,29704,29571,29438,29305
  1339.     dc.w 29172,29040,28907,28775,28643,28512,28380,28249,28118,27987,27856,27725,27595,27465,27335,27206
  1340.     dc.w 27076,26947,26818,26689,26561,26433,26305,26177,26049,25922,25795,25668,25541,25415,25289,25163
  1341.     dc.w 25038,24912,24787,24662,24538,24414,24289,24166,24042,23919,23796,23673,23551,23429,23307,23185
  1342.     dc.w 23064,22943,22822,22702,22582,22462,22343,22223,22104,21986,21867,21749,21631,21514,21397,21280
  1343.     dc.w 21163,21047,20931,20815,20700,20585,20470,20356,20242,20128,20015,19902,19789,19676,19564,19452
  1344.     dc.w 19341,19230,19119,19008,18898,18788,18679,18569,18461,18352,18244,18136,18028,17921,17814,17708
  1345.     dc.w 17602,17496,17390,17285,17181,17076,16972,16868,16765,16662,16559,16457,16355,16253,16152,16051
  1346.     dc.w 15950,15850,15750,15651,15552,15453,15354,15256,15158,15061,14964,14867,14771,14675,14579,14484
  1347.     dc.w 14389,14295,14201,14107,14014,13921,13828,13736,13644,13552,13461,13370,13279,13189,13100,13010
  1348.     dc.w 12921,12832,12744,12656,12569,12482,12395,12308,12222,12136,12051,11966,11881,11797,11713,11630
  1349.     dc.w 11547,11464,11381,11299,11218,11136,11056,10975,10895,10815,10735,10656,10578,10499,10421,10344
  1350.     dc.w 10266,10189,10113,10037,9961,9886,9810,9736,9661,9587,9514,9441,9368,9295,9223,9151
  1351.     dc.w 9080,9009,8938,8868,8798,8728,8659,8590,8521,8453,8385,8318,8250,8184,8117,8051
  1352.     dc.w 7986,7920,7855,7791,7726,7662,7599,7535,7473,7410,7348,7286,7224,7163,7103,7042
  1353.     dc.w 6982,6922,6863,6804,6745,6687,6628,6571,6513,6456,6400,6343,6287,6232,6176,6121
  1354.     dc.w 6067,6012,5958,5904,5851,5798,5745,5693,5641,5589,5538,5487,5436,5386,5335,5286
  1355.     dc.w 5236,5187,5138,5090,5042,4994,4946,4899,4852,4805,4759,4713,4667,4622,4577,4532
  1356.     dc.w 4488,4444,4400,4356,4313,4270,4227,4185,4143,4101,4060,4019,3978,3937,3897,3857
  1357.     dc.w 3817,3778,3739,3700,3661,3623,3585,3547,3510,3473,3436,3399,3363,3327,3291,3255
  1358.     dc.w 3220,3185,3151,3116,3082,3048,3015,2981,2948,2915,2883,2850,2818,2787,2755,2724
  1359.     dc.w 2693,2662,2632,2601,2571,2541,2512,2483,2454,2425,2396,2368,2340,2312,2285,2257
  1360.     dc.w 2230,2203,2177,2150,2124,2098,2072,2047,2022,1997,1972,1947,1923,1899,1875,1851
  1361.     dc.w 1828,1804,1781,1759,1736,1714,1691,1669,1648,1626,1605,1584,1563,1542,1521,1501
  1362.     dc.w 1481,1461,1441,1421,1402,1383,1364,1345,1327,1308,1290,1272,1254,1236,1219,1202
  1363.     dc.w 1184,1167,1151,1134,1118,1101,1085,1069,1054,1038,1023,1008,993,978,963,948
  1364.     dc.w 934,920,906,892,878,864,851,838,825,812,799,786,773,761,749,737
  1365.     dc.w 725,713,701,690,678,667,656,645,634,624,613,603,592,582,572,562
  1366.     dc.w 552,543,533,524,515,505,496,488,479,470,461,453,445,437,428,420
  1367.     dc.w 413,405,397,390,382,375,368,360,353,346,340,333,326,320,313,307
  1368.     dc.w 301,295,289,283,277,271,265,260,254,249,244,238,233,228,223,218
  1369.     dc.w 213,209,204,199,195,191,186,182,178,174,169,166,162,158,154,150
  1370.     dc.w 147,143,140,136,133,129,126,123,120,117,114,111,108,105,102,100
  1371.     dc.w 97,94,92,89,87,84,82,80,77,75,73,71,69,67,65,63
  1372.     dc.w 61,59,58,56,54,52,51,49,48,46,45,43,42,40,39,38
  1373.     dc.w 37,35,34,33,32,31,30,29,28,27,26,25,24,23,22,21
  1374.     dc.w 20,20,19,18,17,17,16,15,15,14,14,13,13,12,12,11
  1375.     dc.w 11,10,10,9,9,9,8,8,8,7,7,7,6,6,6,5
  1376.     dc.w 5,5,5,5,4,4,4,4,4,4,3,3,3,3,3,3
  1377.     dc.w 3,3,3,2,2,2,2,2,2,2,2,2,2,2,2,2
  1378.     dc.w 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2
  1379.     dc.w 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2
  1380.     dc.w 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2
  1381.     dc.w 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2
  1382.     dc.w 2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3
  1383.     dc.w 3,3,3,3,3,3,3,4,4,4,4,4,4,5,5,5
  1384.     dc.w 5,5,6,6,6,7,7,7,8,8,8,9,9,9,10,10
  1385.     dc.w 11,11,12,12,13,13,14,14,15,15,16,17,17,18,19,20
  1386.     dc.w 20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35
  1387.     dc.w 37,38,39,40,42,43,45,46,48,49,51,52,54,56,58,59
  1388.     dc.w 61,63,65,67,69,71,73,75,77,80,82,84,87,89,92,94
  1389.     dc.w 97,100,102,105,108,111,114,117,120,123,126,129,133,136,140,143
  1390.     dc.w 147,150,154,158,162,166,169,174,178,182,186,191,195,199,204,209
  1391.     dc.w 213,218,223,228,233,238,244,249,254,260,265,271,277,283,289,295
  1392.     dc.w 301,307,313,320,326,333,340,346,353,360,368,375,382,390,397,405
  1393.     dc.w 413,420,428,437,445,453,461,470,479,488,496,505,515,524,533,543
  1394.     dc.w 552,562,572,582,592,603,613,624,634,645,656,667,678,690,701,713
  1395.     dc.w 725,737,749,761,773,786,799,812,825,838,851,864,878,892,906,920
  1396.     dc.w 934,948,963,978,993,1008,1023,1038,1054,1069,1085,1101,1118,1134,1151,1167
  1397.     dc.w 1184,1202,1219,1236,1254,1272,1290,1308,1327,1345,1364,1383,1402,1421,1441,1461
  1398.     dc.w 1481,1501,1521,1542,1563,1584,1605,1626,1648,1669,1691,1714,1736,1759,1781,1804
  1399.     dc.w 1828,1851,1875,1899,1923,1947,1972,1997,2022,2047,2072,2098,2124,2150,2177,2203
  1400.     dc.w 2230,2257,2285,2312,2340,2368,2396,2425,2454,2483,2512,2541,2571,2601,2632,2662
  1401.     dc.w 2693,2724,2755,2787,2818,2850,2883,2915,2948,2981,3015,3048,3082,3116,3151,3185
  1402.     dc.w 3220,3255,3291,3327,3363,3399,3436,3473,3510,3547,3585,3623,3661,3700,3739,3778
  1403.     dc.w 3817,3857,3897,3937,3978,4019,4060,4101,4143,4185,4227,4270,4313,4356,4400,4444
  1404.     dc.w 4488,4532,4577,4622,4667,4713,4759,4805,4852,4899,4946,4994,5042,5090,5138,5187
  1405.     dc.w 5236,5286,5335,5386,5436,5487,5538,5589,5641,5693,5745,5798,5851,5904,5958,6012
  1406.     dc.w 6067,6121,6176,6232,6287,6343,6400,6456,6513,6571,6628,6687,6745,6804,6863,6922
  1407.     dc.w 6982,7042,7103,7163,7224,7286,7348,7410,7473,7535,7599,7662,7726,7791,7855,7920
  1408.     dc.w 7986,8051,8117,8184,8250,8318,8385,8453,8521,8590,8659,8728,8798,8868,8938,9009
  1409.     dc.w 9080,9151,9223,9295,9368,9441,9514,9587,9661,9736,9810,9886,9961,10037,10113,10189
  1410.     dc.w 10266,10344,10421,10499,10578,10656,10735,10815,10895,10975,11056,11136,11218,11299,11381,11464
  1411.     dc.w 11547,11630,11713,11797,11881,11966,12051,12136,12222,12308,12395,12482,12569,12656,12744,12832
  1412.     dc.w 12921,13010,13100,13189,13279,13370,13461,13552,13644,13736,13828,13921,14014,14107,14201,14295
  1413.     dc.w 14389,14484,14579,14675,14771,14867,14964,15061,15158,15256,15354,15453,15552,15651,15750,15850
  1414.     dc.w 15950,16051,16152,16253,16355,16457,16559,16662,16765,16868,16972,17076,17181,17285,17390,17496
  1415.     dc.w 17602,17708,17814,17921,18028,18136,18244,18352,18461,18569,18679,18788,18898,19008,19119,19230
  1416.     dc.w 19341,19452,19564,19676,19789,19902,20015,20128,20242,20356,20470,20585,20700,20815,20931,21047
  1417.     dc.w 21163,21280,21397,21514,21631,21749,21867,21986,22104,22223,22343,22462,22582,22702,22822,22943
  1418.     dc.w 23064,23185,23307,23429,23551,23673,23796,23919,24042,24166,24289,24414,24538,24662,24787,24912
  1419.     dc.w 25038,25163,25289,25415,25541,25668,25795,25922,26049,26177,26305,26433,26561,26689,26818,26947
  1420.     dc.w 27076,27206,27335,27465,27595,27725,27856,27987,28118,28249,28380,28512,28643,28775,28907,29040
  1421.     dc.w 29172,29305,29438,29571,29704,29837,29971,30105,30239,30373,30507,30642,30776,30911,31046,31181
  1422.     dc.w 31316,31452,31587,31723,31859,31995,32131,32267,32403,32540,32676,32813,32950,33087,33224,33361
  1423.     dc.w 33498,33636,33773,33911,34049,34187,34324,34462,34600,34739,34877,35015,35154,35292,35431,35569
  1424.     dc.w 35708,35847,35985,36124,36263,36402,36541,36680,36819,36958,37097,37237,37376,37515,37654,37793
  1425.     dc.w 37933,38072,38211,38351,38490,38629,38769,38908,39047,39186,39326,39465,39604,39743,39882,40021
  1426.     dc.w 40161,40300,40439,40578,40716,40855,40994,41133,41272,41410,41549,41687,41826,41964,42102,42240
  1427.     dc.w 42378,42516,42654,42792,42930,43067,43205,43342,43479,43616,43753,43890,44027,44163,44300,44436
  1428.     dc.w 44572,44708,44844,44980,45115,45251,45386,45521,45656,45791,45925,46059,46194,46328,46461,46595
  1429.     dc.w 46728,46862,46995,47127,47260,47392,47524,47656,47788,47919,48050,48181,48312,48443,48573,48703
  1430.     dc.w 48832,48962,49091,49220,49349,49477,49605,49733,49860,49988,50115,50241,50368,50494,50619,50745
  1431.     dc.w 50870,50995,51119,51244,51367,51491,51614,51737,51859,51982,52103,52225,52346,52467,52587,52707
  1432.     dc.w 52827,52946,53065,53184,53302,53420,53537,53654,53771,53887,54003,54118,54233,54347,54462,54575
  1433.     dc.w 54689,54802,54914,55026,55138,55249,55360,55470,55580,55689,55798,55906,56014,56122,56229,56336
  1434.     dc.w 56442,56547,56653,56757,56862,56965,57069,57171,57273,57375,57476,57577,57677,57777,57876,57975
  1435.     dc.w 58073,58171,58268,58364,58460,58556,58651,58745,58839,58932,59025,59117,59209,59300,59390,59480
  1436.     dc.w 59570,59658,59747,59834,59921,60008,60094,60179,60264,60348,60431,60514,60597,60678,60760,60840
  1437.     dc.w 60920,60999,61078,61156,61234,61310,61387,61462,61537,61611,61685,61758,61830,61902,61973,62044
  1438.     dc.w 62113,62183,62251,62319,62386,62453,62519,62584,62648,62712,62775,62838,62900,62961,63021,63081
  1439.     dc.w 63140,63199,63257,63314,63370,63426,63481,63535,63589,63642,63694,63745,63796,63846,63896,63944
  1440.     dc.w 63992,64040,64086,64132,64177,64222,64265,64308,64350,64392,64433,64473,64512,64551,64589,64626
  1441.     dc.w 64662,64698,64733,64767,64801,64834,64866,64897,64927,64957,64986,65015,65042,65069,65095,65120
  1442.     dc.w 65145,65169,65192,65214,65236,65257,65277,65296,65315,65333,65350,65366,65381,65396,65410,65424
  1443.     dc.w 65436,65448,65459,65469,65479,65487,65495,65503,65509,65515,65520,65524,65527,65530,65532,65533
  1444. sinsin4096amp16bit
  1445.     dc.w 32768,32925,33083,33241,33399,33557,33715,33873,34030,34188,34346,34504,34661,34819,34976,35134
  1446.     dc.w 35291,35449,35606,35763,35920,36077,36234,36391,36548,36705,36861,37018,37174,37330,37486,37643
  1447.     dc.w 37798,37954,38110,38265,38421,38576,38731,38886,39041,39195,39350,39504,39658,39812,39966,40119
  1448.     dc.w 40273,40426,40579,40732,40884,41037,41189,41341,41493,41644,41796,41947,42097,42248,42398,42549
  1449.     dc.w 42698,42848,42997,43147,43295,43444,43592,43740,43888,44036,44183,44330,44476,44623,44769,44914
  1450.     dc.w 45060,45205,45350,45494,45638,45782,45926,46069,46212,46354,46497,46638,46780,46921,47062,47202
  1451.     dc.w 47342,47482,47621,47760,47899,48037,48175,48312,48450,48586,48723,48858,48994,49129,49264,49398
  1452.     dc.w 49532,49665,49798,49931,50063,50195,50326,50457,50588,50718,50847,50977,51105,51234,51361,51489
  1453.     dc.w 51616,51742,51868,51994,52119,52243,52367,52491,52614,52737,52859,52981,53102,53223,53343,53463
  1454.     dc.w 53582,53701,53819,53937,54054,54171,54287,54402,54518,54632,54746,54860,54973,55086,55198,55309
  1455.     dc.w 55420,55530,55640,55750,55858,55967,56074,56181,56288,56394,56500,56604,56709,56813,56916,57018
  1456.     dc.w 57121,57222,57323,57423,57523,57622,57721,57819,57917,58014,58110,58206,58301,58395,58489,58583
  1457.     dc.w 58676,58768,58859,58951,59041,59131,59220,59309,59397,59484,59571,59657,59743,59828,59912,59996
  1458.     dc.w 60079,60161,60243,60325,60405,60485,60565,60644,60722,60799,60876,60953,61028,61103,61178,61252
  1459.     dc.w 61325,61398,61469,61541,61612,61682,61751,61820,61888,61955,62022,62089,62154,62219,62284,62347
  1460.     dc.w 62410,62473,62535,62596,62656,62716,62776,62834,62892,62950,63006,63062,63118,63173,63227,63280
  1461.     dc.w 63333,63385,63437,63488,63538,63588,63637,63685,63733,63780,63827,63873,63918,63962,64006,64050
  1462.     dc.w 64092,64134,64176,64216,64257,64296,64335,64373,64411,64448,64484,64520,64555,64589,64623,64656
  1463.     dc.w 64689,64720,64752,64782,64812,64842,64870,64899,64926,64953,64979,65005,65030,65054,65078,65101
  1464.     dc.w 65124,65146,65167,65188,65208,65227,65246,65264,65282,65299,65315,65331,65347,65361,65375,65389
  1465.     dc.w 65401,65413,65425,65436,65447,65456,65466,65474,65482,65490,65496,65503,65508,65514,65518,65522
  1466.     dc.w 65525,65528,65530,65532,65533,65533,65533,65533,65531,65530,65527,65524,65521,65517,65512,65507
  1467.     dc.w 65501,65495,65488,65481,65473,65464,65455,65446,65436,65425,65414,65402,65390,65377,65364,65350
  1468.     dc.w 65336,65321,65305,65289,65273,65256,65238,65220,65202,65183,65163,65143,65123,65102,65080,65058
  1469.     dc.w 65035,65012,64989,64965,64940,64915,64890,64864,64837,64810,64783,64755,64727,64698,64669,64639
  1470.     dc.w 64609,64578,64547,64515,64483,64451,64418,64384,64350,64316,64281,64246,64211,64175,64138,64101
  1471.     dc.w 64064,64026,63988,63949,63910,63871,63831,63791,63750,63709,63667,63625,63583,63540,63497,63454
  1472.     dc.w 63410,63366,63321,63276,63230,63185,63138,63092,63045,62998,62950,62902,62853,62805,62756,62706
  1473.     dc.w 62656,62606,62555,62505,62453,62402,62350,62298,62245,62192,62139,62085,62031,61977,61923,61868
  1474.     dc.w 61812,61757,61701,61645,61589,61532,61475,61418,61360,61302,61244,61185,61127,61067,61008,60948
  1475.     dc.w 60889,60828,60768,60707,60646,60585,60523,60462,60400,60337,60275,60212,60149,60086,60022,59958
  1476.     dc.w 59894,59830,59765,59701,59636,59571,59505,59440,59374,59308,59241,59175,59108,59041,58974,58907
  1477.     dc.w 58839,58771,58704,58635,58567,58499,58430,58361,58292,58223,58153,58084,58014,57944,57874,57804
  1478.     dc.w 57733,57663,57592,57521,57450,57379,57307,57236,57164,57092,57020,56948,56876,56804,56731,56659
  1479.     dc.w 56586,56513,56440,56367,56293,56220,56147,56073,55999,55926,55852,55778,55703,55629,55555,55480
  1480.     dc.w 55406,55331,55257,55182,55107,55032,54957,54882,54807,54731,54656,54581,54505,54430,54354,54278
  1481.     dc.w 54203,54127,54051,53975,53899,53823,53747,53671,53595,53519,53442,53366,53290,53213,53137,53061
  1482.     dc.w 52984,52908,52831,52755,52678,52602,52525,52449,52372,52295,52219,52142,52065,51989,51912,51835
  1483.     dc.w 51759,51682,51605,51529,51452,51376,51299,51222,51146,51069,50993,50916,50840,50763,50687,50610
  1484.     dc.w 50534,50457,50381,50305,50228,50152,50076,50000,49924,49848,49772,49696,49620,49544,49468,49392
  1485.     dc.w 49316,49241,49165,49089,49014,48939,48863,48788,48713,48637,48562,48487,48412,48337,48262,48188
  1486.     dc.w 48113,48038,47964,47889,47815,47741,47667,47593,47519,47445,47371,47297,47223,47150,47076,47003
  1487.     dc.w 46930,46857,46784,46711,46638,46565,46492,46420,46347,46275,46203,46131,46059,45987,45915,45844
  1488.     dc.w 45772,45701,45630,45558,45487,45417,45346,45275,45205,45134,45064,44994,44924,44854,44784,44715
  1489.     dc.w 44645,44576,44507,44438,44369,44300,44232,44163,44095,44027,43959,43891,43823,43756,43688,43621
  1490.     dc.w 43554,43487,43420,43353,43287,43220,43154,43088,43022,42957,42891,42826,42761,42696,42631,42566
  1491.     dc.w 42501,42437,42373,42309,42245,42181,42118,42054,41991,41928,41865,41803,41740,41678,41616,41554
  1492.     dc.w 41492,41430,41369,41308,41247,41186,41125,41065,41004,40944,40884,40825,40765,40706,40646,40587
  1493.     dc.w 40529,40470,40412,40353,40295,40238,40180,40122,40065,40008,39951,39895,39838,39782,39726,39670
  1494.     dc.w 39614,39559,39503,39448,39394,39339,39284,39230,39176,39122,39069,39015,38962,38909,38856,38803
  1495.     dc.w 38751,38699,38647,38595,38544,38492,38441,38390,38339,38289,38239,38188,38139,38089,38039,37990
  1496.     dc.w 37941,37892,37844,37795,37747,37699,37652,37604,37557,37510,37463,37416,37370,37324,37278,37232
  1497.     dc.w 37186,37141,37096,37051,37007,36962,36918,36874,36830,36787,36743,36700,36657,36615,36572,36530
  1498.     dc.w 36488,36447,36405,36364,36323,36282,36241,36201,36161,36121,36081,36042,36002,35963,35925,35886
  1499.     dc.w 35848,35810,35772,35734,35697,35660,35623,35586,35550,35513,35477,35442,35406,35371,35336,35301
  1500.     dc.w 35266,35232,35198,35164,35130,35097,35063,35030,34998,34965,34933,34901,34869,34838,34806,34775
  1501.     dc.w 34744,34714,34683,34653,34623,34593,34564,34535,34506,34477,34449,34420,34392,34364,34337,34310
  1502.     dc.w 34282,34256,34229,34203,34176,34151,34125,34099,34074,34049,34025,34000,33976,33952,33928,33905
  1503.     dc.w 33881,33858,33836,33813,33791,33769,33747,33725,33704,33683,33662,33641,33621,33601,33581,33561
  1504.     dc.w 33542,33522,33503,33485,33466,33448,33430,33412,33395,33377,33360,33344,33327,33311,33295,33279
  1505.     dc.w 33263,33248,33233,33218,33203,33189,33175,33161,33147,33134,33120,33108,33095,33082,33070,33058
  1506.     dc.w 33046,33035,33024,33013,33002,32991,32981,32971,32961,32952,32942,32933,32924,32916,32907,32899
  1507.     dc.w 32891,32884,32876,32869,32862,32856,32849,32843,32837,32832,32826,32821,32816,32811,32807,32802
  1508.     dc.w 32799,32795,32791,32788,32785,32782,32780,32777,32775,32773,32772,32771,32769,32769,32768,32768
  1509.     dc.w 32768,32768,32768,32769,32769,32771,32772,32773,32775,32777,32780,32782,32785,32788,32791,32795
  1510.     dc.w 32799,32802,32807,32811,32816,32821,32826,32832,32837,32843,32849,32856,32862,32869,32876,32884
  1511.     dc.w 32891,32899,32907,32916,32924,32933,32942,32952,32961,32971,32981,32991,33002,33013,33024,33035
  1512.     dc.w 33046,33058,33070,33082,33095,33108,33120,33134,33147,33161,33175,33189,33203,33218,33233,33248
  1513.     dc.w 33263,33279,33295,33311,33327,33344,33360,33377,33395,33412,33430,33448,33466,33485,33503,33522
  1514.     dc.w 33542,33561,33581,33601,33621,33641,33662,33683,33704,33725,33747,33769,33791,33813,33836,33858
  1515.     dc.w 33881,33905,33928,33952,33976,34000,34025,34049,34074,34099,34125,34151,34176,34203,34229,34256
  1516.     dc.w 34282,34310,34337,34364,34392,34420,34449,34477,34506,34535,34564,34593,34623,34653,34683,34714
  1517.     dc.w 34744,34775,34806,34838,34869,34901,34933,34965,34998,35030,35063,35097,35130,35164,35198,35232
  1518.     dc.w 35266,35301,35336,35371,35406,35442,35477,35513,35550,35586,35623,35660,35697,35734,35772,35810
  1519.     dc.w 35848,35886,35925,35963,36002,36042,36081,36121,36161,36201,36241,36282,36323,36364,36405,36447
  1520.     dc.w 36488,36530,36572,36615,36657,36700,36743,36787,36830,36874,36918,36962,37007,37051,37096,37141
  1521.     dc.w 37186,37232,37278,37324,37370,37416,37463,37510,37557,37604,37652,37699,37747,37795,37844,37892
  1522.     dc.w 37941,37990,38039,38089,38139,38188,38239,38289,38339,38390,38441,38492,38544,38595,38647,38699
  1523.     dc.w 38751,38803,38856,38909,38962,39015,39069,39122,39176,39230,39284,39339,39394,39448,39503,39559
  1524.     dc.w 39614,39670,39726,39782,39838,39895,39951,40008,40065,40122,40180,40238,40295,40353,40412,40470
  1525.     dc.w 40529,40587,40646,40706,40765,40825,40884,40944,41004,41065,41125,41186,41247,41308,41369,41430
  1526.     dc.w 41492,41554,41616,41678,41740,41803,41865,41928,41991,42054,42118,42181,42245,42309,42373,42437
  1527.     dc.w 42501,42566,42631,42696,42761,42826,42891,42957,43022,43088,43154,43220,43287,43353,43420,43487
  1528.     dc.w 43554,43621,43688,43756,43823,43891,43959,44027,44095,44163,44232,44300,44369,44438,44507,44576
  1529.     dc.w 44645,44715,44784,44854,44924,44994,45064,45134,45205,45275,45346,45417,45487,45558,45630,45701
  1530.     dc.w 45772,45844,45915,45987,46059,46131,46203,46275,46347,46420,46492,46565,46638,46711,46784,46857
  1531.     dc.w 46930,47003,47076,47150,47223,47297,47371,47445,47519,47593,47667,47741,47815,47889,47964,48038
  1532.     dc.w 48113,48188,48262,48337,48412,48487,48562,48637,48713,48788,48863,48939,49014,49089,49165,49241
  1533.     dc.w 49316,49392,49468,49544,49620,49696,49772,49848,49924,50000,50076,50152,50228,50305,50381,50457
  1534.     dc.w 50534,50610,50687,50763,50840,50916,50993,51069,51146,51222,51299,51376,51452,51529,51605,51682
  1535.     dc.w 51759,51835,51912,51989,52065,52142,52219,52295,52372,52449,52525,52602,52678,52755,52831,52908
  1536.     dc.w 52984,53061,53137,53213,53290,53366,53442,53519,53595,53671,53747,53823,53899,53975,54051,54127
  1537.     dc.w 54203,54278,54354,54430,54505,54581,54656,54731,54807,54882,54957,55032,55107,55182,55257,55331
  1538.     dc.w 55406,55480,55555,55629,55703,55778,55852,55926,55999,56073,56147,56220,56293,56367,56440,56513
  1539.     dc.w 56586,56659,56731,56804,56876,56948,57020,57092,57164,57236,57307,57379,57450,57521,57592,57663
  1540.     dc.w 57733,57804,57874,57944,58014,58084,58153,58223,58292,58361,58430,58499,58567,58635,58704,58771
  1541.     dc.w 58839,58907,58974,59041,59108,59175,59241,59308,59374,59440,59505,59571,59636,59701,59765,59830
  1542.     dc.w 59894,59958,60022,60086,60149,60212,60275,60337,60400,60462,60523,60585,60646,60707,60768,60828
  1543.     dc.w 60889,60948,61008,61067,61127,61185,61244,61302,61360,61418,61475,61532,61589,61645,61701,61757
  1544.     dc.w 61812,61868,61923,61977,62031,62085,62139,62192,62245,62298,62350,62402,62453,62505,62555,62606
  1545.     dc.w 62656,62706,62756,62805,62853,62902,62950,62998,63045,63092,63138,63185,63230,63276,63321,63366
  1546.     dc.w 63410,63454,63497,63540,63583,63625,63667,63709,63750,63791,63831,63871,63910,63949,63988,64026
  1547.     dc.w 64064,64101,64138,64175,64211,64246,64281,64316,64350,64384,64418,64451,64483,64515,64547,64578
  1548.     dc.w 64609,64639,64669,64698,64727,64755,64783,64810,64837,64864,64890,64915,64940,64965,64989,65012
  1549.     dc.w 65035,65058,65080,65102,65123,65143,65163,65183,65202,65220,65238,65256,65273,65289,65305,65321
  1550.     dc.w 65336,65350,65364,65377,65390,65402,65414,65425,65436,65446,65455,65464,65473,65481,65488,65495
  1551.     dc.w 65501,65507,65512,65517,65521,65524,65527,65530,65531,65533,65533,65533,65533,65532,65530,65528
  1552.     dc.w 65525,65522,65518,65514,65508,65503,65496,65490,65482,65474,65466,65456,65447,65436,65425,65413
  1553.     dc.w 65401,65389,65375,65361,65347,65331,65315,65299,65282,65264,65246,65227,65208,65188,65167,65146
  1554.     dc.w 65124,65101,65078,65054,65030,65005,64979,64953,64926,64899,64870,64842,64812,64782,64752,64720
  1555.     dc.w 64689,64656,64623,64589,64555,64520,64484,64448,64411,64373,64335,64296,64257,64216,64176,64134
  1556.     dc.w 64092,64050,64006,63962,63918,63873,63827,63780,63733,63685,63637,63588,63538,63488,63437,63385
  1557.     dc.w 63333,63280,63227,63173,63118,63062,63006,62950,62892,62834,62776,62716,62656,62596,62535,62473
  1558.     dc.w 62410,62347,62284,62219,62154,62089,62022,61955,61888,61820,61751,61682,61612,61541,61469,61398
  1559.     dc.w 61325,61252,61178,61103,61028,60953,60876,60799,60722,60644,60565,60485,60405,60325,60243,60161
  1560.     dc.w 60079,59996,59912,59828,59743,59657,59571,59484,59397,59309,59220,59131,59041,58951,58859,58768
  1561.     dc.w 58676,58583,58489,58395,58301,58206,58110,58014,57917,57819,57721,57622,57523,57423,57323,57222
  1562.     dc.w 57121,57018,56916,56813,56709,56604,56500,56394,56288,56181,56074,55967,55858,55750,55640,55530
  1563.     dc.w 55420,55309,55198,55086,54973,54860,54746,54632,54518,54402,54287,54171,54054,53937,53819,53701
  1564.     dc.w 53582,53463,53343,53223,53102,52981,52859,52737,52614,52491,52367,52243,52119,51994,51868,51742
  1565.     dc.w 51616,51489,51361,51234,51105,50977,50847,50718,50588,50457,50326,50195,50063,49931,49798,49665
  1566.     dc.w 49532,49398,49264,49129,48994,48858,48723,48586,48450,48312,48175,48037,47899,47760,47621,47482
  1567.     dc.w 47342,47202,47062,46921,46780,46638,46497,46354,46212,46069,45926,45782,45638,45494,45350,45205
  1568.     dc.w 45060,44914,44769,44623,44476,44330,44183,44036,43888,43740,43592,43444,43295,43147,42997,42848
  1569.     dc.w 42698,42549,42398,42248,42097,41947,41796,41644,41493,41341,41189,41037,40884,40732,40579,40426
  1570.     dc.w 40273,40119,39966,39812,39658,39504,39350,39195,39041,38886,38731,38576,38421,38265,38110,37954
  1571.     dc.w 37798,37643,37486,37330,37174,37018,36861,36705,36548,36391,36234,36077,35920,35763,35606,35449
  1572.     dc.w 35291,35134,34976,34819,34661,34504,34346,34188,34030,33873,33715,33557,33399,33241,33083,32925
  1573.     dc.w 32768,32610,32452,32294,32136,31978,31820,31662,31505,31347,31189,31031,30874,30716,30559,30401
  1574.     dc.w 30244,30086,29929,29772,29615,29458,29301,29144,28987,28830,28674,28517,28361,28205,28049,27892
  1575.     dc.w 27737,27581,27425,27270,27114,26959,26804,26649,26494,26340,26185,26031,25877,25723,25569,25416
  1576.     dc.w 25262,25109,24956,24803,24651,24498,24346,24194,24042,23891,23739,23588,23438,23287,23137,22986
  1577.     dc.w 22837,22687,22538,22388,22240,22091,21943,21795,21647,21499,21352,21205,21059,20912,20766,20621
  1578.     dc.w 20475,20330,20185,20041,19897,19753,19609,19466,19323,19181,19038,18897,18755,18614,18473,18333
  1579.     dc.w 18193,18053,17914,17775,17636,17498,17360,17223,17085,16949,16812,16677,16541,16406,16271,16137
  1580.     dc.w 16003,15870,15737,15604,15472,15340,15209,15078,14947,14817,14688,14558,14430,14301,14174,14046
  1581.     dc.w 13919,13793,13667,13541,13416,13292,13168,13044,12921,12798,12676,12554,12433,12312,12192,12072
  1582.     dc.w 11953,11834,11716,11598,11481,11364,11248,11133,11017,10903,10789,10675,10562,10449,10337,10226
  1583.     dc.w 10115,10005,9895,9785,9677,9568,9461,9354,9247,9141,9035,8931,8826,8722,8619,8517
  1584.     dc.w 8414,8313,8212,8112,8012,7913,7814,7716,7618,7521,7425,7329,7234,7140,7046,6952
  1585.     dc.w 6859,6767,6676,6584,6494,6404,6315,6226,6138,6051,5964,5878,5792,5707,5623,5539
  1586.     dc.w 5456,5374,5292,5210,5130,5050,4970,4891,4813,4736,4659,4582,4507,4432,4357,4283
  1587.     dc.w 4210,4137,4066,3994,3923,3853,3784,3715,3647,3580,3513,3446,3381,3316,3251,3188
  1588.     dc.w 3125,3062,3000,2939,2879,2819,2759,2701,2643,2585,2529,2473,2417,2362,2308,2255
  1589.     dc.w 2202,2150,2098,2047,1997,1947,1898,1850,1802,1755,1708,1662,1617,1573,1529,1485
  1590.     dc.w 1443,1401,1359,1319,1278,1239,1200,1162,1124,1087,1051,1015,980,946,912,879
  1591.     dc.w 846,815,783,753,723,693,665,636,609,582,556,530,505,481,457,434
  1592.     dc.w 411,389,368,347,327,308,289,271,253,236,220,204,188,174,160,146
  1593.     dc.w 134,122,110,99,88,79,69,61,53,45,39,32,27,21,17,13
  1594.     dc.w 10,7,5,3,2,2,2,2,4,5,8,11,14,18,23,28
  1595.     dc.w 34,40,47,54,62,71,80,89,99,110,121,133,145,158,171,185
  1596.     dc.w 199,214,230,246,262,279,297,315,333,352,372,392,412,433,455,477
  1597.     dc.w 500,523,546,570,595,620,645,671,698,725,752,780,808,837,866,896
  1598.     dc.w 926,957,988,1020,1052,1084,1117,1151,1185,1219,1254,1289,1324,1360,1397,1434
  1599.     dc.w 1471,1509,1547,1586,1625,1664,1704,1744,1785,1826,1868,1910,1952,1995,2038,2081
  1600.     dc.w 2125,2169,2214,2259,2305,2350,2397,2443,2490,2537,2585,2633,2682,2730,2779,2829
  1601.     dc.w 2879,2929,2980,3030,3082,3133,3185,3237,3290,3343,3396,3450,3504,3558,3612,3667
  1602.     dc.w 3723,3778,3834,3890,3946,4003,4060,4117,4175,4233,4291,4350,4408,4468,4527,4587
  1603.     dc.w 4646,4707,4767,4828,4889,4950,5012,5073,5135,5198,5260,5323,5386,5449,5513,5577
  1604.     dc.w 5641,5705,5770,5834,5899,5964,6030,6095,6161,6227,6294,6360,6427,6494,6561,6628
  1605.     dc.w 6696,6764,6831,6900,6968,7036,7105,7174,7243,7312,7382,7451,7521,7591,7661,7731
  1606.     dc.w 7802,7872,7943,8014,8085,8156,8228,8299,8371,8443,8515,8587,8659,8731,8804,8876
  1607.     dc.w 8949,9022,9095,9168,9242,9315,9388,9462,9536,9609,9683,9757,9832,9906,9980,10055
  1608.     dc.w 10129,10204,10278,10353,10428,10503,10578,10653,10728,10804,10879,10954,11030,11105,11181,11257
  1609.     dc.w 11332,11408,11484,11560,11636,11712,11788,11864,11940,12016,12093,12169,12245,12322,12398,12474
  1610.     dc.w 12551,12627,12704,12780,12857,12933,13010,13086,13163,13240,13316,13393,13470,13546,13623,13700
  1611.     dc.w 13776,13853,13930,14006,14083,14159,14236,14313,14389,14466,14542,14619,14695,14772,14848,14925
  1612.     dc.w 15001,15078,15154,15230,15307,15383,15459,15535,15611,15687,15763,15839,15915,15991,16067,16143
  1613.     dc.w 16219,16294,16370,16446,16521,16596,16672,16747,16822,16898,16973,17048,17123,17198,17273,17347
  1614.     dc.w 17422,17497,17571,17646,17720,17794,17868,17942,18016,18090,18164,18238,18312,18385,18459,18532
  1615.     dc.w 18605,18678,18751,18824,18897,18970,19043,19115,19188,19260,19332,19404,19476,19548,19620,19691
  1616.     dc.w 19763,19834,19905,19977,20048,20118,20189,20260,20330,20401,20471,20541,20611,20681,20751,20820
  1617.     dc.w 20890,20959,21028,21097,21166,21235,21303,21372,21440,21508,21576,21644,21712,21779,21847,21914
  1618.     dc.w 21981,22048,22115,22182,22248,22315,22381,22447,22513,22578,22644,22709,22774,22839,22904,22969
  1619.     dc.w 23034,23098,23162,23226,23290,23354,23417,23481,23544,23607,23670,23732,23795,23857,23919,23981
  1620.     dc.w 24043,24105,24166,24227,24288,24349,24410,24470,24531,24591,24651,24710,24770,24829,24889,24948
  1621.     dc.w 25006,25065,25123,25182,25240,25297,25355,25413,25470,25527,25584,25640,25697,25753,25809,25865
  1622.     dc.w 25921,25976,26032,26087,26141,26196,26251,26305,26359,26413,26466,26520,26573,26626,26679,26732
  1623.     dc.w 26784,26836,26888,26940,26991,27043,27094,27145,27196,27246,27296,27347,27396,27446,27496,27545
  1624.     dc.w 27594,27643,27691,27740,27788,27836,27883,27931,27978,28025,28072,28119,28165,28211,28257,28303
  1625.     dc.w 28349,28394,28439,28484,28528,28573,28617,28661,28705,28748,28792,28835,28878,28920,28963,29005
  1626.     dc.w 29047,29088,29130,29171,29212,29253,29294,29334,29374,29414,29454,29493,29533,29572,29610,29649
  1627.     dc.w 29687,29725,29763,29801,29838,29875,29912,29949,29985,30022,30058,30093,30129,30164,30199,30234
  1628.     dc.w 30269,30303,30337,30371,30405,30438,30472,30505,30537,30570,30602,30634,30666,30697,30729,30760
  1629.     dc.w 30791,30821,30852,30882,30912,30942,30971,31000,31029,31058,31086,31115,31143,31171,31198,31225
  1630.     dc.w 31253,31279,31306,31332,31359,31384,31410,31436,31461,31486,31510,31535,31559,31583,31607,31630
  1631.     dc.w 31654,31677,31699,31722,31744,31766,31788,31810,31831,31852,31873,31894,31914,31934,31954,31974
  1632.     dc.w 31993,32013,32032,32050,32069,32087,32105,32123,32140,32158,32175,32191,32208,32224,32240,32256
  1633.     dc.w 32272,32287,32302,32317,32332,32346,32360,32374,32388,32401,32415,32427,32440,32453,32465,32477
  1634.     dc.w 32489,32500,32511,32522,32533,32544,32554,32564,32574,32583,32593,32602,32611,32619,32628,32636
  1635.     dc.w 32644,32651,32659,32666,32673,32679,32686,32692,32698,32703,32709,32714,32719,32724,32728,32733
  1636.     dc.w 32736,32740,32744,32747,32750,32753,32755,32758,32760,32762,32763,32764,32766,32766,32767,32767
  1637.     dc.w 32767,32767,32767,32766,32766,32764,32763,32762,32760,32758,32755,32753,32750,32747,32744,32740
  1638.     dc.w 32736,32733,32728,32724,32719,32714,32709,32703,32698,32692,32686,32679,32673,32666,32659,32651
  1639.     dc.w 32644,32636,32628,32619,32611,32602,32593,32583,32574,32564,32554,32544,32533,32522,32511,32500
  1640.     dc.w 32489,32477,32465,32453,32440,32427,32415,32401,32388,32374,32360,32346,32332,32317,32302,32287
  1641.     dc.w 32272,32256,32240,32224,32208,32191,32175,32158,32140,32123,32105,32087,32069,32050,32032,32013
  1642.     dc.w 31993,31974,31954,31934,31914,31894,31873,31852,31831,31810,31788,31766,31744,31722,31699,31677
  1643.     dc.w 31654,31630,31607,31583,31559,31535,31510,31486,31461,31436,31410,31384,31359,31332,31306,31279
  1644.     dc.w 31253,31225,31198,31171,31143,31115,31086,31058,31029,31000,30971,30942,30912,30882,30852,30821
  1645.     dc.w 30791,30760,30729,30697,30666,30634,30602,30570,30537,30505,30472,30438,30405,30371,30337,30303
  1646.     dc.w 30269,30234,30199,30164,30129,30093,30058,30022,29985,29949,29912,29875,29838,29801,29763,29725
  1647.     dc.w 29687,29649,29610,29572,29533,29493,29454,29414,29374,29334,29294,29253,29212,29171,29130,29088
  1648.     dc.w 29047,29005,28963,28920,28878,28835,28792,28748,28705,28661,28617,28573,28528,28484,28439,28394
  1649.     dc.w 28349,28303,28257,28211,28165,28119,28072,28025,27978,27931,27883,27836,27788,27740,27691,27643
  1650.     dc.w 27594,27545,27496,27446,27396,27347,27296,27246,27196,27145,27094,27043,26991,26940,26888,26836
  1651.     dc.w 26784,26732,26679,26626,26573,26520,26466,26413,26359,26305,26251,26196,26141,26087,26032,25976
  1652.     dc.w 25921,25865,25809,25753,25697,25640,25584,25527,25470,25413,25355,25297,25240,25182,25123,25065
  1653.     dc.w 25006,24948,24889,24829,24770,24710,24651,24591,24531,24470,24410,24349,24288,24227,24166,24105
  1654.     dc.w 24043,23981,23919,23857,23795,23732,23670,23607,23544,23481,23417,23354,23290,23226,23162,23098
  1655.     dc.w 23034,22969,22904,22839,22774,22709,22644,22578,22513,22447,22381,22315,22248,22182,22115,22048
  1656.     dc.w 21981,21914,21847,21779,21712,21644,21576,21508,21440,21372,21303,21235,21166,21097,21028,20959
  1657.     dc.w 20890,20820,20751,20681,20611,20541,20471,20401,20330,20260,20189,20118,20048,19977,19905,19834
  1658.     dc.w 19763,19691,19620,19548,19476,19404,19332,19260,19188,19115,19043,18970,18897,18824,18751,18678
  1659.     dc.w 18605,18532,18459,18385,18312,18238,18164,18090,18016,17942,17868,17794,17720,17646,17571,17497
  1660.     dc.w 17422,17347,17273,17198,17123,17048,16973,16898,16822,16747,16672,16596,16521,16446,16370,16294
  1661.     dc.w 16219,16143,16067,15991,15915,15839,15763,15687,15611,15535,15459,15383,15307,15230,15154,15078
  1662.     dc.w 15001,14925,14848,14772,14695,14619,14542,14466,14389,14313,14236,14159,14083,14006,13930,13853
  1663.     dc.w 13776,13700,13623,13546,13470,13393,13316,13240,13163,13086,13010,12933,12857,12780,12704,12627
  1664.     dc.w 12551,12474,12398,12322,12245,12169,12093,12016,11940,11864,11788,11712,11636,11560,11484,11408
  1665.     dc.w 11332,11257,11181,11105,11030,10954,10879,10804,10728,10653,10578,10503,10428,10353,10278,10204
  1666.     dc.w 10129,10055,9980,9906,9832,9757,9683,9609,9536,9462,9388,9315,9242,9168,9095,9022
  1667.     dc.w 8949,8876,8804,8731,8659,8587,8515,8443,8371,8299,8228,8156,8085,8014,7943,7872
  1668.     dc.w 7802,7731,7661,7591,7521,7451,7382,7312,7243,7174,7105,7036,6968,6900,6831,6764
  1669.     dc.w 6696,6628,6561,6494,6427,6360,6294,6227,6161,6095,6030,5964,5899,5834,5770,5705
  1670.     dc.w 5641,5577,5513,5449,5386,5323,5260,5198,5135,5073,5012,4950,4889,4828,4767,4707
  1671.     dc.w 4646,4587,4527,4468,4408,4350,4291,4233,4175,4117,4060,4003,3946,3890,3834,3778
  1672.     dc.w 3723,3667,3612,3558,3504,3450,3396,3343,3290,3237,3185,3133,3082,3030,2980,2929
  1673.     dc.w 2879,2829,2779,2730,2682,2633,2585,2537,2490,2443,2397,2350,2305,2259,2214,2169
  1674.     dc.w 2125,2081,2038,1995,1952,1910,1868,1826,1785,1744,1704,1664,1625,1586,1547,1509
  1675.     dc.w 1471,1434,1397,1360,1324,1289,1254,1219,1185,1151,1117,1084,1052,1020,988,957
  1676.     dc.w 926,896,866,837,808,780,752,725,698,671,645,620,595,570,546,523
  1677.     dc.w 500,477,455,433,412,392,372,352,333,315,297,279,262,246,230,214
  1678.     dc.w 199,185,171,158,145,133,121,110,99,89,80,71,62,54,47,40
  1679.     dc.w 34,28,23,18,14,11,8,5,4,2,2,2,2,3,5,7
  1680.     dc.w 10,13,17,21,27,32,39,45,53,61,69,79,88,99,110,122
  1681.     dc.w 134,146,160,174,188,204,220,236,253,271,289,308,327,347,368,389
  1682.     dc.w 411,434,457,481,505,530,556,582,609,636,665,693,723,753,783,815
  1683.     dc.w 846,879,912,946,980,1015,1051,1087,1124,1162,1200,1239,1278,1319,1359,1401
  1684.     dc.w 1443,1485,1529,1573,1617,1662,1708,1755,1802,1850,1898,1947,1997,2047,2098,2150
  1685.     dc.w 2202,2255,2308,2362,2417,2473,2529,2585,2643,2701,2759,2819,2879,2939,3000,3062
  1686.     dc.w 3125,3188,3251,3316,3381,3446,3513,3580,3647,3715,3784,3853,3923,3994,4066,4137
  1687.     dc.w 4210,4283,4357,4432,4507,4582,4659,4736,4813,4891,4970,5050,5130,5210,5292,5374
  1688.     dc.w 5456,5539,5623,5707,5792,5878,5964,6051,6138,6226,6315,6404,6494,6584,6676,6767
  1689.     dc.w 6859,6952,7046,7140,7234,7329,7425,7521,7618,7716,7814,7913,8012,8112,8212,8313
  1690.     dc.w 8414,8517,8619,8722,8826,8931,9035,9141,9247,9354,9461,9568,9677,9785,9895,10005
  1691.     dc.w 10115,10226,10337,10449,10562,10675,10789,10903,11017,11133,11248,11364,11481,11598,11716,11834
  1692.     dc.w 11953,12072,12192,12312,12433,12554,12676,12798,12921,13044,13168,13292,13416,13541,13667,13793
  1693.     dc.w 13919,14046,14174,14301,14430,14558,14688,14817,14947,15078,15209,15340,15472,15604,15737,15870
  1694.     dc.w 16003,16137,16271,16406,16541,16677,16812,16949,17085,17223,17360,17498,17636,17775,17914,18053
  1695.     dc.w 18193,18333,18473,18614,18755,18897,19038,19181,19323,19466,19609,19753,19897,20041,20185,20330
  1696.     dc.w 20475,20621,20766,20912,21059,21205,21352,21499,21647,21795,21943,22091,22240,22388,22538,22687
  1697.     dc.w 22837,22986,23137,23287,23438,23588,23739,23891,24042,24194,24346,24498,24651,24803,24956,25109
  1698.     dc.w 25262,25416,25569,25723,25877,26031,26185,26340,26494,26649,26804,26959,27114,27270,27425,27581
  1699.     dc.w 27737,27892,28049,28205,28361,28517,28674,28830,28987,29144,29301,29458,29615,29772,29929,30086
  1700.     dc.w 30244,30401,30559,30716,30874,31031,31189,31347,31505,31662,31820,31978,32136,32294,32452,32610
  1701.  
  1702.  
  1703.     TEXT
  1704. makecodemodifpalette:
  1705.     bra.s .1
  1706. .code   move.w d0,$ffff8240.w
  1707.     move.w d1,$ffff8240.w
  1708.     move.w d2,$ffff8240.w
  1709.     move.w d3,$ffff8240.w
  1710.     move.w d4,$ffff8240.w
  1711. .1
  1712.  
  1713.     lea .code,a0
  1714.     lea codageplan0,a1
  1715.     lea ramcodepalette,a2
  1716.     lea listecodepal,a3 ; 4 pointeur
  1717.     moveq #3,d6
  1718. .loop0
  1719.     move.l a2,(a3)+
  1720.     moveq #0,d0     ; compteur de 0 a 15
  1721.     moveq #15,d7
  1722. .loop1
  1723.     move.b (a1)+,d1
  1724.     ext.w d1
  1725.     add.w d1,d1
  1726.     add.w d1,d1
  1727.     move.l (a0,d1),d2
  1728.     add d0,d2
  1729.     move.l d2,(a2)+         ; codage couleur
  1730.     addq #2,d0
  1731.     dbf d7,.loop1
  1732.     move.w #$4e75,(a2)+
  1733.     dbf d6,.loop0
  1734.  
  1735.  
  1736.     lea selplantab,a0
  1737.     lea listecodepal,a3
  1738.     moveq #0,d1
  1739. .12 move.w #nbscreen-1,d0
  1740.     move.l (a3)+,d2
  1741. .loop2
  1742.     move.w d1,(a0)+
  1743.     move.l d2,(a0)+
  1744.     dbf d0,.loop2
  1745.     addq #2,d1
  1746.     cmp.w #8,d1
  1747.     bne.s .12
  1748.     move.l d2,lastcodepalette
  1749.     moveq #0,d1
  1750.     move.l d1,(a0)+
  1751.     move.w d1,(a0)+     ; marqueur de fin
  1752.     rts
  1753.    
  1754. makecodemodifpalette2           ; version pour metre dans une interuption timer b
  1755.     bra.s .1
  1756. .code1
  1757.     move.w d0,$ffff8240.w       ; couleur 1: 8 fois
  1758. ;   move.w d2,$ffff8240.w       ; couleur 2: 4 fois
  1759. ;   move.w d3,$ffff8240.w       ; couleur 3: 2 fois
  1760. ;   move.w d4,$ffff8240.w       ; couleur
  1761. .code2
  1762.     move.w (a0)+,d0
  1763.     move.w (a0)+,$ffff8240.w
  1764. .1
  1765.  
  1766.     lea .code1,a0
  1767.     lea codageplan0,a1
  1768.     lea ramcodepalette,a2
  1769.     lea listecodepal,a3 ; 4 pointeur
  1770.     moveq #3,d5     ; 4 scan de codeplan0 a codeplan3
  1771. .loop0
  1772.     move.l a2,(a3)+
  1773.     moveq #0,d3         ; couleur a comparer qui va etre 1 a l'instrucion suivante
  1774.     moveq #3-1,d6               ; les 3 premiere couleur sont de type move.w (a0)+,d0 et serie de move.w d0,$824n
  1775. .loop1
  1776.     moveq #0,d0     ; compteur de 0 a 15 registre de couleur
  1777.     moveq #15,d7
  1778.     addq.w #1,d3        ; 1 puis 2, 3
  1779.  
  1780.     move.w .code2,(a2)+         ; move.w (a0)+,d0
  1781. .scan
  1782.     move.b (a1)+,d1
  1783.     cmp d3,d1           ; couleur = couleur x ?
  1784.     beq.s .setcolor
  1785.     addq #2,d0 
  1786.     dbf d7,.scan
  1787.     bra.s .suite1
  1788. .setcolor
  1789.     move.l .code1,d2        ; d2 = move.w d0,$ffff8240.w
  1790.     add d0,d2               ; + numero de couleur
  1791.     move.l d2,(a2)+         ; codage couleur
  1792.     addq #2,d0
  1793.     dbf d7,.scan
  1794. .suite1
  1795.     ;move.w #$4e75,(a2)+
  1796.     lea -16(a1),a1
  1797.     dbf d6,.loop1
  1798.    
  1799.     moveq #0,d0
  1800.     moveq #4,d3         ; derniere couleur qui n'est placé qu'une fois et donc code specifique
  1801.     moveq #15,d7
  1802.     move.l a1,-(sp)
  1803. .scanlastchiffre
  1804.     move.b (a1)+,d1
  1805.     cmp.w d3,d1
  1806.     beq.s .exitscan
  1807.     addq.w #2,d0
  1808.     dbf d7,.scanlastchiffre     ;(un bra.s .scanlastchiffre devrai suffire puisque
  1809.                                 ;y'a obligatoirement un element dans la liste qui correspond
  1810. .exitscan
  1811.     move.l .code2+2,d2      ; move.w (a0)+,$ffff8240.w
  1812.     add d0,d2               ; +numerocolor*2
  1813.     move.l d2,(a2)+
  1814.     move.w #$4e75,(a2)+         ; peut etre faudra metre un rte a la place du rts
  1815.     move.l (sp)+,a1
  1816.     lea 16(a1),a1
  1817.     dbf d5,.loop0
  1818.     rts
  1819.    
  1820. prototyperaster
  1821. ;   move.b #nbligne,$fffffa21.w
  1822. ;   move.l #rasteritsuite,$120.w
  1823.  
  1824.     move.l a0,-(sp)
  1825. ;   move.l ptrpal,a0
  1826.     move.w d0,-(sp)
  1827.    
  1828.     ; code raster palette    jsr rts ? ou dans la routine ?
  1829.    
  1830.    
  1831.     move.w (sp)+,d0
  1832.     move.l (sp)+,a0
  1833.     rte
  1834.    
  1835. ateachvbl
  1836.    
  1837.    
  1838. geredelayvector
  1839.    
  1840.     movem.w listecolor,d0-d4
  1841.     move.l lastcodepalette,a4
  1842.     jsr (a4)
  1843.     move.l selplanpointer,a0
  1844.     move.w (a0)+,d0         ; selplan
  1845.     move.l (a0)+,d1
  1846.     beq.s .1
  1847.     move.l d1,lastcodepalette
  1848.     move.l a0,selplanpointer
  1849.     move.w d0,selplan0
  1850.     rts
  1851. .1
  1852.     move.l #selplantab,a0
  1853.     move.l a0,selplanpointer
  1854.     move.w (a0)+,d0
  1855.     move.l (a0)+,d1
  1856.     move.w d0,selplan0
  1857.     move.l d1,lastcodepalette
  1858.     move.l a0,selplanpointer
  1859.  
  1860. ; psychedelic color change
  1861. ;   movem.w listecolor,d0-d4
  1862. ;   addq.w #1,d1
  1863. ;   addq.w #1,d2
  1864. ;   addq.w #1,d3
  1865. ;   addq.w #1,d4
  1866. ;   movem.w d0-d4,listecolor
  1867.  
  1868.  
  1869.     rts
  1870.  
  1871. prepareRaster1
  1872.     jsr saveIT
  1873. demo
  1874.     move  #$2700,sr
  1875.  
  1876.     move.l #myvbl,$70
  1877.     move.l #plainrte,$68        ; HBL
  1878.     move.l #plainrte,$134       ; mfp timerA
  1879.     move.l #plainrte,$114       ; mfp timerC
  1880.     move.l #plainrte,$110       ; mfp timer D
  1881.     move.l #plainrte,$118       ; acia
  1882.     move.l #my_timer_b,$120     ; mfp timer B
  1883.  
  1884.     clr.b $fffffa07
  1885.     clr.b $fffffa13
  1886.     clr.b $fffffa09
  1887.     clr.b $fffffa15
  1888.  
  1889.  
  1890.     clr.b $fffffa1b     ; stop timerB
  1891.     bset #0,$fffffa07   ; interupt enable timerB
  1892.     bset #0,$fffffa13   ; interupt masque 1=unmask
  1893.     move.b #8,$fffffa21 ; timer B data  1 scanline compteur
  1894.     bclr #3,$fffffa17   ; automatic end of interupt
  1895.     move.b #8,$fffffa1b ; event count mode
  1896.  
  1897.     move.w #$2300,sr
  1898. ;   move.b #$12,$fffffc02
  1899.  
  1900. endlessloop
  1901.     move.w $468.w,d0
  1902. .1  cmp.w $468.w,d0
  1903.     beq.s .1
  1904.     cmp.b #$b9,$fffffc02.w
  1905.     bne.s endlessloop
  1906.    
  1907.     ;dc.l screen1,codechange4
  1908. ;   move.b #$8,$fffffc02.w
  1909.    
  1910.     jsr restoreIT
  1911.    
  1912.     clr.W -(sp)
  1913.     trap #1
  1914.  
  1915. myvbl:
  1916.     move.w #0,$ffff8240.w
  1917.     addq.l #1,$466.w
  1918.     rte
  1919. ; next is an example of timerb taken from evl dhs
  1920.  
  1921. my_timer_b:
  1922.     move.w #$111,$ffff8240.w
  1923.     move.b #2,$fffffa21.w
  1924.     move.l #my_timer_b2,$120.w
  1925.    
  1926.     rept 20
  1927.     nop
  1928.     endr
  1929.    
  1930.     not $ffff8240.w
  1931.     not $ffff8240.w
  1932.     rte
  1933. my_timer_b2:
  1934.     move.w #$444,$ffff8240.w
  1935.     move.b #8,$fffffa21.w
  1936.     move.l #my_timer_b,$120.w
  1937.     rte
  1938. plainrte:
  1939.     rte
  1940.  
  1941. saveIT
  1942.     move.w #$2700,sr
  1943.     lea systeme,a0
  1944.     move.l $68.w,(a0)+      ; HBL
  1945.     move.l $70.w,(a0)+
  1946.     move.l $134.w,(a0)+     ; MFP TIMER A
  1947.     move.l $120.w,(a0)+     ; MFP TIMER B
  1948.     move.l $114.w,(a0)+     ; MFP TIMER C
  1949.     move.l $110.w,(a0)+     ; MFP TIMER D
  1950.     move.l $118.w,(a0)+     ; acia
  1951.     lea $fffffa00,a1
  1952.     move.b $7(a1),(a0)+
  1953.     move.b $9(a1),(a0)+
  1954.     move.b $13(a1),(a0)+
  1955.     move.b $15(a1),(a0)+
  1956.  
  1957.     move.b $17(a1),(a0)+
  1958.     move.b $1b(a1),(a0)+
  1959.    
  1960.     lea $ffff8240.w,a1
  1961.     movem.l (a1),d0-d7
  1962.     movem.l d0-d7,(a0)
  1963.     move.w #$2300,sr
  1964.     rts
  1965.      
  1966. restoreIT
  1967.     move.w #$2700,sr
  1968.     lea systeme,a0
  1969.     move.l (a0)+,$68.w      ; HBL
  1970.     move.l (a0)+,$70.w
  1971.     move.l (a0)+,$134       ; MFP TIMER A
  1972.     move.l (a0)+,$120       ; MFP TIMER B
  1973.     move.l (a0)+,$114       ; MFP TIMER C
  1974.     move.l (a0)+,$110       ; MFP TIMER D
  1975.     move.l (a0)+,$118       ; acia
  1976.     lea $fffffa00,a1
  1977.     move.b (a0)+,$7(a1)
  1978.     move.b (a0)+,$9(a1)
  1979.     move.b (a0)+,$13(a1)
  1980.     move.b (a0)+,$15(a1)
  1981.  
  1982.     move.b (a0)+,$17(a1)
  1983.     move.b (a0)+,$1b(a1)
  1984.    
  1985.     lea $ffff8240.w,a1
  1986.     movem.l (a0),d0-d7
  1987.     movem.l d0-d7,(a1)
  1988.     move.w #$2300,sr
  1989.     rts
  1990.  
  1991. ;superitprototype
  1992. ;   move.b #value,$fffffa21.w           ; compteur d'evenement
  1993. ;   add.w #value,$120.w
  1994.  
  1995.     move.l d0,-(sp)
  1996.     move.l a0,-(sp)
  1997. ;   move.l ptra0,a0
  1998. ;   move.l (a0)+,d0
  1999. ;   ;move.l #couleur2couleur1,d0
  2000. ;   ; serie de move.w d0,registre de couleur
  2001. ;   swap d0
  2002. ;   ; serie de move.w d0,registre de couleur
  2003. ;   move.l (a0)+,d0
  2004. ;   ;move.l #couleur4couleur3,d0
  2005. ;   ; serie de move.w d0,registre de couleur
  2006. ;   swap d0
  2007. ;   ; serie de move.w d0,registre de couleur
  2008. ;   move.l (sp)+,a0
  2009. ;   move.l (sp)+,d0
  2010. ;   BAD IDEA
  2011.  
  2012. ;
  2013. ;
  2014. ;  
  2015. ;   rte
  2016. ;  
  2017.    
  2018.    
  2019.    
  2020.    
  2021.     ;move.l (sp)+,d0
  2022.    
  2023.  
  2024.  
  2025.  
  2026.  
  2027.  
  2028. systeme ds.l 200
  2029.    
  2030. lastcodepalette dc.l 0          ; si 0 ne pas executer
  2031.  
  2032.  
  2033.         BSS
  2034. selplantab      ds.b nbscreen*4*6+6 ; +6 = le marqueur de fin!
  2035.  
  2036. selplan0    ds.w 1
  2037. listecodepal    ds.l 4
  2038.  
  2039. ptrscr
  2040.     ds.l nbscreen    ;2
  2041.    
  2042. screen  ds.b 256
  2043.     ds.b 32000
  2044.     ds.b 32000
  2045.     ds.b 32000
  2046.     ;ds.b 32000     ; 4 ecran au lieu de 2
  2047.    
  2048.    
  2049.     ;ds.w 32000
  2050.     ;ds.w 32000
  2051.  
  2052. superScaleTable:    ds.w 200*NBCIRCLES      ;200*96 un peu moins de 40 000 octet
  2053.  
  2054. ******
  2055.  
  2056. realposition
  2057. buffer1         ds.w 512        ; 1.5k et on peut pas le metre dans memoire
  2058.     ifne standalone
  2059. bufferFlag      ds.b 512    ; parce que c'est utilisé en meme temps
  2060.     endc
  2061.     ifeq standalone
  2062.             ds.b 512
  2063.     endc
  2064.                 ;realposition:
  2065.                 ;ds.l 96
  2066.                 ;ds.w 96
  2067.        
  2068. calcsinbuffer   equ realposition+NBCIRCLES*6        ; ds.w 96
  2069.  
  2070. ********
  2071.  
  2072.  
  2073.  
  2074. ;systeme    ds.l 200
  2075.  
  2076.  
  2077. lstptrcode  ds.l ANGLEWRAP*NBCIRCLES*16     ; 8*96*32
  2078. ; 16 adresse d'appel
  2079. ; puis 16 adresse ou il faut placer les rts
  2080. ; format: (adresse appel, adresse retour)*16
  2081. ;
  2082. convX2  ds.l 320
  2083. convY   ds.w 256
  2084. memoire ds.w 5000
  2085.  
  2086. convX   ds.l 320
  2087. lstor0  ds.w NBDOTPERCIRCLE         ; max 32 point par cercle
  2088. lstor1  ds.w NBDOTPERCIRCLE         ; max 32 point par cercle
  2089. lstor2  ds.w NBDOTPERCIRCLE         ; max 32 point par cercle
  2090. lstor3  ds.w NBDOTPERCIRCLE         ; max 32 point par cercle
  2091. lstor4  ds.w NBDOTPERCIRCLE         ; max 32 point par cercle
  2092. lstor5  ds.w NBDOTPERCIRCLE         ; max 32 point par cercle
  2093. lstor6  ds.w NBDOTPERCIRCLE         ; max 32 point par cercle
  2094. lstor7  ds.w NBDOTPERCIRCLE         ; max 32 point par cercle
  2095. lstor8  ds.w NBDOTPERCIRCLE         ; max 32 point par cercle
  2096. lstor9  ds.w NBDOTPERCIRCLE         ; max 32 point par cercle
  2097. lstorA  ds.w NBDOTPERCIRCLE         ; max 32 point par cercle
  2098. lstorB  ds.w NBDOTPERCIRCLE         ; max 32 point par cercle
  2099. lstorC  ds.w NBDOTPERCIRCLE         ; max 32 point par cercle
  2100. lstorD  ds.w NBDOTPERCIRCLE         ; max 32 point par cercle
  2101. lstorE  ds.w NBDOTPERCIRCLE         ; max 32 point par cercle
  2102. lstorF  ds.w NBDOTPERCIRCLE         ; max 32 point par cercle
  2103.  
  2104. lstorcount ds.w 16  ; compteur lstorX
  2105.     ds.l 768*3-320-NBDOTPERCIRCLE*8     ; a partir de memoire: 768*3 long reservé
  2106. cosinusSpot ds.w 4096
  2107. sinusSpot   ds.w 4096
  2108.  
  2109.  
  2110. bsscode ds.l NBDOTPERCIRCLE*ANGLEWRAP*NBCIRCLES     ; 96*32*8*2  256*96*2       ; 96 cercle de 256 or.w *2, version dep(a0) et dep+8(a0)
  2111.         ds.w ANGLEWRAP*NBCIRCLES*16     ; 8 'angle'*96 cercles * 32 add d0,d0
  2112.         ds.w ANGLEWRAP*NBCIRCLES
  2113.         ds.l ANGLEWRAP*NBCIRCLES        ; 8*96  ; jmp autototo2 = 6 octet rts
  2114. posSpot ds.l NBCIRCLES     
  2115. bsstileram  ds.b 23594     
  2116. buffertile  ds.w 24*192
  2117. oldpalette  ds.w 16
  2118. ramcodepalette  ds.w (16*2+1)*4
  2119.                 ds.w 160
  2120.  
Add Comment
Please, Sign In to add comment