Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: Xbox One Controller Driver for OS X (github.com/lloeki)
92 points by lloeki on Feb 6, 2015 | hide | past | favorite | 24 comments



Could you provide some technical detail on the creation process? The Xbox One controller doesn't identify itself as a Human Input Device, so it requires a Kext, yeah? Did you need to use a USB sniffer to identify the initialization sequence and button mappings?

Another OS X Kext for the (USB) Xbox One controller, if only for comparison: https://github.com/FranticRain/Xone-OSX


I'm planning to write an article about the development of this driver, including USB woes and writing the HID descriptor. The only thing I didn't do from scratch is getting the init packet (which I got from the Linux kernel).


using the Xone-OSX https://github.com/FranticRain/Xone-OSX works quite fine for me. Anybody has an input about the differences?


I stumbled upon it just yesterday when packaging my release on GitHub. I purposely did not look at anything beforehand because 1) I wanted to do everything from A to Z myself†, and I knew TattieBogle's 360 driver was GPL licensed and 2) I wanted (made possible as a side effect of, and a motivation for, 1.) this one to be BSD.

† When starting this I knew zilch about C++, USB, HID descriptors and kext development. Quite a roadtrip.

(edit): A quick glance show that it's loosely based on TattieBogle's, and tries hard to mimic a 360 gamepad[0], down to the USB products id[1] and string. IOW it's not really a native Xbox One gamepad driver but an "emulator" of the 360 gamepad.

[0]: https://github.com/FranticRain/Xone-OSX/blob/master/Xbox%20O...

[1]: https://github.com/FranticRain/Xone-OSX/blob/master/Xbox%20O...


how's steam support?


Castle Crashers and Guacamelee work well. Unfortunately, The Force Unleashed does not recognize it. Yet, believe it's a game specific problem (the port is terrible ...). Haven't tried other games.


This is great! The developer of the 360 driver stopped maintaining his work quite awhile ago, and it has been difficult getting it to work on newer OS X versions. Although this means buying a new controller, it's not all bad because it's a great controller!

PC gamepads are pretty terrible so having the 2 major console controllers as options is a wonderful thing.

Worth mentioning: the PS4 controller works out of the box with nothing to install, over USB or Bluetooth.


It's not too hard. There's been a fork of the project which you can find here https://github.com/d235j/360Controller.


That one doesn't work for me on OSX 10.10.2. The one provided by OP works perfectly.


Nice job!

Is there a DualShock 4 Controller Driver out there for OS X? There is a great one for Windows called DS4Windows, but I haven't found on for Mac.


Just plug it right in and go! Bluetooth pairing works too, but is a little wonky. But what else is new, it's Bluetooth.


Buttons all work fine, but the track pad didn't work for me.


I own one, it works out of the box on Yosemite, and even better than DS3 (which keeps the LEDs flashing, purely cosmetic but annoying).

OS X basically bets on standards (HID Class device compliance) for out of the box support.


I tried that, but the trackpad didn't work. Buttons were all fine, but I want to be able to be able to kick back and not worry about grabbing a mouse.


> ...the driver is unsigned and has to be installed with kext dev mode enabled on Yosemite. If you don't know what that means it's probably not a good idea to go further.

That's fine - but why not explain how to do this? People are going to google it anyways - may as well offer a sane tutorial on how to do it.


> why not explain how to do this? ... may as well offer a sane tutorial on how to do it.

I'd be worried about people making inane pull requests a la "You broke my computer!" if they did something wrong.


That's why open source licenses were created (to have a no warranty clause). However, for those that don't read...licenses, having in big bold print "this may break your system" may deter most people. I think most system-breaking-software I've used has had a built in warning.

My harsh opinion - don't treat people like children. If they want to play with fire - they will. But I would feel better if the author of the software posted something like "Following these steps has been known to be successful in using this" rather than people googling some out of date information.

Using your logic - the guys at cyanogen wouldn't create a wiki describing[1] how to install their ROMs. Arguably installing ROMs on Android devices is a much more intense process than simply modifying your OS (you are hoping that the manufacturer didn't all of a sudden decide to include a kill switch in your model - rendering your $600 phone a paperweight).

[1] http://wiki.cyanogenmod.org/w/Install_CM_for_p880


Exactly. I basically don't want to guide people into lowering what is a perfectly valid level of defense, but while I tell people how to do it there[0], the target public is not exactly the same.

[0]: https://github.com/lloeki/trim_patcher


This will come, but I plan to get a dev certificate so it'll be way more user friendly. I wanted to get the thing shipped ASAP in a reasonable fashion, as it's been lingering for months due to a stupid bottleneck.


I actually have kext signing permission but I'm not sure the implications of me signing the product and distributing it for you in that sense.


I've been playing with https://github.com/guilhermearaujo/xboxonecontrollerenabler and works like a charm on all my Steam games. Is there any major pros/cons to each of these drivers?


This one polls every 5ms, so you have 5ms guaranteed latency, when mine reacts on USB async interrupts. Also it takes a hammer approach and simulates a joystick via VHID+WirtualJoy, whereas mine just maps the USB packets to sets up a HID descriptor and passes it straight to OS X's IOKit. You can't have it be more lightweight and native: connect pipes and tell OSX how to understand packets in the most standard way possible.

Latency matters a lot to me, especially in emulators as it creates a terrible uncanny valley (even more when you have the original hardware to compare to). Using Higan on OpenEmu with this controller, latency is really low and I have the feeling very similar to "native" NES when I play Megaman.

Also once you go in Big Picture mode on Steam and configure the gamepad, mine works like a charm in all games I threw at it.


For the longest time, OS X didn't require driver signing; I was in the Hackintosh scene a few years ago and helped write a few drivers. Not surprised that it's required now, but looks like it can be disabled relatively easily. (It's unexpected and nice of Apple to do that.)


sigh.. hacker news comments - cynical and (often unintentionally) abrasive.

this looks really cool. and the code is very readable! nice work.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: