EasyManua.ls Logo

Commodore Amiga A2000 - Page 183

Commodore Amiga A2000
380 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
with zeros shifted in from the left. The second word will be the second word fetched from
the A, shifted right, with the least significant (rightmost) four bits of the first word shifted
in. Next, we will write the first word of the second row fetched from A, shifted four bits,
with the least significant four bits of the last word from the first row shifted in. This would
continue until the blit is finished.
On shifted blits, therefore, we only get zeros shifted in for the first word of the first row.
On all other rows the blitter will shift in the bits that it shifted out of the previous row. For
most graphics applications, this is undesirable. For this reason, the blitter has the
ability to mask the first and last word of each row coming through the A DMA channel.
Thus, it is possible to extract rectangular data from a source whose right and left edges
are between word boundaries. These two registers are called BLTAFWM and BLTALWM, for
blitter A channel first and last word masks. When not in use, both should be initialized to
all ones ($FFFF).
NOTE
Text fonts on the Amiga are stored in a packed bit map. Individual characters from the
font are extracted using the blitter, masking out unwanted bits. The character may then
be positioned to any pixel alignment by shifting it the appropriate amount.
These masks are "anded" with the source data, before any shifts are applied. Only when
there is a 1 bit in the first-word mask will that bit of source A actually appear in the logic
operation. The first word of each row is anded with BLTAFWM, and the last word is
"anded" with BLTALWM. If the width of the row is a single word, both masks are applied
simultaneously.
The masks are also useful for extracting a certain range of "columns" from some bitplane.
Let us say we have, for example, a predrawn rectangle containing text and graphics that
is 23 pixels wide. The leftmost edge is the leftmost bit in its bitmap, and the bitmap is two
words wide. We wish to render this rectangle starting at pixel position 5 into our 320 by
200 screen bitmap, without disturbing anything that lies outside of the rectangle.
- 174 Blitter Hardware -

Table of Contents

Other manuals for Commodore Amiga A2000

Related product manuals