All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ethan Lee <flibitijibibo@gmail.com>
To: "Bastien Nocera" <hadess@hadess.net>,
	"François-Xavier Carton" <fx.carton91@gmail.com>,
	linux-input@vger.kernel.org
Subject: Re: [PATCH 1/3] HID: gamecube-adapter: add nintendo gamecube adapter
Date: Mon, 11 May 2020 10:09:28 -0400	[thread overview]
Message-ID: <0e4f2671-00e8-b5d3-f309-8355bc92f118@gmail.com> (raw)
In-Reply-To: <21978190912689256db8cc547a25313559e94019.camel@hadess.net>

Looks just like the SDL hidapi driver so this should be okay! The only 
thing I'm unsure of is the axis inversion, in SDL we read the axes 
directly and invert them in the SDL_GameController configuration. 
Someone also added a bunch of dead zone work after I wrote the driver, 
but unfortunately I don't know the details of that.

The meat of our driver is here...

https://hg.libsdl.org/SDL/file/4298bf108b06/src/joystick/hidapi/SDL_hidapi_gamecube.c#l226

... and the SDL_GameController config is here:

https://hg.libsdl.org/SDL/file/4298bf108b06/src/joystick/SDL_gamecontrollerdb.h#l614

The '~' char denotes an input value that is flipped after it is read 
from the joystick; the vendor/product/version matchup may cause this 
config to accidentally flip the axes twice when using the kernel driver.

-Ethan

On 5/10/20 08:45, Bastien Nocera wrote:
> On Wed, 2020-05-06 at 02:47 +0200, François-Xavier Carton wrote:
>> The hid-gamecube-adapter driver supports Nintendo Gamecube Controller
>> Adapters.  They are USB devices on which up to four Nintendo Gamecube
>> Controllers can be plugged. The driver create independent input
>> devices
>> as controllers are connected.
> I think Ethan might be interested in testing this, as he's been using a
> user-space version of that in the past:
> https://patchwork.kernel.org/patch/11530107/
>


  reply	other threads:[~2020-05-11 14:09 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-06  0:47 [PATCH 1/3] HID: gamecube-adapter: add nintendo gamecube adapter François-Xavier Carton
2020-05-06  0:48 ` [PATCH 2/3] HID: gamecube-adapter: add rumble support François-Xavier Carton
2020-05-06  0:48 ` [PATCH 3/3] HID: gamecube-adapter: make axis limits parameters François-Xavier Carton
2020-05-09 23:50 ` [PATCH 1/3] HID: gamecube-adapter: add nintendo gamecube adapter François-Xavier Carton
2020-05-10 12:45 ` Bastien Nocera
2020-05-11 14:09   ` Ethan Lee [this message]
2020-05-11 23:23     ` François-Xavier Carton
2020-05-12  0:22       ` Ethan Lee
2020-05-12  2:27         ` François-Xavier Carton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0e4f2671-00e8-b5d3-f309-8355bc92f118@gmail.com \
    --to=flibitijibibo@gmail.com \
    --cc=fx.carton91@gmail.com \
    --cc=hadess@hadess.net \
    --cc=linux-input@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.