DX hat shifting overlap?
-
I’m working on an x52 profile for a friend. Using DX, shifting so he can effectively double hat switch functionality. My question is, with the DX shift magnitude for hats fixed at 2, and the x52 having 3 hats, assuming I bound controls for all six ‘virtual’ hats, wouldnt the DX id numbers for the hats overlap and cause issues? Im not sure if I’m understanding it right.
Hats are numbered 0, 1, 2 in bms keyfile for physical hats 1, 2, and 3
Shifted (+2) that would make them 2, 3, 4 in the keyfile.
Would that cause issues with callbacks bound to the unshifted #2 hat being overridden by callbacks bound to the #0 shifted (‘virtual’ #2) hat?
You cant change the Shift magnitude for hats so how do you solve this?Hope this makes sense.
-
Doesn’t sound quite right to me. Isn’t the shift magnitude 256?
For example, on my X52 Pro (which has a slightly different button numbering than the X52, but the idea is the same):
[b]POV Hat #1 Unshifted .... then Shifted:[/b] SimTMSUp 19 -1 -2 0 0x0 0 SimTMSRight 20 -1 -2 0 0x0 0 SimTMSDown 21 -1 -2 0 0x0 0 SimTMSLeft 22 -1 -2 0 0x0 0 SimCMSUp 275 -1 -2 0 0x0 0 SimCMSRight 276 -1 -2 0 0x0 0 SimCMSDown 277 -1 -2 0 0x0 0 SimCMSLeft 278 -1 -2 0 0x0 0 [b]POV Hat #2 Unshifted .... then Shifted:[/b] SimDMSUp [b]0[/b] -1 -3 0 0x0 0 SimDoNothing [b]0[/b] -1 -3 1 0x0 0 SimDMSRight [b]0[/b] -1 -3 2 0x0 0 SimDoNothing [b]0[/b] -1 -3 3 0x0 0 SimDMSDown [b]0[/b] -1 -3 4 0x0 0 SimDoNothing [b]0[/b] -1 -3 5 0x0 0 SimDMSLeft [b]0[/b] -1 -3 6 0x0 0 SimDoNothing [b]0[/b] -1 -3 7 0x0 0 AFElevatorTrimUp [b]2[/b] -1 -3 0 0x0 0 SimDoNothing [b]2[/b] -1 -3 1 0x0 0 AFAileronTrimRight [b]2[/b] -1 -3 2 0x0 0 SimDoNothing [b]2[/b] -1 -3 3 0x0 0 AFElevatorTrimDown [b]2[/b] -1 -3 4 0x0 0 SimDoNothing [b]2[/b] -1 -3 5 0x0 0 AFAileronTrimLeft [b]2[/b] -1 -3 6 0x0 0 SimDoNothing [b]2[/b] -1 -3 7 0x0 0 [b]Throttle Hat Unshifted .... then Shifted:[/b] SimTransmitCom1 23 -1 -2 0 0x0 0 SimCommsSwitchRight 24 -1 -2 0 0x0 0 SimTransmitCom2 25 -1 -2 0 0x0 0 SimCommsSwitchLeft 26 -1 -2 0 0x0 0 SimRadarBarScanChange 279 -1 -2 0 0x0 0 SimRadarAzimuthScanChange 280 -1 -2 0 0x0 0 SimRadarBarScanChange 281 -1 -2 0 0x0 0 SimRadarAzimuthScanChange 282 -1 -2 0 0x0 0
-
as far as the DX button shifting article is concerned, it says that BMS supports up to 4 hat switches on a device, and for shifting, the shift magnitude is fixed at 2. if the hats arent registering with BMS as hats, and just a set of dx buttons, then what you are saying would work, but if they are hats i think the shift is limited to +2. Ill have to get my friend to see if the hats are showing up as POV hats in game or just dx buttons.
-
Only 1 shows as a POV hat in BMS (again X52 Pro …. but I think X52, which I had before, as well). It’s the one in the middle above … with the extra ‘do nothing’ lines. Those blank out the up-right, up-left, down-right and down-left POV inputs.
I can assure you that the BMS ‘POV Hat’ CAN act as just regular DX ‘buttons’ … as shown above.
Edit,
Also, I think more to your point, it looks like BMS does differentiate between ‘hat numbering’ and ‘button numbering’. Notice the hat in question above IS id’d as ‘0’ unshifted and ‘2’ shifted (highlighted above).
However, I also have ‘buttons’ number ‘0’ and number ‘2’ … like so:
SimWheelBrakes 0 -1 -2 0 0x0 0
SimPickle 1 -1 -2 0 0x0 0
SimMissileStep 2 -1 -2 0 0x0 0There is no conflict.
-
cool. Wasnt realizing that the other hats were registering as buttons. that simplifies everything. Just need to find the dx button callout numbers for the hats now.
-
cool. Wasnt realizing that the other hats were registering as buttons. that simplifies everything. Just need to find the dx button callout numbers for the hats now.
Edit …. nm. Good luck.
They may register/show in the BMS setup screen as you press/move the hats.
-
Yep. as i dont have the joystick in front of me ill have to get in touch with my friend and have him read out the dx numbers. Thanks again
-
There is only one POV hat per DirectInput device. Joystick manufacturers may market their devices as having 2+ hats but it isn’t true. Subsequent hats are just collections of DX buttons in the disguise of a hat. The DirectInput limit is 1 POV, 32 buttons, and 8 axes.
BMS has a further limitation in that it will only recognize the POV inputs from the primary controller (selected in the drop down menu) which also must be the pitch and roll axis controller. It is not possible to use POV inputs from two different devices.
The POV device IDs are used in +256 type shifting by elevating the POV controller ID by 2. There is no conflict possible because only ID 0 is available normally. ID 2 is a virtual elevation of ID 0’s POV inputs. All POV inputs from controllers other than the primary are always ignored.
Please read
https://www.benchmarksims.org/forum/content.php?153-DirectX-Shifting-Facility