fsxNet Wiki

BBS Development & Resources

User Tools

Site Tools


doors:tutorials:dos:dosbox

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
doors:tutorials:dos:dosbox [2017/09/02 04:26]
apam
— (current)
Line 1: Line 1:
-====== DOS doors With DosBox ====== 
- 
-This guide is aimed at Raspbian Linux (Stretch) on Raspberry PI, but should work on any Linux/UNIX like system DosBox supports. 
- 
-===== Step 1. Install Pre-Requisites ===== 
- 
-To compile DosBox, you will need SDL 1.2 and SDL-net in addition to the usual development toolchain. You will also need Subversion to get dosbox and patch to patch it. 
- 
-    sudo apt-get install build-essential libsdl1.2-dev libsdl-net1.2-dev subversion automake 
- 
-===== Step 2. Fetch DosBox ===== 
- 
-The most recent DosBox release has some issues with DOS doors, and the most recent Subversion code also has issues, so you will need a specific revision from the subversion repository. In my tests I have found r3933 to work well. Other revisions may work, but have not been tested. 
- 
-    svn checkout -r3933 svn://​svn.code.sf.net/​p/​dosbox/​code-0/​dosbox/​trunk dosbox-code-0 
- 
-===== Step 3. Patch DosBox ===== 
- 
-Now we have the DosBox code, you will probably want to patch it to fix a specific bug that happens with some doors which will appear as though when you press enter, it receives the enter command twice. 
- 
-    wget https://​gist.githubusercontent.com/​apamment/​bb438d9be6dc8e67c36239fd64047ece/​raw/​3e942c68d7a970f3404bffc2408165d810c4bef7/​dosbox-nullmodem.diff 
-    ​ 
-    cd dosbox-code-0 
-    ​ 
-    patch -p1 < ../​dosbox-nullmodem.diff 
- 
- 
-===== Step 4. Compile DosBox ===== 
- 
-Compiling DosBox takes a long time on the Raspberry PI and will appear to have frozen a few times - particularly when compiling the render-scalers file - don't worry, just leave it it will eventually move on. 
- 
-    ./​autogen.sh 
-    ./configure 
-    make 
-    sudo make install 
- 
-These commands will compile and install DosBox into /​usr/​local/​bin. 
- 
-===== Step 5. Create Configuration File ===== 
- 
-Next you will need to create a config file which enables the serial port for socket inheritance,​ and also mounts drives so that DosBox can access both your doors and your BBS drop files. 
- 
-An example for my WWIV setup is here: [[https://​gist.github.com/​apamment/​268d936da5b5838e3dafd981dd67fab5|dosbox.conf]] 
- 
-In this example, drive C: is the location where my doors are stored and drive D: is the location of WWIV's temporary node files (drop files). 
- 
-===== Step 6. Create Shell Script to Invoke DosBox ===== 
- 
-The shell script you need will vary from system to system, but basically, you want to: 
- 
- * ensure no one else is using the door before you start it 
- * make DosBox not use an X11 window, ​ 
- * ensure that the dropfiles have DOS line endings 
- * launch DosBox with the command to start the batch file in the next section. 
- 
-Some bulletin board systems have mechanisms to make sure only one person is using a door at a time, others do not. If your BBS system supports such a mechanism, you do not need to do it in the shell script. 
- 
-Also some BBSes write dropfiles with DOS line endings instead of UNIX line endings, so you may not need to do that in the script. 
- 
-Here is an example script I use for Freshwater Fishing on WWIV: 
- 
-```` 
-#!/bin/bash 
-export SDL_VIDEODRIVER="​dummy"​ 
-NODE=$1 
-SOCKET=$2 
-/​usr/​bin/​unix2dos /​home/​wwiv/​temp/​${NODE}/​door.sys 
-/​usr/​local/​bin/​dosbox -socket $SOCKET -c "​C:​\ffs.bat ${NODE}"​ -conf /​home/​wwiv/​doors/​dos/​dosbox.conf 
-```` 
- 
-Notice my setup does not need to check if the door is in use, but it does need to convert the drop file to use DOS line endings. 
- 
-An example where you can check if the door is in use would be: 
-```` 
-#!/bin/bash 
-export SDL_VIDEODRIVER="​dummy"​ 
-NODE=$1 
-SOCKET=$2 
- 
-if [ ! -e /​home/​wwiv/​doors/​dos/​ffs.inuse ]; then 
-   touch /​home/​wwiv/​doors/​dos/​ffs.inuse 
-   /​usr/​bin/​unix2dos /​home/​wwiv/​temp/​${NODE}/​door.sys 
-   /​usr/​local/​bin/​dosbox -socket $SOCKET -c "​C:​\ffs.bat ${NODE}"​ -conf /​home/​wwiv/​doors/​dos/​dosbox.conf 
-   rm /​home/​wwiv/​doors/​dos/​ffs.inuse 
-fi 
-```` 
- 
-This will just dump the user back to the BBS if the door is in use. You could get fancy and use the '​inuse'​ door I created which will display an in-use message and then quit ([[https://​github.com/​apamment/​inuse|INUSE Door]]), but that is outside the scope of this document. 
- 
- 
-===== Step 7. Create Batch File to Start Door ===== 
- 
-===== Step 8. Setup BBS to call Shell Script ===== 
  
doors/tutorials/dos/dosbox.1504326371.txt.gz ยท Last modified: 2018/03/29 01:58 (external edit)