9.6 KiB
9.6 KiB
<HTML>
<HEAD>
</HEAD>
Home Back
Hardware Level VGA and SVGA Video Programming Information Page Attribute Controller Registers
All pages are Copyright © 1997, 1998, J. D. Neal, except where noted. Permission for utilization and distribution is subject to the terms of the FreeVGA Project Copyright License. </HTML>
Hardware Level VGA and SVGA Video Programming Information Page Attribute Controller Registers
The Attribute Controller
Registers are accessed via a pair of registers, the Attribute Address/Data
Register and the Attribute Data Read Register. See the Accessing
the VGA Registers section for more detals. The Address/Data Register
is located at port 3C0h and the Data Read Register is located at port 3C1h.
| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| PAS | Attribute Address | ||||||
- PAS -- Palette Address Source
-
Attribute Address
This field specifies the index value of the attribute register to be read or written.
"This bit is set to 0 to load color values to the registers in the internal palette. It is set to 1 for normal operation of the attribute controller. Note: Do not access the internal palette while this bit is set to 1. While this bit is 1, the Type 1 video subsystem disables accesses to the palette; however, the Type 2 does not, and the actual color value addressed cannot be ensured."
| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| Internal Palette Index | |||||||
- Internal Palette Index
"These 6-bit registers allow a dynamic mapping between the text attribute or graphic color input value and the display color on the CRT screen. When set to 1, this bit selects the appropriate color. The Internal Palette registers should be modified only during the vertical retrace interval to avoid problems with the displayed image. These internal palette values are sent off-chip to the video DAC, where they serve as addresses into the DAC registers."
| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| P54S | 8BIT | PPM | BLINK | LGE | MONO | ATGE |
- P54S -- Palette Bits 5-4 Select
- PPM -- Pixel Panning Mode
- LGA - Line Graphics Enable
- MONO - Monochrome Emulation
-
ATGE - Attribute Controller Graphics Enable
"When set to 1, this bit selects the graphics mode of operation."
"This bit selects the source for the P5 and P4 video bits that act as inputs to the video DAC. When this bit is set to 0, P5 and P4 are the outputs of the Internal Palette registers. When this bit is set to 1, P5 and P4 are bits 1 and 0 of the Color Select register."
8BIT -- 8-bit Color Enable
"When this bit is set to 1, the video data is sampled so that eight bits are available to select a color in the 256-color mode (0x13). This bit is set to 0 in all other modes."
This field allows the upper half of the screen to pan independently of the lower screen. If this field is set to 0 then nothing special occurs during a successful line compare (see the Line Compare field.) If this field is set to 1, then upon a successful line compare, the bottom portion of the screen is displayed as if the Pixel Shift Count and Byte Panning fields are set to 0.
BLINK - Blink Enable
"When this bit is set to 0, the most-significant bit of the attribute selects the background intensity (allows 16 colors for background). When set to 1, this bit enables blinking."
This field is used in 9 bit wide character modes to provide continuity for the horizontal line characters in the range C0h-DFh. If this field is set to 0, then the 9th column of these characters is replicated from the 8th column of the character. Otherwise, if it is set to 1 then the 9th column is set to the background like the rest of the characters.
This field is used to store your favorite bit. According to IBM, "When this bit is set to 1, monochrome emulation mode is selected. When this bit is set to 0, color |emulation mode is selected." It is present and programmable in all of the hardware but it apparently does nothing. The internal palette is used to provide monochrome emulation instead.
| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| Overscan Palette Index | |||||||
- Overscan Palette Index
"These bits select the border color used in the 80-column alphanumeric modes and in the graphics modes other than modes 4, 5, and D. (Selects a color from one of the DAC registers.)"
| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| Color Plane Enable | |||||||
-
Color Plane Enable
"Setting a bit to 1, enables the corresponding display-memory color plane."
| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| Pixel Shift Count | |||||||
- Pixel Shift Count
"These bits select the number of pels that the video data is shifted to the left. PEL panning is available in both alphanumeric and graphics modes."
| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| Color Select 7-6 | Color Select 5-4 | ||||||
- Color Select 7-6
"In modes other than mode 13 hex, these are the two most-significant bits of the 8-bit digital color value to the video DAC. In mode 13 hex, the 8-bit attribute is the digital color value to the video DAC. These bits are used to rapidly switch between sets of colors in the video DAC."
Color Select 5-4
"These bits can be used in place of the P4 and P5 bits from the Internal Palette registers to form the 8-bit digital color value to the video DAC. Selecting these bits is done in the Attribute Mode Control register (index 0x10). These bits are used to rapidly switch between colors sets within the video DAC."
All pages are Copyright © 1997, 1998, J. D. Neal, except where noted. Permission for utilization and distribution is subject to the terms of the FreeVGA Project Copyright License. </HTML>