How do I get started on hacking a PSP game?

Discussion in 'PSP - Hacking & Homebrew' started by superstarxalien1, Nov 11, 2017.

  1. superstarxalien1
    OP

    superstarxalien1 Member

    Newcomer
    41
    25
    Apr 6, 2012
    Venezuela
    Anzoátegui
    I have so many questions about this.

    So I have my ISO and everything, ready for me to extract the contents and modify them to my liking. But... how exactly do I get the files I need?

    To be more precise, I'm talking about a visual novel here. Now I'd have to get them from PGD files which are encrypted or something and have CPK files which have something in them as well, but I don't see any of that. Especially PGD files, as I can't get for the life of me what they are.

    If it's of any use, here's what the ISO contains (in text form):

    Warning: Spoilers inside!

    Thanks in advance.
     
    Last edited by superstarxalien1, Nov 11, 2017
  2. flame1234

    flame1234 GBAtemp Advanced Fan

    Member
    727
    409
    May 17, 2009
    United States
    For PGD files:
    Did you Google? What (phrase) did you Google? What did you try that didn't work?
    I haven't actually worked with PGD files before but I Googled and several of the top hits looked promising.

    For CPK files you need CRI Filesystem. Copyrighted software, so you're on your own for getting a copy. Discussing its operation is fine, though.
     
  3. superstarxalien1
    OP

    superstarxalien1 Member

    Newcomer
    41
    25
    Apr 6, 2012
    Venezuela
    Anzoátegui
    Stuff like 'What is a PGD file?' and 'PGD file PSP'. I found some results, but I don't know what to make out of them (in relation to the files I listed, that is).

    I don't really need any help with CPK files, I can extract them with CriPakTools. ...Although I'm guessing I will need CRI Filesystem to repack them.
     
  4. master801

    master801 GBAtemp Fan

    Member
    364
    86
    Feb 24, 2011
    United States
  5. superstarxalien1
    OP

    superstarxalien1 Member

    Newcomer
    41
    25
    Apr 6, 2012
    Venezuela
    Anzoátegui
  6. master801

    master801 GBAtemp Fan

    Member
    364
    86
    Feb 24, 2011
    United States
    What's the name of the game?

    You won't get any help without naming the game, since we don't know what we're looking at/for.
     
  7. superstarxalien1
    OP

    superstarxalien1 Member

    Newcomer
    41
    25
    Apr 6, 2012
    Venezuela
    Anzoátegui
    Diabolik Lovers: Haunted dark Bridal.

    See, I'm not exactly sure on what naming the game would be helpful for, since I can't even get a complete look at all of its files. But it should help to know that it, apparently, uses some of Idea Factory's file systems, as told by this post:

     
  8. master801

    master801 GBAtemp Fan

    Member
    364
    86
    Feb 24, 2011
    United States
    Using those instructions I managed to extract the file.

    Contents: https://pastebin.com/qHFAJTau

    EDIT: I'm not really sure what you're trying to accomplish here...
     
    Last edited by master801, Nov 24, 2017
  9. superstarxalien1
    OP

    superstarxalien1 Member

    Newcomer
    41
    25
    Apr 6, 2012
    Venezuela
    Anzoátegui
    Yey
    I just wanted to extract the very same contents as you did (and eventually patch them, of course), but what exactly did you do?
     
  10. master801

    master801 GBAtemp Fan

    Member
    364
    86
    Feb 24, 2011
    United States
    Used the jpcsp emulator, enabled the pdg decryption setting, ran the game, ran the game again, and out comes a decrypted pdg file.

    Then I extracted that file using the utf_tab program.
     
  11. superstarxalien1
    OP

    superstarxalien1 Member

    Newcomer
    41
    25
    Apr 6, 2012
    Venezuela
    Anzoátegui
    Odd, JPCSP was never extracting the PGD, only the EBOOT...

    So that's why I was having problems with this. What can I do?
     
  12. master801

    master801 GBAtemp Fan

    Member
    364
    86
    Feb 24, 2011
    United States
    Enable the "Extract original PDG files to TMP folder" option above the eboot decryption option.
     
  13. superstarxalien1
    OP

    superstarxalien1 Member

    Newcomer
    41
    25
    Apr 6, 2012
    Venezuela
    Anzoátegui
    I did, multiple times in fact. But nothing came out from that, only the EBOOT.
     
  14. master801

    master801 GBAtemp Fan

    Member
    364
    86
    Feb 24, 2011
    United States
    What version of JPCSP are you using?

    And are you loading the game through the umd browser?
     
    Last edited by master801, Dec 2, 2017
  15. superstarxalien1
    OP

    superstarxalien1 Member

    Newcomer
    41
    25
    Apr 6, 2012
    Venezuela
    Anzoátegui
    Jpcsp 32-bit, version 0.7 2cc09c3

    I tried loading from both the ISO and the UMD Browser.
     
  16. master801

    master801 GBAtemp Fan

    Member
    364
    86
    Feb 24, 2011
    United States
    Try downloading a build from here. If it still isn't working, use the x64 build.

    Then try to enable the 3 settings (extract savedata key, extract original pgd, extract decrypted eboot) in the crypto tab.
     
  17. superstarxalien1
    OP

    superstarxalien1 Member

    Newcomer
    41
    25
    Apr 6, 2012
    Venezuela
    Anzoátegui
    Hey, I actually got to extract the game.

    Now from here on I can modify it to my liking, but how can I actually patch the ISO? I mean, I know I'd have to repack the CPK (even though I don't know any tools that can do such), and patch the PGD (which, after all, looks to be INSTALL.DNS). As for this latter file, though, I think I have the option of either reencrypting the PGD (I think I have a tool for this?) or somehow making the game use a decrypted PGD instead.

    Either way, thanks for getting me this far. I don't think any guide that I've searched could've done so.
     
  18. master801

    master801 GBAtemp Fan

    Member
    364
    86
    Feb 24, 2011
    United States
    The game might support loading the file decrypted, but I'm not sure if that's a viable option, as I have no idea.

    This is might some good info:
    http://web.archive.org/web/20170806...klabel-translations.com/showthread.php?tid=16
    https://gbatemp.net/threads/pgd-encrypter.432029/
     
  19. superstarxalien1
    OP

    superstarxalien1 Member

    Newcomer
    41
    25
    Apr 6, 2012
    Venezuela
    Anzoátegui
  20. master801

    master801 GBAtemp Fan

    Member
    364
    86
    Feb 24, 2011
    United States
    Not really sure how to repack, but for a personal project I used crifilesystem (you have to find it yourself).

    At that point I had to manually reconstruct the cpk file.
    This part was the most tedious part of the whole process, since the cpk could've used a number of different processes when it was made (file mode, data alignment).
    Checking the differences between the two files in a hex editor also helped me. You'll want the files to be almost exactly the same. You'll notice big differences if made incorrectly.

    You'll have to experiment with it yourself.