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: hacking a gamepad as a CP interface?  (Read 1480 times)

0 Members and 1 Guest are viewing this topic.

JoeStrout

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 94
  • Last login:August 13, 2021, 02:26:49 pm
hacking a gamepad as a CP interface?
« on: August 21, 2015, 04:18:34 pm »
I'm having some trouble getting my U-HIDs to work (I'm on my second one already, and even though Andy is trying to help, we're not making much progress).

So, since I'm bound and determined to get this thing working, I'm exploring alternatives.  I considered getting a $10 AdaFruit "Trinket Pro" and programming it to emulate a keyboard or gamepad.

But then I thought: I already have four of these $10 gamepads lying around (the price has gone up to $11 since I bought them).  I've used them quite a lot on both on Raspberry Pi and on Mac, and they work great.  So, why not just hack them open and solder my own wires to the switch contacts?  And then simply plug them into whatever Mac or Pi we end up putting in our arcade cabinet?

Seems like an easy enough hacking job (in fact could be a good experience for the yoots).  But I thought I'd check here to see if anybody knows a good reason why this is a horrible idea.

BadMouth

  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 9273
  • Last login:Yesterday at 06:53:06 am
  • ...
Re: hacking a gamepad as a CP interface?
« Reply #1 on: August 21, 2015, 04:34:57 pm »
People do it all the time.  You may need to use a program like autohotkey or Joy2key for emulators that don't support gamepad input.
You won't exactly be going into uncharted waters.  Many people have done this and there should be plenty of tutorials. 
There are even commercial encoders like the GPWiz and Zero Delay that show up as gamepads.

If you're only going to run MAME, then it basically makes no difference.
MAME works with anything.

Personally, I think a keyboard encoder that avoids the first four oddball default MAME keys (CTRL, ALT, SHIFT, SPACE IIRC) results in the least amount of hassle when it comes to adding other emulators later.

JoeStrout

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 94
  • Last login:August 13, 2021, 02:26:49 pm
Re: hacking a gamepad as a CP interface?
« Reply #2 on: August 21, 2015, 05:42:24 pm »
Thanks.  Is there a keyboard encoder you particularly like?  I looked over the wiki, but when you eliminate Ultimarc (which I probably wouldn't go with again, if we end up 0/2 on these U-HID boards) and everything with a PS/2 interface (which is just silly), there aren't a lot of options left.

Also, with a keyboard encoder, I worry a bit about hitting some fiddly limit with number of simultaneous buttons (I would have 8 buttons for each of 4 players, when you count the joystick inputs).

Nice thing about the gamepad hack is that I've already tested it and know it works (even with 4 simultaneous players).

Of course I'm not giving up on my U-HID just yet... but it's good to have a plan B!

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 9678
  • Last login:Today at 12:43:37 am
  • Designated spam hunter
Re: hacking a gamepad as a CP interface?
« Reply #3 on: August 21, 2015, 06:23:08 pm »
I looked over the wiki
That's the old wiki.   ::)

The new one is here.

Also, with a keyboard encoder, I worry a bit about hitting some fiddly limit with number of simultaneous buttons
The 6-button USB limit is ONLY on "boot protocol" devices.

Unless you plan on doing an actual keyboard hack or buying an older model X-Arcade encoder (ask ark_ader about the workaround) you will not encounter that limit.   ;D


Scott

Fursphere

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1267
  • Last login:August 14, 2025, 08:55:50 am
Re: hacking a gamepad as a CP interface?
« Reply #4 on: August 21, 2015, 10:56:40 pm »
Hack a Logitech F310.

You'll get XInput for Windows games, and DirectInput so you can use the Logitech Profiler for keyboard over riders, with the flick of the switch.

And you can swap the DPAD with the ANALOG stick (left stick) with another button (this matters for Windows games....!)

I wish I would have done this instead of using the Akishop PS360+ encoders.

JoeStrout

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 94
  • Last login:August 13, 2021, 02:26:49 pm
Re: hacking a gamepad as a CP interface?
« Reply #5 on: August 21, 2015, 11:26:48 pm »
Thank you for the suggestion.  But I don't do Windows, so I don't know that much of that applies in my case.  I just need something that acts like a USB gamepad or keyboard.

yotsuya

  • Trade Count: (+21)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19960
  • Last login:August 08, 2025, 09:49:26 pm
  • 2014 UCA Winner, 2014, 2015, 2016 ZapCon Winner
    • forum.arcadecontrols.com/index.php/topic,137636.msg1420628.html
Re: hacking a gamepad as a CP interface?
« Reply #6 on: August 22, 2015, 02:20:52 am »
Why would you go with a U-HID over an I-Pac?
***Build what you dig, bro. Build what you dig.***

JoeStrout

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 94
  • Last login:August 13, 2021, 02:26:49 pm
Re: hacking a gamepad as a CP interface?
« Reply #7 on: August 22, 2015, 09:42:05 am »
Why would you go with a U-HID over an I-Pac?
Not sure... but my 2012 self thought it was a great idea.  And it does seem to have all the functionality I need... if I can just get the danged thing to actually work.