I hope to once again get people interested in this file format.
First of all, the .PIC format for Sid Meier's Covert action has been decoded:
https://www.gog.com/forum/sid_meiers_co ... _fun/post6
Second of all, so has the Format for CIV Dos:
https://forums.civfanatics.com/threads/ ... st.478234/
However, despite having the same ending, Sid Meier's Railrod Tycoon Deluxe files seem to be in a different format and I very much doubt that it is an LZW-Format.
The game can be obtained for free from the publisher, the original poster shared the link. Like the OP says, this is different from the original (non deluxe) game.
The following concerns the deluxe version.
With the game comes an intro.exe which displays labs.pic as the first thing so that might be an natural starting point for investigation.
The File begins thus:
0x0000: 00 48 38 00 - unknown
0x0004: 80 02 90 01 - image resolution (640x400)
0x0008 - 0x0037: palette data (16 colors * 3 bytes)
The rest of the file is pixel data. The little I was able to find out is the following:
- The data is layered in bits (i. e. LSB stored first for all pixels). There is a total of 4 layers, this matches the 16 palette entries.
- there is some kind of RLE going on.
Example (continued):
0x0038: 48 09 - unknown
0x003A: 55 55 - also unknown but this might be a magic value to signify the begining of some sort of block. It reoccurs within the file at suspicious positions, e. g. the beginning of layers. But also within layers so idk. Changing it seems to break the file rather than changing image data but I'm not so sure.
0x003C: 00 - this the pattern for setting bits, i. e. setting this to AA sets the bit for every other pixel for some time, but not throughout the whole layer.
0x003D: FF F8 FC - this is a consecutive block of length FC+1 filled with the same pattern. This seems to be the longest run length handled by the encoder. The sequence FF F8 FC is found in many files and at many positions. The actual effect of the first FF is some kind of super pattern, i. e. a pattern affecting blocks of 8 pixels. I think I have isolated the pattern but then again that might have been an artifact of the decoder, so I'm trying not to influence people on that one. I have no idea whatsoever, what the F8 does.
0x0040: FF F8 FC - this is to say, there is no further "pattern byte" (cf. 0x003C), the RLE just continues.
As you can see I don't really have an idea what I am doing here. I have not been able to figure out sequences which contain actual image information rather than long sequences of the same color. I hope however that something in my analysis is meaningful to people who know better. Or that I have sparked someones curiosity.
Hints howto continue analysis are also appreciated.