mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2024-11-26 20:50:40 +00:00
pkgextract : added some enums with info
This commit is contained in:
parent
4703224071
commit
4205d58747
@ -6,6 +6,13 @@
|
||||
#include <stdio.h>
|
||||
#include <inttypes.h>
|
||||
|
||||
enum PFSMode : U08 {
|
||||
PFS_MODE_NONE = 0,
|
||||
PFS_MODE_SIGNED = 0x1,
|
||||
PFS_MODE_64BIT = 0x2,
|
||||
PFS_MODE_ENCRYPTED = 0x4,
|
||||
PFS_MODE_UNKNOWN = 0x8,
|
||||
};
|
||||
struct PFS_HDR {
|
||||
U64 version;
|
||||
U64 magic;
|
||||
@ -44,7 +51,16 @@ public:
|
||||
printf("- clean: 0x%X\n", psfOuterheader.clean);
|
||||
printf("- ronly: 0x%X\n", psfOuterheader.ronly);
|
||||
printf("- rsv: 0x%X\n", psfOuterheader.rsv);
|
||||
printf("- mode: 0x%X\n", psfOuterheader.mode);
|
||||
printf("- mode: 0x%X", psfOuterheader.mode);
|
||||
if (psfOuterheader.mode & PFS_MODE_SIGNED)
|
||||
printf(" signed");
|
||||
if (psfOuterheader.mode & PFS_MODE_64BIT)
|
||||
printf(" 64-bit");
|
||||
if (psfOuterheader.mode & PFS_MODE_ENCRYPTED)
|
||||
printf(" encrypted");
|
||||
if (psfOuterheader.mode & PFS_MODE_UNKNOWN)
|
||||
printf(" unknown");
|
||||
printf("\n");
|
||||
printf("- unk1: 0x%X\n", psfOuterheader.unk1);
|
||||
printf("- blocksz: 0x%X\n", psfOuterheader.blocksz);
|
||||
printf("- nbackup: 0x%X\n", psfOuterheader.nbackup);
|
||||
|
@ -6,9 +6,16 @@
|
||||
#include <stdio.h>
|
||||
#include <inttypes.h>
|
||||
|
||||
enum PKGFlags : U32 {
|
||||
PKG_FLAGS_UNKNOWN = 0x01,
|
||||
PKG_FLAGS_VER_1 = 0x01000000,
|
||||
PKG_FLAGS_VER_2 = 0x02000000,
|
||||
PKG_FLAGS_INTERNAL = 0x40000000,
|
||||
PKG_FLAGS_FINALIZED = 0x80000000,
|
||||
};
|
||||
struct PKGHeader {
|
||||
/*BE*/U32 magic;// Magic
|
||||
/*BE*/U32 pkg_type;
|
||||
/*BE*/U32 pkg_flags;
|
||||
/*BE*/U32 pkg_0x8; //unknown field
|
||||
/*BE*/U32 pkg_file_count;
|
||||
/*BE*/U32 pkg_table_entry_count;
|
||||
@ -70,7 +77,7 @@ struct PKGHeader {
|
||||
inline void ReadBE(PKGHeader& s)
|
||||
{
|
||||
ReadBE(s.magic);
|
||||
ReadBE(s.pkg_type);
|
||||
ReadBE(s.pkg_flags);
|
||||
ReadBE(s.pkg_0x8);
|
||||
ReadBE(s.pkg_file_count);
|
||||
ReadBE(s.pkg_table_entry_count);
|
||||
@ -232,7 +239,18 @@ public:
|
||||
{
|
||||
printf("PS4 PKG header:\n");
|
||||
printf("- PKG magic: 0x%X\n", pkgheader.magic);
|
||||
printf("- PKG type: 0x%X\n", pkgheader.pkg_type);
|
||||
printf("- PKG flags: 0x%X", pkgheader.pkg_flags);
|
||||
if (pkgheader.pkg_flags & PKG_FLAGS_UNKNOWN)
|
||||
printf(" unknown");
|
||||
if (pkgheader.pkg_flags & PKG_FLAGS_VER_1)
|
||||
printf(" ver_1");
|
||||
if (pkgheader.pkg_flags & PKG_FLAGS_VER_2)
|
||||
printf(" ver_2");
|
||||
if (pkgheader.pkg_flags & PKG_FLAGS_INTERNAL)
|
||||
printf(" internal");
|
||||
if(pkgheader.pkg_flags & PKG_FLAGS_FINALIZED)
|
||||
printf(" finalized");
|
||||
printf("\n");
|
||||
printf("- PKG 0x8: 0x%X\n", pkgheader.pkg_0x8);
|
||||
printf("- PKG file count: 0x%X\n", pkgheader.pkg_file_count);
|
||||
printf("- PKG table entries: 0x%X\n", pkgheader.pkg_table_entry_count);
|
||||
|
Loading…
Reference in New Issue
Block a user