Difference between revisions of "Emulator:DOSBox"
Line 1: | Line 1: | ||
'''The ''Right'' Way to Configure Wah!Cade for DOSBox''' | '''The ''Right'' Way to Configure Wah!Cade for DOSBox''' | ||
− | by, Codefenix | + | by, [[User:Codefenix|Codefenix]] |
Revision as of 02:19, 10 January 2011
The Right Way to Configure Wah!Cade for DOSBox
by, Codefenix
Most commandline-driven emulators require very little tweaking to work with Wah!Cade. DOSBox is a different story. Considering the multitude of different games' file extensions (.EXE & .COM to name a couple), and the variations in systems that used DOS (IBM, Tandy, etc.), finding an effective method to play old classic DOS games through Wah!Cade can prove challenging. This guide will help alleviate that challenge.
Directory Structure
Create a main directory where you will keep all your DOS games. The example used in this guide will be named ~/roms/dos.
Create the following subdirectories in ~/roms/dos:
- conf
- keymaps
- screenshots
I'll get to the purposes of these directories in a bit.
Also create a directory for each of the DOS games you want to set up in Wah!Cade. I will use two favorites of mine as examples:
- ROUND42
- XCUTE
It's important that you name your games' subdirectories using only 8 characters or less. Remember that DOS did not support file and directory names longer than 8 characters back in the day, and DOSBox behaves the same way.
You'll notice that I named my game directories in capital letters and my non-game directories in lowercase letters. I use this convention for my own benefit, so I can easily differentiate which directories contain game files apart from those that don't.
Now that your directory structure is set up, copy each of your game's files into its corresponding subdirectory. Make a note of the executable filename for each game.
Batch (.BAT) Files
Back in your ~/roms/dos directory, create a new text file. Name it identically to one of your games subdirectories, and give it a .BAT file extension. This is called a DOS batch file. Open the file and give it the following text:
@echo off cd GAME_DIRECTORY_NAME EXECUTABLE_FILE_NAME
Substitute the directory names for one of your games for GAME_DIRECTORY_NAME, and its executable file for EXECUTABLE_FILE_NAME, as I did below in my ROUND42.BAT example:
@echo off cd round42 round42.com
A DOS game's executable file will almost always be a .EXE file. Sometimes for older games, however, the .COM extension is also used (as shown in the example). By using a batch file, you can specify either type.
Save and close the batch file. Test it:
dosbox ~/roms/dos/ROUND42.BAT
If all went well, DOSBox should have executed the game. Exit the game, or force terminate using CTRL-F9 if necessary.
Repeat the batch file creation for all of your games.
DOSBox Configuration Per Game
CONF file creation
On DOSBox's first run, it creates a config file in ~/.dosbox named dosbox-version.conf. Copy this file to ~/roms/dos/conf.
Make as many copies of this file as you have DOS games, naming each one identically to the game's subdirectory name with a .conf extension (e.g.: ROUND42.conf).
Editing a CONF file
Open one of your conf files in a text editor (vim or gedit). You will see many different options to change. You'll also notice some documentation is provided for most settings.
Some common things you may want to change:
fullscreen=true fulldouble=true fullresolution=original windowresolution=original output=openglnb
You will see an option called "mapperfile". Set this to a (currently) nonexistent file in your ~/roms/dos/keymaps subdirectory. For my ROUND42 example:
mapperfile=~/roms/dos/keymaps/mapper_ROUND42.txt
You will also see options for frameskipping, cpu type, and many others. Most of the time you can leave these as they are. DOSBox's official documentation on these options is available at this link: Dosbox.conf
Also edit the "captures" option. Set it to ~/roms/dos/screenshots. You'll see why later on.
Adjust your settings in each of your games' conf files, making sure you have set your mapperfile paths properly for each one.
Test a game using the appropriate conf file:
dosbox ~/roms/dos/ROUND42.BAT -conf ~/roms/dos/conf/ROUND42.conf
Again, the game will come up. This time, using the options as you configured, like fullscreen.
Key Mapping
Creating a custom mapper file
While in the game, press CTRL-F1 to activate the keymapper. Feel free to change a few of the keys.
I won't go into much detail here on how the keymapper works, but complete documentation can be found here: Mapper
Reset mapper to default
If you take a look in the ~/roms/dos/keymaps directory, you'll see that a mapper file has been created. If you ever want to reset a game's keymapping, simply delete this file and a fresh one will be generated next time you activate the keymapper while in a game.
Snaps / Screenshots
Where to keep screenshots
Store screenshots of all your games in ~/roms/dos/screenshots. As with all platforms in Wah!Cade, the image filenames must match the names of the roms. The "roms" in this case are the batch files.
How to create screenshots
While playing a game in DOSBox, pressing CTRL-F5 will take a screenshot and save it to the captures directory you specified in the game's conf file.
Add DOSBox to Wah!Cade
In Wah!Cade Setup Editor, under the Emulators tab, add DOSBox as a platform. Set your rom path to ~/roms/dos, rom extension to BAT, your commandline format to ~/roms/dos/[name].[romext] -exit -conf ~/roms/dos/conf/[name].conf, and your artwork 1 path to ~/roms/dos/screenshots.
Alternatively, you can edit your dosbox.ini file in ~/.wahcade/ini accordingly:
### dosbox.ini (wahcade v0.99) ### ### by codefenix ### emulator_title Dosbox v0.72 ### List Generation Settings ### rom_path ~/roms/dos rom_extension BAT dat_file nms_file catver_ini_file list_generation_method rom_folder ### Execution Settings ### emulator_executable /usr/bin/dosbox commandline_format ~/roms/dos/[name].[romext] -exit -conf ~/roms/dos/conf/[name].conf alt_commandline_format_1 alt_commandline_format_2 game_specific_config_path ### Artwork Locations ### artwork_1_image_path ~/roms/dos/screenshots artwork_2_image_path artwork_3_image_path artwork_4_image_path artwork_5_image_path artwork_6_image_path artwork_7_image_path artwork_8_image_path artwork_9_image_path artwork_10_image_path movie_preview_path movie_artwork_no 1 ### Screen-Saver Settings ### enable_music_in_screensaver 0 saver_type slideshow movie_path movie_fullscreen 1 quit_delay 30 wrapper_executable wrapper_commandline_format [name] scr_file ### External Application Settings ### ipc_file_or_path app_1_executable app_1_commandline_format app_2_executable app_2_commandline_format app_3_executable app_3_commandline_format auto_launch_apps ### Additional Settings ### music_path lcd_display_file_path lcd_fe_text ### Settings used by MAMEWAH ### current_list 0
If you did everything right, when you launch Wah!Cade you should be able to select DOSBox as a platform and browse the list of games. Select one, and the appropriate config and keymap settings will be used automatically.
Cabinet-Friendliness
If you're, like most users, using Wah!Cade in a cabinet, you'll soon realize that not all of your DOS games play very well using the cabinet's controls. A game's ability to be 100% playable using a MAME-like arcade control set is referred to as its cabinet-friendliness. You will need to carefully evaluate each of your games and decide which ones are good candidates to be included in your setup. Often times a game allows you to redefine the keys however you want, and you can define them to those used in MAME. On the other hand, if a game does not, sometimes you can make creative use of DOSBox's built-in keymapper to redefine the keys.
Suggested Layouts
Use one of the following layouts for your DOSBox platform in Wah!Cade Layout Editor:
Codefenix's custom layout for MS-DOS
1152 x 864PC Games layout from the Emuchrist collection
640x480Zombie's unofficial Emuchrist-like layout for MS-DOS
640x480Zombie's unofficial Emuchrist-like layout for FreeDOS
640x480
External Links
DOSBox Homepage - All things DOSBox, including a FAQ page, forum, and game compatibility listings.
DOSBoxWiki - The official Wiki page of the DOSBox project.
Wikipedia's article on DOSBox - For everything else.
Cabinet-Friendly DOSBox Games thread at anti-particle.com - A work-in-progress listing of cabinet-friendly DOS games.