Closed VocalFan closed 9 months ago
There should be some data in the PKG to tell if it is a patch or base package.
Most likely.
We could check for the file sce_discmap_patch.plt
and see if it's in the PKG, or somehow try to check the header bytes.
Could be kinda cool if we read the latest changeinfo.xml haha
The PKG header is better if possible.
The PKG header is better if possible.
I know the PS3 has this, I'll check around the PS4 header documentation and ask around as well.
So, seems we'll have to check for the file sce_discmap_patch.plt at the base of the PKG. Base Apps and Patches have the same content type value.
CONTENT_TYPE_GD = 0x1A, /* pkg_ps4_app, pkg_ps4_patch, pkg_ps4_remaster */
Have you checked all of the header fields?
Have you checked all of the header fields?
Might've found one? Content_Flags 0x78
# define PKG_CONTENT_FLAGS_FIRST_PATCH 0x00100000
# define PKG_CONTENT_FLAGS_REMASTER 0x00400000
# define PKG_CONTENT_FLAGS_SUBSEQUENT_PATCH 0x40000000
# define PKG_CONTENT_FLAGS_DELTA_PATCH 0x41000000
# define PKG_CONTENT_FLAGS_CUMULATIVE_PATCH 0x60000000
Okay. Our next problem is: which one? because there are 4 of it. Can you diff the header of the packages to see the differences?
BTW where did you get those flags?
Okay. Our next problem is: which one? because there are 4 of it. Can you diff the header of the packages to see the differences?
BTW where did you get those flags?
The PKG PFS TOOL.
Though I've looked around and... The way the PS4 does it? It checks the Param.SFO file.
Parameter: CATEGORY
Seems we have to check for the value gd
for the base game, and gp
for the update files.
The PKG PFS TOOL.
What is it license? For the PKG handling library we can incorporate source from almost any license, except the one that no license is specified.
The way the PS4 does it? It checks the Param.SFO file.
How did you know the PS4 check this file?
No license on the repo
Uh, my source is the creator of Orbis Patcher and Prospero Patcher, 0x199, which is also the owner of the SCE PS4/PS5 Discord server for modding PS4 and PS5s.
No license on the repo
Okay then we can't incorporate it sources. You need to careful on this because most of our sources using MIT license, which mean it cannot incorporate sources from most of the other emulators because most of them use GPL.
Uh, my source is the creator of Orbis Patcher and Prospero Patcher, 0x199, which is also the owner of the SCE PS4/PS5 Discord server for modding PS4 and PS5s.
Okay looking good.
Lol, yeah, when the leader of the PS4 modding group says so, good to assume that it's true haha
But yeah, seems Param.sfo is where the PS4 gets most of its information from.
Application Title : Detroit: Become Human™
Application ID : CUSA08344
Application Category: gd
Application Version : 01.00
Before update ^
Installing update...
Application Title : Detroit: Become Human™
Application ID : CUSA08344
Application Category: gp
Application Version : 01.08
After update ^
I'll make a PR once I get DLC functional as well.
@ultimaweapon Realized I'm doing this wrong uh we're supposed to have 3 folders.
/user/app /user/appcont (dlc) /user/patch (Update/Patch)
...And yet our one "/user/app" folder which holds the emulator's games... We don't even have a root folder to put the appcont or patch into seeing as games are put on the exact root of gamePath.
Current solution: make it so we have an ADDCONT and PATCH folder in the specific game's folder.
@ultimaweapon Just double checking with ya, how should I do this?
Better to use suffix on a directory name and keep it in the games folder.
Better to use suffix on a directory name and keep it in the games folder.
So, the idea I posted of ADDCONT and PATCH being folders in the game folder?
Nope. I mean something like CUSA12455-patch0
if the game folder is CUSA12455
.
So, I made fPKGs of the disk copy that I have of Tom Clancy The Division along with the patch. I installed the Base PKG, then I went to install the Patch PKG, but it seems that we don't check if a PKG is a patch yet seeing as I just get
Maybe we can check metadata or file names? Base name: UP0001-CUSA01810_00-THEDIVISION00001-A0100-V0100.pkg Update name: UP0001-CUSA01810_00-THEDIVISION00001-A0121-V0100.pkg