Jump to content
LaunchBox Community Forums

How do I setup the CHD folders for MAME?


Recommended Posts

Posted

I've read the 3+ threads in here on setting up MAME but they either don't explain it in a way that makes sense to me or seem wrong/outdated. I have the latest 0.261 merged ROM and CHD sets in their own folders as that makes updating them easy. It's not clear to me how I can configure MAME to search the CHD folder for missing files whenever a game that needs CHDs is required?

Posted

First you need to create your mame.ini file by typing "mame -cc" in your MAME folder.  Then modify the rompath line as follows to include the location of your CHD files.

#
# CORE SEARCH PATH OPTIONS
#
homepath                  .
rompath                   roms;C:\MAME ROMs\MAME 0.261 ROMs (non-merged);C:\MAME CHDs\MAME 0.261 CHDs (merged)

 

Just adjust things to match your folder structure and location.  My roms are at C:\MAME ROMs\MAME 0.261 ROMs (non-merged) and my CHDs are at C:\MAME CHDs\MAME 0.261 CHDs (merged).  Remember to include the semicolons.  Once you are finished MAME will run the CHD games without hesitation.  Take care.

  • Like 2
Posted

Additionally you can just launch the mame.exe without a game. Then while Mame is open just go to >Configure Options >Configure Directories >Roms then just manually locate your folders. Save that and the ini file and your Rom/CHD paths will be set. 

Posted

Alternately, (just to give more options and possibly confuse matters worse ;)) rather than messing with mame.ini (whether it exists or not) you can place the CHD folder(s) in the same location as the ROMs. 

D:\LaunchBox\Games\Arcade\gauntleg.zip
D:\LaunchBox\Games\Arcade\gauntleg\gauntleg.chd

Then edit your MAME emulator (in LaunchBox) and in the Default Command-Line Parameters, add

-rompath %romlocation%

image.thumb.png.d4fd939a6a8efe5b662721f12a7226a7.png

 

Caveats:

  1. This won't work if you like to keep your CHD set in its own folder.  i.e.   D:\LaunchBox\Games\Arcade\CHDs\gauntleg\
  2. This will only work if in your games Launching section, the ROM File [path] is the full (or relative) path to the main ROM (gauntleg.zip) for the CHD
    • Which, by default it should be.  i.e.  "Games\Arcade\gauntleg.zip"  or  "D:\LaunchBox\Games\Arcade\gauntleg.zip"
Posted

Yeah that's the problem with that advice - Ideally the CHDs are in their own directory as that helps with updating the torrent on new versions. But the mame setup is perfect thanks!

  • 3 months later...
Posted
On 12/30/2023 at 9:00 AM, B-17 Bomber said:

First you need to create your mame.ini file by typing "mame -cc" in your MAME folder.  Then modify the rompath line as follows to include the location of your CHD files.

#
# CORE SEARCH PATH OPTIONS
#
homepath                  .
rompath                   roms;C:\MAME ROMs\MAME 0.261 ROMs (non-merged);C:\MAME CHDs\MAME 0.261 CHDs (merged)

 

Just adjust things to match your folder structure and location.  My roms are at C:\MAME ROMs\MAME 0.261 ROMs (non-merged) and my CHDs are at C:\MAME CHDs\MAME 0.261 CHDs (merged).  Remember to include the semicolons.  Once you are finished MAME will run the CHD games without hesitation.  Take care.

This helped me kind sir :)

I ran it without in command line parameters

-rompath %romlocation%
  • 1 month later...
Posted

I am not able to get my CHDs to work. 

I have always ran my own installation of Mame, and CHDs have always worked, but figured i would try LB's auto setup of Mame and now CHDs dont work.

i keep my roms and CHDs separate. I added the rom and chd folders by opening mame in LB's Mame folder and adding through the gui. Everything works fine in Mame, but when i try running from LB, it doesn't do anything. I then copied sf3 folder from my chd folder into the rom folder and it worked from LB. 

My paths are in the mame.ini

#
# CORE SEARCH PATH OPTIONS
#
homepath                  .
rompath                   "roms;M:\Mame\MAME Roms;M:\Mame\MAME CHDs"
hashpath                  hash
samplepath                samples;M:\Mame\Extras\samples
artpath                   artwork
ctrlrpath                 ctrlr

 

Not sure why setting up my own version of Mame works, but the auto version of Mame doesnt. 

Posted
1 hour ago, maabus said:

Not sure why setting up my own version of Mame works, but the auto version of Mame doesnt. 

In LaunchBox, edit the MAME emulator LaunchBox setup for you.  Since you've added the paths to rompath in MAME itself, in the default command-line parameters, remove   -rompath %romlocation%

Posted
1 hour ago, JoeViking245 said:

In LaunchBox, edit the MAME emulator LaunchBox setup for you.  Since you've added the paths to rompath in MAME itself, in the default command-line parameters, remove   -rompath %romlocation%

Thanks Joe! You rock!!!!

  • Game On 1
  • 2 months later...
Posted (edited)

Well I tried the mame -cc command and it does not create the ini file. Is there something I do wrong_ I use mame 268 (the latest one)

Also where is the folder option from the picture shown here. That could maybe the solution to my problem.

Edited by Drake008
Posted
1 hour ago, Drake008 said:

Well I tried the mame -cc command and it does not create the ini file. Is there something I do wrong_ I use mame 268 (the latest one)

Running that command from the Windows Command Prompt from within the folder that contains mame.exe should create mame.ini.  Then when you close the Command Prompt window and are back in Windows Explorer, the file should be right 'next' to mame.exe.  If you don't have file extensions showing, the file type you're looking for is Configuration settings.

image.png.5619c14ac13d7e58d5ff28ba12423018.png

 

Posted (edited)

I have it now. Just wgen U put the folders in it the programm does not open for example Killer Instinct 2 The paths look like so

 

homepath                  .
rompath                   "e:\MAME\MAME 0.268 ROMs (split)\";"e:\MAME\MAME 0.268 CHDs (merged)\"

 

Must I do something else or isa the paths folder too long?
 

Maybe that thing in the picture shown? But I do not find this option to show that specific window.

Edited by Drake008
Posted
6 hours ago, Drake008 said:

rompath                   "e:\MAME\MAME 0.268 ROMs (split)\";"e:\MAME\MAME 0.268 CHDs (merged)\"

 

Must I do something else or isa the paths folder too long?

Don't put trailing slashes on the paths and don't "quote" "each" "path".  Only "quote the whole thing".

rompath       "e:\MAME\MAME 0.268 ROMs (split);e:\MAME\MAME 0.268 CHDs (merged)"

 

  • 1 year later...
Posted

I have the settings like so in the mame.ini

rompath              "roms;e:\Romvault MAME\RomRoot\MAME CHDs (merged);e:\Romvault MAME\RomRoot\MAME ROMs (split)"
 

and when I try to start a chd game like Killer Instinct it gies black and then back to the launchbox menu. Normal roms are running fine. What do I do wrong here?

Posted
24 minutes ago, Drake008 said:

I have the settings like so in the mame.ini

rompath              "roms;e:\Romvault MAME\RomRoot\MAME CHDs (merged);e:\Romvault MAME\RomRoot\MAME ROMs (split)"

and when I try to start a chd game like Killer Instinct it gies black and then back to the launchbox menu. Normal roms are running fine. What do I do wrong here?

Did you remove -rompath %romlocation% from the command-line parameters? (Tools-Manage Emulators-Edit [MAME])

Posted

Thanks for that. I didnt do this.

17 hours ago, JoeViking245 said:

Did you remove -rompath %romlocation% from the command-line parameters? (Tools-Manage Emulators-Edit [MAME])

eaTh

  • Like 1
Posted

Update to handling CHD paths using LaunchBox's built-in parameters and negating the need to edit mame.ini.

When your CHD folders are not subfolders of where your [regular] ROMs are located:

Example:

  • G:\Roms\MAME\MAME 0.287 ROMs (non-merged)\area51.zip
  • G:\Roms\MAME\MAME 0.287 CHDs (merged)\area51\area51.chd

In LaunchBox, edit your MAME emulator. The default command-line parameters should already contain -rompath %romlocation%.  Attach to that, a semi-colon, a double-quote mark, the full path to your CHD folder and another double-quote mark.

That part of the command-line parameters in this example will now look like this:

-rompath %romlocation%;"G:\Roms\MAME\MAME 0.287 CHDs (merged)"

Do not add any spaces before or after the simi-colon nor quotes.  Also, no trailing-slash at the end of your CHD path.

 

All thanks go to @faeran who messaged me this Unusual Gem saying, "Another way to handle this... separate paths with a semi-colon".  (a kind-of Homer Simpson forehead-slap, "doh" moment. Of course this works! ;))

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