I'll look into this some more. I'm sure there is a way to tell that the button doesn't have an event associated with it. I've never bothered because it hasn't been a problem. Once nice feature of having the lighting code in MAME is that when I hit delete, the LED goes off and I don't worry about it anymore. It has only happened on a couple games. I think most games that don't use the extra buttons must already have them set to n/a because I've not seen this issue much.
Ahhh, so you don't get the info form mame, you just delete them yourself.
That bit of code I posted earlier is how mame defines a button. That's it, nothing more. That basically says what pin (the 0x80) of whatever chip the definition is in and what button in mame to map it to. It doesn't say anything about if the game uses it. It's just mapping the hardware, the hardware specs say a button is at that location.
It isn't that big of an issue in mame as it was 2 or 3 years ago when controls.dat started. We've been submitting fixes to mame where it makes sense a fix is needed. Some macros do not need changing, like neogeo. Being that it is a cart based system makes it more of a special case. A game may have only used 1 button but the cabinet had 4 buttons on the control panel. The ones we did change are ones where the conversion kit or cabinet didn't have those extra buttons.
You can delete a led but can you add it? Wait, are you lighting everything that mame has mapped? So if you don't delete anything discs of tron will light 4 buttons, 8way joystick, spinner, and trackball?
Also what if you have a spinner and a 360 steering wheel on a control panel? I'm just thinking about the folks that have monster control panels or rotating panels.
I will be writing something that uses controls.dat so people can light correct controls. I wonder if I should just make a program that outputs to the cfg files of your mame build... It would be nice to have the delete on the fly type feature.
So what you are saying is that MAME has buttons defined for games that are never used.
It took a while, but I get it now. So at worst case, you might end up with controls that are lit, because they were part pf the original hardware, but not actually used. Would this be a big issue for anything other than the "multi-game" style units like the Neo, or is MAME a lot less reliable?
Read above. Like I said it isn't big of an issue now as when we (controls.dat) find an error and it is a legit error we will submit it to mametesters. For example,
http://www.mametesters.org/currentbugs.htmlCheck out bug yiear0103u1gra
Yie Ar Kung Fu's docs, schematics, operators manual, everything says it only has 2 buttons but the current driver has defined three.
Now, I didn't submit this one to mametesters, someone else did that. I posted a comment on the mameworld forum and someone submitted it under my name. And I didn't find it, someone else at controls.dat did.
But, as you see, the issue still comes up.
Then there is another issue. Even if controls.dat correctly identifies the control, what if that control doesn't actually exist on the panel? I would think there would need to be a substitution file someplace to account for this.
Yep, Johnny5 does this. You would have to have a way to map the controls defined in controls.dat to your control panel.
If you didn't have controls.dat you'd still need some substitution file for specific games. If your control panel did have a spinner and a 360 steering wheel how would you know which to light up when mame just says dial for those?
That is the reason I started controls.dat. I wanted to find out which games where spinners vs steering wheels. The rest of the problems it fixes (as read in the FAQ) I realized after I started the project.
What is a game that reports more buttons that it uses? I'll debug this tonight and see what I can find. Somewhere there must be a connection between the input port being there and what the ROM does with a signal on the input port.
Yeah, the rom. It's the software coding in the rom that will determine what it actually uses. It's like having a modem built into your computer but the software not using it.
If you want an example see the yiear example above.