Link to home
Start Free TrialLog in
Avatar of sabrE7
sabrE7

asked on

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..    
Avatar of EinarTh
EinarTh

Are sure that you have your mobo gameport enabled in the bios?
Avatar of sabrE7

ASKER

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  

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?
Avatar of sabrE7

ASKER

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?

 

Avatar of sabrE7

ASKER

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.
ASKER CERTIFIED SOLUTION
Avatar of EinarTh
EinarTh

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial