Just a guess, but I think tons of MAME changes will be required to do something like you are suggesting. MAME doesn't keep a count of credits, the individual game drivers do. So you will have to modify MAME to keep a counter of credits and increment the 7 segment display, and then decrement it when the player start buttons are pressed.