Confounded .bat Dosbox Struggles

Discussion about things related to computers, games and internet.
Post Reply
User avatar
Daedalus
Blood is my Medium
Posts: 4418
Joined: Apr 27th, 2004, 00:46
Location: The Door between Worlds
Contact:

Confounded .bat Dosbox Struggles

Post by Daedalus » Mar 23rd, 2016, 05:47

Greetings. This has nothing to do with the bat monster in Blood.

I've a question for those who might be in the know. Posty is nuts enough to perhaps have the answer to this. I'd try elsewhere, but it somewhat blurs the line between various different applications. I think a mediocre understanding of writing .bat files would be suitable for helping me out.

Anyway, let's get to the meat of it.

I've got two separate installations of Blood from GoG which I'm attempting to run concurrently. No problems there - Dosbox has the deal covered and it's all fairly straightforward, but I've tried to take things a bit beyond mortal measure.

I investigated a means by which to position the launch windows without having to manually do so. I'm not using fullscreen windows at this time.

My investigation was successful. I found a small tool called StartX, which can be located here: http://www.naughter.com/startx.html

This tool enables several parameters which can be added to launch an application with certain tweaks.

I was able to position the window successfully, but my vision doesn't extend to writing simple bat files, and so I've run into a problem whereby I'm unsure of how to add Dosbox parameters to the mix.

Here's the content of my file:

[code]@echo off
"C:\Program Files\StartX\Release\StartX.exe" /P900,600 "C:\Games\Blood\DOSBOX\Dosbox.exe"[/code]

It's a seemingly simple application of coordinates to the launch window of Dosbox.

My Dosbox has the following parameters I need to add:

[code]-conf "..\dosboxBlood.conf" -conf "..\dosboxBlood_single.conf" -noconsole -c exit[/code]

I've spent several hours on it and I haven't been able to successfully merge the two. If I apply those parameters to my .bat file, it muddies the path and won't execute. I can easily launch the shortcut link which contains the parameters I need for Dosbox, but I wasn't successful in trying to apply StartX's positioning using this method and adding a shortcut link to my .bat file above breaks it.

In theory, changing the default configuration of my Dosbox would bypass the need to add its parameters, but this would then apply to Dosbox as a whole and that would not be a great solution.

I've spent hours trying to bring all this together and I think a person with even a fairly basic understanding of putting .bat files together would be able to patch it all up.

Does anyone have any input on how to succeed?
Kazashi wrote:Daedalus, I don't care how much you know about Blood, your attitude has to change.
Blood + Focus = Love · Faith is the key · Heretics and traitors cannot stand before us · Some games are self-perpetuating - Blood requires conscientious communal effort to survive · We are the last line · Ask not for whom the main menu animates · Blood's promotion and survival - all other gaming considerations are secondary · More than just a game · Need a hint? · Make a stand

User avatar
Dimebog
Troll of the Opera
Posts: 2165
Joined: Aug 6th, 2006, 15:48
Contact:

Re: Confounded .bat Dosbox Struggles

Post by Dimebog » Mar 24th, 2016, 22:17

Actually, having two differently configured copies of DosBox doesn't sound like that bad of a solution. Just make a copy of DosBox and rename the altered conf file as default.
Raven wrote:Nevermore.

User avatar
Status Cruo
Pink on the Inside
Posts: 352
Joined: Jan 6th, 2011, 22:28

Re: Confounded .bat Dosbox Struggles

Post by Status Cruo » Mar 27th, 2016, 22:20

Hmm, kind of tricky. Have you tried modifying DosBox's default config to match that of the first config you wish to merge and go with:

"-userconf -conf TheOtherConfigYouWishTomMerge.conf"

?

User avatar
Daedalus
Blood is my Medium
Posts: 4418
Joined: Apr 27th, 2004, 00:46
Location: The Door between Worlds
Contact:

Re: Confounded .bat Dosbox Struggles

Post by Daedalus » Mar 28th, 2016, 02:20

I may be mistaken on this, but the "-conf" parameters are limited strictly to shortcuts. It seems that Dosbox defaults to the configuration file in /appdata/local, but I'm unsure as to what determines that. As both Dosboxes will by default point to that configuration file, it is not suitable. In short:

- I only know how to make the program apply positioning to .exe's, not .lnk's.

- Dosbox uses shortcuts to determine where its config file is.

- By definition, I am looking to have two individual Dosbox installations (config files)(two Bloods concurrently for maximum Blood).

Either:

- I need to know how to execute a .bat which incorporates command line parameters (-conf)(see original lines)

OR

- I need to have the Dosboxes default to two separate .conf files without specifying the location in a Dosbox shortcut

OR

- I need an alternative means to allocate coordinates for individual executable files' window positioning

The first strikes me as a the simplest, but if the technical knowledge is not readily available, the second seems a fairly quick fix - if it is possible!
Kazashi wrote:Daedalus, I don't care how much you know about Blood, your attitude has to change.
Blood + Focus = Love · Faith is the key · Heretics and traitors cannot stand before us · Some games are self-perpetuating - Blood requires conscientious communal effort to survive · We are the last line · Ask not for whom the main menu animates · Blood's promotion and survival - all other gaming considerations are secondary · More than just a game · Need a hint? · Make a stand

User avatar
Status Cruo
Pink on the Inside
Posts: 352
Joined: Jan 6th, 2011, 22:28

Re: Confounded .bat Dosbox Struggles

Post by Status Cruo » Mar 28th, 2016, 03:57

Try the following batch and see if it does anything for you (tested here and works ok). Just be sure to replace the paths and config name to reflect what you've got there. Leave everything else intact.

cd "c:\program files\startx"
startx /P900,600 "C:\DosBox\dosbox.exe -noconsole -conf C:\DosBox\blood.conf"

User avatar
Daedalus
Blood is my Medium
Posts: 4418
Joined: Apr 27th, 2004, 00:46
Location: The Door between Worlds
Contact:

Re: Confounded .bat Dosbox Struggles

Post by Daedalus » Mar 28th, 2016, 06:07

Thanks for your aid thus far. Your example works on the part of Startx, but it seems to trip up when it comes to applying Dosbox's configuration file and I begin with the empty Z:. I'll present what I've currently got here and for purposes of this demonstration I'll substitute my Blood with "BloodA", which contains a subfolder for Dosbox as per GOG's installation.

Currently my bat file reads the following:

cd "c:\program files\startx\release"
startx /P600,900 "C:\Games\Blood\BloodA\dosbox\dosbox.exe -noconsole -conf C:\Games\Blood\BloodA\dosboxBlood_bloodA.conf"

In that configuration file (bloodA) is the following:

"
[autoexec]
# Lines in this section will be run at startup.

@ECHO OFF
mount C ".."
c:
imgmount D game.ins -t iso
cls
blood.exe
exit
"

Where this begins to confuse me is the GOG installation seems to apply a .conf on top of a .conf. The shortcut which currently works has the following:

"C:\Games\Blood\BloodA\DOSBOX\DOSBox.exe" -conf "..\dosboxBlood.conf" -conf "..\dosboxBlood_bloodA.conf" -noconsole -c exit

The contents of the "dosboxBlood" conf are the usual settings of memory and such for Dosbox, so I assume Dosbox stacks the two together.

Do you know if Dosbox would find it acceptable if I merged the two configuration files into one and pointed to that?

Strange since this seems fairly cut and dry, but I think I may be overlooking something obvious.
Kazashi wrote:Daedalus, I don't care how much you know about Blood, your attitude has to change.
Blood + Focus = Love · Faith is the key · Heretics and traitors cannot stand before us · Some games are self-perpetuating - Blood requires conscientious communal effort to survive · We are the last line · Ask not for whom the main menu animates · Blood's promotion and survival - all other gaming considerations are secondary · More than just a game · Need a hint? · Make a stand

User avatar
Status Cruo
Pink on the Inside
Posts: 352
Joined: Jan 6th, 2011, 22:28

Re: Confounded .bat Dosbox Struggles

Post by Status Cruo » Mar 28th, 2016, 07:04

Hmm. Here it doesn't matter whether it's one or more configs stacked together; startx handles it all just fine. E.g.

startx /P900,600 "C:\DosBox\dosbox.exe -noconsole -conf C:\DosBox\blood.conf -conf C:\DosBox\bloodbath.conf"

Your config particularly, it doesn't look like there's anything wrong with it.

If you want to merge the 2 configs, that should work ok (the settings on the config that gets read last should then replace whatever's on the config that gets read first) as long as you leave a copy of the un-merged configs for other games to use (e,g, say there's a base, universal dosbox.conf and then something else, like blood.conf, gets loaded on top of that).

Something else that comes to mind, straight out of the DosBox wiki: "Important!: In Windows Vista/7 the configuration file won't work correctly if it is located in "Windows" or "Program Files" folder or their subfolders, or directly on c:\, so the best place for storing extra configuration files is for example: C:\oldgames"

I'm running WinFLP so this is a no-issue, but it may not be the same for your modern OS.

Post Reply