Cleric-K / vJoySerialFeeder

Feed Virtual Joystick driver with data from a serial port
GNU General Public License v3.0
260 stars 55 forks source link

Support for vXbox using ScpVbus #8

Closed fe-ax closed 6 years ago

fe-ax commented 6 years ago

Hi,

Would it be possible to add vXbox support in this? It will make an arduino able to act as a xbox controller which is supported in many games.

http://vjoystick.sourceforge.net/site/index.php/vxbox

Cleric-K commented 6 years ago

Hi,

I haven't worked with xbox based controllers but I guess there is no reason that it won't be possible.

The question is what is the motivation? Are there games which support only xbox controllers and not regular joysticks? If both vxbox and vjoy are possible, are there any benefits to prefer xbox over vjoy?

fe-ax commented 6 years ago

Hi,

I was trying to make a simple arduino with a switch to send (A) to vJoy using your serial to vJoy feeder. I've tried sending it to Minecraft, just because it's easy to install, but I couldn't get it to receive any input from vJoy. Using X360ce it would work, but the road from the device to the game would be long (arduino -> vJoySerialFeeder -> vJoy -> X360ce -> game). Besides that, it works with injecting a DLL file into the game, which isn't (always) supported.

Cleric-K commented 6 years ago

I see ... So it seems the problem is in Minecraft itself - it does not support controllers by default.

Since implementing xbox would take time I don't really have now, and furthermore it is quite a corner case, could you please try the alternatives first? Quick search showed some options (I've never played Minecraft, so I don't know which one is usable).

Tell me how it goes, Good luck!

fe-ax commented 6 years ago

Hi,

It does! When I plug in a PS3 controller and use SCP to connect it as xbox 360 controller I can use it.

I think you use the java version, I should have said it was the Windows10 version that I used.

Also steam isn't recognizing the vJoy gamepad either.

edit: It seems like all microsoft games use xinput instead of dinput edit2: the game skyrim, which I would like to use my device for in the future only accepts Xinput too

Cleric-K commented 6 years ago

Did you try X360ce ? This seems like the most realistic option for the moment.

I don't know when I'll be able to look at the vxbox. Actually it will not be that hard (I guess) to implement it, rather the more time consuming thing will be to to modify the interface to support two different drivers.

fe-ax commented 6 years ago

What do you mean with modifying the interface to support two different drivers? I've no idea yet how the code works, but shouldn't it be possible to make two different arrays, one for the scp driver and one for the vjoy generic driver? The controls are practically the same. (left stick = left stick?). Maybe even make it able to send to two different drivers based on the selected axis, like xX xY & X Y. I've never programmed in C#, but if I can't find any other solution than X360ce I will try to figure out if I can add xbox support to it.

Cleric-K commented 6 years ago

Hi, I've made experimental implementation of ScpVbus. What I meant about the "two drivers" is that many things have to be changed in order to make it look good in UI sense. For example to make it show different axes for the different drivers requires modifications in many places. Profile saving will be affected, etc. etc...

So now I've simply merged the vjoy and vxbox sticks in the dropdown, and everything else is the same. For example Z axis corresponds to Left trigger, Rz to right trigger. Slide0 and 1 have no effect in xbox.

Can you give it a test? Here: https://www.dropbox.com/s/ysa5gia53wlqea6/vjsf_xbox.zip?dl=0 There are some new features in the version, which I hope I'll be able to release these days.

Cleric-K commented 6 years ago

Hi, I have uploaded a new release. It supports vXbox. You can check it out.