Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved]pc controller help
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC
View previous topic :: View next topic  
Author Message
Steven4123
n00b
n00b


Joined: 06 Mar 2007
Posts: 19

PostPosted: Sat Mar 17, 2007 1:41 am    Post subject: [Solved]pc controller help Reply with quote

I have a usb controller and want to use it with xmame but not sure how to set it up. I typed in dmesg in the terminal and it recongizes the controller but how do I get it to work with xmame?

Last edited by Steven4123 on Mon May 07, 2007 10:17 pm; edited 1 time in total
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Sat Mar 17, 2007 1:44 am    Post subject: Reply with quote

See wiki. Some details about what this controller is would be helpful.
Back to top
View user's profile Send private message
Steven4123
n00b
n00b


Joined: 06 Mar 2007
Posts: 19

PostPosted: Sat Mar 17, 2007 2:37 am    Post subject: Reply with quote

Im using a Gravis tilt controller. Do I really have to recompile the kernel and re install it just to get the joystick working?
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Sat Mar 17, 2007 2:45 am    Post subject: Reply with quote

You tell me :wink:
Code:
grep -i joystick /usr/src/linux/.config
Back to top
View user's profile Send private message
Steven4123
n00b
n00b


Joined: 06 Mar 2007
Posts: 19

PostPosted: Sat Mar 17, 2007 2:53 am    Post subject: Reply with quote

PaulBredbury wrote:
You tell me :wink:
Code:
grep -i joystick /usr/src/linux/.config

ok I did that and that came up what now?

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 is not set
# 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_TWIDJOY is not set
# CONFIG_JOYSTICK_JOYDUMP is not set
Back to top
View user's profile Send private message
Steven4123
n00b
n00b


Joined: 06 Mar 2007
Posts: 19

PostPosted: Tue Mar 20, 2007 12:54 am    Post subject: Reply with quote

I really just want to get the controller working with xmame. Yet im not sure how. I choose the joystick option and it says joystice device prefix. What do I input for that? Everytime I run a game with joystick enabled it says Error:joytype 1 not available.
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Tue Mar 20, 2007 1:05 am    Post subject: Reply with quote

Dunno. Try these Google hits.
Back to top
View user's profile Send private message
JoseJX
Retired Dev
Retired Dev


Joined: 28 Apr 2002
Posts: 2774

PostPosted: Tue Mar 20, 2007 1:40 am    Post subject: Reply with quote

If it's a USB controller, you need USB support for it. Most likely, it's a USB HID device (most input devices are). There are some force feedback type devices that aren't, but I'm assuming that's not the case. Once you have USB HID support enabled, ccheck with lsusb (emerge usbutils) to ensure that the device is connected. Also, check in dmesg after plugging it in to make sure the kernel recognized it. If so, then /dev/jsX should be available where X is the joystick # (starting at 0).

Once your joystick is working, for MAME, you should just specify the device with "-jdev /dev/js0" or whatever your joystick device is. It works fine here with a PS2 -> USB adapter.
_________________
Gentoo PPC FAQ: http://www.gentoo.org/doc/en/gentoo-ppc-faq.xml


Last edited by JoseJX on Tue Mar 20, 2007 2:23 am; edited 1 time in total
Back to top
View user's profile Send private message
Steven4123
n00b
n00b


Joined: 06 Mar 2007
Posts: 19

PostPosted: Tue Mar 20, 2007 2:21 am    Post subject: Reply with quote

JoseJX wrote:
If it's a USB controller, you need USB support for it. Most likely, it's a USB HID device (most input devices are). There are some force feedback type devices that aren't, but I'm assuming that's not the case. Once you have USB HID support enabled, ccheck with lsusb (emerge lsusb) to ensure that the device is connected. Also, check in dmesg after plugging it in to make sure the kernel recognized it. If so, then /dev/jsX should be available where X is the joystick # (starting at 0).

Once your joystick is working, for MAME, you should just specify the device with "-jdev /dev/js0" or whatever your joystick device is. It works fine here with a PS2 -> USB adapter.

Ya its a USB controller and its a USB HID device. How do you get USB HID support enabled? After putting dmesg in the terminal I dont have any js0 file in the /dev directory but I do have a js0 file in the /dev/input directory. When I go to the joystick option in gxmame I have only the option for SDL joystick or no joystick.
Back to top
View user's profile Send private message
JoseJX
Retired Dev
Retired Dev


Joined: 28 Apr 2002
Posts: 2774

PostPosted: Tue Mar 20, 2007 2:26 am    Post subject: Reply with quote

To find something in the kernel configuration menu, press / and then type in what you're looking for.

And yes, sorry, it's /dev/input/jsX, not /dev/jsX. I don't know anything about gxmame, so I can't help you with that.
_________________
Gentoo PPC FAQ: http://www.gentoo.org/doc/en/gentoo-ppc-faq.xml
Back to top
View user's profile Send private message
Steven4123
n00b
n00b


Joined: 06 Mar 2007
Posts: 19

PostPosted: Tue Mar 20, 2007 2:56 am    Post subject: Reply with quote

JoseJX wrote:
To find something in the kernel configuration menu, press / and then type in what you're looking for.

And yes, sorry, it's /dev/input/jsX, not /dev/jsX. I don't know anything about gxmame, so I can't help you with that.
So you run mame from the terminal? How do you change the confirguation for mame if you are running it from the terminal? So is the controller the problem or if I go buy another pc controller it would work?
Edit: making progress I got the joystick to work in the terminal following a guide to set up usb. But it says to Then run on X-Terminal: jscalibrator. How do I do that? Do I emerge that?

EDIT #2: Well I can confirm the linux recongizes it and everything. I think there something wrong with gxmame as everytime I use the joystick option it has the same error even if the controller isnt hooked up. What code would I put it to use the joystick with xmame thru the terminal? heres the code I use to run roms
Code:
/usr/games/bin/xmame.SDL /usr/share/games/roms/dstlk.zip
Do I add something to that to enable the joystick?
Back to top
View user's profile Send private message
JoseJX
Retired Dev
Retired Dev


Joined: 28 Apr 2002
Posts: 2774

PostPosted: Tue Mar 20, 2007 12:29 pm    Post subject: Reply with quote

Did you enable the "joystick" USE flag?
_________________
Gentoo PPC FAQ: http://www.gentoo.org/doc/en/gentoo-ppc-faq.xml
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Tue Mar 20, 2007 12:42 pm    Post subject: Reply with quote

I just stumbled upon rejoystick - might come in handy for apps that are reluctant to work with a joystick :?:
Back to top
View user's profile Send private message
Steven4123
n00b
n00b


Joined: 06 Mar 2007
Posts: 19

PostPosted: Tue Mar 20, 2007 6:14 pm    Post subject: Reply with quote

JoseJX wrote:
Did you enable the "joystick" USE flag?
Not sure how would I do that?

PaulBredbury wrote:
I just stumbled upon rejoystick - might come in handy for apps that are reluctant to work with a joystick :?:
Cool ill try this. And thanks again both of you guys for helping me =)
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Tue Mar 20, 2007 6:45 pm    Post subject: Reply with quote

Here's an ebuild for rejoystick, for someone to test.

/usr/local/portage/games-util/rejoystick/rejoystick-0.2.ebuild

Code:
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

inherit eutils autotools games

DESCRIPTION="Translates keypresses on a joystick/gamepad/joypad into keypresses on a keyboard"
HOMEPAGE="http://rejoystick.sourceforge.net/"
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86"
IUSE=""

DEPEND="x11-libs/libX11
   x11-libs/libXtst"

src_compile() {
   eautoreconf || die

   econf || die
   emake || die
}

src_install() {
   dogamesbin ${PN} || die
   doman ${PN}.1 || die

   # Capital T, as shown at http://rejoystick.sourceforge.net/
   make_desktop_entry ${PN} "RejoysTick"

   dodoc README

   prepgamesdirs
}
Back to top
View user's profile Send private message
JoseJX
Retired Dev
Retired Dev


Joined: 28 Apr 2002
Posts: 2774

PostPosted: Tue Mar 20, 2007 7:26 pm    Post subject: Reply with quote

Steven4123:

emerge xmame -pv

What is the output of that? I would recommend reading the handbook about portage (available here) for more information on USE flags.
_________________
Gentoo PPC FAQ: http://www.gentoo.org/doc/en/gentoo-ppc-faq.xml
Back to top
View user's profile Send private message
Steven4123
n00b
n00b


Joined: 06 Mar 2007
Posts: 19

PostPosted: Sat Mar 24, 2007 2:39 pm    Post subject: Reply with quote

JoseJX wrote:
Steven4123:

emerge xmame -pv

What is the output of that? I would recommend reading the handbook about portage (available here) for more information on USE flags.

The output of that is:

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild R ] games-emulation/xmame-0.106 USE="X alsa esd opengl sdl xv -arts -dga -expat -ggi -joystick -lirc (-mmx) -net (-svga) -xinerama" 0 kB

Total: 1 package (1 reinstall), Size of downloads: 0 kB

So should I re install xmame using USE="joystick" emerge xmame?
Back to top
View user's profile Send private message
JoseJX
Retired Dev
Retired Dev


Joined: 28 Apr 2002
Posts: 2774

PostPosted: Sat Mar 24, 2007 5:14 pm    Post subject: Reply with quote

Yes, xmame is built without joystick support if the useflag is disabled. You probably want to globally enable that use flag and then use something like "emerge world -Duv --newuse" to make sure all of the packages that have a joystick use flag are rebuilt.
_________________
Gentoo PPC FAQ: http://www.gentoo.org/doc/en/gentoo-ppc-faq.xml
Back to top
View user's profile Send private message
Steven4123
n00b
n00b


Joined: 06 Mar 2007
Posts: 19

PostPosted: Sat Mar 24, 2007 7:02 pm    Post subject: Reply with quote

JoseJX wrote:
Yes, xmame is built without joystick support if the useflag is disabled. You probably want to globally enable that use flag and then use something like "emerge world -Duv --newuse" to make sure all of the packages that have a joystick use flag are rebuilt.
O k will try this hopefully this will work or im gonna be forced to give up =/
Back to top
View user's profile Send private message
Steven4123
n00b
n00b


Joined: 06 Mar 2007
Posts: 19

PostPosted: Mon May 07, 2007 10:18 pm    Post subject: Reply with quote

After months later I finally got this to work thanks for the help again.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum