Integrated Functions (Continued)
4.4.3.1 Monochrome Patterns
4.4.3.2 Dither Patterns
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 color specified in the
GP_PAT_COLOR_0 (GX_BASE+8110h) register, and
those pixels corresponding to a set bit (1) in the pattern
are rendered using the color specified in the
GP_PAT_COLOR_1 register (GX_BASE+8112h).
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 through
GP_PAT_COLOR_3 registers (Table 4-24 on page 130).
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.
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
Offset
8120h)
and
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.
GP_PAT_DATA_0 (GPD0) = 0x441100AA
GP_PAT_DATA_1 (GPD1) = 0x115500AA
GP_PAT_DATA_2 (GPD2) = 0x441100AA
GP_PAT_DATA_3 (GPD3) = 0x115500AA
GP_PAT_DATA_0 (GPD0) = 0x80412214
GP_PAT_DATA_1 (GPD1) = 0x08142241
00
AA
0
0
0
0
0
0
0
0
1
0
1
0
1
0
1
0
GPD0[7:0]
14
22
41
80
41
22
14
08
GPD0[15:0]
01 00
01 00
01 00 01 00
00AA
4411
00AA
1155
00AA
4411
00AA
1155
GPD0[15:8]
GPD0[23:16]
GPD0[31:24]
GPD0[31:16]
GPD1[15:0]
01
00
00
00 10 00 01
10
01 00 01 00 01 00 01 00
00 01 00 11 00 01 00 11
01 00 01 00 01 00 01 00
GPD1[31:16]
GPD2[15:0]
GPD1[7:0]
GPD1[15:8]
GPD1[23:16]
GPD1[31:24]
GPD2[31:16]
GPD3[15:0]
00 10 00 01 00 10 00 01
10
01 00 01 00 01 00 01 00
00 01 00 11 00 01 00 11
GPD3[31:16]
Figure 4-12. Example of Monochrome Patterns
Figure 4-13. Example of Dither Patterns
Revision 1.1
127
www.national.com