Created
August 26, 2012 08:19
-
-
Save petrockblog/3476134 to your computer and use it in GitHub Desktop.
Excerpt from Gamegon_gpio_rpi README
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Copy the driver to module path | |
# mkdir /lib/modules/`uname -r`/kernel/drivers/input/joystick | |
# cp gamecon_gpio_rpi.ko /lib/modules/`uname -r`/kernel/drivers/input/joystick/ | |
# depmod -a | |
4.2 Configure pads | |
# modprobe gamecon_gpio_rpi map=<pad1/GPIO0>,<pad2/GPIO1>,<pad3/GPIO4>,<pad4/GPIO7> | |
where <pad...> is a number defining the pad type: | |
0 = no connection | |
1 = SNES pad | |
2 = NES pad | |
6 = N64 pad | |
9 = SNES mouse | |
For example, if a snes pad is connected to GPIO0 and a N64 pad to GPIO7, the command would be "modprobe gamecon_gpio_rpi map=1,0,0,6" | |
Use "tail /var/log/kern.log" to verify that module loading was successful | |
4.3 Testing the pads | |
# apt-get install joystick | |
# jstest /dev/input/jsX | |
where X corresponds to the pad id (0-3) | |
4.4 Calibrating the axis of N64 analog pad | |
# jscal -s 4,1,0,0,0,6972137,6972137,1,0,0,0,6547006,6468127,1,0,0,0,536854528,536854528,1,0,0,0,536854528,536854528 /dev/input/jsX |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment