michael-fadely / triolinker-vjoy

A simple Trio Linker v1 vJoy feeder.
3 stars 0 forks source link

Trying with Gamecube controller, but Z and yellow joystick not responding #4

Closed ZaphodJustSomeGuy closed 5 years ago

ZaphodJustSomeGuy commented 6 years ago

Hi, this feeder so very nearly works for me, with the main joystick, Plus (+) Pad and all other buttons working as intended, however the Z button at the back right of the joypad and the yellow stick on the bottom right don't get a response on the vJoy monitor.

I tried opening up the buttons the vJoy device was watching to 32, and the POV hat switches to 4, but that doesn't help get these last parts working.

Any ideas?

PiKeyAr commented 6 years ago

The feeder is currently configured to read inputs of the Dreamcast controller (because that's the only controller I can test it on), which may not work on other controllers if they have more buttons and analog sticks. However, it should be possible to add support for other controllers provided that the feeder is able to recognize input from them.

Use this program to find what inputs are tied to the Z button and the yellow stick. Run the program with the Trio Linker and the controller attached (you may need to disable the feeder and vJoy first), and if it detects the device you should see a list of inputs at the bottom as seven 2-digit numbers. Hold and release the Z button repeatedly to find which of the numbers gets changed, and to what value. Do the same for the yellow stick. If you are able to trace their input, it should be possible for me to add support for them in the feeder.

ZaphodJustSomeGuy commented 6 years ago

Hi

Thanks for looking into this so quickly. I’ve run the program and can see the following:

Device found: \?\hid#vid_7701&pid_0003#7&1c3b24c7&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030} Diagnostics: usage: 4 usagePage: 1 inputReportSize: 7 outputReportSize: 4 featureReportSize: 0 linkCollectionNodes: 2 inputButtonCaps: 1 inputValueCaps: 4 inputDataIndices: 20 outputButtonCaps: 0 outputValueCaps: 1 outputDataIndices: 3 featureButtonCaps: 0 featureValueCaps: 0 featureDataIndices: 0 00 00 00 85 76 84 81

  1. When pressing Z on the back of the controller, the 2nd set of digits (00) changes to (80). “00 80 00 85 76 84 81”

  2. For the yellow stick, it’s the last 2 digits (84 81). Left is (00 81), right is (FF 81), up is (84 00) and down is (84 FF).

  3. I notice the 2nd set of digits also changes with the back triggers (which already work in your program), left trigger is (10) and right trigger is (20).

This is all with a wired standard GC controller attached to the linker only. I also have the wireless ones which attach with a dongle to the joystick port, if you like I can test them as well (I’ll have to hunt them down from the loft).

Many thanks Rob

PiKeyAr commented 6 years ago

Try this build of the feeder and see if you get input from the Z button and the yellow stick: https://dcmods.unreliable.network/owncloud/data/PiKeyAr/files/TrioLinker/25dec.zip

To test it, use Windows Control Panel's Game Controllers applet (run joy.cpl) image

I can't test this myself, but for the yellow stick to be detected you will likely need to add two new axes to the vJoy device before running the feeder. image

Try enabling Rx and Ry first, if it doesn't work add other axes and see which one picks it up.

If it works, please check whether pressing on the D-Pad affects the position of the yellow stick. If it does, I'll extend the "UnlinkDPad" option in the config to also center the yellow stick.

ZaphodJustSomeGuy commented 6 years ago

Damn, I was eagerly awaiting your reply and didn't realise it went into spam from github, just read it on the web portal now. I'll give this a go when I get home from work and report back.

ZaphodJustSomeGuy commented 6 years ago

Great news, it works !!! So the Z button works as button 7 now, and the yellow joystick works if you select Slider & Dial/Slider2 in the vjoy config.

No interference from the D-Pad that I can see. Since I use the yellow analog joystick as an "up-down-left-right" selector in FFXI, I can't test its use as a normal analog stick, but FFXI lets me assign the sliders for those directions so it's working great for me.

Can't believe after all this time I can finally play my 2002 game on a 64bit Windows OS in the way I want to. Many thanks for putting this together. If you need any further testing let me know.

PiKeyAr commented 6 years ago

Great, thanks for testing. I will adjust the axes of the second stick to match Rx and Ry in the next build, so you may need to reconfigure the vJoy device later.

The only other thing I'd like to see tested is the PS2 controller, which may also be supported now.

ZaphodJustSomeGuy commented 6 years ago

Ok, I have found an issue. Although the D-Pad doesn't seem to interfere with the yellow joystick, it does block the main joystick when pressed in any direction. So if moving with the main analog joystick and then you press the D-Pad, all movement stops on the main joystick until you release the D-Pad again.

PiKeyAr commented 6 years ago

That is how the Trio Linker interprets input by design, the D-Pad is linked with the main analog stick on the hardware level, which is why there is an option to unlink it by forcing the analog stick to be centered whenever the D-Pad is pressed. This is also how the original Trio Linker driver does that.

ZaphodJustSomeGuy commented 6 years ago

So I changed the option in the config.ini to UnlinkDpad=false and now I can use the main joystick while pressing the D pad at the same time. That was an easy fix :+1:

PiKeyAr commented 6 years ago

Interesting, that suggests the analog stick is suppressed only by the Dreamcast controller's D-Pad. I'll update the readme accordingly.