Jump to content
LaunchBox Community Forums

Fixing command-line parameters in Launchbox


Special T

Recommended Posts

Posted (edited)

I recently updated the ARES emulator to the latest version (138) and I'm having trouble getting everything to work properly.

I can launch everything through commandline but when I try to incorporate that code into LaunchBox it works with the exception of the full screen parameter.

Here's the commands I'm using to launch N64 DD games that require a base N64 game to load properly e.g. F-Zero X

ares.exe "PATH TO N64 ROM" "PATH TO N64DD ROM" --fullscreen

So here's what it looks like with a rom file but just to make the code short, I'm pretending they're in the root of my C drive. When this is enter in command line the rom loads in full screen.

ares.exe "C:\F-Zero X.zip" "C:\F-Zero X - Expansion Kit.zip" --fullscreen

 

So to get this converted into LaunchBox,

1. I need to put the "PATH TO N64 ROM" in the Edit Game / Launching / Emulation / Use Custom Command-line Parameters section since this will vary for each game.

2. Within the Manage Emulators section, I have to make the following changes

> Add --fullscreen to the Default Command-Line Parameters in the Details section

> Disable Attempt to hide console window on startup/shutdown in the Details section 

> Disable Enable Game Startup Screen in the Startup Screen section.

It launches the N64 game but not the N64DD game because the --fullscreen parameter is being sent before the "PATH TO N64DD ROM" and it's not starting the N64 game in full screen.

image.thumb.png.f99b739c2cdf17d749f372447e9a7b1f.png

If I remove the --fullscreen parameter it will launch the N64DD game correctly except it's still not in full screen.

image.thumb.png.5ab57ebfbc2222edc3074eb6eb3677d8.png

So, how can I make the --fullscreen parameter move to the end?

Instead of ares.exe --fullscreen "FULL\PATH\TO\ROM\FILE" it would need to be ares.exe "FULL\PATH\TO\ROM\FILE" --fullscreen

Edited by Special T
Link to comment
Share on other sites

To just move it around it would be

Ares.exe %romfile% --fullscreen

The work around I usually do is hard code the path and standardize the file name. Also have to add it as a separate emulator name like ares (N64dd expansion)

ares.exe "c:\roms\n64\%romfile%.zip" "c:\roms\n64dd\%romfile%-expansion.zip" --fullscreen

You would point to the original N64 rom for import. Also have to check the 2 boxes for file path/extension and remove quotes

  • Like 1
Link to comment
Share on other sites

This is extremely helpful, thank you!

I saw another topic on using the %romfile% variable so I tried it but I wasn't using it correctly. The method you outlined works perfectly with the Ares emulator.

Aside from the %romfile% variable are there other wildcard parameters that can be used? If so, can you point me in the direction of where I can learn more about them.

Also, since there are a few places you can enter command-line instructions, do you know what order the parameters are placed in? I assume it's this order but just curious if that's correct.

1. Emulator exe
2. Edit Game / Launching / Emulation / Use Custom Command-line Parameters
3. Manage Emulators / Associated Platforms / Default Command-Line Parameters
4. Manage Emulators / Default Command-Line Parameters

 

Just incase anyone else is curious, I tweaked your parameters slightly since I have a sperate platform for N64DD roms which are already imported. I added "-N64" to the end of the regular compressed rom file instead of adding "-expansion" to the end of the 64DD roms and it works great.

F-Zero X - Expansion Kit.zip  <-  N64DD rom (ndd)
F-Zero X - Expansion Kit-N64.zip  <-  N64 rom (z64)

image.png

Link to comment
Share on other sites

20 minutes ago, Special T said:

Aside from the %romfile% variable are there other wildcard parameters that can be used? If so, can you point me in the direction of where I can learn more about them.

In addition to those, there's %romlocation% (added sometime early in 2022) which will give the "full\Path\To\Rom\".  Path only. 

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

Thank you for the link, I was unaware of the other variable command line parameters so that was appreciated!

The only other question I had was what order the parameters are placed in? I assume it's this order but just curious if that's correct.

1. Emulator exe
2. Edit Game / Launching / Emulation / Use Custom Command-line Parameters
3. Manage Emulators / Associated Platforms / Default Command-Line Parameters
4. Manage Emulators / Default Command-Line Parameters

So if there were special command-lines in all those areas, would the final command that's sent look look like this?

Emulator.exe "game specific command-line" "associated platform specific command-line" "emulator specific command-line"

Link to comment
Share on other sites

21 minutes ago, Special T said:

So if there were special command-lines in all those areas, would the final command that's sent look look like this?

Emulator.exe "game specific command-line" "associated platform specific command-line" "emulator specific command-line"

No.  The rule of precedence is

  1. Edit Game - Custom Command-line parameters will override..
  2. Associated Platforms - Custom Command-line parameters will override..
  3. Edit Emulator - Default Command-line Parameters.

They will not be compounded.

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

I'm glad I found this thread!

Thanks to you guys I managed to make F-Zero X launch with the DD expansion and in fullscreen!
I like to keep my launchbox portable so I try to use only relative paths but I cannot make it work for the F-Zero DD expansion sadly.

On 6/2/2024 at 2:11 PM, JoeViking245 said:

In addition to those, there's %romlocation% (added sometime early in 2022) which will give the "full\Path\To\Rom\".  Path only. 

I tried %romfile% "%romlocation% /F-Zero X (USA)-expansion.ndd" and I believe the issue is that romlocation adds the quotes already so it breaks the syntax, right?

On 6/2/2024 at 1:26 AM, Special T said:

So, how can I make the --fullscreen parameter move to the end?

Instead of ares.exe --fullscreen "FULL\PATH\TO\ROM\FILE" it would need to be ares.exe "FULL\PATH\TO\ROM\FILE" --fullscreen

All the games I launch using ares are NOT in fullscreen despite using the --fullscreen parameter and I believe it's due to the issue you mentioned because F-Zero has no trouble being fullscreen with its parameter at the very end. Did you set custom command-line parameters for every single game?

Link to comment
Share on other sites

31 minutes ago, Nocta said:

tried %romfile% "%romlocation% /F-Zero X (USA)-expansion.ndd" and I believe the issue is that romlocation adds the quotes already so it breaks the syntax, right?

Correct.  %romlocation% does add quotes around the full path.

 

Take a look at how @cpujunkie did it (above).  And don't forget to check the 2 boxes as noted.  You should be able to put in relative paths to keep it portable.  Make them relative to where ares.exe is located as the command will be executed from 'that' directory.

Link to comment
Share on other sites

46 minutes ago, Nocta said:

Did you set custom command-line parameters for every single game?

After getting information from cpujunkie & JoeViking245, I changed the way I initially had everything laid out in my 1st post.

I deleted everything from the Edit Game / Launching / Emulation / Use Custom Command-line Parameters section. The only custom command-line I have is listed in the Manage Emulators / Ares / Details / Default Command-Line Parameters section (see the last screen shot I posted yesterday).

Link to comment
Share on other sites

Posted (edited)

Thanks to @Special T, I found the solution to my fullscreen problem while keeping ares functional for multiple systems!
You need to set a default command-line in associated platforms as follow - eg N64:

--fullscreen --system "Nintendo 64"

 

Nonetheless, It seems to me that we are trying to hard code something that Launchbox could handle for us in a cleaner way.
@Jason Carr, any chance you are looking into implementing the native support and configuration of Ares into Launchbox in the near future?

Edited by Nocta
Solution!
  • Like 1
Link to comment
Share on other sites

25 minutes ago, Nocta said:

It seems to me that we are trying to hard code something that Launchbox could handle for us in a cleaner way, no?
@Jason Carr, would it be possible to have the option to put arguments after the game path? It would make handling this scenario so much easier.

Not been a part of this entire conversation to see what the pinch point you all are running into but this is already possible using %romfile% in your command line. So if you wanted "ares.exe c:\Path\To\Rom.file --fullscreen" (without quotes) it'd be "%romfile% --fullscreen" (without quotes). For that to work you'd probably want to leave quotes on and then you'd want "Remove file extension and path" to be unchecked. Both those check boxes affect what that variable outputs. %romlocation% doesn't unfortunately but it'd be interesting to look into if we could change that without breaking anything for users.

  • Thanks 1
Link to comment
Share on other sites

  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...