.pragma list(push, 0)

ifndef __DINPUT_INCLUDED__
define __DINPUT_INCLUDED__
ifndef __LIBC_INC
include libc.inc
endif
ifndef DIJ_RINGZERO
ifdef _WIN32
define COM_NO_WINDOWS_H 1
include objbase.inc
endif
endif
define DIRECTINPUT_HEADER_VERSION 0x0800
ifndef DIRECTINPUT_VERSION
define DIRECTINPUT_VERSION DIRECTINPUT_HEADER_VERSION
endif

ifndef DEFINE_GUID
DEFINE_GUID macro id, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8
ifdef __PE__
_&id& equ <{l,w1,w2,{b1,b2,b3,b4,b5,b6,b7,b8}}>
elseifdef INITGUID
echo id GUID {l,w1,w2,{b1,b2,b3,b4,b5,b6,b7,b8}}
else
externdef id:GUID
endif
    exitm<>
    endm
endif

ifndef __PE__
includelib uuid.lib
endif

ifndef DIJ_RINGZERO

DEFINE_GUID(CLSID_DirectInput,	     0x25E609E0,0xB259,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00)
DEFINE_GUID(CLSID_DirectInputDevice, 0x25E609E1,0xB259,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00)

DEFINE_GUID(CLSID_DirectInput8,	     0x25E609E4,0xB259,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00)
DEFINE_GUID(CLSID_DirectInputDevice8,0x25E609E5,0xB259,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00)

DEFINE_GUID(IID_IDirectInputA,	   0x89521360,0xAA8A,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00)
DEFINE_GUID(IID_IDirectInputW,	   0x89521361,0xAA8A,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00)
DEFINE_GUID(IID_IDirectInput2A,	   0x5944E662,0xAA8A,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00)
DEFINE_GUID(IID_IDirectInput2W,	   0x5944E663,0xAA8A,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00)
DEFINE_GUID(IID_IDirectInput7A,	   0x9A4CB684,0x236D,0x11D3,0x8E,0x9D,0x00,0xC0,0x4F,0x68,0x44,0xAE)
DEFINE_GUID(IID_IDirectInput7W,	   0x9A4CB685,0x236D,0x11D3,0x8E,0x9D,0x00,0xC0,0x4F,0x68,0x44,0xAE)
DEFINE_GUID(IID_IDirectInput8A,	   0xBF798030,0x483A,0x4DA2,0xAA,0x99,0x5D,0x64,0xED,0x36,0x97,0x00)
DEFINE_GUID(IID_IDirectInput8W,	   0xBF798031,0x483A,0x4DA2,0xAA,0x99,0x5D,0x64,0xED,0x36,0x97,0x00)
DEFINE_GUID(IID_IDirectInputDeviceA, 0x5944E680,0xC92E,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00)
DEFINE_GUID(IID_IDirectInputDeviceW, 0x5944E681,0xC92E,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00)
DEFINE_GUID(IID_IDirectInputDevice2A,0x5944E682,0xC92E,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00)
DEFINE_GUID(IID_IDirectInputDevice2W,0x5944E683,0xC92E,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00)
DEFINE_GUID(IID_IDirectInputDevice7A,0x57D7C6BC,0x2356,0x11D3,0x8E,0x9D,0x00,0xC0,0x4F,0x68,0x44,0xAE)
DEFINE_GUID(IID_IDirectInputDevice7W,0x57D7C6BD,0x2356,0x11D3,0x8E,0x9D,0x00,0xC0,0x4F,0x68,0x44,0xAE)
DEFINE_GUID(IID_IDirectInputDevice8A,0x54D41080,0xDC15,0x4833,0xA4,0x1B,0x74,0x8F,0x73,0xA3,0x81,0x79)
DEFINE_GUID(IID_IDirectInputDevice8W,0x54D41081,0xDC15,0x4833,0xA4,0x1B,0x74,0x8F,0x73,0xA3,0x81,0x79)
DEFINE_GUID(IID_IDirectInputEffect,  0xE7E1F7C0,0x88D2,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35)

DEFINE_GUID(GUID_XAxis,	  0xA36D02E0,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00)
DEFINE_GUID(GUID_YAxis,	  0xA36D02E1,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00)
DEFINE_GUID(GUID_ZAxis,	  0xA36D02E2,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00)
DEFINE_GUID(GUID_RxAxis,  0xA36D02F4,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00)
DEFINE_GUID(GUID_RyAxis,  0xA36D02F5,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00)
DEFINE_GUID(GUID_RzAxis,  0xA36D02E3,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00)
DEFINE_GUID(GUID_Slider,  0xA36D02E4,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00)

DEFINE_GUID(GUID_Button,  0xA36D02F0,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00)
DEFINE_GUID(GUID_Key,	  0x55728220,0xD33C,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00)

DEFINE_GUID(GUID_POV,	  0xA36D02F2,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00)

DEFINE_GUID(GUID_Unknown, 0xA36D02F3,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00)

DEFINE_GUID(GUID_SysMouse,   0x6F1D2B60,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00)
DEFINE_GUID(GUID_SysKeyboard,0x6F1D2B61,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00)
DEFINE_GUID(GUID_Joystick   ,0x6F1D2B70,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00)
DEFINE_GUID(GUID_SysMouseEm, 0x6F1D2B80,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00)
DEFINE_GUID(GUID_SysMouseEm2,0x6F1D2B81,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00)
DEFINE_GUID(GUID_SysKeyboardEm, 0x6F1D2B82,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00)
DEFINE_GUID(GUID_SysKeyboardEm2,0x6F1D2B83,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00)

DEFINE_GUID(GUID_ConstantForce, 0x13541C20,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35)
DEFINE_GUID(GUID_RampForce,	0x13541C21,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35)
DEFINE_GUID(GUID_Square,	0x13541C22,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35)
DEFINE_GUID(GUID_Sine,		0x13541C23,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35)
DEFINE_GUID(GUID_Triangle,	0x13541C24,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35)
DEFINE_GUID(GUID_SawtoothUp,	0x13541C25,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35)
DEFINE_GUID(GUID_SawtoothDown,	0x13541C26,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35)
DEFINE_GUID(GUID_Spring,	0x13541C27,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35)
DEFINE_GUID(GUID_Damper,	0x13541C28,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35)
DEFINE_GUID(GUID_Inertia,	0x13541C29,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35)
DEFINE_GUID(GUID_Friction,	0x13541C2A,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35)
DEFINE_GUID(GUID_CustomForce,	0x13541C2B,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35)

endif

if(DIRECTINPUT_VERSION GE 0x0500)

DIEFT_ALL		equ 0x00000000

DIEFT_CONSTANTFORCE	equ 0x00000001
DIEFT_RAMPFORCE		equ 0x00000002
DIEFT_PERIODIC		equ 0x00000003
DIEFT_CONDITION		equ 0x00000004
DIEFT_CUSTOMFORCE	equ 0x00000005
DIEFT_HARDWARE		equ 0x000000FF
DIEFT_FFATTACK		equ 0x00000200
DIEFT_FFFADE		equ 0x00000400
DIEFT_SATURATION	equ 0x00000800
DIEFT_POSNEGCOEFFICIENTS equ 0x00001000
DIEFT_POSNEGSATURATION	equ 0x00002000
DIEFT_DEADBAND		equ 0x00004000
DIEFT_STARTDELAY	equ 0x00008000
DIEFT_GETTYPE macro n
	exitm<LOBYTE(n)>
	endm

DI_DEGREES		equ 100
DI_FFNOMINALMAX		equ 10000
DI_SECONDS		equ 1000000

DICONSTANTFORCE		STRUC
lMagnitude		LONG ?
DICONSTANTFORCE		ENDS
LPDICONSTANTFORCE	typedef ptr DICONSTANTFORCE
LPCDICONSTANTFORCE	typedef ptr DICONSTANTFORCE

DIRAMPFORCE		STRUC
lStart			LONG ?
lEnd			LONG ?
DIRAMPFORCE		ENDS
LPDIRAMPFORCE		typedef ptr DIRAMPFORCE
LPCDIRAMPFORCE		typedef ptr DIRAMPFORCE

DIPERIODIC		STRUC
dwMagnitude		dd ?
lOffset			LONG ?
dwPhase			dd ?
dwPeriod		dd ?
DIPERIODIC		ENDS
LPDIPERIODIC		typedef ptr DIPERIODIC
LPCDIPERIODIC		typedef ptr DIPERIODIC

DICONDITION		STRUC
lOffset			LONG ?
lPositiveCoefficient	LONG ?
lNegativeCoefficient	LONG ?
dwPositiveSaturation	dd ?
dwNegativeSaturation	dd ?
lDeadBand		LONG ?
DICONDITION		ENDS
LPDICONDITION		typedef ptr DICONDITION
LPCDICONDITION		typedef ptr DICONDITION

DICUSTOMFORCE		STRUC
cChannels		dd ?
dwSamplePeriod		dd ?
cSamples		dd ?
rglForceData		LPLONG ?
DICUSTOMFORCE		ENDS
LPDICUSTOMFORCE		typedef ptr DICUSTOMFORCE
LPCDICUSTOMFORCE	typedef ptr DICUSTOMFORCE


DIENVELOPE		STRUC
dwSize			dd ?
dwAttackLevel		dd ?
dwAttackTime		dd ?
dwFadeLevel		dd ?
dwFadeTime		dd ?
DIENVELOPE		ENDS
LPDIENVELOPE		typedef ptr DIENVELOPE
LPCDIENVELOPE		typedef ptr DIENVELOPE


DIEFFECT_DX5		STRUC
dwSize			dd ?
dwFlags			dd ?
dwDuration		dd ?
dwSamplePeriod		dd ?
dwGain			dd ?
dwTriggerButton		dd ?
dwTriggerRepeatInterval dd ?
cAxes			dd ?
rgdwAxes		LPDWORD ?
rglDirection		LPLONG ?
lpEnvelope		LPDIENVELOPE ?
cbTypeSpecificParams	dd ?
lpvTypeSpecificParams	LPVOID ?
DIEFFECT_DX5		ENDS
LPDIEFFECT_DX5		typedef ptr DIEFFECT_DX5
LPCDIEFFECT_DX5		typedef ptr DIEFFECT_DX5

DIEFFECT		STRUC
dwSize			dd ?
dwFlags			dd ?
dwDuration		dd ?
dwSamplePeriod		dd ?
dwGain			dd ?
dwTriggerButton		dd ?
dwTriggerRepeatInterval dd ?
cAxes			dd ?
rgdwAxes		LPDWORD ?
rglDirection		LPLONG ?
lpEnvelope		LPDIENVELOPE ?
cbTypeSpecificParams	dd ?
lpvTypeSpecificParams	LPVOID ?
if(DIRECTINPUT_VERSION GE 0x0600)
dwStartDelay		dd ?
endif
DIEFFECT		ENDS
LPDIEFFECT		typedef ptr DIEFFECT
DIEFFECT_DX6		typedef DIEFFECT
LPDIEFFECT_DX6		typedef LPDIEFFECT
LPCDIEFFECT		typedef ptr DIEFFECT


if(DIRECTINPUT_VERSION GE 0x0700)
ifndef DIJ_RINGZERO
DIFILEEFFECT		STRUC
dwSize			dd ?
GuidEffect		GUID <>
lpDiEffect		LPCDIEFFECT ?
szFriendlyName		SBYTE MAX_PATH dup(?)
DIFILEEFFECT		ENDS
LPDIFILEEFFECT		typedef ptr DIFILEEFFECT
LPCDIFILEEFFECT		typedef ptr DIFILEEFFECT

CALLBACK(LPDIENUMEFFECTSINFILECALLBACK, :LPCDIFILEEFFECT, :LPVOID)
endif
endif ;; DIRECTINPUT_VERSION >= 0x0700

DIEFF_OBJECTIDS		equ 0x00000001
DIEFF_OBJECTOFFSETS	equ 0x00000002
DIEFF_CARTESIAN		equ 0x00000010
DIEFF_POLAR		equ 0x00000020
DIEFF_SPHERICAL		equ 0x00000040

DIEP_DURATION		equ 0x00000001
DIEP_SAMPLEPERIOD	equ 0x00000002
DIEP_GAIN		equ 0x00000004
DIEP_TRIGGERBUTTON	equ 0x00000008
DIEP_TRIGGERREPEATINTERVAL equ 0x00000010
DIEP_AXES		equ 0x00000020
DIEP_DIRECTION		equ 0x00000040
DIEP_ENVELOPE		equ 0x00000080
DIEP_TYPESPECIFICPARAMS equ 0x00000100
if(DIRECTINPUT_VERSION GE 0x0600)
DIEP_STARTDELAY		equ 0x00000200
DIEP_ALLPARAMS_DX5	equ 0x000001FF
DIEP_ALLPARAMS		equ 0x000003FF
else
DIEP_ALLPARAMS		equ 0x000001FF
endif
DIEP_START		equ 0x20000000
DIEP_NORESTART		equ 0x40000000
DIEP_NODOWNLOAD		equ 0x80000000
DIEB_NOTRIGGER		equ 0xFFFFFFFF

DIES_SOLO		equ 0x00000001
DIES_NODOWNLOAD		equ 0x80000000

DIEGES_PLAYING		equ 0x00000001
DIEGES_EMULATED		equ 0x00000002

DIEFFESCAPE		STRUC
dwSize			dd ?
dwCommand		dd ?
lpvInBuffer		LPVOID ?
cbInBuffer		dd ?
lpvOutBuffer		LPVOID ?
cbOutBuffer		dd ?
DIEFFESCAPE		ENDS
LPDIEFFESCAPE		typedef ptr DIEFFESCAPE

ifndef DIJ_RINGZERO

.comdef IDirectInputEffect : public IUnknown

    Initialize		proc :HINSTANCE, :DWORD, :REFGUID
    GetEffectGuid	proc :LPGUID
    GetParameters	proc :LPDIEFFECT, :DWORD
    SetParameters	proc :LPCDIEFFECT, :DWORD
    Start		proc :DWORD, :DWORD
    Stop		proc
    GetEffectStatus	proc :LPDWORD
    Download		proc
    Unload		proc
    Escape		proc :LPDIEFFESCAPE
   .ends
    LPDIRECTINPUTEFFECT typedef ptr IDirectInputEffect

endif
endif


if DIRECTINPUT_VERSION LE 0x700
DIDEVTYPE_DEVICE	equ 1
DIDEVTYPE_MOUSE		equ 2
DIDEVTYPE_KEYBOARD	equ 3
DIDEVTYPE_JOYSTICK	equ 4

else
DI8DEVCLASS_ALL		equ 0
DI8DEVCLASS_DEVICE	equ 1
DI8DEVCLASS_POINTER	equ 2
DI8DEVCLASS_KEYBOARD	equ 3
DI8DEVCLASS_GAMECTRL	equ 4

DI8DEVTYPE_DEVICE	equ 0x11
DI8DEVTYPE_MOUSE	equ 0x12
DI8DEVTYPE_KEYBOARD	equ 0x13
DI8DEVTYPE_JOYSTICK	equ 0x14
DI8DEVTYPE_GAMEPAD	equ 0x15
DI8DEVTYPE_DRIVING	equ 0x16
DI8DEVTYPE_FLIGHT	equ 0x17
DI8DEVTYPE_1STPERSON	equ 0x18
DI8DEVTYPE_DEVICECTRL	equ 0x19
DI8DEVTYPE_SCREENPOINTER equ 0x1A
DI8DEVTYPE_REMOTE	equ 0x1B
DI8DEVTYPE_SUPPLEMENTAL equ 0x1C
endif

DIDEVTYPE_HID		equ 0x00010000

if DIRECTINPUT_VERSION LE 0x700
DIDEVTYPEMOUSE_UNKNOWN	equ 1
DIDEVTYPEMOUSE_TRADITIONAL equ 2
DIDEVTYPEMOUSE_FINGERSTICK equ 3
DIDEVTYPEMOUSE_TOUCHPAD equ 4
DIDEVTYPEMOUSE_TRACKBALL equ 5

DIDEVTYPEKEYBOARD_UNKNOWN equ 0
DIDEVTYPEKEYBOARD_PCXT	equ 1
DIDEVTYPEKEYBOARD_OLIVETTI equ 2
DIDEVTYPEKEYBOARD_PCAT	equ 3
DIDEVTYPEKEYBOARD_PCENH equ 4
DIDEVTYPEKEYBOARD_NOKIA1050 equ 5
DIDEVTYPEKEYBOARD_NOKIA9140 equ 6
DIDEVTYPEKEYBOARD_NEC98 equ 7
DIDEVTYPEKEYBOARD_NEC98LAPTOP equ 8
DIDEVTYPEKEYBOARD_NEC98106 equ 9
DIDEVTYPEKEYBOARD_JAPAN106 equ 10
DIDEVTYPEKEYBOARD_JAPANAX equ 11
DIDEVTYPEKEYBOARD_J3100 equ 12

DIDEVTYPEJOYSTICK_UNKNOWN equ 1
DIDEVTYPEJOYSTICK_TRADITIONAL equ 2
DIDEVTYPEJOYSTICK_FLIGHTSTICK equ 3
DIDEVTYPEJOYSTICK_GAMEPAD equ 4
DIDEVTYPEJOYSTICK_RUDDER equ 5
DIDEVTYPEJOYSTICK_WHEEL equ 6
DIDEVTYPEJOYSTICK_HEADTRACKER equ 7

else
DI8DEVTYPEMOUSE_UNKNOWN equ 1
DI8DEVTYPEMOUSE_TRADITIONAL equ 2
DI8DEVTYPEMOUSE_FINGERSTICK equ 3
DI8DEVTYPEMOUSE_TOUCHPAD equ 4
DI8DEVTYPEMOUSE_TRACKBALL equ 5
DI8DEVTYPEMOUSE_ABSOLUTE equ 6

DI8DEVTYPEKEYBOARD_UNKNOWN equ 0
DI8DEVTYPEKEYBOARD_PCXT equ 1
DI8DEVTYPEKEYBOARD_OLIVETTI equ 2
DI8DEVTYPEKEYBOARD_PCAT equ 3
DI8DEVTYPEKEYBOARD_PCENH equ 4
DI8DEVTYPEKEYBOARD_NOKIA1050 equ 5
DI8DEVTYPEKEYBOARD_NOKIA9140 equ 6
DI8DEVTYPEKEYBOARD_NEC98 equ 7
DI8DEVTYPEKEYBOARD_NEC98LAPTOP equ 8
DI8DEVTYPEKEYBOARD_NEC98106 equ 9
DI8DEVTYPEKEYBOARD_JAPAN106 equ 10
DI8DEVTYPEKEYBOARD_JAPANAX equ 11
DI8DEVTYPEKEYBOARD_J3100 equ 12

DI8DEVTYPE_LIMITEDGAMESUBTYPE equ 1

DI8DEVTYPEJOYSTICK_LIMITED equ DI8DEVTYPE_LIMITEDGAMESUBTYPE
DI8DEVTYPEJOYSTICK_STANDARD equ 2

DI8DEVTYPEGAMEPAD_LIMITED equ DI8DEVTYPE_LIMITEDGAMESUBTYPE
DI8DEVTYPEGAMEPAD_STANDARD equ 2
DI8DEVTYPEGAMEPAD_TILT	equ 3

DI8DEVTYPEDRIVING_LIMITED equ DI8DEVTYPE_LIMITEDGAMESUBTYPE
DI8DEVTYPEDRIVING_COMBINEDPEDALS equ 2
DI8DEVTYPEDRIVING_DUALPEDALS equ 3
DI8DEVTYPEDRIVING_THREEPEDALS equ 4
DI8DEVTYPEDRIVING_HANDHELD equ 5

DI8DEVTYPEFLIGHT_LIMITED equ DI8DEVTYPE_LIMITEDGAMESUBTYPE
DI8DEVTYPEFLIGHT_STICK	equ 2
DI8DEVTYPEFLIGHT_YOKE	equ 3
DI8DEVTYPEFLIGHT_RC	equ 4

DI8DEVTYPE1STPERSON_LIMITED equ DI8DEVTYPE_LIMITEDGAMESUBTYPE
DI8DEVTYPE1STPERSON_UNKNOWN equ 2
DI8DEVTYPE1STPERSON_SIXDOF equ 3
DI8DEVTYPE1STPERSON_SHOOTER equ 4

DI8DEVTYPESCREENPTR_UNKNOWN equ 2
DI8DEVTYPESCREENPTR_LIGHTGUN equ 3
DI8DEVTYPESCREENPTR_LIGHTPEN equ 4
DI8DEVTYPESCREENPTR_TOUCH equ 5

DI8DEVTYPEREMOTE_UNKNOWN equ 2

DI8DEVTYPEDEVICECTRL_UNKNOWN equ 2
DI8DEVTYPEDEVICECTRL_COMMSSELECTION equ 3
DI8DEVTYPEDEVICECTRL_COMMSSELECTION_HARDWIRED equ 4

DI8DEVTYPESUPPLEMENTAL_UNKNOWN equ 2
DI8DEVTYPESUPPLEMENTAL_2NDHANDCONTROLLER equ 3
DI8DEVTYPESUPPLEMENTAL_HEADTRACKER equ 4
DI8DEVTYPESUPPLEMENTAL_HANDTRACKER equ 5
DI8DEVTYPESUPPLEMENTAL_SHIFTSTICKGATE equ 6
DI8DEVTYPESUPPLEMENTAL_SHIFTER equ 7
DI8DEVTYPESUPPLEMENTAL_THROTTLE equ 8
DI8DEVTYPESUPPLEMENTAL_SPLITTHROTTLE equ 9
DI8DEVTYPESUPPLEMENTAL_COMBINEDPEDALS equ 10
DI8DEVTYPESUPPLEMENTAL_DUALPEDALS equ 11
DI8DEVTYPESUPPLEMENTAL_THREEPEDALS equ 12
DI8DEVTYPESUPPLEMENTAL_RUDDERPEDALS equ 13
endif

GET_DIDEVICE_TYPE macro dwDevType
	exitm<LOBYTE(dwDevType)>
	endm
GET_DIDEVICE_SUBTYPE macro dwDevType
	exitm<HIBYTE(dwDevType)>
	endm

if(DIRECTINPUT_VERSION GE 0x0500)
DIDEVCAPS_DX3		STRUC
dwSize			dd ?
dwFlags			dd ?
dwDevType		dd ?
dwAxes			dd ?
dwButtons		dd ?
dwPOVs			dd ?
DIDEVCAPS_DX3		ENDS
LPDIDEVCAPS_DX3		typedef ptr DIDEVCAPS_DX3
endif

DIDEVCAPS		STRUC
dwSize			dd ?
dwFlags			dd ?
dwDevType		dd ?
dwAxes			dd ?
dwButtons		dd ?
dwPOVs			dd ?
if(DIRECTINPUT_VERSION GE 0x0500)
dwFFSamplePeriod	dd ?
dwFFMinTimeResolution	dd ?
dwFirmwareRevision	dd ?
dwHardwareRevision	dd ?
dwFFDriverVersion	dd ?
endif
DIDEVCAPS		ENDS
LPDIDEVCAPS		typedef ptr DIDEVCAPS

DIDC_ATTACHED		equ 0x00000001
DIDC_POLLEDDEVICE	equ 0x00000002
DIDC_EMULATED		equ 0x00000004
DIDC_POLLEDDATAFORMAT	equ 0x00000008
if(DIRECTINPUT_VERSION GE 0x0500)
DIDC_FORCEFEEDBACK	equ 0x00000100
DIDC_FFATTACK		equ 0x00000200
DIDC_FFFADE		equ 0x00000400
DIDC_SATURATION		equ 0x00000800
DIDC_POSNEGCOEFFICIENTS equ 0x00001000
DIDC_POSNEGSATURATION	equ 0x00002000
DIDC_DEADBAND		equ 0x00004000
endif
DIDC_STARTDELAY		equ 0x00008000
if(DIRECTINPUT_VERSION GE 0x050a)
DIDC_ALIAS		equ 0x00010000
DIDC_PHANTOM		equ 0x00020000
endif
if(DIRECTINPUT_VERSION GE 0x0800)
DIDC_HIDDEN		equ 0x00040000
endif

DIDFT_ALL		equ 0x00000000

DIDFT_RELAXIS		equ 0x00000001
DIDFT_ABSAXIS		equ 0x00000002
DIDFT_AXIS		equ 0x00000003

DIDFT_PSHBUTTON		equ 0x00000004
DIDFT_TGLBUTTON		equ 0x00000008
DIDFT_BUTTON		equ 0x0000000C

DIDFT_POV		equ 0x00000010
DIDFT_COLLECTION	equ 0x00000040
DIDFT_NODATA		equ 0x00000080

DIDFT_ANYINSTANCE	equ 0x00FFFF00
DIDFT_INSTANCEMASK	equ DIDFT_ANYINSTANCE
DIDFT_MAKEINSTANCE macro n
	exitm<((n) SHL 8)>
	endm
DIDFT_GETTYPE macro n
	exitm<LOBYTE(n)>
	endm
DIDFT_GETINSTANCE macro n
	exitm<LOWORD((n) SHR 8)>
	endm
DIDFT_FFACTUATOR	equ 0x01000000
DIDFT_FFEFFECTTRIGGER	equ 0x02000000
if(DIRECTINPUT_VERSION GE 0x050a)
DIDFT_OUTPUT		equ 0x10000000
DIDFT_VENDORDEFINED	equ 0x04000000
DIDFT_ALIAS		equ 0x08000000
endif

DIDFT_ENUMCOLLECTION macro n
	exitm<((n) SHL 8)>
	endm
DIDFT_NOCOLLECTION	equ 0x00FFFF00

ifndef DIJ_RINGZERO

DIOBJECTDATAFORMAT	STRUC
pguid			LPGUID ?
dwOfs			dd ?
dwType			dd ?
dwFlags			dd ?
DIOBJECTDATAFORMAT	ENDS
LPDIOBJECTDATAFORMAT	typedef ptr DIOBJECTDATAFORMAT
LPCDIOBJECTDATAFORMAT	typedef ptr DIOBJECTDATAFORMAT

DIDATAFORMAT		STRUC
dwSize			dd ?
dwObjSize		dd ?
dwFlags			dd ?
dwDataSize		dd ?
dwNumObjs		dd ?
rgodf			LPDIOBJECTDATAFORMAT ?
DIDATAFORMAT		ENDS
LPDIDATAFORMAT		typedef ptr DIDATAFORMAT
LPCDIDATAFORMAT		typedef ptr DIDATAFORMAT

DIDF_ABSAXIS		equ 0x00000001
DIDF_RELAXIS		equ 0x00000002

externdef		c_dfDIMouse:DIDATAFORMAT
if(DIRECTINPUT_VERSION GE 0x0700)
externdef		c_dfDIMouse2:DIDATAFORMAT
endif
externdef		c_dfDIKeyboard:DIDATAFORMAT
if(DIRECTINPUT_VERSION GE 0x0500)
externdef		c_dfDIJoystick:DIDATAFORMAT
externdef		c_dfDIJoystick2:DIDATAFORMAT
endif

if DIRECTINPUT_VERSION GT 0x0700

DIACTIONA		STRUC
uAppData		UINT_PTR ?
dwSemantic		dd ?
dwFlags			dd ?
UNION ; {
lptszActionName		LPCSTR ?
uResIdString		UINT ?
ENDS ;
guidInstance		GUID <>
dwObjID			dd ?
dwHow			dd ?
DIACTIONA		ENDS
LPDIACTIONA		typedef ptr DIACTIONA
DIACTIONW		STRUC
uAppData		UINT_PTR ?
dwSemantic		dd ?
dwFlags			dd ?
UNION ; {
lptszActionName		LPCWSTR ?
uResIdString		UINT ?
ENDS ;
guidInstance		GUID <>
dwObjID			dd ?
dwHow			dd ?
DIACTIONW		ENDS
LPDIACTIONW		typedef ptr DIACTIONW
ifdef _UNICODE
DIACTION		typedef DIACTIONW
LPDIACTION		typedef LPDIACTIONW
else
DIACTION		typedef DIACTIONA
LPDIACTION		typedef LPDIACTIONA
endif

LPCDIACTIONA		typedef ptr DIACTIONA
LPCDIACTIONW		typedef ptr DIACTIONW
ifdef _UNICODE
DIACTION		typedef DIACTIONW
LPCDIACTION		typedef LPCDIACTIONW
else
DIACTION		typedef DIACTIONA
LPCDIACTION		typedef LPCDIACTIONA
endif
LPCDIACTION		typedef ptr DIACTION


DIA_FORCEFEEDBACK	equ 0x00000001
DIA_APPMAPPED		equ 0x00000002
DIA_APPNOMAP		equ 0x00000004
DIA_NORANGE		equ 0x00000008
DIA_APPFIXED		equ 0x00000010

DIAH_UNMAPPED		equ 0x00000000
DIAH_USERCONFIG		equ 0x00000001
DIAH_APPREQUESTED	equ 0x00000002
DIAH_HWAPP		equ 0x00000004
DIAH_HWDEFAULT		equ 0x00000008
DIAH_DEFAULT		equ 0x00000020
DIAH_ERROR		equ 0x80000000

DIACTIONFORMATA		STRUC
dwSize			dd ?
dwActionSize		dd ?
dwDataSize		dd ?
dwNumActions		dd ?
rgoAction		LPDIACTIONA ?
guidActionMap		GUID <>
dwGenre			dd ?
dwBufferSize		dd ?
lAxisMin		LONG ?
lAxisMax		LONG ?
hInstString		HINSTANCE ?
ftTimeStamp		FILETIME <>
dwCRC			dd ?
tszActionMap		CHAR MAX_PATH dup(?)
DIACTIONFORMATA		ENDS
LPDIACTIONFORMATA	typedef ptr DIACTIONFORMATA
DIACTIONFORMATW		STRUC
dwSize			dd ?
dwActionSize		dd ?
dwDataSize		dd ?
dwNumActions		dd ?
rgoAction		LPDIACTIONW ?
guidActionMap		GUID <>
dwGenre			dd ?
dwBufferSize		dd ?
lAxisMin		LONG ?
lAxisMax		LONG ?
hInstString		HINSTANCE ?
ftTimeStamp		FILETIME <>
dwCRC			dd ?
tszActionMap		WCHAR MAX_PATH dup(?)
DIACTIONFORMATW		ENDS
LPDIACTIONFORMATW	typedef ptr DIACTIONFORMATW
ifdef _UNICODE
DIACTIONFORMAT		typedef DIACTIONFORMATW
LPDIACTIONFORMAT	typedef LPDIACTIONFORMATW
else
DIACTIONFORMAT		typedef DIACTIONFORMATA
LPDIACTIONFORMAT	typedef LPDIACTIONFORMATA
endif
LPCDIACTIONFORMATA	typedef ptr DIACTIONFORMATA
LPCDIACTIONFORMATW	typedef ptr DIACTIONFORMATW
ifdef _UNICODE
DIACTIONFORMAT		typedef DIACTIONFORMATW
LPCDIACTIONFORMAT	typedef LPCDIACTIONFORMATW
else
DIACTIONFORMAT		typedef DIACTIONFORMATA
LPCDIACTIONFORMAT	typedef LPCDIACTIONFORMATA
endif
LPCDIACTIONFORMAT	typedef ptr DIACTIONFORMAT

DIAFTS_NEWDEVICELOW	equ 0xFFFFFFFF
DIAFTS_NEWDEVICEHIGH	equ 0xFFFFFFFF
DIAFTS_UNUSEDDEVICELOW	equ 0x00000000
DIAFTS_UNUSEDDEVICEHIGH equ 0x00000000

DIDBAM_DEFAULT		equ 0x00000000
DIDBAM_PRESERVE		equ 0x00000001
DIDBAM_INITIALIZE	equ 0x00000002
DIDBAM_HWDEFAULTS	equ 0x00000004

DIDSAM_DEFAULT		equ 0x00000000
DIDSAM_NOUSER		equ 0x00000001
DIDSAM_FORCESAVE	equ 0x00000002

DICD_DEFAULT		equ 0x00000000
DICD_EDIT		equ 0x00000001

ifndef D3DCOLOR_DEFINED
D3DCOLOR		typedef DWORD
D3DCOLOR_DEFINED equ 1
endif

DICOLORSET		STRUC
dwSize			dd ?
cTextFore		D3DCOLOR ?
cTextHighlight		D3DCOLOR ?
cCalloutLine		D3DCOLOR ?
cCalloutHighlight	D3DCOLOR ?
cBorder			D3DCOLOR ?
cControlFill		D3DCOLOR ?
cHighlightFill		D3DCOLOR ?
cAreaFill		D3DCOLOR ?
DICOLORSET		ENDS
LPDICOLORSET		typedef ptr DICOLORSET
LPCDICOLORSET		typedef ptr DICOLORSET

DICONFIGUREDEVICESPARAMSA STRUC
dwSize			dd ?
dwcUsers		dd ?
lptszUserNames		LPSTR ?
dwcFormats		dd ?
lprgFormats		LPDIACTIONFORMATA ?
hwnd			HWND ?
dics			DICOLORSET <>
lpUnkDDSTarget		LPUNKNOWN ?
DICONFIGUREDEVICESPARAMSA ENDS
LPDICONFIGUREDEVICESPARAMSA typedef ptr DICONFIGUREDEVICESPARAMSA
DICONFIGUREDEVICESPARAMSW STRUC
dwSize			dd ?
dwcUsers		dd ?
lptszUserNames		LPWSTR ?
dwcFormats		dd ?
lprgFormats		LPDIACTIONFORMATW ?
hwnd			HWND ?
dics			DICOLORSET <>
lpUnkDDSTarget		LPUNKNOWN ?
DICONFIGUREDEVICESPARAMSW ENDS
LPDICONFIGUREDEVICESPARAMSW typedef ptr DICONFIGUREDEVICESPARAMSW
ifdef _UNICODE
DICONFIGUREDEVICESPARAMS typedef DICONFIGUREDEVICESPARAMSW
LPDICONFIGUREDEVICESPARAMS typedef LPDICONFIGUREDEVICESPARAMSW
else
DICONFIGUREDEVICESPARAMS typedef DICONFIGUREDEVICESPARAMSA
LPDICONFIGUREDEVICESPARAMS typedef LPDICONFIGUREDEVICESPARAMSA
endif
LPCDICONFIGUREDEVICESPARAMSA typedef ptr DICONFIGUREDEVICESPARAMSA
LPCDICONFIGUREDEVICESPARAMSW typedef ptr DICONFIGUREDEVICESPARAMSW
ifdef _UNICODE
DICONFIGUREDEVICESPARAMS typedef DICONFIGUREDEVICESPARAMSW
LPCDICONFIGUREDEVICESPARAMS typedef LPCDICONFIGUREDEVICESPARAMSW
else
DICONFIGUREDEVICESPARAMS typedef DICONFIGUREDEVICESPARAMSA
LPCDICONFIGUREDEVICESPARAMS typedef LPCDICONFIGUREDEVICESPARAMSA
endif
LPCDICONFIGUREDEVICESPARAMS typedef ptr DICONFIGUREDEVICESPARAMS


DIDIFT_CONFIGURATION	equ 0x00000001
DIDIFT_OVERLAY		equ 0x00000002

DIDAL_CENTERED		equ 0x00000000
DIDAL_LEFTALIGNED	equ 0x00000001
DIDAL_RIGHTALIGNED	equ 0x00000002
DIDAL_MIDDLE		equ 0x00000000
DIDAL_TOPALIGNED	equ 0x00000004
DIDAL_BOTTOMALIGNED	equ 0x00000008

DIDEVICEIMAGEINFOA	STRUC
tszImagePath		CHAR MAX_PATH dup(?)
dwFlags			dd ?
dwViewID		dd ?
rcOverlay		RECT <>
dwObjID			dd ?
dwcValidPts		dd ?
rgptCalloutLine		POINT 5 dup(<>)
rcCalloutRect		RECT <>
dwTextAlign		dd ?
DIDEVICEIMAGEINFOA	ENDS
LPDIDEVICEIMAGEINFOA	typedef ptr DIDEVICEIMAGEINFOA
DIDEVICEIMAGEINFOW	STRUC
tszImagePath		WCHAR MAX_PATH dup(?)
dwFlags			dd ?
dwViewID		dd ?
rcOverlay		RECT <>
dwObjID			dd ?
dwcValidPts		dd ?
rgptCalloutLine		POINT 5 dup(<>)
rcCalloutRect		RECT <>
dwTextAlign		dd ?
DIDEVICEIMAGEINFOW	ENDS
LPDIDEVICEIMAGEINFOW	typedef ptr DIDEVICEIMAGEINFOW
ifdef _UNICODE
DIDEVICEIMAGEINFO	typedef DIDEVICEIMAGEINFOW
LPDIDEVICEIMAGEINFO	typedef LPDIDEVICEIMAGEINFOW
else
DIDEVICEIMAGEINFO	typedef DIDEVICEIMAGEINFOA
LPDIDEVICEIMAGEINFO	typedef LPDIDEVICEIMAGEINFOA
endif
LPCDIDEVICEIMAGEINFOA	typedef ptr DIDEVICEIMAGEINFOA
LPCDIDEVICEIMAGEINFOW	typedef ptr DIDEVICEIMAGEINFOW
ifdef _UNICODE
DIDEVICEIMAGEINFO	typedef DIDEVICEIMAGEINFOW
LPCDIDEVICEIMAGEINFO	typedef LPCDIDEVICEIMAGEINFOW
else
DIDEVICEIMAGEINFO	typedef DIDEVICEIMAGEINFOA
LPCDIDEVICEIMAGEINFO	typedef LPCDIDEVICEIMAGEINFOA
endif
LPCDIDEVICEIMAGEINFO	typedef ptr DIDEVICEIMAGEINFO

DIDEVICEIMAGEINFOHEADERA STRUC
dwSize			dd ?
dwSizeImageInfo		dd ?
dwcViews		dd ?
dwcButtons		dd ?
dwcAxes			dd ?
dwcPOVs			dd ?
dwBufferSize		dd ?
dwBufferUsed		dd ?
lprgImageInfoArray	LPDIDEVICEIMAGEINFOA ?
DIDEVICEIMAGEINFOHEADERA ENDS
LPDIDEVICEIMAGEINFOHEADERA typedef ptr DIDEVICEIMAGEINFOHEADERA
DIDEVICEIMAGEINFOHEADERW  STRUC
dwSize			dd ?
dwSizeImageInfo		dd ?
dwcViews		dd ?
dwcButtons		dd ?
dwcAxes			dd ?
dwcPOVs			dd ?
dwBufferSize		dd ?
dwBufferUsed		dd ?
lprgImageInfoArray	LPDIDEVICEIMAGEINFOW ?
DIDEVICEIMAGEINFOHEADERW ENDS
LPDIDEVICEIMAGEINFOHEADERW typedef ptr DIDEVICEIMAGEINFOHEADERW
ifdef _UNICODE
DIDEVICEIMAGEINFOHEADER typedef DIDEVICEIMAGEINFOHEADERW
LPDIDEVICEIMAGEINFOHEADER typedef LPDIDEVICEIMAGEINFOHEADERW
else
DIDEVICEIMAGEINFOHEADER typedef DIDEVICEIMAGEINFOHEADERA
LPDIDEVICEIMAGEINFOHEADER typedef LPDIDEVICEIMAGEINFOHEADERA
endif
LPCDIDEVICEIMAGEINFOHEADERA typedef ptr DIDEVICEIMAGEINFOHEADERA
LPCDIDEVICEIMAGEINFOHEADERW typedef ptr DIDEVICEIMAGEINFOHEADERW
ifdef _UNICODE
DIDEVICEIMAGEINFOHEADER typedef DIDEVICEIMAGEINFOHEADERW
LPCDIDEVICEIMAGEINFOHEADER typedef LPCDIDEVICEIMAGEINFOHEADERW
else
DIDEVICEIMAGEINFOHEADER typedef DIDEVICEIMAGEINFOHEADERA
LPCDIDEVICEIMAGEINFOHEADER typedef LPCDIDEVICEIMAGEINFOHEADERA
endif
LPCDIDEVICEIMAGEINFOHEADER typedef ptr DIDEVICEIMAGEINFOHEADER

endif

if(DIRECTINPUT_VERSION GE 0x0500)

DIDEVICEOBJECTINSTANCE_DX3A STRUC
dwSize			dd ?
guidType		GUID <>
dwOfs			dd ?
dwType			dd ?
dwFlags			dd ?
tszName			CHAR MAX_PATH dup(?)
DIDEVICEOBJECTINSTANCE_DX3A ENDS
LPDIDEVICEOBJECTINSTANCE_DX3A typedef ptr DIDEVICEOBJECTINSTANCE_DX3A
DIDEVICEOBJECTINSTANCE_DX3W  STRUC
dwSize			dd ?
guidType		GUID <>
dwOfs			dd ?
dwType			dd ?
dwFlags			dd ?
tszName			WCHAR MAX_PATH dup(?)
DIDEVICEOBJECTINSTANCE_DX3W ENDS
LPDIDEVICEOBJECTINSTANCE_DX3W typedef ptr DIDEVICEOBJECTINSTANCE_DX3W
ifdef _UNICODE
DIDEVICEOBJECTINSTANCE_DX3 typedef DIDEVICEOBJECTINSTANCE_DX3W
LPDIDEVICEOBJECTINSTANCE_DX3 typedef LPDIDEVICEOBJECTINSTANCE_DX3W
else
DIDEVICEOBJECTINSTANCE_DX3 typedef DIDEVICEOBJECTINSTANCE_DX3A
LPDIDEVICEOBJECTINSTANCE_DX3 typedef LPDIDEVICEOBJECTINSTANCE_DX3A
endif
LPCDIDEVICEOBJECTINSTANCE_DX3A typedef ptr DIDEVICEOBJECTINSTANCE_DX3A
LPCDIDEVICEOBJECTINSTANCE_DX3W typedef ptr DIDEVICEOBJECTINSTANCE_DX3W
LPCDIDEVICEOBJECTINSTANCE_DX3 typedef ptr DIDEVICEOBJECTINSTANCE_DX3
endif

DIDEVICEOBJECTINSTANCEA	 STRUC
dwSize			dd ?
guidType		GUID <>
dwOfs			dd ?
dwType			dd ?
dwFlags			dd ?
tszName			CHAR MAX_PATH dup(?)
if(DIRECTINPUT_VERSION GE 0x0500)
dwFFMaxForce		dd ?
dwFFForceResolution	dd ?
wCollectionNumber	dw ?
wDesignatorIndex	dw ?
wUsagePage		dw ?
wUsage			dw ?
dwDimension		dd ?
wExponent		dw ?
wReportId		dw ?
endif
DIDEVICEOBJECTINSTANCEA ENDS
LPDIDEVICEOBJECTINSTANCEA typedef ptr DIDEVICEOBJECTINSTANCEA
DIDEVICEOBJECTINSTANCEW	 STRUC
dwSize			dd ?
guidType		GUID <>
dwOfs			dd ?
dwType			dd ?
dwFlags			dd ?
tszName			WCHAR MAX_PATH dup(?)
if(DIRECTINPUT_VERSION GE 0x0500)
dwFFMaxForce		dd ?
dwFFForceResolution	dd ?
wCollectionNumber	dw ?
wDesignatorIndex	dw ?
wUsagePage		dw ?
wUsage			dw ?
dwDimension		dd ?
wExponent		dw ?
wReportId		dw ?
endif
DIDEVICEOBJECTINSTANCEW ENDS
LPDIDEVICEOBJECTINSTANCEW typedef ptr DIDEVICEOBJECTINSTANCEW
ifdef _UNICODE
DIDEVICEOBJECTINSTANCE	typedef DIDEVICEOBJECTINSTANCEW
LPDIDEVICEOBJECTINSTANCE typedef LPDIDEVICEOBJECTINSTANCEW
else
DIDEVICEOBJECTINSTANCE	typedef DIDEVICEOBJECTINSTANCEA
LPDIDEVICEOBJECTINSTANCE typedef LPDIDEVICEOBJECTINSTANCEA
endif
LPCDIDEVICEOBJECTINSTANCEA typedef ptr DIDEVICEOBJECTINSTANCEA
LPCDIDEVICEOBJECTINSTANCEW typedef ptr DIDEVICEOBJECTINSTANCEW
LPCDIDEVICEOBJECTINSTANCE typedef ptr DIDEVICEOBJECTINSTANCE

CALLBACK(LPDIENUMDEVICEOBJECTSCALLBACKA, :LPCDIDEVICEOBJECTINSTANCEA, :PVOID)
CALLBACK(LPDIENUMDEVICEOBJECTSCALLBACKW, :LPCDIDEVICEOBJECTINSTANCEW, :PVOID)
ifdef _UNICODE
LPDIENUMDEVICEOBJECTSCALLBACK equ <LPDIENUMDEVICEOBJECTSCALLBACKW>
else
LPDIENUMDEVICEOBJECTSCALLBACK equ <LPDIENUMDEVICEOBJECTSCALLBACKA>
endif

if(DIRECTINPUT_VERSION GE 0x0500)
DIDOI_FFACTUATOR	equ 0x00000001
DIDOI_FFEFFECTTRIGGER	equ 0x00000002
DIDOI_POLLED		equ 0x00008000
DIDOI_ASPECTPOSITION	equ 0x00000100
DIDOI_ASPECTVELOCITY	equ 0x00000200
DIDOI_ASPECTACCEL	equ 0x00000300
DIDOI_ASPECTFORCE	equ 0x00000400
DIDOI_ASPECTMASK	equ 0x00000F00
endif
if(DIRECTINPUT_VERSION GE 0x050a)
DIDOI_GUIDISUSAGE	equ 0x00010000
endif

DIPROPHEADER		STRUC
dwSize			dd ?
dwHeaderSize		dd ?
dwObj			dd ?
dwHow			dd ?
DIPROPHEADER		ENDS
LPDIPROPHEADER		typedef ptr DIPROPHEADER
LPCDIPROPHEADER		typedef ptr DIPROPHEADER

DIPH_DEVICE		equ 0
DIPH_BYOFFSET		equ 1
DIPH_BYID		equ 2
if(DIRECTINPUT_VERSION GE 0x050a)
DIPH_BYUSAGE		equ 3
endif

if(DIRECTINPUT_VERSION GE 0x050a)
DIMAKEUSAGEDWORD macro UsagePage, Usage
	exitm<MAKELONG(Usage, UsagePage)>
	endm
endif

DIPROPDWORD		STRUC
diph			DIPROPHEADER <>
dwData			dd ?
DIPROPDWORD		ENDS
LPDIPROPDWORD		typedef ptr DIPROPDWORD
LPCDIPROPDWORD		typedef ptr DIPROPDWORD

if(DIRECTINPUT_VERSION GE 0x0800)
DIPROPPOINTER		STRUC
diph			DIPROPHEADER <>
uData			UINT_PTR ?
DIPROPPOINTER		ENDS
LPDIPROPPOINTER		typedef ptr DIPROPPOINTER
LPCDIPROPPOINTER	typedef ptr DIPROPPOINTER
endif

DIPROPRANGE		STRUC
diph			DIPROPHEADER <>
lMin			LONG ?
lMax			LONG ?
DIPROPRANGE		ENDS
LPDIPROPRANGE		typedef ptr DIPROPRANGE
LPCDIPROPRANGE		typedef ptr DIPROPRANGE

DIPROPRANGE_NOMIN	equ (0x80000000)
DIPROPRANGE_NOMAX	equ (0x7FFFFFFF)

if(DIRECTINPUT_VERSION GE 0x050a)
DIPROPCAL		STRUC
diph			DIPROPHEADER <>
lMin			LONG ?
lCenter			LONG ?
lMax			LONG ?
DIPROPCAL		ENDS
LPDIPROPCAL		typedef ptr DIPROPCAL
LPCDIPROPCAL		typedef ptr DIPROPCAL

DIPROPCALPOV		STRUC
diph			DIPROPHEADER <>
lMin			LONG 5 dup(?)
lMax			LONG 5 dup(?)
DIPROPCALPOV		ENDS
LPDIPROPCALPOV		typedef ptr DIPROPCALPOV
LPCDIPROPCALPOV		typedef ptr DIPROPCALPOV

DIPROPGUIDANDPATH	STRUC
diph			DIPROPHEADER <>
guidClass		GUID <>
wszPath			WCHAR MAX_PATH dup(?)
DIPROPGUIDANDPATH	ENDS
LPDIPROPGUIDANDPATH	typedef ptr DIPROPGUIDANDPATH
LPCDIPROPGUIDANDPATH	typedef ptr DIPROPGUIDANDPATH

DIPROPSTRING		STRUC
diph			DIPROPHEADER <>
wsz			WCHAR MAX_PATH dup(?)
DIPROPSTRING		ENDS
LPDIPROPSTRING		typedef ptr DIPROPSTRING
LPCDIPROPSTRING		typedef ptr DIPROPSTRING

endif

if(DIRECTINPUT_VERSION GE 0x0800)
MAXCPOINTSNUM		equ 8

CPOINT			STRUC
lP			LONG ?
dwLog			dd ?
CPOINT			ENDS
PCPOINT			typedef ptr CPOINT

DIPROPCPOINTS		STRUC
diph			DIPROPHEADER <>
dwCPointsNum		dd ?
cp			CPOINT MAXCPOINTSNUM dup(<>)
DIPROPCPOINTS		ENDS
LPDIPROPCPOINTS		typedef ptr DIPROPCPOINTS
LPCDIPROPCPOINTS	typedef ptr DIPROPCPOINTS
endif

MAKEDIPROP macro prop
	exitm<(prop)>
	endm

DIPROP_BUFFERSIZE	equ MAKEDIPROP(1)
DIPROP_AXISMODE		equ MAKEDIPROP(2)

DIPROPAXISMODE_ABS	equ 0
DIPROPAXISMODE_REL	equ 1

DIPROP_GRANULARITY	equ MAKEDIPROP(3)
DIPROP_RANGE		equ MAKEDIPROP(4)
DIPROP_DEADZONE		equ MAKEDIPROP(5)
DIPROP_SATURATION	equ MAKEDIPROP(6)
DIPROP_FFGAIN		equ MAKEDIPROP(7)
DIPROP_FFLOAD		equ MAKEDIPROP(8)
DIPROP_AUTOCENTER	equ MAKEDIPROP(9)

DIPROPAUTOCENTER_OFF	equ 0
DIPROPAUTOCENTER_ON	equ 1

DIPROP_CALIBRATIONMODE	equ MAKEDIPROP(10)

DIPROPCALIBRATIONMODE_COOKED equ 0
DIPROPCALIBRATIONMODE_RAW equ 1

if(DIRECTINPUT_VERSION GE 0x050a)
DIPROP_CALIBRATION	equ MAKEDIPROP(11)
DIPROP_GUIDANDPATH	equ MAKEDIPROP(12)
DIPROP_INSTANCENAME	equ MAKEDIPROP(13)
DIPROP_PRODUCTNAME	equ MAKEDIPROP(14)
endif

if(DIRECTINPUT_VERSION GE 0x05b2)
DIPROP_JOYSTICKID	equ MAKEDIPROP(15)
DIPROP_GETPORTDISPLAYNAME equ MAKEDIPROP(16)
endif

if(DIRECTINPUT_VERSION GE 0x0700)
DIPROP_PHYSICALRANGE	equ MAKEDIPROP(18)
DIPROP_LOGICALRANGE	equ MAKEDIPROP(19)
endif

if(DIRECTINPUT_VERSION GE 0x0800)
DIPROP_KEYNAME		equ MAKEDIPROP(20)
DIPROP_CPOINTS		equ MAKEDIPROP(21)
DIPROP_APPDATA		equ MAKEDIPROP(22)
DIPROP_SCANCODE		equ MAKEDIPROP(23)
DIPROP_VIDPID		equ MAKEDIPROP(24)
DIPROP_USERNAME		equ MAKEDIPROP(25)
DIPROP_TYPENAME		equ MAKEDIPROP(26)
endif

DIDEVICEOBJECTDATA_DX3	STRUC
dwOfs			dd ?
dwData			dd ?
dwTimeStamp		dd ?
dwSequence		dd ?
DIDEVICEOBJECTDATA_DX3	ENDS
LPDIDEVICEOBJECTDATA_DX3 typedef ptr DIDEVICEOBJECTDATA_DX3
LPCDIDEVICEOBJECTDATA_DX typedef ptr DIDEVICEOBJECTDATA_DX3

DIDEVICEOBJECTDATA	STRUC
dwOfs			dd ?
dwData			dd ?
dwTimeStamp		dd ?
dwSequence		dd ?
if(DIRECTINPUT_VERSION GE 0x0800)
uAppData		UINT_PTR ?
endif
DIDEVICEOBJECTDATA	ENDS
LPDIDEVICEOBJECTDATA	typedef ptr DIDEVICEOBJECTDATA
LPCDIDEVICEOBJECTDATA	typedef ptr DIDEVICEOBJECTDATA

DIGDD_PEEK		equ 0x00000001

DISEQUENCE_COMPARE macro dwSequence1, _cmp, dwSequence2
	exitm<> ; ((int)((dwSequence1) - (dwSequence2)) _cmp 0)
	endm

DISCL_EXCLUSIVE		equ 0x00000001
DISCL_NONEXCLUSIVE	equ 0x00000002
DISCL_FOREGROUND	equ 0x00000004
DISCL_BACKGROUND	equ 0x00000008
DISCL_NOWINKEY		equ 0x00000010

if (DIRECTINPUT_VERSION GE 0x0500)

DIDEVICEINSTANCE_DX3A	STRUC
dwSize			dd ?
guidInstance		GUID <>
guidProduct		GUID <>
dwDevType		dd ?
tszInstanceName		CHAR MAX_PATH dup(?)
tszProductName		CHAR MAX_PATH dup(?)
DIDEVICEINSTANCE_DX3A	ENDS
LPDIDEVICEINSTANCE_DX3A typedef ptr DIDEVICEINSTANCE_DX3A
DIDEVICEINSTANCE_DX3W	STRUC
dwSize			dd ?
guidInstance		GUID <>
guidProduct		GUID <>
dwDevType		dd ?
tszInstanceName		WCHAR MAX_PATH dup(?)
tszProductName		WCHAR MAX_PATH dup(?)
DIDEVICEINSTANCE_DX3W	ENDS
LPDIDEVICEINSTANCE_DX3W typedef ptr DIDEVICEINSTANCE_DX3W
ifdef _UNICODE
DIDEVICEINSTANCE_DX3	typedef DIDEVICEINSTANCE_DX3W
LPDIDEVICEINSTANCE_DX3	typedef LPDIDEVICEINSTANCE_DX3W
else
DIDEVICEINSTANCE_DX3	typedef DIDEVICEINSTANCE_DX3A
LPDIDEVICEINSTANCE_DX3	typedef LPDIDEVICEINSTANCE_DX3A
endif
LPCDIDEVICEINSTANCE_DX3A typedef ptr DIDEVICEINSTANCE_DX3A
LPCDIDEVICEINSTANCE_DX3W typedef ptr DIDEVICEINSTANCE_DX3W
LPCDIDEVICEINSTANCE_DX3 typedef ptr DIDEVICEINSTANCE_DX3
endif

DIDEVICEINSTANCEA	STRUC
dwSize			dd ?
guidInstance		GUID <>
guidProduct		GUID <>
dwDevType		dd ?
tszInstanceName		CHAR MAX_PATH dup(?)
tszProductName		CHAR MAX_PATH dup(?)
if(DIRECTINPUT_VERSION GE 0x0500)
guidFFDriver		GUID <>
wUsagePage		dw ?
wUsage			dw ?
endif
DIDEVICEINSTANCEA	ENDS
LPDIDEVICEINSTANCEA	typedef ptr DIDEVICEINSTANCEA
DIDEVICEINSTANCEW	STRUC
dwSize			dd ?
guidInstance		GUID <>
guidProduct		GUID <>
dwDevType		dd ?
tszInstanceName		WCHAR MAX_PATH dup(?)
tszProductName		WCHAR MAX_PATH dup(?)
if(DIRECTINPUT_VERSION GE 0x0500)
guidFFDriver		GUID <>
wUsagePage		dw ?
wUsage			dw ?
endif
DIDEVICEINSTANCEW	ENDS
LPDIDEVICEINSTANCEW	typedef ptr DIDEVICEINSTANCEW
ifdef _UNICODE
DIDEVICEINSTANCE	typedef DIDEVICEINSTANCEW
LPDIDEVICEINSTANCE	typedef LPDIDEVICEINSTANCEW
else
DIDEVICEINSTANCE	typedef DIDEVICEINSTANCEA
LPDIDEVICEINSTANCE	typedef LPDIDEVICEINSTANCEA
endif

LPCDIDEVICEINSTANCEA	typedef ptr DIDEVICEINSTANCEA
LPCDIDEVICEINSTANCEW	typedef ptr DIDEVICEINSTANCEW
ifdef _UNICODE
DIDEVICEINSTANCE	typedef DIDEVICEINSTANCEW
LPCDIDEVICEINSTANCE	typedef LPCDIDEVICEINSTANCEW
else
DIDEVICEINSTANCE	typedef DIDEVICEINSTANCEA
LPCDIDEVICEINSTANCE	typedef LPCDIDEVICEINSTANCEA
endif
LPCDIDEVICEINSTANCE	typedef ptr DIDEVICEINSTANCE

.comdef IDirectInputDeviceW : public IUnknown

    GetCapabilities	proc :LPDIDEVCAPS
    EnumObjects		proc :LPDIENUMDEVICEOBJECTSCALLBACKW, :PVOID, :DWORD
    GetProperty		proc :REFGUID, :LPDIPROPHEADER
    SetProperty		proc :REFGUID, :LPCDIPROPHEADER
    Acquire		proc
    Unacquire		proc
    GetDeviceState	proc :DWORD, :PVOID
    GetDeviceData	proc :DWORD, :LPDIDEVICEOBJECTDATA, :LPDWORD, :DWORD
    SetDataFormat	proc :LPCDIDATAFORMAT
    SetEventNotification proc :HANDLE
    SetCooperativeLevel proc :HWND, :DWORD
    GetObjectInfo	proc :LPDIDEVICEOBJECTINSTANCEW, :DWORD, :DWORD
    GetDeviceInfo	proc :LPDIDEVICEINSTANCEW
    RunControlPanel	proc :HWND, :DWORD
    Initialize		proc :HINSTANCE, :DWORD, :REFGUID
   .ends

LPDIRECTINPUTDEVICEW	typedef ptr IDirectInputDeviceW

.comdef IDirectInputDeviceA : public IUnknown

    GetCapabilities	proc :LPDIDEVCAPS
    EnumObjects		proc :LPDIENUMDEVICEOBJECTSCALLBACKA, :PVOID, :DWORD
    GetProperty		proc :REFGUID, :LPDIPROPHEADER
    SetProperty		proc :REFGUID, :LPCDIPROPHEADER
    Acquire		proc
    Unacquire		proc
    GetDeviceState	proc :DWORD, :PVOID
    GetDeviceData	proc :DWORD, :LPDIDEVICEOBJECTDATA, :LPDWORD, :DWORD
    SetDataFormat	proc :LPCDIDATAFORMAT
    SetEventNotification proc :HANDLE
    SetCooperativeLevel proc :HWND, :DWORD
    GetObjectInfo	proc :LPDIDEVICEOBJECTINSTANCEA, :DWORD, :DWORD
    GetDeviceInfo	proc :LPDIDEVICEINSTANCEA
    RunControlPanel	proc :HWND, :DWORD
    Initialize		proc :HINSTANCE, :DWORD, :REFGUID
   .ends

LPDIRECTINPUTDEVICEA	typedef ptr IDirectInputDeviceA

ifdef _UNICODE
IID_IDirectInputDevice	equ <IID_IDirectInputDeviceW>
IDirectInputDevice	equ <IDirectInputDeviceW>
else
IID_IDirectInputDevice	equ <IID_IDirectInputDeviceA>
IDirectInputDevice	equ <IDirectInputDeviceA>
endif
LPDIRECTINPUTDEVICE	typedef ptr IDirectInputDevice

endif

if(DIRECTINPUT_VERSION GE 0x0500)

DISFFC_RESET		equ 0x00000001
DISFFC_STOPALL		equ 0x00000002
DISFFC_PAUSE		equ 0x00000004
DISFFC_CONTINUE		equ 0x00000008
DISFFC_SETACTUATORSON	equ 0x00000010
DISFFC_SETACTUATORSOFF	equ 0x00000020

DIGFFS_EMPTY		equ 0x00000001
DIGFFS_STOPPED		equ 0x00000002
DIGFFS_PAUSED		equ 0x00000004
DIGFFS_ACTUATORSON	equ 0x00000010
DIGFFS_ACTUATORSOFF	equ 0x00000020
DIGFFS_POWERON		equ 0x00000040
DIGFFS_POWEROFF		equ 0x00000080
DIGFFS_SAFETYSWITCHON	equ 0x00000100
DIGFFS_SAFETYSWITCHOFF	equ 0x00000200
DIGFFS_USERFFSWITCHON	equ 0x00000400
DIGFFS_USERFFSWITCHOFF	equ 0x00000800
DIGFFS_DEVICELOST	equ 0x80000000

ifndef DIJ_RINGZERO

DIEFFECTINFOA		STRUC
dwSize			dd ?
guid			GUID <>
dwEffType		dd ?
dwStaticParams		dd ?
dwDynamicParams		dd ?
tszName			CHAR MAX_PATH dup(?)
DIEFFECTINFOA		ENDS
LPDIEFFECTINFOA		typedef ptr DIEFFECTINFOA
DIEFFECTINFOW		STRUC
dwSize			dd ?
guid			GUID <>
dwEffType		dd ?
dwStaticParams		dd ?
dwDynamicParams		dd ?
tszName			WCHAR MAX_PATH dup(?)
DIEFFECTINFOW		ENDS
LPDIEFFECTINFOW		typedef ptr DIEFFECTINFOW
ifdef _UNICODE
DIEFFECTINFO		typedef DIEFFECTINFOW
LPDIEFFECTINFO		typedef LPDIEFFECTINFOW
else
DIEFFECTINFO		typedef DIEFFECTINFOA
LPDIEFFECTINFO		typedef LPDIEFFECTINFOA
endif
LPCDIEFFECTINFOA	typedef ptr DIEFFECTINFOA
LPCDIEFFECTINFOW	typedef ptr DIEFFECTINFOW
LPCDIEFFECTINFO		typedef ptr DIEFFECTINFO

DISDD_CONTINUE		equ 0x00000001

CALLBACK(LPDIENUMEFFECTSCALLBACKA, :LPCDIEFFECTINFOA, :PVOID)
CALLBACK(LPDIENUMEFFECTSCALLBACKW, :LPCDIEFFECTINFOW, :PVOID)
ifdef _UNICODE
LPDIENUMEFFECTSCALLBACK equ <LPDIENUMEFFECTSCALLBACKW>
else
LPDIENUMEFFECTSCALLBACK equ <LPDIENUMEFFECTSCALLBACKA>
endif
CALLBACK(LPDIENUMCREATEDEFFECTOBJECTSCALLBACK, :LPDIRECTINPUTEFFECT, :PVOID)

.comdef IDirectInputDevice2W : public IDirectInputDeviceW

    CreateEffect	proc :REFGUID, :LPCDIEFFECT, :ptr, :LPUNKNOWN
    EnumEffects		proc :LPDIENUMEFFECTSCALLBACKW, :PVOID, :DWORD
    GetEffectInfo	proc :LPDIEFFECTINFOW, :REFGUID
    GetForceFeedbackState proc :LPDWORD
    SendForceFeedbackCommand proc :DWORD
    EnumCreatedEffectObjects proc :LPDIENUMCREATEDEFFECTOBJECTSCALLBACK, :PVOID, :DWORD
    Escape		proc :LPDIEFFESCAPE
    Poll		proc
    SendDeviceData	proc :DWORD, :LPCDIDEVICEOBJECTDATA, :LPDWORD, :DWORD
   .ends

LPDIRECTINPUTDEVICE2W	typedef ptr IDirectInputDevice2W

.comdef IDirectInputDevice2A : public IDirectInputDeviceA

    CreateEffect	proc :REFGUID, :LPCDIEFFECT, :ptr, :LPUNKNOWN
    EnumEffects		proc :LPDIENUMEFFECTSCALLBACKA, :PVOID, :DWORD
    GetEffectInfo	proc :LPDIEFFECTINFOA, :REFGUID
    GetForceFeedbackState proc :LPDWORD
    SendForceFeedbackCommand proc :DWORD
    EnumCreatedEffectObjects proc :LPDIENUMCREATEDEFFECTOBJECTSCALLBACK, :PVOID, :DWORD
    Escape		proc :LPDIEFFESCAPE
    Poll		proc
    SendDeviceData	proc :DWORD, :LPCDIDEVICEOBJECTDATA, :LPDWORD, :DWORD
   .ends

LPDIRECTINPUTDEVICE2A	typedef ptr IDirectInputDevice2A

ifdef _UNICODE
IID_IDirectInputDevice2 equ <IID_IDirectInputDevice2W>
IDirectInputDevice2	equ <IDirectInputDevice2W>
else
IID_IDirectInputDevice2 equ <IID_IDirectInputDevice2A>
IDirectInputDevice2	equ <IDirectInputDevice2A>
endif
LPDIRECTINPUTDEVICE2	typedef ptr IDirectInputDevice2

endif
endif

if(DIRECTINPUT_VERSION GE 0x0700)
DIFEF_DEFAULT		equ 0x00000000
DIFEF_INCLUDENONSTANDARD equ 0x00000001
DIFEF_MODIFYIFNEEDED	equ 0x00000010

ifndef DIJ_RINGZERO

.comdef IDirectInputDevice7W : public IDirectInputDevice2W

    EnumEffectsInFile	proc :LPCWSTR, :LPDIENUMEFFECTSINFILECALLBACK, :PVOID, :DWORD
    WriteEffectToFile	proc :LPCWSTR, :DWORD, :LPDIFILEEFFECT, :DWORD
   .ends

LPDIRECTINPUTDEVICE7W	typedef ptr IDirectInputDevice7W

.comdef IDirectInputDevice7A : public IDirectInputDevice2A

    EnumEffectsInFile	proc :LPCSTR, :LPDIENUMEFFECTSINFILECALLBACK, :PVOID, :DWORD
    WriteEffectToFile	proc :LPCSTR, :DWORD, :LPDIFILEEFFECT, :DWORD
   .ends

LPDIRECTINPUTDEVICE7A	typedef ptr IDirectInputDevice7A

ifdef _UNICODE
IID_IDirectInputDevice7 equ <IID_IDirectInputDevice7W>
IDirectInputDevice7	equ <IDirectInputDevice7W>
else
IID_IDirectInputDevice7 equ <IID_IDirectInputDevice7A>
IDirectInputDevice7	equ <IDirectInputDevice7A>
endif
LPDIRECTINPUTDEVICE7	typedef ptr IDirectInputDevice7

endif
endif

if(DIRECTINPUT_VERSION GE 0x0800)

ifndef DIJ_RINGZERO

.comdef IDirectInputDevice8W : public IDirectInputDevice7W

    BuildActionMap	proc :LPDIACTIONFORMATW, :LPCWSTR, :DWORD
    SetActionMap	proc :LPDIACTIONFORMATW, :LPCWSTR, :DWORD
    GetImageInfo	proc :LPDIDEVICEIMAGEINFOHEADERW
   .ends

LPDIRECTINPUTDEVICE8W	typedef ptr IDirectInputDevice8W

.comdef IDirectInputDevice8A : public IDirectInputDevice7A

    BuildActionMap	proc :LPDIACTIONFORMATA, :LPCSTR, :DWORD
    SetActionMap	proc :LPDIACTIONFORMATA, :LPCSTR, :DWORD
    GetImageInfo	proc :LPDIDEVICEIMAGEINFOHEADERA
   .ends

LPDIRECTINPUTDEVICE8A	typedef ptr IDirectInputDevice8A

ifdef _UNICODE
IID_IDirectInputDevice8 equ <IID_IDirectInputDevice8W>
IDirectInputDevice8	equ <IDirectInputDevice8W>
else
IID_IDirectInputDevice8 equ <IID_IDirectInputDevice8A>
IDirectInputDevice8	equ <IDirectInputDevice8A>
endif
LPDIRECTINPUTDEVICE8	typedef ptr IDirectInputDevice8

endif
endif

ifndef DIJ_RINGZERO

DIMOUSESTATE		STRUC
lX			LONG ?
lY			LONG ?
lZ			LONG ?
rgbButtons		db 4 dup(?)
DIMOUSESTATE		ENDS
LPDIMOUSESTATE		typedef ptr DIMOUSESTATE

if DIRECTINPUT_VERSION GE 0x0700
DIMOUSESTATE2		STRUC
lX			LONG ?
lY			LONG ?
lZ			LONG ?
rgbButtons		db 8 dup(?)
DIMOUSESTATE2		ENDS
LPDIMOUSESTATE2		typedef ptr DIMOUSESTATE2
endif

DIMOFS_X		equ FIELD_OFFSET(DIMOUSESTATE, lX)
DIMOFS_Y		equ FIELD_OFFSET(DIMOUSESTATE, lY)
DIMOFS_Z		equ FIELD_OFFSET(DIMOUSESTATE, lZ)
DIMOFS_BUTTON0		equ (FIELD_OFFSET(DIMOUSESTATE, rgbButtons) + 0)
DIMOFS_BUTTON1		equ (FIELD_OFFSET(DIMOUSESTATE, rgbButtons) + 1)
DIMOFS_BUTTON2		equ (FIELD_OFFSET(DIMOUSESTATE, rgbButtons) + 2)
DIMOFS_BUTTON3		equ (FIELD_OFFSET(DIMOUSESTATE, rgbButtons) + 3)
if (DIRECTINPUT_VERSION GE 0x0700)
DIMOFS_BUTTON4		equ (FIELD_OFFSET(DIMOUSESTATE2, rgbButtons) + 4)
DIMOFS_BUTTON5		equ (FIELD_OFFSET(DIMOUSESTATE2, rgbButtons) + 5)
DIMOFS_BUTTON6		equ (FIELD_OFFSET(DIMOUSESTATE2, rgbButtons) + 6)
DIMOFS_BUTTON7		equ (FIELD_OFFSET(DIMOUSESTATE2, rgbButtons) + 7)
endif
endif

ifndef DIJ_RINGZERO

DIK_ESCAPE		equ 0x01
DIK_1			equ 0x02
DIK_2			equ 0x03
DIK_3			equ 0x04
DIK_4			equ 0x05
DIK_5			equ 0x06
DIK_6			equ 0x07
DIK_7			equ 0x08
DIK_8			equ 0x09
DIK_9			equ 0x0A
DIK_0			equ 0x0B
DIK_MINUS		equ 0x0C
DIK_EQUALS		equ 0x0D
DIK_BACK		equ 0x0E
DIK_TAB			equ 0x0F
DIK_Q			equ 0x10
DIK_W			equ 0x11
DIK_E			equ 0x12
DIK_R			equ 0x13
DIK_T			equ 0x14
DIK_Y			equ 0x15
DIK_U			equ 0x16
DIK_I			equ 0x17
DIK_O			equ 0x18
DIK_P			equ 0x19
DIK_LBRACKET		equ 0x1A
DIK_RBRACKET		equ 0x1B
DIK_RETURN		equ 0x1C
DIK_LCONTROL		equ 0x1D
DIK_A			equ 0x1E
DIK_S			equ 0x1F
DIK_D			equ 0x20
DIK_F			equ 0x21
DIK_G			equ 0x22
DIK_H			equ 0x23
DIK_J			equ 0x24
DIK_K			equ 0x25
DIK_L			equ 0x26
DIK_SEMICOLON		equ 0x27
DIK_APOSTROPHE		equ 0x28
DIK_GRAVE		equ 0x29
DIK_LSHIFT		equ 0x2A
DIK_BACKSLASH		equ 0x2B
DIK_Z			equ 0x2C
DIK_X			equ 0x2D
DIK_C			equ 0x2E
DIK_V			equ 0x2F
DIK_B			equ 0x30
DIK_N			equ 0x31
DIK_M			equ 0x32
DIK_COMMA		equ 0x33
DIK_PERIOD		equ 0x34
DIK_SLASH		equ 0x35
DIK_RSHIFT		equ 0x36
DIK_MULTIPLY		equ 0x37
DIK_LMENU		equ 0x38
DIK_SPACE		equ 0x39
DIK_CAPITAL		equ 0x3A
DIK_F1			equ 0x3B
DIK_F2			equ 0x3C
DIK_F3			equ 0x3D
DIK_F4			equ 0x3E
DIK_F5			equ 0x3F
DIK_F6			equ 0x40
DIK_F7			equ 0x41
DIK_F8			equ 0x42
DIK_F9			equ 0x43
DIK_F10			equ 0x44
DIK_NUMLOCK		equ 0x45
DIK_SCROLL		equ 0x46
DIK_NUMPAD7		equ 0x47
DIK_NUMPAD8		equ 0x48
DIK_NUMPAD9		equ 0x49
DIK_SUBTRACT		equ 0x4A
DIK_NUMPAD4		equ 0x4B
DIK_NUMPAD5		equ 0x4C
DIK_NUMPAD6		equ 0x4D
DIK_ADD			equ 0x4E
DIK_NUMPAD1		equ 0x4F
DIK_NUMPAD2		equ 0x50
DIK_NUMPAD3		equ 0x51
DIK_NUMPAD0		equ 0x52
DIK_DECIMAL		equ 0x53
DIK_OEM_102		equ 0x56
DIK_F11			equ 0x57
DIK_F12			equ 0x58
DIK_F13			equ 0x64
DIK_F14			equ 0x65
DIK_F15			equ 0x66
DIK_KANA		equ 0x70
DIK_ABNT_C1		equ 0x73
DIK_CONVERT		equ 0x79
DIK_NOCONVERT		equ 0x7B
DIK_YEN			equ 0x7D
DIK_ABNT_C2		equ 0x7E
DIK_NUMPADEQUALS	equ 0x8D
DIK_PREVTRACK		equ 0x90
DIK_AT			equ 0x91
DIK_COLON		equ 0x92
DIK_UNDERLINE		equ 0x93
DIK_KANJI		equ 0x94
DIK_STOP		equ 0x95
DIK_AX			equ 0x96
DIK_UNLABELED		equ 0x97
DIK_NEXTTRACK		equ 0x99
DIK_NUMPADENTER		equ 0x9C
DIK_RCONTROL		equ 0x9D
DIK_MUTE		equ 0xA0
DIK_CALCULATOR		equ 0xA1
DIK_PLAYPAUSE		equ 0xA2
DIK_MEDIASTOP		equ 0xA4
DIK_VOLUMEDOWN		equ 0xAE
DIK_VOLUMEUP		equ 0xB0
DIK_WEBHOME		equ 0xB2
DIK_NUMPADCOMMA		equ 0xB3
DIK_DIVIDE		equ 0xB5
DIK_SYSRQ		equ 0xB7
DIK_RMENU		equ 0xB8
DIK_PAUSE		equ 0xC5
DIK_HOME		equ 0xC7
DIK_UP			equ 0xC8
DIK_PRIOR		equ 0xC9
DIK_LEFT		equ 0xCB
DIK_RIGHT		equ 0xCD
DIK_END			equ 0xCF
DIK_DOWN		equ 0xD0
DIK_NEXT		equ 0xD1
DIK_INSERT		equ 0xD2
DIK_DELETE		equ 0xD3
DIK_LWIN		equ 0xDB
DIK_RWIN		equ 0xDC
DIK_APPS		equ 0xDD
DIK_POWER		equ 0xDE
DIK_SLEEP		equ 0xDF
DIK_WAKE		equ 0xE3
DIK_WEBSEARCH		equ 0xE5
DIK_WEBFAVORITES	equ 0xE6
DIK_WEBREFRESH		equ 0xE7
DIK_WEBSTOP		equ 0xE8
DIK_WEBFORWARD		equ 0xE9
DIK_WEBBACK		equ 0xEA
DIK_MYCOMPUTER		equ 0xEB
DIK_MAIL		equ 0xEC
DIK_MEDIASELECT		equ 0xED

DIK_BACKSPACE		equ DIK_BACK
DIK_NUMPADSTAR		equ DIK_MULTIPLY
DIK_LALT		equ DIK_LMENU
DIK_CAPSLOCK		equ DIK_CAPITA
DIK_NUMPADMINUS		equ DIK_SUBTRACT
DIK_NUMPADPLUS		equ DIK_ADD
DIK_NUMPADPERIOD	equ DIK_DECIMA
DIK_NUMPADSLASH		equ DIK_DIVIDE
DIK_RALT		equ DIK_RMENU
DIK_UPARROW		equ DIK_UP
DIK_PGUP		equ DIK_PRIOR
DIK_LEFTARROW		equ DIK_LEFT
DIK_RIGHTARROW		equ DIK_RIGHT
DIK_DOWNARROW		equ DIK_DOWN
DIK_PGDN		equ DIK_NEXT

DIK_CIRCUMFLEX		equ DIK_PREVTRACK

endif

ifndef DIJ_RINGZERO

DIJOYSTATE		STRUC
lX			LONG ?
lY			LONG ?
lZ			LONG ?
lRx			LONG ?
lRy			LONG ?
lRz			LONG ?
rglSlider		LONG 2 dup(?)
rgdwPOV			dd 4 dup(?)
rgbButtons		db 32 dup(?)
DIJOYSTATE		ENDS
LPDIJOYSTATE		typedef ptr DIJOYSTATE

DIJOYSTATE2		STRUC
lX			LONG ?
lY			LONG ?
lZ			LONG ?
lRx			LONG ?
lRy			LONG ?
lRz			LONG ?
rglSlider		LONG 2 dup(?)
rgdwPOV			dd 4 dup(?)
rgbButtons		db 128 dup(?)
lVX			LONG ?
lVY			LONG ?
lVZ			LONG ?
lVRx			LONG ?
lVRy			LONG ?
lVRz			LONG ?
rglVSlider		LONG 2 dup(?)
lAX			LONG ?
lAY			LONG ?
lAZ			LONG ?
lARx			LONG ?
lARy			LONG ?
lARz			LONG ?
rglASlider		LONG 2 dup(?)
lFX			LONG ?
lFY			LONG ?
lFZ			LONG ?
lFRx			LONG ?
lFRy			LONG ?
lFRz			LONG ?
rglFSlider		LONG 2 dup(?)
DIJOYSTATE2		ENDS
LPDIJOYSTATE2		typedef ptr DIJOYSTATE2

DIJOFS_X		equ FIELD_OFFSET(DIJOYSTATE, lX)
DIJOFS_Y		equ FIELD_OFFSET(DIJOYSTATE, lY)
DIJOFS_Z		equ FIELD_OFFSET(DIJOYSTATE, lZ)
DIJOFS_RX		equ FIELD_OFFSET(DIJOYSTATE, lRx)
DIJOFS_RY		equ FIELD_OFFSET(DIJOYSTATE, lRy)
DIJOFS_RZ		equ FIELD_OFFSET(DIJOYSTATE, lRz)
DIJOFS_SLIDER macro n
	exitm<(FIELD_OFFSET(DIJOYSTATE, rglSlider) + (n) * LONG)>
	endm
DIJOFS_POV macro n
	exitm<(FIELD_OFFSET(DIJOYSTATE, rgdwPOV) + (n) * DWORD)>
	endm
DIJOFS_BUTTON macro n
	exitm<(FIELD_OFFSET(DIJOYSTATE, rgbButtons) + (n))>
	endm
DIJOFS_BUTTON0		equ DIJOFS_BUTTON(0)
DIJOFS_BUTTON1		equ DIJOFS_BUTTON(1)
DIJOFS_BUTTON2		equ DIJOFS_BUTTON(2)
DIJOFS_BUTTON3		equ DIJOFS_BUTTON(3)
DIJOFS_BUTTON4		equ DIJOFS_BUTTON(4)
DIJOFS_BUTTON5		equ DIJOFS_BUTTON(5)
DIJOFS_BUTTON6		equ DIJOFS_BUTTON(6)
DIJOFS_BUTTON7		equ DIJOFS_BUTTON(7)
DIJOFS_BUTTON8		equ DIJOFS_BUTTON(8)
DIJOFS_BUTTON9		equ DIJOFS_BUTTON(9)
DIJOFS_BUTTON10		equ DIJOFS_BUTTON(10)
DIJOFS_BUTTON11		equ DIJOFS_BUTTON(11)
DIJOFS_BUTTON12		equ DIJOFS_BUTTON(12)
DIJOFS_BUTTON13		equ DIJOFS_BUTTON(13)
DIJOFS_BUTTON14		equ DIJOFS_BUTTON(14)
DIJOFS_BUTTON15		equ DIJOFS_BUTTON(15)
DIJOFS_BUTTON16		equ DIJOFS_BUTTON(16)
DIJOFS_BUTTON17		equ DIJOFS_BUTTON(17)
DIJOFS_BUTTON18		equ DIJOFS_BUTTON(18)
DIJOFS_BUTTON19		equ DIJOFS_BUTTON(19)
DIJOFS_BUTTON20		equ DIJOFS_BUTTON(20)
DIJOFS_BUTTON21		equ DIJOFS_BUTTON(21)
DIJOFS_BUTTON22		equ DIJOFS_BUTTON(22)
DIJOFS_BUTTON23		equ DIJOFS_BUTTON(23)
DIJOFS_BUTTON24		equ DIJOFS_BUTTON(24)
DIJOFS_BUTTON25		equ DIJOFS_BUTTON(25)
DIJOFS_BUTTON26		equ DIJOFS_BUTTON(26)
DIJOFS_BUTTON27		equ DIJOFS_BUTTON(27)
DIJOFS_BUTTON28		equ DIJOFS_BUTTON(28)
DIJOFS_BUTTON29		equ DIJOFS_BUTTON(29)
DIJOFS_BUTTON30		equ DIJOFS_BUTTON(30)
DIJOFS_BUTTON31		equ DIJOFS_BUTTON(31)

endif

ifndef DIJ_RINGZERO

DIENUM_STOP		equ 0
DIENUM_CONTINUE		equ 1

CALLBACK(LPDIENUMDEVICESCALLBACKA, :LPCDIDEVICEINSTANCEA, :ptr)
CALLBACK(LPDIENUMDEVICESCALLBACKW, :LPCDIDEVICEINSTANCEW, :ptr)
ifdef _UNICODE
LPDIENUMDEVICESCALLBACK equ <LPDIENUMDEVICESCALLBACKW>
else
LPDIENUMDEVICESCALLBACK equ <LPDIENUMDEVICESCALLBACKA>
endif
CALLBACK(LPDICONFIGUREDEVICESCALLBACK, :ptr, :ptr)
DIEDFL_ALLDEVICES	equ 0x00000000
DIEDFL_ATTACHEDONLY	equ 0x00000001
if(DIRECTINPUT_VERSION GE 0x0500)
DIEDFL_FORCEFEEDBACK	equ 0x00000100
endif
if(DIRECTINPUT_VERSION GE 0x050a)
DIEDFL_INCLUDEALIASES	equ 0x00010000
DIEDFL_INCLUDEPHANTOMS	equ 0x00020000
endif
if(DIRECTINPUT_VERSION GE 0x0800)
DIEDFL_INCLUDEHIDDEN	equ 0x00040000
endif

if(DIRECTINPUT_VERSION GE 0x0800)
CALLBACK(LPDIENUMDEVICESBYSEMANTICSCBA, :LPCDIDEVICEINSTANCEA, :LPDIRECTINPUTDEVICE8A, :DWORD, :DWORD, :ptr)
CALLBACK(LPDIENUMDEVICESBYSEMANTICSCBW, :LPCDIDEVICEINSTANCEW, :LPDIRECTINPUTDEVICE8W, :DWORD, :DWORD, :ptr)
ifdef _UNICODE
LPDIENUMDEVICESBYSEMANTICSCB equ <LPDIENUMDEVICESBYSEMANTICSCBW>
else
LPDIENUMDEVICESBYSEMANTICSCB equ <LPDIENUMDEVICESBYSEMANTICSCBA>
endif
endif

if(DIRECTINPUT_VERSION GE 0x0800)
DIEDBS_MAPPEDPRI1	equ 0x00000001
DIEDBS_MAPPEDPRI2	equ 0x00000002
DIEDBS_RECENTDEVICE	equ 0x00000010
DIEDBS_NEWDEVICE	equ 0x00000020
endif

if(DIRECTINPUT_VERSION GE 0x0800)
DIEDBSFL_ATTACHEDONLY	equ 0x00000000
DIEDBSFL_THISUSER	equ 0x00000010
DIEDBSFL_FORCEFEEDBACK	equ DIEDFL_FORCEFEEDBACK
DIEDBSFL_AVAILABLEDEVICES equ 0x00001000
DIEDBSFL_MULTIMICEKEYBOARDS equ 0x00002000
DIEDBSFL_NONGAMINGDEVICES equ 0x00004000
DIEDBSFL_VALID		equ 0x00007110
endif

.comdef IDirectInputW : public IUnknown

    CreateDevice	proc :REFGUID, :ptr, :LPUNKNOWN
    EnumDevices		proc :DWORD, :LPDIENUMDEVICESCALLBACKW, :LPVOID, :DWORD
    GetDeviceStatus	proc :REFGUID
    RunControlPanel	proc :HWND, :DWORD
    Initialize		proc :HINSTANCE, :DWORD
   .ends

.comdef IDirectInputA : public IUnknown

    CreateDevice	proc :REFGUID, :ptr, :LPUNKNOWN
    EnumDevices		proc :DWORD, :LPDIENUMDEVICESCALLBACKA, :PVOID, :DWORD
    GetDeviceStatus	proc :REFGUID
    RunControlPanel	proc :HWND, :DWORD
    Initialize		proc :HINSTANCE, :DWORD
   .ends

ifdef _UNICODE
IID_IDirectInput	equ <IID_IDirectInputW>
IDirectInput		equ <IDirectInputW>
else
IID_IDirectInput	equ <IID_IDirectInputA>
IDirectInput		equ <IDirectInputA>
endif
LPDIRECTINPUT		typedef ptr IDirectInput

.comdef IDirectInput2W : public IDirectInputW

    FindDevice		proc :REFGUID, :LPCWSTR, :LPGUID
   .ends

.comdef IDirectInput2A : public IDirectInputA

    FindDevice		proc :REFGUID, :LPCSTR, :LPGUID
   .ends

ifdef _UNICODE
IID_IDirectInput2	equ <IID_IDirectInput2W>
IDirectInput2		equ <IDirectInput2W>
else
IID_IDirectInput2	equ <IID_IDirectInput2A>
IDirectInput2		equ <IDirectInput2A>
endif
LPDIRECTINPUT2		typedef ptr IDirectInput2

.comdef IDirectInput7W : public IDirectInput2W

    CreateDeviceEx	proc :REFGUID, :REFIID, :ptr, :LPUNKNOWN
   .ends

.comdef IDirectInput7A : public IDirectInput2A

    CreateDeviceEx	proc :REFGUID, :REFIID, :ptr, :LPUNKNOWN
   .ends

ifdef _UNICODE
IID_IDirectInput7	equ <IID_IDirectInput7W>
IDirectInput7		equ <IDirectInput7W>
else
IID_IDirectInput7	equ <IID_IDirectInput7A>
IDirectInput7		equ <IDirectInput7A>
endif
LPDIRECTINPUT7		typedef ptr IDirectInput7

if(DIRECTINPUT_VERSION GE 0x0800)

.comdef IDirectInput8W : public IDirectInput2W

    EnumDevicesBySemantics proc :LPCWSTR, :LPDIACTIONFORMATW, :LPDIENUMDEVICESBYSEMANTICSCBW, :LPVOID, :DWORD
    ConfigureDevices	proc :LPDICONFIGUREDEVICESCALLBACK, :LPDICONFIGUREDEVICESPARAMSW, :DWORD, :PVOID
   .ends

.comdef IDirectInput8A : public IDirectInput2A

    EnumDevicesBySemantics proc :LPCSTR, :LPDIACTIONFORMATA, :LPDIENUMDEVICESBYSEMANTICSCBA, :PVOID, :DWORD
    ConfigureDevices	proc :LPDICONFIGUREDEVICESCALLBACK, :LPDICONFIGUREDEVICESPARAMSA, :DWORD, :PVOID
   .ends

ifdef _UNICODE
IID_IDirectInput8	equ <IID_IDirectInput8W>
IDirectInput8		equ <IDirectInput8W>
else
IID_IDirectInput8	equ <IID_IDirectInput8A>
IDirectInput8		equ <IDirectInput8A>
endif
LPDIRECTINPUT8		typedef ptr IDirectInput8

endif

if DIRECTINPUT_VERSION GT 0x0700
DirectInput8Create proto WINAPI :HINSTANCE, :DWORD, :REFIID, :ptr, :ptr
else
DirectInputCreateA proto WINAPI :HINSTANCE, :DWORD, :ptr, :ptr
DirectInputCreateW proto WINAPI :HINSTANCE, :DWORD, :ptr, :ptr
ifdef _UNICODE
DirectInputCreate	equ <DirectInputCreateW>
else
DirectInputCreate	equ <DirectInputCreateA>
endif
DirectInputCreateEx proto WINAPI :HINSTANCE, :DWORD, :REFIID, :ptr, :ptr
endif

endif

DI_OK			equ S_OK
DI_NOTATTACHED		equ S_FALSE
DI_BUFFEROVERFLOW	equ S_FALSE
DI_PROPNOEFFECT		equ S_FALSE
DI_NOEFFECT		equ S_FALSE
DI_POLLEDDEVICE		equ (0x00000002)
DI_DOWNLOADSKIPPED	equ (0x00000003)
DI_EFFECTRESTARTED	equ (0x00000004)
DI_TRUNCATED		equ (0x00000008)
DI_SETTINGSNOTSAVED	equ (0x0000000B)
DI_TRUNCATEDANDRESTARTED equ (0x0000000C)
DI_WRITEPROTECT		equ (0x00000013)

DIERR_OLDDIRECTINPUTVERSION equ MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_OLD_WIN_VERSION)
DIERR_BETADIRECTINPUTVERSION equ MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_RMODE_APP)
DIERR_BADDRIVERVER	equ MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_BAD_DRIVER_LEVEL)
DIERR_DEVICENOTREG	equ REGDB_E_CLASSNOTREG
DIERR_NOTFOUND		equ MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_FILE_NOT_FOUND)
DIERR_OBJECTNOTFOUND	equ MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_FILE_NOT_FOUND)
DIERR_INVALIDPARAM	equ E_INVALIDARG
DIERR_NOINTERFACE	equ E_NOINTERFACE
DIERR_GENERIC		equ E_FAIL
DIERR_OUTOFMEMORY	equ E_OUTOFMEMORY
DIERR_UNSUPPORTED	equ E_NOTIMPL
DIERR_NOTINITIALIZED	equ MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_NOT_READY)
DIERR_ALREADYINITIALIZED equ MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_ALREADY_INITIALIZED)
DIERR_NOAGGREGATION	equ CLASS_E_NOAGGREGATION
DIERR_OTHERAPPHASPRIO	equ E_ACCESSDENIED
DIERR_INPUTLOST		equ MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_READ_FAULT)
DIERR_ACQUIRED		equ MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_BUSY)
DIERR_NOTACQUIRED	equ MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_INVALID_ACCESS)
DIERR_READONLY		equ E_ACCESSDENIED
DIERR_HANDLEEXISTS	equ E_ACCESSDENIED

ifndef E_PENDING
E_PENDING		equ 0x8000000A
endif

DIERR_INSUFFICIENTPRIVS equ 0x80040200
DIERR_DEVICEFULL	equ 0x80040201
DIERR_MOREDATA		equ 0x80040202
DIERR_NOTDOWNLOADED	equ 0x80040203
DIERR_HASEFFECTS	equ 0x80040204
DIERR_NOTEXCLUSIVEACQUIRED equ 0x80040205
DIERR_INCOMPLETEEFFECT	equ 0x80040206
DIERR_NOTBUFFERED	equ 0x80040207
DIERR_EFFECTPLAYING	equ 0x80040208
DIERR_UNPLUGGED		equ 0x80040209
DIERR_REPORTFULL	equ 0x8004020A
DIERR_MAPFILEFAIL	equ 0x8004020B

; Physical Keyboard Device

DIKEYBOARD_ESCAPE	equ 0x81000401
DIKEYBOARD_1		equ 0x81000402
DIKEYBOARD_2		equ 0x81000403
DIKEYBOARD_3		equ 0x81000404
DIKEYBOARD_4		equ 0x81000405
DIKEYBOARD_5		equ 0x81000406
DIKEYBOARD_6		equ 0x81000407
DIKEYBOARD_7		equ 0x81000408
DIKEYBOARD_8		equ 0x81000409
DIKEYBOARD_9		equ 0x8100040A
DIKEYBOARD_0		equ 0x8100040B
DIKEYBOARD_MINUS	equ 0x8100040C
DIKEYBOARD_EQUALS	equ 0x8100040D
DIKEYBOARD_BACK		equ 0x8100040E
DIKEYBOARD_TAB		equ 0x8100040F
DIKEYBOARD_Q		equ 0x81000410
DIKEYBOARD_W		equ 0x81000411
DIKEYBOARD_E		equ 0x81000412
DIKEYBOARD_R		equ 0x81000413
DIKEYBOARD_T		equ 0x81000414
DIKEYBOARD_Y		equ 0x81000415
DIKEYBOARD_U		equ 0x81000416
DIKEYBOARD_I		equ 0x81000417
DIKEYBOARD_O		equ 0x81000418
DIKEYBOARD_P		equ 0x81000419
DIKEYBOARD_LBRACKET	equ 0x8100041A
DIKEYBOARD_RBRACKET	equ 0x8100041B
DIKEYBOARD_RETURN	equ 0x8100041C
DIKEYBOARD_LCONTROL	equ 0x8100041D
DIKEYBOARD_A		equ 0x8100041E
DIKEYBOARD_S		equ 0x8100041F
DIKEYBOARD_D		equ 0x81000420
DIKEYBOARD_F		equ 0x81000421
DIKEYBOARD_G		equ 0x81000422
DIKEYBOARD_H		equ 0x81000423
DIKEYBOARD_J		equ 0x81000424
DIKEYBOARD_K		equ 0x81000425
DIKEYBOARD_L		equ 0x81000426
DIKEYBOARD_SEMICOLON	equ 0x81000427
DIKEYBOARD_APOSTROPHE	equ 0x81000428
DIKEYBOARD_GRAVE	equ 0x81000429
DIKEYBOARD_LSHIFT	equ 0x8100042A
DIKEYBOARD_BACKSLASH	equ 0x8100042B
DIKEYBOARD_Z		equ 0x8100042C
DIKEYBOARD_X		equ 0x8100042D
DIKEYBOARD_C		equ 0x8100042E
DIKEYBOARD_V		equ 0x8100042F
DIKEYBOARD_B		equ 0x81000430
DIKEYBOARD_N		equ 0x81000431
DIKEYBOARD_M		equ 0x81000432
DIKEYBOARD_COMMA	equ 0x81000433
DIKEYBOARD_PERIOD	equ 0x81000434
DIKEYBOARD_SLASH	equ 0x81000435
DIKEYBOARD_RSHIFT	equ 0x81000436
DIKEYBOARD_MULTIPLY	equ 0x81000437
DIKEYBOARD_LMENU	equ 0x81000438
DIKEYBOARD_SPACE	equ 0x81000439
DIKEYBOARD_CAPITAL	equ 0x8100043A
DIKEYBOARD_F1		equ 0x8100043B
DIKEYBOARD_F2		equ 0x8100043C
DIKEYBOARD_F3		equ 0x8100043D
DIKEYBOARD_F4		equ 0x8100043E
DIKEYBOARD_F5		equ 0x8100043F
DIKEYBOARD_F6		equ 0x81000440
DIKEYBOARD_F7		equ 0x81000441
DIKEYBOARD_F8		equ 0x81000442
DIKEYBOARD_F9		equ 0x81000443
DIKEYBOARD_F10		equ 0x81000444
DIKEYBOARD_NUMLOCK	equ 0x81000445
DIKEYBOARD_SCROLL	equ 0x81000446
DIKEYBOARD_NUMPAD7	equ 0x81000447
DIKEYBOARD_NUMPAD8	equ 0x81000448
DIKEYBOARD_NUMPAD9	equ 0x81000449
DIKEYBOARD_SUBTRACT	equ 0x8100044A
DIKEYBOARD_NUMPAD4	equ 0x8100044B
DIKEYBOARD_NUMPAD5	equ 0x8100044C
DIKEYBOARD_NUMPAD6	equ 0x8100044D
DIKEYBOARD_ADD		equ 0x8100044E
DIKEYBOARD_NUMPAD1	equ 0x8100044F
DIKEYBOARD_NUMPAD2	equ 0x81000450
DIKEYBOARD_NUMPAD3	equ 0x81000451
DIKEYBOARD_NUMPAD0	equ 0x81000452
DIKEYBOARD_DECIMAL	equ 0x81000453
DIKEYBOARD_OEM_102	equ 0x81000456
DIKEYBOARD_F11		equ 0x81000457
DIKEYBOARD_F12		equ 0x81000458
DIKEYBOARD_F13		equ 0x81000464
DIKEYBOARD_F14		equ 0x81000465
DIKEYBOARD_F15		equ 0x81000466
DIKEYBOARD_KANA		equ 0x81000470
DIKEYBOARD_ABNT_C1	equ 0x81000473
DIKEYBOARD_CONVERT	equ 0x81000479
DIKEYBOARD_NOCONVERT	equ 0x8100047B
DIKEYBOARD_YEN		equ 0x8100047D
DIKEYBOARD_ABNT_C2	equ 0x8100047E
DIKEYBOARD_NUMPADEQUALS equ 0x8100048D
DIKEYBOARD_PREVTRACK	equ 0x81000490
DIKEYBOARD_AT		equ 0x81000491
DIKEYBOARD_COLON	equ 0x81000492
DIKEYBOARD_UNDERLINE	equ 0x81000493
DIKEYBOARD_KANJI	equ 0x81000494
DIKEYBOARD_STOP		equ 0x81000495
DIKEYBOARD_AX		equ 0x81000496
DIKEYBOARD_UNLABELED	equ 0x81000497
DIKEYBOARD_NEXTTRACK	equ 0x81000499
DIKEYBOARD_NUMPADENTER	equ 0x8100049C
DIKEYBOARD_RCONTROL	equ 0x8100049D
DIKEYBOARD_MUTE		equ 0x810004A0
DIKEYBOARD_CALCULATOR	equ 0x810004A1
DIKEYBOARD_PLAYPAUSE	equ 0x810004A2
DIKEYBOARD_MEDIASTOP	equ 0x810004A4
DIKEYBOARD_VOLUMEDOWN	equ 0x810004AE
DIKEYBOARD_VOLUMEUP	equ 0x810004B0
DIKEYBOARD_WEBHOME	equ 0x810004B2
DIKEYBOARD_NUMPADCOMMA	equ 0x810004B3
DIKEYBOARD_DIVIDE	equ 0x810004B5
DIKEYBOARD_SYSRQ	equ 0x810004B7
DIKEYBOARD_RMENU	equ 0x810004B8
DIKEYBOARD_PAUSE	equ 0x810004C5
DIKEYBOARD_HOME		equ 0x810004C7
DIKEYBOARD_UP		equ 0x810004C8
DIKEYBOARD_PRIOR	equ 0x810004C9
DIKEYBOARD_LEFT		equ 0x810004CB
DIKEYBOARD_RIGHT	equ 0x810004CD
DIKEYBOARD_END		equ 0x810004CF
DIKEYBOARD_DOWN		equ 0x810004D0
DIKEYBOARD_NEXT		equ 0x810004D1
DIKEYBOARD_INSERT	equ 0x810004D2
DIKEYBOARD_DELETE	equ 0x810004D3
DIKEYBOARD_LWIN		equ 0x810004DB
DIKEYBOARD_RWIN		equ 0x810004DC
DIKEYBOARD_APPS		equ 0x810004DD
DIKEYBOARD_POWER	equ 0x810004DE
DIKEYBOARD_SLEEP	equ 0x810004DF
DIKEYBOARD_WAKE		equ 0x810004E3
DIKEYBOARD_WEBSEARCH	equ 0x810004E5
DIKEYBOARD_WEBFAVORITES equ 0x810004E6
DIKEYBOARD_WEBREFRESH	equ 0x810004E7
DIKEYBOARD_WEBSTOP	equ 0x810004E8
DIKEYBOARD_WEBFORWARD	equ 0x810004E9
DIKEYBOARD_WEBBACK	equ 0x810004EA
DIKEYBOARD_MYCOMPUTER	equ 0x810004EB
DIKEYBOARD_MAIL		equ 0x810004EC
DIKEYBOARD_MEDIASELECT	equ 0x810004ED


; Physical Mouse Device

DIMOUSE_XAXISAB		equ (0x82000200 OR DIMOFS_X )
DIMOUSE_YAXISAB		equ (0x82000200 OR DIMOFS_Y )
DIMOUSE_XAXIS		equ (0x82000300 OR DIMOFS_X )
DIMOUSE_YAXIS		equ (0x82000300 OR DIMOFS_Y )
DIMOUSE_WHEEL		equ (0x82000300 OR DIMOFS_Z )
DIMOUSE_BUTTON0		equ (0x82000400 OR DIMOFS_BUTTON0)
DIMOUSE_BUTTON1		equ (0x82000400 OR DIMOFS_BUTTON1)
DIMOUSE_BUTTON2		equ (0x82000400 OR DIMOFS_BUTTON2)
DIMOUSE_BUTTON3		equ (0x82000400 OR DIMOFS_BUTTON3)
DIMOUSE_BUTTON4		equ (0x82000400 OR DIMOFS_BUTTON4)
DIMOUSE_BUTTON5		equ (0x82000400 OR DIMOFS_BUTTON5)
DIMOUSE_BUTTON6		equ (0x82000400 OR DIMOFS_BUTTON6)
DIMOUSE_BUTTON7		equ (0x82000400 OR DIMOFS_BUTTON7)

; Physical Dplay Voice Device

DIVOICE_CHANNEL1	equ 0x83000401
DIVOICE_CHANNEL2	equ 0x83000402
DIVOICE_CHANNEL3	equ 0x83000403
DIVOICE_CHANNEL4	equ 0x83000404
DIVOICE_CHANNEL5	equ 0x83000405
DIVOICE_CHANNEL6	equ 0x83000406
DIVOICE_CHANNEL7	equ 0x83000407
DIVOICE_CHANNEL8	equ 0x83000408
DIVOICE_TEAM		equ 0x83000409
DIVOICE_ALL		equ 0x8300040A
DIVOICE_RECORDMUTE	equ 0x8300040B
DIVOICE_PLAYBACKMUTE	equ 0x8300040C
DIVOICE_TRANSMIT	equ 0x8300040D

DIVOICE_VOICECOMMAND	equ 0x83000410

DIVIRTUAL_DRIVING_RACE	equ 0x01000000
DIAXIS_DRIVINGR_STEER	equ 0x01008A01
DIAXIS_DRIVINGR_ACCELERATE equ 0x01039202
DIAXIS_DRIVINGR_BRAKE	equ 0x01041203
DIBUTTON_DRIVINGR_SHIFTUP equ 0x01000C01
DIBUTTON_DRIVINGR_SHIFTDOWN equ 0x01000C02
DIBUTTON_DRIVINGR_VIEW	equ 0x01001C03
DIBUTTON_DRIVINGR_MENU	equ 0x010004FD

DIAXIS_DRIVINGR_ACCEL_AND_BRAKE equ 0x01014A04
DIHATSWITCH_DRIVINGR_GLANCE equ 0x01004601
DIBUTTON_DRIVINGR_BRAKE equ 0x01004C04
DIBUTTON_DRIVINGR_DASHBOARD equ 0x01004405
DIBUTTON_DRIVINGR_AIDS	equ 0x01004406
DIBUTTON_DRIVINGR_MAP	equ 0x01004407
DIBUTTON_DRIVINGR_BOOST equ 0x01004408
DIBUTTON_DRIVINGR_PIT	equ 0x01004409
DIBUTTON_DRIVINGR_ACCELERATE_LINK equ 0x0103D4E0
DIBUTTON_DRIVINGR_STEER_LEFT_LINK equ 0x0100CCE4
DIBUTTON_DRIVINGR_STEER_RIGHT_LINK equ 0x0100CCEC
DIBUTTON_DRIVINGR_GLANCE_LEFT_LINK equ 0x0107C4E4
DIBUTTON_DRIVINGR_GLANCE_RIGHT_LINK equ 0x0107C4EC
DIBUTTON_DRIVINGR_DEVICE equ 0x010044FE
DIBUTTON_DRIVINGR_PAUSE equ 0x010044FC

DIVIRTUAL_DRIVING_COMBAT equ 0x02000000
DIAXIS_DRIVINGC_STEER	equ 0x02008A01
DIAXIS_DRIVINGC_ACCELERATE equ 0x02039202
DIAXIS_DRIVINGC_BRAKE	equ 0x02041203
DIBUTTON_DRIVINGC_FIRE	equ 0x02000C01
DIBUTTON_DRIVINGC_WEAPONS equ 0x02000C02
DIBUTTON_DRIVINGC_TARGET equ 0x02000C03
DIBUTTON_DRIVINGC_MENU	equ 0x020004FD

DIAXIS_DRIVINGC_ACCEL_AND_BRAKE equ 0x02014A04
DIHATSWITCH_DRIVINGC_GLANCE equ 0x02004601
DIBUTTON_DRIVINGC_SHIFTUP equ 0x02004C04
DIBUTTON_DRIVINGC_SHIFTDOWN equ 0x02004C05
DIBUTTON_DRIVINGC_DASHBOARD equ 0x02004406
DIBUTTON_DRIVINGC_AIDS	equ 0x02004407
DIBUTTON_DRIVINGC_BRAKE equ 0x02004C08
DIBUTTON_DRIVINGC_FIRESECONDARY equ 0x02004C09
DIBUTTON_DRIVINGC_ACCELERATE_LINK equ 0x0203D4E0
DIBUTTON_DRIVINGC_STEER_LEFT_LINK equ 0x0200CCE4
DIBUTTON_DRIVINGC_STEER_RIGHT_LINK equ 0x0200CCEC
DIBUTTON_DRIVINGC_GLANCE_LEFT_LINK equ 0x0207C4E4
DIBUTTON_DRIVINGC_GLANCE_RIGHT_LINK equ 0x0207C4EC
DIBUTTON_DRIVINGC_DEVICE equ 0x020044FE
DIBUTTON_DRIVINGC_PAUSE equ 0x020044FC

DIVIRTUAL_DRIVING_TANK	equ 0x03000000
DIAXIS_DRIVINGT_STEER	equ 0x03008A01
DIAXIS_DRIVINGT_BARREL	equ 0x03010202
DIAXIS_DRIVINGT_ACCELERATE equ 0x03039203
DIAXIS_DRIVINGT_ROTATE	equ 0x03020204
DIBUTTON_DRIVINGT_FIRE	equ 0x03000C01
DIBUTTON_DRIVINGT_WEAPONS equ 0x03000C02
DIBUTTON_DRIVINGT_TARGET equ 0x03000C03
DIBUTTON_DRIVINGT_MENU	equ 0x030004FD

DIHATSWITCH_DRIVINGT_GLANCE equ 0x03004601
DIAXIS_DRIVINGT_BRAKE	equ 0x03045205
DIAXIS_DRIVINGT_ACCEL_AND_BRAKE equ 0x03014A06
DIBUTTON_DRIVINGT_VIEW	equ 0x03005C04
DIBUTTON_DRIVINGT_DASHBOARD equ 0x03005C05
DIBUTTON_DRIVINGT_BRAKE equ 0x03004C06
DIBUTTON_DRIVINGT_FIRESECONDARY equ 0x03004C07
DIBUTTON_DRIVINGT_ACCELERATE_LINK equ 0x0303D4E0
DIBUTTON_DRIVINGT_STEER_LEFT_LINK equ 0x0300CCE4
DIBUTTON_DRIVINGT_STEER_RIGHT_LINK equ 0x0300CCEC
DIBUTTON_DRIVINGT_BARREL_UP_LINK equ 0x030144E0
DIBUTTON_DRIVINGT_BARREL_DOWN_LINK equ 0x030144E8
DIBUTTON_DRIVINGT_ROTATE_LEFT_LINK equ 0x030244E4
DIBUTTON_DRIVINGT_ROTATE_RIGHT_LINK equ 0x030244EC
DIBUTTON_DRIVINGT_GLANCE_LEFT_LINK equ 0x0307C4E4
DIBUTTON_DRIVINGT_GLANCE_RIGHT_LINK equ 0x0307C4EC
DIBUTTON_DRIVINGT_DEVICE equ 0x030044FE
DIBUTTON_DRIVINGT_PAUSE equ 0x030044FC

DIVIRTUAL_FLYING_CIVILIAN equ 0x04000000
DIAXIS_FLYINGC_BANK	equ 0x04008A01
DIAXIS_FLYINGC_PITCH	equ 0x04010A02
DIAXIS_FLYINGC_THROTTLE equ 0x04039203
DIBUTTON_FLYINGC_VIEW	equ 0x04002401
DIBUTTON_FLYINGC_DISPLAY equ 0x04002402
DIBUTTON_FLYINGC_GEAR	equ 0x04002C03
DIBUTTON_FLYINGC_MENU	equ 0x040004FD

DIHATSWITCH_FLYINGC_GLANCE equ 0x04004601
DIAXIS_FLYINGC_BRAKE	equ 0x04046A04
DIAXIS_FLYINGC_RUDDER	equ 0x04025205
DIAXIS_FLYINGC_FLAPS	equ 0x04055A06
DIBUTTON_FLYINGC_FLAPSUP equ 0x04006404
DIBUTTON_FLYINGC_FLAPSDOWN equ 0x04006405
DIBUTTON_FLYINGC_BRAKE_LINK equ 0x04046CE0
DIBUTTON_FLYINGC_FASTER_LINK equ 0x0403D4E0
DIBUTTON_FLYINGC_SLOWER_LINK equ 0x0403D4E8
DIBUTTON_FLYINGC_GLANCE_LEFT_LINK equ 0x0407C4E4
DIBUTTON_FLYINGC_GLANCE_RIGHT_LINK equ 0x0407C4EC
DIBUTTON_FLYINGC_GLANCE_UP_LINK equ 0x0407C4E0
DIBUTTON_FLYINGC_GLANCE_DOWN_LINK equ 0x0407C4E8
DIBUTTON_FLYINGC_DEVICE equ 0x040044FE
DIBUTTON_FLYINGC_PAUSE	equ 0x040044FC

DIVIRTUAL_FLYING_MILITARY equ 0x05000000
DIAXIS_FLYINGM_BANK	equ 0x05008A01
DIAXIS_FLYINGM_PITCH	equ 0x05010A02
DIAXIS_FLYINGM_THROTTLE equ 0x05039203
DIBUTTON_FLYINGM_FIRE	equ 0x05000C01
DIBUTTON_FLYINGM_WEAPONS equ 0x05000C02
DIBUTTON_FLYINGM_TARGET equ 0x05000C03
DIBUTTON_FLYINGM_MENU	equ 0x050004FD

DIHATSWITCH_FLYINGM_GLANCE equ 0x05004601
DIBUTTON_FLYINGM_COUNTER equ 0x05005C04
DIAXIS_FLYINGM_RUDDER	equ 0x05024A04
DIAXIS_FLYINGM_BRAKE	equ 0x05046205
DIBUTTON_FLYINGM_VIEW	equ 0x05006405
DIBUTTON_FLYINGM_DISPLAY equ 0x05006406
DIAXIS_FLYINGM_FLAPS	equ 0x05055206
DIBUTTON_FLYINGM_FLAPSUP equ 0x05005407
DIBUTTON_FLYINGM_FLAPSDOWN equ 0x05005408
DIBUTTON_FLYINGM_FIRESECONDARY equ 0x05004C09
DIBUTTON_FLYINGM_GEAR	equ 0x0500640A
DIBUTTON_FLYINGM_BRAKE_LINK equ 0x050464E0
DIBUTTON_FLYINGM_FASTER_LINK equ 0x0503D4E0
DIBUTTON_FLYINGM_SLOWER_LINK equ 0x0503D4E8
DIBUTTON_FLYINGM_GLANCE_LEFT_LINK equ 0x0507C4E4
DIBUTTON_FLYINGM_GLANCE_RIGHT_LINK equ 0x0507C4EC
DIBUTTON_FLYINGM_GLANCE_UP_LINK equ 0x0507C4E0
DIBUTTON_FLYINGM_GLANCE_DOWN_LINK equ 0x0507C4E8
DIBUTTON_FLYINGM_DEVICE equ 0x050044FE
DIBUTTON_FLYINGM_PAUSE	equ 0x050044FC

DIVIRTUAL_FLYING_HELICOPTER equ 0x06000000
DIAXIS_FLYINGH_BANK	equ 0x06008A01
DIAXIS_FLYINGH_PITCH	equ 0x06010A02
DIAXIS_FLYINGH_COLLECTIVE equ 0x06018A03
DIBUTTON_FLYINGH_FIRE	equ 0x06001401
DIBUTTON_FLYINGH_WEAPONS equ 0x06001402
DIBUTTON_FLYINGH_TARGET equ 0x06001403
DIBUTTON_FLYINGH_MENU	equ 0x060004FD

DIHATSWITCH_FLYINGH_GLANCE equ 0x06004601
DIAXIS_FLYINGH_TORQUE	equ 0x06025A04
DIAXIS_FLYINGH_THROTTLE equ 0x0603DA05
DIBUTTON_FLYINGH_COUNTER equ 0x06005404
DIBUTTON_FLYINGH_VIEW	equ 0x06006405
DIBUTTON_FLYINGH_GEAR	equ 0x06006406
DIBUTTON_FLYINGH_FIRESECONDARY equ 0x06004C07
DIBUTTON_FLYINGH_FASTER_LINK equ 0x0603DCE0
DIBUTTON_FLYINGH_SLOWER_LINK equ 0x0603DCE8
DIBUTTON_FLYINGH_GLANCE_LEFT_LINK equ 0x0607C4E4
DIBUTTON_FLYINGH_GLANCE_RIGHT_LINK equ 0x0607C4EC
DIBUTTON_FLYINGH_GLANCE_UP_LINK equ 0x0607C4E0
DIBUTTON_FLYINGH_GLANCE_DOWN_LINK equ 0x0607C4E8
DIBUTTON_FLYINGH_DEVICE equ 0x060044FE
DIBUTTON_FLYINGH_PAUSE	equ 0x060044FC

DIVIRTUAL_SPACESIM	equ 0x07000000
DIAXIS_SPACESIM_LATERAL equ 0x07008201
DIAXIS_SPACESIM_MOVE	equ 0x07010202
DIAXIS_SPACESIM_THROTTLE equ 0x07038203
DIBUTTON_SPACESIM_FIRE	equ 0x07000401
DIBUTTON_SPACESIM_WEAPONS equ 0x07000402
DIBUTTON_SPACESIM_TARGET equ 0x07000403
DIBUTTON_SPACESIM_MENU	equ 0x070004FD

DIHATSWITCH_SPACESIM_GLANCE equ 0x07004601
DIAXIS_SPACESIM_CLIMB	equ 0x0701C204
DIAXIS_SPACESIM_ROTATE	equ 0x07024205
DIBUTTON_SPACESIM_VIEW	equ 0x07004404
DIBUTTON_SPACESIM_DISPLAY equ 0x07004405
DIBUTTON_SPACESIM_RAISE equ 0x07004406
DIBUTTON_SPACESIM_LOWER equ 0x07004407
DIBUTTON_SPACESIM_GEAR	equ 0x07004408
DIBUTTON_SPACESIM_FIRESECONDARY equ 0x07004409
DIBUTTON_SPACESIM_LEFT_LINK equ 0x0700C4E4
DIBUTTON_SPACESIM_RIGHT_LINK equ 0x0700C4EC
DIBUTTON_SPACESIM_FORWARD_LINK equ 0x070144E0
DIBUTTON_SPACESIM_BACKWARD_LINK equ 0x070144E8
DIBUTTON_SPACESIM_FASTER_LINK equ 0x0703C4E0
DIBUTTON_SPACESIM_SLOWER_LINK equ 0x0703C4E8
DIBUTTON_SPACESIM_TURN_LEFT_LINK equ 0x070244E4
DIBUTTON_SPACESIM_TURN_RIGHT_LINK equ 0x070244EC
DIBUTTON_SPACESIM_GLANCE_LEFT_LINK equ 0x0707C4E4
DIBUTTON_SPACESIM_GLANCE_RIGHT_LINK equ 0x0707C4EC
DIBUTTON_SPACESIM_GLANCE_UP_LINK equ 0x0707C4E0
DIBUTTON_SPACESIM_GLANCE_DOWN_LINK equ 0x0707C4E8
DIBUTTON_SPACESIM_DEVICE equ 0x070044FE
DIBUTTON_SPACESIM_PAUSE equ 0x070044FC

DIVIRTUAL_FIGHTING_HAND2HAND equ 0x08000000
DIAXIS_FIGHTINGH_LATERAL equ 0x08008201
DIAXIS_FIGHTINGH_MOVE	equ 0x08010202
DIBUTTON_FIGHTINGH_PUNCH equ 0x08000401
DIBUTTON_FIGHTINGH_KICK equ 0x08000402
DIBUTTON_FIGHTINGH_BLOCK equ 0x08000403
DIBUTTON_FIGHTINGH_CROUCH equ 0x08000404
DIBUTTON_FIGHTINGH_JUMP equ 0x08000405
DIBUTTON_FIGHTINGH_SPECIAL1 equ 0x08000406
DIBUTTON_FIGHTINGH_SPECIAL2 equ 0x08000407
DIBUTTON_FIGHTINGH_MENU equ 0x080004FD

DIBUTTON_FIGHTINGH_SELECT equ 0x08004408
DIHATSWITCH_FIGHTINGH_SLIDE equ 0x08004601
DIBUTTON_FIGHTINGH_DISPLAY equ 0x08004409
DIAXIS_FIGHTINGH_ROTATE equ 0x08024203
DIBUTTON_FIGHTINGH_DODGE equ 0x0800440A
DIBUTTON_FIGHTINGH_LEFT_LINK equ 0x0800C4E4
DIBUTTON_FIGHTINGH_RIGHT_LINK equ 0x0800C4EC
DIBUTTON_FIGHTINGH_FORWARD_LINK equ 0x080144E0
DIBUTTON_FIGHTINGH_BACKWARD_LINK equ 0x080144E8
DIBUTTON_FIGHTINGH_DEVICE equ 0x080044FE
DIBUTTON_FIGHTINGH_PAUSE equ 0x080044FC

DIVIRTUAL_FIGHTING_FPS	equ 0x09000000
DIAXIS_FPS_ROTATE	equ 0x09008201
DIAXIS_FPS_MOVE		equ 0x09010202
DIBUTTON_FPS_FIRE	equ 0x09000401
DIBUTTON_FPS_WEAPONS	equ 0x09000402
DIBUTTON_FPS_APPLY	equ 0x09000403
DIBUTTON_FPS_SELECT	equ 0x09000404
DIBUTTON_FPS_CROUCH	equ 0x09000405
DIBUTTON_FPS_JUMP	equ 0x09000406
DIAXIS_FPS_LOOKUPDOWN	equ 0x09018203
DIBUTTON_FPS_STRAFE	equ 0x09000407
DIBUTTON_FPS_MENU	equ 0x090004FD

DIHATSWITCH_FPS_GLANCE	equ 0x09004601
DIBUTTON_FPS_DISPLAY	equ 0x09004408
DIAXIS_FPS_SIDESTEP	equ 0x09024204
DIBUTTON_FPS_DODGE	equ 0x09004409
DIBUTTON_FPS_GLANCEL	equ 0x0900440A
DIBUTTON_FPS_GLANCER	equ 0x0900440B
DIBUTTON_FPS_FIRESECONDARY equ 0x0900440C
DIBUTTON_FPS_ROTATE_LEFT_LINK equ 0x0900C4E4
DIBUTTON_FPS_ROTATE_RIGHT_LINK equ 0x0900C4EC
DIBUTTON_FPS_FORWARD_LINK equ 0x090144E0
DIBUTTON_FPS_BACKWARD_LINK equ 0x090144E8
DIBUTTON_FPS_GLANCE_UP_LINK equ 0x0901C4E0
DIBUTTON_FPS_GLANCE_DOWN_LINK equ 0x0901C4E8
DIBUTTON_FPS_STEP_LEFT_LINK equ 0x090244E4
DIBUTTON_FPS_STEP_RIGHT_LINK equ 0x090244EC
DIBUTTON_FPS_DEVICE	equ 0x090044FE
DIBUTTON_FPS_PAUSE	equ 0x090044FC

DIVIRTUAL_FIGHTING_THIRDPERSON equ 0x0A000000
DIAXIS_TPS_TURN		equ 0x0A020201
DIAXIS_TPS_MOVE		equ 0x0A010202
DIBUTTON_TPS_RUN	equ 0x0A000401
DIBUTTON_TPS_ACTION	equ 0x0A000402
DIBUTTON_TPS_SELECT	equ 0x0A000403
DIBUTTON_TPS_USE	equ 0x0A000404
DIBUTTON_TPS_JUMP	equ 0x0A000405
DIBUTTON_TPS_MENU	equ 0x0A0004FD

DIHATSWITCH_TPS_GLANCE	equ 0x0A004601
DIBUTTON_TPS_VIEW	equ 0x0A004406
DIBUTTON_TPS_STEPLEFT	equ 0x0A004407
DIBUTTON_TPS_STEPRIGHT	equ 0x0A004408
DIAXIS_TPS_STEP		equ 0x0A00C203
DIBUTTON_TPS_DODGE	equ 0x0A004409
DIBUTTON_TPS_INVENTORY	equ 0x0A00440A
DIBUTTON_TPS_TURN_LEFT_LINK equ 0x0A0244E4
DIBUTTON_TPS_TURN_RIGHT_LINK equ 0x0A0244EC
DIBUTTON_TPS_FORWARD_LINK equ 0x0A0144E0
DIBUTTON_TPS_BACKWARD_LINK equ 0x0A0144E8
DIBUTTON_TPS_GLANCE_UP_LINK equ 0x0A07C4E0
DIBUTTON_TPS_GLANCE_DOWN_LINK equ 0x0A07C4E8
DIBUTTON_TPS_GLANCE_LEFT_LINK equ 0x0A07C4E4
DIBUTTON_TPS_GLANCE_RIGHT_LINK equ 0x0A07C4EC
DIBUTTON_TPS_DEVICE	equ 0x0A0044FE
DIBUTTON_TPS_PAUSE	equ 0x0A0044FC

DIVIRTUAL_STRATEGY_ROLEPLAYING equ 0x0B000000
DIAXIS_STRATEGYR_LATERAL equ 0x0B008201
DIAXIS_STRATEGYR_MOVE	equ 0x0B010202
DIBUTTON_STRATEGYR_GET	equ 0x0B000401
DIBUTTON_STRATEGYR_APPLY equ 0x0B000402
DIBUTTON_STRATEGYR_SELECT equ 0x0B000403
DIBUTTON_STRATEGYR_ATTACK equ 0x0B000404
DIBUTTON_STRATEGYR_CAST equ 0x0B000405
DIBUTTON_STRATEGYR_CROUCH equ 0x0B000406
DIBUTTON_STRATEGYR_JUMP equ 0x0B000407
DIBUTTON_STRATEGYR_MENU equ 0x0B0004FD

DIHATSWITCH_STRATEGYR_GLANCE equ 0x0B004601
DIBUTTON_STRATEGYR_MAP	equ 0x0B004408
DIBUTTON_STRATEGYR_DISPLAY equ 0x0B004409
DIAXIS_STRATEGYR_ROTATE equ 0x0B024203
DIBUTTON_STRATEGYR_LEFT_LINK equ 0x0B00C4E4
DIBUTTON_STRATEGYR_RIGHT_LINK equ 0x0B00C4EC
DIBUTTON_STRATEGYR_FORWARD_LINK equ 0x0B0144E0
DIBUTTON_STRATEGYR_BACK_LINK equ 0x0B0144E8
DIBUTTON_STRATEGYR_ROTATE_LEFT_LINK equ 0x0B0244E4
DIBUTTON_STRATEGYR_ROTATE_RIGHT_LINK equ 0x0B0244EC
DIBUTTON_STRATEGYR_DEVICE equ 0x0B0044FE
DIBUTTON_STRATEGYR_PAUSE equ 0x0B0044FC

DIVIRTUAL_STRATEGY_TURN equ 0x0C000000
DIAXIS_STRATEGYT_LATERAL equ 0x0C008201
DIAXIS_STRATEGYT_MOVE	equ 0x0C010202
DIBUTTON_STRATEGYT_SELECT equ 0x0C000401
DIBUTTON_STRATEGYT_INSTRUCT equ 0x0C000402
DIBUTTON_STRATEGYT_APPLY equ 0x0C000403
DIBUTTON_STRATEGYT_TEAM equ 0x0C000404
DIBUTTON_STRATEGYT_TURN equ 0x0C000405
DIBUTTON_STRATEGYT_MENU equ 0x0C0004FD

DIBUTTON_STRATEGYT_ZOOM equ 0x0C004406
DIBUTTON_STRATEGYT_MAP	equ 0x0C004407
DIBUTTON_STRATEGYT_DISPLAY equ 0x0C004408
DIBUTTON_STRATEGYT_LEFT_LINK equ 0x0C00C4E4
DIBUTTON_STRATEGYT_RIGHT_LINK equ 0x0C00C4EC
DIBUTTON_STRATEGYT_FORWARD_LINK equ 0x0C0144E0
DIBUTTON_STRATEGYT_BACK_LINK equ 0x0C0144E8
DIBUTTON_STRATEGYT_DEVICE equ 0x0C0044FE
DIBUTTON_STRATEGYT_PAUSE equ 0x0C0044FC

DIVIRTUAL_SPORTS_HUNTING equ 0x0D000000
DIAXIS_HUNTING_LATERAL	equ 0x0D008201
DIAXIS_HUNTING_MOVE	equ 0x0D010202
DIBUTTON_HUNTING_FIRE	equ 0x0D000401
DIBUTTON_HUNTING_AIM	equ 0x0D000402
DIBUTTON_HUNTING_WEAPON equ 0x0D000403
DIBUTTON_HUNTING_BINOCULAR equ 0x0D000404
DIBUTTON_HUNTING_CALL	equ 0x0D000405
DIBUTTON_HUNTING_MAP	equ 0x0D000406
DIBUTTON_HUNTING_SPECIAL equ 0x0D000407
DIBUTTON_HUNTING_MENU	equ 0x0D0004FD

DIHATSWITCH_HUNTING_GLANCE equ 0x0D004601
DIBUTTON_HUNTING_DISPLAY equ 0x0D004408
DIAXIS_HUNTING_ROTATE	equ 0x0D024203
DIBUTTON_HUNTING_CROUCH equ 0x0D004409
DIBUTTON_HUNTING_JUMP	equ 0x0D00440A
DIBUTTON_HUNTING_FIRESECONDARY equ 0x0D00440B
DIBUTTON_HUNTING_LEFT_LINK equ 0x0D00C4E4
DIBUTTON_HUNTING_RIGHT_LINK equ 0x0D00C4EC
DIBUTTON_HUNTING_FORWARD_LINK equ 0x0D0144E0
DIBUTTON_HUNTING_BACK_LINK equ 0x0D0144E8
DIBUTTON_HUNTING_ROTATE_LEFT_LINK equ 0x0D0244E4
DIBUTTON_HUNTING_ROTATE_RIGHT_LINK equ 0x0D0244EC
DIBUTTON_HUNTING_DEVICE equ 0x0D0044FE
DIBUTTON_HUNTING_PAUSE	equ 0x0D0044FC

DIVIRTUAL_SPORTS_FISHING equ 0x0E000000
DIAXIS_FISHING_LATERAL	equ 0x0E008201
DIAXIS_FISHING_MOVE	equ 0x0E010202
DIBUTTON_FISHING_CAST	equ 0x0E000401
DIBUTTON_FISHING_TYPE	equ 0x0E000402
DIBUTTON_FISHING_BINOCULAR equ 0x0E000403
DIBUTTON_FISHING_BAIT	equ 0x0E000404
DIBUTTON_FISHING_MAP	equ 0x0E000405
DIBUTTON_FISHING_MENU	equ 0x0E0004FD

DIHATSWITCH_FISHING_GLANCE equ 0x0E004601
DIBUTTON_FISHING_DISPLAY equ 0x0E004406
DIAXIS_FISHING_ROTATE	equ 0x0E024203
DIBUTTON_FISHING_CROUCH equ 0x0E004407
DIBUTTON_FISHING_JUMP	equ 0x0E004408
DIBUTTON_FISHING_LEFT_LINK equ 0x0E00C4E4
DIBUTTON_FISHING_RIGHT_LINK equ 0x0E00C4EC
DIBUTTON_FISHING_FORWARD_LINK equ 0x0E0144E0
DIBUTTON_FISHING_BACK_LINK equ 0x0E0144E8
DIBUTTON_FISHING_ROTATE_LEFT_LINK equ 0x0E0244E4
DIBUTTON_FISHING_ROTATE_RIGHT_LINK equ 0x0E0244EC
DIBUTTON_FISHING_DEVICE equ 0x0E0044FE
DIBUTTON_FISHING_PAUSE	equ 0x0E0044FC

DIVIRTUAL_SPORTS_BASEBALL_BAT equ 0x0F000000
DIAXIS_BASEBALLB_LATERAL equ 0x0F008201
DIAXIS_BASEBALLB_MOVE	equ 0x0F010202
DIBUTTON_BASEBALLB_SELECT equ 0x0F000401
DIBUTTON_BASEBALLB_NORMAL equ 0x0F000402
DIBUTTON_BASEBALLB_POWER equ 0x0F000403
DIBUTTON_BASEBALLB_BUNT equ 0x0F000404
DIBUTTON_BASEBALLB_STEAL equ 0x0F000405
DIBUTTON_BASEBALLB_BURST equ 0x0F000406
DIBUTTON_BASEBALLB_SLIDE equ 0x0F000407
DIBUTTON_BASEBALLB_CONTACT equ 0x0F000408
DIBUTTON_BASEBALLB_MENU equ 0x0F0004FD

DIBUTTON_BASEBALLB_NOSTEAL equ 0x0F004409
DIBUTTON_BASEBALLB_BOX	equ 0x0F00440A
DIBUTTON_BASEBALLB_LEFT_LINK equ 0x0F00C4E4
DIBUTTON_BASEBALLB_RIGHT_LINK equ 0x0F00C4EC
DIBUTTON_BASEBALLB_FORWARD_LINK equ 0x0F0144E0
DIBUTTON_BASEBALLB_BACK_LINK equ 0x0F0144E8
DIBUTTON_BASEBALLB_DEVICE equ 0x0F0044FE
DIBUTTON_BASEBALLB_PAUSE equ 0x0F0044FC

DIVIRTUAL_SPORTS_BASEBALL_PITCH equ 0x10000000
DIAXIS_BASEBALLP_LATERAL equ 0x10008201
DIAXIS_BASEBALLP_MOVE	equ 0x10010202
DIBUTTON_BASEBALLP_SELECT equ 0x10000401
DIBUTTON_BASEBALLP_PITCH equ 0x10000402
DIBUTTON_BASEBALLP_BASE equ 0x10000403
DIBUTTON_BASEBALLP_THROW equ 0x10000404
DIBUTTON_BASEBALLP_FAKE equ 0x10000405
DIBUTTON_BASEBALLP_MENU equ 0x100004FD

DIBUTTON_BASEBALLP_WALK equ 0x10004406
DIBUTTON_BASEBALLP_LOOK equ 0x10004407
DIBUTTON_BASEBALLP_LEFT_LINK equ 0x1000C4E4
DIBUTTON_BASEBALLP_RIGHT_LINK equ 0x1000C4EC
DIBUTTON_BASEBALLP_FORWARD_LINK equ 0x100144E0
DIBUTTON_BASEBALLP_BACK_LINK equ 0x100144E8
DIBUTTON_BASEBALLP_DEVICE equ 0x100044FE
DIBUTTON_BASEBALLP_PAUSE equ 0x100044FC

DIVIRTUAL_SPORTS_BASEBALL_FIELD equ 0x11000000
DIAXIS_BASEBALLF_LATERAL equ 0x11008201
DIAXIS_BASEBALLF_MOVE	equ 0x11010202
DIBUTTON_BASEBALLF_NEAREST equ 0x11000401
DIBUTTON_BASEBALLF_THROW1 equ 0x11000402
DIBUTTON_BASEBALLF_THROW2 equ 0x11000403
DIBUTTON_BASEBALLF_BURST equ 0x11000404
DIBUTTON_BASEBALLF_JUMP equ 0x11000405
DIBUTTON_BASEBALLF_DIVE equ 0x11000406
DIBUTTON_BASEBALLF_MENU equ 0x110004FD

DIBUTTON_BASEBALLF_SHIFTIN equ 0x11004407
DIBUTTON_BASEBALLF_SHIFTOUT equ 0x11004408
DIBUTTON_BASEBALLF_AIM_LEFT_LINK equ 0x1100C4E4
DIBUTTON_BASEBALLF_AIM_RIGHT_LINK equ 0x1100C4EC
DIBUTTON_BASEBALLF_FORWARD_LINK equ 0x110144E0
DIBUTTON_BASEBALLF_BACK_LINK equ 0x110144E8
DIBUTTON_BASEBALLF_DEVICE equ 0x110044FE
DIBUTTON_BASEBALLF_PAUSE equ 0x110044FC

DIVIRTUAL_SPORTS_BASKETBALL_OFFENSE equ 0x12000000
DIAXIS_BBALLO_LATERAL	equ 0x12008201
DIAXIS_BBALLO_MOVE	equ 0x12010202
DIBUTTON_BBALLO_SHOOT	equ 0x12000401
DIBUTTON_BBALLO_DUNK	equ 0x12000402
DIBUTTON_BBALLO_PASS	equ 0x12000403
DIBUTTON_BBALLO_FAKE	equ 0x12000404
DIBUTTON_BBALLO_SPECIAL equ 0x12000405
DIBUTTON_BBALLO_PLAYER	equ 0x12000406
DIBUTTON_BBALLO_BURST	equ 0x12000407
DIBUTTON_BBALLO_CALL	equ 0x12000408
DIBUTTON_BBALLO_MENU	equ 0x120004FD

DIHATSWITCH_BBALLO_GLANCE equ 0x12004601
DIBUTTON_BBALLO_SCREEN	equ 0x12004409
DIBUTTON_BBALLO_PLAY	equ 0x1200440A
DIBUTTON_BBALLO_JAB	equ 0x1200440B
DIBUTTON_BBALLO_POST	equ 0x1200440C
DIBUTTON_BBALLO_TIMEOUT equ 0x1200440D
DIBUTTON_BBALLO_SUBSTITUTE equ 0x1200440E
DIBUTTON_BBALLO_LEFT_LINK equ 0x1200C4E4
DIBUTTON_BBALLO_RIGHT_LINK equ 0x1200C4EC
DIBUTTON_BBALLO_FORWARD_LINK equ 0x120144E0
DIBUTTON_BBALLO_BACK_LINK equ 0x120144E8
DIBUTTON_BBALLO_DEVICE	equ 0x120044FE
DIBUTTON_BBALLO_PAUSE	equ 0x120044FC

DIVIRTUAL_SPORTS_BASKETBALL_DEFENSE equ 0x13000000
DIAXIS_BBALLD_LATERAL	equ 0x13008201
DIAXIS_BBALLD_MOVE	equ 0x13010202
DIBUTTON_BBALLD_JUMP	equ 0x13000401
DIBUTTON_BBALLD_STEAL	equ 0x13000402
DIBUTTON_BBALLD_FAKE	equ 0x13000403
DIBUTTON_BBALLD_SPECIAL equ 0x13000404
DIBUTTON_BBALLD_PLAYER	equ 0x13000405
DIBUTTON_BBALLD_BURST	equ 0x13000406
DIBUTTON_BBALLD_PLAY	equ 0x13000407
DIBUTTON_BBALLD_MENU	equ 0x130004FD

DIHATSWITCH_BBALLD_GLANCE equ 0x13004601
DIBUTTON_BBALLD_TIMEOUT equ 0x13004408
DIBUTTON_BBALLD_SUBSTITUTE equ 0x13004409
DIBUTTON_BBALLD_LEFT_LINK equ 0x1300C4E4
DIBUTTON_BBALLD_RIGHT_LINK equ 0x1300C4EC
DIBUTTON_BBALLD_FORWARD_LINK equ 0x130144E0
DIBUTTON_BBALLD_BACK_LINK equ 0x130144E8
DIBUTTON_BBALLD_DEVICE	equ 0x130044FE
DIBUTTON_BBALLD_PAUSE	equ 0x130044FC

DIVIRTUAL_SPORTS_FOOTBALL_FIELD equ 0x14000000
DIBUTTON_FOOTBALLP_PLAY equ 0x14000401
DIBUTTON_FOOTBALLP_SELECT equ 0x14000402
DIBUTTON_FOOTBALLP_HELP equ 0x14000403
DIBUTTON_FOOTBALLP_MENU equ 0x140004FD

DIBUTTON_FOOTBALLP_DEVICE equ 0x140044FE
DIBUTTON_FOOTBALLP_PAUSE equ 0x140044FC

DIVIRTUAL_SPORTS_FOOTBALL_QBCK equ 0x15000000
DIAXIS_FOOTBALLQ_LATERAL equ 0x15008201
DIAXIS_FOOTBALLQ_MOVE	equ 0x15010202
DIBUTTON_FOOTBALLQ_SELECT equ 0x15000401
DIBUTTON_FOOTBALLQ_SNAP equ 0x15000402
DIBUTTON_FOOTBALLQ_JUMP equ 0x15000403
DIBUTTON_FOOTBALLQ_SLIDE equ 0x15000404
DIBUTTON_FOOTBALLQ_PASS equ 0x15000405
DIBUTTON_FOOTBALLQ_FAKE equ 0x15000406
DIBUTTON_FOOTBALLQ_MENU equ 0x150004FD

DIBUTTON_FOOTBALLQ_FAKESNAP equ 0x15004407
DIBUTTON_FOOTBALLQ_MOTION equ 0x15004408
DIBUTTON_FOOTBALLQ_AUDIBLE equ 0x15004409
DIBUTTON_FOOTBALLQ_LEFT_LINK equ 0x1500C4E4
DIBUTTON_FOOTBALLQ_RIGHT_LINK equ 0x1500C4EC
DIBUTTON_FOOTBALLQ_FORWARD_LINK equ 0x150144E0
DIBUTTON_FOOTBALLQ_BACK_LINK equ 0x150144E8
DIBUTTON_FOOTBALLQ_DEVICE equ 0x150044FE
DIBUTTON_FOOTBALLQ_PAUSE equ 0x150044FC

DIVIRTUAL_SPORTS_FOOTBALL_OFFENSE equ 0x16000000
DIAXIS_FOOTBALLO_LATERAL equ 0x16008201
DIAXIS_FOOTBALLO_MOVE	equ 0x16010202
DIBUTTON_FOOTBALLO_JUMP equ 0x16000401
DIBUTTON_FOOTBALLO_LEFTARM equ 0x16000402
DIBUTTON_FOOTBALLO_RIGHTARM equ 0x16000403
DIBUTTON_FOOTBALLO_THROW equ 0x16000404
DIBUTTON_FOOTBALLO_SPIN equ 0x16000405
DIBUTTON_FOOTBALLO_MENU equ 0x160004FD

DIBUTTON_FOOTBALLO_JUKE equ 0x16004406
DIBUTTON_FOOTBALLO_SHOULDER equ 0x16004407
DIBUTTON_FOOTBALLO_TURBO equ 0x16004408
DIBUTTON_FOOTBALLO_DIVE equ 0x16004409
DIBUTTON_FOOTBALLO_ZOOM equ 0x1600440A
DIBUTTON_FOOTBALLO_SUBSTITUTE equ 0x1600440B
DIBUTTON_FOOTBALLO_LEFT_LINK equ 0x1600C4E4
DIBUTTON_FOOTBALLO_RIGHT_LINK equ 0x1600C4EC
DIBUTTON_FOOTBALLO_FORWARD_LINK equ 0x160144E0
DIBUTTON_FOOTBALLO_BACK_LINK equ 0x160144E8
DIBUTTON_FOOTBALLO_DEVICE equ 0x160044FE
DIBUTTON_FOOTBALLO_PAUSE equ 0x160044FC

DIVIRTUAL_SPORTS_FOOTBALL_DEFENSE equ 0x17000000
DIAXIS_FOOTBALLD_LATERAL equ 0x17008201
DIAXIS_FOOTBALLD_MOVE	equ 0x17010202
DIBUTTON_FOOTBALLD_PLAY equ 0x17000401
DIBUTTON_FOOTBALLD_SELECT equ 0x17000402
DIBUTTON_FOOTBALLD_JUMP equ 0x17000403
DIBUTTON_FOOTBALLD_TACKLE equ 0x17000404
DIBUTTON_FOOTBALLD_FAKE equ 0x17000405
DIBUTTON_FOOTBALLD_SUPERTACKLE equ 0x17000406
DIBUTTON_FOOTBALLD_MENU equ 0x170004FD

DIBUTTON_FOOTBALLD_SPIN equ 0x17004407
DIBUTTON_FOOTBALLD_SWIM equ 0x17004408
DIBUTTON_FOOTBALLD_BULLRUSH equ 0x17004409
DIBUTTON_FOOTBALLD_RIP	equ 0x1700440A
DIBUTTON_FOOTBALLD_AUDIBLE equ 0x1700440B
DIBUTTON_FOOTBALLD_ZOOM equ 0x1700440C
DIBUTTON_FOOTBALLD_SUBSTITUTE equ 0x1700440D
DIBUTTON_FOOTBALLD_LEFT_LINK equ 0x1700C4E4
DIBUTTON_FOOTBALLD_RIGHT_LINK equ 0x1700C4EC
DIBUTTON_FOOTBALLD_FORWARD_LINK equ 0x170144E0
DIBUTTON_FOOTBALLD_BACK_LINK equ 0x170144E8
DIBUTTON_FOOTBALLD_DEVICE equ 0x170044FE
DIBUTTON_FOOTBALLD_PAUSE equ 0x170044FC

DIVIRTUAL_SPORTS_GOLF	equ 0x18000000
DIAXIS_GOLF_LATERAL	equ 0x18008201
DIAXIS_GOLF_MOVE	equ 0x18010202
DIBUTTON_GOLF_SWING	equ 0x18000401
DIBUTTON_GOLF_SELECT	equ 0x18000402
DIBUTTON_GOLF_UP	equ 0x18000403
DIBUTTON_GOLF_DOWN	equ 0x18000404
DIBUTTON_GOLF_TERRAIN	equ 0x18000405
DIBUTTON_GOLF_FLYBY	equ 0x18000406
DIBUTTON_GOLF_MENU	equ 0x180004FD

DIHATSWITCH_GOLF_SCROLL equ 0x18004601
DIBUTTON_GOLF_ZOOM	equ 0x18004407
DIBUTTON_GOLF_TIMEOUT	equ 0x18004408
DIBUTTON_GOLF_SUBSTITUTE equ 0x18004409
DIBUTTON_GOLF_LEFT_LINK equ 0x1800C4E4
DIBUTTON_GOLF_RIGHT_LINK equ 0x1800C4EC
DIBUTTON_GOLF_FORWARD_LINK equ 0x180144E0
DIBUTTON_GOLF_BACK_LINK equ 0x180144E8
DIBUTTON_GOLF_DEVICE	equ 0x180044FE
DIBUTTON_GOLF_PAUSE	equ 0x180044FC

DIVIRTUAL_SPORTS_HOCKEY_OFFENSE equ 0x19000000
DIAXIS_HOCKEYO_LATERAL	equ 0x19008201
DIAXIS_HOCKEYO_MOVE	equ 0x19010202
DIBUTTON_HOCKEYO_SHOOT	equ 0x19000401
DIBUTTON_HOCKEYO_PASS	equ 0x19000402
DIBUTTON_HOCKEYO_BURST	equ 0x19000403
DIBUTTON_HOCKEYO_SPECIAL equ 0x19000404
DIBUTTON_HOCKEYO_FAKE	equ 0x19000405
DIBUTTON_HOCKEYO_MENU	equ 0x190004FD

DIHATSWITCH_HOCKEYO_SCROLL equ 0x19004601
DIBUTTON_HOCKEYO_ZOOM	equ 0x19004406
DIBUTTON_HOCKEYO_STRATEGY equ 0x19004407
DIBUTTON_HOCKEYO_TIMEOUT equ 0x19004408
DIBUTTON_HOCKEYO_SUBSTITUTE equ 0x19004409
DIBUTTON_HOCKEYO_LEFT_LINK equ 0x1900C4E4
DIBUTTON_HOCKEYO_RIGHT_LINK equ 0x1900C4EC
DIBUTTON_HOCKEYO_FORWARD_LINK equ 0x190144E0
DIBUTTON_HOCKEYO_BACK_LINK equ 0x190144E8
DIBUTTON_HOCKEYO_DEVICE equ 0x190044FE
DIBUTTON_HOCKEYO_PAUSE	equ 0x190044FC

DIVIRTUAL_SPORTS_HOCKEY_DEFENSE equ 0x1A000000
DIAXIS_HOCKEYD_LATERAL	equ 0x1A008201
DIAXIS_HOCKEYD_MOVE	equ 0x1A010202
DIBUTTON_HOCKEYD_PLAYER equ 0x1A000401
DIBUTTON_HOCKEYD_STEAL	equ 0x1A000402
DIBUTTON_HOCKEYD_BURST	equ 0x1A000403
DIBUTTON_HOCKEYD_BLOCK	equ 0x1A000404
DIBUTTON_HOCKEYD_FAKE	equ 0x1A000405
DIBUTTON_HOCKEYD_MENU	equ 0x1A0004FD

DIHATSWITCH_HOCKEYD_SCROLL equ 0x1A004601
DIBUTTON_HOCKEYD_ZOOM	equ 0x1A004406
DIBUTTON_HOCKEYD_STRATEGY equ 0x1A004407
DIBUTTON_HOCKEYD_TIMEOUT equ 0x1A004408
DIBUTTON_HOCKEYD_SUBSTITUTE equ 0x1A004409
DIBUTTON_HOCKEYD_LEFT_LINK equ 0x1A00C4E4
DIBUTTON_HOCKEYD_RIGHT_LINK equ 0x1A00C4EC
DIBUTTON_HOCKEYD_FORWARD_LINK equ 0x1A0144E0
DIBUTTON_HOCKEYD_BACK_LINK equ 0x1A0144E8
DIBUTTON_HOCKEYD_DEVICE equ 0x1A0044FE
DIBUTTON_HOCKEYD_PAUSE	equ 0x1A0044FC

DIVIRTUAL_SPORTS_HOCKEY_GOALIE equ 0x1B000000
DIAXIS_HOCKEYG_LATERAL	equ 0x1B008201
DIAXIS_HOCKEYG_MOVE	equ 0x1B010202
DIBUTTON_HOCKEYG_PASS	equ 0x1B000401
DIBUTTON_HOCKEYG_POKE	equ 0x1B000402
DIBUTTON_HOCKEYG_STEAL	equ 0x1B000403
DIBUTTON_HOCKEYG_BLOCK	equ 0x1B000404
DIBUTTON_HOCKEYG_MENU	equ 0x1B0004FD

DIHATSWITCH_HOCKEYG_SCROLL equ 0x1B004601
DIBUTTON_HOCKEYG_ZOOM	equ 0x1B004405
DIBUTTON_HOCKEYG_STRATEGY equ 0x1B004406
DIBUTTON_HOCKEYG_TIMEOUT equ 0x1B004407
DIBUTTON_HOCKEYG_SUBSTITUTE equ 0x1B004408
DIBUTTON_HOCKEYG_LEFT_LINK equ 0x1B00C4E4
DIBUTTON_HOCKEYG_RIGHT_LINK equ 0x1B00C4EC
DIBUTTON_HOCKEYG_FORWARD_LINK equ 0x1B0144E0
DIBUTTON_HOCKEYG_BACK_LINK equ 0x1B0144E8
DIBUTTON_HOCKEYG_DEVICE equ 0x1B0044FE
DIBUTTON_HOCKEYG_PAUSE	equ 0x1B0044FC

DIVIRTUAL_SPORTS_BIKING_MOUNTAIN equ 0x1C000000
DIAXIS_BIKINGM_TURN	equ 0x1C008201
DIAXIS_BIKINGM_PEDAL	equ 0x1C010202
DIBUTTON_BIKINGM_JUMP	equ 0x1C000401
DIBUTTON_BIKINGM_CAMERA equ 0x1C000402
DIBUTTON_BIKINGM_SPECIAL1 equ 0x1C000403
DIBUTTON_BIKINGM_SELECT equ 0x1C000404
DIBUTTON_BIKINGM_SPECIAL2 equ 0x1C000405
DIBUTTON_BIKINGM_MENU	equ 0x1C0004FD

DIHATSWITCH_BIKINGM_SCROLL equ 0x1C004601
DIBUTTON_BIKINGM_ZOOM	equ 0x1C004406
DIAXIS_BIKINGM_BRAKE	equ 0x1C044203
DIBUTTON_BIKINGM_LEFT_LINK equ 0x1C00C4E4
DIBUTTON_BIKINGM_RIGHT_LINK equ 0x1C00C4EC
DIBUTTON_BIKINGM_FASTER_LINK equ 0x1C0144E0
DIBUTTON_BIKINGM_SLOWER_LINK equ 0x1C0144E8
DIBUTTON_BIKINGM_BRAKE_BUTTON_LINK equ 0x1C0444E8
DIBUTTON_BIKINGM_DEVICE equ 0x1C0044FE
DIBUTTON_BIKINGM_PAUSE	equ 0x1C0044FC

DIVIRTUAL_SPORTS_SKIING equ 0x1D000000
DIAXIS_SKIING_TURN	equ 0x1D008201
DIAXIS_SKIING_SPEED	equ 0x1D010202
DIBUTTON_SKIING_JUMP	equ 0x1D000401
DIBUTTON_SKIING_CROUCH	equ 0x1D000402
DIBUTTON_SKIING_CAMERA	equ 0x1D000403
DIBUTTON_SKIING_SPECIAL1 equ 0x1D000404
DIBUTTON_SKIING_SELECT	equ 0x1D000405
DIBUTTON_SKIING_SPECIAL2 equ 0x1D000406
DIBUTTON_SKIING_MENU	equ 0x1D0004FD

DIHATSWITCH_SKIING_GLANCE equ 0x1D004601
DIBUTTON_SKIING_ZOOM	equ 0x1D004407
DIBUTTON_SKIING_LEFT_LINK equ 0x1D00C4E4
DIBUTTON_SKIING_RIGHT_LINK equ 0x1D00C4EC
DIBUTTON_SKIING_FASTER_LINK equ 0x1D0144E0
DIBUTTON_SKIING_SLOWER_LINK equ 0x1D0144E8
DIBUTTON_SKIING_DEVICE	equ 0x1D0044FE
DIBUTTON_SKIING_PAUSE	equ 0x1D0044FC

DIVIRTUAL_SPORTS_SOCCER_OFFENSE equ 0x1E000000
DIAXIS_SOCCERO_LATERAL	equ 0x1E008201
DIAXIS_SOCCERO_MOVE	equ 0x1E010202
DIAXIS_SOCCERO_BEND	equ 0x1E018203
DIBUTTON_SOCCERO_SHOOT	equ 0x1E000401
DIBUTTON_SOCCERO_PASS	equ 0x1E000402
DIBUTTON_SOCCERO_FAKE	equ 0x1E000403
DIBUTTON_SOCCERO_PLAYER equ 0x1E000404
DIBUTTON_SOCCERO_SPECIAL1 equ 0x1E000405
DIBUTTON_SOCCERO_SELECT equ 0x1E000406
DIBUTTON_SOCCERO_MENU	equ 0x1E0004FD

DIHATSWITCH_SOCCERO_GLANCE equ 0x1E004601
DIBUTTON_SOCCERO_SUBSTITUTE equ 0x1E004407
DIBUTTON_SOCCERO_SHOOTLOW equ 0x1E004408
DIBUTTON_SOCCERO_SHOOTHIGH equ 0x1E004409
DIBUTTON_SOCCERO_PASSTHRU equ 0x1E00440A
DIBUTTON_SOCCERO_SPRINT equ 0x1E00440B
DIBUTTON_SOCCERO_CONTROL equ 0x1E00440C
DIBUTTON_SOCCERO_HEAD	equ 0x1E00440D
DIBUTTON_SOCCERO_LEFT_LINK equ 0x1E00C4E4
DIBUTTON_SOCCERO_RIGHT_LINK equ 0x1E00C4EC
DIBUTTON_SOCCERO_FORWARD_LINK equ 0x1E0144E0
DIBUTTON_SOCCERO_BACK_LINK equ 0x1E0144E8
DIBUTTON_SOCCERO_DEVICE equ 0x1E0044FE
DIBUTTON_SOCCERO_PAUSE	equ 0x1E0044FC

DIVIRTUAL_SPORTS_SOCCER_DEFENSE equ 0x1F000000
DIAXIS_SOCCERD_LATERAL	equ 0x1F008201
DIAXIS_SOCCERD_MOVE	equ 0x1F010202
DIBUTTON_SOCCERD_BLOCK	equ 0x1F000401
DIBUTTON_SOCCERD_STEAL	equ 0x1F000402
DIBUTTON_SOCCERD_FAKE	equ 0x1F000403
DIBUTTON_SOCCERD_PLAYER equ 0x1F000404
DIBUTTON_SOCCERD_SPECIAL equ 0x1F000405
DIBUTTON_SOCCERD_SELECT equ 0x1F000406
DIBUTTON_SOCCERD_SLIDE	equ 0x1F000407
DIBUTTON_SOCCERD_MENU	equ 0x1F0004FD

DIHATSWITCH_SOCCERD_GLANCE equ 0x1F004601
DIBUTTON_SOCCERD_FOUL	equ 0x1F004408
DIBUTTON_SOCCERD_HEAD	equ 0x1F004409
DIBUTTON_SOCCERD_CLEAR	equ 0x1F00440A
DIBUTTON_SOCCERD_GOALIECHARGE equ 0x1F00440B
DIBUTTON_SOCCERD_SUBSTITUTE equ 0x1F00440C
DIBUTTON_SOCCERD_LEFT_LINK equ 0x1F00C4E4
DIBUTTON_SOCCERD_RIGHT_LINK equ 0x1F00C4EC
DIBUTTON_SOCCERD_FORWARD_LINK equ 0x1F0144E0
DIBUTTON_SOCCERD_BACK_LINK equ 0x1F0144E8
DIBUTTON_SOCCERD_DEVICE equ 0x1F0044FE
DIBUTTON_SOCCERD_PAUSE	equ 0x1F0044FC

DIVIRTUAL_SPORTS_RACQUET equ 0x20000000
DIAXIS_RACQUET_LATERAL	equ 0x20008201
DIAXIS_RACQUET_MOVE	equ 0x20010202
DIBUTTON_RACQUET_SWING	equ 0x20000401
DIBUTTON_RACQUET_BACKSWING equ 0x20000402
DIBUTTON_RACQUET_SMASH	equ 0x20000403
DIBUTTON_RACQUET_SPECIAL equ 0x20000404
DIBUTTON_RACQUET_SELECT equ 0x20000405
DIBUTTON_RACQUET_MENU	equ 0x200004FD

DIHATSWITCH_RACQUET_GLANCE equ 0x20004601
DIBUTTON_RACQUET_TIMEOUT equ 0x20004406
DIBUTTON_RACQUET_SUBSTITUTE equ 0x20004407
DIBUTTON_RACQUET_LEFT_LINK equ 0x2000C4E4
DIBUTTON_RACQUET_RIGHT_LINK equ 0x2000C4EC
DIBUTTON_RACQUET_FORWARD_LINK equ 0x200144E0
DIBUTTON_RACQUET_BACK_LINK equ 0x200144E8
DIBUTTON_RACQUET_DEVICE equ 0x200044FE
DIBUTTON_RACQUET_PAUSE	equ 0x200044FC

DIVIRTUAL_ARCADE_SIDE2SIDE equ 0x21000000
DIAXIS_ARCADES_LATERAL	equ 0x21008201
DIAXIS_ARCADES_MOVE	equ 0x21010202
DIBUTTON_ARCADES_THROW	equ 0x21000401
DIBUTTON_ARCADES_CARRY	equ 0x21000402
DIBUTTON_ARCADES_ATTACK equ 0x21000403
DIBUTTON_ARCADES_SPECIAL equ 0x21000404
DIBUTTON_ARCADES_SELECT equ 0x21000405
DIBUTTON_ARCADES_MENU	equ 0x210004FD

DIHATSWITCH_ARCADES_VIEW equ 0x21004601
DIBUTTON_ARCADES_LEFT_LINK equ 0x2100C4E4
DIBUTTON_ARCADES_RIGHT_LINK equ 0x2100C4EC
DIBUTTON_ARCADES_FORWARD_LINK equ 0x210144E0
DIBUTTON_ARCADES_BACK_LINK equ 0x210144E8
DIBUTTON_ARCADES_VIEW_UP_LINK equ 0x2107C4E0
DIBUTTON_ARCADES_VIEW_DOWN_LINK equ 0x2107C4E8
DIBUTTON_ARCADES_VIEW_LEFT_LINK equ 0x2107C4E4
DIBUTTON_ARCADES_VIEW_RIGHT_LINK equ 0x2107C4EC
DIBUTTON_ARCADES_DEVICE equ 0x210044FE
DIBUTTON_ARCADES_PAUSE	equ 0x210044FC

DIVIRTUAL_ARCADE_PLATFORM equ 0x22000000
DIAXIS_ARCADEP_LATERAL	equ 0x22008201
DIAXIS_ARCADEP_MOVE	equ 0x22010202
DIBUTTON_ARCADEP_JUMP	equ 0x22000401
DIBUTTON_ARCADEP_FIRE	equ 0x22000402
DIBUTTON_ARCADEP_CROUCH equ 0x22000403
DIBUTTON_ARCADEP_SPECIAL equ 0x22000404
DIBUTTON_ARCADEP_SELECT equ 0x22000405
DIBUTTON_ARCADEP_MENU	equ 0x220004FD

DIHATSWITCH_ARCADEP_VIEW equ 0x22004601
DIBUTTON_ARCADEP_FIRESECONDARY equ 0x22004406
DIBUTTON_ARCADEP_LEFT_LINK equ 0x2200C4E4
DIBUTTON_ARCADEP_RIGHT_LINK equ 0x2200C4EC
DIBUTTON_ARCADEP_FORWARD_LINK equ 0x220144E0
DIBUTTON_ARCADEP_BACK_LINK equ 0x220144E8
DIBUTTON_ARCADEP_VIEW_UP_LINK equ 0x2207C4E0
DIBUTTON_ARCADEP_VIEW_DOWN_LINK equ 0x2207C4E8
DIBUTTON_ARCADEP_VIEW_LEFT_LINK equ 0x2207C4E4
DIBUTTON_ARCADEP_VIEW_RIGHT_LINK equ 0x2207C4EC
DIBUTTON_ARCADEP_DEVICE equ 0x220044FE
DIBUTTON_ARCADEP_PAUSE	equ 0x220044FC

DIVIRTUAL_CAD_2DCONTROL equ 0x23000000
DIAXIS_2DCONTROL_LATERAL equ 0x23008201
DIAXIS_2DCONTROL_MOVE	equ 0x23010202
DIAXIS_2DCONTROL_INOUT	equ 0x23018203
DIBUTTON_2DCONTROL_SELECT equ 0x23000401
DIBUTTON_2DCONTROL_SPECIAL1 equ 0x23000402
DIBUTTON_2DCONTROL_SPECIAL equ 0x23000403
DIBUTTON_2DCONTROL_SPECIAL2 equ 0x23000404
DIBUTTON_2DCONTROL_MENU equ 0x230004FD

DIHATSWITCH_2DCONTROL_HATSWITCH equ 0x23004601
DIAXIS_2DCONTROL_ROTATEZ	equ 0x23024204
DIBUTTON_2DCONTROL_DISPLAY	equ 0x23004405
DIBUTTON_2DCONTROL_DEVICE	equ 0x230044FE
DIBUTTON_2DCONTROL_PAUSE	equ 0x230044FC

DIVIRTUAL_CAD_3DCONTROL		equ 0x24000000
DIAXIS_3DCONTROL_LATERAL	equ 0x24008201
DIAXIS_3DCONTROL_MOVE		equ 0x24010202
DIAXIS_3DCONTROL_INOUT		equ 0x24018203
DIBUTTON_3DCONTROL_SELECT	equ 0x24000401
DIBUTTON_3DCONTROL_SPECIAL1	equ 0x24000402
DIBUTTON_3DCONTROL_SPECIAL	equ 0x24000403
DIBUTTON_3DCONTROL_SPECIAL2	equ 0x24000404
DIBUTTON_3DCONTROL_MENU		equ 0x240004FD

DIHATSWITCH_3DCONTROL_HATSWITCH equ 0x24004601
DIAXIS_3DCONTROL_ROTATEX	equ 0x24034204
DIAXIS_3DCONTROL_ROTATEY	equ 0x2402C205
DIAXIS_3DCONTROL_ROTATEZ	equ 0x24024206
DIBUTTON_3DCONTROL_DISPLAY	equ 0x24004405
DIBUTTON_3DCONTROL_DEVICE	equ 0x240044FE
DIBUTTON_3DCONTROL_PAUSE	equ 0x240044FC

DIVIRTUAL_CAD_FLYBY	equ 0x25000000
DIAXIS_CADF_LATERAL	equ 0x25008201
DIAXIS_CADF_MOVE	equ 0x25010202
DIAXIS_CADF_INOUT	equ 0x25018203
DIBUTTON_CADF_SELECT	equ 0x25000401
DIBUTTON_CADF_SPECIAL1	equ 0x25000402
DIBUTTON_CADF_SPECIAL	equ 0x25000403
DIBUTTON_CADF_SPECIAL2	equ 0x25000404
DIBUTTON_CADF_MENU	equ 0x250004FD

DIHATSWITCH_CADF_HATSWITCH equ 0x25004601
DIAXIS_CADF_ROTATEX	equ 0x25034204
DIAXIS_CADF_ROTATEY	equ 0x2502C205
DIAXIS_CADF_ROTATEZ	equ 0x25024206
DIBUTTON_CADF_DISPLAY	equ 0x25004405
DIBUTTON_CADF_DEVICE	equ 0x250044FE
DIBUTTON_CADF_PAUSE	equ 0x250044FC

DIVIRTUAL_CAD_MODEL	equ 0x26000000
DIAXIS_CADM_LATERAL	equ 0x26008201
DIAXIS_CADM_MOVE	equ 0x26010202
DIAXIS_CADM_INOUT	equ 0x26018203
DIBUTTON_CADM_SELECT	equ 0x26000401
DIBUTTON_CADM_SPECIAL1	equ 0x26000402
DIBUTTON_CADM_SPECIAL	equ 0x26000403
DIBUTTON_CADM_SPECIAL2	equ 0x26000404
DIBUTTON_CADM_MENU	equ 0x260004FD

DIHATSWITCH_CADM_HATSWITCH equ 0x26004601
DIAXIS_CADM_ROTATEX	equ 0x26034204
DIAXIS_CADM_ROTATEY	equ 0x2602C205
DIAXIS_CADM_ROTATEZ	equ 0x26024206
DIBUTTON_CADM_DISPLAY	equ 0x26004405
DIBUTTON_CADM_DEVICE	equ 0x260044FE
DIBUTTON_CADM_PAUSE	equ 0x260044FC

DIVIRTUAL_REMOTE_CONTROL equ 0x27000000
DIAXIS_REMOTE_SLIDER	equ 0x27050201
DIBUTTON_REMOTE_MUTE	equ 0x27000401
DIBUTTON_REMOTE_SELECT	equ 0x27000402
DIBUTTON_REMOTE_PLAY	equ 0x27002403
DIBUTTON_REMOTE_CUE	equ 0x27002404
DIBUTTON_REMOTE_REVIEW	equ 0x27002405
DIBUTTON_REMOTE_CHANGE	equ 0x27002406
DIBUTTON_REMOTE_RECORD	equ 0x27002407
DIBUTTON_REMOTE_MENU	equ 0x270004FD

DIAXIS_REMOTE_SLIDER2	equ 0x27054202
DIBUTTON_REMOTE_TV	equ 0x27005C08
DIBUTTON_REMOTE_CABLE	equ 0x27005C09
DIBUTTON_REMOTE_CD	equ 0x27005C0A
DIBUTTON_REMOTE_VCR	equ 0x27005C0B
DIBUTTON_REMOTE_TUNER	equ 0x27005C0C
DIBUTTON_REMOTE_DVD	equ 0x27005C0D
DIBUTTON_REMOTE_ADJUST	equ 0x27005C0E
DIBUTTON_REMOTE_DIGIT0	equ 0x2700540F
DIBUTTON_REMOTE_DIGIT1	equ 0x27005410
DIBUTTON_REMOTE_DIGIT2	equ 0x27005411
DIBUTTON_REMOTE_DIGIT3	equ 0x27005412
DIBUTTON_REMOTE_DIGIT4	equ 0x27005413
DIBUTTON_REMOTE_DIGIT5	equ 0x27005414
DIBUTTON_REMOTE_DIGIT6	equ 0x27005415
DIBUTTON_REMOTE_DIGIT7	equ 0x27005416
DIBUTTON_REMOTE_DIGIT8	equ 0x27005417
DIBUTTON_REMOTE_DIGIT9	equ 0x27005418
DIBUTTON_REMOTE_DEVICE	equ 0x270044FE
DIBUTTON_REMOTE_PAUSE	equ 0x270044FC

DIVIRTUAL_BROWSER_CONTROL equ 0x28000000
DIAXIS_BROWSER_LATERAL	equ 0x28008201
DIAXIS_BROWSER_MOVE	equ 0x28010202
DIBUTTON_BROWSER_SELECT equ 0x28000401
DIAXIS_BROWSER_VIEW	equ 0x28018203
DIBUTTON_BROWSER_REFRESH equ 0x28000402
DIBUTTON_BROWSER_MENU	equ 0x280004FD

DIBUTTON_BROWSER_SEARCH equ 0x28004403
DIBUTTON_BROWSER_STOP	equ 0x28004404
DIBUTTON_BROWSER_HOME	equ 0x28004405
DIBUTTON_BROWSER_FAVORITES equ 0x28004406
DIBUTTON_BROWSER_NEXT	equ 0x28004407
DIBUTTON_BROWSER_PREVIOUS equ 0x28004408
DIBUTTON_BROWSER_HISTORY equ 0x28004409
DIBUTTON_BROWSER_PRINT	equ 0x2800440A
DIBUTTON_BROWSER_DEVICE equ 0x280044FE
DIBUTTON_BROWSER_PAUSE	equ 0x280044FC

DIVIRTUAL_DRIVING_MECHA equ 0x29000000
DIAXIS_MECHA_STEER	equ 0x29008201
DIAXIS_MECHA_TORSO	equ 0x29010202
DIAXIS_MECHA_ROTATE	equ 0x29020203
DIAXIS_MECHA_THROTTLE	equ 0x29038204
DIBUTTON_MECHA_FIRE	equ 0x29000401
DIBUTTON_MECHA_WEAPONS	equ 0x29000402
DIBUTTON_MECHA_TARGET	equ 0x29000403
DIBUTTON_MECHA_REVERSE	equ 0x29000404
DIBUTTON_MECHA_ZOOM	equ 0x29000405
DIBUTTON_MECHA_JUMP	equ 0x29000406
DIBUTTON_MECHA_MENU	equ 0x290004FD

DIBUTTON_MECHA_CENTER	equ 0x29004407
DIHATSWITCH_MECHA_GLANCE equ 0x29004601
DIBUTTON_MECHA_VIEW	equ 0x29004408
DIBUTTON_MECHA_FIRESECONDARY equ 0x29004409
DIBUTTON_MECHA_LEFT_LINK equ 0x2900C4E4
DIBUTTON_MECHA_RIGHT_LINK equ 0x2900C4EC
DIBUTTON_MECHA_FORWARD_LINK equ 0x290144E0
DIBUTTON_MECHA_BACK_LINK equ 0x290144E8
DIBUTTON_MECHA_ROTATE_LEFT_LINK equ 0x290244E4
DIBUTTON_MECHA_ROTATE_RIGHT_LINK equ 0x290244EC
DIBUTTON_MECHA_FASTER_LINK equ 0x2903C4E0
DIBUTTON_MECHA_SLOWER_LINK equ 0x2903C4E8
DIBUTTON_MECHA_DEVICE	equ 0x290044FE
DIBUTTON_MECHA_PAUSE	equ 0x290044FC

DIAXIS_ANY_X_1		equ 0xFF00C201
DIAXIS_ANY_X_2		equ 0xFF00C202
DIAXIS_ANY_Y_1		equ 0xFF014201
DIAXIS_ANY_Y_2		equ 0xFF014202
DIAXIS_ANY_Z_1		equ 0xFF01C201
DIAXIS_ANY_Z_2		equ 0xFF01C202
DIAXIS_ANY_R_1		equ 0xFF024201
DIAXIS_ANY_R_2		equ 0xFF024202
DIAXIS_ANY_U_1		equ 0xFF02C201
DIAXIS_ANY_U_2		equ 0xFF02C202
DIAXIS_ANY_V_1		equ 0xFF034201
DIAXIS_ANY_V_2		equ 0xFF034202
DIAXIS_ANY_A_1		equ 0xFF03C201
DIAXIS_ANY_A_2		equ 0xFF03C202
DIAXIS_ANY_B_1		equ 0xFF044201
DIAXIS_ANY_B_2		equ 0xFF044202
DIAXIS_ANY_C_1		equ 0xFF04C201
DIAXIS_ANY_C_2		equ 0xFF04C202
DIAXIS_ANY_S_1		equ 0xFF054201
DIAXIS_ANY_S_2		equ 0xFF054202

DIAXIS_ANY_1		equ 0xFF004201
DIAXIS_ANY_2		equ 0xFF004202
DIAXIS_ANY_3		equ 0xFF004203
DIAXIS_ANY_4		equ 0xFF004204

DIPOV_ANY_1		equ 0xFF004601
DIPOV_ANY_2		equ 0xFF004602
DIPOV_ANY_3		equ 0xFF004603
DIPOV_ANY_4		equ 0xFF004604

DIBUTTON_ANY macro instance
	exitm<( 0xFF004400 OR instance )>
	endm

endif

ifdef _INC_MMSYSTEM
ifndef MMNOJOY

ifndef __VJOYDX_INCLUDED__
__VJOYDX_INCLUDED__ equ 1
JOY_PASSDRIVERDATA	equ 0x10000000

joyConfigChanged proto WINAPI :DWORD

ifndef DIJ_RINGZERO
ShowJoyCPL proto WINAPI :HWND
CALLBACK(LPFNSHOWJOYCPL, :HWND)
endif

JOY_HWS_ISHEADTRACKER	equ 0x02000000
JOY_HWS_ISGAMEPORTDRIVER equ 0x04000000
JOY_HWS_ISANALOGPORTDRIVER equ 0x08000000
JOY_HWS_AUTOLOAD	equ 0x10000000
JOY_HWS_NODEVNODE	equ 0x20000000
JOY_HWS_ISGAMEPORTBUS	equ 0x80000000
JOY_HWS_GAMEPORTBUSBUSY equ 0x00000001
JOY_US_VOLATILE		equ 0x00000008

endif ;; __VJOYDX_INCLUDED__
endif ;; MMNOJOY

endif

ifndef DIJ_RINGZERO
 ifdef _INC_MMDDK
  ifndef MMNOJOYDEV
   ifndef __VJOYDXD_INCLUDED__
    __VJOYDXD_INCLUDED__ equ 1
    JOY_OEMPOLL_PASSDRIVERDATA equ 7
   endif
  endif
 endif
endif

.pragma list(pop)
