Build Your Own Arcade Controls Forum

Main => Software Forum => Topic started by: tony.silveira on December 14, 2014, 11:51:34 pm

Title: MESS and AHK?
Post by: tony.silveira on December 14, 2014, 11:51:34 pm
i've been spinning wheels for hours trying to figure out whey a small AHK script is working but not sending key presses to MESS.  I read on here elsewhere that MESS (and MAME) do NOT accept virtual key presses.  is this still true?

thanks all
Title: Re: MESS and AHK?
Post by: BadMouth on December 15, 2014, 09:51:52 am
Yup, since MAME/MESS gets the input closer to the source before it's processed through windows, software generated keystrokes aren't seen.

If you're capable of compiling your own, there are tutorials out there of changing it in the MAME source code.  It's a one line change.
I haven't seen it done in MESS, but I would think the line of code would be the same and could be found by doing a search.

RacerMAME is a build of MAME made for racing cabs.  For the sake of other programs/scripts helping with shifter issues, it has the change already made.
I know the xml it generates will only list the driving games.  Not sure what other issues you might run into using it, but it's already compiled and ready to go.

While MAME doesn't see virtual key presses, it does see virtual gampad presses.
This is the route I'd take.  Either using Headkaze's vjoy program (make sure you get the one made by headkaze and not the knock-off), or directly in autohotkey.
I'd need a refresher on posting gamepad presses in ahk.
Title: Re: MESS and AHK?
Post by: haynor666 on December 15, 2014, 02:06:03 pm
That's probably caused by raw inputs instead of direct inputs (keyboards and mouses are read through raw but pads still through direct input). There is simple hack for mame for restoring direct input also for mouse and keyboard.
Title: Re: MESS and AHK?
Post by: empardopo on December 19, 2014, 02:50:23 am
Where was this hack? I do not remember now ...
Title: Re: MESS and AHK?
Post by: Vigo on December 19, 2014, 03:03:37 am
This?

http://forum.arcadecontrols.com/index.php?topic=141243.0 (http://forum.arcadecontrols.com/index.php?topic=141243.0)