Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up --- Bug Reports --- Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: EventGhost not working with GroovyMAME  (Read 286 times)

0 Members and 1 Guest are viewing this topic.

Dracrius

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 64
  • Last login:September 13, 2019, 06:32:53 am
  • Proud Builder of a MAME Cabinet!
EventGhost not working with GroovyMAME
« on: August 13, 2019, 10:38:08 pm »
*Edit* Changed Title from "Dinput not working..." as I don't think dinput is the root of the problem anymore!

I thought I had to force it on with a custom build like you use to but someone else and a few searches say that changing
Code: [Select]
keyboardprovider auto to
Code: [Select]
keyboardprovider dinput should work but the EventGhost Script I had working on an older version of MAME with direct input forced isnt working. I use this script to add a coin and hit player start with one button so atm you cant play any games on my cabinet haha the player buttons do nothing.
« Last Edit: August 14, 2019, 02:46:27 pm by Dracrius »

buttersoft

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 855
  • Last login:Yesterday at 07:15:53 pm
  • Is running at 15kHz
Re: Dinput not working with GroovyMAME
« Reply #1 on: August 14, 2019, 01:22:11 am »
MAME will not accept/see keypresses of zero duration, so that might be it. It will accept Autohotkey keypresses, provided you set keyboardprovider dinput as you note, but also in your Autohotkey script set "setkeydelay, 0, 50". Not sure about the script program you're using.

Dracrius

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 64
  • Last login:September 13, 2019, 06:32:53 am
  • Proud Builder of a MAME Cabinet!
Re: Dinput not working with GroovyMAME
« Reply #2 on: August 14, 2019, 01:44:43 am »
*Edit* Browser crashed and posted half reply and I rewrote it before I realized
« Last Edit: August 14, 2019, 01:58:20 am by Dracrius »

Dracrius

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 64
  • Last login:September 13, 2019, 06:32:53 am
  • Proud Builder of a MAME Cabinet!
Re: Dinput not working with GroovyMAME
« Reply #3 on: August 14, 2019, 01:56:14 am »
MAME will not accept/see keypresses of zero duration, so that might be it. It will accept Autohotkey keypresses, provided you set keyboardprovider dinput as you note, but also in your Autohotkey script set "setkeydelay, 0, 50". Not sure about the script program you're using.
Well that was kind of my point actually this script is fine tuned to work with MAME already. It works perfectly with a MAME 0.156 build I have. With that build I figured out the timing as its a bit of a sweet spot with the keys being held down for .02s with .5s between key release and the second key being pressed and held down for .02s. I do remember having issues with just simple keypress's I had to switch to key down wait at least .02s key up macro for it would trigger a keypress in mame. I'll attempt extending those times but I'd be surprised if the devs making it an option actually made it even less responsive.

EventGhost is just Autohotkey on steroids or with an actually UI depending on how you look at it. It has plugins and allows you to script based off almost anything as it can keep track of system events or basically any program or hardware events if someone takes the time to write a plugin for it. It also has an event window where you can see everything it is listening to and or what it does when an event is triggered making it extremely easy to problem solve or create new scripts.
« Last Edit: August 14, 2019, 02:47:51 pm by Dracrius »

buttersoft

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 855
  • Last login:Yesterday at 07:15:53 pm
  • Is running at 15kHz
Re: Dinput not working with GroovyMAME
« Reply #4 on: August 14, 2019, 02:06:01 am »
Iím pretty sure the change from rawinput to dinput being the default was made around MAME 0.110, so much earlier than 0.150. The MAMEdevs change stuff around all the time though. I havenít tried any newer revisions, but Iím using my script with autohotkey on MAME 0.193. I guess you could try an older version of GM around there (should be easy to find on the google drive site?) and a few roms that havenít changed in ages like from the CPS1 library.

EDIT:ok, you ninja'd me. Hmm, maybe you'll need to tweak those timings. Can you prove/test that a single keypress from your script is reaching MAME?

Dracrius

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 64
  • Last login:September 13, 2019, 06:32:53 am
  • Proud Builder of a MAME Cabinet!
Re: Dinput not working with GroovyMAME
« Reply #5 on: August 14, 2019, 11:08:20 am »
I'm now thoroughly confused. The dinput build I have does not recognize my macro either only my MAMEUI Deluxe 0.156. Now I can clearly remember spending a long time to find this dinput build but I guess I forgot it not working either. I now have no idea at all what is special about that MAMEUI Deluxe 0.156 that is allowing it to pickup my macro while both GroovyMAME and the Dinput MAME build I have ignore them. I extended the time held down to half a second so there is no reason it shouldnt be picked up by GroovyMAME and MAMEUI Deluxe will pick it up with 0.05 sec (I was confused my script originally held down for 0.05 and wait 0.2 between keys). I tried raw, dinput and win32 under KeyboardProvider for GroovyMAME with no response from any of them. Is their somewhere else it may be setting the keyboard type? I checked all my ini's and only the mame.ini at the root has reference to KeyboardProvider.

Calamity

  • Moderator
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 6723
  • Last login:Yesterday at 04:00:05 pm
Re: Dinput not working with GroovyMAME
« Reply #6 on: August 14, 2019, 11:16:53 am »
If I remind correctly, MAME natively supports DirectInput 8, and that's what you get with the keyboard provider option. Your app propably requires DirectInput 7, that might be the issue. You can still get that but you need to compile a special build, activating a flag before compiling. I can't provide the details, but it shouldn't be hard to google for the instructions.
Important note: posts reporting GM issues without a log will be IGNORED.
Steps to create a log:
 - From command line, run: groovymame.exe -v romname >romname.txt
 - Attach resulting romname.txt file to your post, instead or pasting it.

CRT Emudriver, VMMaker & Arcade OSD downloads, documentation and discussion:  Eiusdemmodi

Dracrius

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 64
  • Last login:September 13, 2019, 06:32:53 am
  • Proud Builder of a MAME Cabinet!
Re: Dinput not working with GroovyMAME
« Reply #7 on: August 14, 2019, 11:46:40 am »
If I remind correctly, MAME natively supports DirectInput 8, and that's what you get with the keyboard provider option. Your app propably requires DirectInput 7, that might be the issue. You can still get that but you need to compile a special build, activating a flag before compiling. I can't provide the details, but it shouldn't be hard to google for the instructions.
I was trying to compile my own build yesterday but it fails on me every time and I can't figure out why. Any chance the 2 errors in this log I copied from the cmd make more sense to you? I have no idea why I can't even compile a build. I was wrong on the version number for the dinput build it was 0.166 so depending on when they changed to DirectInput 8 you may be right. My end goal would be to have Haynor's Build working as I need the no nag to get passed a few cocktail incompatibility warnings that don't even apply to my stand up cab and interrupt the Random Game Attract mode.
« Last Edit: August 14, 2019, 11:50:22 am by Dracrius »

Dracrius

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 64
  • Last login:September 13, 2019, 06:32:53 am
  • Proud Builder of a MAME Cabinet!
Re: Dinput not working with GroovyMAME
« Reply #8 on: August 14, 2019, 12:31:51 pm »
For the time being I gave up on EventGhost and tried Autohotkey and it works. I am still quite lost on why EventGhost doesnt on these builds of MAME other then the possibility that even on the most recent branch of EventGhost they have not updated to DirectInput 8 as Calamity suggested. I appeared to already have AutoHotkey setup even with a script so I can't remember why I switched to EventGhost I could have sworn it was because AutoHotkey didnt work but I guess there's a chance it uses DirectInput 8 and maybe didnt work with the DirectInput 7 in my MAMEUI 0.156 if that was the issue.