[comp.sys.amiga] BltBitMap change proposed

kodiak@amiga.UUCP (10/04/87)

Developer Folks:

I'm reviewing the grunt graphics.library blitting routines (i.e.
BltBitMap and BltTemplate) with an eye towards enhancing their
speed as part of the work I'm doing for Commodore to enhance
the text code.

I'm considering making an assumption about how bit planes in
BltBitMap are organized that will allow me to reduce both
calculation and hardware register usage.  Dale and I agree
that it's a reasonable assumption, but I offer it to y'all for
review so noone gets burned.

For background, remember that the source and destination of a
blit are related to one another in one of six ways.  These six
cases require different blit directions and modulos (and in two
of the cases, non-zero A sources) to accomplish moving the source
to the destination without tromping on the source during the move.

Under 1.2 (<=V34), these cases were calculated for each bit plane
                           source/destination pair in the copy.
   +----+                  Thus, a BltBitMap that took a source
   |s0  |     +----+       that described two planes that were
   |    |     |d0+----+    to be moved in different directions
   |  +----+  |  |d1  |    to the destination would be handled
   +--|s1  |  |  |    |    correctly.  (see visual aid)
      |    |  +--|    |
      |    |     +----+    I conjecture that noone uses this
      +----+               capability: that no uses of
			   BltBitMap distort a BitMap to do
an in-place copy in two different directions at once.

For 1.? (>V34), I propose to calculate the relationship between
the source and the destination once, and then cycle thru the
bit planes.  If you know of a reason why I should not, please
mail me a reply.  I'll summarize here later.  Thanks.

- Bob Burns           for Commodore-Amiga, Inc.    USENET: amiga!kodiak
  Kodiak Software                                  BIX:    kodiak