This is an oldie but a goodie:
http://beersmith.com/mame/cabinet.htmI don't love it, but... it's versatile
My thought is to build different control panels and swap them into the cabinet depending on the types of titles
I have 4 cabinets, 3 that have interchangeable panels. I think I have 8 or 9 panels, and I'm always thinking about additional ones. I think if you consider them in terms of using them like a "conversion cab kit" then they're great. If you want to make them hot-swappable, that adds a lot of complexity, just in terms of software configuration. From doing something similar to what you suggest here are the lessons I learned.
1. Pick a set of games with very similar controls that you like. Try to keep that set as limited as possible, and build a panel to support those games.
2. When that panel is installed, show only that list of games. Having 4 cabinets helps me have a variety of types of games without feeling like I need to swap a lot. If you really want to have some kind of fast swap option, power down the cabinet, change the panel, and use a script after start up to change the game list to suit the new controls.
3. When you make the first panel or two, build a really good panel template and make a bunch of blanks at once. Then when you have an idea for a new set of controls it is a lot easier to implement quickly.
4. When you wire each panel, try very hard to make the wiring line up with the default controls so you don't have to reconfigure MAME to suit a certain control. Rewire until you get it right, try to never mess with whatever your default MAME controls configuration is.
5. If possible try to use the same encoder on each. This is more expensive, but can be simpler in the long run. Mini-Pac with Opti is a good choice.
https://www.ultimarc.com/control-interfaces/mini-pac-en/That said, my panels use just about everything. GGG Gp-Wiz 40, GP-Wiz 49way, iPac 2 (a really really old one), Opti-Pac, Opti-Wiz, Pimoroni Player X, UltimateIO, Zero-Delay (lots of delay) etc.
I do like these for price:
https://www.adafruit.com/product/4518 They don't have a player 2 input though, which I don't like. A lot of my panels are built for 1 player, but a lot of old games allow 2 players to switch back and forth.
6. If possible, put all of your cabinet & game controls somewhere besides your swappable panels. Game Exit, Coin, maybe Player 1 & 2 buttons, and any other service buttons. Having less inputs means that you have more flexibility on your encoder choice, and also means that you can have a consistent way to interact with your cab controls. Sometimes space required by odd-sized controls makes it difficult to put important things in the same place without insanely careful long-term planning.
7. Plan to put artwork that fits the controls on the panel. Build a panel and get artwork done before starting on another one... otherwise you'll never order the artwork. Maybe do 2 at a time.
Just as an FYI, these are the panels that I have so far... I think.
1. Street fighter 6 button 2 player panel.
2. NeoGeo 4 button 2 player panel panel
3. 3 button trackball panel
4. u360 + 3 button & spinner panel
5. Discs of Tron panel with up/down spinner & tron stick
6. Rotary panel for ikari and similar
7. u360 + 2 button classics panel (probably should have had 3 buttons... but the art is printed and would look weird with an extra button now)
8. Space Encounters yoke with push/pull & 2 thumb buttons
9. Spy Hunter yoke with hi/low shifter (work in progress)
10. a ridiculous show panel that has a trackball, satan's hollow stick, and a top-fire joystick. It sucks, but I had the extra controls so I just threw them on one of my blanks for fun.
I'd still like to make more panels. I'm always coming up with something.