9front - general discussion about 9front
 help / color / mirror / Atom feed
* [9front] wtb: usb gamepad that works reliably with joy(1)
@ 2024-02-04 22:57 sl
  2024-02-05 18:58 ` mkf9
  2024-02-05 20:40 ` qwx
  0 siblings, 2 replies; 19+ messages in thread
From: sl @ 2024-02-04 22:57 UTC (permalink / raw)
  To: 9front

logitech dual action and ps3 controller have acted sketchy, frequently
babbling and crashing the whole pipeline.  sucks.

what controllers have you used, and which ones work best?

sl

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [9front] wtb: usb gamepad that works reliably with joy(1)
  2024-02-04 22:57 [9front] wtb: usb gamepad that works reliably with joy(1) sl
@ 2024-02-05 18:58 ` mkf9
  2024-02-05 20:40 ` qwx
  1 sibling, 0 replies; 19+ messages in thread
From: mkf9 @ 2024-02-05 18:58 UTC (permalink / raw)
  To: 9front

I had a cheapo brandless chinese controller. it worked well,
but it doesn't have a analog.

sl@stanleylieber.com wrote:
> logitech dual action and ps3 controller have acted sketchy, frequently
> babbling and crashing the whole pipeline.  sucks.
> 
> what controllers have you used, and which ones work best?
> 
> sl
> 


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [9front] wtb: usb gamepad that works reliably with joy(1)
  2024-02-04 22:57 [9front] wtb: usb gamepad that works reliably with joy(1) sl
  2024-02-05 18:58 ` mkf9
@ 2024-02-05 20:40 ` qwx
  2024-02-05 20:49   ` Kurt H Maier
  2024-02-10  4:15   ` sl
  1 sibling, 2 replies; 19+ messages in thread
From: qwx @ 2024-02-05 20:40 UTC (permalink / raw)
  To: 9front

On Sun Feb  4 23:57:05 +0100 2024, sl@stanleylieber.com wrote:
> logitech dual action and ps3 controller have acted sketchy, frequently
> babbling and crashing the whole pipeline.  sucks.
> 
> what controllers have you used, and which ones work best?
> 
> sl

So far only the most basic snes-style usb controllers I have have
worked consistently well.  I have a "Buffalo classic usb gamepad"
which works, including the turbo function, and I assembled this board
[1] except put snes and nes controller ports on it so i can just plug
in a real one and not destroy it.  These all probably use more or less
the same chips and will just work.  ps2 dualshock also works perfectly
(incl. analog mode) but with only one of two usb adaptors I have, the
other one mangles button events making it unusable.  The usb
controller of THEC64 [2] also surprisingly works fine.

I've tried xbox360, multiple nintendo switch usb controllers, 8bitdo
sn30pro, and get nothing; these would require more driver work.
There's a program for first gen xbox controllers in mischief's contrib
which iirc he got working.

For joy(1) et al I have convenience scripts which handle autoresizing
the window, enabling sound if possible, storing per-user saves etc.,
as others probably do too, but these are even more elements in the
pipeline, what exactly do you see happening?  Perhaps we could try to
make it more resilient.

Cheers,
qwx

[1] https://www.instructables.com/USB-SNES-Controller/
[2] https://retrogames.biz/products/thec64/

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [9front] wtb: usb gamepad that works reliably with joy(1)
  2024-02-05 20:40 ` qwx
@ 2024-02-05 20:49   ` Kurt H Maier
  2024-02-05 21:05     ` qwx
  2024-02-10  4:15   ` sl
  1 sibling, 1 reply; 19+ messages in thread
From: Kurt H Maier @ 2024-02-05 20:49 UTC (permalink / raw)
  To: 9front

On Mon, Feb 05, 2024 at 09:40:17PM +0100, qwx@sciops.net wrote:
> I've tried xbox360, multiple nintendo switch usb controllers, 8bitdo
> sn30pro, and get nothing; these would require more driver work.

SN30 Pro has four different modes; have you tested them all?  If not, I
will... it boots into different protocols depending on which ABXY button
you hold during poweron.  

khm

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [9front] wtb: usb gamepad that works reliably with joy(1)
  2024-02-05 20:49   ` Kurt H Maier
@ 2024-02-05 21:05     ` qwx
  0 siblings, 0 replies; 19+ messages in thread
From: qwx @ 2024-02-05 21:05 UTC (permalink / raw)
  To: 9front

On Mon Feb  5 21:49:45 +0100 2024, khm@sciops.net wrote:
> On Mon, Feb 05, 2024 at 09:40:17PM +0100, qwx@sciops.net wrote:
> > I've tried xbox360, multiple nintendo switch usb controllers, 8bitdo
> > sn30pro, and get nothing; these would require more driver work.
> 
> SN30 Pro has four different modes; have you tested them all?  If not, I
> will... it boots into different protocols depending on which ABXY button
> you hold during poweron.  
> 
> khm

I did, but please try as well when you can, it's a bit finnicky with mine.

qwx

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [9front] wtb: usb gamepad that works reliably with joy(1)
  2024-02-05 20:40 ` qwx
  2024-02-05 20:49   ` Kurt H Maier
@ 2024-02-10  4:15   ` sl
  2024-02-10  5:19     ` qwx
  1 sibling, 1 reply; 19+ messages in thread
From: sl @ 2024-02-10  4:15 UTC (permalink / raw)
  To: 9front

> So far only the most basic snes-style usb controllers I have have
> worked consistently well.  I have a "Buffalo classic usb gamepad"
> which works, including the turbo function

thanks, i'll try to get one of these.  for now i just wanna play some
games using a gamepad.  i have been through a pile of different
controllers
and none of them work reliably.


> what exactly do you see happening?  Perhaps we could try to
> make it more resilient.

here are some recent failures:

	; nusb/joy /dev/usb/ep10.0 | joy 1 | games/snes -a -x 3 $game

- logitech dual action: no suitable endpoint found
- ps3: window goes black, emulator never errors or finishes launching
- rii sens retro usb: system immediately detects and configures it as
a mouse

sl

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [9front] wtb: usb gamepad that works reliably with joy(1)
  2024-02-10  4:15   ` sl
@ 2024-02-10  5:19     ` qwx
  2024-02-10  5:24       ` Stanley Lieber
  2024-02-16 16:43       ` sl
  0 siblings, 2 replies; 19+ messages in thread
From: qwx @ 2024-02-10  5:19 UTC (permalink / raw)
  To: 9front

On Sat Feb 10 05:16:59 +0100 2024, sl@stanleylieber.com wrote:
> > So far only the most basic snes-style usb controllers I have have
> > worked consistently well.  I have a "Buffalo classic usb gamepad"
> > which works, including the turbo function
> 
> thanks, i'll try to get one of these.  for now i just wanna play some
> games using a gamepad.  i have been through a pile of different
> controllers
> and none of them work reliably.

ps2 dualshock also works nicely with this one adaptor, I could try to
find out exactly what it is.  I can confirm that the 8bitdo doesn't
work though.


> here are some recent failures:
> 
> 	; nusb/joy /dev/usb/ep10.0 | joy 1 | games/snes -a -x 3 $game
> 
> - logitech dual action: no suitable endpoint found
> - ps3: window goes black, emulator never errors or finishes launching
> - rii sens retro usb: system immediately detects and configures it as
> a mouse

Yeah, iirc I've seen all of these, and they'd all probably require a
bit of work to fix.  Not sure about the second one, and the third
occurs also in one of the modes of the 8bitdo which I couldn't
override.  Also not sure about how to handle this better, but the
whole joystick stack could perhaps be redesigned to make it a bit
easier to work with.

Cheers,
qwx

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [9front] wtb: usb gamepad that works reliably with joy(1)
  2024-02-10  5:19     ` qwx
@ 2024-02-10  5:24       ` Stanley Lieber
  2024-02-10  6:12         ` qwx
  2024-02-16 16:43       ` sl
  1 sibling, 1 reply; 19+ messages in thread
From: Stanley Lieber @ 2024-02-10  5:24 UTC (permalink / raw)
  To: 9front

revisiting this primarily because i accidentally discovered the thinkpad x1 3rd gen is beefy enough that audio works flawlessly in all the emulators, which is the first time that's been true across all my previous laptops.  unfortunately, the reform stutters like the old timers.

sl

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [9front] wtb: usb gamepad that works reliably with joy(1)
  2024-02-10  5:24       ` Stanley Lieber
@ 2024-02-10  6:12         ` qwx
  0 siblings, 0 replies; 19+ messages in thread
From: qwx @ 2024-02-10  6:12 UTC (permalink / raw)
  To: 9front

On Sat Feb 10 06:25:00 +0100 2024, sl@stanleylieber.com wrote:
> revisiting this primarily because i accidentally discovered the thinkpad x1 3rd gen is beefy enough that audio works flawlessly in all the emulators, which is the first time that's been true across all my previous laptops.  unfortunately, the reform stutters like the old timers.
> 
> sl

Yeah unfortunately if emulation is slower than the expected framerate,
sound will cut up.  Might be possible to mitigate it slightly by
playing with the delay value in /dev/volume, but not sure that would
work in this case.

qwx

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [9front] wtb: usb gamepad that works reliably with joy(1)
  2024-02-10  5:19     ` qwx
  2024-02-10  5:24       ` Stanley Lieber
@ 2024-02-16 16:43       ` sl
  2024-02-16 16:46         ` sl
  2024-02-16 17:10         ` qwx
  1 sibling, 2 replies; 19+ messages in thread
From: sl @ 2024-02-16 16:43 UTC (permalink / raw)
  To: 9front

>> > So far only the most basic snes-style usb controllers I have have
>> > worked consistently well.  I have a "Buffalo classic usb gamepad"
>> > which works, including the turbo function
>>
>> thanks, i'll try to get one of these.  for now i just wanna play
some
>> games using a gamepad.  i have been through a pile of different
>> controllers
>> and none of them work reliably.

i got an ibuffalo class usb gamepad bsgp801 and 9front treats it as a
mouse.  when i try to use it with joy(1), i get the following error:

nusb/joy: getdev: device or object already in use:
'/dev/usb/ep8.0/data'

sl

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [9front] wtb: usb gamepad that works reliably with joy(1)
  2024-02-16 16:43       ` sl
@ 2024-02-16 16:46         ` sl
  2024-02-16 17:10         ` qwx
  1 sibling, 0 replies; 19+ messages in thread
From: sl @ 2024-02-16 16:46 UTC (permalink / raw)
  To: 9front

> i got an ibuffalo class usb gamepad bsgp801 and 9front treats it as a
> mouse.  when i try to use it with joy(1), i get the following error:
> 
> nusb/joy: getdev: device or object already in use:
> '/dev/usb/ep8.0/data'

if i boot with it plugged in, i see:

nusb/kb: /dev/usb/ep8.0: setproto: no report descriptor

sl

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [9front] wtb: usb gamepad that works reliably with joy(1)
  2024-02-16 16:43       ` sl
  2024-02-16 16:46         ` sl
@ 2024-02-16 17:10         ` qwx
  2024-02-16 17:34           ` sl
  2024-02-16 18:02           ` qwx
  1 sibling, 2 replies; 19+ messages in thread
From: qwx @ 2024-02-16 17:10 UTC (permalink / raw)
  To: 9front

On Fri Feb 16 17:44:28 +0100 2024, sl@stanleylieber.com wrote:
> i got an ibuffalo class usb gamepad bsgp801 and 9front treats it as a
> mouse.  when i try to use it with joy(1), i get the following error:
> 
> nusb/joy: getdev: device or object already in use:
> '/dev/usb/ep8.0/data'
> 
> sl

What happens if you kill nusb/kb?

; kill kb | rc

Does it release it or does another nusb/kb immediately start?
If it works fine before, it would be enough to force this in
nusbrc (requires recompiling the kernel), for example:


diff 957863b064ed01ebb1297ddd368ce5a78c957f5e uncommitted
--- a//sys/src/9/boot/nusbrc
+++ b//sys/src/9/boot/nusbrc
@@ -15,6 +15,10 @@
 		if(~ $#* 5 && ! test -e /env/nousbhname)
 			id=$1:$5
 		switch($2$3){
+		case 20110715
+			# avoid nusb/kb on mpk mini
+		case 17810a99 17810a96 05832060
+			# let nusb/joy take this one
 		case 0b957720 0b95772a 0db0a877 13b10018 15577720 20013c05 07d13c05 05ac1402
 			nusb/ether -t a88772 $etherargs $id
 		case 0b951780 14eaab11 17370039 0411006e 050d5055

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [9front] wtb: usb gamepad that works reliably with joy(1)
  2024-02-16 17:10         ` qwx
@ 2024-02-16 17:34           ` sl
  2024-02-16 18:01             ` qwx
  2024-02-16 18:02           ` qwx
  1 sibling, 1 reply; 19+ messages in thread
From: sl @ 2024-02-16 17:34 UTC (permalink / raw)
  To: 9front

>> i got an ibuffalo class usb gamepad bsgp801 and 9front treats it as
a
>> mouse.  when i try to use it with joy(1), i get the following
error:
>>
>> nusb/joy: getdev: device or object already in use:
>> '/dev/usb/ep8.0/data'
>>
>> sl
>
> What happens if you kill nusb/kb?

if i kill kb no new ones are started.  my joy pipeline starts the
emulator without complaint, but pushing the buttons on the ibuffalo
has no effect inside the emulator.

i tried this same method with the rii gp100 and get similar results,
except that *two* of its buttons (not all of them) actually do things
inside the emulators.

thanks,

sl

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [9front] wtb: usb gamepad that works reliably with joy(1)
  2024-02-16 17:34           ` sl
@ 2024-02-16 18:01             ` qwx
  2024-02-16 23:40               ` sl
  0 siblings, 1 reply; 19+ messages in thread
From: qwx @ 2024-02-16 18:01 UTC (permalink / raw)
  To: 9front

On Fri Feb 16 18:35:05 +0100 2024, sl@stanleylieber.com wrote:
> if i kill kb no new ones are started.  my joy pipeline starts the
> emulator without complaint, but pushing the buttons on the ibuffalo
> has no effect inside the emulator.

Good; now try just nusb/joy [endpoint] (iirc):

; nusb/joy 8

This should print keys in plaintext when you push the buttons.  If all
buttons print keys and all directional pads print axis, then you
probably just need to remap the keys in /bin/joy, they are hardcoded
and different for every joystick I've tried.  Then try an emulator
which uses a bunch of the keys, or ideally a test rom (I have some
snes test rom here, it shows button/axis events).

Cheers,
qwx

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [9front] wtb: usb gamepad that works reliably with joy(1)
  2024-02-16 17:10         ` qwx
  2024-02-16 17:34           ` sl
@ 2024-02-16 18:02           ` qwx
  1 sibling, 0 replies; 19+ messages in thread
From: qwx @ 2024-02-16 18:02 UTC (permalink / raw)
  To: 9front

On Fri Feb 16 18:11:57 +0100 2024, qwx@sciops.net wrote:
> Does it release it or does another nusb/kb immediately start?
> If it works fine before, it would be enough to force this in
> nusbrc (requires recompiling the kernel), for example:

This should read "If it works fine *after*", sorry about that;
this is the case in your test.

qwx

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [9front] wtb: usb gamepad that works reliably with joy(1)
  2024-02-16 18:01             ` qwx
@ 2024-02-16 23:40               ` sl
  2024-02-17  0:55                 ` qwx
  0 siblings, 1 reply; 19+ messages in thread
From: sl @ 2024-02-16 23:40 UTC (permalink / raw)
  To: 9front

>> if i kill kb no new ones are started.  my joy pipeline starts the
>> emulator without complaint, but pushing the buttons on the ibuffalo
>> has no effect inside the emulator.
> 
> Good; now try just nusb/joy [endpoint] (iirc):
> 
> ; nusb/joy 8
> 
> This should print keys in plaintext when you push the buttons.  If all
> buttons print keys and all directional pads print axis, then you
> probably just need to remap the keys in /bin/joy, they are hardcoded
> and different for every joystick I've tried.  Then try an emulator
> which uses a bunch of the keys, or ideally a test rom (I have some
> snes test rom here, it shows button/axis events).

all right!

editing the joy script to match my controller worked for the rii gp100:

http://plan9.stanleylieber.com/rc/joy.gp100

thanks for the assistance.

sl

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [9front] wtb: usb gamepad that works reliably with joy(1)
  2024-02-16 23:40               ` sl
@ 2024-02-17  0:55                 ` qwx
  2024-02-17  1:33                   ` sl
  0 siblings, 1 reply; 19+ messages in thread
From: qwx @ 2024-02-17  0:55 UTC (permalink / raw)
  To: 9front

On Sat Feb 17 00:40:34 +0100 2024, sl@stanleylieber.com wrote:
> all right!
> 
> editing the joy script to match my controller worked for the rii gp100:
> 
> http://plan9.stanleylieber.com/rc/joy.gp100
> 
> thanks for the assistance.
> 
> sl

Nice :) It's a long winded and obscure process, I don't really know
how to improve it yet.

Cheers,
qwx

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [9front] wtb: usb gamepad that works reliably with joy(1)
  2024-02-17  0:55                 ` qwx
@ 2024-02-17  1:33                   ` sl
  2024-02-17  2:37                     ` Sigrid Solveig Haflínudóttir
  0 siblings, 1 reply; 19+ messages in thread
From: sl @ 2024-02-17  1:33 UTC (permalink / raw)
  To: 9front

> Nice :) It's a long winded and obscure process, I don't really know
> how to improve it yet.

the design of joy(1) is nice. the rc scripts could just be considered
configuration files for all the myriad weird controllers out there.

fwiw, even retroarch barfs on some of the controllers i've tried,
or otherwise devolves to bizarre key mappings.

sl

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [9front] wtb: usb gamepad that works reliably with joy(1)
  2024-02-17  1:33                   ` sl
@ 2024-02-17  2:37                     ` Sigrid Solveig Haflínudóttir
  0 siblings, 0 replies; 19+ messages in thread
From: Sigrid Solveig Haflínudóttir @ 2024-02-17  2:37 UTC (permalink / raw)
  To: 9front

https://github.com/mdqinc/SDL_GameControllerDB

maybe that could be reused in some way. it's just one text file there.

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2024-02-17  2:39 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-04 22:57 [9front] wtb: usb gamepad that works reliably with joy(1) sl
2024-02-05 18:58 ` mkf9
2024-02-05 20:40 ` qwx
2024-02-05 20:49   ` Kurt H Maier
2024-02-05 21:05     ` qwx
2024-02-10  4:15   ` sl
2024-02-10  5:19     ` qwx
2024-02-10  5:24       ` Stanley Lieber
2024-02-10  6:12         ` qwx
2024-02-16 16:43       ` sl
2024-02-16 16:46         ` sl
2024-02-16 17:10         ` qwx
2024-02-16 17:34           ` sl
2024-02-16 18:01             ` qwx
2024-02-16 23:40               ` sl
2024-02-17  0:55                 ` qwx
2024-02-17  1:33                   ` sl
2024-02-17  2:37                     ` Sigrid Solveig Haflínudóttir
2024-02-16 18:02           ` qwx

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).