VOGONS

Common searches


First post, by curvedline

User metadata
Rank Newbie
Rank
Newbie

dosbox.conf has and it works

[sdl]
windowresolution=800x600
output=opengl
----------------------

but how do i make it to a command line ?

DOSBOX.EXE c:\abc.exe -c windowresolution=800x600 output=opengl doesnt work
DOSBOX.EXE c:\abc.exe -c windowresolution=800x600 -c output=opengl doesnt work

Reply 1 of 8, by mrau

User metadata
Rank Oldbie
Rank
Oldbie

does not seem supported, but you can have multiple config files if that helps:
$ dosbox --help
Usage: dosbox [OPTION]... [FILE]

These are common options:

-h, --help Displays this message.

--printconf Prints the location of the default configuration file.

--editconf Open the default configuration file in a text editor.

-c <command> Runs the specified DOS command before running FILE.
Multiple commands can be specified.

-conf <configfile> Start dosbox with the options specified in <configfile>.
Multiple configfiles can be present at the commandline.

-userconf Load the configuration file located in
~/.config/dosbox. Can be combined with the -conf
option.

-fullscreen Start dosbox in fullscreen mode.

-lang <langfile> Start dosbox with the language specified in
<langfile>.

-machine <type> Setup dosbox to emulate a specific type of machine.
The machine type has influence on both the videocard
and the emulated soundcards. Valid choices are:
hercules, cga, cga_mono, tandy, pcjr, ega, vgaonly,
svga_s3 (default), svga_et3000, svga_et4000,
svga_paradise, vesa_nolfb, vesa_oldvbe.

-exit Dosbox will close itself when the DOS program
specified by FILE ends.

-v, --version Output version information and exit.

You can find full list of options in the man page: dosbox(1)
And in file: /usr/share/doc/dosbox-staging/README

Reply 2 of 8, by curvedline

User metadata
Rank Newbie
Rank
Newbie

then i must say this is an inconsistency

if this works DOSBOX.EXE abc.exe -c scaler=hq2x

then it should work this way below as well

DOSBOX.EXE c:\abc.exe -c windowresolution=800x600 output=opengl
or
DOSBOX.EXE c:\abc.exe -c windowresolution=800x600 -c output=opengl

multi config? but i need to reduce my config files numbers

Reply 3 of 8, by ericvids

User metadata
Rank Newbie
Rank
Newbie

The -c option technically runs a DOS command. It doesn't *actually* set a config option. The only reason "-c scaler=hq2x" actually works when appended on the DOSBox startup command line is because DOSBox, for some reason or another, can interpret a DOS command of the format X=Y as a config-setting command.

In theory, windowresolution=800x600 *could* have worked, but DOSBox only internally reads the windowresolution config setting at startup (after reading the config file, but before executing the -c commands). That's not necessarily an inconsistency as it is a limitation of how DOSBox was coded. You can test it yourself by entering the "windowresolution=800x600" command directly into DOSBox, and then typing "windowresolution" by itself to print out its value. The value will change; it's just not going to reflect on the actual window size.

Reply 4 of 8, by curvedline

User metadata
Rank Newbie
Rank
Newbie

maybe someday, i hope they make dosbox that the external commands in batches overwrite the internal options, just like ffmpeg.exe, and the most moddable games.

this will greatly reduce the number of config files make and made , and 50% less chasing files

Reply 5 of 8, by Azarien

User metadata
Rank Oldbie
Rank
Oldbie

The way I do it, and the way GOG does it in their releases, is

dosbox.exe -conf path\to\dosbox.conf -conf custom_config.conf

where custom_config.conf is a small file only overwriting the options you want (and which can also have the [autoexec] section to run the main exe)

Reply 6 of 8, by curvedline

User metadata
Rank Newbie
Rank
Newbie

dosbox.exe -conf dosbox.conf -conf custom_config.conf
yes that will do, i got confused with -userconf at 1st, now i can simply use double -confs for it. but i still wish them to make reduce the number of conf files.

Reply 7 of 8, by jmarsh

User metadata
Rank Oldbie
Rank
Oldbie

Some options like the video output mode and window resolution need to be known at startup, before DOSBox initialises the main window. So they have to be in .conf files and can't be changed with commands.

Reply 8 of 8, by curvedline

User metadata
Rank Newbie
Rank
Newbie

i found this command -c scaler=hq2x didnt work in all cases, i do this the right way now -scaler hq2x
i will ask my wish about making commandlines including in resolutions and sensitivity, in a couple years later again.