Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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 03:02 PM.
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.
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?
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).
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
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:
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.
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?
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.
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..
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?
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?
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.