Advertisement
Guest User

PSN PKG -> PSP OFW Manual by Yours Truly

a guest
Aug 13th, 2016
1,997
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.63 KB | None | 0 0
  1. ************************************************************
  2.  
  3. sign_np v1.0.4 - Convert PSP ISOs to signed PSN PBPs.
  4. - Written by Hykem (C).
  5.  
  6. ************************************************************
  7.  
  8. Usage: sign_np -pbp [-c] <input> <output> <cid> <key> [<startdat>] [<opnssmp>]
  9. sign_np -elf <input> <output> <tag>
  10.  
  11. - Modes:
  12. [-pbp]: Encrypt and sign a PSP ISO into a PSN EBOOT.PBP
  13. [-elf]: Encrypt and sign a ELF file into an EBOOT.BIN
  14.  
  15. - PBP mode:
  16. [-c]: Compress data.
  17. <input>: A valid PSP ISO image with a signed EBOOT.BIN
  18. <output>: Resulting signed EBOOT.PBP file
  19. <cid>: Content ID (XXYYYY-AAAABBBBB_CC-DDDDDDDDDDDDDDDD)
  20. <key>: Version key (16 bytes, for Vita) or Fixed Key (0, for PSP)
  21. <startdat>: PNG image to be used as boot screen (optional)
  22. <opnssmp>: OPNSSMP.BIN module (optional)
  23.  
  24. - ELF mode:
  25. <input>: A valid ELF file
  26. <output>: Resulting signed EBOOT.BIN file
  27. <tag>:
  28. 0 - EBOOT tag 0x8004FD03 - 2.60
  29. 1 - EBOOT tag 0xD91605F0 - 2.80
  30. 2 - EBOOT tag 0xD91606F0 - 3.00 <- no need for OPNSSMP
  31. 3 - EBOOT tag 0xD91608F0 - 3.10
  32. 4 - EBOOT tag 0xD91609F0 - 5.00
  33. 5 - EBOOT tag 0xD9160AF0 - 5.05
  34. 6 - EBOOT tag 0xD9160BF0 - 5.55 <- recommended, doesn't need OPNSSMP
  35. 7 - EBOOT tag 0xD91610F0 - 3.60
  36. 8 - EBOOT tag 0xD91611F0 - 6.00
  37. 9 - EBOOT tag 0xD91612F0 - Vita 1.6x
  38. 10 - EBOOT tag 0xD91613F0 - Vita 1.6x
  39. 11 - EBOOT tag 0xD91614F0 - Vita 1.6x
  40. 12 - EBOOT tag 0xD91615F0
  41. 13 - EBOOT tag 0xD91616F0
  42. 14 - EBOOT tag 0xD91617F0 - Vita 1.6x
  43. 15 - EBOOT tag 0xD91618F0 - Vita 1.6x
  44. 16 - EBOOT tag 0xD91619F0
  45. 17 - EBOOT tag 0xD9161AF0 - Vita 1.6x
  46. 18 - EBOOT tag 0xD9161EF0 - 5.00 PSP-3000
  47. 19 - EBOOT tag 0xD91620F0
  48. 20 - EBOOT tag 0xD91621F0
  49. 21 - EBOOT tag 0xD91622F0
  50. 22 - EBOOT tag 0xD91623F0
  51. 23 - EBOOT tag 0xD91624F0
  52. 24 - EBOOT tag 0xD91628F0 - 5.70 PSPgo
  53. 25 - EBOOT tag 0xD91680F0 - 6.30
  54. 26 - EBOOT tag 0xD91681F0 - 6.50?
  55. 27 - EBOOT tag 0xD91690F0 - 6.60
  56.  
  57.  
  58.  
  59. PSN PKG -> PSP OFW Manual by Yours Truly
  60.  
  61. Download PSN PKG and extract it.
  62. Use PkgView, PSN PKG Extractor & Decrypter etc.
  63.  
  64. Take DOCUMENT.DAT and EBOOT.PBP from extracted \USRDIR\CONTENT
  65. DOCUMENT.DAT can be used on PSP as is.
  66. EBOOT.PBP can be used as is in PPSSPP.
  67.  
  68. Rename EBOOT.PBP to NP.PBP
  69.  
  70. Run npdpc_fixed.exe in the same dir with NP.PBP
  71. This also dumps header.bin (for use with fake_np) and version_key.bin (Version Key in raw hex)
  72.  
  73. Extract \PSP_GAME\SYSDIR\EBOOT.BIN from extracted ISO
  74. Use 7-Zip, WinRAR, IsoBuster, Apache...
  75.  
  76. Decrypt extracted EBOOT.BIN
  77. Use PRXdecrypter on PSP to decrypt
  78. Use EDecrypt on PSP to decrypt and optionally patch ELF for firmware 5.00
  79. Use Jpcsp or PPSSPP on PC to decrypt
  80. Size of decrypted EBOOT.BIN must match the size of BOOT.BIN (raw ELF or empty) in ISO
  81.  
  82. Sign and encrypt ELF (decrypted EBOOT) using EBOOT tag 2 (0xD91606F0):
  83. sign_np -elf BOOT.ELF EBOOT.BIN 02
  84. Tag 2 introduced in FW 3.00 does not need (and removes the requirement to use) OPNSSMP module.
  85. Original tag is reported by PRXdecrypter and can be seen in hex editor in encrypted EBOOT.
  86.  
  87. Inject resigned EBOOT into extracted ISO
  88. Apache3 works fine, but most people will generally use UMDGen
  89. Note that signed EBOOT becomes larger and may overwrite the following file in custom ISOs!
  90.  
  91. Convert ISO to PBP:
  92. sign_np -pbp -c NPUH-10184.iso EBOOT.PBP UP1063-NPUH10184_00-GENRATIONOFCAOS6 0 STARTDAT.PNG
  93. OR
  94. sign_np -pbp NPUH-10184.iso EBOOT.PBP UP1063-NPUH10184_00-GENRATIONOFCAOS6 0 STARTDAT.PNG
  95. STARTDAT can be used from another game (if generic), PICx.PNG from this game or omitted at all.
  96. Compression is not required for PSP, but can be used to save space on Memory Stick if need be.
  97.  
  98. Place resulting PBP to \PSP\GAME\NPUH10184 directory
  99. Dir name does not have to match CID even on OFW but they match in officially downloaded games.
  100.  
  101. Position of the game in XMB list is determined by modification time of its directory.
  102. Size of the game shown in XMB is the size of the whole game directory.
  103.  
  104.  
  105.  
  106.  
  107. It seems that it's producing mixed results though. A few notes:
  108. - If you're trying to run the EBOOTs on a PSP with OFW always use the fixed key (0). The PSP accepts the 0x3 flag so there's no need to use any other game's key.
  109. - Some games seem to be failing to load after being signed with sign_np. This is probably an issue with either the compression algorithm or memory alignment (yes, the Vita is specially picky with that). I'm still trying to figure out what's wrong for those cases.
  110. - Another important issue is the ISO's EBOOT.BIN file. Some tags require a valid OPNSSMP file to be added to the EBOOT.PBP, so be sure to either include the OPNSSMP file in the final image or just resign the EBOOT.BIN using a tag that doesn't need it (0xD9160BF0 is a good candidate for this).
  111. - On a side note, if you have a blacklisted game installed, that won't work as base. The Vita will refuse to load anything that has it's content ID or version key.
  112. - Also, it's quite possible that some games can't be used properly as "base" due to the OPNSSMP module.
  113. To test this, grab the base game's EBOOT.PBP and open it up in an hex editor.
  114. Search for a "PGD" string which will be the encrypted OPNSSMP module.
  115. You can now copy the full PGD image (starts with the PGD magic and finishes right before some NULL padding) to a new binary file and decrypt it with pgdecrypt by tpunix.
  116. It should give you a "~PSP" module that you can now include in your new image.
  117. To do this just call sign_np as:
  118. sign_np -pbp NP.ISO EBOOT.PBP [CONTENT ID] [VERSION KEY] OPNSSMP.BIN
  119. The module will be re-encrypted with the new version key and will be loaded by the pspemu.
  120. Also, you can include your own custom boot screen by doing something similar:
  121. sign_np -pbp NP.ISO EBOOT.PBP [CONTENT ID] [VERSION KEY] STARTDAT.PNG
  122. Or even include both OPNSSMP and boot screen files at once:
  123. sign_np -pbp NP.ISO EBOOT.PBP [CONTENT ID] [VERSION KEY] OPNSSMP.BIN STARTDAT.PNG
  124.  
  125. The np_flags can be described as:
  126. 01 00 00 00 -> License is bound to Memory Stick and uses Version Key
  127. 01 00 00 01 -> License is bound to Memory Stick and uses Fixed Key
  128. 02 00 00 00 -> License is bound to Network and uses Version Key
  129. 02 00 00 01 -> License is bound to Network and uses Fixed Key
  130. 03 00 00 00 -> License is bound to the file itself and uses Version Key
  131. 03 00 00 01 -> License is bound to the file itself and uses Fixed Key
  132. The Memory Stick ones are never used (only present in the PSP's kernel code).
  133. Normally the 03 flag, which binds the license to the file itself, uses the Fixed Key in the PSP, but I've seen a few games that use the Version Key instead.
  134. I still need to figure out what is the meaning of this in the Vita itself, but it's very likely that those games don't work due to the flags indeed.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement