In this tutorial, I go the through the steps of setting up Raspberry Pi DOSBox.
This project is a pretty easy process that will let you play the hundreds of great old DOS games that have been released as shareware, demos and of course freeware.
Now DOSBox will only let you play games designed for the MS-DOS operating system. If you want more than just this, then be sure to check out my tutorial on setting up Retropie for the Raspberry Pi.
You will find underneath the installation instructions I go through some of the top games (my personal favorites) that you will be able to play.
This list may be handy if you’re overwhelmed with how many games you’re ready to download and play.
You will need the following equipment to get this project up and running. You will also need a screen as playing a game remotely will lag lots and wouldn’t be very much fun.
If you want to hear me talk through the process of setting this all up, then be sure to check out the video below.
I go through all the steps to setting this up correctly and anything else you should know.
Can’t see the video? Please support us by disabling your adblocker.
Installing Raspberry Pi DOSBox
Now setting up DOSBox is super easy and won’t take you very long to get it up and running. I will go through the process of installing the software package and mention how you can tweak it further if required. You will need to make sure you have Raspbian installed before proceeding.
1. First, open up the terminal on the Pi.
2. Bring the Pi up to date by running the following commands.
sudo apt-get update sudo apt-get upgrade
3. To install, we only need to run one line.
sudo apt-get install dosbox
4. Now let’s move onto configuration. First, make a directory where our games will be stored. ~ refers to our home directory, and this directory is
5. The config file for DOSBox will not be created until the first run, to run it simply enter DOSBox into the terminal. Typing
exit into DOSBox will exit and free up the terminal again.
6. If you want to edit the config file, you can find it at the following location. Keep in mind the version number may have changed since this tutorial was published.
7. In here you’re able to change quite a few different settings including the screen size, mouse sensitivity and so much more. There are probably too many options to go over for this tutorial so if you want more information to be sure to check out the documentation page on the DOSBox config file.
8. Next thing you may want to do is setup mapping for a controller. To do this, you will need to launch DOSBox (I mention in this in the next section). Once launched, press
CTRL+F1. You can also use the following to bring up the keymapper as soon as you launch DOSBox.
9. For some controllers, DOSBox will automatically detect and apply settings for the controller. I know this happened with my classic Xbox 360 controller. It’s also important to note controller compatibility varies from game to game so it may work better in some than others.
Installing games is a pretty straightforward process it primarily involves downloading and extracting them. There are two ways to do this, but the easiest way is to use the GUI (Graphical User Interface) to move the files to the correct place.
To begin, go to the browser of your Pi and head over to abandonia as they probably have the most extensive collection of DOS games currently available for download.
Here you can navigate and find a game that is available to run on DOSBox. In my example, I download a game called Outrun. A classic racing game by Sega where your goal is really simple… Reach the end of the track before time runs out. You can crash as many times as possible, but it will slow you down severely. This game is certainly worth checking out if you love old school racing games.
Now to move it into the
dos-games folder you can either run a line in the terminal or use the GUI.
Now in the terminal, you can just run a single line to move and unzip the zip file we downloaded. In this example, I am using outrun so make sure you replace this with the same name as your game/download.
To move and unzip the file, simply do the following command.
unzip ~/Downloads/OutRun.zip -d ~/dos-games/
Using the GUI is pretty straightforward, but I will cover it anyway for anyone who is completely new to the Pi.
1. In the default desktop, simply go to file manager (the filing cabinet icon) in the top navigation bar.
2. Once this window opens, go to downloads in the left column, and you will see the zip file in the right column.
3. Now simply right click on the zip file and go either cut or copy.
4. Now go to the dos-games folder and paste it in here.
5. Simply right-click on it and extract it.
6. Now it’s ready to be run and played.
Now for the best part of the tutorial and that is launching Raspberry Pi DOSBox and playing the games you have just downloaded.
1. Once you have downloaded and unzipped the game, running the game is straightforward. To do this you will need to open up DOSBox, and you can do this simply by entering the following into the terminal.
2. Next, we need to mount the folder of where our game is installed to. In this example I will mount the letter c to our directory of the game we’re going to play, Outrun.
mount c ~/dos-games/outrun
3. Now we need to change directory to the c mount we just created. You can do this by simply entering the letter followed by the semicolon into the DOSBox window.
4. Then run the exe by simply typing the name of it. Outrun for example you just simply need to enter outrun as the exe is called outrun.exe
5. Once that is entered the game will launch, and you should be able to play it like normal.
6. Now some games you will find will run too fast and others too slow. This speed can be corrected by changing the cycle speed by pressing Ctrl+F11 to decrease cycles and CTRL+F12 to increase cycles. There are also a few other key bindings that you may want to know, and these can be found here.
So What kind of games can you play?
As I mentioned earlier, there are literally hundreds of games you’re able to play. If you remember the good old DOS operating system, then you will probably remember the classics that came from it.
To name some of the most popular games:
- Doom (1993)
- Oregon Trail (1990)
- Prince of Persia (1990)
- Quake (1996)
- Lemmings (1991)
- Tetris (1984)
- Abuse (1995)
- Liero (1998)
- 4D Sports Boxing (1991)
- Arkanoid (1986)
- Lode Runner (1983)
- Gauntlet (1985)
- Leisure suit Larry (1987)
- Day of the tentacle (1993)
It’s important to know that while the majority of DOS games have been declared as abandonware, freeware or shareware there are still some that you’re meant to pay for.
Like every tutorial, you’re bound to run into some problems. Here are the most common issues I came across when I was testing this tutorial.
- Performance: While most games will run fine you will come across a few that the Pi may appear to struggle a bit on. This performance, of course, will vary depending on the version of the Raspberry Pi you’re using. I found overclocking and tinkering the amount of memory reserved for the GPU helped with performance. You can find these settings within the raspi-config setting.
- The game won’t load: Unfortunately, if a game won’t load, it’s likely it won’t load at all. However, some games require that you run a setup file first. Check the game directory to see if there is a setup file and if there is simply run setup within the DOSBox terminal (It may also be called install).
- Screen Size: If you want a larger screen then you will need to tinker with the DOSBox settings. Unfortunately, most old games were designed for low resolutions and will likely look terrible if forced to a full resolution.
I hope you have been able to get the Raspberry Pi DOSBox installed & configured. There is just so much fun that you’re able to have playing those classics a lot of us grew up with. If you do come across any problems, have feedback, want to share your favorite DOS Games or anything else then please be sure to leave a comment below.