Build Your Own Arcade Controls Forum

Main => Software Forum => Topic started by: TheElectricMonk on August 19, 2018, 01:23:00 pm

Title: Got Supermodel working with dual guns & rawinput - now AutoHotKey doesn't work
Post by: TheElectricMonk on August 19, 2018, 01:23:00 pm
I'm currently setting up a guns-only game cabinet, and I'm looking into adding Ocean Hunter on the Supermodel emulator.

To enable dual guns, Supermodel must be run with the -input-system=rawinput command line. So far, so good.
I also needed to set the controls in the .ini file to read the guns as mouse3 and mouse4, for whatever reason, but that works, too.

My problem:
All my other emulators have the Q key configured to exit the emulator and F8 to restore a saved state.
Supermodel uses Esc and F7 respectively, and this is hardcoded and can't be changed via the .ini file.
I've written a script in AutoHotkey that changes the relevant keys, and it works fine in Star Wars Trilogy Arcade, since that doesn't use the rawinput option.
However, using rawinput blocks AutoHotKey's inputs. I've played around with SendPlay and SendEvent instead of SendInput, to no avail. If I disable rawinput, the second gun doesn't work.

Are there any AHK pros out there that can tell me how (or even if) I can get AutoHotKey to get past the rawinput barrier?

The alternative would be to go and remap MAME, snes9x, nestopia, Daphne, Dolphin and Phoenix to use Esc and F7, and I'd rather avoid that hassle if I can.

Any help is much appreciated.
Title: Re: Got Supermodel working with dual guns & rawinput - now AutoHotKey doesn't work
Post by: nexusmtz on August 19, 2018, 05:02:32 pm
If there were any way for AHK to work with raw input, someone would have discovered it while trying to get AHK working with MAME's (default) rawinput configuration. Fortunately, MAME now lets you specify different providers for lightgun and keyboard. It sounds like you need a similar option in Supermodel, although an input config option would suffice and would probably be easier to implement. Then again, changing two hard-coded keys should only be a couple lines in the source, and that would handle your particular case. (It's still open source, right?)
Title: Re: Got Supermodel working with dual guns & rawinput - now AutoHotKey doesn't work
Post by: TheElectricMonk on August 21, 2018, 03:01:14 pm
If there were any way for AHK to work with raw input, someone would have discovered it while trying to get AHK working with MAME's (default) rawinput configuration.

(slaps forehead) You're right of course. Silly of me. Sometimes I'm sitting on my brain...

Then again, changing two hard-coded keys should only be a couple lines in the source, and that would handle your particular case. (It's still open source, right?)

Not sure, but at any rate it looks like the Supermodel forums will be my next port of call. I've configured all my other emulators to use ESC and F7 (it was actually much less of a hassle than I feared), and now all that's bothering me is Supermodel's native use of ALT+P for pause. Maybe someone over at the Supermodel forums will be so kind as to compile me a build with that key changed to P.  :)
Title: Re: Got Supermodel working with dual guns & rawinput - now AutoHotKey doesn't work
Post by: vandale on September 24, 2018, 07:55:41 pm
Not sure, but at any rate it looks like the Supermodel forums will be my next port of call. I've configured all my other emulators to use ESC and F7 (it was actually much less of a hassle than I feared), and now all that's bothering me is Supermodel's native use of ALT+P for pause. Maybe someone over at the Supermodel forums will be so kind as to compile me a build with that key changed to P.  :)

I am having this exact same issue. I cant remap the pause key to my gamepad. I have successfully hexedited the supermodel.exe file and can change the pause key to any keyboard input I chose however I cant change it to a gamepad input.

Did you find a solution?

Thanks
Title: Re: Got Supermodel working with dual guns & rawinput - now AutoHotKey doesn't work
Post by: headkaze on October 06, 2018, 10:56:55 pm
Instead of trying to inject a raw input key (which is possible although I don't know how using AutoHotkey) how about sending a message to the emulator window such as WM_QUIT or WM_CLOSE to close it?

Title: Re: Got Supermodel working with dual guns & rawinput - now AutoHotKey doesn't work
Post by: lisowskikevin on April 25, 2021, 09:08:36 pm
I'm currently setting up a guns-only game cabinet, and I'm looking into adding Ocean Hunter on the Supermodel emulator.

To enable dual guns, Supermodel must be run with the -input-system=rawinput command line. So far, so good.
I also needed to set the controls in the .ini file to read the guns as mouse3 and mouse4, for whatever reason, but that works, too.

My problem:
All my other emulators have the Q key configured to exit the emulator and F8 to restore a saved state.
Supermodel uses Esc and F7 respectively, and this is hardcoded and can't be changed via the .ini file.
I've written a script in AutoHotkey that changes the relevant keys, and it works fine in Star Wars Trilogy Arcade, since that doesn't use the rawinput option.
However, using rawinput blocks AutoHotKey's inputs. I've played around with SendPlay and SendEvent instead of SendInput, to no avail. If I disable rawinput, the second gun doesn't work.

Are there any AHK pros out there that can tell me how (or even if) I can get AutoHotKey to get past the rawinput barrier?

The alternative would be to go and remap MAME, snes9x, nestopia, Daphne, Dolphin and Phoenix to use Esc and F7, and I'd rather avoid that hassle if I can.

Any help is much appreciated.

Could I trouble to ask you where you typed that command line to get both guns working? I’m running it through hyperspin and I don’t know where to input the command line for raw input.

Any help would be greatly appreciated!