[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: SHR's Colors?
Immortal Nephi <Immortal_Nephi@hotmail.com> wrote:
> I am curious to ask. How do super high resolution of 640x200 on Apple
> IIgs support six colors, black, red, green, blue, yellow, and white
> without dithering. It should be maximum four colors. The super high
> resolution of 320x200 do support maximum 16 colors.
Every row on the SHR screen has 16 palette entries.
In 320 mode, each pixel has a 4-bit value which is used to directly look
up the palette for the row, so every pixel can use any of the 16 colours
for that row.
In 640 mode, each pixel has a 2-bit value, so it can only pick between 4
entries in the palette. WHICH four entries depends on which pixel it is.
I forget the order offhand, but for arguments sake, the first pixel can
select between entries 0-3, the second pixel 4-7, the third 8-11 and the
fourth 12-15, then the pattern repeats. This gives you four "mini-
palettes", each of which is responsible for the colours in every fourth
pixel on the row.
The standard palette in 640 mode is set up so that the first and last
entries in each mini-palette are black and white, and the other two are
colours. The first and third mini-palettes are set to use one pair of
colours, and the second and fourth ones are set to use a different pair
of colours.
For example, this results in all odd pixels being able to select black,
red, blue or white, and all even pixels being able to select black,
green, yellow or white.
You can get six "pure" colours, but any individual pixel can only choose
between a specific subset of four of them, and you can't get adjacent
pixels of the same colour (other than black and white), unless you
simplify the palette further and limit the entire row to four colours.
This arrangement allows for dithering colours by using adjacent pairs
such as (red, black) or (red, white) to get dark or pale red, for
example.
--
David Empson
dempson@actrix.gen.nz