Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Wim Brul

Pages: 1 [2] 3 4 ... 20
16
Games / Re: DOS VDM - USB and Game port Gamepad support
« on: November 09, 2022, 05:18:45 pm »
Hi David,

..
  Here is the line I use in CONFIG.SYS:

DEVICE=C:\OS2\BOOT\USBECD.SYS /D:046D:C21#:4014 /N:$GAMEPD$ /S

 seems to work fine in XInput mode, not so in DirectInput mode.
..

I think that is because bcdDevice 4014 applies to XInput mode whereas bcdDevice 0414 applies to DirectInput mode.

Regards,
Wim

P.S. I am already lurking for quite a while now and gradually beginning to like to react again.

17
Games / Re: DOS VDM - USB and Game port Gamepad support
« on: June 16, 2022, 05:26:06 pm »
Hi Mark,

Quote
The only problem I foresee with that, Wim, is that you may be literally inundated with data from all sides, and it may overwhelm in that sense. You have already done a lot for this project, and being overwhelmed is the last thing we want, because, strangely you also have a life.

Thank you Mark, for your compassion. Right now I am already grinding to a standstill. This is all too much for me to handle. In light of my health I have to let go.

Will send you an email soon.

Best regards, Wim.

18
Games / Re: DOS VDM - USB and Game port Gamepad support
« on: June 15, 2022, 10:11:37 am »
Hi Martin and Mark,

I am a little bit disappointed. What you are doing is not the way to go. The "PlayStation 3 controller (USB Connected)" and the "Genius MaxFighter F-31U Vibration" are controllers not yet tested at all. Remember the method we used in the past. You need to follow the step by step approach as outlined in the "testing.txt" files that are part of the package. For the huskee device that procedure starts as follows:

Code: [Select]
Installation Instructions - Part A
==================================

A1. Ensure that USBECD.SYS has been installed.

A2. Put the following line in your CONFIG.SYS file:
(Use the proper drive and directory for your system).

DEVICE=H:\OS2\BOOT\USBECD.SYS /D:0C12:0005:0001 /N:$HUSKEE$ /V

A3. Reboot your system.

A4. Run OINPUT.CMD and watch gamepad events in hexadecimal format.
Use Ctrl+C to end this procedure.

Once this is working I would like you to do the following:
---------------------------------------------------------

A5. Run OINPUT.CMD > BUTTON.LOG and press available buttons
(one at a time, after each other, and tell me which ones)
Use Ctrl+C to end this procedure.

A6. Run OINPUT>CMD > STICK.LOG and press stick to different positions
(one at a time, after each other, and tell me what positions)
Use Ctrl+C to end this procedure.

Send me files BUTTON.LOG and STICK.LOG for me to inspect.
--------------------------------------------------------

Since you are preparing oinput.cmd yourself for these new devices, you have to prepare the corresponding testing.text accordingly. It is waste of time and effort to skip these steps.

I am currently investigating what needs to be done to provoke the "PlayStation 3 controller (USB Connected)" to send event records so step A4. can be completed succesfully.

I understand that for the "Genius MaxFighter F-31U Vibration" step A4. has been completed successfully. Why not append some of that output for me to inspect?

Best regards, Wim.

19
Games / Re: DOS VDM - USB and Game port Gamepad support
« on: June 12, 2022, 09:26:08 pm »
Hi Martin,
Hi

I want to try the PlayStation 3 controller (USB Connected).

I had added this on the config.sys:
Code: [Select]
DEVICE=X:\OS2\BOOT\USBECD.SYS /D:054C:0268:0100 /N:$PSX3$ /V
I had changed the "HUSKEE" oiput and xevents scripts to point to "$PSX3$". In xevents I had updated "Line 13" (or 14?) to point to "054C:0268:0100", but I get no output from the scripts. I guess it is not as simple as that.

Any tips?

Regards
Since this controller has not been tried and tested before, it is best to prepare a new oinput.cmd first.
From the attached lsusb -v report (PSX3controller.txt) I learned that it uses 64 byte input records.
I have prepared oinput64.cmd that I attach here for you to tryout first.

Best regards,
Wim.

20
Games / Re: DOS VDM - USB and Game port Gamepad support
« on: June 11, 2022, 06:21:18 pm »
Hi Mark and Martin,

Right now I am reviewing the Testing Guide for Game Controllers - v1.2, in PDF, as attached earlier by Mark Szkolnicki.

Mark, I will send you an email with my comments as soon as possible. Will take some time though.

Martin, I think it is best to wait for Mark to have digested and incorporated my comments.

Best regards, Wim .

21
Games / Re: DOS VDM - USB and Game port Gamepad support
« on: May 23, 2022, 09:17:42 am »
Hi Jochen,
Thanks Wim.

I will try that code snippets and build a test version.


Bye Jochen
Thank you. NOTE1: I have updated lines 440 thru 442 with the new code rather than the old code. NOTE2: Modified line 551 later on too (with proper code I hope)!

Sorry, but this is nowadays really difficult for me to do.

Regards, Wim.

22
Games / Re: DOS VDM - USB and Game port Gamepad support
« on: May 22, 2022, 01:14:30 pm »
Hi Jochen,

I don't know when I can get to it, but I will look into it.
Thank you. For starters I tried and modified SDL_os2joystick.c myself. I could send the modified source code to you or append it here. Please advice.

I replaced lines 440 thru 442 with the following:
Code: [Select]
                        joystick->hwdata->transaxes[i].offset = SYS_JoyData[index].axes_med[i];
                        joystick->hwdata->transaxes[i].scale1 = (float)(SDL_JOYSTICK_AXIS_MIN/(SYS_JoyData[index].axes_med[i]-SYS_JoyData[index].axes_min[i]));
                        joystick->hwdata->transaxes[i].scale2 = (float)(SDL_JOYSTICK_AXIS_MAX/(SYS_JoyData[index].axes_max[i]-SYS_JoyData[index].axes_med[i]));

I replaced lines 550 thru 560 with the following:
Code: [Select]
                value = pos[i];
                if (value < transaxes[i].offset)
                {
                        value = (transaxes[i].offset - value) * transaxes[i].scale1;
                        if (value < SDL_JOYSTICK_AXIS_MIN) value = SDL_JOYSTICK_AXIS_MIN;
                }
                else
                {
                        value = (value - transaxes[i].offset) * transaxes[i].scale2;
                        if (value > SDL_JOYSTICK_AXIS_MAX) value = SDL_JOYSTICK_AXIS_MAX;
                }
 
What I am after is that you build an SDL1 test version of DOSBox for us to try out.
I regard this still very experimental, so not yet suitable for an official release.

EDIT1: 20220523 - Updated lines 440 thru 442 with the new code!
EDIT2: 20220523 - Updated line 551 too (with proper code I hope!

23
Games / Re: DOS VDM - USB and Game port Gamepad support
« on: May 20, 2022, 09:47:19 pm »
Hallo Jochen,
What would be the correct algorithm? Since we have the code, we could fix that. Most likely the code in SDL2 is also wrong, because it is a straight port of the SDL1 code.
I think that my proposed algorithm is the correct algorithm. See my original post.

First the calculation of the offset, scale1 and scale2:
Code: [Select]
offset = axis_center
scale1 = SDL_JOYSTICK_AXIS_MIN / (axis_lower - axis_center)
scale2 = SDL_JOYSTICK_AXIS_MAX / (axis_upper - axis_center)

Followed by the recalculation for all axes:
Code: [Select]
if (axis < axis_center)
then axis = (axis - offset) * scale1
else axis = (axis - offset) * scale2

This has of course to be substituted in SDL_os2joystick.c at the right places. Too difficult for me to do.

Cheers,
Wim.

24
Games / Re: DOS VDM - USB and Game port Gamepad support
« on: May 20, 2022, 02:55:43 pm »
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:

Code: [Select]
/* 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
  /* recalculate axis value */
  if (axis < axis_center)
  then value = (axis - offset) * scale1
  else value = (axis - offset) * scale2
  /* show axis input and output values */
  say axis value
end

Best regards,
Wim.

25
Games / Re: DOS VDM - USB and Game port Gamepad support
« on: May 17, 2022, 04:02:40 pm »
Hi Mark,

Congratulations with your upcoming birthday. I celebrated mine last Saturday with my family. Clicking my picture reveals my new age.

Quote
Just installed your new gamepad driver set (gamepad-20220511) and have ran into a problem in DOSBOX in Wolfenstein.

Start-up is fine and runs through the start-up screens (3) as per normal, but then the game immediately shows the messages for ending or continuing the program, where the response Y or N is required. Typing N simply goes to an alternate version of the same shutdown challenge. Typing Y ends the program.
When I implemented the missing functions I made a mistake. This resulted into all 4 buttons being signalled as being pressed on startup. Fixed now.

Quote
Hat functions on the Thrustmaster joysticks still not being recognized under DOSBOX
Perhaps I made another mistake. I did some experimenting and failed to change some values back the way these were before. Try the attached version.

Like before you need to copy *.sym and *.sys files to \OS2\MDOS and copy TRC00E8.TFF to \OS2\SYSTEM\TRACE and then reboot your system.

Happy birthday,

Wim.

26
Games / Re: DOS VDM - USB and Game port Gamepad support
« on: May 11, 2022, 11:51:47 pm »
Hi Mark,

Quote
I was able to move both east and south under Dark Forces, after calibration there, so I went back to Wolfenstein and recalibrated, and both east and south movement is now possible with both joysticks, in both Wolfenstein and Dark Forces, so what I said previously may be a moot point.
Probably not. My experience was that, although Wolfenstein 3D worked after calibration, I still had to recalibrate always first. That was not necessary when running outside DOSBox. So I tweaked gamedd.sys a little bit to remedy that. See attached. Now I don't need to recalibrate anymore and joycheck.exe and TMScope are working satisfactorily too. In dosbox.conf I need to have joysticktype=auto, timed=true and deadzone=0 for that.

Quote
I also played Dark Forces for over 45 minutes without any indication of Loss of Focus and played around with TMScope for over 30 minutes with no freezing requiring input from the keyboard to unlock the joystick, so indeed it might be different between environments. The joystick(s) are both playing nicely with both the keyboard and mouse under DOSBOX.
Makes sense. I have to use Martin Kiewitz's vCOMPAT.SYS with COMPATIBILITY_DPMI_CLI set ON in order to get several games to run.

Quote
This has been a very interesting experience, Wim, in beta testing, and you make an excellent teammate in same. I think we're making great progress in this and Best!
Yes we do. Thank you for that. It is a pleasure working with you.

Regards, Wim.

27
Games / Re: DOS VDM - USB and Game port Gamepad support
« on: May 10, 2022, 12:44:24 am »
Hi Mark, you wrote earlier:
Quote
I'm also curious as to whether you ever attempted to run Wolfenstein 3D under DOSBOX?
No Mark, I did not until today, when I felt the time was right to install DOSBox, and see for myself what's (not) going on...

And Jochen Schäfer wrote:
Quote
SDL 1, which is used by DOSBOX, has native joystick support, so in theory Wim's USB drivers should be available in SDL 1.   
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.

28
Games / Re: DOS VDM - USB and Game port Gamepad support
« on: May 07, 2022, 06:24:45 pm »
Hi Mark,

Quote
Tried xeventsf1c and it was slightly better with hat function - pointing N with the hat registered as north on the TMScope hat display - however, pointing W, S or E all pointed East.

Running Comanche 2, the program is indeed recognizing the hat on the newer Thrustmaster - I can still see north, but pushing any of the other hat directions with the new joystick has me glancing right (which corresponds to the east hat direction).

I know that with the xevents.cmd designed for the older Thrustmaster Joystick, the hat worked perfectly, other than the Loss of Focus problem - would you like me to modify the newest xeventsF1c to address the older joystick and test that?
No need for you to modify xeventsF1c.cmd to test with the older joystick. You got me already its hat input values. I looked at it again and it appears that even higher hat position values are required. So I modified xeventsF1c.cmd into xeventsF1d.cmd to do that. You will find it in gamepad-20220507.zip attached.

As mentioned earlier, I am currently working on a new version of gamevdd.sys and gamedd.sys such that joystick speed is reduced. With it, joycheck.exe works alright on my laptop. This version is still very experimental. I removed the GAME_DIRECT_ACCESS property and added tracing (trace code 232). I am slowly learning how it works altogether. To update your installation of gamepad-20220317.zip you need to copy *.sym and *.sys files to \OS2\MDOS and copy TRC00E8.TFF to \OS2\SYSTEM\TRACE and to reboot your system.

Cheers, Wim.

29
Games / Re: DOS VDM - USB and Game port Gamepad support
« on: May 05, 2022, 08:01:31 pm »
Hi Mark,

Quote
Using TMScope I found that the hat, when manipulated in any direction (N,S,W,E) always pointed to the north on the hat display - still had Loss of Focus.
I have modified xeventsF1b.cmd into xeventsF1c.cmd such that hat positional values are larger than before. Since TMScope averages hat values, be slow on input.

Quote
Running Castle Wolfenstein - both buttons 0 and 1 (Trigger 0 and Button 1, as identified in the game) functioned - for some reason although B3 is mapped when you originally install the game, after calibrating the joystick I cannot get it to be identified afterwards.
Wolfenstein 3D requires both "Joystick Enabled" and "Gravis GamePad Enabled" for B2 and B3 to be recognized. Once I did that, pressing B3 worked for me.

Quote
Loss of Focus was again noted requiring keyboard presses, but I tend to use the arrow keys more than the joystick for movement, as a joystick really is too sensitive on a new system for tiny adjustments (tends to move too fast when trying to focus on the enemy). However for firing and opening doors the buttons are perfect.
I am currently working on a new version of gamevdd.sys and gamedd.sys such that joystick speed is reduced. With it, joycheck.exe works alright on my laptop.

Best regards, Wim.

30
Games / Re: DOS VDM - USB and Game port Gamepad support
« on: April 29, 2022, 11:56:48 am »
Hi Mark,

Thank you for your efforts. From the lsusb report I learned that its input reports are only 7 bytes long. Right now we obtain 8 byte input records and check the 8th byte for certain values. That is why those HUH? packets were encountered. Although it would be best to change xeventsF1a.cmd to work with 7 byte input records, I modified xeventsF1a.cmd into xeventsF1b.cmd to stay at working with 8 byte packets and to ignore these Huh? packets for the time being. That would be the next step when I find more time.

With xeventsF1b.cmd buttons 5,6,7,8 are mapped into buttons 1,2,3,4 as these were before and buttons 9,10 are ignored as these were before. I have added the lacking hat movement. The z-axis movement is now ignored. I also changed the 4 seconds default timeout while obtaining input reports into infinite timeout. Perhaps that helps to cure the "Lost of Focus" problem. Other measures to cure the "Lost of Focus" problem could be to remove the logging functionality altogether or even write an assembly program like I did for the bamboo and intuos finger and pen tablets.

Best, Wim.

Pages: 1 [2] 3 4 ... 20