The NEW Build Your Own Arcade Controls

Front End Support => MaLa Frontend => Topic started by: juggle50 on September 02, 2013, 10:28:30 am

Title: MALA start and MAME exit
Post by: juggle50 on September 02, 2013, 10:28:30 am
Hey guys, wondering if you have any tips for me.  I have Mala set up so that the "one player" button will select the game. Then when in mame, I've got "exit game" mapped to the 1+2 player buttons so Mame will exit back to mala when I press those buttons at the same time.

For the most part this works fine. However, occasionally, I'll exit out of mame and mala will reload the same game immediately.  I think it's because the 1 player button is used both in launching the game and exiting out of the game.  Any solutions?  It would be great to ensure that the exit command is completed and to delay any new command for a half second so mala doesn't relaunch.  I don't have any extra admin buttons so I have to exit using these combo keys.
Title: Re: Re: MALA start and MAME exit
Post by: empardopo on September 02, 2013, 05:34:28 pm
Hey guys, wondering if you have any tips for me.  I have Mala set up so that the "one player" button will select the game. Then when in mame, I've got "exit game" mapped to the 1+2 player buttons so Mame will exit back to mala when I press those buttons at the same time.

For the most part this works fine. However, occasionally, I'll exit out of mame and mala will reload the same game immediately.  I think it's because the 1 player button is used both in launching the game and exiting out of the game.  Any solutions?  It would be great to ensure that the exit command is completed and to delay any new command for a half second so mala doesn't relaunch.  I don't have any extra admin buttons so I have to exit using these combo keys.

You could use another combination of buttons to exit back to mala, for example player2 + 1joyUp.

Greetings

Enviado desde mi GT-N7100 usando Tapatalk 2
Title: Re: MALA start and MAME exit
Post by: BadMouth on September 03, 2013, 06:25:46 pm
You could probably make a solution with autohotkey, but I'd just switch to using the first action button on P1's side to launch the game.
I originally had P1 Start launch games, but people were always trying to press the first button on the controls so I changed it to that.
Title: MALA start and MAME exit
Post by: juggle50 on September 04, 2013, 07:14:22 am
Thanks for the reply guys. What would the auto hotkey script tell mala?  Would it be to wait 0.5 seconds before allowing the controls to be active in mala?  Can you suggest how the script might look?

Thanks again guys
Title: Re: MALA start and MAME exit
Post by: BadMouth on September 04, 2013, 09:04:03 am
Thanks for the reply guys. What would the auto hotkey script tell mala?  Would it be to wait 0.5 seconds before allowing the controls to be active in mala?  Can you suggest how the script might look?

Thanks again guys

You could make a script that blocks keyboard input for .5 seconds after both buttons have been pressed.
I'd just put it in your windows startup folder and let it start with windows and run all the time.

Not sure if this works or not, but to give you an idea:

1 & 2::
BlockInput, on
sleep, 500
BlockInput, off
Return

If it doesn't work, use google to improve it or post for help in the software forum
Title: Re: MALA start and MAME exit
Post by: juggle50 on September 24, 2013, 12:01:48 am
Thanks for the tip. Just got around to working on this and I incorporated your script to my existing ahk script that tells the computer to send esc when 1 & 2 are pressed at the same time.  It seems to help to make sure the "1&2" button up signal is sent before esc.  See below. 

~1 & 2
Send, (1 up)
Send, (2 up)
Send, (esc down)
Blockinput, on
Sleep, 1500
Send, (esc up)
Blockinput, off
Return

One more question.  I'm using mame 114 for almost all games and this script works great. However, I use mame 147 for one game using sgt's multi-emulator/1 game-list method. 

Mame 147 doesn't recognize the ahk script.  Which I believe is because later versions of mame recognize direct inputs only.  I would program mame default to cancel when 1&2 are pressed at the same time but unfortunately, when I do that, I get the same problem (the game starts up after I exit).

Could I add a "process, close" command to the script for mame 147 only?

Thanks again!!!
Title: Re: MALA start and MAME exit
Post by: juggle50 on October 08, 2013, 12:11:02 am
Just bumping this thread.  Having a tough time with the "process, close" command in ahk.  Any suggestions for how to write that into the little script I have?  Need to close Mame 147 when I press the 1 & 2 key. (Can't do it through mame because when it closes, mala just restarts the game since "start game" is keyed to 1.