Skip to content
Snippets Groups Projects
Commit e67254cc authored by rswindell's avatar rswindell
Browse files

Runderwo's Linux-DOSEMU how-to document.

parent 7f9bb44b
Branches
Tags
No related merge requests found
<html>
<head><title>Synchronet BBS DOSEMU Support</title></head>
<body>
<h2>What is this?</h2>
<p>This is a patch that integrates support for the Linux DOS emulator into the
<a href="http://www.synchro.net">Synchronet BBS software</a> written by Rob Swindell.
<p>The purpose of such integration is to enable the sysop to install new DOS doors in
a simple and straightforward manner, and to be able to easily work around the inevitable
emulation-related problems that will occur.
<h2>Getting Started</h2>
<h3>SBBSINST (Linux-install from sbbsunix.tgz) flavor</h3>
If you are using the SBBSINST program to bootstrap your Synchronet installation, just add
to "Compiler Flags": USE_DOSEMU=1. This is the easiest way to get started.
<h3>CVS Source flavor</h3>
<p>Follow the instructions in sbbsunix.txt that can
be found at the Synchronet homepage to get a fresh copy of the source code for the BBS using
CVS. The support has been integrated but must be enabled at compile time; if you want
to enable it, when you go to "make" the BBS, do the following:
<pre>
$ gmake USE_DOSEMU=1
</pre>
<p>Next, complete the initial configuration according to the
instructions in sbbsunix.txt.
<h2>Setting up a DOS BBS door</h2>
<p>A few requirements first off:
<ul>
<li>There must be an <a href="#files">emusetup.bat</a> in your /path/to/sbbs/ctrl directory.
This batch file configures the DOS environment, and can be used to load additional TSRs,
change drive letters around, or make any other last minute changes to the environment
before the door is loaded. The below instructions assume the default drive letters;
if you change them in emusetup.bat, be sure to use the correct corresponding ones.
<li>The default dosemu binary is /usr/bin/dosemu.bin. If you have a different one that you would
like all DOS programs that Synchronet launches to use, configure DOSemuPath in sbbs.ini.<br>
Example:<br>
DOSemuPath=/usr/local/bin/dosemu.bin
<br>Be sure to use `dosemu.bin` and not the `dosemu` wrapper script.
<li>Ensure that you have a working dosemu setup before trying to set it up with Synchronet.
For Debian, simply `apt-get install dosemu dosemu-freedos`. For other distributions,
you will need to first install and configure dosemu, and then install FreeDOS (or your DOS
of choice) and set it up to work with dosemu. (Some details on this procedure are outlined
below.)
</ul>
<h3>To configure a DOS BBS door in scfg:</h3>
<ul>
<li><b>Startup Directory</b>: /path/to/the/door (or ../xtrn/mydoor)
<li><b>Program name</b>: program.exe %params (or program.bat %params)
<li><b>Multiuser</b>: Yes/No depending on the program
<li><b>Redirect STDIO</b>: No (instructs Synchronet to use vmodem support)
<li><b>Native Program</b>: No (instructs Synchronet to handle the door through DOSEMU)
<li><b>Dropfile</b>: pick a dropfile type that the door knows how to handle
<li><b>Use Lowercase</b>: Yes
<li><b>Dropfile Dir</b>: Place in Node Directory
</ul>
<p>You probably want to also add the door's setup program as a standard I/O program
(see <a href="#stdio">below</a> for details on standard I/O programs).
<p>When you set up the door, point it to D:\ for the dropfile path. Also, generally
it would be a good idea to tell the door to use a fossil driver, unless it doesn't work or
produces strange results (like missing lines or dropped characters),
in which case you can use the internal comm routines of the door.
<p>The door's actual directory will be mounted on E:\ with the root of E: being the parent
directory of the door. So if your door is in /usr/local/games/tw2002 on the Unix side, it
will be in E:\tw2002 on the DOS side. Make sure the door's directory conforms to the DOS
8.3 file format! /usr/local/games/tw2002 would be okay, but /usr/local/games/TradeWars2002
would not. The symptom of a non-conforming directory is a "file not found" when
Synchronet tries to change to the DOS door's directory inside DOSEMU.
<p>Make SURE that if the door is started with a .bat batch file, that you explicitly
name it as such in the "Program Name" field. For instance, LORD's "start.bat" command
would be entered as "start.bat %#", not just "start %#". Failure to do this will cause
the session to be hung inside DOSEMU when the user exits the door. (You can still exit
by blindly typing exitemu when this happens.)
<a name="stdio"></a>
<h2>Setting up a non-door DOS program as a door</h2>
<p>For the most part, setting up a non-door DOS program is done following the same procedure as
a door. The key difference is that you <b>set Redirect STDIO to Yes</b> for a program
that is not designed specifically to run as a BBS door.
<p>You can also set up timed events (e.g. door daily maintenance programs) in this same manner.
Just make sure Native Program is set to "No" and it will work fine.
<ul>
<li>Startup Directory: /path/to/the/door (or ../xtrn/mydoor)
<li>Program name: program.exe %params
<li>Multiuser: Yes/No depending on the program
<li>Redirect STDIO: Yes
<li>Native Program: No
<li>Dropfile: pick something if the program wants/needs it.
<li>Use Lowercase: Yes
<li>Dropfile Dir: Place in Node Directory
</ul>
<p>It would probably be a good idea to set up command.com as an external, so that you
can get access to a DOS shell through the board. From there, you can do things like
the initial unzipping and setup of door software with ease.
<h2>Customization of your Synchronet DOSEMU setup</h2>
<p>File Search Precedence:
<br>The following table describes in what order Synchronet will look for various files
needed for starting DOSEMU. If a file does not exist in one location or cannot be
read, the next location will be tried until there are no more possible locations.
<p>
<table border=1><tr><th></th><th>dosemu.bin</th><th>emusetup.bat</th><th>dosemu.conf</th></tr>
<tr><td>First</td><td>startup_dir</td><td>startup_dir</td><td>startup_dir</td></tr>
<tr><td>Second</td><td>DOSemuPath</td><td>$SBBSCTRL</td><td>$SBBSCTRL</td></tr>
<tr><td>Third</td><td></td><td></td><td>/etc/dosemu/dosemu.conf</td></tr>
</table>
<p>This is useful because you might want to customize the configuration in order to get
a particular balky door working. You might want a custom dosemu binary, emusetup.bat,
and/or dosemu config for that particular door, while maintaining a different set of configurations
that works for mostly everything else.
<p>make sure you are using a dosemu.conf from the DOSEMU distribution of the
particular version you are using. (e.g. if using 1.1.4 release, don't use a dosemu.conf from
1.0.2)
<p>The most up-to-date freedos distribution can be found <A href="http://www.fdos.org/ripcord/dosemu/">here</a> -- this is known to fix problems with Tradewars 2002. You might consider trying DR-DOS if you have problems with FreeDOS. However, be certain that you use the autoexec.bat from the FreeDOS distribution, as the Synchronet integration depends on it. Also remember to copy the DOSEMU support files into
c:\dosemu in the DR-DOS hdimage.
<hr>
<p>emusetup.bat customization: This section is mostly TODO so ignore it for now
<p>emusetup.bat -- changing drive letter mappings, and using variables that
are passed into it
<p>The default drive letters are:
<ul>
<li>D: - The node directory, where the dropfile should probably be put. In door configurations,
specify this drive (D:\) as the path to the dropfile.
<li>E: - Under this drive, the door's directory will be mounted. Example: E:\LORD
<li>F: - The Synchronet control directory
<li>G: - The Synchronet data directory
<li>H: - The Synchronet exec directory
</ul>
<p>Any necessary utils that should be loaded before the door starts (like fossil driver, ansi
driver, etc) should be placed in the emusetup.bat with a PATH that points to them. The default
location is in a \dosutils directory immediately preceding the door's directory.
(For example, if your door is in
/home/bbs/doors/lord, put the dosutils directory as /home/bbs/doors/dosutils.)
<hr>
<h2>Known Problems</h2>
<p>File locking is dysfunctional with the DOSEMU 1.0.2.x stable releases. File locking
problems will manifest themselves as strange error messages related to file opens, long
pauses and/or hangs, game data corruption, and other fun stuff. Note that you do not have
to be running a multinode BBS to be prone to these issues; most programs detect DOSEMU as
a multitasker and thus initiate their lock management regardless of whether or not
multiple sessions of the game will be in use. DOSEMU development releases do not
have this issue, so you might be better off just to compile and use that.
<p>There is a fix from Bob Newell which is detailed in <a href="faqlinux.htm">this document</a>.
Included is a kludge for slow screen draws due to incorrect idling that will occur in some games
such as Planets TEOS.
<p>There is a precompiled version <a href="#files">here</a> that may or may not work on your
machine. (It was compiled from the Debian sources.) I also maintain builds of development
versions that you can install that are likely to have fixed many more bugs.
<h3>If you are having other problems:</h3>
<ul>
<li>check the dosemu.log and dosemu_boot.log that will be created in the node directory. They
should give you clues to track down a configuration problem. If those files do not exist, then
the dosemu.bin is not getting executed properly, so check your sbbs.ini, make sure you have
dosemu installed, and check for a stale dosemu.bin symlink in the door's directory.
<li>double-check your door's configuration, specifically the paths in scfg and the batch file
(if any) that starts it.
<li>Also verify that the paths in the door's configuration problem are correct
<li>Verify that you have set up enough nodes in the door's configuration to handle all the nodes on your BBS.
</ul>
<a name="files"></a>
<h2>Files</h2>
<ul>
<li><a href="emusetup.bat">emusetup.bat</a>
<li><a href="dosemu.conf">Example dosemu.conf</a> (for 1.0.2)
<li><a href="dosutils.tar.gz">A collection of essential DOS BBS utils</a>, such as ANSI drivers and FOSSIL drivers
<li><a href="dosemu-devel_1.1.5.7-1_i386.deb">DOSEMU Development Version 1.1.5.7</a> compiled for Debian stable/woody
<li><a href="dosemu_1.0.2.1-7_i386.deb">DOSEMU 1.0.2 compiled for Debian stable/woody, patched for locking fixes</a>
<li><a href="init/synchronet">Init script to start Synchronet as a daemon</a>
<li><a href="init/synchronet-screen">Init script to start Synchronet as a detached screen</a>
<li><a href="sbbs-dosemu.diff">Latest version of the patch</a>
</ul>
<h2>The Script Method</h2>
<p>There is another way to do this: use a script that launches dosemu. This is the more flexible
but non-userfriendly way to use dosemu doors on Synchronet. Example stuff can be found
<a href="rungame.tgz">in this tarball</a>.
<p style="font-size:10px">$Id$
</body>
</html>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment