Is there a way to limit max credit number or coins inserted on mame?

I'm using RetroPie as my retro videogame at home(using Recalbox as for today, but I still have a sdcard with RetroPie for thinkering). Default emulator is lr-mame2003
and it is pretty well integrated with EmulationStation(the graphical frontend).
What I want to know is, and I found no tips at the documentation: Is there a way to create a credit limit per game reset to somehow "emulate" inside mame the continue behavior of cartidge games? I want to limit Sunset Riders to 3 credits per game reset for example.
Someone could ask "why not play the Snes/Genesis version of this game then?". Well, that is because we are doing a party with old friends from my childhood, and it will be more fun to play 4 players arcade version than just the 2 player video game version. And it will not be that fun if putting credits is an unlimited action.
Best Answer
No such feature exists, though I guess a skilled programmer could add something like that to the MAME source code. Since the purpose of MAME is to preserve the games in their original state, I doubt such a feature will ever be added to the official MAME release.
Pictures about "Is there a way to limit max credit number or coins inserted on mame?"



[TUTORIAL] MAME per principianti - #7 CHD (Compressed Hunks of Data)
Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.
Images: David McBee, Pixabay, David McBee, energepic.com