Hi Wim!
Jochen is right. It ought to work. So I did some tracing and looked into SDL_os2joystick.c to discover the culprit:
GAMEDD.SYS is missing GAME_PORT_RESET and GAME_PORT_GET functions. Without these no joysticks are detected.
The good news is that once I added those functions it all started to work (at least on my laptop that is). Will append later.
Regards, Wim.
Edit: And here it is. Only GAMEDD.SYM/GAMEDD.SYS and TRC00E8.TFF have been changed.
And ............ WE HAVE A WINNER !!!!!!
Installing the GAMEDD.SYS and GAMEDD.SYM as well as TRC00E8.TTF from you latest gamepad package (gamepad-20220510.zip) I now have game controller function in DOSBOX (at least joystick wise - Martin or others will have to confirm gamepad function)
I have tested both the original Thrustmaster Joystick on the Logilink box, Mode 2, and the new Thrustmaster T.Flight, using the original xevents.cmd (for the former) and xeventsf1c.cmd (for the latter), and both are recognized by the DOSBOX installed TMScope - not perfectly, but at least functional, so good on you, Wim - excellent work!
When I say not perfect, I found the following:
1) Again hat function is not present, running TMScope under DOSBOX, for either joystick, so I assume something is still missing there
2) I noted on the X-1 and Y-1 axis control display, pushing either joystick to the east and south, the travel indicted on TMScope is a lot less (about half) the travel noted on the display pushing the joysticks north and west (the cursor went to the maximum travel on those sides of the the display). I will explain why that may be important below
3) Perhaps I have not tested enough so far, but under DOSBOX after 5-10 minutes I did not see the Loss of Focus problem I reported earlier, so the environment under which you are playing a DOS game (ie. direct DOS VM under ArcaOS / eCS / OS2 or under DOSBOX) may be important to that issue.
Running Wolfenstein 3D, using either joystick, I was able first to calibrate the joystick (very easily in fact) and, enabling the Gravis GamePad button, as you discovered, was able to customize buttons B0-B3).
The one item I noted there from preliminary testing was the following:
4) Attempting to turn either east, or backing up south using the joystick did not work - I could move forward (north on the joysticks) and towards the west easily. So the X1 - Y1 axis problem I noted in 2) above may have some bearing on that.
Trying Comanche 2:
I was able to calibrate both Joysticks, but when I went to run the game, sight directional control, normally provided by the hat, caused the display to sight towards the left (west) to start. Moving the joystick variously either moved me in different flight directions, or changed sight directions (north, south, etc.) randomly, so there may be some confusion occurring between joystick input, perhaps between the hat inputs and the X1-Y1 axis inputs in some way (xevents does report outputs going out from both joysticks).
Its good that I can test various programs, as that issue would not be seen under Wolfenstein, due to its simple control arrangement (essentially just 4 buttons and the X-1 / Y-1 control movemennts).
With the ability to use DOSBOX as well, I plan to do testing on a wider variety of games in future, as well as exploring the mapping of the extra buttons on the newer Thrustmaster joystick. I also plan to do more testing to confirm whether the Loss of Focus problem is strictly a native DOS VM problem or whether it can be reproduced under DOSBOX. Please advise if there are any other tests you would like carried out, Wim - perhaps xevents logs may be able to define whats going on although I would have to carefully log the timing of the games while I proceed.
But in summary, Sir (and for others others looking in) I can confirm DOSBOX control of game controllers, at least with the joysticks tested, is now possible as well as under a DOS VM, so hats off to you again Wim - excellent work - only wish I could at least buy you a glass or pint of your favourite libation for your efforts and Best!
M