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 Try the site in https mode Site News

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

  

Author Topic: Simultaneous arcade and joypad controls via Autohotkey  (Read 2639 times)

0 Members and 1 Guest are viewing this topic.

SlainbytheBrain

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 25
  • Last login:August 23, 2011, 07:01:36 pm
Simultaneous arcade and joypad controls via Autohotkey
« on: July 20, 2011, 03:09:12 am »
I am using an X-Arcade to control games in my cabinet which has the buttons act as keyboard strokes (left is numpad4, right is numpad6, etc.).

The fiance seems to have trouble with the concept of using the joystick and arcade buttons to control old NES, SNES, and Genesis games. I decided I would try to use autohotkey to assign joypad controls to the keyboard strokes used by the X-Arcade, thereby allowing both input methods to do the exact same thing (and letting anyone use either option when playing games on the cabinet).

However, I have run into some trouble. I have used a script I found to figure out what each joypad button corresponds to as an Autohotkey command. I had these commands send the appropriate keystroke. I cannot figure out how to map the D-pad, which is listed as POV27000 for left, POV9000 for right, POV0 for up, and POV18000 for down.

Entering these in as buttons does not work (autohotkey does not recognize them). I also tried the following:

#IfWinActive ahk_class KegaClass
If JoyPOV = 9000::
Send {Numpad6 down}
KeyWait JoyPOV
Send {Numpad6 up}

I think I might be on the path here (all this scripting is new to me) but I probably wrote it out improperly. Does anyone know what I am missing here?


Thanks,
Matt

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:August 14, 2023, 02:00:48 am
  • 0x2b|~0x2b?
Re: Simultaneous arcade and joypad controls via Autohotkey
« Reply #1 on: July 20, 2011, 03:27:13 am »
Take a look at XPadder

Incidently for software that does the reverse (keyboard to joypad) check out VJoy

SlainbytheBrain

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 25
  • Last login:August 23, 2011, 07:01:36 pm
Re: Simultaneous arcade and joypad controls via Autohotkey
« Reply #2 on: July 20, 2011, 07:03:11 pm »
Take a look at XPadder

Incidently for software that does the reverse (keyboard to joypad) check out VJoy

Ok, that did the trick...kind of. I was able to set up a configuration for the player 1 controller. However, XPadder doesn't seem to recognize the second controller (both controllers are Playstation2 controllers going into a single usb converter). The controllers seem to have the same name in Windows "MP-886 Dual USB Joypad." I can find no way to choose one or the other, Xpadder seems to default to the first controller even if I try to make a new profile.

Any ideas?

SlainbytheBrain

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 25
  • Last login:August 23, 2011, 07:01:36 pm
Re: Simultaneous arcade and joypad controls via Autohotkey
« Reply #3 on: July 20, 2011, 10:31:57 pm »
Ok, after extensive clicking (this program could use some tool tips...) I was able to set up two profiles, one for player 1 and one for player 2.

I placed both profile files in my startup menu but get an error when Windows starts. I changed this to just the player 1 profile in the start menu and it works just fine. I can then select the player 2 profile which loads on top of the player 1 profile and both controllers work fine.

I  believe the start menu error may have had to do with launching both of the profiles simultaneously at startup. Does anyone know of a way for me to automatically launch the player 2 profile after a delay or in sequence after the player 1 profile has launched?

SlainbytheBrain

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 25
  • Last login:August 23, 2011, 07:01:36 pm
Re: Simultaneous arcade and joypad controls via Autohotkey
« Reply #4 on: July 21, 2011, 12:31:50 am »
If anyone else has problems with this in the future, I think I figured out the problem.

Just running the player 1 profile at startup seemed to work. I don't know why this didn't work initially, but it may have had something to do with whether or not the Dual Shock 2's were in analog mode. I'm really not sure why everything is working now, but I'm going to count my blessings.

jmike

  • Trade Count: (+10)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1018
  • Last login:June 24, 2025, 04:54:36 pm
Re: Simultaneous arcade and joypad controls via Autohotkey
« Reply #5 on: July 21, 2011, 07:30:55 am »
Not sure if you'd consider it but how about buying the fiancee a USB Nintendo controller? I'm sure she would appreciate having the old school controller while she plays SMB.

 :cheers: