stablerom
Posts: 2
Joined: Mon Jan 07, 2019 10:51 pm

ROMs Directory Structure Question/Suggestion

Tue Jan 08, 2019 4:43 am

I've used MAME for a long time, and MESS before it was rolled into MAME. One of the problems that affects first time MAME users is directory setup. We have ROMs, CHDs, Software Lists, Extras, Media... I understand how to set up MAME but many people new to MAME or people who would like to use MAME struggle with setting the directories. I have a possible solution to simplify the directory setup, maybe two.

When MAME ROMs and other files are downloaded they are typically labelled as [MAME Version] - [Files Type], or some similar nomenclature. Many MAME users store their files as 'A Directory > [MAME Directories]' or 'MAME Drive > [MAME Directories]'.

1) Is there a reason we can't use a file type flag (a text file that says what the directory stores) in each directory so that MAME can scan for the file type flag and thereby detect the purpose of the files in each directory and sub-directory thereof?

2) I think I'm right in thinking MAME is able to discern different file types (e.g. ROMs, Software Lists and Extras) based on the file headers, so would it be a big leap to tell MAME to test a few files in a directory and then determine the purpose of those files in that directory in order to autodetect MAME directory settings?

My thought is this: it would be easier for MAME users and new users if we could point MAME to a parent directory or to a specific drive and say, 'Hey, MAME, scan that drive and do your thing'.

Have I misunderstood how to configure MAME all these years or are there technical reasons for not implementing auto detection of directories and file types in those directories?

mhoes
Posts: 87
Joined: Wed Oct 26, 2016 12:26 pm

Re: ROMs Directory Structure Question/Suggestion

Tue Jan 08, 2019 11:43 pm

Maybe I'm missing something here, but... When you download and unpack the official MAME self extracting archive, it creates multiple directories for you. One of these is called 'roms'. Is it really that hard to understand that the roms go in the directory named 'roms' ? What am I missing here ?

stablerom
Posts: 2
Joined: Mon Jan 07, 2019 10:51 pm

Re: ROMs Directory Structure Question/Suggestion

Wed Jan 09, 2019 1:37 pm

I think we both may have missed something.

For Linux we build from source or use a repository to install MAME. Installation from a repository does not always create the full directory structure. When installed from a repository the data files are often not installed at all or are not kept up to date. I wrote a script to handle the download, build and installation as well as update the MAME default data files e.g. artwork, bgfx, ctrlr, hash, keymaps, language, plugins, roms and samples. All good for me because, I think.. hope, I know what I'm doing when I set up MAME.

Not everyone looks in the installed MAME directories to determine where the ROMs, SLs, CHDs and Extras go.

Not everyone wants their ROMs and other files installed under MAME's main/default directory structure e.g. some prefer to use an external HD.

Not everyone knows which files match with which directories because they are not usually labelled the same as MAME requests them and some are kept compressed whereas others are not.

Let's assume I am new to MAME. I download MAME using my distro maintainer's official software repository. So now I have MAME installed into my Linux OS. I load MAME and configure the file locations. I go through 29 or so settings pages to set the locations for the different files as stored on my portable hard drive. Seems easy enough. But, being new to MAME, I don't know the difference between, or even the relationships between, CHDs, SLs, CHD SLs, Extras, Logos, Artworks... After an hour or so of searching the Internet and watching YouTube vids I eventually figure out how to configure MAME. To cover all bases I select several directories multiple times for the different (yet what look like the same to novice me) MAME directories.

Either I have missed something about the directory structure and all files need to go into the ROMs directory where MAME will automatically establish which are logos, which are ROMs, which are icons, which are videos, which are high scores etc.., in which case MAME UI needs to be updated to change the file config menu; or you misunderstood the reason behind my suggestion to use a file flag in each directory so that MAME can be pointed to one directory or drive which MAME can then recursively scan to read the file flag and autoconfigure the directory structure e.g. roms.txt, icons.txt and extras.txt. I imagine MAME should be able to determine the file types from their extensions but, as I say, maybe I've missed something too.

mhoes
Posts: 87
Joined: Wed Oct 26, 2016 12:26 pm

Re: ROMs Directory Structure Question/Suggestion

Wed Jan 09, 2019 10:34 pm

Well, if you compile from source on Linux (or install the binary package provided by your distro), I can see how you may have some more difficulty in figuring out how to setup MAME. However, I believe that the autoconfiguration magic you are looking for is too hard to implement (reliably), and personally I feel it would be more effective if the MAME documentation on mamedev.org explained how to set this up better.

Anyway, a good way to start would be to run 'mame -createconfig', which creates a fresh 'mame.ini' which lists the directories where it looks for things by default :

Code: Select all

$ cd $HOME $ mkdir mame $ cd mame $ mame -createconfig $ grep path mame.ini homepath . rompath /usr/share/mame/roms;/usr/share/mame/chds hashpath /usr/share/mame/hash samplepath /usr/share/mame/samples artpath /usr/share/mame/artwork;/usr/share/mame/effects ctrlrpath /usr/share/mame/ctrlr inipath $HOME/.mame/ini;/etc/mame fontpath /usr/share/mame/fonts cheatpath /usr/share/mame/cheat crosshairpath /usr/share/mame/crosshair pluginspath /usr/share/mame/plugins languagepath /usr/share/mame/language swpath software bgfx_path /usr/share/mame/bgfx
I find most of these to be pretty straightforward: 'rompath' defines where to go looking for roms and chd's, 'artpath' where to look for the artwork, etc. Also, not all of the stuff found online can be used by the internal MAME UI; for example I believe that the video's can only be used by other MAME frontends and not MAME itself.

Return to “MAME Discussion”

Who is online

Users browsing this forum: No registered users and 4 guests