HIDtest v3.1 released

HIDtest v3.1 released

by sd_snatcher on 09-02-2020, 00:30
Topic: Software
Languages:

The version 3.1 of the HID tester and HIDlib has just been released, with many optimisations and bug-fixes:

  • Added the Generic Joystick 2-byte mode, that disables PnP detection and shows raw data from the joystick rows, to help to check for miswirings and nonMSX-HID joysticks.
  • Fixed the center value for the analog direction display
  • HIDlib: Added support for nonMSX-HID device handling. The idea is to make the life of the programmers easier, by allowing these devices to be handled by the same code and driver structure, except for the missing PnP detection.
  • HIDlib: Improved driver for the XE-1AJ analog mode: faster and can now read the buttons A' and B' independently from A and B. Implemented digital direction emulation on the analog mode, to facilitate its use on menus
  • HIDlib: New version of the Arkanoid Vaus paddle driver. Smaller, faster, fixes centering on turbo machines and has a new disconnection detection method that is not dependent on the 74LS165 chip specifics.
  • HIDlib: changed the way the channels are mapped for PWM devices. This is meant to improve compatibility with the Break Out MSX-paddle.

Both the binaries and sources can be downloaded from FRS' MSX Page.

Comments (8)

By Pippo

Champion (429)

Pippo's picture

10-02-2020, 20:11

Very helpful utility! Big smile
Thanks a lot, Frs, for it. Smile

By gdx

Prophet (3241)

gdx's picture

11-02-2020, 11:03

Thank for this tool.

I tried it on real Turbo R and it doesn't quit properly when I press ESC.

In addition, I think use is a little obscure for non-experts. A menu to select used controller following by corresponding test screen would be better. Then Row 0 and 1 seem to be inverted when /G is specified. (Row 1 is optional, moreover nothing prevents adding rows by using external chip.)

HIDTEST screen wrote:

Note: if you get spurious detections, your joystick might not be wired according to the MSX specification.

I think the sentence below is more appropriate because the MSX specification does not forbid using GND instead of STROBE to make special controllers. The standard wanted to be open about it and that is why these ports are called "General Purpose Ports".

if you get parasitic detections, the wiring may be incorrect or the controller is not generic.

By sd_snatcher

Prophet (3196)

sd_snatcher's picture

11-02-2020, 15:18

gdx wrote:

Thank for this tool.

Thank you for taking some time to test it too. Smile

Quote:

I tried it on real Turbo R and it doesn't quit properly when I press ESC.

Humm. I'll take a look into that.

Quote:

In addition, I think use is a little obscure for non-experts. A menu to select used controller following by corresponding test screen would be better.

Here you got me confused. There are two modes:

1) Easy, fully automatic, "cooked" information: MSX-HID mode
2) Expert, raw information: Generic 2-byte mode

Maybe I should have called it just "Expert" mode, but then I have only one driver for this mode and it's the Generic 2-byte (aka Generic 2-rows). I must admit I'm terrible to pick up names while I'm programming. (see "signatures" vs "fingerprints" controversy) Tongue

And this caution with controversy must always be taken into consideration around here. There's always a possibility of someone activating their offensive mode and start saying things like "you call THAT an Expert mode? What ridiculous/presumptuous/pedantic/preposterous programmer you are! An Expert mode should have <this or that>, and never <this or that>!"

Anyway, the Expert/Generic mode is indeed meant to debug hardware. It's meant for those who built their joysticks themselves, and want to see if there's some miswiring. It also serves for those who aren't experts, but can take a picture or video of the screen and post on a forum to get some expert help. Any expert will be able to quickly identify what's wrong with the joystick from that simple screen.

It's also "Generic 2-byte" mode because only the two basic rows are read. Yes, there are many other different protocols and ways to transmit buttons, but then they send much more data than just 2 bytes/rows via specific (IOW, non-Generic) protocols and are out of the scope of this mode.

Quote:

Then Row 0 and 1 seem to be inverted when /G is specified. (Row 1 is optional, moreover nothing prevents adding rows by using external chip.)

This is weird. The following screenshot shows what I get by pressing UP+Button1 on a standard MSX joystick. Why do you think the rows are inverted? The row number is represented by the value of the Output pin. And I'm representing the rows in the same ascending order that we're used with the keyboard matrix.

gdx wrote:
HIDTEST screen wrote:

Note: if you get spurious detections, your joystick might not be wired according to the MSX specification.

I think the sentence below is more appropriate because the MSX specification does not forbid using GND instead of STROBE to make special controllers. The standard wanted to be open about it and that is why these ports are called "General Purpose Ports".

Maybe the problem here is semantics. The specification is very clear on how a standard MSX joystick must be wired:

This means that anything different than that isn't wired according to the MSX specification, period. Yes, I agree that they can be freely connected to the General Purpose Ports (sometimes with an adapter in the middle), but that doesn't make them standard and they won't behave perfectly like one. This is the case of Megadrive controllers, FM-Towns controllers and so on. They'll only be compatible to a certain degree, and any programmer has to keep these restrictions in mind.

Quote:

if you get parasitic detections, the wiring may be incorrect or the controller is not generic.

Bingo! And agreed. And within the screen space restrictions, that's exactly what the Generic mode screen says, isn't it? :)
It's further detailed on the TXT manual.

By sd_snatcher

Prophet (3196)

sd_snatcher's picture

11-02-2020, 16:27

I must say I had a good laugh with the "joystick simulator" used to illustrate this article. I've never heard of that weird device. Did it really work, or was just a gimmick? I'm under the impression that it wan't exactly great to play with that thing. Big smile

Does it support 2 buttons, or just one?

By hamlet

Scribe (2890)

hamlet's picture

11-02-2020, 18:03

I bought it on the Nimega fair last week, so it comes just in time for your news post.
After cleaning it it works nice. Well, not for gaming of course. Feels like playing an IOS game on an virtual joystick.
Suncom did a lot of experimental joysticks for the VCS, they all had only one button.
But it uses a selector for 8 or 4 way direction.
I really like the TAC2, which don't use switches, just a metal ball.
Glad you like it!

By gdx

Prophet (3241)

gdx's picture

12-02-2020, 02:00

sd_snatcher wrote:

Maybe the problem here is semantics. The specification is very clear on how a standard MSX joystick must be wired:

The diagrams given in the MSX datapack are basic diagrams for generic controllers (joystick, mice, paddles, etc). Standard also says joystick can have one or two buttons (type A or type B controller). It does not say that we cannot do otherwise.
For example the FM-Towns controllers are made in a slightly different way but are 100% compatible and all those who sold them indicated "compatible FM-Towns, MSX, X68000, etc" (except Fujitsu because it was not in their interest).
In addition nothing is said about "MSXHID". So better not be so categorical.

sd_snatcher wrote:

Why do you think the rows are inverted?

As it is now, row 0 is to access specific buttons, etc, and the row 1 is to access standard joystick. Don't you find it weird?

By sd_snatcher

Prophet (3196)

sd_snatcher's picture

19-02-2020, 19:14

gdx wrote:
sd_snatcher wrote:

Why do you think the rows are inverted?

As it is now, row 0 is to access specific buttons, etc, and the row 1 is to access standard joystick. Don't you find it weird?

Are you sure of that? Because, as the screenshot shows, button-1 and UP are being pressed and they are shown on row-0.

By gdx

Prophet (3241)

gdx's picture

20-02-2020, 11:53

OK, I understood. It is reversed when I use the JoySNES in Extra mode. In this mode the pin 8 status is probably taken into account with a little delay. It also tried with an MSX joypad and its ok, and with an FM-Towns joypad both react at the same time.

gdx wrote:

I tried it on real Turbo R and it doesn't quit properly when I press ESC.

This bug is annoying.