Perhaps a remix of the image-search AHK scripts by Nitz and Le Chuck might be useful.
How did you do the Tron in-game switch? Joychoose is probably normally looking at controls.ini, which doesn't give 8way v/s 4 way for tron.
Right you are, Tron is an 8way in the controls.ini so I went hunting for suggestions and Nitz came to the rescue with a great image-search AHK script. The development of the project is here. In short a script runs in the background and hunts for some very small images that are unique to Tron and the lightbikes level. When it sees these images the script calls my servo.
Wire the Exit button to a different IPac input
or reprogram your IPac Exit input to a different keystroke.
- Either way, assign a keystroke to the Exit button that isn't used in the MAME built-in frontend or any games.
When the AHK script sees that keystroke, trigger the search for an image unique to the MAME frontend.
- If it finds the unique image, do nothing. (i.e. don't exit MAME)
- If it doesn't find the unique image, send an ESC keystroke.
- Maybe add a short pause after sending the ESC keystroke to reduce the chance that someone hits the key several times when exiting the game, triggering image search several times and buffering some ESC keystrokes before the MAME frontend is displayed.
Even with the AHK script running, you can still exit MAME by pressing ESC on a wireless keyboard
or using a hidden button wired to an IPac input that outputs an ESC keystroke.
Scott