Dive X Window Server
0.1-Beta-3 released!
|
Important!
This demo is not for fainthearts. You should be a experienced
guy, or at least
a fearless one. Do you can download it from Hobbes
(xpmfb.zip, 748,31k).
++++++++READ EVERY WORD OF THIS FILE++++++++
There are no guarantees, either implicit or explicit, in this product.
You use it at your own risk. It's an unfinished product and may lack
many features. It is not intended to be used in a production
environment, and I will not accept any responsability for any damage or
loss due to the use of this program.
Installing
1.- Install XFreeOS/2 and get any other server to run.
2.- Unpack the Xpmfb.zip package into a single directory.
[C:\PMFB] unzip Xpmfb.zip -d C:\PMFB
3.- If you are using XFreeOS/2 3.3.2 then copy the file
%X11ROOT%/XFree86/lib/X11/XF86Config to
%X11ROOT%/XFree86/lib/X11/XConfig
4.- Edit the XConfig file and add the following piece of text
at the end
----cut here-----------
Section "Screen"
Driver "fbdev"
Device "My device"
Monitor "My Monitor"
Subsection "Display"
Modes "640x400"
ViewPort 0 0
EndSubsection
EndSection
----cut here-----------
4.1- Replace "My Monitor" with a monitor identifier found in
your XConfig file. If you are clueless, look in XConfig
for a piece of text looking like
----
Section "Monitor"
Identifier "UltraScan-233"
VendorName "ACME"
ModelName "FastXGA"
...
----
and copy the [Identifier] string ("UltraScan-233" in the
example).
4.2- Replace "My device" with a device identifier found in
your XConfig file. If you are clueless, look in XConfig
for a piece of text looking like
----
Section "Device"
Identifier "VL-41"
VendorName "Unknown"
BoardName "Unknown"
----
and copy the [Identifier] string ("VL-41" in the example).
4,3- Choose a value for Modes. You can use any one of those
defined in the ModeLines sections in XConfig. (Usually,
640x400 or 640x480 work and cause no big overhead).
Note: these values are unimportant and will not affect the
performance of Xpmfb -- they are just here to keep the XFree86
code happy.
5.- Have a try (see below for the appropiate options)
[C:\PMFB] startx2.cmd -- xpmfb -direct -screen 640x400x8
6.- From inside the server you should invoke xmodmap (See below)
or you can automate this by fixing `startx2.cmd'.
The startx2 script
It is a script that is designed to work much like `startx
+ xinit'.
However, it starts, by default, the Xpmfb server and it does not
switch to full screen mode because Xpmfb does not need it.
The command line parameters of startx2 are more or less as follows
startx2 [client options1] -- [server options2]
Default values are
client = %X11ROOT%\XFree86\lib\X11\xinit\xinitrc.cmd
options1 =
server = xpmfb.exe
options2 = -direct -screen 640x400x8
These options should work for a usual setup where 'xpmfb.exe' is
accessible (i.e., it is either in the current directory or in
any other one which is listed in the PATH environment variable).
The command line parameters
1) -screen WxHxD
-------------
The meaning of every value is
W = X windows horizontal resolution
H = X windows vertical resolution
D = color depth (i.e., bits per color)
The color depth is the number of bits that the graphics adapter uses
to represent a color. Usual values are 8, 16, 24 and 32. Color Depths
are usually reflected in the first and second pages of the `System'
object in the `System Configuration' folder.
In the `Depth' field of XConfig you should specify the value that the
Desktop or Xpmfb may fail to initialize. When the real color depth is
used, Xpmfb is usually able to directly access the video hardware
(See below for the `-direct' option) and the graphic operations go
faster.
OTOH, it is also possible to use a minimal color depth of 8 bits even
if OS/2 is actually using 16, 24 or 32. Under such situation Xpmfb
sets DIVE to translate the video buffer from one buffer to another
and the server may slow down.
2) -direct
-------
I had reports that DIVE's DiveBlit routine did not work in some
systems, while DiveAcquireFrameBuffer did. This made me rewrite
most of the graphics ops (not much, 50 lines of code) using direct
access to the video memory. It works pretty fast in my 486DX2,
but you guys with video accelerators might prefer not using it.
The direct video routine automatically deactivates itselve when
you specify a color depth of 8 in a 16,24 or 32 environment. This
is because that code is not smart enough to perform palette
translation (And it'll never be. Don't ask me to)
Deactivation also occurs when the video aperture size is not a multiple
of the scan line size. This might or might not be fixed in the future.
3) -malloc
-------
This option, combined with [-direct], should be used on systems
where DIVE is broken. It allocates the X windows screen buffer in
normal RAM.
4) -os2HRTTimer
------------
Uses the TIMER0.SYS device to get a high resolution timer. Not really
needed, I think, but kept for compatibility with XFreeOS/2's servers.
Colors
------
Graphics operations in 256 colors mode have been succesfully accelerated
by fixing the color palette: that is, X applications are not allowed to
alter the physical palette but instead they are provided with a color
palette that is close to the ones they expect.
This color substitution does not happen in 16, 24 and 32 bits depth
modes.
Window size
-----------
The window cannot grow past a limiting size (The one of the virtual
screen it allocates). OTOH, when it is smaller than this size you
get a partial view of the screen without being able to scroll up
or down. Thus, I recommend you to maximize the window.
The keyboard
------------
Hey kids, this is not my fault, but PM seems to translate the PC-keyboard
scan codes to a different set. This is a bit annoying because a keyboard
mapping that works with XFreeOS/2's servers does not longer work with
Xpmfb --at least for some keys (Right Alt, right ctrl, etc)--.
I've found a sort of fix: you have to invoke xmodmap with the appropiate
translation table for the keys that need to be fixed. For my 101/102
AT keyboard the fix is
--keymap---------cut here--------------
! These are the keys that have to be fixed (i.e., they have wrong
! keycodes in the XFree86 keymap):
keycode 102 = Mode_switch Multi_key
keycode 99 = Control_R
keycode 105 = Up
keycode 110 = Down
keycode 108 = Right
keycode 107 = Left
keycode 103 = Pause
keycode 101 = Print Execute
keycode 112 = Insert
keycode 104 = Home
keycode 106 = Prior
keycode 113 = Delete
keycode 109 = End
keycode 111 = Next
keycode 100 = KP_Divide
clear Shift
clear Lock
clear Control
clear Mod1
clear Mod2
clear Mod3
clear Mod4
clear Mod5
add Shift = Shift_L Shift_R
add Lock = Caps_Lock
add Control = Control_L Control_R
add Mod1 = Alt_L
add Mod2 = Num_Lock
add Mod3 = Mode_switch
add Mod5 = Scroll_Lock
--keymap---------cut here--------------
The steps are more or less like this:
1) Make sure that XFreeOS/2 uses XKB and that the proper
keymap is
selected. This is usually done with the xf86config program.
2) Cut the preceding text out and save it anywhere.
3) Next, every time you start Xpmfb you should invoke xmodmap.
For instance, at home I have the keymaps in c:/usr/etc/xpmfbkeys
and I've added a line to `startx2.cmd' saying
'detach xmodmap c:/usr/etc/xpmfbkeys'
See `startx2.cmd' for the place where this line or a similar
one should go.
Exiting
To exit the server, try pressing ALT+F4 or close the window (Double
click on the upper left corner). If there's no response, move the
window (draggin with the mouse pressed on the title). That'll cause a
window update and thus the server will be killed.
If nothing else worked, you can still use the Holger's `death.exe'
program together with my `killname.cmd' to kill the server whenever
previous method didn't work. For example
[C:\PMFB] killname xpmfb.exe
You should get a message saying `rc = 0'. `death.exe' must be in some
directory listed in the PATH or in the current directory.
Uninstalling
1.- Delete the C:\PMFB directory together
with the files you got from
the package.
Fixed bugs
1.- The server got too large when using truecolor modes.
2.- Doubled images when using DIVE translation to 8 bit color.
3.- Distorded colors in >= 16bits color depth
4.- Unkillable server process at exit.
5.- When using DIVE translation screen is not automatically updated.
Known bugs
1.- Direct video access is not possible for video apertures
that are not
a multiple of the screen scan line size. The reason? Lazyness of the
author :)
2.- The window does not get the focus when you click on it. This is
good if you want both an X app and a PM one to share the screen.
Bug reports
If the server crashes or it simply does not start, try launching it
by hand:
1) Open a OS/2 command window.
2) Launch Xpmfb with the appropiate options and grab the output. For
example
xpfmb -direct -screen 640x400x8 2>&1 > error.log
3) Have a look at 'error.log'. It usually says why the server does not
want to work.
4) If you still don't know what's going on, e-mail me the log file
'error.log' together with an explanation of any other sympthoms.
A description of the hardware would be OK, too.
Copyrights
I really do not know about laws at all and I most surely
never will
so please tell me if I am doing anything wrong.
1) For the base X server code
--------------------------
Copyright c 1996 X Consortium
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish, dis-
tribute, sublicense, and/or sell copies of the Software, and to permit
persons to whom the Software is furnished to do so, subject to the fol-
lowing conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL ITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE X CONSORTIUM
BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABIL ITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of the X Consortium shall
not be used in advertising or otherwise to promote the sale, use or
other dealings in this Software without prior written authorization from
the X Consortium.
X Window System is a trademark of X Consortium, Inc.
2) For some of the OS/2 support routines
-------------------------------------
/*
* (c) Copyright 1996 by Sebastien Marineau
* <marineau@genie.uottawa.ca>
*
* (c) Copyright 1996,1997 by Holger Veit
* <Holger.Veit@gmd.de>
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL *
HOLGER VEIT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, * WHETHER IN
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF * OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* Except as contained in this notice, the name
of Sebastien Marineau shall not be
* used in advertising or otherwise to promote the sale, use or other dealings
* in this Software without prior written authorization from Sebastien Marineau.
CONTACT AUTHOR:
Juan Jose Garcia Ripoll
Universidad de Castilla-La Mancha,
T.S.I. Industriales,
Dept. Matematicas
E-mail: worm@arrakis.es
WWW: http://www.arrakis.es/~worm
@Macarlo, Inc.
@Macarlo's Shareware & Web
OS/2
Java Lobby Member
Java Site Accredited
[TOP]
[HOME] [INDEX]