Editing Archive.dat

Jump to navigation Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 71: Line 71:
|-
|-
|}
|}
=== Pseudocode ===
<source lang="c">
#define ARCHIVE_HEADER_MAGIC   0x0000464143454953
#define ARCHIVE_HEADER_SIZE   0x58
#define ARCHIVE_SEGMENT_TABLE_SIZE   0x40
#define ARCHIVE_SEGMENT_SIGNATURE_SIZE 0x30
#define ARCHIVE_MAGIC_SIZE   0x08
typedef union caf_header_s {
struct {
uint8_t magic[ARCHIVE_MAGIC_SIZE]; // SIECAF
uint64_t version; // 1
uint64_t unk1; // 1
uint64_t unk2; // 1
uint8_t unk3[0x10];
uint32_t unk4; // 0x75BF88
uint32_t unk5; // 0x75BF89
uint32_t unk6; // 0x7FBF8A
uint32_t padding;
uint64_t num_segments;
uint64_t file_offset;
uint64_t file_size;
};
uint8_t raw[ARCHIVE_HEADER_SIZE];
} caf_header_t;
typedef union caf_segment_table_s {
struct {
uint64_t index;
uint64_t data_offset;
uint64_t aligned_data_size;
uint64_t signature_key_id // (0x0000000000000003)
uint64_t enc_key_id; // (0x0000000000000001)
uint8_t enc_iv[0x10]; // (null) Used to be filled on PS4, maybe replaced from header?
uint64_t unaligned_data_size;
};
uint8_t raw[ARCHIVE_SEGMENT_TABLE_SIZE];
} caf_segment_table_t;
typedef union caf_segment_signature_s {
struct {
uint64_t index;
uint8_t signature[0x10];
uint8_t padding[0x18];
};
uint8_t raw[ARCHIVE_SEGMENT_SIGNATURE_SIZE];
} caf_segment_signature_t;
</source>


Updating once further research has been made...
Updating once further research has been made...
Please note that all contributions to PS5 Developer wiki are considered to be released under the GNU Free Documentation License 1.2 (see PS5 Developer wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To protect the wiki against automated edit spam, we kindly ask you to solve the following hCaptcha:

Cancel Editing help (opens in new window)