Jump to content
LaunchBox Community Forums

Can you specify where the ROM path is put in the command line? RetroArch-MAME needs it.


SpaceMidget75

Recommended Posts

Hi,

So, here's the thing. I like to use RetroArch wherever possible, as I'm sure many do as it keeps the interface common. The MAME Retroarch Core replaces the old Mess core for home systems which is fine and it works well outside of LB. The problem is that to use either the MAME (or old MESS) cores, the MAME/MESS parameters need to be put in their own set of quotes - so they are essentially passed to the Core as a single parameter - and this also includes the ROM path unfortunately. Take this example:

retroarch.exe -L "D:\Games\Emulators\RetroArch\cores\mame_libretro.dll"   "a5200 -cart \"[PATH TO ROM]\" "

That extra quote at the end is causing the problem. Retroarch.exe has its personal parameters: -L "[CORE TO USE]" and the core has ITS parameters (that have to be in quotes): "a5200 -cart \"[PATH TO ROM\""

Launchbox always adds the ROM PATH to the end so I can't see how to get it to fit within here: \"[PATH TO ROM\""

Note: The forward slashes are required so that RA knows you have quotes within quotes.

Is there a way around this or does LB support %RomPath% or something along those lines? I'm surprised this has been an issue yet? Maybe a feature request? 

 

Edited by SpaceMidget75
Link to comment
Share on other sites

If you go to Manage Emulators and open an edit window for RA do you have any of the checkboxes checked I recently found that MAME standalone doesn't work for any of the software list stuff if you have the 2 checkboxes on the left checked. I don't have any success with MAME for software list in RA unless I actually use the real software list games with the naming MAME is looking for unlike the standalone version of MAME which will allow you to use any ROM as long as the BIOS file is in the right place in MAME it will load it up. I'm all for trying to use RA for everything but MAME/Mess I prefer the standalone MAME actually has more powerful controller options and pretty good graphics options too.

Link to comment
Share on other sites

Unfortunately those tickboxes only affect how the rom path format, not where is should be placed.

I could fall back to using MAME directly if I have to but I'm surprised LB hasn't gone the "attribute" route yet as it will give it all the future flexibility it needs and can replace those check boxes at the same time:

%fullpath%
%romname%
%foldername%

That way all you need is to specify either in the default command line section or the platform specific one, something like the following:

-fullscreen -rompath="%fullpath%" -someother=setting

It could be toggled on or off with a "Use ROM attribute" checkbox which would then disable the other rom formatting checkboxes.

Link to comment
Share on other sites

  • 1 year later...

Hi

I didn't actually get around to fixing it but did have a solution which is to replace RetroArch.exe as the calling executable with a batch file such as RetroArchMame.bat or something. This then takes the rom path as a parameter (at the end of command line because that's what LB demands) and then places the rom path within quotes inside the batch file when calling RetroArch.exe...etc etc.

Haven't tested it but pretty sure it'll work and doesn't need to be done on a game by game basis or anything.

 

I still think LB should move to an attribute system though. ;)

Edited by SpaceMidget75
Link to comment
Share on other sites

25 minutes ago, SpaceMidget75 said:

Hi

I didn't actually get around to fixing it but did have a solution which is to replace RetroArch.exe as the calling executable with a batch file such as RetroArchMame.bat or something. This then takes the rom path as a parameter (at the end of command line because that's what LB demands) and then places the rom path within quotes inside the batch file when calling RetroArch.exe...etc etc.

Haven't tested it but pretty sure it'll work and doesn't need to be done on a game by game basis or anything.

 

I still think LB should move to an attribute system though. ;)

So multiple parameters can be called. For example, with gp32 where you need to load both a -cart and -memc. I can run this through RA no problem; it's just LaunchBox that becomes the issue and having the correct command line.



 

gp32.PNG

gp32 -cart -memc.PNG

gp32 memc.PNG

gp32 gp32 driver.PNG

Link to comment
Share on other sites

You can pass multiple parameters with batch files (you then use them inside the script as %1, %2 etc etc) so you can do it one of two ways.

Setup a Batch file for each system, hardcoding all the parameters except the rompath, which LB changes based on the game being loaded such as:

RetroArchAtari5200.bat:

retroarch.exe -L "D:\Games\Emulators\RetroArch\cores\mame_libretro.dll"   "a5200 -cart \"%1\"" 

or setup one batch file and then specify the extra parameters within LB itself such as:

RetroArchMame.bat:

retroarch.exe -L "D:\Games\Emulators\RetroArch\cores\mame_libretro.dll"   "%1 %2 \"%3\"" 

and then in LB you'd put something like a5200 -cart in the addition command line parameters section.

 

Of course, either way you will need an "Emulator" setup in LB for each system you want to emulate.

 

 

Edited by SpaceMidget75
Link to comment
Share on other sites

It's funny because for a5200, I have it loading without any changes to the commandline within LB using RA mame core. It requires bios and cart parameters to load from softwarelists, but I have it loading fine. I still think this might be possible via a mame config file loaded into LB.

Have you tested the batch file solution yet?

What's a system that we could try? 

easy.PNG

Link to comment
Share on other sites

I don't have time to work on it at the moment but what's the command line you're using for A5200 because, fact is, if the commandline needs a quote mark after the rom name it's never going to work in LB as standard. Only thing I can think of is that if you're using software lists then the command line is different and is happy to have the rom name right at the end of the commandline? I don't use software lists at all and the command line requires the following:

 

retroarch.exe -L "D:\Games\Emulators\RetroArch\cores\mame_libretro.dll"   "a5200 -cart \"[PATH TO ROM]\" "

For that to work LB needs to pass the rompath inside a quote mark which it can't do with the current design.

 

Link to comment
Share on other sites

I'm using the default for all drivers within the mame core:

RA.exe -L "cores\mame_libretro.dll"

The issue I have is load a system like Game Park 32 where you have to pass both -memc and -cart parameters into the commandline.

If I load mame core then point to my gp32 roms within mame it loads no problem. I also have playlists for Lakka that auto load about 50 mame systems. I think LB isn't reading my config files all the time though for the MAME/MESS systems.

a5200 emulator.PNG

associated platforms.PNG

romfile a5200.PNG

loaded.PNG

Link to comment
Share on other sites

  • 8 months later...
14 minutes ago, JoeViking245 said:

Unless I'm behind on FP updates (which is very likely), the setup is very basic.  If it doesn't seem to work, try different tables.   

image.thumb.png.7a7da49843c9d3ad76bbce9363111ca0.png

So, took me a couple of Google's but I've found why you're finding it so simple! There is a launcher in the downloads section here which gives you the fp.exe

 

After finding that it does indeed make things easy!

One thing I can't get to work is hiding the loading process using the startup screens. I still get the splash and editor window showing with any emulator settings.

 

If anyone has solved this would love to hear!

Link to comment
Share on other sites

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...