The NEW Build Your Own Arcade Controls
Front End Support => MaLa Frontend => Topic started by: TopJimmyCooks on June 08, 2011, 11:38:25 am
-
There are pre and post commands for other emulators besides mame. Is there a way to run an .exe (.ahk script) or .bat on every mala exit? I would like to always make sure my monitor is rotated to horizontal.
One way would always run Mala by calling it in a script with the rotate command afterwards. Would this have any negative/performance effect on the operation of Mala/Mame/Emulators? I would shake my lazy carcass to give it a try but I'm taking a lunch break at work.
-
I just ended up pasting in the same post-command in every emulator.
-
But you can't give mame a post command that I have found, right?
-
I see what you are saying now. I don't think there is a Mame post command option. :-\
Another option might be to make a plug-in that simply runs the batch file upon game exit.
-
Mala can run your bat file on exit.
Look under options/configuration (right click on Mala screen)
Then GUI-- Mala Exit-- place a check on "run app on exit" and enter path and name of your bat file.
This "special" bat file can be set up with your ahk script to only turn horizontal when ran.
Of course if your Mala screen is vertical when you exit Mala, it might still be vertical on next boot up, even though your monitor has turned back to horizontal.
Or maybe Im missing what you are wanting to do.
If you have mala and startcom setup correctly, startcom will always rotate the monitor and the Mala screen back to horizontal whenever you choose a game in a different emulator, unless that emulator is listed in the "Vertical emulators" list in startcom. I guess I dont understand why you would always want to rotate the monitor back to horz unless you are doing something other than Mala with the computer?
-
DaOldMan, you basically nailed it. the bat file "wrapper" or mala will do what I wanted. I do have a good bit going on besides mala on that pc as far as setup and stuff, so I need to run windows. And, yeah, it does confuse mala if exited in vertical configuration. It's not a big deal since I'm not rotating the monitor itself just yet. Thanks for the input, all.
-
Hint:
In your script, when you exit mala and rotate monitor back to horizontal, have your script edit these lines in mala.ini:
SwitchOrientation=0
FlipOrientation=0
You need to play around with it and see if the values need to be 1 or 0. (Depends on how your monitor rotates I think).
If you get it right, mala will always start in horizontal, no matter which orientation it was in when you quit.
Make sure you make a backup copy of your mala.ini just in case it breaks and you need to start over.
Also, I wrote another small app for Mala (called MalaOri), that automatically starts Mala in whatever orientation the monitor is in at the time, but it reads the rotate rig's orientation switches that are connected to the printer port to get that orientation.
Not sure if your script returns the limit switch states to the PC?? (I know you are not using printer port).
-
Using scripts to edit the .ini files is something I would have to learn about. I'm just going to switch orientation in mala when needed for the near term. Then, once the dedicated cab is in use, the need should almost never come up to use anything outside Mala. That is a really good route to go if the need for a permanent fix arises. it's amazing what you can do with scripts.