The NEW Build Your Own Arcade Controls

Main => Software Forum => Linux => Topic started by: mahuti on August 19, 2020, 01:43:58 am

Title: How-To: Using GroovyGameGear GPWiz 49-Way & GpWiz40 encoder in Linux
Post by: mahuti on August 19, 2020, 01:43:58 am
Just wanted to share. Using the GPWiz 49-Way encoder and the GPWiz40 encoder was not possible for me for a long time, because both joysticks sent 8-bit positional data instead of 16-bit. Meaning all of the control action would basically happen in the top-left quadrant... it looked like you're only moving top left, regardless of your position with the stick. I know others have discovered how to use these, but I thought I'd share my write up here for anyone else that likes these encoders and wants to use them on a Linux / Raspberry Pi box.

HID Quirks need to be added to handle the GGG Hardware. This is specifically how to do it on a Raspberry Pi, but I'd guess it's similar on other flavors of Debian. You'll need to know the board ID's of the hardware you're using. GPWiz-49 uses 0007, and up. Not sure about all RotoX boards, but the first is 0035

1. Create (or edit) /etc/modprobe.d/usbhid.conf with the following: (0007 1st 49-way board ID, 0008 2nd 49-way board ID, 0035 1st GPWiz40 board ID)

Code: [Select]
options usbhid quirks=0xFAFA:0x0007:0x00000020,0xFAFA:0x0008:0x00000020,0xFAFA:0x0035:0x00000020
2. Edit the the boot script and add the HID quirk to it:

Code: [Select]
sudo pico /boot/cmdline.txt
Add this to that file (with a space after any existing items)

Code: [Select]
3. Add a UDEV rules to allow access to this device without ROOT privileges
see here for more details (

Create the rule file
Code: [Select]
sudo pico /etc/udev/rules.d/50-set49mode.rules
4. in the UDEV rule add this:

Code: [Select]
ACTION=="add", SUBSYSTEMS=="usb", ATTRS{idVendor}=="fafa", ATTRS{idProduct}=="0007", MODE:="666"
ACTION=="add", SUBSYSTEMS=="usb", ATTRS{idVendor}=="fafa", ATTRS{idProduct}=="0008", MODE:="666"
ACTION=="add", SUBSYSTEMS=="usb", ATTRS{idVendor}=="fafa", ATTRS{idProduct}=="0035", MODE:="666"

5. Once the file is saved, reload UDEV to take advantage of it.

Code: [Select]
sudo udevadm control --reload
Once that's done, you can may want to restart and then  test your joystick using jstest. You can find the list of available joysticks using

Code: [Select]
ls /dev/input
Your joystick will be js0, js1, js2... something like that. If you only have on plugged in, then it'll likely be js0. Once you identify your joystick, test it using jstest.

Code: [Select]
jstest /dev/input/js0

You should see values range from -32k - 32k (or so... ) when you move the stick around. If you change modes, the values shown will change. For instance, in the diagonal 4-way mode (GGG mode 5) it will only show 32k values and center 0 value, where the 49way mode (GGG mode 1) will show a range of values as you move the stick.
Title: Re: How-To: Using GroovyGameGear GPWiz 49-Way & GpWiz40 encoder in Linux
Post by: keilmillerjr on August 19, 2020, 02:47:49 pm
Is there a method to switch ways on Linux?
Title: Re: How-To: Using GroovyGameGear GPWiz 49-Way & GpWiz40 encoder in Linux
Post by: mahuti on August 19, 2020, 04:17:35 pm

There have been a few utilities for setting the mode on the GGG 49Way board. I've shared a python version before, Mark Alston has a perl script floating around that will change it dynamically.  I made a standalone utility called "set49mode" based on some work by RGBCommander, available on Github. And in the last few days I helped Meduza to get LEDSpicer working with both the GGG 49Way board and the GPWiz40 Board with Rotary support.

Here's my simple utility
just pass it one of the modes and it'll change all GGG 49 way boards to that mode.

Here's Meduza's LEDSpicer app, which is more full featured and includes automation of mode selection
This supports multiple joysticks.,163406.0.html

Here's Mark Alston's app written in perl with automation of mode selection

With regard to the GGG GPWiz40 with rotary support, I have written a standalone script but haven't released it. I may, but there's little interest. In any case, LEDSpicer does support it... it supports multiple sticks as well.