11

In a well known letter to Philip Timmermann, Robert Yannes describes C64 color generation hardware as capable of producing any color (the palette was fixed, of course, but chosen semi-arbitrarily and could have any colors). The trick was to use a certain trigonometric identity so that theoretically the same approach could be used in earlier computers as well.

I'm curious - still, what were theoretical limits on color generation at that time? Let's assume a computer with separate luma/chroma outputs, an average color TV (NTSC) from the year 1978, and limitations of chip manufacturers of that era.

Was it possible to place any resistor on a chip or were there any limitations in that regard (aside from obvious desire not to have too many different resistors)? How many chroma values would look (at least a little) different on TV of that era? How many of them would survive being sent over the wire and being decoded by TV?

  • I think this is probably a duplicate too. It wasn't the case that the VIC-II could display any number of colors. It can display 16 colors from a palette that is defined by the analog portions of the chip. – Brian H Nov 29 at 15:15
  • 1
    Thinking of it, there is one quite related question by rwallace: "Why not one pixel per color clock?" – Raffzahn Nov 29 at 15:59
  • 1
    Yes, this isn’t a duplicate; the linked question is only related, and possibly of interest to readers of this Q&A. – Stephen Kitt Nov 29 at 16:30
  • 1
    Separate luma/chroma wasn't a thing in 1978, at least not for consumer equipment like TVs. I'm not sure if you could even find an TV with a composite input then. You wouldn't have found an actual TV with separate Y/C until S-Video was created in 1987, and I don't if there were any monitors with separate Y/C were available outside of the professional market before the Commodore 64's 1701. Not that it really matters, composite and RF connections offer the same NTSC colour range that separate Y/C does, just with more noise caused by the mixing of the three channels into one instead of two. – Ross Ridge Nov 29 at 18:40
21

TL;DR

Any (*1) colour can be displayed. The signal is analogue and can be very fine tuned.

But tuning needs time, thus not every colour can be shown beside each other (without a transition thru others).


The Long Read:

NTSC, like PAL or any other colour encoding can produce any colour, well, within its 'spec' that is. Colour encoding is based on a relative position within the 'colour wheel':

enter image description here

(Picture taken from this great C-128 forum entry which illuminates the point about axis in a circle way better than the more abstract squares the corresponding Wiki articles show. )

Basic encoding is done as YIQ (*2)

While Y defines the luma (B&W component), IQ defines the coordinate system to pick a colour. I marks on the orange/blue Axis while Q does the same for purple/green. So in theory, any colour within that circle can be displayed.

Harsh reality dictates limits. So luma can't jump instantly between black and white, but is tied to the maximum signal frequency allowed (~4.2 MHz for NTSC) and in reality even less (~3.5 MHz). Thus from total black to total white at least ~120 ns will pass - and the area shown will change over grayish between both. This is basic for what TV-speak means with 'lines'. A full spec NTSC with perfect signalling can do ~330 lines - which translated to computer speak would mean 660 pixel (*3). On consumer grade equipment (like home computer modulators and TV sets) it's more like 240 lines - or 480 pixel. So far a C64 image is below that, thus it should be displayed crisp & clear - with acceptable equipment that is.

Sadly the same restrictions apply to the IQ colour signal. Except here the bandwidth is even smaller (*4). Only (maximum) 1.3 MHz for I and 0.4 MHz for Q. As a result, there can be way less 'colour lines' then B&W ones.

  • When alternating between (full) blue and (full) orange (I) a maximum of about 110 lines can be shown - 220 pixels.
  • When doing the same between (full) purple and (full) green it goes down to less than 30 (60 pixels)

This can easy be tried by putting alternating sections of green and purple on a screen line and (with some back lines in between to ease viewing) alternations of orange/blue.

Already with rather wide (like 8 on a C64) sections, the green/purple corners will look mushy. With decreasing section size, their line will start to look blurry up to a point where it's even hard to distinguish the colours at all. The blue/orange line will look (comparatively) sharp, but also decrease in quality as the sections get shorter.

As a matter of fact, already a (comparatively) simple resolution (like the C64 offers) can not be displayed in arbitrary colours. Then again, many great looking 8-bit games do use this 'negative' effect to smooth display or enhance colour.

It's always important to keep in mind that NTSC encoding (compression; *4) was created to cover the transmission of 'real world' pictures. Something where colours rarely jump to their opposites on sharp borders. Everything smooth and in time. Also it was not designed to give the best picture, but a 'good enough' display - that's the reason why NTSC's weak colours are a great improvement over B&W, but at the same time why S-Video made a much bigger impact in the US than in Europe where PAL already supplied a better colour bandwidth.


Conclusion for video design meant for NTSC era TV:

Any resolution past 660 pixels is possible but does only make sense in very specific setups, colour depth can be arbitrary, and benefits a lot past 8 or 16. Even more than 256 can be useful. It would enable such a system to show off awesome pictures - even with low resolutions like 320x200. Colour depth is less useful when doing UI/Business graphics, as it will limit usable horizontal resolution.

The only drawback is data size. 8-bit CPUs aren't usually fitted to handle the sheer data created by 8 bits or more per pixel.

In addition, always think about PAL as well - after all, you want to sell your machine worldwide - it was Europe where Commodore had great sales until the very last day.


As said in the beginning:

Almost (*1) every colour can be displayed, but not side by side. It is quite possible to do 24 bit colour on NTSC - and video generation for TV does exactly this - So go for it. But don't expect to have crisp, clear, red and blue dots side by side in high resolution.


*1 - Almost, since NTSC colour space - like any other - can always display only a fraction of what nature can produce. It's limited by what the underlying RGB hardware can do (plus other limitations). This is mostly due the fact, that RGB is only an emulation with three colours, while nature serves each colour as its own.

It can again be seen as a compression thing that works quite well for humans - as most of us have a similar set of detectors. And while each may differ, we all learned to call similar situations the same colour.

And in fact it's as much about interpretation as it is about 'true' colour seeing. The black/blue/gold dress thing was a great example for this, as the colour information gathered by our eyes is post processed in the brain with knowledge about the situation. This is most usable to always see the same colour, no matter what lightning (within limits) is used. Grass is recognised as green at noon in summer as well as at dusk in winter. It's an important auto correction to give us a consistent world view.

In the case of pictures, that hard knowledge gets replaced by assumptions about the situation the picture was taken. And different people make different assumptions. Was it taken outdoors at bright daylight, or indoors at candle light? In either case the seen colour will be transcribed into the perceived.

*2 - YUV like used with PAL, modern NTSC and many computer applications is similar for all respects. Its plane is just 'rotated' by 33 degree, placing the colours more in quadrants, making it (look) 'symmetric' which simplifies numeric handling.

*3 - That's why 640x480 VGA interlaced is still within NTSC specs - even though it gets blurry when broadcasted and received on classic consumer level devices.

*4 - Colour TV signal can be seen as a lossy compression with most information preserved for Y (~60%) and less for I (30%) and Q (10%). It works much as this is a model quite fitting the human eye with being most sensitive on B&W in general, and on Blue/Red when it comes to colour.

  • I'm not sure if that answers the question. For instance, if the NTSC signal is used to display a single color, filling the whole screen at once, how many colors? – Brian H Nov 29 at 15:59
  • Thank you very much! The answer covers everything that I'll ever need to know about the color. – Anton Nov 29 at 16:03
  • Yes, "any color". I missed your *1 footnote, which I'd say fully answers the question. but has little to do with NTSC. – Brian H Nov 29 at 16:17
  • To make you answer complete: (ASIC) Resistors can be made in almost any value. I assume it was true back then so no limitations in that area either. – Anton Nov 29 at 16:31
  • @Anton Well, I didn't want to go there, as it's another can of works. The resistor sizes that can be used in a process are quite limited. And while some can be handeled by spending more area, altering the process is rarely done. So for a real life solution, better assume only a limited number of values. Then again, already with a single value a n-level DAC can be made. – Raffzahn Nov 29 at 16:36
1

Realistically, no analog color monitor can output a single color, except maybe it's black level. There is always some noise in the system (tv's don't work at absolute zero). And this electronic noise sent to the 3 or so CRT emitters will cause the color to vary.

So, even with a 5e6 turn resistor pot on the IQ voltages:

Thus, the amount of different colors has to be larger than some fraction of this variational noise floor in color, or else no one will detect it above the color noise floor in any finite amount of time.

This limit is probably well below human perceptual levels.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.