Revision 1.2
127
www.national.com
Integrated Functions (
Continued
)
G
4.4.3.1
Setting the pattern mode to 01b (GX_BASE+8200h[9:8] =
01b) in the GP_RASTER_MODE register selects the
monochrome patterns (see bit details on page 131).
Those pixels corresponding to a clear bit (0) in the pattern
are
rendered
using
the
GP_PAT_COLOR_0
(GX_BASE+8110h
)
register,
those pixels corresponding to a set bit (1) in the pattern
are
rendered
using
the
GP_PAT_COLOR_1 register (GX_BASE+8112h).
Monochrome Patterns
color
specified
in
the
and
color
specified
in
the
If the pattern transparency bit is set high in the
GP_RASTER_MODE register, those pixels corresponding
to a clear bit in the pattern data are not drawn.
Monochrome patterns use registers GP_PAT_DATA_0
(GX_BASE+
Memory
GP_PAT_DATA_1 (GX_BASE+ memory Offset 8124h) for
the pattern data. Bits [7:0] of GP_PAT_DATA_0 corre-
spond to the first row of the pattern, and bit 7 corresponds
to the leftmost pixel on the screen. How the pattern and
the registers fully relate is illustrated in Figure 4-12.
Offset
8120h)
and
Figure 4-12. Example of Monochrome Patterns
4.4.3.2
Setting the pattern mode to 10b (GX_BASE+8200h[9:8] =
10b) in the GP_RASTER_MODE register selects the
dither patterns. Two bits of pattern data are used for each
pixel, allowing color expansion to four colors. The colors
are
specified
in
the
GP_PAT_COLOR_0
GP_PAT_COLOR_3 registers (Table 4-24 on page 130).
Dither Patterns
through
Dither patterns use all 128 bits of pattern data. Bits [15:0]
of GP_PAT_DATA_0 correspond to the first row of the pat-
tern (the lower byte contains the least significant bit of
each pixel
’
s pattern color and the upper byte contains the
most significant bit of each pixel
’
s pattern color). This is
illustrated in Figure 4-13.
Figure 4-13. Example of Dither Patterns
GP_PAT_DATA_0 (GPD0) = 0x80412214
GP_PAT_DATA_1 (GPD1) = 0x08142241
14
22
41
80
41
22
14
08
GPD0[7:0]
GPD0[15:8]
GPD0[23:16]
GPD0[31:24]
GPD1[7:0]
GPD1[15:8]
GPD1[23:16]
GPD1[31:24]
00AA
4411
00AA
1155
00AA
4411
00AA
1155
GP_PAT_DATA_0 (GPD0) = 0x441100AA
GP_PAT_DATA_1 (GPD1) = 0x115500AA
GP_PAT_DATA_2 (GPD2) = 0x441100AA
GP_PAT_DATA_3 (GPD3) = 0x115500AA
GPD0[15:0]
GPD0[31:16]
GPD1[15:0]
GPD1[31:16]
GPD2[15:0]
GPD2[31:16]
GPD3[15:0]
GPD3[31:16]
01
00
11
01
00
01
00
01
00
00
00
01
00
00
01
01
01
01
01
01
01
01
01
01
01
01
01
01
01
01
01
01
01
00
00
00
00
00
00
00
00
11
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
11
11
0
0
0
0
0
0
0
0
1
1
0
1
0
0
1
0
00
AA
10
10
10
10