Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

multiple sticks on one USB node #1151

Closed
SDLBugzilla opened this issue Feb 10, 2021 · 0 comments
Closed

multiple sticks on one USB node #1151

SDLBugzilla opened this issue Feb 10, 2021 · 0 comments

Comments

@SDLBugzilla
Copy link
Collaborator

This bug report was migrated from our old Bugzilla tracker.

These attachments are available in the static archive:

Reported in version: don't know
Reported for operating system, platform: Linux, All

Comments on the original bug report:

On 2006-01-03 11:35:04 +0000, Ryan C. Gordon wrote:

Date: Mon, 21 Mar 2005 09:41:11 -0500
From: Chris Nelson chrisn1@bu.edu
To: "Ryan C. Gordon" icculus@clutteredmind.org
Subject: SDL Patch

Hey, Ryan.

I submitted the following patch about a year ago. It's just a simple
patch for the linux port, to make multiple joysticks each appear to SDL
as their own device, if they are on the same USB port (specifically,
these guys
http://www.consoleplus.co.uk/product_info.php?pName=super-joybox-5-quad-joypad-converter,

which allow 4 Playstation2 controllers to be accessed via a single USB
port). Without this patch, SDL pretty much drops the ball, and reports
that there are 4 joysticks available when less than that number are
plugged in.

My work built upon the work of another person with the same device. When
I submitted the patch to the list, he tested it, but it didn't work for
him, so the patch was never accepted. Maybe about 3 times in the past
year, I've tried to email the guy, to see if he couldn't run my new
version, complete with debug code to diagnose the problem he was having.
He never got back to me.

So, I'm attaching the patch. I wish I knew why it didn't work for him,
but I've been using it for the last year with no problems. Let me know
if you need any more information, or have any ideas as to how I could
test it. I'd like to see it in the tree, but I want to make sure it works.

-Chris

On 2006-01-03 11:36:02 +0000, Ryan C. Gordon wrote:

Created attachment 3
sdl multi stick one usb node patch

On 2006-01-03 11:37:00 +0000, Ryan C. Gordon wrote:

This one was just waiting for confirmation that it was a good patch...I'm inclined to apply it now and see if anyone yells.

--ryan.

On 2006-01-27 11:23:00 +0000, Ryan C. Gordon wrote:

Setting Sam as "QA Contact" on all bugs (even resolved ones) so he'll definitely be in the loop to any further discussion here about SDL.

--ryan.

On 2006-02-10 22:52:26 +0000, Andrew Fuller wrote:

(In reply to comment # 2)

This one was just waiting for confirmation that it was a good patch...I'm
inclined to apply it now and see if anyone yells.

--ryan.

I tested this with my 8866 (the two joystick version), and it's working for me... except that my system isn't reading the name for my adapter, so is falling back to the USB ID as the name. So I do need to change the two lines in the patch to have it take effect. But then it works great. I would love to see this patch merged into CVS.

-Andrew

On 2006-02-10 23:46:27 +0000, Sam Lantinga wrote:

I tested this with my 8866 (the two joystick version), and it's working for
me... except that my system isn't reading the name for my adapter, so is
falling back to the USB ID as the name. So I do need to change the two lines
in the patch to have it take effect. But then it works great. I would love to
see this patch merged into CVS.

Can you attach a diff relative to the patched source that shows what you need to change to make it work?

Thank!

On 2006-03-06 17:37:41 +0000, Andrew Fuller wrote:

(In reply to comment # 5)

I tested this with my 8866 (the two joystick version), and it's working for
me... except that my system isn't reading the name for my adapter, so is
falling back to the USB ID as the name. So I do need to change the two lines
in the patch to have it take effect. But then it works great. I would love to
see this patch merged into CVS.

Can you attach a diff relative to the patched source that shows what you need
to change to make it work?

Thank!

I've been working with this further, and this patch is not needed for the dual version of this adapter (MP-8866) any longer. A patch has been committed to the linux kernel (as of 2.6.16 post rc5) which retrieves all the inputs from this device, meaning we have access to the individual joysticks at a lower level than SDL -- where it belongs.

Essentially, this device falsely advertises that it has a single input. It's a two-line fix to tell the kernel to ignore what what is advertised and search for all inputs.

Perhaps the original author of this patch can see if HID_QUIRK_MULTI_INPUT also works for his quad version and SDL won't need to worry about it.

See here for the patch of the dual version:
http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=e65335ef187c9cbc50bbc56be0fe966b593beb49

On 2006-03-19 01:32:49 +0000, Sam Lantinga wrote:

I added this patch to CVS anyway, since it's a cleaner version of what was already implemented. Can you verify that it works correctly on older kernels, and doesn't break anything on newer kernels?

Thanks!

On 2006-03-19 12:35:41 +0000, wrote:

I've made a similar patch to BSD-specific USB driver, please review it too.

On 2006-03-19 12:37:20 +0000, wrote:

Created attachment 85
query report ID of HID device

On 2006-03-20 03:00:25 +0000, Sam Lantinga wrote:

(In reply to comment # 9)

Created an attachment (id=85) [edit]
query report ID of HID device

Looks good to me...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant