BBS migration to Dosbox-X

Edit: April 19, 2023: Added details regarding issues with telegard.exe crashing and the CPU core used by Dosbox-X

I've run a Telegard BBS for some time on an OS/2 Warp 4 installation, which has never been the most reliable project.

First, we're talking about 25-year-old hardware and if you've spent time with retro hardware, you know there's an upper limit for hardware age where it's still reliable. After that, you start having weird issues which are not always clearly attributable to a particular piece of hardware and thus nearly impossible to diagnose and fix.

Second, OS/2 is a cranky, irritable, grumpy old operating system. Support for modern hardware is essentially non-existent (and while a project like ArcaOS does address this, it is not without some major caveats), and there's a distinct lack of quality-of-life features like network file sharing that works with modern systems, or even accessible and usable software, though the Hobbes archive fills in a lot of the gaps. But, even then, there are things that show off the age of the OS: Hobbes just moved their web page archive to HTTPS only, which is encrypted via TLS and thus not supported by any software included in a default OS/2 install which means you currently can't even access the library that has the software that would allow you to be able to access the library.

So, after fiddling with hardware and software issues for a while I decided the correct thing to do would be to suck it up and declare that while the replicate-what-I-ran-in-the-90s was a good thought it's impractical and not maintainable and that a working setup is preferred to being broken but accurate to what I ran 25 years ago.

So, off to everyone's favorite alternative: Linux with Dosbox. Or, specifically, Ubuntu 22.10 with Dosbox-X because the specific Linux distribution you use really doesn't matter, and Dosbox-X has a couple of required features supported out of the box: SHARE support and easier access to do disk mount refreshing and more robust serial emulation.

The first thing I discovered was that some of the configuration options I needed for configuring a multi-node BBS would require different configuration options, so I'd need to make two unique configuration files, one for each node.  This is not strictly necessary - and not necessary at all if you're just running one node - but I went this route in order to eliminate any conflicting issues that may arise in some of the configuration options.

With that in mind, the first thing I did was copy the default ~/dosbox-x.conf file into a unique configuration file for each of the two nodes I wanted to run. The configuration file may not exist until you run Dosbox-X once and save the configuration, but once it does exist you just need to issue two cp commands to make the copies you'll want:

cp ~/dosbox-x.conf ~/tg-node1.conf
cp ~/dosbox-x.conf ~/tg-node1.conf

For the following examples, I've removed a lot of the documentation in the configuration file, so what you see in your configuration file won't exactly match what is shown in the code snippets, but should still be sufficient to guide you into changing the correct line.

You'll need a mounted drive in order to install anything permanently, so you'll need to make a directory on the host computer to mount for the BBS install, and you'll need to edit the config files to automatically mount it. You can do this by adding a mount command to the autoexec section at the  bottom of the config file:

# Lines in this section will be run at startup.
# You can put your MOUNT lines here.
mount d: /home/user/bbs

This configuration will mount /home/user/bbs as the D: drive in Dosbox - you'll want to substitute this for whatever directory you created and wish to use.

Next, you'll want to go ahead and configure the serial port as a "modem" and configure it to listen for telnet connections:

serial1       = modem listenport:2323

This tells Dosbox to set up a virtual modem accessible over telnet on port 2323 on COM1.  The port can be anything you'd like (above port 1024 due to how privileged ports work in Linux). You can also configure more than one serial port if you'd like; I didn't because I've got separate configuration files for each node, so I only included the specific com port configuration.

For tg-node2.conf, I used COM2 and incremented the port by one:

serial2       = modem listenport:2324

An additional issue that surfaced during running the BBS was that the core has to be updated along with the CPU type or else you'll get hit with unknown cpu exception errors. You'll need to modify two lines in the DosBox-X configuration files you're using and after much experimentation, the dynamic_x86 core and a CPU type of Pentium resolved any crashing I was experiencing.

core = dynamic_x86
cputype = pentium

Once you've got the CPU type set properly, the drive mounted in Dosbox, and the serial ports configured, you'll then need to install a FOSSIL driver, which is an intermediary between the BBS and other software and the modem hardware itself, intended to provide a simple interface layer and allow sharing of the modem and its connection between software.

I tried a couple of FOSSIL drivers and had some weird stability or performance issues - with x00, the BBS itself would occasionally hang when the virtual "modem" was reset or rang, and with BNU, the performance was stuck at 300bps, even though the connection was showing substantially faster.

I was, however, able to identify a FOSSIL driver that worked without issues. ADF worked first try at full performance and so far has been completely reliable. (Download here). Configuration was dead simple, as the archive includes a BAT file for COM1 and COM2, and so all you'd need is to simply run the batch file.

Extract the archive somewhere in the path that you've chosen as the drive you're mapping in Dosbox (ex. /home/user/bbs/fossil/adf) and then add a couple of lines to the autoexec portion of the Dosbox config:

cd \fossil\adf

At this point, you're ready to check and make sure that the configuration changes you've made work and that the drive mounts and FOSSIL driver loads. You'll need to specify the configuration file to identify which node you're running this for since my configuration only specifies the COM port that each node would use in its configuration file (update the path to reflect where you stored the configuration file):

dosbox-x -conf /home/user/tg-node1.conf

Dosbox will load, and after a moment it should run all the commands in the autoexec section, outputting text similar to:

Z:\>mount d: /home/user/bbs
Drive D is mounted as local directory /home/user/bbs/
D:\>cd \fossil\adf

AnDan Software FOSSIL Version 1.50
Copyright (c) 1994-2000 Scandinavian Digital Systems AB

Internet:     e-mail: [email protected]

Freeware: May be used, copied and distributed if no fee is
          charged and if no changes are done.

ADF loaded.

You can see that drive D: was mounted, and as the 2nd to last line, the ADF fossil successfully loaded on COM1.

The next step will be to install Telegard (or whatever software you're wanting to use), and then configure it.  I'm not going to dive into this, since the TG documentation is very well written and will walk you through the installation, initial configuration, and then configuring the modem.

But, once you've completed configuring TG, if everything has been configured properly, you'll get a Waiting For Caller screen that loads, initializes the "modem", receives an OK back from it, and then is sitting there ready for connection.

You can then telnet to your shiny new BBS using any telnet client, though one that properly supports ANSI is recommended like Syncterm of Muffinterm is really needed to see everything as it was meant to be seen.