Previous Thread
Next Thread
Print Thread
Rate This Thread
Hop To
Page 1 of 2 1 2
#4320439 - 12/16/16 05:20 PM Anyone here, owning a PDF of the TM F22 Pro Manual?!?  
Joined: Dec 2010
Posts: 1,179
Viper1970 Offline
Member
Viper1970  Offline
Member

Joined: Dec 2010
Posts: 1,179
Bavaria, near Munich
Hello,

I have bought a extremly cheap F22 Pro and TQS combi at ebay. They are in absolute mint condition, with original boxes. They look just they were never used, but no software disks and no manuals. For the software, I was able to find the latest on a FTP-Site, but no way to find the manuals of those twenty year old controllers.

For the TQS this is no problem, cause I have a bunch of them and many manuals, too. I also own many old FLCS with manuals, but this is my first F22 Pro. As far as I've found out at my research on the web, a lot of things changed in the software from the FLCS to the F22. Specially the raw button programming. Since I still use them in my pit (only the button programming with dualboot to DOS - axis run over a BU0836 board) I need the manual for the F22.

I know things could be a lot easier if I would change to a HOTAS Cougar, but at the moment this is not possible, cause there is a very large hole in my pocket biggrin and here in Germany getting a used Cougar in good condition costs about 350-400€.

You could get a new Warthog system for this price, but this lacks the possibility to download the programming into the HOTAS itself. You must run a software in the background and cause I also use many old simulations too, like the old Janes series, which only runs without issues on good old Windows 98, that's sadly no option for me. Have tried many compatibility mods for Win 7, but they didn't really work stable, with the exception of Tackleberry's patches for USAF and IAF.

So please, if anybody has a pdf or doc version of the original F22 Pro manual, help me!!!


CockpitPC1: Ryzen9 5950X|64GB DDR4|512GB M2 SSD|2TB M2 SSD|Geforce RTX3090|Reverb G2|Win11Pro
CockpitPC2: PhenomII X6 1100T|32GB DDR2|2x 2TB HDD|2x Geforce GTX660 SLI|Win7Pro64
ComUnitPC1: Ryzen9 3900XT|32GB DDR4|2x 2TB HDD|Geforce RTX2070|Win11 Pro
ComUnitPC2: PhenomII X6 1100T|16GB DDR2|2x 2TB HDD|Geforce GTX660|Win7Pro64
ComUnitPC3: AthlonII X2 250|2GB DDR2|2TB HDD|Geforce 5950Ultra|2x VoodooII SLI|WinXPPro32&WinME
ComUnitPC4: K6-2+|768MB SDR|640GB HDD|Geforce 256DDR|VoodooI|Win98SE
Inline advert (2nd and 3rd post)

#4320490 - 12/16/16 07:35 PM Re: Anyone here, owning a PDF of the TM F22 Pro Manual?!? [Re: Viper1970]  
Joined: Nov 2001
Posts: 3,955
Sokol1 Offline
Senior Member
Sokol1  Offline
Senior Member

Joined: Nov 2001
Posts: 3,955
Internet
Is not this that you need?

http://www.flyfoxy.com/

#4320521 - 12/16/16 09:10 PM Re: Anyone here, owning a PDF of the TM F22 Pro Manual?!? [Re: Viper1970]  
Joined: Dec 2010
Posts: 1,179
Viper1970 Offline
Member
Viper1970  Offline
Member

Joined: Dec 2010
Posts: 1,179
Bavaria, near Munich
Hello Sokol,

thanks for your advise. Sadly this isn't the solution. I know FoxTwo and it's really a nice software, but I could only download to the stick with the use of the original DOS software, since many reasons that stay in realations with my homepits electronics layout.

I really need the original manual, to know how the programming is exactly working.

Searched for such a manual the whole day now, but as the F22 is nearly 20 years old and those days PDF-manuals were rarely used by companies, it's almost impossible to find anything.



Last edited by Viper1970; 12/16/16 11:15 PM.

CockpitPC1: Ryzen9 5950X|64GB DDR4|512GB M2 SSD|2TB M2 SSD|Geforce RTX3090|Reverb G2|Win11Pro
CockpitPC2: PhenomII X6 1100T|32GB DDR2|2x 2TB HDD|2x Geforce GTX660 SLI|Win7Pro64
ComUnitPC1: Ryzen9 3900XT|32GB DDR4|2x 2TB HDD|Geforce RTX2070|Win11 Pro
ComUnitPC2: PhenomII X6 1100T|16GB DDR2|2x 2TB HDD|Geforce GTX660|Win7Pro64
ComUnitPC3: AthlonII X2 250|2GB DDR2|2TB HDD|Geforce 5950Ultra|2x VoodooII SLI|WinXPPro32&WinME
ComUnitPC4: K6-2+|768MB SDR|640GB HDD|Geforce 256DDR|VoodooI|Win98SE
#4321269 - 12/19/16 01:41 PM Re: Anyone here, owning a PDF of the TM F22 Pro Manual?!? [Re: Viper1970]  
Joined: Nov 2001
Posts: 3,955
Sokol1 Offline
Senior Member
Sokol1  Offline
Senior Member

Joined: Nov 2001
Posts: 3,955
Internet
What exactly you need program for pot' that only TM soft allow?

#4322086 - 12/21/16 03:19 PM Re: Anyone here, owning a PDF of the TM F22 Pro Manual?!? [Re: Viper1970]  
Joined: Dec 2010
Posts: 1,179
Viper1970 Offline
Member
Viper1970  Offline
Member

Joined: Dec 2010
Posts: 1,179
Bavaria, near Munich
Hello Sokol,

I need it for things like Antenna Range, Antenna Up & Down, Auto Altitude Hold Up & Down (Collective), Manual Override Wing Sweep, Manual Nozzle Control (Harrier) and so on...

It's for simulators, which aren't able to use such things with analog axis. This way you could program any poti to create the needed keystrokes to control analog inputs with a digital way.

The only hardware I know which was able to do this in a really useable way, was the old F22 & TQS (F22 X-Y Axis, TQS Antenna-Range-Throttle Axis and over the TQS also the RCS Axis) or of course the FLCS & TQS and only for the Throttle axis the old WCS Mark 2. The other more modern Hardware (use of USB) is the HOTAS Cougar. It's also the last Thrustmaster stick to which you could download the programming directly to the internal chip. No need to run a software in the background, which controls the programming. This way you could use the HOTAS once programmed in every OS, for example old simulations running under W98, too. You could even use it with Linux if you like.

With the new HOTAS Warthog you couldn't do this. You have to run Win Vista at a minimum and the TARGET-Software has to run in the background for programming more complex things. A huge step backward compared to the Cougar in my opinion. Without TARGET it's just a simple DirectX Controller.


CockpitPC1: Ryzen9 5950X|64GB DDR4|512GB M2 SSD|2TB M2 SSD|Geforce RTX3090|Reverb G2|Win11Pro
CockpitPC2: PhenomII X6 1100T|32GB DDR2|2x 2TB HDD|2x Geforce GTX660 SLI|Win7Pro64
ComUnitPC1: Ryzen9 3900XT|32GB DDR4|2x 2TB HDD|Geforce RTX2070|Win11 Pro
ComUnitPC2: PhenomII X6 1100T|16GB DDR2|2x 2TB HDD|Geforce GTX660|Win7Pro64
ComUnitPC3: AthlonII X2 250|2GB DDR2|2TB HDD|Geforce 5950Ultra|2x VoodooII SLI|WinXPPro32&WinME
ComUnitPC4: K6-2+|768MB SDR|640GB HDD|Geforce 256DDR|VoodooI|Win98SE
#4322484 - 12/22/16 07:26 PM Re: Anyone here, owning a PDF of the TM F22 Pro Manual?!? [Re: Viper1970]  
Joined: Nov 2001
Posts: 3,955
Sokol1 Offline
Senior Member
Sokol1  Offline
Senior Member

Joined: Nov 2001
Posts: 3,955
Internet
Well, I find there printed manual for T22PRO and for TQS (and WCS Mk. II).
The first with 100 pages and TQS with 50 pages (WCS don't look).

See something about make throttle axis press 5 different keys based in position + Afterburner and Idle. Is this?

I can send this for you - but mail from this corner of the world is expensive (and unsure) a small box under 1 KG will cost ~25/30$ for USA, for example.

http://www2.correios.com.br/sistemas/efi/consulta/precos/default.cfm

I think that VKB Njoy32 can do all this, their profiles is stored in EPROM and don't use soft in background - one that can clarify this is VictorUS in VKB Forum.
Their version of Njoy32 for DIY was sold for about 60$ in FSC, but was discontinued - little interest and too "advanced" for common users, giving headaches for VKB support - now only if find one in IL-2(ru) flea market.

Maybe KREML F2/L2 JoyCtrl controller is option too, but only documentation and Russian.

https://www.youtube.com/user/JoyCtrl











#4322825 - 12/23/16 11:55 PM Re: Anyone here, owning a PDF of the TM F22 Pro Manual?!? [Re: Viper1970]  
Joined: Dec 2010
Posts: 1,179
Viper1970 Offline
Member
Viper1970  Offline
Member

Joined: Dec 2010
Posts: 1,179
Bavaria, near Munich
Hello Sokol,

thank's for your help! Yes, that's a little bit too expensive for me at the moment. Have tried a bit the last days with the F22 Pro and I think the differences aren't so much between the FLCS and the F22.

Never had the chance to test a hardware with the VKB Njoy32. I hoped, as I bought the Defender Cobra, that it has a Njoy board in, but I get the version with the cheap microcontroller in. Sadly most of the versions sold here in Europe have this cheap board. The board itself isn't available anymore and it wasn't easy to get here in Europe back those days it was available.

Most of the good hardware solutions for cockpit building are from USA or Russia. It's always hard to get those things here in Germany and if there is a way it's usually an expensive way. You have to pay the shipping costs and the VAT and some special extra cost for importing electronics if there price is in the higher range.

For now I have to live with the selfmade cockpit electronics made out of old Thrustmaster boards for the HOTAS and the Pokeys for the pit itself. Later I will change to Thrustmaster Cougar electronics for my changeable HOTAS, but as I have three different systems I also need three Cougars and that's a bit too expensive at the moment.

If I have the Cougar electronics, I still can use the FLCS or F22 grip-boards for my exchangeable stick-grips, cause they are also compatible with the Cougars base. That's my dream for the future, cause there is no more need for dual-boot to DOS for the programming of the HOTAS and also no more need for the old PS/2 keyboard interface and the serial mouse. All is only connected via USB. That's the way it should be.

Have also tried to find a way for only using one Cougars electronics for all the throttle, collective and stick-bases, but then you have to put the electronics outside the HOTAS-systems, having only the pots and knobs inside the HOTAS itself, and connect them over a cable with a plug. It's possible, but very complicated, cause of the many pins you have to use for connecting the electronics to the HOTAS. the other drawback is, that you have to recalibrate all potis every time you use them in the digital way.


CockpitPC1: Ryzen9 5950X|64GB DDR4|512GB M2 SSD|2TB M2 SSD|Geforce RTX3090|Reverb G2|Win11Pro
CockpitPC2: PhenomII X6 1100T|32GB DDR2|2x 2TB HDD|2x Geforce GTX660 SLI|Win7Pro64
ComUnitPC1: Ryzen9 3900XT|32GB DDR4|2x 2TB HDD|Geforce RTX2070|Win11 Pro
ComUnitPC2: PhenomII X6 1100T|16GB DDR2|2x 2TB HDD|Geforce GTX660|Win7Pro64
ComUnitPC3: AthlonII X2 250|2GB DDR2|2TB HDD|Geforce 5950Ultra|2x VoodooII SLI|WinXPPro32&WinME
ComUnitPC4: K6-2+|768MB SDR|640GB HDD|Geforce 256DDR|VoodooI|Win98SE
#4323548 - 12/27/16 12:03 AM Re: Anyone here, owning a PDF of the TM F22 Pro Manual?!? [Re: Viper1970]  
Joined: Dec 2016
Posts: 454
Kb1rd1 Offline
Member
Kb1rd1  Offline
Member

Joined: Dec 2016
Posts: 454
Hi Viper I don't/didn't have the F22 so no Manual but I do have some of the old TM Programming Notes and how to Change .B50 and.M50 files into .f22 and .m22 Files , I will attach a Zipfile below with those and a few other files I still have if I can figure out how? might have to copy and paste them ? I see how to add Pics but not files , maybe I can't.


KB


My FLCS+TQS Conversion here on SimHQ

http://simhq.com/forum/ubbthreads.php/topics/4324940/1
#4323678 - 12/27/16 03:13 PM Re: Anyone here, owning a PDF of the TM F22 Pro Manual?!? [Re: Viper1970]  
Joined: Nov 2001
Posts: 3,955
Sokol1 Offline
Senior Member
Sokol1  Offline
Senior Member

Joined: Nov 2001
Posts: 3,955
Internet
This forum has no option for upload files, use a file host.

Examples - no register required, just email:

https://wetransfer.com/
http://www.dropsend.com/#send_file

Send the zip file for your email, look for the link in the message and past there (link is valid for one week).

#4323735 - 12/27/16 06:05 PM Re: Anyone here, owning a PDF of the TM F22 Pro Manual?!? [Re: Sokol1]  
Joined: Dec 2016
Posts: 454
Kb1rd1 Offline
Member
Kb1rd1  Offline
Member

Joined: Dec 2016
Posts: 454
Originally Posted By: Sokol1
This forum has no option for upload files, use a file host.

Examples - no register required, just email:

https://wetransfer.com/
http://www.dropsend.com/#send_file

Send the zip file for your email, look for the link in the message and past there (link is valid for one week).



Thanks Sokol1 , I didn't realise that , it explains why I find a lot of dead links here so I will Copy and Paste the Programming Notes I have here in Extra Posts instead so Others can find them if they need them too.

KB


My FLCS+TQS Conversion here on SimHQ

http://simhq.com/forum/ubbthreads.php/topics/4324940/1
#4323740 - 12/27/16 06:08 PM Re: Anyone here, owning a PDF of the TM F22 Pro Manual?!? [Re: Viper1970]  
Joined: Dec 2016
Posts: 454
Kb1rd1 Offline
Member
Kb1rd1  Offline
Member

Joined: Dec 2016
Posts: 454
CONVERTING FLCS B50 and M50 Files to F22 F22 and M22 Files


1. Rename the .B50 and .M50 extensions to .F22 and .M22.
2. Delete any references to /A.
3. Add this line:

PORTB1 IS TG1.

That's it. BTW it will read and download .B50 & .M50 files, but you need to ditch the /A and add the PORTB1 IS TG1 so it's best to rename the extensions since the FLCS won't work with that last line.

The PORTxx IS xxn is necessary because you can have the normal four
joystick buttons assigned to any F-22 and/or TQS hat position or switch that you want.

PORTB1 IS H1U would put the trigger on the F-22 Hat1 up position.

PORTB1 IS T9 would put the trigger on the TQS T-9 switch etc.

PORTB2 IS S4 would put button two on F-22 switch S4.

PORTB3 IS

PORTB4 IS work the same - you can assign those four normal
Joystick buttons to anywhere on the FLCS and TQS you
want - just can't exceed the four analog buttons
available.

BUT you can also still program them as key presses at
the same time if you want to and they will do whatever is assigned in the game for that analog joystick button to do AND do also do what you program the switch to do using its normal programming macros or keystrokes (/P /R etc.)

The line PORTB2 IS T2 along with the line

BTN T2 /P a r ALT c /R j f c k CTL t

would allow the following output when pressed:

It would do whatever the game assigns to the normal joystick button 2 and
it would output 'a' 'r' and 'ALT c'

When release it would output 'j' 'f' 'c' 'k' and 'CTL t'.

All Credit to Buzz Hoffman


My FLCS+TQS Conversion here on SimHQ

http://simhq.com/forum/ubbthreads.php/topics/4324940/1
#4323765 - 12/27/16 06:33 PM Re: Anyone here, owning a PDF of the TM F22 Pro Manual?!? [Re: Viper1970]  
Joined: Dec 2016
Posts: 454
Kb1rd1 Offline
Member
Kb1rd1  Offline
Member

Joined: Dec 2016
Posts: 454
More Notes I made Over the Years ...All Credit to Buzz Hoffman again

[size:11pt]From buzz@thrustmaster.com Sat Nov 16 03:11:50 1996
Newsgroups: comp.sys.ibm.pc.games.flight-sim
Subject: Re: Programming the TM F-22 Pro
From: buzz@thrustmaster.com (Buzz Hoffman)
Date: Sat, 16 Nov 96 01:11:50 GMT

QUESTION

Can anyone post a list of Programming Changes between the FLCS-16 and the F-22 Old Command vs. New Commands


I have written about 40 of my own B50 files and I have not had one port over 100% correctly yet. And what's up with this new PORT IS command. Win95 won't even recognize my trigger unless I use the PORTB1 IS TG1 command.

ANSWER

No real difference, aside from the added programmability capabilities which use some new commands - FLCS commands work the same way on the F-22 as they did on the FLCS.

Only important changes from one to the other are:

PORTnn IS - This allows you to assign the normal joystick analog buttons to any hat or switch position on the F-22 and/or the TQS which is why you need to have PORTB1 is TG1 in each file in order to get an analog trigger on F-22 Trigger position one. Had to do it that way so you could move it to wherever you wanted at will.

PORTB1 IS H4L would work just the same, and the trigger would now be on Hat 4 left, etc.

The /A command is no longer valid and should be removed from all files – the PORTnn IS replaces this and is more flexible.

The addition of coding for ALL keyboard keys so you do not need to use RAW scan codes anymore - the 'grey' keys that required RAW scan codes now are directly programmable using:

AUXINS - Insert, AUXDEL - Delete, AUXPGUP - Page Up, AUXPGDN - PGDN,
AUXHOME - HOME, AUXEND - End, AUXUAROW, AUXDAROW, AUXLAROW,
AUXRAROW, for the four arrow keys.

Also, with the advanced programming that is in there you can do 'selectable'
selectors now. By that I mean you can make pretty much every F-22 and TQS
switch and hat (including S3) act like S3 /I /O did on the FLCS, so that ups
the number of possible functions by a factor of oh, I don't know 20X what you
could have on the FLCS/TQS combo.

You can also do some pretty neat timed command stuff and things like
converting panned views to automatically pan to a fixed position, etc, etc,
etc.





They weren't in the manual <G>. They were discussed in some of the papers
on their web site AN0002.TXT and AN0002A.TXT. They call them logical flags
and here's an excerpt from the start of the paper AN0002A. They can be
very powerful. I used them in FS95 with my F-22/TQS setup to do things
that I couldn't do with regular programming.

Full AN0001.TXT and AN0002A.TXT I will post in Following Posts , I don’t have AN0002.txt

KB.


------------------------------------------------------------------------------





QUESTION

> Perhaps I didn't read the manual carefully but can't remember anything
> about these "logical switches". Can you tell us more about them? I always
> thought TM should provide something like (bool or integer) variables that
> are independent from S3 or the dogfight switch.

-----------------------------------------------------------------------------

From buzz@thrustmaster.com Mon Feb 17 23:02:17 1997
Newsgroups: comp.sys.ibm.pc.games.flight-sim
Subject: Re: TM F-22 Pro: FLCS .b50 to .F22 file conversion utility or FAQ?
From: buzz@thrustmaster.com (Buzz Hoffman)
Date: Mon, 17 Feb 97 21:02:17 GMT


We do, but this stuff is the 'advanced' stuff. What with the typical reviewer
these days not being capable of figuring out how to do a simple DOS text file,
we didn't put that in the manual. That'd really throw them and then they'd
just complain that we made it too difficult - because they'd be forced to use
their imagination in order to make it do all the terrific things it's capable
of. After all, words are for people who are too stupid to understand
pictures, ya' know. 8)

p.s. relax all you reviewers, I'm just kiddin' - kinda' fun to yank your
chain for a change. 8)

It is pretty intense and it does require thought - so if you want to give it a
try visit our newly redesigned WEB page and download the files that have
the advanced programming stuff for both the FLCS and the F-22 Pro (the
FLCS advanced programming stuff applies to the F-22 Pro too.)

File names would be AN0001 and AN0002. Not sure if he has them there
as .zip files or self-extracting .zip files (.exe).






Here an example of how to get all 16 views in Warbirds with 8 being intuitive:
By the way, you have to have at least version 1.16 of the F-22 Pro microcode
to make this one work. (see below.)

16-view setup (intuitive 8-way, S3 adds Up):

DEF X1 (H3U AND NOT S3) OR H3UR OR H3UL rem KP8 if forward quadrant
DEF X2 (S3 AND NOT H3M) OR H3U rem Up if S3 or HU and no S3
DEF X3 H3UR OR H3R OR H3DR rem KP4 on right quadrant
DEF X4 H3DR OR H3D OR H3DL rem KP2 in back quadrant
DEF X5 H3DL OR H3L OR H3UL rem KP4 in left quadrant

BTN X1 /H KP8
BTN X2 /H KP5
BTN X3 /H KP6
BTN X4 /H KP2
BTN X5 /H KP4

Works well, and the view doesn't keep passing through forward as you
slide the hat from corners to side views.

with microcode V1.15 and earlier you need an extra line:

DEF X1 H3U AND NOT H3UR rem Fixup for H3U
DEF X2 (X1 AND NOT S3) OR H3UR OR H3UL rem KP8 in forward quadrant
DEF X3 (S3 AND NOT H3M) OR X1 rem Up if S3 or HU and no S3
DEF X4 H3UR OR H3R OR H3DR rem KP4 on right quadrant
DEF X5 H3DR OR H3D OR H3DL rem KP2 in back quadrant
DEF X6 H3DL OR H3L OR H3UL rem KP4 in left quadrant

BTN X2 /H KP8
BTN X3 /H KP5
BTN X4 /H KP6
BTN X5 /H KP2
BTN X6 /H KP4

Buzz





QUESTION


These problems associated with TM 8-way-hat programming is probably why the stick is not marketed to have 8-way support. In games like warbirds, the corner views generated by the 'HxUL' presses are somewhat erratic because of these 'unclean' sequences. For example, when you 'move your head' from 3 o clock to upper right with the hat, the view will bounce back and forth for about a second before it 'stabilizes'. If you pan clockwise, then the movement is smooth. Small problem it may seem, but it cripples the view system.

I'm rather disappointed that a reputable joystick designer such as TM would overlook this problem.



ANSWER

A straightforward programming of H1U, H1UL, etc. will result in exactly
what you describe here for me. I suspect this is a function of the
chip inside the F-22; newer chips may not do this.

I circumvented the problem by programming the views as follows:
DEF X10 (H1UR AND (H1U OR H1R))
DEF X11 (H1UL AND (H1U OR H1L))
DEF X12 (H1DR AND (H1D OR H1R))
DEF X13 (H1DL AND (H1D OR H1L))
DEF X14 (H1U AND NOT (H1UL OR H1UR))
DEF X15 (H1L AND NOT (H1UL OR H1DL))
DEF X16 (H1R AND NOT (H1UR OR H1DR))
DEF X17 (H1D AND NOT (H1DR OR H1DL))

BTN X10 RAW(#75 #74)
BTN X11 RAW(#75 #6B)
BTN X12 RAW(#74 #72)
BTN X13 RAW(#6B #72)
BTN X14 RAW(#75 #F0 #74 #F0 #6B)
BTN X15 RAW(#6B #F0 #75 #F0 #72)
BTN X16 RAW(#74 #F0 #75 #F0 #72)
BTN X17 RAW(#72 #F0 #6B #F0 #74)

BTN H1M RAW(#F0 #75 #F0 #74 #F0 #72 #F0 #6B)
BTN T3 /H LookUp



-- -----------------------------------------------------------------------



QUESTION

My TQS throttle also does not work anymore in F22 Lightning - it used to when
combo'd with my F-16. Now I either get 0% or BURN.

Any help is greatly appreciated either email or in this group.>

ANSWER

If you are running it as a digital throttle, then make sure the file with the
digital throttle statement you have in it has been downloaded and then run
F22SETUP and calibrate it once for your computer and the new stick you just
hooked it up to.

Buzz



Last edited by Kbird; 12/27/16 06:33 PM.

My FLCS+TQS Conversion here on SimHQ

http://simhq.com/forum/ubbthreads.php/topics/4324940/1
#4323766 - 12/27/16 06:37 PM Re: Anyone here, owning a PDF of the TM F22 Pro Manual?!? [Re: Viper1970]  
Joined: Dec 2016
Posts: 454
Kb1rd1 Offline
Member
Kb1rd1  Offline
Member

Joined: Dec 2016
Posts: 454
THRUSTMASTER AN0001.TXT F22 Programming Notes


Thrustmaster Application Note AN-0001
Advanced Key Programming Techniques for the FLCS
Copyright (c) 1995 Thrustmaster, Inc.
All Rights Reserved

Revision 1.00 July 21, 1995

Introduction
------------

The FLCS provides a comprehensive set of key functions which directly
handle the majority of the keying requirements for most games by simply
listing the keystrokes required. Situations do arise, however, that
require some non-standard handling. This note describes the built-in
functions in some detail, and also outlines the various techniques
that can be used when the built-in functions are not sufficient to
handle the requirement at hand.

Keyboard Basics
---------------

Programming the FLCS to perform a particular function is basically a
matter of getting it to send the right sequence of key codes to the PC.
While the FLCS takes care of this for most of the standard keys and
functions, advanced techniques require a basic understanding of how
the keyboard itself interacts with the PC.

The keyboard operates by sending 'Make' and 'Break' codes to the PC.
These 'codes' are sequences of one or more data bytes. They are not
'ASCII Characters', but just indicate which keys have been moved.
When you press a key, the 'Make' code is sent. When you release the
key, the 'Break' code is sent. Each key on the keyboard has a unique
sequence of codes assigned to it for its 'Make' and 'Break' sequences.

The PC can't actually determine whether a key is pressed or released
at any particular time. Rather, it simply keeps track of the 'Make'
and 'Break' codes. When it receives a 'Make' code, it flags the key
as pressed until it receives the corresponding 'Break' code, at which
time it flags the key as released.

Since the sequencing of the 'Make' and 'Break' codes is important to
the following discussion, it will be convenient to adopt some notation
for them. In what follows, the '+' character will be used to indicate
the 'Make' code for a key, and the '-' character will be used to
indicate the 'Break' code. For instance:
+a -a

would indicate the press and subsequent release of the 'a' key.

Combinational Keypresses
------------------------

Generating single keypresses or strings of single keypresses with the
FLCS is a straightforward process. The desired characters are simply
listed in the BTN statement. There are several situations, though, that
require that multiple keys be pressed simultaneously, and these can
create problems. The correct programming method is often not clear as
it depends on how the game processes the keystrokes. The remainder of
this note will attempt to explain the different techniques available
and when these techniques should be used.

SHF, ALT, and CTL
-----------------

The most common form of simultaneous keypress is when it is necessary
to generate a modified key like CTRL-C, ALT-J, or even 'A', since the
upper-cased character implies that the SHF key is held down while the
key is pressed. It is generally a simple matter to program these
combinations with the FLCS, you simply precede the character with the
appropriate modifier:

BTN S1 CTL c

Any time you specify an upper-case character, the FLCS generates the
SHF code for you, so;

BTN S1 A

is actually treated as:

BTN S1 SHF a

and the key sequence generated is:

+SHF +a -SHF -a

It is worth noting that only the SHF, CTL, and ALT keywords are
treated as modifiers. The variations that specify particular keys,
such as LALT and RSFT are treated as regular keys. So if you program
something like:
BTN S1 LALT j

the sequence that is generated is:

+LALT -LALT +j -j

and an actual ALT-J combination does not occur. Programming it as:

BTN S1 ALT j

produces the desired:

+ALT +j -ALT –j





Simultaneous Groups
-------------------

As noted in the FLCS manual, if you enclose a set of characters in
'curly brackets' it causes the ordering of 'Make' and 'Break' codes to
be modified so that the keys in the group are pressed simultaneously:

BTN S1 {a b c}

will send the sequence:
+a +b +c -a -b -c


This function is useful when two or more keys need to be pressed at
the same time, but it does not hold the keys down for any appreciable
length of time. They are pressed and then immediately released. The
simultaneous group is also useful where a game requires a particular
SHF or ALT key to be used. The normal SHF, ALT, and CTL modifiers
always use the codes for the Left key, i.e. LSFT. If you needed 'Right
Shift x' you could program it as:

BTN S1 {RSFT x}

and force the use of the Right Shift key. The generated sequence would
be:
+RSFT +x -RSFT -x


Repeating Keypresses
--------------------

It frequently becomes necessary in FLCS programming to generate keys
that are 'held down' to achieve some particular function. Normally this
can be done by just specifying a single character as a repeating key:

BTN S1 a

This generates a sequence of multiple 'Make' codes while the button
is held down, and generates a single 'Break' code when the button is
released.

This is essentially what the keyboard does, but there is one fundamental
difference. When another button is pressed and the FLCS sends another
character, the FLCS will send a 'Break' code for the repeating character,
even if the button (S1 in this example) is still held down. The keyboard
does not send the 'Break' code until the key is released. For example,
if you programmed:
BTN S1 a
BTN S2 b

then pressed S1, pressed S2, released S2, and then released S1, the FLCS
would generate something like:

+a +a +a +a -a +b +b +b +b -b

whereas if you did the same thing on the keyboard using the actual 'a'
and 'b' keys, the sequence would look like this:

+a +a +a +a +b +b +b +b -b -a

The FLCS was coded this way on purpose. When you're using the keyboard,
you are generally aware of which keys you've got pressed at any particular
time, and inappropriate combinations don't occur very often. When you're
using the FLCS, it's not always apparent what keys you are pressing. For
example, look at the program segment:

BTN S1 A
BTN S2 b

If the FLCS actually emulated the keyboard, the generated sequence would
be:
+SHF +a +a +a +a +b +b +b +b -b -SHF -a

if you pressed them in the order outlined for the first example. If you
looked at this on the screen, you would see 'AAAABBBB', rather than the
'AAAAbbbb' that you would expect, since the SHF key has not been released.
Forcing the 'Break' when S2 is pressed changes the sequence to:

+SHF +a +a +a +a -SHF -a +b +b +b +b -b

which is more in keeping with the intent of the program. This is a fairly
simple example, worse problems could occur. If S1 were defined as 'ALT a',
then so long as S1 were held, the PC would see every key coming at it as
having the ALT modifier added, i.e. you'd not only get 'ALT a' like you
wanted, you'd get 'ALT b', too, since the ALT would still be down from
the S1 press. Disastrous combinations could occur, consider what might
happen if a program contained something like:

BTN S1 CTL a
BTN S2 ALT j
BTN S3 DEL

and all three buttons were pushed. The PC would see a simultaneous press
of CTL-ALT-DEL, and would likely reboot. Probably not exactly what you
wanted to happen.

Hold Codes
----------

In some circumstances, it is necessary to hold the key down even when
other buttons are pressed. The most common examples are keys that move
control surfaces, and situations that require multiple keys to be held
to achieve a particular view. For instance, suppose you wanted to program
a hat to control the rudders. You might try (assuming 'l' and 'r' are
the left and right rudder keys respectively)

BTN H1L l
BTN H1R r

This would activate the rudders, but because of the way the repeating
keys operate on the FLCS, as soon as you pushed another button the rudder
would return to it's neutral position. The use of the /H code would get
around the problem, since it does not generate a 'Break' until the Hat
is released. The coding would look like this:

BTN H1L /H l
BTN H1R /H r

The /H codes are also slightly different in the way they appear on the
screen. There is only a single 'Make' code generated, so you only see
one character when you press the button. The PC will see the key as held,
however, and in situations where the /H is required, the absence of the
repeated 'Make' codes is of no consequence. The game will be looking
only at the first 'Make' code in such situations, anyway.

Holding down multiple keys is simply a matter of adding them to the
list. To hold down KP8 and KP5 for a combinational view, the program
would look like this:

BTN H1U /H KP8 KP5

When the button was pressed, the sequence generated would be:

+KP8 +KP5

and when the button was released, the sequence would be:

-KP8 -KP5

Any characters generated by other buttons while H1U was held would be
sent normally,

While /H codes are very useful, they are not without a few problems.
First, as mentioned earlier in the discussion of repeating keys, it's
generally not possible to use them for anything other than unmodified
keys. The use of upper-case, SHF, ALT or CTL modifiers creates problems
in that the PC will apply those modifiers to all characters transmitted
while the /H is held down, i.e.

BTN S1 /H A

will upper-case all keys transmitted while S1 is pressed. Consequently,
the use of such modifiers must generally be avoided in /H groups.

A second limitation places on /H groups is that they cannot be used
with the /I and /O, or the /U, /M, and /D modifiers. The reason for
this is not immediately obvious, but to have allowed them to be used
there would create a strong likelihood of 'stuck' keys during operation.
Consider the following example:

BTN S1 /O /H a
/I /H b

Now suppose that during game play, you were to press S1, then press S3,
then release S1. Since S3 was not pressed initially, the /O side of the
definition would be in control. The initial press of S1 would send the
'Make' code for the 'a' as expected. When S3 was pressed, that would
put the /I side of the definition in control. Subsequently releasing
S1 would result in the 'Break' break code for the 'b' being sent. The
sequence at the PC would be:
+a -b

The PC has seen the 'a' pressed, but never sees it released, so it will
consider it to be still pressed. The key is 'stuck', and will remain that
way until a 'Break' for the 'a' is sent, either by hitting the 'a' on the
keyboard, or sending a complete 'a' with the FLCS. It may remain stuck
even if you exit the game.

The limitation on the /I, /O, /U, /M and /D codes can be overcome in a
couple of ways. One is simply to come up with a scheme that doesn't need
them. The use of the /I and /O codes with held characters most commonly
shows up in view switching situations. One method that works in some
situations is to just use unmodified views on the hat, then add the
modifier key to button S3. For example, suppose that the four basic
views are KP8, KP6, KP2, and KP4. Also assume that adding KP5 to these
four will add the UP modifier, and that adding KP0 to them will add the
DOWN modifier, i.e. KP4 is Look Left and KP4 + KP5 is Look Up and Left.
In that case, a setup like this:

BTN H1U /H KP8 rem Look Up
BTN H1L /H KP4 rem Look Left
BTN H1D /H KP2 rem Look Back
BTN H1R /H KP6 rem Look Right

BTN S3 /H KP5 rem Add UP Modifier
BTN S4 /H KP0 rem Add DOWN Modifier

may prove workable, giving 12 views via combinations of the hat and the
S3 and S4 keys.

If no suitable arrangement can be found using the standard keys, it is
possible to generate held keys within /I-/O and /U-/M-/D groups using
the RAW function.


RAW Data Codes
--------------

RAW data codes allow you complete control over what the FLCS sends to
the PC. You specify the actual codes sent to the PC by their hex values.
There are no real limits placed on the use of RAW codes, they can be
used within the /I-/O and /U-/M-/D groups, and so you can generate any
key sequence that you want to. A complete listing of the RAW sequences
for the 'Make' and 'Break' codes on the 101-Key Keyboard is listed at
the end of this note.

The RAW data function was designed for situations where the normal FLCS
functions would not handle the task at hand. The most common use of
them is to generate the so-called 'non-native' keys that the FLCS will
not normally transmit. If you look over the RAW codes chart, you'll see
that the majority of keys send a single RAW code for a 'Make', and send
the value '#F0' followed by that same RAW code for the 'Break'. These
are the 'native' keys, and they correspond roughly to the keys on the
older 84-Key AT keyboards. The other 'non-native' keys are primarily
associated with the 101-Key Keyboard, and usually have an extra '#E0'
added to the sequence. These keys include the auxiliary 'T-Cursor' pad
and the other keys in the section of the 101-Key Keyboard between the
main keys and the numeric pad.

The other primary use of the RAW codes is to generate key combinations
that cannot normally be generated by the FLCS, such as the use of held
characters within /I-/O and /U-/M-/D Groups. The basic method for
simulating a /H group is to generate a /P-/R set with the 'Make' codes
on the /P side and the 'Break' codes on the /R side. For instance:

BTN S1 /P RAW(#1C)
/R RAW(#F0 #1C)

produces the same output as:

BTN S1 /H a

with the 'Make' code sent when the button is pressed and the 'Break'
code being sent when it's released.

As mentioned earlier, using RAW codes within the /I-/O and /U-/M-/D
groups is permitted, but it does not get around the basic problem with
the 'stuck' keys. You have to set the programming up so that the problem
does not occur. The usual method is to include the 'Make' codes for a
single function on the /P side, and to include the 'Break' codes for all
possible functions on the /R side. This is generally possible since
multiple 'Make' codes for a key generally do no harm, and 'Break' codes
for keys that have not been 'Made' are generally ignored. For example.
the program segment:

BTN H1U /O /H f g
/I /H KP5 KP8

would not compile, but the equivalent:

BTN H1U /O /P RAW(#2B #34) rem Make 'f' and 'g'
/R RAW(#F0 #2B #F0 #34) rem Break f, g
/I /P RAW(#73 #75) rem Make KP5 and KP8
/R RAW(#F0 #73 #F0 #75) rem Break KP5 & KP8

would compile just fine. This does not avoid the stuck key problem
though. You need to 'Break' both possibilities on both sides, even
though you will only 'Make' one of the codes:

BTN H1U /O /P RAW(#2B #34) rem Make 'f' and 'g'
/R RAW(#F0 #2B #F0 #34 #F0 #73 #F0 #75) rem Break f, g, KP5 & KP8
/I /P RAW(#73 #75) rem Make KP5 and KP8
/R RAW(#F0 #2B #F0 #34 #F0 #73 #F0 #75) rem Break f, g, KP5 & KP8

One thing to watch for here is that all those RAW codes take some time
to send, about 50% longer than a regular /H group. The best thing to do
is to set the RATE parameter down to 0, increase it only if you experience
problems with the game in question. Most of the games will work just fine
with a RATE of 0, the exceptions are games that only handle 1 key stroke
per frame.

Keyboard Chart
--------------

The following chart shows the 'Make' and 'Break' for the keys on the
standard 101-key keyboard. These are the codes necessary to use the RAW
function in FLCS programming.

The keyboard modifies certain of the 'non-native' key code sequences
depending on the Shift and NumLock states. These additions can normally be
ignored when programming the FLCS and the normal non-shifted sequence used.

-----------------------------------------------------------------------------

*** STANDARD 101-KEY KEYBOARD SCAN CODE SEQUENCES ***
For Use with the FLCS 'RAW' Programming Function

** Main Keyboard **
----------------------------------------------------------------------------
Key Make Code Break Code Notes
----------------------------------------------------------------------------
` #0E #F0 #0E
1 #16 #F0 #16
2 #1E #F0 #1E
3 #26 #F0 #26
4 #25 #F0 #25
5 #2E #F0 #2E
6 #36 #F0 #36
7 #3D #F0 #3D
8 #3E #F0 #3E
9 #46 #F0 #46
0 #45 #F0 #45
- #4E #F0 #4E
= #55 #F0 #55
Backspace #66 #F0 #66

Tab #0D #F0 #0D
Q #15 #F0 #15
W #1D #F0 #1D
E #24 #F0 #24
R #2D #F0 #2D
T #2C #F0 #2C
Y #35 #F0 #35
U #3C #F0 #3C
I #43 #F0 #43
O #44 #F0 #44
P #4D #F0 #4D
[ #54 #F0 #54
] #5B #F0 #5B
\ #5D #F0 #5D

Caps Lock #58 #F0 #58
A #1C #F0 #1C
S #1B #F0 #1B
D #23 #F0 #23
F #2B #F0 #2B
G #34 #F0 #34
H #33 #F0 #33
J #3B #F0 #3B
K #42 #F0 #42
L #4B #F0 #4B
; #4C #F0 #4C
' #52 #F0 #52
Enter #5A #F0 #5A

Left Shift #12 #F0 #12
Z #1A #F0 #1A
X #22 #F0 #22
C #21 #F0 #21
V #2A #F0 #2A
B #32 #F0 #32
N #31 #F0 #31
M #3A #F0 #3A
, #41 #F0 #41
. #49 #F0 #49
/ #4A #F0 #4A
Right Shift #59 #F0 #59

Left Ctrl #14 #F0 #14
Left Alt #11 #F0 #11
Space #29 #F0 #29
Right Alt #E0 #11 #E0 #F0 #11
Right Ctrl #E0 #14 #E0 #F0 #14
ESC #76 #F0 #76
----------------------------------------------------------------------------


** Function Keys **
----------------------------------------------------------------------------
Key Make Code Break Code Notes
----------------------------------------------------------------------------
F1 #05 #F0 #05
F2 #06 #F0 #06
F3 #04 #F0 #04
F4 #0C #F0 #0C
F5 #03 #F0 #03
F6 #0B #F0 #0B
F7 #83 #F0 #83
F8 #0A #F0 #0A
F9 #01 #F0 #01
F10 #09 #F0 #09
F11 #78 #F0 #78
F12 #07 #F0 #07
----------------------------------------------------------------------------


** Numeric Pad **
----------------------------------------------------------------------------
Key Make Code Break Code Notes
----------------------------------------------------------------------------
NumLok #77 #F0 #77
KP- #7B #F0 #7B
KP/ #E0 #4A #E0 #F0 #4A Notes 1, 2
KP. #71 #F0 #71
KP* #7C #F0 #7C
KP+ #79 #F0 #79
KPEnter #E0 #5A #E0 #F0 #5A

KP0 #70 #F0 #70
KP1 #69 #F0 #69
KP2 #72 #F0 #72
KP3 #7A #F0 #7A
KP4 #6B #F0 #6B
KP5 #73 #F0 #73
KP6 #74 #F0 #74
KP7 #6C #F0 #6C
KP8 #75 #F0 #75
KP9 #7D #F0 #7D
----------------------------------------------------------------------------


** Auxiliary Pads **
----------------------------------------------------------------------------
Key Make Code Break Code Notes
----------------------------------------------------------------------------
Ins #E0 #70 #E0 #F0 #70 Notes 1, 2, 3
Home #E0 #6C #E0 #F0 #6C Notes 1, 2, 3
Pg Up #E0 #7D #E0 #F0 #7D Notes 1, 2, 3
Del #E0 #71 #E0 #F0 #71 Notes 1, 2, 3
End #E0 #69 #E0 #F0 #69 Notes 1, 2, 3
Pg Dn #E0 #7A #E0 #F0 #7A Notes 1, 2, 3

Up Arrow #E0 #75 #E0 #F0 #75 Notes 1, 2, 3
Left Arrow #E0 #6B #E0 #F0 #6B Notes 1, 2, 3
Right Arrow #E0 #74 #E0 #F0 #74 Notes 1, 2, 3
Down Arrow #E0 #72 #E0 #F0 #72 Notes 1, 2, 3

PrtSc #E0 #12 #E0 #7C #E0 #F0 #7C #E0 #F0 #12
Ctl-PrtSc #E0 #7C #E0 #F0 #7C
Alt-PrtSc #84 #E0 #84
ScrLk #7E #F0 #7E
Pause #E1 #14 #77 #E1 #F0 #14 #77 None
Ctrl-Break #E0 #7E #E0 #F0 #7E None

----------------------------------------------------------------------------


** Notes **
----------------------------------------------------------------------------

Note 1

If Left Shift is Down:

Make Sequence - #E0 #F0 #12 #** #**
Break Sequence _ #** #** #** #E0 #12

Note 2

If Right Shift is Down:

Make Sequence - #E0 #F0 #59 #** #**
Break Sequence - #** #** #** #E0 #59

Note 3

If Num Lock is On:

Make Sequence - #E0 #12 #** #**
Break Sequence - #** #** #** #E0 #F0 #12

The '#** #**' entry represents the Make Code and the '#** #** #**' entry
represents the Break Code specified for the character in the main chart
and should be replaced with those sequences in actual use.

-----------------------------------------------------------------------------
-- End of Document --

Last edited by Kbird; 12/27/16 06:40 PM.

My FLCS+TQS Conversion here on SimHQ

http://simhq.com/forum/ubbthreads.php/topics/4324940/1
#4323767 - 12/27/16 06:38 PM Re: Anyone here, owning a PDF of the TM F22 Pro Manual?!? [Re: Viper1970]  
Joined: Dec 2016
Posts: 454
Kb1rd1 Offline
Member
Kb1rd1  Offline
Member

Joined: Dec 2016
Posts: 454
THRUSTMASTER AN0002A.TXT F22 Programming Notes


*** ThrustMaster Application Note AN0002A ***
Advanced Logical Programming Techniques for the F22
Copyright (c) 1996, 1997 Thrustmaster, Inc.
All Rights Reserved

Draft Revision 2.05 - January 11, 1997

Still found here
http://home.arcor.de/ulf.muckel/documentation/an0002a.txt


Overview
========

In addition to the normal keyboard programming functions available in
the F22, there is an additional group of functions that provide the
ability to generate several types of advanced operations using the
buttons and analog controls. While the basic BTN statement is effective
in most situations, these extended functions give the F22 additional
capability to handle control problems which cannot be done with the
standard function set.

These additional functions were not intended to be used as the primary
method of programming the F22. BTN-type statements are generally more
efficient in terms of both memory used and execution speed, as well as
being more easily understood. The extended functions should be viewed
as an additional set of tools available for use when the standard
functions cannot accomplish the desired result.


Note
====

This note references functions that were not available in F22 microcode
releases prior to V1.15. some earlier
F22 releases, specifically:

1. The flags references X25..X48.
2. Direct Toggle references (S1*, etc).
3. Assignment of flag references as Type 2 analog characters.
4. The comparator functions CMPLT and CMPGT.

If you use these and receive a message about an unrecognized function,
then you need a compiler update and you probably will also need a chip
update. If the compiler is a revision that supports the functions, but
the chip does not, you'll receive a message about needing a chip update.

Logical Processing
==================

This section explains the basics of the extended programming capabilities
and the functions that pertain to them.
Flags
-----

Central to this extended programming capability are a group of 48 'flags'.
and the statements that are used to control them. Flags are similar to
buttons in that they can be either OFF or ON, but they have no physical
device directly associated with them. Rather, the conditions which cause
them to be either OFF or ON are defined in the F22 file.

The 48 Flags are referenced as X1 through X48. Flags can be referenced
just like any other button or switch on the F22:

BTN X7 /P x /R y

This is a valid statement and will cause the F22 to send a repeating
letter 'x' when the X7 flag turns ON, and a single 'y' when the X7 flag
turns OFF, exactly as it would if it referenced a button. Flags can have
toggles and multi-toggles associated with them, and are affected by IO
and UMD codes in the same manner as the regular buttons.


Logical Flag Control
--------------------

The flags don't have a physical button associated with them. Rather,
they are controlled by a number of statements which allow them to be
turned ON and OFF under a variety of conditions based on the state of
other buttons and flags or on the positions of the digital controls.

The primary statement for defining flag operation is the DEF statement.
It specifies under what conditions the flag will be OFF or ON using the
standard logical operators AND, OR, and NOT, as well as some special
functions which will be discussed later. The general form of the DEF
statement is;

DEF flag_id logical_equation

where the 'flag_id' is one of the valid flag references X1..X48 and
the 'logical_equation' is a valid combination of AND's, OR's, NOT's,
and references to other flags and buttons. For example:

DEF X7 S1 AND S2

would define flag X7 as being ON when both S1 and S2 were pressed, and
OFF otherwise. If we add a BTN statement for X7:

BTN X7 x

we would get a repeating 'x' character so long as both S1 and S2 were
pressed simultaneously.


Other flags may also be referenced in the logical equation. If we added
the line:

DEF X2 X7 OR S3

would cause X2 to be ON whenever either X7 was ON or S3 was pressed.
X7 would need to be defined elsewhere for it to have any meaning. If
we used the one from our previous example then X2 would be ON when S3
was pressed or when S1 and S2 were pressed simultaneously.

Generally DEF statements can be composed of any combination of AND,
OR, and NOT statements, left and right parentheses, and button or
flag references, so long they result in a valid logical equation, for
example:

DEF X1 (S1 AND NOT S2) OR (S3 AND (H1U OR H2U))

would turn X1 ON when S1 was pressed and S2 was released or when S3
and H1U were pressed or when S3 and H2U were pressed.


Toggles
-------

Every button, switch, and flag reference available in the F22 has an
associated 'toggle flag' associated with it. This flag is normally used
to determine the current toggle state for the /T codes. The toggle flag
can be referenced only in the 'logical equation', it cannot be DEF'd
nor can it be reference in a BTN statement.

To reference a toggle, simply use the regular name of the button or flag
with a '*' after it. For example, the toggle flag for S1 is S1*, that
for X27 is X27*, etc.

Toggle flags change state whenever the associated button or flag turns
ON. S1* will turn ON the first time S1 is pressed, OFF the second time,
ON the third time, etc.

This is useful in implementing Push On/Push Off type functions. For
instance:

DEF X1 S1*
BTN X1 a

Pressing S1 the first time would cause S1* to turn ON, in turn causing
X1 to turn ON, and the 'a' character would being to repeat continuously.
The 'a' would continue to repeat until S1 was pressed a second time. That
would set S1* OFF, X1 OFF, and the character would stop.




Analog Flag Control
-------------------

Flags can also be set ON or OFF using a Type 2 analog statement. To
do this, a regular Type 2 statement is written using a flag reference
in place of any or all of the characters. For example:

RNG 2 5 a b X1 d e

In this case, the RNG control would send the normal 'a', 'b', 'd', and
'e' characters for the first, second, fourth, and fifth zones just as a
normal Type 2 statement would. When the RNG control is in zone 3, however,
no character will be sent. Rather, flag X1 will turn ON and stay on so
long as the RNG pot is in the third zone. Moving out of the third zone
will turn X1 OFF again.

When flags are generated by analog controls, there will not be a DEF
statement for that flag. The Type 2 statement is sufficient to define
when the flag is OFF and when it is ON. The flag itself can be
referenced as a BTN macro, or it can be referenced in DEF statements
in combination with other flags and buttons and the logical operators.
Any of the controls that can be programmed as Type 2 can be used to
generate the flags characters.


The Delay Function
------------------

The DELAY function adds a fixed time between the time that the logical
equation produces a true state and the time that the flag actually turns
ON. Syntax is:

DEF X1 DELAY(1000) S1 AND S2

This statement defines X1 to turn on 1 second (1000 milliseconds) after
S1 and S2 are pressed simultaneously. If either S1 or S2 is released,
the delay will be stopped. If X1 has not turned ON yet, it will remain
OFF, if it has turned ON, then it will turn OFF immediately. The delay
will also be reset, so if S1 and S2 are subsequently pressed again. the
entire 1 second delay will start over.

Times are expressed in milliseconds (1/1000ths of a second). The actual
resolution is around 30 milliseconds, and the minimum effective values
is also 30 milliseconds, so any value between 1 and 59 will produce
about a 30 millisecond delay, 60 through 89 will produce a 60
millisecond delay, etc.






The Pulse Function
------------------

The PULSE function sends a repeated ON-OFF sequence while the logical
equation is true. The two numbers in the function define the ON and OFF
periods respectively. For example:

DEF X1 PULSE(100 1000) S1 OR S2

Pressing S1 or S2, will cause X1 to turn ON immediately for a time
period of 1/10th of a second, then OFF for a time period of 1 second,
then ON for 1/10th second, etc. That operation would run continuously
so long as S1 or S2 was held down. Note that a SPACE character must
separate the two numeric values. Using a comma or other separator will
cause a compiler error.


The Comparison Operators
------------------------

There are two analog comparison operators available for use with the
logical processor called CMPLT and CMPGT. They're used to control flags
based on the current position of any of the 8 available analog controls
(JSX, JSY, RDDR, THR, LBRK, RBRK, ANT, and RNG). They compare the current
value of the analog control to a preset value defined in the F22 file
and set the flag based on whether the current value is above or below
that preset.

The preset value is expressed in terms of percent of full travel, 0% being
minimum and 100% being maximum. Bipolar inputs such as the ANT control will
be centered at 50%.

The operators must be assigned to a single flag via a DEF statement. The
syntax is something like this:

DEF X1 CMPLT(THR 50)

DEF X2 CMPGT(RNG 25)

In the first example, flag X1 would be ON when the Throttle was in a
position less than 50% of full forward. In the second, flag X2 would
be ON whenever the Range control was above 25% of full clockwise
rotation. For the functions to work properly, the corresponding input
must be programmed digitally. The RNG and ANT controls are always
digital, but the other inputs depend on how the F22 file is set up.
Using the comparison operators with controls used as analog outputs,
analog throttle for instance, will result in the flag being continually
OFF or continually ON, but it will not track the throttle position.




The Software Reset Function
---------------------------

A Software Reset is one which causes the F22 to go back to it's Reset
Mode. Usually the only way to get to the Reset State is by powering
the unit down, but there are several circumstances where it is desirable
to re-enter Reset Mode, and the F22 makes provision for defining such
a function in the user program. The basic mechanism is to program a
BTN to send the special character F22RST. This isn't a character at
all, it's a special internal command, but you program it as if it were
a character, i.e.:

BTN S1 F22RST

will reset the F22 whenever S1 is pressed. The F22RST function has
several uses that will be discussed in the Examples section.


Notes on Advanced Programming
=============================

In order to fully utilize the logical programming functions of the F22,
there are a few things to keep in mind. The F22 executes a program 'loop'
which is repeated over and over while the unit is running. It's basic
functions, in order, are:

1. Read all the inputs to get new information on the button states,
etc.

2. Process that data to generate the logical outputs based on the
DEF statements in the user program.

3. Process the BTN statements in the user program using the button
states and logical outputs generated in steps 1 and 2 and transmit
any characters or analog button output states that result from that
processing.

4. Go back to Step 1.

The logical programming is primarily concerned with Step 2 during which
time the DEF statements are processed to generate logical outputs. It
is important to remember that processing is not really instantaneous.
In fact, the DEF statements are read and processed one at a time in
the order in which they are encountered in the .F22 file. This is an
important point, it means that the flag values don't necessarily have
the same value throughout the scan of the DEF statements. It is also
this fact that makes it possible to generate some complex functions
which would not be available using the F22 syntax alone.




To better illustrate this fact, consider the following pair of DEF
statements:

DEF X1 S1 AND X2
DEF X2 NOT S1

At first glance, it would seem that X1 will never turn ON. Since X2 is
always in a state opposite that of S1, S1 and X2 can never be ON at
the same time. In fact, if you implement the above, you'll find that
X1 will indeed turn ON, albeit briefly, when you press S1.

Suppose S1 is OFF and we press it. The first time the logic is processed
after that button update, X2 will be ON, since on the last loop S1 was
OFF. Since S1 is ON during the current scan, S1 AND X2 will be true for
this one scan only, consequently X1 will be ON. After the first X1 is
output, the next statement will set X2 OFF, and on subsequent scans X1
will be OFF. If we release S1, X1 will still be OFF (S1 is OFF) and X2
will turn ON again. If we then press S1 again, we will get another single
scan with X1 ON.

Note that if we reverse the order of the two statements:

DEF X2 NOT S1
DEF X1 S1 AND X2

X1 will never turn on since X2 will get processed first and will turn
OFF, thus the X1 DEF would generate an OFF every time.


Execution Speed
---------------

The logical functions don't take much time to execute, typically about
120 microseconds per element, where an element is any of the DEF statement
itself, the keywords AND, OR, and NOT, and the references to the flags
and the buttons in the logical equation. Parenthesis do not take any
execution time. The DELAY, PULSE, CMPLT, and CMPGT functions do take
slightly longer, but they are relatively infrequently used and don't
impact much on the overall scan speed.


Programming Examples
====================

This section includes some examples of what can be done using the F22
extended functions. They are meant to give an idea of what might be
accomplished and to illustrate some of the interactions which can take
place.




Slow Trim Function
------------------

Sometimes the need arises to generate a very slowly repeating
character. For instance, suppose we wanted to implement a very slow
trim function for Microsoft Flight Simulator. The character to trim
the nose down in FS5 is KP7, and after some experimentation we find
that pressing KP7 once every 5 seconds produces a gradual trim that
does not cause instability. One easy way to implement this would be
with the PULSE function:

DEF X1 PULSE (100 5000) H1U*
BTN X1 /N KP7

Note the use of the toggle flag for H1U instead of the button itself.
Using that, the trim function will begin the first time we push H1U
and will continue until H1U is pressed again. That saves having to
hold the hat in the UP position for the duration of the trimming
operation. X1 will turn on for 1/10th of a second every 5 seconds so
long as H1U* is ON, and will generate a KP7 every time it does.

Duplicating these functions on X2 for H1D:

DEF X2 PULSE(100 5000) H1D*
BTN X2 /N KP1

and we have a complete trim control function on H1U and H1D.


Analog Autofire
---------------

In some games, you only get a single shot per trigger pull. Some game
controllers implement a hardware 'autofire' function to pulse the game
port button line rapidly, allowing the user to simply hold down the
trigger to continuously fire the weapon. An analog autofire function
is easily generated using the F22 DEF statements. First, we tie the
primary trigger TG1 to one of the flags through a PULSE function:

DEF X1 PULSE (50 50) TG1 rem Pulse X1 when the trigger is pulled

Now, X1 will pulse ON for 50 milliseconds and OFF for 50 milliseconds
so long as the trigger is pulled. Next, we tie the flag to the analog
port button output:

PORTB1 IS X1 rem Hook X1 to the analog trigger output

Port Button 1 will track X1 and will turn ON and OFF continuously when
the trigger is pulled.



Using the two-stage trigger, this could be expanded to provide a single
firing at the first trigger click and repeated firings at the second
trigger click. First, we set up the pulser on the secondary trigger:

DEF X1 PULSE (50 50) TG2

Next, we set up a flag that is ON when either TG1 is ON or TG2 is
pulsed ON. There's a little problem doing this because in the F22
hardware, TG1 remains on when TG2 is ON. That would mask the TG2
output, so the equation is modified slightly to ignore the TG1 input
whenever TG2 is ON:

DEF X2 X1 OR (TG1 AND NOT TG2)

X2 will turn ON whenever TG1 is ON and TG2 is OFF, or whenever TG2
generates a pulse via X1. Now we just need to tie it to the game port:

PORTB1 IS X2

Now, whenever the trigger is pulled back to the first click, the
game port input will turn ON continuously. If the trigger is pulled
back to the second click, the game port input will start to pulse at
around 10 pulses per second.


Mixed Analog/Digital Trigger
----------------------------

The ability to assign analog outputs to flags and buttons makes it
possible for to make use of inputs in both digital and analog mode in
the same program. One example might be a situation where you want to
use analog trigger for activating guns, but have it generate a
character to fire other sorts of weapons. Suppose the game uses two
keyboard command, FireWeapon1 and FireWeapon2, for the two weapons and an
analog game port input to fire the guns. Using the UMD flags as a sort
of master mode selector, first define a flag to combine the Rocker Up
and TG1 inputs:

DEF X1 TG1 AND T8 rem X1 ON when trigger pulled and rocker up

and assign that output to the game port:

PORTB1 IS X1 rem Hook X1 to the analog trigger output

Now the trigger will activate the game port output, but only when the
Rocker Switch is in the Up position (T8 ON). The rest is easy, just
define a UMD group for TG1 with a non-operational character in the U
position:

BTN TG1 /U NullChr rem NULL char in Up, X1 will send analog
/M FireWeapon1 rem Fire weapon 1
/D FireWeapon2 rem Fire weapon 2


Sequencing Events
-----------------

It is possible to generate sequences of events easily using the flag
logic and the DELAY function. Suppose we want to press one button and
have it execute a set of timed events. One way to do that is to simply
'stack' flags with delay functions:

DEF X1 DELAY(1000) S1
DEF X2 DELAY(1000) X1
DEF X3 DELAY(1000) X2

BTN X1 GearUp
BTN X2 FlapsUp
BTN X3 LightsOff

This is useful not only for sequencing operations, but also for
combining several not-to-critical functions on one button. In the above
example, for instance, you could press the button and hold it and all
three functions would execute in sequence 1 second apart. You could
also press and hold it for 1 second to bring up the gear. Sometime
later, you could press and hold it for 2 seconds to get the flaps up.
It would generate an extraneous gear up command, but that probably
wouldn't have any effect. Finally, you could hold it for 3 seconds to
turn off the strobe. You could do this with multi-toggles, but there
are only 8 of those available. You could do the whole sequence with
the older DLY statement, but you couldn't select the function you
wanted to execute, nor could you use any other digital commands while
you were running it.


Multiple View Sets
------------------

Frequently, one of the hats on the F22 is used for 'view selection'.
Normally this is limited to 4 views, but with the use of the IO codes, it
can be expanded to 8 views. Using the logical functions, it is possible
to generate alternate view sets based on buttons other than S3 (the IO
selector). For example, we could use S4 to expand the set to 12 views.
First, we need to set up the logic to generate the three view selectors:

DEF X1 NOT S3 AND NOT S4
DEF X2 S3 AND NOT S4
DEF X3 NOT S3 AND S4

Basically, this sets up three mutually-exclusive flags which will be
used to enable one of three sets of views. The next step is to generate
flags for each of the view positions:

rem View flags when S3 and S4 are released

DEF X7 H1U AND X1
DEF X8 H1R AND X1
DEF X9 H1D AND X1
DEF X10 H1L AND X1

rem View flags when S3 is pressed

DEF X11 H1U AND X2
DEF X12 H1R AND X2
DEF X13 H1D AND X2
DEF X14 H1L AND X2

rem View flags when S4 is pressed

DEF X15 H1U AND X3
DEF X16 H1R AND X3
DEF X17 H1D AND X3
DEF X18 H1L AND X3

Finally, we just need to assign the correct view characters to the
appropriate view flags:

rem Normal view set

BTN X7 LookUpFront
BTN X8 LookRight
BTN X9 LookBack
BTN X10 LookLeft

rem Up view set

BTN X11 LookUp
BTN X12 LookUpRight
BTN X13 LookUpBack
BTN X14 LookUpLeft

rem Down view set

BTN X15 LookDownFront
BTN X16 LookDownRight
BTN X17 LookDownBack
BTN X18 LookDownLeft

When neither S3 or S4 is pressed, the normal 'level' views will be
available. Pressing S3 will provide a set of UP views for the four
basic direction, pressing S4 will provide a set of DOWN views.

It's not normally possible to use /H codes within an IO or a UMD
structure, but generating the IO or UMD sets using flags will give
the same result and is not subject to the /H limitation since no IO
or UMD codes are involved in the actual BTN statements. If the views
are to use /H codes, though, the selector logic gets a to be a little
more complicated. The reason is for this is due to the fact that when
the F22 processes the BTN statements, it does so in a fixed order
regardless of how they're ordered in the F22 file. This fixed order only
applies to the BTN statements. As stated earlier, the DEF statements
are processed in the same order that they occur in the F22 file.

To see where the problem arises, suppose we've set up two flags which
are to send /H codes. One will be sent when S1 is pressed and S3 is
released, the other will be sent when S1 is pressed and S3 is pressed.

DEF X1 S1 AND NOT S3
DEF X2 S1 AND S3

Now we set up the BTN statements for the two flags:

BTN X1 /H a b
BTN X2 /H b c

Suppose both are released. If we press S1, X1 will turn ON and send the
make codes for 'a' and 'b'. If we subsequently press S3 while S1 is on,
X1 will turn OFF, sending the break codes for 'a' and 'b', and X2 will
turn ON, sending make codes for 'b' and 'c'. The problem is that the
character order will depend on the order in which the F22 processes the
buttons. If the F22 processes BTN X2 before it processes BTN X1, it will
send the X2 'make' characters' before it sends the X1 'break' characters
and the PC will get

'b' make, 'c' make, 'a' break, 'b' break

the 'b' break on X1 will cancel the 'b' make on X2, leaving us with
just the 'c' actually depressed. If we modify the logic and add two
additional flags:

DEF X1 S1 AND NOT S3 AND X3
DEF X2 S1 AND S3 AND X4
DEF X3 S1 AND NOT S3
DEF X4 S1 AND S3

X1 will turn OFF as above when S3 is pressed, but X2 will not turn
on until the following scan because X4 isn't turned ON until after
the X2 logic is complete. Consequently, the X1 'break' characters
will get sent on the current scan, whereas the X2 'make' characters
won't get sent until the next scan. This ensures that the PC sees:

'a' break, 'b' break, 'b' make, 'c' make

which is the desired sequence and leaves both 'b' and 'c' made. This
only affects /H sequences, with the other modes of F22 character output,
i.e. repeating characters, macros, etc. this problem doesn't generally
occur.

For our original example. we'd need to expand to three additional
statements:

DEF X1 NOT S3 AND NOT S4 AND X4
DEF X2 S3 AND NOT S4 AND X5
DEF X3 NOT S3 AND S4 AND X6

DEF X4 NOT S3 AND NOT S4
DEF X5 S3 AND NOT S4
DEF X6 NOT S3 AND S4

Once the additional logic has been added, the statements to set up the
flags for the individual views and the BTN statements to actually send
the view characters would be the same as for the original "non-/H' case.


Air Warrior Views
-----------------

Kesmai's Air Warrior supports a built-in view system that accesses eight
views by using a second button to switch between two sets of four view each.
The built-in support for this set is limited to joysticks which include
an 'analog' hat switch of some sort. While the method shown above can
be used to emulate this built-in support, considerable simplification
is possible. The following code segment will implement an equivalent
set based on H1 and S3:

rem F22 code fragment to generate standard AW 8-view set. Select a
rem generic 2-button joystick in AW Setup.

DEF X1 H1U AND NOT S3
DEF X2 ((H1R OR H1L) AND S3) OR H1D
DEF X3 (H1D AND S3) OR H1U

BTN X1 /H KP8
BTN X2 /H KP2
BTN X3 /H KP5

BTN H1R /H KP6
BTN H1L /H KP4

The logic is perhaps a little obscure, it was generated based on the
observation that 4 of 6 keycodes used were on the same hat position
regardless of the position of the view set selector:

S3 Released S3 Pressed

H1U KP5 KP8 KP5
H1R KP6 KP6 KP2
H1D KP2 KP2 KP5
H1L KP4 KP4 KP5

Because of that, the pressing of S3 need only add (or in one case, H1U,
subtract) a single key code from that generated by the hat position. It
works like this.

X1 adds a KP8 whenever H1 is Up and S3 isn't pressed. Pushing H1U also
generates a KP5 via the X3 definition regardless of the S3 position. The
result is a KP8/KP5 combination when S3 is released and just a KP5 when
S3 is pressed. Pressing S3 moves from a 45 degree Up view to a full Up
view.

X2 adds a KP2 command when H1 is Back or when S3 is pressed while H1 is
Left or Right. The H1R and H1L positions activate KP4 and KP6 commands
directly using BTN statements. When S3 is released, the BTN statements
generate the needed Left/Right commands, when S3 is pressed, the added
KP2 provides the rear quarter views.

The logic for X3 relating to the Up and Up/Forward views was mentioned
above. When S3 is pressed, it is also responsible for adding a KP5 to
the KP2 generated by X2, giving a Look Up and Back combination.

The view set can be placed on any available hat switch and use any
button for view set selection, it's only necessary to change the H1 and
S3 references to match the desired controls. The view set can alos be used
in other games that use a similar method of view selection, the example
given should operate in Warbirds without modification.


16-View Set for Air Warrior and War Birds
-----------------------------------------

A more elaborate 16-view scheme can be implemented with the F22 using
the corner positions. This will also work with both AW and WB and
requires no special 'key map' for use. The basic code looks like this:

DEF X1 (H3U AND NOT S3) OR H3UR OR H3UL rem KP8 if forward quadrant
DEF X2 (S3 AND NOT H3M) OR H3U rem Up if S3 or HU and no S3
DEF X3 H3UR OR H3R OR H3DR rem KP4 on right quadrant
DEF X4 H3DR OR H3D OR H3DL rem KP2 in back quadrant
DEF X5 H3DL OR H3L OR H3UL rem KP4 in left quadrant

BTN X1 /H KP8
BTN X2 /H KP5
BTN X3 /H KP6
BTN X4 /H KP2
BTN X5 /H KP4

This implements the 'intuitive' 8-way level views, pressing S3 adds
'Up' to the selected view. The coding is somewhat obscure. Basically,
it uses flags to generate forward, back, left, and right quadrants.
This works much better than simply assigning single keys to the basic
directions and double-keys to the corners because of the way the keys
'make' and 'break' as the hat moves from a standard postion to a corner
position and vice-versa. Suppose the hat moves from the left to the
left/forward position. If the keys are simply assigned, the left key
will 'break' first, then the left and forward keys will 'make'. The
result is slower since it sends 1 break and 2 makes, and the sim will
want to pass through the forward view when the first key breaks. With
the quadrant approach, the left key will not 'break' when the hat is
moved, the only key stroke sent will be a forward 'make'. Subsequently,
moving to the full forward position will simply 'break' the left key,
rather than, again, breaking both left and forward, then remaking
forward.

The above code segment only works with microcode chips V1.16 and above.
The V1.16 chips made some improvements in the hat-corner logic. With
earlier version of the chip, an additional line of code is required,
it needs to look like this:

DEF X1 H3U AND NOT H3UR rem Fixup for H3U
DEF X2 (X1 AND NOT S3) OR H3UR OR H3UL rem KP8 in forward quadrant
DEF X3 (S3 AND NOT H3M) OR X1 rem Up if S3 or HU and no S3
DEF X4 H3UR OR H3R OR H3DR rem KP4 on right quadrant
DEF X5 H3DR OR H3D OR H3DL rem KP2 in back quadrant
DEF X6 H3DL OR H3L OR H3UL rem KP4 in left quadrant

BTN X2 /H KP8
BTN X3 /H KP5
BTN X4 /H KP6
BTN X5 /H KP2
BTN X6 /H KP4

This latter version should work with any chip revisions.


Converting Panning Views to Fixed Views
---------------------------------------

If a game provides a set of panning views, that feature can generally
be used to generate any view desired using the F22 logic functions.
The basic technique is to hold the panning key down just long enough
for the view to pan to the desired position. Suppose the game provides
three keys, PanLeft, PanRight, and LookForward. Some testing reveals
that it takes approximately 1 second for the view to pan 90 degrees,
and it is desired to implement a pair of views 45 degrees to the right
or left of straight ahead. Several methods can be used to generate the
necessary time period. Here's one:

DEF X1 DELAY(500) H1R
DEF X2 H1R AND NOT X1

DEF X3 DELAY(500) H1L
DEF X4 H1L AND NOT X3

To see how the logic works, consider the first pair of statement. When
H1R is pressed, the timer will start on the DEF X1 statement, but X1
won't actually turn ON for 1/2 second. The DEF X2 statement will cause
X2 to turn ON immediately since H1R is ON and X1 isn't. 1/2 second later,
X1 will turn ON and that will cause X2 to turn OFF. The X3/X4 DEF
statements work similarly for H1L.

Next, we just assign held characters to the X2 and X4 flags:

BTN X2 /H PanRight
BTN X4 /H PanLeft

and we set H1 to generate a LookForward command when it's released:

BTN H1M LookForward

Now, pressing and holding H1R will cause the view to pan right for 1/2
second and stop, H1L will cause a pan left of 1/2 second. If the hat is
released, the view will snap to the forward position immediately. This
technique works pretty well, although the actual time to pan and hence
the final view position may vary somewhat with the instantaneous frame
rate in the game. The variation is usually not too great however.


Implementing Infrequently Used Functions
----------------------------------------

Sometimes there are functions that it would be nice to program onto
the stick, but they are used so seldom or have such dire consequences
that just putting them on a button is not desirable. 'Bailing out' comes
to mind as one such function. One workaround is to define those as a
function of two buttons which are not likely to be pressed at the same
time. For example:

DEF X1 DELAY(1000) H1U AND H4U
BTN X1 BailOut

For the BailOut command to be sent, you need to press both H1U and H4U
(hard to hit those at the same time by accident) and you need to hold
them for 1 second. There's very little chance you would inadvertently
bail out, but when the time came you could be gone in just one second
without having to find the keyboard.


Analog Rate Control
-------------------

There are situations where it is desirable to be able to use one of
the analog inputs to control the rate at which a particular character
is being generated. While most sims will support analog inputs for the
primary X and Y axes, rudder, and throttle inputs, there are other
functions for which some form of proportional control would be desirable.
For example, some sims provide a 'brake' function. Usually, there's a key
to press which, if held down, provides full braking power. Tapping the
key produces a brief full brake pulse, and by repeating the character at
different rates, the overall braking effect can be adjusted.

Using flag references in conjunction with a Type 2 input can be use to
do just that. Suppose we want to program a toe brake on the RCS Pro to
provide proportional braking. The first step is to define the brake
to include as many levels of braking as are desired. Suppose 4 levels
are deemed to be sufficient:

LBRK 2 5 ^ X1 X2 X3 X4

The statement sets up five zones corresponding to 4 levels of braking
and one OFF position. The '^' is seen by the F22 compiler as a Null
Character, it's just used as a place holder so the brake will not send
any characters in the up or OFF position. The flags X1..X4 will be
used to control the four braking rates.

Next we need to set up some way to control the character rates for the
four braking levels. Assuming that X4 will be 'full on', then we really
only have 3 timed intervals. Let's assume that rates of 1 character every
2 seconds will be the slowest, follow by 1 character every second and
finally 2 characters every second for the fastest. Some experimentation
would need to be done, of course, to determine optimum rates for a
particular sim.

To generate the clocks, we'll use the PULSE function. There are various
ways to set it up, but probably the most straightforward is to just load
the brake-controlled flags as inputs to the PULSE function, then pass
those out to a second set of flags:

DEF X5 PULSE (10 2000) X1 rem Once every 2 seconds while X1 is ON
DEF X6 PULSE (10 1000) X2 rem Once every second while X2 is ON
DEF X7 PULSE (10 500) X3 rem Once every half second while X3 is ON

After that, it's only necessary to assign the brake command to the various
flags:

BTN X4 /H LeftBrake
BTN X5 LeftBrake
BTN X6 LeftBrake
BTN X7 LeftBrake

The X4 flag just holds the key down continuously. The X5 through X7
commands pulse the brake at the rates defined by their associated
timers as the pedal passes through their respective zones.


Using UMD and IO Codes with Type 2 Analog Controls
--------------------------------------------------

While it is not normally possible to control the output of the analog
statements using the UMD and IO codes, it can be done with Type 2
analog devices utilizing flag characters since the flags themselves
are subject to UMD and IO modifications:

RNG 2 3 X1 X2 X3

BTN X1 /I a
/O d

BTN X2 /I b
/O e

BTN X3 /I c
/O d

will set the range pot to produce 'abc' when S3 is depressed and 'def'
when S3 is released.


Analog Min/Max Functions
-------------------------

One use of the comparison operators, CMPLT and CMPGT, is to assign Min
and Max characters for Type 1 analog controls. Frequently, the operation
of the Type 1 function is affected by the frame rate in the game and the
Type 1 functions tend to 'get out of sync', the control position doesn't
match the game setting. This generally is most apparent with Type 1
throttles, where after a period of time, going to the maximum power detent
correspond with the games full throttle setting.

Adding Min/Max characters can help in this situation if the game supports
them. These characters can be sent to force the game to it's max or min
setting, and if they can be sent when the control is in that position
the game and control will realign themselves.

For example, take a Type 1 throttle:

THR 1 10 2 a b c d e f

Next, add comparators to generate flags when the throttle is at less
than 5% or greater than 95% of it's maximum travel:

DEF X1 CMPLT(THR 5)
DEF X2 CMPGT(THR 95)

Now, X1 would turn ON when the throttle is near minimum, X2 would turn
ON when it is near maximum.

Finally, program the flags to send the appropriate commands:

BTN X1 /N MinThrottle
BTN X2 /N MaxThrottle

Now, if the throttle and game get out of sync, we can just push it to
the Min or Max positions and the characters will be generated to realign
the throttle and game.


Non-Linear Type 1 Throttle
--------------------------

Another interesting possibility is to generate a non-linear throttle
response. For example, suppose the game requires 30 steps of throttle
for full throttle travel, but the lower third is not particularly
useful and it's desired to maintain a finer degree of control over the
upper two thirds of travel.

First, a throttle statement is set up that generates two-thirds of the
characters:

THR 1 20 1 ThrottleUp ThrottleDn ABOn ABOff ABUp ABDn

Next, a couple of comparisons are done at the 5% and 10% positions:

DEF X1 CMPLT(THR 5)
DEF X2 CMPLT(THR 10)

The two flags are programmed to send 4 characters each:

BTN X1 /P RPT(5) ThrottleDn /R RPT(5) ThrottleUp
BTN X2 /P RPT(5) ThrottleDn /R RPT(5) ThrottleUp

Now the upper 90% of throttle travel will produce 20 throttle steps.
As the throttle is moved back through the 10% position, the X1 flag
will turn ON and generate an additional 5 steps, and as the throttle
is moved back through the 5% position the X2 flag will generate an
additional 5 steps for a total of 30 altogether.


Emulating a CH-Style Hat Switch
-------------------------------

While there is seldom any real reason to do so, it is possible to
program the hats on the F22 to send the chorded-button groups that the
CH Pro Joystick, CH F-16 Joystick, and CH Virtual Pilot Pro Yoke use.
This might be useful in instances where functions are available only
through the use of built-in game support. Basically, both of these
code segments simply OR the appropriate inputs together and then pass
those out to the appropriate buttons. The only piece which does wander
from this straightforward approach a bit is the use of 'NOT H1M' to
replace 'H1U OR H1R OR H1D OR H1L' in the interest of simplifying
the logic.

To emulate the simpler CH Pro joystick, the logic looks like this:

REM Coding to emulate CH FlightStick Pro Hat

REM TG1 is Button A1
REM S2 is Button A2
REM S3 is Button B1
REM S4 is Button B2

REM H1 Is the Hat

DEF X1 TG1 OR NOT H1M
DEF X2 S2 OR NOT H1M
DEF X3 S3 OR H1D OR H1U
DEF X4 S4 OR H1R OR H1U

PORTB1 IS X1
PORTB2 IS X2
PORTB3 IS X3
PORTB4 IS X4

The above logic can be improved a bit. Using the logic shown, it's
possible to hold one view on the hat, then have it change to another
view when S2 or S4 is pressed since they are passed through and will
change the chording arrangement. By changing the DEF statements for X3
and X4 slightly, this condition can be 'locked out':

DEF X3 (S3 AND H1M) OR H1D OR H1U
DEF X4 (S4 AND H1M) OR H1R OR H1U

The addition of the H1M elements forces S3 and S4 to be disabled whenever
the hat is off-center, thus they are inactive whenever the hat is being
used.

Emulating the F-16 or VP Pro is a little more complex, involving two
hats and 6 buttons:

REM Coding to emulate CH FlightStick Pro Hat

REM TG1 is Button A1
REM S2 is Button A2
REM S3 is Button B1
REM S4 is Button B2
REM S1 is Button X1
REM TG2 is Button X2

REM H1 Is the Primary Hat
REM H2 Is the Secondary Hat

DEF X1 TG1 OR TG2 OR S1 OR NOT H1M
DEF X2 S2 OR H2D OR H2R OR H2U OR NOT H1M
DEF X3 S3 OR H1D OR H1U OR H2L OR H2D OR H2U OR S1
DEF X4 S4 OR H1R OR H1U OR H2L OR H2R OR H2U OR TG2

PORTB1 IS X1
PORTB2 IS X2
PORTB3 IS X3
PORTB4 IS X4

The examples use H1 and H2, but any hats or buttons will work, including
those on the TQS or WCS throttle unit. With the TQS, it would also be
possible to use the 4-way switch or the T11..T14 characters as one of the
hat switches. Since they don't have HM position equivalents, that would
have to be done with another flag. For example, a 'hat middle' flag for
the TQS stick-ball characters would look like this:

DEF X5 NOT (T11 OR T12 OR T13 OR T14)

Substituting the correct reference for the HU, HD... codes and the X5
flag for the HM reference would be all that was necessary to allow
the stick-ball to be used as one of the hats.


Using the Software Reset
------------------------

As mentioned previously, there is a software reset function that is
available with the F22. This function resets all variables and returns
the F22 to Reset Mode, requiring that a button be pressed to 'wake it
up' again.

There are several situations in which a Software Reset is very useful.
One such instance is when you need to calibrate a game and the F22 file
for that game defines the trigger or other analog inputs that the game
requires as digital. In that case, you can't progress through the games
calibration routine because the game asks you to press a button and you
don't have a button to press. When the F22 is in Reset Mode, all four
analog axes are passed through, the TG1 input is passed to Button 1 and
the S2 input is passed to Button 2. This setup looks like a standard,
2-button joystick and will all the calibration procedure to progress
normally. Adding a Software Reset to your program will let you put
the stick into this special 'calibrate' mode when necessary.

Some not-so-standard keyboards and BIOS may have trouble when the WCS
is used with the F22 in slave mode. The usual symptom is lost keyboard
characters when you're typing. It's not generally a problem in the game,
the WCS and F22 work fine, but working with the keyboard becomes very
difficult. When the F22 is in Reset Mode, communication with the WCS is
suspended and does not interfere with the keyboard, so implementing
a Software Reset will allow the Control System to be 'shut down' when
not in use.

Last, but certainly not least, a Software Reset is very useful when
developing logical programs. It is very easy to create logical systems
that result in an effectively 'stuck' flag, i.e. one that's always ON.
If there is a key assigned, directly or indirectly, to that flag, the
key is likely to start autorepeating and without a Software Reset, there
is no way to silence it except to turn off the system. The F22 Utility
programs like F22Reset will likely be ineffective in these instance
since they probably won't be able to establish communications with a
an F22 which is transmitting characters.

It's not generally desirable to implement the software reset as a
regular button press since it is too easy to hit it by mistake during
game play. It also wastes a button. A better method is to implement it
like the 'Infrequently Used Functions' mentioned above:

DEF X1 DELAY(1000) H1U AND H2U
BTN X1 F22RST

That way, it's there if you need it, but won't get in the way during
game play.

------------------- End of Document -------------------

Last edited by Kbird; 12/27/16 06:42 PM.

My FLCS+TQS Conversion here on SimHQ

http://simhq.com/forum/ubbthreads.php/topics/4324940/1
#4324049 - 12/28/16 07:31 PM Re: Anyone here, owning a PDF of the TM F22 Pro Manual?!? [Re: Viper1970]  
Joined: Dec 2010
Posts: 1,179
Viper1970 Offline
Member
Viper1970  Offline
Member

Joined: Dec 2010
Posts: 1,179
Bavaria, near Munich
Hello Kbird,

thanks very, very much for your post. Will copy and paste them very soon biggrin. Had a bit trouble with the gauges in my pit, so I wasn't here in the forum a few days. Now most is running and if the rest is fixed I will come back to the F22 Pro. Never thought that the building will be as complicated as it is. Most of the troubles appear if you run the things together that ran before perfectly under test conditions, but each separately.

Cheers Sven


CockpitPC1: Ryzen9 5950X|64GB DDR4|512GB M2 SSD|2TB M2 SSD|Geforce RTX3090|Reverb G2|Win11Pro
CockpitPC2: PhenomII X6 1100T|32GB DDR2|2x 2TB HDD|2x Geforce GTX660 SLI|Win7Pro64
ComUnitPC1: Ryzen9 3900XT|32GB DDR4|2x 2TB HDD|Geforce RTX2070|Win11 Pro
ComUnitPC2: PhenomII X6 1100T|16GB DDR2|2x 2TB HDD|Geforce GTX660|Win7Pro64
ComUnitPC3: AthlonII X2 250|2GB DDR2|2TB HDD|Geforce 5950Ultra|2x VoodooII SLI|WinXPPro32&WinME
ComUnitPC4: K6-2+|768MB SDR|640GB HDD|Geforce 256DDR|VoodooI|Win98SE
#4324679 - 12/30/16 06:39 PM Re: Anyone here, owning a PDF of the TM F22 Pro Manual?!? [Re: Viper1970]  
Joined: Dec 2016
Posts: 454
Kb1rd1 Offline
Member
Kb1rd1  Offline
Member

Joined: Dec 2016
Posts: 454

Happy to help Viper, PM me your email if you prefer and I can send the zipfile too.

I know what you mean converting my "simple pedals to USB , is taking longer than I thought too, tested on the table ok last night but Sokol1 has found a Detent Mod for me too , so I hope it still works after doing that this weekend smile


KB


My FLCS+TQS Conversion here on SimHQ

http://simhq.com/forum/ubbthreads.php/topics/4324940/1
#4324834 - 12/31/16 10:57 AM Re: Anyone here, owning a PDF of the TM F22 Pro Manual?!? [Re: Viper1970]  
Joined: Dec 2010
Posts: 1,179
Viper1970 Offline
Member
Viper1970  Offline
Member

Joined: Dec 2010
Posts: 1,179
Bavaria, near Munich
Have PM you my mail address. Oh yes, it's a never ending story. My cockpit was planned to be finished this year before christmas, but it still looks more like a junkyard.

I have mostly 2 days consecutively the week, I could build things. I live with my son in a very small 2 room flat, so my living room is my workshop, too. Two times a week my girlfriend is here, and then I have to tidy up the room.
That's why my project is growing really slow. Besides this, my building management has decided this summer to renovate all the balconies, so I couldn't do anything related with paintings. Hope I can finish the project next year before christmas biggrin.

I always have to test the things seperatly and then a few together. Never could test all together in the pit, cause in the pit the holdings for the consoles are still missing. Have to built this soon, but this means my living room isn't useable for the time I work on the cockpits frame again. I rather did not want to know, which problems appear if completely all should run together screwy. Hope the disaster isn't to big.

Don't throw away your original Thrustmaster electronics, cause you can still use them. The only restriction is, that you have to program (download) them in a plain DOS environment (dualboot). If your PC has still a PS/2 keyboard port, they run still perfectly. The TQS mouse has to be connected via COM port, cause Windows 7 and above blocks the mouse if it is connected via PS/2 with an adapter. The cursor moves only a milimeter and then stops, until you press the eraser hat again. Don't know why? I use a special COM connection cable to the mainboard in my PC for this. Most boards still have COM, but you need a cable which connects to the boards pins, cause they have removed all ports like parallel and seriell from their front panels. The old gear runs really without any problems on Win 7 if it's programmed and the mouse is connected with COM using a standard seriell mouse driver. The FLCS needs an old AT keyboard plugged at the end for downloading, but only the controller of a keyboard is needed. I have integrated the controller in the base of my HOTAS, so I have no extra keyboard lying around. You could use your normal USB keyboard for controlling the DOS (download) software. Without an keyboard plugged into the FLCS it's not downloading correctly, that's the only reason for the AT keyboard controller.

The Thrustmaster gear needs the +5V from the gameport too, cause the 5V from the keyboard connector only isn't enough power. But you only need the GND and the +5V, the rest (buttons, axis) isn't needed. I run the stick, throttle and rudder axis over a BU0836 via USB. The original poti connections I use only for digital programming them with the original TM software. This way I have functioning ANT RNG on the TQS and still could use the mouse. The other axis, like the FLCS X,Y the Rudder axis and the TQS throttle axis you could also digital program with the old software. This way you could use them for other things at your selfmade HOTAS. For the +5V power of the gameport connector, I use the midi port on my soundcard, but theoretical the +5V of an USB port or any other port could also be possible. Never have tried it, cause if I'm wrong, I didn't want to fry my mainboard or the TM electronics.

I know it all sounds a bit complicated, but it isn't so much. All you have to do before flight, is to boot to DOS, download your programmed config for the simulator you want to use and then go back to windows. That's all. This way you have the full programmability of the old hardware again. It's a kind of "poor mens Cougar" biggrin. You have the precise control of your axis with the BU0836 (you could also use hall sensors in the TM gear, if you want) and you could use the original FLCS-TQS-RCS axis pins for digitally programming other potis with any kind of function. No need that a simulator supports an analog axis for that function, you want to use (e.g nozzle control of the harrier in Strike Fighters, which is keyboard only). Plus you have the fully programmable buttons and hats with all the bells and whistles like toggle, press and release, or the pinky button and the dogfight switch extra modes. On my HOTAS only the Trigger stage 1 is connected via a DirectX Button with the use of the BU0836. For Guns a DirectX button is a better solution, but for all other HOTAS functions I really prefer the programmable keystroke emulation.

P.S: If anyone knows how the +5V on mainboards work, this could be a real help for me. I wanted to use an extra power supply (like some force feedback stick and wheels have) or the +5V from the USB to connect to the old gear, cause newer mainboards didn't have a gameport anymore and connecting an extra soundcard just to have the extra +5V for the Thrustmaster gear isn't very clever. Have tested some boards, but not all use the same line at all ports for +5V. Didn't know what happens if you connet the +5V from an USB or an external power supply to the gameport input of the FLCS or the TQS, cause they are internally connected on their pcb with the keyboard connector, which then goes back to the mainboard. If you could use the USB for example, there is no need for the gameport cable anymore. You could use the +5V from the BU0836 and only (if you don't want to use the old mouse function) have to connect one USB and one PS/2 keyboard cable for the whole HOTAS. Sadly there isn't any way to program the HOTAS with a PS/2 to USB converter. This means you have to have a PS/2 port on your PC. Latest mainboards did not have it anymore, so all you could do here, is to buy an extra pci PS/2 card or throw away the good old TM electronics sigh.


CockpitPC1: Ryzen9 5950X|64GB DDR4|512GB M2 SSD|2TB M2 SSD|Geforce RTX3090|Reverb G2|Win11Pro
CockpitPC2: PhenomII X6 1100T|32GB DDR2|2x 2TB HDD|2x Geforce GTX660 SLI|Win7Pro64
ComUnitPC1: Ryzen9 3900XT|32GB DDR4|2x 2TB HDD|Geforce RTX2070|Win11 Pro
ComUnitPC2: PhenomII X6 1100T|16GB DDR2|2x 2TB HDD|Geforce GTX660|Win7Pro64
ComUnitPC3: AthlonII X2 250|2GB DDR2|2TB HDD|Geforce 5950Ultra|2x VoodooII SLI|WinXPPro32&WinME
ComUnitPC4: K6-2+|768MB SDR|640GB HDD|Geforce 256DDR|VoodooI|Win98SE
#4324862 - 12/31/16 02:04 PM Re: Anyone here, owning a PDF of the TM F22 Pro Manual?!? [Re: Viper1970]  
Joined: Dec 2010
Posts: 1,179
Viper1970 Offline
Member
Viper1970  Offline
Member

Joined: Dec 2010
Posts: 1,179
Bavaria, near Munich
Oh, something about the eraser hat mouse.

I know that back those days many people hate it. I also have tried to replace it with a thumb stick on my old TQS an put the hat of a Suncom SFS coolie I had lying around on this stick. Put a little ring around it and bingo, looks like the original Cougar mouse cursor. BUT the control for a mouse is horrible. Have tried many joystick to mouse programs and have already bought one which was made for people with disabilities, as I thought this will control the mouse a bit more precise, but it wasn't so.

That's why I came back to the eraser hat, which isn't perfect, but a lot better then the thumbstick with software, to control the cursor on the MFD's. Never had a Cougar, so I didn't know how exact their thumbstick was running as a mouse, but as far as I know, Thrustmaster came back to the eraser hat on the Warthog throttle. I think they didn't do that for no reason.

You could glue any hat on top of the eraser, so no need to stay with the ugly laptop rubber hat. Only the left mouse button knob has to be replaced in this solution, with any simple push button anywhere at the HOTAS, you would like to have it. If you like things more perfect, you have to make the box, containing the eraser hat, little bit moveable, so that you could push it about 3mm inside the TQS. Now glue a micro pushbutton behind it in the handle and place a spring between the micro push button and the eraser hat box. You could now press in the cursor for a mouse click. But it's a lot of work to get this perfectly running, cause the spring have to have the ideal stiffness, that it's not clicking if you use the cursor but also not to strong to click. Only have made this one time at my different throttles and will probably not do it again, cause I had to open the TQS handle about a hundred times to get the ideal point biggrin.

Thrustmaster itself used this mechanics on their first TQS, which had the small ball mouse, but removed it with the earser hat, cause for the eraser more force is used to control the cursor. This way you always accidentally click the mouse button while moving the cursor around.

Last edited by Viper1970; 12/31/16 02:13 PM.

CockpitPC1: Ryzen9 5950X|64GB DDR4|512GB M2 SSD|2TB M2 SSD|Geforce RTX3090|Reverb G2|Win11Pro
CockpitPC2: PhenomII X6 1100T|32GB DDR2|2x 2TB HDD|2x Geforce GTX660 SLI|Win7Pro64
ComUnitPC1: Ryzen9 3900XT|32GB DDR4|2x 2TB HDD|Geforce RTX2070|Win11 Pro
ComUnitPC2: PhenomII X6 1100T|16GB DDR2|2x 2TB HDD|Geforce GTX660|Win7Pro64
ComUnitPC3: AthlonII X2 250|2GB DDR2|2TB HDD|Geforce 5950Ultra|2x VoodooII SLI|WinXPPro32&WinME
ComUnitPC4: K6-2+|768MB SDR|640GB HDD|Geforce 256DDR|VoodooI|Win98SE
#4324944 - 12/31/16 07:22 PM Re: Anyone here, owning a PDF of the TM F22 Pro Manual?!? [Re: Viper1970]  
Joined: Nov 2001
Posts: 3,955
Sokol1 Offline
Senior Member
Sokol1  Offline
Senior Member

Joined: Nov 2001
Posts: 3,955
Internet
Viper,

Your solution for FLCS and etc. sounds 10x more complicate than remove their guts and install a Arduino with HID firmware. hahaha

I hate this "Eraserhead" thing. Since at time I use this only for buttons in IL-2, replace with DIY HAT and work well, need a diode net to use the NW, SW contact... instead N, E, S... since these result in do "diagonal" movements with thumb.

At some time try use a Suncom SFS in that "old fashion way" keyboard emulation and give up in the first try when see how cumbersome result. smile

But know that you have different needs, what justify the "complication". wink


#4324946 - 12/31/16 07:40 PM Re: Anyone here, owning a PDF of the TM F22 Pro Manual?!? [Re: Viper1970]  
Joined: Dec 2016
Posts: 454
Kb1rd1 Offline
Member
Kb1rd1  Offline
Member

Joined: Dec 2016
Posts: 454
Thx Viper lots of good info I will C&P and re-read again to take it all in .....

My Asus X99 II MB has PS2 ( now called a "GamePort" for Hi Res. Mice) and a Com Port (Serial) on the MB , I still use an Old PS2 Track Ball I Love by Logitech , the RB22 which is no longer made unfortunately , but I couldn't figure out why Asus was still put a Com Port on their MB ...maybe there is a reason after all smile

** I don't see a PM notification though...


KB.


Last edited by Kbird; 12/31/16 07:41 PM.

My FLCS+TQS Conversion here on SimHQ

http://simhq.com/forum/ubbthreads.php/topics/4324940/1
Page 1 of 2 1 2

Moderated by  RacerGT 

Quick Search
Recent Articles
Support SimHQ

If you shop on Amazon use this Amazon link to support SimHQ
.
Social


Recent Topics
Carnival Cruise Ship Fire....... Again
by F4UDash4. 03/26/24 05:58 PM
Baltimore Bridge Collapse
by F4UDash4. 03/26/24 05:51 PM
The Oldest WWII Veterans
by F4UDash4. 03/24/24 09:21 PM
They got fired after this.
by Wigean. 03/20/24 08:19 PM
Grown ups joke time
by NoFlyBoy. 03/18/24 10:34 PM
Anyone Heard from Nimits?
by F4UDash4. 03/18/24 10:01 PM
RIP Gemini/Apollo astronaut Tom Stafford
by semmern. 03/18/24 02:14 PM
10 years after 3/8/2014
by NoFlyBoy. 03/17/24 10:25 AM
Copyright 1997-2016, SimHQ Inc. All Rights Reserved.

Powered by UBB.threads™ PHP Forum Software 7.6.0