I know I am using a non-standard directory for the MAME files. I used it in some other builds so I just stuck with it. Everything else is working, so I do not think that is the issue.
Here is a sample of the XML file It is definitely using "game" and not "machine". I created the file by downloading MAME 106 on a Windows machine and producing the file. I was having issues with it creating on the RetroPie. This kind of explains why my other machine which uses the latest version of MAME filters the controls correctly. Would it work to use a newer version of mame.xml? I thought the versions would need to match. Also, the other parts of the filtering are all working.
Thanks.
<?xml version="1.0"?>
<!DOCTYPE mame [
<!ELEMENT mame (game+)>
<!ATTLIST mame build CDATA #IMPLIED>
<!ELEMENT game (description, year?, manufacturer, history?, biosset*, rom*, disk*, sample*, chip*, video?, sound?, input?, dipswitch*, driver?)>
<!ATTLIST game name CDATA #REQUIRED>
<!ATTLIST game sourcefile CDATA #IMPLIED>
<!ATTLIST game runnable (yes|no) "yes">
<!ATTLIST game cloneof CDATA #IMPLIED>
<!ATTLIST game romof CDATA #IMPLIED>
<!ATTLIST game sampleof CDATA #IMPLIED>
<!ELEMENT description (#PCDATA)>
<!ELEMENT year (#PCDATA)>
<!ELEMENT manufacturer (#PCDATA)>
<!ELEMENT history (#PCDATA)>
<!ELEMENT biosset EMPTY>
<!ATTLIST biosset name CDATA #REQUIRED>
<!ATTLIST biosset description CDATA #REQUIRED>
<!ATTLIST biosset default (yes|no) "no">
<!ELEMENT rom EMPTY>
<!ATTLIST rom name CDATA #REQUIRED>
<!ATTLIST rom bios CDATA #IMPLIED>
<!ATTLIST rom size CDATA #REQUIRED>
<!ATTLIST rom crc CDATA #IMPLIED>
<!ATTLIST rom md5 CDATA #IMPLIED>
<!ATTLIST rom sha1 CDATA #IMPLIED>
<!ATTLIST rom merge CDATA #IMPLIED>
<!ATTLIST rom region CDATA #IMPLIED>
<!ATTLIST rom offset CDATA #IMPLIED>
<!ATTLIST rom status (baddump|nodump|good) "good">
<!ATTLIST rom dispose (yes|no) "no">
<!ELEMENT disk EMPTY>
<!ATTLIST disk name CDATA #REQUIRED>
<!ATTLIST disk md5 CDATA #IMPLIED>
<!ATTLIST disk sha1 CDATA #IMPLIED>
<!ATTLIST disk merge CDATA #IMPLIED>
<!ATTLIST disk region CDATA #IMPLIED>
<!ATTLIST disk index CDATA #IMPLIED>
<!ATTLIST disk status (baddump|nodump|good) "good">
<!ELEMENT sample EMPTY>
<!ATTLIST sample name CDATA #REQUIRED>
<!ELEMENT chip EMPTY>
<!ATTLIST chip name CDATA #REQUIRED>
<!ATTLIST chip type (cpu|audio) #REQUIRED>
<!ATTLIST chip clock CDATA #IMPLIED>
<!ELEMENT video EMPTY>
<!ATTLIST video screen (raster|vector) #REQUIRED>
<!ATTLIST video orientation (vertical|horizontal) #REQUIRED>
<!ATTLIST video width CDATA #IMPLIED>
<!ATTLIST video height CDATA #IMPLIED>
<!ATTLIST video aspectx CDATA #IMPLIED>
<!ATTLIST video aspecty CDATA #IMPLIED>
<!ATTLIST video refresh CDATA #REQUIRED>
<!ELEMENT sound EMPTY>
<!ATTLIST sound channels CDATA #REQUIRED>
<!ELEMENT input EMPTY>
<!ATTLIST input service (yes|no) "no">
<!ATTLIST input tilt (yes|no) "no">
<!ATTLIST input players CDATA #REQUIRED>
<!ATTLIST input control CDATA #IMPLIED>
<!ATTLIST input buttons CDATA #IMPLIED>
<!ATTLIST input coins CDATA #IMPLIED>
<!ELEMENT dipswitch (dipvalue*)>
<!ATTLIST dipswitch name CDATA #REQUIRED>
<!ELEMENT dipvalue EMPTY>
<!ATTLIST dipvalue name CDATA #REQUIRED>
<!ATTLIST dipvalue default (yes|no) "no">
<!ELEMENT driver EMPTY>
<!ATTLIST driver status (good|imperfect|preliminary) #REQUIRED>
<!ATTLIST driver emulation (good|imperfect|preliminary) #REQUIRED>
<!ATTLIST driver color (good|imperfect|preliminary) #REQUIRED>
<!ATTLIST driver sound (good|imperfect|preliminary) #REQUIRED>
<!ATTLIST driver graphic (good|imperfect|preliminary) #REQUIRED>
<!ATTLIST driver cocktail (good|imperfect|preliminary) #IMPLIED>
<!ATTLIST driver protection (good|imperfect|preliminary) #IMPLIED>
<!ATTLIST driver savestate (supported|unsupported) #REQUIRED>
<!ATTLIST driver palettesize CDATA #REQUIRED>
]>
<mame build="0.106 (May 13 2006)">
<game name="puckman" sourcefile="pacman.c">
<description>PuckMan (Japan set 1, Probably Bootleg)</description>
<year>1980</year>
<manufacturer>Namco</manufacturer>
<rom name="namcopac.6e" size="4096" crc="fee263b3" sha1="87117ba5082cd7a615b4ec7c02dd819003fbd669" region="cpu1" offset="0"/>
<rom name="namcopac.6f" size="4096" crc="39d1fc83" sha1="326dbbf94c6fa2e96613dedb53702f8832b47d59" region="cpu1" offset="1000"/>
<rom name="namcopac.6h" size="4096" crc="02083b03" sha1="7e1945f6eb51f2e51806d0439f975f7a2889b9b8" region="cpu1" offset="2000"/>
<rom name="namcopac.6j" size="4096" crc="7a36fe55" sha1="01b4c38108d9dc4e48da4f8d685248e1e6821377" region="cpu1" offset="3000"/>
<rom name="pacman.5e" size="4096" crc="0c944964" sha1="06ef227747a440831c9a3a613b76693d52a2f0a9" region="gfx1" dispose="yes" offset="0"/>
<rom name="pacman.5f" size="4096" crc="958fedf9" sha1="4a937ac02216ea8c96477d4a15522070507fb599" region="gfx1" dispose="yes" offset="1000"/>
<rom name="82s123.7f" size="32" crc="2fc650bd" sha1="8d0268dee78e47c712202b0ec4f1f51109b1f2a5" region="proms" offset="0"/>
<rom name="82s126.4a" size="256" crc="3eb3a8e4" sha1="19097b5f60d1030f8b82d9f1d3a241f93e5c75d6" region="proms" offset="20"/>
<rom name="82s126.1m" size="256" crc="a9cc86bf" sha1="bbcec0570aeceb582ff8238a4bc8546a23430081" region="sound1" offset="0"/>
<rom name="82s126.3m" size="256" crc="77245b66" sha1="0c4d0bee858b97632411c440bea6948a74759746" region="sound1" offset="100"/>
<chip type="cpu" name="Z80" clock="3072000"/>
<chip type="audio" name="Namco" clock="96000"/>
<video screen="raster" orientation="vertical" width="224" height="288" aspectx="3" aspecty="4" refresh="60.606060"/>
<sound channels="1"/>
<input players="2" control="joy4way" buttons="1" coins="2"/>
<dipswitch name="Rack Test (Cheat)">
<dipvalue name="Off" default="yes"/>
<dipvalue name="On"/>
</dipswitch>
<dipswitch name="Service Mode">
<dipvalue name="Off" default="yes"/>
<dipvalue name="On"/>
</dipswitch>
<dipswitch name="Cabinet">
<dipvalue name="Upright" default="yes"/>
<dipvalue name="Cocktail"/>
</dipswitch>
<dipswitch name="Coinage">
<dipvalue name="2 Coins/1 Credit"/>
<dipvalue name="1 Coin/1 Credit" default="yes"/>
<dipvalue name="1 Coin/2 Credits"/>
<dipvalue name="Free Play"/>
</dipswitch>
<dipswitch name="Lives">
<dipvalue name="1"/>
<dipvalue name="2"/>
<dipvalue name="3" default="yes"/>
<dipvalue name="5"/>
</dipswitch>
<dipswitch name="Bonus Life">
<dipvalue name="10000" default="yes"/>
<dipvalue name="15000"/>
<dipvalue name="20000"/>
<dipvalue name="None"/>
</dipswitch>
<dipswitch name="Difficulty">
<dipvalue name="Normal" default="yes"/>
<dipvalue name="Hard"/>
</dipswitch>
<dipswitch name="Ghost Names">
<dipvalue name="Normal" default="yes"/>
<dipvalue name="Alternate"/>
</dipswitch>
<dipswitch name="2x Speed Cheat">
<dipvalue name="Disabled" default="yes"/>
<dipvalue name="Enabled Always"/>
<dipvalue name="Enabled with Button"/>
</dipswitch>
<driver status="good" emulation="good" color="good" sound="good" graphic="good" savestate="supported" palettesize="32"/>
</game>