gravis aftershock linux driver v0.0.2
by
Jim Susinno - opengl plugin, nostromo-specific tweaking
Vojtech Pavlik - mousedev, the framework of this code
Matan Ziv-Av - lots of guidance
distributed under the terms of the GPL.
this driver is based on mousedev by Vojtech Pavlik, which processes usb mouse events for the kernel.
gravis aftershock specific tweaking by Jim Susinno.
the file is a modded mousedev.c, located in kernel source at
linux/drivers/input/mousedev.c
to install, simply replace your mousedev.c file in the kernel source with the one linked below,then recompile your kernel.
the mousedev module depends on the input module.
remember to specify these options as 'm' in kernel configuration phase (make menuconfig, make xconfig)
then issue 'make modules_install' as root.
modules are stored in the directory /lib/modules
also, the precision buttons/leds on the gamepad are hardware implemented, changing the actual range of the events
output by the device by a factor of 1/2.
Download:
mousedev.c - 21k
Installation:
# just type these commands right into the shell.
# make a shell script out of this, if you wanna go crazy.
##########################################################
su
insmod evdev
cd /usr/src/linux
cp mousedev.c drivers/input/mousedev.c
make modules
make modules_install
Operation:
button mapping:
right trigger high - left click
right trigger low - right click
middle "start" button - middle click
left triggers - side triggers (mouse buttons 4 and 5)
right thumb buttons - mousewheel up/down
left analog stick - absolute pointing device
right analog stick - relative device, only outward motions
once youve compiled a kernel with modular usb/input/mousedev support, your usb gamepad is ready to go.
if it does not respond, try unplugging the gamepad and plugging it back in again.
often, the connect event will elicit a response from the system(give it a couple of seconds for latency).
X might need to be restarted before the mouse device is 'recognized'.
Future improvement:
tweak the gamepad event->mouse event code
- add dead zone in middle of stick (reduce spastic cursor action hopefully)
- acceleration/sensitivity curve
Physical Device: