Page 1 of 15
Watch_Dogs fat and dat archives
Posted: Fri May 23, 2014 1:00 pm
by namquang93
This game's file structure is similar to Far Cry series with fat and dat archives, but a bit different. Here is an example, can anyone take a look into this. Hope someone can make a unpacker/packer for it, like Rick's tools. Thanks in advanced.
Code: Select all
https://www.firedrive.com/file/BA315D54DDCE56FC
Re: Watch_Dogs fat and dat archives
Posted: Fri May 23, 2014 1:16 pm
by Ekey
Code: Select all
struct FATHeader
{
DWORD dwID; // 3TAF
DWORD dwVersion; // Always = 8
DWORD dwUnknown;
DWORD dwTotalFiles;
};
Code: Select all
struct FATEntry
{
DWORD dwHash;
DWORD dwSize;
DWORD dwZSize;
DWORD dwOffset;
};
PC > XMem
PS3 > Deflate
Xbox > XMem
PS: Edited info > thx Haoose
Re: Watch_Dogs fat and dat archives
Posted: Fri May 23, 2014 4:20 pm
by cra0
can you upload that common dat file?
Re: Watch_Dogs fat and dat archives
Posted: Fri May 23, 2014 4:29 pm
by HAIDER6222354
cra0 wrote:can you upload that common dat file?
this common dat and fat for ps3 version
https://www.firedrive.com/file/7769DA947BE2EA60
Re: Watch_Dogs fat and dat archives
Posted: Fri May 23, 2014 5:12 pm
by namquang93
this is from pc version
Code: Select all
https://www.firedrive.com/file/B7B191D4E38EA190
Re: Watch_Dogs fat and dat archives
Posted: Sun May 25, 2014 12:50 pm
by cra0
namquang93 wrote:this is from pc version
Code: Select all
https://www.firedrive.com/file/B7B191D4E38EA190
yep I got the pc version will take a look soon
Re: Watch_Dogs fat and dat archives
Posted: Sun May 25, 2014 4:53 pm
by cra0
It's just a modifed Xmem i think... well for pc at least I can see the magic header, here is a 010 editor script anyway for the fat files using what ekey found
Code: Select all
//--------------------------------------
//--- 010 Editor v5.0 Binary Template
//
// File: common.fat
// Author: EKey/Cra0kalo
// Revision: 1
// Purpose: WatchDogs
// ByteFormat - Little Endian
//--------------------------------------
typedef float vec3[3];
typedef float quat4[4];
typedef string asciiz;
struct
{
DWORD dwID; // 3TAF
DWORD dwVersion; // Always = 8
DWORD dwUnknown;
DWORD dwTotalFiles;
}FATHeader;
//DWORD UnknownA;
local int i;
for(i = 0; i < FATHeader.dwTotalFiles; i++ )
{
struct
{
DWORD dwHash;
DWORD dwSize;
DWORD dwZSize;
DWORD dwOffset;
}FATEntry;
}
As for Xmem we can see the usual 0x0F 0xF5 0x12 0xEE magic identifier in the dat
Another script of a standard header it's obviously different but yeah I'm about to head to sleep will take a look tomorrow
Code: Select all
//--------------------------------------
//--- XCOMPRESS
//--- Watch Dogs 2014
//--------------------------------------
long Identifier; // # XCOMPRESS_FILE_IDENTIFIER_LZXNATIVE
long ContextFlags;
long Flags;
long WindowSize;
long CompressionPartitionSize;
long UncompressedSizeHigh;
long UncompressedSizeLow;
long CompressedSizeHigh;
long CompressedSizeLow;
long UncompressedBlockSize;
long CompressedBlockSizeMax;
xcompress.h
Re: Watch_Dogs fat and dat archives
Posted: Sun May 25, 2014 5:38 pm
by Ekey
PS3 compressed data header
Code: Select all
struct DataHeader
{
SHORT wChunksCount;
SHORT wUnknown; //xFF\x0F
for(i = 0; i < DataHeader.wChunksCount; i++ )
{
Read(wChunksSizes, 2);
}
};
Re: Watch_Dogs fat and dat archives
Posted: Mon May 26, 2014 7:14 pm
by killerpepo
Thanks to you guys I was able to extract the XCompress using quickbms , but there is a little modification to the file struct.
All big endian
Code: Select all
//--------------------------------------
//--- XCOMPRESS
//--- Watch Dogs 2014
//--------------------------------------
long Identifier; // # XCOMPRESS_FILE_IDENTIFIER_LZXNATIVE
long ContextFlags;
short Version;
short Reserved;
long Flags;
long WindowSize;
long CompressionPartitionSize;
long UncompressedSizeHigh;
long UncompressedSizeLow;
long CompressedSizeHigh;
long CompressedSizeLow;
long UncompressedBlockSize;
long CompressedBlockSizeMax;
long CompressedBlockSize;
I'll try to post the script , btw :I'm not good in writing scripts
Re: Watch_Dogs fat and dat archives
Posted: Mon May 26, 2014 8:18 pm
by Gruselgurke
How did you uncompress it? Does the game still work with uncompressed .dat files?
Might help with some performance issue many users have with the game.
Re: Watch_Dogs fat and dat archives
Posted: Mon May 26, 2014 8:45 pm
by Haoose
Gruselgurke wrote:Does the game still work with uncompressed .dat files?
No. Need modified EXE-file for it
Re: Watch_Dogs fat and dat archives
Posted: Tue May 27, 2014 7:15 am
by Rick
Haoose wrote:Gruselgurke wrote:Does the game still work with uncompressed .dat files?
No. Need modified EXE-file for it
Not sure why that would be the case, the archive format supports uncompressed data just fine.
Re: Watch_Dogs fat and dat archives
Posted: Tue May 27, 2014 7:51 am
by namquang93
Rick wrote:Haoose wrote:Gruselgurke wrote:Does the game still work with uncompressed .dat files?
No. Need modified EXE-file for it
Not sure why that would be the case, the archive format supports uncompressed data just fine.
hello, will you work on this game ? I really love the way you did with Far Cry 3.
Re: Watch_Dogs fat and dat archives
Posted: Tue May 27, 2014 8:42 am
by Rick
When I have the time.
Re: Watch_Dogs fat and dat archives
Posted: Tue May 27, 2014 12:57 pm
by kalleoskar
Cool to see some progress! For me im wondering and am curious about the scripts, and if we are able to change them up depending on the code