Hi, I've been sitting and pondering on this myself for the past couple of hours, and this far, I have a php script to decode and show an image-frame on the fly (takes some time, php is slow), however, this only works by guessing the dimensions of the image contained, and its kinda bad.
So, I thought I'd post my thoughts this far to see if anyone can fuel my thoughts.
Frame is always started with
followed by two Int32, compressed size and uncompressed size
sometimes, the first one is 32000 and second one is the byte-count in the frame, dont know if its compressed or not,
or what the significance of 32000 is.
Each frame is limited to 16000 bytes of uncompressed data, hence there can be a couple of frames in sequence to build a larger file
Edit: The frames themselvs seems null padded to 128 bytes, each data-segment has its own padding, which can confuse, since the last frames padding and the datasegments padding is indistinguishable at first
The segment/data headers differs a bit, so here is two I've found and guessed a bit on.
Thoughts have been partially collected from previous mentioned threads at ffevo
Data, Signature
Guesswork:
0x16 - Int32 Number of frames to follow
Header:
Code: Select all
00000000 80 00 00 00 02 00 00 00 6C 01 00 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 00 00 80 00 ........l.....................
00000030 6C 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 l.............................
00000060 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ..............................
00000090 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ..............................
00000120 00 00 00 00 00 00 00 00 ........
Frame+padding:
Code: Select all
00000000 10 00 00 00 00 00 00 00 6A 00 00 00 6C 01 00 00 0B 0E 73 32 CC 61 64 60 00 22 30 46 07 C1 ........j...l.....s2.ad`."0F..
00000030 61 CE 86 0A 68 62 02 40 2C 09 65 AB 7A EA C2 C5 D5 90 D8 EA 48 6C 0D 24 B6 26 12 BB D2 09 a...hb.@,.e.z.......Hl.$.&....
00000060 C1 AE 42 62 57 23 B1 6B 90 D8 B5 48 EC 3A 38 BB C1 AE 1E 89 DD 80 C4 6E 44 62 37 21 B1 9B ..BbW#.k...H.:8........nDb7!..
00000090 11 E6 D8 B7 20 B1 5B 91 D8 6D 48 EC 76 24 76 07 9C ED 60 DF 89 C4 EE 42 62 77 23 B1 7B 90 .... .[..mH.v$v...`....Bbw#.{.
00000120 D8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ..............................
00000150 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ..............................
00000180 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ..............................
00000210 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ..............................
00000240 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
Data, Signature
Total length 464
Guesswork:
Code: Select all
0x08 - Int32 Size of uncompressed data, including its header?, allways seems to be around 80 bytes too small
0xD8 - Int32 Number of frames to follow
The data this segment holds is Gzipped DX1 Compressed Graphics data, seems to be 9 or more different images with halved size in the data.
First one is 256x256 compressed and 1024x1024 uncompressed. However, I have no clue this far, as to what parts of the header actually denotes
the dimensions of the image, the last game had its GTEX-files for this, and that header does not seem to match the new ones
Header:
Code: Select all
00000000 80 01 00 00 04 00 00 00 08 AB 0A 00 10 0A 00 00 25 09 00 00 0B 00 00 00 50 00 00 00 80 4F ................%.......P....O
00000030 03 00 00 00 08 00 00 00 00 00 21 00 00 00 D0 4F 03 00 00 E3 00 00 00 00 02 00 21 00 00 00 ..........!....O..........!...
00000060 09 00 00 00 D0 32 04 00 80 42 00 00 00 80 00 00 2A 00 00 00 03 00 00 00 50 75 04 00 80 12 .....2...B......*.......Pu....
00000090 00 00 00 20 00 00 2D 00 00 00 01 00 00 00 D0 87 04 00 80 05 00 00 00 08 00 00 2E 00 00 00 ... ..-.......................
00000120 01 00 00 00 50 8D 04 00 00 02 00 00 00 02 00 00 2F 00 00 00 01 00 00 00 50 8F 04 00 00 01 ....P.........../.......P.....
00000150 00 00 80 00 00 00 30 00 00 00 01 00 00 00 50 90 04 00 80 00 00 00 20 00 00 00 31 00 00 00 ......0.......P....... ...1...
00000180 01 00 00 00 D0 90 04 00 80 00 00 00 08 00 00 00 32 00 00 00 01 00 00 00 50 91 04 00 80 00 ................2.......P.....
00000210 00 00 08 00 00 00 33 00 00 00 01 00 00 00 D0 91 04 00 80 00 00 00 08 00 00 00 34 00 00 00 ......3...................4...
00000240 01 00 00 00 00 16 80 1A 80 19 00 17 00 1A 00 17 80 18 80 1A 00 08 80 19 00 1F 80 24 00 22 ...........................$."
00000270 00 21 00 20 00 1B 00 0B 00 22 80 1B 00 21 00 23 00 27 00 1D 80 1F 80 0F 80 18 00 17 80 17 .!. ....."...!.#.'............
00000300 00 19 80 1B 00 15 80 0F 00 08 00 1B 80 1A 00 1B 00 20 00 1C 80 22 80 18 80 18 00 03 80 20 ................. ...".......
00000330 80 20 80 01 80 12 80 05 00 02 00 01 80 00 80 00 80 00 80 00 00 00 00 00 00 00 00 00 00 00 . ............................
00000360 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 00 20 34 ............................ 4
00000390 00 00 00 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 50 00 00 00 50 00 08 00 ......................P...P...
00000420 50 00 0A 00 50 80 0A 00 50 A0 0A 00 50 A8 0A 00 50 AA 0A 00 D0 AA 0A 00 F0 AA 0A 00 F8 AA P...P...P...P...P.............
00000450 0A 00 00 AB 0A 00 00 00 00 00 00 00 00 00 ..............
Frame start, frame length: 5606:
Code: Select all
00000000 10 00 00 00 00 00 00 00 E6 15 00 00 80 3E 00 00 ED 5B 7B 74 13 D7 99 1F 6B 64 62 4C 5A F9 .............>...[{t....kdbLZ.
00000030 EC 69 5A 51 D2 13 CB 63 83 C7 34 87 8C CF 26 65 4C 93 B1 46 A2 27 1E 7A 4E B0 88 8D 19 A5 .iZQ...c..4...&eL..F.'.zN.....
00000060 35 D6 98 14 A4 6C 1C 50 F6 6C B0 48 24 CF 18 38 C1 6C DD C5 71 D3 DA A4 06 3D 8C 91 B2 51 5....l.P.l.H$..8.l..q....=...Q
00000090 76 69 69 C2 6B 40 B2 79 65 BB F1 36 E5 11 43 8A B1 64 1E A6 BB 36 0F 1B 5B 96 E6 EE BD 22 [email protected]..[...."
00000120 A5 B4 3C 6C 88 E9 92 9E 9D 7F BE 73 67 EE DC B9 8F EF 7E BF DF F7 7D 77 7A B4 3A 1D 50 46 ..<l.......sg.....~...}wz.:.PF
00000150 CB 53 D2 E6 52 00 54 01 57 46 0E 09 C0 F9 00 41 66 43 09 14 0C 4B C1 A0 04 0F 9A 74 6B C3 .S..R.T.WF.....AfC...K.....tk.
00000180 99 50 C8 7F 2C E3 05 D9 05 B0 28 E3 05 06 16 00 A7 60 60 05 28 95 EB F5 89 02 02 96 83 B1 .P..,.....(......``.(.........
00000210 07 75 3C F7 2A 0D 6C 25 87 E6 ... .u<.*.l%..
Any suggestions?