External DOS Emulators
DOS Doors via External Emulators
Section titled “DOS Doors via External Emulators”This page covers running classic DOS door games using external emulators — DOSEMU and QEMU — via the abracadabra module. ENiGMA½ launches the emulator as a child process and bridges I/O over stdio or a socket.
DOSEMU
Section titled “DOSEMU”DOSEMU provides a DOS environment on Linux via stdio. Configure COM1 as a virtual serial port to connect it to ENiGMA½’s stdio bridge.
Step 1: Create dosemu.conf
Section titled “Step 1: Create dosemu.conf”$_cpu = "80486"$_cpu_emu = "vm86"$_external_char_set = "utf8"$_internal_char_set = "cp437"$_term_updfreq = (8)$_layout = "us"$_rawkeyboard = (0)$_com1 = "virtual"$_com1 = "virtual" maps COM1 to stdio — ENiGMA½ speaks directly to the door over stdin/stdout.
Step 2: Create the Door Drive
Section titled “Step 2: Create the Door Drive”Create a virtual drive for your door, e.g. /home/enigma/DOS/X/PW, and map it in your DOSEMU AUTOEXEC.BAT:
@echo offpath d:\bin;d:\gnu;d:\dosemuset TEMP=c:\tmpprompt $P$GC:\BNU\BNU.COM /L0:57600,8N1 /Flredir.com x: linux\fs\home\enigma\DOS\Xunix -eBNU is a FOSSIL driver installed here at C:\BNU\. A FOSSIL driver is required by most classic DOS doors.
Step 3: Menu Entry
Section titled “Step 3: Menu Entry”doorPimpWars: { desc: Playing PimpWars module: abracadabra config: { name: PimpWars dropFileType: DORINFO cmd: /usr/bin/dosemu args: [ "-quiet", "-f", "/path/to/dosemu.conf", "X:\\PW\\START.BAT {dropFile} {node}" ] nodeMax: 1 tooManyArt: DOORMANY io: stdio }}QEMU provides a robust, cross-platform solution for DOS doors. The general approach is a bootstrap shell script that prepares a node-specific GO.BAT, then launches QEMU with the FreeDOS image.
Step 1: Create a FreeDOS Image
Section titled “Step 1: Create a FreeDOS Image”Follow the QEMU/FreeDOS guide to create a freedos_c.img. Install FreeDOS, then install your door game at C:\DOORS\LORD\ (or similar).
Transfer files from host to the image using QEMU’s vfat drive:
qemu-system-i386 -localtime /home/enigma/dos/images/freedos_c.img \ -hdb fat:/path/to/files/to/copyFiles appear on D: inside FreeDOS. Add to the image’s AUTOEXEC.BAT:
CALL E:\GO.BATStep 2: Create a Bootstrap Script
Section titled “Step 2: Create a Bootstrap Script”This script writes a per-node GO.BAT before launching QEMU:
#!/bin/bashNODE=$1DROPFILE=D:\\$2SRVPORT=$3
mkdir -p /home/enigma/dos/go/node$NODE
cat > /home/enigma/dos/go/node$NODE/GO.BAT <<EOFC:CD \FOSSIL\BNUBNU.COMCD \DOORS\LORDCOPY /Y $DROPFILECALL START.BAT $NODEFDAPM POWEROFFEOF
unix2dos /home/enigma/dos/go/node$NODE/GO.BAT
qemu-system-i386 -localtime /home/enigma/dos/images/freedos_c.img \ -chardev socket,port=$SRVPORT,nowait,host=localhost,id=s0 \ -device isa-serial,chardev=s0 \ -hdb fat:/home/enigma/drop/node$NODE \ -hdc fat:/home/enigma/dos/go/node$NODE \ -nographic-chardev socket,...connects COM1 to ENiGMA½’s socket server on$SRVPORT-hdb fat:...exposes the drop file directory asD:-hdc fat:...exposes theGO.BATdirectory asE:-nographicruns headless
Step 3: Menu Entry
Section titled “Step 3: Menu Entry”doorLORD: { desc: Playing L.O.R.D. module: abracadabra config: { name: LORD dropFileType: DOOR cmd: /home/enigma/dos/scripts/lord.sh args: [ "{node}", "{dropFile}", "{srvPort}", ] nodeMax: 1 tooManyArt: DOORMANY io: socket }}DOSBox-X
Section titled “DOSBox-X”DOSBox-X is a graphical DOS environment available on Windows, macOS, and Linux. It is primarily useful for preparing disk images — raw .img images created in DOSBox-X are compatible with QEMU and with ENiGMA½’s built-in v86_door.
Using DOSBox-X as a production door server (launching it per user session) is possible but uncommon. The imgmount command can mount raw disk images inside DOSBox-X. See the DOSBox-X documentation for details.
See Also
Section titled “See Also”- Local Doors
- Native v86 Emulation — run the same FreeDOS image without QEMU on the server
- Scripts & Native Binaries — abracadabra module reference
- Telnet Bridge