Gamecon driver fails to build on Kernel 4.19.x
-
@Darksavior Is the compilation not working or the module loads but the controller doesn't work ?
-
@mitu This time it's different. It seems to compile fine? ES sees both pads and gives me the option to configure them but they won't work. Jstest also sees both pads but no response. Not sure how to check if the module is loaded properly.
https://pastebin.com/fZXz6E7F -
@Darksavior Yes, looks different than on a Pi3. The fact that pads are seen by ES and
jstest
seems to indicate that the driver is loaded, but you can also check withlsmod | grep gamecon_gpio_rpi
Since this is the same Linux kernel version as on Stretch - 4.19, when you reported the issue - I think the problem is with either the GPIO configuration or the module compatibility with to the new PI model.
-
@mitu I ran that command and got
45056 0
At first I thought the controller ports weren't properly connected or maybe something desoldered, but it works fine on a pi3. -
The module is loaded alright, I think is just not compatible with the RPI4 model.
I've looked at thebcm2835
GPIO library and - at the very least - the BCM2708_PERI_BASE is different on the PI4.
I can add a patch if you'd like to test - do you have the possibility to test on both RPI3/RPI4 models ? -
@mitu Yes. I soldered an snes controller connector to an old ide cable so I can easily remove it and test on a pi3 or pi4.
On the pi3, would you like me to test with the latest retropie stretch weekly or use raspbian lite buster with the pi4 branch? -
Seems someone already reported this upstream https://github.com/marqs85/gamecon_gpio_rpi/issues/3.
-
@mitu Thanks! Time for someone else to figure it out how to build it because I can't compile.
-
@Darksavior If you're still willing to test, I've made a few adjustments to the
gamecon_gpio_rpi
module to work on PI4 also (while still being compatible with previous RPI models).All you have to do is replace the contents of
$HOME/RetroPie-Setup/scriptmodules/supplementary/gamecondriver.sh
with http://ix.io/1UaI and then reinstall - remove and install again - the driver. It will pull the sources from my repository instead of the upstream project. -
@mitu Success! Works on my pi4. Many thanks.
-
@Darksavior That's great to hear, since the modifications to the driver are not so trivial this time. Can you try to see if the driver is still compatible with the RPI3, by installing with the same procedure on a PI3 system ?
-
@mitu I tested your altered script on a pi3b+ with latest pi2/3 retropie stretch weekly. Seems to work fine. I opened the script to make sure it was pointing to your github.
-
One down, 2 more modules to go. I'll be submitting this version upstream and then to the RetroPie's repo.
Thank you for testing ! -
@mitu I spoke too soon. I'm doing more thorough tests on the pi4. Before, I just did a quick pad setup and it responded fine. Now, I'm encountering random inputs once in a while. Not sure if it's the driver or if it's my connection since I've been moving them a lot with testing lately. I'll have to re-test on pi3 to verify it's not the driver.
-
@Darksavior I haven't submitted anything upstream, I can wait if you'd like to do more testing.
-
@mitu Pi3 and pi4 both have ghost inputs. If I scroll left or right on ES's main menu enough, it will eventually start to auto scroll down by itself. It doesn't matter if it's your altered script or original. I did get a crash on the pi3 when uninstalling your altered script. Not sure about that one since the microsd I'm using is old.
At this point, it looks like I'll have to re-do the connections with thicker gauge wire to confirm it's not the wiring. I've had this issue before a few years ago on a joystick I padhacked with thin wires. I'm using an old ide cable that might've gotten too many bends. I'll get back to you.
UPDATE1: On pi3 I re-soldered with thicker gauge wires. No change. I also re-installed your altered script and uninstalled with no crash. I haven't noticed issues with games. I've mainly used the pegasus frontend for over 2yrs so maybe that's why I've never noticed the way ES acts with my snes pad. Pegasus is fine with the pad.
ES is..weird. I can scroll left or right and sooner or later, one system menu will start auto scrolling up or down. The next system menu will be fine. If I go back to the previous system that started to auto scroll then it does so again. Go back to next system and it's fine. I can stop the scrolling with my pad but It's weird how ES remembers the scrolling for one system.
tldr; Your alterations are probably fine for you to submit.
-
@Darksavior regarding the ghost inputs: They may stem from a noisy electromagnetic environment (powers supplies, monitor, LED stripes, ... ) and worsened by long cables connected to the GPIO. To mitigate/test if this is the cause use small capacitors (100nF) in parallel to the switches. Put the capacitors next to the GPIO socket (and maybe even dedicated pull-ups 10k - assuming gamecon uses 0V to signal a closed switch). This RC circuit will absorb electromagnetic spikes which usually are very short (micro seconds). The 10k / 100nF combo will filter any input (low signal) less than roughly 1ms duration.
HTH
-
@Lolonois Not sure how to do that. As I said, it only happens in ES. I can trigger it by scrolling down then moving to another system by pressing left or right. If I go back to the previous system, it remembers the auto scrolling. It doesn't happen in games. It doesn't happen in the pegasus frontend but I'm not using it atm because it doesn't load games on a pi4 yet.
@mitu Not sure if you got the notification, but yea, I'd say go ahead and submit it if you wish. I was playing games on the pi4 yesterday with no issue.
-
@Darksavior Thanks again for the testing.
I'll submit the modifications upstream and depending on how they're accepted, I'll modify the scriptmodule also. -
@mitu Thank you for making my pads usable again each time it breaks.
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.