LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   how do I get my games pad to work (https://www.linuxquestions.org/questions/linux-newbie-8/how-do-i-get-my-games-pad-to-work-113921/)

green-ears 11-08-2003 07:24 PM

how do I get my games pad to work
 
hello all.

i am running mandrake 9.1, the games pad is a sidewinder, the sound card is sound blaster live. i have looked throungh the boards and a can not find the info i need. to get the pad to work.

from lsmod, the sidewinder is not seen.

analog 9024 0 (unused)
gameport 3316 0 [analog]
joydev 7040 0 (unused)

where do i start to get the games pad to work, do i need to install any driver, i have try to install the drive from http://atrey.karlin.mff.cuni.cz/~vojtech/joystick/ but i counld not get it to compile. in the other postings the sidewinder was listed from lsmod but was that able because a driver had been installed ?

thanks all :p green-ears :study:

HappyTux 11-08-2003 08:24 PM

You need the modules (or built in the kernel) sidewinder, gameport,emu10k1-gp,joydev and input loaded. In addition to this I had to make the js devices with MAKEDEV in Debian not sure what you have to do for this in Mandrake and I had to have this in the /etc/modutils/aliases:
Code:

# Added by me for Sidewinder Joystick
alias char-major-13    sidewinder
pre-install sidewinder modprobe joydev ; modprobe emu10k1-gp

And run update-modules to update the /etc/modules.conf so they would be used on boot again not sure how you do this in Mandrake but it works fine this way with Debian you will need to find out how to make the required changes to the proper files for Mandrake.

green-ears 11-09-2003 04:22 PM

HappyTux unfortunely your info as not given me a starting point to get the games pad to work. i do not understand what am i to do. bring in drivers or edit files.

thanks green-ears

HappyTux 11-09-2003 11:22 PM

Quote:

Originally posted by green-ears
HappyTux unfortunely your info as not given me a starting point to get the games pad to work. i do not understand what am i to do. bring in drivers or edit files.

thanks green-ears

You have to make sure that you have the modules available on the system these are Kernel modules you do not need other drivers from some different source they would have been built when the kernel was compiled and then installed. To check to see if you have the modules:
Code:

modprobe sidewinder
modprobe emu10k1-gp

As root if the modules load then you have everything you need and it is just a matter of finding which file you have to put the alias in and how to update the modules.conf. If you get an error saying the modules will not load because they do not exist or may be compiled in the kernel then you have to determine whether they are actually in the kernel or you have to compile the module or a new kernel.

To check if they are in the Kernel:
Code:

[01:16 AM Mon Nov 10: stephen @ ~]
>$ grep EMU10K1 /boot/config-2.4.22.031019
CONFIG_INPUT_EMU10K1=m
CONFIG_SOUND_EMU10K1=m
CONFIG_MIDI_EMU10K1=y
[01:15 AM Mon Nov 10: stephen @ ~]
>$ grep SIDEWINDER /boot/config-2.4.22.031019
CONFIG_INPUT_SIDEWINDER=m

Hopefully Mandrake includes their kernel config-???? file in the /boot directory like Debian otherwise you will have to track down the file to grep it and see the configuration options set. Try these steps out and post back with the results.

EDIT: Damn typo

green-ears 11-10-2003 01:37 PM

HappyTux thanks for your reply. things have moved on a bit. when I

modprobe sidewinder
modprobe emu10k1-gp

and then with lsmod things turn up in the list so the things i want most be in the kernal.

gameport 3316 0 [emu10k1-gp sidewinder analog]
input 5664 0 [sidewinder analog joydev]

it looks like they have been loaded but i do not know what the alias is and where the file is. and then it looks like i need to update the modules.conf , how.

things are moving on a bit thanks green-ears

green-ears 11-10-2003 02:27 PM

hi HappyTux,

I have been looking around for some info from the boards and it looks like i need to put some lines in /etc/rc.d/rc.local but what and the drive for my sound blaster live is.

Your card currently use the ALSA "snd-emu10k1" driver (default driver for your card is "snd-emu10k1")

after i modprobe sidewinder and modprobe emu10k1-gp the games pad is still dead.
bye again green-ears

HappyTux 11-10-2003 03:25 PM

It looks good the modules load so they are there, according to what I have read in a quick google search it looks like you can edit the modules.conf directly in Mandrake so you would put the alias lines in my post above in the modules.conf and save the file and reboot. I also put the modules in the /etc/modules just to be on the safe side to make certain they loaded it does not seem to cause any problems. You should be able to use the joystick after the reboot if everything is detected properly you could use the jstest program which I believe is part of the joystick package to test or open XMMS and configure it to use the joystick input by going to the Options menu item then Preferences menu item next would be the General Plugins tab and choose the Joystick Control and click on the enable plugin Then you would have to click on the configure option the direction pad will already be configured for the volume up and down plus next and previous track the buttons numbers would be a=1, b=2, c=3, x=4, y=5 and z=6. After applying and saving the configuration changes in XMMS you would have to exit the program and restart for the changes to take effect.

green-ears 11-10-2003 06:21 PM

hi HappyTux. things are becoming more clear but there still not life in the pad yet.

here is what i do from your last post.

in the /etc/modules file i have put in the lines :

# Added by me for Sidewinder Joystick
alias char-major-13 sidewinder
pre-install sidewinder modprobe joydev ; modprobe emu10k1-gp

from the lsmod :

sidewinder 9816 0 (unused)
gameport 3316 0 [analog sidewinder]
input 5664 0 [analog joydev sidewinder]

i been in to xmms and enable joystick plugin.

i downloaded the : joystick-1.2.15-2mdk.i586.rpm and when i run jstest command the output is :

Usage: jstest [<mode>] <device>

Modes:
--normal One-line mode showing immediate status
--old Same as --normal, using 0.x interface
--event Prints events as they come in
--nonblock Same as --event, in nonblocking mode
--select Same as --event, using select() call

So it seems that jstest is installed but i do not know what to do with it. i will have a look at its man pages and have a look its web site for info.

so things are moving on and its nearly there and HappyTux thanks for your open source of knowlage. my the source life on.

green-ears

HappyTux 11-10-2003 07:24 PM

I believe when I used it it was just jstest /dev/js0 to test the joystick. Your lsmod does not show the emu10k1-gp that should be being loaded as well for it to work here's what mine looks like:

Code:


Not in use:

sidewinder              8388  0  (unused)
emu10k1-gp              1224  0  (unused)
emu10k1                56360  1
ac97_codec            12204  0  [emu10k1]
sound                  54252  0  [emu10k1]
soundcore              3556  7  [emu10k1 sound]
mousedev                3864  0  (unused)
joydev                  6976  0
gameport                1516  0  [sidewinder emu10k1-gp]
parport_pc            25192  1  (autoclean)
lp                      6528  0
parport                24960  1  [parport_pc lp]
tulip                  38080  1
crc32                  2848  0  [tulip]
autofs4                8500  2
input                  3360  0  [keybdev hid sidewinder mousedev joydev]


In use:

sidewinder              8388  0  (unused)
emu10k1-gp              1224  0  (unused)
emu10k1                56360  1
ac97_codec            12204  0  [emu10k1]
sound                  54252  0  [emu10k1]
soundcore              3556  7  [emu10k1 sound]
mousedev                3864  0  (unused)
joydev                  6976  1
gameport                1516  0  [sidewinder emu10k1-gp]
parport_pc            25192  1  (autoclean)
lp                      6528  0
parport                24960  1  [parport_pc lp]
tulip                  38080  1
crc32                  2848  0  [tulip]
autofs4                8500  2
input                  3360  0  [keybdev hid sidewinder mousedev joydev]

Also you do not need the analog module being loaded and you should put the alias in the modules.conf, if you want to put the modules in the /etc/modules you would:

Code:

# Added by me for joystick
gameport
joydev
emu10k1-gp
sidewinder


green-ears 11-10-2003 08:33 PM

hi HappyTux things have move on again but the pad still dead but the emu10k1-gp is in the lsmod. i put :

# Added by me for Sidewinder Joystick
alias char-major-13 sidewinder
pre-install sidewinder modprobe joydev ; modprobe emu10k1-gp

in /etc/modules.conf before i put them in /etc/modules which must have been wrong. i have put:

# Added by me for joystick
gameport
joydev
emu10k1-gp
sidewinder

in /etc/modules

from lsmod the emu10k1-gp is there :

sidewinder 9816 0 (unused)
emu10k1-gp 2184 0 (unused)
joydev 7040 1
input 5664 0 [analog sidewinder joydev]
gameport 3316 0 [analog sidewinder emu10k1-gp]

i have cd /dev and then ls the dir to see if the js0 is there and it is.

when i come to the use jstest /dev/js0 command as root the return is below and i do not know if its wrong but there seems to be a lot of offs:

[root@hello dev]# jstest /dev/js0
Joystick (Microsoft SideWinder GamePad) has 2 axes and 10 buttons. Driver version is 2.1.0.
Testing ... (interrupt to exit)

Axes: 0: 0 1: 0 Buttons: 0:off 1:off 2:off 3:off 4:off 5:off 6:off 7:off 8:off 9:off

things are nearly there.

green-ears

green-ears 11-10-2003 08:43 PM

YES xmms as come to life with the pad and its working. now i will start to find out how to configer the pad for bxflag and tron. and YES thanks for the soures. and thanks to linuxquestion for the site.

green-ears

HappyTux 11-10-2003 08:43 PM

It's there and in use (the joydev 1 shows this) the off's are you not pressing the buttons, try pressing the buttons on the joystick and you will see ON in the lines, you should try xmms and see if you can control the playing of a song it should work.

green-ears 11-10-2003 09:16 PM

yes when i been back to jstest /dev/js0 and press the buttons things are happening with the off. i have try the pad with tuxracer but no life yet, tux is a game that can use a pad ? xmms works well the volume and play list can be alterd.

green-ears

HappyTux 11-10-2003 10:01 PM

The jstest tells you which button numbers you are pressing. For the tuxracer I'm not sure I never tried it with that but when I went ot use it with mplayer from the command line it was looking for the joystick at /dev/input/js0 I had to change some settings in a config file so you may want to check into something like that happening with tuxracer.


All times are GMT -5. The time now is 02:02 PM.