VOGONS


FEATURE REQUEST: Cascaded Config Files

Topic actions

First post, by prometh

User metadata
Rank Newbie
Rank
Newbie

I think it'd be great if config files could be cascaded. For those reading in that may not know what that means, well...

For example, let's say we have a game that must run with cpu cycles set to 4000 while every other game must run at max. You would simply create a new config file for that game with the custom settings.

Unfortunately in DOSBox's current state, we'd have to duplicate the rest of our settings in that file instead of allowing the few custom settings to override the global settings. This is rather sloppy, in my eyes.

Reply 1 of 22, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

Hmm, I may misunderstand you, but for the conf, you only really have to have those entries that are different from the default. For example if you don't mess with the soundblaster settings, you can delete the whole thing from the dosbox.conf and dosbox will just use the defaults. So as far as I understood Dosbox does that in a way, that you only have to duplicate the entries that are not the default.

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox
DOSBox SVN snapshot for macOS (10.4-11.x ppc/intel 32/64bit) notarized for gatekeeper

Reply 2 of 22, by prometh

User metadata
Rank Newbie
Rank
Newbie

But what if I have my own defaults in dosbox.conf? For example, I have

"fullscreen=true" in dosbox.conf

then I execute dosbox with -conf game.conf

game.conf does not contain a fullscreen declaration. When my game loads, it is not in fullscreen as its semi-cascade is dosbox's internal defaults, not the defaults I've defined.

Reply 3 of 22, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

I see now more clearly what you mean. Harder to support I guess especially with the upcoming new version that supports more windows user account friendly config locations...

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox
DOSBox SVN snapshot for macOS (10.4-11.x ppc/intel 32/64bit) notarized for gatekeeper

Reply 4 of 22, by MiniMax

User metadata
Rank Moderator
Rank
Moderator

dosbox -conf config1.conf -conf config2.conf -conf config3.conf .......

How many do you want?

DOSBox 60 seconds guide | How to ask questions
_________________
Lenovo M58p | Core 2 Quad Q8400 @ 2.66 GHz | Radeon R7 240 | LG HL-DT-ST DVDRAM GH40N | Fedora 32

Reply 5 of 22, by rcblanke

User metadata
Rank Oldbie
Rank
Oldbie

...has been in CVS since october 2006. DBGL uses 'Cascaded Config Files' by default.

Reply 6 of 22, by prometh

User metadata
Rank Newbie
Rank
Newbie

MiniMax, but I'd rather not have to define the default one.

rcblanke, I don't want to use DGBL.

Reply 7 of 22, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

MiniMax, but I'd rather not have to define the default one.

boohwhahabooh.... 😀
That's how your request is implemented and it's probably enough for those few who use it...
Anyway, a much quicker solution for your problem are batch files. Most stuff that you can configure in the config file can also be done on runtime.
So instead of making different config files make batch files for the problem games that have the cycles changed.
Example, instead of starting game.exe, start game.bat and that contains the lines:
cycles=4000
game.exe

(in the next version of Dosbox it would be cycles=fixed 4000, btw)

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox
DOSBox SVN snapshot for macOS (10.4-11.x ppc/intel 32/64bit) notarized for gatekeeper

Reply 8 of 22, by prometh

User metadata
Rank Newbie
Rank
Newbie

Is "cycles=4000" a standard DOS thing for autoexecs, or just DOSBox? I didn't know this could be done outside of a config file.

Also, I prefer doing things in a config file because it loads faster and does not display the DOSBox startup text. This is what I'm looking for with my game launcher which will be on a TV.

Reply 9 of 22, by MiniMax

User metadata
Rank Moderator
Rank
Moderator
prometh wrote:

Is "cycles=4000" a standard DOS thing for autoexecs, or just DOSBox?

What do you suspect it would do in a non-DOSBox environment?

DOSBox always displays the startup text.

And you should try the magic ECHO OFF command.

DOSBox 60 seconds guide | How to ask questions
_________________
Lenovo M58p | Core 2 Quad Q8400 @ 2.66 GHz | Radeon R7 240 | LG HL-DT-ST DVDRAM GH40N | Fedora 32

Reply 10 of 22, by prometh

User metadata
Rank Newbie
Rank
Newbie

Well, DOSBox does not display the startup text on both my Mac and Windows machines. But, like I said, only when -config is used. And I always use @echo off.

And I don't know what it would do in a non-DOSBox environment.

Reply 11 of 22, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

And I always use @echo off.

Is this our problem then?

And I don't know what it would do in a non-DOSBox environment.

Is this relevant? If so, feel free to try it.

Reply 12 of 22, by MiniMax

User metadata
Rank Moderator
Rank
Moderator
prometh wrote:

Well, DOSBox does not display the startup text on both my Mac and Windows machines.

Please define "startup text".

DOSBox 60 seconds guide | How to ask questions
_________________
Lenovo M58p | Core 2 Quad Q8400 @ 2.66 GHz | Radeon R7 240 | LG HL-DT-ST DVDRAM GH40N | Fedora 32

Reply 13 of 22, by prometh

User metadata
Rank Newbie
Rank
Newbie

wd, it was a response. Please try not to be a prick.

MiniMax, "Welcome to DOSBox v0.72", etc, in the blue box.

Reply 14 of 22, by MiniMax

User metadata
Rank Moderator
Rank
Moderator

So, your claim is, that if you create a config file, and start DOSBox using that file, you don't get the normal "Welcome to DOSBox v0.72"?

Please (on your Mac) start a terminal window and type this:

$ echo "[autoexec]" > ~/test.conf
$ echo "@echo This is a test." >> ~/test.conf
$ cat ~/test.conf
[autoexec]
@echo This is at test.
$ dosbox -conf ~/test.conf

Do you get the normal startup text?

Now try it on your PC. Start a CMD window and type:

C:\>notepad "%TEMP%\test.conf"
(enter the same 2 lines as before, so your test.conf contains

[autoexec]
@echo This is at test.

Save and exit Notepad)

C:\>type "%TEMP%\test.conf"
[autoexec]
@echo This is a test.
C:\>"%ProgramFiles%\DOSBox-0.72\dosbox.exe" -conf "%TEMP%\test.conf"

Result?

DOSBox 60 seconds guide | How to ask questions
_________________
Lenovo M58p | Core 2 Quad Q8400 @ 2.66 GHz | Radeon R7 240 | LG HL-DT-ST DVDRAM GH40N | Fedora 32

Reply 15 of 22, by prometh

User metadata
Rank Newbie
Rank
Newbie

Actually... before running your test, I just noticed this in my terminal window on my Mac:

DOSBox version 0.72
Copyright 2002-2007 DOSBox Team, published under GNU GPL.
---
CONFIG:Loading primary settings from config file DOSBox Preferences
CONFIG:Loading additional settings from config file ./X-COM 1 - UFO Defence/config.conf
2009-05-24 20:17:06.705 dosbox[25794:10b] Warning once: This application, or a library it uses, is using NSQuickDrawView, which has been deprecated. Apps should cease use of QuickDraw and move to Quartz.
MIDI:Opened device:coreaudio

But this is never displayed in the window that loads the game.

So, that's what I wanted: the ability to load a game without ever having to see this "welcome text" before the game runs. The only way I was able to achieve this was to put my autoexec stuff in a config file.

Reply 17 of 22, by prometh

User metadata
Rank Newbie
Rank
Newbie

Qbix, I can redirect the "Welcome to DOSBox v0.72", etc, in the blue box?

Reply 18 of 22, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

No you can't.

Reply 19 of 22, by prometh

User metadata
Rank Newbie
Rank
Newbie

Alright. But as I said above, I was able to suppress it by putting my autoexec in a config file instead of a batch file.

Last edited by prometh on 2009-05-25, 14:30. Edited 2 times in total.