Joystick testing thread

https://github.com/MiSTer-devel/Main_MiSTer/wiki

Moderators: Mug UK, Zorro 2, spiny, Greenious, Sorgelig, Moderator Team

Locutus73
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 146
Joined: Wed Feb 07, 2018 6:13 pm

Re: Joystick testing thread

Postby Locutus73 » Mon Mar 19, 2018 12:54 pm

Newsdee wrote:Log for the Xbox One controller.

Code: Select all

Right = Axis 16, offset 1
Left = Axis 16, offset -1
Up = Axis 17, offset -1
Down = Axis 17, offset 1
A: code=304(0x130)
B: code=305(0x131)
X: code=307(0x133)
Y: code=308(0x134)
Start (button with three horizontal lines): code=315(0x13b)
Select (button with two rectangles): code=314(0x13a)
Xbox button: code=316(0x13c)
L: code=310(0x136)
R: code=311(0x137)
L2: Axis 2  (analogue button, 0 to 1024 range]
R2: Axis 5 (analogue button, o to 1024 range]
Left Stick: Axis 0 and 1  [-32000 to 32000 range]
Right Stick: Axis 3 and 4 [-32000 to 32000 range]
L3 (left stick button): code=317
R3 (left stick button): code=318

Excellent, it seems to have the same exact event/axis mapping/range we observed with xinput joypad so far.

Locutus73

PhantombrainM
Atari freak
Atari freak
Posts: 62
Joined: Fri Mar 16, 2018 9:10 am

Re: Joystick testing thread

Postby PhantombrainM » Thu Mar 22, 2018 5:56 pm

Thank you Locutus73,

with your upload and replacing zImage_dtb I'm now able to use my wired xbox one controller as well as my wireless microsoft receiver with two xbox360 controllers! :D Before the whole USB chain froze!

regards,
PhantombrainM
Two beer or not two beer? - Shakesbeer.

Locutus73
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 146
Joined: Wed Feb 07, 2018 6:13 pm

Re: Joystick testing thread

Postby Locutus73 » Thu Mar 22, 2018 9:57 pm

PhantombrainM wrote:Thank you Locutus73,

with your upload and replacing zImage_dtb I'm now able to use my wired xbox one controller as well as my wireless microsoft receiver with two xbox360 controllers! :D Before the whole USB chain froze!

regards,
PhantombrainM


Sorgelig published the same patched kernel at least 7 bours before me :roll:
Anyway, full xinput support is a cool feature. I’m wondering if it’s possible to easily check device ID searching for “IG_” (as suggested by Microsoft here https://msdn.microsoft.com/library/wind ... 17014.aspx ) instead of checking for VID and PID in order to extend 16bit analog range handling to all xinput devices.

Locutus73

JackZielke
Atariator
Atariator
Posts: 19
Joined: Sun Mar 25, 2018 8:11 am

Re: Joystick testing thread

Postby JackZielke » Sun Apr 01, 2018 12:00 am

I bought a couple of JITE CX-506 controllers.
https://www.tvc-mall.com/details/jite-cx-506-2-4g-wireless-usb-pc-controller-game-pad-joystick-dual-shock-for-sony-ps2-ps3-blue-skuhhc-2864b.html

Code: Select all

ID 2563:0523

dpad
up
Input event: type=EV_ABS, Axis=17, Offset:=-1

down
Input event: type=EV_ABS, Axis=17, Offset:=1

left
Input event: type=EV_ABS, Axis=16, Offset:=-1

right
Input event: type=EV_ABS, Axis=16, Offset:=1

1 triangle / up
Input event: type=EV_KEY, code=288(0x120), value=1

2 circle / right
Input event: type=EV_KEY, code=289(0x121), value=1

3 x / down
Input event: type=EV_KEY, code=290(0x122), value=1

4 square / left
Input event: type=EV_KEY, code=291(0x123), value=1

L1
Input event: type=EV_KEY, code=292(0x124), value=1

L2
Input event: type=EV_KEY, code=294(0x126), value=1

R1
Input event: type=EV_KEY, code=293(0x125), value=1

R2
Input event: type=EV_KEY, code=295(0x127), value=1

select
Input event: type=EV_KEY, code=296(0x128), value=1

start
Input event: type=EV_KEY, code=297(0x129), value=1

release sets to 0

left stick in digital

up
Input event: type=EV_ABS, Axis=1, Offset:=0

down
Input event: type=EV_ABS, Axis=1, Offset:=255

left
Input event: type=EV_ABS, Axis=0, Offset:=0

right
Input event: type=EV_ABS, Axis=0, Offset:=255

release sets to 128

right stick in digital

up
Input event: type=EV_KEY, code=288(0x120), value=1

down
Input event: type=EV_KEY, code=290(0x122), value=1

left
Input event: type=EV_KEY, code=291(0x123), value=1

right
Input event: type=EV_KEY, code=289(0x121), value=1

release sets to 0


left stick in analog

up
Input event: type=EV_ABS, Axis=1, Offset:=0

down
Input event: type=EV_ABS, Axis=1, Offset:=255

left
Input event: type=EV_ABS, Axis=0, Offset:=0

right
Input event: type=EV_ABS, Axis=0, Offset:=255

right stick in analog

up
Input event: type=EV_ABS, Axis=5, Offset:=0

down
Input event: type=EV_ABS, Axis=5, Offset:=255

left
Input event: type=EV_ABS, Axis=2, Offset:=0

right
Input event: type=EV_ABS, Axis=2, Offset:=255

release sets to 128

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2569
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Joystick testing thread

Postby Sorgelig » Sun Apr 01, 2018 12:10 am

JackZielke wrote:I bought a couple of JITE CX-506 controllers.

Looks pretty generic from the log. Just define the buttons in menu and you are set.

JackZielke
Atariator
Atariator
Posts: 19
Joined: Sun Mar 25, 2018 8:11 am

Re: Joystick testing thread

Postby JackZielke » Sun Apr 01, 2018 12:40 am

Perfect!

BlueLightning
Atariator
Atariator
Posts: 20
Joined: Mon Mar 05, 2018 7:57 pm

Re: Joystick testing thread

Postby BlueLightning » Mon Apr 02, 2018 9:08 pm

Xbox one runs fine with the correct file in the linux folder :-) . If someone had trouble with Xbox one Controller, than connect direct to USB without Keyboard or anything else and it works ;-) Need an aktiv USB-HUB with Power Supply, if you want to use a Keyboard too. I first connet the Keyboard for getting into the menu to define the Buttons and than unplugged the Keyboard an connected the Xbox one Controller. Works perfect. The passiv USB-Hub in my Keyboard doesn't work!

DirtyBernie
Atariator
Atariator
Posts: 18
Joined: Thu Mar 08, 2018 6:20 pm

Joystick does not work when Nes core runs a game

Postby DirtyBernie » Sat Apr 07, 2018 4:42 am

Hi,
I'm currently trying to play Super Mario Bros 3 with NES core, but i can't make the joystick working :

The joystick is recognized and i can configure it in both OSD menu and Nes core menu.
However while in game, trying to use D-pad or clicking on defined buttons does not work at all.
So basically, i'm standing on the screen where i have to choose player one.
Only keyboard is responsive (And let me operate in game).
Would anyone has an idea about why the joystick seems not to operate in game ?
Thanks ! :)

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2569
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Joystick does not work when Nes core runs a game

Postby Sorgelig » Sat Apr 07, 2018 12:15 pm

DirtyBernie wrote:Hi,
I'm currently trying to play Super Mario Bros 3 with NES core, but i can't make the joystick working :

The joystick is recognized and i can configure it in both OSD menu and Nes core menu.
However while in game, trying to use D-pad or clicking on defined buttons does not work at all.
So basically, i'm standing on the screen where i have to choose player one.
Only keyboard is responsive (And let me operate in game).
Would anyone has an idea about why the joystick seems not to operate in game ?
Thanks ! :)


Do not make a new thread if there already suitable topic exists.
As suggested in Facebook, use joystick swap option in OSD. Some NES games use second joystick for input.

DirtyBernie
Atariator
Atariator
Posts: 18
Joined: Thu Mar 08, 2018 6:20 pm

Re: Joystick does not work when Nes core runs a game

Postby DirtyBernie » Sat Apr 07, 2018 3:50 pm

Sorgelig wrote:Do not make a new thread if there already suitable topic exists.
As suggested in Facebook, use joystick swap option in OSD. Some NES games use second joystick for input.

Hi Sorgelid,
Sorry for that and thanks for having moved my questions to the joystick testing thread.
Yes, swapping the joypad works but dow not fully fix my issue.
my wired PC-xbox 360 joypad is not recognized in game, but works in an erratic way :
During ~1 minute it works as expected, but after that the left direction does not respond for a few seconds, then it works again, then stop working, and so on, same for the buttons.
I made the assumption (probably wrong) that if the joypad was recognized and configurable in the OSD and Nes core menu, that it would work fine.
Do i have, even in this case, to log to the console and gather the messages in order to further investigate the issue ?
Thanks.

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2569
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Joystick testing thread

Postby Sorgelig » Sat Apr 07, 2018 4:18 pm

Read this topic first. X360 gamepad has been discussed already.

DirtyBernie
Atariator
Atariator
Posts: 18
Joined: Thu Mar 08, 2018 6:20 pm

Re: Joystick testing thread

Postby DirtyBernie » Sat Apr 07, 2018 5:49 pm

Sorgelig wrote:Read this topic first. X360 gamepad has been discussed already.

So I real the entire topic, and (unless i'm blind) i did not see where the XBOX 360 (The wired PC version which comes with a USB adaptor - It looks like some kind of proprietary pseudo Din to USB adaptor) is mentionned. Of course i can see many replies related to Joypads behaving like XBOX 360 controler but i don't get if wired XBOX 360 pad is supposed to work or not.
Yes the topic is a bit complex for newcomers :D

So i don't get why my XBOX 360 controller is working fine during the first secondes, then starts to randomly work. (PC version which comes with a USB adaptor - Most of PC gamers buy this one when they want to play with a PAD on their PC).

Even if i am looking for a "Just working fine" Joypad solution, How can i move forward to investigate further the issue ?
- Testing with other cores ? (I'm not obsessed by the NES core, Just that i started playing with mister a few days ago, so only one core is installed).
- Gathering informations from the console ?

It's a tough topic, so beside trying to understand what's wrong with my XBOX 360 joypad, can you please suggest what seems to be a valid joypad solution sofar ?

If I missed something in this thread about the xbox 360 pas, all my apologies.
If i am disturbing this thread all my apologies also, not my intention.

This is my PC XBOX 360 pad :
Image

By the ways i confirm that my PC SPEED-LINK COMPETITION PRO USB joystick works perfectly with the NES Core, Even if clearly not well adapted, but i will use it to test the other cores.
Image
Thanks
Olivier.

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2569
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Joystick testing thread

Postby Sorgelig » Sun Apr 08, 2018 12:08 am

It's known issue with X360 and PS3 gamepads. They produce a lot of input flood. I didn't test wired X360 gamepad, but i have PS3 gamepad and i confirm it's not a good option unless you connect it through 8bitdo receiver which filters all these frequent messages.

Since you've read already this topic, you should already know what gamepads are good for MiSTer.

DirtyBernie wrote:By the ways i confirm that my PC SPEED-LINK COMPETITION PRO USB joystick works perfectly with the NES Core, Even if clearly not well adapted, but i will use it to test the other cores.

Yeah, such simple all-digital joysticks should work fine. Just keep in mind some cores require many buttons where simple dpad with 2 buttons won't be enough. But most cores are ok with just 2 buttons.

DirtyBernie
Atariator
Atariator
Posts: 18
Joined: Thu Mar 08, 2018 6:20 pm

Re: Joystick testing thread

Postby DirtyBernie » Sun Apr 08, 2018 5:00 am

Sorgelig wrote:It's known issue with X360 and PS3 gamepads. They produce a lot of input flood. I didn't test wired X360 gamepad, but i have PS3 gamepad and i confirm it's not a good option unless you connect it through 8bitdo receiver which filters all these frequent messages.


Thanks a lot for clarifying this, It was not 100% clear to me.
From a technical perspective
- Do you have an idea why this why this input flood exists ? (I mean any obvious reason why it would be necessary ?)
- Do you have an idea why input flood is not a problem on a raspberry pi and it is on the mister ?
- Could it be the raspberry pi linux distribution has a driver which filters this input flood ?


Sorgelig wrote:Since you've read already this topic, you should already know what gamepads are good for MiSTer.


Yep I have ordered a 8bitdo receiver and a SF30Pro Gamepad.

Thanks again for your answers.
And thanks again for the Mister.

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2569
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Joystick testing thread

Postby Sorgelig » Sun Apr 08, 2018 5:28 am

At first: i don't have a wired X360 gamepad. I only have wireless X360 gamepad without receiver. So, i cannot test it myself. I just relay on answers on this thread where someone reported that X360 has a lot of flood like PS3 gamepad.
PS3 gamepad has 6-axis accelerometer and thus constantly sends its 3D position. It also has very sensitive analog sticks producing erroneous movement report even when not really moved.
Probably something similar happens on X360 gamepad. But as i've said i cannot test it because i don't have it. So i'm not 100% sure where is the problem with this gamepad.

Why it works fine on RPi? I don't know it either. There can be many different causes. MiSTer uses just core Linux components so the Linux is lightweight and boots very fast. Sometimes it comes with trade of universality for speed.
Also, Linux is not Windows. Almost every kernel release is not compatible by internal code to previous release. It's monolith system with specific sets of drivers working only on specific build. If you will try to copy some driver from let's say Kernel 4.9 to current MiSTer Kernel 4.5 - you won't be able to compile it! Even if it's the driver for the same device.
It's not like "Oh, i have 10-years old driver for my beloved device, let's install it on my current OS." While in most case it will work on Windows, it won't work in case of Linux.
So, even i know there is a better driver for some device in new Linux, it's sometimes extremely hard to port it to other version of Linux/Kernel. Jumping to new Linux/Kernel is not an option either - usually it messes all the drivers and doesn't boot. Which is also requires a lot of time to understand and fix (if possible) all incompatibilities.

The said above is not directly related to X360 driver. It uses xpad driver which fortunately can be simply copied from latest Kernel. It compiles and pretends as working. But i'm not sure if it's the best driver for current kernel or not.

Another problem with DE10-nano board is crappy USB host driver. So, potentially any USB device (including gamepads) can be affected. There are some devices which simply cannot work reliably on current USB host driver. It also includes some USB hubs. Sometimes simple re-plug to other USB port of hub fixes the problem. Recently i've discovered that my Thrustmaster RF receiver causes the Linux kernel crash if plugged in specific USB port of hub. Moved to other port and problem has been solved, or more correctly speaking "masked out".
I've already improved USB host driver and now it's much better than what it was. But still has problems.

DirtyBernie
Atariator
Atariator
Posts: 18
Joined: Thu Mar 08, 2018 6:20 pm

Re: Joystick testing thread

Postby DirtyBernie » Sun Apr 08, 2018 9:41 am

Thanks a lot for having taken time to answer my questions. Much appreciated.
It's perfectly clear.
Thanks again.

raparici
Atarian
Atarian
Posts: 7
Joined: Sat Jun 03, 2017 5:27 pm

Re: Joystick testing thread

Postby raparici » Sun May 20, 2018 3:55 pm

Hi,

I am having issues setting up a Suncom TAC-2 using the Universal Daptor-2600. No Down and No Right movements are caught by the Cores. Both of them give a 1023 offset of their axis. This is the log:

Input event: type=EV_ABS, Axis=1, Offset:=1
Input event: type=EV_ABS, Axis=1, Offset:=512
Input event: type=EV_ABS, Axis=1, Offset:=1
Input event: type=EV_ABS, Axis=1, Offset:=512
Input event: type=EV_ABS, Axis=1, Offset:=1023
Input event: type=EV_ABS, Axis=1, Offset:=512
Input event: type=EV_ABS, Axis=0, Offset:=1
Input event: type=EV_ABS, Axis=0, Offset:=512
Input event: type=EV_ABS, Axis=0, Offset:=1023
Input event: type=EV_ABS, Axis=0, Offset:=512
Input event: type=EV_KEY, code=288(0x120), value=1
Input event: type=EV_KEY, code=288(0x120), value=0
Input event: type=EV_KEY, code=288(0x120), value=1
Input event: type=EV_KEY, code=288(0x120), value=0
Input event: type=EV_KEY, code=288(0x120), value=1
Input event: type=EV_KEY, code=288(0x120), value=0


Daptor-2600 proved to be a great adaptor, it was the only way I managed to have these joysticks work on VICE in a Mac. It would be great to add support to them. Up, Left and Fire are caught by the cores without any problem.

regards,


Ruben

raparici
Atarian
Atarian
Posts: 7
Joined: Sat Jun 03, 2017 5:27 pm

Re: Joystick testing thread

Postby raparici » Sun May 20, 2018 4:03 pm

Hi all,

It looks like the Daptor-2600 Universal is not completely supported. When using it with Suncom TAC-2 joysticks, Down and Right movements return a 1023 offset which is not caught by the Cores, no problems with Up and Left which return 1 or Fire. It would be great to completely support this great Adaptor, it works with many controls and proved to be the solution to have these Joysticks work in VICE for Mac.

Input event: type=EV_ABS, Axis=1, Offset:=1
Input event: type=EV_ABS, Axis=1, Offset:=512
Input event: type=EV_ABS, Axis=1, Offset:=1
Input event: type=EV_ABS, Axis=1, Offset:=512
Input event: type=EV_ABS, Axis=1, Offset:=1023
Input event: type=EV_ABS, Axis=1, Offset:=512
Input event: type=EV_ABS, Axis=0, Offset:=1
Input event: type=EV_ABS, Axis=0, Offset:=512
Input event: type=EV_ABS, Axis=0, Offset:=1023
Input event: type=EV_ABS, Axis=0, Offset:=512
Input event: type=EV_KEY, code=288(0x120), value=1
Input event: type=EV_KEY, code=288(0x120), value=0
Input event: type=EV_KEY, code=288(0x120), value=1
Input event: type=EV_KEY, code=288(0x120), value=0
Input event: type=EV_KEY, code=288(0x120), value=1
Input event: type=EV_KEY, code=288(0x120), value=0


regards,


Ruben

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2569
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Joystick testing thread

Postby Sorgelig » Sun May 20, 2018 4:09 pm

What VID/PID of your Daptor-2600?

may be @Newsdee can add support as he has many different joysticks/adaptors.

raparici
Atarian
Atarian
Posts: 7
Joined: Sat Jun 03, 2017 5:27 pm

Re: Joystick testing thread

Postby raparici » Sun May 20, 2018 5:29 pm

This is what I get when plugging it:

opened /dev/input/event0 (0001:f6eb)
opened /dev/input/event1 (0001:f6eb)
The file event0 was created.
The file js0 was created.
The file event1 was created.
The directory by-id was created.
The directory by-path was created.


My Daptor-2600 is the D9 type, the universal one.

NML32
Atari Super Hero
Atari Super Hero
Posts: 525
Joined: Tue Mar 11, 2014 1:54 am
Location: USA/Florida

Re: Joystick testing thread

Postby NML32 » Sun May 20, 2018 5:33 pm

raparici, I don't have a Suncom TAC-2 joystick to test with my Daptor2600-II but my Daptor works fine on MiSTer with my SL6602-Retro Competition Pro Retro Joystick.
Make sure your Daptor is running the latest firmware and your dip switches are set correctly.

http://2600-daptor.com/2600-daptor.htm

http://2600-daptor.com/2600-firmware.htm

I don't remember what firmware I'm running but this looks promising.
2600-daptor II stripped FB1.hex - try this if you want to use with emulators other than Stella & EMU7800. This gets rid of the z-axis and disables button 1 when in 7800 mode - these can confuse the controller mapping in other emulators.

raparici
Atarian
Atarian
Posts: 7
Joined: Sat Jun 03, 2017 5:27 pm

Re: Joystick testing thread

Postby raparici » Sun May 20, 2018 5:59 pm

As you can see in my previous quotes all the moves and fire signal an event with a clear and repeated offset. It doesn't matter whether I use a Zipstick, the industry standard Atari CX40 or the Suncom TAC-2, the debug values are exactly the same to those I quoted. The Daptors D9 I have (both) behave the same and were shipped to me directly from the maker past week, latest firmware. It indeed works perfect when plugged to the Mac in VICE. IMO it is an obvious issue with the 1023 offset value not being passed as Joystick event to the cores.

raparici
Atarian
Atarian
Posts: 7
Joined: Sat Jun 03, 2017 5:27 pm

Re: Joystick testing thread

Postby raparici » Sun May 20, 2018 6:01 pm

Which Daptor-2600 do you use ? Which are your offsets for Down and Right ?

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2569
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Joystick testing thread

Postby Sorgelig » Sun May 20, 2018 6:06 pm

there are 2 versions according to this link: http://2600-daptor.com/2600-daptor.htm
Original 2600-daptor is not upgradable unlike the second version.

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2569
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Joystick testing thread

Postby Sorgelig » Sun May 20, 2018 6:08 pm

I think it's possible to get the joystick info to get its max/min values from driver.
This will reduce amount of tweaks for different controllers. I will check this later.


Return to “MiSTer”

Who is online

Users browsing this forum: No registered users and 1 guest