What's new

Xbox 360 controller, Xinput, with Project 64

Luc

New member
I had one problem with the new driver. I only get rumble if I set the rumblestrength to 100%. Any other value I get nothing.

I tried some xbox 360 xinput programming and found that the trigger buttons are completely independent (they don't cancel each other out). So using xinput would allow you to use both. Using XInputGetState() will get you values in bLeftTrigger & bRightTrigger (0..255 independently).

Now I 'only' have to figure out how the PJ64 controller plugin works:).
I'll see if I can get your solution to load (I have vs2003 currently installed).
 

Luc

New member
I got everything set up to make more changes to the driver but I got an compile errors missing stdafx.h for the resource file. Do you know where to get that file or how to fix this? Any help appreciated!

Luc
 

Luc

New member
Sorry for the numerous posts but I got it working. I was able to compile and link just fine. I found the rumblestrength bug and fixed it this way:

g_Controllers[Controller].vibration.wRightMotorSpeed = (WORD)(((float)RumbleStrength/100)*65535);
g_Controllers[Controller].vibration.wLeftMotorSpeed = (WORD)(((float)RumbleStrength/100)*65535);

I'm not able to post this but I'll first should add more changes. I've added an XInput checkbox but still have to figure out where to make the changes. I noticed the current XBOX360 analog pad is not precise. If I push slight right and let go I still see the character moving. However I don't see that in my test program. I guess it's either because you have to use Xinput or a bug in the driver.
 

Crizzle

New member
I put the xinput9_1_0.dll file in Project 64 plugin folder but the rumble features are still grayed out in the devices tab. Is there anything else I need to do? I also have the latest Nrage plugin so I'm not sure what else I have to do to get the rumble working.
 

Luc

New member
Crizzle said:
I put the xinput9_1_0.dll file in Project 64 plugin folder but the rumble features are still grayed out in the devices tab. Is there anything else I need to do? I also have the latest Nrage plugin so I'm not sure what else I have to do to get the rumble working.

The latest Nrage plugin doesn't support xbox360. Download the plugin in this thread and it will work pretty well. Just make sure you set rumble to 100%.

I've worked a little bit on improving this driver to work with xbox360. I've added a new xinput radio button. Later on I'll add a xinput checkbox so you can use xinput instead of directInput. Will take a while though as I won't have time until end of the year.
 

Luc

New member
schlog said:
How did you people unpack the download file ?

I just ran the exe. Then you get a bunch of files. Look for the xinput cab file. If you have Windows XP you can automatically double-click it and select the xinput DLL file and unpack it (from the file explorer on the left).

By the way I changed the plugin to add a new rumble option called 'Xinput Rumble' (right now it uses visual rumble instead).
Later I'll see if I can add xinput controls but the current driver is actually pretty good as is (except you can't use both trigger buttons).

Someone should also check it xinput works with 2 xbox360 controllers or as the 2nd controller (it might not work since xinput controller ID could be different)
 

Crizzle

New member
The dll file is embedded deep into the SDK and it was a major hassle to find this small 60kb file among 300+mb of other files so Ill save you guys the trouble and you can get it here.
 

Luc

New member
I assume it should.

I found one bug. The xinput rumble does not work if the controller is not first. Seems that the controller ID is different. Not sure how you can enumerate xbox360 controllers but workaround would be to use first the xbox360 controllers and then all others.
 

Luc

New member
Here's my plugin DLL with rumble strength working. Choose Xinput rumble for xbox360 controllers. Known bug is that xinput rumble controllers must be first.
 

che3se

New member
I get an error saying that both of the zip attachments on this page are corrupt. Any help?

/edit nevermind, stupid download manager
 

DevilMayCry

New member
Just want to thank you guys for this wonderfull patch!
BTW I've asked about driver support for this controller and... well I think I'll post here my experience:

1. I've phoned M$ customer support to know why didn't the pad rumble and then asked about the XInput/DirectInput issue. The response was 'We don't know about that... try with a different couple of games.'
2. So I've mailed M$ customer support to ask about the rumble support without mentioning the XInput issue. The response was: 'Update your USB drivers :huh: '
3. Mailed back saying that both my USB drivers and the pad work 100%, it's just that the controller drivers won't support DirectInput rumble control, just XInput. Also I said some friends of mine are coders and that they made the pad rumble using XInput (these friends are infact you guys at emutalk.net who patched N-Rage input plugin to use XInput :p ). The response was: 'We think we will be able to fix this issue better if you call our customer support line, please phone 1-800.................'

:corpse:

Fucking assholes. (Sorry about the rude language but...)

(Yes this is a repost of part of my comment on Kega's place)
 

Batou

New member
Thank you guys for the awesome work, works very good with 1964 and the French version of Windows XP ;)

Have a nice Christmas break everyone !
 
OP
W

ward12e

New member
Sorry for the long time without any updates been pretty busy with exams coming ups. I've just added support for the shoulder buttons on the Xbox 360 Pad and have fixed the rumble bug that was previously mentioned. I have decided to call the Xinput part of the plugin version 0.5 which I have added to the about box to help clarify any confusion over which file is being currently used. I still have yet to get another pad so I don't think you can use more than one Xbox 360 controller at once. Again any additional bug reports or feature requests are welcomed and I will do my best to maintain this plugin when i find the time.

Link for the plugin:
http://rapidshare.de/files/9761360/NRage_DInput8_V2.dll.html

I can't currently upload the source because of a problem with my connection but will try and put it up at a later date. It will be in more than a week though because I'm going to Germany for a week or so and I won't have any internet connection.

Happy Xmas
 

Top