Lately, I’ve been experimenting with DOSBox, which gives you a DOS environment perfect for reliving your old 80s and 90s PC games (including more than a few from my younger days 🙂 ). The application works perfectly on the Eee 701 (in my case, running Eeebuntu v3), and I have picked up a few tips and tricks which have helped me get that little bit more out of it.
So, let’s kick off…
1. Set up your DOSBox configuration file(s)
Whilst DOSBox often works perfectly well with default settings, you can set up a configuration file to tweak them as you want/need to. Perhaps the most useful option for me in general use is the AUTOEXEC.BAT section, which if you remember your DOS days, allows you to specify the command(s) you wish to run when the system starts up. I use this feature to mount the DOS files directory as drive C:, and switch to it automatically, so that DOSBox is ready to start gaming when it finishes “booting”.
You’ll note the tentative plural of “file(s)” above—yes, DOSBox can utilise any number of customised config files, which may be just what you need if specific games require specially-tweaked settings. Simply specify the config file on the command-line (possibly, along with the game you want to run with these settings), and you’re away.
But: what if you find it a hassle remembering the exact command-line syntax each time you want to run “Fussy Adventure Game 3”, particularly if you have a couple of other tasks to carry out to get it going?
Hold that thought a few moments longer…
2. Run DOSBox fullscreen
You can specify this option on the command-line or in the config file; however, I like to have the choice of activating fullscreen display when I’m ready for it. Thankfully, it’s easy to “toggle” between fullscreen and windowed DOSBox using the keyboard: the shortcut is Alt+Enter.
3. Mounting a “CD drive”
Last Christmas, I treated myself to an external USB CD/DVD drive, to use with my 701. It works perfectly well, and if you want to make your CD drive and its contents visible within DOSBox, no problem. Just enter
/media/cdrom0 at the DOSBox prompt (replacing
/media/cdrom0 if required, with the location of your CD drive in whatever OS you’re using).
However, you don’t even need to have a “real” physical CD drive, as you can tell DOSBox to mount any directory on your computer as a “virtual” CD-ROM (D: in DOSBox), by entering
/your/cd/directory (handy for those crotchety old games which insist on running off a “real” CD). This means that if you have plenty of drive space, you can copy the files off your old game CD-ROMs into their own directories, and mount these directories in DOSBox as you need them.
On the other hand, if you really want to “go the whole hog” when it comes to DOS game CDs in DOSBox, the next tip is for you…
4. Run CD-based games from CD ISO image files
(This tip is mostly for Linux and Mac users; I’m not sure how Windows folk would do the same thing, but then again, you may not need to if the “mounting directories as CDs” tip last time works fine for you.)
If you’re using Linux or Mac OS X, another option for accessing DOS game CDs without using the physical disc, is to create an ISO disk image of the CD, mount this image via the OS’ “loopback device“, and then assign the mounted ISO to a DOSBox drive letter. (If the above was mostly Greek to you, you may wish to skip the rest of the tip 😉 )
The following are the steps to set this up under Linux and Mac OS X. I’m naturally assuming that you have a legitimate copy of the game CD, and accept no responsibility for what may happen if you try this (though in purely technical terms, there’s no real risk that I am aware of).
- Insert the CD into your Linux computer or Mac, and open a terminal window.
- To create an ISO disk image file from the CD, enter the command
dd if=/dev/cdrom of=/path/to/yourcd.iso. You may have to change “/dev/cdrom” to the device name of your CD drive; also, you should amend the path and filename of your ISO file to your requirements (and ensure you have plenty of space on the filesystem where you create the file).
- Go and make a coffee (this will take a bit of time) 🙂
- Create a mountpoint (empty directory) where the ISO will be mounted (integrated into the filesystem). This is simply a case of creating a new directory; call it whatever you like.
- Enter the command
sudo mount -o loop -t iso9660 /path/to/yourcd.iso /path/to/your/mountpoint/directory, followed by your normal login password when prompted.
- If you don’t see any error messages, change into the “mountpoint” directory, and you should see the files on the CD-ROM (except they’re not on the CD, but being accessed from the mounted ISO image file).
- Now, launch DOSBox, and once this is ready, issue the command
mount d -t cdrom /path/to/your/mountpoint/directoryat the DOSBox command prompt. You should now have your “virtual CD” installed as drive D: in DOSBox.
As you can see, this method is quite involved, and you may find that simply copying the files verbatim onto your local drive and mounting that directory in DOSBox as a CD-ROM, will work just as well.
On the other hand, some DOS games from the 1990s relied on “low-level” hardware CD drive features to work properly. In such cases, you may need to combine mounting an ISO image as above, with DOSBox’s special CD-mounting options (type
intro cdrom in DOSBox to see these); see how you go.
5. Set up and run a game from a single script
Phew; that’s an awful lot of bother, isn’t it? Who wants to have to go through all those steps, just to run a particular old DOS favourite? Wouldn’t it be great if all this could be automated?
At this point, many readers are probably thinking, if not calling out: “Write a
bash script!” 🙂
All this means at its simplest, is that you create a text file listing all the commands you want to run, in sequence (perhaps interspersed with the odd line telling you what’s going on), and set it so that you can run it like any other program. I haven’t got around to assembling one of these for a DOSBox game (in case you were hoping I’d show you how to do it), so until I do, you’ll have to work it out for yourself…
Anyway, I hope that at least some of these tips were of use to you if you’ve tried DOSBox, and that you enjoy a trip down Ye Olde Memorye Layne just like me!