Command and Conquer 3 - TGA files

Get your graphics formats figures out here! Got details for others? Post here!
Post Reply
User avatar
Mr.Mouse
Site Admin
Posts: 4051
Joined: Wed Jan 15, 2003 6:45 pm
Location: Dungeons of Doom
Has thanked: 421 times
Been thanked: 575 times
Contact:

Command and Conquer 3 - TGA files

Post by Mr.Mouse » Sun Mar 11, 2007 2:20 pm

Ok, so I downloaded the C&C3 demo and opened the *.BIG archives as "Lord of the Rings: BFME" BIG files in MultiEx Commander.

I noticed some TGA files in there, but they don't show in Photoshop and others.

I've attached two of them, perhaps someone can take a look.

:)
You do not have the required permissions to view the files attached to this post.

User avatar
Savage
VIP member
VIP member
Posts: 560
Joined: Sun Apr 17, 2005 11:00 am
Has thanked: 16 times
Been thanked: 17 times

Post by Savage » Sun Mar 11, 2007 6:12 pm

Well the two files are identicals, have the same code, and the same of you i can't open the tga files
Image

User avatar
john_doe
VIP member
VIP member
Posts: 80
Joined: Sat Oct 21, 2006 2:25 pm
Been thanked: 1 time

Post by john_doe » Sun Mar 11, 2007 11:00 pm

The files are compressed, like almost all files from these BIG files.
I don't know the compression method uses but suspect it could be the "default" Westwood compression (usually called something like codec80).

User avatar
Savage
VIP member
VIP member
Posts: 560
Joined: Sun Apr 17, 2005 11:00 am
Has thanked: 16 times
Been thanked: 17 times

Post by Savage » Mon Mar 12, 2007 12:44 am

I read the data are compressed with RefPAck, the unpacker BigEditor Beta 0.5 comes with this unpacker

Why not try to extract the data with this Big file unpacker?
(...)is credited for his RefPack Decompression code used in the program(...)
Info about it:
http://www.ppmsite.com/forum/viewtopic.php?t=14272

Unpacker:
http://www.ppmsite.com/downloads/BIGEditorBeta05.zip
Image

User avatar
Mr.Mouse
Site Admin
Posts: 4051
Joined: Wed Jan 15, 2003 6:45 pm
Location: Dungeons of Doom
Has thanked: 421 times
Been thanked: 575 times
Contact:

Post by Mr.Mouse » Mon Mar 12, 2007 10:07 am

Yes, well, of course, in my case, I wish to KNOW what's going on, instead of using someone else's tool. If I ever want to implement new decompression routines in MultiEx Commander, I must know what the compression method is.

In any event, your tips pointed me in the right direction and I attach a tool by Jonwil, including source code. The tool seems to decompress the TGA files file.

Note that the code has been adapted by Mad Ivan so it could actually run. See for reference:
http://www.derelictstudios.net/forums/i ... 52&t=15016

Below the tool with source code to decompress!
You do not have the required permissions to view the files attached to this post.

User avatar
Savage
VIP member
VIP member
Posts: 560
Joined: Sun Apr 17, 2005 11:00 am
Has thanked: 16 times
Been thanked: 17 times

Post by Savage » Mon Mar 12, 2007 11:24 am

Thanks i found the unpacker too, but the zip whas CRC error, so i posted the big unpacker, with comes with the source

The decompress works great 8D
Image

Rheini
Moderator
Posts: 653
Joined: Wed Oct 18, 2006 9:48 pm
Location: Germany
Has thanked: 19 times
Been thanked: 40 times
Contact:

Post by Rheini » Tue Mar 20, 2007 5:01 pm

I wonder if there is any good documentation of this compression. Don't want to go through all that code.

User avatar
Deniz Oezmen
VIP member
VIP member
Posts: 185
Joined: Mon Aug 28, 2006 2:07 pm
Has thanked: 1 time
Been thanked: 14 times
Contact:

Post by Deniz Oezmen » Wed Mar 21, 2007 11:48 am

Rheini wrote:I wonder if there is any good documentation of this compression.
I do not think that thic method can be documented very well (except reducing the give source code to pseudo code) due to the high usage of flag bits. This is most probably a self-constructed scheme, though the main idea is yet again "find references in past data". It is interesting, though, that the designers have combined back references and literal copying in the handling of most opcode sequences. I have not seen that before ...

Post Reply