File: paths.rst

package info (click to toggle)
mame 0.281%2Bdfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 912,556 kB
  • sloc: cpp: 5,266,015; xml: 2,226,001; ansic: 750,970; sh: 34,449; lisp: 19,643; python: 16,330; makefile: 13,251; java: 8,492; yacc: 8,152; javascript: 7,069; cs: 6,013; asm: 4,786; ada: 1,681; pascal: 1,191; lex: 1,174; perl: 585; ruby: 373
file content (29 lines) | stat: -rw-r--r-- 1,477 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
MAME Path Handling
==================

MAME has a specific order it uses when checking for user files such as ROM sets and cheat files.


Order of Path Loading
---------------------

Let's use an example of the cheat file for AfterBurner 2 for Sega Genesis/MegaDrive (aburner2 in the megadrive softlist), and your cheatpath is set to "cheat" (as per the default) -- this is how MAME will search for that cheat file:

1. ``cheat/megadriv/aburner2.xml``
2. ``cheat/megadriv.zip`` -> ``aburner2.xml``
   Notice that it checks for a .ZIP file first before a .7Z file.
3. ``cheat/megadriv.zip`` -> ``<arbitrary path>/aburner2.xml``
   It will look for the first (if any) ``aburner2.xml`` file it can find inside that zip, no matter what the path is.
4. ``cheat.zip`` -> ``megadriv/aburner2.xml``
   Now it is specifically looking for the file and folder combination, but inside the cheat.zip file.
5. ``cheat.zip`` -> ``<arbitrary path>/megadriv/aburner2.xml``
   Like before, except looking for the first (if any) ``aburner2.xml`` inside a ``megadriv`` folder inside the zip.
6. ``cheat/megadriv.7z`` -> ``aburner2.xml``
   Now we start checking 7ZIP files.
7. ``cheat/megadriv.7z`` -> ``<arbitrary path>/aburner2.xml``
8. ``cheat.7z`` -> ``megadriv/aburner2.xml``
9. ``cheat.7z`` -> ``<arbitrary path>/megadriv/aburner2.xml``
   Similar to zip, except now 7ZIP files.


[todo: ROM set loading is slightly more complicated, adding CRC. Get that documented in the next day or two.]