Jump to content
LaunchBox Community Forums

RetroArch MAME core passing arguments


cpujunkie

Recommended Posts

figured out how to copy the post

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 3
  • Thanks 4
Link to comment
Share on other sites

Can't get it to work tried a bunch of different stuff oh well. 1st a few questions why does example one not need the -rp tag and path added in. Should I be pointing the path to my rom paths or my bios paths because in this case the bios are in my MAME folder but the roms for the system Atari 5200 are in their own folder (I did copy the bios to the rom path at one point but still isn't working) I even tried feeding the a5200 both paths but still wouldn't open.

Link to comment
Share on other sites

the why on example 1 not having a -rp (rompath) is because the core has generated the ini file with that info in it so I tested it without and it worked.

The rompath is there for the bios the mame core is looking for. In my neocdz.ini the rom path has a directory listed. You could run once, edit the corresponding ini file to fill in the rompath and not have the whole -rp c:\directory in the command line.

I believe to be able to generate an ini file the option of mame_write_config has to be enabled and probably also mame_boot_from_cli has to be enabled in the retroarch cfg file of retroarch-core-options.cfg

Edited by cpujunkie
Link to comment
Share on other sites

Okay I did get this working just as quick pointer to any one I would suggest after getting an initial ini for any system you just copy it and rename it to any other systems you want to use this will keep you from having to add the -rp tag and the path that goes with it.

Link to comment
Share on other sites

This works great once you have it set up and working with one system adding the next one is as easy as copying any ini you have and renaming it to the next system you want to setup then adding the system to the associated platform section of the emulator. I probably won't be switching over to using this from my main emulators but it is nice to have as a secondary option. Thanks for sharing your finding with the community its greatly appreciated.

  • Thanks 1
Link to comment
Share on other sites

Just some tips that I found helpful when setting this up for myself.

Make sure you have a set of mame compatible bios for the systems you want to use this for and put them all into a single folder. I found it convenient in my setup to just put all the bios files in:

\Retroarch\system\mame\roms

If you have troubles getting Retroarch to generate a system ini file you can simply copy over your mame.ini file from a stand alone install of Mame. Once you get your paths all set in that you can just make copies and rename them accordingly using the list here https://pastebin.com/18W3EbD0

With all this setup you don'e need the -rp and path to roms in the command line, all you need is the short version:

"a5200  -cart \"%romfile%\"

You can get the information for each system using the link above.

Link to comment
Share on other sites

Is there any spaces in the path\file name for the rom? That was the thing causing people the errors in loading was needing quotes around the whole arguments and the quotes around the file name. That's where the backslashes around the quoted romfile and path come in. They tell the command line that the argument doesn't end at that second quote. If the path\file doesn't have spaces we could just add it to the normal retroarch emulator entry. This whole thing started because I wanted to run neogeo cd in retroarch and the cd image file names and path have spaces in them.

Link to comment
Share on other sites

The actual path of my 5200 games is this:

H:\Emulation\Roms\Atari 5200

Here is my Associated Platforms window for my Retroarch Mame Consoles emulator in Launchbox. 69334590_2018-06-1314_17_19-EditEmulator.thumb.png.e88e7ad6b10c2d658f4fb0cec053eada.pngHere is my paths that I set in the ini files for each system I use it for.

1569724018_2018-06-1314_19_32-H__Emulation_Emulators_Retroarch_system_mame_ini_a5200.ini-Notepad.thumb.png.e071fedd580e7b176d43fc8aaca2979a.pngFor simplicity and organizational reasons I put my bios files in this folder:

H:\Emulation\Emulators\Retroarch\system\mame\roms

 

  • Thanks 1
Link to comment
Share on other sites

  • 9 months later...
7 hours ago, Lordmonkus said:

I believe the Retroarch\system\mame\ini folder.

It's been a while and I no longer have this set up so could be remembering wrong.

I thought that may be the case but I thought I would ask as I know due to being a pain to set up and the standalone of course being a lot better there is hardly any info out there on the matter. I appreciate your reply.

Link to comment
Share on other sites

7 hours ago, Lordmonkus said:

I believe the Retroarch\system\mame\ini folder.

It's been a while and I no longer have this set up so could be remembering wrong.

Oh! SOrry, I just wanted to ask too if you remember when you copy your mame.ini across and rename it does it have to be a fresh mame.ini as in what you would get just after installing MAME or can it be a mame.ini that you have had for a long time? I ask because the version of MAME I have has been on my computer for quite some time and bound to have some setting changed, thanks.

Link to comment
Share on other sites

  • 2 years later...

I have just tried this and have two problems, the first one being the big problem as this is not working for me:

1. I imported software list roms from MAME. When I load a game, the Retroarch screen shows a blank screen for about 5 seconds and then closes without the game loading. I have attached an image of the config, where all software list ROMS are in the default location: E:\MAME\roms\systemname - I tried this for A5200 and SCV (super cassette vision) and both had the same problem.

2. When importing Software List game ROMS, not all images are downloading for the games. If I use a No Intro or other set, it downloads the game images, but they will not work in MAME being in the wrong format. I am also guessing renaming the MAME software list game ROMS will screw things up (and Software List updates), so is there a way around this so when importing MAME software List ROMS it downloads the game images for them?

2021-04-11 16_19_16-LaunchBox.png

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