Help with remapper - merging inputs
5 posts
• Page 1 of 1
Help with remapper - merging inputs
Hello, I have not quite figured out how to do what I am trying to do:
Input B has a PS4 gamepad, and I want to ignore all sticks and buttons except 8 buttons (Dpad + 4 face buttons)
Input A is also a PS4 gamepad, and I want to be standard passthrough (no remap, and all buttons)
For the output, I want some buttons (eg CROSS) to be InputA OR InputB (if either or both is pressed then it is pressed)
I am familiar with GPC scripts, but I am not sure how to describe inputs from different sources.
Input B has a PS4 gamepad, and I want to ignore all sticks and buttons except 8 buttons (Dpad + 4 face buttons)
Input A is also a PS4 gamepad, and I want to be standard passthrough (no remap, and all buttons)
For the output, I want some buttons (eg CROSS) to be InputA OR InputB (if either or both is pressed then it is pressed)
I am familiar with GPC scripts, but I am not sure how to describe inputs from different sources.
-
ninjaninja2001 - Master Sergeant
- Posts: 31
- Joined: Wed Aug 17, 2016 8:30 pm
Re: Help with remapper - merging inputs
Okay, so here is where I am at this point -
I have figured out how to create a GPC script using remapper(...) that works, but I mapped all of the unused inputs to ACCEL_2_Z (like Sky418 does...). Is there a better way to handle this? I probably don't want ACCEL_2_Z to always be a bonkers value. I'd rather just park it to a NULL (but NULL doesn't work, it maps to BUTTON_1).
I have figured out how to create a GPC script using remapper(...) that works, but I mapped all of the unused inputs to ACCEL_2_Z (like Sky418 does...). Is there a better way to handle this? I probably don't want ACCEL_2_Z to always be a bonkers value. I'd rather just park it to a NULL (but NULL doesn't work, it maps to BUTTON_1).
-
ninjaninja2001 - Master Sergeant
- Posts: 31
- Joined: Wed Aug 17, 2016 8:30 pm
Re: Help with remapper - merging inputs
Something like (last firmware update if interest in what firmware)
Everything works, but some times BUTTON_20 or ACCEL_2_X stops responce. And i still don't understanding why.
And one more
Only the last remap button will work
so if you have something like this
only the last key BUTTON 12 will response.
So instead of NULL you may do any button but only the latest will work
And if you have NULL is equal BUTTON_1 you may try this
- Code: Select all
const uint8 mapG13K[] = {
RMP_USB_D,
// RMP_USB_A,
NULL, NULL, BUTTON_12, BUTTON_21 , BUTTON_13, NULL, BUTTON_3,
NULL, NULL, BUTTON_20, ACCEL_2_Y, ACCEL_2_X, NULL, NULL,
BUTTON_7, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, STICK_2_X, STICK_2_Y,
NULL, BUTTON_9, BUTTON_4, NULL,
NULL, NULL, NULL, NULL, NULL, NULL,
NULL, BUTTON_1, BUTTON_2
};
Everything works, but some times BUTTON_20 or ACCEL_2_X stops responce. And i still don't understanding why.
And one more
Only the last remap button will work
so if you have something like this
- Code: Select all
NULL, NULL, BUTTON_12, BUTTON_21 , BUTTON_13, NULL, BUTTON_12,
only the last key BUTTON 12 will response.
So instead of NULL you may do any button but only the latest will work
- Code: Select all
BUTTON_12, BUTTON_12, BUTTON_12, BUTTON_21 , BUTTON_13, BUTTON_13, BUTTON_13,
And if you have NULL is equal BUTTON_1 you may try this
- Code: Select all
NULL, NULL, NULL, BUTTON_21 , NULL, NULL, BUTTON_1,
-
sky418 - Command Sergeant Major
- Posts: 124
- Joined: Fri Nov 25, 2016 4:28 am
Re: Help with remapper - merging inputs
Hey, take a look at this below,ninjaninja2001 wrote:Is there a better way to handle this? I probably don't want ACCEL_2_Z to always be a bonkers value. I'd rather just park it to a NULL (but NULL doesn't work, it maps to BUTTON_1).
The Identifier BUTTON_1 expands to 0.
You view/open the GPC input Reference in GtunerIV by pressing F1
Coincidentally NULL will also expand to 0.
This behavior is to be expected.
When you think about it, using NULL is actually no different than using BUTTON_1.
Anyways, This should work for what you had requested.
- Code: Select all
#include <remapper.gph>
#define RMP_NULL 255
const uint8 PortB_Mapping[39] = {
RMP_USB_B,
RMP_NULL, RMP_NULL, RMP_NULL, RMP_NULL, RMP_NULL, RMP_NULL, RMP_NULL,
RMP_NULL, RMP_NULL, BUTTON_10, BUTTON_11, BUTTON_12, BUTTON_13, BUTTON_14,
BUTTON_15, BUTTON_16, BUTTON_17, RMP_NULL, RMP_NULL, RMP_NULL, RMP_NULL,
RMP_NULL, RMP_NULL, RMP_NULL, RMP_NULL, RMP_NULL, RMP_NULL, RMP_NULL,
RMP_NULL, RMP_NULL, RMP_NULL, RMP_NULL, RMP_NULL, RMP_NULL, RMP_NULL,
RMP_NULL, RMP_NULL, RMP_NULL
};
init{
remapper(PortB_Mapping);
}
-
Sillyasskid - Captain
- Posts: 574
- Joined: Sat May 14, 2016 3:07 am
Re: Help with remapper - merging inputs
Sillyasskid is correct NULL is the same as map to BUTTON_1.
However, using 255 can result in unpredicted behavior, as it overflows the structure that holds the I/O data.
A proper NULL mapping will be implemented soon, in the mean time the recommended is use the ACCEL_2_Z for this purpose.
However, using 255 can result in unpredicted behavior, as it overflows the structure that holds the I/O data.
A proper NULL mapping will be implemented soon, in the mean time the recommended is use the ACCEL_2_Z for this purpose.
ConsoleTuner Support Team
-
J2Kbr - General of the Army
- Posts: 20323
- Joined: Tue Mar 18, 2014 1:39 pm
5 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 128 guests