Capping the credits was just an idea I had while playing X-Men with a friend awhile back. That game isn't fun when you know there's an endless supply of credits, so I wanted to set global caps for my friends and I to use as reference for setting realistic high scores.
I tend not to play games like xmen, tmnt, etc. for exactly this reason.
Seeing your question here earlier today got me thinking about this again and I decided to take a crack at a solution. Basically I wrote a program that will monitor the system for the execution of mame (for now, just mame.exe specifically).
Additionally, the program quietly hooks into the system and monitors all keystrokes. When mame.exe is detected the program sets an internal counter allowing only a certain number of credits (i.e. presses of the mame credit keys). Right now it just uses a default set from a temporary interface, but it would be easy enough to allow an xml file or something to be used to define game-specific limits. I'll attach a screenshot of the program in action.
(to explain the screenshot...)
I ran the program, moved it to my second monitor and hit the "Monitor for mame.exe" button. After that I just went off and did my thing in mame. When I added a credit in mame a message immediately popped up in the window on the other monitor letting me know a credit had been used and indicating how many I had remaining. Once I hit zero the credit keys are disabled (well, only the default player 1 credit key right now).
In the real world there would probably be no need for the interactive app. It would just run in the background. Every time you start mame it will reset the credit counter.
Anyhow, I wrote this partly for my own use and partly just to see if I could. If you are interested in using it just let me know. I will need to polish it at least a little since it is a total hack right now, so no promises on timeline.
Oh, and this is for Windows only. Right now I have only tested it on Win7 64 bit, but I believe it should work on win2k and up.