Subject: Re: Observations about Xsun24
To: None <port-sparc@netbsd.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: port-sparc
Date: 01/08/2000 05:25:28
> I always thought that the following color definitions would apply:

> #define RED 0x00FF0000
> #define GREEN 0x0000FF00
> #define BLUE 0x000000FF

Modulo which byte goes with which primary, that's what I'd expect too.

> And yet, if I blast those into my framebuffer, I actually get cyan,
> magenta, and yellow.

My first guess is that the bits get complemented on the way out to the
screen (that is, to get intensity N (on a 0..255 scale), you actually
store 255-N (or, equivalently, ~N) into the framebuffer).

> In my device driver, I set the fb_size value to (4 * 1024 * 1024),

Is the display actually 1024x1024?  Most Sun displays seem to be
1152x900.  (1024*1024 is a little larger than 1152*900, though, so this
probably isn't a source of trouble.)

					der Mouse

			       mouse@rodents.montreal.qc.ca
		     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B