[Contents] [index] [Help] [Retrace] [browse <] [Browse >]

Our standard memory copy blit works fine if the source does not overlap
the destination.  If we want to move an image one row down (towards
increasing addresses), however, we run into a problem -- we overwrite the
second row before we get a chance to copy it!  The blitter has a special
mode of operation -- descending mode -- that solves this problem nicely.

Descending mode is turned on by setting bit one of  bltcon1  (defined as
BLITREVERSE). If you use descending mode the address pointers will be
decremented by two (bytes) instead of incremented by two for each word
fetched.  In addition, the modulo values will be subtracted rather than
added.   shifts  are then towards the left, rather than the right, the
first word  mask  masks the last word in a row (which is still the first
word fetched), and the last word  mask  masks the first word in a row.

Thus, for a standard memory copy, the only difference in blitter setup
(assuming no  shifting  or  masking ) is to initialize the
 address pointer registers  to point to the last word in a block, rather
than the first word.  The  modulo values ,  blit size , and all other
parameters should be set the same.

   NOTE:
   -----
   This differs from predecrement versus postincrement in the 680x0,
   where an address register would be initialized to point to the word
   after the last, rather than the last word.

Descending mode is also necessary for  area filling , which will be
covered in a later section.