I installed DOSBox on my Raspberry Pi today so I could play one of my favorite childhood games: Ultima Underworld - The Stygian Abyss. You can learn more about this game on Abandonia. If you like what you see, follow this guide to set it up on your RPi and be instantly transported back in time with this 1992 retro classic.
- Raspberry Pi with Raspbian or similar installed
- Connected to a monitor, mouse, keyboard and speakers
- With network connectivity
So far I’ve been able to get a pretty clean game intro video sequence. Actual gameplay is a bit choppy still, which should improve on the Raspberry Pi 2 with its quad-core 900MHz processor.
Update 17 Jul 2015: The game runs great on the RPi 2 Model B running DOSBox from RetroPie with EmulationStation. Unlike RPi 1 Model B+ there’s no chop in the audio, and the video is smooth like butter. You may or may not want to set the Memory Split setting under Raspberry Pi Advanced Options to 512.
To play first you’ll need to install DOSBox on your Pi. To do so open a terminal emulator and use apt-get to install.
sudo apt-get update && sudo apt-get install dosbox
Once complete, test it out by executing
startx in the terminal and then running the DOSBox Emulator from Menu > Games in the GUI. If it opens and you see a dos prompt your in business.
Note: Attempting to run
dosbox from the console before starting the GUI may cause your Pi to freeze. If it does, disconnect and reconnect the power and complete the above step before continuing.
Get the game
Abandonia didn’t have a downloadable copy of Ultima Underworld 1 so I did a quick Google search and found a working copy of the game on an abandonware site called My Abandonware. Here’s the game download link. Go ahead and pull down a copy using the stock browser that came with your Pi’s GUI interface. Then unarchive it to the “dosprogs” directory created earlier.
Set a directory
You’ll want a place to store your DOS programs. DOSBox defaults to a directory called “dosprogs”, so let’s use that. Go ahead and create the folder to house your program archive.
mkdir ~/dosprogs # change to meet your needs
The result will be a folder called “dosprogs” in the home directory of the current user. If you’re logged in as Pi the folder will land under
/home/pi. This is where you’ll store your programs.
Overclock the device
The days of hardware turbo buttons are long gone. But that doesn’t mean you can’t get a little extra oomph out of your Pi micro computer anyway. Log-off the current GUI session and enable Turbo mode from the Overclocking section after running
sudo RPi-config from the terminal. You will be prompted to restart your machine if the settings took.
Once overclocked to Turbo mode (1000mhz on a RPi 1 Model B) you’re ready tweak the DOSBox configuration. It takes a little time to get right, expecially if you’re not used to it, so just be patient. The result will improve your gaming experience and is time well spent.
Upon installation of DOSBox my config was located at
/home/pi/.dosbox/dosbox-0.74.conf. I went ahead and made a back-up copy of the file before I started tweaking.
The config I used is designed to go fullscreen on start and maximize display real estate, as well as balance the amount of processing needs with video framerate and UI responsiveness without lagging the audio.
Tip: If you get stuck in full screen mode just press
Enter to toggle out.
If copying from my config, be sure to modify your monitor resolution (near the top) and
[autoexec] instructions (near the bottom) to set the correct folder containing the game downloaded earlier. Here’s a resolution cheet sheet to get you started. Refer back to the Download section above for the mount point if necessary.
Here’s an example
[autoexec] for the game you can drop into your config:
mount c /home/pi/dosprogs/ultima-underworld-the-stygian-abyss C: UW.EXE
Enable audio playback
If you’re using HDMI for video out from the Pi you may need to adjust your speaker settings to achieve audio. Run
sudo raspi-config from a terminal emulator and adjust the setting for audio from under Advanced settings. Then ensure you select
SoundBlaster Pro from the
INSTALL.EXE included with the game before running the main executable.
To arrive at the best setup for your config, once you have the video settings set the way you like them and the audio enabled, use the performance shortcuts to fine-tune the experience:
F7 decreases frameskip
F8 increases frameskip
F11 decreases cycle speed
F12 increases cycle speed
The value of each of the settings can be seen while DOSBox is in windowed mode. If launched from terminal within X the settings will be output back to the terminal window as they’re updated.
Once you find the settings which work best for you, set them in the configuration file. See the Special Keys on the DOSBox Wiki for additional keyboard shortcuts, including
F9 which is useful for quitting a game if it freezes during game play.
That’s a wrap
In the article we learned how to set-up the Raspberry Pi to play Ultima Underworld - The Stygian Abyss, one of my favorite games as a kid. And probably one of the best games ever made. As you look into the Orb you know it leads to Britannia…