Loading MAME game configs (mame\cfg\game.cfg)

Hi all

i am trying to get Ultimate Mortalk Kombat 3 to load the umk3.cfg file i have for it. This enables additional fighters. The file works perfectly in MAME.

In MAME each game has its own config. The path to it is like this:

d:\mame\cfg\umk3.cfg d:\mame\cfg\galaga.cfg …

I would like to read this configuraiton file in retroarch as well.

I put the files under the following path:

d:\retroarch\system\mame\cfg\umk3.cfg

when I load the game, in the console it states: -cfg_directory d:\retroarch\system\mame\cfg

So I think it recognizes the path correctly. However instead of loading the config, it OVERWRITES it with default values.

Any Ideas? A bug in the mame_libretro? Or me doing something wrong?

Thanks for your advice!

The usual place for cfg is in \SaveDirectory\mame\cfg\ with the save directory being the one you decided in the paths menu. Then it’s possible some values in the cfg files are not working. Don’t know if you can do what you want with an ini?

Cfgs go. Into the save folder as he said. I’m curious. Can you paste the contents of the file?

Hi this is the file content:


<?xml version=“1.0”?>

<mameconfig version=“10”> <system name=“umk3”> <input> <port tag=“DSW” type=“DIPSWITCH” mask=“1024” defvalue=“1024” value=“0” /> </input> <mixer> <volume_multiplier final=“256” final_max=“2560” mixer=“256” mixer_max=“2560” /> </mixer> </system> </mameconfig>

…and here is the console output when i run the game:

Retro SYSTEM_DIRECTORY D:\Emulators\retroarch\system Retro SAVE_DIRECTORY D:\Emulators\retroarch\system Retro CONTENT_DIRECTORY (null) value: disabled value: disabled value: disabled parse path failed! path=d:\emulators\arcade\mame\mame-roms\umk3.zip creating frontend… game=d:\emulators\arcade\mame\mame-roms\umk3.zip args: mamemini args: -joystick args: -noautoframeskip args: -samplerate args: 48000 args: -sound args: -contrast args: 1.0 args: -brightness args: 1.0 args: -gamma args: 1.0 args: -cheat args: -rompath executing frontend… params:37 parameters:mamemini -joystick -noautoframeskip -samplerate 48000 -sound -contrast 1.0 -brightness 1.0 -gamma 1.0 -cheat -rompath d:\emulators\arcade\mame\mame-roms -cfg_directory D:\Emulators\retroarch\system\mame\cfg -nvram_directory D:\Emulators\retroarch\system\mame vram -memcard_directory D:\Emulators\retroarch\system\mame\memcard -input_directory D:\Emulators\retroarch\system\mame\input -state_directory D:\Emulators\retroarch\system\mame\states -snapshot_directory D:\Emulators\retroarch\system\mame\snaps -diff_directory D:\Emulators\retroarch\system\mame\diff -samplepath D:\Emulators\retroarch\system\mame\samples -artpath D:\Emulators\retroarch\system\mame\artwork -cheatpath D:\Emulators\retroarch\system\mame\cheat -mouse d:\emulators\arcade\mame\mame-roms\umk3.zip SOURCE FILE: src/mame/drivers/midwunit.c PARENT: 0 NAME: umk3 DESCRIPTION: Ultimate Mortal Kombat 3 (rev 1.2) YEAR: 1994 MANUFACTURER: Midway machine screen orientation: HORIZONTAL W:399 H:253 , aspect ratio 1000/750=1.333333 osd init done ChangeAV: w:399 h:253 ra:1.333333 0.000000 game screen w=399 h=253 rowPixels=399

I have now defined a savepath:

cfg_directory D:\Emulators\retroarch\save\mame\cfg

But no change unfurtunately :frowning:

I think the path is not the problem, because whenever I exit the game, it overwrites the config in the path I specify with the default values. For me this means the system knows where to locate the config.

BTW , seem to be a pretty old one. Have you try with a recent mame svn core ?

Try the Mame from this post AndresSM compiled.

OK I switched to the megapack build now 20140105. Unfortunately still no luck. It overwrites the file with default values when you exit (or creates the file if it is not there). But it apparently does never read it when the system loads.

So I am thinking now this is a bug or unsupported in the mame_libretro.

AndresSM if you would like to look into this, just create the umk3.cfg file above and try it with MAME. The game starts with the middle three character slots filled instead of three empty boxes on the character selction screen. When you remove the umk3.cfg, MAME will also create it with default values and the additional characters are not shown anymore.

Thanks for your help guys!

Tatsuya79, thanks for the link to the newest build. Tried it, but it still overwrites the .cfg with defaults instead of using it.

do you use any MAME variant other than VANILLA STOCK mame? That dip is not exposed via the dip menu. Generally speaking anything not exposed by default is not saved in vanilla MAME. For me, it’s using the cfg file correctly, just not with values outside of what’s tweakable by default.

For example, changing any other switches works correctly. Make sure you enable the “Read config” option under core options

Ok, got them unlocked. For starters, you have an error in your dip setting that’s why it always resets:

<port tag="DSW" type="DIPSWITCH" mask="1024" defvalue="1024" value="0" />

should be

<port tag=":DSW" type="DIPSWITCH" mask="1024" defvalue="1024" value="0" />

You are missing the colon there in front of DSW

That’s why that is being stripped out. But that didn’t unlock them for me. Download cheats.7z at pugsys and save it at System\MAME\

Enable cheats on core options, and go to the cheat menu, there you can see the instructions, and they are enabled permanently (unless you erase your NVRAM)

I Don’t mean to hijack this thread, but to AndesSM, how many of Mame’s folders are required in system\mame ? Oh, and thanks for the build you posted in that other thread. That was great.

None are required. I recommend having the hash folder, and ini in case you want to tweak stuff not available in core options. I’ve tried to add everything important as a core option.

The most up-to-date instructions are here: https://github.com/libretro/libretro-mame/

Interesting, in MAME all I have to do is put the file in the cfg folder. Anyways I will give the cheat option a try. Thanks a lot.

However these characters can be unlocked ingame (meaning without changing any DIP Switches), by entering an “ultimate kombat kode”. When I unlocked them for the first time in MAME I did just enter the “kode” correctly and that permanently unlocked the chars. Therefore i find it interesting that this has to do with the dip switches.

When I moved to a new MAME build, the characters where gone again until I put in the cfg file from the old version again. Admittetly I have to admit that the version I posted was downloaded. But anyways if I get it using the -cheat option its OK as well I think.

Thanks again for your interest and help!

It doesn’t! you’re the one who said <port tag=“DSW” type=“DIPSWITCH” mask=“1024” defvalue=“1024” value=“0” /> unlocks characters. That’s a dip setting.

I’m guessing you unlocked those in MAME and you have that stored in your NVRAM folder.

What the cheat option does, is autoenter the code for you in the continue screen and unlock those for you, then it’s saved in NVRAM. No idea about what that DIP does, I’m just stating it fails because of the missing semicolon

Thanks for clarifying. Got the cheat codes to working and to unlock the chars in Retroarch now.

Currentyl it does not save this, but I am working on it.

Thanks again for your patience and help!

Have nice evening!