obhq / obliteration

Experimental free and open-source PlayStation 4 kernel
https://obliteration.net
Apache License 2.0
619 stars 17 forks source link

Add 64-bits inode supports for PFS #3

Open ultimaweapon opened 1 year ago

ultimaweapon commented 1 year ago

AFAIK there are no any games using 64-bits inode. So adding support for this just for completeness of the library and it is a good place to learn how PFS is working. Anyone who is interested in learning how PFS working can start working on this issue. You can start by looking at src/pfs/src/lib.rs and follow the code to see how it works.

PFS is an image file similar to .iso where game contents are stored. The PS4 will mount this image as a filesystem similar to how Linux mounts ISO files. So learning how PFS is working also gives you some knowledge on how to write a filesystem driver.

emmettmcdow commented 1 year ago

Hi! I've been working on this issue, reading over the necessary code. I'd like to see about generating a PFS file for testing. Is there a recommended way to go about this? Some research resulted in https://github.com/maxton/MakePFS which led to https://github.com/maxton/LibOrbisPkg . However, these both don't seem to be maintained. Is there an approved way to go about this? I've successfully created a 64 bit inode using FUSE, and I have it mounted. Really now I just need to make an image of it. Which wouldn't be a problem if it were a standard tool to use.

ultimaweapon commented 1 year ago

Hi! AFAIK we don't have any tools to generate a PFS with 64-bits inode. The reason is because AFAIK no any game using 64-bit inode due to 32-bit inode is enough for them. The only way I can think about is using the official PS4 SDK to output the PFS with 64-bits inode but I'm not sure if it is possible because I have not used the official SDK before.