It's long been an established fact that the EGA only had four memory planes, which limited the number of colors on the screen to (24) 16. The best compatible monitors at the time had six TTL color lines, meaning the screen was capable of displaying (26) 64 different colors. It was always my assumption that the EGA could be programmed via palette registers to arbitrarily choose any of the 64 display colors for the 16 memory colors, and that none of the EGA DOS games of the era bothered to reprogram the palette because... shrug? Now I'm starting to think there was a hardware limitation, but I'm trying to piece that together.
Based on my research, there were three monitors available in the EGA's heyday:
- The Monochrome Display, with two pins (video/intensity) allowing for four shades of gray.
- The Color Display, with four pins (red/green/blue/intensity) allowing for 16 colors.
- The Enhanced Color Display, with six pins (R/G/B/R-Intensity/G-Intensity/B-Intensity) allowing for 64 colors.
From what I understand, the EGA card was capable of driving all three monitor types provided the selected video mode ran at a supported frequency. If a Color Display was plugged into the EGA card, the R/G/B pins would line up correctly and the monitor's Intensity pin would read the card's G-Intensity pin. The R-Intensity and B-Intensity card outputs would be unused. (In the opposite case -- an Enhanced Color Display plugged into a CGA card -- the monitor would never receive any R-Intensity or B-Intensity input and, presumably, the image would have an incorrect greenish tinge to it.)
It seems (based on discussions like this) that the designers of the EGA felt that CGA/Color Display compatibility was important enough to limit the output in 200-line video modes so it displayed the same on both color monitor types. Based on my own experimentation, I see these limitations as well.
In EGA mode Dh (320×200, 16 color), when calling BIOS INT 10h, AH=10h, AL=0h with various color values in BH, only four of the six bits seem to have any effect. The table of observed effects vs. expectations is:
Bit pos. │ Effect
─────────┼───────────────────────────────────────────
.......X │ Blue
......X. │ Green
.....X.. │ Red
....X... │ No Effect (expected Blue Intensity)
...X.... │ R+G+B Intensity (expected Green Intensity)
..X..... │ No Effect (expected Red Intensity)
00...... │ Not Used
Bits 3 and 5 have absolutely no effect on the image. The end result is that there are only four useful bits that can be set, limiting the output to 16 unique display colors. It appears that no matter how the registers are programmed, the most the programmer can achieve in video mode Dh is a rearrangement of the 16 RGBI colors, with the remaining 48 possible display colors completely out of reach.
Other video modes like 10h (460×350, 16 color) respond to all six bits, so I'm reasonably sure my test programs are correct.
Now, the questions:
- Was the 16-color display limitation explicitly documented somewhere? The EGA documentation, pgs. 56/59 sort of hints at this behavior if the reader expects it, but it doesn't directly state "the hardware does something different in 200-line modes"; you just sort of have to know that.
- Was the behavior implemented in the EGA card (i.e. the R-Intensity and B-Intensity pins were unconditionally tied to the G-Intensity pin output) or was it implemented in the Enhanced Color Display (i.e. the R-Intensity and B-Intensity pins did output the value the programmer placed in the palette registers, but the monitor ignored it -- sort of how the Color Display had a special case to change "low intensity yellow" into "brown")?
- Was there a way the programmer could alter values in the EGA registers to allow any of the "inaccessible" 48 display colors to be used in mode Dh that didn't destabilize the image or fail on certain hardware configurations?