msteinbeck / hid-retrobit

Linux driver for the retro-bit controller adapter USB cable
GNU General Public License v3.0
21 stars 5 forks source link

hid-retrobit doesn't recognise all fire buttons #1

Open joonapalaste opened 9 years ago

joonapalaste commented 9 years ago

I built and installed hid-retrobit. I have a classic Quickshot II Turbo joystick connected to my Fedora 20 PC via a USB adapter. When I play a game on my emulated A4000 with FS-UAE, only the top fire button is recognised, the trigger fire button does nothing. Moving the auto-fire switch to "Auto Fire" does nothing. Moving it to "CPC 464" fires a single shot. I don't know what "CPC 464" was originally supposed to do, but a real A4000 recognised both fire buttons, and the "Auto Fire" position fired continuously.

msteinbeck commented 9 years ago

Did you test your device with:

jstest /dev/input/js0 # or another js*

Does is recognize the fire button? If not, is your device bounded by hid-retrobit? Could you post the vendor and product id of your device? You get it with:

lsbusb
joonapalaste commented 9 years ago

On Sun, 2015-01-18 at 14:13 -0800, Marcel wrote:

Did you test your device with:

jstest /dev/input/js0 # or another js* Does is recognize the fire button? If not, is your device bounded by hid-retrobit? Could you post the vendor and product id of your device? You get it with:

lsbusb

Here is the output of jstest /dev/input/js1:

Driver version is 2.1.0. Joystick (INNEX ATARI Controller USB) has 2 axes (X, Y) and 1 buttons (Trigger). Testing ... (interrupt to exit) Axes: 0: 0 1: 0 Buttons: 0:off

jstest also fails to recognise the trigger fire button, but recognises the top fire button all OK. The "Auto Fire" position does nothing. The "CPC 464" position makes "Buttons: 0:" say "on" constantly. I think that's the problem why it only fires a single shot - most games expect a continuous pattern of "fire" - "no fire".

lsusb prints out:

Bus 003 Device 002: ID 1292:4154 Innomedia

That's it, just "Innomedia". No other description. To find out this even was the joystick device, I had to unplug the cable and run lsusb again, and see what was missing from the output.

Joona Palaste

msteinbeck commented 9 years ago

Did you install the file 99-hid-retrobit.rules into /etc/udev/rules.d? When device is plugged in what displays:

ls /sys/bus/hid/drivers/hid-retrobit

Does it contain a file with 1292:4154 in its name? If not does the following so?:

ls /sys/bus/hid/drivers/hid-generic
joonapalaste commented 9 years ago

On Mon, 2015-01-19 at 10:10 -0800, Marcel wrote:

Did you install the file 99-hid-retrobit.rules into /etc/udev/rules.d? When device is plugged in what displays:

I think I did, but "ls /etc/udev/rules.d" doesn't display such a file.

ls /sys/bus/hid/drivers/hid-retrobit Does it contain a file with 1292:4154 in its name? If not does the following so?:

ls /sys/bus/hid/drivers/hid-generic

Yes, ls /sys/bus/hid/drivers/hid-retrobit lists a file called "0003:1292:4154.0008". It's a link to the directory "/sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.2/1-1.2:1.0/0003:1292:4154.0008".

Joona Palaste

msteinbeck commented 9 years ago

I think I did, but "ls /etc/udev/rules.d" doesn't display such a file

Maybe you installed it into /lib/udev/rules.d

Yes, ls /sys/bus/hid/drivers/hid-retrobit lists a file called "0003:1292:4154.0008". It's a link to the directory "/sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.2/1-1.2:1.0/0003:1292:4154.0008".

Ok, hid-retrobit should have bound the device.. to be clear, can you use all directions with your device?

joonapalaste commented 9 years ago

On Mon, 2015-01-19 at 11:54 -0800, Marcel wrote:

    I think I did, but "ls /etc/udev/rules.d" doesn't display such
    a file

Maybe you installed it into /lib/udev/rules.d

Yes.

    Yes, ls /sys/bus/hid/drivers/hid-retrobit lists a file called
    "0003:1292:4154.0008". It's a link to the directory
    "/sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.2/1-1.2:1.0/0003:1292:4154.0008".

Ok, hid-retrobit should have bound the device.. to be clear, can you use all directions with your device?

Yes. Left, right, up, down, all work. It's just the trigger fire button and the auto-fire that don't. I can play games all OK using the top fire button to fire, but it would be more intuitive to use the trigger fire button.

I think this problem could be solved by taking the joystick apart and swapping the cables between the two fire buttons, but I'd really rather not do it. I couldn't solder anything for toffee, not to save my life.

Joona Palaste

msteinbeck commented 9 years ago

I think this problem could be solved by taking the joystick apart and swapping the cables between the two fire buttons,

Maybe a hack within the driver is applicable, or maybe you can configure the joystick within your game? A final solution should of course fix this problem in general. But as I dont have such a joystick its not easy to fix this.

joonapalaste commented 9 years ago

On Mon, 2015-01-19 at 12:13 -0800, Marcel wrote:

    I think this problem could be solved by taking the joystick
    apart and swapping the cables between the two fire buttons,

Maybe a hack within the driver is applicable, or maybe you can configure the joystick within your game? A final solution should of course fix this problem in general. But as I dont have such a joystick its not easy to fix this.

I don't know anything about hacking Linux drivers. I don't even know what driver it is using.

Configuring the joystick within my game isn't possible. It looks like the problem is at the operating system level. The emulated Amiga doesn't know the trigger fire button exists. And anyway, by far the most of Amiga games expect a single-button joystick only and don't even have an option to configure joystick buttons.

Joona Palaste