• Please review our updated Terms and Rules here

Composite Color : CGA/PCjr/Tandy

Great Hierophant

Veteran Member
Joined
Mar 22, 2006
Messages
1,928
Location
Massachusetts, USA
Owning an IBM PC 5150 with CGA and a Tandy 1000 SX, I have noticed differences in the composite color output. If you compare the given image between the two on a color composite monitor or TV set, the colors in the artifact modes differ. Take the following image:

This is a screen from the game Winnie the Pooh in the Hundred Acre Wood, using 640x200 graphics. Obviously this is the correct coloring, since we know that Pooh has brownish skin and wears a red shirt. This is how it appears on an IBM PC.

http://www.mobygames.com/images/shots/l/32030-winnie-the-pooh-in-the-hundred-acre-wood-dos-screenshot-the.jpg

On the Tandy, Pooh is blue (the other colors are different, but this is an example of something obviously wrong).

Quite a difference, but yet can be explained by a shift in the phase of the reference color burst signal. Unfortunately, the tint control on most televisions, including my own, do not adjust across the whole phase of the signal since it is designed to correct flesh tones. I cannot get Pooh to look right.

Another game, Ultima II, shows what can be done with artifact color even with 320x200 graphics:

http://www.mobygames.com/images/shots/l/182117-ultima-ii-revenge-of-the-enchantress-dos-screenshot-example.png

But that water on the Tandy is green (if I had a TV capture card, I would take screenshots).

The tint control here allows for closer a closer approximation, but it is not exact.

I have noted that the COLOR ADJUST variable capacitor exists in the 5150, 5155, 5160 and 5170. It is connected directly to the 14.31818MHz crystal found in these systems. It rotates 360 degrees, so I would guess that as you turn it, the phase of the derived 3.579545 color burst signal gets shifted. This emphasizes different colors in the color space. The Tandy uses a crystal of double frequency, 28.63636MHz and does not have a color adjust capacitor. The PCjr. seems to have one, but the schematic does not give the values. The 5162 does not have a color adjust variable, and I doubt that the the 5140 or its CRT Display Adapter slice does as well. If these machines are out of phase compared to the PC, then you may suffer from the same issues as the Tandy. (IBM warns as much on page 4-17 of the PCjr. Tech Ref).

Since I do not have a PCjr, I can personally only comment on Tandy and its handling of color at the unique modes 160x200x16 and 320x200x16. In these modes, full color will display through the composite output jack to the TV screen. However, the colors will not be as sharp or pure as they would be through the digital RGBI connector. Youtube videos seem to show the same for the PCjr. Highly detailed screens will see lots of color bleeding and fringing. But the colors will not be obviously wrong as they are for the artifact color modes.

So, assuming that an IBM PC/XT with an untouched variable capacitor and a CGA card is the baseline from which all other machines must be tested, what will the other systems show? More importantly, if you connected a variable capacitor to the Tandy crystals, can you get the colors to where they are supposed to be without screwing up the colors for the 160x200x16 and 320x200x16 modes?
 
I have a suspicion that that screenshot was made on an emulator, not on real hardware - it looks too clean for a real machine. I'm also guessing that this image was made using BIOS mode 6 with colour 15 (aka 640x200x2 graphics with a black and white palette on a digital monitor) - that's the standard mode for doing composite graphics. If that's the case then the color adjust capacitor will have no effect on this image - if I understand it correctly it just adjusts the duty cycle of the 14MHz waveform, and therefore only affects the green and magenta colours in modes where you'd also see green and/or magenta on a digital monitor (i.e. chroma colour as opposed to artifact colour). But it might be for fine-tuning the frequency instead, in which case it'll just affect the tint on the right of the screen. Since both the reference color bust and the colour signals in the picture itself are generated by the same source, nothing you adjust on the computer side will change the colour phase of the entire image - that would have to be adjusted on the monitor.

Assuming Pooh isn't blue on CGA, I think the problem must be that the relationship between the color burst phase and the pixel grid is different (by 180 degrees) on the Tandy from what it is on the CGA - which is an interesting finding. That would also mean that all other games using artifact colours would have their colours 180 degrees out of phase on the Tandy (and that all the Youtube videos you saw were using chroma colour rather than artifact colour, which won't have this problem). That's not terribly useful if you just want to play the game with the right colours, though.

I don't think adding a capacitor would help, but it might be possible to modify the video circuitry to use a different color burst phase. Do you have a schematic for the Tandy 1000? If so, I can tell you what you'd need to change.

EDIT: I found the technical reference manual with the schematics and it unfortunately it seems the color burst is controlled by a ULA (U-76) rather than discrete logic so it can't be changed. So I guess you'd have to have some kind of signal post-processor that would watch for the horizontal sync pulse and then invert the signal for a short period immediately afterwards. Not quite trivial, but not impossibly hard either.
 
Last edited:
Assuming Pooh isn't blue on CGA, I think the problem must be that the relationship between the color burst phase and the pixel grid is different (by 180 degrees) on the Tandy from what it is on the CGA - which is an interesting finding.
I'm quite sure this isn't the case; I wrote a little composite-color converter once for a Tandy 1000 TX (the higher-end version of the SX, so I'm guessing its video bits are the same,) and the colors I got were roughly what the existing documentation on that mode says they should've been, allowing for my inexpertise with the matter and standard NTSC wackiness. Definitely not 180º removed!
 
Hmm... maybe it was a bug in an early revision of the T1000 video hardware then, which was fixed in a later version. Pooh's definitely not blue on CGA, I just tried it on DOSBox and it there it looks similar to the Mobygames screenshot.
 
Sometimes there's a trim-pot on the CGA (or mainboard on a tandy) you adjust to vary the hsync -- doing so adjusts the color burst off 'fake' colors. Sometimes adjusting hShift on the display (if available) can cause a color change as well. Also, the newer the TV the less likely you are to get proper colors -- and not all RF modulators are built the same either... Pretty much if the TV also has SVHS connectors, the composite color will be screwy...

... and don't expect proper colors on a LCD that has composite in.

Case in point, with my 1000HX connected to a ten year old $199 29" Walmart special Magnovox -- composite 16 color modes appear pretty much dead on... connected to the 32" Sony Trinitron I originally replaced it with (which also has SVHS and Componant input) the colors all act like the blue channel is stuck on full blast... connected to my current 32" LCD through it's composite connector -- what colors? It's actually rendering it as monochrome.

Artifact colors are a craps shoot -- it's why they were never really officially documented...
 
Yeah, that's a point - if you're using a newer TV with digital NTSC decoding, it might be getting confused by the out-of-spec signal (I think the color burst amplitude is too high for one thing).
 
The real problem with modern TVs is that they only expect a NTSC signal meeting RS-170a specs, which old computers certainly don't output. Also comb filters have improved to the point that they filter out all the color fringing. Hue shifts can be fixed with a video proc-amp.
 
Last edited:
I tried Winnie on my XT on my modern LCD. Turning the capacitor did not change the color for most of the revolution, but at a small angle, the picture turned black and white. However, there was still some classic text fringing around the text. The colors matched the screenshot from Mobygames, which was taken with a TV capture card. The Ultima II screenshot may be emulated.

Since the 8284 in the PC/XT, from which the 14.318180MHz crystal is passed through to obtain the derived clocks, outputs waves far closer to a square wave than a sine wave, modern circuitry may be confused by what is being output. Also, I have no idea what kind of image processing is occuring in the LCD, and it may try to auto correct the color as much as it can.

I was not aware of the effect of changing the duty cycle of the color burst wave would have in NTSC color. I know that the amplitude of the signal determines saturation and the phase shift of the wave the hue.

the colors all act like the blue channel is stuck on full blast

That would be an apt description of how my Tandy's color worked. Maybe if I ran it through an RF modulator, that would normalize the color.

Update : The color adjust capacitor does the same thing on my admittedly modern CRT, it does not change the colors except to make them display in black and white. I wonder if the same thing happens in 320 mode. I feel hindered by the fact that I do not have a vintage monitor with which to test.
 
Last edited:
I tried Winnie on my XT on my modern LCD. Turning the capacitor did not change the color for most of the revolution, but at a small angle, the picture turned black and white.

I was not aware of the effect of changing the duty cycle of the color burst wave would have in NTSC color.

Could you try adjusting it with a chroma colour screen (e.g. a text mode screen displaying all 16 colours) and see if my theory about it only adjusting the chroma green and magenta colours is correct?

The duty cycle has an effect because of the way the CGA takes the 14MHz signal and uses some flip flops to generate six different 3.5MHz signals at different phases (for the 6 chroma hues). Yellow, blue, red and cyan are generated from the clock going high (and, along with artifact colours, always display the same because they're always the same phase relative to the yellow color burst signal) while green and magenta are generated from the clock going low.
 
Last edited:
My friend Cloudschatze asked me to try Indianapolis 500 : The Simulation from Electronic Arts. It supports CGA in RGB and color composite with a standard palette and a Tandy palette. I tried it in my Tandy 1000 SX with the standard palette I get magenta sky and blue grass, but with the Tandy palette I get green grass and light blue sky. Judging by the RGB colors of the EGA and Tandy modes, the grass is green and the sky is light blue. Then I tried it in DOSBox's CGA emulation. Without touching the hue control, the colors were green and light blue for the standard palette. Shifting the hue by 120 degrees got me the incorrect Tandy colors. Using the Tandy palette, I got yellow sky and magenta grass, but shifting it 120 degrees gets me the right colors.

Running the composite through an external RF modulator to the TV did not change the colors displayed in a meaningful way. Is there anything I can put in between that can change the hues to the IBM standard?
 
Last edited:
I've been meaning to reply to this thread again. First up, the "color adjust" trimmer capacitor on the PC/XT motherboard has the effect of fine tuning the frequency (as experimentally determined here and here), not adjusting the phase or the duty cycle. So that's that figured out.

As for fixing up the color burst phase of a composite signal (i.e. an external "tint adjust" box), I've been doing some thinking about that. I've played with TV output from an Arduino, and I was wondering if it would be possible to detect the horizontal sync pulse and substitute it with one generated by the microcontroller. However, I think that wouldn't work because you can't synchronize a microcontroller more finely than one pulse of its clock cycle, which would lead to significant phase jitter.

The tricky part is synchronizing the circuit to the incoming color burst signal. There are various ICs which are complete solutions for encoding or decoding composite signals, but most of the ones I found seem to be massive overkill for this application (expensive, hard-to-solder packages and with output in the form of a digital signal which is hard to adjust the phase of). However, I did find this (which is available). Then we'd just need a circuit to separate out the horizontal sync pulse (and find the color burst signal on the line), a circuit to adjust the phase of the subcarrier output, and something to splice the adjusted subcarrier back into the composite output - maybe $10-$20 of parts in total. There's may be a simpler circuit, but I haven't found it.

I'm going to order some parts and have a play around to see if I can come up with a complete schematic for something that works.
 
Thinking about it some more, I think that the MC44144 is not actually needed at all - we should be able to just shift the color carrier phase directly from the input signal. That just leaves the circuitry to find the color burst pulses (which an LM1881 looks like it should do handily), the circuitry to shift the phase (I found long-expired US patent 3806794 which seems like it should do what I want here) and a 4053 to switch between the shifted and unshifted outputs based on the burst enable signal from the LM1881. I've put together a first attempt at the full schematic and I'll try it out when the rest of the parts show up (which should be sometime in the next month). I might need to tweak some of the component values, and I may also need to apply a DC bias to the signals through the 4053 (though the example circuits in the LM1881 datasheet don't do this, so maybe it's fine).
 
Well, I built the circuit but unfortunately it doesn't work - there just doesn't seem to be any signal coming out of the phase shifter part of the circuit. There's a few things that I can try but I don't really think I have much chance of fixing it, especially without an oscilloscope to debug it with. The main problem is really that I don't understand how that part of the circuit works - it's just a magic black box I found in a patent which is lacking some potentially important details: in particular, I'm not sure what supply voltages it's meant to work with, or what transistors were originally used. I might try to build a simpler circuit which just shifts the hue by a fixed amount rather than a variable amount settable by potentiometer.
 
My Tandy 1000SX has the ability to disable the onboard graphics if another adapter is in the system. You can use an ISA CGA adapter in the system, even though it is inferior in virtually every respect. I had an CGA card with a composite video output that could fit inside the Tandy case. When I tried it out, it pretty much showed the "correct" colors. The card in question is an Epson Q-205A, which has a few minor CGA compatibility issues according to Trixter's tests.

True IBM CGA composite colors are possible in a Tandy 1000SX or above. This should include the TX, TL/2/3, SL/2 & RL. I do not know whether the built-in VGA or SVGA chipsets of the RLX and RSX can also be disabled, but at that point one begins to wonder if that is worth it. It would not include the EX or HX unless you were able to hack a CGA card to fit in the PLUS connector (not impossible with an ATI Small Wonder). Since the original Tandy 1000/A/HD do not allow you to disable the video, it may not work in those machines. I emphasize the "may" as a stock CGA card has only five registers you can read, the status register and the 6845 cursor address/light pen registers, and no one usually uses the last four. The status register is used when trying to avoid "snow".

One last issue is that you may get screwy video in programs which detect a Tandy 1000 and try to set its graphics modes instead of CGA modes. Those games expect that a user would prefer the "better" color. So this should only be used with programs that are not Tandy aware. Games that are PCjr. but not Tandy 1000 aware should work fine.
 
Last edited:
I haven't forgotten about this - I just need to find some time to get to my workshop and try out the circuit (I've been busy at work lately).

I realized though that changing the colour burst phase will make the artifact colours correct (i.e. BIOS mode 6, palettes 8, 7 or 15) but will make the chroma colours wrong, so the colours would be wrong in text mode for example unless you turn off the tint adjust box. And there's no way to make it make the correct colours for modes which use both (such as the games which use 320x200 composite modes) short of adding a whole new graphics card to the machine.
 
Back
Top