There is a bit of a spat going on in a few forums regarding color index
#6 of IBM CGA. The old-timers know that it is brown from experience and
existing working hardware; the newbies (writing or using emulators) are
unwilling to accept that and are instead making CGA palettes with dark
yellow instead of brown.
Can anyone give me the history on why #6 is brown? Was it a design
mistake, or intentional? Is it a property of the monitor or something?
You are going to love my inital answer. Colour 6 is both dark yellow
_and_ brown.
As usual, I am going to look at the hardware side of things. I am also
talking solely about true-blue IBM stuff.
Let's start on the CGA card itself. I am going to assume text mode (about
the only place you'll get colour 6 on a real CGA card), the colours are
therefore determined by the attribute byte for each character. The
attribute data from the vieao RAM is latechs in U35 ('273). The outputs
of that go to a 4-bit 4-way multiplexer (U9, U10, '153), which, selects
one set of 4 bits or the other depending on wheter that particular dot in
the characer cell is set or not (OK, there's a lot more to it, blink
mode, graphics modes, etc, but I don't want to have to explain all 6
pages of the schematic at this point).
The outputs from that mux are latched again (U101, '174), then buffered
and sent to the DE9 socket.
So the card outputs the 4 bits _unchanged_ from the appropriate part of
the attribute byte. And it's clear from the circuit that the bits are :
Bit 0 : Blue
Bit 1 : Green
Bit 2 : Red
Bit 3 : Intensity.
So you could reasonably claim that 0110 was dark yellow and 1110 was
light yellow. But IBM also include the following table (suitably
re-formatted):
I R G B
0 0 0 0 Black
0 0 0 1 Rlue
0 0 1 0 Green
0 0 1 1 Cyan
0 1 0 0 Red
0 1 0 1 Magenta
0 1 1 0 Brown
0 1 1 1 White
1 0 0 0 Grey (=='light black' ;-))
1 0 0 1 Light Blue
1 0 1 0 Light Green
1 0 1 1 Light Cyan
1 1 0 0 Light Red
1 1 0 1 Light Magenta
1 1 1 0 Yellow
1 1 1 1 High Intensity White (=='light white')
OK, so why the odd name for colour 0 1 1 0. Well, we now turn to the
schematic of the CGA monitor. The 4 bits come in, and are buffered by
74S05 chips , Q201 and Q253 on my schematic. Now for the interesting bit.
There are 4 of the open-collector inverters -- Q201d., Q201f, Q253e and
Q253f -- whose outputs are connected together. This common signal will
only be high if the input signals are (wait for it) I=0, R=1, G=1, B=0.
That is, for this particular colour 6. For that colour, Q206 (a normal
NPN transistor) is therefore turned on, and this will reduce the level of
green in the final display. In other words this colour is a little redder
than you might expect.
I did say I'd only consider IBM stuff. But I will just mention that I've
worked on clone monitors that used a '138 to decode the input signals and
detect colour 6. I don't have any schematics to hand, though. And later
monitors still often used a PROM to decode the input signals, possibly
allowing several colour sets, and used 2 or 3 bit resistor DACs to feed
the CRT driverr stages. Now what that PEOM contained, and whether colour
6 was still special, I don't know.
So, to sum up :
1) IBM call that colour 'brown' in the CGA TechRef description
2) The CGA card doesn't do anything special with it, the obvious pattern
of bits appears on the DE9 connector
3) But the monitor does. It contains circuitry to shift that colour a
little towards the red.
I don't think this is a historical accident.
Hope that helps.
-tony