For MameUI is it possible to set directories (rom, art, etc.) to relative directories so if I change drive letters (I: to E: for example) it'll still work?

So if I put mame on a portable hard drive all the directories will still work?

I don't know, something like ..\MameUI\Roms instead of C:\MameUI\Roms?

Posted Dec 8, 2018, 1:44 PM UTC · edited

411
drstupid•

Sure, you can edit mame.ini and ui.ini (in your root mame folder) with a text editor, and change the directories that way.

mame.ini has a lot of paths in it, for example the rompath and other data files, as well as snapshot directory.

ui.ini has all the supplemental artwork, like flyers, titles, icons.

The .ini file allows relative or explicit paths, and begins in the "current directory," ie your mame directory. So you just would put roms, as the rom folder. My rompath says

roms;roms_sl;chds 

so it will look in 3 folders under the MAME folder. Use semicolon to separate paths; if the path has a space in it, surround it with quotes.

ROMs;"c:\Games & ROMs"

Should work.

6
OverchargedFriendOP•

Ok but what if I have my roms folder outside the MAME folder and I move my drive? Instead of C: it might be I: or Z: on a different day

1
drstupid•

Did you try the dot path in quotes?

"..\folder\folder"

I have no idea if that will work, it's just the only other idea I had; changing my setup around to test it would be difficult so it's easier for you to try it.

If that doesn't work you will probably have a lot fewer problems if you can move your ROM folder so your ROMs are under MAME... since that works with a relative path, it should work on a removable drive whatever the letter.

1
CowBully•

ya, dots don't work :(

1
arbee37•

Yes, relative paths work fine in mame.ini.

2
OverchargedFriendOP•

How do I use them? ..\ doesn't seem to work

1
arbee37•

It should, keeping in mind that they're gonna be relative to the current path when MAME was launched (not necessarily the path MAME is actually in).

1
stealthsock•

By default MAME (as well as MAMEUI) is set up to point to the Roms subdirectory as a relative path. Move the MameUI folder to different drives all you want and it always will look for games in ./Roms. It also uses relative paths with the rest of the asset subdirectories such as ./Samples or ./Flyers.

I am having trouble getting custom relative paths to work using the MameUI's GUI, but editing ini files should do the trick. I see you were only referencing the default Roms path anyway.

2
OverchargedFriendOP•

My bad. I don’t use the default ROMS folder. I use a separate folder outside of mame. So should I use ..\folder\folder\roms or .\folder\foldwr

1
cuavas•

You could use an environment variable - MAME recognises %NAME% syntax on Windows or ${NAME} syntax on other platforms. You could use %MAMEDRIVE%\path\to\folder and set the MAMEDRIVE variable to the root.

1
CowBully•

I'm sorry I'm not sure I understand what you mean by set the mamedrive variable to the root?

1