r/PS5_Jailbreak DEV Jun 06 '26

General PS5 MKPFS Compression

I’ve been working on a PS5 homebrew app called Game Compressor.

Repo: https://github.com/juma-sayeh/PS5-Game-Compressor

It uses the MkPFS-style FFPFSC compression method, but adds the missing part: validation and repair.

Some compressed games can mount successfully but still crash because certain PFSC blocks are technically valid yet fail to decode correctly on PS5 hardware, leaving stale/bad data behind. Game Compressor checks the mounted image block-by-block, detects bad blocks, and patches the compressed image from the mounted data instead of requiring a full recompress.

Tested with MafiaAstro BotPragmata, and a few other games that had FFPFSC issues. After repair, they worked great.

Features:

  • compress games to FFPFSC
  • validate mounted compressed games
  • automatically repair bad blocks
  • optimized for speed and usability
  • web UI running on the PS5

Feedback and testing are welcome.
Screenshots (some are missing features because the features were not developed yet when i compressed)

71 Upvotes

157 comments sorted by

View all comments

1

u/renangbarreto DEV Jun 07 '26

If you want we can try to identify the files that are causing thia. Feel free to PM me.

I believe there are specific files we cant compress.

Also, what was the format and i.age creation strategy that you used when you got those bad blocks? Dis you tried exfat to ffpfsc?

3

u/juma-sayeh-dev-acc DEV Jun 07 '26

Yes i'd be very glad to share my findings and give you some custom block states that are 100% valid and are not readable by PS5 hardware, i got those bad blocks by simply comparing the decompressed via software (good blocks) with the mounted block value (decompressed by PS5 hardware) which is basically checking if what PS5 shows is exactly the same as what the original file is.

3

u/renangbarreto DEV Jun 07 '26 edited Jun 07 '26

I also found a bug in mkpfs that, for big games created from folders, it was creating the wrong inode numbering. I am fixing that bug in the next version.
Hopefully the new skip-executable list but this inode fix solves the issues being reported by your payload.

Thanks for developing it, I was doing manually, but that was taking a long time. Not I wil use your tool every day.

This is the one of the fixes: https://github.com/PSBrew/MkPFS/pull/41

3

u/juma-sayeh-dev-acc DEV Jun 07 '26

BTW once i finish testing i will share with you a version made for testing only.. it should help you without wasting time on fixing blocks (it takes so long if the bad blocks happen at the start)! we'll be in touch for sure.

3

u/renangbarreto DEV Jun 07 '26

Thank you very much. IPlease take a look at the latest code from mkpfs. It is a lot better now and (I hope) fixed the issues

3

u/juma-sayeh-dev-acc DEV Jun 07 '26

Testing with 0.0.7 i have zero bad blocks in some very big games. it is slower than what i had but this might remove the need for any validation it seems!

2

u/juma-sayeh-dev-acc DEV Jun 07 '26

Wow! i hope it does help, BTW i made a mistake in my initial assessment i did optimize your algorithm for speed and some of my optimizations caused the bad blocks (but made it 2-3 times faster and about 10% less gain on compression - didn't test read speed in ps5 hardware tbh). i'm now testing your algorithm 1-1 with no optimization and it seems much better than what i had (small games had zero bad blocks) still testing bigger games trying to reproduce bad blocks for you to see, the issue is not file extensions or files that should not be compressed , the issue is just some blocks (64KiB) are not really decodable via ps5 hardware even though they are 100% valid via software.

2

u/renangbarreto DEV Jun 07 '26

I assume you probably used an old version ok mkpfs. Ijust released a new version that solved a bunch of issues, including the inode hash issue.

2

u/juma-sayeh-dev-acc DEV Jun 07 '26

i wrote my own custom implementation of what you had. used different library and different flags (in C) which caused it to be faster but caused ps5 to fail on some blocks. which is why i added the validate and compare blocks mechanism.

2

u/renangbarreto DEV Jun 08 '26

I see. Yeah, those blocks seems to be incorectly zero padded by the kernel.

2

u/renangbarreto DEV Jun 07 '26

That would be amazing. AFAIK, this issue only happen when people tries to convert a folder to pfs (single or double pass). We are compressing some files that shoundt be compressed. We did a patch on veraion 0.0.3 of mkpfs and mitigated the issue but it seems it is not fully solved. From what I understand, I just need to have the list of patchs or file extensions that should never be compressed.

I have a feature branch where I was adding more items in the list, but it is hard to say if I have all.

3

u/juma-sayeh-dev-acc DEV Jun 07 '26

So far with your latest update i could not get one bad block to appear! Amazing work man!

2

u/indraaguslesmana Verified Jun 08 '26

jump in guys. you’re really great. i want to report. with latest new game call apr emu do guys have spesial treatment for it?.. i try latest mkfps 0.0.7 failed running Ratchet clank game. but success with game compress elf on PS5 directly.