These are some additional notes on how to use the GGI svgalib wrapper.
These are some additional notes on how to use the GGI svgalib wrapper.
The svga4libggi wrapper library is a nifty thing - it allows programs
built against svgalib to run on any GGI display target!
However it may sometimes be a little tricky to really get an application
and the wrapper to start properly. Here are some hints for first time users.
You should have read and understood the general mechanics of setting GGI
modes and the options available for any particular display target.
Also note that some targets provide a palettized color model while others
use a 'true-color' model, using RGB values directly. The subtargets
'palemu' and 'trueemu' may be used to emulate either.
Some target's default color mode and resolution may further be determined
by the display setting they are running on, eg. the VESA framebuffer is
started in whatever mode and resolution that you have given there and
cannot be changed by the fbdev display target; the X targets have to
follow the X servers settings.
Look for command line options or configuration settings of the program
that you want to run on top of the svgalib wrapper. Some may allow to
specify color modes and resolutions. It is often easiest to adapt these
to your chosen display target.
Don't expect everything to work! Remember that there are a lot of
components and software layers involved and svgalib as well as
svgalib4libggi itself are some kind of a hack.
Let's use the simple program 'acidwarp' as an example.
We further assume you are running your X server in 1024x768, depth 16.
The debian package acidwarp installs the program to /usr/games/acidwarp.
You have to give the full path on the command line when running as root.
Command line options to acidwarp include '-r #', where '#' stands for 1,
2 or 3, giving 640x480, 800x600 and 1024x768, while the default is to use
320x200. I have not yet managed to run acidwarp successfully on svgalib4-
libggi with a setting other than the default!
The most obvious display targets to start with are the 'X' targets. They
give you more freedom to choose resolution than 'fbdev' and give a better
visual than 'aalib' for instance.
So you start (from an xterm): acidwarp
This gives the following output:
Can't set graphics mode of 320x200 in 256 colors.
Looking at the options for the svgalib wrapper (in README) we find the
environment variable GSW_MODEEMU.
The command line: GSW_MODEEMU=1 acidwarp
gives you a small window with acidwarp running inside.
This uses the 'x' target by default. To test the speed of the 'xlib'
target you would use: GGI_DISPLAY=xlib GSW_MODEEMU=1 acidwarp
Now that we've got the first program running, you may want to take a
closer look at the options to the wrapper as well as GGI target modes.
Experiment a little. GGI_ options and target settings as well as the
GSW_ settings are a little confusing at first glance, but once you got
the hook on it ...
Have fun!
-- Martin Albert <ma@debian.org> Mon, 10 Sep 2001 13:55:31 +0200