in asteroid.cfg I get this:
<?xml version="1.0"?>
<!-- This file is autogenerated; comments and unknown tags will be stripped -->
<mameconfig version="10">
<system name="asteroid" />
</mameconfig>
I never got a .ctrlr file even after changing the settings.
Of course, you make the ctrlr files.
I also don't see a default .cfg file with the default values.
Hmm, they changed it since I last looked at it. Well, with an empty system tag that means to use the defaults.
I looked at defaults.cfg, it was empty to. So I switch inputs and got
<?xml version="1.0"?>
<!-- This file is autogenerated; comments and unknown tags will be stripped -->
<mameconfig version="10">
<system name="default">
<input>
<port type="P1_BUTTON1">
<newseq type="standard">
KEYCODE_A
</newseq>
</port>
</input>
</system>
</mameconfig>
And I switched asteroid
<?xml version="1.0"?>
<!-- This file is autogenerated; comments and unknown tags will be stripped -->
<mameconfig version="10">
<system name="asteroid">
<input>
<port type="P1_BUTTON1" mask="16" index="5" defvalue="0">
<newseq type="standard">
KEYCODE_Z
</newseq>
</port>
</input>
</system>
</mameconfig>
That worked. I then created a \ctrlr\test folder, put a modified asteroid.cfg file there renamed to test.cfg. added -ctrlr test.cfg to commandline. Didn't work until I deleted default.cfg and asteroid.cfg in the cfg folder. Hmmm, the devs changed this. The ctrlr files use to override the cfg files. However, with it as it stands I don't see the need for anyone to use the ctrlr files anymore.
So, if the system tag is empty in the rom, parent, and default then defaults are used.
You'll have to ask HowardC about ctrlr files and the algorithm used in johnny5 to know what order things need to be looked at.