Hi Wim!
Hi Mark and Jochen,
Running TMScope in DOSBox and VDM gives different results. This occurs because DOSBox obtains calibration values from gamedd.sys and recalculates axes values whereas with VDM no such calculations occur. Unfortunately the recalculation algorithm in SDL_os2joystick is horribly wrong. It is so wrong that it even hangs my laptop when proper calibration values (lower=0, center=128. upper=255 for axes ranging from 0 to 255) are being used. And that is eactly the range of axes values that are currently used. The reason it still works, sort of, is that in gamepad-20220517 calibration values lower=(7*128)/10, center=128+25, upper=(13*128)/10 are being used. That is after my tweaking. Before that center=128 was used which gave even worse readings in TMScope in DOSBox.
My proposed algorithm in rexx code form is as follows:
/* proposed algorithm SDL-DOSBox */
SDL_JOYSTICK_AXIS_MAX = +32767
SDL_JOYSTICK_AXIS_MIN = -32768
/* calibration values */
axis_lower = 0
axis_center = 128
axis_upper = 255
/* preparation */
offset = axis_center
scale1 = SDL_JOYSTICK_AXIS_MIN / (axis_lower - axis_center)
scale2 = SDL_JOYSTICK_AXIS_MAX / (axis_upper - axis_center)
/* apply input values and show output values */
do axis = axis_lower to axis_upper
if (axis < axis_center)
/* recalculate axis value */
then value = (axis - offset) * scale1
/* show axis input and output values */
else value = (axis - offset) * scale2
say axis value
end
Best regards,
Wim.
Interesting, Wim
I actually find that whatever your doing is working for my joysticks, jury rig or no - I was playing Wolfenstein under DOSBOX for 2 hours last night, switching Joysticks half way, and no loss of focus, or joystick problems at all - however in comparison to the more complex games where more controls are required, it is really a simple test.
Personally I've not noted any TMScope problems under DOSBOX other than hat function, but I take your word for it, not being a programmer that the algorithms could be a mess. I should have a look more closely at the RAW_DATA screen being generated here for my sticks and send you the travel data for both joysticks.
After your explanation above I wanted to add another data point for you into the mix.
As mentioned I did get Mechwarrior 2 running under DOSBOX - it is a very difficult program to set up under a DOS VDM so it is hard to install it there for comparison purposes. (one of the reasons I use DOSBOX is that things just work almost immediately, complex or no.
The data point I wanted to relate was a comparison between the last xevents which we created for the old Mk II Thrustmaster amd xeventsf1d, which I'm using to run the T.Flight.
Running the training missions (there are four in the game), the older Thrustmaster performs beautifully - stable movement, crisp response on the movement and buttons - no hat functions, but we know about that.
Using the newer xeventsf1d and the T. Flight, sitting in place is quite jittery even after re-calibrating the joystick - controls work but you do see on movement the jitter effect, requiring a fair amount of course correction, which I do not need to do with the older joystick with the older xevents.
I don't know if you think that has any significance, Wim or whether it may be simply that the newer Joystick is more sensitive and has faster response. Is there much difference in the two command files, now, after your modifications? I was thinking of modifying the newer f1d file for use with the older joystick and testing that out - would that be easily feasible?
I should mention also that I chose Mechwarrior 2 as a new advanced test program as it actually has support for the Thrustmaster Mk 2 built in, and the T.Flight seems in other games to follow along nicely with testing of the older Thrustmaster in other games.
I'm almost tempted to see if I can find another of the T.Flight Thrustmasters and ship it to you for testing yourself - I found mine on eBay for a good price - new here they run about $95.00 Cnd - got mine for around $35.00 Cnd used.
I was also curious as to what happens when you get the lock on your laptop?
I'm actually running tests on a tower, with an AMD hexcore processor and 3 Gb of usable memory installed (actually 8 GB in the system, but ArcaOS is not seeing the rest). Occasionally after installing the gamepad package previous to 2022-05-17 and with the current one, I've gotten a black screen trap, attempting to start a game with one of the xevents packages active.
I've attached a photo of the trap screen, if it is of any help - I have not determined a particular reason why it happens at the moment as I've only seen it four times and Best!
M