changing PS4 controller curve

Gtuner IV general support. Operation, questions, updates, feature request.

changing PS4 controller curve

Postby Showcase » Fri Jul 24, 2020 10:34 pm

Is there a way to use my PS4 controller (full max sens in game) and change the curve in GTuner, like you do with mouse!

More like a Stick sens. remapping
User avatar
Showcase
Master Sergeant
Master Sergeant
 
Posts: 26
Joined: Fri Jul 17, 2020 6:41 pm

Re: changing PS4 controller curve

Postby Scachi » Fri Jul 24, 2020 10:42 pm

Not as simple as with the Input Translator for the mouse for a custom controller curve.
Here is a post with something like that requiring quite a bit manual/coding work: viewtopic.php?f=26&t=15131
Here is a different user doing something similar:
viewtopic.php?f=26&t=15255
User avatar
Scachi
Brigadier General
Brigadier General
 
Posts: 3044
Joined: Wed May 11, 2016 6:25 am
Location: Germany

Re: changing PS4 controller curve

Postby Showcase » Fri Jul 24, 2020 11:29 pm

ok, it looks promising if one could translate the curve to code thanks
User avatar
Showcase
Master Sergeant
Master Sergeant
 
Posts: 26
Joined: Fri Jul 17, 2020 6:41 pm

Re: changing PS4 controller curve

Postby Scachi » Sat Jul 25, 2020 7:12 am

Showcase wrote:ok, it looks promising if one could translate the curve to code thanks

Do your curve and paste the string of it here as written in this post (the first value has to start a zero):
viewtopic.php?f=26&t=15131#p97386

Then we can adjust this code by J2kbr for your values and it should work:
Code: Select all
main {
    set_val(STICK_1_X, stick_response(STICK_1_X));
    set_val(STICK_1_Y, stick_response(STICK_1_Y));
}
 
fix32 stick_response(uint8 idx) {
    const uint8 base[] = {
        0x00, 0x05, 0x0A, 0x0F, 0x14, 0x19, 0x1E, 0x23, 0x28, 0x2D, 0x32, 0x37,
        0x3C, 0x41, 0x46, 0x4B, 0x50, 0x55, 0x5A, 0x5F, 0x64
    };
    const uint8 cc[] = {
        0x00, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x24, 0x27, 0x2A,
        0x2D, 0x2F, 0x32, 0x35, 0x38, 0x40, 0x49, 0x52, 0x64
    };
 
    fix32 value = get_actual(idx);
    fix32 signal = (value >= 0.0 ? 1.0 : -1.0);
    value = abs(value);
 
    uint8 i = min((uint8)value / 5, 19);
    value = lerp((fix32)cc[i], (fix32)cc[i+1], (value - (fix32)base[i]) / 5.0);
 
    return(value * signal);
}
User avatar
Scachi
Brigadier General
Brigadier General
 
Posts: 3044
Joined: Wed May 11, 2016 6:25 am
Location: Germany

Re: changing PS4 controller curve

Postby Showcase » Mon Aug 03, 2020 6:12 pm

I think id like to try this:

const uint8 mxyc[] = { 0xFF, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x03, 0x07, 0x0A, 0x0D, 0x0F, 0x11, 0x13, 0x15, 0x18, 0x1B, 0x21, 0x27, 0x2F, 0x39, 0x43, 0x4E, 0x5B, 0x64, 0x64, 0x64 };

or if its this code needed:

GIVMXYF:FF0100010000000000000001000003070A0D0F111315181B21272F39434E5B646464
User avatar
Showcase
Master Sergeant
Master Sergeant
 
Posts: 26
Joined: Fri Jul 17, 2020 6:41 pm

Re: changing PS4 controller curve

Postby Showcase » Tue Aug 04, 2020 1:48 pm

Nevermind I figured it out :) Thanks, working perfect
User avatar
Showcase
Master Sergeant
Master Sergeant
 
Posts: 26
Joined: Fri Jul 17, 2020 6:41 pm

Re: changing PS4 controller curve

Postby Scachi » Tue Aug 04, 2020 2:41 pm

Showcase wrote:Nevermind I figured it out :) Thanks, working perfect

:smile0517:
User avatar
Scachi
Brigadier General
Brigadier General
 
Posts: 3044
Joined: Wed May 11, 2016 6:25 am
Location: Germany

Re: changing PS4 controller curve

Postby Showcase » Fri Aug 07, 2020 8:37 pm

Ye it works but, idk what it is but whatever curve I make, it all feels alittle wierd, like a car with bad suspensions not following correct when you turn if you guys follow, could it be that small delay of 10ms each time it reads the script?
User avatar
Showcase
Master Sergeant
Master Sergeant
 
Posts: 26
Joined: Fri Jul 17, 2020 6:41 pm

Re: changing PS4 controller curve

Postby Mad » Fri Aug 07, 2020 10:20 pm

Showcase wrote:Ye it works but, idk what it is but whatever curve I make, it all feels alittle wierd, like a car with bad suspensions not following correct when you turn if you guys follow, could it be that small delay of 10ms each time it reads the script?

Set your output polling rate to 1000hz, no delay.
ConsoleTuner Support Team || ConsoleTuner Discord || InputSense Discord
Mad
Major General
Major General
 
Posts: 4536
Joined: Wed May 22, 2019 5:39 am

Re: changing PS4 controller curve

Postby Showcase » Fri Aug 07, 2020 11:38 pm

Mad wrote:
Showcase wrote:Ye it works but, idk what it is but whatever curve I make, it all feels alittle wierd, like a car with bad suspensions not following correct when you turn if you guys follow, could it be that small delay of 10ms each time it reads the script?

Set your output polling rate to 1000hz, no delay.



It was set to 1000hz, I didnt find an "delay" option?

Maybe I just need to foolaround more with the settings in the script...

...but to not have any changes made...I mean just to verify... I make straight diagonal values? from 0 to 100
User avatar
Showcase
Master Sergeant
Master Sergeant
 
Posts: 26
Joined: Fri Jul 17, 2020 6:41 pm


Return to Gtuner IV Support

Who is online

Users browsing this forum: No registered users and 171 guests