My next bit of tinkering is going to be a 3D printed rotary mod for Sanwa JLF and maybe JLW joysticks.
I'm using a 12 position ALPS rotary switch.
GroovyGameGear has a program for their GPWiz that converts inputs from 3 wires (+ground) to 2 possible gamepad presses which are mapped in MAME to turn left and turn right.
To get the 3 inputs, you wire the 12 tabs on the rotary switch like the attached picture.
I don't have a GPWiz. I could probably accomplish something useable with an autohotkey script, but official MAME builds don't recognize fake keyboard input. They recognize fake gamepad input, but I'd have to install fake gamepads and it's already hard enough keeping the current gamepad order straight accross multiple programs without throwing fake gamepads into the mix.
So I'm thinking maybe a hardware solution, but using something cheap like logic gates rather than a microcontroller.
The way it needs to work is:
Lets use x and y for variables (not the keys X and Y).
Last input pulled to ground = x
Currently pulled to ground = y
if x=1 & y=2, then Right (an output to the keyboard encoder pulled to ground)
if x=1 & y=3, then Left
if x=2 & y=3, then Right
if x=2 & y=1, then Left
if x=3 & y=1, then Right
if x=3 & y=2, then Left
It would also be nice if the output were only sent momentarily so that MAME doesn't see a key as being pressed all the time. Pretty sure I can figure that part out.
My question for you electronics guys is does a specific component come to mind for such an application?
EDIT: ....or should I just buy a teensy board and learn how to program it?