Jump to content

Thrustmaster Combined Full DX Mapping (extending the 32 DX buttons limit)


Recommended Posts

No you won't see them in the testing window... Only in game

SYSTEM SPECS: Hardware Intel Corei7-12700KF @ 5.1/5.3p & 3.8e GHz, 64Gb RAM, 4090 FE, Dell S2716DG, Virpil T50CM3 Throttle, WinWIng Orion 2 & F-16EX + MFG Crosswinds V2, Varjo Aero
SOFTWARE: Microsoft Windows 11, VoiceAttack & VAICOM PRO

1569924735_WildcardsBadgerFAASig.jpg.dbb8c2a337e37c2bfb12855f86d70fd5.jpg

Link to comment
Share on other sites

No you won't see them in the testing window... Only in game

 

 

Thanks, thought it would be like that. No worries, it seems to be working.

 

 

RightStuff, you thinking of the "Device Analyzer"? I see all the buttons in the analyzer, just not in Win10 controller test app.

 

 

 

When I was trying to assign buttons in game settings, none of the buttons worked. I figured out that I needed to use the drop down menu for joystick buttons.


Edited by SGT Coyle

Night Ops in the Harrier

IYAOYAS


 
Link to comment
Share on other sites

  • 2 months later...
You will need to run TARGET and assign those new DX Buttons to the physical buttons. Once you have them assigned, you can map them in the game.
I dont know how theres still only 32 buttons but when i run joystick test i can see51 (19+32=51).

 

Odesláno z mého Mi A1 pomocí Tapatalk

Ryzen 9 5900x | 32GB DDR4 | RTX 3090 | 32GB RAM 

 

Link to comment
Share on other sites

Hi,

 

As you probably know, the standard TM Warthog script allows only 32 DX buttons + 8 HAT positions... I found the way to use up to 120 DX buttons. However, this hack work only with TARGET Script Editor since the TARGET GUI use hardcoded definitions.

 

 

If you try the editor you will have a access to the full 120 DX buttons.

Night Ops in the Harrier

IYAOYAS


 
Link to comment
Share on other sites

If you try the editor you will have a access to the full 120 DX buttons.
OH im blind thx! Dont know how program in editor but i will try it.

 

Odesláno z mého Mi A1 pomocí Tapatalk

Ryzen 9 5900x | 32GB DDR4 | RTX 3090 | 32GB RAM 

 

Link to comment
Share on other sites

OH im blind thx! Dont know how program in editor but i will try it.

 

Odesláno z mého Mi A1 pomocí Tapatalk

 

Check the spoiler. That's a template I use to make my editor scripts.

 

Basic scripting is easy.

 

  1. Open editor
  2. Click > New
  3. Delete everything in the editing window (or overwrite everything with the Template from the spoiler) and copy and paste the template script from the spoiler.
  4. Save as a .tmc (Be mindful of where you save it)
  5. Put your "targetdx120.tmh" file in the same folder as your saved .tmc
  6. At the top of the editor app. Click Compile then Run.

To test:

 

  1. At the top of the editor app. Click "Device Analyzer"
  2. You should see 120 dx buttons available
  3. Press first stage of trigger. Button 120 should light up.

p.s. The "Help" button at the top of the editor app, will open the "Script Editor Basics" manual. Well worth looking at.

 

 

include "targetdx128.tmh"



//program startup
int main()
{
   if(Init(&EventHandle)) return 1; // declare the event handler, return on error
   
   //add initialization code here
       
   SetKBRate(22, 35);
   
   SetShiftButton(&Joystick, S4, 0, 0, 0);  //Assigns the pinky Lever on the stick (S4) as momentary In/Out Layer.

//AXIS init        
   MapAxis(&Joystick, JOYX, DX_X_AXIS);
   MapAxis(&Joystick, JOYY, DX_Y_AXIS);
   
   //MapAxis(&Throttle, THR_LEFT, DX_ZROT_AXIS);
   MapAxis(&Throttle, THR_RIGHT, DX_Z_AXIS);
   
//*********Slew Stick acting as Mouse    
//    MapAxis(&Throttle, SCX, MOUSE_X_AXIS, AXIS_NORMAL, MAP_RELATIVE);
//        SetSCurve(&Throttle, SCX, 0, 10, 0, 0, -4);
//    MapAxis(&Throttle, SCY, MOUSE_Y_AXIS, AXIS_REVERSED, MAP_RELATIVE);
 //       SetSCurve(&Throttle, SCY, 0, 10, 0, 0, -4);

//*********Slew Stick acting as independent AXIS.  NOT Mouse!!!  Used to setup control of A/C TDC        
   MapAxis(&Throttle, SCX, DX_XROT_AXIS, AXIS_NORMAL, MAP_ABSOLUTE);
       SetSCurve(&Throttle, SCX, 0, 10, 0, 0, -4);
   MapAxis(&Throttle, SCY, DX_YROT_AXIS, AXIS_REVERSED, MAP_ABSOLUTE);
       SetSCurve(&Throttle, SCY, 0, 10, 0, 0, -4);
   //TDC Slew Control on Throttle Mini Stick    
   //KeyAxis(&Throttle, SCX, 0, AXMAP2(3,Throttle_Designator_Controller_Left,0,Throttle_Designator_Controller_Right));
   //KeyAxis(&Throttle, SCY, 0, AXMAP2(3,Throttle_Designator_Controller_Down,0,Throttle_Designator_Controller_Up));    
       
   MapAxis(&Throttle, THR_FC, DX_SLIDER_AXIS);    
   
// Init Lights  Programing light below
//    ActKey(PULSE+KEYON+LED(&Throttle, LED_INTENSITY, 10)); //set Throttle backlight power to middle // set Throttle backlight power to low
//    ActKey(PULSE+KEYON+LED(&Throttle, LED_ONOFF, LED_CURRENT+LED1)); //set LED 1 On
//    ActKey(PULSE+KEYON+LED(&Throttle, LED_ONOFF, LED_CURRENT-LED2)); //set LED 2 OFF
//    ActKey(PULSE+KEYON+LED(&Throttle, LED_ONOFF, LED_CURRENT+LED3)); //set LED 3 On
//    ActKey(PULSE+KEYON+LED(&Throttle, LED_ONOFF, LED_CURRENT-LED4)); //set LED 4 OFF
//    ActKey(PULSE+KEYON+LED(&Throttle, LED_ONOFF, LED_CURRENT+LED5)); //set LED 5 On
// Flags...    
   
//////////////////////////////////////////////////////////////////////    
//BUTTON PROGRAMING STARTS BELOW
//////////////////////////////////////////////////////////////////

//STICK PROGRAMING

//MapKey(&Joystick,);
//MapKeyIO(&Joystick,,);

//MapKeyIOUMD(&Throttle,,
//                            ,
//                            ,
//                            ,
//                            ,
//                            ,
//                            );
//Trigger
MapKey(&Joystick,TG1, DX120);
//MapKey(&Joystick,TG2,);

//Buttons
//MapKey(&Joystick,S1,);
//MapKey(&Joystick,S2,);
//MapKeyI&Joystick,S3,);
//MapKey(&Joystick,S4,);

//DMS
//MapKey(&Joystick,H3U,);
//MapKey(&Joystick,H3D,);
//MapKey(&Joystick,H3R,);
//MapKey(&Joystick,H3L,);

//TMS
//MapKey(&Joystick,H2U,);
//MapKey(&Joystick,H2D,);
//MapKey(&Joystick,H2R,);
//MapKey(&Joystick,H2L,);

//CMS
//MapKey(&Joystick,H4U,);
//MapKey(&Joystick,H4D,);
//MapKey(&Joystick,H4R,);
//MapKey(&Joystick,H4L,);

//MapKey(&Joystick,H4P,);


//Trim
//MapKeyIO(&Joystick,H1U,);
//MapKeyIO(&Joystick,H1D,);
//MapKeyIO(&Joystick,H1R,);
//MapKeyIO(&Joystick,H1L,);
   
//THROTTLE PROGRAMING

//MapKey(&Throttle,,);
//MapKeyIO(&Throttle,,,);

//MapKeyIOUMD(&Throttle,,
//                            ,
//                            ,
//                            ,
//                            ,
//                            ,
//                            );
//Coolie Hat

//China Hat is used for Modes selection---------------
//MapKey(&Throttle, CSD,);
//MapKey(&Throttle, CSU,);

//MapKey(&Throttle,CSD,);
//MapKey(&Throttle,CSU,);
//MapKey(&Throttle,CSR,);
//MapKey(&Throttle,CSL,);

//Slew
//MapKey(&Throttle,,Slew_DWN);//Set to operate in AXIS Section  //Not as long as Slew control assigned as Axis
//MapKey(&Throttle,,Slew_UP);//Set to operate in AXIS Section    //Not as long as Slew control assigned as Axis
//MapKey(&Throttle,,Slew_RT);//Set to operate in AXIS Section    //Not as long as Slew control assigned as Axis
//MapKey(&Throttle,,Slew_LT);//Set to operate in AXIS Section    //Not as long as Slew control assigned as Axis

//MapKey(&Throttle,SC,);


//Left Throttle Button
//MapKey(&Throttle,LTB, );

//Pinky Switch
//MapKey(&Throttle,PSF,Pinky_FWD);
//MapKey(&Throttle,PSM,Pinky_MID);
//MapKey(&Throttle,PSB,Pinky_AFT);

//MIC Switch
//MapKey(&Throttle,MSR,);
//MapKey(&Throttle,MSL,);
//MapKey(&Throttle,MSU,);
//MapKey(&Throttle,MSD,);

//MapKey(&Throttle,MSP,);

//Speed Brake
//MapKeyIO(&Throttle,SPDF,;
//MapKeyIO(&Throttle,SPDM,);
//MapKeyIO(&Throttle,SPDB,);

//Boat Switch
//MapKey(&Throttle,BSF,);
//MapKey(&Throttle,BSM,);
//MapKey(&Throttle,BSB,);

//China Hat
//MapKey(&Throttle,CHF,);
//MapKey(&Throttle,CHM,);
//MapKey(&Throttle,CHB,), );

//THROTTLE Base PROGRAMING
//MapKey(&Throttle,,);
//MapKeyIO(&Throttle,,,);

//MapKeyIOUMD(&Throttle,,
//                            ,
//                            ,
//                            ,
//                            ,
//                            ,
//                            );

//Engine Fuel Flow LT/RT
//MapKey(&Throttle,EFLNORM,);
//MapKey(&Throttle,EFLOVER,);
//MapKey(&Throttle,EFRNORM,);
//MapKey(&Throttle,EFROVER,);

//Engine Operator LT/RT
//MapKey(&Throttle,EOLIGN,);
//MapKey(&Throttle,EOLNORM,);
//MapKey(&Throttle,EOLMOTOR,);

//MapKey(&Throttle,EORIGN,);
//MapKey(&Throttle,EORNORM,);
//MapKey(&Throttle,EORMOTOR,);

//Throttle Friction Control
//Set to operate in AXIS Section

//APU Switch
//MapKey(&Throttle,APUON,);
//MapKey(&Throttle,APUOFF,);

//Landing Gear Button
//MapKey(&Throttle,LDGH, );

//Autopilot Select Switch
//MapKey(&Throttle,APPAT,);
//MapKey(&Throttle,APAH,);
//MapKey(&Throttle,APALT,);


//Autopilot Engage/Diengage Button
//MapKey(&Throttle,APENG,);

//Radar Altimeter Mode
//MapKey(&Throttle,RDRNRM,);
//MapKey(&Throttle,RDRDIS,);

//EAC On/Off
//MapKey(&Throttle,EACON,);
//MapKey(&Throttle,EACOFF,);

//Flap
//MapKey(&Throttle,FLAPU,);
//MapKey(&Throttle,FLAPM,);                                
//MapKey(&Throttle,FLAPD,);

//Throttle Idle Cutoff
//MapKey(&Throttle,IDLEROFF,);    
//MapKey(&Throttle,IDLERON,);

//MapKey(&Throttle,IDLELOFF,);
//MapKey(&Throttle,IDLELON,);


//****************Left MFD Programing*********************************
//---//MapKey(&LMFD,,);
//---//MapKeyIO(&LMFD,,,);
//MapKey(&LMFD,OSB1,);
//MapKey(&LMFD,OSB2,);
//MapKey(&LMFD,OSB3,);
//MapKey(&LMFD,OSB4,);
//MapKey(&LMFD,OSB5,);

//MapKey(&LMFD,OSB6,);
//MapKey(&LMFD,OSB7,);
//MapKey(&LMFD,OSB8,);
//MapKey(&LMFD,OSB9,);
//MapKey(&LMFD,OSB10,);

//MapKey(&LMFD,OSB11,);
//MapKey(&LMFD,OSB12,);
//MapKey(&LMFD,OSB13,);
//MapKey(&LMFD,OSB14,);
//MapKey(&LMFD,OSB15,);

//MapKey(&LMFD,OSB16,);
//MapKey(&LMFD,OSB17,);
//MapKey(&LMFD,OSB18,);
//MapKey(&LMFD,OSB19,);
//MapKey(&LMFD,OSB20,);

//MapKey(&LMFD,GAINU,);
//MapKey(&LMFD,GAIND,);

//MapKey(&LMFD,SYMU,);
//MapKey(&LMFD,SYMD,);

//MapKey(&LMFD,CONU,);
//MapKey(&LMFD,COND,);

//MapKey(&LMFD,BRTU,);
//MapKey(&LMFD,BRTD,);


//****************Right MFD Programing*********************************
//---//MapKey(&RMFD,,);
//---//MapKeyIO(&RMFD,,,);
//MapKey(&RMFD,OSB1,);
//MapKey(&RMFD,OSB2,);
//MapKey(&RMFD,OSB3,);
//MapKey(&RMFD,OSB4,);
//MapKey(&RMFD,OSB5,);

//MapKey(&RMFD,OSB6,);
//MapKey(&RMFD,OSB7,);
//MapKey(&RMFD,OSB8,);
//MapKey(&RMFD,OSB9,);
//MapKey(&RMFD,OSB10,);

//MapKey(&RMFD,OSB11,);
//MapKey(&RMFD,OSB12,);
//MapKey(&RMFD,OSB13,);
//MapKey(&RMFD,OSB14,);
//MapKey(&RMFD,OSB15,);

//MapKey(&RMFD,OSB16,);
//MapKey(&RMFD,OSB17,);
//MapKey(&RMFD,OSB18,);
//MapKey(&RMFD,OSB19,);
//MapKey(&RMFD,OSB20,);

//MapKey(&RMFD,GAINU,);
//MapKey(&RMFD,GAIND,);

//MapKey(&RMFD,SYMU,);
//MapKey(&RMFD,SYMD,);

//MapKey(&RMFD,CONU,);
//MapKey(&RMFD,COND,);

//MapKey(&RMFD,BRTU,);
//MapKey(&RMFD,BRTD,);
   
}

//event handler
int EventHandle(int type, alias o, int x)
{
   DefaultMapping(&o, x);
   
   //add event handling code here
}

 

If you have any trouble please PM me on theses forums.

Night Ops in the Harrier

IYAOYAS


 
Link to comment
Share on other sites

  • 5 weeks later...
  • 3 weeks later...

Hi, I see this topic still alive 2 years later and I made some progress since the first "finding".

 

 

 

If you are interested in some advanced Warthog programming, I let you two profiles I made last year you can use as inspiration or reuse. I never publicy released them since now because... well, good question, why ? I don't know...

 

 

 

The two profiles are almost the same except that the "TM Warthog DX++", which is an older one, profile includes some unused .tmh files which implements advanced functions, which can interest the most intrepid ones of you.

 

All files are commented, code explained as possible to allow other people (and myself when I read back years after) to understand, reuses and adapt.

 

 

https://forums.eagle.ru/attachment.php?attachmentid=215970&stc=1&d=1566468192

https://forums.eagle.ru/attachment.php?attachmentid=215971&stc=1&d=1566468192

 

 

 

Enjoy

TM Warthog DX++.zip

TM Warthog Universal HID.zip

Link to comment
Share on other sites

Hi, I see this topic still alive 2 years later and I made some progress since the first "finding".

 

 

 

If you are interested in some advanced Warthog programming, I let you two profiles I made last year you can use as inspiration or reuse. I never publicy released them since now because... well, good question, why ? I don't know...

 

 

 

The two profiles are almost the same except that the "TM Warthog DX++", which is an older one, profile includes some unused .tmh files which implements advanced functions, which can interest the most intrepid ones of you.

 

All files are commented, code explained as possible to allow other people (and myself when I read back years after) to understand, reuses and adapt.

 

 

https://forums.eagle.ru/attachment.php?attachmentid=215970&stc=1&d=1566468192

https://forums.eagle.ru/attachment.php?attachmentid=215971&stc=1&d=1566468192

 

 

 

Enjoy

 

Thanks Very Much!

SYSTEM SPECS: Hardware Intel Corei7-12700KF @ 5.1/5.3p & 3.8e GHz, 64Gb RAM, 4090 FE, Dell S2716DG, Virpil T50CM3 Throttle, WinWIng Orion 2 & F-16EX + MFG Crosswinds V2, Varjo Aero
SOFTWARE: Microsoft Windows 11, VoiceAttack & VAICOM PRO

1569924735_WildcardsBadgerFAASig.jpg.dbb8c2a337e37c2bfb12855f86d70fd5.jpg

Link to comment
Share on other sites

  • 2 weeks later...

This is better than Chocolate Chip ice cream. Now I have to figure out how to assign the higher DX buttons since the don't show up in the GUI.

 

I'm just going to read supplied file and experiment and see if I can figure it out. The last time I did anything that looked like coding it was in DOS Basic. You kids probably don't even know what that is.

MSI Z490 Tomahawk, I5-11600kf, 2X512GB NvME, RTX4090, 32GB DDR4 3200, Reverb G2, T50-CM2, OpenXR

31st TFW, 14th MAS, 9th ARS

Link to comment
Share on other sites

This is better than Chocolate Chip ice cream. Now I have to figure out how to assign the higher DX buttons since the don't show up in the GUI.

 

Do not use "TARGET GUI", use "TARGET Script Editor" instead... "TARGET GUI" won't allow you to properly edit profile script.

 

I'm just going to read supplied file and experiment and see if I can figure it out.

 

Indeed, if you want to modify the default mapping, you'll need to put hands in code...

 

The last time I did anything that looked like coding it was in DOS Basic. You kids probably don't even know what that is.

 

I am not a kid, and I have known DOS Basic too :D TARGET Script language is very close to C in term of syntax (better than BASIC). Not really hard once you learned and understand the 3 or 4 essential things.

Link to comment
Share on other sites

This is really nicely done sedenion, the code is clear, easily customisable, and well commented.

Thanks for providing it!

 

Just wondering, what is the logic behind which buttons you chose to add the submode and long press functions to?

Link to comment
Share on other sites

I don't undestand the question. You mean, the choice I made for the mapping, or how it is programmed ?

 

The choice to put extra functions on some buttons but not others.

eg on the throttle the up/down directions have long-press but not left right, and the stick TMS is the opposite with long-press on left/right but not up/down.

 

It's not important and simple to change thanks to your organised code, I just wondered if you had figured out some really efficient control scheme or something that was the reason for those choices.

Link to comment
Share on other sites

The choice to put extra functions on some buttons but not others.

eg on the throttle the up/down directions have long-press but not left right, and the stick TMS is the opposite with long-press on left/right but not up/down.

 

It's not important and simple to change thanks to your organised code, I just wondered if you had figured out some really efficient control scheme or something that was the reason for those choices.

 

 

Ok, the logic is somewhat fuzzy, This a mix of my own habits, original HOTAS design, and according real HOTAS behaviors of the module I use the most: M2000-C...

 

For example, the "submod" directly reflect the Mirage 2000 C "Master Arm" mode. I use the Boat switch to switch weapons modes, so I need different behavior depending Master On or Off. In paralelle, I am used to use the TMS (Hat2) hat as view control (zomm in, out, center view, padlock-view lock and release, etc.), since I don't use VR nor TrackIR, I use the S1 button for MAGIC IR Lock/Unlock which is a very specific Mirage 2000 feature, etc.

Link to comment
Share on other sites

Ok, the logic is somewhat fuzzy, This a mix of my own habits, original HOTAS design, and according real HOTAS behaviors of the module I use the most: M2000-C..

 

Ahh ok, that makes sense. I knew there must be some kind of logic to it!

Link to comment
Share on other sites

OK there seems to be a pretty major issue...

The buttons on the virtual joystick don't synchronise to the real buttons when you run the script, so all directx buttons stay off until you move the switch they are driven by.

 

So you have to toggle EVERY switch, EVERY time you run the script to get the output buttons to be properly synchronised.

 

I found a kind of dodgy way to synchronise them all at once, but you still need to cause a single update by pressing any button/moving any axis.

 

Add this at the end of the main function:

 

// Update all the throttle inputs to synchronise the mapped outputs with the actual device state

// Not needed for the joystick as all buttons are momentary

int i=0;

while(i < 52) {

DefEventHandler(EV_HID_INPUT_DATA, &Throttle, i);

i = i + 1;

}

 

Do you know of any way to trigger an update so it will work without any manual actions at all?

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...