How To...Fix The FS2004 Learjet Radio Stack
By Ulrich Klein
A close peek at external file structures: Analyzing hundreds and hundreds of such columns or rows of hex code for several hours or even days can really make you feel dizzy in the end. Later on, in this article, you will realize how important it can be to look a little bit behind the scenes. This time it was the only possible way for me to achieve what I had planned to do for a long time: fixing and improving the readability of the default Lear 45 radio stack. Such fiddling can be a time-consuming pastime activity, and I have to admit there are moments when you are dang near paralyzed by a mountain of despair, but it is drop dead gorgeous to see that you finally hit it, and not to be missed. Generally I want to spend time flying and not fiddling, but when it comes to the Lear 45 radio stack, things were different, and I have lost many hours of sleep thinking of a way to fix its problem. A whole lot of water has passed under the bridge since I first tried to tackle the issue, and the following article perhaps gives an inkling of how complex code cracking can be.
light Simulator 2002 sure had its quirks, nothing serious to affect flight, though, and if I should hazard a guess right now, FS2004 will not be so very different from that. Well, time will tell. Anyway, loading the default Lear 45 for the first time, I was eager to see whether the FS development team had possibly improved the radio stack. Nope! At first sight I could not see any difference in it. Shame on them there, because since the release of FS2000 my major gripe with this radio stack has always been that readability is rather poor. Whereas the header terms COM1, COM2, NAV1, NAV2, XPNDR, ADF are displayed so brightly that they almost function as eye-catchers, the essential green digits themselves are a bit on the dark side and very difficult to read. This especially goes for flights at daylight because at night, with my room darkened, things were and still are a little bit better, but not really satisfying at all. Everyone has this, but the issue has never been addressed. I sure'd like to know how that one has repeatedly slipped thru the beta department since FS2000. I guess they were all eagle-eyed testers! In fact, they should have chosen a more intensive color for the digits. So here we are with just another carry-over flaw from earlier versions of FS: the FS2004 screenshot of the Lear 45 panel reveals that an old problem still persists.
My first trip with the new Gmax Learjet completely built from scratch was almost a dream-like experience, just one of those "flightsim moments". Besides the beautifully rendered visual model, the new volumetric clouds are indeed a sight to behold, especially when flying thru them. However, there was in fact something else that caught my eyes first: like its awesome predecessor, FS2004 ACOF comes with a Lear radio stack that largely lacks readability as to its digit areas.
Knowing that the gamma of my monitor is all right, I decided to modify the gauge file which is responsible for the problem: the Lear_45!Radio_Stack.GAU file, which is listed up in the panel.cfg file of the Lear 45 and is an integral part of an FS2004 multi-gauge (Lear_45.gau) in the new \Flight Simulator 9\Gauges folder (or \FS2002\Gauges or \FS2000\Gauges folders respectively). Assuming you have a standard setup, the root folder for the latest version of the granddaddy flightsim of all time is Flight Simulator 9 instead of FS2004 (I'm still wondering why they did that). If you want to have it the old way, just change the directory name into FS2004 during the setup routine. DO NOT RENAME THIS FOLDER AFTER INSTALLING FS2004!
So, in my first approach to tackle the problem, the major steps of the modifications had consisted of replacing the old-fashioned Courier New font for the digits by a more modern and realistic quartz font, of considerably enlarging its size, and of giving the digits a bold-face appearance, which I considered necessary because the standard Courier New font in its default size offers but bad readability even when the overall brightness of the monitor is absolutely fine. The x / y-values for the mouse-sensitive spots had not been changed. It seemed to me that there was no way to achieve the desired effect other than by modifying the hex values of the corresponding gauge file. Although these modifications slightly improved readability, they did not mean a major break-through.
Now, this is what the change looked like when I tried to fix the problem for the first time:
A comparison between the default radio stack on the left and the modified digits for COM, NAV, ADF and XPNDR frequencies in the middle (night) and on the right (day) clearly reveals that readability has improved, right? The one fly in the ointment was that any modification by selecting a different color for the digits turned out too difficult at first, and I had nearly come to the conclusion that maybe it would even be completely beyond the scope of doing it this way. So I decided to keep the changes of the original hex code to a minimum. Besides, alert readers will spot that the whole inward display bitmap of this old style .gau format gauge is not fully centered. The way it is positioned leaves a lot of blank black space on the right and bottom rims, which, basically, would make it possible to stretch and enlarge the whole frequency area to some extent. This is mainly a matter of eye-candy, but I am afraid I still haven't got to grips with centering this bitmap and I am sorry to say I have no clue for this at the moment. If I should ever come across a solution (dreaming on huh?), I'll put it online here in an update as well.
Ever seen a red Learjet 25G in MS Flight Simulator 3 or 4? The above screenshot shows a modified FS3 Lear taking off from Paris LFPG. No catch 22, the pic is genuine. How about that? Well, stumbling upon old archives recently it occurred to me that long ago when FS3 was still the wave of the time I had tried to modify the somewhat dull colors of some default planes at a time when any kind of Aircraft Designer wasn't heard of yet. So I studied my old notes about how I had once achieved this aim. I installed FS3 on my older P100 Mhz machine and it did run without too many restrictions. Then I reproduced what I had done years ago, i.e. replaced the hex color code for some fuselages and took a lot of screenshots of the newly colored planes, first of all of the Cessna Skylane Turbo RGII and the Lear 25. To cut a long story short, I did all this hoping that my former experience would help me find a way to modify the color of the FS2004 (FS2002, FS2000) Lear radio stack, too. -- Oh, I almost forgot to point out that after taking a close-up look at the radio stack in FS2004 ACOF I found that MS have indeed improved a trifle thing: as the screenshot of the modified gauge reveals, it is now possible to scroll through the digits in both directions (plus and minus), which is of course more comfortable.
Those of you who have some historical and technical interest in how such early modifications could be achieved at that time (1989/1990) may download the information right here.
In fact, it wasn't without some troublesome weeks of studying myriad of combinations of hex code bytes that I happily found the final clue to change the color of the digits, and gosh, the radio stack now looks a heck of a lot better than the default one. And what is more, it works like a charm. You've got to see it to believe it! Basically, it has become possible now to attach diverse colors to the radio stack, which I made full use of in my first feeling of joy. Just for fun. Note that the ADF frequency is still displayed in its original color, size, and font. What a difference! Patience surely has its rewards!
Now, from the following screenshots you can see which entries or bytes must be altered by means of a hex editor to change colors and the type and size of the original font. Note that you cannot edit gauge files by text editors such as MS notepad or similar devices, and even if you think you are familiar with hex editing, be very careful in doing the right thing when trying to change such hex codes. Always make a backup of your old file first.
WARNING: REPLACING THE WRONG HEX CODES OR BYTES WILL MOST LIKELY RESULT IN THE CRASH OF FLIGHT SIMULATOR, TO SAY THE LEAST.
The first screenshot reveals the "inside" of the Lear_45.gau file, which exists in the \FLIGHT SIMULATOR 9\GAUGES folder. The addresses and bytes you see here can be displayed in a hex editor. Please remember that you must not open or save gauge files just by a normal text editor such as MS Notepad or similar, and trying to do so may render the gauge file non-operative.
At the address 06610 you can make the modifications
for the chronometer's clock font. Overwriting the words Courier New
by Quartz is not enough; you must also overwrite all the remaining
letters "r New" by zeros. So put the cursor on the first byte
number after the byte for "z" (last letter of quartz) and type in
"0" for zero ten times in all (without quotes, of course). The
greyed bytes show you how far you must go there. Don't forget to
save the changes you have made.
The screenshots #2, #3, and #4 of the external structure of the multi-gauge show the hex code of the Com1, Com2, Nav1 and Nav2 frequency areas for the successfully modified FS2004 default Lear 45 radio stack. The marks highlighted in red and yellow are done by me and show the modifications of the original code. The yellow marks highlight the triple set of bytes, which contains the color code, whereas the magenta-highlighted bytes define the size of the quartz font. The byte 28 (highlighted in light green) makes the XPNDR frequency shift a little bit to the right.
The greyed hex values (thirty-one altogether) plus the substitution of Courier New by Quartz in the text part show the code (FS2004) as it should be after the modifications. In the modified Lear panel on the right you see the new state of the radio stack and that the font for the chronometer has also been turned into a quartz font. However, note that in FS2004 the Lear chronometer has been modified by MS, as it now misses the feature to select the sim rate and you can only mouse-click on the digits for seconds now, which is by default and not due to any of my modifications. This means that you will have to modify only the font for the clock there.
The ideal look of the Lear radio stack (made with MS Paint, not a genuine screenshot): with the inward display bitmap being fully centered both vertically and horizontally, we'd make the most of the free space within the background bitmap, which would then allow for an even bigger font for the digits. Turning this into reality would be much easier for me if this gauge were an XML format gauge because in this open format the size of bitmaps could be fine-tuned meticulously. In this format I could also adjust the mouse-sensitive spots to the bigger fonts of the digits, which is not an absolute must, though. The extract from a fictitious specimen XML gauge on the right partially reveals the internal structure of this newer type of gauge. This way the torture of modifying the hex code wouldn't be necessary any longer.
Note: It shouldn't hurt your computer but if you imagine it has, we accept no liability. This goes for all modifications of the hex code that have been made with the default Lear_45.gau file.
|Table of color code:
Only for use with a hex editor and tested with the Lear_45.gau file only
00 80 00 = default dim green
My System Specs:
Intel PIII 1,0 Ghz, FSB 133 Mhz, VIA chipset Apollo Pro 133A, 384 megs of SD-Ram PC-133, ASUS AGP-V7700 32MB (nVidia GeForce2 GTS) video card, Creative SB PCI 128 (WDM) onboard, DirectX v8.0a, WinME v4.90, Build 3000.