Main > Driving & Racing Cabinets

Demul Exit?

<< < (4/7) > >>

BadMouth:

--- Quote from: twistedsymphony on August 13, 2014, 07:24:23 am ---
--- Quote from: Howard_Casto on August 12, 2014, 09:18:36 pm ---ugh....

Since TS2 is a bit convoluted to setup if you aren't going to take advantage of blinky lights....

Run, emulator_multicpu.EXE %1%
sleep 4000
MouseMove, 1920,400
~Escape::
Process, Close, emulator_multicpu.EXE
ExitAPP
return

That'll do ya for model 2.  Of course omit the "multicpu" part if you are using the standard exe.

--- End quote ---
^what is this script for?
I'm looking for a wrapper that I can put around a PC game to quit on a shortcut key.

--- End quote ---

emulator_multicpu.EXE = Model 2 emulator

...although I've never had any issues with the mouse appearing in model 2, so I'd just ditch that and the delay.
It's an autohotkey script.  autohotkey can fix MANY emulator/front end issues and make everything work the way you want it.
All the "hyperlaunch" jibber jabber in hyperspin is just autohotkey. 


--- Code: ---ESC::
Process, Close, "exename.exe"
--- End code ---
is the standard for closing things and how most of my scripts look

I try to use:

--- Code: ---WinClose, "window title"
--- End code ---
On my newer scripts because it's a bit gentler and doesn't leave the desktop resolution screwed up as often as just killing the process does.
There is an ahk script out there for snagging window titles for things that you can't see a title bar on.

I am not a programmer, but am persistent enough to figure out how to make everything behave the way I want it to.  :P

twistedsymphony:
Ahh... I knew it was for Model 2 Emulator but I didn't recognize the script format. I've never used AHK before outside of HyperLaunch and it pretty much hides all the actual script from you.

I'll have to play around with that a bit tonight. thanks

BadMouth:
You can pull off just about anything with AHK.
Everyone should know how to remap keys and kill programs.
Those things are so simple they can be learned in a few minutes.

http://www.autohotkey.com/docs/Tutorial.htm
(a better, more emulator specific way would be just to search for ahk scripts in the byoac software subforum)

The Taito Type X games on my stand-up cab are from back when they were first released and are very finicky.
Raiden IV wouldn't launch if my front-end (Mala) was running, so I have an AHK script that:

1. Puts up a loading screen to hide everything
2. kills Mala
3. posts the command to have a pololu motor controller physically rotate my screen
4. remove the loading screen
5. then when ESC is pressed, it
6. kills Raiden IV
7. resets the desktop resolution
8. writes to the mala.ini file to skip the intro video, set orientation to vertical, and note where the user was in the gamelist
(mala writes this on exit, so it doesn't get done when killing it suddenly)
9. relaunches mala

Crazy number of workarounds, but in the end it works the way I want it to.
I can launch and play Raiden IV from my front-end like any other game.

The only big limitations are that key binding doesn't work on emulators like MAME that get their input via raw-input and on Vista and later it cannot block keys.
(MAME will accept fake gamepad input though and if you compile your own it's a one line change for it to accept fake keys)

Other than that, anything that can be done in windows by you, can be automated by ahk.



twistedsymphony:
I've never played around with it as the only front end I've used is HyperSpin and the machine I built with TTX and other problem emulators HyperLaunch has all the necessary AHK scripts built.

I'm currently building a Fix it Felix cab with a vertical monitor and figured I'd load up 100 or so vertical games through MAME with a hyperspin front end, I'm not using HyperLaunch at all because it's completely unnecessary for this setup. Howard's Fix it Felix wrapper works great for that, and mame doesn't need any help launching natively from HyperSpin.

However I decided I want to run Ikaruga as that's my all time favorite bullet-hell shooter, the PC I'm using is too slow to run Demul so I got a copy of the PC release, easy enough to launch that but the only way to quit to go to the game's menu and take the "exit" option... so basically I just need a script that executes an [Alt]+[F4] when I push [Esc]

Howard_Casto:
Well there's a reason I'm using "process, close" and not some other closing options, particularly for demul.  Depending upon the version, alt+f4 is broken... it doesn't work.  Also some of the arcade games for demul, I can't remember which system, hang and crash if you try to close or resize the window while the emulator is in full screen.  So closing the process is the only way to do it definitively. 

That's the kind of thing I'm talking about.  Forcing a program to exit via external means can potentially cause all manner of memory leaks or hangs/crashes.  It would be so much simpler if the authors would just add the option.

That being said I think model 2 can be closed via alt+f4.  I was just being lazy.  For that matter I probably could have used my old command line wrapper on my site I wrote in 1999... yup... I've been dealing with this stuff that long.  My wrappers pre-date ahk.  ;)

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version