
3 MEMORY MODELS
C-2-6
EPSON
SID13705 PROGRAMMING NOTES
AND EXAMPLES
3.3 4 Bit-Per-Pixel (16 Colors/Gray Shades)
Four bit pixels support 16 color/gray shades. In this memory format each byte of display buffer
contains two adjacent pixels. Setting or resetting any pixel requires reading the entire byte,
masking out the upper or lower nibble (4 bits) and setting the appropriate bits to “1”.
Color panels can display up to sixteen colors simultaneously. These sixteen colors are derived by
indexing into the first sixteen elements of the Look-Up Table. Each of these colors may be
selected from the 4096 possible available colors.
On a monochrome panel the gray shades are generated by indexing into the first sixteen green
components of the LUT. Each of these sixteen possible gray shades can be adjusted to any of the
sixteen possible gray shades. For instance, one could program the first eight green LUT entries to
be 0 and the second green LUT entries to be FFh. This would result in nibble values of 0 through
7 displaying as black and nibble values 8 through 0Fh displaying as white.
Figure 3-3 Pixel Storage for 4 Bpp (16 Colors/Gray Shades) in One Byte of Display Buffer
3.4 Eight Bit-Per-Pixel (256 Colors)
In eight bit-per-pixel mode one byte of display buffer represents one pixel on the display. At this
color depth the read-modify-write cycles, required by the lessor pixel depths, are eliminated.
When using a color panel, each byte of display memory acts as and index to one element of the
LUT. The displayed color is arrived at by taking the display memory value as an index into the
LUT.
Eight bit per pixel is not supported for monochrome display modes. The reason is that each
element of the LUT supports a 4-bit (sixteen value) level for red, green and blue. In monochrome
display modes on the green value is used to set the gray intensity. Thus we have sixteen possible
grey values but, because of the color.
Figure 3-4 Pixel Storage for 8 Bpp (256 Colors) in One Byte of Display Buffer
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
Pixel 0
Bit 3
Pixel 0
Bit 2
Pixel 0
Bit 1
Pixel 0
Bit 0
Pixel 1
Bit 3
Pixel 1
Bit 2
Pixel 1
Bit 1
Pixel 1
Bit 0
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
Red bit 2
Red bit 1
Red bit 0
Green bit 2
Green bit 1
Green bit 0
Blue bit 1
Blue bit 0