VOGONS


First post, by challo

User metadata
Rank Newbie
Rank
Newbie

Hey guys,

i got something curious happening here with my DOSBox, i can't explain myself. I've got a larger batch file, which initiate some values, starts the DOSBox for evaluation and in the end handle the output files generated inside DOSBox. For simplicity i will not post exactly this script, but i wrote some kind of substitutional script, which do more or less the same. Here it comes.

@echo off
:: Relative path to DOSBox folder
set dosboxpath="..\..\DOSBox-0.74"

:: Loop 25 times
for /l %%a in (1,1,25) do (
path %dosboxpath%

:: Starting DOSBox.exe, initiating the user specific config file with an file link DB.lnk
:: Echoing "hello world" to the file "log"
:: Closing DOSBox and return to parent batch file
DB.lnk -c "echo hello world > %cd%\log" -c "exit"

:: create a folder with the name of the current run from 1...25
mkdir %cd%\%%a
:: Move the log file, created by DOSBox, inside the new folder
move %cd%\log %cd%\%%a
)
:: EOF

In fact, not a difficult task. Open DOSBox, create a file, create a subfolder, move file into subfolder, repeat.

Everything works fine, until, i switch off the monitor! No, really! If i'm switching off the monitor after starting the batch, all the files and folders up to the "switch off moment" were created perfectly. But than, nothing seems to happen after it. In my cmd-console a failure occures, which tell me, that no file could be found. This means, DOSBox didn't started properly.

I don't get it, what's the relation between my monitor switching button and the proper execution of my DOSBox?!? This phenomena is so curious to me...

Best regard

Last edited by challo on 2017-01-12, 15:12. Edited 1 time in total.

Reply 1 of 6, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

try changing the used output in the options file that you use in your link.

Water flows down the stream
How to ask questions the smart way!

Reply 2 of 6, by challo

User metadata
Rank Newbie
Rank
Newbie

Thanks for your reply. This file link is in the same folder as the DOSBox.exe. It executes DOSBox with user defined config and language: C:\DOSBox-0.74\DOSBox.exe -conf "dosbox-0.74.conf" -lang "german-0.74.lang"

What do you mean exactly with the options file?

Reply 3 of 6, by Jorpho

User metadata
Rank l33t++
Rank
l33t++

I believe he is referring to your dosbox-0.74.conf and the "output=" line therein.

Reply 4 of 6, by challo

User metadata
Rank Newbie
Rank
Newbie

I changed the output setting in my .conf between surface, overlay, opengl, openglnb and ddraw. The same behaviour as i mentioned before, so, DOSBox stops working, if i switch the monitor off.

Any other suggestions?

Reply 5 of 6, by Jorpho

User metadata
Rank l33t++
Rank
l33t++

I am inclined to believe there is something else on your system that is causing this behavior.

You can try setting the environment variable SDL_VIDEODRIVER=dummy before launching DOSBox (e.g. when setting "dosboxpath" in your script). This will cause DOSBox not to display a window.

Reply 6 of 6, by challo

User metadata
Rank Newbie
Rank
Newbie

Works like a charm! Thank you so much Jorpho.

set SDL_VIDEODRIVER=dummy
DB.lnk -c "echo hello world > %cd%\log" -c "exit"