Jump to content
LaunchBox Community Forums

Passing parameters/arguments to retroarch cores


Guest

Recommended Posts

6 minutes ago, DOS76 said:

no I mean when you launch a game in RA MAME if you hit tab the MAME menu should appear like it would in the standalone version and then from there you can go to the config option and set directories

Oh sorry - just tried that, and no option to set directories, just control/display related for the most part.

Link to comment
Share on other sites

2 minutes ago, DOS76 said:

https://www.libretro.com/index.php/mamemessume-cores/

This is kind of older but it might tell you something. From how I understood it it seems to say you need to use the software list games which is what I was trying to figure out a way around now the link is from 2015 and may not be relevant anymore.

 


 

Yeah, been over that page multiple times.  I actually switched to using softlist roms just to get the cores working properly, and everything was fine until I reached having to use arguments - other than that it works perfectly.

Link to comment
Share on other sites

1 minute ago, DOS76 said:

My bad load it with no game

Umm - how? :)  Start RA, load core - but then how to access/run mame without loading content?  I've always loaded a rom when looking to change parameters

Link to comment
Share on other sites

Yeah I could have sworn I have done this before but can't for the life of me figure out what to do if you have a mame.ini file in your RA\Systems\MAME folder you can add paths in there the same you would with stand alone MAME

Link to comment
Share on other sites

7 hours ago, DOS76 said:

Yeah I could have sworn I have done this before but can't for the life of me figure out what to do if you have a mame.ini file in your RA\Systems\MAME folder you can add paths in there the same you would with stand alone MAME

Tried something along those lines - enabled per system configurations in ume2014, and it did create an odyssey2.ini, with correct rompath even, but it's still failing to locate the bios.  Really makes no sense how the standalone can accept the arguments but the core can not.

Might as well start looking into replicating the way retroarch renders the overlay outside of RA so I can consider mame standalone.  As much as I liked the idea of sticking to only RA cores, I've read the Amiga core is crap compared to FSUAE, so I'm going to eventually have to figure out how to replicate stretching the overlay image the same way RA does.

Link to comment
Share on other sites

GOT IT!

Just as I was about to give up, I gave it one last ditch attempt, going through every possible scenario I could think of with regards to directory structures and location of roms and bios files, both zipped and unzipped, but I finally got it working with the RA Mame core.  Turns out the solution is remarkably simple - best of all, it seems to work with both softlistroms and regular, and is not dependent on file folder structure apart from one very important one.  Just want to do a few more tests on another couple of systems and then I'll post what ended up working for anyone who might care.

Link to comment
Share on other sites

Looks like I spoke just a wee bit too soon - method works, but as I've been concentrating on how to get the RA  core to accept the arguments (which is the main issue), I forgot one little detail: how to get Launchbox to pass this on to RA itself (DOH!) - without which, well, getting it working was just command line academia :P

Link to comment
Share on other sites

Turns out it's also a working directory issue.

Bottom line is that, from what I can tell, unlike with standalone MAME where you can add the required arguments in the the Associated Platforms tab and all is fine, the only way I've managed to get the RA core to pass the parameters properly is with a .cmd file that contains the arguments and full path to rom - and if it's executed from within the RA directory itself, RA MAME doesn't care what your folder structure is as so long as the bios are in the RA rom dir (not in SYSTEM, not in SYSTEM/MAME, SYSTEM/MAME/ROM - just ROM itself inside RA, nor does it care if they're softlistroms or nointro.  So from a commandline perspective, from within RA, its:

Retroarch.exe -L cores/mame_libretro.dll c:\fullpathtonameofcmdfile.cmd

with the .cmd file containing

odyssey2 -cart1 voice -cart2 c:\fullpathtorom

This of course means needing a .cmd file per game, but then I started thinking if it's possible for RA to pass the contents of the .cmd and THEN full path to rom, resulting in only needing 1 .cmd per system - but question is where to enter this within LB itself.

Not to mention this makes the assumption that when LB launches RA, it's from a working directory of RA itself.

Edited by grimm.beam
Link to comment
Share on other sites

1 hour ago, DOS76 said:

so you would probably edit the game in LB and link it to the .cmd file and not the rom itself assuming RA launches the cmd files

It does, and works perfectly.

Now going to work on making it system specific versus game specific as that would simplify things for other who need this for massive collections and not just  a few here and there like myself...

Thanks for all your help thus far.

Link to comment
Share on other sites

  • 1 year later...

I'm going to post this answer in a few different areas on the forum.

I have been trying to figure out how to launch retroarch mame for the systems that don't have a stand alone core. I have finally found a mostly elegant solution

1) Add a New Emulator - I have named mine RetroArch MAME console cores
Add your retroarch.exe
Make sure to check "Don't use quotes..."

01.thumb.jpg.b91feb374b887b1df2cdc6d8f390c7f8.jpg2) Tab over to the Associated Platforms
Here's the magic sauce
 

example 1    "neocdz -cdrm \"%romfile%\""
example 2    "a5200 -rp \"F:\Roms\Atari 5200\" -cart \"%romfile%\""
example 3    "coleco -rp F:\Roms\ColecoVision\ -cart \"%romfile%\""

02.thumb.jpg.1299958207f54d061122c0620a28fb70.jpg

The reason for the "Don't use quotes" and adding this as a new emulator is because of the special thing we have to do to the command line
using mostly the same arguments has standalone mame/mess you have to have all the arguments in double quotes " but because of how Windows handles long file names with spaces the locations have to be in quotes to. This throws retroarch/the windows commandline off. This is where the \ before the double quote at the beginning and the \ before the closing double quote per directory/location. Also we can use the launchbox variable %romfile% to help make this work.

3) On top of all that you also have to specify the rompath if the mame core hasn't generated an ini with the rompath. This is needed for the bios of the core you are loading. If all your mame console bios files are in the same dir you could just use that for each entry

04.thumb.jpg.ae1abefa83d870831a9caf6f23dab6b6.jpg
The core will generate ini files for each system after first run.

05.thumb.jpg.5af3fd10a374548df5ce569f80afabde.jpg

4) I also edited my retroarch core options file. I probably enable boot to bios but I don't at the moment.

03.thumb.jpg.2ef85689a522233643a9626cd8bf95de.jpgThere is my setup for launching roms through retroarch mame.
I hope this helps

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

Dude, this is pretty awesome if you would like to make this it's own guide that would be great and then I would put it in the Guides and Tutorials thread.

One thing I would like to add to this, when I was following these instructions the ini folder in \Retroarch\system\mame\ did not get auto created. What I did though was I copied the mame.ini file from my stand alone Mame install and created the ini folder and dropped the ini file in there and edited it accordingly.

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