
Palette Registers
13-1
`efmp69030 Databook
Revision 1.3 11/24/99
Chapter 13
Palette Registers
Introduction
The original VGA graphics system and earlier compatible ones had a distinct IC called either the RAMDAC
or the palette DAC. The RAMDAC was made up of two main components: a 256x24bit color lookup table
(CLUT) or palette in which a selection of 256 colors may be stored and a set of three digital-to-analog
converters (DACs), one each for the red, green and blue components used to produce a color on a CRT
display. Despite the integration of both the palette and the triplet of DACs into larger ICs in many present
day graphics systems, the terms RAMDAC and palette DAC remain in common use.
Table 13-1:
Palette Registers
However, this integration of both the palette and DACs into the graphics controller makes the use of such
terms as RAMDAC and palette DAC erroneous, especially in the case of this graphics controller. This
graphics controller has two outputs: the DACs which are normally used to drive a CRT display, and a flat-
panel interface that is normally used to drive LCD or other types of flat panel displays. Either one or both
of these outputs may be used at any given time and the pixel data sent to one or both of these outputs may
or may not be routed through the palette. In short, the palette and DACs of this graphics controller can be
used entirely independently of each other and for this reason, these registers have been renamed in a
manner more in keeping with their actual purpose (e.g., the original VGA standard name of ‘DACSTATE’
has been replaced with ‘PALSTATE’).
Color Depths and the Palette
Whether or not the palette is used depends entirely on the color depth to which the graphics system has
been set via bits 3-0 of XR81.
The palette is NOT used for modes with color depths greater than 8 bits per pixel. The data stored in the
frame buffer is the actual color data, not an index. The appropriate bits describing the intensities of the red,
green and blue components are retrieved from the frame buffer and routed to whichever output is being
used. The palette is entirely bypassed, and so these are referred to as direct-color modes.
The palette is used for modes with color depths of 8 bits per pixel or less. The color data stored in the frame
buffer and received by the palette is actually an index that selects a location within the palette in which the
components of a color is specified. The 3-bytes of the selected color are sent from the palette to whichever
output (CRT or flat panel or both) is being used. Due to this use of an index into a palette, these modes are
referred to as indexed modes.
The use of indexed modes allows the main display image to take up less space in the frame buffer and
allows the actual displayed colors to be specified independently. The latter feature has been known to be
used in such applications as video games.
Name
Function
Access
I/O Address
PALMASK
Palette Data Mask Register
read/write
3C6h
PALSTATE
Palette State Register
read-only
3C7h
PALRX
Palette Read Index Register
write-only
3C7h
PALWX
Palette Write Index Register
read/write
3C8h
PALDATA
Palette Data Register
read/write
3C9h