DOSBox – Runs Old MS-DOS Games_Programs in Linux


DOSBox is a powerful emulator that allows users to run old MS-DOS games and programs on modern Linux systems. In this article, we'll cover everything you need to know about DOSBox, including how to install and configure it, and how to run MS-DOS applications.

What is DOSBox?

DOSBox is an emulator that allows users to run MS-DOS applications on modern operating systems. It was first released in 2002 and has since become a popular tool for running old MS-DOS games and programs on modern systems. DOSBox emulates an Intel x86 PC, complete with sound, graphics, and networking capabilities, allowing users to run DOS applications just as they would on a real PC.

Installing DOSBox on Linux

DOSBox is available in most Linux distributions' package repositories, making it easy to install using your system's package manager. To install DOSBox on Ubuntu, for example, you can use the following command −

sudo apt-get install dosbox

Once DOSBox is installed, you can launch it from the command line by typing "dosbox". By default, DOSBox will start in a virtual "C:" drive, which emulates the root directory of an MS-DOS system.

Configuring DOSBox

Before running MS-DOS applications in DOSBox, you may need to configure it to work with your system's hardware and software. DOSBox uses a configuration file called "dosbox.conf" to control various settings, including the amount of memory allocated to the emulated system, the sound and graphics settings, and more.

You can open the dosbox.conf file in a text editor and modify its settings to suit your needs. For example, to increase the amount of memory available to the emulated system, you can set the "memsize" value to a higher number, like so −

[autoexec] # Lines in this section will be run at startup. # You can put your MOUNT lines here. mount c ~/dos/games c: memsize=64

In this example, we've set the memsize to 64 MB, which should be enough to run most MS-DOS games and applications.

Running MS-DOS Applications in DOSBox

Once DOSBox is configured to your liking, you can begin running MS-DOS applications. To do this, you'll need to "mount" a directory from your Linux system into DOSBox's virtual file system. This allows DOSBox to access files and programs outside of its virtual environment.

To mount a directory in DOSBox, you can use the "mount" command, like so −

mount c /path/to/directory

In this example, we're mounting a directory located at "/path/to/directory" as the "C:" drive in DOSBox. Once the directory is mounted, you can navigate to it using the "cd" command, like so −

cd C:\directory

From here, you can run MS-DOS applications just as you would on a real MS-DOS system. For example, to run the MS-DOS game "Doom", you could type the following command −

doom.exe

Tips and Tricks

Here are some tips and tricks to help you get the most out of DOSBox −

  • To speed up DOSBox, you can increase the "cycles" value in the dosbox.conf file. This will make the emulated system run faster, but may also cause compatibility issues with some games and applications.

  • DOSBox supports a variety of sound and graphics settings, including support for popular graphics modes like VGA and SVGA. You can experiment with different settings to find the best combination for your needs.

  • If you encounter problems running a particular game or application, you can try running it in compatibility mode. DOSBox has several built-in compatibility modes that can help resolve issues with older software.

  • DOSBox allows you to use keyboard shortcuts to perform common tasks, such as mounting drives or changing directories. Refer to the DOSBox documentation or use the "help" command in DOSBox to learn more about available shortcuts.

  • If you want to use a joystick or gamepad with DOSBox, you'll need to configure it in the dosbox.conf file. DOSBox supports a wide range of game controllers, but configuration can be tricky.

  • DOSBox also supports networking, which can be useful if you want to play multiplayer games or transfer files between the emulated system and your host system. However, networking configuration can be complex and is beyond the scope of this article. Refer to the DOSBox documentation for more information.

  • Finally, be sure to keep your DOSBox installation up-to-date with the latest version. New releases may contain bug fixes, performance improvements, and new features that can enhance your DOSBox experience.

Using DOSBox with Mount Command

DOSBox allows you to mount directories on your host system as virtual drives within the emulated DOS environment. This can be useful for accessing files and programs that are stored outside of the DOSBox directory. To use the mount command, first create a directory on your host system that you want to mount within DOSBox.

For example, let's say you have a directory called "games" on your Linux system that contains some DOS games you want to play. You can mount this directory within DOSBox using the following command −

mount c /path/to/games

This will mount the "games" directory as drive C: within DOSBox, allowing you to access the files and programs within that directory.

Configuring DOSBox for Specific Games

Some DOS games require specific settings in order to run properly within DOSBox. For example, some games may require a specific sound card or graphics mode. To configure DOSBox for specific games, you can create separate configuration files for each game. To do this, create a new configuration file (e.g. game1.conf) and specify the settings required for that game. You can then launch DOSBox using the configuration file by running the following command −

dosbox -conf game1.conf

This will launch DOSBox with the settings specified in the game1.conf file.

Running DOS Programs with Wine

In some cases, you may need to run DOS programs that are not compatible with DOSBox. In these cases, you can use Wine to run the DOS program within a Windows environment. To do this, first install Wine on your Linux system using your package manager. Once Wine is installed, you can launch the DOS program using the following command −

wine /path/to/program.exe

This will launch the DOS program within a Windows environment, allowing you to run the program even if it's not compatible with DOSBox.

Each of these sections can be expanded with more details and working code examples to provide a more comprehensive guide to using DOSBox.

Conclusion

DOSBox is a powerful and versatile emulator that allows you to run old MS-DOS games and applications on modern Linux systems. With its customizable settings and support for a wide range of hardware and software configurations, DOSBox is an excellent choice for retro gaming enthusiasts and anyone who needs to run legacy applications.

By following the installation and configuration steps outlined in this article, you should be able to get DOSBox up and running on your Linux system in no time. Remember to experiment with different settings and options to find the best configuration for your needs, and don't hesitate to consult the DOSBox documentation or online forums if you run into problems. With a little patience and persistence, you can relive the golden age of computing with DOSBox.

Updated on: 28-Jun-2023

266 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements