make INI file loading examples match current behaviour at least (nw)

This commit is contained in:
Vas Crabb 2019-01-12 05:37:24 +11:00
parent e75249d23f
commit 64c1f2eb5b

View File

@ -8,44 +8,115 @@ MAME has a very powerful configuration file system that can allow you to tweak s
Order of Config Loading
-----------------------
1. The command line is parsed first, and any settings passed that way *will take priority over anything in an INI file*.
2. ``mame.ini`` (or other platform INI; e.g. ``mess.ini``) is parsed twice.
The first pass may change various path settings, so the second pass is done to see if there is a valid config file at that new location (and if so, change settings using that file)
3. ``debug.ini`` if in debug mode.
This is an advanced config file, most people won't need to use it or be concerned by it.
4. System-specific INI files where appropriate (e.g. ``neogeo_noslot.ini`` or ``cps2.ini``)
As an example, Street Fighter Alpha is a CPS2 game, and so ``cps2.ini`` would be loaded here.
5. Monitor orientation INI file (either ``horizont.ini`` or ``vertical.ini``)
Pac-Man, for one example, is a vertical monitor setup, so it would load ``vertical.ini``. Street Fighter Alpha is a horizontal game, so it loads ``horizont.ini``.
6. System-type INI files (``arcade.ini``, ``console.ini``, ``computer.ini``, or ``othersys.ini``)
Both Pac-Man and Street Fighter Alpha are arcade games, so ``arcade.ini`` would be loaded here. Atari 2600 would load ``console.ini``.
7. Screen-type INI file (``vector.ini`` for vector games, ``raster.ini`` for raster games, ``lcd.ini`` for LCD games)
Pac-Man and Street Fighter Alpha are raster, so ``raster.ini`` gets loaded here. Tempest is a vector monitor game, and ``vector.ini`` would be loaded here.
8. Source INI files.
This is an advanced config file, most people won't need to use it and it can be safely ignored.
MAME will attempt to load ``source/sourcefile.ini`` and ``sourcefile.ini``, where sourcefile is the actual filename of the source code file.
*mame -listsource <game>* will show the source file for a given game.
1. The command line is parsed first, and any settings passed that way *will take
precedence over anything in an INI file*.
For instance, Banpresto's Sailor Moon, Atlus's Dodonpachi, and Nihon System's Dangun Feveron all share a large amount of hardware and are grouped into the ``cave.c`` file, meaning they all parse ``source/cave.ini``
9. Parent INI file.
For example, if running Pac-Man, which is a clone of Puck-Man, it'd be ``puckman.ini``
10. Driver INI file.
Using our previous example of Pac-Man, this would be ``pacman.ini``.
2. ``mame.ini`` (or other platform INI; e.g. ``mess.ini``) is parsed twice. The
first pass may change various path settings, so the second pass is done to
see if there is a valid configuration file at that new location (and if so,
change settings using that file).
3. ``debug.ini`` if the debugger is enabled. This is an advanced config file,
most people won't need to use it or be concerned by it.
4. Screen orientation INI file (either ``horizont.ini`` or ``vertical.ini``).
For example Pac-Man has a vertical screen, so it loads ``vertical.ini``,
while Street Fighter Alpha uses a horizontal screen, so it loads
``horizont.ini``.
Systems with no monitors, multiple monitors with different orientations, or
monitors connected to slot devices will usually load ``horizont.ini``.
5. System type INI file (``arcade.ini``, ``console.ini``, ``computer.ini``, or
``othersys.ini``). Both Pac-Man and Street Fighter Alpha are arcade games,
so ``arcade.ini`` will be loaded here, while Atari 2600 will load
``console.ini`` as it is a home game console.
6. Monitor type INI file (``vector.ini`` for vector monitors, ``raster.ini`` for
CRT raster monitors, or ``lcd.ini`` for LCD/EL/plasma matrix monitors).
Pac-Man and Street Fighter Alpha use raster CRTs, so ``raster.ini`` is loaded
here, while Tempest uses a vector monitor, so ``vector.ini`` is loaded here.
For systems that have multiple monitor types, such as House Mannequin with
its CRT raster monitor and dual LCD matrix monitors, the INI file relevant to
the first monitor is used (``raster.ini`` in this case). Systems without
monitors or with other kinds of monitors will not load an INI file for this
step.
7. Driver source file INI file. MAME will attempt to load
``source/``\ *<sourcefile>*\ ``.ini`` where *<sourcefile>* is the base name
of the source code file where the system driver is defined. A system's
source file can be found using **mame -listsource <pattern>** at the command
line.
For instance, Banpresto's Sailor Moon, Atlus's Dodonpachi, and Nihon System's
Dangun Feveron all run on similar hardware and are defined in the
``cave.cpp`` source file, so they will all load ``source/cave.ini`` at this
step.
8. BIOS set INI file (if applicable). For example The Last Soldier uses the
Neo-Geo MVS BIOS, so it will load ``neogeo.ini``. Systems that don't use a
BIOS set won't load an INI file for this step.
9. Parent system INI file. For example The Last Soldier is a clone of The Last
Blade / Bakumatsu Roman - Gekka no Kenshi, so it will load ``lastblad.ini``.
Parent systems will not load an INI file for this step.
10. System INI file. Using the previous example, The Last Soldier will load
``lastsold.ini``.
Examples of Config Loading Order
--------------------------------
1. Alcon, which is the US clone of Slap Fight. (**mame alcon**)
Command line, mame.ini, vertical.ini, arcade.ini, raster.ini, slapfght.ini, and lastly alcon.ini (*remember command line parameters take precedence over all else!*)
* Brix, which is a clone of Zzyzzyxx. (**mame brix**)
2. Super Street Fighter 2 Turbo (**mame ssf2t**)
Command line, mame.ini, horizont.ini, arcade.ini, raster.ini, cps2.ini, and lastly ssf2t.ini (*remember command line parameters take precedence over all else!*)
1. Command line
2. ``mame.ini`` (global)
3. (debugger not enabled, no extra INI file loaded)
4. ``vertical.ini`` (screen orientation)
5. ``arcade.ini`` (system type)
6. ``raster.ini`` (monitor type)
7. ``source/jack.ini`` (driver source file)
8. (no BIOS set)
9. ``zzyzzyxx.ini`` (parent system)
10. ``brix.ini`` (system)
* Super Street Fighter 2 Turbo (**mame ssf2t**)
1. Command line
2. ``mame.ini`` (global)
3. (debugger not enabled, no extra INI file loaded)
4. ``horizont.ini`` (screen orientation)
5. ``arcade.ini`` (system type)
6. ``raster.ini`` (monitor type)
7. ``source/cps2.ini`` (driver source file)
8. (no BIOS set)
9. (no parent system)
10. ``ssf2t.ini`` (system)
* Final Arch (**mame finlarch**)
1. Command line
2. ``mame.ini`` (global)
3. (debugger not enabled, no extra INI file loaded)
4. ``horizont.ini`` (screen orientation)
5. ``arcade.ini`` (system type)
6. ``raster.ini`` (monitor type)
7. ``source/stv.ini`` (driver source file)
8. ``stvbios.ini`` (BIOS set)
9. ``smleague.ini`` (parent system)
10. ``finlarch.ini`` (system)
*Remember command line parameters take precedence over all else!*
Tricks to Make Life Easier
--------------------------
Some users may have a wall-mounted or otherwise rotatable monitor, and may wish to actually play vertical games with the rotated display. The easiest way to accomplish this is to put your rotation modifiers into ``vertical.ini``, where they will only affect vertical games.
Some users may have a wall-mounted or otherwise rotatable monitor, and may wish
to actually play vertical games with the rotated display. The easiest way to
accomplish this is to put your rotation modifiers into ``vertical.ini``, where
they will only affect vertical games.
[todo: more practical examples]