mmozeiko / pkg2zip

Decrypts PlayStation Vita pkg file and packages to zip archive
The Unlicense
405 stars 89 forks source link

PSP CSO feature is broken #11

Open RadicalR opened 6 years ago

RadicalR commented 6 years ago

Any game created with the CSO feature hangs on Adrenaline, but works fine on PPSSPP. To confirm it was the feature, I manually uncompressed the file and ran it successfully in Adrenaline. I used a third party tool to compress it to a CSO (level 9 compression) again, and that worked fine as well.

For some reason, any CSO created by this program just hangs on Adrenaline-6 fix (the version that fixed the CSO hang bug.)

mmozeiko commented 6 years ago

This is what I see also on my Vita. Although some users, for example TheRadziu, has said that cso files work fine for him on Vita. That's where I am confused.

It almost looks like a bug in Adrenaline. I have tried multiple cso decompression programs, and they all decompress pkg2zip created cso files just fine. The format is pretty simple, I have looked, but not found any issues in produced files...

RadicalR commented 6 years ago

Don't know if this matters, but I noticed that when using your program, it's slightly larger than when a 3rd party compressor compresses it. Is it possible that there's "junk" left over and the PSP mode is hanging on that?

mmozeiko commented 6 years ago

Yes, size difference is expected and is normal behavior. I used different library to do compression that zlib. miniz deflate compression code is much smaller, a bit faster (especially for "fast" modes), and does compress good enough. And it is under public domain license. It actually compresses better for "fast" modes. But the result it produces is 100% compatible with zlib compression. Its written by the spec.

RadicalR commented 6 years ago

Hm, also, I did talk with TheRadziu (we know each other), and he updates his statement that they do not work for him. I wonder if I try reverting to an older version of Adrenaline, if that will have any change?

tomazzz369 commented 6 years ago

i can confirm that, even single game converted to cso with pkg2zip not working for me. tested 6-7 games. iso working fine

soweliniko commented 6 years ago

They don't work for me either on a hardware PSP