Solved

Linux Joystick problem

Posted on 2004-10-04
6
515 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
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 
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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

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 fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

757 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