hrydgard / ppsspp

A PSP emulator for Android, Windows, Mac and Linux, written in C++. Want to contribute? Join us on Discord at https://discord.gg/5NJB6dD or just send pull requests / issues. For discussion use the forums at forums.ppsspp.org.
https://www.ppsspp.org
Other
10.81k stars 2.12k forks source link

[Feature Request] Add support for iso tool functionalities & .PKG files #14957

Open SamRohod opened 2 years ago

SamRohod commented 2 years ago

What should happen

Add support for correctly using Iso tool or add Iso tool functionalities of patching/updating a .iso file to PPSSPP.

Also, add support of .pkg file packages for title update/DLC. It could be part of the main PPSSPP or a companion package handler (like an update/DLC manager).

Currently for .pkg extraction I use: PSN PKG Decryptor & Extractor This tool might be helpful too: pkgrip

Edit: I guess this could partially be merged with #12344, which is actually a better system than implementing iso tool in anyway (preserving the game backup)

Who would this benefit

Streamlining the updating of/DLC installation for .iso backups of PSP titles using official .pkg files.

(Eliminating the need to use a real PSP for updating .iso backups, which DLCs often need)

Platform (if relevant)

Windows

Games this would be useful in

LittleBigPlanet, Patapon 3

Other emulators or software with a similar feature

No response

Checklist

LunaMoo commented 2 years ago

You can't decrypt update files with PPSSPP, so until we get the key for it, updating games will not be possible and once we can decrypt it, you'll no longer need to patch the ISO to update games.

SamRohod commented 2 years ago

Sorry I didn't do my research before requesting iso tool/updating/patching implementation. Although I'm not an expert/developer, I think now I have a general idea about kirk keys and why it's important to use a real PSP for the decryption process using these keys.

How about a different approach then. Currently, most would only dump the PSP game and the DLCs, only knowing they need an updated .iso when they want to play an updated version of the game or play with DLCs in PPSSPP. So, what if:

We make a database of all correctly updated .iso files along with xdelta3 patch files to convert any non-updated .iso game to the desired updated version. Since downloading game updates is not illegal, we can freely distribute these xdelta3 update files as an alternative to having to update the games .iso with a real PSP. From my testing, these xdelta3 are usually small. Maybe to the point where they can be "streamed" as the game is being processed by PPSSPP. If "streaming" the updated files is possible, then that will insure that the original .iso backup stays intact for preservation and all that is needed is to put the actual update/DLC files in the PSP/GAME or PSP/SAVEDATA in PPSSPP (for which a .pkg handler could be useful). I imagine switching the "streaming" of xdelta3 updated files OFF if the .pkg handler has the .pkg update file disabled and ON if it is enabled. I believe the number of PSP games that got updates is small, which would make this very doable (aside from the "streaming" updated files, I don't know how doable that is). Maybe xdelta3 patches are not the best for this but that is the general idea. I used THIS for my xdelta3 patches.

Side Question: Do you have a list of the Commercial Games/Demos that require the missing keys and you mentioned HERE won't run on PPSSPP?

LunaMoo commented 2 years ago

Xdelta patch would be soft patching support which was requested in #3074 and in this usage scenario would also be same as just side loading decrypted eboot when failing decryption which I requested in #12344. I think this feature request is still new, but only for the PKG extraction part as even if you take other "iso tool" functionality like compression/decompression, it was also already requested(in #7648), through I trully would recommend [Unknown's] tool called max cso for that since CSO's made with it, can beat all other formats.

IMHO if you want to make a database of patches, you are free to do it, however just because they're free, it doesn't mean you have right to redistribute them legally, especially in decrypted form, as such it should not be a direct part of an emulator project which existence depends on not risking any legal cases.

As for my forum post linked, it's outdated. We have most keys nowadays, just not the one(s?) used for game updates. Everything else as far as I'm aware can be decrypted on PPSSPP and yeah it bothers me as well as that was the largest and most important part from things I listed those few years ago.