Some versions of aircraft models have a problem with the way the visual model has been stored inside the MDL file when the model is bigger than 64K. When an aircraft with this problem is loaded in Flight Simulator you usually get the message:
MDL files are actually DLLs, which are loaded by the operating system in the same way as all other executable code. The problem arises because the operating system DLL loader for Microsoft Windows NT 4, 2000, and XP does not like the incorrect data in the MDL file, but the loader for Microsoft Windows 95/98/Me just ignores it.
MDL Repair will correct the problem data stored in the MDL files, to ensure that it can be properly loaded on NT, 2000 and XP. Note that the program does not run on Windows 95/98/Me because it is not needed, and that the program makes use of facilities that are only available on NT/2000/XP. However, any fixed MDLs will still function perfectly on Windows 95/98/Me.
FS2002 has a new format for MDL files created by the GMax tool. These newer files are not DLLs, and do not suffer from the problems seen in the DLL based MDL files. Version 2 of the program knows when it has accessed a GMax built MDL file, and ignores it. The first version of MDL Repair incorrectly reports that GMax models are corrupt.
The new version program is very simple to use, and will scan a directory and fix any problem visual model files. To start the program, simply click on MDLRepair.exe in the folder where you unzipped the files. You should then see this screen.
The areas of the window, marked in red, are used for the following purposes:
1. List of option buttons that lets you choose the version of Flight Simulator you wish to scan. The program knows how to find the following versions of the product:
· Flight Simulator 98
· Combat Flight Simulator 1
· Flight Simulator 2000
· Combat Flight Simulator 2
· Flight Simulator 2002
The edit area in 2 will then be correctly set with the path to the installed aircraft for the selected product. Only those products you have installed will be enabled in the list of option buttons.
2. Edit box and browse button, allow you to alter the path you wish to scan, by typing into the edit box. Alternatively, pressing the “…” button will allow you to browse to the folder you wish to scan.
3. The checkbox allows you to toggle the scanning of subfolders of the selected folder. Usually this will need to be used, especially if you have used the preset paths for the products you have installed, as all the MDL files are in subfolders.
4. The listview will contain a list and the status of all aircraft scanned. The list will contain the relative path to the MDL file plus one of 4 icons that describe the current status of the MDL file.
|
MDL file has no problems |
|
MDL file is of an unknown type |
|
MDL has the known visual model problem |
|
MDL is in the new GMax format |
5. The buttons that do the work:
· Scan – will process the folders selected and report on any MDL files it finds, adding entries to the display area (4). The button will only be enabled if you have selected a folder that already exists on your PC
· Repair – if there are MDL files that need to be repaired then this button will carry out the operation, and update the display area (4) with the results. The button will only be enabled if there are MDL files that require repairing.
· Exit – does what it says!
The program creates a backup of the model file in the same directory but with a “.bk!” extension added to the original name. For example “daves.mdl” would be backed up to “daves.mdl.bk!”.
We will first use the program to scan FS2002. Start by running the program and selecting the “Flight Simulator 2002” option button. You should see a screen like this.
We are now ready to scan the folders, so press the “Scan” button and wait a few seconds whilst the program analyses the MDL files of the aircraft you have installed. When completed the results area (4) should be updated as in the next screen shot.
Naturally, your results will look different from mine, depending on what 3rd party aircraft you have installed. Here you can see that all the aircraft visual models are either OK, or are of the new GMax format.
You may want to scan aircraft in another directory before adding them to Flight Simulator. To do this you can use the edit box and browse button to specify the path to an MDL file. When you press the “…” browse button (2) you are presented with the standard Microsoft dialog for selecting folders.
Once you have selected the folder you can then press the “Scan” button, giving for my example the following results.
Here we have a mixture of files that have a problem and those that are OK. We are now set to fix those that can be fixed. In this example the “bad2.mdl” is set to read-only, and it also has an existing backup file present. When we press the “Repair” button we are presented with two messages telling us that the file is read-only
and has a previous backup.
The “Yes” button will allow the repair to proceed. “No” will skip this file and carry on with the next file in the list.
After we have run the repair, we find that the files "bad1.mdl" and "bad2.mdl" have been successfully fixed, with the icons in the file area (3) updated. In this particular example on my machine, two files were not fixed:
· “dummy.mdl” file was not fixed, because it is really a text file
· “unfixable.mdl” could not be fixed because although it is an FS MDL file, it really is completely broken and cannot be fixed by the program.
Also one file “other.mdl” is a file with the same extension but is not associated with a FS visual modle.
There are 2 areas where there may be problems.
1. You have a model that does not repair. There are usually 3 reasons for this:
a. The file is not a FS visual model file. There are other products that use the “.mdl” extension and you might have inadvertently tried to repair one.
b. The file has some error other than the one MDL Repair is designed to fix. Your first action should be to re-install the aircraft as it may have been corrupted on the hard drive. If that does not fix it then I will take a look at the file, so long as you email me first with the details.
c. Some commercial products use compression utilities on the MDL files, which appear to make the file corrupt. Please email me if you think this is an issue. For example the MDL files with the Pearl Harbor product for CFS2 have been compressed and cannot be fixed with MDL Repair
2. Alternatively the program has an error. This can happen when trying to analyse a severely corrupted MDL file. To help me produce a better program, there is a sophisticated error logging system incorporated into this version of the product. If the program fails then you should see a dialog box like this displayed.
Also a log file called “MDLRepair.log” is written to the same directory as the MDL Repair program. If this happens then please contact me by email for support.
I hope that this program is useful. I am always happy to take feedback and help whenever I can.
MDL Repair Version 2.0 Copyright © 2000 - 2002 Dave Parsons.
All Rights Reserved.
Free distribution ONLY. It cannot be included in a fee package. This includes disk distribution or any other fees of any kind. MDL Repair may NOT be used for any for-profit purpose. This means no editing for-sale aircraft, without the prior permission of the author.
The author MUST approve any exceptions to the above.
No warranty of any kind expressed or implied.
First Release Date: 09/04/00
This Release Date: 28/04/02
dave@parsons999.freeserve.co.uk