..:: PCSX2 Forums ::..

Full Version: DS4 To XInput Wrapper
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
So guys, I know this might be a dumb problem with a dumb solution but I'll appreciate your help. I'm playing NBA2K14 and while the controller is working great, during the game the R2 triggers the pause, what the options(start) button also does. That automatically denies the R2 trigger normal function which is running in that specific game. Can you please tell me what to do ? Thank you.
(02-22-2014, 02:31 PM)sabcata Wrote: [ -> ]So guys, I know this might be a dumb problem with a dumb solution but I'll appreciate your help. I'm playing NBA2K14 and while the controller is working great, during the game the R2 triggers the pause, what the options(start) button also does. That automatically denies the R2 trigger normal function which is running in that specific game. Can you please tell me what to do ? Thank you.

Are you using custom mapping, and if so are you using InhexSTER's 1.2.1 RC1 or mine? If you're not using custom mapping, have you enabled the 'Hide DS4 Controller' checkbox?
hmm why is this thread not stickied? Let's rectify that Smile
@HepticSeptic
here is example of Mapping that doesn't work in your 1.2.1 RC Custom

<Control>
<cbCross>Left Y-Axis 2</cbCross>
<cbTriangle>Left Y-Axis</cbTriangle>
<cbCircle>Left X-Axis 2</cbCircle>
<cbSquare>Left X-Axis</cbSquare>
<cbLY2>A Button</cbLY2>
<cbLY>Y Button</cbLY>
<cbLX>X Button</cbLX>
<cbLX2>B Button</cbLX2>
</Control>

Now in my newest commit i fixed all mapping issues i think, except atm i don't check if repeat key or not (i can do both easily)

Second thing in the GUI when you select X Button i cbLX specifically it wont be saved other buttons are saved

Same goes to other dropdowns if i select Up Button in cblY its also not saved, but other choices are.
(02-22-2014, 04:55 PM)InhexSTER Wrote: [ -> ]@HepticSeptic
here is example of Mapping that doesn't work in your 1.2.1 RC Custom

<Control>
<cbCross>Left Y-Axis 2</cbCross>
<cbTriangle>Left Y-Axis</cbTriangle>
<cbCircle>Left X-Axis 2</cbCircle>
<cbSquare>Left X-Axis</cbSquare>
<cbLY2>A Button</cbLY2>
<cbLY>Y Button</cbLY>
<cbLX>X Button</cbLX>
<cbLX2>B Button</cbLX2>
</Control>

Now in my newest commit i fixed all mapping issues i think, except atm i don't check if repeat key or not (i can do both easily)

Second thing in the GUI when you select X Button i cbLX specifically it wont be saved other buttons are saved

Same goes to other dropdowns if i select Up Button in cblY its also not saved, but other choices are.

That setup works fine for me. Perhaps it is just the fact that cbLX isn't saved (i.e. its the same issue). I'll take a look to see why they might not be triggering all of their events, nothing obvious seems to be the issue off the top of my head. I've been preoccupied with other responsibilities.

Any chance we can programmatically disable and re-enable the SCP driver? I am actually experiencing this 'XInput not showing' quite often.
(02-22-2014, 05:10 PM)HecticSeptic Wrote: [ -> ]That setup works fine for me. Perhaps it is just the fact that cbLX isn't saved (i.e. its the same issue). I'll take a look to see why they might not be triggering all of their events, nothing obvious seems to be the issue off the top of my head. I've been preoccupied with other responsibilities.

Any chance we can programmatically disable and re-enable the SCP driver? I am actually experiencing this 'XInput not showing' quite often.

Did you have changes to mapping code and not commit it?

In your commit:
533 case "cbLX": return (byte)(255 - rx[1]);
534 case "cbLY": return (byte)(255 - rx[1]);
535 case "cbRX": return (byte)(255 - rx[1]);
536 case "cbRY": return (byte)(255 - rx[1]);

that's definitely not right, so when fixed to 1,2,3,4 it acts like your version in signature:

I loaded version in your signature and button to axis are flipped, Y goes down A goes up.
Second issue is that when you press lets say Y (Up) and also flick the stick Up it resets the axis to 127, when it shouldn't. It should be showing stick up and Y button on.

I fixed both issues in my code now. I just need to figure out GUI part, i know event is always called, i think its problem with the order of elements in the list of controls;
the index in dropdown doesn't match indexes in the list
There is programmatic ways of doing things to device manager, but it requires have admin privileges and quite large amount of code.
(02-22-2014, 05:24 PM)InhexSTER Wrote: [ -> ]Did you have changes to mapping code and not commit it?

In your commit:
533 case "cbLX": return (byte)(255 - rx[1]);
534 case "cbLY": return (byte)(255 - rx[1]);
535 case "cbRX": return (byte)(255 - rx[1]);
536 case "cbRY": return (byte)(255 - rx[1]);

that's definitely not right, so when fixed to 1,2,3,4 it acts like your version in signature:

I loaded version in your signature and button to axis are flipped, Y goes down A goes up.
Second issue is that when you press lets say Y (Up) and also flick the stick Up it resets the axis to 127, when it shouldn't. It should be showing stick up and Y button on.

I fixed both issues in my code now. I just need to figure out GUI part, i know event is always called, i think its problem with the order of elements in the list of controls;
the index in dropdown doesn't match indexes in the list
There is programmatic ways of doing things to device manager, but it requires have admin privileges and quite large amount of code.

I've pushed changes for the Custom Mapping not saving onto the repository. It seems my SVN version (different folder, where I diff our changes usually) had the correct values and the Git version just had the files you added. So added that in this push as well.

How did you address the axis resetting?

Edit: I see you've pushed the changes a while ago, quite extensive reworking. Must have taken a good while.
(02-22-2014, 05:57 PM)HecticSeptic Wrote: [ -> ]I've pushed changes for the Custom Mapping not saving onto the repository. It seems my SVN version (different folder, where I diff our changes usually) had the correct values and the Git version just had the files you added. So added that in this push as well.

How did you address the axis resetting?

Edit: I see you've pushed the changes a while ago, quite extensive reworking. Must have taken a good while.

Yeah, worked on it last 2 days, but now its nicely refactored, and more readable. for up/down issue just switch alt with reg method. For second issue the problem is that if 1 control assings it 127 the second will not go because nibbleChanged will be preventing it (Just remark nibble is an incorrect term, it is actual 4 bits,16 values not 0-127). So I had to add a bit more logic to the axis. I also found a fix for dropdown issue, i had to sort controls list as well not just buttons list
(02-22-2014, 06:15 PM)InhexSTER Wrote: [ -> ]Yeah, worked on it last 2 days, but now its nicely refactored, and more readable. I also found a fix for dropdown issue, i had to sort controls list as well not just buttons list

The bane of last minute 'oh lets add this'. Yes, sorting the list was the root of the problem. I didn't want it to rely on the order matching though (awful coupling) so I instead added a dictionary lookup with default values.
Here is an RC2 for 1.2.1
Its very close to final release:

Fiixed some custom mapping issues:
Now all mapping should work, except for emulating key hold for keyboard (keystroke atm)
Fixes issues with some mappings not being saved into xml file
Refactored and rewritten underlying code for custom mappings

In the future release:
unbinding the button will reset input to nothing, instead of using regular mapping
Keyhold/Keystoke support