  The dosemu HOWTO
  edited by Mike Deisher, deisher@dspsun.eas.asu.edu
  v0.52.6, 2 Dec 1994

  This is the `Frequently Asked Questions' (FAQ) / HOWTO document for
  dosemu.  The most up-to-date version of the dosemu-HOWTO may be found
  in dspsun.eas.asu.edu:/pub/dosemu.

  1.  The preliminaries

  1.1.  What is dosemu, anyway?

  To quote the manual, "dosemu is a user-level program which uses
  certain special features of the Linux kernel and the 80386 processor
  to run MS-DOS in what we in the biz call a `DOS box.'  The DOS box, a
  combination of hardware and software trickery, has these capabilities:

  o the ability to virtualize all input/output and processor control
  instructions

  o the ability to support the word size and addressing modes of the
  iAPX86 processor family's "real mode," while still running within the
  full protected mode environment

  o the ability to trap all DOS and BIOS system calls and emulate such
  calls as are necessary for proper operation and good performance

  o the ability to simulate a hardware environment over which DOS
  programs are accustomed to having control.

  o the ability to provide MS-DOS services through native Linux
  services; for example, dosemu can provide a virtual hard disk drive
  which is actually a Linux directory hierarchy."


  1.2.  What's the newest version of dosemu and where can I get it?

  The newest version of dosemu is dosemu0.52 and can be ftp'ed from the
  following sites:

       dspsun.eas.asu.edu:/pub/dosemu/
       tsx-11.mit.edu:/pub/linux/ALPHA/dosemu/



  However, pre-release versions are also available for developers and
  ALPHA testers.  They may be found in

       dspsun.eas.asu.edu:/pub/dosemu/Development/
       tsx-11.mit.edu:/pub/linux/ALPHA/dosemu/Development


  and have names of the form pre0.53_??.  The pre-release code has the
  distinct advantage that it is compatible with the most recent Linux
  kernels.  Also, it includes new features (most notably X support).
  Remember that this is ALPHA code, however:  there may be serious bugs
  and very little documentation for new features.


  1.3.  Where can I follow the development?

  If you want to follow the development of dosemu, you should consider
  subscribing to the MSDOS channel on Linux-activists.  To subscribe,
  send mail to linux-activists-request@niksula.hut.fi.  Your mail HEADER
  or FIRST LINE must contain the line:

                          X-Mn-Admin: join MSDOS


  To post to the list, send mail to linux-activists@niksula.hut.fi.
  Your mail HEADER or FIRST LINE must contain the line:

                          X-Mn-Key: MSDOS




  1.4.  What documentation is available for dosemu?

  The dosemu manual (dosemu.texinfo) written by Robert Sanders has not
  been updated in some time but is still a good source of information.
  It is distributed with dosemu.

  The "dosemu Novice's Altering Guide" or DANG is a road map to the
  inner workings of dosemu.  It is designed for the adventurous, those
  who wish to modify the source code themselves.  The DANG is maintained
  by Alistair MacDonald (am20@unix.york.ac.uk) and is posted once in a
  while to the MSDOS channel of Linux Activists.

  The EMU success list (EMUsuccess.txt) is a list of all programs that
  have been reported to work with dosemu.  It is posted once in a while
  to the MSDOS channel of Linux Activists.  The most recent version can
  be found on dspsun.eas.asu.edu:/pub/dosemu.

  And then, of course, there is the dosemu FAQ/HOWTO.  But you already
  know about that, don't you.  It is also posted once in a while to the
  MSDOS channel of Linux Activists.  The most recent version can be
  found on dspsun.eas.asu.edu:/pub/dosemu.


  1.5.  How do I submit changes or additions to the HOWTO?

  The preferred method is to edit the file, dosemu-HOWTO-xx.x.sgml to
  incorporate the changes, create a diff file by typing something like


                 diff original-file new-file



  and send it to deisher@dspsun.eas.asu.edu.  If you do not know SGML,
  that's ok.  Changes or new information in any form will be accepted.
  Creating the diff file just makes it easier on the HOWTO maintainer.
  :-)


  2.  Compiling and installing dosemu

  2.1.  Where are the installation instructions?

  The installation instructions are in the file, "QuickStart", included
  in the distribution.


  2.2.  Why won't dosemu 0.52 compile?

  (7/9/94)

  There is a bug in the makefile of dosemu 0.52.  The makefile expects
  the source to be located in /usr/src/dosemu????.  Either install the
  source under /usr/src or try make clean ; make config ; make dep ;
  make all.
  Of course, this is not the only possible reason (see below).


  2.3.  How can I be a bone-head when installing dosemu?

  a.k.a. Top Ten Stupid Mistakes installing dosemu (7/9/94)


  1. Don't read the QuickStart Guide.
  2. Try to compile with a kernel older than 1.0.8.
  3. Try to compile with an *unpatched* kernel >= 1.0.8.
  4. Try to compile with a kernel older than 1.1.12.
  5. Use dosemu with a kernel that does not have IPC compiled in.
  6. Compile with gcc older than 2.5.8 or libc older than 4.5.21.
  7. Forget to edit your /etc/dosemu.conf file.
  8. Forget to run "FDISK /mbr" on your hdimage.
  9. Forget to run "mkpartition" when using partition access.
  10. Don't compile dosemu with sufficient priveledges (i.e., root).



  [Please send me your stupid mistakes for inclusion in this list.  I
  promise you will remain anonymous.  ;-)]


  3.  Hard disk setup

  3.1.  How do I use my hard disk with dosemu?

  First, mount your dos hard disk partition as a Linux subdirectory.
  For example, you could create a directory in Linux such as /dos (mkdir
  -m 755 /dos) and add a line like

     /dev/hda1       /dos     msdos   umask=022


  to your /etc/fstab.  (In this example, the hard disk is mounted read-
  only.  You may want to mount it read/write by replacing "022" with
  "000" and using the -m 777 option with mkdir).  Now mount /dos.  Now
  you can add a line like

    lredir d: linux\fs/dos


  to the AUTOEXEC.BAT file in your hdimage (see the comments on LREDIR
  below).  On a multi-user system you may want to use

    lredir d: linux\fs\${home}


  where "home" is the name of an environmental variable that contains
  the location of the dos directory (/dos in this example).

  ---------------------


  Tim Bird (Tim_R_Bird@Novell.COM) states that LREDIR users should

  be careful when they use LREDIR in the autoexec, because COMMAND.COM
  will continue parsing the autoexec.bat from the redirected drive as
  the same file offset where it left off in the autoexec.bat on the
  physical drive.  For this reason, it is safest to have the
  autoexec.bat on the redirected drive and the physical drive
  (diskimage) be the same.


  ---------------------


  Robert D. Warren (rw11258@xx.acs.appstate.edu) reported (4/28/94) that

  I boot off a small hdimage file (less than 1 MB - and twice as large
  as needs be at that), and the next to last line in my config.sys file
  on the hdimage boot image is:


          install=c:\lredir.exe LINUX\FS\home/dos


  This will execute lredir just before the command interpreter runs. And
  I have successfully run it with both command.com and 4DOS.  This elim-
  inates the offset problem using lredir in autoexec.bat.


  3.2.  Can I use my stacked/double-spaced/super-stored disk?

  At this time, compressed drives cannot be accessed via the redirector
  (lredir or emufs).  However, many people have had success by simply
  uncommenting the

     disk { wholedisk "/dev/hda" }        # 1st partition on 1st disk


  line in their dosemu config file.  Others have had success using

     disk { partition "/dev/hda1" 1 }


  and running the mkpartition utility (included in the dosemu distribu-
  tion).

  [WARNING:  Make sure your dos partitions are not mounted and writeable
  from Linux while you are using dosemu with wholedisk or partition
  access.  This is an easy way to destroy the data on your dos
  partition.]

  ---------------------

  If LILO is installed, the above will not work.  However...

  Thomas Mockridge (thomas@aztec.co.za) reported (8/5/94) that

  To boot dosemu with LILO and Stacker 4.0 I did a little work around...

  1. dd the MBR to a file. (or norton utility, etc., first 512 bytes)

  2. Boot dos (from full boot not emu), do a fdisk /mbr, make your dos
  partition active with (dos) fdisk.

  3. Copy the new MBR to a file.

  4. Replace the original MBR

  5. Copy the second MBR to /var/lib/dosemu/partition.hda? (Whichever is
  your dos partition)

  6. Set dosemu.conf

                 disk {partition "/dev/hda? ?"}



  7. Start dosemu and and voila!  No LILO.

  ---------------------

  Holger Schemel (q99492@pbhrzx.uni-paderborn.de) reported (2/10/94)
  that

  Works even fine under DOSEMU with MS-DOS 6.0. If you have problems,
  then you have to edit the file 'DBLSPACE.INI' manually and change the
  disk letter to the letter your drive gets under DOSEMU.

  ---------------------

  Darren J Moffat (moffatd@dcs.gla.ac.uk) also reported (3/27/94)

  "...use 6.2 if you can get it!!  Just make sure you have a lilo boot
  disk on hand since dos 6{.2} will change the MBR of the boot HD."


  3.3.  I get an error message about my config.sys file but it looks
  fine.

  Corey Sweeney (corey@amiganet.xnet.com) reported (12/8/93) that

  Sometimes when loading config.sys you will get a error message saying
  something like "error in line 6 of config.sys".  The problem will go
  away if you add several carriage returns at the end of your
  config.sys.


  3.4.  Is it safe to use dosemu with DOUBLE?

  Joep Mathijssen (joep@tm.tno.nl) reported (7/9/94) that

  Last night I installed DOSEMU-0.52 on a DouBle'd disk (compressed file
  system for Linux). But when I tried to put a system on my hdimage, I
  got an "ERROR ON DRIVE C:" message.  After putting the hdimage on a
  normal filesystem, it worked fine.  Afterwards, I found the my
  compressed filesystem was ruined.  Ah well, DouBle is an Alpha
  version, so problems like these can be expected.


  4.  Serial ports and mice

  4.1.  Where are the (microsoft compatible) mouse drivers?

  Tom Kimball (tk@pssparc2.oc.com) reported (11/24/93) that

  Several people said to use a different mouse driver and suggested
  some.  I found a couple that seem to work fine.

     oak.oakland.edu:/pub/msdos/mouse/mouse701.zip   (mscmouse)
     oak.oakland.edu:/pub/msdos/mouse/gmous102.zip   (gmouse)




  4.2.  Why doesn't the mouse driver work?

  Scott D. Heavner (sdh@fishmonger.nouucp) reported (11/27/93) that

  If you start the mouse driver and it just hangs (it might actually
  take 30-60s), but if you are waiting longer than a minute for the
  mouse driver to start, remove any "timer" lines in your config file.


  4.3.  Why does dosemu clobber COM4?

  Rob Janssen (rob@pe1chl.ampr.org) reported (3/24/94) that

  According to jmorriso@bogomips.ee.ubc.ca, "dosemu still clobbers COM4
  (0x2e8, IRQ 5). 0x2e8 isn't in ports{} in config.  I have to run
  setserial /dev/cua3 irq 5 on it after dosemu exits."

  This is caused by your VGA BIOS.  I have found that by enabling the IO
  port trace and seeing where it was clobbered.

  Disable the "allowvideoportaccess on" line in config and it will work
  fine.  When you then have problems with the video, try to enable more
  selective ranges of IO addresses (e.g., 40-43).


  4.4.  How do I use dosemu over the serial ports?

  Corey Sweeney (corey@amiganet.xnet.com) reported (12/8/93) that

  If you plan to be using dosemu over a serial line, telnet session, or
  just don't want to use raw console mode, then you will probably want
  to get to know the termcap file.  For those who don't know, the
  termcap file is usually located in the /etc directory.  It contains
  the information on what sequences of characters to send to your
  terminal, and what sequences of characters from your terminal
  represent what keystrokes.  If when you hit F5, and it does not work,
  it will usually be the fault of a incorrect termcap entry.  (To learn
  more about termcaps look up the termcap man page.)

  Now the information in the termcap relates to entries in the dosemu
  code.  So after you put k5=\E[[E in your termcap, whenever your
  terminal sends \E[[E, dosemu translates that and says "he hit the k5
  key!"  Then it is up to dosemu to figure out what the proper scancode
  for the k5 key is, and push that into the buffer in some magical way.
  To determine the scancode, it looks up in a little table in termio.c.
  In termio.c under the line which (currently) says

     #define FUNKEYS 20


  There exist several lines following the form

     {NULL, "termcap code", scancode} /* name of key */


  so when it says

     {NULL, "k5", 0x3f00} /* F5 */


  it's saying that 0x3f00 is the scancode for F5, and that when the per-
  son activates the k5 sequence (defined in the termcap) to stuff the F5
  scancode into the buffer.

  Now that's all fine and dandy for analyzing how dosemu does this,  but
  you probably want to be able to do something with this new
  information.  Well you can add functionality for the F11 and F12 keys
  (and any other keys that you can find the scancode for).

  All you have to do is add a line to the termio.c table that says:

     {NULL, "ka", 0x8500} /* F11 */



  Then to actually get it to read the line you just put in, add one to
  the FUNKEYS number.

     #define FUNKEYS 21


  Then add a "ka" entry to your termcap.  After that, every time you hit
  the sequence stored in your termcap for ka, your dos program recog-
  nizes an "F11."

  Warning:  Make sure that ka is not in use in your termcap.  If it is
  you are headed for trouble.

  Note:  The scancode for F12 is 0x8600.


  4.5.  How can I switch between dosemu and a shell over the serial
  line?

  John Taylor (taylor@pollux.cs.uga.edu) reported (5/25/94) that

  I am running Linux 1.1.13 and want to point out a great feature that
  should be protected and not taken out (IMHO). With the 52 version, I
  can run the program, "screen."  From screen, i can invoke dos -D-a.
  What is really great (IMHO) is the screen commands (the CTRL-A cmds)
  still work. This means I can do a CTRL-A C and add another unix shell,
  and switch between the two (DOS / UNIX).  This allows me to use dosemu
  over the serial line really well, because switching is made easy.


  5.  Multiple users and Non-interactive sessions

  5.1.  Can I use dosemu on a multi-user system?

  Corey Sweeney (corey@amiganet.xnet.com) reported (12/8/93) that

  If you are running dosemu on a system in which more then one person
  may want to run dosemu, then you may want to change the directory of
  your hard drive image.  Currently in the /etc/dosemu.conf file there
  exists the line saying that the hard drive image is "hdimage".  If you
  change this to /var/lib/dosemu/hdimage then people do not have to
  worry about what directory they are in when they run dosemu, and
  hdimage does not have to be moved each time you upgrade to the next
  patch level.

  If you do do this for multi-user dosemu, then you will want to make
  the hdimage in /var/lib/dosemu read-only for everyone but the dosemu
  administrator.

  Note that you can use the new emufs.sys thing to mount a "public"
  directory and/or a "private" directory (a sub-directory in each
  person's home directory).


  [Note: Users may also create a personal configuration file named
  ~/.dosrc (same format as /etc/dosemu.conf) to run their own copy of
  dos.]


  5.2.  How can I run dos commands non-interactively?

  I have been meaning to write an article on this for quite some time
  but have not gotten around to it.  Here are some hints from others:



  Dan Newcombe (newcombe@aa.csc.peachnet.edu) reported (1/27/94) that

  Here is an idea (untested) to be able to run a DOS command from the
  command line (or menu choice, etc...) without modifying the acutal
  emulator.  [Your dos partition is assumed to be mounted under Linux,
  already.]

  Suppose you wanted to run wp60.exe with the parameter "wp60
  d:\doc\paper.txt".  You would do something like "dosrun wp60
  d:\doc\paper.txt".  "dosrun" would be a linux shell program that would
  a) edit/modify/recreate the dos autoexec.bat from your dos partition
  and b) simply run dosemu (e.g., "dos -C >/dev/null".  Step a) would
  somehow keep all the stuff you'd normally want in autoexec.bat (e.g.,
  mouse.com) and the last line would be "wp60 d:\doc\paper.txt".

  On the dosemu side, beforehand, you would have to modify the
  config.sys file (located in hdimage) so that it 1) uses emufs to
  access the dos partition as D:, 2) sets "COMPSEC=D:\ (I think.  I
  don't have a DOS manual around.), and 3) sets "shell=c:\command.com
  /p".

  The idea is that for each time that you load the DOS emulator, you
  will recreate an autoexec.bat that is specific to that session.  What
  makes it specific is that the last line will execute the program you
  want.  The modifications on the hdimage are to tell the emulator/DOS
  that you want to use (and effectivly) boot off of D:, which will be
  the actual DOS partition.

  If you do not use hdimage and access the DOS filesystem directly upon
  boot-up of DOSEMU, then this will work, and you don't have to go
  through the hdimage part of this all.

  ---------------------


  Daniel T. Schwager (danny@dragon.s.bawue.de) reported (7/2/94) that

  You can use different dosemuf.conf files (and different hd-boot-images
  with different autoexec.bat's) and call dosemu like

  $ dos -F my_quicken_q_exe_dosemu.conf



  ---------------------


  Dietmar Braun (braun@math20.mathematik.uni-bielefeld.de) reported
  (7/4/94) that

  This is no problem at all when you use the redirector of dosemu.  It
  is possible to redirect a drive letter to a linux path given by an
  environment variable.

  So I have a shell script named "DOS" which does something like

   mkdir /tmp/dos.\*(dR\*(dR
   DOSTMP=/tmp/dos.\*(dR\*(dR; export DOSTMP


  and then a little trick to get "echo $* > $DOSTMP/startup.bat" really
  working (actually a small C Program which turns '/' in '\' and termi-
  nates lines correctly for messy dos with cr/lf pairs and adds ^Z at
  the end of the file), creates startup files, links and so on in this
  directory, and then starts dosemu. Within "autoexec.bat" drive c: is
  redirected from hdimage to this tmp-directory, which has links for
  $HOME and $PWD.

  So if I want to see my filenames shortened to 8.3 I can type "DOS dir"
  and I get my current directory listing.  So I have full DOS multi user
  (I don't have any DOS partition and redirecting to Linux preserves
  user permissions) and multi tasking. (dosemu sessions are completely
  independent).  I did this once to be able to use a dos driver for my
  printer. My printcap df is actually a DOS program. So you can even
  make DOS executables act as lpr filters.


  6.  dosemu and Netware

  6.1.  How do I get Netware access from dosemu?

  James B. MacLean (jmaclean@fox.nstn.ns.ca) reported (11/28/94) that

  Dosemu now supports  pdipx  (an IPX over pktdrvr)  and  pdether  (uses
  Novell's  MLID spec)  to  access  Novell LAN's via the built in packet
  driver.   The  packet  driver sits at interrupt 0x60, and abids by the
  normal paket driver rules.  That said, beware of trying any DOS TCP/IP
  just yet.  Single access can be made by:

  1) cd ./net
  2) cp libpacket.c.single libpacket.c
  3) cp pktnew.c.single pktnew.c
  4) recompile DOSEMU
  5) run dosemu
  6) load pdether as described by its docs (pdipx is another method)
  7) load netx
  8) enjoy netware access :-)


  If you  need  special  access  to  your  NIC,  read  on.   By  default
  dosemu  will  not  get interrupts from the kernel. That said, if you'd
  like to give your NIC to dosemu for it to control, maybe for access to
  Netware  on  the  network  through  a  NETX client, I do have a driver
  (Silly Interrupt Generator) to put in the  kernel  that  any  program,
  like dosemu can use to get at the interrupt for your NIC.  I use it in
  DOSEMU to access a Novell Lite network in the  past  until  the packet
  driver existed.

  Any interested parties should E-mail me (jmaclean@fox.nstn.ns.ca) and
  I'll pass along some directions.

  Want multiple DOSEMU's access to Novell?

  1) compile current [pre-release] DOSEMU
  2) follow directions in ./v-net/dosnet.README
  3) carry on from 5) above.




  6.2.  The Netware-HOWTO

  Lauri Tischler (ltischler@fipower.pp.fi) has authored this section of
  the HOWTO (Thanks Lauri!!!).  This is Rev. 0.1, 26 Nov 1994.

  IMPORTANT NOTE:  This information applies to the pre-release versions
  of dosemu (pre0.53_??) only!

  This is my first attempt to write some kind of advice on how to
  connect to a Netware server from your Linux box.


  Due to the first attempt and the scope of this note, it is not a real
  HOWTO, not even a 'mini-HOWTO'.  You might call it a 'nano-HOWTO' if
  you like.

  As in most sites the Netware is really just an extension to PC's
  running DOS and DOS applications (Windows is JUST another DOS-
  application), the Netware providing fileserver and printing support, I
  will concentrate on getting the connection via DOSEMU only.

  It is possible to access Netware server via NFS from Linux directly,
  but that requires the Novell NFS nlm-module for the server.  Unless
  you have $x000 of extra dough around you better forget it.  Besides
  all the applications are DOS programs anyway, so you can't run them in
  Linux native mode.  Also, if there is filenamelength limitations in
  Novell NFS it is quite useless in *nix environment. (I really don't
  know NFS, never seen the beast).

  So, how to get the connection to the Netware server, that is the
  question.

  We have a Netware network with 3 servers and appr. 110 PC's connected
  to it.  It is TOTALLY Dos/Windows environment, running 'Novell
  standard' Ethernet_802.3 frames, really very ordinary commercial REAL
  LIFE setup.

  I use in my PC (in addition to DOS) Linux 1.1.65 and Dosemu pre0.53_35
  and it works in my machine with my hardware and our network.  The
  following may or may not work on Your pile of iron.

  1)  Linux kernel requirements  (NONE).  There is a config parameter
  'IPX-SUPPORT'.  It makes no difference to use it or not to use it.  It
  is provided for future hooks to kernel.  There are no working hooks
  which use it,  not at least in dosemu,  not in various configurations
  I have tested.

  2)  dosemu requirements  (FEW) Here is a fragment of dosemu.conf file.
  Comment out ipxsupport on and pktdriver novell_hack

  #************************* NETWORKING SUPPORT *****************************
  #
  #    Turn the following option 'on' if you require IPX/SPX emulation.
  #    Therefore, there is no need to load IPX.COM within the DOS session.
  #    The following option does not emulate LSL.COM, IPXODI.COM, etc.
  #    NOTE: MUST HAVE IPX PROTOCOL ENABLED IN KERNEL !!
  #ipxsupport on
  #
  #    Enable Novell 8137->raw 802.3 translation hack in new packet driver.
  #pktdriver novell_hack


  The ipx support does not work yet in dosemu and the novell_hack has
  been disabled in the latest dosemu (pl35).  There is a gallant effort
  for better support, look at directory v-net for info, but we are not
  there yet.

  In stock dosemu release (at least in pre0.53_35) in directory net the
  two files pktnew.c and libpacket.c are the experimental multi-version.
  They do not work yet.  You need to copy the single-versions over the
  original multi-versions.

      cp pktnew.c.single pktnew.c
      cp libpacket.c.single libpacket.c


  Remake your dosemu, normally 'make most' and we are almost there.

  Test your newly made dosemu and when you are convinced that everything
  is on order,  continue..


  3)  The shell.

  To connect to Netware server you need the driver (ipx) and the shell
  (netx or vlm).

  As a driver you can use either PDIPX, which is really an ipx-to-packet
  driver shim, or PDETHER which is also ipx-to-packet driver shim, but
  masquerading as an ODI compliant driver.  Which one to use depends
  really on what frametypes is your Netware server using.

      a) If the Netware runs on Ethernet_802.3  use PDIPX
      b) If the Netware runs on Ethernet_II     use PDETHER



  If you use PDIPX, you just load

      PDIPX
      NETX


  and voila there You are, connected...

  You can use PDIPX on Ethernet_II frame but then you need to run
  program called econfig against PDIPX,  see Novell docs for info.

  If you use PDETHER, because PDETHER is an ODI driver, you load..

      LSL
      PDETHER
      IPXODI
      NETX


  and again You should be connected...  Because PDETHER is an ODI
  driver, there must be corresponding section in Your net.cfg file.
  Read the PDETHER.DOC for info.

  There is NO WAY to use PDETHER on Ethernet_802.3 frames.  If your
  Netware runs on 802.3 and you MUST use ODI drivers then you need to
  run both frametypes on Netware server.  You need to load the NIC-
  driver second time in your server. This time specifying Ethernet_II
  frame, like I do..


      load SMCE32 port=6810 Name=Nv Frame=Ethernet_802.3    ; 'novell' frame
      load SMCE32 port=6810 Name=Nl Frame=Ethernet_II       ; 'normal' frame
      bind ipx to Nv Net=E1
      bind ipx to Nl Net=E2



  Both nets E1 and E2 are really the same net.  If I use original PDIPX
  I connect to E1 with PDETHER I connect to E2.

  Some people might want to use VLM drivers, because in DOS environment
  they are much faster.  Don't bother,  for reasons unknown, in DOSEMU
  the VLM drivers are dogs.

  With above mentioned setup it IS POSSIBLE to connect to Netware server
  and even do some usefull work,  but slowly.

  Here is some benchmarking I did using NETX and VLM shells, with and
  without packetburst.  The testprogram was TESTNET.EXE, available
  somewhere in NetWire.  It tests the network transfer speed.  I can
  saturate my ethernet with two stations running at full tilt.  Maximum
  aggregate speed is appr. 900 kilobytes/sec.  I'm using SMC Elite 32
  EISA board in Server and SMC Elite Ultra in workstation.

                         NETX          VLM(0)          VLM(3)
  Dos6.2                 620           560             760
  DosEmu                 107           111              60



  The figures denote transferspeed in kilobytes/second.  VLM(0) means
  packetburst disabled, VLM(3) packetburst enabled.  You can see that
  the connection with dosemu is not very fast, barely usable.

  Few months ago I had a NE2000 clone in my box, with DOS6.2/NETX it
  would run to appr. 460 kbs.  I could live with that.  There is still
  work to be done.

  I am well aware that I'm missing a lot of things in here, like

  - multiuser dos-session, I don't think it works yet,  anyway the speed
  would be comparable to dead snail.

  - tcp-connections from dosemu, I havn't the faintest idea, the only
  *nix machine in our net is my Linuxbox.

  Also I may have totally mixed the working and not working things.  As
  the Dosemu as well as the Kernel are evolving, living things it is
  sometimes difficult to keep up with the beasts.  I do apologize for
  any mistakes and will gratefully accept and include any corrections
  and additions to this note.

  We all know that the DOSEMU is still ALPHA but it is not really far
  from BETA.  There is some interesting work going on by Vinod G
  Kulkarni and others, read the relevant pieces in dosemu release
  (READMEs and such).

  Regards, Lauri Tischler            ltischler@fipower.pp.fi


  7.  dosemu and X-windows

  7.1.  Can I run dosemu in console mode while running X?

  Ronald Schalk (R.Schalk@uci.kun.nl) reported (1/17/94) that

  Yes, no problem.  Just remember to use ctrl-alt-<Fn> to go to a
  Virtual Console (VC), and you can run any Linux application (dosemu is
  a linux-application).  I've got almost always WP5.1 in a dos session.

  [Note:  Use ctrl-alt-F7 to switch back to X from dosemu.]

  [Note: Some people have reported problems when dosemu is started
  before X]


  7.2.  Is it possible to run dosemu in an xterm?

  Evmorfopoulos Dimitris (devmorfo@mtu.edu) reported (12/10/93) that

  It is possible to run dosemu under an xterm, but without any graphics,
  and with no more than 128 characters.

  H. Peter Anvin (hpa@hook.eecs.nwu.edu) adds (2/6/94)

  no more than 128 characters... unless you use a special font.  Someone
  has an IBM PC (CP 437) X font for use with ANSI-graphics on BBS's, as
  well as a patch for Xterm that *might* include character translation
  (for letters like \305, \304, \326 for example.


  8.  Video and sound

  8.1.  Exiting from dosemu gives me a screen full of garbage.

  Keith A Grider (kgrider@magnus.acs.ohio-state.edu) reported (12/5/93)
  that

  I have seen many postings concerning this with exit from X as well as
  exiting from a graphic dos screen.  it seems to be prevalent among ATI
  graphic card users as well as a few others.  The problem is that the
  font information for the vga text screen is not being saved.  The only
  way I have been able to fix it is to download the vgalib-090.tar.gz
  file from sunsite.unc.edu.  It is (I believe) in the pub/Linux/GCC
  directory.  You get a lot of stuff that is not directly used to solve
  this problem, but in the fonts directory that is created when you
  untar the file, there are 2 files of interest, runx and restorefont.
  Read the README file in this directory.  Copy runx and restorefont to
  a directory in your path.  when runx is used, for example, it saves
  the font information in tmp/fontdata.  I use a file called fix which
  consists of the line:

     restorefont -r /tmp/fontdata


  so that it is easy to 'fix' a vt when I go there from X (i.e. ctrl-
  alt-f2).  This should also work for dosemu.  I think the XFree86 peo-
  ple know about the problem and are working on a solution as this is a
  bit of a kluge.


  8.2.  How do I get dosemu to work with my Trident/Actix/other video
  card?

  [The screen flickers violently, displays the video BIOS startup
  message, and hangs.]

  Andrew Tridgell (tridge@nimbus.anu.edu.au) reported (1/29/94) that

  I found with early versions it would work if I used:

     ports { 0x42 }


  but that sometimes my machine would crash when it was cycling the
  video bios in dosemu. This is because you're allowing the VGA bios to
  re-program your clock, which severely stuffs with Linux.

  This prompted me to write the readonly and masking patches for dosemu,
  which I believe are still in the latest version. I now use:

     ports { readonly 0x42 }


  and it boots dosemu more slowly, but more reliably.

  ---------------------


  Tim Shnaider (tims@kcbbs.gen.nz) also reported (1/18/94) that

  One way of fixing this is to use the GETROM program to dump your video
  bios to a file and edit the config file in the /etc/dosemu directory
  There will be a few video lines.  Here is my video line

     video { vga console graphics chipset trident memsize 1024 vbios_file
     /etc/dosemu/vbios }


  where vbios is the file generated by typing

     getrom > vbios



  ---------------------


  Douglas Gleichman (p86884@tcville.edsg.hac.com) reported (9/1/94) that
  (with the ATI Graphics Ultra)

  For DOSEMU 0.52 you need to add this line to your dosemu.conf file:

   ports  { 0x1ce 0x1cf 0x238 0x23b 0x23c 0x23f 0x9ae8 0x9ae9 0x9aee 0x9aef }


  The board self test will list a failure but graphics programs will run
  fine.


  8.3.  Why doesn't my soundcard software work with dosemu?

  Hannu Savolainen (hsavolai@cs.Helsinki.FI) reported (3/21/94) that

  The DOSEMU and any DOS program with it run under control of a
  protected mode operating system. This means that the memory is not
  mapped as the program expects. If it somehow manages to start DMA
  based recording with SB, the recorded sound doesn't find it's way to
  the application. It just destroys some data in the memory.


  James B. MacLean (jmaclean@fox.nstn.ns.ca) reported (6/19/94) that

  Sorry to disappoint, but at this time DOSEMU does not support directly
  the necessary interception of interrupts or DMA generally required for
  sound card access via DOSEMU :-(.

  It's bound to happen at some future date though :-),


  9.  Other Hardware

  9.1.  How do I get my xxxxx device working under dosemu?

  Corey Sweeney (corey@bbs.xnet.com) reported (5/30/94) that

  Here is a log of my adventures trying to get devices working under
  dosemu.  So far I've gotten my voice mail system working and my
  scanner half working.  Here's how:

  1. Look in your manual and find if your card uses any ports.  If your
  manual gives you some, put them in your config file at the "ports"
  line.  Remember that sometimes you need to have several ports in a
  row, and the first one might be the only one documented.

  2. Try it out. If it doesn't work, or you don't have a manual (or your
  manual is as crappy as my AT&T manual:) then run dosemu with "dos -D+i
  2> /tmp/io.debug".  Run your device software, then exit dosemu.  Look
  through /tmp/io.debug and find any port numbers it might give you.
  Try adding those to the port lines and try running dosemu again.

  3. If you still fail then you may need interrupts.  Find out what
  interrupt the card uses and get the SIG.tgz (silly interrupt
  generator) from somewhere on tsx-11.mit.edu.  Install it as specified
  in the instructions.

  and that's about it...

  Question: What if my card uses DMA?  Answer: Your screwed.


  10.  Problems and fixes

  10.1.  Why does dosemu 0.52 fail under kernels newer than 1.1.30?

  (8/5/94)

  Dosemu 0.52 is not compatible with kernels newer than 1.1.30.  This
  problem will be fixed in dosemu 0.53.


  10.2.  I've enabled EMS memory in dosemu.conf but it does not help.

  Rob Janssen (rob@pe1chl.ampr.org) reported (7/11/94)

  Don't forget to load the provided ems.sys from the config.sys file.


  10.3.  How do I get rid of all those annoying "disk change" messages?

  (8/11/94)

  Grab and install klogd.  Try

           sunsite.unc.edu:/pub/Linux/system/Daemons/sysklogd1.2.tgz




  10.4.  Why is the cursor position wrong?

  (7/9/94)

  This is a known bug in dosemu 0.52.  It will be fixed in dosemu 0.53.



  10.5.  Why does my busmouse act funny under dosemu 0.52?

  James B. MacLean (jmaclean@fox.nstn.ns.ca) reported (7/8/94) that

  Busmouse support is quite ALPHA at this time (as is DOSEMU :-)), and
  will be continually refined for a while :-).  Look for better support
  in the upcoming releases.


  10.6.  Why won't dosemu run a second time after exiting in console
  mode?

  Aldy Hernandez (aldy@sauron.cc.andrews.edu) reported (7/8/94) that

  You should disable your video and/or bios caching.


  10.7.  Some dos applications still do not detect DPMI under
  dosemu0.52.

  James B. MacLean (jmaclean@fox.nstn.ns.ca) reported (6/19/94) that

  At this time (as of 0.52 release) DOSEMU is still growing with respect
  to DPMI.  It will run certain DPMI programs, but has a ways to go yet.
  As suggested there needs to be more of the calls implemented, etc.
  Please be patient :-), as it's bound to come in time.


  10.8.  Why does dosemu give "divide overflow" errors after running for
  more than 24-hours?

  (1/17/94)

  This is a known bug.  It will (hopefully) be fixed in an upcoming
  release.  For now, you can simply exit dosemu and start it again.


  10.9.  Why will dosemu run in a term but not in the console?

  JyiJiin Luo (jjluo@casbah.acns.nwu.edu) reported (4/19/94) that

  I experienced exactly the same problem before. I figured out all the
  video shadow in my AMI BIOS must be disabled. Now dosemu runs fine on
  my system.


  10.10.  How can I speed up dosemu?

  Mark Rejhon (mdrejhon@undergrad.math.uwaterloo.ca) reported (4/7/94)
  that

  TIP: Speed up your DOS "dir" listings by about 25%-50% or so by typing
  break off at the DOS prompt or including it in autoexec.bat.

  TIP: Use the nnansi.com ANSI driver to speed up the "dir" output even
  more at roughly 50%-100% more.  It works properly in non-graphics
  mode, unlike turbo.com.

  ---------------------


  Joel M. Hoffman (joel@rac1.wam.umd.edu) reported (4/23/94) that

  Ironically, I've found that it's sometimes faster to run dosemu in an
  Emacs terminal emulator rather than directly to the console.  Emacs's
  output optimization is what makes the difference here.

  Put the following in your .emacs:


          (defun do-dos ()
            (interactive)
            (terminal-emulator "dos" "/usr/local/bin/dos" ()))


  and then "emacs -f do-dos" will run the dosemu inside the buffer.
  Make sure you emacs window is 25x80, of course.

  ---------------------

  Pete Heist (heistp@rpi.edu) reported (5/13/94) that

  If you compile it with the "-funroll-all-loops" option you will get
  MUCH faster screen output.  Some other parts of the emulator will run
  much faster as well.  Realize that the consequence of this is a larger
  executable which eats a little more memory, even though it's demand
  loaded.

  ---------------------


  Georg Wiegand (gw@gwcomp.e.open.de) reported (5/16/94) that

  You also can use the keyword HogThreshold in /etc/dosemu.conf.  The
  greater the following number the more calculating-time dosemu gets.
  For example, I use "HogThreshold 60000" on my 386/87-20 laptop.


  10.11.  My CDROM drive has problems reading some files under dosemu.

  Vinod G Kulkarni (vinod@cse.iitb.ernet.in) reported (4/7/94) that

  When a CDROM is mounted from linux and used from within DOSEMU (mapped
  drive), there could be some problems. The cdrom driver (iso9660) in
  the kernel tries to find out the type of the file (i.e. binary or
  text).  If it can't find, it tries to guess the type of the file using
  a heuristic. This heuristic fails under some circumstances when a
  (almost) text file is to be treated as binary.  (I do not know if it
  is a bug or feature.)

  The result of this is that if you copy such a file from cdrom (from
  linux itself, and not necessarily dosemu), the resulting file will be
  usually bigger than original file. (Blanks get added before ^J,^M.)
  So a program running in dosemu gives an error or hangs, which may be
  mistaken as problem of dosemu.


  Rob Janssen (pe1chl@rabo.nl) reported (8/10/94) that

  The way to solve this is to turn off conversion altogether.  Pass the
  option "-o conv=binary" to the mount command mounting the CDROM, or
  use the following in /etc/fstab:

  /dev/cdrom      /cdrom          iso9660 conv=binary,ro


  No patches to the kernel are necessary.


  10.12.  Where did the debugging output go?

  As of dosemu0.49pl4, stderr is automatically redirected to /dev/null.
  Try "dos -D+a 2>debug" to turn on debugging information and redirect
  it to the file "debug".


  10.13.  Why does dosemu lock up after one keystroke?

  (12/17/93)

  You need to turn on the keyboard interrupt in the dosemu config file.
  Add a line to the config file:


     keybint on

  Shouldn't be a problem in dosemu0.52.


  10.14.  Why are my keystrokes echoed ttwwiiccee??

  Nick Holloway (alfie@dcs.warwick.ac.uk) reported (2/22/94) that

  After running dos after playing with some stty settings, I was getting
  doubled key presses.  I can now reveal what the reason is!

  It only happens when dos is run on the console with 'istrip' set.
  This is (I think) because the raw scancodes are mutilated by the
  'istrip', so that key release events look like key press events.

  So, the input processing needs to be turned off when using the scan
  codes on a console (it wouldn't be a good idea to do it for tty
  lines).


  10.15.  Why are characters < 128 highlighted and blinking?

  Chris Kuehnke (Christian.Kuehnke@Informatik.Uni-Oldenburg.DE) reported
  (3/21/94) that

  I think I've found a bug in dosemu0.50pl1; with a MDA card displayed
  characters > 128 automagically appeared as highlighted and blinking.

  This patch fixed the problem for me [but on the other hand, maybe I'm
  totally wrong ;-)]:

  --- video.c~    Sat Mar 19 00:50:25 1994
  +++ video.c     Sat Mar 19 20:36:10 1994
  @@ -721,7 +721,7 @@
     int x, y, i, tmp;
     unsigned int s;
     static int gfx_flag = 0;
  -  char c;
  +  u_char c;
     us *sm;

     if (d.video >= 3)




  11.  Contributing to the dosemu project

  11.1.  Who is responsible for dosemu?

  (3/18/94)

  Dosemu is built upon the work of Matthias Lautner and Robert Sanders.
  James B. MacLean (jmaclean@fox.nstn.ns.ca) is responsible for
  organizing the latest releases of dosemu.












                         History of dosemu

            Version    Date                Person
           -------------------------------------------------
            0.1        September 3, 1992   Matthias Lautner
            0.2        September 13, 1992  Matthias Lautner
            0.3        ???                 Matthias Lautner
            0.4        November 26, 1992   Matthias Lautner
            0.47       January 27, 1993    Robert Sanders
            0.47.7     February 5, 1993    Robert Sanders
            0.48       February 16, 1993   Robert Sanders
            0.48pl1    February 18, 1993   Robert Sanders
            0.49       May 20, 1993        Robert Sanders
            0.49pl2    November 18, 1993   James MacLean
            0.49pl3    November 30, 1993   James MacLean
            0.49pl3.3  December 3, 1993    James MacLean
            0.50       March 4, 1994       James MacLean
            0.50pl1    March 18, 1994      James MacLean
            0.52       June 16, 1994       James MacLean




  11.2.  I want to help.  Who should I contact?

  The dosemu project is a team effort.  If you wish to contribute, see
  the DPR (DOSEMU Project Registry).  A current copy may be found in
  dspsun.eas.asu.edu:/pub/dosemu.






































