May 2May 2 Localization Are there existing tools that can unpack data from .dta .pdo .pdw? stcc2_dta.rar stcc2_pdo.rar stcc2_pdw.rar
May 3May 3 Localization The format is something like this: // HEADER 4 - Header (PDI1) 4 - Number Of Files (including Padding files) 4 - Number Of Files 4 - Unknown (30) 4 - Directory Offset (46) 4 - CDI1 Data Offset 4 - Length Of CDI1 Data 2 - null 14 - Padding (all 255's) 2 - Unknown (3) // DETAILS DIRECTORY // for each file (68-bytes per entry) 2 - File/Directory ID (4=directory, 24=uncompressed file, 25=Compressed file, 0=padding file) if (file){ 2 - File ID (incremental from -1)(some are -1, which skip over the number for this loop) 2 - File ID (incremental from 1)(some are -1, which skip over the number for this loop) 6 - Unknown (all 255's) 4 - File Offset (relative to the start of the file data) 4 - File Length 44 - Filename (null terminated, filled with nulls) 4 - Unknown } else if (directory){ 2 - File ID (incremental from -1)(some are -1, which skip over the number for this loop) 2 - File ID (-1) 4 - Unknown 4 - Unknown 6 - null 44 - Directory Name (null terminated, filled with nulls) 4 - null } else if (padding file){ 66 - null } // FILE DATA // for each file 4 - CDI1 Header (CDI1) 4 - Decompressed File Length 4 - Flags (16=TEA Encryption, 17=TEA Encryption and Compression) X - File Data Files can be encrypted with the TEA algorithm, with Key = THEEVENTHORIZONS Files can also be compressed, but not currently sure what the compresison algorithm is. From looking at the TXT files in the archive, it looks like you need to decrypt the file first, and then it looks like the compression might be RLE-based?
May 3May 3 Author Localization 2 hours ago, wattostudios said: The format is something like this: // HEADER 4 - Header (PDI1) 4 - Number Of Files (including Padding files) 4 - Number Of Files 4 - Unknown (30) 4 - Directory Offset (46) 4 - CDI1 Data Offset 4 - Length Of CDI1 Data 2 - null 14 - Padding (all 255's) 2 - Unknown (3) // DETAILS DIRECTORY // for each file (68-bytes per entry) 2 - File/Directory ID (4=directory, 24=uncompressed file, 25=Compressed file, 0=padding file) if (file){ 2 - File ID (incremental from -1)(some are -1, which skip over the number for this loop) 2 - File ID (incremental from 1)(some are -1, which skip over the number for this loop) 6 - Unknown (all 255's) 4 - File Offset (relative to the start of the file data) 4 - File Length 44 - Filename (null terminated, filled with nulls) 4 - Unknown } else if (directory){ 2 - File ID (incremental from -1)(some are -1, which skip over the number for this loop) 2 - File ID (-1) 4 - Unknown 4 - Unknown 6 - null 44 - Directory Name (null terminated, filled with nulls) 4 - null } else if (padding file){ 66 - null } // FILE DATA // for each file 4 - CDI1 Header (CDI1) 4 - Decompressed File Length 4 - Flags (16=TEA Encryption, 17=TEA Encryption and Compression) X - File Data Files can be encrypted with the TEA algorithm, with Key = THEEVENTHORIZONS Files can also be compressed, but not currently sure what the compresison algorithm is. From looking at the TXT files in the archive, it looks like you need to decrypt the file first, and then it looks like the compression might be RLE-based? Is there a tool that can decrypt files I've extracted from DTA/PDO/PDW? Edited May 3May 3 by mrmaller1905
May 3May 3 Localization Looked at it and I think it's more something like this: bitfield f1 { bool compressed : 1; padding : 1; bool is_dir : 1; bool is_file : 1; bool unk1 : 1; padding : 11; }; bitfield f2 { bool compressed : 1; padding : 3; bool encrypted : 1; padding : 11; }; struct cdi1 { char magic[4]; u32 usize; padding[2]; f2 f; }; struct e { f1 f; if (!f.is_dir && !f.is_file) padding[0x42]; // this doesn't have to be here but it just makes it look cleaner else { s16 ids[5]; u32 off; u32 size; char fname[0x2C]; u32 unk_off; if (f.is_file) { cdi1 file @ (parent.cd1_dat_off+off); char data_end[4] @ (parent.cd1_dat_off+off+size-4); } } }; struct a { char magic[4]; u32 pc; u32 c; u32 header_size; u32 dir_off; u32 cd1_dat_off; u32 cd1_dat_s; e e[pc] @ dir_off; }; a a @ 0;
May 3May 3 Localization Solution added support for it in my extractor with compression and everything https://github.com/smiRaphi/UniPyX (https://github.com/smiRaphi/UniPyX/commit/d7ec8793674fb80cb8d8a9dcef67e95d69fd482c)
May 4May 4 Localization 15 hours ago, NeoGT404 said: added support for it in my extractor with compression and everything https://github.com/smiRaphi/UniPyX (https://github.com/smiRaphi/UniPyX/commit/d7ec8793674fb80cb8d8a9dcef67e95d69fd482c) Wonderful analysis and resolution, thanks!
May 11May 11 Localization small update, extraction should be WAY faster now https://github.com/smiRaphi/UniPyX/commit/27a1c0080d68978d36949679cd9b91aaa96e1dd2
Create an account or sign in to comment