fb:porticula NoPaste
044FB326.xid
Uploader: | ThePuppetMaster |
Datum/Zeit: | 12.12.2013 03:13:56 |
Hinweis: Dieser Quelltext ist Bestandteil des Projekts LINUX XID Userspace Treiber, zu dem es auf FreeBASIC-Portal.de eine Projektseite gibt.
###################################################################################################
# PARAMETER AND FILE DESCRIPTION
# ==============================
#
# All VALUES are in HEX!
#
#
#
# FILENAME-SYNTAX
# ===============
# FILENAME=<HEX4 of VENDOR><HEX4 of PRODUCT>.xid
#
# Example
# idVendor: 044F
# idProduct: B326
# Filename: 044FB326.xid
#
#
#
# CONTROLER-DESCRIPTION-SYNTAX
# ============================
#
# NAME=<Controlername>
# VENDOR=<HEX4 of idVendor>
# PRODUCT=<HEX4 of idProduct>
#
# Example
# NAMAE=Thrustmaster Gamepad GP XID
# VENDOR=044F
# PRODUCT=B326
#
#
#
# CONFIGURATION-SYNTAX
# ====================
#
# Elements are seperatet by ;
# Element-Parameter are seperatet by ,
#
# GET=<TYPE>;<Blocklen>;<Check>/<Value>[,...]
# <Blocklen> = Numer of Bytes of the Datablock
# <Check> = Is a Value to check inside of a DataBlock
# <Value> = Is a Element to get out of a DataBlock
#
# Multiple <Check> and / or <Value> Blocks are posible
# More then 255 Blocks issnt posible
#
#
#
# Digital-Part
# ------------
# GET=D;...
#
# Digital-Parts are Buttons whos value can only be 0 or 1
#
#
#
# Analog-Part
# -----------
# GET=A,<HEX MinValue>,<HEX MaxValue>;...
#
# Analog-Parts are Axis related Sticks what can have values ofer a wide range, depending on his position.
# Like the Stick of a Joystick.
#
#
#
# Digital-Stick-Part
# ------------------
# GET=S,<HEX MinValue>,<HEX MaxValue>;...
#
# A Digital-Stick is a Digital cross-Stick. Its a typical Element of a Gamepad.
# Only one direction can used of each axes, and its digital.
# Like the Stick of a very old Digital-Joystick.
#
# This part works only with analoge Elements. Btw. a Analog axis will create,
# like a Analog-Stick but only 3 value states are posible 0, <MinValue> and <MaxValue>.
#
#
#
# <Check>-Block Syntax
# --------------------
# <Byte-Index>:<HEX2 Value>|<Special-Codes>
#
# Example
# <Datablock> is: 00 44 88 AA DD FF
# <GET> is: GET=D;6;1:44;3:AA;5:BUTTON_START
#
# Whats Happend:
# 1. "GET" will retrive a Value
# 2. "D" say's, that the GET will get a Digital Value
# 3. "6" is the Number of the BlockLen. The Len of this <Datablock> is 6 Bytes.
# So it will be checked befor continue.
# 4. "1:44" is a Value-Check. "1" is the Byte-Index of the <Datablock>.
# It will be the Byte "44".
# Is The Value u specified "44" not the same how in the <Datablock> then it will not continue with the next parts
# 5. "5:BUTTON_START" is a Value to get. "5" is the Byte-Index of <Datablock>.
# "BUTTON_START" is the kind of the Button this Value represent.
#
# If a Byte will represent more then one Value eg a bitfield, then u can specified the Bit for this Button
#
# Example
# <Datablock> is: 00 44 88 AA DD 03
# <GET> is: GET=D;6;1:44;3:AA;5.B1:BUTTON_START
#
# Whats Happend:
# 1. to 4. are the same how below
# 5. "5.B1:BUTTON_START" is a Value to get. "5" is the Byte-Index of <Datablock>.
# The different is the ".B1" this will specified that u need to get a "B" (Byte) Bitfield.
# The "1" specified the Bitfiled-Index.
#
# Datablock-Byte 5 is "03" so the Bitfiled looks like: "00000011"
# The Bitindex we want is "B1" btw. "1". So a Bitmask will generate: 00000001
# The resulting value ar a "AND" of the Value in the Datablock and the Bitmask.
#
# A <Special-Code> can be "LC". This will say, that the Value in the Byte on the ByteIndex are a Len-Value of the <Datablock>.
#
# Example
# <Datablock> is: 00 44 06 AA DD FF
# <GET> is: GET=D;6;3:AA;5:LC
#
# Whats Happend:
# In this Case will checked if In ByteIndex 3 is the Value AA.
# And, if on Byteindex 5 is the same Value how the Len of the Block.
# In this Example, the <Datablock> is 6 Bytes long. So the Data in Byteindex 5 must be 6 else it will not continue.
#
#
#
# <Value>-Block Syntax
# --------------------
# <Byte-Index>[.<Bitfield-Index>]:<Element-Code>
#
# A Value block looks like the same as a Checkblock.
# The different is that a Value in a Byte will used to Interpret the state of a button or a axis.
# In the Previous example u can find a description how to use it.
#
# A Bitmask or a Value interpretation can more then a Byte.
# Its posible to read out Byte's, Word's and Integers.
# For more compatibility is it posible to specified the Byteorder how u want.
#
# Example
# B = Byte (no byte order)
# B0 = Bit-0 of a Byte
# B4 = Bit-4 of a Byte
#
# W = Word (2 Bytes) Byteorder is 0 1. 0 is the First Byte (low-byte), then 1 is the second (high-byte).
# W01 = Is the same as W
# W10 = Here the byteorder are switched. The First Byte is the High-Byte and the second the Low-Byte
#
# I = Integer (4 Bytes) Byteorder is 0 1 2 3.
# I3210 = Switched byteorder
# I1032 = A special Byteorder. U can specified a order how u want.
#
#
# All Digital (Button and Digital-Stick) u can spezified a "SET-Value".
# If this is not given, then "1" will used if a button is pressed.
#
# If u will specified a other Value (eg. for a Digital-Stick with 3 States) u can use the folowing syntax.
#
# <Set-Value>,<Byte-Index>[.<Bitfield-Index>]:<Element-Code>
# 3,2.B8:AXIS_8
#
# If the Button is pressed, then a 3 will push inside the var.
# Attention: 0 will not override a value! 0 is the default Value for all Elements!
#
# Example
# -1,2.B7:AXIS_8
# 1,2.B8:AXIS_8
#
# This two lines are for 1 Element, AXIS_8. 2 Digital, Binary Values will written into AXIS_8.
# If Bit7 of Byte 2 are <> 0, then -1 will written into AXIS_8, else nothind changed.
# If Bit8 of Byte 2 are <> 0, then 1 will written into AXIS_8. If a previos value are inside, then it will be overriden.
#
#
#Product
NAME=Thrustmaster Gamepad GP XID
VENDOR=044F
PRODUCT=B326
#Buttons
GET=D;14;0:00;1:LC;2.B10:BUTTON_START
GET=D;14;0:00;1:LC;2.B20:BUTTON_BACK
GET=D;14;0:00;1:LC;2.B40:BUTTON_A1
GET=D;14;0:00;1:LC;2.B80:BUTTON_A2
GET=D;14;0:00;1:LC;3.B1:BUTTON_LT
GET=D;14;0:00;1:LC;3.B2:BUTTON_RT
GET=D;14;0:00;1:LC;3.B4:BUTTON_XBOX
GET=D;14;0:00;1:LC;3.B10:BUTTON_A
GET=D;14;0:00;1:LC;3.B20:BUTTON_B
GET=D;14;0:00;1:LC;3.B40:BUTTON_X
GET=D;14;0:00;1:LC;3.B80:BUTTON_Y
#Analog-Sticks
GET=A,0,FF;14;0:00;1:LC;4.B:AXIS_5
GET=A,0,FF;14;0:00;1:LC;5.B:AXIS_6
GET=A,-7FFF,7FFF;14;0:00;1:LC;6.W:AXIS_1
GET=AI,-7FFF,7FFF;14;0:00;1:LC;8.W:AXIS_2
GET=A,-7FFF,7FFF;14;0:00;1:LC;10.W:AXIS_3
GET=A,-7FFF,7FFF;14;0:00;1:LC;12.W:AXIS_4
#Digital-Stick
GET=S,-1,1;14;0:00;1:LC;-1,2.B1:AXIS_7
GET=S,-1,1;14;0:00;1:LC;1,2.B2:AXIS_7
GET=S,-1,1;14;0:00;1:LC;-1,2.B4:AXIS_8
GET=S,-1,1;14;0:00;1:LC;1,2.B8:AXIS_8