Parent: Games

What is DOSBox?

DOSBox is a free, open-source cross-platform MS-DOS emulator that uses the SDL library. It emulates CPU:286/386 realmode/protected mode, Directory FileSystem/XMS/EMS, Tandy/Hercules/CGA/EGA/VGA/VESA graphics, and SoundBlaster/Gravis Ultra Sound cards. Thus, it is possible to run many programs originally written for MS-DOS in Linux with DOSBox.

The emulator has been largely developed for use with old games, but it may be possible to use DOSBox to run other MS-DOS applications. The DOSBox project maintains a list of compatible games.

To run more recent applications developed for Windows, use Wine.

Installation

You will need to enable the Universe repositories (see AddingRepositoriesHowto), update, and install the dosbox package.

Running DOSBox

Starting DOSBox

DOSBox can be run from a terminal by simply typing  dosbox .

This will open up what looks like another terminal window, with a  Z:\  prompt. This is DOSBox.

Running MS-DOS Programs inside DOSBox

Mounting Drives and Directories: The " mount " command

Seeing a  Z:\  where one might have expected to see  C:\  or even  A:\  will seem strange to those familiar with MS-DOS and command.com.

DOSBox does not have a  C:\  drive enabled by default. To give it one, we must mount one onto the virtual machine.

In practice, this means we must create a directory which can serve as a virtual  C:\  drive for DOSBox.

( N.B. In the following examples, and throughout this document, we are assuming a user named "wikiuser". Replace that user-name with yours. )

In a regular terminal, (NOT DOSBox), you can execute

 $ mkdir -p ~/dos/c 

which will create the  /dos/c  directory in your home directory. To have DOSBox use this as its  C:\  drive, execute the following command in DOSBox:

mount c /home/wikiuser/dos/c 

This makes the contents of  ~/dos/c/  the contents of the virtual  C:\  drive in DOSBox. You can now run any DOS programs in that directory in DOSBox. If those DOS programs are self-contained executables, it's enough simply to copy them onto a suitable sub-directory in  ~/dos/c  and run them within DOSBox. For other programs, you may need to run their installers. Consult the compatibility list for details for each one.

It is also possible to mount removeable disks in this way; simply specify the path to the removeable disk instead.

For a more technical discussion of the mount command in DOSBox, consult the manual page for that command.

Note that many of the examples on the official DOSBox will seem to be specific to MS-DOS or Windows. Where you see a Windows-type path like  C:\OLDGAMES  , simply read a Linux-style path. The result of the commands should be the same.

Mounting Disk Images: the " imgmount " command

It is also possible(and in many cases desireable) to mount disk images in DOSBox, using the  imgmount  command.

Most commonly, this is used to mount CD-ROM images. To mount a CD-ROM image in DOSBox, execute the following command in DOSBox:

 imgmount d /path/to/cd/image.iso -t iso 

This will mount an .iso to the DOSBox virtual machine as a CD-ROM.

A more technical discussion of the imgmount command can be found at its manual page

Note that many of the examples on the official DOSBox will seem to be specific to MS-DOS or Windows. Where you see a Windows-type path like  C:\OLDGAMES  , simply read a Linux-style path. The result of the commands should be the same.


CategoryGames

DOSBox (last edited 2013-10-16 20:27:47 by 214)