COL files

Original URL: http://www.simhq.com/simhq3/sims/boards/bbs/ultimatebb.php?ubb=get_topic;f=64;t=001091

Archived from mikew’s private copy

avatar
Polak

As I have mentioned before Col files located in Colours folder are most probable palette files.
Examination with hex editor reveals 10 byte header as folows:

52 41 00 02 00 03 00 00 00 7d

This header is exactly the same for all of the *.col files and 3 word or 5 and 6 byte of the header in Big Endian byte order reads 768 which happens to be 256 ×3. Coincidence?

avatar
Polak

Forgot to add that my wild guess is that the palette is for the sky gradient on different altitudes and that all col files are with that RA file stamp. If the colors could be sampled perhaps this can lead to decrypting of the RA encryption, or at least good part of it.

avatar
Polak

One more piece of information perhaps should/could be looked into. As I have mentioned before, group of good people at Xentax site have helped me to unpack this big DID.DAT file but mostly in encrypted/or I should call compressed form.

Thanks to their MultiEx program, I was able to look at certain lbm and pcx and other files, but not even close to the extend we are able now see thanks to Krus’s breaktrough program, which was revealed yesterday and actually can dump most of the files in already decompressed form.

Still, if we made little excersise and compare results of those two decompression operations we could come with several examples of matching compress and decompressed file. That could lead to making unpacker to all of the compressed files and TAW would have secrets before us no more.

Or perhaps that what is already in the making, Mr.Krus, Sir?

avatar
Krusade

I on it 😉, I have now very well located the RA decompression subrutine; all files pass through it but binary files like .col or .ssd shows extrange results I need to understand to complete the extraction tool.
The other possibility is to make my own RA decompressor using the results of the txt files … it seems that RA has a header followed by data, the header appears to be just a map of compressed and uncompressed parts in the data.

I´m testing both ways

avatar
Polak
Krusade

it seems that RA has a header followed by data, the header appears to be just a map of compressed and uncompressed parts in the data.

I thought you were well on it. 👍

I would love to know little more how do you go about those compressed RA files. Which text files are found in both forms? Briefings?

Initial look into the files with hex editor gives me hint that 3 files are 3D files – models, but I am little puzzled by presence of SSD files as they appear to cover same subjects – perhaps textures.

Is there anything you would like me to help or I take a good look at those terrain tiles and try to group them into transitions making sense.

avatar
Krusade

I have uploaded a new version, I think all the files are now decrompressed correctly.

http://www.f22taw.com/datas/users/4-extract_en_d.zip

avatar
Polak

Very exciting news. Do you mean they not only unpack from dat, but also decompress RA files?
Yesterday I have run all options of the game one by one to build the outside folders and files. But after renaming DID.dat I still was missing something about light points or something like that???

Let us see what this new decompression going to reveal. Thanks.

avatar
Krusade

You are right some uncompressed files weren’t extracted … I have reuploaded the tool and tested it. At least for me now I can run the game without did.dat

About ra, yes, it decompresses RA files

avatar
Polak

Right out looking at 1400pal.col decompress file I see expected 768 records which is no sweat to build custom palette to use on all of the textures in color.

00 00 00 00 00 00 2b 05 05 2a 17 16 29 28 28 0d 0d 26 1d 1a 26 29 28 28 00 3f 00 00 3f 00 00 3f 00 00 00 00 00 23 05 3f 00 01 30 06 15 0f 25 1a 07 18 12 1d 2d 3f 00 14 29 0b 18 24 07 20 3f 2a 2a 2a 1f 1f 1f 2d 2d 00 2b 2b 2b 2c 2c 2d 2d 2d 2f 2e 2e 31 2f 30 34 30 31 36 30 32 38 31 33 3b 0b 09 08 0c 0a 09 0d 0b 0a 0e 0d 0b 10 0e 0c 11 0f 0d 13 10 0e 14 11 0f 16 12 10 17 14 11 19 15 13 1a 17 14 1b 18 15 1d 1a 16 1e 1b 17 1f 1c 17 20 1d 18 21 1e 19 22 1f 1a 23 20 1b 24 21 1c 25 22 1d 26 23 1e 28 24 1f 29 25 20 2a 27 22 2c 28 23 2d 2a 24 2f 2b 25 30 2d 27 31 2e 28 33 30 2a 2a 27 23 2a 29 27 2b 2a 29 28 2a 24 29 2a 26 2a 2a 2a 26 26 2b 28 28 2c 2a 2a 2c 2b 27 22 2a 28 26 2a 2a 2a 2a 29 29 2a 29 29 2a 29 29 2a 2a 2a 08 09 06 09 0a 06 0a 0b 07 0a 0c 07 0b 0d 08 0d 0e 09 0e 0f 0a 0f 10 0b 10 11 0b 10 12 0c 11 13 0d 13 15 0e 14 15 0f 15 16 10 16 17 10 16 18 11 17 19 12 18 1a 13 19 1b 14 1a 1c 15 1b 1d 16 1c 1e 17 1d 1f 18 1e 21 19 20 22 1a 21 23 1c 22 25 1d 23 26 1f 25 27 20 26 29 22 28 2a 23 2a 2c 25 09 0b 0f 0b 0d 10 0d 0e 13 0f 11 16 10 13 18 12 15 1a 14 17 1d 17 19 1f 19 1b 21 1b 1d 23 1d 1f 25 20 21 28 22 23 29 23 24 2b 25 26 2c 28 29 2e 23 27 3b 24 27 3b 25 28 3b 26 29 3b 27 2a 3b 28 2b 3b 29 2b 3b 2a 2c 3b 2b 2d 3b 2c 2e 3b 2d 2f 3b 2e 30 3b 2e 31 3b 2f 32 3b 30 32 3b 31 33 3b 39 38 2c 3a 35 24 3b 31 1c 3d 29 13 3e 23 0c 3f 1f 09 3f 1b 02 39 17 01 33 14 01 2c 10 01 26 0e 00 20 0c 00 19 09 00 12 06 00 0c 04 00 05 02 00 16 13 10 18 15 12 19 16 13 1b 18 14 1c 19 15 1e 1b 17 20 1d 18 21 1e 19 23 20 1b 24 21 1d 26 23 1d 28 24 1f 29 25 20 2b 27 22 2c 29 23 2e 2a 24 00 00 00 01 01 01 02 02 02 03 03 03 04 04 04 06 06 06 07 07 07 08 08 08 0a 0a 0a 0b 0b 0b 0c 0c 0c 0e 0e 0e 0f 0f 0f 11 11 11 12 12 12 13 13 13 15 15 15 16 16 16 17 17 17 19 19 19 1a 1a 1a 1b 1b 1b 1e 1d 1d 20 1f 1e 22 21 20 24 23 22 25 25 24 27 26 26 29 28 28 2a 29 29 2b 2b 2a 2d 2c 2c 2f 2d 2d 31 2f 2f 33 31 31 34 33 33 36 35 35 37 36 36 38 36 36 38 37 37 38 38 38 39 39 39 3a 39 39 3b 3a 3a 3b 3b 3b 3c 3c 3c 3d 3d 3d 3e 3e 3e 0b 0b 08 0c 0c 09 0e 0e 0a 10 10 0c 11 12 0d 13 14 0f 15 16 11 16 18 12 18 19 14 1a 1b 16 1c 1d 17 1d 1f 18 1e 21 1a 20 23 1c 22 25 1e 23 26 1f 20 1e 1b 22 20 1d 23 22 20 25 24 22 27 26 24 29 28 27 2a 2a 2a 18 19 18 1b 1c 1a 1e 1f 1d 21 22 20 24 24 23 27 27 26 2a 2a 2a 3e 3d 3a 35 35 35

Each 3 byte records constitutes 1 color (RGB). Palette starts with 2 black indexes one of which is a probable transparency.

Now I believe that introducing new colors is aslo possible however it is limited to those 256 slots for terrain and planes and other textures of 3D objects.

I will inspect other palettes meanwhile perhaps there can be some volunteers who can commence translating hex bytes to decimals in order to built custom palette in paint program.

EDIT: Because of many palette files, frankly we need simple tool to read and make new palettes.

avatar
Polak

As our friend Krus pointed out in the other thread, *.col file can be renamed to *.act and loaded in Photoshop with no fuss and no problem. So no converter needed at all.

avatar
Polak

I think I have learned the logic of palettes for TAW world. They differ according to the time and so they reflect changing light level of the day and little of the night.

There are 10 basic time and light settings:
6:00, 8:00, 10:00, 12:00 14:00, 16:00, 18:00, 20:00, moon and no moon.

There are also 4 alternate groups of settings I believe perhaps for different weather states for each of those times listed above.

There is one more palette: TV which is just grayscale with no colors.

The difference in palette is hardly noticeable and so is the result in the game. I’ll post some pictures later along with some more comments about location of specific coloros: for planes, terrain/targets, decals, sky, explosions, water etc. on the palette. Textures are grouped accordingly by subjects.