Dosbox

From LQWiki
Jump to navigation Jump to search

DOSBox is a PC emulator with builtin DOS intended for running DOS Games primarily. The latest version 0.74 has already support for a lot of DOS games. DOSBox has extensive emulation for different kinds of hardware, such as GUS, VESA, IPX networking/modem connections over TCP. DOSBox is licensed under the GPL.

DOSBox emulates every CPU instruction, which gives it the advantage of running on non-i386 platforms. However, this also makes it much slower than i386-only emulators that use the CPU's compatability mode. On modern machines this is unlikely to be a problem, most DOS games were written for now ancient hardware.

Of course gaming is not the only thing what you can do with dosbox. You can run other dos exe or com programs also, use the norton commander and do batfile programing.

Install

To install dosbox, you can use your distribution's package manager to install the dosbox package. If you are unsure which Linux distribution you have installed, see the "See also" section below.

Usage

To start a DOS program, you first need to mount the directory that contains the program(s) you wish to run. Dosbox comes with the MOUNT command to mount directories on the filesystem. It's recommended you use a directory within your own "home" directory. The following example assumes you are using a directory located within your "home" directory.

Dosbox uses drive letters that you would have been used to with DOS. It also uses DOS commands to manipulate and list files and directories - see the "Tips and tricks" section below for more details.

The first step to launching your DOS program is to type dosbox at the command-line/terminal, to start Dosbox. Dosbox will open up in it's own window when running it from within a graphical environment, which will look much like another terminal window.

You then need to mount the directory on the filesystem that contains your DOS program(s), with something like the following;

mount c ~/my_dos_programs 

This will create a drive called "drive C" within Dosbox, where in this example the directory called my_dos_programs will be mounted to. Then type c: at the DOS prompt to change to "drive C". Then as in Linux, you can use the cd command to navigate to said directory and run your DOS program.

The final step is to type the name of the program's executable file and press ENTER, and your DOS program should launch.

Tips and tricks

Making the DOS program run in fullscreen

Once you have started your DOS program, you can use the ALT+ENTER keyboard combination to make the DOS program run in fullscreen (the plus sign is not a part of the keyboard combination). You can also make the Dosbox window fullscreen by using the same keyboard combination as well.

Some DOS commands

While some commands have the same name and do the same thing under both DOS and Linux, not all have the same names and do the same things.

The following table describes some of the Linux commands available and the equivalent DOS commands, although it is not a complete list.

Linux/UNIX command DOS command
ls -la dir/w
rm del
cp copy

See also

External links