[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Apple IIGS RGB graphics conversion



I want to know how the IIGS converts hi-res and double hi-res into RGB.
The IIGS Technical Manual says that the Mega II outputs a 4 bit code
representing one of the 16 standard Apple colors (eg the colors for the IIGS
border, background and text, or the lo-res or double hi-res colors). The value
is input into the Video Graphics Controller (VGC) and is used to lookup a 12 bit
RGB value that is passed to 3 digital to analog converts (one each for red, 
green, and blue). The RGB values for the 16 colors are listed in a technical
note.

What I need to know is how does the Mega II get the 4 bit code, and how often it
gets a code. This is what I could figure out:

Another technote says that every sequence of 4 bits in double 
hi-res is used for a color (bits 0 to 3, 1 to 4, 2 to 5, etc) with the shifting
of bits taken into consideration. This suggests that the RGB value is changed
at a frequence of 7MHz. I know how to convert hi-res bits into double hi-res
bits (each bit of a hires byte is expanded to two bits, a half dot shift shifts the double hires byte right 1 bit and the right most bit of the previous byte
goes into the left bit of the double hi-res byte.).
A white hi-res or double hi-res dot whould be 4 on bits:

     1111
Using the method above, this white dot would be converted into:

  MPBWAGB  (magenta,purple,brown,white,aqua,green,brown)

The colors may be different depending on the location of the 4 bits. The point
is, only the single middle bit is coloured white. This doesn't seem right...