Play Classic Games using DOSBox on the Raspberry Pi

In this tutorial, I go the through the steps of setting up Raspberry Pi DOSBox.

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.

Equipment

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.

Recommended

Optional

Video Tutorial

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.

Adblock removing the video? Subscribe to premium for no-ads.

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 update
sudo apt upgrade

3. To install, we only need to run one line.

sudo apt 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 /home/pi

mkdir ~/dos-games

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.

dosbox

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. I use the nano text editor for editing files in the terminal.

nano ~/.dosbox/dosbox-0.74.conf

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.

dosbox -startmapper

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.

key mapper

Installing Games

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.

Terminal

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/

GUI

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.

Playing Games

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.

dosbox

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.

c:

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

DOSbox Terminal


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.

Outrun DOSBox

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.

Troubleshooting

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.

9 Comments

  1. Avatar for mark
    mark on

    No sound? I got dosbox up and running, and have chess, outrun, and oregon trail running fine, but there’s no sound. I can play stuff through the audio out jack, but so far no game sound. I assume there are some midi settings I need to mess with since a lot of these old games used midi music.

    1. Avatar for Jakub
      Jakub on

      For The Lost Vikings I run timidity:
      timidity -iA
      and it makes the sound work

  2. Avatar for name
    name on

    Hi, I am unable to update and get dosbox. When I try to update it says, some index files failed to download. They have been ignored, or old ones used instead. And when I try to get dosbox it says E: Unable to fetch some archives, maybe run apt-get update or try with –fix-missing? Thanks

  3. Avatar for Alex
    Alex on

    I can’t access the config file.

    1. Avatar for Gus
      Gus on
      Editor

      Does it say the file can not be found or you don’t have correct permissions? Adding sudo will bypass the permission error however the file not being found is a bigger (It might be located in a different folder). If you’re still having problems I will reinstall on my Pi and see if can recreate the issue.

    2. Avatar for Mark
      Mark on

      I believe the path to the dosbox folder is missing a period in the article. I’m able to use

      nano ~/.dosbox/dosbox-0.74.conf

      (note the period added). It’s hidden too, so you wouldn’t see it in your home folder without knowing the full path.

    3. Avatar for Gus
      Gus on
      Editor

      Thanks Mark, that was the issue.

      I should also mention you need to run dosbox once for the config file to create.

      Have updated the tutorial to reflect these changes.

  4. Avatar for Bob
    Bob on

    Do you think there’s any way to get WordStar or XyWrite running? I miss those old word processors. I actually have licenses for them, just have to figure out how to access an old 5.25″ floppy.

  5. Avatar for Peter Wettergreen
    Peter Wettergreen on

    As an older computer user. I am so excited about this build. I grew up playing and writing DOS games. Lode Runner was the best of them all. I used to host a BBS (google it) where I hosted over 200 Lode Runner levels that you could download and play.

    Lode Runner was the first game where you could build you own levels. LOZIA (?) had a great manual (now called Wiki) that instructed you how to build and share levels.

    My eight year old son and the 13 year old in me are gonna love this!

    I would love to see Descent for Win 95 make a come back next.

Leave a Reply

Your email address will not be published. Required fields are marked *