Solved

Linux Joystick problem

Posted on 2004-10-04
6
521 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
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 
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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Optimize bash script 20 464
OwnCloud Development and/or customization.. 19 1,057
Openwrt vnstat 9 183
Using init script with Systemd: need help crafting unit file 11 106
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…
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 is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

813 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

14 Experts available now in Live!

Get 1:1 Help Now