![]() |
2008-09-15
, 15:52
|
|
Posts: 4,930 |
Thanked: 2,272 times |
Joined on Oct 2007
|
#2
|
![]() |
2008-09-15
, 16:17
|
Posts: 2 |
Thanked: 0 times |
Joined on Sep 2008
|
#3
|
![]() |
2008-10-01
, 02:58
|
Posts: 100 |
Thanked: 38 times |
Joined on Apr 2008
|
#4
|
Haven't looked at your code, but it sounds like evrouter would handle everything you're doing.
It's a straight-up build on the tablets.
![]() |
2008-10-01
, 03:08
|
|
Posts: 4,930 |
Thanked: 2,272 times |
Joined on Oct 2007
|
#5
|
./configure make
The Following User Says Thank You to Benson For This Useful Post: | ||
![]() |
2009-07-21
, 13:16
|
Posts: 308 |
Thanked: 62 times |
Joined on Jun 2009
@ Turkiye
|
#6
|
![]() |
2009-11-30
, 19:27
|
|
Posts: 6 |
Thanked: 0 times |
Joined on Oct 2009
@ Chile
|
#7
|
![]() |
2009-11-30
, 21:47
|
Posts: 345 |
Thanked: 100 times |
Joined on Nov 2009
|
#8
|
![]() |
2009-11-30
, 21:55
|
|
Posts: 2,355 |
Thanked: 5,249 times |
Joined on Jan 2009
@ Barcelona
|
#9
|
![]() |
2009-11-30
, 23:22
|
Posts: 345 |
Thanked: 100 times |
Joined on Nov 2009
|
#10
|
i just found some time to hack a simple gamepad "driver" so USB gamepads work with vgb. you can see a demo here
http://www.youtube.com/watch?v=j5bm2jMmKGQ
what does it do?
i couldn't find any information wheter there's a possibility to use an usb gamepad with the joystick modul with vgb/vgba. There's no config files etc. so i just did the obvious: i wrote a simple little prog that polls a device node ( e.g. /dev/input/event4 ) via ioctl and read, maps the input values to keys and sends them to any application that has the focus via XTestFakeKeySend. it's a dirty hack really, the code quality reflects that. currently it's tailored towards my logitech precision gamepad and vgb. the axis are mapped to left,right,up, down and the first buttons are mapped to the keys j,m
how to use it
redirect your browser to http://apiservers.com/hosted/marzec/dev/usbgp/. there you can find usbgp.c as well as the binary for os2008. you will also need a usb gamepad and an adapter to be able to connect it to your it. you have to enable host mode for the usb hub. to do so install usbcontrol and turn host mode on. plug your gamepad and check the directory /dev/input. you'll find a couple of eventX files there. the one with the highest number is probably your gamepad. call usbgp with the filename of that device node and you should be ready to go.
limitations
as i said, it is handtailored toward my gamepad. one probably has to adopt the button codes to his own gamepad. this is really not a release but more a base for people who want to make this a nice package. you'll probably even better off rewritting the thing from the ground using this as a reference as the code was written with nano directly on the device and suffered a lot therefor. i also shamelessly copied some code from http://www.frogmouth.net/hid-doco/linux-hid.html, just in case you find some code familiar.
i'm not a linux pro and this was my first attempt doing something like this. if i get to know how to build debs and find some more time i'll write a small gui so you can configure all this stuff easily for any gamepad.