well i just tried increasing the delay but still nothing.... im testing useing the jstest /dev/input/jsX. i have ps2 controller connected to pad 4 (gpio 7).... hopefully i can get it working....marqs wrote:I've tried GameStop-branded Mad Catz Control Pad Pro, which worked OK. You could try to raise the access delay, although it has a negative impact on performance. The original driver code had 25us as the default btw.atvdude01 wrote:Well i tried this driver with a gamestop ps2 controller and it didnt work... anyone ever try it with a game stop one?
Re: Multi-console gamepad driver for GPIO
Re: Multi-console gamepad driver for GPIO
how do get a nes pad working i know how to connect it but how do i set up the gamecon driver that ive installed via retro pie setup script.
Re: Multi-console gamepad driver for GPIO
The README (/usr/share/doc/gamecon_gpio_rpi/README.gz) describes the setup procedure in detail. Basically, you need to use the following command:Joedarlow wrote:how do get a nes pad working i know how to connect it but how do i set up the gamecon driver that ive installed via retro pie setup script.
Code: Select all
modprobe gamecon_gpio_rpi map=<pad1/GPIO0>,<pad2/GPIO1>,<pad3/GPIO4>,<pad4/GPIO7>,<pad5/GPIO2>,<pad6/GPIO3>
Re: Multi-console gamepad driver for GPIO
Can you please help me? I keep getting the "module_layout" symbol error. I think I've tried every possible method of install:
RetroPie Script
Both header files from your site
Both gamecon files from your site
Each time I've removed the existing module before installing the new one. Am I missing something, or is my firmware just too new and I need to wait for a new header file on your website? Is it possible for me to just edit the code and fix the "module_layout" symbol myself?
Thanks in advance for your help.
RetroPie Script
Both header files from your site
Both gamecon files from your site
Each time I've removed the existing module before installing the new one. Am I missing something, or is my firmware just too new and I need to wait for a new header file on your website? Is it possible for me to just edit the code and fix the "module_layout" symbol myself?
Thanks in advance for your help.
Re: Multi-console gamepad driver for GPIO
Yeah, the new firmware uses 3.6.11+ kernel and needs new headers. I added them to my site, and they can be now installed by RetroPie script. I recommend removing old header and gamecon versions first, though (apt-get purge linux-headers-3.2.27+ gamecon-gpio-rpi-dkms-0.5).mercraus wrote:Can you please help me? I keep getting the "module_layout" symbol error. I think I've tried every possible method of install:
RetroPie Script
Both header files from your site
Both gamecon files from your site
Each time I've removed the existing module before installing the new one. Am I missing something, or is my firmware just too new and I need to wait for a new header file on your website? Is it possible for me to just edit the code and fix the "module_layout" symbol myself?
Thanks in advance for your help.
Re: Multi-console gamepad driver for GPIO
Thanks! I was banging my head against the wall wonder what the problem was. Everything works great now.marqs wrote:Yeah, the new firmware uses 3.6.11+ kernel and needs new headers. I added them to my site, and they can be now installed by RetroPie script. I recommend removing old header and gamecon versions first, though (apt-get purge linux-headers-3.2.27+ gamecon-gpio-rpi-dkms-0.5).mercraus wrote:Can you please help me? I keep getting the "module_layout" symbol error. I think I've tried every possible method of install:
RetroPie Script
Both header files from your site
Both gamecon files from your site
Each time I've removed the existing module before installing the new one. Am I missing something, or is my firmware just too new and I need to wait for a new header file on your website? Is it possible for me to just edit the code and fix the "module_layout" symbol myself?
Thanks in advance for your help.
-
- Posts: 5
- Joined: Tue Mar 27, 2012 11:14 pm
Re: Multi-console gamepad driver for GPIO
I'm currently on 3.6.11 using the appropriate headers and version 0.9 of the driver, and I keep getting the same issue (after multiple reinstalls of raspbian, driver and all). When running jstest on my controllers one (one physical controller, regardless of GPIO pin) does not work at all, the other only detects presses of the A button. I know both controllers work fine on my original NES, and my wiring looks fine.
Re: Multi-console gamepad driver for GPIO
If only 'A' is detected, it sounds like clk and latch lines are the wrong way around ('A' is the first button read after latch signal). If that's not the case, the issue could be in timing or incompatibility with 3.3V. Are the controllers original or 3rd-party? I haven't heard that anyone else has had problems with NES/SNES pads yet.ProtestTheGyro wrote:When running jstest on my controllers one (one physical controller, regardless of GPIO pin) does not work at all, the other only detects presses of the A button.
-
- Posts: 5
- Joined: Tue Mar 27, 2012 11:14 pm
Re: Multi-console gamepad driver for GPIO
I'm using original NES controllers, the first thing I checked were the clock and latch lines. They are wired according to these two images:marqs wrote:If only 'A' is detected, it sounds like clk and latch lines are the wrong way around ('A' is the first button read after latch signal). If that's not the case, the issue could be in timing or incompatibility with 3.3V. Are the controllers original or 3rd-party? I haven't heard that anyone else has had problems with NES/SNES pads yet.
http://tinyurl.com/axwvfkn
http://tinyurl.com/a5cod5u
There shouldn't be any issues unless there is a wiring color mismatch on my NES deck.
-
- Posts: 5
- Joined: Tue Mar 27, 2012 11:14 pm
Re: Multi-console gamepad driver for GPIO
After rewiring everything, whichever controller is in slot 1 works fine, the controller in slot 2 now either doesn't work on only detects A presses... Both controllers are wired the same way (sharing clock and latch).
Re: Multi-console gamepad driver for GPIO
ProtestTheGyro wrote:There shouldn't be any issues unless there is a wiring color mismatch on my NES deck.
If you tap the signals from NES controller port, note that pad1 and pad2 use separate CLK lines (unofficial NES schematics here), which you should wire together when using the driver (a switch would be better if you want to retain NES functionality).ProtestTheGyro wrote:After rewiring everything, whichever controller is in slot 1 works fine, the controller in slot 2 now either doesn't work on only detects A presses... Both controllers are wired the same way (sharing clock and latch).
Re: Multi-console gamepad driver for GPIO
Sorry to bother you again but after trying to set it up With i keep getting what does does this mean? What do I do wrong and what do I need to do differently?
Code: Select all
Sudo modprobe gamecon_gpio_rpi map=<pad2/GPIO0>,<pad2/GPIO1>
Code: Select all
-bash: syntax error near unexpected token 'newline'
Re: Multi-console gamepad driver for GPIO
You're supposed to replace the <...> tags corresponding to the GPIO you use with a number corresponding to the pad type. A bit confusing explanationJoedarlow wrote:Sorry to bother you again but after trying to set it up With
Code: Select all
Sudo modprobe gamecon_gpio_rpi map=<pad2/GPIO0>,<pad2/GPIO1>
i keep getting
Code: Select all
-bash: syntax error near unexpected token 'newline'
what does does this mean? What do I do wrong and what do I need to do differently?

Code: Select all
sudo modprobe gamecon_gpio_rpi map=2,2
Code: Select all
sudo modprobe gamecon_gpio_rpi map=0,0,0,0,2,2
Re: Multi-console gamepad driver for GPIO
Thanks now I get It . Thank for your time 

Re: Multi-console gamepad driver for GPIO
Sorry i did what you sai to do
any suggestions?
but I getSudo modprobe gamecon_gpio_rpi map=2,2
Code: Select all
ERROR: could not insert 'gamecon_gpio_rpi ' :Exec format error

Re: Multi-console gamepad driver for GPIO
You probably have mismatching kernel and headers versions. Look at the outputs of the following 2 commands to check if the versions match:Joedarlow wrote:Sorry i did what you sai to do
Sudo modprobe gamecon_gpio_rpi map=2,2
but I get
Code: Select all
ERROR: could not insert 'gamecon_gpio_rpi ' :Exec format error
any suggestions?
Code: Select all
uname -r
dpkg -l |grep linux-headers
Re: Multi-console gamepad driver for GPIO
I've done this but I doesn't change any thing do I need to install from source code rather than binary? 

Re: Multi-console gamepad driver for GPIO
The source installation in RetroPie is for emulators only - it won't help in this issue. If the versions matched and you re-ran the gamecon installation, and it doesn't still load the driver, there's still an old version which modprobe tries to load instead of the most recent. Could you post the output ofJoedarlow wrote:I've done this but I doesn't change any thing do I need to install from source code rather than binary?
Code: Select all
find /lib/modules/ -name "gamecon*"
Code: Select all
sudo insmod /lib/modules/3.6.11+/updates/dkms/gamecon_gpio_rpi.ko map=2,2
Re: Multi-console gamepad driver for GPIO
Hi all!!
Im having the same kind of problem as "ProtestTheGyro". I tried to hook up two NES controllers but the only response I have when running jstest is the A button on only one controller, however if I switch to the 5v pin everything works fine on both controllers. I also tried to desolder one of the controllers and I had the same result, just the A button working even when only one controller is hooked up.
I'm using stock NES controllers
Any ideas?
Im having the same kind of problem as "ProtestTheGyro". I tried to hook up two NES controllers but the only response I have when running jstest is the A button on only one controller, however if I switch to the 5v pin everything works fine on both controllers. I also tried to desolder one of the controllers and I had the same result, just the A button working even when only one controller is hooked up.
I'm using stock NES controllers
Any ideas?
Re: Multi-console gamepad driver for GPIO
Well, that's interesting. Using 3.3V instead of the nominal 5V sure slows down the 4021 chips inside NES/SNES controllers, but I'm surprised to hear it actually causing issues. Maybe the chips in my SNES controllers are manufactured with newer process...
I'd be careful when using 5V supply, since the GPIO inputs haven't overvoltage protection. If you don't mind fiddling with electronics a bit more, you could add a resistor and diode to DATA_OUT lines (controller pin 7) in the following way, after which it should be quite safe to use 5V supply.
R1 would be around 500ohms and D1 would a typical 1N4148 signal diode (cathode to 3.3V).
The problem could possibly be also solved by increasing the delay in the driver. This is worth trying before going to 5V. You need to edit /usr/src/gamecon_gpio_rpi-0.9/gamecon_gpio_rpi.c - try changing GC_NES_DELAY to 10 in line 414 and save it. Then you need to recompile the driver:
Then you can load the recompiled driver as usual. I hope that helps.
I'd be careful when using 5V supply, since the GPIO inputs haven't overvoltage protection. If you don't mind fiddling with electronics a bit more, you could add a resistor and diode to DATA_OUT lines (controller pin 7) in the following way, after which it should be quite safe to use 5V supply.
Code: Select all
(3.3V)
|
à (D1)
(DATA_OUT) -----| R1 |-------|-------- (GPIO header)
The problem could possibly be also solved by increasing the delay in the driver. This is worth trying before going to 5V. You need to edit /usr/src/gamecon_gpio_rpi-0.9/gamecon_gpio_rpi.c - try changing GC_NES_DELAY to 10 in line 414 and save it. Then you need to recompile the driver:
Code: Select all
rmmod remove gamecon_gpio_rpi #only if loaded
dkms remove gamecon_gpio_rpi/0.9 --all
dkms build gamecon_gpio_rpi/0.9
dkms install gamecon_gpio_rpi/0.9
Re: Multi-console gamepad driver for GPIO
Hi again!
Tried to adjust the timing in the code but that didn't do anything, guess I'll have to dig out the electronics kit and make it safe to run with 5v.
Tried to adjust the timing in the code but that didn't do anything, guess I'll have to dig out the electronics kit and make it safe to run with 5v.
Re: Multi-console gamepad driver for GPIO
Hi,
Is there a way to control the emulationstation frontend with this module?
I can play all my NES / SNES games with the module, but I need the keyboard to navigate and select the game I want to play. I've used the RetroPi script to setup all.
Is there a way to setup some kind of key combination to send a "ESC" with a contoller?
Chris
Is there a way to control the emulationstation frontend with this module?
I can play all my NES / SNES games with the module, but I need the keyboard to navigate and select the game I want to play. I've used the RetroPi script to setup all.
Is there a way to setup some kind of key combination to send a "ESC" with a contoller?
Chris
Re: Multi-console gamepad driver for GPIO
It's possible to map a simple button combination as retroarch exit button (see here), but I'm afraid more versatile combinations aren't supported. Emulationstation should detect a joystick and run button configuration at the first run. If not, you may need to edit ES config manually.chriszero wrote:Hi,
Is there a way to control the emulationstation frontend with this module?
I can play all my NES / SNES games with the module, but I need the keyboard to navigate and select the game I want to play. I've used the RetroPi script to setup all.
Is there a way to setup some kind of key combination to send a "ESC" with a contoller?
Chris
-
- Posts: 272
- Joined: Wed Jul 04, 2012 6:12 am
- Location: Germany
Re: Multi-console gamepad driver for GPIO
I am also having the problem with the exec format error on a fresh installation with the latest Rasbian download ... I am no DKMS expert, so that I do not know where to look at first.
fun stuff for technics enthusiasts: www.petrockblock.com
Re: Multi-console gamepad driver for GPIO
Did you run rpi-update and reboot before installing the module? The kernel headers are configured against the most recent firmware (https://github.com/raspberrypi/firmware ... le.symvers is downloaded during headers installation). This means that one should always have the newest firmware before gamecon installation (3.6.11+, commit 2dca91b4e9450395e2e0c54d83302f98bd5b8c6b currently).petrockblog wrote:I am also having the problem with the exec format error on a fresh installation with the latest Rasbian download ... I am no DKMS expert, so that I do not know where to look at first.
The same issue may rise again after a subsequent fw update, but can be fixed by running the "install/update gamecon"-option in the retropie-setup. I hope we'll get to mainline kernel soon, which would hopefully bring official header packages to solve these kind of issues once and for all...
I probably should write a short FAQ to the module wikipage - some of the issues mentioned here in this thread could be explained there along with the solutions.