[TAG] DirectPad Joystick
peter.knaggs at gmail.com
Wed Nov 9 06:04:14 MSK 2005
On 11/8/05, Triyan W. Nugroho <triyan at afaqtel.com> wrote:
> Yes. But the documentation in the Linux kernel says that the kernel has
> support for DirectPad joysticks, using gamecon module.
Yes, "gamecon" is likely the right module to use.
> So I think I don't
> have to compile the package provided in the abovementioned pages..
True. Still, they're useful in that they combine
the userland tools and the kernel drivers all in
one place with some guides and FAQ and other such.
It gives a good starting point, and from there you
can work on the specific issues of the 2.6 kernel,
once you know how to get the device to work correctly
in a plain 2.4 kernel.
> And I'm still confused, because the package in these pages use different
Yes, well filenames change over time, code hardly
changes all that much.
> For example, Linux kernel uses joydev.c, but in these pages it is
> joystick.c. And for DirectPad joysticks, Linux kernel uses gamecon.c, while
> in these pages it is joy-console.c.
Those would have been the names during
the 2.4 series kernel.
> > What did you try, and how did it fail,
> > specifically?
> cd /dev
> rm js*
> mkdir input
> mknod input/js0 c 13 0
> mknod input/js1 c 13 1
> mknod input/js2 c 13 2
> mknod input/js3 c 13 3
> ln -s input/js0 js0
> ln -s input/js1 js1
> ln -s input/js2 js2
> ln -s input/js3 js3
Well, those entries would be created by udev
if you were using a 2.6.12 or later kernel,
once the module was loaded correctly.
It seems, though, that the module "gamecon" isn't
loading for some reason. Perhaps because it isn't
finding the parallel port device? Or because the
parallel port is being used by another module
(have you checked that "lp" module isn't loaded)?
Are you sure the parallel port is enabled in the
BIOS? Do you happen to have a parallel port printer
and test that printing works OK, or some other way
to know if the parallel port is actually enabled?
You mentioned the joystick worked in Microsoft but
it wasn't clear if it was on the same machine.
> But every reboot, my js* is always gone :( How can I fix it?
Not sure about that, could be many reasons.
It's no harm to create the devices manually,
but unless the module is loaded successfully
they will just give ENODEV when you try to use them.
> root at devel:/home/i2c# modprobe joydev
> root at devel:/home/i2c# modprobe gamecon
> FATAL: Error inserting gamecon
> (/lib/modules/2.6.8-2-386/kernel/drivers/input/joystick/gamecon.ko): No such
Have a look in "dmesg" to see if there's any
Also, can you see anything mentioning "parport"
in your boot messages, if so can you send it,
parport: PnPBIOS parport detected.
parport0: PC-style at 0x378 (0x778), irq 7, using FIFO
That would tell you the IRQ line to look for in
/proc/interrupts corresponding to the parallel port.
> I've tested on 2.4 and 2.6 series, but no difference...
Hmm, so it looks like more debugging will be needed.
Have a look in the sources, you can add in some
printk(KERN_INFO along the path from module_init(gc_init);
so add in some tracing of gc_init and see why
the gc_probe function isn't happy. You should see
your debug additions come out in "dmesg" when
you modprobe gamecon and you can keep adding
more debug tracing and doing rmmod gamecon and
modprobe gamecon to try again. Be careful though
with your code, as you're likely to crash your
kernel sometimes doing this sort of thing.
> My sound card (Intel i810 onboard) doesn't work on 2.4, so I have to use the
> 2.6 series :(
Well, it is still worthwhile to learn how (or even
if) the device will work with the 2.4 kernel driver,
even if you can't listen to music while you're
doing the investigation :)
But sounds like it doesn't work in 2.4 as you say,
so easiest to debug what's going on using 2.6 for
More information about the TAG