Subject: re: 24-bit color on CG14
To: matthew green <mrg@eterna.com.au>
From: Charles Carvalho <carvalho@employees.org>
List: port-sparc
Date: 02/23/2002 17:01:16
At 11:40 AM +1100 2/24/02, matthew green wrote:
>   I have updated PR# port-sparc/10170 with changes for cgfourteen.c to
>   allow 24-bit color.  The changes to this file correct the calculation
>   of the display buffer size and allow it to be completely mapped.  The
>   frame buffer is still reported to be a CG8 (instead of the default CG3)
>   when the 24-bit support is enabled (a compile-time option); however,
>   the emulation is incomplete: the CG8 apparently supports 24-bit
>   DirectColor (in which the RGB values from the display memory are used
>   as indexes into separate red, green, and blue color tables) as well as
>   24-bit TrueColor (in which the RGB values are intensities, not
>   indexes).  The CG14's color tables are apparently ignored in 24-bit
>   mode.  The X server assumes that 24-bit displays support both TrueColor
>   and DirectColor by default; with this changed, the server successfully
>   runs on the CG14, but this change would affect other platforms as
>   [ ... ]
>
>
>
>wow, cool.
>
>
>you should probably post your current changes, so we can
>figure out how to integrate them!

Diffs for cgfourteen.c are in the PR, at
<http://www.NetBSD.org/cgi-bin/query-pr-single.pl?number=10170>

The change I made to the X server is below; it shouldn't be integrated, but
should be sufficient to get a working Xsun24:

--- xsrc/xc/programs/Xserver/cfb/cfbcmap.c.save Mon Nov 23 07:36:21 1998
+++ xsrc/xc/programs/Xserver/cfb/cfbcmap.c      Tue Feb 12 01:12:25 2002
@@ -370,8 +370,10 @@
                          TrueColorMask|\
                          DirectColorMask)

-#define LARGE_VISUALS  (TrueColorMask|\
-                        DirectColorMask)
+/* #define LARGE_VISUALS       (TrueColorMask|\
+ *                      DirectColorMask)
+ */
+#define LARGE_VISUALS  (TrueColorMask)

  typedef struct _cfbVisuals {
      struct _cfbVisuals *next;

Charles