Inori / GPCS4

A work-in-progress PlayStation 4 emulator.
GNU General Public License v3.0
2k stars 141 forks source link

Pkg/PFS support #101

Closed Fox2Code closed 2 years ago

Fox2Code commented 2 years ago

.pkg files are special, they contain an encrypted (but decryptable, see documentation) PFS file-system.

The PFS filesystem should contain eboot.bin at the root of it.

Unofficial documentation: https://psdevwiki.com/ps4/Package_Files https://psdevwiki.com/ps4/PFS

For full PSF implementation some additional steps are needed like getting the title id from an xml file. (Not inside PFS)

<titlepatch titleid="CUSAXXXXX"> <- this is header, but CUSA00001 seems to be a good fallback if unable to read xml.

/mnt/sandbox/pfsmnt/CUSAXXXXX-app0/ <- PFS should be "mounted" there.

For raw eboot.bin usage, just linking it to /mnt/sandbox/pfsmnt/CUSA00001-app0/eboot.bin should be good enough.

Note: The issue is only about running basic homebrews that don't encrypt their assets, not about running full games.

Inori commented 2 years ago

Thanks, PKG support is definitely needed, but not now. BTW, ff there's some usable code for this format, that will be more good. :)

Masamune3210 commented 2 years ago

To start, you could probably take a look at how to parse them by looking into open source library managers like https://github.com/pearlxcore/PS4-PKG-Tool

Inori commented 2 years ago

To start, you could probably take a look at how to parse them by looking into open source library managers like https://github.com/pearlxcore/PS4-PKG-Tool

That's good👍