Jump to content
LaunchBox Community Forums

Recommended Posts

Posted

I use my gamepad to exit games in almost all of my emulators. I play MAME the most and find it really irritating having to hit escape when I wanna quit a game. Is there any way to do it?

Cheers :)

Posted

Launchbox's Controller Automation button combo will do this for you. The button combo sends the Escape command to the PC shutting down the emulator as long as it supports Escape to close it. Some emulators don't and in those cases an AHK script can be set for the emulator in LB to send the close emulator command to it.

  • Like 1
Posted

Hi Guys,  JJ helped me by creating this ahk script for me.

Holding joystick button 10 (my start button) for 5 seconds exits mame.

$joy10:: ; my start button
{
	keywait, joy10, t5
	if errorlevel <> 0
	{
	Send {esc down}{esc up}
	}
}

 

 

 

  • Like 2
Posted (edited)

Super noob question I guess but I copied and pasted your ahk code into the ahk section of tools>"edit" emmulators in launch box.  Then I changed your joy10 to my joy1 key in Mame which is mapped to my player 1 button.   Loaded a game in Mame and tried to exit holding the key for 5 and it didn't exit. Any help would be appreciated.  Is it because I already have that key mapped to "p1 start"? I also do not have premium version yet so I cannot set buttons in launch box as Lordmonkus suggested. Looked in mame64 but could not find an escape key to map a button to. 

Edited by omlifecrew
Posted

To test ahk script open mame and press escape on keyboard to exit.

Also go into control panel in windows and test game pad settings to make sure your button is number 1

 

Posted

The script has a slight issue where he the game starts because you have credits in the machine or is on free play you may have to hold button again for 5 seconds. But will exit 99% of the time

Posted

yeah why use a 3rd party workaround for an emulator that has a built in solution. MAME doesn't like simulated keyboard presses that is why it is problemsome.

Posted

In my case I have 8 arcade button control panel for each player. So start and exit button is very useful.

Fyi midway games save on mame exit so killing tasks in windows or alt f4 will not save your game

Posted

On my arcade machine I have it set in Mame to use coin and another button simultaneously to exit from game. Using the UI cancel built into MAME isn't the same as using Alt-F4 basically you are taking the built in Escape function in MAME and adding it to a button combo so it is cleanly shutting MAME down. Whatever works for anyone is great but the simplest solution is to use the one built into MAME.

  • Like 1

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...