The Developer's Tidbit

February 17, 2008

DosBox Beginners, Newbie and First Timers Guide

Filed under: dosbox, windows — Ben @ 10:02 am
Tags: , , , , ,

DOSBox is a great little and easy to use virtualization program designed to run old DOS applications under modern operating systems. This tutorial assumes you have a little understanding of the basic DOS commands and the use of a command line.

This tutorial will be designed for Windows users, though DOSBox does work on other operating systems such as Linux and …

Download DOSBox from their website (http://www.dosbox.com)

Run and install the newly downloaded DOSBox program. Follow all the defaults if you don’t understand any of the questions or prompts.

Once installed, you should have a new DOSBox entry in your Windows Start Menu.

Capture folder is where
DOSBox stores all it’s screen and video captures.

DOSBox.conf is a text based INI file containing all of it’s settings. It’s human readable.
DOSBox is a shortcut to start the application. By default it loads up a partner information console which is useful for troubleshooting.
DOSBox (noconsole) runs the program without the extra console window. If DOSBox crashes thanks to a DOS program you are running, it will be harder to trace
the problem.
README is the DOSBox instruction manual in plain text format.
Uninstall removes DOSBox from your computer.
Video is a directory containing the shortcut Install Movie Codec. This will enable you to view the DOSBox video captures under Windows Media Player, but if your not intending to capture videos. Then there is no need to run this.

To edit DOSBox’s settings you need to click on the DOSBox.conf shortcut. This is automatically linked to and will open under Windows Notepad. If you are using Windows Vista you will need to right-click the shortcut and Run as administrator. Otherwise you will not be able to save any changes you make.

Within the file you will set lots of different lines and settings, most of which contain short descriptions. All the lines that start with a hash (#) are commented out lines that DOSBox ignores. Scroll down to the very bottom of the file and you should encounter [autoexec]. This is where you will type and save commands that DOSBox will automatically instigate every time it starts up.

Somewhere on your computer you will need to create a directory that DOSBox will use for it’s virtual hard drive. You will be able to copy files and folders into this directory and DOSBox will be able to access it. If you don’t know what this all means, then we will do a simple exercise to show you.

Goto My Computer in your Windows Start Menu (this is just Computer in Windows Vista)
Double-click your Local Disk (C:)
Right-click on
the whitespace within the window but make sure no folders or files are selected.
Select New and then Folder
Rename the newly created folder to DOS Hard Disk

Return back to Notepad that is opened with dosbox.conf. Under [autoexec] on a new line add the following.
mount C “C:\DOS Hard Disk\”
c:

The first line tells DOSBox to mount your directory C:\DOS Hard Disk\ as a virtual hard disk with the drive letter of C:
The c: tells DOSBox to automatically goto your newly created c: drive.

Save your file in Notepad (File > Save).

Now run DOSBox.

You should see something not unlike this. Thanks to our changes to the dosbox.conf file DOSBox has automatically mounted the directory and used it as a pseudo hard drive.

Now you are running a simulated DOS prompt. In DOS to list the content of your hard drive you use the command dir which is probably short for directory list.

Currently this shows the C: drive is empty.

Open My Computer from your Windows start menu and goto your DOS Hard Disk folder located on your C: drive. Create a new directory and name it anything you want.

Now if you return to DOSBox and type dir, your C: drive will still list your DOS hard disk as empty. DOSBox caches the drive on startup. So every time you make a file or directory change outside of DOSBox you need to refresh the cache using the rescan command.

Now download the file vgaseasn.zip (http://www.civbox.com/blog/vgaseasn.zip). It’s an old DOS VGA Christmas card demo created by Sierra Online back in the early 1990’s. Once downloaded, copy the file into your C:\DOS Hard Disk\ directory and then unzip (decompress) it.

Using the DOSBox prompt rescan and then dir. You should see the newly created VGASEASN directory. To enter the directory use CD VGASEASN, once in use dir to list the files within. Using the dir *.bat will list only the files with the BAT file extension. In DOS most games either used a file with a BAT (batch file), COM (command file) or more commonly an EXE (execute program) extension to start the program. Using dir *.EXE you will see two files listed INSTALL.EXE and SIERRA.EXE.

Run the INSTALL.EXE by typing INSTALL [enter]. It should run and a Sierra On-Line Game Install/Setup Program dialog should appear. Press [enter] to skip the dialog and you’ll goto a menu titled Installation Choices. There you will have a list of hardware selections, using your keyboard arrow keys move up to Graphics : VGA and press [enter].

You can see here that the Sierra On-Line installation program, under DOSBox has detected oth VGA and EGA graphic cards. Make sure VGA 256 colors is selected and then press [enter]. Return to the previous menu and scroll down to and select Music: .

Here you can see the Sierra install program detects a number of music cards that is emulated by DOSBox. [ESC] to return to the previous menu and then select Speech : . Again you will see a number of audio options available under DOSBox.

Now quit the install program by pressing [ESC] until you receive a red prompt asking you to exit. Back at the DOSBox prompt, type SIERRA. If everything goes well you will be greeted with an animated Christmas card. You can quit the program anytime by pressing [ESC]. Go back to the INSTALL program and play around with the graphic, music and sound options to see the effects.

Enjoy, I will have more tutorials in the future covering the functions and operations of DOSBox.

5 Comments »

  1. KIck ass. You made that easy. Thanx.

    Comment by DC — June 13, 2008 @ 3:18 pm | Reply

  2. hi just run thru this, it was going well untill it said “this program must be run under win32″ can u help me please thankyou

    Comment by matt — May 17, 2009 @ 8:57 am | Reply

    • you need to provide a little more information then just a generic error message. such as what operating system you are trying to run dosbox under.

      Comment by Ben — May 17, 2009 @ 8:54 pm | Reply

  3. my dosbox is not responding, i am trying to play wolf 3d

    Comment by ted — July 29, 2009 @ 1:45 am | Reply

    • I am not really a per-game troubleshooter. But Wolf 3D does work fine under DOSBox.

      Comment by Ben — July 30, 2009 @ 6:04 am | Reply


RSS feed for comments on this post. TrackBack URI

Leave a comment

Blog at WordPress.com.