Friday, June 13, 2014

How to use DOSBox in different plataforms

About


DOSBox is an x86 emulador with DOS that allows us to run any old application for DOS (like games) in the most moderns operating systems like Windows, Linux, MacOS X and others. The project DOSBox is totally free and open source. 

More information about this can be found at DOSBox official page.

Table of Contents

  1. Instalation
    1. Installing DOSBox under Windows plataform
    2. Installing DOSBox under Linux plataform
    3. Installing DOSBox under Mac OS X plataform
  2. Using DOSBox
  3. Configuring DOSBox
    1. KeyMapper
    2. Cycles

1 - Installation


1.1 - Installing DOSBox under Windows plataform


Basically, you just need to download the WIN32 installer from DOSBOX Official Download Page. I suggest you download the least version of the application, because is probably more compatible with the game which you want to play. With you want to know more about DOSBox game compatibility, check DOSBox Compatibility List

Note: The instalation process described in this tutorial is refered from version 0.74 on Windows 8.1 x64. If you are installing a previous or a future DOSBox version the images can be different.

After download, execute the installer. You should see a window like that, Just click in next button.


Now you can choice the components to install, just select all components and click in next button.


Now just define the destination folder, in other words, where the software will be installed.


Click on the install button do start the process, it must be fast depending of your hardware.


And when it finishes just click on close button.


An icon should have been placed on your desktop, just run it. 

1.2 - Installing DOSBox under Linux plataform


Installing DOSBox under linux environment depends of the target distribution which you want to install. 

For Ubuntu


If you are using Ubuntu, DOSBox can be downloaded through the software center, like is show on following image sequence.


Open the Ubuntu Software Center.


In the Software Center, use the search tool and type Dosbox. Probably it will find the result which we want. Click on the result and a install button will appear and now just click on it.


Now the software will be installed and when it finishes you just need to execute DOSBox program (On Ubuntu 13.10 an icon was placed in the task bar).


Now DOSBox is installed on machine and is ready to be used.

For another Debian based systems


If you are using another distribution based in Debian, you also can use apt-get command to download DosBOX.


Note: You need to be root user to use apt-get command on linux terminal. To change to root user use the sudo su command and after type your root password.

On the image above, I used the apt-get command to download DOSBox. The prompt warn me about hard disk space after the operation and asked if I want to continue. Type 'y' and the installation will begin.



When the installation process finishes, the terminal control will be back for you.


Now the software is installed on your system. Just type dosbox on prompt and press enter.


Now it already can be used.

For other linux distributions


For other Linux distributions you can compile and install it from source. Just go to directory where the file with extension .tar.gz was downloaded and run the following commands. 

# tar zxf dosbox-0.74.tar.gz
# cd dosbox-0.74.tar.gz
# ./configure
# make
# install


1.3 - Installing DOSBox under MacOS plataform


On MacOS X you just need to download .DMG file from the source. Mount the image and have fun!

2.0 - Using DOSBox


Note: The configuration and using process described in this tutorial is referred from version 0.74 on Windows 8.1 x64. If you are installing a previous or a future DOSBox version the images and the process can be different. The process is the same for other operating systems, except for small changes in the mounting process.

When you start DOSBox you should see a window like the following image.



This is the basic DOSBox front-end. Now you're able to run DOS commands like if you were in a real DOS prompt. When the program is started one, drive (Z:) is already mounted. To acess files from your hard disk like games and another softwares, first you need mount the drive.

Before we start with the mounting process I really suggest you keep your games organized in a easy access directory like i did in the following image.


How I have a partioned hard disk, i keep my personal files in B: drive unit, but it doesn't matter because DOSBox is able to emulate any drive unit. So, all of my DOS games are in B:/Games/Dos/ and it is the directory which i want mount on DOSBox. To perform this action, we will need to use the mount command on DOSBox prompt as the following image shows.


The mount command has a lot of parameters, but in your simple form the syntax is:

> mount drive_letter directory_path


Where mount is the command, drive_letter is driver identification about the directory which we are mounting (it can be any letter of a-z) and at last, directory_path is the reference to the directory to mount.

Note: You can mount several directories at the same time.

If all are right, when you run the command, you will see a message saying that drive has been mounted at local directory. To proceed now you just need access the mounted drive. Type the driver_letter which you used on mounting process followed by colon and press enter. The image below shows the process.


Now, we're in. Using the dir command we will list all contents in the current directory.


Look, all of my games which i had put on the folder are here. Now, to navigate into the directores we just need to use the command cd. For example, i will access the heartlight's folder which is abbreviated with ~1.




I'm inside the heartlight's folder. Using dir command again i can list all directory contents.

Note: If you want back to previous directory you can use the command "cd..".





I know the game executable is a file with .exe extension and in this case hl.exe is the answer. To open an executable file you just need to type the file name and press enter.

Note: You don't need to type the filename with the .exe extension to execute it, but if you do the effect will be the same.



I executed the hl.exe and the game started to load.


Now i'm able to play! :3


3.0 - Configuring DOSBox


Is important to know some functionalities on DOSBox to enhance the experience.

3.1 - KeyMapper


If you press CTRL-F1 on DOSBox, you will see something like that.


DOSBox enables you to modify your hot keys. It should be useful for some features. On this session, I will show to you how to change the hotkey for fullscreen feature.

First we need to select the feature which we want change, as the image below shows.



Press Del button to remove the last hot key bound for this function and after press Add. DOSBox will ask you to press the new hotkey.



Now I will press the numpad + key. But you can attach any other key of your preference. After just press Save button and Exit. You will back to the prompt and your hotkeys changes will be in effect.

3.2 - Cycles


Note: The current Cycles are shown on DOSBox window title.

If the game or application are running slower, you can adjust the core cycles to be more fast. By default, DOSBox cycles start at 3000. You can adjust the cycles using the CTRL-F11 and CTRL-F12 to increase and decrease cycles respectively. On my experience, i always used 20000 cycles and I never got any problems with this.

1 comment:

  1. Thanks for the tutorial. I actually tried to run some old DOS games through DOSbox but never managed to get them to run properly on my system. So nowadays I usually stick to playing them in a browser.

    ReplyDelete