• articles
  • retro
  • A guide for using Dosemu2 to play Door Games on Mystic BBS
  • A guide for using Dosemu2 to play Door Games on Mystic BBS

    Author:
    Published:

    Reconfigure Dosemu2

    By default, Dosemu2 will follow a boot process shown below.

    • Emulator is started
    • Comcom64 is activated during the initial boot
    • conf is loaded for initial settings
    • Opens /home/[user]/.dosemu to load the contents of drive_c/
      This is how we can load custom DOS versions provided that we also load the basic Dosemu2 commands.  The provided *.sys and *.bat files have much of this already pre-configured.
    • It will also look for “dosemurc” which is defined in the dosemu.conf file and is what we need to configure next.

    For our DOS Doors we will want to create a custom dosemurc.  Below is a version I am currently using.

    dosemurc

    $_cpu = "80486"
    # Select cpu virtualization mode.
    # "vm86" - use v86 mode via vm86() syscall. Only available on x86-32.
    # "kvm" - use KVM, hardware-assisted in-kernel virtual machine.
    # "emulated" - use CPU emulator
    # "auto" - select whatever works
    # Default: "auto"
    $_cpu_vm = "emulated"
    $_cpu_vm_dpmi = "emulated"
    $_cpuemu = (0)
    $_cpuspeed = (200)
    $_hogthreshold = (10)
    $_floppy_a = ""
    $_cdrom = ""
    $_ext_mem = (2048)
    $_xms = (2048)
    $_ems = (2048)
    #$_ems_frame = (0xe400)
    $_external_char_set = "cp437"
    $_internal_char_set = "cp437"
    $_term_updfreq = (8)
    $_layout = "us"
    $_rawkeyboard = (0)
    $_mouse_internal = (on)
    $_mouse_dev = ""
    $_joy_device = ""
    $_lpt1 = ""
    $_lp2 = ""
    $_speaker = ""
    $_sound = (off)
    $_sb_dsp = ""
    $_hdimage = "+0 -1 +1"
    $_lredir_paths = "/home/mystic"

    I would like to call out several lines as being important (they are in bold).  They are documented quite well in the /etc/dosemu/dosemu.conf file and will give you all of the default values.  To create the dosemurc you will copy the value you want to the new file, remove the “#” and change the value as needed.

    Keep in mind that some of these options are different from Dosemu1.  Namely “$_cpu_vm =”

    With Dosemu (1) this was “$_cpu_emu=” and you can set that value all day but it will never change a thing in Dosemu2

    I would recommend spending some time testing the various “$_cpu_vm=” values and find out what works best for you.  My Debian 12 install is running in Hyper-V and “emulated” tends to give me the best performance.  Running “vm86” will crash Dosemu2 and “auto” will load but I’m not sure what mode it is using. 

    Point is you will need to mess with these.

    Dosemu2 will give you a 16Meg frame buffer (total memory).  As with most things emulated, you don’t want to exceed the limits of your base system.  If your Linux machine has X Gigs of memory, then this setting should be fine.  For Raspberry Pi machines with 512M you may want to dial it back based on what else you have running.  I find that the “htop” visualizer works well for this kind of research.

    For my configuration I have allocated 2megs of memory to Dosemu2 and so far, every Door Game I have tried to run is super speedy, including TradeWars 2002 3.09.  I have limited cpu speed “$_cpuspeed=” to 200 (mhz?) but, it seems to have no impact aside from making the system seem faster.

    The last two lines are important

    $_hdimage = “+0 -1 +1”

    This line controls the drive groups, +0 is your C drive and we want to skip one drive assignment.  To do this we need to add “-1” in the middle.  This will also use to redefine a drive mapping later and just want to make sure Dosemu2 gives us the placeholder.

    $_lredir_paths = "/home/mystic"

    This tells Dosemu2 that we will be working out of this directory and anything under it can be mapped.  (Hint: Synchronet BBS users will want to remember that)

    Now, if you boot up Dosemu2 and type “lredir” it will show you a list of drives and should be skipping drive D: on the list.  In the documentation the maintainer calls out that you must be running fdpp to dynamically add drives, and this is true.  If you use the default configuration you can define a drive with “$_hdimage=”, or from the command line and it will show up with a drive letter and everything.

    However, when using FreeDOS we will be redefining the drives using a batch file and just need to make sure that the drive position is clear.

    Note: Drive D: is the location where “dosemu/” was located.  The system will reassign this drive to E: and moved everything else down a letter.  It should be noted that drive D: is still mounted and still points to the original location but was not assigned a drive letter.