PS3 pfdtool / sfopatcher source?

bucanero

Developer
Hello,

I'm working on a homebrew, and I wanted to manage/resign save files.
I know it can be done with PC (Windows) tools, but I was wondering if there's a source code available for flatz's pfdtool and sfopatcher ?

I was looking around and I couldn't find any source. If someone knows if it's available, or if there's any other source example on resigning save files, let me know! :)

thanks!
 
Still You can bind those two tools into application resources and invoking them on demand. They can be used to anything in the system which using PFD and SFO.

BTW I'm join to the request. ^^"
 
Still You can bind those two tools into application resources and invoking them on demand. They can be used to anything in the system which using PFD and SFO.

BTW I'm join to the request. ^^"

my first goal was to build a macOS version so I don't have to run a windows VM just to resign a file. The next step would be to port that to a PS3 homebrew to simplify the work of importing save files.

Getting the source code would be a great kick off! :D
 
Some developer's notes regarding the pfd/sfo tools source code that I used for Apollo:
  • be sure to check for proper definitions in types.h . E.g.: instead of "long long int", use "int64_t". It could bring issues when building depending on the platform. (on macOS x64 I ended up having wrong data length for the types)
  • be sure to check for proper endianness. The original source is meant for little-endian. When I was porting the code to the PS3 (big-endian), I had to remove or add endianness swaps as needed.
  • the source depends on the polarSSL lib

The code itself is very modular (kudos to flatz!) and it could be easily converted to a pfd/sfo handling library without too much work. Right now is embedded in Apollo but I might end up creating the library anyways. (I think it could be used in other PS3 homebrews as well)
 
Last edited:
I've uploaded the source code (and macOS binaries) to GitHub:

Thanks a ton for including source and macOS binaries! This is extremely helpful for a project I'm working on. I'm sure it's pretty niche (as a lot of stuff on here is) but having this ability is going to make a lot of macOS users happy, so just wanted to take the time to thank you (and all the other contributors)

If only the Xbox scene was this active! Building a tool for a popular PS3/360 game and our Xbox users are going to have to manually extract their saves for now until we can find or build a command-line tool for that
 
Thanks a ton for including source and macOS binaries! This is extremely helpful for a project I'm working on. I'm sure it's pretty niche (as a lot of stuff on here is) but having this ability is going to make a lot of macOS users happy, so just wanted to take the time to thank you (and all the other contributors)

glad to hear it was helpful! :encouragement:
credits to flatz for developing and open-sourcing the pfd/sfo tools (too bad he doesn't have a Github repository with all his PS3 stuff!)
 
The code itself is very modular (kudos to flatz!) and it could be easily converted to a pfd/sfo handling library without too much work. Right now is embedded in Apollo but I might end up creating the library anyways. (I think it could be used in other PS3 homebrews as well)
hey, I believe it's already done here:
https://github.com/SteffenL/pfdtool/commit/250912a6173472a22956b16b7fe10a434e88b582
Make a reusable library with the core pfd functions.
another benefit is it easier to build:
Reorganized project to use Conan and CMake.
https://github.com/SteffenL/pfdtool/tree/develop
 

Similar threads

Back
Top