Do you want to relive the glory days of playing Wolfenstein 3D, Commander Keen, Lemmings and Wacky Wheel on your PC? Or would you like for your kid to experience the original days of PC gaming? Building a Raspberry Pi DOSBOX is the perfect way to relive DOS gaming and learn about the Raspberry Pi while doing it.

Prerequisites

To get started you’ll need a setup similar to your old PC setup. A keyboard, a mouse and a monitor – only this time it needs to be a HDMI monitor, not VGA , and your PC is replaced by a Raspberry Pi.

The full list of items you’ll need is here:

Initial installation and configuration

Download Raspbian from here select the version that includes pixel – the latest version as of this writing is Raspbian Jessie with Pixel.

When downloaded extract and flash the image onto a SD card using Win32DiskImager as described here.

Next hook your Raspberry Pi up to your monitor, keyboard and mouse, and power up the Raspberry Pi. The first boot always takes a little while because the Pi is resizing the filesystem to the size of your SD card. Sit back and relax, once powered up we want to finish the basic setup.

When first booted the Raspberry Pi should boot into Pixel and show you a screen like to the right. Now you can connect to your WiFi pressing the WiFi icon in the top right corner (you’ll need a WiFi adapter for this to work on the Raspberry Pi 2), find your WiFi network and enter your WiFi password.

Once we’re connected to the internet we can start setting up DOSBOX.

Install and configure DOSBOX

DOSBOX is a DOS emulator that let you run DOS based games and programs on your Raspberry Pi.

To install DOSBOX open a terminal window and enter the following commands:

sudo apt-get install dosbox

If it asks for your password to install the package use the default password: raspberry.

Next we must configure DOSBOX. We start by setting up a folder where we will keep all our DOS games and files:

mkdir dos

Then we configure DOSBOX to automatically start inside that directory.

Open the DOSBOX config with:

nano .dosbbox/dosbox-0.74.conf

Change DOSBOX to run in fullscreen by changing the configuration option:

fullscreen=true

Then scroll down to the bottom of the file and add the following to make sure DOSBOX knows about the folder we just created and will start up in that folder:

[autoexec]
# Lines in this section will be run at startup.
# You can put your MOUNT lines here.
mount c ~/dos
c:

Now DOSBOX is installed, configured and ready to run from the start menu – but our dos folder is still empty.

 

Where to find games?

The Ultimate ShareWare Games Collection vol. 1

The Ultimate ShareWare Games Collection vol. 1 Cover

The next step is downloading some good old games onto the Raspberry Pi. What better way than to try one of the shareware compilation CD-ROM’s that was distributed in the 90’s? These compilation CD-ROM’s contains shareware versions of many of the classic games you’ll remember from the DOS days.

The internet archive has a entire section devoted to these compilation CD-ROM’s. My favorite is The Ultimate Shareware Games Collection Vol. 1 from 1995 you can download it here.

Open the browser on the Raspberry Pi and download it directly to the Downloads folder on the PI.

Next we need to move the CD image into our dos directory. Execute the following commands in a terminal:

mkdir dos/ultimate
mv Downloads/ULTIMATE.img dos/ultimate/

Now start DOSBOX and mount the image as if it was a CD-ROM, then go the CD-ROM drive and enter start.

c:\> imgmount d ULTIMATE/ULTIMATE.img -t iso
c:\> d:
d:\> start

You can now browse through the library of games and install them by selecting them (press space) and then pressing F1 to install. Definitely checkout the games from Apogee, Formgem and Gamer’s Edge.

Once installed start the games by cd’ing into the folders and starting the exe file. E.g. for KEEN4:

d:\> c:
c:\> cd KEEN4
c:\> KEEN4E.EXE

Note the following useful commands: cd changes directory, dir lists the contents of a directory, exit closes DOSBOX and returns to pixel. 

If you’re looking for game that is not included in the compilation simply use Google to download the game e.g. “shareware wacky wheels”. To unzip and move the file into dos box use the following instructions in a terminal:

unzip Downloads/1wacky.zip -d dos/wacky

If you wish to play full games you can either copy them off your old disks and CD-ROM’s or use one of the many abandonware sites that allows you to download games that are no longer available for purchase. One note – the legality of abandonware is questionable.

Change DOSBOX to run in fullscreen for the Raspberry Pi

As you have probably noticed the games run in a small resolution which means there is a lot of black empty space on your screen. To change that while not taxing our Raspberry Pi’s CPU with too much scaling we can change the Raspberry Pi to run in a more DOS friendly resolution.

We can do that by clicking: Start Button > Preferences > Raspberry Pi Configuration. Then click “Set Resolution” and select 720×480 16:8 – this will reboot the Raspberry Pi.

Once the Raspberry Pi boots up again start dosbox – your games will now take up much more of the screen.