MAME in RetroArch shenanigans

I’m hoping to get an explanation for this. I understand the whole chd files required for certain MAME roms, like Killer Instinct. It runs fine in RetroArch’s MAME core, even with MAME 2010… but… isn’t a bit messy to have the CHD folders inside your MAME rom folder, when they all could be at a dedicated folder in RetroArch\system\MAME ??? How come MAME in RetroArch can access RetroArch\system\MAME\cheats but the ability to store chd files isn’t implemented?

I’ve also noticed thar RetroArch sort of loads the entire MAME emulator alone if you do: RetroArch and then “Load Core”, then “MAME”, then “Start Core”… so I’m guessing what I’m asking needs to be implemented first within MAME itself.

Here’s access to MAME settings:

MAYBE, since MAME creates an MAME.opt file, can I have a way to implement a route for CHD files there?

Thanks in advance.

Is this something that MAME standalone does?

I’ll be honest… I’m just recently attempting MAME emulation through RetroArch. I absolutely have no experience with MAME other than 2 previous times:

  • Back in 2003 when I was 10 years old and I got a CD with roms burned in.
  • Back in 2010 when I tried SDL MAME for my Wii.

But you got me curious and found this: https://www.reddit.com/r/MAME/comments/13clpz5/mame_roms_and_chds_folders/

Apparently, there is a way to edit the MAME.ini file, but that’s in MAME. So I guess, it might as well be possible to add a CHD route using the MAME.opt in RetroArch… only problem is, that I don’t know the exact instruction to write in the MAME.opt, but I’m guessing MAME Documentation must have more info. https://docs.mamedev.org

So, I’ll search for it, and if I find the exact instruction, I’ll simply edit the .opt file and will test. Definitely update the post if I succeed or fail.

the opt file in mame-libretro only provides the functionality that’s already been exposed as a core option. You can’t access anything that hasn’t already been exposed by the core author.

That said, most mame ini stuff can work through the libretro core, so that route may bear fruit.

Played a bit with this idea… this are my findings; spoiler alert: Didn’t worked.

1.- I’ve tried to “Load Core” -> “MAME” -> “Start Core”, then upon loading core “General Settings” nor “Advance Settings” allows me to chose a CHD route… BUT it allows me to set an INI route.

SO

2.- Since I can’t set a CHD folder in neither, I tried to create an “MAME.ini” with Notepad++ in which I’ve specified:

roms     C:\RetroArch\roms\MAME; RetroArch\system\chd

Yet won’t read the “MAME.ini”.even though I set the MAME core to “Read Enable” which should allow to read a “MAME.ini” file.

So… I either I’m too stupid to set this up properly, or straight doesn’t work? I’m more inclined on me being just dumb.

EDIT: Typos

I think I’m having an issue? Apparently… I’m having a syntax issue: Here… take a look… and have in mind that it’s absolutely the exact same mame.ini file copied over from “RetroArch\config\mame” to “RetroArch\system\mame”

yeah, it may not pan out. Some of the ini routines are overridden by libretro functionality. This may be one of them, dunno.

Welp… it was worth a try. Guess I either suck it up, or wait for this option/setting to be implemented by either MAME Team or LibRetro.

Normally MAME needs the CHDs in the same folder as the roms. Each CHD in it’s own subfolder and those subfolders need to have the correct rom name.

Not sure why you want the CHD files in your system directory. But make sure the chd folder has the correct subfolders and maybe the roms as well (each chd subfolder needs a small rom outside of it that has the same filename). Also, try to place the bios files these machines need in there as well.

Also, my rompath in the MAME.ini is like this:

rompath G:\Emulators\MAME\MAMEUI64\Roms;G:\Emulators\MAME\MAMEUI64

Not sure why it has two paths but it looks like there is no space after the " ; " symbol. So maybe try that as well.

1 Like

Safe yourself a giant headache and just copy all the roms, chd folders and software list content into the same folder. Yeah, it’s messy, but this is the way mame expects everything to be set up. Then use a front end like LaunchBox that has a very good built in Mame full set importer.

This way, you will never have an issue of a game not launching, because mame can’t find certain files.

Hey there,

If not an option in MAME itself, maybe doing symlinks to the folders you want directly in your OS could work for you?

I’ve got MAME here both standalone and in RA, but I dont have a big ROM collection, only played games one at a time, so I never bothered with properly organising my stuff… XD

I understand all the “CHD must be in ROMs folder”. Just saying that, if MAME can have access to cheat.zip within: RetroArch\system\mame\cheat.zip… maybe add the option for CHD? My intention is just for organization purposes… nothing else. Again, it’s not a deal breaker. About MAME.ini containing multiple paths in rompath -> is because it reads from first path, if it can’t find roms there, goes to the next path… which makes it ignore spaces, so it ain’t matter if there’s a space or no space after the " path; path2; path3;"

RetroArch Playlist does exactly this. Skips folders, organizes only roms in a single playlist in RetroArch Home Screen. So yes, I’m ditching this idea for now, and will rely solely in Playlist generation instead of navigating to my MAME roms folder each time I want to play a MAME rom.

Honestly I’m not a rom hoarder neither, only having the “absolut must haves”… but suddenly they’ve surpassed a little over 500 games (544 or 550 if I recall correctly, between CPS1, CPS2, CPS3, AtomisWave, Naomi, MAME)

I’m not attempting anything with the idea anymore, so, if anyone is curious to follow up this “idea”, be my guest!

I’m relying solely in RetroArch’s Playlist system, effectively bypassing all this trouble of finding out if CHDs can be added to a \sys\folder.

Honestly i’m a little confused about what you are trying to do. You want your CHDs to be in a separate folder right? I’m pretty sure you can do that.

Just put your CHD subfolders in a separate folder and load your content from there. But in order for them to work, their corresponding .zip roms also need to be in the same main folder. For instance, for Killer instinct you need both the “kinst” subfolder that contains the CHDs and the “kinst.zip” or “kinst.7z” rom outside in the same main folder (my roms are in .7z format). So in your case the path should be like this:

MAME core doesn’t detect .chd files. This is what it says in the mame.info file:

supported_extensions = “cmd|zip|7z”

That’s because the CHDs are useless on their own without their corresponding roms in the same folder. Pretty sure the Standalone also works that way, you can have as many ROM folders as you want but each one needs to have all the files needed for a game to be detected as a whole, you can’t have one part of a game in one ROM folder and another part in a different one, at least i don’t think you can.

Maybe there’s a way to merge the rom and the CHD files inside one single file? I have no idea about that. I use the “merged” Mame romset and the CHDs are still separated. I don’t think there’s a romset that has the CHDs and roms in a single archive.