Members Eraea Posted July 22 Members Posted July 22 Hi guys! I have these .bin files with the header CCHG1.5, which from trying to read the game's decompiled ELF is under the "ColorChangeManager" and "System" v so I assume its a file format for the game's system to read, and also the filepath for the _col.bin is found on a part of the ELF as a pointer or something I assume its either an archive again since its a .bin file or a custom file format for storing images. col files.7z
Engineers h3x3r Posted August 2 Engineers Posted August 2 (edited) And it's compressed... I see multiple chunks. Chunk table > uint16 compressed size, But not sure where is offset Compression is deflate. Offzip should dump it into one file. After decompression I get this textures Edited August 2 by h3x3r 1 1
DKDave Posted August 2 Posted August 2 And just to add a bit more info - the file count is at offset 0x14 (Big Endian). Offset 0x60 contains the offsets for each list of compressed sizes, followed by the filenames. There aren't any offsets - you just have to align to the next 16-byte offset after reading the compressed data blocks.
Engineers Solution h3x3r Posted August 3 Engineers Solution Posted August 3 (edited) O.K but how to know how many blocks are there?. I noticed that texture with 1024 width use 256 blocks and texture with 512 width use 128 blocks. Could this be the solution? Here's BMS. Hope my guess right... txt describes width/height of texture. You must figure out pixel format on your own. get BaseFileName basename endian big comtype deflate_noerror getdstring Sign 0x8 get Unknown_0 uint32 get TotalFileSize uint32 get Unknown_1 uint32 get TextureCount uint32 get TextureWidth uint32 get TextureHeight uint32 getdstring Dummy 0x40 xmath ChunkCount "TextureWidth / 4" for i = 0 < TextureCount get ChunkTableOffset[i] uint32 next i for i = 0 < TextureCount get TextureName[i] string next i for i = 0 < TextureCount goto ChunkTableOffset[i] for j = 0 < ChunkCount get CompressedChunkSize[j] uint16 next j for j = 0 < ChunkCount savepos Offset xmath CompressedChunkCSize "CompressedChunkSize[j] ?align 16" getdstring CompressedChunk CompressedChunkCSize string Name p "%s/%s.dat" BaseFileName TextureName[i] append 0 clog Name Offset CompressedChunkSize[j] CompressedChunkSize[j] next j string TexDef p "%s/%s_def.txt" BaseFileName TextureName[i] slog TexDef 0x18 -1 long slog TexDef 0x1C -1 long next i Edited August 3 by h3x3r 1
Members Eraea Posted August 6 Author Members Posted August 6 Thank you! The game uses many .GTF Files so I assume it's a gtf file or something, but maybe not.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now