Linux Joystick problem

I have a problem with my linux distro (Fedora Core 2) detecting my Microsoft Sidewinder 3D pro joystick:

The story so far...

I have managed to detect and read my joystick using the 'jstest' function when I plug my joystick into the gameport on my Soundblaster Live soundcard.  To get this working I added the 'sidewinder' and 'emu10k1-gp' modules and changed the permissions on the /dev/input/js0 file to 'rw' for owner, user and others.

The biggest problem I have is that I need to be able to connect my joystick to a motherboard gameport, whether it be on my system or any other system and I can not get linux to detect it.  When I tried it on another system running fedora core 2, I added both the 'gameport' and 'sidewinder' modules using '/sbin/modprobe sidewinder' and '/sbin/modprobe gameport'  and checked the permissions for js0 were read/write the system would not detect the joystick using jstest.

I have tried some methods from the web like creating a group and adding the js* devices to the group, this did not work either.  

I thought this may be to do with IRQ settings, seeing that the soundcard is attached to IRQ 5, that the soundcard has the ability to send interrupts to it's onboard gameport, but the motherboard gameport does not have this ability.  If this is true is there some way to allow interrupts to be sent to the motherboard gameport.  If this is not correct can someone help me sought this problem out, as I need to have this gameport up and running ASAP, so that I can finish writing a C program using the SDL libraries.  Otherwise I will have to go back to using ioperm() to access the gameport pins directly, and that is a complete pain in the ar..    
LVL 1
sabrE7Asked:
Who is Participating?
 
EinarThCommented:
Sorry, but I don't think I'll be able to help (dont own any of the relevant hardware myself).  Best thing I can do is to tell you to take a look at the sources, e.g. /usr/src/linux/drivers/input/joystick/sidewinder.c
and /usr/src/linux/drivers/input/gameport/gameport.c

and maybe even
./Documentation/input/gameport-programming.txt

good luck ;/
0
 
EinarThCommented:
Are sure that you have your mobo gameport enabled in the bios?
0
 
sabrE7Author Commented:
That is what I originally thought, but according to the bios the gameport is enabled at 200h, which is correct.  Another thing that is a bit odd is that when I add both the gameport and sidewinder modules using sbin/modprobe the module list comes up and says that the sidewinder joystick is being used by the gameport,

Module                                 Size                          Used By
gameport                               4033                         1 sidewinder

Yet 'jstest --normal /dev/input/js0'  continually returns 'jstest: No such device'

I have tried jstest with all of the other js files and it is not being detected, same result as above  

0
Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

 
EinarThCommented:
Let me get this straight. You have both a soundblaster and an onboard port in the same computer?

And you wish to use the soundblaster for sound (and never plug a joystick in it) and use the onboard port for a js? right?
0
 
sabrE7Author Commented:
That's correct, I am writing some software at home that will be able to use the mobo gameport.  The problem I have at home is that the soundcard has a gameport on it as well.  How do I disable the soundcard gameport so that I can test that my software using the mobo gameport?

 

0
 
sabrE7Author Commented:
More information:

I have successfully got my sidewinder joystick working on the mobo gameport, with the soundblaster live card installed.  Though I am only able to use it in analog mode.  I loaded the following modules in order using modprobe:

- joydev
- ns558
- analog

This allows me to run my program, which is written using the SDL libraries.  I have tried loading the sidewinder module on another PC that does not have a soundblaster card and I have the same problems as on my own PC.  The sidewinder module only seems to work on soundcard based gameports.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.