OK, I came up with this (attached) - it's really kinda more a template than anything, but it works and you should be able to figure out how you could modify it to fit any game. Download and install autohotkey if you haven't already, and change the file extension on credit.txt to credit.ahk. You'll want to take a look at it to see how it works and how you can make changes. It's set up so you can test it in Notepad!
Notes:
For now I assumed that you have the mame defaults for player 1, and didn't bother setting up for player 2, but you should be able to figure out what changes/additions you would need to make to set it up for your configuration. Also, I'm assuming you can set the controls in your game to whatever you want. Having the control key send "a" is really rather arbitrary. And if you're wondering why I don't just have control sending control, it's because this would cause control to be sent ad infinitum as each control that is sent tells the script to send another control! (There might be a workaround for this, but can't remember it ATM).
Also, I've got it set up to simply reset the coin count to 0 and disable all keys after 5 seconds of inactivity - of course you could set it to how ever much time you want. Setting up to decrease the coin count based on a game over image is a bit more complicated, but we'll go into it sometime if you think you want that.
Let me know what you think!
