You are mistaken.
Mame has an auto setting which automatically swaps out the hardcoded maps in mame. Of course you can set them manually as well.
Howard, I'm probably just looking in the wrong places, but I cannot find an option where Mame automatically sets the correct map for every game (Qbert as an example). I see where they added an option -joystick_map to load a specific map, but cannot find the automatic part. Can you point me to this bit of documentation? I have looked in the following:
http://mamedev.org/releases/whatsnew_0118.txtAnd also in the whatsnew.txt for the last few releases, here:
http://mamedev.org/oldrel.html---------------------------------------------------------------------------------------------------------
EDIT:I did find this post that alludes to it, but cannot find where this stuff is documented:
http://www.mameworld.info/ubbthreads/showthreaded.php?Cat=&Number=120271&page=0&view=expanded&sb=5&o=&fpart=1&vc=1Perhaps there's not an "Auto Setting", but maps are automatically applied unless you use -joystick_map to override the default?
EDIT #2:Maybe I should have done a better job searching before posting. Finally found this:
-joystick_map <map> / -joymap <map>
Controls how joystick values map to digital joystick controls. MAME
accepts all joystick input from the system as analog data. For true
analog joysticks, this needs to be mapped down to the usual 4-way or
8-way digital joystick values. To do this, MAME divides the analog
range into a 9x9 grid. It then takes the joystick axis position (for
X and Y axes only), maps it to this grid, and then looks up a
translation from a joystick map. This parameter allows you to specify
the map. The default is 'auto', which means that a standard 8-way,
4-way, or 4-way diagonal map is selected automatically based on the
input port configuration of the current game.
Maps are defined as a string of numbers and characters. Since the grid
is 9x9, there are a total of 81 characters necessary to define a
complete map. Below is an example map for an 8-way joystick:
777888999 Note that the numeric digits correspond to the keys
777888999 on a numeric keypad. So '7' maps to up+left, '4' maps
777888999 to left, '5' maps to neutral, etc. In addition to the
444555666 numeric values, you can specify the character 's',
444555666 which means "sticky". In this case, the value of the
444555666 map is the same as it was the last time a non-sticky
111222333 value was read.
111222333
111222333
To specify the map for this parameter, you can specify a string of
rows separated by a '.' (which indicates the end of a row), like so:
777888999.777888999.777888999.444555666.444555666.444555666.
111222333.111222333.111222333
However, this can be reduced using several shorthands supported by the
<map> parameter. If information about a row is missing, then it is
assumed that any missing data in columns 5-9 are left/right symmetric
with data in columns 0-4; and any missing data in colums 0-4 is
assumed to be copies of the previous data. The same logic applies to
missing rows, except that up/down symmetry is assumed.
By using these shorthands, the 81 character map can be simply
specified by this 11 character string: 7778...4445
Looking at the first row, 7778 is only 4 characters long. The 5th
entry can't use symmetry, so it is assumed to be equal to the previous
character '8'. The 6th character is left/right symmetric with the 4th
character, giving an '8'. The 7th character is left/right symmetric
with the 3rd character, giving a '9' (which is '7' with left/right
flipped). Eventually this gives the full 777888999 string of the row.
The second and third rows are missing, so they are assumed to be
identical to the first row. The fourth row decodes similarly to the
first row, producing 444555666. The fifth row is missing so it is
assumed to be the same as the fourth.
The remaining three rows are also missing, so they are assumed to be
the up/down mirrors of the first three rows, giving three final rows
of 111222333.
-joystick_deadzone <value> / -joy_deadzone <value> / -jdz <value>
If you play with an analog joystick, the center can drift a little.
joystick_deadzone tells how far along an axis you must move before the
axis starts to change. This option expects a float in the range of
0.0 to 1.0. Where 0 is the center of the joystick and 1 is the outer
limit. The default is 0.3.
-joystick_saturation <value> / joy_saturation <value> / -jsat <value>
If you play with an analog joystick, the ends can drift a little,
and may not match in the +/- directions. joystick_saturation tells how
far along an axis movement change will be accepted before it reaches
the maximum range. This option expects a float in the range of 0.0 to
1.0, where 0 is the center of the joystick and 1 is the outer limit.
The default is 0.85.