PS3 pkg_custom 1.4

@lmn7 I've made some modifications to your pkg_custom.exe

- It's slightly faster building the pkg (../../ is added at a more efficient place in the code)
- Added display of package size in decimal and the number of files & folders
- Added support for drag & drop a folder without a batch file.
- If the parameter is not a folder, the file is extracted
- Uses the default content_id if one is not provided
- Added detection of default folder "custom" if the program runs without parameters (i.e. double click)
- If the folder name is a content_id, it's used as content id of the pkg
- Bug fix: Now extracts in the same folder (not 2 folders up due ../../)

The source code with my modifications is included ;)
 

Attachments

@lmn7 I've made some modifications to your pkg_custom.exe

- It's slightly faster building the pkg (../../ is added at a more efficient place in the code)
- Added display of package size in decimal and the number of files & folders
- Added support for drag & drop a folder without a batch file.
- If the parameter is not a folder, the file is extracted
- Uses the default content_id if one is not provided
- Added detection of default folder "custom" if the program runs without parameters (i.e. double click)
- If the folder name is a content_id, it's used as content id of the pkg
- Bug fix: Now extracts in the same folder (not 2 folders up due ../../)

The source code with my modifications is included ;)
Wow, great work! When I have some more time I'll see about fixing the extraction memory issue so the tool can extract large pkgs (I've already fixed the listing function). FYI your exe wrapper creates false positives for malware, I recompiled the source code with py2exe and had no issues. Thanks a lot for your contributions :)
 
Wow, great work! When I have some more time I'll see about fixing the extraction memory issue so the tool can extract large pkgs (I've already fixed the listing function). FYI your exe wrapper creates false positives for malware, I recompiled the source code with py2exe and had no issues. Thanks a lot for your contributions :)

I used: pyinstaller.exe --onefile pkg_custom.py

Find attached to this post the version "1.3 MOD"
- It packs 2X or 3X faster (It doesn't calculate the qadigest for all the files, saving a lot of processing time)
- Added a better icon.
- The extract now is done in chunks of 100MB. It should fix the issue with large files (I didn't test this)
- Changed the function getfiles (it should be slightly faster and should use less memory)

I tested the pkg built without qadigest on Rebug 4.86 and it worked fine... not sure if HEN could have issues.
 

Attachments

I used: pyinstaller.exe --onefile pkg_custom.py

Find attached to this post the version "1.3 MOD"
- It packs 2X or 3X faster (It doesn't calculate the qadigest for all the files, saving a lot of processing time)
- Added a better icon.
- The extract now is done in chunks of 100MB. It should fix the issue with large files (I didn't test this)
- Changed the function getfiles (it should be slightly faster and should use less memory)

I tested the pkg built without qadigest on Rebug 4.86 and it worked fine... not sure if HEN could have issues.
Great stuff! I just checked and large PKG indexing and extraction is still broken due to both functions loading the whole pkg file into memory. That's really interesting about the QA digest, I assume the PS3 doesn't check it? I think I can remember having issues with that on HAN at some point, but it was a while ago now so I could be wrong.

Edit: I see now that the qadigest is used as the key to encrypt the pkg. It should be fine.
 
Last edited:
@aldostools Here's an update:

- Fixed pkg file indexing
- Fixed large pkg extraction (uses temporary file for extraction, it can possibly be updated to work in memory)
- Added default pkg name when the tool is started without parameters

I merged your fixes into the main tool so I removed the "MOD" in the version function. Feel free to make changes or check for bugs.
 

Attachments

@aldostools Here's an update:

- Fixed pkg file indexing
- Fixed large pkg extraction (uses temporary file for extraction, it can possibly be updated to work in memory)
- Added default pkg name when the tool is started without parameters

I merged your fixes into the main tool so I removed the "MOD" in the version function. Feel free to make changes or check for bugs.

Neat!! I made some new changes in version 1.4 ;)

- The package is now created super fast...
e.g. In my tests, creating a pkg containing the files of webman installer (on my i7 quad-core)
ver 1.2: ~3 minutes 20 seconds
ver 1.3: ~25 seconds
ver 1.4: ~5 seconds (even faster than psn_package_npdrm: 10 seconds)
- if PARAM.SFO is found in the initial folder, the package now is created as gameData
- If USRDIR/EBOOT.BIN is found the PKG is created as gameExec (instead of gameData)
- Otherwise the package is created as a custom package (theme)
 

Attachments

Last edited:
Neat!! I made some new changes in version 1.4 ;)

- The package is now created super fast...
e.g. In my tests, creating a pkg containing the files of webman installer (on my i7 quad-core)
ver 1.2: ~3 minutes 20 seconds
ver 1.3: ~25 seconds
ver 1.4: ~5 seconds (even faster than psn_package_npdrm: 10 seconds)
- if PARAM.SFO is found in the initial folder, the package now is created as gameData
- If USRDIR/EBOOT.BIN is found the PKG is created as gameExec (instead of gameData)
- Otherwise the package is created as a custom package (theme)
Awesome, this tool is really useful now. I just fixed some of my mistakes and uploaded this improved version to the OP. Thanks again for improving the script :)
 
Awesome, this tool is really useful now. I just fixed some of my mistakes and uploaded this improved version to the OP. Thanks again for improving the script :)
Could you update the OP again, pleae?

I just wonder if you could add a mention of @aldostools for his recent contributions. Also I made a changelog for you by copy and paste from above posts. I didn't know what to put for the final version so I put "fixed some mistakes". change it as you see fit. i think it would be helpful in OP given all the changes recently.

Thanks for all your efforts and you too aldo!
 

Attachments

Could you update the OP again, pleae?

I just wonder if you could add a mention of @aldostools for his recent contributions. Also I made a changelog for you by copy and paste from above posts. I didn't know what to put for the final version so I put "fixed some mistakes". change it as you see fit. i think it would be helpful in OP given all the changes recently.

Thanks for all your efforts and you too aldo!
aldo is credited within the tool, but I do agree with you. I edited the OP and included your changelog file, thanks for that!
 
Neat!! I made some new changes in version 1.4 ;)

- The package is now created super fast...
e.g. In my tests, creating a pkg containing the files of webman installer (on my i7 quad-core)
ver 1.2: ~3 minutes 20 seconds
ver 1.3: ~25 seconds
ver 1.4: ~5 seconds (even faster than psn_package_npdrm: 10 seconds)
- if PARAM.SFO is found in the initial folder, the package now is created as gameData
- If USRDIR/EBOOT.BIN is found the PKG is created as gameExec (instead of gameData)
- Otherwise the package is created as a custom package (theme)
The fastest program I use thanks aldostools
4 GB In a few minutes
 
@lmn7 @aldostools Gentlemen quick question, if i'm not mistaken the "this.contentType" will set the category for the pkg. I'm trying to create psone classic pkg's, they install in the correct location, boot up and work but the category is set to 0x00000001 for some reason and not 0x00000006 (PS1emu). The problem is that the artwork in the pkg folder will be ignored this way. The question is how can i force the category to PS1emu?
 
@lmn7 @aldostools Gentlemen quick question, if i'm not mistaken the "this.contentType" will set the category for the pkg. I'm trying to create psone classic pkg's, they install in the correct location, boot up and work but the category is set to 0x00000001 for some reason and not 0x00000006 (PS1emu). The problem is that the artwork in the pkg folder will be ignored this way. The question is how can i force the category to PS1emu?
When you say the artwork is ignored, is it included in the pkg and not shown on XMB, or is it excluded from the pkg? If it's the former, you probably need to change the CATEGORY (or other parameter) in the PARAM.SFO to get the artwork showing on the XMB.
 
When you say the artwork is ignored, is it included in the pkg and not shown on XMB, or is it excluded from the pkg? If it's the former, you probably need to change the CATEGORY (or other parameter) in the PARAM.SFO to get the artwork showing on the XMB.

it's the former, however when packing the same folder/files with psn_package_npdrm this problem doesn't exist since it's being packed as a "PS1emu" package. In the PARAM.SFO the category is set to this, but what would you suggest as another option?
upload_2020-8-5_6-29-26.png


this is the structure of the pkg root folder:

upload_2020-8-5_6-31-7.png

and this is the output log:

upload_2020-8-5_6-45-48.png
 
you're talking about psn_package_npdrm, i'm talking about the python script. I might be wrong, but AFAIK the script doesn't do anything with config files.

The issue that you have is the version 1.4 only handles the contentType: Game Exec (0x05), Game Data (0x04) and Theme (0x09 - used for generic installation).

Try the py script in the attachment (sorry it's not an exe). It auto selects the contentType of the PKG based on the category in PARAM.SFO
 

Attachments

Back
Top