DosBox for Linuxxcy快充网络
What is DOSBox?
It is an open source software that emulates a computer running MS-DOS. It uses the Simple DirectMedia Layer (SDL) which makes it very easy to port to different platforms. As a result DOSBox is available for a wide range of Operating Systems like Linux, Windows, Mac, BeOS etc.xcy快充网络
Installing DOSBox in Linux
If you are on Ubuntu, you can install it directly from the Software Center. For other Debian based systems in general, you can use sudo apt-get to install it. The command for it is as follows.xcy快充网络
$ sudo apt-get install dosbox
For other Linux flavours like RHEL, CentOS and Fedora, you can compile and install it from source as follows. Download the latest source file using following wget command.xcy快充网络
# wget http://kaz.dl.sourceforge.net/project/dosbox/dosbox/0.74/dosbox-0.74.tar.gz
Navigate to the directory in which the file was downloaded and run the following commands.xcy快充网络
# tar zxf dosbox-0.74.tar.gz
# cd dosbox-0.74.tar.gz
# ./configure
# make
# install
How to Use DOSBox
Once you start DOSBox, you’ll have to first mount the part of your system want to access inside DOSBox.xcy快充网络
mount <label> <path-to-mount>
To mount your whole Home directory as C, you can run the following command.xcy快充网络
mount C ~
Then type in <label>: If you have to mount the same directory and cd into the same location every time, then you can automate the whole process with the help of the DOSBox configuration file.xcy快充网络
This file is located in ~./dosbox directory. The name of the file will be dosbox-[version].conf where version is the version number of dosbox which you installed. So if you have installed version 0.74, you’ll run the following command:xcy快充网络
gedit ~/.dosbox/dosbox-0.74.conf
So, if you want your DOSBox to auto mount the home directory and go into~/TC folder every time DOSBox starts, you can add the following lines at the end of the configuration file.xcy快充网络
mount c ~
c:
cd TC
There are many more options available in the configuration file. For example, if you want DOSBox to always start in full screen mode you can edit and change the value of fullscreen parameter from false to true.xcy快充网络
Many other options and description of them is given in the configuration file itself. Also, if you want to add comments anywhere in the configuration file, you can do so by using the # character at the start of that particular line.xcy快充网络
Installing Few Games and Programmes
If you are a student of Computer Science in India then you must have used this at some point of time in your School or College. Although it is a pretty outdated compiler most Colleges still use it because of their inability to keep up with modern compilers.xcy快充网络
1. Turbo C++
Download the latest TC++ from the below link and extract it’s contents in your home directory.xcy快充网络
- http://turbo-c.soft32.com/
Now start DOSBox and run the following commands.xcy快充网络
mount c ~
c:
cd tc3
install
Change the source drive to C in the installation menu.xcy快充网络
Turbo C++xcy快充网络
Keep the directory for installation as the default one and start the installation procedure.xcy快充网络
Install Turbo C++xcy快充网络
After this, TC++ would have been installed in the location C:/TC. You can run it using the following commands.xcy快充网络
cd /TC
cd bin
tc
Start Turbo C++xcy快充网络
2. Wolfenstein 3D
It was one of the most popular first-person shooter game in the 90’s when it was released and is even today widely popular in the DOS games world. So if you want to have some vintage video game action, the steps to install it are given below.xcy快充网络
Download the zip file from the below link and extract its contents to your home directory.xcy快充网络
- http://www.dosgamesarchive.com/download/wolfenstein-3d/
Now start DOSBox and run the following commands.xcy快充网络
mount c ~
c:
cd wolf3d
install
Select C drive as the installation drive as shown in the screen-shot below.xcy快充网络
Wolfenstein 3Dxcy快充网络
Select the default directory for installation and press enter.xcy快充网络
Install Wolfenstein 3Dxcy快充网络
After this, Wolf3d would have been installed in the location C:/Wolf3d. Once inside the C:/Wolf3d directory, you can enter “wolf3d” to run the game.xcy快充网络
Start Wolfenstein 3Dxcy快充网络
3. MASM(Microsoft Macro Assembler)
If you want want to run assembly language code then you need an assembler like MASM or TASM (Turbo Assembler).xcy快充网络
Download the rar file from the below link and extract its contents to your home directory.xcy快充网络
- http://sourceforge.net/projects/masm611/
Now start DOSBox and run the following commands.xcy快充网络
mount c ~
c:
cd masm611/disk1
setup
Let all the files be installed to their default locations and select the Operating System in which you want your programs to run.xcy快充网络
MASMxcy快充网络
Once setup is finished, you can run asm files by running the following commands from the C:/MASM611/BIN directory.xcy快充网络
masm <filename>.asm
link <filename>.obj
<filename>
4. Prince of Persia
This was the first game that I played on a computer! It was very popular while I was growing up in the early 2000s in India. So if you too have fond memories like me of playing this game as a kid and would like to revive them, here are the instructions to install it in DOSBox.xcy快充网络
Actually, you don’t need to install it, you just need to download the zip file extract it somewhere and you can play the game in DOSBox directly by entering “prince” from that location. Here are the steps for it.xcy快充网络
Download the zip file from the below link and extract its contents to your home directory.xcy快充网络
- http://www.bestoldgames.net/eng/old-games/prince-of-persia.php
Now start DOSBox and run the following commands.xcy快充网络
mount c ~
c:
cd prince
prince
Prince of Persia Gamexcy快充网络
Reference Links
- DosBox Homepage
This was my very first article on Tecmint, so please feel free to comment about how you thought the article was and any suggestions if you have them for me. Also, you can post your doubts as comments if you run into some problem during installation of any game/program in DOSBox.xcy快充网络