diff --git a/shadPS4/emulator/fileFormat/PKG.cpp b/shadPS4/emulator/fileFormat/PKG.cpp index b7b6efca..b859056e 100644 --- a/shadPS4/emulator/fileFormat/PKG.cpp +++ b/shadPS4/emulator/fileFormat/PKG.cpp @@ -97,6 +97,11 @@ bool PKG::extract(const std::string& filepath, const std::string& extractPath, s out.Close(); } } + //extract pfs_image.dat + FsFile out; + out.Open(extractPath + "pfs_image.dat", fsWrite); + out.Write(pkg + pkgheader.pfs_image_offset, pkgheader.pfs_image_size); + out.Close(); munmap(pkg); return true; } \ No newline at end of file diff --git a/shadPS4/emulator/fileFormat/PKG.h b/shadPS4/emulator/fileFormat/PKG.h index 992a38e2..8685bee0 100644 --- a/shadPS4/emulator/fileFormat/PKG.h +++ b/shadPS4/emulator/fileFormat/PKG.h @@ -73,6 +73,8 @@ inline void ReadBE(PKGHeader& s) ReadBE(s.pkg_table_entry_count); ReadBE(s.pkg_content_offset); ReadBE(s.pkg_content_size); + ReadBE(s.pfs_image_offset); + ReadBE(s.pfs_image_size); ReadBE(s.pkg_size); }