pottern
驱动牛犊
驱动牛犊
  • 注册日期2003-10-01
  • 最后登录2004-03-05
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
阅读:1946回复:11

学习写xbox输入设备....

楼主#
更多 发布于:2003-10-02 23:18
xbox是微软在2001年推出的游戏机,它的输入接口就是USB的,在网上这方面的资料不多,如有人有兴趣,给个回复,我作个统计看有多少人,然后我就作这方面的开发平台,让大家学习,但不能用作商用目的,不过到时会收点成本费用的!且到时我还有更多的附加条件,因这是在我公司是相当保密的!
bondliu
驱动牛犊
驱动牛犊
  • 注册日期2003-06-28
  • 最后登录2004-12-28
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
沙发#
发布于:2003-10-03 16:42
我对这方面很感兴趣
roy2002
驱动牛犊
驱动牛犊
  • 注册日期2003-02-12
  • 最后登录2010-09-06
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
板凳#
发布于:2003-10-07 00:43
我有兴趣啊。不知道有没有ps2的啊???
yzx_dragon
驱动牛犊
驱动牛犊
  • 注册日期2002-12-16
  • 最后登录2005-09-08
  • 粉丝0
  • 关注0
  • 积分10分
  • 威望1点
  • 贡献值0点
  • 好评度1点
  • 原创分0分
  • 专家分0分
地板#
发布于:2003-10-07 01:40
我也有兴趣呀!
rayyang2000
管理员
管理员
  • 注册日期2001-03-23
  • 最后登录2012-09-13
  • 粉丝3
  • 关注0
  • 积分1036分
  • 威望925点
  • 贡献值3点
  • 好评度823点
  • 原创分0分
  • 专家分0分
地下室#
发布于:2003-10-07 02:40
我也有兴趣 :D
就是不知道成本 :D
也许业余玩儿一下 :D
天天coding-debugging中----超稀饭memory dump file ======================================================== [b]Windows Device Driver Development and Consulting Service[/b] [color=blue][url]http://www.ybwork.com[/url][/color] ========================================================
pottern
驱动牛犊
驱动牛犊
  • 注册日期2003-10-01
  • 最后登录2004-03-05
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
5楼#
发布于:2003-10-07 22:52
我在这里简单介绍下这个开发系统:
        这个开发环境不太好,只能用汇编,且没有调试跟踪的环境,但它是8051的内核,是FLASH版本的,这样编译通过后就烧录入FLASH中运行程序,这种环境对初学者来说不容易,要有一定的编程基础才能运用自如,如果你是初学者,请不要发信给我。到时我也会把这个IC所写的xbox,ps2,gamecube的程序和技术参考都会附送的,以帮助大家学习GAME的输入编写方法。
clementzhao
驱动大牛
驱动大牛
  • 注册日期2003-05-08
  • 最后登录2009-02-20
  • 粉丝0
  • 关注0
  • 积分28分
  • 威望63点
  • 贡献值0点
  • 好评度2点
  • 原创分0分
  • 专家分0分
6楼#
发布于:2003-10-08 08:45
好,支持!
pottern
驱动牛犊
驱动牛犊
  • 注册日期2003-10-01
  • 最后登录2004-03-05
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
7楼#
发布于:2003-10-10 21:05
以后有时间,我会介绍些XBOX手柄,光枪的一些写法,对此贴有兴趣的朋友请随时关注些贴就行!

今天简单介绍些:
    XBOX的手柄输入方式也就是USB接口的,只不过它的接口中有5条线,除了USB的标准的4条线外VCC,GND,D+,D-,另一条就是VBI,它输出电视机信号的行频的起始方波信号,宽度为7uS,和场频起始方波信号,宽度为25uS,这个信号主要为光枪使用,手柄,方向盘等不会用这个信号。
    对XBOX的输入设备IC的选择要求,因特殊性,所以要求IC要有20多以上的I/O口,要有A/D转换口多个,USB必需是全速的(12M),EDNPOINT须有3个以上,每个ENDPOINT深度要大于20以上,因为XBOX的信息长度就是20,要含有HUB功能。
   它的信息配置为XID,和HID相近.下面看看它的XID配置:

DeviceDescriptor:
DB EndDevice-$ ;[00]length of the descriptor
DB DESCRIPTOR_DEVICE ;[01]device descriptor type
DB 010h, 001h ;[02]USB specification version 1.10
DB 0 ;[04]class code
DB 0 ;[05]sub class code
DB 0 ;[06]protocol code
          DB      64                      ;[07]maximum packet size for endpoint 0
DB LOW  VendorIdentifier ;[08]vendor ID
DB HIGH VendorIdentifier
DB LOW  ProductIdentifier ;[10]product ID
DB HIGH ProductIdentifier
DB LOW  ReleaseVersion ;[12]device release number
DB HIGH ReleaseVersion
           DB      1                       ;[14]index of manufacturer string
           DB      2                       ;[15]index of product string
DB 0 ;[16]index of device\'s serial number
DB 1 ;[17]number of possible configuration
EndDevice:
ConfigDescriptor:
DB EndConfig-$ ;[00]length of the descriptor
DB DESCRIPTOR_CONFIG ;[01]configuration descriptor type
        DB      Config1DescEnd-ConfigDescriptor ;[02]total configuration length
DB 0
        DB      1                       ;[04]number of interfaces in this configuration
DB 1 ;[05]configuration ID
DB 0 ;[06]index of configuration string
        DB      10000000b               ;[07]configuration characteristics
        DB      50                      ;[08]maximum power consumption
EndConfig:
;------------------------------------------------------------------;
;       Interface 0
;------------------------------------------------------------------;
JoyInterfaceDescriptor:
        DB      JoyEndInterface-$       ;[00]length of the descriptor
   DB DESCRIPTOR_INTERFACE ;[01]interface descriptor type
        DB      0                       ;[02]interface ID
DB 0 ;[03]value of alternate setting
        DB      2                       ;[04]number of endpoints for this interface
        DB      58h                     ;[05]class code    (hid = 3)
        DB      42h                     ;[06]subclass code (non-boot interface = 0)
        DB      0                       ;[07]protocol code (non KBD/mouse = 0)
DB 0 ;[08]index of interface string
JoyEndpointDescriptor:
        DB      JoyEndpointEnd-$        ;[00]length of the descriptor
DB DESCRIPTOR_ENDPOINT ;[01]endpoint descriptor type
        DB      80h+1                   ;[02]address of the endpoint on USB
DB 011b ;[03]endpoint\'s attribute (interrupt pipe)
packet size of this endpoint
        DB      40H                     ;[04]maximum packet size of this endpoint
DB 0
        DB      04                      ;[06]polling interval for this endpoint
JoyEndpointEnd:
;------------------------------------------------------------------;
; OUTPUT use Endpoint 2
;------------------------------------------------------------------;
JoyEndpoint2Descriptor:
        DB      JoyEndpoint2End-$       ;[00]length of the descriptor
DB DESCRIPTOR_ENDPOINT ;[01]endpoint descriptor type
        DB      00h+2                   ;[02]address of the endpoint on USB
DB 011b ;[03]endpoint\'s attribute (interrupt pipe)
        ;DB      08H                     ;[04]maximum packet size of this endpoint
        ;DB      20H                     ;[04]maximum packet size of this endpoint
        DB      40H                     ;[04]maximum packet size of this endpoint
DB 0
        DB      4                       ;[06]polling interval for this endpoint
JoyEndpoint2End:
Config1DescEnd:
;------------------------------------------------------------------;
XidDescriptor:
IF XBOX = 1
        DB      EndXid-$                ;[00]length of the descriptor
        DB      DESCRIPTOR_XID          ;[01]HID descriptor type
        DB      00h, 01h                ;[02]XID class specification version(1.0)
        DB      1                       ;[04]Type of device(Game controller=1)
        DB      1                       ;[05]Subtype of device(GamePad=1)
        DB      20                      ;[06]size of largest input report
        DB      6                       ;[07]size of largest output report
        DB      0ffh, 0FFh              ;[08]alternate product id0
        DB      0ffh, 0FFh              ;[0A]alternate product id1
        DB      0ffh, 0FFh              ;[0C]alternate product id2
        DB      0ffh, 0FFh              ;[0E]alternate product id3
ENDIF ; XBOX = 1
EndXid:
SysHidDescriptor:
SysEndHid:

SysEndpointDescriptor:
SysEndEndpoint:

JoyReportDescriptor:
IF XBOX = 0

DB 005h, 1 ;usage page(Generic Desktop)
        DB      009h,   4               ;usage(Joystick)
DB 0A1h, 1 ;collection(Application)
        DB      009H,   1               ;  USAGE POINTER
        DB      0A1H,   0               ; COLLECTION LINKED
        DB      005h,   1               ;  usage page(GENERIC DESKTOP)
        DB      009H,   30H             ; USAGE X
        DB      009H,   31H             ; USAGE Y
        DB      009H,   32H             ; USAGE Z
        DB      009H,   33H             ; USAGE Rx
        DB      009H,   34H             ; USAGE Ry
        DB      009H,   35H             ; USAGE Rz
        ;DB      009H,   36H             ; USAGE SLIDER

        ;DB      015h,   0H             ;  logical minimum 0H(0d)
        ;DB      025h,   0ffH             ;  logical maximum FFH(255d)
        DB      015h,   80H             ;  logical minimum 80H(-128d)
        DB      025h,   7FH             ;  logical maximum 7FH(127d)

        DB      035h, 000h              ;  PHYSICAL minimum(0)
        DB      045h, 0FFh              ;  PHYSICAL maximum(FFH)
        DB      066H,   0,   0          ; UNIT = 0
                                
        DB      075h,   8               ;  report size(8)
        DB      095h,   6               ;  report count(6)
        ;DB      095h,   2               ;  report count(2)
DB 081h, 2 ;  input(data,variable,absolute)
DB 0C0h ;end collection

        ;DB      0A1H,   0               ; COLLECTION LINKED

        DB      005H,   9               ; USAGE BUTTON
        DB      019h,   1               ;  BUTTON (1)
        DB      029h,   8               ;  BUTTON (8)

DB 015h, 0 ;  logical minimum(0)
        DB      025h,   1               ;  logical maximum(1)
        DB      035h, 000h              ;  PHYSICAL minimum(0)
        DB      045h, 001h              ;  PHYSICAL maximum(1)
        DB      075h,   1               ;  report size(1)
        DB      095h,   8              ;  report count(8)
DB 081h, 2 ;  input(data,variable,absolute)

JoyEndReport:

OutReportDescriptor:
;        DB      0A1H,   0               ; COLLECTION LINKED
;        ;DB      0A1h,   1               ;collection(Application)
;        DB      006h, 000h, 0ffh        ;usage page(Vendor Defined Page 1)
;        db      009h, 001h              ;Usage(Vendor Usage 1)
;        DB      075h,   8               ;  report size(8)
;        DB      095h,   4               ;  report count(4)
;        DB      026h, 0ffh, 000h        ;  logical maximum(255d)
;        DB      046h, 0ffh, 000h        ;  PHYSICAL maximum(255d)
;        DB      091h,   2               ;  Output(variable)
;        DB      0C0h                    ;end collection
;        DB      0C0h                    ;end collection


随便摘录了一部分,仅供学习用!
 :(
lejianz
驱动中牛
驱动中牛
  • 注册日期2003-03-05
  • 最后登录2023-11-15
  • 粉丝0
  • 关注0
  • 积分8分
  • 威望145点
  • 贡献值0点
  • 好评度116点
  • 原创分0分
  • 专家分0分
  • 社区居民
8楼#
发布于:2003-10-11 08:39
对XBOX手柄、方向盘,我有兴趣。请问老兄,你用的是哪家公司的MCU。能否贴一个示例程序?如果不方便的话,我们可以通过E-MAIL交流。我的E-MAIL是:Lejianz@yahoo.com.cn 。谢谢!
一起交流,共同提高!
clementzhao
驱动大牛
驱动大牛
  • 注册日期2003-05-08
  • 最后登录2009-02-20
  • 粉丝0
  • 关注0
  • 积分28分
  • 威望63点
  • 贡献值0点
  • 好评度2点
  • 原创分0分
  • 专家分0分
9楼#
发布于:2003-10-11 08:44
不知道有没有人对ppc的外接设备有兴趣呢?
leo0401
驱动牛犊
驱动牛犊
  • 注册日期2004-02-02
  • 最后登录2007-04-23
  • 粉丝0
  • 关注0
  • 积分20分
  • 威望2点
  • 贡献值0点
  • 好评度2点
  • 原创分0分
  • 专家分0分
10楼#
发布于:2004-11-09 20:00
Owen.Guo
驱动中牛
驱动中牛
  • 注册日期2001-03-30
  • 最后登录2012-03-29
  • 粉丝0
  • 关注1
  • 积分402分
  • 威望260点
  • 贡献值0点
  • 好评度26点
  • 原创分0分
  • 专家分0分
11楼#
发布于:2004-11-14 15:40
支持,来学习学习
Owen.Guo 祝你成功!
游客

返回顶部