I've been working on the design of my control panel and machine in general, and since i've decided to go with a multi-emulator setup i'm going to have a range of 6-7 buttons, and of course tons of arcade games that only use two or three. Orginally this concerned me because I wasn't sure how to let whomever I was playing with what buttons did what for what game. (Even I can't memorize them all!) Thanks to a post by DaveMMR, I learned of a neat little program called Cpviewer, which works with the frontend to display controls before the game itself loads.
I was particularly pleased, and thought all my worries were solved. As I was falling asleep the other night, I received some inspiration based on this concept, and decided to take it another step. I thought to myself: "What if I had a button on top of my control panel, centered, next to an "Exit" button called 'Pause/View Controls, or just View Controls?" The idea sounded great in nature, but I had no idea how to make it work, until now. I don't know if anyone here is familiar with a program called AutoIt, but basically it's a program which allows you to write custom scripts to preform 'macros.' (A systematic set of actions on your computer based on pre-defined inputs and variables.) For this to work, simply map the View Controls button to any unused key, such as F8, Delete, Insert, or anything else that won't get in the way.
This key will run a custom script file in AutoIt, which will control your computers actions in order to do what we want it to. Since AutoIt uses a mild scripting language, you can use things such as If statements to essentially guide outcomes. Here's how the script, in theory, would work: 1) The hotkey is pressed, AutoIt which is running in the background runs the script. 2) If Statement Branch: One of three things can happen here: A) 'If Frontend' - runs if you're in the FronteEnd. B) 'If Game' - runs if you're in a game. or C) 'If viewing controls' - runs if you're already viewing controls. To figure out not only what program you're currently in but the name of the game you're playing, AutoIt would simply check the title of the application currently maxamized, and to detect what game you're playing AutoIt simply grabs the title name of Mame's exe. If you minimize mame as you're playing you'll notice that it'll read: "Mame: Teenage Mutant Ninja Turtles" - depending on the game. So in theory you simply grab the game name, and compare it using a series of if statements. (EG: If gamename = 'Teenage Mutant Ninja turtles' , do XYZ.) After determining the application to be TMNT, the script would: 3) A) First PAUSE the game. (I think it's P by default?) and then B) Display an image in full screen mode from storage on your harddrive with the name "TMNT CONTROLS." This image file would be your custom made "HOW TO PLAY" screen. So in sum, if you press the button the game pauses and the screen changes to display the controls for the specific game you're currently in! There are two more actions in this script however, one which does nothing if the game is in frontend (unless you designate it to display a help or something), and another which runs if an image is currently being displayed. (It would check to see if the image was running, and if it was it would CLOSE the image, switch to mame, and press P again unpausing the game, all at one button stroke and an incredible speed.
So that's more or less it. I'm posting this because you guys have helped me a lot so far with my machine, and I so I thought i'd put the idea out there for anyone who's in a similar predicament to me with controls. This may have been done before, I don't know - but take it for what you will. Scripting can be pretty powerful, and can be configured to do much more then display controls, the possibilities are limitless. I will be attempting to do this for my arcade machine, so if I get the script working i'll be sure to post it with the necessary tweaks for anyone who wants to configure it and set it up themselves. The ability to be able to view controls at any time during a game excites me quite a bit. I won't have to worry about friends complaining they don't know how to play: Instead they can simply check!