www.national.com
128
Revision 1.2
Integrated Functions (
Continued
)
G
4.4.3.3
Setting the pattern mode to 11b (GX_BASE+8200h[9:8] =
11b), in the GP_RASTER_MODE register selects the
color patterns. Bits [63:0] are used to hold a row of pattern
data for an 8-bpp pattern, with bits [7:0] corresponding to
the leftmost pixel of the row. Likewise, bits [127:0] are
used for a 16-bpp color pattern, with bits [15:0] corre-
sponding to the leftmost pixel of the row.
Color Patterns
To support an 8x8 color pattern, software must load the
pattern data for each row.
4.4.4
The graphics pipeline contains hardware support for color
expansion of source data (primarily used for text). Those
pixels corresponding to a clear bit (0) in the source data
are
rendered
using
the
GP_SRC_COLOR_0 register (GX_BASE+810Ch), and
those pixels corresponding to a set bit (1) in the source
data are rendered using the color specified in the
GP_SRC_COLOR_1 register (GX_BASE+810Eh).
Source Expansion
color
specified
in
the
If
GP_RASTER_MODE register, those pixels corresponding
to a clear bit (0) in the source data are not drawn.
the
source
transparency
bit
is
set
in
the
4.4.5
The GP_RASTER_MODE register specifies how the pat-
tern data, source data (color-expanded if necessary), and
destination data are combined to produce the output to
the frame buffer. The definition of the ROP value matches
that of the Microsoft API (application programming inter-
face). This allows Windows display drivers to load the ras-
ter operation directly into hardware. Table 4-21 illustrates
this definition. Some common raster operations are
described in Table 4-22.
Raster Operations
Table 4-21. GP_RASTER_MODE Bit Patterns
Pattern
(bit)
Source
(bit)
Destination
(bit)
Output
(bit)
0
0
0
ROP[0]
0
0
1
ROP[1]
0
1
0
ROP[2]
0
1
1
ROP[3]
1
0
0
ROP[4]
1
0
1
ROP[5]
1
1
0
ROP[6]
1
1
1
ROP[7]
Table 4-22. Common Raster Operations
ROP
Description
F0h
Output = Pattern
CCh
Output = Source
5Ah
Output = Pattern XOR destination
66h
Output = Source XOR destination
55h
Output = ~Destination