Solved

Linux Joystick problem

Posted on 2004-10-04
6
518 Views
Last Modified: 2009-12-16
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..    
0
Comment
Question by:sabrE7
  • 3
  • 3
6 Comments
 
LVL 4

Expert Comment

by:EinarTh
ID: 12225179
Are sure that you have your mobo gameport enabled in the bios?
0
 
LVL 1

Author Comment

by:sabrE7
ID: 12244793
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
 
LVL 4

Expert Comment

by:EinarTh
ID: 12248087
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 1

Author Comment

by:sabrE7
ID: 12268822
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
 
LVL 1

Author Comment

by:sabrE7
ID: 12275179
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
 
LVL 4

Accepted Solution

by:
EinarTh earned 500 total points
ID: 12276955
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

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Have you ever been frustrated by having to click seven times in order to retrieve a small bit of information from the web, always the same seven clicks, scrolling down and down until you reach your target? When you know the benefits of the command l…
The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now