LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-29-2004, 12:22 AM   #1
statmobile
Member
 
Registered: Aug 2003
Location: Chapel Hill, NC
Distribution: Gentoo, Windows 95 2000 & XP
Posts: 160

Rep: Reputation: 30
help installing joystick


Hey, I just found a neat old flight stick laying around (CH?), and I would love to hook it up to my Red Hat machine. I have a joystick serial port on my sound card, but I have absolutely no idea how to go about installing and using this thing.

Any tips with using this in xmame would be helpful as well!

Last edited by statmobile; 07-29-2004 at 04:02 PM.
 
Old 07-29-2004, 01:59 AM   #2
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 3,519

Rep: Reputation: 70
Re: help installing joystick

Quote:
Originally posted by statmobile
Hey, I just found a neat old flight stick laying around (CM?), and I would love to hook it up to my Red Hat machine. I have a joystick serial port on my sound card, but I have absolutely no idea how to go about installing and using this thing.

Any tips with using this in xmame would be helpful as well!
You would need to have the module loaded for the joystick you are using, gameport on the card, the joystick module and need to put something similar to this in your /etc/modules.conf.

Code:
# Added by me for Sidewinder Joystick
alias char-major-13     sidewinder
You would change the sidewinder in the line to the module name for your joystick. You need to do a little seaching to find the module name for the sound card gameport and for the joystick itself then check in the kernel config to see if support is enabled if so then put the module names in the file /etc/modules so that they will be loaded on boot if all is successful then it should be available on /dev/js0 if it exists. If it does not exists then change to the /dev directory and use MAKEDEV -n js to simulate the making of the devices if the output looks good (no errors) then remove the -n to actually create them. On my Debian install I also had to make a directory in /dev/ called input and run the MAKEDEV command again for programs that look for /dev/input/js0 instead /dev/js0.
 
Old 07-29-2004, 04:06 PM   #3
statmobile
Member
 
Registered: Aug 2003
Location: Chapel Hill, NC
Distribution: Gentoo, Windows 95 2000 & XP
Posts: 160

Original Poster
Rep: Reputation: 30
Wow!

Do you have any good sites to help me along with this process.

I have no idea what type of flight stick I have, it's a very old one made by CH. I've googled and looked at their website, but there is nothing there to help me figure that out. It's a very basic joystick, so I'm hoping that module for the more advanced CH flight sticks would support it. As for the probing for my joystick port on the sound card, any tips on how to do this?

I do have /dev/js0, so does this mean that my kernel probably does support it?
 
Old 07-29-2004, 07:22 PM   #4
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 3,519

Rep: Reputation: 70
Quote:
Originally posted by statmobile
Wow!

Do you have any good sites to help me along with this process.

I have no idea what type of flight stick I have, it's a very old one made by CH. I've googled and looked at their website, but there is nothing there to help me figure that out. It's a very basic joystick, so I'm hoping that module for the more advanced CH flight sticks would support it. As for the probing for my joystick port on the sound card, any tips on how to do this?

I do have /dev/js0, so does this mean that my kernel probably does support it?
It should support it then if the js0 exists you would think anyway. Become root and try this modprobe joystick then modprobe gameport if they both either load without errors or have an error that says they have incorrect parameters then you should be OK if they say the module does not exists then there may be problems. You would need to check the kernel config to see if they are built into the kernel not as module with something similar to this.

Code:
[08:01 PM Thu Jul 29: stephen @ ~]
>$ grep -i joystick /boot/config-2.6.8-rc2-ck6
CONFIG_INPUT_JOYSTICK=y
# CONFIG_JOYSTICK_ANALOG is not set
# CONFIG_JOYSTICK_A3D is not set
# CONFIG_JOYSTICK_ADI is not set
# CONFIG_JOYSTICK_COBRA is not set
# CONFIG_JOYSTICK_GF2K is not set
# CONFIG_JOYSTICK_GRIP is not set
# CONFIG_JOYSTICK_GRIP_MP is not set
# CONFIG_JOYSTICK_GUILLEMOT is not set
# CONFIG_JOYSTICK_INTERACT is not set
CONFIG_JOYSTICK_SIDEWINDER=m
# CONFIG_JOYSTICK_TMDC is not set
# CONFIG_JOYSTICK_IFORCE is not set
# CONFIG_JOYSTICK_WARRIOR is not set
# CONFIG_JOYSTICK_MAGELLAN is not set
# CONFIG_JOYSTICK_SPACEORB is not set
# CONFIG_JOYSTICK_SPACEBALL is not set
# CONFIG_JOYSTICK_STINGER is not set
# CONFIG_JOYSTICK_TWIDDLER is not set
# CONFIG_JOYSTICK_DB9 is not set
# CONFIG_JOYSTICK_GAMECON is not set
# CONFIG_JOYSTICK_TURBOGRAFX is not set
[08:01 PM Thu Jul 29: stephen @ ~]
>$ grep -i gameport /boot/config-2.6.8-rc2-ck6
CONFIG_GAMEPORT=m
CONFIG_SOUND_GAMEPORT=m
# CONFIG_GAMEPORT_NS558 is not set
# CONFIG_GAMEPORT_L4 is not set
CONFIG_GAMEPORT_EMU10K1=m
# CONFIG_GAMEPORT_VORTEX is not set
# CONFIG_GAMEPORT_FM801 is not set
# CONFIG_GAMEPORT_CS461x is not set
You would need to use the /boot/config-?.?.?? of your running kernel you can find this by looking at the output of uname -r that is the part you put in where the ?? are.


According to this page your joystick should be an analog one so you need to put this in your /etc/modules.conf.

Code:
# Added by me for CH Joystick
alias char-major-13     analog
And assuming that the gameport and joystick modules exists then put these module names along with the analog each on a separate line in the /etc/modules file so they will be loaded on boot. I'm not quite sure which module you need for the gameport on the sound card but it should get loaded when modprobe loads these other modules. I believe you will need to reboot once you have done these steps for to be initalized properly.

If you get any errors can you cut'n'paste them here and the output of lsmod, dmesg and lspci -v (this one done as root).
 
Old 07-29-2004, 07:46 PM   #5
statmobile
Member
 
Registered: Aug 2003
Location: Chapel Hill, NC
Distribution: Gentoo, Windows 95 2000 & XP
Posts: 160

Original Poster
Rep: Reputation: 30
Hmm, I'm beginning to wonder if my sound card is configured correctly. You can see it in my signature, but yet I don't see anything setting the gameport on my soundcard. Is this something I can just add, or do I have to recompile my kernel? Ouch!

Here are the results:
Code:
root@localhost:blopes$ modprobe joystick
modprobe: Can't locate module joystick
root@localhost:blopes$ modprobe gameport
root@localhost:blopes$ grep -i joystick /boot/config-2.4.20-8 
# Joysticks
# Input core support is needed for joysticks
CONFIG_SOUND_CMPCI_JOYSTICK=y
# CONFIG_PAS_JOYSTICK is not set
CONFIG_JOYSTICK=m
root@localhost:blopes$ grep -i gameport /boot/config-2.4.20-8 
CONFIG_INPUT_GAMEPORT=m
root@localhost:blopes$ cat /etc/modules.conf
alias eth0 tulip
alias usb-controller usb-uhci
alias sound-slot-0 es1371
post-install sound-slot-0 /bin/aumix-minimal -f /etc/.aumixrc -L >/dev/null 2>&1 || :
pre-remove sound-slot-0 /bin/aumix-minimal -f /etc/.aumixrc -S >/dev/null 2>&1 || :

# Added by me for CH Joystick
alias char-major-13     analog
 
Old 07-29-2004, 08:33 PM   #6
motub
Senior Member
 
Registered: Sep 2003
Location: The Netherlands
Distribution: Gentoo (main); SuSE 9.3 (fallback)
Posts: 1,607

Rep: Reputation: 46
OK, stuff you may have missed:

Device Drivers=>Input devices=>Classic ISA and PNP gameport support (module: ns558)

Device Drivers=>Input devices=>SB Live and Audigy gameport support (module: emu10k1-gp) --yes I know your card isn't an SB Live, but instead an older SB, but you never know; SoundBlasters have been backwards compatible with previous versions since forever, and it's possible that your Soundblaster uses the same "Soundblaster" port as a newer card, either of which would possibly be different from the "standard generic" gameport protocol.

Device Drivers=>Input devices=>Microsoft SideWinder digital joysticks and gamepads (module: sidewinder) -- the Sidewinder has been the King of joysticks/gamepads for a long time, and many other brands were designed to be compatible with it, so it might be worthwhile to try the sidewinder module for this 'stick... it might work (assuming the problem was not that the gameport isn't enabled).

I'm a Gentoo user, and I'm also using udev (so telling you how I load my modules is probably not going to be very helpful), but as a point of reference, here are the modules that I have to load to get my Sidewinder recognized as being on the gameport of my VIA 8233 onboard sound chip:

gameport
ns558
joydev
sidewinder

Hope this helps.
 
Old 07-29-2004, 08:59 PM   #7
statmobile
Member
 
Registered: Aug 2003
Location: Chapel Hill, NC
Distribution: Gentoo, Windows 95 2000 & XP
Posts: 160

Original Poster
Rep: Reputation: 30
well, when doing modprobe for the first two drivers mentioned above, I have them.

How the heck do I get them to load in RedHat?
 
Old 07-29-2004, 09:11 PM   #8
motub
Senior Member
 
Registered: Sep 2003
Location: The Netherlands
Distribution: Gentoo (main); SuSE 9.3 (fallback)
Posts: 1,607

Rep: Reputation: 46
You have them, that's fine... but there's no point in setting them to load if they don't work. If you've modprobed them, they're loaded now; does the joystick now work?

If so, then we can worry about how to add them to any init scripts RedHat may use. If not, we have to seek further for the correct modules in order to move to the next stage.
 
Old 07-29-2004, 09:13 PM   #9
statmobile
Member
 
Registered: Aug 2003
Location: Chapel Hill, NC
Distribution: Gentoo, Windows 95 2000 & XP
Posts: 160

Original Poster
Rep: Reputation: 30
how do I test to see if my joystick is working?

I did the following:

root@localhost:etc$ modprobe joystick
modprobe: Can't locate module joystick
 
Old 07-29-2004, 09:23 PM   #10
motub
Senior Member
 
Registered: Sep 2003
Location: The Netherlands
Distribution: Gentoo (main); SuSE 9.3 (fallback)
Posts: 1,607

Rep: Reputation: 46
The easiest way to tell would be to install or run a program that uses the joystick, for example I use mine on the several NES and SNES emulators I have installed. If I run one and then press the joystick buttons but there is no response in the game, then the joystick isn't working.

But the module might not be loaded anyway: what is the output of lsmod?
 
Old 07-29-2004, 09:31 PM   #11
statmobile
Member
 
Registered: Aug 2003
Location: Chapel Hill, NC
Distribution: Gentoo, Windows 95 2000 & XP
Posts: 160

Original Poster
Rep: Reputation: 30
Here is the output from lsmod.
I have to try to figure out joystick support in xmame, that's the goal of the joystick.
Thanks for helping me!!!

<CODE>
Module Size Used by Tainted: PF
analog 9120 0 (unused)
es1371 30504 0 (autoclean)
ac97_codec 13544 0 (autoclean) [es1371]
soundcore 6276 4 (autoclean) [es1371]
gameport 3332 0 [analog es1371]
binfmt_misc 7272 1
parport_pc 18756 1 (autoclean)
lp 8868 0 (autoclean)
parport 36480 1 (autoclean) [parport_pc lp]
libafs-2.4.20-8-athlon 487056 2
autofs 12948 0 (autoclean) (unused)
tulip 43648 1
ipt_REJECT 3896 2 (autoclean)
iptable_filter 2380 1 (autoclean)
ip_tables 14648 2 [ipt_REJECT iptable_filter]
sg 35980 0 (autoclean)
sr_mod 17912 0 (autoclean)
ide-scsi 11984 0
scsi_mod 106200 3 [sg sr_mod ide-scsi]
ide-cd 35196 0
cdrom 33472 0 [sr_mod ide-cd]
keybdev 2880 0 (unused)
mousedev 5428 1
hid 21700 0 (unused)
input 5792 0 [analog keybdev mousedev hid]
usb-uhci 25868 0 (unused)
usbcore 77696 1 [hid usb-uhci]
ext3 69984 3
jbd 51220 3 [ext3]
</CODE>
 
Old 07-29-2004, 09:34 PM   #12
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 3,519

Rep: Reputation: 70
Quote:
Originally posted by statmobile
Hmm, I'm beginning to wonder if my sound card is configured correctly. You can see it in my signature, but yet I don't see anything setting the gameport on my soundcard. Is this something I can just add, or do I have to recompile my kernel? Ouch!

Here are the results:
Code:
root@localhost:blopes$ modprobe joystick
modprobe: Can't locate module joystick
root@localhost:blopes$ modprobe gameport
root@localhost:blopes$ grep -i joystick /boot/config-2.4.20-8 
# Joysticks
# Input core support is needed for joysticks
CONFIG_SOUND_CMPCI_JOYSTICK=y
# CONFIG_PAS_JOYSTICK is not set
CONFIG_JOYSTICK=m
root@localhost:blopes$ grep -i gameport /boot/config-2.4.20-8 
CONFIG_INPUT_GAMEPORT=m
root@localhost:blopes$ cat /etc/modules.conf
alias eth0 tulip
alias usb-controller usb-uhci
alias sound-slot-0 es1371
post-install sound-slot-0 /bin/aumix-minimal -f /etc/.aumixrc -L >/dev/null 2>&1 || :
pre-remove sound-slot-0 /bin/aumix-minimal -f /etc/.aumixrc -S >/dev/null 2>&1 || :

# Added by me for CH Joystick
alias char-major-13     analog
Ok so what is the output of the other commands? I found this page mentioning a modprobe es1371 joystick=0x200 to get the gameport working on what I think is a similar card so you may have to add to the modules.conf another line and maybe you might need to change the analog to joystick in the file as well.

Code:
options joystick io=0x200
I really need to see the output of the other commands though to see how it is getting initialized (dmesg) and what modules are loaded (lsmod) and in use the lspci -v as root would be nice as well.
 
Old 07-29-2004, 09:41 PM   #13
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 3,519

Rep: Reputation: 70
Quote:
Originally posted by statmobile
Here is the output from lsmod.
I have to try to figure out joystick support in xmame, that's the goal of the joystick.
Thanks for helping me!!!

<CODE>
Module Size Used by Tainted: PF
analog 9120 0 (unused)
es1371 30504 0 (autoclean)
ac97_codec 13544 0 (autoclean) [es1371]
soundcore 6276 4 (autoclean) [es1371]
gameport 3332 0 [analog es1371]

input 5792 0 [analog keybdev mousedev hid]

</CODE>
That is looking better the modules are getting loaded now you need the joystick module loaded and in use try my suggestions in my last post.

BTW an esay way to check if the joystick is working is to use XMMS it has a joystick module included IIRC at least I never installed aything for it to work only had to configure it in the general plugins section..
 
Old 07-29-2004, 10:17 PM   #14
statmobile
Member
 
Registered: Aug 2003
Location: Chapel Hill, NC
Distribution: Gentoo, Windows 95 2000 & XP
Posts: 160

Original Poster
Rep: Reputation: 30
I'm sorry, but I'm getting a little confused now

modprobe, how does this work? I added that line to modules.conf, and rebooted. I noticed that analog no longer showed up in lsmod, so I used modprobe analog, and now it shows up as it did in my previous post. Does modprobe actually load modules for me?

Here is the output from dmesg, after a reboot

http://www.unc.edu/~blopes/dump.html
 
Old 07-29-2004, 10:55 PM   #15
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 3,519

Rep: Reputation: 70
Quote:
Originally posted by statmobile
I'm sorry, but I'm getting a little confused now

modprobe, how does this work? I added that line to modules.conf, and rebooted. I noticed that analog no longer showed up in lsmod, so I used modprobe analog, and now it shows up as it did in my previous post. Does modprobe actually load modules for me?

Here is the output from dmesg, after a reboot

http://www.unc.edu/~blopes/dump.html
Modprobe will load a module and the other modules it needs. From your dmesg output I see no mention of the joystick in there at all although your CD-Rom seems to producing a lot of errors do you have a Disc in it if so take it out. Did the joystick module get loaded when you made the changes to the /etc/modules.conf and by changing do you mean that you put the joystick in both places if so put the analog back in the alias line and leave the joystick in the option line. And if you can just cut the output of the revelant lines of the lsmod to post it is easier to see it than you telling us what happened.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
installing joystick bboy8012 Linux - Newbie 8 12-26-2005 02:56 PM
Joystick Driver and API under kernel 2.6.12.3 using an USB joystick dispatcher Linux - Newbie 1 08-06-2005 10:43 AM
Joystick DaBlade Linux - Hardware 3 03-22-2005 05:58 AM
looking for complete instruction in installing modem/joystick driers carmel_andrews Linux - Hardware 1 11-18-2004 02:23 PM
Installing joystick JaseP Linux - Hardware 2 02-02-2003 02:48 AM


All times are GMT -5. The time now is 11:10 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration