home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaDemoCD1.iso / DEMOS / DF-VisualIntensityIssue5-3.DMS / in.adf / ***EXTRAS-LOOKINHERE / BLITTER_BUG / BlitterBug.SRC < prev   
Encoding:
Text File  |  1994-05-02  |  1.4 KB  |  44 lines

  1.  
  2. * Phil!94 / LSD.
  3.  
  4. * Blitter bug? If you look at the code below you would expect the
  5. * word at $RESULT after the blit to be $00ff. Cus the Blitter
  6. * is set up to OR together every other word from the DATA table,
  7. * (skipping the $ffff's). The Minterm D = B OR C is used with 
  8. * B being the new data word to be ORed and C being the result of
  9. * previous blits. The modulos for D and C are set to -2 so that
  10. * all the words read in from source B are ORed into one single word
  11. * location.. (It constantly overwrites the same location)
  12. * BUT! The result is always $00aa, as if the words read in with the
  13. * even bits are lost..  If you run the blitter in descending mode,
  14. * the result is $0055, IE: the words with the odd bits are
  15. * missing from the final result....
  16.  
  17.  
  18. result equ $f0000            ;somewhere safe in chip ram
  19.  
  20.  
  21.     Clr.w result
  22.     Move.l #$dff000,a0
  23.     move.l #$07ee0000,$40(a0)    ;BC&D enabled. Minterms:D = B OR C
  24.  
  25.     move.l #result,$48(a0)    ;C source set
  26.     move.l #data+2,$4c(a0)    ;B source set
  27.     move.l #result,$54(a0)    ;D destination set
  28.  
  29.     move.w #$fffe,$60(a0)    ;c modulo = -2 (overlap word)
  30.     move.w #$0002,$62(a0)    ;b modulo = +2 (skip $ffff words)
  31.     move.w #$fffe,$66(a0)    ;d modulo = -2 (overlap word)
  32.     
  33.     move.w #$0201,$58(a0)    ;blit = 8 words high, 1 word width
  34. wait    btst #$e,$2(a0)        
  35.     bne.s wait        ;wait for blit to end
  36.     rts
  37.  
  38.     section blitdata,data_c
  39.  
  40. data    dc.w $ffff,$0001,$ffff,$0002,$ffff,$0004,$ffff,$0008
  41.     dc.w $ffff,$0010,$ffff,$0020,$ffff,$0040,$ffff,$0080
  42.  
  43.     
  44.