Subject:
'Re: VIC-II colors'
From: Robert 'Bob' Yannes
To: Philip
'Pepto' Timmermann
Date: 27.09.1999
I was involved with the development of the VIC-II, however the actual implementation of the design, including the Color
Palette, was done by someone else. I have forwarded your message to him, but it is up to him if he wants to respond.
I can tell you that the design was based on the principle that adding a sine wave of a particular frequency and amplitude
to an inverted version of the same sine wave at a different amplitude produces a phase-shifted sine wave of the same
frequency. The amount of phase shift is directly proportional to the amplitudes of the two sine waves.
The VIC-II used the 14.31818 MHz master clock input (4 times the NTSC color burst frequency of 3.579545 MHz) to produce
quadrature square-wave clocks. These clock signals were then integrated into triangle waves sing analog integrators. The
triangle waves were then integrated again into sine waves (actually rounded triangle waves, but good enough for this
application). This produced a 3.579545 MHz sine wave,
inverse sine wave, cosine wave and inverse cosine wave.
An analog summer was used to create the phase-shifts in the Chroma signal by adding together the appropiate two waveforms
at the appropiate amplitudes. The Color Palette data went to a look-up table that specified the amplitude of the waves by
selecting different resistors in the gain path of the summer. The end result was that we could create any hue we wanted by
looking at the NTSC color wheel to determine the phase-shift and then picking the appropiate resistor values to produce
that phase-shift.
Color Saturation was controlled by scaling the gain of the summer. When we picked the resistor values to determine the
output phase-shift, we also scaled them to produce the desired output amplitude. Luminance was controlled using a simple
voltage divider which switched different pull-down resistors into the open-drain output. We could create any Luminance we
wanted by choosing the desired resistor value.
I'm afraid that not nearly as much effort went into the color selection as you think. Since we had total control over hue,
saturation and luminance, we picked colors that we liked. In order to save space on the chip, though, many of the colors
were simply the opposite side of the color wheel from ones that we picked. This allowed us to reuse the existing resistor
values,
rather than having a completely unique set for each color
I believe that Commodore actually got a patent on this technique. It was certainly superior to the Apple or Atari approach
at the time, as they ended up with whatever colors that came out--ours allowed the designer to freely select Hue,
Saturation and Luminance.
Since all of this was based on selecting different resistor values and resistance varied from chip lot to chip lot, there
was variation from one Commodore 64 to another. It wasn't as bad as it could have been though, since all of the Chrominance
selection was based on resistor ratios, which could be kept constant even if the actual resistor values varied. Luminance
was more of a problem. A trimmer resistor should really have been used to pull up the output. This would have allowed the
Luminance to be adjusted for consistency from unit to unit, however Commodore didn't care enough about consistency to
bother with adjusting each unit
Robert
'Bob'
Yannes