The Developer's Tidbit

February 26, 2008

DOSBox Keys and Functions

Filed under: dosbox — Ben @ 8:18 am
Tags: , , , , ,

DOSBox has a number of specialised function keys that can be used to quickly adjust the program features at any time during its operation. Either when in a DOS command prompt, when running a full screen program or playing a full screen game. I will list all the function key combinations and their usage.

Full Screen Mode

Like any Windows application you can switch DOSBox between Windowed and full screen mode by using the ALT-ENTER key combination.

Pausing

DOSBox can be paused at any time by pressing ALT-Pause. Once paused, you can resume your activity by repeating the same combination.

Rescan / Update Directory Cache

In the previous tutorial I spoke about the need of using the rescan prompt command. This is needed whenever a drive, folder or file used by DOSBox was changed externally, such as by Windows My Computer. Instead of typing rescan at prompt you can also use the CTRL-F4 key combination to update the cache on all your DOSBox mounted drives and images.

Movie Recording *

DOSBox has the ability to record directly to a movie file. By default the movie file will be stored in the capture sub-directory within the DOSBox program directory. There is a shortcut to this listed as Capture folder which is in the DOSBox folder within Windows start menu.

To initiate recording you press the CTRL-ALT-F5 combination. To stop recording, you press the same combination again.

When engaged DOSBox will create an AVI movie, including any audio using the ZMBV (Zip Motion Blocks Video) codec. It will be named based on the active DOS program’s file name that is currently active. While the movie recording is designed mainly for recording games and demos, you can also use it to record DOS prompt activity.

To successfully record a DOSBox movie you must first make sure you have installed the ZMBV codec to your computer. Again, Vista users should run the codec install shortcut using the ‘Run as Administrator’ option.

dosbox install movie codec

Screenshot Capture *

You can save a screenshot of DOSBox’s content at anytime by using the CTRL-F5 combination. All captures will be stored in the default DOSBox captures directory. This can be found through a shortcut listed as Capture folder within the DOSBox Windows start menu folder.

Audio Recording *

CTRL-F6 will engage audio recording for DOSBox. You can initiate this at any time, even when there is no audio output from DOSBox. All audio will be recorded and saved as a standard WAV file and stored in the default Capture folder. The WAV audio format is uncompressed and widely supported. So you can easily use any audio converter program to compress and convert the audio into any format you wish, including MP3.

If you are looking for an audio converter, most popular CD-DVD burning packages include some form of audio conversion tool.

In Roxio Creator you can use the Sound Editor’s export function, while Nero has the included WaveEditor program. The free and open sourced Audacity would be another popular choice.

Quit, Exit or Kill

At anytime in full screen or windowed mode you can terminate the DOSBox application by using the CTRL-F9 combination.

Speed Adjustment

By default DOSBox will automatically detect and adjust its emulated speed to the DOS program it is running. Occasionally it gets this timing measurement wrong so DOSBox gives you the option to manually tweak the speed the speed settings.

CTRL-F11 will slow down the emulation
CTRL-F12 will speed up the emulation

ALT-F12 will remove all speed restrictions imposed by the emulation

Restoring your Mouse

Occasionally you will run a DOS program that has inbuilt mouse support. Many newer adventure games fall into this category. If a program supports the mouse, DOSBox automatically locks your mouse into its program window for exclusive usage. If you wish to restore the mouse back to general Windows usage press CTRL-F10.

 

* Note, Windows Vista users will need to run DOSBox using the ‘Run as administrator’ if you wish to record or capture. You can find this option by right clicking the DOSBox program shortcut in Windows start menu.

dosbox run as admin

February 17, 2008

DosBox Beginners, Newbie and First Timers Guide

Filed under: dosbox, windows — Ben @ 10:02 am
Tags: , , , , ,

DOSBox is a great little and easy to use virtualization program designed to run old DOS applications under modern operating systems. This tutorial assumes you have a little understanding of the basic DOS commands and the use of a command line.

This tutorial will be designed for Windows users, though DOSBox does work on other operating systems such as Linux and …

Download DOSBox from their website (http://www.dosbox.com)

Run and install the newly downloaded DOSBox program. Follow all the defaults if you don’t understand any of the questions or prompts.

Once installed, you should have a new DOSBox entry in your Windows Start Menu.

Capture folder is where
DOSBox stores all it’s screen and video captures.

DOSBox.conf is a text based INI file containing all of it’s settings. It’s human readable.
DOSBox is a shortcut to start the application. By default it loads up a partner information console which is useful for troubleshooting.
DOSBox (noconsole) runs the program without the extra console window. If DOSBox crashes thanks to a DOS program you are running, it will be harder to trace
the problem.
README is the DOSBox instruction manual in plain text format.
Uninstall removes DOSBox from your computer.
Video is a directory containing the shortcut Install Movie Codec. This will enable you to view the DOSBox video captures under Windows Media Player, but if your not intending to capture videos. Then there is no need to run this.

To edit DOSBox’s settings you need to click on the DOSBox.conf shortcut. This is automatically linked to and will open under Windows Notepad. If you are using Windows Vista you will need to right-click the shortcut and Run as administrator. Otherwise you will not be able to save any changes you make.

Within the file you will set lots of different lines and settings, most of which contain short descriptions. All the lines that start with a hash (#) are commented out lines that DOSBox ignores. Scroll down to the very bottom of the file and you should encounter [autoexec]. This is where you will type and save commands that DOSBox will automatically instigate every time it starts up.

Somewhere on your computer you will need to create a directory that DOSBox will use for it’s virtual hard drive. You will be able to copy files and folders into this directory and DOSBox will be able to access it. If you don’t know what this all means, then we will do a simple exercise to show you.

Goto My Computer in your Windows Start Menu (this is just Computer in Windows Vista)
Double-click your Local Disk (C:)
Right-click on
the whitespace within the window but make sure no folders or files are selected.
Select New and then Folder
Rename the newly created folder to DOS Hard Disk

Return back to Notepad that is opened with dosbox.conf. Under [autoexec] on a new line add the following.
mount C “C:\DOS Hard Disk\”
c:

The first line tells DOSBox to mount your directory C:\DOS Hard Disk\ as a virtual hard disk with the drive letter of C:
The c: tells DOSBox to automatically goto your newly created c: drive.

Save your file in Notepad (File > Save).

Now run DOSBox.

You should see something not unlike this. Thanks to our changes to the dosbox.conf file DOSBox has automatically mounted the directory and used it as a pseudo hard drive.

Now you are running a simulated DOS prompt. In DOS to list the content of your hard drive you use the command dir which is probably short for directory list.

Currently this shows the C: drive is empty.

Open My Computer from your Windows start menu and goto your DOS Hard Disk folder located on your C: drive. Create a new directory and name it anything you want.

Now if you return to DOSBox and type dir, your C: drive will still list your DOS hard disk as empty. DOSBox caches the drive on startup. So every time you make a file or directory change outside of DOSBox you need to refresh the cache using the rescan command.

Now download the file vgaseasn.zip (http://www.civbox.com/blog/vgaseasn.zip). It’s an old DOS VGA Christmas card demo created by Sierra Online back in the early 1990’s. Once downloaded, copy the file into your C:\DOS Hard Disk\ directory and then unzip (decompress) it.

Using the DOSBox prompt rescan and then dir. You should see the newly created VGASEASN directory. To enter the directory use CD VGASEASN, once in use dir to list the files within. Using the dir *.bat will list only the files with the BAT file extension. In DOS most games either used a file with a BAT (batch file), COM (command file) or more commonly an EXE (execute program) extension to start the program. Using dir *.EXE you will see two files listed INSTALL.EXE and SIERRA.EXE.

Run the INSTALL.EXE by typing INSTALL [enter]. It should run and a Sierra On-Line Game Install/Setup Program dialog should appear. Press [enter] to skip the dialog and you’ll goto a menu titled Installation Choices. There you will have a list of hardware selections, using your keyboard arrow keys move up to Graphics : VGA and press [enter].

You can see here that the Sierra On-Line installation program, under DOSBox has detected oth VGA and EGA graphic cards. Make sure VGA 256 colors is selected and then press [enter]. Return to the previous menu and scroll down to and select Music: .

Here you can see the Sierra install program detects a number of music cards that is emulated by DOSBox. [ESC] to return to the previous menu and then select Speech : . Again you will see a number of audio options available under DOSBox.

Now quit the install program by pressing [ESC] until you receive a red prompt asking you to exit. Back at the DOSBox prompt, type SIERRA. If everything goes well you will be greeted with an animated Christmas card. You can quit the program anytime by pressing [ESC]. Go back to the INSTALL program and play around with the graphic, music and sound options to see the effects.

Enjoy, I will have more tutorials in the future covering the functions and operations of DOSBox.

Blog at WordPress.com.