8bit pseudocolor and 16/24/32 bit graphics on same screen (G400)?

8bit pseudocolor and 16/24/32 bit graphics on same screen (G400)?

Post by Ingo Jankowsk » Wed, 31 May 2000 04:00:00



I have a software that needs an 8bit Pseudocolor display (won't run on
TrueColor etc.), but PseudoColor is ... er, well, PseudoColor.

Wouldn't it be fun to have a 24 bit Screen, and just have an 8bit window
in it? Is that possible with XFree86 4.0? I've tried Xnest, but it
requires PseudoColor visual from the underlying X server, which it just
doesn't offer when running at higher colour depths.

I'm using a Matrox G400, and the "mga" driver offers an option called
"Overlay". Has anyone out here used that/knows what exactly that is?

TIA,

  Ingo Jankowski

 
 
 

8bit pseudocolor and 16/24/32 bit graphics on same screen (G400)?

Post by DG » Thu, 01 Jun 2000 04:00:00



> I have a software that needs an 8bit Pseudocolor display (won't run on
> TrueColor etc.), but PseudoColor is ... er, well, PseudoColor.

> Wouldn't it be fun to have a 24 bit Screen, and just have an 8bit window
> in it? Is that possible with XFree86 4.0? I've tried Xnest, but it
> requires PseudoColor visual from the underlying X server, which it just
> doesn't offer when running at higher colour depths.

> I'm using a Matrox G400, and the "mga" driver offers an option called
> "Overlay". Has anyone out here used that/knows what exactly that is?

Yes, I have that in a commercial X-server I use.  That's supposed to be
a feature in Xfree86 4.0.  I haven't tried 4.0, so I can't help you
there.  'xdpyinfo' will tell you what visuals are available and which is
the default.  You want to set  PseudoColor as the default (don't ask me
how you do that).  Apps that want a better visual should look for and
select the best one automagically.

--
DG (remove the Zs)


 
 
 

8bit pseudocolor and 16/24/32 bit graphics on same screen (G400)?

Post by Ingo Jankowsk » Thu, 01 Jun 2000 04:00:00


Update: It seems the Overlay option is what I want; the X server can be
started, but once KDE is loaded, the screen messes up (vertical black
bars etc.) Even the text consoles (!!!) are unreadable afterwards. I
think maybe its a bug in the "mga" driver module of XFree86 4.0.

But maybe not. When I activate "Overlay", the X server outputs the
following line:

Symbol miOverlaySetRootClip from module
/usr/X11R6/lib/modules/libxf8_32bpp.a is unresolved!

Anyone have an idea how to fix that?

   Ingo Jankowski

 
 
 

8bit pseudocolor and 16/24/32 bit graphics on same screen (G400)?

Post by Thomas Stangle » Sat, 01 Jul 2000 04:00:00




> Update: It seems the Overlay option is what I want; the X server can
be
> started, but once KDE is loaded, the screen messes up (vertical black
> bars etc.) Even the text consoles (!!!) are unreadable afterwards. I
> think maybe its a bug in the "mga" driver module of XFree86 4.0.

> But maybe not. When I activate "Overlay", the X server outputs the
> following line:

> Symbol miOverlaySetRootClip from module
> /usr/X11R6/lib/modules/libxf8_32bpp.a is unresolved!

> Anyone have an idea how to fix that?

>    Ingo Jankowski


Here is a patch which Mark Vojkovich posted a few month ago in
comp.os.linux.x , thread "XFree 4.0: Overlay Visuals". It might be quite
instructive to read the rest of the thread. But I've still the problems
you are describing. Maybe it's due to the SDRAM on my card, I'm still
waiting for my SGRAM replacement.
However, if you get your app running with or without using xnest I'd be
really interested how you did it.

Here's Mark's posting:

 Whoops.  That sucks.  This looks like a bug.  Two things
 you can do to fix it.

   1) build the server statically (Set DoLoadableServer to NO
       in your xc/config/host.def)

   2) Or apply this patch:

 *** xc/programs/Xserver/hw/xfree86/loader/misym.c.old  Mon Mar 13
15:29:37 2000
 --- xc/programs/Xserver/hw/xfree86/loader/misym.c      Mon Mar 13
15:29:39 2000
 ***************
 *** 159,164 ****
 --- 159,165 ----
     SYMFUNC(miOverlayCollectUnderlayRegions)
     SYMFUNC(miInitOverlay)
     SYMFUNC(miOverlayComputeCompositeClip)
 +    SYMFUNC(miOverlaySetRootClip)
     SYMVAR(miZeroLineScreenIndex)
     SYMVAR(miSpritePointerFuncs)
     SYMVAR(miPointerScreenIndex)

Sent via Deja.com http://www.deja.com/
Before you buy.

 
 
 

8bit pseudocolor and 16/24/32 bit graphics on same screen (G400)?

Post by Ingo Jankowsk » Tue, 04 Jul 2000 04:00:00



> Here is a patch which Mark Vojkovich posted a few month ago in
> comp.os.linux.x , thread "XFree 4.0: Overlay Visuals". It might be quite
> instructive to read the rest of the thread. But I've still the problems
> you are describing. Maybe it's due to the SDRAM on my card, I'm still
> waiting for my SGRAM replacement.

That might be it. I already changed that file you mention below, and it
kind of worked, but only when you disabled HW acceleration and used a SW
cursor.
Guess the speed of that solution. :( Even then the screen would be
temporarily disturbed by occasional "shooting stars" racing horizontally
over the desktop. Not very stable either. But the Overlay worked.

Quote:> However, if you get your app running with or without using xnest I'd be
> really interested how you did it.

Here's my device section of /etc/X11/XF86Config...

Section "Device"
    Identifier  "Matrox Millennium G200 16MB"
    Driver      "mga"
    Chipset      "mgag200"
    Option       "HWCursor" "off"
    Option       "NoAccel"  "on"
    Option       "Overlay"
EndSection

Unfortunately, it doesn't work without setting the chipset down to
"mgag200",
the "mgag400" did not work at all.

After that, X opened with an 8-bit screen (Root window depth was 8), but
it was possible to open windows with 24-bit "TrueColor" visual (like xv,
etc). Netscape opened an 8-bit window, though.

Nice detail: All the 8-bit applications get their own colormaps, hence
no weird color-flashing when you switch between apps.

I didn't manage to get a 24-bit root window, though.

Let me know if anything happens on the SD/SGRAM front.

  Ingo Jankowski

 
 
 

8bit pseudocolor and 16/24/32 bit graphics on same screen (G400)?

Post by Thomas Stangle » Wed, 12 Jul 2000 04:00:00


Quote:> Unfortunately, it doesn't work without setting the chipset down to
> "mgag200",
> the "mgag400" did not work at all.

Did you try the following patch (as usual, from Mark Vojkovich)??

 *** xc/programs/Xserver/hw/xfree86/drivers/mga/mga_dacG.c.old  Thu Mar
16 10:57:29 2000
 --- xc/programs/Xserver/hw/xfree86/drivers/mga/mga_dacG.c      Thu Mar
16 11:01:57 2000
 ***************
 *** 363,368 ****
 --- 363,370 ----
                         pReg->Option = 0x50044120;
                   }
                 }
 +              if(pMga->HasSDRAM)
 +                  pReg->Option &= ~(1 << 14);
                 pReg->Option2 = 0x01003000;
                 break;
         case PCI_CHIP_MGAG200:

then the mgag400 driver should work. If you want to have an 24bit root
window you've to invoke your Xserver with

startx -- -depth 24 -cc 4

That worked fine for me - my problem is that I've a 8bit application
that is not smart enough to grab a pseudocolor display if the default
window is truecolor. And a pseudocolor root&default window caused still
some troubles. That's why I'm interested in running 8bit xnest in a
24bit root&default window.

I hope that helps you a little bit

Cheers

t.

Quote:

> After that, X opened with an 8-bit screen (Root window depth was 8),
but
> it was possible to open windows with 24-bit "TrueColor" visual (like
xv,
> etc). Netscape opened an 8-bit window, though.

> Nice detail: All the 8-bit applications get their own colormaps, hence
> no weird color-flashing when you switch between apps.

> I didn't manage to get a 24-bit root window, though.

> Let me know if anything happens on the SD/SGRAM front.

>   Ingo Jankowski

Sent via Deja.com http://www.deja.com/
Before you buy.