Previous Thread
Next Thread
Print Thread
MAME's linux folder structure #117179 04/15/20 03:22 PM
Joined: Apr 2020
Posts: 1
cjspizz Offline OP
Member
OP Offline
Member
Joined: Apr 2020
Posts: 1
Hi all. I could use some help understanding the MAME linux (Ubuntu-based) folder structure better. In Windows, everything goes in the MAME folder, e.g. C:\MAME\. In contrast, in Linux Mint, I find the following:

  • /usr/games [MAME binary location]
  • ~/.mame ["Core Output"/settings folders, i.e. cfg, diff, nvram, sta, ui, and the files ui.ini and mame.ini]
  • /etc/mame [config files, including another mame.ini]
  • /usr/share/games/mame AND some are also in /usr/local/share/games/mame [support file folders, e.g. artwork, cheat, samples, etc.]


A couple questions:

  • Why are there two mame.ini files? Which one should I edit when I need to make changes?
  • The ui.ini file references support file folders that don't exist, but that I'd like to create, e.g. "marquees_directory [TAB] marquees". In Windows, that means the "marquees" folder goes in MAME's 'root' folder, i.e. C:\MAME\marquees\. There's no such MAME root folder for linux, so where is ui.ini looking for these folders?


The mame.ini and ui.ini files seem to read like they're operating in a Windows environment, and I could really use help understanding how to interpret them for linux.


if ( hasFever() ) {
return ((Cowbell) Prescription.getInstance ())++;
}
Re: MAME's linux folder structure [Re: cjspizz] #117180 04/15/20 03:37 PM
Joined: Mar 2001
Posts: 16,539
R
R. Belmont Offline
Very Senior Member
Offline
Very Senior Member
R
Joined: Mar 2001
Posts: 16,539
I'm guessing that's a distro packaged MAME rather than a self-compile, because that's definitely not how MAME is set up by default.

Regardless of that, everything comes from mame.ini, so you can edit mame.ini to point to whatever you'd like (on my system, the rom folders point to an NFS network drive, for example).

Re: MAME's linux folder structure [Re: cjspizz] #117264 04/25/20 05:27 PM
Joined: Oct 2018
Posts: 2
D
Doc Flareon Offline
Member
Offline
Member
D
Joined: Oct 2018
Posts: 2
/etc/mame/mame.ini is the system-wide default copy of the settings file. ~/.mame/mame.ini is your personal version of the file, which will overrule the system-wide version.

If you don't give the full path name, mame will default to $HOME/marquees

Re: MAME's linux folder structure [Re: cjspizz] #117275 04/26/20 07:52 PM
Joined: Mar 2009
Posts: 57
M
mochamame Offline
Member
Offline
Member
M
Joined: Mar 2009
Posts: 57
I don't know about you, but I'm using the C.Falco PPA in Ubuntu and the way they set up the defaults is a little bit confusing because you don't always have write permissions to the directories outside of your /home/. To avoid all these problems my /etc/mame/mame.ini file only has one line in it:

Code
inipath                  $HOME/.mame


That way it always points to the .mame directory in my home.

Another trick I've learned is don't mess with the defaults for hashpath, fontpath, plugins, or languagepath. The files in those directories are version dependent and everything gets screwed up if you have those directories pointing to something that doesn't get updated with each release. Copy over those paths over from the /etc/mame/mame.ini file.

One final trick since I've started using the default UI more these days; rename the /etc/mame/ui.ini file to something else, and then create a new ui.ini file under your /home/xxx/.mame/ directory and use that file to define all of your UI search path options.

Re: MAME's linux folder structure [Re: mochamame] #117466 06/27/20 11:01 AM
Joined: Mar 2008
Posts: 154
wallyweek Offline
Senior Member
Offline
Senior Member
Joined: Mar 2008
Posts: 154
Originally Posted by mochamame
I don't know about you, but I'm using the C.Falco PPA in Ubuntu and the way they set up the defaults is a little bit confusing because you don't always have write permissions to the directories outside of your /home/.

.deb packages are intended to be sytem-wide, i.e. they must take into account that multiple users could take advantage of them, even games or emulators. So

  • /usr/share/games/mame/roms is there in case some free rom will be bundled with Mame in the future
  • /usr/local/share/games/mame/roms is the best place to put your roms if you have two daughters playing Mame with their own user and you don't like to waste hd space making different copies of your full rom set wink
  • $HOME/.mame/roms is what hard-retrogamers are looking for smile


Please have a look at /usr/share/doc/mame/README.Debian, some other good infos there.

Originally Posted by mochamame
To avoid all these problems my /etc/mame/mame.ini file only has one line in it:
Code
inipath                  $HOME/.mame

That way it always points to the .mame directory in my home.

There's no need to tamper with /etc/mame/mame.ini for this. That's exactly what it does by default. wink
Code
inipath                  $HOME/.mame;/etc/mame

If you remove the trailing /etc/mame your only achievement is to loose the path to presets ini files for some systems bundled with Mame. You may not need them, but other users may do. wink

Originally Posted by mochamame
One final trick since I've started using the default UI more these days; rename the /etc/mame/ui.ini file to something else, and then create a new ui.ini file under your /home/xxx/.mame/ directory and use that file to define all of your UI search path options.

Again, you don't need to change anything in the /etc/mame tree. Mame scans your $HOME/.mame/ directory first and goes on if nothing is found there only.

The multiple-semicolon-separated-path is a basic MAME configuration feature, and it's not confusing at all once you grasp it. smile


Master of Sarcastic Wit
Linux User #182984

Moderated by  R. Belmont 

Who's Online Now
4 registered members (Vas Crabb, Dorando, Heihachi_73, Alegend45), 70 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
ShoutChat Box
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Forum Statistics
Forums9
Topics8,792
Posts115,722
Members4,908
Most Online890
Jan 17th, 2020
Powered by UBB.threads™ PHP Forum Software 7.7.3