LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 05-01-2011, 12:16 AM   #1
Secant
LQ Newbie
 
Registered: Jan 2006
Distribution: Gentoo
Posts: 18

Rep: Reputation: 0
SDL joystick event from N64 controller adapter not recognized


I'm using a "HuiJia USB Gamepad" to connect a standard N64 controller to my computer over USB. I'm doing this so that I can play games using mupen64plus, which uses the SDL to get input. My problem has to do with the way the adapter deals with C button events. Apparently, the u/d and l/r C buttons are treated by the adapter as joystick axes, so joystick events are generated by using them. But, for some reason, these events aren't recognized by SDL.

It gets stranger - if I cat the output of /dev/input/event5, the event gets printed when a C button is pressed. Furthermore, when I configure SDL to use the /dev/input/event* devices rather than /dev/input/js0, the C buttons are recognized! (Though, this leads to a situation where the joystick can't be calibrated... go figure).

So, I can either have a correctly calibrated joystick with no C buttons or a miscalibrated joystick with working C buttons.

Does anyone have any idea what I can do about this situation? The best outcome would be to force the C button joystick events to appear when using /dev/input/js0.


Device as it appears in the output of lsusb:
Code:
Bus 005 Device 003: ID 0e8f:3013 GreenAsia Inc.
The adapter:
http://www.amazon.com/May-Flash-Cont.../dp/B002B9FIUU

Thanks!
 
Old 05-03-2011, 03:03 PM   #2
rylan76
Senior Member
 
Registered: Apr 2004
Location: Potchefstroom, South Africa
Distribution: Fedora 17 - 3.3.4-5.fc17.x86_64
Posts: 1,552

Rep: Reputation: 103Reputation: 103
Have you tried using the xboxdrv driver?

Do you know which driver is currently being used to interface to that gamepad?

I seem to remember that the xboxdrv site mentioned some form of experimental gamepad support, not sure if it was for your device, but maybe its a starting point...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Duplicate SDL event issue aatwell Programming 6 01-04-2008 02:35 PM
Looking for Joystick to Mouse Event Handler that supports Acceleration / Keyboard... fragged Linux - Software 0 08-06-2007 08:17 AM
Joystick is making an event device not js ForYouAndI.com Linux - Hardware 0 03-11-2007 10:12 AM
use SDL to read joystick/gamepad input samel_tvom Programming 7 10-09-2006 03:11 PM
usb controller/joystick edong23 Linux - Hardware 20 08-09-2005 03:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 01:43 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration