VNC 'fix' for 256 colour game only shows 2 colours?

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
IBBoard
Level 1
Level 1
Posts: 7
Joined: Fri Mar 21, 2008 5:20 am

VNC 'fix' for 256 colour game only shows 2 colours?

Post by IBBoard »

I'm trying to run an old (~1995) Windows game under Wine, but it requires 256 colours and won't work any higher. I've checked out the 256 colour hacks page and the X methods don't work, because I use the FGLRX drivers and they don't support 8bpp, so I'm trying VNC.

I've installed vnc-server and vnc so I can play it through a 256 colour VNC connection, but so far I can get the game to run but only in two colours. Other apps I start in VNC (e.g. Eye of Gnome) do show in 256 colours, it's just the 256 colour game that shows in 2 colours.

Does anyone have any ideas why I might be getting a mono-coloured game?

I started VNC using:

Code: Select all

 vncserver :2 -cc 3 -depth 8 -geometry 800x600
And the log file says:

Code: Select all

Xvnc Free Edition 4.1.2
Copyright (C) 2002-2005 RealVNC Ltd.
See http://www.realvnc.com for information on VNC.
Underlying X server release 10499901, 


Sun Jul  6 16:50:44 2008
 vncext:      VNC extension running!
 vncext:      Listening for VNC connections on port 5902
 vncext:      created VNC server for screen 0
Failed to allocate for full set of GLX visuals

Sun Jul  6 16:51:11 2008
 Connections: accepted: 127.0.0.1::35753
 SConnection: Client needs protocol version 3.8
 SConnection: Client requests security type VncAuth(2)

Sun Jul  6 16:51:14 2008
 VNCSConnST:  Server default pixel format depth 8 (8bpp) colour-map
 VNCSConnST:  Client pixel format depth 8 (8bpp) colour-map
I'm suspicious of whether the line "Failed to allocate for full set of GLX visuals" may be the problem, but then I wouldn't have expected it to work at all if it had visual problems.

Thanks.
IBBoard
Level 1
Level 1
Posts: 7
Joined: Fri Mar 21, 2008 5:20 am

Post by IBBoard »

Actually, I've just realised that it only occurs when I hover over the Wine window. It's still not perfect when I don't hover over it (it looks like about 16 colours instead of 256) but it's better.

Does that help or hinder the process?
Ove Kaaven

VNC 'fix' for 256 colour game only shows 2 colours?

Post by Ove Kaaven »

IBBoard wrote:
I'm trying to run an old (~1995) Windows game under Wine, but it requires 256 colours and won't work any higher. I've checked out the 256 colour hacks page and the X methods don't work, because I use the FGLRX drivers and they don't support 8bpp, so I'm trying VNC.

I've installed vnc-server and vnc so I can play it through a 256 colour VNC connection, but so far I can get the game to run but only in two colours. Other apps I start in VNC (e.g. Eye of Gnome) do show in 256 colours, it's just the 256 colour game that shows in 2 colours.

Does anyone have any ideas why I might be getting a mono-coloured game?
Most likely VNC can't handle custom color maps. What VNC calls 256-color
is probably equivalent to a 3/3/2 TrueColor (or DirectColor) visual. But
a 256-color Windows game expects something equivalent to a 8-bit
PseudoColor visual, which unlike a TrueColor visual, uses customizable
color maps/palettes.
IBBoard
Level 1
Level 1
Posts: 7
Joined: Fri Mar 21, 2008 5:20 am

Post by IBBoard »

I've managed to get somewhere with this - I've stopped it showing in monochrome! If I set the xstartup file to run wine (since I don't use VNC for any other purpose) it starts up fine with colour. I'm not sure what caused the "Monochrome on hover" issue.

As for the 256 colours, I've tried with and without "-cc 3" (PseudoColour) and without is worse than with. Is there any way to get VNC to do the same 256 colours as Windows? VNC is a suggested Wine hack for old games, so I'd have thought it should be possible.

If the worst comes to the worst and it won't work properly under Wine then I'll just run it from the Windows XP Virtual Box install that I use for Visual Studio/System.Windows.Forms .Net development, but I'd rather avoid a whole virtual Windows machine just for a game.

Thanks.
IBBoard
Level 1
Level 1
Posts: 7
Joined: Fri Mar 21, 2008 5:20 am

Post by IBBoard »

It's still not entirely perfect as the graphics still aren't as smooth (in 256 colours) as under Win XP, but I've got quite a reasonable setup now. I'll actually go back on the "with and without -cc 3" comment now, as without is better (assumedly because it lets it use closer to its own 256 colours rather than some palette).

To run the game I use the following bash file:

Code: Select all

#! /bin/bash
vncserver :2 -depth 8 -geometry 640x480 && vncviewer -FullColour -passwd ~/.vnc/passwd localhost:2
vncserver -kill :2
and the following xstartup:

Code: Select all

#!/bin/sh

vncconfig -iconic &
# Uncomment the following two lines for normal desktop:
# unset SESSION_MANAGER
# exec /etc/X11/xinit/xinitrc

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
# xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
twm &
cd /home/ibboard/.wine/drive_c/games/warfb/ && wine whshr.exe
I'll post in the app DB when I get it working a bit better, or when I give up!
Locked