XBOX360 Conroller D-Pad

BlitzMax Forums/BlitzMax Programming/XBOX360 Conroller D-Pad

daaan(Posted 2005) [#1]
Hey, I recently picked up the xbox 360 conroller for windows and it really is a nice nice piece of hardware. I can get every button and analog stick to work perfectly except the d-pad. Does anyone know how to get that working?

Also, does anyone know how to conrol the vibration feature?

Thanks,


Yan(Posted 2005) [#2]
Have you tried using the JoyHat() command?

You may also need this...
[edit]
No you wont cos it's been fixed in v1.12 :o)
[/edit]


daaan(Posted 2005) [#3]
Hey, awesome. Thanks a lot.


smilertoo(Posted 2005) [#4]
Does it return analogue button values?


Jay Kyburz(Posted 2005) [#5]
also.. where did you get it from?


daaan(Posted 2005) [#6]
I'm not sure about the analog values. I see what I can find out.

I got it at Best Buy in Thousand Oaks, CA.


Jay Kyburz(Posted 2005) [#7]
Are there really a thousand oaks?


daaan(Posted 2005) [#8]
@Jay Kyburz - If I get what you are asking correctly, that are there really a thousand oak trees... then yes. There are well over 4 thousand oak trees in Thousand Oaks California.

:)


Jay Kyburz(Posted 2005) [#9]
OK


TeaVirus(Posted 2005) [#10]
Hey I used to live in Thousand Oaks! Don't remember there being that many oak trees but then again I never counted. =)

On topic: Looks like a good controller. I'm guessing it will work for Mac/Linux since it's working through FreeJoy. Anyone know if FreeJoy can make use of the "rumble" feature?


Who was John Galt?(Posted 2005) [#11]
Dunno if Mac even supports rumble pads, but Freejoy on the PC is based on some API components that don't support rumble from what I can see. The only way I know to get the rumble function is through directx, but this could well mean re-writing all the functionality of freejoy - unless you can mix APIs?


Jay Kyburz(Posted 2005) [#12]
Hey Daniel, Any word on if the analog sticks report correctly?


daaan(Posted 2005) [#13]
Both analog sticks and the analog stick buttons work perfectly. One thing that is really cool is that JoyZ() is assigned to the L and R triggers and give back values from -1 to 1 (left trigger is 0.0 to -1.0 and the right trigger is 0.0 to 1.0).

Right now im currently working on a blitz3D game that is based around using the XBOX360 controller.

Probably not really the best idea because not everyone has an xbox 360 conroller, but for the people who do it's pretty fun.


smilertoo(Posted 2005) [#14]
I'm guessing it doesnt report back analogue values for the buttons.


Jay Kyburz(Posted 2005) [#15]
Thanks Daniel.


daaan(Posted 2005) [#16]
@Johndevoy - No it doesn't unfortunatley. I'm sure its possible but I don't know how to program a function to grab it.

Also, has anyone got the xbox360 button(glowing x button in the middle) to work?


Yan(Posted 2005) [#17]
Hmm...According to the XInput documentation on MSDN, the buttons are digital...

The Xbox 360 Controller has two analog directional sticks, each with a digital button, two analog triggers, a digital directional pad with four directions, and eight digital buttons. The states of each of these inputs are returned in the XINPUT_GAMEPAD structure when the XInputGetState function is called.



NigelC(Posted 2005) [#18]
to get the green glow you need to use the XInput dll

EDIT: You can also set the vibration, and access the headset for each controller from the XInput dll


RiK(Posted 2006) [#19]
Someone has made a driver for OSX now too:

http://xbox360.qj.net/2006/01/xbox-360-controller-driver-for-macos-x.html


RiK(Posted 2006) [#20]
With the OSX Driver I can see everything apart from the D-Pad. The Driver linked about sees it ok but it doesnt seem to do anything in Max.


RiK(Posted 2006) [#21]
Anyone else tried this on a Mac?

The System Preferences panel for the 360 pad driver sees the Dpad ok but I can't seem to read them in Max.


salric(Posted 2006) [#22]
I've got a 360 controller for the mac & I'm using the same driver as above. The D-pad is recognised by the controller config in the preferences panel, however it is not reported by blitzmax (as the joyhat) on this end.


smilertoo(Posted 2006) [#23]
The mac seems to have serious issues with gamepads, i couldnt get the xbox one to work on the ibook properly despite trying all the available drivers.


RiK(Posted 2006) [#24]
The driver has been updated recently and now includes a mapping for the dpad to act as buttons too.


Idiot(Posted 2006) [#25]
"JoyZ() is assigned to the L and R triggers and give back values from -1 to 1 (left trigger is 0.0 to -1.0 and the right trigger is 0.0 to 1.0)."

so wait, what happens if you push both triggers at once?


VP(Posted 2006) [#26]
You hope that your end-user downloaded the unofficial drivers and got them to work. I tried, and failed.

One day, M$ will release a better driver.


smilertoo(Posted 2006) [#27]
I'm seriosly dissapointed that the x360 controller doesnt allow analogue buttons, i created a dll for b3d/bmax that lets you get analogue buttons from the old xbox gamepad.


RiK(Posted 2006) [#28]
"JoyZ() is assigned to the L and R triggers and give back values from -1 to 1 (left trigger is 0.0 to -1.0 and the right trigger is 0.0 to 1.0)."

so wait, what happens if you push both triggers at once?


In that OSX driver, the L trigger is mapped to JoyZ and the right one to JoyR.

Left stick is JoyX/JoyY and right stick is JoyU/JoyV.

Latest info: http://tattiebogle.net/index.php/ProjectRoot/Xbox360Controller/OsxDriver