Unable to do small movements with Joystcik

Any issues with the XWAU or X-Wing Alliance? Please let us know here!

Re: Unable to do small movements with Joystcik

Mr_Blastman
Cadet 4th Class
Posts: 21
Joined: Sat Aug 22, 2009 5:01 am

Post by Mr_Blastman » Sat Jun 20, 2020 9:31 pm

So I have manually edited the xwingalliance.exe at the offset mentioned earlier in this thread, replacing 51 with C3, and there's still a very noticeable deadzone in the game. My HOTAS is exceptionally precise and I can control flight sims with my fingertips around the center, or even draw letters, but in XWA, it isn't until I move dramatically off center before the craft starts moving in game. I am using a modded hall sensor CNC machine gimballed HOTAS Cougar, so the throw of the stick if rather large.

Any way to remove the deadzone completely?

DuckOfLuck
Recruit
Posts: 6
Joined: Tue Jun 23, 2020 10:46 pm

Post by DuckOfLuck » Wed Jun 24, 2020 2:22 am

Mr_Blastman wrote:
Sat Jun 20, 2020 9:31 pm
So I have manually edited the xwingalliance.exe at the offset mentioned earlier in this thread, replacing 51 with C3, and there's still a very noticeable deadzone in the game. My HOTAS is exceptionally precise and I can control flight sims with my fingertips around the center, or even draw letters, but in XWA, it isn't until I move dramatically off center before the craft starts moving in game. I am using a modded hall sensor CNC machine gimballed HOTAS Cougar, so the throw of the stick if rather large.

Any way to remove the deadzone completely?
Echoing this, I have looked at the Joystick Gremlin readout ingame and found that there still exists a deadzone at the ~10% level before the ship responds, whether I edit the binary directly or run the joystick_ff hook.

Chri360936
Cadet 3rd Class
Posts: 39
Joined: Thu Jun 20, 2019 3:28 am

Post by Chri360936 » Wed Jun 24, 2020 6:11 pm

Maybe someone can confirm this for me. I see a difference in control if I adjust the force feedback settings in the in game menu, even though I don't have or use FF. I also changed to joystick hook setting to -1 in the hook itself.

Let me know if anyone else notices any difference changing these settings.

User avatar
JeremyaFr
XWAU Member
Posts: 3922
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Wed Jun 24, 2020 6:41 pm

Hello,
About the deadzone, you can try that:

Code: Select all

At offset 10AE69, replace 7E22 with 9090.
At offset 10AEAE, replace 7E2F with 9090.

DuckOfLuck
Recruit
Posts: 6
Joined: Tue Jun 23, 2020 10:46 pm

Post by DuckOfLuck » Thu Jun 25, 2020 3:18 am

JeremyaFr wrote:
Wed Jun 24, 2020 6:41 pm
Hello,
About the deadzone, you can try that:

Code: Select all

At offset 10AE69, replace 7E22 with 9090.
At offset 10AEAE, replace 7E2F with 9090.
That did it, bravo! Care to share what this is doing in-code so us newcomers can follow along?

Mr_Blastman
Cadet 4th Class
Posts: 21
Joined: Sat Aug 22, 2009 5:01 am

Post by Mr_Blastman » Thu Jun 25, 2020 6:25 am

JeremyaFr wrote:
Wed Jun 24, 2020 6:41 pm
Hello,
About the deadzone, you can try that:

Code: Select all

At offset 10AE69, replace 7E22 with 9090.
At offset 10AEAE, replace 7E2F with 9090.
You Sir are a wizard!

How'd you figure out how to do that?

Thank you!!!!!!!!!!!!

User avatar
Ace Antilles
Admiral (Moderator)
Posts: 7829
Joined: Sat Jan 22, 2000 12:01 am
Contact:

Post by Ace Antilles » Thu Jun 25, 2020 10:53 am

JeremyaFr wrote:
Wed Jun 24, 2020 6:41 pm
Hello,
About the deadzone, you can try that:

Code: Select all

At offset 10AE69, replace 7E22 with 9090.
At offset 10AEAE, replace 7E2F with 9090.
Thanks. I assume these recent additions will get added to the Hook sometime?
I'll wait and see how that goes first I think :)
Chief XWAU Team annoying nitpicker.
Ace Antilles - The X-Wing Outpost
Image

User avatar
JeremyaFr
XWAU Member
Posts: 3922
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Thu Jun 25, 2020 12:35 pm

Hello,
Since the patch works fine, I will add it to the joystick hook.

User avatar
JeremyaFr
XWAU Member
Posts: 3922
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Thu Jun 25, 2020 7:03 pm

UPDATE

Hello,
I've included the patch into the joystick hook.

Reimar
Cadet 1st Class
Posts: 239
Joined: Mon Jan 19, 2009 11:45 am

Post by Reimar » Thu Jun 25, 2020 7:18 pm

Hi Jeremya, could you give me a hint if the earlier "ret" patch is still relevant or just the latest NOP of the conditional jumps is really related?
The reason I ask is because I've been putting versions of these for X-Wing, TIE and XvT in my ddraw.dll so people can profit from these improvements even in the older games.
I'd obviously like to do the right thing, but really understanding the code is a bit more effort than I can manage, so would appreciate if you have a minute to clarify :)
Thanks a lot!

User avatar
JeremyaFr
XWAU Member
Posts: 3922
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Thu Jun 25, 2020 7:33 pm

Hi Reimar,
Both patches are included in the hook.
You can see the offsets in the readme.

For the other games, I think you can search the code where the joyGetPosEx function is called.

Reimar
Cadet 1st Class
Posts: 239
Joined: Mon Jan 19, 2009 11:45 am

Post by Reimar » Thu Jun 25, 2020 9:27 pm

JeremyaFr wrote:
Thu Jun 25, 2020 7:33 pm
Both patches are included in the hook.
You can see the offsets in the readme.

For the other games, I think you can search the code where the joyGetPosEx function is called.
Thanks! Should have thought of the readme myself!
Yes, I found the offsets for the other games (the code is pretty much identical, except for XvT where the code seems weirdly un-optimized), and pushed a comment listing them all.
Now just for a larger piece of free time to implement and test them, too :D

User avatar
Mouseplay
Recruit
Posts: 7
Joined: Thu Apr 14, 2011 4:45 pm
Contact:

Post by Mouseplay » Mon Jul 27, 2020 12:48 pm

Thanks KuMoNKo for telling us about that vJoy and Joystick Gremlin trick. It works on the DOS versions when using DosBox. :thumbs:
KuMoNKo wrote:
Sun Mar 15, 2020 4:15 pm
OK. After some testing I managed to stop that unability to fine aim. My solution is not conventional at all, but it works.
Basically, I reinstalled vjoy and joystick gremlin, and then setup a curve where vjoy starts to register values in 0.1. The curve looks like the one in the image.
gremlincurve.png
With a curve like this I can even head-to-head sometimes (given I am a really bad pilot XD)

regards
Asus® P5K Pro
Corsair X64 SSD System Drive
Intel® Core™ 2 Quad Q6600 @ 3.6 GHz
Gigabyte™ GTX 460 1GB OC @ 840/2100
OCZ Platinum 2x 1GB PC2-6400 4-5-4-15
Corsair® Dominator™ 2x 1GB PC2-8500 5-5-5-15

KuMoNKo
Cadet 4th Class
Posts: 14
Joined: Sat Dec 14, 2019 9:36 pm

Post by KuMoNKo » Tue Jul 28, 2020 4:06 pm

Glad it helped elsewhere. It has to be useful in any program where the deadzone is hardcoded. Mostly old DOS and Windows 3.x/9x games I think.

Quake
Recruit
Posts: 2
Joined: Sat Jun 26, 2021 4:07 am

Post by Quake » Sat Jun 26, 2021 4:15 am

JeremyaFr wrote:
Sat Apr 04, 2020 9:23 pm
Hello,
To allow small movements, you can try this patch:

Code: Select all

At offset 0338A0, replace 51 with C3.
Hi @JeremyaFr, would you by any chance know what offset this would be in the original game binary (version 2.02)? I'd like to play the vanilla game again after a long time, but the deadzone is way too annoying.

Quake
Recruit
Posts: 2
Joined: Sat Jun 26, 2021 4:07 am

Post by Quake » Sat Jun 26, 2021 4:28 am

Quake wrote:
Sat Jun 26, 2021 4:15 am
JeremyaFr wrote:
Sat Apr 04, 2020 9:23 pm
Hello,
To allow small movements, you can try this patch:

Code: Select all

At offset 0338A0, replace 51 with C3.
Hi @JeremyaFr, would you by any chance know what offset this would be in the original game binary (version 2.02)? I'd like to play the vanilla game again after a long time, but the deadzone is way too annoying.
Actually nevermind, the followup edit you posted did it even for me, many thanks!

Mr_Blastman
Cadet 4th Class
Posts: 21
Joined: Sat Aug 22, 2009 5:01 am

Post by Mr_Blastman » Mon May 08, 2023 2:04 am

Been a while. I the latest 5.6 release how do I set deadzone to 0 on X and Y joystick axis? Do I still need to hex edit the config file, or is there a built in way now?

I clicked on "enable small joystick movements" in the joystick configuration tool and that has no effect.

edit:

Nevermind
This works

I had my deadzone somehow turned on with my hotas config software, but I also added a line to hooks.ini:
[hook_joystick_ff]
EnableSmallMovement = 1


Withink the Joystick Config tool I set "Enable small movement" and set every value to 0

Thanks for everyone's ongoing work with this!

Post Reply