Click to See Complete Forum and Search --> : Joypad modes


TheCatMan
05-27-2004, 04:26 AM
I have a Logic3 JT277 Trident pad, it's a 9-button pad with four different modes, that came with proprietary drivers for certain legacy OSes. The analog kernel module lets me use most of its functionality, but I'd be interested to know of a specific driver for it if there are any out there. However that's not why I'm posting.

When the machine's first switched on the pad defaults to "CH" mode. If I wait until the machine's booted then change to digital mode I find the fire buttons work but the directions move about randomly and don't respond to what I'm doing. jstest tells me /dev/js0 doesen't exist.

If I switch to digital mode before booting, or reload the analog module with it in that mode, it works fine and jstest /dev/js0 works.

Same thing applies if I load all the joypad modules (joydev, ns558, analog) using modprobe - it only works if the joystick's in the right mode when analog loads. Once the module's loaded I can use the pad in all 4 modes.

I've used the same pad under Mandrake 8.2 and didn't have this problem, is there a way to force Mandrake 9.2 to load the modules correctly?

Here's the releveant portion of my /etc/modules:

joydev
ns558
analog

and /etc/modules.conf:

alias char-major-13 input
above input joydev ns558 analog
options analog js=gameport

mdwatts
05-27-2004, 12:55 PM
Originally posted by TheCatMan

joydev
ns558
analog


So you are looking to have those three modules load on boot instead of having to manually load yourself?

You could add to one of your startup scripts in (SuSE) /etc/init.d such as /etc/init.d/boot.local (some distros use rc.local or rc.modules).

I had my sensor modules loading through /etc/init.d/boot.local, but have since moved the loading to (again on SuSE) /etc/sysconfig/kernel

MODULES_LOADED_ON_BOOT=" cdrom ide-cd ide-scsi i2c-amd756 w83781d"

TheCatMan
05-28-2004, 02:55 AM
Sorry I didn't explain myself too well. The modules are already loading on boot, but the last one doesn't work properly if the joypad is in the wrong mode when they load. If I quickly pick it up and change its mode before the modules load then it works fine. I suspect the analog module is trying to detect the type of pad and getting it wrong, so I'm looking for a way to suppress/override that behaviour.

dmesg tells me this:

viaudio: board(VT3074) #1 at 0xE400, IRQ 5
analog.c: Bad config for port 0 - "gameport"
input0: Analog 4-axis 4-button joystick at gameport0.0 [TSC timer, 1803 MHz cloc
k, 1045 ns res]
gameport0: NS558 ISA at 0x201 speed 994 kHz


I'm googling for documentation but not had much, er, joy so far.

TheCatMan
05-28-2004, 04:15 AM
Ok it works now - I had to specify the right pad type in /etc/modules.conf with options analog js=chf

The answer was buried in /lib/modules/[kernel_version]/build/Documentation/input/joystick.txt but I somehow managed to miss it the first two times :p

mdwatts
05-28-2004, 11:15 AM
Originally posted by TheCatMan
Ok it works now - I had to specify the right pad type in /etc/modules.conf with options analog js=chf

The answer was buried in /lib/modules/[kernel_version]/build/Documentation/input/joystick.txt but I somehow managed to miss it the first two times :p

:)

You beat me to it as I had just reviewed joystick.txt in my kernel source and was about to post the same.

Glad to see you already found the solution.

There's a wealth of useful information in the kernel source documentation (/usr/src/linux/Documentation) that all should take a bit of time to familiarize themselves with.