Custom Ini Files

In MameUI you have always been able to configure each game individually. This is of great use if, for instance you are having performance issues with games or say want to run certain games on the Windows desktop and certain in full screen. The command line version of Mame has always supported custom settings which are separate files based off the mame.ini file. You can create these files in the user interface by changing any of the settings for a system. A new file will be created in the c:\mame\cfg folder with any changes that you have made saved in it. However, this system is far more powerful and can be set to change, not just individual systems, but also drivers and system types.


Creating The Files

All settings files are based on the mame.ini file that is created when Mame starts. The easiest way to create a new config file is to simply duplicate the original file and remove/change the stuff you don't want. Open your current Mame folder and find the mame.ini file. It'll look something like this...

Mame.ini File

Right click on the file and select "Copy" from the menu. Now right click on a blank area and select "Paste" and you will see a file mame - Copy.ini appear. Right click over this file and select "Rename". In the box type the name of the configuration filetype that you want to create. If for example it is an arcade game such as Pole Position you would need to match the filename of the rom zip file e.g. Pole Position (Atari) = polepos1. Use the table below if you need any more information.

Mame will always look for config files in it's root path but you can keep things a lot tidier if you move your new config file to the ini folder. The default path for this would be C:\Mame\ini. Mame will look there as well. Double click your config file and it should open up in Notepad. Below you can see the default mame.ini file...

As you can see most of the lines mimic the command line options use by Mame and you can find detailed explanations of these commands on the Mame Options page. Lines starting with # are comments and are ignored by Mame.

Remember no matter what changes you make you can't permanently mess up Mame, just change the setting back or delete the config file and start again.


Types Of Config File

Beside individual systems, you can create several specialized configuration files. Mame will then parse each ini file in order, updating any other option as it changes. Mame will also override any settings held in a config file with any options that are included on the command line. Heres a quick list of Mame's ini files and the order that they are parsed...

Config File Description
mame.ini This is the main Mame configuration file.
debug.ini This file is only loaded in debug versions of Mame.
<driver>.ini These are driver based ini files e.g. Robocop is part of the dec0 Data East driver and therefore can be affected by dec0.ini.
<monitor orientation>.ini These files affect systems that use either vertical or horizontal screens. The filenames are vertical.ini and horizont.ini.
<system type>.ini These files affect only the system type specified. e.g. Pacman would come under arcade.ini, whilst ZX Spectrum would come under computer.ini. The filenames are arcade.ini, console.ini, computer.ini and othersys.ini.
<screen type>.ini These files affect systems with a specific monitor type. The filenames are raster.ini,vector.ini and lcd.ini.
sourcefile.ini / source.ini 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.ini and/or sourcefile.ini, where sourcefile is the actual filename of the source code file. mame64 -listsource <game> will show the source file for a given game.
parent.ini Holds the settings for the parent set of a system. e.g If you run mame64 pacman, Mame will look for settings in puckman.ini as that is the parent set of Pacman.
driver.ini Holds the settings for the current system. If you look at the above example, pacman.ini will override any settings in puckman.ini

To find out what drivers a game uses you can add the -listxml option to your command line. e.g. mame64 robocop -listxml will generate all the information from Robocop in XML format. Here's the important part that you are looking for...

<mame build="0.195 (mame0195)" debug="no" mameconfig="10">
<machine name="robocop" sourcefile="dec0.cpp">
<description>Robocop (World revision 4)</description>
<manufacturer>Data East Corporation</manufacturer>

The system name is robocop and dec0 is the driver name. Adding a dec0.ini file will affect all the games in the dec0 driver where as robocop.ini will only affect the individual game. If the system is a clone of another system then it will have "clone of" in the same line. This part will give you the name of the parent system of the system you have selected. Using this name as an ini file will only affect systems that share roms with the parent set, not the whole driver.


Custom Ini Example

Here is an example of a config file that I have made up for the Atari version of Pole Position. The reason behind it was that I preferred it in cockpit mode rather than upright.

#Pole Position Cockpit Mode

artwork 1
use_backdrops 1
use_overlays 1
use_bezels 1
artwork_crop 0
view cockpit

You could also for instance move all your Neo-Geo games to a separate folder and make a config file to change the default roms folder. The possibilities are limitless.

Once you are happy with your file, save it, run Mame and it will use your new settings.