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
Site News

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


  

Author Topic: DIY PiZero Encoder for 49way Midway Joystick  (Read 511 times)

0 Members and 1 Guest are viewing this topic.

txgraeme

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 11
  • I shall build my own arcade controls.
DIY PiZero Encoder for 49way Midway Joystick
« on: June 09, 2018, 04:56:03 pm »
Does anyone know if it's possible to build a Pi Zero Encoder for 49way joysticks?  The Pi Zeros now have support for use in USB Gadget mode (https://learn.adafruit.com/turning-your-raspberry-pi-zero-into-a-usb-gadget), and so I was thinking with the GPIO pins available then it can be done quite easily on the hardware side.  The software side I'm basically clueless on.  Anyone have ideas or experience with it?

Thanks in advance.  It would be nice to have a backup for my GDL cabinet when the original hardware fails. 

nitrogen_widget

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1009
  • I want to build my own arcade controls!
Re: DIY PiZero Encoder for 49way Midway Joystick
« Reply #1 on: June 11, 2018, 11:27:35 pm »
Wouldn't a micro controller work better?
I picked up a few NANO's off amazon that can be programmed as keyboard,mouse,joystick encoders and have a usb interface.
They are cheaper also.

but i'm not sure how a 49 way actually works.
how many output wires does it have?

txgraeme

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 11
  • I shall build my own arcade controls.
Re: DIY PiZero Encoder for 49way Midway Joystick
« Reply #2 on: June 14, 2018, 05:20:50 pm »
Thanks for the response, you list some good things to consider. A micro controller may work better, but I've never done one of those myself. I had always assumed that people had issues because I've not seen a method to use them with the 49ways. I have a set of the GPwiz49 but they only register in Windows, so I am out of luck if I want to use my Linux OS.

IIRC, the 49 ways have 3 optical switches each direction, which are logically combined into 8 active joystick circuits on a 12 pin header.  Roughly 4 buttons on CP per player means controller would need 16 inputs and PiZero GPIO has ~26 (https://www.raspberrypi.org/documentation/usage/gpio/).

My presumption is that a wrapper program could translate inputs for Mame, and  a script in Mame could auto-select game mode for joystick mapping.

EDIT: updated circuit numbers above.
« Last Edit: June 14, 2018, 06:33:28 pm by txgraeme »

txgraeme

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 11
  • I shall build my own arcade controls.
Re: DIY PiZero Encoder for 49way Midway Joystick
« Reply #3 on: June 14, 2018, 06:37:51 pm »
Here is an example code library (Pi Zero) for similar devices:
http://gpiozero.readthedocs.io/en/stable/

Here is a description of previously designed interface using EPROM:
http://www.seanriddle.com/49way.html

baritonomarchetto

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 437
Re: DIY PiZero Encoder for 49way Midway Joystick
« Reply #4 on: June 15, 2018, 12:35:14 am »
Arduino nano cannot emulate joystick/mouse/keyboard (HID interfaces) as is. It would be better to work with an arduino pro micro or leonardo if emulating keypresses or mouse is your goal. They have a limited number of inputs anyway. For (way) more inputs and native HID emulation you should consider arduino DUE.

txgraeme

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 11
  • I shall build my own arcade controls.
Re: DIY PiZero Encoder for 49way Midway Joystick
« Reply #5 on: June 15, 2018, 04:58:58 pm »
I believe the pi zero has all the inputs required, so I will be focusing my efforts on that board. It already has existing code built-in to act as HID (for example ,https://randomnerdtutorials.com/raspberry-pi-zero-usb-keyboard-hid/), so it may be better choice here.

  
 

Sitemap 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31