Macos 力反馈驱动器

Macos 力反馈驱动器,macos,usb,device-driver,hid,Macos,Usb,Device Driver,Hid,我已经有了一段时间的老游戏板,GameStop高级控制器(实际上是一家名为DragonRise inc.的公司批量生产的通用设备之一),它带有隆隆声/触觉功能。不幸的是,它在OSX上不起作用。我认为这将是一个很好的项目,以了解更多关于OSX和USB HID设备上的驱动程序开发。现在,除了触觉/力反馈功能外,gamepad本身可以作为标准的HID设备正常工作。我的目标是为gamepad编写一个简单的ForceFeedback插件 到目前为止,我所做的是创建一个非常简单的IOKit驱动程序,它继承了

我已经有了一段时间的老游戏板,GameStop高级控制器(实际上是一家名为DragonRise inc.的公司批量生产的通用设备之一),它带有隆隆声/触觉功能。不幸的是,它在OSX上不起作用。我认为这将是一个很好的项目,以了解更多关于OSX和USB HID设备上的驱动程序开发。现在,除了触觉/力反馈功能外,gamepad本身可以作为标准的HID设备正常工作。我的目标是为gamepad编写一个简单的ForceFeedback插件

到目前为止,我所做的是创建一个非常简单的IOKit驱动程序,它继承了IOUSBHIDDevice,基本上让超类完成大部分的繁重工作;我的理由是,它现在运行良好,我只想添加功能。因此,这种方式奏效了;我现在的问题是,驱动程序被添加为注册表中设备的新接口。它是匹配的,但未使用。理想情况下,我希望将通用的IOUSBHIDDevice类完全替换为特定gamepad的IOClass,但我不确定如何替换

另一方面,也许我做得不对,我不需要创建一个新的驱动程序来为这个游戏板添加ForceFeedback插件;这正是我在阅读文档后提出的解决方案

以下是我的驱动程序项目的Info.plist(重要部分):

<key>IOKitPersonalities</key>
<dict>
    <key>IODragonRiseGenericUSB</key>
    <dict>
        <key>IOMatchCategory</key>
        <string>name_npp_driver_IODragonRiseGenericUSB</string>
        <key>IOProviderClass</key>
        <string>IOUSBDevice</string>
        <key>IOKitDebug</key>
        <integer>65535</integer>
        <key>IOClass</key>
        <string>name_npp_driver_IODragonRiseGenericUSB</string>
        <key>CFBundleIdentifier</key>
        <string>name.npp.driver.${PRODUCT_NAME:rfc1034identifier}</string>
        <key>IOCFPlugInTypes</key>
        <dict>
            <key>F4545CE5-BF5B-11D6-A4BB-0003933E3E3E</key>
            <string>IODragonRiseGenericUSB.kext/Contents/PlugIns/ForceFeedback.plugin</string>
        </dict>
        <key>idProduct</key>
        <integer>6</integer>
        <key>idVendor</key>
        <integer>121</integer>
        <key>HIDDefaultBehavior</key>
        <string></string>
        <key>bInterfaceClass</key>
        <integer>3</integer>
        <key>bInterfaceProtocol</key>
        <integer>1</integer>
        <key>bInterfaceSubClass</key>
        <integer>1</integer>
    </dict>
</dict>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2013 npepinpe. All rights reserved.</string>
<key>OSBundleLibraries</key>
<dict>
    <key>com.apple.iokit.IOHIDFamily</key>
    <string>1.7.1</string>
    <key>com.apple.iokit.IOUSBFamily</key>
    <string>5.1</string>
    <key>com.apple.iokit.IOUSBHIDDriver</key>
    <string>5.0</string>
    <key>com.apple.kpi.iokit</key>
    <string>11.4.2</string>
    <key>com.apple.kpi.libkern</key>
    <string>11.4.2</string>
</dict>
iokit
IODragonRiseGenericUSB
IOMatch类别
名称\u核电厂\u驱动程序\u IODragonRiseGenericUSB
IOProviderClass
电子设备
IOKitDebug
65535
IOClass
名称\u核电厂\u驱动程序\u IODragonRiseGenericUSB
CbundleIdentifier
name.npp.driver.${PRODUCT_name:rfc1034identifier}
IOCFPlugInTypes
F4545CE5-BF5B-11D6-A4BB-0003933E3E
IODragonRiseGenericUSB.kext/Contents/PlugIns/ForceFeedback.plugin
idProduct
6.
idVendor
121
隐藏默认行为
双接口类
3.
双向接口协议
1.
双界面子类
1.
非人类可读版权
版权所有©2013 NPEPIPE。版权所有。
奥斯本图书馆
com.apple.iokit.IOHIDFamily
1.7.1
com.apple.iokit.iosbfamily
5.1
com.apple.iokit.ioubhiddriver
5
com.apple.kpi.iokit
11.4.2
com.apple.kpi.libkern
11.4.2
需要注意的是,我尝试将IOProviderClass更改为USBInterface(就像IOUSBHIDDevice那样),但是我的设备根本不匹配,所以我不确定我在那里做错了什么


所以我的问题是,如何用我的自定义驱动程序替换与我的特定游戏板匹配的默认IOUSBHIDDriver?或者,如果我只想添加一个ForceFeedback插件(但不需要更改任何其他行为),那么这不是正确的方法吗?

这是旧Logitech Force Feedback作为其IOKit个性之一的一个示例:

<key>Logitech Cordless RumblePad</key>
<dict>
 <key>CFBundleIdentifier</key>
 <string>com.apple.iokit.IOUSBHIDDriver</string>
 <key>IOCFPlugInTypes</key>
 <dict>
  <key>F4545CE5-BF5B-11D6-A4BB-0003933E3E3E</key>
  <string>LogitechForceFeedback.kext/Contents/PlugIns/WMJoyFrc.plugin</string>
 </dict>
 <key>IOClass</key>
 <string>IOUSBHIDDriver</string>
 <key>IOProviderClass</key>
 <string>IOUSBInterface</string>
 <key>bConfigurationValue</key>
 <integer>1</integer>
 <key>bInterfaceNumber</key>
 <integer>0</integer>
 <key>idProduct</key>
 <integer>49681</integer>
 <key>idVendor</key>
 <integer>1133</integer>
</dict>
Logitech无绳RumblePad
CbundleIdentifier
com.apple.iokit.ioubhiddriver
IOCFPlugInTypes
F4545CE5-BF5B-11D6-A4BB-0003933E3E
LogitechForceFeedback.kext/Contents/PlugIns/WMJoyFrc.plugin
IOClass
司机
IOProviderClass
双向接口
B配置值
1.
二进制接口号
0
idProduct
49681
idVendor
1133
我认为您只需要关注力反馈包(这就是Logitech Kext的功能:只需info.plist和力反馈包)


Mac XBox 360驱动程序有一个力反馈驱动程序。你可以以此为出发点。

你的问题到底是什么?对不起,我想这个问题不是很清楚。我已经编辑过了,希望能更好。