Build Your Own Arcade Controls Forum
Main => Software Forum => Topic started by: aesculus on February 02, 2021, 09:25:52 pm
-
I don't use Hyperspin or any frontend. I like the plain old MAME frontend. I have my machine pretty much configured how I want it, with one exception. Whenever my kids play it, they often hit the escape button too many times, closing MAME and showing the Windows 10 desktop. Is there a way to set the key that closes a game different from the key that closes MAME out completely? I want players to be able to close individual games normally, but require a secret keypress to close the MAME frontend. Is that even possible?
********
Here's what I ended up doing. Rather than use AutoHotkey to have esc launch MAME, which actually interfered with the key's function while in MAME (or would launch repeated instances of MAME), I simply made an AutoHotkey script that listens for mame64.exe to close, and then immediately re-launches it. So when the user hits escape, the the mame screen blanks momentarily, then comes right back up. The user cannot exit using the CP now. I threw in a F4::Pause to make getting back to Windows graceful for the admin. Hitting F4 again in Windows automatically launches MAME again. Script is simple:
Loop {
Process, WaitClose, mame64.exe
Run mame64.exe
}
F4::Pause
-
Doesn't seem to be possible.
-
I don't use it like you do but, I was thinking what if you assign the MAME setting (when you are in a game, TAB into the configuration) and change the EXIT GAME to any other keys?
does this 2 the share the same configuration ?
-
Unfortunately, the key assigned to exit a machine is always the same key that exits mame. It's hard to believe, but that is how it is, I've come to find out. I had an idea that maybe using AutoHotkey to relaunch mame whenever the esc key is pressed would be the solution. Like a yo-yo, every time you try to close it, it persistently comes back. That might present its own problems, however. I will test that out.
-
On my son's, while configuring, and before I set it to auto shutdown on exit, I'll often exit MAME and reenter with the joystick controls by pressing Ctrl (button 1)+ esc to bring up the taskbar menu, then just use the joystick to navigate up to the shortcut on the start menu and hit enter. I know that doesn't solve the problem, but it's an easy way to reload mame after exiting. I do this for programming and testing things like LEDBlinky and the Sinden.
-
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 (http://forum.arcadecontrols.com/index.php?topic=117395.0). 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. :dunno
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
-
On my son's, while configuring, and before I set it to auto shutdown on exit, I'll often exit MAME and reenter with the joystick controls by pressing Ctrl (button 1)+ esc to bring up the taskbar menu, then just use the joystick to navigate up to the shortcut on the start menu and hit enter. I know that doesn't solve the problem, but it's an easy way to reload mame after exiting. I do this for programming and testing things like LEDBlinky and the Sinden.
Easier way to do this:
Make a shortcut to mame (or your frontend), which you have already done. Now go to the shortcut's properties (right-click). From there you can set a shortcut key combo to launch the shortcut. I always choose [ctrl]+[alt]+1, which = P1 buttons 1+2+ P1 start for default MAME keys.
-
Thank you for the suggestions. I came up with a solution that I like. I posted it at the beginning of the thread.
-
Neat solution, thanks for posting it
-
Just as long as you know that from 0.229, it won't be called mame64.exe any more - it will become mame.exe