├── .gitignore
├── XboxOneDev.xcodeproj
├── xcuserdata
│ └── John.xcuserdatad
│ │ ├── xcdebugger
│ │ └── Breakpoints_v2.xcbkptlist
│ │ └── xcschemes
│ │ ├── xcschememanagement.plist
│ │ └── x1info.xcscheme
├── project.xcworkspace
│ ├── contents.xcworkspacedata
│ ├── xcuserdata
│ │ └── John.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcshareddata
│ │ └── XboxOneDev.xccheckout
└── project.pbxproj
├── x1info
├── XboxOneController.h
├── XboxOneDefinitions.h
├── USBDevice.h
├── main.cc
├── XboxOneController.cpp
└── USBDevice.cpp
└── README.md
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | .idea
3 | XboxOneDev.xcodeproj/project.xcworkspace/xcuserdata
4 | XboxOneDev.xcodeproj/xcuserdata
5 |
--------------------------------------------------------------------------------
/XboxOneDev.xcodeproj/xcuserdata/John.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
--------------------------------------------------------------------------------
/XboxOneDev.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/XboxOneDev.xcodeproj/project.xcworkspace/xcuserdata/John.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JRHeaton/XboxOneControllerDev/HEAD/XboxOneDev.xcodeproj/project.xcworkspace/xcuserdata/John.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/XboxOneDev.xcodeproj/xcuserdata/John.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | x1info.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 52F7682218AB2DB900142F35
16 |
17 | primary
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/x1info/XboxOneController.h:
--------------------------------------------------------------------------------
1 | //
2 | // XboxOneController.h
3 | // XboxOneDev
4 | //
5 | // Created by John Heaton on 2/12/14.
6 | //
7 | //
8 |
9 | #ifndef __XboxOneDev__XboxOneController__
10 | #define __XboxOneDev__XboxOneController__
11 |
12 | #include "USBDevice.h"
13 | #include "XboxOneDefinitions.h"
14 |
15 | #define X1_VENDOR 0x045E // MSFT
16 | #define X1_PID 0x02D1
17 |
18 | class XboxOneController : public USBDevice {
19 | private:
20 | void handleInput(UInt8 *bbuf, UInt64 len);
21 |
22 | public:
23 | XboxOneController(UInt16 idVendor=X1_VENDOR, UInt16 idProduct=X1_PID) : USBDevice(idVendor, idProduct) {}
24 |
25 | bool ledOn();
26 |
27 | void parseInputBuffer(UInt8 *bbuf, UInt64 len);
28 |
29 | bool vibrate(UInt intensity, XboxOneVibrationRotor rotor);
30 |
31 | void init();
32 |
33 | void shutdown();
34 | };
35 |
36 | #endif /* defined(__XboxOneDev__XboxOneController__) */
37 |
--------------------------------------------------------------------------------
/XboxOneDev.xcodeproj/project.xcworkspace/xcshareddata/XboxOneDev.xccheckout:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDESourceControlProjectFavoriteDictionaryKey
6 |
7 | IDESourceControlProjectIdentifier
8 | F10D224F-7E1F-4E06-8956-E17B51211E54
9 | IDESourceControlProjectName
10 | XboxOneDev
11 | IDESourceControlProjectOriginsDictionary
12 |
13 | 56AADCC1-0445-404D-BFA7-B33398D70096
14 | https://github.com/JRHeaton/XboxOneDev.git
15 |
16 | IDESourceControlProjectPath
17 | XboxOneDev.xcodeproj/project.xcworkspace
18 | IDESourceControlProjectRelativeInstallPathDictionary
19 |
20 | 56AADCC1-0445-404D-BFA7-B33398D70096
21 | ../..
22 |
23 | IDESourceControlProjectURL
24 | https://github.com/JRHeaton/XboxOneDev.git
25 | IDESourceControlProjectVersion
26 | 110
27 | IDESourceControlProjectWCCIdentifier
28 | 56AADCC1-0445-404D-BFA7-B33398D70096
29 | IDESourceControlProjectWCConfigurations
30 |
31 |
32 | IDESourceControlRepositoryExtensionIdentifierKey
33 | public.vcs.git
34 | IDESourceControlWCCIdentifierKey
35 | 56AADCC1-0445-404D-BFA7-B33398D70096
36 | IDESourceControlWCCName
37 | XboxOneDev
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/x1info/XboxOneDefinitions.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Mathieu Amiot on 13/02/2014.
3 | //
4 |
5 |
6 | #include
7 |
8 | #ifndef __XboxOneDefinitions_H_
9 | #define __XboxOneDefinitions_H_
10 |
11 | // Macro to check flag
12 | #define _cf(val, flag) (val & flag) == flag
13 |
14 | typedef struct XboxOneSplitBuffer {
15 | unsigned int whole;
16 | unsigned char hb;
17 | unsigned char lb;
18 | } XboxOneSplitBuffer;
19 |
20 | // Macro to split buffer
21 | #define _sb(buf) { .whole = buf, .hb = (unsigned char)(buf / 0x10), .lb = (unsigned char)(buf % 0x10) }
22 |
23 | typedef enum XboxOneMessageType {
24 | XBMsgSystem = 6,
25 | XBMsgInput = 18,
26 | XBMsgUnknown = 8
27 | } XboxOneMessageType;
28 |
29 | // offsets to find
30 | typedef enum XboxOneVibrationRotor {
31 | XboxOneVibrationRotorLeft,
32 | XboxOneVibrationRotorRight,
33 | XboxOneVibrationRotorLeftTrigger,
34 | XboxOneVibrationRotorRightTrigger
35 | } XboxOneVibrationRotor;
36 |
37 | typedef enum XboxOneButton {
38 | XboxOneButtonA = 0x1,
39 | XboxOneButtonB = 0x2,
40 | XboxOneButtonX = 0x4,
41 | XboxOneButtonY = 0x8
42 | } XboxOneButton;
43 |
44 | typedef struct buttons {
45 | bool A;
46 | bool B;
47 | bool X;
48 | bool Y;
49 | } buttons;
50 |
51 | typedef enum XboxOneMenuButton {
52 | XboxOneMenuButtonSync = 0x1,
53 | XboxOneMenuButtonStart = 0x4,
54 | XboxOneMenuButtonSelect = 0x8
55 | } XboxOneMenuButton;
56 |
57 | typedef struct menu {
58 | bool SELECT;
59 | bool START;
60 | bool SYNC;
61 | } menu;
62 |
63 | typedef enum XboxOneTriggerStickButton {
64 | XboxOneTriggerStickButtonLB = 0x1,
65 | XboxOneTriggerStickButtonRB = 0x2,
66 | XboxOneTriggerStickButtonLS = 0x4,
67 | XboxOneTriggerStickButtonRS = 0x8
68 | } XboxOneTriggerStickButton;
69 |
70 | typedef struct trigBtn {
71 | bool RB;
72 | bool LB;
73 | } trigBtn;
74 |
75 | typedef struct joyBtn {
76 | bool RS;
77 | bool LS;
78 | } joyBtn;
79 |
80 | typedef enum XboxOneDirectionalPad {
81 | XboxOneDirectionalPadUp = 0x1,
82 | XboxOneDirectionalPadDown = 0x2,
83 | XboxOneDirectionalPadLeft = 0x4,
84 | XboxOneDirectionalPadRight = 0x8
85 | } XboxOneDirectionalPad;
86 |
87 | typedef struct dPad {
88 | bool UP;
89 | bool DOWN;
90 | bool LEFT;
91 | bool RIGHT;
92 | } dPad;
93 |
94 | typedef struct trigger {
95 | short unsigned int state;
96 | int value;
97 | } trigger;
98 |
99 | typedef struct stick {
100 | UInt x;
101 | UInt y;
102 | UInt x_dev;
103 | UInt y_dev;
104 | } stick;
105 |
106 | #endif //__XboxOneDefinitions_H_
107 |
--------------------------------------------------------------------------------
/x1info/USBDevice.h:
--------------------------------------------------------------------------------
1 | //
2 | // USBDevice.h
3 | // XboxOneDev
4 | //
5 | // Created by John Heaton on 2/11/14.
6 | //
7 | //
8 |
9 | #ifndef __XboxOneDev__USBDevice__
10 | #define __XboxOneDev__USBDevice__
11 |
12 | #include
13 | #include
14 | #include
15 | #include
16 |
17 | // General base class for handling IOKit
18 | // USB user client stuff without having to
19 | // rewrite it 20x
20 |
21 | /*
22 | Natural order of things should be:
23 |
24 | USBDevice dev(myVID, myPID);
25 | if(dev.valid()) {
26 | dev.open();
27 | dev.setConfiguration(); // optionally provide a diff bConfigurationValue (for xbox controllers, not)
28 | dev.openInterface(interfaceIndex); // preparing to do stuff
29 | }
30 | */
31 |
32 | class USBDevice {
33 | public:
34 | // init for a specific device + manufacturer
35 | USBDevice(UInt16 idVendor, UInt16 idProduct);
36 | virtual ~USBDevice(); // if subclassed pls call this
37 |
38 | bool valid(); // device handle non-null
39 | bool open(); // opens device for readwrite
40 | bool close(); // release access lock on dev
41 | bool reset(); // resets device (WARNING: you will probably need to reenumerate stuff)
42 |
43 | UInt8 numConfigurations();
44 | IOUSBConfigurationDescriptor *getConfigurationDesc(UInt8 index);
45 | bool setConfiguration(UInt8 bConfigurationValue=1); // this value is in IOUSBConfigurationDescriptor
46 |
47 | bool enumerateInterfaces(); // this is called automatically on setConfiguration()
48 | UInt8 numInterfaces(); // interfaces in the current configuration
49 | bool openInterface(UInt8 index); // open an interface for readwrite
50 | bool setAltInterface(UInt8 index,
51 | UInt8 setting);// sets alternate setting for an interface
52 | bool closeInterface(UInt8 index); // release readwrite lock on interface
53 | UInt8 openAllInterfaces(); // returns how many were opened (0=err)
54 | UInt8 closeAllInterfaces(); // same as openAllInterfaces
55 |
56 | UInt8 numEndpoints(UInt8 intIndex); // get endpoints in an interface
57 |
58 | IOUSBInterfaceDescriptor *
59 | getInterfaceDescriptor(UInt8 index);// gets the descriptor for the given index
60 |
61 | IOUSBEndpointDescriptor *
62 | getEndpointDescriptor(UInt8 interface,
63 | UInt8 index);
64 |
65 | // Get info about a pipe
66 | bool getPipeProperties(UInt8 interface,
67 | UInt8 endpoint,
68 | UInt8 *direction,
69 | UInt8 *number,
70 | UInt8 *transferType,
71 | UInt16 *maxPacketSize,
72 | UInt8 *interval);
73 |
74 | bool write(UInt8 intfIndex,
75 | UInt8 pipeIndex,
76 | UInt8 *data,
77 | size_t len);
78 |
79 | IOUSBDeviceInterface650 **getDevInterface() { return devIntf; }
80 | IOUSBInterfaceInterface650 **getInterface(UInt8 index) { return (index < interfaces.size()) ? interfaces[index] : nullptr; }
81 |
82 | private:
83 | io_service_t devService;
84 | IOUSBDeviceInterface650 **devIntf;
85 | std::vector interfaces;
86 | };
87 |
88 | #endif /* defined(__XboxOneDev__USBDevice__) */
89 |
--------------------------------------------------------------------------------
/XboxOneDev.xcodeproj/xcuserdata/John.xcuserdatad/xcschemes/x1info.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
39 |
40 |
41 |
42 |
51 |
52 |
58 |
59 |
60 |
61 |
62 |
63 |
69 |
70 |
76 |
77 |
78 |
79 |
81 |
82 |
85 |
86 |
87 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | XboxOneDev
2 | ==========
3 | Collection of tests, ideas, and whatever code we want relating to Xbox One peripherals.
4 |
5 | ## USB Information
6 | The Xbox One controller has a single USB configuration (1), and two altinterface settings for each of the three (3) interfaces that that configuration supplies.
7 |
8 | idVendor(MSFT): ```0x045E```
9 | idProduct: ```0x02D1```
10 |
11 | The controller, unlike the 360, does not spit out button state, HID-like reports over the interrupt pipe automatically. That IS what the pipe is for, but there are seemingly two(or more) byte binary messages sent over the output interrupt pipe that enable or disable features or state.
12 |
13 | | Message | Effect |
14 | | ------- | ------ |
15 | | ```E4 60``` | Turn X LED on? |
16 |
17 | #### Device Descriptor
18 | ```
19 | Descriptor Version Number: 0x0200
20 | Device Class: 255 (Vendor-specific)
21 | Device Subclass: 71 (Vendor-specific)
22 | Device Protocol: 208
23 | Device MaxPacketSize: 64
24 | Device VendorID/ProductID: 0x045E/0x02D1 (Microsoft Corporation)
25 | Device Version Number: 0x0101
26 | Number of Configurations: 1
27 | Manufacturer String: 1 "Microsoft"
28 | Product String: 2 "Controller"
29 | Serial Number String: 3 "7EED8304C69E"
30 | ```
31 |
32 | #### Interface Descriptors
33 | ```
34 | Interface #1 - Vendor-specific (#1)
35 | Alternate Setting 1
36 | Number of Endpoints 2
37 | Interface Class: 255 (Vendor-specific)
38 | Interface Subclass; 71 (Vendor-specific)
39 | Interface Protocol: 208
40 | Endpoint 0x02 - Isochronous Output
41 | Address: 0x02 (OUT)
42 | Attributes: 0x01 (Isochronous no synchronization data endpoint)
43 | Max Packet Size: 228
44 | Polling Interval: 1 ms
45 | Endpoint 0x82 - Isochronous Input
46 | Address: 0x82 (IN)
47 | Attributes: 0x01 (Isochronous no synchronization data endpoint)
48 | Max Packet Size: 228
49 | Polling Interval: 1 ms
50 |
51 | Interface #1 - Vendor-specific (#1)
52 | Alternate Setting 1
53 | Number of Endpoints 2
54 | Interface Class: 255 (Vendor-specific)
55 | Interface Subclass; 71 (Vendor-specific)
56 | Interface Protocol: 208
57 | Endpoint 0x02 - Isochronous Output
58 | Address: 0x02 (OUT)
59 | Attributes: 0x01 (Isochronous no synchronization data endpoint)
60 | Max Packet Size: 228
61 | Polling Interval: 1 ms
62 | Endpoint 0x82 - Isochronous Input
63 | Address: 0x82 (IN)
64 | Attributes: 0x01 (Isochronous no synchronization data endpoint)
65 | Max Packet Size: 228
66 | Polling Interval: 1 ms
67 |
68 | Interface #2 - Vendor-specific (#1)
69 | Alternate Setting 1
70 | Number of Endpoints 2
71 | Interface Class: 255 (Vendor-specific)
72 | Interface Subclass; 71 (Vendor-specific)
73 | Interface Protocol: 208
74 | Endpoint 0x03 - Bulk Output
75 | Address: 0x03 (OUT)
76 | Attributes: 0x02 (Bulk no synchronization data endpoint)
77 | Max Packet Size: 64
78 | Polling Interval: 0 ms
79 | Endpoint 0x83 - Bulk Input
80 | Address: 0x83 (IN)
81 | Attributes: 0x02 (Bulk no synchronization data endpoint)
82 | Max Packet Size: 64
83 | Polling Interval: 0 ms
84 | ```
85 |
86 | As you can see, I've only listed descriptors from altinterface 1, because in altinterface 0, the first interface is identical, and the rest have 0 endpoints (minimalistic config maybe?)
87 |
--------------------------------------------------------------------------------
/x1info/main.cc:
--------------------------------------------------------------------------------
1 | //
2 | // main.c
3 | // x1info
4 | //
5 | // Created by John Heaton on 2/11/14.
6 | //
7 | //
8 |
9 | #include
10 | #include "USBDevice.h"
11 | #include "XboxOneController.h"
12 | #include
13 |
14 | using std::cout; using std::endl;
15 |
16 | UInt8 *bbuf;
17 |
18 | int readsize;
19 | void inputcb(void *refcon, IOReturn result, void *len) {
20 | XboxOneController *d = (XboxOneController *)refcon;
21 | d->parseInputBuffer(bbuf, (UInt64) len);
22 | (* d->getInterface(0))->ReadPipeAsync(d->getInterface(0), 2, bbuf, readsize, inputcb, d);
23 | }
24 |
25 | mach_port_t inport;
26 |
27 | // these are for the 360 controller i have. i'm using it for reference testing
28 | #define AFTERGLOW_VENDOR 0x0e6f
29 | #define AFTERGLOW_PRODUCT 0x0213
30 |
31 | #define TESTING_X1 1 // easy testing for me
32 | #define RESET_AND_QUIT 0 // for ease during testing
33 |
34 | int main(int argc, const char * argv[]) {
35 | XboxOneController d
36 | #if TESTING_X1 == 0
37 | (AFTERGLOW_VENDOR, AFTERGLOW_PRODUCT);
38 | #else
39 | (X1_VENDOR, X1_PID);
40 | #endif
41 |
42 | if(RESET_AND_QUIT) {
43 | d.open();
44 | d.reset();
45 | return 0;
46 | }
47 |
48 | bbuf = (UInt8 *)malloc(64);
49 |
50 | cout <<
51 | "open: " << d.open() << endl <<
52 | "setConfiguration: " << d.setConfiguration() << endl <<
53 | "numInterfaces: " << (int)d.numInterfaces() << endl;
54 |
55 | if (d.numInterfaces() == 0)
56 | {
57 | cout << "Device is not ready!" << endl;
58 | return 0;
59 | }
60 |
61 | for(int i=0;iCreateInterfaceAsyncPort(d.getInterface(0), &inport);
84 | CFRunLoopSourceRef src;
85 | (* d.getInterface(0))->CreateInterfaceAsyncEventSource(d.getInterface(0), &src);
86 | CFRunLoopAddSource(CFRunLoopGetCurrent(), src, kCFRunLoopCommonModes);
87 |
88 | if(!i) {
89 |
90 | readsize = 64;
91 | (* d.getInterface(0))->ReadPipeAsync(d.getInterface(0), 2, bbuf, readsize, inputcb, &d);
92 | }
93 |
94 | for(int pipe=0;pipeReadPipeAsync(d.getInterface(0), 2, bbuf, readsize, inputcb, &d);
137 | CFRunLoopRun();
138 |
139 | return 0;
140 | }
141 |
142 |
--------------------------------------------------------------------------------
/x1info/XboxOneController.cpp:
--------------------------------------------------------------------------------
1 | //
2 | // XboxOneController.cpp
3 | // XboxOneDev
4 | //
5 | // Created by John Heaton on 2/12/14.
6 | //
7 | //
8 |
9 | #include "XboxOneController.h"
10 | #include "XboxOneDefinitions.h"
11 |
12 | #define X1_INTERRUPT_INTERFACE 0
13 | #define X1_INTERRUPT_OUT 0
14 |
15 | void XboxOneController::init()
16 | {
17 | this->openAllInterfaces();
18 | this->setAltInterface(0, 1);
19 | this->setAltInterface(1, 1);
20 | this->setAltInterface(2, 1);
21 |
22 | // I have no idea what I'm doing
23 | UInt8 ipl[2][2];
24 | ipl[0][0] = 0x25;
25 | ipl[0][1] = 0x39;
26 | ipl[1][0] = 0xc5;
27 | ipl[1][1] = 0xe0;
28 |
29 | this->write(0, 0, ipl[0], 2);
30 | this->write(0, 0, ipl[1], 2);
31 | this->write(0, 0, ipl[0], 2);
32 | this->write(0, 0, ipl[1], 2);
33 | }
34 |
35 | void XboxOneController::shutdown()
36 | {
37 | UInt8 ipl[2][2];
38 | ipl[0][0] = 0xc5;
39 | ipl[0][1] = 0xe0;
40 | ipl[1][0] = 0x25;
41 | ipl[1][1] = 0x39;
42 |
43 | this->write(0, 0, ipl[0], 2);
44 | this->write(0, 0, ipl[1], 2);
45 | this->write(0, 0, ipl[0], 2);
46 | this->write(0, 0, ipl[1], 2);
47 | }
48 |
49 |
50 | bool XboxOneController::ledOn() {
51 | UInt8 cmd[2] = { 0xe4, 0x60 };
52 | return this->write(X1_INTERRUPT_INTERFACE, 0, cmd, 2);
53 | }
54 |
55 | void XboxOneController::parseInputBuffer(UInt8 *bbuf, UInt64 len)
56 | {
57 | XboxOneMessageType type = (XboxOneMessageType) len;
58 | switch (type)
59 | {
60 | case XBMsgInput:
61 | printf("INPUT ");
62 | break;
63 | case XBMsgSystem:
64 | printf("SYSTEM ");
65 | break;
66 | case XBMsgUnknown:
67 | default:
68 | printf("UNKNOWN ");
69 | break;
70 | }
71 |
72 | for (UInt64 i = 0; i < len; ++i)
73 | {
74 | printf("%02x ", bbuf[i]);
75 | }
76 |
77 | if (type == XBMsgInput)
78 | {
79 | printf("\n");
80 | this->handleInput(bbuf, len);
81 | }
82 |
83 | printf("\n");
84 | }
85 |
86 | void XboxOneController::handleInput(UInt8 *bbuf, UInt64 len)
87 | {
88 | // Ignore 3 first bytes, they seem useless
89 | // Or they identify the gamepad, unsure about that, need a second pad.
90 | XboxOneSplitBuffer btnv = _sb(bbuf[4]);
91 | buttons bState = {
92 | .A = _cf(btnv.hb, XboxOneButtonA),
93 | .B = _cf(btnv.hb, XboxOneButtonB),
94 | .X = _cf(btnv.hb, XboxOneButtonX),
95 | .Y = _cf(btnv.hb, XboxOneButtonY)
96 | };
97 | printf("\t_BTN (%x) X=%d, Y=%d, B=%d, A=%d\n", btnv.hb, bState.X, bState.Y, bState.B, bState.A);
98 |
99 | menu mState = {
100 | .SELECT = _cf(btnv.lb, XboxOneMenuButtonSelect),
101 | .START = _cf(btnv.lb, XboxOneMenuButtonStart),
102 | .SYNC = _cf(btnv.lb, XboxOneMenuButtonSync)
103 | };
104 | printf("\t_MENU (%x) SELECT=%d, START=%d, SYNC=%d\n", btnv.lb, mState.SELECT, mState.START, mState.SYNC);
105 |
106 | XboxOneSplitBuffer ctlv = _sb(bbuf[5]);
107 | trigBtn tState = {
108 | .LB = _cf(ctlv.hb, XboxOneTriggerStickButtonLB),
109 | .RB = _cf(ctlv.hb, XboxOneTriggerStickButtonRB)
110 | };
111 |
112 | printf("\t_TRIG (%x) LB=%d, RB=%d\n", ctlv.hb, tState.LB, tState.RB);
113 |
114 | joyBtn jState = {
115 | .LS = _cf(ctlv.hb, XboxOneTriggerStickButtonLS),
116 | .RS = _cf(ctlv.hb, XboxOneTriggerStickButtonRS),
117 | };
118 |
119 | printf("\t_JOY (%x) LS=%d, RS=%d\n", ctlv.hb, jState.LS, jState.RS);
120 |
121 | dPad pState = {
122 | .UP = _cf(ctlv.lb, XboxOneDirectionalPadUp),
123 | .DOWN = _cf(ctlv.lb, XboxOneDirectionalPadDown),
124 | .LEFT = _cf(ctlv.lb, XboxOneDirectionalPadLeft),
125 | .RIGHT = _cf(ctlv.lb, XboxOneDirectionalPadRight)
126 | };
127 |
128 | printf("\t_DPAD (%x) UP=%d, DOWN=%d, LEFT=%d, RIGHT=%d\n", ctlv.lb, pState.UP, pState.DOWN, pState.LEFT, pState.RIGHT);
129 |
130 | trigger lt = {
131 | .value = bbuf[6] + 0xff * bbuf[7],
132 | .state = bbuf[7]
133 | };
134 |
135 | printf("\t_LT state=%d, raw=%d\n", lt.state, lt.value);
136 |
137 | trigger rt = {
138 | .value = bbuf[8] + 0xff * bbuf[9],
139 | .state = bbuf[9]
140 | };
141 |
142 | printf("\t_RT state=%d, raw=%d\n", rt.state, rt.value);
143 |
144 | stick ls = {
145 | .x = bbuf[10],
146 | .x_dev = bbuf[11],
147 | .y = bbuf[12],
148 | .y_dev = bbuf[13]
149 | };
150 |
151 | printf("\t_LS x=%d, y=%d, x_dev=%d, y_dev=%d\n", ls.x, ls.y, ls.x_dev, ls.y_dev);
152 |
153 | stick rs = {
154 | .x = bbuf[14],
155 | .x_dev = bbuf[15],
156 | .y = bbuf[16],
157 | .y_dev = bbuf[17]
158 | };
159 |
160 | printf("\t_RS x=%d, y=%d, x_dev=%d, y_dev=%d\n", rs.x, rs.y, rs.x_dev, rs.y_dev);
161 | }
162 |
163 | bool XboxOneController::vibrate(UInt intensity, XboxOneVibrationRotor rotor)
164 | {
165 | UInt8 party = rotor;
166 | return this->write(X1_INTERRUPT_INTERFACE, 0, &party, sizeof(party));
167 | }
168 |
--------------------------------------------------------------------------------
/x1info/USBDevice.cpp:
--------------------------------------------------------------------------------
1 | //
2 | // USBDevice.cpp
3 | // XboxOneDev
4 | //
5 | // Created by John Heaton on 2/11/14.
6 | //
7 | //
8 |
9 | #include "USBDevice.h"
10 | #include
11 |
12 | #define _err(args...) fprintf(stderr, args)
13 | #define _ifnot(val, exp) if((exp) != (val))
14 | // faster dereferencing for these crazy double pointers
15 | #define _d(ptr) (*ptr)
16 |
17 | USBDevice::USBDevice(UInt16 idVendor, UInt16 idProduct) {
18 | if(!idProduct || !idVendor) {
19 | _err("idProduct and idVendor must both be non-zero\n");
20 | }
21 |
22 | CFMutableDictionaryRef matching;
23 | CFNumberRef _idVendor, _idProduct;
24 | IOCFPlugInInterface **plugin;
25 | SInt32 score;
26 |
27 | // create a dictionary of properties to match in the registry
28 | matching = IOServiceMatching(kIOUSBDeviceClassName);
29 | // set idProduct and idVendor (see System Information under USB or look in IORegistryExplorer)
30 | _idProduct = CFNumberCreate(nullptr, kCFNumberSInt16Type, &idProduct);
31 | _idVendor = CFNumberCreate(nullptr, kCFNumberSInt16Type, &idVendor);
32 | CFDictionarySetValue(matching, CFSTR(kUSBVendorID), _idVendor);
33 | CFDictionarySetValue(matching, CFSTR(kUSBProductID), _idProduct);
34 | CFRelease(_idVendor);
35 | CFRelease(_idProduct);
36 | // !!!!: current limitation = this will only get the first matching device
37 | // but i'm assuming you only have on plugged in (for now, easy fix later)
38 | devService = IOServiceGetMatchingService(kIOMasterPortDefault, matching);
39 |
40 | // Open CFPlugIn interface to the usb device user client in the kernel
41 | _ifnot(KERN_SUCCESS, IOCreatePlugInInterfaceForService(devService, kIOUSBDeviceUserClientTypeID, kIOCFPlugInInterfaceID, &plugin, &score)) {
42 | _err("failed to open device plugin interface\n");
43 | IOObjectRelease(devService);
44 | return;
45 | }
46 | // get the device interface
47 | _ifnot(KERN_SUCCESS, _d(plugin)->QueryInterface(plugin, CFUUIDGetUUIDBytes(kIOUSBDeviceInterfaceID650), (LPVOID *)&devIntf)) {
48 | _err("failed to get device interface\n");
49 | IOObjectRelease(devService);
50 | _d(plugin)->Release(plugin);
51 | return;
52 | }
53 | _d(plugin)->Release(plugin);
54 | }
55 |
56 | USBDevice::~USBDevice() {
57 | IOObjectRelease(devService);
58 | closeAllInterfaces();
59 | close();
60 | }
61 |
62 | bool USBDevice::valid() {
63 | return devService && devIntf;
64 | }
65 |
66 | bool USBDevice::open() {
67 | return valid() && !_d(devIntf)->USBDeviceOpen(devIntf);
68 | }
69 |
70 | bool USBDevice::close() {
71 | return !_d(devIntf)->USBDeviceClose(devIntf);
72 | }
73 |
74 | bool USBDevice::reset() {
75 | return valid() && !_d(devIntf)->ResetDevice(devIntf);
76 | }
77 |
78 | bool USBDevice::enumerateInterfaces() {
79 | if(!valid()) return 0;
80 |
81 | IOCFPlugInInterface **plugin;
82 | IOUSBFindInterfaceRequest intfReq;
83 | io_iterator_t it;
84 | io_service_t intf_service;
85 | SInt32 score;
86 |
87 | // close any open interfaces
88 | closeAllInterfaces();
89 | // remove all old interfaces from array
90 | interfaces.clear();
91 |
92 | // interate interfaces and get references
93 | intfReq.bAlternateSetting
94 | = intfReq.bInterfaceClass
95 | = intfReq.bInterfaceProtocol
96 | = intfReq.bInterfaceSubClass
97 | = kIOUSBFindInterfaceDontCare;
98 | _ifnot(KERN_SUCCESS, _d(devIntf)->CreateInterfaceIterator(devIntf, &intfReq, &it)) {
99 | _err("failed to create enumerator for interfaces\n");
100 | return 0;
101 | }
102 | while((intf_service = IOIteratorNext(it))) {
103 | IOUSBInterfaceInterface650 **intf;
104 | _ifnot(KERN_SUCCESS, IOCreatePlugInInterfaceForService(intf_service, kIOUSBInterfaceUserClientTypeID, kIOCFPlugInInterfaceID, &plugin, &score)) {
105 | _err("failed to open interface plugin interface\n");
106 | IOObjectRelease(devService);
107 | IOObjectRelease(intf_service);
108 | IOObjectRelease(it);
109 | _d(devIntf)->Release(devIntf);
110 | return 0;
111 | }
112 | _ifnot(KERN_SUCCESS, _d(plugin)->QueryInterface(plugin, CFUUIDGetUUIDBytes(kIOUSBInterfaceInterfaceID650), (LPVOID *)&intf)) {
113 | _err("failed to get interface interface\n");
114 | IOObjectRelease(devService);
115 | IOObjectRelease(it);
116 | IOObjectRelease(intf_service);
117 | _d(devIntf)->Release(devIntf);
118 | return 0;
119 | }
120 | _d(plugin)->Release(plugin);
121 | interfaces.push_back(intf);
122 | }
123 |
124 | return 1;
125 | }
126 |
127 | UInt8 USBDevice::numConfigurations() {
128 | UInt8 ret=0;
129 | if(!valid()) return 0;
130 | _d(devIntf)->GetNumberOfConfigurations(devIntf, &ret);
131 | return ret;
132 | }
133 |
134 | bool USBDevice::setConfiguration(UInt8 val) {
135 | return valid()
136 | && !_d(devIntf)->SetConfiguration(devIntf, val)
137 | && enumerateInterfaces();
138 | }
139 |
140 | UInt8 USBDevice::numInterfaces() {
141 | return interfaces.size();
142 | }
143 |
144 | bool USBDevice::openInterface(UInt8 index) {
145 | return valid()
146 | && index < interfaces.size()
147 | && !_d(interfaces[index])->USBInterfaceOpen(interfaces[index]);
148 | }
149 |
150 | bool USBDevice::closeInterface(UInt8 index) {
151 | return valid()
152 | && index < interfaces.size()
153 | && !_d(interfaces[index])->USBInterfaceClose(interfaces[index]);
154 | }
155 |
156 | UInt8 USBDevice::openAllInterfaces() {
157 | UInt8 ret=0;
158 | for(UInt8 i=0;iSetAlternateInterface(interfaces[index], setting);
176 | }
177 |
178 | IOUSBConfigurationDescriptor *USBDevice::getConfigurationDesc(UInt8 index) {
179 | if(!valid()) return nullptr;
180 | IOUSBConfigurationDescriptor *desc = new IOUSBConfigurationDescriptor;
181 | UInt8 ret = _d(devIntf)->GetConfigurationDescriptorPtr(devIntf, index, &desc);
182 | _ifnot(KERN_SUCCESS, ret) {
183 | delete desc;
184 | }
185 | return desc;
186 | }
187 |
188 | IOUSBInterfaceDescriptor *USBDevice::getInterfaceDescriptor(UInt8 index) {
189 | if(!valid() || index >= interfaces.size()) return nullptr;
190 | IOUSBInterfaceDescriptor *desc;
191 | desc = (typeof desc)_d(interfaces[index])->FindNextAssociatedDescriptor(interfaces[index], nullptr, kUSBInterfaceDesc);
192 | return desc;
193 | }
194 |
195 | bool USBDevice::write(UInt8 intfIndex, UInt8 pipeIndex, UInt8 *data, size_t len) {
196 | return valid()
197 | && intfIndex < interfaces.size()
198 | && !_d(interfaces[intfIndex])->WritePipe(interfaces[intfIndex], pipeIndex+1, data, (UInt32)len);
199 | }
200 |
201 | UInt8 USBDevice::numEndpoints(UInt8 intIndex) {
202 | if(!valid() || intIndex >= interfaces.size()) return 0;
203 | UInt8 ret = 0;
204 | _ifnot(KERN_SUCCESS, _d(interfaces[intIndex])->GetNumEndpoints(interfaces[intIndex], &ret)) {
205 | _err("failed to get endpoints\n");
206 | }
207 | return ret;
208 | }
209 |
210 | bool USBDevice::getPipeProperties(UInt8 interface,
211 | UInt8 endpoint,
212 | UInt8 *direction,
213 | UInt8 *number,
214 | UInt8 *transferType,
215 | UInt16 *maxPacketSize,
216 | UInt8 *interval) {
217 | return valid()
218 | && interface <= interfaces.size()
219 | && !_d(interfaces[interface])->GetPipeProperties(interfaces[interface],
220 | endpoint+1, // exclude control pipe
221 | direction,
222 | number,
223 | transferType,
224 | maxPacketSize,
225 | interval);
226 | }
--------------------------------------------------------------------------------
/XboxOneDev.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 5206281018AC352800CEE0E3 /* XboxOneController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5206280E18AC352800CEE0E3 /* XboxOneController.cpp */; };
11 | 52F7682718AB2DB900142F35 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 52F7682618AB2DB900142F35 /* CoreFoundation.framework */; };
12 | 52F7682A18AB2DB900142F35 /* main.cc in Sources */ = {isa = PBXBuildFile; fileRef = 52F7682918AB2DB900142F35 /* main.cc */; };
13 | 52F7683218AB2E1900142F35 /* USBDevice.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 52F7683018AB2E1900142F35 /* USBDevice.cpp */; };
14 | 52F7683418AB2ED900142F35 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 52F7683318AB2ED900142F35 /* IOKit.framework */; };
15 | /* End PBXBuildFile section */
16 |
17 | /* Begin PBXCopyFilesBuildPhase section */
18 | 52F7682118AB2DB900142F35 /* CopyFiles */ = {
19 | isa = PBXCopyFilesBuildPhase;
20 | buildActionMask = 2147483647;
21 | dstPath = /usr/share/man/man1/;
22 | dstSubfolderSpec = 0;
23 | files = (
24 | );
25 | runOnlyForDeploymentPostprocessing = 1;
26 | };
27 | /* End PBXCopyFilesBuildPhase section */
28 |
29 | /* Begin PBXFileReference section */
30 | 3434C6EA2FC156E4D8821225 /* XboxOneDefinitions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XboxOneDefinitions.h; sourceTree = ""; };
31 | 5206280E18AC352800CEE0E3 /* XboxOneController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = XboxOneController.cpp; sourceTree = ""; };
32 | 5206280F18AC352800CEE0E3 /* XboxOneController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XboxOneController.h; sourceTree = ""; };
33 | 5206281118AC4D6200CEE0E3 /* README.md */ = {isa = PBXFileReference; lastKnownFileType = text; path = README.md; sourceTree = SOURCE_ROOT; };
34 | 52F7682318AB2DB900142F35 /* x1info */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = x1info; sourceTree = BUILT_PRODUCTS_DIR; };
35 | 52F7682618AB2DB900142F35 /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = System/Library/Frameworks/CoreFoundation.framework; sourceTree = SDKROOT; };
36 | 52F7682918AB2DB900142F35 /* main.cc */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = main.cc; sourceTree = ""; };
37 | 52F7683018AB2E1900142F35 /* USBDevice.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = USBDevice.cpp; sourceTree = ""; };
38 | 52F7683118AB2E1900142F35 /* USBDevice.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = USBDevice.h; sourceTree = ""; };
39 | 52F7683318AB2ED900142F35 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = System/Library/Frameworks/IOKit.framework; sourceTree = SDKROOT; };
40 | /* End PBXFileReference section */
41 |
42 | /* Begin PBXFrameworksBuildPhase section */
43 | 52F7682018AB2DB900142F35 /* Frameworks */ = {
44 | isa = PBXFrameworksBuildPhase;
45 | buildActionMask = 2147483647;
46 | files = (
47 | 52F7683418AB2ED900142F35 /* IOKit.framework in Frameworks */,
48 | 52F7682718AB2DB900142F35 /* CoreFoundation.framework in Frameworks */,
49 | );
50 | runOnlyForDeploymentPostprocessing = 0;
51 | };
52 | /* End PBXFrameworksBuildPhase section */
53 |
54 | /* Begin PBXGroup section */
55 | 52F7681818AB2D9900142F35 = {
56 | isa = PBXGroup;
57 | children = (
58 | 52F7682818AB2DB900142F35 /* x1info */,
59 | 52F7682518AB2DB900142F35 /* Frameworks */,
60 | 52F7682418AB2DB900142F35 /* Products */,
61 | );
62 | sourceTree = "";
63 | };
64 | 52F7682418AB2DB900142F35 /* Products */ = {
65 | isa = PBXGroup;
66 | children = (
67 | 52F7682318AB2DB900142F35 /* x1info */,
68 | );
69 | name = Products;
70 | sourceTree = "";
71 | };
72 | 52F7682518AB2DB900142F35 /* Frameworks */ = {
73 | isa = PBXGroup;
74 | children = (
75 | 52F7683318AB2ED900142F35 /* IOKit.framework */,
76 | 52F7682618AB2DB900142F35 /* CoreFoundation.framework */,
77 | );
78 | name = Frameworks;
79 | sourceTree = "";
80 | };
81 | 52F7682818AB2DB900142F35 /* x1info */ = {
82 | isa = PBXGroup;
83 | children = (
84 | 5206281118AC4D6200CEE0E3 /* README.md */,
85 | 52F7682918AB2DB900142F35 /* main.cc */,
86 | 52F7683118AB2E1900142F35 /* USBDevice.h */,
87 | 52F7683018AB2E1900142F35 /* USBDevice.cpp */,
88 | 5206280E18AC352800CEE0E3 /* XboxOneController.cpp */,
89 | 5206280F18AC352800CEE0E3 /* XboxOneController.h */,
90 | 3434C6EA2FC156E4D8821225 /* XboxOneDefinitions.h */,
91 | );
92 | path = x1info;
93 | sourceTree = "";
94 | };
95 | /* End PBXGroup section */
96 |
97 | /* Begin PBXNativeTarget section */
98 | 52F7682218AB2DB900142F35 /* x1info */ = {
99 | isa = PBXNativeTarget;
100 | buildConfigurationList = 52F7682D18AB2DB900142F35 /* Build configuration list for PBXNativeTarget "x1info" */;
101 | buildPhases = (
102 | 52F7681F18AB2DB900142F35 /* Sources */,
103 | 52F7682018AB2DB900142F35 /* Frameworks */,
104 | 52F7682118AB2DB900142F35 /* CopyFiles */,
105 | );
106 | buildRules = (
107 | );
108 | dependencies = (
109 | );
110 | name = x1info;
111 | productName = x1info;
112 | productReference = 52F7682318AB2DB900142F35 /* x1info */;
113 | productType = "com.apple.product-type.tool";
114 | };
115 | /* End PBXNativeTarget section */
116 |
117 | /* Begin PBXProject section */
118 | 52F7681918AB2D9900142F35 /* Project object */ = {
119 | isa = PBXProject;
120 | attributes = {
121 | LastUpgradeCheck = 0510;
122 | };
123 | buildConfigurationList = 52F7681C18AB2D9900142F35 /* Build configuration list for PBXProject "XboxOneDev" */;
124 | compatibilityVersion = "Xcode 3.2";
125 | developmentRegion = English;
126 | hasScannedForEncodings = 0;
127 | knownRegions = (
128 | en,
129 | );
130 | mainGroup = 52F7681818AB2D9900142F35;
131 | productRefGroup = 52F7682418AB2DB900142F35 /* Products */;
132 | projectDirPath = "";
133 | projectRoot = "";
134 | targets = (
135 | 52F7682218AB2DB900142F35 /* x1info */,
136 | );
137 | };
138 | /* End PBXProject section */
139 |
140 | /* Begin PBXSourcesBuildPhase section */
141 | 52F7681F18AB2DB900142F35 /* Sources */ = {
142 | isa = PBXSourcesBuildPhase;
143 | buildActionMask = 2147483647;
144 | files = (
145 | 52F7683218AB2E1900142F35 /* USBDevice.cpp in Sources */,
146 | 5206281018AC352800CEE0E3 /* XboxOneController.cpp in Sources */,
147 | 52F7682A18AB2DB900142F35 /* main.cc in Sources */,
148 | );
149 | runOnlyForDeploymentPostprocessing = 0;
150 | };
151 | /* End PBXSourcesBuildPhase section */
152 |
153 | /* Begin XCBuildConfiguration section */
154 | 52F7681D18AB2D9900142F35 /* Debug */ = {
155 | isa = XCBuildConfiguration;
156 | buildSettings = {
157 | };
158 | name = Debug;
159 | };
160 | 52F7681E18AB2D9900142F35 /* Release */ = {
161 | isa = XCBuildConfiguration;
162 | buildSettings = {
163 | };
164 | name = Release;
165 | };
166 | 52F7682E18AB2DB900142F35 /* Debug */ = {
167 | isa = XCBuildConfiguration;
168 | buildSettings = {
169 | ALWAYS_SEARCH_USER_PATHS = NO;
170 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
171 | CLANG_CXX_LIBRARY = "libc++";
172 | CLANG_ENABLE_OBJC_ARC = YES;
173 | CLANG_WARN_BOOL_CONVERSION = YES;
174 | CLANG_WARN_CONSTANT_CONVERSION = YES;
175 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
176 | CLANG_WARN_EMPTY_BODY = YES;
177 | CLANG_WARN_ENUM_CONVERSION = YES;
178 | CLANG_WARN_INT_CONVERSION = YES;
179 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
180 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
181 | COPY_PHASE_STRIP = NO;
182 | GCC_C_LANGUAGE_STANDARD = gnu99;
183 | GCC_DYNAMIC_NO_PIC = NO;
184 | GCC_ENABLE_OBJC_EXCEPTIONS = YES;
185 | GCC_OPTIMIZATION_LEVEL = 0;
186 | GCC_PREPROCESSOR_DEFINITIONS = (
187 | "DEBUG=1",
188 | "$(inherited)",
189 | );
190 | GCC_SYMBOLS_PRIVATE_EXTERN = NO;
191 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
192 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
193 | GCC_WARN_UNDECLARED_SELECTOR = YES;
194 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
195 | GCC_WARN_UNUSED_FUNCTION = YES;
196 | GCC_WARN_UNUSED_VARIABLE = YES;
197 | MACOSX_DEPLOYMENT_TARGET = 10.9;
198 | ONLY_ACTIVE_ARCH = YES;
199 | PRODUCT_NAME = "$(TARGET_NAME)";
200 | SDKROOT = macosx;
201 | };
202 | name = Debug;
203 | };
204 | 52F7682F18AB2DB900142F35 /* Release */ = {
205 | isa = XCBuildConfiguration;
206 | buildSettings = {
207 | ALWAYS_SEARCH_USER_PATHS = NO;
208 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
209 | CLANG_CXX_LIBRARY = "libc++";
210 | CLANG_ENABLE_OBJC_ARC = YES;
211 | CLANG_WARN_BOOL_CONVERSION = YES;
212 | CLANG_WARN_CONSTANT_CONVERSION = YES;
213 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
214 | CLANG_WARN_EMPTY_BODY = YES;
215 | CLANG_WARN_ENUM_CONVERSION = YES;
216 | CLANG_WARN_INT_CONVERSION = YES;
217 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
218 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
219 | COPY_PHASE_STRIP = YES;
220 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
221 | ENABLE_NS_ASSERTIONS = NO;
222 | GCC_C_LANGUAGE_STANDARD = gnu99;
223 | GCC_ENABLE_OBJC_EXCEPTIONS = YES;
224 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
225 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
226 | GCC_WARN_UNDECLARED_SELECTOR = YES;
227 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
228 | GCC_WARN_UNUSED_FUNCTION = YES;
229 | GCC_WARN_UNUSED_VARIABLE = YES;
230 | MACOSX_DEPLOYMENT_TARGET = 10.9;
231 | PRODUCT_NAME = "$(TARGET_NAME)";
232 | SDKROOT = macosx;
233 | };
234 | name = Release;
235 | };
236 | /* End XCBuildConfiguration section */
237 |
238 | /* Begin XCConfigurationList section */
239 | 52F7681C18AB2D9900142F35 /* Build configuration list for PBXProject "XboxOneDev" */ = {
240 | isa = XCConfigurationList;
241 | buildConfigurations = (
242 | 52F7681D18AB2D9900142F35 /* Debug */,
243 | 52F7681E18AB2D9900142F35 /* Release */,
244 | );
245 | defaultConfigurationIsVisible = 0;
246 | defaultConfigurationName = Release;
247 | };
248 | 52F7682D18AB2DB900142F35 /* Build configuration list for PBXNativeTarget "x1info" */ = {
249 | isa = XCConfigurationList;
250 | buildConfigurations = (
251 | 52F7682E18AB2DB900142F35 /* Debug */,
252 | 52F7682F18AB2DB900142F35 /* Release */,
253 | );
254 | defaultConfigurationIsVisible = 0;
255 | defaultConfigurationName = Release;
256 | };
257 | /* End XCConfigurationList section */
258 | };
259 | rootObject = 52F7681918AB2D9900142F35 /* Project object */;
260 | }
261 |
--------------------------------------------------------------------------------