This could probably be handy for others if adapted as way to, say, toggle bezels or overlays. But for me, to be honest this is probably a stopgap until I finish switching ROM cfgs one at a time...
For the uninitiated I have a two-sided cocktail with a rotating monitor. Spinner and 1 joystick on one side, trackball and two joysticks on the other. Player 1 is toggled to be either on the first side, or the left joystick on the second side. Click my sig for more, or just look at
a diagram 
The true bottom of the screen faces the side with the two joysticks.
My ultimate goal here is:
1. to have each game load in its correct orientation (horizontal or vertical)
2. each game facing the correct panel for the controls required (eg. Arkanoid always rotated 180° to face the spinner side)
3. for cocktail flipping to be enabled for games that support it - EXCEPT where spinner or trackball are used, since my panels aren't identical
Requirement 1 is achieved using mame.ini with the following:
#
# CORE ROTATION OPTIONS
#
rotate 0
ror 0
rol 0
autoror 1
autorol 0
flipx 0
flipy 0
"rotate 0" prevents vertical games playing horizontally, thereby forcing guests to play Galaga full-screen and ensuring all that swearing and frustration I had in building a rotating cocktail wasn't for nothing
"autoror 1" makes each vertical game rotate clockwise - some people may be unaware, like I was, that some vertical games expected the monitor mounted the
other way. autoror forces all vertical games to rotate the same way, which is pretty critical for a monitor that only rotates 90° in one direction!
Requirement 2 can be achieved a few ways no doubt, and the two I've figured out are:
- manually hitting every paddle/dial game, rotating via video options which creates/updates the game's .cfg file
- using something like ROMLister to separate all horizontal AND spinner games, then move the ROMs to a new subdirectory, and using MaLa's excellent conditional command line capability to set up something like "If ROM path is "roms/horizontal-spinner" then execute MAME with the additional command line options "-flip x -flip y" - and something similar for vertical spinners etc.
I've found that ROMLister doesn't work 100% for that, at least the way I'm querying it - because some games show up as 'dial control' when really they're rotating joysticks etc. eg. Ikari Warriors... But it's a good start.
Requirement 3 is the really interesting one. See another thread for some discussion about the difficulty in easily
enabling cocktail flipping across a large ROMset. It's a game-by-game thing, since it is normally DIP switch controlled. I've flipped plenty manually, just to get me by, but one day I still hope to make, or at least start, a definitive diff set for CFGs to help out some other cocktail owners. I need to be careful though, since cockail flipping is UNdesirable for trackball or spinner games, eg. Centipede.
...So this whole question of a MAME patch is to facilitate requirement 2. I have 30 people here next weekend, and I would rather say "hit those two buttons if you need to flip the screen around" than jumping in with my secret Shazaam! key combos to reach the MAME user interface and fixing game after game all night.
Before I teach myself enough C to write the patch myself
But C'mon...! 
You know you want to 
Download Free Visual C++ HERE
Yeah yeah, I haven't written any "real" code since some Pascal about 20 years ago (admitting that, now I know you're going to nag me to switch to Delphi and churn out some plugins). I really should finish learning JavaScript and PHP first though, since those are directly applicable to my job
