marqs
Posts: 205
Joined: Sat Jun 09, 2012 11:34 am

Re: Multi-console gamepad driver for GPIO

Fri Aug 18, 2017 11:43 pm

Seems like I haven't received notifications from this thread for a while :( . I probably should put gamecon_gpio_rpi and db9_gpio_rpi driver sources to github if there are people who would be interested continuing development since I haven't touched those in a long time.

@DD-Indeed: You should use 3.3V, otherwise you risk damaging Rpi. Are you using official controller or a 3rd party one?

@darksavior: I'll have to check that, it's probably related to kernel headers installation (I'm afraid there's still no official headers package available for RPi foundation kernels)

@Denisuu: You probably need level shifters, see gamecon_gpio_rpi wikipage for details

marqs
Posts: 205
Joined: Sat Jun 09, 2012 11:34 am

Re: Multi-console gamepad driver for GPIO

Sun Aug 27, 2017 8:52 pm

Updated packages for gamecon_gpio_rpi (1.3) and db9_gpio_rpi (1.1) have now been released which should fix the build issues. I also put sources and dkms scripts on github (here and here), making it easier for others to make changes in future.

darksavior
Posts: 7
Joined: Sat Jul 25, 2015 7:56 am

Re: Multi-console gamepad driver for GPIO

Mon Aug 28, 2017 9:59 am

@marqs thanks. Someone else fixed the issue like last month, but glad to see an official fix.

Not sure if it's possible, but is there a way for analog controls to be registered as digital?
The snes dpad registers as analog and not digital.-1,+1,-0,+0 for up/down/left/right. The reason I want to do this is because the pegasus frontend for retropie only supports digital controls registered as h0up,h0down,h0left,h0right.

marqs
Posts: 205
Joined: Sat Jun 09, 2012 11:34 am

Re: Multi-console gamepad driver for GPIO

Mon Aug 28, 2017 3:42 pm

The problem is that there are numerous applications that do not support hat axis but require (analog) axis0 and axis1 to be present, even if they are processed as digital axis. A driver configuration option could be considered, but on the other hand it'd make more sense for the frontend to support both.

Currypaul
Posts: 4
Joined: Tue Oct 31, 2017 8:39 pm

Re: Multi-console gamepad driver for GPIO

Tue Oct 31, 2017 8:49 pm

Hi marqs,

I just tried to install the new Version on my Raspi 2 and got some Errors:

Code: Select all

Log started at: Tue 31 Oct 18:18:46 UTC 2017

RetroPie-Setup version: 4.3.3 (16172fc)
System: Linux retropie 4.9.59-v7+ #1047 SMP Sun Oct 29 12:19:23 GMT 2017 armv7l GNU/Linux

= = = = = = = = = = = = = = = = = = = = =
Installing dependencies for 'gamecondriver' : Gamecon & db9 drivers
= = = = = = = = = = = = = = = = = = = = =


= = = = = = = = = = = = = = = = = = = = =
Installing 'gamecondriver' : Gamecon & db9 drivers
= = = = = = = = = = = = = = = = = = = = =

(Reading database ... 88421 files and directories currently installed.)
Preparing to unpack gamecon-gpio-rpi-dkms_1.3_all.deb ...

------------------------------
Deleting module version: 1.3
completely from the DKMS tree.
------------------------------
Done.
Unpacking gamecon-gpio-rpi-dkms (1.3) over (1.3) ...
Setting up gamecon-gpio-rpi-dkms (1.3) ...
Loading new gamecon_gpio_rpi-1.3 DKMS files...
First Installation: checking all kernels...
dpkg: warning: version '*-*' has bad syntax: version number does not start with digit
It is likely that 4.9.59-v7+ belongs to a chroot's host
Building for architecture armv7l
Module build for the currently running kernel was skipped since the
kernel source for this kernel does not seem to be installed.
(Reading database ... 88421 files and directories currently installed.)
Preparing to unpack db9-gpio-rpi-dkms_1.1_all.deb ...

------------------------------
Deleting module version: 1.1
completely from the DKMS tree.
------------------------------
Done.
Unpacking db9-gpio-rpi-dkms (1.1) over (1.1) ...
Setting up db9-gpio-rpi-dkms (1.1) ...
Loading new db9_gpio_rpi-1.1 DKMS files...
First Installation: checking all kernels...
dpkg: warning: version '*-*' has bad syntax: version number does not start with digit
It is likely that 4.9.59-v7+ belongs to a chroot's host
Building for architecture armv7l
Module build for the currently running kernel was skipped since the
kernel source for this kernel does not seem to be installed.
modinfo: ERROR: Module gamecon_gpio_rpi not found.
modinfo: ERROR: Module db9_gpio_rpi not found.
Gamecon GPIO driver installation FAILED
Db9 GPIO driver installation FAILED

Log ended at: Tue 31 Oct 18:19:04 UTC 2017
Total running time: 0 hours, 0 mins, 18 secs
I tried this before, maybe a half year ago and got some other issues with my megadrive controllers and after you driver update I headed back to this topic.
Seems, that the installation cannot figure out my version or got some other issues with my Version.
After looking in the Makefile in your source, I found this: KVERSION := `uname -r`
If i run this on my Pi, it gives me "4.9.59-v7+"
Maybe the problem in the message dpkg: warning: version '*-*' has bad syntax: version number does not start with digit is from the uname -r command. (Output is "4.9.43-v7+") and your installer got some problems with the "-"

Also I'm not sure what this really means:

Code: Select all

Module build for the currently running kernel was skipped since the
kernel source for this kernel does not seem to be installed.
I don't understand much from this, but maybe you can release a shorter fix or give me some instructions how to deal with these troubles?

Thanks in advance,
Currypaul

P.S. My Pi was set up today with an actual Retropie Build. It is nearly untouched, without much configuration etc.

marqs
Posts: 205
Joined: Sat Jun 09, 2012 11:34 am

Re: Multi-console gamepad driver for GPIO

Thu Nov 02, 2017 11:10 pm

Have you installed kernel headers for 4.9.59-v7? Retropie installation script should install them automatically, but header package for that kernel seems to have been auto-built only yesterday.

Currypaul
Posts: 4
Joined: Tue Oct 31, 2017 8:39 pm

Re: Multi-console gamepad driver for GPIO

Fri Nov 03, 2017 9:46 am

When trying to install kernel headers, I get a message, that i already have the newest headers.
I tried a downgrade to 4.9.43-v7, because it's just a few days older than your latest release and I get the same error log.

marqs
Posts: 205
Joined: Sat Jun 09, 2012 11:34 am

Re: Multi-console gamepad driver for GPIO

Sat Nov 04, 2017 11:07 pm

Could you post output of the following commands?

Code: Select all

dpkg -l |grep linux-headers
ls /lib/modules

Currypaul
Posts: 4
Joined: Tue Oct 31, 2017 8:39 pm

Re: Multi-console gamepad driver for GPIO

Sun Nov 05, 2017 6:06 pm

dpkg -l |grep linux-headers
The output is complete empty

ls /lib/modules gives the following line:
4.9.35+ 4.9.35-v7+ 4.9.43+ 4.9.43-v7+ 4.9.59+ 4.9.59-v7+


When trying an adpkg -l | grep headers I get this:

Code: Select all

ii  libdbus-1-dev:armhf                  1.8.22-0+deb8u1                  armhf        simple interprocess messaging system (development headers)
ii  libice-dev:armhf                     2:1.0.9-1                        armhf        X11 Inter-Client Exchange library (development headers)
ii  libpulse-dev:armhf                   5.0-13                           armhf        PulseAudio client development headers and libraries
ii  libraspberrypi-dev                   1.20170703-1                     armhf        EGL/GLES/OpenVG/etc. libraries for the Raspberry Pi's VideoCore IV (headers)
ii  libraspberrypi-doc                   1.20170703-1                     armhf        EGL/GLES/OpenVG/etc. libraries for the Raspberry Pi's VideoCore IV (headers)
ii  libsm-dev:armhf                      2:1.2.2-1                        armhf        X11 Session Management library (development headers)
ii  libx11-dev:armhf                     2:1.6.2-3                        armhf        X11 client-side library (development headers)
ii  libx11-xcb-dev:armhf                 2:1.6.2-3                        armhf        Xlib/XCB interface library (development headers)
ii  libxau-dev:armhf                     1:1.0.8-1                        armhf        X11 authorisation library (development headers)
ii  libxdamage-dev:armhf                 1:1.1.4-2                        armhf        X11 damaged region extension library (development headers)
ii  libxdmcp-dev:armhf                   1:1.1.1-1                        armhf        X11 authorisation library (development headers)
ii  libxext-dev:armhf                    2:1.3.3-1                        armhf        X11 miscellaneous extensions library (development headers)
ii  libxfixes-dev:armhf                  1:5.0.1-2                        armhf        X11 miscellaneous 'fixes' extension library (development headers)
ii  libxxf86vm-dev:armhf                 1:1.1.3-1                        armhf        X11 XFree86 video mode extension library (development headers)
ii  linux-libc-dev:armhf                 3.16.7-ckt11-1+deb8u4+rpi1       armhf        Linux support headers for userspace development
ii  raspberrypi-kernel-headers           1.20170703-1                     armhf        Header files for the Raspberry Pi Linux kernel
ii  x11proto-core-dev                    7.0.31-1                         all          X11 core wire protocol and auxiliary headers
Maybe the second to last line is interesting:

Code: Select all

ii  raspberrypi-kernel-headers           1.20170703-1                     armhf        Header files for the Raspberry Pi Linux kernel

When trying sudo apt-get install linux-headers it gives me some options I'm not sure about:

Code: Select all

Package linux-headers is a virtual package provided by:
  raspberrypi-kernel-headers 1.20170703-1
  linux-headers-3.6-trunk-rpi 3.6.9-1~experimental.1+rpi7
  linux-headers-3.10-3-rpi 3.10.11-1+rpi7
You should explicitly select one to install.

marqs
Posts: 205
Joined: Sat Jun 09, 2012 11:34 am

Re: Multi-console gamepad driver for GPIO

Sun Nov 05, 2017 6:54 pm

raspberrypi-kernel-headers package (1.20170703-1) seems to install headers for 4.9.35-v7+. If you install the package from stretch repo (1.20171029-1), it installs headers for 4.9.59-v7+.

Currypaul
Posts: 4
Joined: Tue Oct 31, 2017 8:39 pm

Re: Multi-console gamepad driver for GPIO

Wed Nov 08, 2017 8:41 am

Okay, so I only have to install Linux Headers for Version 59?
i.e.: apt-get install linux-headers 1.20171029-1
I will try this today in the evening and give you some feedback.

Ti85
Posts: 14
Joined: Thu Oct 27, 2016 2:31 am

Re: Multi-console gamepad driver for GPIO

Thu Nov 30, 2017 3:31 pm

Is there a standalone version of the Db9 driver (not tied to RetroPie) that I can use for another project? If so, how do I setup it up? I have been using the App game kit (AGK) software for a project. I have been using the joystick support for input. With the Db9 driver I would be able to use the GPIOs to emulate joystick command that the AGK software would recognize. I realize the AGK does have some GPIO support; however, I am looking for a more flexible feature through the RPI kernel

marqs
Posts: 205
Joined: Sat Jun 09, 2012 11:34 am

Re: Multi-console gamepad driver for GPIO

Fri Dec 01, 2017 11:31 pm

Ti85 wrote: Is there a standalone version of the Db9 driver (not tied to RetroPie) that I can use for another project? If so, how do I setup it up? I have been using the App game kit (AGK) software for a project. I have been using the joystick support for input. With the Db9 driver I would be able to use the GPIOs to emulate joystick command that the AGK software would recognize. I realize the AGK does have some GPIO support; however, I am looking for a more flexible feature through the RPI kernel
https://github.com/marqs85/db9_gpio_rpi

Ti85
Posts: 14
Joined: Thu Oct 27, 2016 2:31 am

Re: Multi-console gamepad driver for GPIO

Sat Dec 02, 2017 2:16 am

Thank you for the link...noob question....how do you know what kernel header package to use? I have been using a 2016 Jessie OS...so would the most recent kernel header package work?

marqs
Posts: 205
Joined: Sat Jun 09, 2012 11:34 am

Re: Multi-console gamepad driver for GPIO

Thu Dec 07, 2017 4:51 pm

Ti85 wrote:
Sat Dec 02, 2017 2:16 am
Thank you for the link...noob question....how do you know what kernel header package to use? I have been using a 2016 Jessie OS...so would the most recent kernel header package work?
You need a header package matching your kernel version. If raspberrypi-kernel-headers package does not provide it, you may try manually downloading and installing one from here.

Return to “Gaming”

Who is online

Users browsing this forum: No registered users and 7 guests