GP-Wiz40 To Linux / RetroPie Joystick Mapping

Here is how the GP-Wiz40 maps to the Linux buttons. Note that the current build of MAME4ALL for Pi is limited to 16 buttons. There may be a way around this. This might change in the future. For now, it’s causing me problems. I’m hoping I can figure out how to get the actual analog stick ports to work — that would solve my problem.

I’ve included a column for what function I mapped to each button. You can do whatever you like. This worked for me.

GP-Wiz40_Linux_RetroPie_Mapping

Also, remember I’m trying to use only one of my GP-Wiz40 boards. First, it would be silly to waste another board. Second, I want to use only one USB port (so I can connect a keyboard for debugging, if needed, and not have a USB hub added to this mess.)

Update: I got the Linux values the hard way (don’t ask). The easier/proper way is to get the Linux jstest (joystick test) program. Which, for reasons unknown, isn’t included in the RetroPie build. To get it, go to the command line and install via:

sudo apt-get install joystick

You’ll then have access to jstest:
To see everything: jstest /dev/input/js0
To see events as they come in (easier when checking individual wires/buttons): jstest –event /dev/input/js0

(js0 = joystick #1, js1 = joystick #2, etc,) The GP-Wiz40 gets auto detected under js0, at least in my environment. 🙂

next up: Seeing if jscal (joystick calibration) can help get the “normal” GP-Wiz40 joystick (analog) ports working — so I can free up four digitals per player. Here’s hoping.

Update #2: Well, I got calibration to work. But MAME still doesn’t see/find/accept the “analog” joystick pins. So, I’ll stick to pure digital. Remember the problem with that: MAME4ALL-PI only supports 16 buttons. So, I pulled down the source and modified the code so that it will do 20 (for now — just testing). The compile is running now. We’ll see if that works.