fsxNet Wiki

BBS Development & Resources

User Tools

Site Tools


doors:tutorials:dos:dosonpi

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
Next revision Both sides next revision
doors:tutorials:dos:dosonpi [2021/01/25 07:48]
avon
doors:tutorials:dos:dosonpi [2021/01/25 07:58]
avon
Line 1: Line 1:
-== Run DOS BBS DoorGames on the Raspberry Pi ==+===== Run DOS BBS DoorGames on the Raspberry Pi =====
  
-Article by Darryl Perry (2016)+//Article by Darryl Perry (2016)//
  
  
Line 11: Line 11:
 that are specific to the package you wish to use. that are specific to the package you wish to use.
  
-How does this work?+====How does this work?====
  
 We will be creating an emulated virtual DOS environment from which to run  We will be creating an emulated virtual DOS environment from which to run 
Line 30: Line 30:
   3) ODROID XU3-Lite (hardkernel.com)   3) ODROID XU3-Lite (hardkernel.com)
  
-Caveats:+=== Caveats ​===
  
 The Raspberry Pi B+ is the least robust device I've attemted this with The Raspberry Pi B+ is the least robust device I've attemted this with
Line 44: Line 44:
 almost unnoticable. almost unnoticable.
  
 +=== Required packages ===
  
-Required packages: 
   qemu: apt-get install qemu   qemu: apt-get install qemu
   socat: apt-get install socat   socat: apt-get install socat
Line 51: Line 51:
  
  
-Create freedos image:+=== Create freedos image ===
  
 We will be creating a FreeDOS image to be used in our VM. We will be creating a FreeDOS image to be used in our VM.
Line 66: Line 66:
 larger than I need so you may be able to use something much smaller. larger than I need so you may be able to use something much smaller.
  
-Configure 4DOS:+=== Configure 4DOS ===
  
 Once you have a working FreeDOS VM, you will need to configure the boot  Once you have a working FreeDOS VM, you will need to configure the boot 
Line 75: Line 75:
  
 1) Create a mount point: 1) Create a mount point:
-mkdir /​mnt/​freedos+  ​mkdir /​mnt/​freedos
  
 2) mount the image 2) mount the image
-sudo mount -t msdos -o loop,​offset=32256 ./​freedos.img /​mnt/​freedos+  ​sudo mount -t msdos -o loop,​offset=32256 ./​freedos.img /​mnt/​freedos
  
 You can then cd to /​mnt/​freedos/​ and edit your files. ​ You can also use You can then cd to /​mnt/​freedos/​ and edit your files. ​ You can also use
Line 84: Line 84:
 unmount the image before running the VM. unmount the image before running the VM.
  
-sudo umount /​mnt/​freedos+  ​sudo umount /​mnt/​freedos
  
 The default boot scripts are C:​\FDCONFIG.SYS and C:​\FDOS\FDAUTO.BAT. The default boot scripts are C:​\FDCONFIG.SYS and C:​\FDOS\FDAUTO.BAT.
Line 121: Line 121:
   FDAPM APMDOS   FDAPM APMDOS
   LH SHARE   LH SHARE
-DOSLFN+  ​DOSLFN
   MEM /C /N   MEM /C /N
   SET AUTOFILE=%0   SET AUTOFILE=%0
Line 132: Line 132:
   alias auto=edit %0   alias auto=edit %0
   CALL D:\RUN.BAT   CALL D:\RUN.BAT
----------------------------------------- ​+  ​---------------------------------------- ​
  
 Note how the batch file ends with CALL D:​\RUN.BAT. ​ RUN.BAT is the  Note how the batch file ends with CALL D:​\RUN.BAT. ​ RUN.BAT is the 
Line 138: Line 138:
 doors.sh script. doors.sh script.
  
-Setting up the doorgames:+=== Setting up the doorgames ​===
  
 You will want to run the DOS VM initially, to setup your doorgames. ​ To do You will want to run the DOS VM initially, to setup your doorgames. ​ To do
 that, you just run qemu normally, but with the mounted local file system. that, you just run qemu normally, but with the mounted local file system.
 I've written a simple batch file that will load the VM. I've written a simple batch file that will load the VM.
- +  ​ 
----------------------------------------- +  ---------------------------------------- 
-#!/bin/sh +  #!/bin/sh 
- +   
-rm /​home/​bbs/​temp${NODE}/​run.bat +  rm /​home/​bbs/​temp${NODE}/​run.bat 
- +   
-qemu-system-i386 \ +  qemu-system-i386 \ 
--localtime \ +  -localtime \ 
-/​home/​bbs/​doors/​qemu/​freedos.img \ +  /​home/​bbs/​doors/​qemu/​freedos.img \ 
--boot c \ +  -boot c \ 
--hdb fat:/​home/​bbs \ +  -hdb fat:/​home/​bbs \ 
--m 1024  +  -m 1024  
-----------------------------------------+  ----------------------------------------
  
 If you are running this remotely, from a terminal like putty, you can add If you are running this remotely, from a terminal like putty, you can add
 the -curses flag.  That will give you an interactive shell into the VM. the -curses flag.  That will give you an interactive shell into the VM.
- 
  
 The method used for running the VM will mount the /home/bbs directory as  The method used for running the VM will mount the /home/bbs directory as 
Line 168: Line 167:
 it will be located at D:​\DOORS\LORD it will be located at D:​\DOORS\LORD
  
-The dropfile locations will also be on your D: drive. +  ​The dropfile locations will also be on your D: drive. 
-D:\TEMP +  D:\TEMP
- +
-or for node #2: +
-D:​\TEMP2 ​+
   ​   ​
 +  or for node #2:
 +  D:​\TEMP2 ​
 +  ​
 +=== The working DOORS.SH script ===
  
-The working DOORS.SH script: +This is the script as I have it working for me:
-    ​This is the script as I have it working for me:+
   ​   ​
-    ​------------------------------------ +  ​------------------------------------ 
-    #!/bin/sh+  #!/bin/sh
   ​   ​
   ## Pass the parameters for the door and the node.   ## Pass the parameters for the door and the node.
Line 199: Line 198:
       ## Operation OverKill II       ## Operation OverKill II
       OOII)        OOII) 
-           echo "@echo off" > ${gobat} +         echo "@echo off" > ${gobat} 
-           ​echo "​D:"​ >> ${gobat} +         ​echo "​D:"​ >> ${gobat} 
-           ​echo "CD \DOORS\OO"​ >> ${gobat} +         ​echo "CD \DOORS\OO"​ >> ${gobat} 
-           ​### Use the CALL command when calling a door batch file. +         ​### Use the CALL command when calling a door batch file. 
-           ​### If not used, then the door batch file will not return +         ​### If not used, then the door batch file will not return 
-           ​### to the RUN.BAT script to complete execution. ​ If the  +         ​### to the RUN.BAT script to complete execution. ​ If the  
-           ​### RUN.BAT script does not complete execution, then it will +         ​### RUN.BAT script does not complete execution, then it will 
-           ​### not shut down the VM.  It will then just go to a dos +         ​### not shut down the VM.  It will then just go to a dos 
-           ​### prompt and the user will not see it, and will think that +         ​### prompt and the user will not see it, and will think that 
-           ​### the game is hung. +         ​### the game is hung. 
-           ​echo "CALL OOIIDOOR.BAT ${NODE}"​ >> ${gobat}+         ​echo "CALL OOIIDOOR.BAT ${NODE}"​ >> ${gobat}
          ;;          ;;
     ## Legend of the Red Dragon     ## Legend of the Red Dragon
Line 250: Line 249:
          ;;          ;;
     DOS)     DOS)
-;; +  ​;; 
-esac +  esac 
-## At the end of run.bat, we add this line to gracefully shutdown the VM. +  ## At the end of run.bat, we add this line to gracefully shutdown the VM. 
-## This will return the user back to the BBS. +  ## This will return the user back to the BBS. 
-echo "​C:​\FDOS\BIN\FDAPM POWEROFF"​ >> ${gobat} +  echo "​C:​\FDOS\BIN\FDAPM POWEROFF"​ >> ${gobat} 
-## The batch file must be in dos format, or it will not run properly. +  ## The batch file must be in dos format, or it will not run properly. 
-todos ${gobat} +  todos ${gobat} 
- +   
- +   
-### The main QEMU call. +  ### The main QEMU call. 
-### 1) -localtime to pass the host clock to the VM +  ### 1) -localtime to pass the host clock to the VM 
-### 2) tell it to use the freedos.img +  ### 2) tell it to use the freedos.img 
-### 3) tell it to boot to the C: drive +  ### 3) tell it to boot to the C: drive 
-### 4) Turn off all displays. Otherwise it will give errors or skewed displays +  ### 4) Turn off all displays. Otherwise it will give errors or skewed displays 
-### 5) How many megabytes of memory to allow for the BM +  ### 5) How many megabytes of memory to allow for the BM 
-### 6) Define a serial modem connection and assign a computer port +  ### 6) Define a serial modem connection and assign a computer port 
-### 7) Mount the main BBS directory in RW mode +  ### 7) Mount the main BBS directory in RW mode 
-### The qemu call is loaded into the background. ​ We do this so that we can  +  ### The qemu call is loaded into the background. ​ We do this so that we can  
-### spawn a concurrent socat process. +  ### spawn a concurrent socat process. 
-qemu-system-i386 \ +  qemu-system-i386 \ 
--localtime \ +  -localtime \ 
-/​home/​bbs/​doors/​qemu/​freedos.img \ +  /​home/​bbs/​doors/​qemu/​freedos.img \ 
--boot c \ +  -boot c \ 
--display none \ +  -display none \ 
--m 256 \ +  -m 256 \ 
--serial telnet::​${portnum},​server,​nowait,​nodelay \ +  -serial telnet::​${portnum},​server,​nowait,​nodelay \ 
--hdb fat:​rw:/​home/​bbs > /dev/null 2>&1 & +  -hdb fat:​rw:/​home/​bbs > /dev/null 2>&1 & 
- +   
 +  
   ### Inform the user that it will take several seconds before the game   ### Inform the user that it will take several seconds before the game
   ### loads up.   ### loads up.
Line 296: Line 295:
   ------------------------------------   ------------------------------------
  
-Using the script:+=== Using the script ​===
  
 I use and have developed this method for Mystic BBS.  You will need to make I use and have developed this method for Mystic BBS.  You will need to make
Line 313: Line 312:
 The parameters for the script are: The parameters for the script are:
  
-doors.sh DOOR NODE# /DOS+  ​doors.sh DOOR NODE# /DOS
  
 The /DOS switch is used to create a DOS version of the drop file.  That way The /DOS switch is used to create a DOS version of the drop file.  That way
Line 323: Line 322:
   Data: /​home/​bbs/​doors/​qemu/​doors.sh LORD %3 /DOS   Data: /​home/​bbs/​doors/​qemu/​doors.sh LORD %3 /DOS
  
-Conclusion:  ​+=== Conclusion ​===
  
 That's all there is to it.  Your milage may vary. That's all there is to it.  Your milage may vary.
-Darryl Perry