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

User avatar
XDragon
Cadet 1st Class
Posts: 119
Joined: Tue Jan 29, 2008 12:01 am
Contact:

Post by XDragon » Mon May 18, 2020 1:35 pm

Hey Ace, i honestly believe it's due to the age of the computer, it's pushing a decade at this point and the graphics/processor. Lower resolution with the new effects worked well, though there was always massive slowdown on exiting hyperspace but the ships were responsive. At higher resolutions, there was significant delay and stuttering with flight movements. I eventually uninstalled the new effects and it went back to normal.
Founder of Z3R0 (Zero Command)
https://xdragon2688.wixsite.com/z3ro/

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

Post by KuMoNKo » Thu May 28, 2020 12:43 am

Ace Antilles wrote:
Sat May 16, 2020 6:55 pm
Hi. Do you have a profile for this you can share please?
Flying XWA with my Logitech Extreme 3D pro can be annoying at times. I put this program on but I have no clue what I am doing lol
Thanks a lot.
Hi
Sorry, I didn't notice the question before.
I think my profile is not useful to anyone but me, as every button except 1 are mapped to kb directly.
Anyway, try this:
  • setup a vjoystick device. mine is like follows
    vjoy_thurstmastertflighthotas.png
  • on joystick-gremlin create a 1:1 mapping
  • on the vjoystick tab add a curve for each axis, note that your new curve will be straight line, its OK like that for now.
    gremlinconfig.png
  • save the profile and close joystick-gremlin
  • edit the xml and search for something similar to this

    Code: Select all

        
        </devices>
        <vjoy-devices>
            <vjoy-device device-guid="{8F6AD620-3E41-11E8-8002-444553540000}" label="" name="vJoy Device" type="vjoy">
                <mode name="Default">
    
    Note that the device guid is probably different in your system.
  • delete the axis 1 and 2 tags and their contents (I'm taking for granted you know some XML basics, if you dont, just ask :))
  • insert this code in place of the deleted one:

    Code: Select all

                    
                    <axis description="" id="1">
                        <container type="basic">
                            <action-set>
                                <response-curve>
                                    <mapping type="cubic-bezier-spline">
                                        <control-point x="-1.0" y="-1.0"/>
                                        <control-point x="-0.532" y="-0.128"/>
                                        <control-point x="-0.501" y="-0.1"/>
                                        <control-point x="-0.001" y="-0.1"/>
                                        <control-point x="0.091" y="-0.1"/>
                                        <control-point x="-0.091" y="0.1"/>
                                        <control-point x="0.001" y="0.1"/>
                                        <control-point x="0.501" y="0.1"/>
                                        <control-point x="0.532" y="0.128"/>
                                        <control-point x="1.0" y="1.0"/>
                                    </mapping>
                                    <deadzone center-high="0.0" center-low="0.0" high="1.0" low="-1.0"/>
                                </response-curve>
                            </action-set>
                        </container>
                    </axis>
                    <axis description="" id="2">
                        <container type="basic">
                            <action-set>
                                <response-curve>
                                    <mapping type="cubic-bezier-spline">
                                        <control-point x="-1.0" y="-1.0"/>
                                        <control-point x="-0.528" y="-0.124"/>
                                        <control-point x="-0.477" y="-0.10400000000000001"/>
                                        <control-point x="-0.001" y="-0.1"/>
                                        <control-point x="0.115" y="-0.1"/>
                                        <control-point x="-0.115" y="0.1"/>
                                        <control-point x="0.001" y="0.1"/>
                                        <control-point x="0.477" y="0.10400000000000001"/>
                                        <control-point x="0.528" y="0.124"/>
                                        <control-point x="1.0" y="1.0"/>
                                    </mapping>
                                    <deadzone center-high="0.0" center-low="0.0" high="1.0" low="-1.0"/>
                                </response-curve>
                            </action-set>
                        </container>
                    </axis>
    
  • Open the profile on joystick-gremlin again and check the curves are like the one in the image now
Once this is done, open the profile on joystick-gremlin again, press the gamepad button and you are done.
*Be sure to select vjoystick as your input method in windows and xwa.

PD: Just for completion, the final 1:1 profile for my joystick and vjoy device is:

Code: Select all

<?xml version="1.0" ?>
<profile version="9">
    <devices>
        <device device-guid="{6F1D2B61-D5A0-11CF-BFC7-444553540000}" label="" name="keyboard" type="keyboard">
            <mode name="Default"/>
        </device>
        <device device-guid="{D0BF0050-3D70-11E8-8002-444553540000}" label="" name="T.Flight Hotas X" type="joystick">
            <mode name="Default">
                <axis description="" id="1">
                    <container type="basic">
                        <action-set>
                            <remap axis="1" axis-scaling="1.0" axis-type="absolute" vjoy="1"/>
                        </action-set>
                    </container>
                </axis>
                <axis description="" id="2">
                    <container type="basic">
                        <action-set>
                            <remap axis="2" axis-scaling="1.0" axis-type="absolute" vjoy="1"/>
                        </action-set>
                    </container>
                </axis>
                <axis description="" id="3">
                    <container type="basic">
                        <action-set>
                            <remap axis="3" axis-scaling="1.0" axis-type="absolute" vjoy="1"/>
                        </action-set>
                    </container>
                </axis>
                <axis description="" id="6">
                    <container type="basic">
                        <action-set>
                            <remap axis="6" axis-scaling="1.0" axis-type="absolute" vjoy="1"/>
                        </action-set>
                    </container>
                </axis>
                <axis description="" id="7">
                    <container type="basic">
                        <action-set>
                            <remap axis="7" axis-scaling="1.0" axis-type="absolute" vjoy="1"/>
                        </action-set>
                    </container>
                </axis>
                <button description="" id="1">
                    <container type="basic">
                        <action-set>
                            <remap button="1" vjoy="1"/>
                        </action-set>
                    </container>
                </button>
                <button description="" id="2">
                    <container type="basic">
                        <action-set>
                            <remap button="2" vjoy="1"/>
                        </action-set>
                    </container>
                </button>
                <button description="" id="3">
                    <container type="basic">
                        <action-set>
                            <remap button="3" vjoy="1"/>
                        </action-set>
                    </container>
                </button>
                <button description="" id="4">
                    <container type="basic">
                        <action-set>
                            <remap button="4" vjoy="1"/>
                        </action-set>
                    </container>
                </button>
                <button description="" id="5">
                    <container type="basic">
                        <action-set>
                            <remap button="5" vjoy="1"/>
                        </action-set>
                    </container>
                </button>
                <button description="" id="6">
                    <container type="basic">
                        <action-set>
                            <remap button="6" vjoy="1"/>
                        </action-set>
                    </container>
                </button>
                <button description="" id="7">
                    <container type="basic">
                        <action-set>
                            <remap button="7" vjoy="1"/>
                        </action-set>
                    </container>
                </button>
                <button description="" id="8">
                    <container type="basic">
                        <action-set>
                            <remap button="8" vjoy="1"/>
                        </action-set>
                    </container>
                </button>
                <button description="" id="9">
                    <container type="basic">
                        <action-set>
                            <remap button="9" vjoy="1"/>
                        </action-set>
                    </container>
                </button>
                <button description="" id="10">
                    <container type="basic">
                        <action-set>
                            <remap button="10" vjoy="1"/>
                        </action-set>
                    </container>
                </button>
                <button description="" id="11">
                    <container type="basic">
                        <action-set>
                            <remap button="11" vjoy="1"/>
                        </action-set>
                    </container>
                </button>
                <button description="" id="12">
                    <container type="basic">
                        <action-set>
                            <remap button="12" vjoy="1"/>
                        </action-set>
                    </container>
                </button>
                <hat description="" id="1">
                    <container type="basic">
                        <action-set>
                            <remap hat="1" vjoy="1"/>
                        </action-set>
                    </container>
                </hat>
            </mode>
        </device>
    </devices>
    <vjoy-devices>
        <vjoy-device device-guid="{8F6AD620-3E41-11E8-8002-444553540000}" label="" name="vJoy Device" type="vjoy">
            <mode name="Default">
                <axis description="" id="1">
                    <container type="basic">
                        <action-set>
                            <response-curve>
                                <mapping type="cubic-bezier-spline">
                                    <control-point x="-1.0" y="-1.0"/>
                                    <control-point x="-0.532" y="-0.128"/>
                                    <control-point x="-0.501" y="-0.1"/>
                                    <control-point x="-0.001" y="-0.1"/>
                                    <control-point x="0.091" y="-0.1"/>
                                    <control-point x="-0.091" y="0.1"/>
                                    <control-point x="0.001" y="0.1"/>
                                    <control-point x="0.501" y="0.1"/>
                                    <control-point x="0.532" y="0.128"/>
                                    <control-point x="1.0" y="1.0"/>
                                </mapping>
                                <deadzone center-high="0.0" center-low="0.0" high="1.0" low="-1.0"/>
                            </response-curve>
                        </action-set>
                    </container>
                </axis>
                <axis description="" id="2">
                    <container type="basic">
                        <action-set>
                            <response-curve>
                                <mapping type="cubic-bezier-spline">
                                    <control-point x="-1.0" y="-1.0"/>
                                    <control-point x="-0.528" y="-0.124"/>
                                    <control-point x="-0.477" y="-0.10400000000000001"/>
                                    <control-point x="-0.001" y="-0.1"/>
                                    <control-point x="0.115" y="-0.1"/>
                                    <control-point x="-0.115" y="0.1"/>
                                    <control-point x="0.001" y="0.1"/>
                                    <control-point x="0.477" y="0.10400000000000001"/>
                                    <control-point x="0.528" y="0.124"/>
                                    <control-point x="1.0" y="1.0"/>
                                </mapping>
                                <deadzone center-high="0.0" center-low="0.0" high="1.0" low="-1.0"/>
                            </response-curve>
                        </action-set>
                    </container>
                </axis>
                <axis description="" id="3">
                    <container type="basic">
                        <action-set>
                            <response-curve>
                                <mapping type="cubic-spline">
                                    <control-point x="-1.0" y="-1.0"/>
                                    <control-point x="1.0" y="1.0"/>
                                </mapping>
                                <deadzone center-high="0.0" center-low="0.0" high="1.0" low="-1.0"/>
                            </response-curve>
                        </action-set>
                    </container>
                </axis>
                <axis description="" id="6">
                    <container type="basic">
                        <action-set>
                            <response-curve>
                                <mapping type="cubic-spline">
                                    <control-point x="-1.0" y="-1.0"/>
                                    <control-point x="1.0" y="1.0"/>
                                </mapping>
                                <deadzone center-high="0.0" center-low="0.0" high="1.0" low="-1.0"/>
                            </response-curve>
                        </action-set>
                    </container>
                </axis>
                <axis description="" id="7">
                    <container type="basic">
                        <action-set>
                            <response-curve>
                                <mapping type="cubic-spline">
                                    <control-point x="-1.0" y="-1.0"/>
                                    <control-point x="1.0" y="1.0"/>
                                </mapping>
                                <deadzone center-high="0.0" center-low="0.0" high="1.0" low="-1.0"/>
                            </response-curve>
                        </action-set>
                    </container>
                </axis>
                <button description="" id="1"/>
                <button description="" id="2"/>
                <button description="" id="3"/>
                <button description="" id="4"/>
                <button description="" id="5"/>
                <button description="" id="6"/>
                <button description="" id="7"/>
                <button description="" id="8"/>
                <button description="" id="9"/>
                <button description="" id="10"/>
                <button description="" id="11"/>
                <button description="" id="12"/>
                <hat description="" id="1"/>
            </mode>
        </vjoy-device>
    </vjoy-devices>
    <settings>
        <default-delay>0.05</default-delay>
    </settings>
    <plugins/>
</profile>
You do not have the required permissions to view the files attached to this post.

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

Post by Ace Antilles » Thu May 28, 2020 3:30 am

Thank you for the guide KuMoNKo :)
It's too late today for me to get my head around that but I'll take a look at it and see if I can work it out.
Much appreciate you getting back to me
Chief XWAU Team annoying nitpicker.
Ace Antilles - The X-Wing Outpost
Image

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

Post by Ace Antilles » Sat Jun 06, 2020 12:18 am

KuMoNKo wrote:
Thu May 28, 2020 12:43 am
*snip*
Thank you very much for your guide :) I seem to have set it up right. Would have had no clue!
I just need to see if it works for me or can notice the difference.
I appreciate the help.
Chief XWAU Team annoying nitpicker.
Ace Antilles - The X-Wing Outpost
Image

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: 3921
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: 3921
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: 3921
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: 3921
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