Contest - Visual Controller Tester

Post Reply
User avatar
DusanStrakl
Posts: 127
Joined: Sun Apr 26, 2020 9:15 pm
Location: Bay Area, California
Contact:

File Download Contest - Visual Controller Tester

Post by DusanStrakl »

I had some issues with cheap SNES controller knockoffs that didn't work properly and to troubleshoot I needed good view into what is actually happening. Hence I wrote this tool to display raw data returned from the Kernal call joystick_get and also graphical representation of the buttons affected.

It scans and displays four controllers and Keyboard mapping into virtual controller 0.

Image

It works on real hardware:
Image

And on emulator:
Image

Download the tool here:
CONTEST.PRG
(2.73 KiB) Downloaded 569 times
User avatar
desertfish
Posts: 1093
Joined: Tue Aug 25, 2020 8:27 pm
Location: Netherlands

Re: Contest - Visual Controller Tester

Post by desertfish »

This should replace the test program that's currently on the shipped sdcard!
User avatar
DusanStrakl
Posts: 127
Joined: Sun Apr 26, 2020 9:15 pm
Location: Bay Area, California
Contact:

Re: Contest - Visual Controller Tester

Post by DusanStrakl »

desertfish wrote: Sun Jul 16, 2023 8:46 am This should replace the test program that's currently on the shipped sdcard!
I don't disagree :-)
User avatar
DusanStrakl
Posts: 127
Joined: Sun Apr 26, 2020 9:15 pm
Location: Bay Area, California
Contact:

Re: Contest - Visual Controller Tester

Post by DusanStrakl »

I would also be glad to expand this tool if you feel there is any additional info that would be useful when testing controllers.
TestPleaseIgnore
Posts: 4
Joined: Tue Jun 27, 2023 8:20 pm

Re: Contest - Visual Controller Tester

Post by TestPleaseIgnore »

Dušan, maybe you hit the same issue with SNES controllers as I.
I bought two controllers from aliexpress (the same page, the same SKU), and two from a czech online shop (at 5x cost). Of the four controllers, just one (the first one from ali) works flawlessly. The other three show a problem with the B button, which is intermittent (unstable read in X16).
Is this the same issue that you have with the "knock-offs", or something else?
User avatar
DusanStrakl
Posts: 127
Joined: Sun Apr 26, 2020 9:15 pm
Location: Bay Area, California
Contact:

Re: Contest - Visual Controller Tester

Post by DusanStrakl »

Hi TestPleaseIgnore,

sorry I only saw your comment now.

Yes my controllers have similar symptoms. The B button is very unstable, it even looks like it is being pressed and released continuously, almost like rapid fire.
Another, even more annoying problem with both controllers is that Select button is always returning pressed state.

These are the ones I bought:
https://www.amazon.com/dp/B07VJL4XJ1?ps ... ct_details

but at least I only spent $13 USD.
Stefan
Posts: 454
Joined: Thu Aug 20, 2020 8:59 am

Re: Contest - Visual Controller Tester

Post by Stefan »

Wavicle made some changes to the joystick scan method to make it comply better with SNES timing requirements.

These changes were committed on May 23.

The latest official Kernal - R43 Stockholm - was released a couple of days before that change, on May 17.

Unless you are already running a Kernal compiled from the Github master, you could try that.
User avatar
DusanStrakl
Posts: 127
Joined: Sun Apr 26, 2020 9:15 pm
Location: Bay Area, California
Contact:

Re: Contest - Visual Controller Tester

Post by DusanStrakl »

Stefan wrote: Fri Aug 11, 2023 4:53 am Wavicle made some changes to the joystick scan method to make it comply better with SNES timing requirements.

These changes were committed on May 23.

The latest official Kernal - R43 Stockholm - was released a couple of days before that change, on May 17.

Unless you are already running a Kernal compiled from the Github master, you could try that.
Interesting and good to know. So I will not toss those controllers to trash yet, perhaps they will work fine after the update. I have so much on my plate right now that I will just wait for next major update to Kernal and then learn how to update on the real system.
voidstar
Posts: 490
Joined: Thu Apr 15, 2021 8:05 am

Re: Contest - Visual Controller Tester

Post by voidstar »

Which pin triggers the Y:xxxxxxxx output on the display?

I have a gamepad with a "touchy" plug - if I move it slightly, the Y: state for that controller goes from 11111111 to 00000000 (and then when it goes to 0000's the rest of the buttons start responding on states A: and X: ).

Wondering if I can just jam some tin foil up one of the pin holes.
voidstar
Posts: 490
Joined: Thu Apr 15, 2021 8:05 am

Re: Contest - Visual Controller Tester

Post by voidstar »

We were talking about this in the Discord, wanted to archive this here: confirmed all 4-gamepad ports working a'ok on the X16!

I had to rig up wiring on the pins near the center of the board.

So far all the "official" Nintendo SNES gamepads (that I've gotten) have worked on the X16, but they all have a fairly short cable (you can get extensions, but just it's another thing to get).

For the <$10 generic no-brand gamepad controllers, out of the dozen I've gotten, it's about 50/50 on whether they work on the X16 or not. If you open them up, there are electronic differences between them - so there is no real way to know until you get one and try (just some slight signal differences make some of them not work on the X16).
Attachments
gamepad_controllers.jpg
gamepad_controllers.jpg (221.32 KiB) Viewed 9120 times
Post Reply