"Fossies" - the Fresh Open Source Software Archive

Member "dosemu-1.4.0/src/doc/README/X" (2 Jan 2006, 11937 Bytes) of package /linux/misc/old/dosemu-1.4.0.tgz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 <sect1>
    2 <title>Using X</title>
    3 
    4 <para>
    5 This chapter provides some hints and tips for using DOSEMU in X.
    6 </para>
    7 
    8 <sect2>
    9 <title>Basic information</title>
   10 
   11 <para>
   12 If you start <command>dosemu</command> in X it brings up its own window,
   13 in which you can
   14 also execute graphical programs such as games. To force text-only execution
   15 of DOSEMU in an xterm or other terminal (konsole, gnome-terminal, and so on),
   16 you need to run <command>dosemu -t</command>.
   17 </para>
   18 
   19 <para>
   20 Use <command>dosemu -w</command> to start DOSEMU in fullscreen mode.
   21 When running DOSEMU,
   22 you can flip between fullscreen and windowed mode by pressing
   23 &lt;Ctrl&gt;&lt;Alt&gt;&lt;F&gt;.
   24 The graphics window is resizeable.
   25 </para>
   26 
   27 <para>
   28 Some DOS applications want precise mouse control that is only possible
   29 if the mouse cursor is trapped in the DOSEMU window. To enable this you
   30 need to grab the mouse by pressing &lt;Ctrl&gt;&lt;Alt&gt;&lt;Home&gt;.
   31 Similarly, you can grab the keyboard by pressing
   32 &lt;Ctrl&gt;&lt;Alt&gt;&lt;K&gt;, or
   33 &lt;Ctrl&gt;&lt;Alt&gt;&lt;Shift&gt;&lt;K&gt; if your
   34 window manager already grabs &lt;Ctrl&gt;&lt;Alt&gt;&lt;K&gt;.
   35 After you grab the keyboard
   36 all key combinations (including &lt;Alt&gt;&lt;Tab&gt; and so on)
   37 are passed to DOSEMU.
   38 In fullscreen mode the mouse and keyboard are both automatically grabbed.
   39 </para>
   40 
   41 <para>
   42 Use &lt;Ctrl&gt;&lt;Alt&gt;&lt;Pause&gt; to pause and unpause
   43 the DOSEMU session, which is useful if you want it to sit silently
   44 in the background when it is eating too much CPU time.
   45 Press &lt;Ctrl&gt;&lt;Alt&gt;&lt;PgDn&gt; or click the close button
   46 of the window to exit DOSEMU.
   47 </para>
   48 
   49 <para>
   50 DOSEMU uses bitmapped internal fonts by default, so it can accurately
   51 simulate a real VGA card text mode. It is also possible to use X fonts.
   52 The advantages of these is that they may be easier on the eyes, and
   53 are faster, in particular if you use DOSEMU remotely. Any native DOS font
   54 setting utilities do not work, however. To set an X font use the
   55 provided xmode.com utility, using
   56 <screen>
   57 xmode -font vga
   58 </screen>
   59 at the DOS prompt or
   60 <screen>
   61 $_X_font = "vga"
   62 </screen>
   63 in dosemu.conf. The provided fonts are vga, vga8x19, vga11x19, vga10x24,
   64 vga12x30, vga-cp866, and vga10x20-cp866.
   65 </para>
   66 
   67 <para>
   68 If the mouse is not grabbed, then you can copy and paste text if the DOSEMU
   69 window is in text mode. This uses the standard X mechanism: select by
   70 dragging the left mouse button, and paste by pressing the middle mouse
   71 button.
   72 </para>
   73 </sect2>
   74 
   75 <sect2>
   76 <title> More detailed information, hints and tips</title>
   77 
   78 <para>
   79 What you might take care of:
   80 </para>
   81 
   82 <para>
   83 
   84 <itemizedlist>
   85 <listitem>
   86 
   87 <para>
   88 If backspace and delete do not work, you can try
   89  'xmodmap -e "keycode 22 = 0xff08"' to get use of your backspace key, and
   90 </para>
   91 </listitem>
   92 <listitem>
   93 
   94 <para>
   95  'xmodmap -e "keycode 107 = 0xffff"' to get use of your delete key.
   96 </para>
   97 </listitem>
   98 <listitem>
   99 
  100 <para>
  101  Make sure DOSEMU has X support compiled in. The configure script
  102  complains loudly if it does not find X development libraries.
  103 </para>
  104 </listitem>
  105 
  106 <listitem>
  107 <para>
  108  There are some X-related configuration options for dosemu.conf.
  109 See the file itself for details.
  110 </para>
  111 </listitem>
  112 <listitem>
  113 
  114 <para>
  115  Keyboard support of course depends on your X keyboard mappings (xmodmap).
  116 If certain keys don't work (like Pause, Backspace,...), it *might* be 
  117 because you haven't defined them in your xmodmap, or defined to something
  118 other than DOSEMU expects.
  119 </para>
  120 </listitem>
  121 <listitem>
  122 <para>
  123  using the provided icon (dosemu.xpm):
  124 </para>
  125 
  126 <para>
  127 
  128 <itemizedlist>
  129 <listitem>
  130 
  131 <para>
  132  you need the xpm (pixmaps) package. If you're not sure, look for
  133 a file like /usr/X11R6/lib/libXpm.so.*
  134 </para>
  135 </listitem>
  136 <listitem>
  137 
  138 <para>
  139  you also need a window manager which supports pixmaps. Fvwm is fine,
  140 but I can't tell you about others. Twm probaby won't do.
  141 </para>
  142 </listitem>
  143 <listitem>
  144 
  145 <para>
  146  copy dosemu.xpm to where you usually keep your pixmap (not bitmap!) 
  147 files (perhaps /usr/share/pixmaps)
  148 </para>
  149 </listitem>
  150 <listitem>
  151 <para>
  152 tell your window manager to use it. For fvwm, add the following
  153 line to your fvwmrc file:
  154 </para>
  155 
  156 <para>
  157 
  158 <screen>
  159      
  160      Icon "xdosemu"   dosemu.xpm
  161 </screen>
  162 
  163 </para>
  164 
  165 <para>
  166 This assumes you have defined a PixmapPath. Otherwise, specify the
  167 entire pathname.
  168 </para>
  169 </listitem>
  170 <listitem>
  171 
  172 <para>
  173  note that if you set a different icon name than "xdosemu" in your
  174 dosemu.conf, you will also have to change the fvwmrc entry.
  175 </para>
  176 </listitem>
  177 <listitem>
  178 
  179 <para>
  180  restart the window manager. There's usually an option in the
  181 root menu to do so.
  182 </para>
  183 </listitem>
  184 
  185 </itemizedlist>
  186 
  187 </para>
  188 
  189 <para>
  190 Now you should see the icon whenever you iconify xdosemu.
  191 </para>
  192 
  193 <para>
  194 Note that the xdosemu program itself does not include the icon - that's
  195 why you have to tell the window manager. I chose to do it this way
  196 to avoid xdosemu <emphasis>requiring</emphasis> the Xpm library.
  197 </para>
  198 </listitem>
  199 <listitem>
  200 
  201 <para>
  202  If anything else does not work as expected, don't panic :-)
  203 Remember the thing is still under construction.
  204 However, if you think it's a real bug, please tell me.
  205 </para>
  206 </listitem>
  207 
  208 </itemizedlist>
  209 
  210 </para>
  211 
  212 </sect2>
  213 <sect2>
  214 <title>The VGA Emulator</title>
  215 
  216 <para>
  217 In X, a VGA card is emulated. The same happens if you use the SDL library
  218 using <command>dosemu -S</command>. This emulation (vgaemu) enables
  219 X to run graphics modes.
  220 </para>
  221 
  222 <para>
  223 Some features:
  224 <itemizedlist>
  225 <listitem>
  226 
  227 <para>
  228  Video memory. 1 Mb is allocated. It is mapped with mmap() in the VGA 
  229 memory region of DOSEMU (0xa00000-0xbfffff) to support bank switching.
  230 This is very i386-Linux specific, don't be surprised if it doesn't work
  231 under NetBSD or another Linux flavour (Alpha/Sparc/MIPS/etc).
  232 </para>
  233 </listitem>
  234 <listitem>
  235 
  236 <para>
  237  The DAC (Digital to Analog Converter). The DAC is completely emulated,
  238 except for the pelmask. This is not difficult to implement, but it is
  239 terribly slow because a change in the pelmask requires a complete redraw
  240 of the screen. Fortunately, the pelmask changes aren't used often so
  241 nobody will notice ;-)
  242 </para>
  243 </listitem>
  244 <listitem>
  245 
  246 <para>
  247  The attribute controller is emulated.
  248 </para>
  249 </listitem>
  250 <listitem>
  251 
  252 <para>
  253  The emulator emulates a basic Trident TVGA8900C graphics card.
  254  All standard VGA modes are emulated, most VGA hardware features (mode-X,
  255  320x240 and so on), some Trident extensions, and on
  256  top of that many high-resolution VESA 2.0 modes, that were not present
  257  in the original Trident card.
  258  Some (very few) programs, such as Fast Tracker, play intimately with the
  259  VGA hardware and may not work. As vgaemu improves these problems should
  260  disappear.
  261 </para>
  262 </listitem>
  263 
  264 <listitem>
  265 <para>
  266  Nearly full VESA 2.0 support.
  267 </para>
  268 </listitem>
  269 <listitem>
  270 
  271 <para>
  272  A VESA compatible video BIOS is mapped at 0xc00000. It is small because
  273  it only contains some glue code and the BIOS fonts (8x8, 8x14, 8x16).
  274 </para>
  275 </listitem>
  276 
  277 <listitem>
  278 <para>
  279  support for hi- and true-color modes (using Trident SVGA mode numbers
  280 and bank switching)
  281 </para>
  282 </listitem>
  283 <listitem>
  284 
  285 <para>
  286  Support for mode-X type graphics modes (non-chain4 modes as used by e.g. DOOM)
  287 </para>
  288 </listitem>
  289 <listitem>
  290 
  291 <para>
  292  gamma correction for graphics modes
  293 </para>
  294 </listitem>
  295 <listitem>
  296 
  297 <para>
  298  video memory size is configurable via dosemu.conf
  299 </para>
  300 </listitem>
  301 <listitem>
  302 
  303 <para>
  304  initial graphics window size is configurable
  305 </para>
  306 </listitem>
  307 
  308 <listitem>
  309 <para>
  310 The current hi- (16bpp) and true (24/32bpp) color support does
  311 not allow resizing of the graphics window and gamma correction
  312 is ignored.
  313 </para>
  314 </listitem>
  315 </itemizedlist>
  316 
  317 <para>
  318 As the typical graphics mode with 320x200x8 will be used often
  319 with large scalings and modern graphics boards are pretty fast,
  320 Steffen Winterfeldt added something to eat up your CPU time: you can turn on
  321 the bilinear interpolation. It greatly improves the display
  322 quality (but is rather slow as I haven't had time yet to implement
  323 an optimized version - it's plain C for now).
  324 If the bilinear filter is too slow, you might instead try the linear
  325 filter which interpolates only horizontally.
  326 </para>
  327 
  328 <para>
  329 Note that (bi)linear filtering is not available on all
  330 VGA/X display combinations. The standard drawing routines
  331 are used instead in such cases.
  332 </para>
  333 
  334 <para>
  335 If a VGA mode is not supported on your current X display, the graphics
  336 screen will just remain black. Note that this <emphasis remap="bf">does not</emphasis> mean
  337 that DOSEMU has crashed.
  338 </para>
  339 
  340 <para>
  341 The only unsupported VBE function is VGA state save/restore. But this
  342 functionality is rarely used and its lack should not cause
  343 too much problems.
  344 </para>
  345 
  346 <para>
  347 VBE allows you to use the horizontal and vertical scrolling
  348 function even in text modes. This feature is not implemented.
  349 </para>
  350 
  351 <para>
  352 If you think it causes problems, the linear frame buffer (LFB)
  353 can be turned of via dosemu.conf as well as the protected mode
  354 interface. Note, however, that LFB modes are faster than
  355 banked modes, even in DOSEMU.
  356 </para>
  357 
  358 <para>
  359 The default VBE mode list defines a lot of medium resolution
  360 modes suitable for games (like Duke3D). You can still
  361 create your own modes via dosemu.conf. Note that you
  362 cannot define the same mode twice; the second (and all
  363 subsequent) definitions will be ignored.
  364 </para>
  365 
  366 <para>
  367 Modes that are defined but cannot be supported due
  368 to lack of video memory or because they cannot be
  369 displayed on your X display, are marked as unsupported
  370 in the VBE mode list (but are still in it).
  371 </para>
  372 
  373 <para>
  374 The current interface between VGAEmu and X will try to update
  375 all invalid video pages at a time. This may, particularly
  376 in hi-res VBE/SVGA modes, considerably disturb DOSEMU's signal
  377 handling. That cannot be helped for the moment, but will
  378 be addressed soon (by running an extra update thread).
  379 </para>
  380 
  381 <para>
  382 If you really think that this is the cause of your problem, you might
  383 try to play with veut.max_max_len in env/video/render.c.
  384 This variable limits the amount of video memory that is updated
  385 during one timer interrupt. This way you can dramatically
  386 reduce the load of screen updates, but at the same rate reduce your
  387 display quality.
  388 </para>
  389 
  390 <para>
  391 Gamma correction works in both 4 and 8 bit modes. It must be specified
  392 as a float value, e.g. $_X_gamma=(1.0). Higher values
  393 give brighter graphics, lower make them darker. Reasonable
  394 values are within a range of 0.5 ... 2.0.
  395 </para>
  396 
  397 <para>
  398 You can specify the video memory size that the VGA emulator
  399 should use in dosemu.conf. The value will be rounded up
  400 to the nearest 256 kbyte boundary. You should stick to typical
  401 values like 1024, 2048 or 4096 as not to confuse DOS applications.
  402 Note that whatever value you give, 4 bit modes are only
  403 supported up to a size of 800x600.
  404 </para>
  405 
  406 <para>
  407 You can influence the initial size of the graphics window in various
  408 ways. Normally it will have the same size (in pixel) as the VGA graphics
  409 mode, except for mode 0x13 (320x200, 256 colors), which will be scaled by
  410 the value of <emphasis>mode13fact</emphasis> (defaults to 2).
  411 Alternatively, you can directly specify a window size in dosemu.conf via
  412 <emphasis>$_X_winsize</emphasis>. You can still resize the window later.
  413 </para>
  414 
  415 <para>
  416 The config option <emphasis>$_X_fixed_aspect</emphasis> allows you to fix the aspect ratio
  417 of the graphics window while resizing it. Alternatively, <emphasis>$_X_aspect_43</emphasis>
  418 ties the aspect ratio to a value of 4:3. The idea behind this is that, whatever
  419 the actual resolution of a graphics mode is in DOS, it is displayed on
  420 a 4:3 monitor. This way you won't run into problems with modes such
  421 as 640x200 (or even 320x200) which would look somewhat distorted otherwise.
  422 </para>
  423 
  424 <para>
  425 For planar modes (for instance, most 16 colour modes, but also certain
  426 256-colour modes: mode-X), vgaemu has to
  427 switch to partial cpu emulation. This can be slow, but expect it to
  428 improve over time.
  429 </para>
  430 </sect2>
  431 
  432 </sect1>
  433