Run MS-DOS on the Raspberry Pi
Use rpix86 to turn your Pi into a 1980s super-computer
16 minutes
Tip using Ko-fi or Buy Me a Coffee
What is DOS?
DOS was a semi-open standard that included a standard operating system for desktop computers in the 1980s and early 1990s. The hardware used Intel x86-compatible CPUs while the operating system for this architecture was DOS the Disk Operating System. Note that the DOS acronym also describes some incompatible and unrelated computer systems such the Apple DOS and Atari DOS.
As DOS was a primitive, text only operating system that was easy to reverse-engineer. Some companies made their editions of DOS and for the most part, they were all compatible with each other. The most common x86-edition of DOS was Microsoft‘s MS-DOS but IBM also had their PC-DOS as did Digital Research with DR-DOS.
MS-DOS was Microsoft’s precursor to its Windows operating system. In the 1990s many editions of Windows were simply a layer of software designed to load up after MS-DOS or later contained MS-DOS built-in.
Off the shelf x86-compatible hardware combined with the DOS operating system became the prominent computer gaming system in North America from the late 1980s until Windows 95. Other regions such as Europe preferred cheaper, propriety systems such as the 8-bit Commodore 64, Amstrad CPC, Sinclair Spectrum. Or the equally as expensive but more user-friendly 16-bit Atari ST and Commodore Amiga lines. In these parts of the world x86-compatible computers only became popular after the early 1990s.
How did DOS come to be?
DOS started out as a clone of the early microcomputer operating system CP/M by Digital Research. CP/M was created in 1973 to run on the Intel Intellec-8 development system which happens to be the first microcomputer sold in the USA.
By the end of the 1970’s CP/M was the most popular microcomputer operating system for professionals and business. Once IBM decided to enter this burgeoning market, they wanted to use CP/M on their future products, but they couldn’t come to an amicable agreement with Digital Research.
So IBM asked Microsoft to develop a clone of CP/M for their first microcomputer that they dubbed the Personal Computer or the PC. But at this early stage of its life, Microsoft had never developed an operating system but bluffed IBM to believe otherwise.
Microsoft discovered a small software company known as Seattle Computer Products who had an x86-compatible CP/M clone called 86-DOS. Microsoft signed a non-exclusive contract to market and distribute this operating system and on-sold it to IBM. Just weeks before IBM’s major PC public announcement Microsoft obtained near-exclusive rights for Seattle’s 86-DOS.
In August of 1981, IBM launched the IBM PC. A machine that brought mainstream attention to microcomputers and made them respectable in the eyes of the public. Every IBM PC sold was operating off a royalty-free copy of Seattle Computer Products 86-DOS operating system re-branded as PC-DOS.
IBM had always been a hardware company and believed there was little money in software. Apple to this day follows that same ethos. What IBM failed to realise was they had designed their machine with off the shelf parts that anyone could buy. The only thing other manufactures lacked to create their PCs was the operating system. But due to IBM’s non-exclusive operating system agreement. Microsoft was free to re-brand their version of IBM’s PC-DOS and to sell it to potential companies who wanted to make copycat IBM PCs. That small mistake by IBM launched Microsoft, who became one of the world’s largest companies.
Why DOS?
Many popular franchises, genres and software companies were first launched or popularised on DOS. Warcraft, Grand Theft Auto, Sid Meier’s Civilization, Monkey Island, X-Com, Need for Speed. The first person shooter, the graphic adventure, simulators, real-time strategy are some examples. So DOS would be well worth investigating for anyone who has an interest in retro-gaming from this era.
Why not DOS?
The DOS ecosystem has to be the most complicated and arcane mainstream gaming system of all time. The same openness that made it famous was also what made it so horrible to use.
Backwards compatibility was a significant benefit and selling point of the DOS ecosystem. But at the same time, it held it back and made it much more complicated than necessary. By the late 1980s, its text-based 1970s lineage was primitive and outdated.
Hardware support was complex. Often users had to manually change and configure their operating system for each item of software they ran. What unfortunately started off as a clean and straightforward for IBM in 1981, evolved into an unintended ad hoc open platform.
Worse was hardware driver support. For the most part, the new hardware had to be directly supported by software. It meant that a user’s existing game collection would often not support new equipment because it didn’t exist when the software was composed.
Finally, many game developers targeted the lowest common denominator hardware. It meant you could have had the latest and most expensive hardware that was underutilised or ignored by new release software.
Fortunately, much of this hardware complexity is now avoided when using software emulation such as rpix86 on the Raspberry Pi.






DOS today?
DOS is still in use on embedded systems that need a small and straightforward, text-only operating system. Today most of the DOS community centres around the open source FreeDOS that offers modern tools as well as legacy compatibility.
DOS on the Pi
At the time of writing in April 2013, the only acceptable DOS emulator for the Raspberry Pi is rpix86 by Patrick Aalto found at http://rpix86.patrickaalto.com.
What PC hardware does rpix86 emulate?
CPU: 80486 processor, including the protected mode features (for running DOS4GW games) but without virtual memory support. The emulation runs at a speed of around 20MHz 80486 (which equals a 40MHz 80386) machine. Memory: 640KB of low memory, 4MB of EMS memory and 16MB of XMS memory. Super-VGA graphics, with a maximum resolution of 640×480 with 256 colors. SoundBlaster 2.0 (including AdLib-compatible FM sounds) sound card.
This combined hardware could have belonged to a costly high-end PC in the very late 1980s. Or a more affordable and ordinary mid-range PC in the early 1990s. In that later era, the audio would have been the machine’s weakest point. The graphics and memory would have been very good while the CPU would have been average.
My article DOSBox Sound Emulation talks about the vast variety of audio options on the x86-compatible platform while DOSBox Graphic and Machine Emulation cover the array of graphics modes.
What operating systems does rpix86 support?
Unfortunately only the obscure 4DOS is supported by rpix86. 4DOS is a rather full-featured and complex edition of DOS created by a small company out of Germany. While it was great for daily users of DOS-based PCs back in the 1990s, it is overkill for our purposes of PC gaming emulation on the Pi.
4DOS downloads http://www.4dos.info/v4dos.htm
Raspberry Pi set up.
This guide assumes that a clean install of Raspbian is in use on the Raspberry Pi.
You can obtain Raspbian from http://www.raspberrypi.org/downloads A guide for installing Raspbian to an SD card for use with the Raspberry Pi is at http://elinux.org/RPi_Easy_SD_Card_Setup

Start your Raspberry Pi with a new install of Raspbian and at the Raspbian Raspi-config configuration tool do the following.
- First select Update to make sure you’re using the latest version of the configuration tool.
- Select Advanced Expand Filesystem, so the free space on the SD card is fully utilised.
- Select Localisation Options to set your Pi’s time zone and keyboard.
- Select Boot Options and set Desktop / CLI needs to be either Console or - Console Autologin otherwise rpix86 will not work correctly.
- Select Change User Password to change the default pi user password.
- Select to exit.
Now in the terminal if you ever need to return to Raspi-config.
sudo raspi-config
Now lets update Raspbian and any out-of-date software.
sudo apt update; sudo apt upgrade -y; sudo apt-get dist-upgrade -y
sudo reboot
DOS set up.
We are going to use a directory called /dos
located in our pi home directory /home/pi/
to store our rpix86 related files. For the commands shown below ~/
in Linux is treated a short-cut for the pi user home directory.
mkdir ~/dos
cd ~/dos
This /dos
directory will also double up for a mock hard drive that rpix86 will use for DOS.
Download the latest version of rpix86 the DOS emulator.
wget http://rpix86.patrickaalto.com/rpix86.tar.gz
Now uncompress and run rpix86. Please note that rpix86 will not work over a remote terminal connection such as SSH or Telnet.
tar -xf rpix86.tar.gz
./rpix86
Update: As of this September 2018 edit, rpix86 does not work correctly Raspbian Desktop as per this screenshot. The issue may need a fix from the author of rpix86 that was last updated in June 2015. I will update this post if this situation changes.

If rpix86 fails you may need to update the Raspberry Pi firmware.
sudo apt install rpi-update; sudo rpi-update
sudo reboot
When prompted, press Y to download the required 4DOS.COM command interpreter.
Once complete your Raspberry Pi should be running a DOS prompt.
Basics of DOS shell.
At its core, a DOS shell is mostly a self-contained program that allows commands to be run from a text prompt. It lets you interact with your computer’s file system and some hardware. By communicating with the file system, you can launch programs; move, copy or delete files and modify the directories.
The rest of the DOS operating system comes in the form of extra programs, applications and hardware drivers that usually reside in a subdirectory. These additions can vary between different releases and iterations of DOS.
DOS command prompt explained.
C:\>
C:
Is the active drive. In DOS each floppy, CD, DVD or hard drive is assigned its drive letter. The C: drive is usually reserved for the first hard drive while A: and B: are reserved for floppy drives.
\
Is the active directory. When a backlash is displayed, the active directory is at the root of the drive.
>
Is the beginning of the text prompt.
_
Is a blinking prompt that shows where the user’s typed input will display.
Commands.
Please run the following commands in the DOS prompt. Note that unlike Linux, DOS is not case sensitive.
List the current directory.
DIR
Display some basic 4DOS information.
4DOS
Clear the screen.
CLS
Make a new directory named TEST.
MKDIR TEST
Copy the file 4DOS.COM to the TEST directory.
COPY 4DOS.COM TEST
List the content of the TEST directory.
DIR TEST
Change the active directory to TEST.
CD TEST
Delete the file 4DOS.COM
DEL 4DOS.COM
Change the active directory to root.
CD\
Remove the directory TEST.
RMDIR TEST
You can use the Tab key to auto-complete the names of files and directories that exist in the active directory.
4d
Tab
You can cycle through previous commands typed at prompt by using the up and down arrow keys.
Quit rpix86.
EXIT
Dumb DOS names.
DOS uses the FAT file system. The legacy FAT16 file system was first introduced into MS-DOS 4.0 and applied through the late 1980s and early 1990s. It is dated but can still be read by modern operating systems.
Because of its age FAT and DOS has some particular but essential to know traits.
- In DOS file and directory names can be at most 8 characters long. An additional identifier extension can be given but that can only be up to 4 characters, and the first character must always be a period.
- File usage is identified by extensions, many of which are still in use today.
FILE.TXT
is a plain text document.FILE.MP3
is an MP3 audio track.FILE.AVI
is a video file.FILE.HTM
is a HTML document. DOS script files use the.BAT
(batch processing) file extension. Program files use.EXE
(execute) or the.COM
(command) file extensions. - Files and directories are case insensitive.
- The backlash
\
character is used to separate directory and file paths.
Fetch and use DOS software.
For the purposes of this article I will only use games sourced from the excellent DOS Game Archive. It only offers DOS software that is legal to distribute and use without payment.
Under the Copyright laws of many countries, copyright on software remains active until 50 or 70 years after an author’s death. It is designed to protect any potential long-term income and the resale value of a product.
The majority of dated, commercial computer software has no financial value and is usually long out of print. It is more apparent with software created for obsolete systems such as DOS. Copyright of this type is rarely defended by its owners and is unofficially known as abandonware.
While the act the downloading and use of abandonware is classed as piracy and is officially illegal. I do not see any serious legal or moral issues with downloading and using out of print, old commercial software. But you should use your judgement.
Where to get games?
You can find legal to download DOS shareware, freeware and public domain games at the DOS Game Archive http://www.dosgamesarchive.com.
To find abandoned but technically illegal to download DOS software, type DOS abandonware into Google and go from there.
DOS Demo 1 – LucasArts, Day of the Tentacle Demo
The surreal and funny Day of the Tentacle was a massive success for LucasArts in 1993. This non-interactive demonstration is easy to run and shows the old DOS low-resolution VGA graphics and SoundBlaster audio hardware at its best.
At the Raspbian Linux terminal prompt create the directory DOTTDEMO.
mkdir ~/dos/DOTTDEMO
Change the active directory to DOTTDEMO.
cd ~/dos/DOTTDEMO
Use wget to download the Day of the Tentacle demo from DOS Game Archive.
wget ftp://download.dosgamesarchive.com/tentacle.zip
wget http://image.dosgamesarchive.com/games/tentacle.zip
Uncompress the demo file using unzip
.
unzip tentacle.zip
Return to the /dos
directory and run rpix86
.
cd ..
./rpix86
Now in the rpix86 DOS prompt list the content of the DOS root to make sure the DOTTDEMO
directory exists.
DIR
Change the active directory to DOTTDEMO
.
CD DOTTDEMO
List the content of DOTTDEMO
but only display items that use the extension .EXE
which execute programs.
DIR *.EXE
Run the program DOTTDEMO.EXE
.
DOTTDEMO.EXE
Congratulations, hopefully, you have a working Day of the Tentacle demo.
To exit the demo press [Alt] X and follow the prompt.



DOS Demo 2 – Sierra Online, Space Quest 3.
From the early 1980s to the 1990s Sierra Online was all about pushing the envelopes of audio and visuals on the home computer. Space Quest 3 in early 1989 was certainly doing that on the PC. Unfortunately, but typical for the era, this demo requires a complicated set-up procedure.
At the Raspbian Linux terminal prompt create the directory SQ3DEMO
.
mkdir ~/dos/SQ3DEMO
Change the active directory to SQ3DEMO
.
cd ~/dos/SQ3DEMO
Use wget to download the Space Quest 3 demo from DOS Game Archive.
wget ftp://download.dosgamesarchive.com/spaceq3.zip
wget http://image.dosgamesarchive.com/games/spaceq3.zip
Uncompress the demo file using unzip.
unzip spaceq3.zip
Return back to the /dos
directory and run rpix86.
cd ..
./rpix86
Now in the rpix86 DOS prompt list the content of the DOS root to make sure the SQ3DEMO
directory exists.
DIR
Change the active directory to SQ3DEMO
.
CD SQ3DEMO
List the content of SQ3DEMO
but only display items that use the extension .EXE which are execute programs.
DIR *.EXE
Run the program INSTALL.EXE
to tell the demo of Space Quest 3 what hardware our DOS machine supports.
INSTALL.EXE
In the Sierra Game Setup/Installation Program.
Press Enter at the Sierra’s newest products .. notification.
Select EGA/VGA with RGB monitor.
Select AdLib Music Synthesizer Card.
Select IBM or IBM-compatible keyboard.
Press Enter at the NUMLOCK is OFF confirmation.
Select NO for the MicroSoft compatible mouse.
Press Esc to skip the install the game on your hard disk.
Press Enter at the Installation is complete prompt.
Back at the DOS prompt list the content of SQ3DEMO
but only display items that use the extension .BAT
which are script files. Many older Sierra games used batch script files to launch their programs.
DIR *.BAT
Run the batch script SQ3DEMO.BAT
to launch the Space Quest 3 demo.
SQ3DEMO.BAT
Welcome to Scenes From Space Quest III.
To exit press Esc to bring up the in-game menu and then select File > Quit.

Demo 3 – Windmill Software Digger
Next up is the simple Digger created by Windmill Software in 1983. The basic graphics and primitive audio were terrific compared to many early games designed for the original IBM PC machines of this era. This game looks to be inspired by the 1982 Universal arcade game Mr. Do! Currently, there are some audio emulation issues with this game when used on rpix86.
At the Raspbian Linux terminal prompt create the directory DIGGER.
mkdir ~/dos/DIGGER
Change the active directory to DIGGER
.
cd ~/dos/DIGGER
Use wget to download Digger from DOS Game Archive.
wget ftp://download.dosgamesarchive.com/digger.zip
wget http://image.dosgamesarchive.com/games/digger.zip
Uncompress the game file using unzip.
unzip digger.zip
Return back to the /dos
directory and run rpix86
.
cd ..
./rpix86
Now in the rpix86 DOS prompt list the content of the DOS root to make sure the DIGGER
directory exists.
DIR
Change the active directory to DIGGER
.
CD DIGGER
List the content of the directory DIGGER
.
DIR
Run the program DIGGER.EXE
.
DIGGER.EXE
Welcome to computer video gaming 1983 style. Use the arrow keys to control your character or to exit Digger press F10 a couple of times.

Demo 4 – Non-working Games
At the moment rpix86 is still an immature product, and your mileage for running the various software will vary. Some DOS software can be temperamental such as Epic MegaGame’s Zone 66 from 1993. It demands that we do not load any DOS XMS memory drivers, but currently we can not do this in rpix86.
At the Raspbian Linux terminal prompt create the directory ZONE66
.
mkdir ~/dos/ZONE66
Change the active directory to ZONE66
.
cd ~/dos/ZONE66
Use wget to download Zone66 from DOS Game Archive.
wget ftp://download.dosgamesarchive.com/zone66.zip
wget wget http://image.dosgamesarchive.com/games/zone66.zip
Uncompress the game file using unzip.
unzip zone66.zip
Return back to the /dos
directory and run rpix86.
cd ..
./rpix86
Now in the rpix86 DOS prompt list the content of the DOS root to make sure the ZONE66
directory exists.
CD ZONE66
List the content of ZONE66
but only display items that use the extension .EXE
which are execute programs.
DIR *.EXE
Run the program ZONE66.EXE
.
ZONE66.EXE

Disappointingly we receive an abort error message This program can not run with an XMS driver!!! because our DOS operating system is not configured correctly. As you can see gaming on PCs in this era often required more technical knowledge than today.
Fi
Well, that is it for this tutorial. I will continue to update this entry as new revisions of rpix86 are released for the Raspberry Pi. Feel free to ask any questions in the comments below.
Written by Ben Garrett