home *** CD-ROM | disk | FTP | other *** search
/ Enigma Amiga Life 109 / EnigmaAmiga109CD.iso / software / testi / corsoasm / sorgenti9 / lezione15g4.s < prev    next >
Text File  |  1995-05-02  |  17KB  |  475 lines

  1.  
  2. ; Lezione15g4.s    -     Ondeggiamento con il bplcon1 AGA di una figura HIRES.
  3. ;            Da notare che se la pic e' HIRES lo scroll puo'
  4. ;            andare da 0 a 127, per un totale di 32 pixel lowres.
  5. ;            In pratica non e' abilitato il bit piu' alto.
  6.  
  7.     SECTION    AgaRulez,CODE
  8.  
  9. ;    Include    "DaWorkBench.s"    ; togliere il ; prima di salvare con "WO"
  10.  
  11. *****************************************************************************
  12.     include    "startup2.s"    ; Salva Copperlist Etc.
  13. *****************************************************************************
  14.  
  15.         ;5432109876543210
  16. DMASET    EQU    %1000001110000000    ; copper, bitplane DMA
  17.  
  18. WaitDisk    EQU    30    ; 50-150 al salvataggio (secondo i casi)
  19.  
  20. START:
  21.  
  22. ;    Puntiamo la pic AGA
  23.  
  24.     MOVE.L    #PICTURE,d0
  25.     LEA    BPLPOINTERS,A1
  26.     MOVEQ    #8-1,D7        ; num. bitplanes
  27. POINTB:
  28.     move.w    d0,6(a1)
  29.     swap    d0
  30.     move.w    d0,2(a1)
  31.     swap    d0
  32.     addi.l    #80*100,d0    ; Lunghezza di un bitplane
  33.     addq.w    #8,a1
  34.     dbra    d7,POINTB        ;Rifai D1 volte (D1=num of bitplanes)
  35.  
  36.     bsr.w    FaiAgaCopCon1    ; Fai copperlist con WAIT+BPLCON2 ogni linea
  37.  
  38.     bsr.s    MettiColori    ; Metti i colori della pic
  39.  
  40.     bsr.w    FINESCROLLC2    ; Questa routine "converte" i valori decimali
  41.                 ; in valori di scroll per il BPLCON1 AGA
  42.  
  43.     lea    $dff000,a5
  44.     MOVE.W    #DMASET,$96(a5)        ; DMACON - abilita bitplane, copper
  45.     move.l    #CopList,$80(a5)    ; Puntiamo la nostra COP
  46.     move.w    d0,$88(a5)        ; Facciamo partire la COP
  47.     move.w    #0,$1fc(a5)        ; Fmode azzerato, burst normale
  48.     move.w    #$c00,$106(a5)        ; BPLCON3 resettato
  49.     move.w    #$11,$10c(a5)        ; BPLCON4 resettato
  50.  
  51. LOOP:
  52.     MOVE.L    #$1ff00,d1    ; bit per la selezione tramite AND
  53.     MOVE.L    #$11000,d2    ; linea da aspettare = $110
  54. Waity1:
  55.     MOVE.L    4(A5),D0    ; VPOSR e VHPOSR - $dff004/$dff006
  56.     ANDI.L    D1,D0        ; Seleziona solo i bit della pos. verticale
  57.     CMPI.L    D2,D0        ; aspetta la linea $110
  58.     BNE.S    Waity1
  59.  
  60.     BSR.w    WABBLE
  61.  
  62.     MOVE.L    #$1ff00,d1    ; bit per la selezione tramite AND
  63.     MOVE.L    #$11000,d2    ; linea da aspettare = $110
  64. Aspetta:
  65.     MOVE.L    4(A5),D0    ; VPOSR e VHPOSR - $dff004/$dff006
  66.     ANDI.L    D1,D0        ; Seleziona solo i bit della pos. verticale
  67.     CMPI.L    D2,D0        ; aspetta la linea $110
  68.     BEQ.S    Aspetta
  69.  
  70.     BTST    #6,$BFE001
  71.     BNE.S    LOOP
  72.     RTS
  73.  
  74. ;*****************************************************************************
  75.  
  76. MettiColori:
  77.     LEA    LogoPal(PC),A0        ; indirizzo della color palette 
  78.     LEA    COLP0+2,A1        ; Indirizzo del primo registro
  79.                     ; settato per i nibble ALTI
  80.     LEA    COLP0B+2,A2        ; Indirizzo del primo registro
  81.                     ; settato per i nibble BASSI
  82.     MOVEQ    #8-1,d7            ; 8 banchi da 32 registri ciascuno
  83. ConvertiPaletteBank:
  84.     moveq    #0,d0
  85.     moveq    #0,d2
  86.     moveq    #0,d3
  87.     moveq    #32-1,d6    ; 32 registri colore per banco
  88.  
  89. DaLongARegistri:    ; loop che trasforma i colori $00RrGgBb.l nelle 2
  90.             ; word $0RGB, $0rgb adatte ai registri copper.
  91.  
  92. ; Conversione dei nibble bassi da $00RgGgBb (long) al colore aga $0rgb (word)
  93.  
  94.     MOVE.B    1(A0),(a2)    ; Byte alto del colore $00Rr0000 copiato
  95.                 ; nel registro cop per nibble bassi
  96.     ANDI.B    #%00001111,(a2) ; Seleziona solo il nibble BASSO ($0r)
  97.     move.b    2(a0),d2    ; Prendi il byte $0000Gg00 dal colore a 24bit
  98.     lsl.b    #4,d2        ; Sposta a sinistra di 4 bit il nibble basso
  99.                 ; del GREEN, "trasformandolo" in nibble alto
  100.                 ; di del byte basso di D2 ($g0)
  101.     move.b    3(a0),d3    ; Prendi il byte $000000Bb dal colore a 24bit
  102.     ANDI.B    #%00001111,d3    ; Seleziona solo il nibble BASSO ($0b)
  103.     or.b    d2,d3        ; "FONDI" i nibble bassi di green e blu...
  104.     move.b    d3,1(a2)    ; Formando il byte basso finale $gb da mettere
  105.                 ; nel registro colore, dopo il byte $0r, per
  106.                 ; formare la word $0rgb dei nibble bassi
  107.  
  108. ; Conversione dei nibble alti da $00RgGgBb (long) al colore aga $0RGB (word)
  109.  
  110.     MOVE.B    1(A0),d0    ; Byte alto del colore $00Rr0000 in d0
  111.     ANDI.B    #%11110000,d0    ; Seleziona solo il nibble ALTO ($R0)
  112.     lsr.b    #4,d0        ; Shifta a destra di 4 bit il nibble, in modo
  113.                 ; che diventi il nibble basso del byte ($0R)
  114.     move.b    d0,(a1)        ; Copia il byte alto $0R nel color register
  115.     move.b    2(a0),d2    ; Prendi il byte $0000Gg00 dal colore a 24bit
  116.     ANDI.B    #%11110000,d2    ; Seleziona solo il nibble ALTO ($G0)
  117.     move.b    3(a0),d3    ; Prendi il byte $000000Bb dal colore a 24 bit
  118.     ANDI.B    #%11110000,d3    ; Seleziona solo il nibble ALTO ($B0)
  119.     lsr.b    #4,d3        ; Shiftalo di 4 bit a destra trasformandolo in
  120.                 ; nibble basso del byte basso di d3 ($0B)
  121.     ori.b    d2,d3        ; Fondi i nibble alti di green e blu ($G0+$0B)
  122.     move.b    d3,1(a1)    ; Formando il byte basso finale $GB da mettere
  123.                 ; nel registro colore, dopo il byte $0R, per
  124.                 ; formare la word $0RGB dei nibble alti.
  125.  
  126.     addq.w    #4,a0        ; Saltiamo al prossimo colore .l della palette
  127.                 ; attaccata in fondo alla pic
  128.     addq.w    #4,a1        ; Saltiamo al prossimo registro colore per i
  129.                 ; nibble ALTI in Copperlist
  130.     addq.w    #4,a2        ; Saltiamo al prossimo registro colore per i
  131.                 ; nibble BASSI in Copperlist
  132.  
  133.     dbra    d6,DaLongARegistri
  134.  
  135.     add.w    #(128+8),a1    ; salta i registri colore + il dc.w $106,xxx
  136.                 ; dei nibble ALTI
  137.     add.w    #(128+8),a2    ; salta i registri colore + il dc.w $106,xxx
  138.                 ; dei nibble BASSI
  139.  
  140.     dbra    d7,ConvertiPaletteBank    ; Converte un banco da 32 colori per
  141.     rts                ; loop. 8 loop per i 256 colori.
  142.  
  143. ; Palette salvata in binario con il PicCon (opzioni: save as binary, non cop)
  144.  
  145. LogoPal:
  146.     incbin    "Pic640x100x256.pal"
  147.  
  148. ;*****************************************************************************
  149. ; Routine che crea copperlist con un WAIT+BPLCON1 ogni linea
  150. ;*****************************************************************************
  151.  
  152. FaiAgaCopCon1:
  153.     lea    AgaCon1,a0    ; Indirizzo buffer in copperlist
  154.     move.l    #$01020000,d0    ; BplCon1
  155.     move.l    #$2c07fffe,d1    ; WAIT - Inizio linea Y=$2c
  156.     move.w    #99-1,d7    ; Numero linee da fare
  157. FaiAGALoopC:
  158.     move.l    d1,(a0)+    ; Metti il wait YYXXFFFE
  159.     move.l    d0,(a0)+    ; BplCon1
  160.     add.l    #$01000000,d1    ; Fai waitare una linea sotto per la prossima
  161.     dbra    d7,FaiAGALoopC
  162.     rts
  163.  
  164. ******************************************************************************
  165. ; Routine che converte da numeri "decimali" a valori per il bplcon1 AGA.
  166. ; In pratica scompone il numero a 8 bit posizionando i sui bit secondo lo
  167. ; schema del bplcon1 aga. Qesta versione da una sola tabella di valori 0-255
  168. ; converte in bplcon1, con lo stesso valore per i 2 playfield, adatto per
  169. ; scroll di figure come quella di questo esempio.
  170. ******************************************************************************
  171.  
  172. FINESCROLLC2:
  173.     LEA    MOVTAB(PC),A0        ; Tab valori
  174.     LEA    CON1VALUES(PC),A1    ; Tab destinazione per $DFF002
  175.     LEA    MOVTABEND(PC),a2    ; Fine della tabella
  176. CONVLOOP:
  177.     MOVEQ    #0,D1
  178.     MOVEQ    #0,D2
  179.     MOVEQ    #0,D3
  180.     MOVEQ    #0,D4
  181.     MOVE.B    (A0)+,D1    ; VALORE "DECIMALE" PF1 IN D1
  182.     MOVE.W    D1,D2        ; COPIA VAL. 1 IN D2
  183.     MOVE.W    d1,d4        ; COPIA VAL. 1 IN D4
  184. ;pf1
  185.     AND.W    #%11,D1        ; Selez. bits 0-1 (SCROLL 1/4 e 1/2 pixel)
  186.     LSL.W    #8,D1        ; Shiftali al posto "giusto": bit 8 e 9
  187.     MOVE.W    D1,D3        ; Salva in d3
  188. ;pf2
  189.     LSL.W    #4,D1        ; Shiftali al posto "giusto": bit 12 e 13
  190.     OR.W    D1,D3        ; Salva in d3
  191. ;pf1
  192.     AND.W    #%111100,d2    ; Selez. i "vecchi" 4 bit dello scroll ad 1
  193.                 ; pixel, max 16 pixel.
  194.     LSR.W    #2,d2        ; Shiftali al posto giusto: primi 4 bits!
  195.     OR.W    d2,d3        ; Salva in d3
  196. ;pf2
  197.     LSL.W    #4,d2        ; Shiftali al posto giusto: bits 4,5,6,7
  198.     OR.W    d2,d3        ; Salva in d3
  199. ;pf1
  200.     AND.W    #%11000000,d4    ; Selez. i bit alti: scatti di 16/32 pixel
  201.     LSL.W    #4,d4        ; Posto giusto: BITS 10&11 per PF1
  202.     OR.W    D4,d3        ; Salva in d3
  203. ;pf2
  204.     LSL.W    #4,d4        ; Posto giusto: BITS 14&15 per PF2
  205.     OR.W    d4,d3        ; add pf2 16 pixel scroll bits to d3
  206.  
  207.     MOVE.w    D3,(A1)+    ; Salva il valore BPLCON1 finale
  208.     CMP.L    a0,a2        ; Fine della tabella?
  209.     BNE.S    CONVLOOP    ; Se non ancora, continua la conversione!
  210.     RTS
  211.  
  212.  
  213.  
  214. WABBLE:
  215.     move.l    TabPointer(PC),a0    ; Punto attuale Tab in a0
  216.     lea    Con1TabEnd(PC),a2    ; Fine Tab
  217.     lea    AGACON1+6,a1        ; Effetto copper in a1
  218.     move.w    #99-1,d7        ; numero linee, ossia loops
  219. scroll:
  220.     move.w    (a0)+,(a1)    ; Copia dalla tab al bplcon1 in copperlist
  221.     addq.w    #8,a1        ; Salta il wait - al prossimo bplcon1
  222.     cmp.l    a2,a0        ; Fine tab?
  223.     bne.s    okay        ; Se non ancora, continua
  224.     LEA    CON1VALUES(PC),a0    ; Altrimenti riparti da capo.
  225. okay:
  226.     dbra    d7,scroll    ; D0 VOLTE
  227.  
  228.     move.l    TabPointer(PC),a0    ; Punto attuale Tab in a0
  229.     addq.w    #2,a0            ; "scrollo" in avanti
  230.     cmp.l    a2,a0        ; Fine tab?
  231.     bne.s    okay2        ; Se non ancora, continua
  232.     LEA    CON1VALUEs(PC),a0    ; Altrimenti riparti da capo.
  233. okay2:
  234.     move.l    a0,TabPointer    ; Aggiorna il puntatore
  235.     RTS
  236.  
  237. TabPointer:
  238.     dc.l    CON1VALUES
  239.  
  240.  
  241. ; Tabella con i valori finali per il $dff102 (BPLCON1)
  242.  
  243. NUMVAL    EQU    256
  244.  
  245.  
  246. CON1VALUES:
  247.     DCB.W    NUMVAL,0
  248. CON1TABEND:
  249.  
  250.     ds.b    10000
  251.  
  252. ;IS
  253. ;BEG>0
  254. ;END>360
  255. ;AMOUNT>128
  256. ;AMPLITUDE>63    ; Se la figura e' in HIRES lo scroll va da 0 a 127!!
  257. ;YOFFSET>63
  258.  
  259. ;AMOUNT>64
  260. ;AMPLITUDE>63    ; Se la figura e' in HIRES lo scroll va da 0 a 127!!
  261. ;YOFFSET>63
  262.  
  263. ;AMOUNT>32
  264. ;AMPLITUDE>63    ; Se la figura e' in HIRES lo scroll va da 0 a 127!!
  265. ;YOFFSET>63
  266.  
  267. ;AMOUNT>32
  268. ;AMPLITUDE>63    ; Se la figura e' in HIRES lo scroll va da 0 a 127!!
  269. ;YOFFSET>63
  270.  
  271.  
  272. MOVTAB:
  273.     DC.B    $41,$44,$47,$4A,$4D,$50,$53,$56,$59,$5B,$5E,$61,$63,$66,$68,$6A
  274.     DC.B    $6D,$6F,$71,$73,$74,$76,$77,$79,$7A,$7B,$7C,$7C,$7D,$7E,$7E,$7E
  275.     DC.B    $7E,$7E,$7E,$7D,$7C,$7C,$7B,$7A,$79,$77,$76,$74,$73,$71,$6F,$6D
  276.     DC.B    $6A,$68,$66,$63,$61,$5E,$5B,$59,$56,$53,$50,$4D,$4A,$47,$44,$41
  277.     DC.B    $3D,$3A,$37,$34,$31,$2E,$2B,$28,$25,$23,$20,$1D,$1B,$18,$16,$14
  278.     DC.B    $11,$0F,$0D,$0B,$0A,$08,$07,$05,$04,$03,$02,$02,$01,$00,$00,$00
  279.     DC.B    $00,$00,$00,$01,$02,$02,$03,$04,$05,$07,$08,$0A,$0B,$0D,$0F,$11
  280.     DC.B    $14,$16,$18,$1B,$1D,$20,$23,$25,$28,$2B,$2E,$31,$34,$37,$3A,$3D
  281.  
  282.     DC.B    $42,$48,$4E,$54,$5A,$5F,$65,$69,$6E,$72,$75,$78,$7A,$7C,$7D,$7E
  283.     DC.B    $7E,$7D,$7C,$7A,$78,$75,$72,$6E,$69,$65,$5F,$5A,$54,$4E,$48,$42
  284.     DC.B    $3C,$36,$30,$2A,$24,$1F,$19,$15,$10,$0C,$09,$06,$04,$02,$01,$00
  285.     DC.B    $00,$01,$02,$04,$06,$09,$0C,$10,$15,$19,$1F,$24,$2A,$30,$36,$3C
  286.  
  287.     DC.B    $45,$51,$5D,$67,$70,$77,$7B,$7E,$7E,$7B,$77,$70,$67,$5D,$51,$45
  288.     DC.B    $39,$2D,$21,$17,$0E,$07,$03,$00,$00,$03,$07,$0E,$17,$21,$2D,$39
  289.  
  290.     DC.B    $45,$51,$5D,$67,$70,$77,$7B,$7E,$7E,$7B,$77,$70,$67,$5D,$51,$45
  291.     DC.B    $39,$2D,$21,$17,$0E,$07,$03,$00,$00,$03,$07,$0E,$17,$21,$2D,$39
  292. MOVTABEND:
  293.  
  294.  
  295. ;*****************************************************************************
  296. ;*                COPPERLIST                     *
  297. ;*****************************************************************************
  298.  
  299.     CNOP    0,8    ; Allineo a 64 bit
  300.  
  301.     section    coppera,data_C
  302.  
  303. COPLIST:
  304.     dc.w    $8E,$2c81    ; DiwStrt
  305.     dc.w    $90,$2cc1    ; DiwStop
  306.  
  307. ; Nota: il ddfstart/stop HIRES sarebbero $003c e $00d4, ma con il burst attivo
  308. ; va bene lo stesso valore del LOWRES, ossia $0038 e $00d0.
  309.  
  310.     dc.w    $92,$0038    ; DdfStart
  311.     dc.w    $94,$00d0    ; DdfStop
  312.     dc.w    $102,0        ; BplCon1
  313.     dc.w    $104,0        ; BplCon2
  314.     dc.w    $108,-8        ; Bpl1Mod (burst 64bit, modulo=modulo-8)
  315.     dc.w    $10a,-8        ; Bpl2Mod (come sopra)
  316.  
  317.             ; 5432109876543210
  318.     dc.w    $100,%1000001000010001    ; 8 bitplane HIRES 640x256. Per
  319.                     ; settare 8 planes setto il bit 4 e
  320.                     ; azzero i bit 12,13,14. Il bit 0 e'
  321.                     ; settato dato che abilita molte
  322.                     ; funzioni AGA che vedremo dopo.
  323.  
  324.     dc.w    $1fc,3        ; Burst mode a 64 bit
  325.  
  326. BPLPOINTERS:
  327.     dc.w $e0,0,$e2,0    ; primo     bitplane
  328.     dc.w $e4,0,$e6,0    ; secondo       "
  329.     dc.w $e8,0,$ea,0    ; terzo           "
  330.     dc.w $ec,0,$ee,0    ; quarto       "
  331.     dc.w $f0,0,$f2,0    ; quinto       "
  332.     dc.w $f4,0,$f6,0    ; sesto           "
  333.     dc.w $f8,0,$fA,0    ; settimo       "
  334.     dc.w $fC,0,$fE,0    ; ottavo       "
  335.  
  336. ; In questo caso la palette viene aggiornata da una routine, per cui basta
  337. ; lasciare azzerati i valori dei registri.
  338.  
  339.     DC.W    $106,$c00    ; SELEZIONA PALETTE 0 (0-31), NIBBLE ALTI
  340. COLP0:
  341.     DC.W    $180,0,$182,0,$184,0,$186,0,$188,0,$18A,0,$18C,0,$18E,0
  342.     DC.W    $190,0,$192,0,$194,0,$196,0,$198,0,$19A,0,$19C,0,$19E,0
  343.     DC.W    $1A0,0,$1A2,0,$1A4,0,$1A6,0,$1A8,0,$1AA,0,$1AC,0,$1AE,0
  344.     DC.W    $1B0,0,$1B2,0,$1B4,0,$1B6,0,$1B8,0,$1BA,0,$1BC,0,$1BE,0
  345.  
  346.     DC.W    $106,$e00    ; SELEZIONA PALETTE 0 (0-31), NIBBLE BASSI
  347. COLP0B:
  348.     DC.W    $180,0,$182,0,$184,0,$186,0,$188,0,$18A,0,$18C,0,$18E,0
  349.     DC.W    $190,0,$192,0,$194,0,$196,0,$198,0,$19A,0,$19C,0,$19E,0
  350.     DC.W    $1A0,0,$1A2,0,$1A4,0,$1A6,0,$1A8,0,$1AA,0,$1AC,0,$1AE,0
  351.     DC.W    $1B0,0,$1B2,0,$1B4,0,$1B6,0,$1B8,0,$1BA,0,$1BC,0,$1BE,0
  352.  
  353.     DC.W    $106,$2C00    ; SELEZIONA PALETTE 1 (32-63), NIBBLE ALTI
  354.  
  355.     DC.W    $180,0,$182,0,$184,0,$186,0,$188,0,$18A,0,$18C,0,$18E,0
  356.     DC.W    $190,0,$192,0,$194,0,$196,0,$198,0,$19A,0,$19C,0,$19E,0
  357.     DC.W    $1A0,0,$1A2,0,$1A4,0,$1A6,0,$1A8,0,$1AA,0,$1AC,0,$1AE,0
  358.     DC.W    $1B0,0,$1B2,0,$1B4,0,$1B6,0,$1B8,0,$1BA,0,$1BC,0,$1BE,0
  359.  
  360.     DC.W    $106,$2E00    ; SELEZIONA PALETTE 1 (32-63), NIBBLE BASSI
  361.  
  362.     DC.W    $180,0,$182,0,$184,0,$186,0,$188,0,$18A,0,$18C,0,$18E,0
  363.     DC.W    $190,0,$192,0,$194,0,$196,0,$198,0,$19A,0,$19C,0,$19E,0
  364.     DC.W    $1A0,0,$1A2,0,$1A4,0,$1A6,0,$1A8,0,$1AA,0,$1AC,0,$1AE,0
  365.     DC.W    $1B0,0,$1B2,0,$1B4,0,$1B6,0,$1B8,0,$1BA,0,$1BC,0,$1BE,0
  366.  
  367.     DC.W    $106,$4C00    ; SELEZIONA PALETTE 2 (64-95), NIBBLE ALTI
  368.  
  369.     DC.W    $180,0,$182,0,$184,0,$186,0,$188,0,$18A,0,$18C,0,$18E,0
  370.     DC.W    $190,0,$192,0,$194,0,$196,0,$198,0,$19A,0,$19C,0,$19E,0
  371.     DC.W    $1A0,0,$1A2,0,$1A4,0,$1A6,0,$1A8,0,$1AA,0,$1AC,0,$1AE,0
  372.     DC.W    $1B0,0,$1B2,0,$1B4,0,$1B6,0,$1B8,0,$1BA,0,$1BC,0,$1BE,0
  373.  
  374.     DC.W    $106,$4E00    ; SELEZIONA PALETTE 2 (64-95), NIBBLE BASSI
  375.  
  376.     DC.W    $180,0,$182,0,$184,0,$186,0,$188,0,$18A,0,$18C,0,$18E,0
  377.     DC.W    $190,0,$192,0,$194,0,$196,0,$198,0,$19A,0,$19C,0,$19E,0
  378.     DC.W    $1A0,0,$1A2,0,$1A4,0,$1A6,0,$1A8,0,$1AA,0,$1AC,0,$1AE,0
  379.     DC.W    $1B0,0,$1B2,0,$1B4,0,$1B6,0,$1B8,0,$1BA,0,$1BC,0,$1BE,0
  380.  
  381.     DC.W    $106,$6C00    ; SELEZIONA PALETTE 3 (96-127), NIBBLE ALTI
  382.  
  383.     DC.W    $180,0,$182,0,$184,0,$186,0,$188,0,$18A,0,$18C,0,$18E,0
  384.     DC.W    $190,0,$192,0,$194,0,$196,0,$198,0,$19A,0,$19C,0,$19E,0
  385.     DC.W    $1A0,0,$1A2,0,$1A4,0,$1A6,0,$1A8,0,$1AA,0,$1AC,0,$1AE,0
  386.     DC.W    $1B0,0,$1B2,0,$1B4,0,$1B6,0,$1B8,0,$1BA,0,$1BC,0,$1BE,0
  387.  
  388.     DC.W    $106,$6E00    ; SELEZIONA PALETTE 3 (96-127), NIBBLE BASSI
  389.  
  390.     DC.W    $180,0,$182,0,$184,0,$186,0,$188,0,$18A,0,$18C,0,$18E,0
  391.     DC.W    $190,0,$192,0,$194,0,$196,0,$198,0,$19A,0,$19C,0,$19E,0
  392.     DC.W    $1A0,0,$1A2,0,$1A4,0,$1A6,0,$1A8,0,$1AA,0,$1AC,0,$1AE,0
  393.     DC.W    $1B0,0,$1B2,0,$1B4,0,$1B6,0,$1B8,0,$1BA,0,$1BC,0,$1BE,0
  394.  
  395.     DC.W    $106,$8C00    ; SELEZIONA PALETTE 4 (128-159), NIBBLE ALTI
  396.  
  397.     DC.W    $180,0,$182,0,$184,0,$186,0,$188,0,$18A,0,$18C,0,$18E,0
  398.     DC.W    $190,0,$192,0,$194,0,$196,0,$198,0,$19A,0,$19C,0,$19E,0
  399.     DC.W    $1A0,0,$1A2,0,$1A4,0,$1A6,0,$1A8,0,$1AA,0,$1AC,0,$1AE,0
  400.     DC.W    $1B0,0,$1B2,0,$1B4,0,$1B6,0,$1B8,0,$1BA,0,$1BC,0,$1BE,0
  401.  
  402.     DC.W    $106,$8E00    ; SELEZIONA PALETTE 4 (128-159), NIBBLE BASSI
  403.  
  404.     DC.W    $180,0,$182,0,$184,0,$186,0,$188,0,$18A,0,$18C,0,$18E,0
  405.     DC.W    $190,0,$192,0,$194,0,$196,0,$198,0,$19A,0,$19C,0,$19E,0
  406.     DC.W    $1A0,0,$1A2,0,$1A4,0,$1A6,0,$1A8,0,$1AA,0,$1AC,0,$1AE,0
  407.     DC.W    $1B0,0,$1B2,0,$1B4,0,$1B6,0,$1B8,0,$1BA,0,$1BC,0,$1BE,0
  408.  
  409.     DC.W    $106,$AC00    ; SELEZIONA PALETTE 5 (160-191), NIBBLE ALTI
  410.  
  411.     DC.W    $180,0,$182,0,$184,0,$186,0,$188,0,$18A,0,$18C,0,$18E,0
  412.     DC.W    $190,0,$192,0,$194,0,$196,0,$198,0,$19A,0,$19C,0,$19E,0
  413.     DC.W    $1A0,0,$1A2,0,$1A4,0,$1A6,0,$1A8,0,$1AA,0,$1AC,0,$1AE,0
  414.     DC.W    $1B0,0,$1B2,0,$1B4,0,$1B6,0,$1B8,0,$1BA,0,$1BC,0,$1BE,0
  415.  
  416.     DC.W    $106,$AE00    ; SELEZIONA PALETTE 5 (160-191), NIBBLE BASSI
  417.  
  418.     DC.W    $180,0,$182,0,$184,0,$186,0,$188,0,$18A,0,$18C,0,$18E,0
  419.     DC.W    $190,0,$192,0,$194,0,$196,0,$198,0,$19A,0,$19C,0,$19E,0
  420.     DC.W    $1A0,0,$1A2,0,$1A4,0,$1A6,0,$1A8,0,$1AA,0,$1AC,0,$1AE,0
  421.     DC.W    $1B0,0,$1B2,0,$1B4,0,$1B6,0,$1B8,0,$1BA,0,$1BC,0,$1BE,0
  422.  
  423.     DC.W    $106,$CC00    ; SELEZIONA PALETTE 6 (192-223), NIBBLE ALTI
  424.  
  425.     DC.W    $180,0,$182,0,$184,0,$186,0,$188,0,$18A,0,$18C,0,$18E,0
  426.     DC.W    $190,0,$192,0,$194,0,$196,0,$198,0,$19A,0,$19C,0,$19E,0
  427.     DC.W    $1A0,0,$1A2,0,$1A4,0,$1A6,0,$1A8,0,$1AA,0,$1AC,0,$1AE,0
  428.     DC.W    $1B0,0,$1B2,0,$1B4,0,$1B6,0,$1B8,0,$1BA,0,$1BC,0,$1BE,0
  429.  
  430.     DC.W    $106,$CE00    ; SELEZIONA PALETTE 6 (192-223), NIBBLE BASSI
  431.  
  432.     DC.W    $180,0,$182,0,$184,0,$186,0,$188,0,$18A,0,$18C,0,$18E,0
  433.     DC.W    $190,0,$192,0,$194,0,$196,0,$198,0,$19A,0,$19C,0,$19E,0
  434.     DC.W    $1A0,0,$1A2,0,$1A4,0,$1A6,0,$1A8,0,$1AA,0,$1AC,0,$1AE,0
  435.     DC.W    $1B0,0,$1B2,0,$1B4,0,$1B6,0,$1B8,0,$1BA,0,$1BC,0,$1BE,0
  436.  
  437.     DC.W    $106,$EC00    ; SELEZIONA PALETTE 7 (224-255), NIBBLE ALTI
  438.  
  439.     DC.W    $180,0,$182,0,$184,0,$186,0,$188,0,$18A,0,$18C,0,$18E,0
  440.     DC.W    $190,0,$192,0,$194,0,$196,0,$198,0,$19A,0,$19C,0,$19E,0
  441.     DC.W    $1A0,0,$1A2,0,$1A4,0,$1A6,0,$1A8,0,$1AA,0,$1AC,0,$1AE,0
  442.     DC.W    $1B0,0,$1B2,0,$1B4,0,$1B6,0,$1B8,0,$1BA,0,$1BC,0,$1BE,0
  443.  
  444.     DC.W    $106,$EE00    ; SELEZIONA PALETTE 7 (224-255), NIBBLE BASSI
  445.  
  446.     DC.W    $180,0,$182,0,$184,0,$186,0,$188,0,$18A,0,$18C,0,$18E,0
  447.     DC.W    $190,0,$192,0,$194,0,$196,0,$198,0,$19A,0,$19C,0,$19E,0
  448.     DC.W    $1A0,0,$1A2,0,$1A4,0,$1A6,0,$1A8,0,$1AA,0,$1AC,0,$1AE,0
  449.     DC.W    $1B0,0,$1B2,0,$1B4,0,$1B6,0,$1B8,0,$1BA,0,$1BC,0,$1BE,0
  450.  
  451. AgaCon1:
  452.     dcb.l    99*2        ; Ossia: 99 linee * 2 long:
  453.                 ; 1 per il wait,
  454.                 ; 1 per il bplcon1
  455.     dc.w    $9007,$fffe    ; aspetta la fine del logo
  456.     dc.w    $100,$200    ; zero bitplanes
  457.  
  458.     dc.w    $FFFF,$FFFE    ; Fine della copperlist
  459.  
  460. ;******************************************************************************
  461.  
  462. ; Figura RAW ad 8 bitplanes, cioe' a 256 colori
  463.  
  464.     CNOP    0,8    ; allineo a 64 bit
  465.  
  466. PICTURE:
  467.     INCBIN    "Pic640x100x256.RAW"    ; (C) by Cristiano "KREEX" Evangelisti
  468.  
  469.     end
  470.  
  471. Per le figure hires abbiamo una limitazione hardware nello scroll: non e'
  472. abilitato il bit piu' alto, quello dello scroll di 32 pixel alla volta,
  473. per cui il valore va da 0 a 127, anziche' da 0 a 255.
  474.  
  475.