Current Versions:
XD-Profile - 1.01 (supporting Dhauzimmer X362.105 [a and b])
PD-Profile - 1.01 (supporting Dhauzimmer P8K1.100)

.XDP PROFILES

.xdp profile files are the text-based scripts that XD-PRofile uses to generate a .bpf file (the binary file used by Dhauzimmer's drivers to actually program the X-36/45). A .xdp profile can be either written by hand or generated by using the "File -> Save (As)" command in XD-Profile. By default, XD-Profile assigns a .xdp extension to files it saves. These are in-fact text files and can be opened for editing in Notepad.

This page describes both the expected format of a .xdp file, and a detailed listing of all the keywords recognized by the script interpreter to generate keystrokes, mouse movement or buttons, DirectX buttons, etc.


.xdp File Format:
If you are interested in writing your own .xdp files you will need to know the information presented in this section. Throughout this section words shown in italics indicate identifiers that you the profile author will change. Note that .xdp profiles are case sensitive.

First note that the .bpf converter in XD-Profile ignores all blank lines, and lines where the first non-whitespace character is a '#' (pound) character.

Each .xdp file has an expected order of keywords that MUST exist in the file. This includes four sections, marked by (and listed here in order) "<HEADER>", "<SCRIPTLIST>", "<AXIS_CHAINS>", and "<PROGRAM_MODES>".

HEADER
The HEADER section defines default settings for the remainder of the profile. Here you can set the default timing delays for either the press or release script events. The following assignments are recognized in this section in the following format:
		DEFAULT_PRESS_DELAY=xx
		DEFAULT_PRESS_DELAY=xx

xx can be any integer value between 1 and 2^32. The DEFAULT_PRESS_DELAY sets the default delay between all keyboard/directX/mouse-button presses and the previous event. The DEFAULT_RELEASE_DELAY sets the default delay between all keyboard/directX/mouse-button releases and the previous event. Note that due to the way the drivers handle events, if events are timed too closely the order in which they are processed may get jumbled, and some may even be skipped altogether. If you are experiencing problems with your profile try increasing the delays to above 100 ms and see if the problem is alleviated.

E.g. The following HEADER content and script entry (see below) for "cmd1" will result in the "a" key being pressed 200 ms after the button it is assigned to is pressed, held for 800 ms, the "b" key being pressed 200 ms later, and then released after 500 ms.

		<HEADER>
		DEFAULT_PRESS_DELAY=200
		DEFAULT_PRESS_DELAY=800
		
		<SCRIPTLIST>
		cmd1 a A b B^500

SCRIPTLIST
The SCRIPTLIST section provides an area for all your scripts to be identified. Scripts are combinations of commands that will later be assigned to certain frobbables on the X-36/45. They can also be assigned as the increasing or decreasing frobbable on breakpoints that compose the Axis Chains (see the AXIS_CHAINS section below).

Scripts take the format "scriptname (event list)", where scriptname is any original alphanumeric name that does not include any of [](){}<>#=^+-, including (space). (event list) is a list of keywords that the script interpreter recognizes. Note that an empty event list is legal. All of the recognized keywords are listed in table 1 below. For each keyword in the event list you may add a suffix in the form "^xx where xx is a number between 0 and 2^32. The suffix number represents the delay in ms between the previous event and the event the suffix is attached to. If no suffix is entered, or a zero suffix is attached, the default delays set in the HEADER section are used.

In addition to the event keywords in table 1, there is also an event keyword to load a new mode. This event has the syntax "LOADMODE_modename" where modename is the name you have given to one of the modes (see the <PROGRAM_MODES> section below.

E.g. The following creates a script entry called "cmd1" that generates a press of the "a" key, 500 ms later a release of the "a" key, then loads "mode1", and finally 500 ms later loads the DEFAULT mode.

		cmd1 a A^500 LOADMODE_mode1 LOADMODE_DEFAULT^500

As of version 0.95, the following keywords were added to control the speed of the mouse cursor in the x/y axis.

		MOUSELEFT_xx, MOUSERIGHT_xx, MOUSEUP_xx, MOUSEDOWN_xx
		xx is an integer representing the speed in pixels the cursor will move each time Windows polls the mouse.
		Values between 0 and 20 are recommended.

An expected setup of a Hat to control the mouse would look like the following:

		<SCRIPTLIST>
		mousedown MOUSEDOWN_5
		mouseleft MOUSELEFT_5
		mouseright MOUSERIGHT_5
		mousestop MOUSERIGHT_0 MOUSEUP_0
		mouseup MOUSEUP_5


		<PROGRAM_MODES>
		[DEFAULT]
		HatUpPress = mouseup
		HatRightPress = mouseright
		HatDownPress = mousedown
		HatLeftPress = mouseleft
		HatCenterPress = mousestop
		{DEFAULT}

The .bpf converter will continue to read scripts until the AXIS_CHAINS section is found.

Table 1: Script Interpreter Recognized Keywords
KEY
PRESS KEYWORD
RELEASE KEYWORD
characters 'a' .. 'z'
a .. z A .. Z
numbers '0' .. '9'
0 .. 9 _0 .. _9
function keys 'f1' .. 'f12'
f1 .. f12 F1 .. F12
Return
return RETURN
Escape
escape ESCAPE
Backspace
backspace BACKSPACE
Tab
tab TAB
Space
space SPACE
'+' character
plus PLUS
'-' character
minus MINUS
'[ character'
lbracket LBRACKET
']' character
rbracket RBRACKET
'\' character
backslash BACKSLASH
';' character
semicolon SEMICOLON
''' (apostrophe) character
apostrophe APOSTROPHE
'~' (tilde) character
tilde TILDE
',' character
comma COMMA
'.' character
period PERIOD
'/' character
forwardslash FORWARDSLASH
Caps Lock
capslock CAPSLOCK
Print Screen
printscreen PRINTSCREEN
Scroll Lock
scrolllock SCROLLLOCK
Pause
pause PAUSE
Insert
insert INSERT
Home
home HOME
Page Up
pageup PAGEUP
Delete
delete DELETE
End
end END
Page Down
pagedown PAGEDOWN
Right Arrow
rightarrow RIGHTARROW
Left Arrow
leftarrow LEFTARROW
Down Arrow
downarrow DOWNARROW
Up Arrow
uparrow UPARROW
Keypad Num Lock
kp_numlock KP_NUMLOCK
Keypad '/'
kp_forwardslash KP_FORWARDSLASH
Keypad '*'
kp_asterisk KP_ASTERISK
Keypad '-'
kp_minus KP_MINUS
Keypad '+'
kp_plus KP_PLUS
Keypad Enter
kp_enter KP_ENTER
Keypad '0' .. '9'
kp_0 .. kp_9 KP_0 .. KP_9
Keypad Period
kp_period KP_PERIOD
Left Control
lcontrol or control LCONTROL or CONTROL
Left Shift
lshift or shift LSHIFT or SHIFT
Left Alt
lalt or alt LALT or ALT
Right Control
rcontrol RCONTROL
Right Shift
rshift RSHIFT
Right Alt
ralt RALT
DirectX Button 1 .. 64
dx_1 .. dx_64 DX_1 .. DX_64
Left Mouse Button
mouse1 MOUSE1
Right Mouse Button
mouse2 MOUSE2
Middle Mouse Button
mouse3 MOUSE3
Windows Hat Center
hat_center n/a
Windows Hat Up
hat_up n/a
Windows Hat Up-Right
hat_upright n/a
Windows Hat Right
hat_right n/a
Windows Hat Down-Right
hat_downright n/a
Windows Hat Down
hat_down n/a
Windows Hat Down-Left
hat_downleft n/a
Windows Hat Left
hat_left n/a
Windows Hat Up-Left
hat_upleft n/a

AXIS_CHAINS
The AXIS_CHAINS section lists the constructed chains, each with a listing of the breakpoints that compose that chain. A chain is simply a collection of breakpoints. Breakpoints are locations on an axis at which you want frobbables issued. Note that breakpoints cause new frobbables to be created at run-time and will be issued depending on whether the axis was decreasing or increasing through the breakpoint location.

Each chain you identify is marked by a "[chainname]" tag, where chainname is any original alphanumeric name that does not include any of [](){}<>#=^, including (space). After identifying a chain, you identify the breakpoints for the chain using a breakpoint list. Breakpoint lists take the format "(startrange : stoprange ; count) (+ inccmd - deccmd). Note the parentheses, colon, semi-colon, plus, and minus symbol that segregate the identifiers. The meanings and valid values of each identifier are listed below.

  • startrange: numerical value between -32767 and +32767 and less than stroprange indicating the minimum axis value at which a breakpoint will be set. -32767 represents the minimum axis location, +32767 represents the maximum axis location, and 0 indicates the center axis location. Due to the way Saitek wired their hardware, the minimum and maximum positions of each axis are not necessarily intuitive. See table 2 below.
  • stoprange: numerical value between -32767 and +32767 and greater than startrange indicating the maximum axis value at which a breakpoint will be set. -32767 represents the minimum axis location, +32767 represents the maximum axis location, and 0 indicates the center axis location. Due to the way Saitek wired their hardware, the minimum and maximum positions of each axis are not necessarily intuitive. See table 2 below.
  • count: numerical value between 0 and 255 indicating the number of breakpoints that will be distributed between startrange and stoprange. Breakpoints are distributed by setting the first one at startrange, and spacing the others evenly up to a position less than or equal to stoprange (very close to stoprange but there may will likely be a remainder in the division such that the last breakpoint is not exactly at stoprange.
  • inccmd: alphanumeric value that matches one of the scriptname entries listed in the SCRIPTLIST section of the profile. This script is assigned to all breakpoints triggered while increasing.
  • deccmd: alphanumeric value that matches one of the scriptname entries listed in the SCRIPTLIST section of the profile. This script is assigned to all breakpoints triggered while decreasing.

Table 2: Axis Minimum and Maximum Locations
AXIS
MINIMUM
MAXIMUM
X Axis
full left deflection
full right deflection
Y Axis
full forward deflection
full backward deflection
X Axis
full left deflection
full right deflection
Throttle Axis (Z)
full forward
full back
Rudder Axis (R)
full left deflection
full right deflection
Rotary 1 Axis (R1)
top-side rolled full left
top-side rolled full right
Rotary 2 Axis (R2)
top-side rolled full left
top-side rolled full right

A chain may be constructed of up to 255 breakpoints. Breakpoint lists are continuously read until the end of the chain is marked by "{chainname}".

E.g. The following establishes a chain that issues 20 "cmd1" scripts equally spaced when increasing above zero, and 10 "cmd2" scripts equally spaced when decreasing below zero.

		[chain1]
		(0 : 32767 ; 20) (+cmd1 -)
		(-32767 : 0 ; 10) (+ -cmd2)
		{chain1}

The .bpf converter will continue to read chains until the PROGRAM_MODES section is found.

PROGRAM_MODES
The PROGRAM_MODES section lists each mode and the frobbables or axis that have script or chain assignments. Each mode you identify is marked by a "[modename]" tage, where modename is any original alphanumeric name that does not include any of [](){}<>#=^, including (space). There is a special mode identifier with the name DEFAULT. The DEFAULT mode is the mode that is loaded into the X-36/45 when the profile is loaded. All other modes must be loaded using a script containing the appropriate LOADMODE_ event as described in the SCRIPTLIST section above. Note that each mode of your profile should have at least one script with a LOADMODE_ event to allow you to transfer to another mode.

After identifying a mode, you identify frobbable and axis assignments using the syntax "frobbable = scriptname" or "axis = chainname", where frobbable is any one of the pre-defined frobbables listed in table 3 below, scriptname is any one of the script names identified in the SCRIPTLIST section, axis is any one of the pre-defined axis names listed in table 4 below, and chainname is any one of the chain names identified in the AXIS_CHAINS section.

E.g. The following issues "cmd1" when the trigger is pressed, "cmd2" when the trigger is released, and assigns "chain1" to the rudder axis.

		TriggerPress = cmd1
		TriggerRelease = cmd2
		RAxis = chain1

It is important to note that for frobbables that are not listed in a mode, their assignment status does not change when modes change. If TriggerPress was assigned to "cmd1" in the default mode, and then mode 2 was loaded which did NOT include an entry for TriggerPress, TriggerPress would still issue "cmd1" in mode 2. Herein lies the importance of using a NULL command entry if you want a frobbable to issue a script in one mode, but do nothing in another. A NULL command is simply a script containing an empty event list which is then assigned to the frobbables that should do nothing. The same can be created for chains. An equivalent NULL chain is a chain without breakpoints.

The end of each mode and it's assignments is marked by "{modename}". The .bpf converter will continue to read modes until the end-of-file is found.

Table 3: Pre-Defined Frobbables
TriggerPress TriggerRelease
LaunchPress LaunchRelease
FireAPress FireARelease
FireBPress FireBRelease
FireCPress FireCRelease
FireDPress FireDRelease
ShiftPress ShiftRelease
MouseButtonPress MouseButtonRelease
Mode1Press Mode1Release
Mode2Press Mode2Release
Mode3Press Mode3Release
Aux1Press Aux1Release
Aux2Press Aux2Release
Aux3Press Aux3Release
StickHat1CenterPress StickHat1CenterRelease
StickHat1UpPress StickHat1UpRelease
StickHat1UpRightPress StickHat1UpRightRelease
StickHat1RightPress StickHat1RightRelease
StickHat1DownRightPress StickHat1DownRightRelease
StickHat1DownPress StickHat1DownRelease
StickHat1DownLeftPress StickHat1DownLeftRelease
StickHat1LeftPress StickHat1LeftRelease
StickHat1UpLeftPress StickHat1UpLeftRelease
StickHat2CenterPress StickHat2CenterRelease
StickHat2UpPress StickHat2UpRelease
StickHat2UpRightPress StickHat2UpRightRelease
StickHat2RightPress StickHat2RightRelease
StickHat2DownRightPress StickHat2DownRightRelease
StickHat2DownPress StickHat2DownRelease
StickHat2DownLeftPress StickHat2DownLeftRelease
StickHat2LeftPress StickHat2LeftRelease
StickHat2UpLeftPress StickHat2UpLeftPress
ThrottleHat1CenterPress ThrottleHat1CenterRelease
ThrottleHat1UpPress ThrottleHat1UpRelease
ThrottleHat1UpRightPress ThrottleHat1UpRightRelease
ThrottleHat1RightPress ThrottleHat1RightRelease
ThrottleHat1DownRightPress ThrottleHat1DownRightRelease
ThrottleHat1DownPress ThrottleHat1DownRelease
ThrottleHat1DownLeftPress ThrottleHat1DownLeftRelease
ThrottleHat1LeftPress ThrottleHat1LeftRelease
ThrottleHat1UpLeftPress ThrottleHat1UpLeftRelease
MouseHatCenterPress MouseHatCenterRelease
MouseHatUpPress MouseHatUpRelease
MouseHatUpRightPress MouseHatUpRightRelease
MouseHatRightPress MouseHatRightRelease
MouseHatDownRightPress MouseHatDownRightRelease
MouseHatDownPress MouseHatDownRelease
MouseHatDownLeftPress MouseHatDownLeftRelease
MouseHatLeftPress MouseHatLeftRelease
MouseHatUpLeftPress MouseHatUpLeftRelease

Table 4: Pre-Defined Axis Names
XAxis
YAxis
ZAxis
RAxis
R1Axis
R2Axis



XD-Profile, PD-Profile, and http://XDProfile.freebirdsWing.org are authored by Mike "Mitch" Houghton, Copyright 2002