<controllerdeadzone> not working
#1
Recently I have "upgraded" my TV, and I have started to use my PC as a part-time HTPC. I'm using Windows XP with XBMC 9.11, and the Xbox 360 wireless controller for the PC. XBMC is just awesome, cheers devs!

I have gotten the controller to work by editing the joystick.Microsoft.Xbox.Controller.S.xml file. I added the proper <altname> in there and changed all the buttons, as mine were identified differently (f.ex. <hat> for the dpad) than the standard used in the file.

Everything is working pretty much perfectly, except for the thumbsticks being a bit touchy. When I use one, it is hard to get it back in center position so I can use the dpad again. The fix I'm looking at is to change the deadzone for the thumbstick, and since the standard driver for the controller doesn't allow this, I want to do it in XBMC. To this end I created the advancedsettings.xml file in my userdata directory, and put the following in it:

<advancedsettings>
<controllerdeadzone>0.2</controllerdeadzone>
</advancedsettings>

The log files show that advancedsettings.xml is indead read. However, the deadzone of my controller does not seem to change. Whatever value I set (I tried 0.5, 0.9, 1, 100, and some huge number), the behaviour of my thumbsticks remains the same.

Any thoughts?
Reply
#2
I think you'll find this only applies to the old Xbox and not the 360.
Reply
#3
Are you talking left stick or right stick...I use Xbox360EventClient.exe to control my 360 pad and the L-stick has no function, the R-stick controls volume.
Reply
#4
Hitcher Wrote:I think you'll find this only applies to the old Xbox and not the 360.

I'm not sure I follow you. I'm not using an Xbox, old or new, just the controller on a windows pc. Do you mean to say the <controllerdeadzone> tag is only used in the Xbox version of XBMC?

mcborzu Wrote:Are you talking left stick or right stick...I use Xbox360EventClient.exe to control my 360 pad and the L-stick has no function, the R-stick controls volume.

I have tried both sticks. The behaviour is the same. As I understood it the code behind Xbox360EventClient.exe has been implemented in XBMC itself now, and from what I have seen it works perfectly, apart from the deadzone.

Unfortunately I can't test whether this is an issue specific to this controller, and the windows distribution, or whether there is a fundamental problem with <controllerdeadzone> at the moment.
Reply
#5
Update:

I gave the old Xbox360EventClient.exe a spin again to check if it had the same problem. However, it seems the deadzone is working correctly with it. I'm guessing something went wrong when incorporating the Xbox360EventClient.exe code into the XBMC framework. I'm starting to lean towards thinking that this being a minor bug in the current XBMC code.

Also I tried the x360wc drivers, both the old ones from http://x360wc.tripod.com/index.html, and the new ones from http://www.katch.ne.jp/~morii/driver/x360wc/index.html. The new ones were horrible, I got neither stick to work correctly anywhere in windows. The old ones were better, mapping mostly the correct buttons, but I couldn't get XBMC to recognise vertical movement of the right stick. So that option is out of the question for me too.
Reply
#6
Update:

Some more snooping around made me find that this has been an open bug for 20 month for the linux version. I'm guessing the Windows version suffers from the same problem then.

See: http://trac.xbmc.org/ticket/4327

I took a look at the code, and found some suggestions towards a solution. However, with my limited knowledge I can't oversee if this would be the full and correct solution. It shouldn't be too hard for someone who is into the matter though I guess. Smile
Reply
#7
you say, you got the dpad of the 360controller working. i never achieved that. can u please post your keymap.xml?
Reply
#8
hansdampf Wrote:you say, you got the dpad of the 360controller working. i never achieved that. can u please post your keymap.xml?

As I'm at work I don't have the actual file at hand, but I can tell you the keymap lines I used. If your dpad is treated by Windows (or whatever OS) as a hat instead of buttons, as mine is, this should do the trick:

<hat id="1" position="up">Up</hat>
<hat id="1" position="down">Down</hat>
<hat id="1" position="left">Left</hat>
<hat id="1" position="right">Right</hat>

Edit: of course, if you want to have it do other stuff than just scroll, use other commands in between the tags.
Reply
#9
its not working for me.

what driver do u use? i use the standard ms driver. perhaps thats the problem?
Reply
#10
Shouldn't be. I'm using the standard MS driver as well. I do have the black "elite" 360 controller, but don't see how that would make a difference either.

I presume you got all the other buttons working in XBMC?

Can you check Control Panel \ Game Controllers? Mine is called "Controller (Xbox 360 Wireless Receiver for Windows)". When clicking properties, there is a windows showing button pushes, and dpad pushes show up in a subwindow called "Point of View Hat". Is that the same for you?
Reply
#11
I have a wireless 360 controller/reciever that is sitting in a draw doing nothing as i couldnt get it to work with xbmc and there is very little documentation, especially about the thumbsticks. bobdevis, could you post your custom xml keymap file (or just paste the contents into this forum).

I got it working using an external program that turned joystick commands into key presses, but i would like to make it work natively with xbmc if possible.
Reply
#12
i think my problem is the keymap.xml

the last time i did something with it, there was only one.

in the newer builds there is a folder "keymaps" containing different keymaps. one for keyboard, remote gamepad....

no matter which of them i modify. the button presses are not recognized.

can you post your xml file, please?
Reply
#13
I won't post the xml file itself since I only updated a part of it sofar, so it's not a fully working keymap file in itself. But I'll explain what I did.

First go to your XBMC\system\keymaps directory. There should be a file there that is meant for the 360 controller. It's called "joystick.Microsoft.Xbox.Controller.S.xml".

My controller wasn't recognised under any of the names in that file, and the buttons mapped slightly differently too, so what I did was to first copy this file to a new "joystick.Microsoft.Xbox.360.Wireless.Controller.xml" file in the same directory.

Next you have to make sure this file is used for the controller that you have, i.e., you have to change the controller name, or any of the alternative names, in the file to your controllers name. To do this, open the new file and do a search and replace operation on it. Search for "Mad Catz MicroCON", and replace it with "Controller (Xbox 360 Wireless Receiver for Windows)" (or whatever your gamepad is called in the Control Panel\Game Controllers window). Make sure all instances are replaced.

The next time you start XBMC, with the gamepad turned on, it should work, although not with all the buttons doing the right stuff yet. To fix this you'll have to edit the "joystick.Microsoft.Xbox.360.Wireless.Controller.xml" file further.

I've only bothered with the <global>...</global> part sofar. It looks like this:

Code:
<hat id="1" position="up">Up</hat>
<hat id="1" position="down">Down</hat>
<hat id="1" position="right">Right</hat>
<hat id="1" position="left">Left</hat>
<button id="1">Select</button>
<button id="2">ParentDir</button>
<button id="3">FullScreen</button>
<button id="4">Queue</button>
<button id="5"/>
<button id="6">ContextMenu</button>
<button id="7">PreviousMenu</button>
<button id="8">XBMC.ActivateWindow(PlayerControls)</button>
<button id="9"/>
<button id="10"/>
<axis limit="-1" id="4">VolumeUp</axis>
<axis limit="+1" id="4">VolumeDown</axis>
Reply
#14
Oh, and be aware though that the sticks are touchy around the center because the deadzone code is bugged at the moment.

If you know your way around C++, you can download the XBMC source and apply the deadzone patch that I submitted at http://trac.xbmc.org/ticket/8536, and then build the whole thing to get deadzones working properly.
Reply
#15
I found with the sticks that the volume slowly crept down. I'd been playing with the XML recently as well (didn't get that far though) because I've got the Launcher plugin setup for my games that use the 360 controller. With the EventClient way of doing it, XBMC still receives controller button presses. Would be really good to get the DeadZone patch working as this would allow me to play all my games via XBMC without problems.

I have 2 controllers, One black and One white and both report as being "Controller (Xbox 360 Wireless Receiver for Windows)" which is good to know. Keep up the good work.
MagicRat
http://360forwindows.com
MEDIA PC Athlon 64 X2 5600+ - 2GB DDR2-800 Ram - Windows XP SP3 32-Bit - 512MB 9800GT - 2x 360 Wireless Controllers - Antec Fusion Remote Black HTPC Case - 50" 720p (1366x768) Panasonic Plasma
MEDIA STORAGE SERVER Athlon 64 X2 6000+ - 2GB DDR2-800 RAM - Windows XP SP2 32-Bit - 512MB Nvidia 9400GS - 2x 2TB HDD + 1x 1.5TB HDD + 4x 1TB HDD + 4x 500GB HDD + 1x 160GB HDD = 11.66TB Storage
Reply

Logout Mark Read Team Forum Stats Members Help
<controllerdeadzone> not working0