Git Product home page Git Product logo

mk_arcade_joystick_rpi's Introduction

mk_arcade_joystick_rpi

The Raspberry Pi GPIO Joystick Driver

The mk_arcade_joystick_rpi is fully integrated in the recalbox distribution : see http://www.recalbox.com

The branch hotkeybtn now support one more button per player in place of MCP23017 support

Introduction

The RaspberryPi is an amazing tool I discovered a month ago. The RetroPie project made me want to build my own Arcade Cabinet with simple arcade buttons and joysticks.

So i started to wire my joysticks and buttons to my raspberry pi, and I wrote the first half of this driver in order to wire my joysticks and buttons directly to the RPi GPIOs.

However, the Raspberry Pi Board B Rev 2 has a maximum of 21 usable GPIOs, not enough to wire all the 28 switches (2 joystick and 20 buttons) that a standard panel requires.

UPDATE 0.1.5 : Added GPIO customization

UPDATE 0.1.4 : Compatibily with rpi2

UPDATE 0.1.3 : Compatibily with 3.18.3 :

The driver installation now works with 3.18.3 kernel, distributed with the last firmware.

UPDATE 0.1.2 : Downgrade to 3.12.28+ :

As the module will not load with recent kernel and headers, we add the possibility of downgrading your firmware to a compatible version, until we find a fix.

UPDATE 0.1.1 : RPi B+ VERSION :

The new Raspberry Pi B+ Revision brought us 9 more GPIOs, so we are now able to connect 2 joysticks and 12 buttons directly to GPIOs. I updated the driver in order to support the 2 joysticks on GPIO configuration.

Even More Joysticks

A little cheap chip named MCP23017 allows you to add 16 external GPIO, and take only two GPIO on the RPi. The chip allows you to use GPIO as output or input, input is what we are looking for if we want even more joysticks.

If you want to use more than one chip, the i2c protocol lets you choose different addresses for the connected peripheral, but all use the same SDA and SCL GPIOs.

In theory you can connect up to 8 chips so 8 joystick.

The Software

The joystick driver is based on the gamecon_gpio_rpi driver by marqs

It is written for 4 directions joysticks and 8 buttons per player. Using a MCP23017 extends input numbers to 16 : 4 directions and 12 buttons.

It can read one joystick + buttons wired on RPi GPIOs (two on RPi B+ revision) and up to 5 other joysticks + buttons from MCP23017 chips. One MCP23017 is required for each joystick.

It uses internal pull-ups of RPi and of MCP23017, so all switches must be directly connected to its corresponding GPIO and to the ground.

Common Case : Joysticks connected to GPIOs

Pinout

Let's consider a 6 buttons cab panel with this button order :

 ↑   Ⓨ Ⓧ Ⓛ  
← →	 Ⓑ Ⓐ Ⓡ  
 ↓  

With R = TR and L = TL

Here is the rev B GPIO pinout summary :

GPIO Interface

If you have a Rev B+ RPi or RPi2:

GPIO Interface

Of course the ground can be common for all switches.

Installation

Installation Script

Download the installation script :

mkdir mkjoystick
cd mkjoystick
wget https://github.com/recalbox/mk_arcade_joystick_rpi/releases/download/v0.1.4/install.sh

Update your system :

sudo sh ./install.sh updatesystem
sudo reboot

Don't forget to reboot (or the next part won't work) and re-run the script without any arguments :

sudo sh ./install.sh

Now jump to Loading the driver

Manual Installation

Update system :

sudo apt-get update
sudo apt-get upgrade
sudo rpi-update

1 - Install all you need :

sudo apt-get install -y --force-yes dkms cpp-4.7 gcc-4.7 git joystick

2 - Install last kernel headers :

sudo apt-get install -y --force-yes raspberrypi-kernel-headers

3.a - Install driver from release (prefered):

wget https://github.com/recalbox/mk_arcade_joystick_rpi/releases/download/v0.1.4/mk-arcade-joystick-rpi-0.1.4.deb
sudo dpkg -i mk-arcade-joystick-rpi-0.1.4.deb

3.b - Or compile and install with dkms:

3.b.1 - Download the files:

git clone https://github.com/pinuct/mk_arcade_joystick_rpi/tree/customgpio

3.b.2 - Create a folder under "/usr/src/module-module-version/"

mkdir /usr/src/mk_arcade_joystick_rpi-0.1.5/

3.b.3 - Copy the files into the folder:

cd mk_arcade_joystick_rpi/
cp -a * /usr/src/mk_arcade_joystick_rpi-0.1.5/

3.b.4 - Compile and install the module:

dkms build -m mk_arcade_joystick_rpi -v 0.1.5
dkms install -m mk_arcade_joystick_rpi -v 0.1.5

Loading the driver

The driver is loaded with the modprobe command and take one parameter nammed "map" representing connected joysticks. When you will have to load the driver you must pass a list of parameters that represent the list of connected Joysticks. The first parameter will be the joystick mapped to /dev/input/js0, the second to js1 etc..

If you have connected a joystick on RPi GPIOs (joystick 1 on the pinout image) you must pass "map=1" as a parameter. If you are on B+ revision and you connected 2 joysticks you must pass map="1,2" as a parameter.

If you have one joystick connected on your RPi B or B+ version you will have to run the following command :

sudo modprobe mk_arcade_joystick_rpi map=1

If you have two joysticks connected on your RPi B+ version you will have to run the following command :

sudo modprobe mk_arcade_joystick_rpi map=1,2

If you have a TFT screen connected on your RPi B+ you can't use all the gpios. You can run the following command for using only the gpios not used by the tft screen (Be careful, not all tft screen use the same pins. GPIOs used with this map: 21,13,26, 19,5,6,22,4,20,17,27,16):

sudo modprobe mk_arcade_joystick_rpi map=4

If you don't want to use all pins or wants a custom gpio map use:

sudo modprobe mk_arcade_joystick_rpi map=5 gpio=pin1,pin2,pin3,.....,pin12

Where pinx is the number of the gpio you want. There are 12 posible gpio with button order: Y-,Y+,X-,X+,start,select,a,b,tr,y,x,tl. Use -1 for unused pins. For example gpio=21,13,26,19,-1,-1,22,24,-1,-1,-1,-1 uses gpios 21,13,26,19 for axis and gpios 22 and 24 for A and B buttons, the rest of buttons are unused.

The GPIO joystick 1 events will be reported to the file "/dev/input/js0" and the GPIO joystick 2 events will be reported to "/dev/input/js1"

Auto load at startup

Open /etc/modules :

sudo nano /etc/modules

and add the line you use to load the driver :

mk_arcade_joystick_rpi

Then create the file /etc/modprobe.d/mk_arcade_joystick.conf :

sudo nano /etc/modprobe.d/mk_arcade_joystick.conf

and add the module configuration :

options mk_arcade_joystick_rpi map=1,2

Testing

Use the following command to test joysticks inputs :

jstest /dev/input/js0

More Joysticks case : MCP23017

Here is the MCP23017 pinout summary :

MCP23017 Interface

Preparation of the RPi for MCP23017###

Follow the standards installation instructions.

Activate i2c on your RPi :

sudo nano /etc/modules

Add the following lines in order to load i2c modules automatically :

i2c-bcm2708 
i2c-dev

And if the file /etc/modprobe.d/raspi-blacklist.conf exists :

sudo nano /etc/modprobe.d/raspi-blacklist.conf

Check if you have a line with :

i2c-bcm2708 

and add a # at the beginning of the line to remove the blacklisting

Reboot or load the two module :

modprobe i2c-bcm2708 i2c-dev

Preparation of the MCP23017 chip

You must set the pins A0 A1 and A2 to 0 or 1 in order to set the i2c address of the chip. If you only have 1 chip, connect the 3 pins to the ground. Just connect one of the pins to 3.3v to set its state to 1 and change the i2c address of the MCP23017.

You must also connect the RESET pin to 3.3v.

Configuration

When you want to load the driver you must pass a list of parameters that represent the list of connected Joysticks. The first parameter will be the joystick mapped to /dev/input/js0, the second to js1 etc..

If you have connected a joystick on RPi GPIOs you must pass "1" as a parameter.

If you have connected one or more joysticks with MCP23017, you must pass the address of I2C peripherals connected, which you can get with the command :

sudo i2cdetect -y 1

The configuration of each MCP23017 is done by setting pads A0 A1 and A2 to 0 or 1.

If you configured your MCP23017 with A0 A1 and A2 connected to the ground, the address returned by i2cdetect should be 0x20

So if you have a joystick connected to RPi GPIOs and a joystick on a MCP23017 with the address 0x20, in order to load the driver, you must run the command :

sudo modprobe mk_arcade_joystick_rpi map=1,0x20

The GPIO joystick events will be reported to the file "/dev/input/js0" and the mcp23017 joystick events will be reported to "/dev/input/js1"

I tested up to 3 joystick, one on GPIOs, one on a MCP23017 on address 0x20, one on a MCP23017 on address 0x24 :

sudo modprobe mk_arcade_joystick_rpi map=1,0x20,0x24

Known Bugs

If you try to read or write on i2c with a tool like i2cget or i2cset when the driver is loaded, you are gonna have a bad time...

If you try i2cdetect when the driver is running, it will show you strange peripheral addresses...

256MB Raspberry Pi Model B is not supported by the current driver. If you want to make the driver work on your old RPi, you will have to change the address of BSC1_BASE to (BCM2708_PERI_BASE + 0x205000) in order to use the correct i2c address, and recompile.

Credits

mk_arcade_joystick_rpi's People

Contributors

digitallumberjack avatar gitaen avatar igormp avatar internetathiest avatar matthieuproucelle avatar mcspaeth avatar pinuct avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mk_arcade_joystick_rpi's Issues

I can't get the custom GPIO map to work

Hi, not sure what I am doing wrong here.

I built a dual arcade joystick with a raspberry pi header sometime ago and don't really want to completely re-wire it becuase I use it for other projects too. Ideally I would like to remap both joysticks but if I can get one working that would be a nice start.

I managed (after suffereing many problems with kernel headers) to get everything installed ok and if I use:

sudo modprobe mk_arcade_joystick_rpi map=1,2
jstest /dev/input/js0

and hit random buttons, I see them register.

If I reboot my pi and then try:

sudo modprobe mk_arcade_joystick_rpi map=5 gpio=5,3,7,11,12,23,26,16,33,29,38,37
jstest /dev/input/js0

None of the buttons do anything.

From the instructions this seems to be the correct command, but I can't see what I have done wrong. Any ideas?

Also, I couldn't figure out from the instructions how to customize a dual joystick system, i.e. how to I customize two maps for JS0 and JS1, is that possible or do I have to rewire my joystick and use map1,2?

I should also add for clarity, I don't use any logic expander, just two standard joystick and a bunch of buttons connected directly to valid GPIO pins.

Cheers

Will not install with RetroPie 3.8 (Linux 4.4.11-v7+)

I have been using this since Christmas, and it was working great, but since updating to RetroPie 3.8 it will not install. There appears to be issues compiling linux headers file.

I first noticed the issue after updating RetroPie from 3.7 to 3.8. I then tryied using the RetroPie 3.8 image from their website, and it wont compile on this either.

Any help would be appreciated, as at the moment I have no controls for my RetroPie machine :-(

Button 1 (btnSelect) & Button 5 (btnLThumb) Pressed

As mentioned in the subject both buttons show "on" while running the test. Even if I remove all buttons from the GPIO pins it still shows that those two buttons are on. I have tried wiring dummy ground wires to those ports. What am I doing wrong or can test with?

Unable to build on retropie (4.4.13-v7+)

Executing install.sh results in an error on the following line:

wget http://www.niksula.hut.fi/~mhiienka/Rpi/linux-headers-rpi/linux-headers-uname -r_uname -r-2_armhf.deb

This is basically because http://www.niksula.hut.fi/~mhiienka/Rpi/linux-headers-rpi/linux-headers-4.4.13-v7+_4.4.13-v7+-2_armhf.deb does not exist.

I was able to make it work by replacing that line with the following:

sudo apt-get install raspberrypi-kernel-headers

I have no idea about how this change will affect other Linux versions, but it is worth considering implementing this change.

Retropie 4.4 Error! Bad return status for module build on kernel: 4.14.30-v7+ (armv7l)

I follow the step
https://github.com/recalbox/mk_arcade_joystick_rpi
-->Manual Installation-->3.b - Or compile and install with dkms:

I get the error

pi@retropie:/mk_arcade_joystick_rpi-master $ sudo cp -a * /usr/src/mk_arcade_joystick_rpi-0.1.5/
pi@retropie:
/mk_arcade_joystick_rpi-master $ export MKVERSION=0.1.5
pi@retropie:~/mk_arcade_joystick_rpi-master $ sudo -E dkms build -m mk_arcade_joystick_rpi -v 0.1.5

Creating symlink /var/lib/dkms/mk_arcade_joystick_rpi/0.1.5/source ->
/usr/src/mk_arcade_joystick_rpi-0.1.5

DKMS: add completed.

Kernel preparation unnecessary for this kernel. Skipping...

Building module:
cleaning build area....
make -j4 KERNELRELEASE=4.14.30-v7+ all KVERSION=4.14.30-v7+....(bad exit status: 2)
Error! Bad return status for module build on kernel: 4.14.30-v7+ (armv7l)
Consult /var/lib/dkms/mk_arcade_joystick_rpi/0.1.5/build/make.log for more information.

It can work fine at old Retropie 4.3 version but when I try it at Retropie 4.3 get the error

Error! Bad return status for module build on kernel: 4.14.30-v7+ (armv7l)

unable to load the Kernel modules

Hi,

After much trials, a succesfull (at least we thought....) build, however on install we get the following error:

modprobe: ERROR: could not insert 'mk_arcade_joystick_rpi': Device or resource busy

OS Version:
Linux retropie 4.4.20-v7+ #908 SMP Wed Sep 7 14:44:27 BST 2016 armv7l GNU/Linux

File details after compile:
file mk_arcade_joystick_rpi.ko
mk_arcade_joystick_rpi.ko: ELF 32-bit LSB relocatable, ARM, EABI5 version 1 (SYSV), BuildID[sha1]=0911fc325eb59aa115995e9c3800b0a656e7b448, not stripped

Hardware version, using latest RPi:
processor : 0
model name : ARMv7 Processor rev 4 (v7l)
BogoMIPS : 38.40
Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part : 0xd03
CPU revision : 4

[ 885.365811] ------------[ cut here ]------------
[ 885.365847] WARNING: CPU: 3 PID: 3404 at arch/arm/mm/ioremap.c:301 __arm_ioremap_pfn_caller+0x194/0x1b8()
[ 885.365856] Modules linked in: mk_arcade_joystick_rpi(O+) bnep hci_uart btbcm bluetooth brcmfmac brcmutil cfg80211 joydev evdev rfkill snd_bcm2835 snd_pcm snd_timer snd bcm2835_gpiomem bcm2835_wdt uio_pdrv_genirq uio uinput fuse ipv6
[ 885.365952] CPU: 3 PID: 3404 Comm: modprobe Tainted: G W O 4.4.20-v7+ #908
[ 885.365961] Hardware name: BCM2709
[ 885.365994] <80018784> from <80014058>
[ 885.366017] <80014058> from <80320cc4>
[ 885.366041] <80320cc4> from <80025360>
[ 885.366064] <80025360> from <8002544c>
[ 885.366084] <8002544c> from <8001e9d4>
[ 885.366103] <8001e9d4> from <8001ea54>
[ 885.366120] <8001ea54> from <8001eab0>
[ 885.366144] <8001eab0> from [<7f358020>](mk_init+0x20/0x4c8 [mk_arcade_joystick_rpi])
[ 885.366186] [<7f358020>](mk_init [mk_arcade_joystick_rpi]) from <80009764>
[ 885.366208] <80009764> from <800fd5f4>
[ 885.366230] <800fd5f4> from <8009ee44>
[ 885.366248] <8009ee44> from <8009f628>
[ 885.366268] <8009f628> from <8000fb40>
[ 885.366279] ---[ end trace cff87f4b6d065d40 ]---
[ 885.366287] mk_arcade_joystick_rpi: io remap failed
pi@retropie:~ $

It has taken a day and a half to get to this point, so happy to provide any details, and welcome any thoughts or suggestions.

Ingame problems

Hi! I installed rretropie, did all your stuff, successfully configurated and tested the 2 player's joysticks and buttons, but in the games they are not working.

Could you help me?

Thanks in advance.

Changing GPIO pins used and adding more buttons?

While not really an issue, I was wondering if there is a way to choose what GPIO pins are used and a way to increase the amount of buttons used. I want an one joystick and 11 button setup. Is there some sort of configuration file for me or (someone else to edit)? Thank you for responding.

Code clavier sur bouton

Hello,
Étant donné que la table mk_arcade_gpio_btn[] renvoi des keycodes de /usr/include/linux/input.h, je voudrais savoir s'il était possible de mapper des touches de clavier ?
Je souhaiterais mapper la touche KEY_F12 sur un bouton pour utiliser avec Hatari.

More Buttons

Hi

Is it possible to set more buttons on i2c? or GPIO?
i´m not using the gpio joystick ports but if i map 1,0x26,0x27 it want´s joystick 0 for first joystick on all emu´s.
i need a button for coins,esc., 1 Player and 2Player Start.......

or can i use the other gpio´s free to set keyboard key´s to buttons?

in the past i have used one joystick on gpio mapped with retrogame.c
Thx for help

No longer works - Updated to RetroPie 3.8

pi@retropie:~/mkjoystick/mkjoystick $ sudo sh ./install.sh
Installing required dependencies
Reading package lists... Done
Building dependency tree
Reading state information... Done
cpp-4.7 is already the newest version.
dkms is already the newest version.
gcc-4.7 is already the newest version.
git is already the newest version.
joystick is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Downloading current kernel headers
--2016-06-02 00:42:07--  http://www.niksula.hut.fi/~mhiienka/Rpi/linux-headers-rpi/linux-headers-4.4.11-v7+_4.4.11-v7+-2_armhf.deb
Resolving www.niksula.hut.fi (www.niksula.hut.fi)... 130.233.43.7, 2001:708:20:e337:8:20ff:fedd:f36a
Connecting to www.niksula.hut.fi (www.niksula.hut.fi)|130.233.43.7|:80... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: https://www.niksula.hut.fi/~mhiienka/Rpi/linux-headers-rpi/linux-headers-4.4.11-v7+_4.4.11-v7+-2_armhf.deb [following]
--2016-06-02 00:42:07--  https://www.niksula.hut.fi/~mhiienka/Rpi/linux-headers-rpi/linux-headers-4.4.11-v7+_4.4.11-v7+-2_armhf.deb
Connecting to www.niksula.hut.fi (www.niksula.hut.fi)|130.233.43.7|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 9568904 (9.1M) [application/octet-stream]
Saving to: ‘linux-headers-4.4.11-v7+_4.4.11-v7+-2_armhf.deb’

linux-headers-4.4.11-v7+_4.4.11-v7+-2 100%[===========================================================================>]   9.12M  2.36MB/s   in 5.8s

2016-06-02 00:42:14 (1.57 MB/s) - ‘linux-headers-4.4.11-v7+_4.4.11-v7+-2_armhf.deb’ saved [9568904/9568904]

Installing current kernel headers
(Reading database ... 80441 files and directories currently installed.)
Preparing to unpack linux-headers-4.4.11-v7+_4.4.11-v7+-2_armhf.deb ...
make: Entering directory '/usr/src/linux-headers-4.4.11-v7+'
  CLEAN   .
scripts/Makefile.clean:14: drivers/gpu/drm/nouveau/Makefile: No such file or directory
make[4]: *** No rule to make target 'drivers/gpu/drm/nouveau/Makefile'.  Stop.
scripts/Makefile.clean:86: recipe for target 'drivers/gpu/drm/nouveau' failed
make[3]: [drivers/gpu/drm/nouveau] Error 2 (ignored)
scripts/Makefile.clean:14: drivers/infiniband/ulp/srp/Makefile: No such file or directory
make[4]: *** No rule to make target 'drivers/infiniband/ulp/srp/Makefile'.  Stop.
scripts/Makefile.clean:86: recipe for target 'drivers/infiniband/ulp/srp' failed
make[3]: [drivers/infiniband/ulp/srp] Error 2 (ignored)
scripts/Makefile.clean:14: drivers/scsi/cxgbi/cxgb3i/Makefile: No such file or directory
make[4]: *** No rule to make target 'drivers/scsi/cxgbi/cxgb3i/Makefile'.  Stop.
scripts/Makefile.clean:86: recipe for target 'drivers/scsi/cxgbi/cxgb3i' failed
make[3]: [drivers/scsi/cxgbi/cxgb3i] Error 2 (ignored)
scripts/Makefile.clean:14: drivers/scsi/cxgbi/cxgb4i/Makefile: No such file or directory
make[4]: *** No rule to make target 'drivers/scsi/cxgbi/cxgb4i/Makefile'.  Stop.
scripts/Makefile.clean:86: recipe for target 'drivers/scsi/cxgbi/cxgb4i' failed
make[3]: [drivers/scsi/cxgbi/cxgb4i] Error 2 (ignored)
scripts/Makefile.clean:14: drivers/scsi/osd/Makefile: No such file or directory
make[3]: *** No rule to make target 'drivers/scsi/osd/Makefile'.  Stop.
scripts/Makefile.clean:86: recipe for target 'drivers/scsi/osd' failed
make[2]: [drivers/scsi/osd] Error 2 (ignored)
scripts/Makefile.clean:14: drivers/staging/rdma/amso1100/Makefile: No such file or directory
make[4]: *** No rule to make target 'drivers/staging/rdma/amso1100/Makefile'.  Stop.
scripts/Makefile.clean:86: recipe for target 'drivers/staging/rdma/amso1100' failed
make[3]: [drivers/staging/rdma/amso1100] Error 2 (ignored)
scripts/Makefile.clean:14: drivers/usb/host/whci/Makefile: No such file or directory
make[4]: *** No rule to make target 'drivers/usb/host/whci/Makefile'.  Stop.
scripts/Makefile.clean:86: recipe for target 'drivers/usb/host/whci' failed
make[3]: [drivers/usb/host/whci] Error 2 (ignored)
scripts/Makefile.clean:14: fs/exofs/Makefile: No such file or directory
make[2]: *** No rule to make target 'fs/exofs/Makefile'.  Stop.
scripts/Makefile.clean:86: recipe for target 'fs/exofs' failed
make[1]: [fs/exofs] Error 2 (ignored)
fs/hostfs/Makefile:11: arch/um/scripts/Makefile.rules: No such file or directory
make[2]: *** No rule to make target 'arch/um/scripts/Makefile.rules'.  Stop.
scripts/Makefile.clean:86: recipe for target 'fs/hostfs' failed
make[1]: [fs/hostfs] Error 2 (ignored)
scripts/Makefile.clean:14: fs/nfs/objlayout/Makefile: No such file or directory
make[3]: *** No rule to make target 'fs/nfs/objlayout/Makefile'.  Stop.
scripts/Makefile.clean:86: recipe for target 'fs/nfs/objlayout' failed
make[2]: [fs/nfs/objlayout] Error 2 (ignored)
  CLEAN   .tmp_versions
ls: cannot access ./Documentation/DocBook/media/*.b64: No such file or directory
  CLEAN   scripts/basic
  CLEAN   scripts/dtc
  CLEAN   scripts/genksyms
  CLEAN   scripts/kconfig
  CLEAN   include/config include/generated arch/arm/include/generated
  CLEAN   .config Module.symvers
make: Leaving directory '/usr/src/linux-headers-4.4.11-v7+'
Unpacking linux-headers-4.4.11-v7+ (4.4.11-v7+-2) over (4.4.11-v7+-2) ...
Setting up linux-headers-4.4.11-v7+ (4.4.11-v7+-2) ...
make: Entering directory '/usr/src/linux-headers-4.4.11-v7+'
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/basic/bin2c
  HOSTCC  scripts/kconfig/conf.o
  HOSTCC  scripts/kconfig/zconf.tab.o
  HOSTLD  scripts/kconfig/conf
*** Default configuration is based on 'bcm2709_defconfig'
#
# configuration written to .config
#
make: Leaving directory '/usr/src/linux-headers-4.4.11-v7+'
make: Entering directory '/usr/src/linux-headers-4.4.11-v7+'
scripts/kconfig/conf  --silentoldconfig Kconfig
  CHK     include/config/kernel.release
  UPD     include/config/kernel.release
  WRAP    arch/arm/include/generated/asm/bitsperlong.h
  WRAP    arch/arm/include/generated/asm/cputime.h
  WRAP    arch/arm/include/generated/asm/current.h
  WRAP    arch/arm/include/generated/asm/emergency-restart.h
  WRAP    arch/arm/include/generated/asm/errno.h
  WRAP    arch/arm/include/generated/asm/exec.h
  WRAP    arch/arm/include/generated/asm/ioctl.h
  WRAP    arch/arm/include/generated/asm/ipcbuf.h
  WRAP    arch/arm/include/generated/asm/irq_regs.h
  WRAP    arch/arm/include/generated/asm/kdebug.h
  WRAP    arch/arm/include/generated/asm/local.h
  WRAP    arch/arm/include/generated/asm/local64.h
  WRAP    arch/arm/include/generated/asm/mm-arch-hooks.h
  WRAP    arch/arm/include/generated/asm/msgbuf.h
  WRAP    arch/arm/include/generated/asm/msi.h
  WRAP    arch/arm/include/generated/asm/param.h
  WRAP    arch/arm/include/generated/asm/parport.h
  WRAP    arch/arm/include/generated/asm/poll.h
  WRAP    arch/arm/include/generated/asm/preempt.h
  WRAP    arch/arm/include/generated/asm/resource.h
  WRAP    arch/arm/include/generated/asm/rwsem.h
  WRAP    arch/arm/include/generated/asm/seccomp.h
  WRAP    arch/arm/include/generated/asm/sections.h
  WRAP    arch/arm/include/generated/asm/segment.h
  WRAP    arch/arm/include/generated/asm/sembuf.h
  WRAP    arch/arm/include/generated/asm/serial.h
  WRAP    arch/arm/include/generated/asm/shmbuf.h
  WRAP    arch/arm/include/generated/asm/siginfo.h
  WRAP    arch/arm/include/generated/asm/simd.h
  WRAP    arch/arm/include/generated/asm/sizes.h
  WRAP    arch/arm/include/generated/asm/socket.h
  WRAP    arch/arm/include/generated/asm/sockios.h
  WRAP    arch/arm/include/generated/asm/termbits.h
  WRAP    arch/arm/include/generated/asm/termios.h
  WRAP    arch/arm/include/generated/asm/timex.h
  WRAP    arch/arm/include/generated/asm/trace_clock.h
  WRAP    arch/arm/include/generated/asm/unaligned.h
  CHK     include/generated/uapi/linux/version.h
  UPD     include/generated/uapi/linux/version.h
  CHK     include/generated/utsrelease.h
  UPD     include/generated/utsrelease.h
  Generating include/generated/mach-types.h
  CC      kernel/bounds.s
  CHK     include/generated/bounds.h
  UPD     include/generated/bounds.h
make[1]: *** No rule to make target 'kernel/time/timeconst.bc', needed by 'include/generated/timeconst.h'.  Stop.
Makefile:986: recipe for target 'prepare0' failed
make: *** [prepare0] Error 2
make: Leaving directory '/usr/src/linux-headers-4.4.11-v7+'

------------------------------
Deleting module version: 0.1.4
completely from the DKMS tree.
------------------------------
Done.
Loading new mk_arcade_joystick_rpi-0.1.4 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.4.11-v7+ belongs to a chroot's host
Building for architecture armv7l
Building initial module for 4.4.11-v7+
Error! Bad return status for module build on kernel: 4.4.11-v7+ (armv7l)
Consult /var/lib/dkms/mk_arcade_joystick_rpi/0.1.4/build/make.log for more information.
Downloading mk_arcade_joystick_rpi 0.1.4
--2016-06-02 00:44:50--  https://github.com/digitalLumberjack/mk_arcade_joystick_rpi/releases/download/v0.1.4/mk-arcade-joystick-rpi-0.1.4.deb
Resolving github.com (github.com)... 192.30.252.131
Connecting to github.com (github.com)|192.30.252.131|:443... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://github.com/recalbox/mk_arcade_joystick_rpi/releases/download/v0.1.4/mk-arcade-joystick-rpi-0.1.4.deb [following]
--2016-06-02 00:44:50--  https://github.com/recalbox/mk_arcade_joystick_rpi/releases/download/v0.1.4/mk-arcade-joystick-rpi-0.1.4.deb
Reusing existing connection to github.com:443.
HTTP request sent, awaiting response... 302 Found
Location: https://github-cloud.s3.amazonaws.com/releases/20679079/466af20e-b4ef-11e4-8b67-8ae00696e5f6.deb?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAISTNZFOVBIJMK3TQ%2F20160602%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20160602T004450Z&X-Amz-Expires=300&X-Amz-Signature=0b8a661215078d55ffd2ffc50d9fba05be597902b865ae4b1fae3750085df724&X-Amz-SignedHeaders=host&actor_id=0&response-content-disposition=attachment%3B%20filename%3Dmk-arcade-joystick-rpi-0.1.4.deb&response-content-type=application%2Foctet-stream [following]
--2016-06-02 00:44:50--  https://github-cloud.s3.amazonaws.com/releases/20679079/466af20e-b4ef-11e4-8b67-8ae00696e5f6.deb?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAISTNZFOVBIJMK3TQ%2F20160602%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20160602T004450Z&X-Amz-Expires=300&X-Amz-Signature=0b8a661215078d55ffd2ffc50d9fba05be597902b865ae4b1fae3750085df724&X-Amz-SignedHeaders=host&actor_id=0&response-content-disposition=attachment%3B%20filename%3Dmk-arcade-joystick-rpi-0.1.4.deb&response-content-type=application%2Foctet-stream
Resolving github-cloud.s3.amazonaws.com (github-cloud.s3.amazonaws.com)... 54.231.115.51
Connecting to github-cloud.s3.amazonaws.com (github-cloud.s3.amazonaws.com)|54.231.115.51|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 14908 (15K) [application/octet-stream]
Saving to: ‘mk-arcade-joystick-rpi-0.1.4.deb’

mk-arcade-joystick-rpi-0.1.4.deb      100%[===========================================================================>]  14.56K  --.-KB/s   in 0.01s

2016-06-02 00:44:50 (981 KB/s) - ‘mk-arcade-joystick-rpi-0.1.4.deb’ saved [14908/14908]

Installing mk_arcade_joystick_rpi 0.1.4
(Reading database ... 80441 files and directories currently installed.)
Preparing to unpack mk-arcade-joystick-rpi-0.1.4.deb ...

------------------------------
Deleting module version: 0.1.4
completely from the DKMS tree.
------------------------------
Done.
Unpacking mk-arcade-joystick-rpi-dkms (0.1.4) over (0.1.4) ...
Setting up mk-arcade-joystick-rpi-dkms (0.1.4) ...
Loading new mk_arcade_joystick_rpi-0.1.4 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.4.11-v7+ belongs to a chroot's host
Building for architecture armv7l
Building initial module for 4.4.11-v7+
Error! Bad return status for module build on kernel: 4.4.11-v7+ (armv7l)
Consult /var/lib/dkms/mk_arcade_joystick_rpi/0.1.4/build/make.log for more information.
Installation OK
Load the module with 'sudo modprobe mk_arcade_joystick_rpi map=1' for 1 joystick
or with 'sudo modprobe mk_arcade_joystick_rpi map=1,2' for 2 joysticks
See https://github.com/digitalLumberjack/mk_arcade_joystick_rpi#loading-the-driver for more details
pi@retropie:~/mkjoystick/mkjoystick $ sudo modprobe mk_arcade_joystick_rpi map=1
modprobe: FATAL: Module mk_arcade_joystick_rpi not found.

Problem with the second step : Install last kernel headers

Hello,

I'm trying to run the second step in your page ( mk_arcade_joystick_rpi ) : Install last kernel headers .
When I run the script : wget http://www.niksula.hut.fi/~mhiienka/Rpi/linux-headers-rpi/linux-headers-`uname -r_uname -r-2_armhf.deb sudo dpkg -i linux-headers-uname -r_uname -r-2_armhf.deb sudo rm linux-headers-uname -r_uname -r`-2_armhf.deb

I get a error with the page : Not Found ( http://www.niksula.hut.fi/~mhiienka/Rpi/linux-headers-rpi/linux-headers)

I think that the script is trying to download the following file : linux-headers-4.0.5-v7+_4.0.5-v7+-2_armhf.deb

Ive been in your file depository ( Index of /~mhiienka/Rpi/linux-headers-rpi/ ) and the last script that you have is this : linux-headers-3.18.16-v7+_3.18.16-v7+-2_armhf.deb

I would be greatfull if you can help me about this issue

Best regards

Unable to load Driver

Hi

it looks like there is a problem with the Raspberry PI 2.
Installing the Driver is just fine, but when i load the module:

sudo modprobe mk_arcade_joystick_rpi map=1
i get this error
ERROR: could not insert 'mk_arcade_joystick_rpi': Exec format error

i had no problems with the Raspberry PI B ( last week ) , but my new PI 2 wont work :(
i followed exactly your install procedure ... ( 3 time with new Retropie 2.6 image )

dmesg:
[ 1912.213882] mk_arcade_joystick_rpi: disagrees about version of symbol module_layout

modinfo mk_arcade_joystick_rpi:
filename: /lib/modules/3.18.9-v7+/updates/dkms/mk_arcade_joystick_rpi.ko
license: GPL
description: GPIO and MCP23017 Arcade Joystick Driver
author: Matthieu Proucelle
srcversion: 2B2E40AFD619744883AA3C0
depends:
vermagic: 3.18.9-v7 SMP preempt mod_unload modversions ARMv7
parm: map:Enable or disable GPIO and MCP23017 Arcade Joystick (array of int)

uname -r
3.18.9-v7+

can you reproduce my Problem ?

regards
Beny

unable to load driver if self compiled

Does anyone have the same problem?

If i run the automatic installation i get a working driver, but the pin configuration is wrong cause i use the kitsch bent i2c pcb board.
So i tried to do the manual installation and use the custom pinout. Installation is running well through, but i am unable to run the driver.

Dont know why. Maybe because of dkms instead of opkg?

RX data

Hi I would like connect all my button to a Cypress prototyping kit, and send button input via serial (TX/RX) is this possible ?

Add support for MCP23S17

I don't think it would be to difficult to add support for the SPI GPIO expander right? Or is this feature already in there?

Other pin / button configuration. recompile?

Please fill the following form :
What happened

Wanted to use this recalbox i2c driver to work with my kitsch bent i2c dmg button pcb. (http://store.kitsch-bent.com/product/expanded-dmg-button-pcb-i2c-version)

What should have happened
Thought the configuration would work like expacted, but checked the pinout and found out, that this driver is using an another pinout configuration.

This is the pinout, used by the kitsch bent i2c controller:
pinout:

GPA2 — B
GPA3 — A
GPA4 — R2
GPA5 — R1
GPA6 — X
GPA7 — Y
GPB0 — UP
GPB1 — L1
GPB2 — L2
GPB3 — LEFT
GPB4 — RIGHT
GPB5 — DOWN
GPB6 — SELECT
GPB7 — START

this driver is running with other pinouts, which concludes in wrong / not working buttons.

Is it possible to recompile the driver, for use with the pinout above?

tried it by myself, but couldnt make it to a functional version.

Custom gpio pins no longer working?

Custom gpio pins no longer working?

I can no longer get my gpio based joystick to work properly. It used to work fine (after reassigning buttons) with my retropie installation on a RPI2, but in later releases it fails. Not sure if it is related to a more recent kernel. The issue is the same on recallbox.

The gpio pins I use are custom. Running a python test program tells me the arcade joystick still reacts fine on the expected pins.

Loading the kernel module (sudo modprobe mk_arcade_joystick_rpi map=1) and running jstest on js0 makes it recognize the directions, but only 2 of the 8 buttons.
Trying to define custom gpio pins (sudo modprobe mk_arcade_joystick_rpi map=5 gpio=pin_nr,..) results in not a single move or button is recognized using jstest.

My gpio config:

right    pin 11  gpio17
left     pin 7   gpio4
ground   pin 9   -
up       pin 15  gpio22
down     pin 13  gpio27
button_1 pin 19  gpio10
button_2 pin 21  gpio9
button_3 pin 23  gpio11
button_4 pin 29  gpio5
button_5 pin 31  gpio6
button_6 pin 33  gpio13
button_7 pin 35  gpio19
button_8 pin 37  gpio26

Can't recall I did something extra in the past to make it work. Tested with the latest Retropie (v3.8.1) and recalboxOS (4.0.0-beta3).

Problems with /etc/modules and/or modprobe during boot.

I'm building the module via dkms on raspbian kernel 3.18.11 and getting some very odd behaviour. Roughly summarised as:

  1. Installed via modprobe mk_arcade_joystck_rpi map=1,2, everything is fine.
  2. Installed via /etc/modules it segfaults during boot, I'll comment shortly with the stack for that.
  3. I won't install at all via any boot script, e.g. rc.local or profile; regardless of how I wrap it. Bizarrely modprobe itself reports success (returns 0) here but no module is installed.

For example this in rc.local:

lsmod | grep -q mk_arcade_joystick || modprobe mk_arcade_joystick

doesn't work. I've tried quite a few other permutations too.
Have you seen any problems like this before? Ideally I just want an entry in /etc/modules but I'm struggling to see where I'm going wrong.

sudo sh ./install.sh fails on RetroPie (4.4.21-v7+)

Issue I'm having seems near identical to #41 although install.sh does find the kernel headers to download and then fails shortly after with the following:

Installing current kernel headers (Reading database ... 84556 files and directories currently installed.) Preparing to unpack linux-headers-4.4.21-v7+_4.4.21-v7+-2_armhf.deb ... Unpacking linux-headers-4.4.21-v7+ (4.4.21-v7+-2) ... dpkg: error processing archive linux-headers-4.4.21-v7+_4.4.21-v7+-2_armhf.deb (--install): trying to overwrite '/usr/src/linux-headers-4.4.21-v7+/samples/seccomp/Makefile', which is also in package raspberrypi-kernel-headers 1.20160921-1 dpkg-deb: error: subprocess paste was killed by signal (Broken pipe) Errors were encountered while processing: linux-headers-4.4.21-v7+_4.4.21-v7+-2_armhf.deb ERROR : Unable to install kernel headers

Not quite sure how to go about fixing the issue.

This is happening after following the installation script instructions here with a fresh install of RetroPi 4.0.2 on a Pi2

Any help would be great

-Hobsie

Rpi B - "left" button not working

Hi

I recently downloaded you driver. I compiled it successfully and implemented it. How ever I am having a problem with "LEFT" button not working. I already eliminated hardware - cables and button itself.
I even recompiled the driver with different GPIO assigned and unfortunately no luck there as well :(
JSTEST works fine for all buttons except "LEFT" - GPIO27 by default.
Do you have any suggestion how to debug this issue ?
Maybe something changed in code with your latest submission and support to RPI2 ?

Cheers
Pete

Recompile with different pin numbers

Is there any chance you could provide instructions for recompiling the module from source? I want to be able to change the pin numbers as my joystick is already wired up in a different way :-/

how to update in recalbox

Hello,

I use recalbox 4.0 with PI 3 and gpio screen (pitft 2.8).
Now i need to use GPIO for my gamepad.
I see that in recalbox, mk_arcade_joystick_rpi is an old version.
Juste map 1 and 2 are possible. (not compatible with my tft screen)

My question is , How to update mk_arcade_joystick_rpi in recalbox to use map=4 for exemple?
Where find a compilated version, and where put the file?
Do you know a tuto?

Thank in advance for your help.

mk_arcade_joystick_rpi not found - repository not found

Following the instructions, on Raspberry 3, I get an error:

First Installation: checking all kernels...
dpkg: warning: version '*-*' has bad syntax: version number does not start with digit
It is likely that 4.14.18-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.
Installation OK

sudo modprobe mk_arcade_joystick_rpi map=1
gives:
modprobe: FATAL: Module mk_arcade_joystick_rpi not found.

Even trying manual installation gives errors:
git clone https://github.com/pinuct/mk_arcade_joystick_rpi/tree/customgpio
gives
fatal: repository 'https://github.com/pinuct/mk_arcade_joystick_rpi/tree/customgpio/' not found
Thanks. Bye.

only 8 buttons instead of 12 on MCP23017

Hello, I 've installed the mk_arcade_joystick_rpi and I see the 2 joystick and buttons but when I use jstest /dev/input/js0 I see 8 buttons.

When I try the same with the old version I see 12 buttons.

Where is the setting file to enable the others button ? I've to activate GPB7 for Coin on Mame

little dubt

Hi,

i've a raspberry pi 2 b with a mcp23017. Hardware works, i tested it using a preconfigured rom.
Now i'm trying to configure. I followed the readme.md. That what i did:

Download the installation script
Update the system
reboot and re-run the script without any arguments

Now? i launced "sudo modprobe mk_arcade_joystick_rpi map=1,2" after that.
than add the line in "modules" to load the driver and created "mk_arcade_joystick.conf". I add "options mk_arcade_joystick_rpi map=1,2"

after, i gone to activate i2c with "i2c-bcm2708 and i2c-dev"

/etc/modprobe.d/raspi-blacklist.conf not exist

I use "modprobe i2c-bcm2708 i2c-dev" but don't work. I reboot, but don't work. I think i've to do sometingh else, but what?

i have A0 A1 and A2 of mpc23017 on the ground.

thanks

f

Analog Joystick With arduino as adc?

I Have 2 Analog Joysticks which have (2 pots and a button) i would like to use with this library on a raspberry pi 2 (Recalbox). I know i cant directly connect them they need an adc which is where i would like to use an arduino pro mini, to take the signal from the joysticks and interface it with the raspberry pi.
the problem is i don't know the procedure to interface the arduino and the pi.
Is it possible to do a digitalwrite(HIGH) from the arduino to the specified gpio on the raspberry pi (With a voltage divider setup to change the voltage level to 3.3v for the rasp)?
or do i have to connect them through serial and somehow change the code to get values from the serial connection

module mk_arcade_joystick_rpi not found

I followed the instructions on the home page using the Installation Script, everything works fine until I want to load the driver using "sudo modprobe mk_arcade_joystick_rpi map=1".

Any suggestions on what I might try?

hotkeybtn?

Any chance of getting the final instructions for how to compile the driver on this branch and / or a release for it? Thanks!!

ERROR : Unable to find kernel headers 4.1.10

Hey I just updated my retropie and cant get this to work after that.
It tries to download some 4.1.10-file but it is not found.

http://www.niksula.hut.fi/~mhiienka/Rpi/linux-headers-rpi/linux-headers-4.1.10-v7+_4.1.10-v7+-2_armhf.deb
Resolving www.niksula.hut.fi (www.niksula.hut.fi)... 130.233.43.7
Connecting to www.niksula.hut.fi (www.niksula.hut.fi)|130.233.43.7|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2015-10-04 19:45:45 ERROR 404: Not Found.
ERROR : Unable to find kernel headers

Install problems

Hi
First:
i try to install this driver behind berryboot and retropie default installation, after sudo sh ./install.sh command ill get errors, log says about unrecognized kernel: 3.12.26-rpi-aufs, which is default installed with berryboot.
Second:
Alone retropie img install (kernel 3.12.22+) dont works with your driver.

Can you help me please?

Thanks in advance

Incorrect instructions regarding module options

Putting module options in /etc/modules won't work for systemd based setups (and /etc/modprobe.d is preferred on older systems also)

to fix on Jessie for example -

module name in /etc/modules

mk_arcade_joystick_rpi

and put the options in /etc/modprobe.d/mk_arcade_joystick.conf

options mk_arcade_joystick_rpi map=1,2

Exec format error

Firstly, thanks for this...my arcade project would have become a console project without it.

I'm getting an error when running:
sudo modprobe mk_arcade_joystick_rpi map=1
ERROR: could not insert 'mk_arcade_joystick_rpi': Exec format error

I'm using a B+ with the RetroPie image. I've attempted installation of mk_arcade_joystick_rpi via installation script & manual installation (release and sources). Any idea what could be causing this error?

Adding more buttons.

Hello DigitalLumberJack. Great work on the script, I was wondering if it was possible to remove the support for more joysticks via MCP chip and add 2 more buttons in those pins?
Great Work!

Anybody had success with RP3 and this version of mk_arcade_joystick_rpi?

hi .
Recently I'm try to make arcade muchine whith Rasberry pi3 and 0.1.4 script and recalbox.
But here are the problem with below.

During run script, the recalbox Os not allow "apt-get" command.
-> in my opionion, this symptom right situation but , how can i make further configuration?

can anybody check above problem?
thank you in advanced
best regards!

Can't insert the module

Hi.

For there is no headers armhf for 3.18.X, I used 3.12.35+:
1

I was able to install it without problems, but it couldn't be inserted:
2

and in dmesg:
3

I found in modinfo:
4

The vermagic was 3.12.35 but not 3.12.35+.
At this point I am assuming it is because the module I got is 3.12.35 but my Rpi is running 3.12.35+?

I tried modprobe --force-vermagic and got the same error:
5

I tried the alternative option and get another error:
6

This is what in make.log:
7

Would anyone please point me in the right direction?

analog joystick?

Hi, i have an analog joystick which sends i2c data i read with my python script, can this be easily adapted to read that? This seems like what i'm looking for except for the joystick is digital :)

Kernel Panic using map=1,2

Hi,

I'm having issues enabling modprobe for "map=1,2".
If I use map=1 it loads correctly and I can just use one joystick. But, if I load the map=1,2 it freezes and then kernel panic.

I'm using 4.1.6-v7 Kernel and 0.1.4 version of mk_arcade_joystick_rpi.

How to modify mk_joystick_arcade_rpi to change GPIO pins used on Raspberry Pi 2

Hi

I have recently setup a retropie 3 raspberry pi 2 box and have installed the mk_arcade_joystick_rpi module.
Working ok.
Only issue i'm having is that the GPIO joystick i am using needs to use specific GPIO pins on the Pi.

Is there anyway to recompile or change the GPIO pins being used in the MK_joystick module?

I am pretty new to linux so any help would be appreciated

thanks

Jimi

FATAL : Module mk_arcade_joystick_rpi not found

Hi.

I followed instructions to the last note. But when I try to load the driver with
pi@raspberrypi:~/mkjoystick $ sudo modprobe mk_arcade_joystick_rpi map=1,2

I get:

modprobe: FATAL: Module mk_arcade_joystick_rpi not found.

Is there something I can do about this issue? What is needed from your side to answer this question?

When I type
lsmod

I get:

Module                  Size  Used by
hidp                   13546  2
bnep                   10340  0
hci_uart               17943  1
btbcm                   5929  1 hci_uart
bluetooth             326105  9 bnep,hidp,btbcm,hci_uart
brcmfmac              186599  0
brcmutil                5661  1 brcmfmac
evdev                  11396  4
joydev                  9024  0
cfg80211              427855  1 brcmfmac
rfkill                 16037  3 cfg80211,bluetooth
snd_bcm2835            20511  1
snd_pcm                75698  2 snd_bcm2835
snd_timer              19160  1 snd_pcm
snd                    51844  4 snd_bcm2835,snd_timer,snd_pcm
bcm2835_gpiomem         3040  0
bcm2835_wdt             3225  0
uio_pdrv_genirq         3164  0
uio                     8000  1 uio_pdrv_genirq
uinput                  7454  0
i2c_dev                 5859  0
fuse                   83461  1
ipv6                  347530  34

No trace of mk_arcade_joystick_rpi... Any ideas on this?

Thank you

Not working for RPi2 - 3.18.7-v7+

Hi, I'm sorta new to linux so not sure if its just me.

I have a RPi2 here with RetroPie working. I can install the module if my SD is in a RPi1 B but when I put it into the RPi2 it will install but not load.

pi@raspberrypi ~/mk_arcade_joystick_rpi $ sudo modprobe mk_arcade_joystick_rpi map=0x20
ERROR: could not insert 'mk_arcade_joystick_rpi': Exec format error

pi@raspberrypi ~/mk_arcade_joystick_rpi $ modinfo mk_arcade_joystick_rpi
filename: /lib/modules/3.18.7-v7+/updates/dkms/mk_arcade_joystick_rpi.ko
license: GPL
description: GPIO and MCP23017 Arcade Joystick Driver
author: Matthieu Proucelle
srcversion: 2B2E40AFD619744883AA3C0
depends:
vermagic: 3.18.7 preempt mod_unload modversions ARMv6
parm: map:Enable or disable GPIO and MCP23017 Arcade Joystick (array of int)

dmesg output: [ 4037.517855] mk_arcade_joystick_rpi: disagrees about version of symbol module_layout

I have tried using the install script - which fails because there is no header file for 3.18.7-v7+
I have downloaded the 3.18.7+ headers and linked -v7+ to that (not sure if that is completely wrong). Also have tried downloading raspberrypi/linux with no luck.
I have also tried cloning the repo and running makepackage.sh and the dpkg -i, but I am not having any luck.

Thanks for the great work so far.

Map=4, Map=5 arguments not functioning

As the title says, I can't get these arguments to work. They will load without error, but nothing works.

I ran jstest, and EVERY button input was showing as "on". When I try "Map=1", or "Map=1,2", jstest runs fine every time I click a button.

Please let me know if I need to provide more details.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.