re: Dosemu - what it provides and how to set up in your case

Eric Auer <[email protected]> Sat, 9 Nov 2002 05:35:12 +0100 (MET)
Newsgroups gmane.os.freedos.devel
Message-ID <[email protected]>
Hi, it is not fair to say that Dosemu is an implementation for Linux.
It is far more: It offers
- XMS
- EMS
- DPMI
- mouse
- a simulated VGA card
- a simulated soundblaster DSP and internal speaker and timer and RTC
- a simulated interrupt and keyboard controler
- a simulated BIOS with everything a 386 BIOS usually has (drives are
  not that well simulated as hardware, but you do not notice this if you
  only use the BIOS or DOS to access drives).
- some other cool things.

So the gain is:
- When you load a FreeDOS kernel in Dosemu, it will find all BIOS and
  hardware needed - in the simulation.
- Dosemu comes with tiny drivers that explain the surprising existence of
  XMS, EMS, DPMI and mouse drivers "in the BIOS" to DOS :-).
- Dosemu comes with a tiny driver that allows you to import any Linux
  directory as a "network drive" into the Dos window. As Dosemu can load
  the kernel directly, you can even boot Dos from any Linux directory that
  has a kernel.sys inside! (Only the Dos window, of course) Remember that
  you cannot boot from a network drive in real Dos live, as the boot sector
  needs the drive to be accessible through the BIOS and not through the
  network. So because Dosemu obsoletes the boot sector, you can still boot.
- If you have programs like format, fdisk, defrag, scandisk, undelete...
  a network drive will not be enough. In this case, you can give Dosemu an
  image of a drive (all sectors of it, not all files of it) instead of a
  directory. You can also use the Linux device of the drive: Then DOS inside
  Dosemu will ask the BIOS to access sector 42, the special Dosemu BIOS will
  pass the request on to the Linux side and Dosemu will finally read sector
  42 of the actual drive.

I personally run Dosemu like this:
- I have an image of a FreeDOS boot floppy, for experimenting with undelete
  and the like
- C: is just the Linux directory ~/dosemu/freedos: I have copied everything
  from my FreeDOS C:\ to it. No subdirectories, though!
- ~/dosemu/freedos/fdos is a symlink to /mount/dos/fdos/ - no copying needed.
- ~/dosemu/freedos/ram is a symlink to a ramdisk.
- ~/dosemu/freedos/dos is a symlink to /mount/dos/

(everything simplified, I use other paths actually)

Now when I start Dosemu, I can chose to either start from the simulated
floppy A: or from ~/dosemu/freedos/ which simulates C: - In the subdirectories
of C:\dos\, my whole C: drive of my real DOS can be accessed. You imagine the
rest. I did not make the whole ~/dosemu/freedos/ a symlink to /mount/dos/,
because I wanted C:\ in the DOS box to differ from C:\ when I boot DOS (I mean
"outside Dosemu").


Dosemu when it comes out of the box just has the contents of a FreeDOS boot
disk in ~/dosemu/freedos/, and some additional drivers that are Dosemu-
specific (XMS, EMS, mouse, ... you know which) in another directory. Do not
forget that it is very useful to have them, so if you make C:\ of Dosemu just
point to your real Dos partition, you need to copy those drivers to your Dos
partition (they will be useless without Dosemu, but... :-)). This driver
collection also contains "exitemu" and other important programs.

Eric

PS: Do not forget to edit dosemu/conf/dosemu.conf to configure the amount of
memory and hardware in general that Dosemu will provide the simulated PC of
the Dos box with :-). Do not forget to backup dosemu.conf :-).