Subj : Re: MBSE, Linux + Dosbox To : Deon George From : Niels Haedecke Date : Thu Nov 22 2018 13:08:07 Deon George wrote to Niels Haedecke: DG> On 11/21/18, Niels Haedecke said the following... DG> NH> Well, looks like I have sorted this one out. I got "pimpwars" running DG> in DG> NH> QEMU and it works real nice. I will have to do some more testing with DG> NH> other doorgames but at least this one (which I picked randomly) DG> works. DG> NH> DG> NH> If anyone is interested in the configuration details (door.sh script DG> and DG> NH> FreeDOS config), feel free to send me a netmail. DG> DG> Awesome, I would be interested. Could you share the details? DG> DG> ...deon DG> DG> _--_|\ | Deon George DG> / \ | Chinwag BBS - A BBS on a PI in Docker! DG> \_.__.*/ | DG> V | Coming from the 'burbs of Melbourne, Australia DG> DG> --- Mystic BBS v1.12 A39 2018/04/21 (Raspberry Pi/32) DG> * Origin: Chinwag | MysticBBS in Docker! (3:633/509.1) DG> Well, there once was a howto on cyberia.darktech.org but this domain is long gone. Fortunately, I did save a copy of the howto back then and build up on this. I'll upload a "qemu-dos-door-kit" to my bbs once it is ready to open to the public. This "kit" will contain the original howto and the scripts and DOS configurations I have created to make things work. With regards to MBSE on debian/raspbian Linux you need the following prerequisites: 1. socat tool installed on your Linux box 2. qemu-system-i386 installed on your Linux box 3. a small disk image about (25 Megabyte in size) where a basic installation of FreeDOS resides 4. The BNU.COM FOSSIL driver installed within the FreeDOS image mentioned above and loaded by AUTOEXEC.BAT during QEMU startup. 5. a directory within MBSE's installation directory that contains the doorgame and which will be mapped into QEMU as DOS drive D: 6. The script below which will be executed from the MBSE .mnu file. It basically maps the MBSE user home directory into the DOS system as drive D: (letting me access the door.sys dropfile) and it maps the respective door game directory into the DOS system as drive E: - then it creates a temporary go.bat file that will be executed and run the door. With QEMU running in the background, acces from MBSE to the running door game is done through the virtual serial port of the QEMU system via the "socat" command. --- script --- #!/bin/bash # set -x trap '' INT TSTP # get number of running QEMU procs and exit if load too high # (this is needed for Raspberry Pi's) Q_COUNT=$(ps ax | grep 'qemu-system-i386' | grep -v grep | wc -l) if [ "${Q_COUNT}" -ge 3 ] then echo "There are currently too many QEMU sessions running." echo "Please try again later." sleep 5 fi # get random tcp port and re-shuffle if already in use Q_PORT=`shuf -i 1025-65536 -n 1` while $(nc -z localhost ${Q_PORT} ) do Q_PORT=`shuf -i 1024-65536 -n 1` done # define virtual serial port on QEMU system Q_SERIAL="-serial tcp::${Q_PORT},server,nowait,nodelay" # attach user home directory to drive D: D_DRIVE="-drive format=raw,file=fat:rw:${HOME}" # attach door game directory to drive E: E_DRIVE="-drive format=raw,file=fat:rw:/opt/mbse/doors/qemu/doors/pimpwars" # ...while we're at it, get the user's node number from door.sys U_NODE=$(head -n 4 $HOME/door.sys | tail -n 1 | awk '{ print $1}' | tr -d '\r') .