Go Back   Forums > Abandonia.com > Troubleshooting > Tutorials
Memberlist Forum Rules Search Today's Posts Mark Forums Read
Search Forums:
Click here to use Advanced Search

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 05-07-2008, 01:57 PM   #1
Japo
Autonomous human
 
Japo's Avatar


 
Join Date: Mar 2006
Location: ,
Posts: 4,613
Default Advanced DOSBox Tutorial

This tutorial explains how to use DOSBox in all its might and with no need of third-party programs (frontends). It's certainly more difficult than the basic tutorial (recommended for beginners), but the main reason why this is going to be so long, is that every single step is explained with detail so that it's impossible to get lost.

We'll see how it's not so difficult to create shortcuts that directly run in DOSBox each game with their appropriate configuration:


First let's take a look at the file where DOSBox stores its default configuration. It's a text file we can modify with the Windows Notepad or any other editor; it may look rough to the average user, but in the end changing options here is the same as changing them using a frontend like DBGL. To access this file we can go to the Windows start menu > Programs > DOSBox-x.xx > Options > DOSBox x.xx Options".




(We briefly came across this file already at the end of the basic tutorial.) The lines starting with "#" are comments with no effect, and explain the meaning of the configuration options, that is the rest of the lines in the form "(option)=(value)". As you can see the options are grouped in 14 headings whose names are inside square brackets ([sdl], [dosbox], [render], [cpu], [mixer], [midi], [sblaster], [gus], [speaker], [joystick], [serial], [dos], [ipx] and [autoexec]).

The most important options are reviewed here, but I don't recommend reading them all now. Rather go on with this tutorial, and afterwards you'll look up the options as soon as you need them.

Some people may be thinking by now that it would be impractical to edit this file every time we need to change any setting for this or that game, and it's better to make different profiles with a frontend. But the point is that we can do the very same without need for a third-party program: on the one hand we can create as many configuration files as we want, and we can easily tell DOSBox to use a particular one for each game; and on the other hand we can load more than one config file in the same DOSBox session. Let's clarify this.

Before we continue let's get a little organized. We'll create a folder where we'll put all the shortcuts we'll create (maybe someone will prefer to have them scattered over the Desktop or wherever). To create it right-click on a blank space where you want the folder (for example the Desktop) and select "New > Folder", and name it--for example--"DOS games".

We need a second folder to contain custom configuration files. We'll create it in the Desktop too (again use any other location you prefer), and name it "DOSBox custom files" for example.

The easiest way of creating a new configuration file is to copy the default file and edit only the options we need to change for a certain game or set of games. This works for old DOSBox versions, but new ones also allow us to load several files in the same session: DOSBox would load first the default configuration, and when loading the next one the new options would override the default ones, but the options not specified in the second file remain as they are.

The idea is to load always the default configuration--which we can customize too--while the other files for particular games will only include "incremental" options that we want different from the default. Whenever we want to change the default configuration we won't need to edit every single file, just the default one accessible from the Windows start menu, that sets the default options common to every session unless another file overrides them. If you haven't grasped it, don't worry because we'll be seeing an example shortly.

As we said, we can start from the default file accessible from the start menu under "DOSBox x.xx Options", edit the necessary lines, then delete the rest of the lines we didn't change. Be careful not to delete the headings--the lines with words between square brackets ("[]"). Then we save this custom file in the "DOSBox custom files" folder we created.

The files don't need to have a .conf extension. If you use a .txt extension you'll be able to open them in the Windows notepad by double-clicking on them. Of course you can associate .conf files with the notepad too. In any case don't get confused if Windows hides the extension, you'll later need the full name of the file including extension. (Note that it's displayed in the title bar of the Windows notepad, see the screenshot below).

For example, this is my file to run UFO - Enemy Unknown:


The rest of the options will remain as default. Don't worry about the lines under "[autoexec]", we'll explain that part last. If a game works fine with DOSBox's default config (what will happen a lot) there's no big need to change any setting, and so you can leave this file blank except for the [autoexec] section; later we'll see what lines you need to write here.

If at any time we mess the default file, you can click on "Reset Options" in the DOSBox folder in the Windows start menu. Although you'll lose any changes you did to it before, as I recommended at the end of the basic tutorial and later in this one.
__________________

Anyway, once you have the config file we want, save it in the "DOSBox custom files" folder you created. Now we want to make a shortcut that will run DOSBox with that configuration, and every time we wish to use it (running a particular game) we only have to double-click on the shortcut.

So we go back to the other "DOS games" folder we created, and copy the "DOSBox x.xx" shortcut from the start menu to this folder:


(Remember that dragging with the left mouse button is moving, so if you want to copy instead, not to remove the shortcut from the start menu, drag with the right mouse button and choose "copy here".)

We rename it (select it and press F2 or click on the name label)...


And then we need to modify the properties of the shortcut. So we right-click on it and select "properties" (or press Alt+Enter while it's selected). Before any changes it should look like this:


We need to add a parameter to make the shortcut load our configuration file. (You can read about all the DOSBox parameters in the "manual" accessible from the Windows start menu.) There are two changes we need in the shortcut, first we must add to the "Target" field the text

Code:
 -conf (filename)
without erasing what's already there, and leaving a space between it and our new text. Now's when it's important not to miss the file extension, even if Windows hides it.

The second change is replace what's in the "Start in" field for the path to the "DOSBox custom files" folder where we keep our custom configuration files. You can get the path opening that folder and clicking on the address bar and copying the path from there:


The final result must look like this:


We just did what we said we wanted: tell DOSBox that we want it to load the default configuration first, and then the specific one for a game or whatever. The latter overrides the former, but the options not specified in the second file will be left as the first one set them. We can create more "profiles" for more games in the same way, creating more configuration files (in the same "DOSBox custom files" folder) and other corresponding shortcuts, which we can easily make by copying this one and changing what's behind "-conf " with the name of the particular file--since the "Start in" field will be the same for all the games.

Last edited by Japo; 24-01-2011 at 01:26 AM.
Japo is offline                         Send a private message to Japo
Reply With Quote
 


Similar Threads
Thread Thread Starter Forum Replies Last Post
Abandonia's Dosbox Tutorial Rogue Old Suggestions 11 02-03-2006 07:48 PM
Help With The Dosbox Tutorial. gamebounty Tech Corner 28 21-02-2006 05:52 PM

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Forum Jump
 


The current time is 05:37 AM (GMT)

 
Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.