Jump to content
LaunchBox Community Forums

Need clarity: How LaunchBox passes command-line parameters to the RetroArch MAME_Current core


coliver33

Recommended Posts

All -- I am using the MAME_Current core in RetroArch to emulate the Acorn Archimedes.  In standalone MAME, the actual command line that I use to load one of the Archimedes games is:

mame aa310 -bios 200 -flop1 "<path to ROMfile>"

This works like a charm.  aa310 is the machine.  I have the aa310.zip file in the same directory as the game ROMs, so it's picked up just fine.  One note: -flop1 expects a filename argument after it -- it crashes if I don't have the ROM path after it in the command line.

So now -- as I cut over to the RA MAME_Current core, I have RetroArch set up in LaunchBox with "aa310 -bios 200 -flop1" as my Extra Command-Line Parameters for the Archimedes platform -- and of course nothing happens.

How exactly do I translate the MAME standalone command line above into LaunchBox so that the arguments are passed from LaunchBox to RetroArch to the MAME_Current core?

The answer to this question will answer my real meta-question, which is: How exactly does LB package up CLI options for RA and (subsequently) for RA cores?

Thank you for any feedback or guidance!

Chris

Link to comment
Share on other sites

2 hours ago, coliver33 said:

All -- I am using the MAME_Current core in RetroArch to emulate the Acorn Archimedes.  In standalone MAME, the actual command line that I use to load one of the Archimedes games is:

mame aa310 -bios 200 -flop1 "<path to ROMfile>"

This works like a charm.  aa310 is the machine.  I have the aa310.zip file in the same directory as the game ROMs, so it's picked up just fine.  One note: -flop1 expects a filename argument after it -- it crashes if I don't have the ROM path after it in the command line.

So now -- as I cut over to the RA MAME_Current core, I have RetroArch set up in LaunchBox with "aa310 -bios 200 -flop1" as my Extra Command-Line Parameters for the Archimedes platform -- and of course nothing happens.

How exactly do I translate the MAME standalone command line above into LaunchBox so that the arguments are passed from LaunchBox to RetroArch to the MAME_Current core?

The answer to this question will answer my real meta-question, which is: How exactly does LB package up CLI options for RA and (subsequently) for RA cores?

Thank you for any feedback or guidance!

Chris

The main issue is doesn't appear you added the variable to append the rom file.  For MAME and RA the following setup works.  Note I make a separate RA core entry specifically for anything in the former MESS (or Software List ) category as they are treated differently than arcade and avoids messing up your arcade setup.  This also assumes you have copied your MAME XML files and they correspond to the core version. 

Make sure entry has "remove quotes" checked. 

Screenshot2024-11-01095821.thumb.png.e63cc100175be4ecabda08137afaa835.png

Append the %romfile% variable to your command which tells LB to take whatever was imported as the rom file and append to command line.  It will also follow the check boxes above as to how parses command line.  Note double quotes like this example for Atari 5200.

"a5200 -cart \"%romfile%\""

Screenshot2024-11-01095842.thumb.png.afd657defe60c0b87cf4dc83866b5a03.png

 

  • Like 1
Link to comment
Share on other sites

2 hours ago, coliver33 said:

How exactly does LB package up CLI options for RA and (subsequently) for RA cores?

When you edit your RetroArch emulator in LaunchBox, in Associated Platforms next to the platform name you have your selected core_name to use for that platform.  RetroArch needs -L to prefix the core_name.

Next to that are the parameters you want/need to use for that platform. 

Depending on what checkboxes you have checked in the Details section, when you launch a game, LB will suffix the command with "full/path/to/rom.ext" or rom or a variation there-of.

The parameters and ROM_file need to be encapsulated in quotes.

Put that all together and you get:    

-L core_name "parameters rom"

or if you use the full path, no quotes

-L core_name "parameters \"full/path/to/rom.ext\""

Note that the quotes added to the full/path/to/rom.ext need to be escaped (forward slash).

 

Using Atari 2600 as an example, from the Window Command Prompt, you'd type

retroarch.exe -L mame_libretro.dll "a2600 -cart \"D:\ROMs\Atari 2600\frogger.zip\"" 

 

Or just follow what @sundogak wrote. :D   (he types faster than me ;))

Link to comment
Share on other sites

@sundogak Are you physically creating a separate install of Retroarch that just handles the MESS/SW LIst platforms?  My current instance of RA uses MAME_Current for the arcade set, plus of course I use it for other platforms like Atari 2600, etc. (Stella).  Should I create a whole separate RA instance, with the hashes copied in, etc.?  Or can I use the existing RA install here as well?

Link to comment
Share on other sites

10 minutes ago, coliver33 said:

@sundogak Are you physically creating a separate install of Retroarch that just handles the MESS/SW LIst platforms?  My current instance of RA uses MAME_Current for the arcade set, plus of course I use it for other platforms like Atari 2600, etc. (Stella).  Should I create a whole separate RA instance, with the hashes copied in, etc.?  Or can I use the existing RA install here as well?

No, it is only within LB as it is just an additional launcher from LB view.  The actual RA install is not modified (nor should be).  Edit with snap: both point to same install only difference is what LB is told to send as commands. 

Screenshot2024-11-01110019.thumb.png.c4b0b9622af79d23dd94ebb502decc22.png

Edited by sundogak
Link to comment
Share on other sites

There are two required BIOS files for this system: aa310.zip and archimedes_keyboard.zip -- I've placed them in a system/mame/bios folder

Notice I have the hash directory under system/mame as well

And I have a mame.ini file under system/mame/INI with all the pathing, for both the ROM directory and the bios directory

I can bring up RA manually, load the MAME_current core, click on the aa310 machine, load a game from that R:Romroot directory, and it loads up fine.

But I get nothing when I click on that same game in LaunchBox, even after putting in all those settings -- RA never comes up -- just stays on LB (figure it's crashing)

If the only extra parameters I use are "a3310 -bios 200", the machine will load from LB and use the correct bios -- but of course there is no ROM loaded to the floppy so there is nothing to play when you click on the floppy drive on the Archimedes desktop.  It's something about the -flop1 and the romfile element that's messing things up...

 

Edited by coliver33
Link to comment
Share on other sites

Don't know if you can run a quick test on this platform to see if it loads for you.  It's something about the way LB is passing these arguments to RA -- because I can get the ROMs to load by going through either MAME standalone directly or RA directly -- just not via LB.

Edited by coliver33
Link to comment
Share on other sites

MAME SL on RetroArch is a pain in the ass. After a lot of try, i ended up using MAME for SL which works perfect.

Anyway i still have some MAME SL systems working:

 

The next configs are working for me right now, so try them.

1) Check RetroArch/config/MAME/MAME.opt file

image.thumb.png.1a7084352bed7cf1126376b88af22239.png

 

2) Check RetroArch/system/mame/ini/aa3000.ini file

rompath points to the folder with bios (in my case the complete MAME romset. Not the SL one)

be sure aa3000.zip is in the rompath folder.

image.thumb.png.7c4ff6df60dc736c51c92bbe9e260a99.png

3) Check only "Remove quotes" in your RetroArch SL emulator.

image.thumb.png.ac083d5d37e04982d3d687a4328fa410.png

4) Use the right command for your platform

image.thumb.png.16ad46aa43c1a5f6f7a54e8fa03f9db7.png

5) cfg files are in this folder, in case you need them for something:      RetroArch/saves/MAME/mame/cfg

Hope this helps.

Link to comment
Share on other sites

1) Yes, it works for me.  RA with MAME standard core:

RetroArchScreenshot2024_11.01-15_26_45_02.thumb.png.89e3913be4cbfb16a310cb69504e5106.png

Screenshot2024-11-01152934.thumb.png.9f5e6a979825b15e2e9b5598a3733736.png

2) Using the base MAME core you don't need to move anything around from standard install of MAME arcade and MAME software lists.  Bios files remain as for normal MAME. So you don't need to move the bios into System folder for RA. 

3) MAME.ini for RA in system directory doesn't looks consistent.  Should just point to standard MAME arcade ROMs folder and standard MAME software list set. If have CHDs separate then those as well.  Example: 

Screenshot2024-11-01153519.thumb.png.8cf757be5a1192beaf562b1271608a00.png

4) Then on your MAME options file for RA should have this which for SL the red boxes are key:

Screenshot2024-11-01153625.thumb.png.66da3a0255f2e57b8da25a6c2642209e.png

Using above you can keep a normal MAME set and also use for RA.  Because of the an issue/coding glitch you have to have updated copies of HASH XMLs and Samples within the MAME RA system folder (won't work pointing to MAME install) even though the intent of the RA "MAME_PATHS_ENABLE" was to be able to use all MAME normal paths.  But at least for ROM MAME paths they can reside outside RA folder structure.

Edited by sundogak
Link to comment
Share on other sites

@sundogak 3 questions:

1) Which version of the MAME_Current core are you using?  I'm on 2.70 and when I look at core options, there is no "boot from CLI" listed in RA.

2) Can you clarify exactly what mame_path_enable does?

3) Does having any spaces or parentheses in my rompath directory paths cause issues?  (you can see in my ini file that my paths have special characters and spaces in them)

Edited by coliver33
Link to comment
Share on other sites

3 minutes ago, coliver33 said:

@sundogak 2 questions:

1) Which version of the MAME_Current core are you using?  I'm on 2.70 and when I look at core options, there is no "boot from CLI" listed in RA.

2) Can you clarify exactly what mame_path_enable does?

RetroArchScreenshot2024_11.01-18_19_37.64_cr.thumb.png.8216e4131836c369ad2852c349a48961.png

2) allows rom paths outside RA System directory, specifically to a normal MAME install path. 

Link to comment
Share on other sites

@coliver33A couple additional things.  It looks like they deprecated that Mame.opt option of "boot from CLI" so wouldn't worry about that line (used to need that so not sure what they did there). 

One thing I noticed is you are pointing LB to Retroarch two folder layers deep. Was that intended to have Retroarch inside another RA folder?

Screenshot2024-11-01232037.thumb.png.099853609f1edd32e8b36b00ab038ee4.png

Screenshot2024-11-01232419.png.0718d790b7a2a15dd68554a2f628075d.png

LB needs to point to same setup EXE as what you are using outside of LB.  In your MAME RA INI above you show RA path one level down (as normal) so you should be pointing to that exe.  Likely that is part of problem as the MAME system files in RA don't match.

Edited by sundogak
Link to comment
Share on other sites

Many thanks to you both, @ci2own and @sundogak -- I figured I'd start fresh today and give some new screenshots/files.

1) The Archimedes ROM I'm testing against is 3dtanks:

image.thumb.png.32c19d3d135e9510d6901dffa6c4fce2.png

image.thumb.png.77e52916ad6c64b0fe4bba2f839d3d2d.png

2) Here is the Retroarch MESS emulator info -- this points to the same executable that I'm using for the arcade MAME set (it always did @sundogak -- I think you were getting confused by @ci2own's screenshots above vs. mine)

image.thumb.png.4dc2b5e0ffde7942c0258b375077845f.png

image.thumb.png.63e7a03150996f2a3ccc33a46c5ce5ab.png

3) Attached is my mame.ini file, updated -- plus screenshot of its location

image.thumb.png.03e980cf1222a9a27c9ee3925687d453.png

mame.ini

4) Attached is my mame.opt file, updated -- plus screenshot of its location

image.thumb.png.de3e0966d7c1f35287a72bf20acbd3a7.png

MAME.opt

5) I have the hash directory (copied over from a .270 standalone MAME install) sitting under system/mame:

image.thumb.png.25f1c6ca6857998d43aa07ef6686cae4.png

6) Here is the path to the archimedes SW list ROM folder -- this is where the 3dtanks.zip lives

image.thumb.png.d28a16c8d1c20de5fb7b32b2790209b6.png

7) @ci2own That extra space in the path is actually correct.  The reason the path is funky is that I'm using a ROM/DAT Manager called RomVault, and this directory name is where the DAT places the ROMs as part of hashing against the DAT.  I have all-things-LB on drive D:, and I have all of my ROMs on drive R: - so I can simply point the LB platforms toward that repository on R: -- comes in handy given that several platforms like Sega NAOMI etc. use the MAME ROMs, so I can point several LB platforms to the same set, managed and updated by the DAT. Now that said, here is a screenshot from inside of the MAME_Current Core, which shows that my paths are all pulling in correctly:

image.thumb.png.71fa5d04c4005fba3c6edb05248c9423.png

8} There are two required files for the Archimedes: aa310,zip and archimedes_keyboard.zip -- both of which live in the MAME fullset directory from my DAT:

image.thumb.png.90f281c4aec51de59838d01a1886a31a.pngimage.thumb.png.e39b2a8289288fb2e80ee8a12910e21d.png

9) From within the RA MAME_Current core, if I select 3dtanks and run it, I get presented with the BIOS selection screen, and I pick the RISC 2,00 option (same as -bios 200 from command line) -- and the machine loads up fine (meaning the paths to my MAME and MAME SL sets are able to find aa310 and keyboard in the MAME set and 3dtanks.zip in the SL set).  And all is well.

image.thumb.png.eff10e46afe9f5942b5884600cf1c082.png

10) Outside of pulling over the hash directory and placing into RA's system directory, I am not using my standalone MAME install at all.  I'm running the full arcade set plus these SL/MESS platforms from the RA core.  (So right now there is no reason for the standalone MAME instance and the RA MAME core to share any files or communicate in any way.)

11) All this being said, when I click on the 3dtanks entry in launchbox (see screenshot) -- nothing happens.  It totally works from within the core itself.  The ini is being read, the ROM paths are being read by the core, the files are all being found (across two directories no less), I'm guessing the hash must be being read by the core as well, otherwise the game wouldn't load from within the core.  And yet -- when I kick things off from LB, I get nothing.  I'm assuming my ROM paths -- even with the spaces, etc. -- are working fine, since they load into the core and the core can follow them -- and clearly I don't need to have the bios files in the same folder as the game ROM, because things are loading fine across ROMpath directories from within the core.  Unless there is just something different about running via command line vs. from within the core itself?  Are there any RA settings outside of the MAME Core settings that matter here?

image.thumb.png.9e9f24ad7ec5afb50b166cdc32c425cb.png

This is the full story of what I'm looking at, I think.  Ideas?  THANK YOU BOTH SO MUCH!

 

 

 

 

Edited by coliver33
Link to comment
Share on other sites

@coliver33 My guess at this point is that spacing in path is causing issues when LB parses command.  Particularly because it is double space and likely some escaping issue and LB missing a "space" so from RA view doesn't know what to launch.  Although I know you said it works outside of LB, we are now dealing with 4 levels of stuff to deal with 1) LB command, RA, MAME, and MAME Software List all of which have their oddities and make difficult to troubleshoot where things are going wrong.  With SL, simple is best on paths. 

At any rate could try two things to check above with particular focus on that "(Merged)" path being double space. 

  1. Under your MAME SL level directory make a simple directory name (say software) and copy the ..software\archimedes\3dtanks.zip, point LB to it and see if that works.  If so then that double space is issue and likely good to know for future as may cause other glitches.
  2. Likely "better" solution.  LB added new variables within last several months (which haven't bothered to try as don't mess with RA if works!).  The %romfilename% strips out path and extension which for MAME SL is actually the preferred way even within MAME standalone as MAME only needs to know the game name not anything else (as takes from XML/INI data).  You also get advantage of MAME using the XML data.  If do it this way then SHOULD take care of any spacing issues as you are not sending anything from LB to RA other than file name (no extension or path).  As you said RA works fine out side of LB then in theory the double space aspect should not come into play from LB view. 
"aa310 -bios 200 -flop \"%romfilename%\""

In example above with zip you used it would then look like this to RA incoming:

aa310 -bios 200 -flop 3dtanks

You keep the RA setup as before as far as check boxes as still need quotes stripped other than what we explicitly put in.

Screenshot2024-11-02123741.thumb.png.867dc64613c91fcbed966816998d927f.png

I tried this and works as well on my setup with %romfilename% and launches 3dtanks. 

Note: edited slightly to delete the "-flop1" to "flop" as if using this method the XML will parse to correct drive. 

Edited by sundogak
Link to comment
Share on other sites

9 minutes ago, coliver33 said:

@sundogakWell.................................

THAT DID IT.  Thank you so much.

Glad figured issue. 

But also in the "Ugh nothing ever simple" ..........the use of %romfilename% will break RA's "Content Directory" overrides if using them.  As RA doesn't seem to be "smart" enough to  parse the MAME.ini it used to launch the program (odd). Will have to do a bit more playing around but if use Content level overrides you have to stick with the %romfile% variable.  You can see how RA sees it if go to Information and once running will revert to Core Overrides.

Edited by sundogak
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...