[comp.sys.apple2] GS PALETTES

ISSLTC@NUSVM.BITNET (Lim Thye Chean) (06/05/91)

I think I starting to like this group. Not only there are many famous
people like Andy, Matt, Dave on the net, I always receive a lot of
different answers on my questions. Some answers are wrong, but most are
informative.

I have another questions that puzzle me for years, and I really hope
somebody in Apple can answer me. Why the Apple IIGS colour palettes
have such a strange colour assignmet? The 320-mode colours assignment
is almost completely different from 640-mode, this made converting
pictures difficult, and also hard to draw a picture, or a background
that is suitable for both modes. In one mode, colour is red, but on
the other mode, the same colour means blue.

Why Apple give such strange arrangement on the 320-mode? It is not
even the same as the 16 colours on double hires! (Correct me if I am
wrong) The same cannot be said for 640-mode because of the dithered
restrictions. But I hope Apple will give some thought next time if
they make another standard again.

***********************************************************************
                      *** Apple IIGS Forever ***

 An Apple IIGS lover from Malaysia. A software engineer from Singapore.
-----------------------------------------------------------------------
                      Contact me at ISSLTC@NUSVM

       Lim Thye Chean - Lim is my surname. My name is Thye Chean.
***********************************************************************

burtonl@cognos.UUCP (Burton Leathers) (06/05/91)

The point has been made that the GS 320/640 mode default palettes
are strange. I do not find them so. I frequently produce colour
graphics using AWGS graphics which operates in 640 mode using
the dithered colours. These look good on the screen but print
poorly on the Imagewriter on which dithering is not nearly so
effective. My workaround is to export the image in APF and then
to import it to Minipaint (plug!). Minipaint allows me to
shift from 640 to 320 by simply rechunking the pixel bits and
using the 320 default palette. Amazingly, this results in
colours which are almost identical to the 640 mode dithered
colours. The Imagewriter output is then much better.

From my experience, the palette colours are quite rationale
and allow me to work in the best of both worlds.

Burton
-- 
Burton Leathers       3755 Riverside Dr.      decvax!utzoo!dciem!
Cognos Incorporated   P.O. Box 9707           nrcaer!cognos!burtonl
(613) 738-1440        Ottawa, Ontario       
	              CANADA  K1G 3N3       

unknown@ucscb.UCSC.EDU (The Unknown User) (06/06/91)

In article <9106050152.AA18036@apple.com> ISSLTC@NUSVM.BITNET (Lim Thye Chean) writes:
>I have another questions that puzzle me for years, and I really hope
>somebody in Apple can answer me. Why the Apple IIGS colour palettes
>have such a strange colour assignmet? The 320-mode colours assignment
>is almost completely different from 640-mode, this made converting
>pictures difficult, and also hard to draw a picture, or a background
>that is suitable for both modes. In one mode, colour is red, but on
>the other mode, the same colour means blue.

	It appears that you are not aware of the way 640 mode does 
graphics. In 640 mode there are 4 so called "mini-palettes."


	To hopefully summarize at least a LITTLE bit of the information:
(do not take ANY of this as gospel. This is what I -vaguely- remember 
from reading up on it in the Programmer's Introduction to the GS and the
ToolBox Manuals)

	In 320 mode, you have a 16 entry palette. Every pixel on the 
screen corresponds to 4 bits (a 'nibble') in memory. The memory is in
"chunky" pixel mode, and not bit planes. That is, you have all 4 bits 
which represent one pixel next to each other, rather than having 4 
different memory locations, each of which having one bit for a pixel.
(Both methods have their advantages. With bit planes, you don't have to 
do "complicated" [heh heh] arithmetic to figure out where the memory 
location for a particular pixel is.. But with chunky pixel usage, you only
have to make one memory access rather than 4!)

	So, in 640 mode, the same memory for the palette is used. (I believe
it's the same exact physical location of the palette lookup.. I'm not quite
positive on this point though, although it would make sense)

	Each pixel only has TWO bits for it's palette lookup value though.
That would seem to allow you only 4 colors in 640 mode.

	But the GS does a:
	
	(check one, and only one)
	( ) Ingenius
	( ) Kludgy (..and seemingly continuing on with the spirit of the funky 
	    graphics 'features' of the original Apple II)

	thing, in that there are actually FOUR mini-palettes of four colors
each.

	Every 4th pixel uses the same mini-palette in 640 mode. That is, 
if you take the X coordinate value (horizontal coordinate) mod 4, every 
pixel location resulting in the same value from that mod calculation will 
use the same mini-palette.

	However, the standard is to have both BLACK and WHITE be in EVERY
mini-palette. That is so that black & white text can be done on the graphics
screen.  You can CHANGE that though, if you absolutely know what you're doing
and want to replace the black & white values with other colors to produce
dithering effects.  So if you change the default values, for every four
pixels, you can have a choice of a total of 16 colors. Through dithering, that
goes up a lot I guess, but reduces the effective resolution.


	So in short, if the actual palette RAM held the same values for
320 and 640 mode, the graphics would look VERY screwy, I believe.

	Now, if the GS designers had just used a !@#$$#@!ing screen memory
that was twice as big in 640 as in 320 mode, none of this rigamarole would
have happened, and we'd have 16 REAL colors for EVERY pixel in 640 mode..
("but NOOOOOOOO" -John Belushi)

	Another thing I thought of.. That's the reason the 640 mode graphics
are so convoluted (among others??? most likely)... it uses the same amount
of RAM whether you're in 640 or 320 mode.

	Did I answer your question??
-- 
/unknown@ucscb.ucsc.edu       Apple IIGS Forever!        unknown@cats.ucsc.edu\
|WANT to help get ULTIMA VI //e or GS written?-mail me. CHEAP CD info-mail me.|
\                    It's a Late Night World.... Of Love                     /

ISSLTC@NUSVM.BITNET (Lim Thye Chean) (06/06/91)

(I am not able to reply directly since I have not subscribe to Info-
 Apple, so this is direct to the person who answer my original question
 by lots of 640-mode mini palettes theory.)

No, you get me wrong. I am not saying both 640 mode and 320 mode should
have the SAME value in the palette. Let's keep 640 mode fixed, since it
is very hard to change a colour without affecting another. So the 640
mode palette is fine. But what about 320 mode? Why the way they assign
the colour so #$@|%& that the colour position is so DIFFERENT from 640
mode? Black is always colour 0, and white 15, so why not standardize
the other colours, so red is 5 (for example. I cannot remember the exact
value) for both modes, and 10 is blue, etc. So no matter you are in
which mode, you can always get a red colour.



***********************************************************************
                      *** Apple IIGS Forever ***

 An Apple IIGS lover from Malaysia. A software engineer from Singapore.
-----------------------------------------------------------------------
                      Contact me at ISSLTC@NUSVM

       Lim Thye Chean - Lim is my surname. My name is Thye Chean.
***********************************************************************