Sep 302012
 

BMS DirectX Button Handling

BMS can handle up to 16 DX devices with 32 buttons each, making a total input of 512 DX buttons possible. To assign DX input, a special type of input line within the BMS keyfile is used e.g.:

SimTriggerFirstDetent 0 -1 -2 0 0x0 0
SimPickle 1 -1 -2 0 0x0 0

 

The red part of the input lines does never change for DX button definitions and will not be explained here. The green part of the input lines is composed from the name of the function to call and the DX button number that should trigger the execution of the function.

BMS starts enumerating the buttons with 0, so the first DX device connected to the PC uses button numbers 0 to 31, where button #1 on the stick is mapped to 0 in the keyfile, button #2 is mapped to 1 etc. If more than one DX device is connected, the 2nd device will use button numbers 32 to 63, where button #1 on the 2nd device is mapped to 32, button #2 is mapped to 33 etc.

Every DX device has its dedicated 32 button range in the keyfile, so a possible 16th DX device would use button range 480 to 511. Using this technique, BMS can distinguish between the different DX devices.

Editing the key file

CAUTION:  The key file provided is logically organised using unique text formatting that does not play well with the Falcon UI.  DO NOT try and edit the key file via the UI as it will scramble the keyfile into a disorganised and possibly malfunctioning state.  The keyfile should ALWAYS and ONLY be edited in a text editor, to preserve its unique formatting.

Open the BMS_DirectX.key file in a text editor and scroll down to the section “DirectX” at about line 943.  This section assigns the appropriate bms callbacks to the various hats and buttons on your HOTAS.  Note the sub-heading “HOTAS UNSHIFTED” , these are the defined actions that will occur if the pinky switch is NOT held.  If you wish to change any “unshifted” behaviour of your HOTAS then simply copy the callback name eg “SimPickle” from the list of all available callbacks at the top of this file and paste it over the corresponding dx position in this section.

#===============================================================================================
SimDoNothing -1 0 0XFFFFFFFF 0 0 0 -2 ”                              DirectX”
#===============================================================================================
SimDoNothing -1 0 0XFFFFFFFF 0 0 0 -2 “=========  HOTAS UNSHIFTED  =========”
SimTriggerFirstDetent 0 -1 -2 0 0x0 0         “First Trigger Detent”
SimPickle 1 -1 -2 0 0x0 0                     “Pickle Weapon”
SimHotasPinkyShift 2 -1 -2 0 0x0 0            “Pinky”
SimAPOverride 3 -1 -2 0 0x0 0                 “Autopilot Override”
SimMissileStep 4 -1 -2 0 0x0 0                “NWS – Step Missile”
SimTriggerSecondDetent 5 -1 -2 0 0x0 0        “Second Trigger Detent”
SimTMSUp 6 -1 -2 0 0x0 0
SimTMSRight 7 -1 -2 0 0x0 0
SimTMSDown 8 -1 -2 0 0x0 0
SimTMSLeft 9 -1 -2 0 0x0 0
SimDMSUp 10 -1 -2 0 0x0 0
SimDMSRight 11 -1 -2 0 0x0 0
SimDMSDown 12 -1 -2 0 0x0 0
SimDMSLeft 13 -1 -2 0 0x0 0
SimCMSUp 14 -1 -2 0 0x0 0
SimCMSRight 15 -1 -2 0 0x0 0
SimCMSDown 16 -1 -2 0 0x0 0
SimCmsLeft 17 -1 -2 0 0x0 0
SimCursorEnable 18 -1 -2 0 0x0 0
SimTransmitCom2 19 -1 -2 0 0x0 0
SimTransmitCom1 20 -1 -2 0 0x0 0
SimCommsSwitchRight 21 -1 -2 0 0x0 0
SimCommsSwitchLeft 22 -1 -2 0 0x0 0
SimToggleMissileCage 23 -1 -2 0 0x0 0
SimSelectSRMOverride 24 -1 -2 0 0x0 0
SimSelectMRMOverride 25 -1 -2 0 0x0 0
AFBrakesOut 26 -1 -2 0 0x0 0
AFBrakesIn 27 -1 -2 0 0x0 0

 

If you want to edit the “shifted” behaviour of any of your buttons then scroll down further to this section and copy/paste whatever callback action you desire, replacing only the green component of the line.

#===============================================================================================
SimDoNothing -1 0 0XFFFFFFFF 0 0 0 -2 “==========  HOTAS SHIFTED  ==========”
SimWheelBrakes 256 -1 -2 0 0x0 0                “First trigger – apply wheelbrakes”
OTWTrackTargetToWeapon 257 -1 -2 0 0x0 0        “Pickle – Track weapon to target”
SimHotasPinkyShift 258 -1 -2 0 0x0 0            “Pinky”
SimAPOverride 259 -1 -2 0 0x0 0                 “HOTAS-AP Override”
SimFuelDoorToggle 260 -1 -2 0 0x0 0             “NWS – Toggles Refuel Door”
SimParkingBrakeToggle 261 -1 -2 0 0x0 0         “Second trigger – apply park brake”
OTWSelectF3PadlockModeAA 262 -1 -2 0 0x0 0      “TMS Up AA – padlock mode”
OTWStepNextPadlock 263 -1 -2 0 0x0 0            “TMS Right – padlock next”
OTWSelectF3PadlockModeAG 264 -1 -2 0 0x0 0      “TMS Down – AG padlock mode”
OTWStepPrevPadlock 265 -1 -2 0 0x0 0            “TMS Left – padlock previous”
OTWSelect2DCockpitMode 266 -1 -2 0 0x0 0        “DMS Up – 2D Cockpit”
ToggleNVGMode 267 -1 -2 0 0x0 0                 “DMS Right – NVG”
OTWSelect3DCockpitMode 268 -1 -2 0 0x0 0        “DMS Down – 3D cockpit”
RecenterTrackIR 269 -1 -2 0 0x0 0               “DMS Left – Centre TrackIR”
SimEWSProgOne 270 -1 -2 0 0x0 0                 “CMS Up – Switch to EWS program 1”
SimEWSProgTwo 271 -1 -2 0 0x0 0                 “CMS Up – Switch to EWS program 2”
SimEWSProgThree 272 -1 -2 0 0x0 0               “CMS Up – Switch to EWS program 3”    
SimEWSProgFour 273 -1 -2 0 0x0 0                “CMS Up – Switch to EWS program 4”
SimEmergencyJettison 274 -1 -2 0 0x0 0          “Radar Cursor Enable – Emergency Jettison
SimTransmitCom2 275 -1 -2 0 0x0 0               “TX VHF”
SimTransmitCom1 276 -1 -2 0 0x0 0               “TX UHF”
AWACSRequestPicture 277 -1 -2 0 0x0 0           “AWACS Request Picture
AWACSDeclare 278 -1 -2 0 0x0 0                  “AWACS Declare”
SimDoNothing 279 -1 -2 0 0x0 0                  “Do nothing because foxy will send keystrokes”
AFElevatorTrimUp 2 -1 -3 0 0x0 0                “Trim Up”
AFAileronTrimRight 2 -1 -3 2 0x0 0              “Trim Right”
AFElevatorTrimDown 2 -1 -3 4 0x0 0              “Trim Down”
AFAileronTrimLeft 2 -1 -3 6 0x0 0               “Trim Left”
#===============================================================================================

When you are done editing, save the file back into your C:\Program Files\Falcon BMS 4.32\User\Config folder.  Start Falcon BMS, go to the Setup Controllers screen, and make sure that Thrustmaster HOTAS Cougar is selected as main controller. Next, load the BMS_DirectX.key file and click Apply.

Note that you can only check the Unshifted DX assignments in the UI, for shifted DX assignments you will have to check them in the pit, flying.

Thats it, if you have any questions or special requests, your comments are welcome.

  One Response to “HOTAS Programming with DirectX”

  1. Reference Material
    DirectX-Shifting-Facility
    Further reading on whats new in BMS is available in the
    C:\Program Files\Falcon BMS 4.32\Docs\Falcon BMS Manuals\BMS-Manual.pdf