February 11, 2007

There are several performance optimized versions of DOSbox out there today. Many have been built with custom patches intended to improve performance and add new features. Most are built from the latest CVS of DOSbox. After experimenting with many, I have chosen one built by the author of the DOSBox Daum Cafe. I have used his builds on several computers without any troubles. At present there is a DOSBox 0.66rc1 build available on that site. Be sure to download the one without the debugger enabled (for best performance).

Why bother with a build from the latest CVS? Why not just use a 0.65 build? Well, there are many improvements that you may not want to ignore. The most important one is the new auto feature for the CPU core. I find it greatly improves performance. Also, there are several enhancements if your video card supports pixel shaders. I really noticed the difference over 0.65.

To start tuning DOSbox for best performance, you will need to edit the dosbox.conf file. I start by switching display output to use the video cards overlay and enabling pixel shaders. You do this by changing the following lines:

output=overlaypixelshader=GS2x.fx

This in particular helps when you play the game in a window. I have noticed that it does not work with all video cards. You will need to experiment.

One of the most important settings are the setting for the CPU core. The new CVS builds support the auto core which is even better performance than dynamic core (Note: not all of the core options are available on non-windows OS platforms). To enable the auto core just change the following lines:

core=autocycles=autocycleup=500cycledown=20timesynched=false

Another thing you may need to do is adjust the frameskip parameter. This is only necessary on slower machines. Myself, I set it to 0 but values up to 8 have acceptable results with moo2. Setting the parameter to high can effect the games animations.

frameskip=0

Try different values. A place where the game animations will lag most noticeably is on the main screen where the credits are scroll up. This is a good place to judge how smooth the animations are going to be during a game.

Once you get the game graphics and animations running smoothly, you can worry about sound. Edit the dosbox.conf and look for the [mixer] section. In that section make sure that sound is not disabled (if true it is disabled):

nosound=false

Next, Adjust the sound blaster emulation settings in the [sblaster] section. Make sure it is all like this:

Back on the main screen, select "Select and configure digital audio driver". On the second screen choose "Creative Labs Sound Blaster 16 or AW32" and again "Attempt to configure automatically" on the next screen. Save and exit.

That should do it.

One thing I suggest is to clear the key mapping of ALT-F9. Accidentally pressing ALT-F9 (perhaps while pressing F9 to determine distances between stars) during a game will cause DOSbox instantly to close. In order to prevent this, Press CTRL-F1 to switch to the Keyboard Mapper screen. Click on the Shutdown box and then the Del box. You will notice the key mapping in the bottom left clear. Click Save and Exit to save the new key mapping.

Another thing I like to change is the key sequence to release the mouse cursor from the DOSbox window. Normally this is ALT-F10 however the ALT key activates the menu bar in DOSbox. Activating the menubar in DOSbox halts the game and can cause network packets to be dropped. Dropped network packets in a multiplayer game often results in the familiar "Unable to send" message. It is best to try not to hit the ALT key during the game at all.

In order to change the key sequence to release the mouse cursor, press CTRL-F1 and click on the Cap Mouse box. Click the Del Box to clear it. Now press the the key on your keyboard that you want to assign this function to. Personally, I like to map it to the END key. Click Save and Exit when done.