#3126128 - 10/29/10 03:50 AM
T.A.R.G.E.T. multiple devices and non-TM devices support
|
Joined: Oct 2010
Posts: 54
Feed
Junior Member
|
Junior Member
Joined: Oct 2010
Posts: 54
|
I have 2 MFD packs (4 devices), and TARGET refused to install with them connected. TARGET also only recognizes and allows configuration of the first pack (first 2 MFDs).
Last edited by Joe; 11/04/10 03:37 PM.
|
|
#3128055 - 11/01/10 02:40 PM
Re: T.A.R.G.E.T. multiple devices and non-TM devices support
[Re: Feed]
|
Joined: Oct 2010
Posts: 83
Nicu
Junior Member
|
Junior Member
Joined: Oct 2010
Posts: 83
|
There is a script sample which uses 2 T16000 and maps both of them over the mouse cursor. You need to define the second one by yourself (the first one is automatically defined by TARGET):
include "target.tmh"
alias T160001; // second T16000 handle, which will be used all mapping commands
int main()
{
if(Init(&EventHandle)) return 1;
&T160001 = GetIndexJoy(SelectUsbDevice("VID_044F&PID_B10A")); // expect a second T16000 to be plugged on USB
MapAxis(&T16000, JOYX, MOUSE_X_AXIS);
MapAxis(&T16000, JOYY, MOUSE_Y_AXIS);
MapAxis(&T160001, JOYX, MOUSE_X_AXIS);
MapAxis(&T160001, JOYY, MOUSE_Y_AXIS);
}
int EventHandle(int type, alias o, int x)
{
DefaultMapping(&o, x);
}
The same way you can use more MFDs. The string used in SelectUsbDevice is taken from the target.tmh file at the beginning, where the default devices are defined.
|
|
#3129526 - 11/03/10 01:53 PM
Re: T.A.R.G.E.T. multiple devices and non-TM devices support
[Re: Feed]
|
Joined: Apr 2002
Posts: 17,733
Joe
Veteran
|
Veteran
Joined: Apr 2002
Posts: 17,733
Bridgewater, NJ
|
From just a quick glance, the SelectUsbDevice() function looks like it might even be possible to grab non-TM hardware. Anyone able to confirm that? Ooh, very good point. Where can one see a controller's ID (for example, "VID_044F&PID_B10A" in this case) so that one knows what to try in T.A.R.G.E.T.?
|
|
#3129798 - 11/03/10 07:16 PM
Re: T.A.R.G.E.T. multiple devices and non-TM devices support
[Re: Feed]
|
Joined: Jul 2005
Posts: 4,328
Panther
Senior Member
|
Senior Member
Joined: Jul 2005
Posts: 4,328
|
Right click on the hardware in device manager, select Properties, go to the Hardware tab, select your hardware, hit properties again, go to details, and from the Property drop down select Hardware ID.
There maybe an easier way but that's how I found the ID.
Virtual Thunderbirds, LLC | Sponsored by ThrustmasterASUS ROG MAXIMUS VIII HERO, i7 6700k, G.SKILL Ripjaws V Series 32GB, 980TI 6GB G1 OC, Obutto oZone, Thrustmaster HOTAS Warthog, CH Pro Pedals, NP TrackIR5, ***Soon*** Oculus Rift
|
|
#3129891 - 11/03/10 09:32 PM
Re: T.A.R.G.E.T. multiple devices and non-TM devices support
[Re: Feed]
|
Joined: Oct 2010
Posts: 54
Feed
Junior Member
|
Junior Member
Joined: Oct 2010
Posts: 54
|
Panther - thanks for that - I've been using a freeware app from OpenCockpits that hangs every time. edit - I have a Saitek Aviator ... somewhere. :/
Last edited by Feed; 11/03/10 09:34 PM.
|
|
#3129897 - 11/03/10 09:46 PM
Re: T.A.R.G.E.T. multiple devices and non-TM devices support
[Re: Feed]
|
Joined: Jul 2005
Posts: 1,508
Teej
Member
|
Member
Joined: Jul 2005
Posts: 1,508
|
Erp. Nevermind. Misunderstood the question. Better answer in a moment....will update. OK, maybe it's not a better answer for the way you're trying to do it. Heh. But you can see everything that's currently plugged in in the registry. HKLM\system\currentcontrolset\enum\USB
Last edited by Teej; 11/03/10 09:50 PM.
|
|
#3130890 - 11/04/10 11:16 PM
Re: T.A.R.G.E.T. multiple devices and non-TM devices support
[Re: Feed]
|
Joined: Apr 2002
Posts: 17,733
Joe
Veteran
|
Veteran
Joined: Apr 2002
Posts: 17,733
Bridgewater, NJ
|
OK, this is definitely not a simple process (if it's going to work at all). This is the easy part; I identified the hardware ID of a G940 joystick. It is VID_046D&PID_C2A8. So, I added a line to target.tmh (BTW, on my system this file was read-only, and I had to change that property). It now reads: alias Throttle = "VID_044F&PID_0404", Joystick = "VID_044F&PID_0402", LMFD = "VID_044F&PID_b351";
alias RMFD = "VID_044F&PID_b352", HCougar = "VID_044F&PID_0400", T16000 = "VID_044F&PID_B10A";
alias G940Stick = "VID_046D&PID_C2A8"; I then wrote a very simple program just to see what would happen... include "target.tmh"
int main()
{
if(Init(&EventHandle)) return 1; // declare the event handler, return on error
MapKey(&Joystick, TG1, "x");
MapKey(&G940Stick, TG1, "y");
}
int EventHandle(int type, alias o, int x)
{
DefaultMapping(&o, x);
} ... keeping in mind that T.A.R.G.E.T. does not know what the "TG1" button is on the G940 stick. This program compiles without errors. However, when I run it I get the following: Physical USB HID devices managed by script! Currently plugged USB HID devices[4]: 1: "Thrustmaster HOTAS Cougar" - "USB\Vid_044f&Pid_0400&Rev_0110&MI_00" 2: "Joystick - HOTAS Warthog" - "USB\Vid_044f&Pid_0402&Rev_0100" 3: "Throttle - HOTAS Warthog" - "USB\Vid_044f&Pid_0404&Rev_0100" 4: "F16 MFD 1" - "USB\Vid_044f&Pid_b351&Rev_0100" USB HID device "Throttle - HOTAS Warthog"(USB\VID_044F&PID_0404\6&12616152&0&4) selected USB HID device "Joystick - HOTAS Warthog"(USB\VID_044F&PID_0402\6&33BC7F0&0&1) selected USB HID device "F16 MFD 1"(USB\VID_044F&PID_B351\5&227472FB&0&1) selected USB HID device with hardware id "VID_044F&PID_b352" cannot be found USB HID device "Thrustmaster HOTAS Cougar"(USB\VID_044F&PID_0400&MI_00\8&F5FA503&0&0000) selected USB HID device with hardware id "VID_044F&PID_B10A" cannot be found Virtual HID devices managed by script! Connecting virtual joystick...Done Device name set to Thrustmaster Combined Connecting virtual keyboard...Done Connecting virtual mouse...Done Script stopped! Runtime Error: Index out of bounds for: devicedata in GetDeviceData ( line 250 in target.tmh ) Here is the code around line 250 of target.tmh: int GetDeviceData(alias dev) // fill global devdata alias based on device name (joy1, joy2,...)
{
char t; Dim(&t, 16);
strname(&dev, &t);
Map(&devdata, &&devicedata[t[3]-'0']);
} I am not a computer programmer, so the above is beyond my understanding. Anyone care to continue?
|
|
#3130972 - 11/05/10 12:59 AM
Re: T.A.R.G.E.T. multiple devices and non-TM devices support
[Re: Feed]
|
Joined: Oct 2010
Posts: 54
Feed
Junior Member
|
Junior Member
Joined: Oct 2010
Posts: 54
|
Joe - instead of adding this line to target.tmh: alias G940Stick = "VID_046D&PID_C2A8"; You might try replacing an existing alias definition (I'd go with Joystick) with your G940's id. Make a backup (as I'm sure you know)! I'm willing to bet that works (but I'm no programmer, either). This is exciting, though!
[edit] - actually, I bet it doesn't work. I bet the device ids for the ThrustMaster products are hard-coded somewhere. It doesn't even appear that it *tried* to find your G940...
Last edited by Feed; 11/05/10 01:06 AM.
|
|
#3131021 - 11/05/10 01:40 AM
Re: T.A.R.G.E.T. multiple devices and non-TM devices support
[Re: Feed]
|
Joined: Apr 2002
Posts: 17,733
Joe
Veteran
|
Veteran
Joined: Apr 2002
Posts: 17,733
Bridgewater, NJ
|
Joe - instead of adding this line to target.tmh: alias G940Stick = "VID_046D&PID_C2A8"; You might try replacing an existing alias definition (I'd go with Joystick) with your G940's id. Make a backup (as I'm sure you know)! I'm willing to bet that works (but I'm no programmer, either). This is exciting, though!
[edit] - actually, I bet it doesn't work. I bet the device ids for the ThrustMaster products are hard-coded somewhere. It doesn't even appear that it *tried* to find your G940... No, it didn't even try, it would appear. Your suggestion is a good one, so let's see what happens. target.tmh// alias Throttle = "VID_044F&PID_0404", Joystick = "VID_044F&PID_0402", LMFD = "VID_044F&PID_b351";
alias Throttle = "VID_044F&PID_0404", Joystick = "VID_046D&PID_C2A8", LMFD = "VID_044F&PID_b351";
alias RMFD = "VID_044F&PID_b352", HCougar = "VID_044F&PID_0400", T16000 = "VID_044F&PID_B10A"; G940 test.tmcinclude "target.tmh"
int main()
{
if(Init(&EventHandle)) return 1; // declare the event handler, return on error
MapKey(&Joystick, S1, "x");
}
int EventHandle(int type, alias o, int x)
{
DefaultMapping(&o, x);
} Resulting log:Physical USB HID devices managed by script! Currently plugged USB HID devices[4]: 1: "Thrustmaster HOTAS Cougar" - "USB\Vid_044f&Pid_0400&Rev_0110&MI_00" 2: "Joystick - HOTAS Warthog" - "USB\Vid_044f&Pid_0402&Rev_0100" 3: "Throttle - HOTAS Warthog" - "USB\Vid_044f&Pid_0404&Rev_0100" 4: "F16 MFD 1" - "USB\Vid_044f&Pid_b351&Rev_0100" USB HID device "Throttle - HOTAS Warthog"(USB\VID_044F&PID_0404\6&12616152&0&4) selected USB HID device with hardware id "VID_046D&PID_C2A8" cannot be foundUSB HID device "F16 MFD 1"(USB\VID_044F&PID_B351\5&227472FB&0&1) selected USB HID device with hardware id "VID_044F&PID_b352" cannot be found USB HID device "Thrustmaster HOTAS Cougar"(USB\VID_044F&PID_0400&MI_00\8&F5FA503&0&0000) selected USB HID device with hardware id "VID_044F&PID_B10A" cannot be found Virtual HID devices managed by script! Connecting virtual joystick...Done Device name set to Thrustmaster Combined Connecting virtual keyboard...Done Connecting virtual mouse...Done main returned 0 It didn't crash. However, note the line I designated in red text; the script did not find the G940. There is also the second line "Currently plugged USB HID devices[4]". That's not accurate, as when I ran the script I also had connected the G940 stick, X-65F throttle, X-52 Pro Throttle, and CH Fighterstick. What it really is saying is "Currently plugged Thrustmaster USB HID devices". I still don't think this is a definite no-go, but there is more to a possible solution.
|
|
#3131364 - 11/05/10 02:41 PM
Re: T.A.R.G.E.T. multiple devices and non-TM devices support
[Re: Feed]
|
Joined: Jul 2005
Posts: 1,508
Teej
Member
|
Member
Joined: Jul 2005
Posts: 1,508
|
I have a pretty good idea how this might work (and also a pretty good idea why it might not). I'll be able to give it a try in a couple of hours. Will report back and/or work with Joe. I'm not going to be asking TM about this - I know they're busy enough making stuff work that's supposed to work. If they want to chime in, I know they're reading here.
|
|
#3138789 - 11/17/10 12:59 AM
Re: T.A.R.G.E.T. multiple devices and non-TM devices support
[Re: Feed]
|
Joined: Mar 2007
Posts: 1,298
Reschke
Plankowner
|
Plankowner
Member
Joined: Mar 2007
Posts: 1,298
Vestavia, AL
|
How would it work if I wanted to build a USB device with a bodnar board and try to use TARGET to configure that. Not worrying about other OEM devices but just a home built device?
Last edited by Reschke; 11/17/10 01:01 AM.
Star Citizen Referal Code STAR-MP6J-VFH7
i7-13700K @ 3.40GHz 32GB RAM GeForce 3060RTX MSI MAG Z790 Tomahawk lots of SSD's and a good old fashioned 1TB HDD Samsung G9 Odyssey 49" TrackIR 5 with Track Clip Pro Windows 11 64bit Warthog #1397...compliments of SimHQ
|
|
#3138843 - 11/17/10 02:53 AM
Re: T.A.R.G.E.T. multiple devices and non-TM devices support
[Re: Feed]
|
Joined: Apr 2002
Posts: 17,733
Joe
Veteran
|
Veteran
Joined: Apr 2002
Posts: 17,733
Bridgewater, NJ
|
Doubt it would work any differently to a Logitech /CH/ Saitek device - meaning (currently) it wouldn't work at all.
|
|
#3140402 - 11/19/10 11:03 AM
Re: T.A.R.G.E.T. multiple devices and non-TM devices support
[Re: Feed]
|
Joined: Apr 2010
Posts: 67
Hempstead
Junior Member
|
Junior Member
Joined: Apr 2010
Posts: 67
Bellevue, WA, USA
|
The new TARGET RC2 gives this for SelectDevice() for a CH rudder. Cannot use "VID_068E&PID_00F2"
T.A.R.G.E.T is supporting only Thrustmaster devices!
Thanks to business consideration, Guillemot has made their position as clear as the blue sky. And, I don't blame them. However, I have managed to do the followings... Running script: test.tmc
Mapped plugin module "C:\Program Files\Thrustmaster\TARGET\Plugins\sys.dll"
Compile Succeeded.
Physical USB HID devices managed by script!
Currently plugged USB HID devices[3]:
1: "Joystick - HOTAS Warthog" - "USB\Vid_044f&Pid_0402&Rev_0100"
2: "Throttle - HOTAS Warthog" - "USB\Vid_044f&Pid_0404&Rev_0100"
3: "CADDY's Joystick"... And I have also done MapKey(&CaddyJoystick, TG1, 'f') and successfully generated an 'F' inside the Device Analyzer by pressing a H/W button on my non-TM controller; just as a proof of concept. It's "sort of" a general solution, but it will not let you take any controller and put it under TARGET. However, it will let me do some controllers. For some controllers, it's just a whole lot of trouble for not much gain. I mean, for Pete's sake, my CH rudder works just fine outside of TARGET. I never like complicated macros/scripts anyway. Don't bother asking me how I do it... I don't tell, and Guillemot might tolerate a small number of my real life friends doing it in private. Tell that in public and they will code me out (it would be a bit difficult, but not too hard) and I would have to resort to a lot more difficult and time consuming methods. I am not keen on provoking an arms race with Guillemot. I have a job, and this is their job.
|
|
#4354600 - 04/30/17 05:53 PM
Re: T.A.R.G.E.T. multiple devices and non-TM devices support
[Re: Feed]
|
Joined: Apr 2017
Posts: 1
klabauta
Junior Member
|
Junior Member
Joined: Apr 2017
Posts: 1
|
|
|
|
|
|
|
Exodus
by RedOneAlpha. 04/18/24 05:46 PM
|
|
|
|
|
|
|
|