Joystick testing thread

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

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

Locked
Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 6348
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Joystick testing thread

Post by Sorgelig »

Some input devices illegally use VID/PID of other devices. Basically it's quite illegal.
As a result you may have different devices with the same VIP/PID which treated as the same device by MiSTer.
drj3rk
Atari freak
Atari freak
Posts: 62
Joined: Tue May 14, 2019 10:12 pm

Re: Joystick testing thread

Post by drj3rk »

I thought that could be the case, but hopefully it's just something I missed. I should have time to try a few more things tonight.
Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 6348
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Joystick testing thread

Post by Sorgelig »

drj3rk wrote:I thought that could be the case, but hopefully it's just something I missed. I should have time to try a few more things tonight.
in USB console in Menu core you have a log where you can see device VID/PID of all connected joysticks.
NML32
Atari Super Hero
Atari Super Hero
Posts: 691
Joined: Tue Mar 11, 2014 1:54 am
Location: USA/Florida

Re: Joystick testing thread

Post by NML32 »

Would this Joystick and Spinner setup work with MiSTer? :shrug:
https://www.youtube.com/watch?v=pNHCCwBd88k
drj3rk
Atari freak
Atari freak
Posts: 62
Joined: Tue May 14, 2019 10:12 pm

Re: Joystick testing thread

Post by drj3rk »

Sorgelig wrote:
drj3rk wrote:I thought that could be the case, but hopefully it's just something I missed. I should have time to try a few more things tonight.
in USB console in Menu core you have a log where you can see device VID/PID of all connected joysticks.
Thanks for the tip! Appreciated. I'll give it a try if I can't get it figured out this evening.
drj3rk
Atari freak
Atari freak
Posts: 62
Joined: Tue May 14, 2019 10:12 pm

Re: Joystick testing thread

Post by drj3rk »

NML32 wrote:Would this Joystick and Spinner setup work with MiSTer? :shrug:
https://www.youtube.com/watch?v=pNHCCwBd88k
It should. It looks like the encoder is fairly compatible.

This one is pretty expensive when you include everything you'd need to make it work, but this is what I plan to use. The reason being, is that it's arcade-button-hole sized, super strong, supports attachable steering wheels, and also has anodized knob options. (I've said it before, but I'm a sucker for anodized aluminum :lol: ) I'll report back once I get a chance to try them. Obviously, they're not going to be everyone's first choice due to cost, but with all the options and the "pro" grade, the price appears to be the ONLY drawback.

https://groovygamegear.com/webstore/ind ... cts_id=268
AndreStarTrek
Atariator
Atariator
Posts: 26
Joined: Wed Aug 21, 2019 10:47 pm

Re: Joystick testing thread

Post by AndreStarTrek »

AndreStarTrek wrote:
Sorgelig wrote:MiSTer has no problem with several gamepads with the same VID/PID. Problem can be with some improper devices using non-empty SAME serial number for every device.
Yes I later read about that. I been searching a bit more and I be leave P1 and P2 both have the same input on the dpad but all other buttons are a bit different. I have made two different .map files for each controller and copy them so I could compare them and they are different, as seen on the picture below.

Also I have looked at the device ID with in windows (Seen in the same picture) and they are little bit different with MI_00 and MI_01 on the end. Could maybe used to identify one from the other.

If this is not something that can be fixed, it would like to suggest that this particular adapter not be listed in first post as working or noted that only one port can be used.

I hope that there is a solution for this problem seen I have also a 2 port Nes adapter to usb from the same maker, it would be a shame to throw them out.

Image
Can someone tell me if this is a fixable, or should i forget about this snes to usb adapter and buy something else?
Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 6348
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Joystick testing thread

Post by Sorgelig »

AndreStarTrek wrote:Can someone tell me if this is a fixable, or should i forget about this snes to usb adapter and buy something else?
ask manufacturer to update firmware with different PID for different adapters. Otherwise computer (and MiSTer) cannot distinguish different gamepads behind these converters.
paulbnl
Captain Atari
Captain Atari
Posts: 151
Joined: Wed Oct 24, 2018 9:43 am

Re: Joystick testing thread

Post by paulbnl »

AndreStarTrek wrote: I have try that but and many more. If power cycle the mister also loses the buttens except the dpad of one of the controllers. It look like it is always the first controller that is been setup. I also tried all the switch option on the controller adapter, setting 1 and A wil not work at all for the second controller. If I connect the adapter on my windows 10 pc in the 1 option it wil see 1 usb device and in option 2, 2 usb devices. But the problem could be that both of them are using the same device ID number, there is also only one file saved on the mister sdcard. Can mister handel 2 of the same devices with the same usb device ID's?
Try the attached MiSTer file. Replace the MiSTer file and put

Code: Select all

 disable_usb_merge=1
in your MiSTer.ini and then power cycle the MiSTer.

Then try all the switch options on the controller adapter again.
You do not have the required permissions to view the files attached to this post.
AndreStarTrek
Atariator
Atariator
Posts: 26
Joined: Wed Aug 21, 2019 10:47 pm

Re: Joystick testing thread

Post by AndreStarTrek »

paulbnl wrote:
AndreStarTrek wrote: I have try that but and many more. If power cycle the mister also loses the buttens except the dpad of one of the controllers. It look like it is always the first controller that is been setup. I also tried all the switch option on the controller adapter, setting 1 and A wil not work at all for the second controller. If I connect the adapter on my windows 10 pc in the 1 option it wil see 1 usb device and in option 2, 2 usb devices. But the problem could be that both of them are using the same device ID number, there is also only one file saved on the mister sdcard. Can mister handel 2 of the same devices with the same usb device ID's?
Try the attached MiSTer file. Replace the MiSTer file and put

Code: Select all

 disable_usb_merge=1
in your MiSTer.ini and then power cycle the MiSTer.

Then try all the switch options on the controller adapter again.
I have tried it but I did not see anything different. Only the 2 player setting let me setup both controller and they both will work as they should be until you boot a core, than the first controller you have setup will stop working except for the dpad. Also MiSTer only makes one .map file for this device.

Please tell me if I can do more to help out, also tnx for trying.
paulbnl
Captain Atari
Captain Atari
Posts: 151
Joined: Wed Oct 24, 2018 9:43 am

Re: Joystick testing thread

Post by paulbnl »

Try to get a log from the console connection while in the Menu core and pressing the buttons on controller 1 and 2. You can reboot the MiSTer to get the full boot up log while connected to the console.
https://github.com/MiSTer-devel/Main_Mi ... connection

What does the switch A setting do on the controller adapter in Windows?

It is normal that there is only one map file because it has the same VID/PID. My 2 player Wii Classic controller adapter from Raphnet works fine with 1 map file but if MiSTer merges them then both controllers work as player 1.
AndreStarTrek
Atariator
Atariator
Posts: 26
Joined: Wed Aug 21, 2019 10:47 pm

Re: Joystick testing thread

Post by AndreStarTrek »

paulbnl wrote:Try to get a log from the console connection while in the Menu core and pressing the buttons on controller 1 and 2. You can reboot the MiSTer to get the full boot up log while connected to the console.
https://github.com/MiSTer-devel/Main_Mi ... connection

What does the switch A setting do on the controller adapter in Windows?

It is normal that there is only one map file because it has the same VID/PID. My 2 player Wii Classic controller adapter from Raphnet works fine with 1 map file but if MiSTer merges them then both controllers work as player 1.
Trough the console I get this from the SNES adapter:
Input event: type=EV_KEY, code=305(0x131), value=1, jnum=1, ID:1292:534e:06
Input event: type=EV_KEY, code=305(0x131), value=0, jnum=1, ID:1292:534e:06
Input event: type=EV_KEY, code=289(0x121), value=1, jnum=0, ID:1292:534e:05
Input event: type=EV_KEY, code=289(0x121), value=0, jnum=2, ID:1292:534e:05

The first 2 are from controller port 1 the last 2 from controller port 2, and I am pressing both times the Yellow (B) button. It seams 06 on the end is port1 and 05 is port 2.

I got this from the NES adapter:

Input event: type=EV_KEY, code=304(0x130), value=1, jnum=2, ID:1292:4647:01
Input event: type=EV_KEY, code=304(0x130), value=0, jnum=2, ID:1292:4647:01
Input event: type=EV_KEY, code=288(0x120), value=1, jnum=3, ID:1292:4647:00
Input event: type=EV_KEY, code=288(0x120), value=0, jnum=3, ID:1292:4647:00

Again first 2 are from port 1 (01) the last 2 from port 2 (00), using button (A).
paulbnl
Captain Atari
Captain Atari
Posts: 151
Joined: Wed Oct 24, 2018 9:43 am

Re: Joystick testing thread

Post by paulbnl »

The problem is the key codes are different between port 1 and 2 for the same buttons. I think it will work if you map controller 1 in a core and when it asks if you want to assign alternate buttons then choose yes and map controller 2.

This might or might not require the MiSTer file I posted with the disable_usb_merge=1 in MiSTer.ini
AndreStarTrek
Atariator
Atariator
Posts: 26
Joined: Wed Aug 21, 2019 10:47 pm

Re: Joystick testing thread

Post by AndreStarTrek »

paulbnl wrote:The problem is the key codes are different between port 1 and 2 for the same buttons. I think it will work if you map controller 1 in a core and when it asks if you want to assign alternate buttons then choose yes and map controller 2.

This might or might not require the MiSTer file I posted with the disable_usb_merge=1 in MiSTer.ini
I tried with your files and setting but with every switch modus the core wont react to controller 2 button press after i set controller one.

But is it not possible to make for every port a different file with the 06 an 05 on the end like input_1292_534e_06_v3.map and input_1292_534e_05_v3.map?
drj3rk
Atari freak
Atari freak
Posts: 62
Joined: Tue May 14, 2019 10:12 pm

Re: Joystick testing thread

Post by drj3rk »

Sorgelig wrote:
drj3rk wrote:I thought that could be the case, but hopefully it's just something I missed. I should have time to try a few more things tonight.
in USB console in Menu core you have a log where you can see device VID/PID of all connected joysticks.
I got the sticks working ok. It's a little bit flaky, but I'm pretty sure it's the interface board in the X-Arcade Dual Tank Stick, and not MiSTer. I can map it in OSD, then map it in a game core. However, if I reset the system, it loses the mapping until I unplug the USB connector, and plug it back in. Something is a little goofy with it. I plan to do some more testing.

The next item, is that when it maps, as expected, it maps both sets of controls identically as per the MiSTer spec. This is fine, except in a case like Robotron, where one might want to map the player 2 stick to the firing directions. I realize that this isn't implemented though, so no complaints. Just something that I noticed.

Otherwise, I think everything is working as intended. I'll keep playing with the stick settings, and maybe check the USB console as you recommended to see if there's anything odd about the interface board in this setup.

In the meantime, short of the small inconvenience of replugging after a reset, I can play some arcade games now with good controls 8)
Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 6348
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Joystick testing thread

Post by Sorgelig »

You still can look in log the list of connected input controllers. Everytime MiSTer binary is starting it prints the list of controllers.
So you can compare the list under different conditions. May be after reset this controller isn't visible, or may be it initialized with different VID/PID(?).
drj3rk
Atari freak
Atari freak
Posts: 62
Joined: Tue May 14, 2019 10:12 pm

Re: Joystick testing thread

Post by drj3rk »

Sorgelig wrote:You still can look in log the list of connected input controllers. Everytime MiSTer binary is starting it prints the list of controllers.
So you can compare the list under different conditions. May be after reset this controller isn't visible, or may be it initialized with different VID/PID(?).
I will definitely give this a try when I get home tonight. Thanks!
paulbnl
Captain Atari
Captain Atari
Posts: 151
Joined: Wed Oct 24, 2018 9:43 am

Re: Joystick testing thread

Post by paulbnl »

AndreStarTrek wrote: But is it not possible to make for every port a different file with the 06 an 05 on the end like input_1292_534e_06_v3.map and input_1292_534e_05_v3.map?
Those 05 and 06 numbers change depending on how many USB devices are plugged in I think so they are not usable.

Your controller adapters are currently not compatible with MiSTer because the adapter sends different button numbers between the 2 controllers. I thought you could use the alternate button mapping but MiSTer ignores other controllers during mapping.
AndreStarTrek
Atariator
Atariator
Posts: 26
Joined: Wed Aug 21, 2019 10:47 pm

Re: Joystick testing thread

Post by AndreStarTrek »

paulbnl wrote:
AndreStarTrek wrote: But is it not possible to make for every port a different file with the 06 an 05 on the end like input_1292_534e_06_v3.map and input_1292_534e_05_v3.map?
Those 05 and 06 numbers change depending on how many USB devices are plugged in I think so they are not usable.

Your controller adapters are currently not compatible with MiSTer because the adapter sends different button numbers between the 2 controllers. I thought you could use the alternate button mapping but MiSTer ignores other controllers during mapping.
Ah yes that make sense. Well I am gonna fix it by using a arduino micro controller and hook that to the ports. That is something I can fix if it is not working as intended :wink:

Thanks again for your effort.

P.S. please change the list as this 2 player adapter is not working as attended, I would hate to see anyone else buying this.
AndreStarTrek
Atariator
Atariator
Posts: 26
Joined: Wed Aug 21, 2019 10:47 pm

Re: Joystick testing thread

Post by AndreStarTrek »

Got the arduino working with this script but now I got a other problem I cant fix.

https://github.com/mcgurk/Arduino-USB-H ... ickAdapter

Both controllers are working on a single arduino micro and windows see 3 HIDs one as COM port and two joysticks. But wen I use it on the MiSTer it only detect it as one single HID, both controller are working but as a one controller not two.

I been searching if i can change one of the joystick HIDS to a other VID or PID but i cannot find any solutions for that.

Anything else i can try?
paulbnl
Captain Atari
Captain Atari
Posts: 151
Joined: Wed Oct 24, 2018 9:43 am

Re: Joystick testing thread

Post by paulbnl »

MiSTer will merge the USB HID by serial number in the USB descriptor. Try to find where the serial number is set in the Arduino files and remove it.

Or use the disable_usb_merge option with the file that I posted but that is not official yet.
AndreStarTrek
Atariator
Atariator
Posts: 26
Joined: Wed Aug 21, 2019 10:47 pm

Re: Joystick testing thread

Post by AndreStarTrek »

paulbnl wrote:MiSTer will merge the USB HID by serial number in the USB descriptor. Try to find where the serial number is set in the Arduino files and remove it.

Or use the disable_usb_merge option with the file that I posted but that is not official yet.
I have used your files first and did noting different than the original files. Could it be that they dont work correctly yet?

I like to change the numbers but i cant find it anywhere in the project files. I been finding information that points to the Boards.txt file, but i think this is only for the fiscal board not for the virtual HIDs.
Last edited by AndreStarTrek on Sun Feb 02, 2020 12:04 pm, edited 1 time in total.
AndreStarTrek
Atariator
Atariator
Posts: 26
Joined: Wed Aug 21, 2019 10:47 pm

Re: Joystick testing thread

Post by AndreStarTrek »

Please remove, double post.
Last edited by AndreStarTrek on Sun Feb 02, 2020 12:05 pm, edited 1 time in total.
AndreStarTrek
Atariator
Atariator
Posts: 26
Joined: Wed Aug 21, 2019 10:47 pm

Re: Joystick testing thread

Post by AndreStarTrek »

Please remove, double post.
paulbnl
Captain Atari
Captain Atari
Posts: 151
Joined: Wed Oct 24, 2018 9:43 am

Re: Joystick testing thread

Post by paulbnl »

Post the complete boot log including pressing buttons on controller 1 and 2 with and without my file.
Locked

Return to “MiSTer”