Ok I'm double posting but I've made a bit of progress so I though a second post would be ok.
Shoulder Buttons:
Pressing R2 does send an R Trigger command, and it can tell the difference between a full press and a half press. Issue is that for some reason it also sends an L trigger command which makes it useless.
I noticed that the inputs for L and R are both at "byte" 9 (counting starts at 0, so byte 9 is the 10th entry)
L=9,04
R=9,08
When compared to
the DS4 config, they're at separate bytes.
L=8,F0
R=9,F0
So I figured that's why R2 does both - it sees the value increase by 04 and 08. Pressing L2 only increases it by 04, so that one works without interfering.
I deleted both lines just to see what would happen and tested a game. Now they didn’t interfere with each other anymore, but could ONLY register a half press. Obviously we want to be able to send a full press when needed.
I found
this other page on github; most of it's gibberish to me, but he has a tool that runs from a Chromium browser:
https://nondebug.github.io/dualsense/dualsense-explorer.html
With that I could look at what the controller was outputting when a button was pressed. This could also be done with HIDTest, (downloadable from the HIDtoVPAD Network Client Github page). With HIDTest, it's very hard to read the output because the gyroscope and accelerometer are constantly sending tiny amounts of data and the corresponding bytes are changing so fast it gives you a headache to look at. With this online tool it was easier on my eyes to see what was happening.
I noticed from comparing the config.ini and the online tool that the half presses are registered at a different byte to the full presses:
LAnalog=5
RAnalog=6
I added the value of a full press at those addresses back in place of the lines I had deleted earlier.
L=5,F
F
R=6,FF
Checked with Mario Sunshine and I had proper half and full press of R2 as well as full press of L2.
In hindsight, I might have been able to figure that out by comparing with the DS4v2 ini, but I needed the tool's visual aid to get me there.
Face Buttons:
The Face buttons make sense if you're comparing to the Wii U Gamepad; A=Circle, B=X etc.
Gamecube has a wonky layout, but it's easy enough to swap those 4 around.
Old:
A=8,40 (Circle)
B=8,20 (X)
X=8,80 (Triangle)
Y=8,10 (Square)
New:
A=8,20 (X)
B=8,10 (Square)
X=8,40 (Circle)
Y=8,80 (Triangle)
Rumble
Rumble might be impossible, but I wanted to try.
PS2 has several entries in its config relating to Rumble:
https://github.com/FIX94/Nintendont/blob/master/controllerconfigs/controller_ps2.ini
I was looking for what those entries meant, when I came across someone trying to do the same with the Stadia controller:
https://github.com/FIX94/Nintendont/issues/1080
Going off of that, I went back to my browser with nondebug's tool open. I don't know what wizardry he has going on, but when you press a trigger the controller starts to vibrate. I checked the output panel and noticed that the first line went from:
02 FF F7 00 00
To
02 FF F7 FF FF
So I spat out the code:
Rumble=1
RumbleType=0
RumbleDataLen=05
RumbleDataOn=0x02,0xff,0xf7,0xff,0xff
RumbleDataOff=0x02,0xff,0xf7,0x00,0x00
RumbleTransferLen=05
RumbleTransfers=1
So far it's not working, I also tried RumbleType=1, but I'll have another go later.
I've attached my progress. I can't upload an ini so I changed the extension to txt, just change it back to test.