dosbox.conf, the DOSBox configuration file

Guide Emulators by sky

Icône de DOSBox

This article complements the folder created by Emuzone and available on this same site. If you have no knowledge of dosbox, we recommend starting with this first tutorial, which introduces the basics of this emulator.

1. Creating the dosbox.conf file

The first step is to generate this file. Launch dosbox and type the following command:

config.com -writeconf dosbox.conf

Then exit dosbox using the command:

exit

Open the newly created dosbox.conf file located next to the dosbox application.

As you can see, the number of configurable parameters is significant. From standard emulator settings to parameters specific to DOS, nothing has been left to chance.

The developers have not been stingy with comment lines (these are the lines starting with the character #). Most often, the available values are even explicitly stated, to guide users attempting an advanced configuration. A default value written is the one used by the emulator when this file does not exist.


2. Configuring SDL library-related parameters

You can manage the emulator window parameters if you want to use the emulator in fullscreen mode, or even double-buffering for smoother display.

The resolution used for fullscreen or windowed mode is adjustable. These values are written in this format:

fullresolution=1024x768

That is, width followed by height separated by a character x.

The output method allows switching the display to OpenGL, though it remains to be seen what impact this parameter has on the graphical result as well as on the emulator's performance.

The mouse sensitivity for DOS software using this peripheral is also adjustable, as well as how the mouse is managed when switching from Mac to the emulator through the autolock parameter.

The priority parameter allows giving priority to emulation over other processes launched on your Mac.

As you may have noticed, there are two values listed, separated by a comma.

The first one is the priority when DOSBox is in the foreground. This means you should set the highest value to achieve the best fluidity during emulation (which is the default setting). The second one indicates the priority when the application is no longer in the foreground. You can thus choose to pause DOSBox or simply slow it down (default).


3. Configuration of DOSBox-specific parameters

This section allows you to configure 4 parameters specific to this emulator.

The first, language, is the localization file you will use. If you want DOSBox in French, you just need to download the French file among the DOSBox downloads in the "translations" section, extract it into the emulator's folder, and then specify the path to the obtained file:

language=francais.lng

The machine parameter lets you specify the type of PC you want to emulate, which may depend on the game/software you have.

captures indicates the folder where screenshots, waves, and midis will be saved.

Finally, you can allocate more or less memory (in megabytes) to the emulator.

 

4. Configuration of graphics rendering data

Here we are finally in the settings that will most affect emulation speed, but that will also allow you to achieve a better rendering than what was available on DOS.

You can adjust the frameskip according to the power of your Mac and the resource demand of the software to emulate.

On an Intel Mac, you can usually leave it at 0. On a G5, you may need to increase it a bit for the most demanding games (usually those available at the same time under Windows 95 and DOS, for example: Dungeon Keeper). On an "antique" G4, you will really need to adapt this parameter according to the game.

The other fundamental parameter in this section is the scaler, which allows you to enlarge the image while minimizing losses, or even improving it.

The possibilities are numerous: none, normal2x, normal3x, advmame2x, advmame3x, advinterp2x, advinterp3x, tv2x, tv3x, rgb2x, rgb3x, scan2x, scan3x, hq2x, hq3x, 2xsai, super2xsai, supereagle.

These scalers are the same as those found in many emulators. Some can be used with little loss of performance. The most demanding ones, improving the graphical rendering, cost a lot in CPU cycles, reserved for the most recent Macs.


5. CPU Parameter Configuration

You can change at any time the number of CPU cycles your Mac must calculate. These 4 parameters are reserved for DOSBox experts.


6. Sound Configuration

The mixer section allows you to enable/disable sound and adjust general settings such as frequency and buffer sizes.

The midi section allows you to configure MIDI sound, used in some older software. You can take advantage of Apple Core Audio technology by specifying coreaudio as the device.

The following sections concern the different emulatable sound cards.

The classic SoundBlaster (in several versions) as well as the Gravis Ultra Sound are the most common. The latter offers better rendering, while SoundBlaster is much simpler to configure and uses less processor power.

It is not recommended to change these values. However, some games will require you to note these details to configure the sound properly.

Some of these parameters must be modified specifically for each game, forcing you to reopen the configuration file each time. Fortunately, some commands allow you to modify the configuration directly within the emulator without changing the values written in the file:

SET BLASTER=A220 I7 D1 H5 T6

The SoundBlaster sound card will have the address (A)220, (I)RQ 7, (D)MA chain 1, (H)igh DMA chain 3, and will be of (T)ype 6.

For those who had never used a DOS-based system, this configuration may seem barbaric.

For others, it will remind you why you're on a Mac now ;) . You can modify these values one by one, which will be easier to read and edit:
config -set sblaster sbbase 220
config -set sblaster irq 7
config -set sblaster dma 1
config -set sblaster hdma 3

 

7. Other Settings

You can easily configure a joystick, and enable networking via IPX. DOS veterans will enjoy tweaking serial port settings.


8. Autoexec.bat

This section allows you to run commands at the start of the emulated system. Of course, this becomes particularly useful if you don’t use a DOSBox launcher like the excellent Radnor.

To add your own commands, simply place them after the [autoexec] section, for example, here’s a combination we use:

KEYB FR
MOUNT C /Users/[user]/Documents/dosbox
C:

The first line switches the keyboard to French, very useful for those who don’t particularly like QWERTY keyboards.
The second line mounts the dosbox folder located in your Documents folder (you must replace the value [user] with your macOS X username). For example:

MOUNT C /Users/sky/Documents/dosbox

Of course, you can place this folder anywhere on your disk and adjust the path in your configuration file. The last command takes you to the root of your virtual C drive, i.e., the dosbox folder.
This is very practical if you need to install games from CDs or ISOs, as your C folder is already ready.


9. Conclusion

We’ve covered the most useful settings; you can always explore the depths of this file further. There are many additional settings that could be useful in specific cases.

We recommend modifying only one value at a time and verifying the validity of the modified file by launching dosbox. If it exits immediately, it means you made an error that you’ll need to find.

In the worst-case scenario, you can always regenerate a new configuration file.

Note also that these parameters may vary depending on the DOSBox versions. With the next update of the emulator, you will need to check the new parameters to consider as well as the validity of all the old ones.

Related software

Reply on the forum

A question or a hands-on report? Open the discussion on the forum.

Reply on the forum