Okaaay... so things are much better than I anticipated. I played a few games, including Wacky Wheels again, and could not reproduce crashes anymore.
In fact I am quite excited that with the combination of VSBCMI and USBJSTIK, I am getting a whole array of amusing options for the controllers I have lying around...
The attachment 5330017602631308303.jpg is no longer available
The attachment 5330017602631308302.jpg is no longer available
The attachment 5330017602631308301.jpg is no longer available
Despite the experiment note being over yet, I have published the source code and "alpha-grade" binary in the VSBCMI repo.
Also posting the limitations and usage notes here:
To run:
- obtain and unpack USBDOS.ZIP (FreeDOS also ships the drivers; they may or may not work)
- run USBUHCIL
- run USBJSTIK
- run VSBCMI as usual (see HOWTO in source distribution for details) only with adding /J argument
- to tweak joystick mapping or a particular game, run USBJSTIK < GAME.CFG which will refresh joystick TSR settings without need to unload or reboot anything.
When /J is not given, joystick support is ignored; TSR should work as usual.
Caveats and limitation (take note of alpha in version name):
- only WATCOM build functions at the moment, DJGPP build is likely to be broken and has not been tested
- 16-bit variant of VSBCMI crashes with /J option activated
- because VSBCMI looks for exact version of USBJSTIK loaded in memory, it may or may not work with the driver installed on an arbitrary PC; version available on the official site linked above was tested
- "virtual joystick port" to expose is hardcoded to 201h
Will be doing more rounds of testing, including on more than one machine and with actual HDA audio chip, and updating this post with the results.
One problem I am seeing is axis jitter, which also seems to result in "drift" that makes the solution hard to use in some games.
I am very surprised to see jitter and drift in a "fully digital" solution, and yet it's there.
It is also observed with USBJSTIK on its own (i.e. without JEMM+VSBCMI) and the degree seems to change depending on CPU speed settings.
I have not studied USBJSTIK source code just yet and, guess will be reaching out to Bret Johnson for advice on this eventually.
UPD: after having studied USBJSTIK for some time (and banging the head on the wall for some time), I have finally made some progress, albeit in a somewhat "hacky" way. I ended up dropping original USBJSTIK port 201 routines altogether, and am providing replacement for those right in VSBCMI, which use 32-bit math and scrap PIT, resorting to TSC instead. This has allowed to fix the jitter making Gods playable and Super Street Fighter 2 works now too, with 6-button Capcom gamepad fully emulated. For me this is a moment of big joy, as I was pursuing this type of setup for quite long, even though I appreciate many will not find that useful, as only UHCI type controllers are supported by Bret Johnson's drivers. Somehow I found one (!) port connected to such controller on my motherboard, but, e.g. for an i5 laptop the I have there were none. I am yet to get a USB hub to test out multiple joysticks support (it's a shame one can't have two Capcom gamepads in DOS, so it'll probably be a boxing match).
On the new VSBCMI an "alpha to beta" update will be pushed during the weekend or early next week, but 16-bit protected mode support is not yet there, as crashes still need to be investigated.
UPD2: 16-bit PM issues have been resolved and joystick support confirmed for Tyrian 2000. Also tested Wing Commander III and observed no axes drift - something that has been getting in my way of enjoying the game in DOS for so long. Buying a new joystick now becomes simply unresistably tempting...
GA-G41M-Combo G41/ICH7 - Core 2 Quad Q9550 - DDR3 1033 - Radeon RX570 - CMI-8738 - CM-300 - Saitek ST-30
Beetle/M/i815+ICH2 - Celeron 566Mhz - Opti 924 - X3MB
https://archive.org/details/peridot-26