by Len "Viking1" Hjalmarson
Article Type: How-To
Article Date: April 25, 2002
Product Name: HOTAS Cougar
Release Date: Soon
Min. Spec: USB port, DirectX 8.0, Pentium (or compat.), Win98/2000/ME
Files & Links: Click Here
* * *
A few weeks ago I spoke with a friend who had just purchased his first HOTAS. It turns out he found a used F22 Pro and TQS on the Internet.
Since he lives over a thousand miles south of me, he had never had the chance to try my ThrustMaster gear, but we had flown together enough that he understood some of the advantages. But now it was no longer merely hearing—he had his own experience of the difference it makes.
For the past year my friend had been flying with a Logitech Wingman force feedback device, and greatly enjoying it. In his first few days of moving to a HOTAS, he was impressed but the adjustment period was a challenge. After his first week with about twelve or fifteen hours of flight, he was singing the praises of the programmable pair. He was even modifying his own files, placing flaps and trim, for example, exactly where he wanted them.
My friend was amazed, as anyone will be who moves from a single controller to a programmable HOTAS, that he can now keep his eyes on the fight. He is thrilled that he no longer has to search for keys, or remember a key combination. After only a week of use, he has discovered that he automatically moves Hat4 down to drop flaps, or pushes it up to raise them a notch.
|HOTAS Cougar |
Like my friend, most of you will want to program your controllers so that you can make them do exactly what you want them to do. If you are like me, you will want your flaps on the same hat or key in IL-2 Sturmovik as they are on in Falcon 4.0. That way, no matter which simulation you fly, you know exactly which button or hat to move to raise or lower your flaps. Using the Cougar in this way is called Programmed Mode. In order to run the controllers in Programmed Mode, we need to do one of two things:
- download an existing control file, or
- create a joystick and a macro file, and download the file into the controllers.
Like other programmable controllers, we get to the programmed mode by telling our HOTAS to mimic the keyboard, and we create macros that match the control keys that we press in a particular flight sim.
We do all this via two files, the joystick file which tells the program which buttons and hats are matched to which keyboard characters, and the macro file, which contains "macros." Macros are simply descriptions as to what the keyboard characters do in your particular flight sim. Let's begin by looking at these two files in turn.
The joystick file is used to assign keyboard characters to the various buttons and hats on your controllers.
Naturally, you can’t assign commands in a random generic order. Instead, the buttons and hats on the Cougar controllers have special names to differentiate them so that each can be programmed with an individual setting.
|Figure 1 |
Figure 1 shows the head of the Cougar joystick. On the head of the stick there are two buttons and three hats. The buttons are S1 and S2, and that hats are 1,3 and 4.
Remember that the Cougar mirrors the design of the actual HOTAS in the Block 50 of the F-16. In the F-16 button S2 is the PICKLE button, and I use it that way in all the simulations I fly.
Actually, in many simulations I use button S2 twice, because I include a “switched” function also. What this means for me is that in IL-2 Sturmovik when I hit button S2 it releases any external ordnance—iron bombs or fires rockets. But if I hold in the lever S4 on the front of the stick at the same time, then button S2 sends a different command: to release any external tanks.
For the moment let’s keep it simple and stick to the “unswitched” button. IL-2 Sturmovik recognizes ALT plus SPACEBAR as the command to drop bombs. This means that I need to assign an ALT and SPACEBAR combination keystroke to S2. Trying to send this combination manually while flying the aircraft is a good way to get killed. Thank God for the HOTAS!
What I want to do is to tell the joystick to produce an "ALT SPACEBAR" character every time button S2 is pressed. What will this look like in a Cougar joystick file?
Joystick and macro files we create with FOXY (or which you could create by hand with a text editor if you wanted to) are just simple text files. Buttons are identified by the term "BTN."
We want BTN S2 to send an "ALT SPACEBAR" character. So the statement we need to type into our joystick file, to cause button S2 to generate an "ALT SPACEBAR" character when it is pressed, is this:
BTN S2 ALT SPC
Hmm. Is that complicated or what?
Now say we want to program Hat 1 as a view control. Many pilots use Hat 1 for views, and many others use it for trim.
To program Hat 1 for the forward cockpit view when it is pushed into its up position, I need to assign it to emulate the function key F1. Most flight sims use F1 as the "look forward" key. The rare exceptions, like Combat Flight Simulator 2, drove me around the bend for a while!
On the Cougar all hats are effectively buttons, so we can program Hat 1 with a button (BTN) statement. HAT 1 Up is shortened to H1U so the statement we need is:
BTN H1U F1
These statements are the basics of Thrustmaster programming.
|FOXY Editor |
Now, there are additional levels of programming which are shortcuts to certain ends. For example, in my current IL-2 Sturmovik file for the Cougar I have the line
USE HAT1 AS KEYPAD
This little beauty of a statement causes Hat 1 on my Cougar to function as the keypad on my keyboard! These “USE” statements are powerful macros, and you can learn all about them yourself in the Cougar manual. Let’s get back to the basics and consider the MACRO file.
What is the macro file and why do we need it?
The macro file contains "macros", which are simply descriptions as to what the keyboard characters do in your particular flight sim.
A macro is a word that we make up to make it easier for us to remember what a keyboard key or a combination of keys actually do in our flight sim. Like this:
Release_Bomb = ALT SPC
Forward_view = F1
Remember that before we created this line in our joystick file:
BTN S2 ALT SPC
Now we can change that line to read:
BTN S2 Release_Bomb
And we can change the H1U line to read
BTN H1U Forward_view
All we have done is to trade one set of symbols for another. In terms of the joystick, F1 now is equal to Forward View. And that is the beauty of a macro. Macros make life simpler for the user. When you've got a joystick file that contains a hundred or more statements in it, it makes it very much easier to understand it this way.
|Macro selection in FOXY (click to enlarge) |
Sometimes I open and adjust my joystick file twenty times before I get it working exactly the way I want. Once I have created a macro file, I can quickly insert and move macros around based on their function label, instead of trying to remember which keys do what. I can also see at a glance what function I have applied to what button.
|Macro file for IL-2 in FOXY |
So where do we put these macro statements?
They go into their own file, the macro file. A macro file contains all the macros that describe what keyboard characters do in your simulation, and the joystick file reads the macro file and assigns these commands to the buttons on your joystick and throttle.
This is why you will normally see ThrustMaster files in pairs, the joystick file and the macro file, for a particular flight sim or game. This is the reason why the main screen you use in FOXY is the Editor, which shows the Joystick file and the Macro file on separate tabs. So in our example we could save the joystick file as IL-2.tmj and the macro file as IL-2.tmm (tmj = TM Joystick File, tmm = TM Macrofile.)
How does the joystick file know which macro file contains its macros?
We simply tell the joystick file which macro file to refer to. We simply add the statement
USE MDEF IL2.tmm
As I mentioned above, we don’t want to do all this by hand. Instead, FOXY enables us to create macro and joystick files with ease, and also add more complicated programming statements or command modifiers with the click of a mouse.
The next article will to show you how we get the above result in Foxy. If we wanted to we could create a complete macro file and joystick file in any text editor and then download them to the Cougar. But Foxy is a powerful tool that makes this all very quick and easy, and you can use it just the way you want.
|FOXY Composer |
Related COMBATSIM Resources:
Home of the VMF-124 Death's Head Squad