Index: [thread] [date] [subject] [author]
  From: James Simmons <jsimmons@edgeglobal.com>
  To  : ggi-develop@eskimo.com
  Date: Fri, 26 Nov 1999 08:51:31 -0500 (EST)

Re: ATI Mach64, XGGI ...

On Fri, 26 Nov 1999, GGI Mailinglist wrote:

> > > i've noticed another strange reaction,
> > > 
> > > today i tested a little assembly program which changes the color palette
> > > in 8bpp mode, but it doesn't seem to work, the palette entries stay the
> > > same with or without change, but after the syscall bit31 in eax isn't set,
> > > this means the syscalls was sucessful.

> no the FBIOPUTCMAP-ioctl as found in the fb-header files in the
> kernelsource

First is this the native kernel driver or kgicon? The way fbcmap works is
it provides a mapping from pixel value to the color components. Fbcmap
functions will only work for modes that can reprogram the color tables
(pseudocolor and truecolor modes). For most cards bpp above 8 bits (not
including) use DIRECTCOLOR. This means their is a one to one mapping from
pixel value to color intensity.

pixel at 24 bpp directcolor -> [8 bits red | 8 bits green | 8 bits blue]

So if you do a pixel value && 0000FFh then you will have a very bright
blue at this location in the framebuffer. Now you have psuedocolor mode. 
Psuedocolor mode was created to deal with the problem of limited
colors. Say your video card mode can only support 256 colors. Usually
something like X windows needs more than that. So if we need a certain
set of colors we can program the colors of what those 256 pixels will
be. Now if we need a new set of colors we can change the meaning of those
pixels. Thats where the fbcmap functions come in. Now truecolor is sort of
a mixture of both truecolor and psuedocolor mode. Here you have more
colors like directcolor but you can still change the meaning of the pixel
values. This case is for if you have a system that needs 16 millions
colors but your video card only supports 64K of colors. Often insted of
filling out 64K color maps you can control the size and postion of each
color component in the pixel. So you could have RGB BGR and things like

8 Red 8 Blue 8  Green   or
6 Red 6 Blue 12 Green   to represent a pixel.

> > > On another computer with cirrus Logic 5464 Chipset and KGI Module the
> > > program works fine.

Which mode are you setting it to?

      -----==-                                                  
      ----==-- _                                           
      ---==---(_)__  __ ____  __       James Simmons
      --==---/ / _ \/ // /\ \/ /       jsimmons@edgeglobal.com
      -=====/_/_//_/\_,_/ /_/\_\       fbcon/gfx developer
    The choice of a GNU generation



Index: [thread] [date] [subject] [author]