RAF_Roy's 2 dat check - Freeware - Useful to know the coding used or check for errors.

Place a targets.dat and airfield.dat in the program's folder to check them.

Compares 2 EAW .dats as follows
reads targets.dat ; reads the acodes (airbase codes) and the tardata pointer.
It then jumps to airfield.dat from the above read calculation.(unless the acode is zero)
There it reads airfield.dat record for the tcodes present.The program creates a report named "datinfo.txt" in its folder (It should also open it in your notepad for you on exit).

**note : It will delete any prexisting "datinfo.txt" in the folder each time it runs new!**

This program can read and compare any targets.dat and airfield.dat of any size and coding - even the new non-standard ones made by Mr. Jelly's programs or Gurney's.

All should be easy to understand, but still here is an example of a report from the 2 default EAW files:
----------------------------------------------
Sun 1/2/05 3:22:09 PM
Data Reports for the 3 .dats
----------------
(add 4 for header to get true addresses)
(if pointer =single digit(s) put zero before it(s) for hex #)
--(The decimal converted Tcode should match record #)--
--(if not you have an airfield.dat coding error!)--
----------------
Targets.dat record #0 
Acode = 0
Targ. Pointer = F5 0
to Tardata address: 7840
--------------
----------
--------------
Targets.dat record #1 
Acode = 82
to Airfield address: 5720
Tcode from Airfield.dat:
1 0
decimal convert= 1
Targ. Pointer = 8D 4
to Tardata address: 37280
--------------
----------
--------------
About the notes: 
-To add for for header to the address if you wanted to find the true address in a hex editor.
The reason I did not just add it in is that use this way follows the EAW conventional listing of addresses.
-Note about zero before single digit is just because my programming prints the values this way.It would be very laborious to change it - so just have to remember this quirk.
-Decimal converted match : this will easy tell you if coding error. - But be sure you are using the proper targets.dat with the proper airfield.dat first!

O.k. on with the example:
The record begins from 0 and (if your file is that big) goes to end.In this case 301.For a total of 302 if default.(but it can be any size it does not matter to the program).
You see that here record #0 has 0 for Acode.So much additional data is not reported from airfield.dat.
There is a slight problem with this in EAW.0 (or "00") can be used as an acode.it would be the first record in airfield.dat.
In default EAW it is Horsham St Faith.But sorry, you will have to check that yourself.Because of programming hassles this will not check it.Sorry!

On to record #1 :
Here you see much data.The tcode is read from airfield.dat.
That converted should match record # as told above.

Well, that's all.

-S!
RAF_Roy
1/2005







