Background

I love to tinker with things.  Anything.  Everything.  There isn’t a computer I’ve owned that I didn’t pop the case on to look at the components, layout, and to figure out what could be customized before I ever turned it on for the first time.  I can’t help it.  It’s in my blood.  Things must be disassembled to be understood.  With all that said, I ran across an issue on a recent project that I figured I could document. I had to scour the internet for the complete fix, so hopefully I can alleviate that for someone else. This fix should work for the CY-1121 and the CY-2121 game control boards.

 I am building an arcade machine using an AtomicPi with the large breakout board.   There were many attempts at software and operating software before settling on Lubuntu 20.04 and Retropie and the CY-1121 SJJX dual joystick control board.  Ultimately these were selected due to driver/chipset compatibility issues with Windows 10 and the sound chip for the DAC on the breakout board.  If anyone can solve the sound problem, please let me know.

I’m know I’m probably giving way too much information before just getting into the heart of the problem, but I feel it’s necessary for people to understand the setup, so that if they are implementing a similar one, then this is something that can possibly help them.  My AtomicPi Lubuntu 20.04 build uses grub.  The CY-1121 and other similar dual joystick boards get detected in Retropie/Emulationstation as a single controller.  For dual joysticks, it needs to be separate otherwise player 2 can’t play.

CY-1121 Joystick Control Board

The Steps for CY-1121 Fix


The first step in fixing this problem is to identify your joystick hardware.  To do this, you need to open a terminal and type in the command “lsusb”.

It should show several rows of information similar to this:

Bus 001 Device 018: ID 0810:e301 DragonRise Inc. Generic USB Joystick
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp. Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

  This output tells us the Vendor ID and Product ID of the joystick controller.  For mine, it was 0810 and e301.

With this information we can edit grub to split the joystick into two different devices with the use of the usbhid quirks command.

To edit Grub in lubuntu 20.04, use either “vi” or “nano”.  I used “vi”.  Use the following command without quotes:

“sudo vi /etc/default/grub”

Once in the vi editor, hit the “i” key to enter INSERT MODE.  Find the following line:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

Edit it with the following text, but include your Vendor and Product IDs, make sure that quotations begin and end the information after the = symbol:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash usbhid.quirks=0x0810:0xe301:0x040"

Hit escape to exit INSERT MODE.  Once in COMMAND MODE type in “:wq” without the quotes and hit enter.

Once the file is written the most important part of this fix is to type the “sudo update-grub” command without quotes.  This will rebuild your grub file to include the usbhid.quirks for your joystick before the kernel boots.  After the file has rebuilt itself, feel free to reboot to test your configuration.  When Emulationstation comes back up after boot, it should display that 2 joysticks/controllers are detected.

And if your luck is anything like mine, it will flip your controllers to opposite side so that you have to swap all your wires.

If this helps you or I left something out from downloading this from my RAM after sleeping, please let me know.

Retropie: https://retropie.org.uk/

AtomicPi resources: https://www.digital-loggers.com/api_faqs.html
http://ehxz.tk/atomicpi

Joystick Parts: https://www.amazon.com/SJ-JX-Mechanical-Controller-Raspberry/dp/B07FZ4YQ89

Other projects: https://juneraincreations.com/diy-wall-display-using-dakboard-with-raspberry-pi4-and-raspbian-buster/