|
Post by virtual on Aug 3, 2017 16:46:59 GMT
I have some question about vJoy SDK:
What axis value range? Can user change it? ReadMe.pdf: 0x1-0x8000 (1-32768); But values of functions "GetVJDAxisMin" and "GetVJDAxisMax" (for some unknow reasons don't included in ReadMe.pdf): 0x0-7FFF (0-32767); I tried send to vJoy various values (0,1,32767,65535) and get next: vJoy Monitor and joy.cpl don't see values more that ~32768 (only visual) but joy.cpl in "Calibration" mode it see all values.
|
|
|
Post by Shaul (Admin) on Aug 5, 2017 7:41:25 GMT
I think that the correct value is 1-0x8000 but I may be wrong.
|
|
evilc
New Member
Posts: 32
|
Post by evilc on Aug 5, 2017 12:51:05 GMT
Real sticks report 2 to the power n ranges, starting at 0, depending on their accuracy.
eg 0..255, 0..16383, 0..32767
DI then converts this as part of the calibration process to 16-bit 0..65535
So if vJoy uses 15-bit, it should use 0..32767 I would consider using 1..32768 "wrong" insofar as it is a 15-bit number + 1, so it pointlessly uses 16 bits for only 15 bits of data.
However, the best-case scenario would be for vJoy to use 16-bit values, so that it uses the full range available to DirectInput devices.
|
|
|
Post by virtual on Aug 6, 2017 16:56:31 GMT
|
|
evilc
New Member
Posts: 32
|
Post by evilc on Aug 7, 2017 9:07:42 GMT
In DirectInput, all sticks report as Uint16 (0...65535) with the mid-point being 32767
In RawInput, each stick will report it's native (pre-calibration) values, which can be different for each axis (eg on a T.16000M stick, X&Y report as 15-bit, while twist reports as 8-bit)
|
|
|
Post by virtual on Aug 10, 2017 16:10:33 GMT
I tested axis Z on several values: - SetAxis(-10): joy.cpl in "calibration" mode showed 0% (-10), direct input showed 0. - SetAxis(0): joy.cpl in "calibration" mode showed 0% (0), direct input showed 0. - SetAxis(1): joy.cpl in "calibration" mode showed 0% (1), direct input showed 2. - SetAxis(16383): joy.cpl in "calibration" mode showed 49% (16383), direct input showed 32765. - SetAxis(16384): joy.cpl in "calibration" mode showed 50% (16384), direct input showed 32767. - SetAxis(32767): joy.cpl in "calibration" mode showed 100% (32767), direct input showed 65535. - SetAxis(32768): joy.cpl in "calibration" mode showed 100% (32768), direct input showed 65535.
Thus, vJoy axis range is 0x0...0x7FFF (0...32767), 50% = 0x4000 (16384).
|
|