Author Topic: Signing PSP EBOOT.BIN for usage in CHOVY to fix translations  (Read 1445 times)

Offline Knofbath

  • End User
  • *
  • Posts: 7
    • View Profile
Signing PSP EBOOT.BIN for usage in CHOVY to fix translations
« on: August 26, 2019, 04:56:49 AM »
Problem: Translations don't work on CHOVY.

Example: Super Robot Wars A Portable translated to English by Steel Soul
http://www.romhacking.net/translations/3658/

Actual problems: Many.
1. EBOOT.BIN isn't signed and thus doesn't run in PSPEMU.
2. ICON0.PNG isn't on correct color depth and blocks transfer to PSVITA.
3. Something is wrong with PARAM.SFO and blocks transfer to PSVITA.
4. ???



Fixing 2+3 is simple, and can be done from the QCMA folder before transferring to the PSVITA. The real problem is needing to sign the EBOOT.BIN.

Problem 1 is harder to fix.

Step 1 - Extract and sign EBOOT.BIN.

Example of unsigned EBOOT.BIN:
Code: [Select]
0000 : 7F  45  4C  46  01  01  01  00  00  00  00  00  00  00  00  00   .ELF............
0010 : 02  00  08  00  01  00  00  00  70  9F  9D  08  34  00  00  00   ........p...4...
0020 : 50  7F  23  00  01  30  A2  10  34  00  20  00  01  00  28  00   P.#..0..4. ...(.
0030 : 18  00  01  00  01  00  00  00  60  00  00  00  00  40  80  08   ........`[email protected]
0040 : D0  86  1D  00  F0  7E  23  00  00  22  45  00  07  00  00  00   .....~#.."E.....
0050 : 10  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00   ................
0060 : 08  00  E0  03  00  00  00  00  08  00  E0  03  00  00  00  00   ................
0070 : E0  FF  BD  27  1C  00  BF  AF  18  00  B3  AF  14  00  B2  AF   ...'............
0080 : 10  00  B1  AF  21  90  C0  00  21  88  E0  00  18  00  51  02   ....!...!.....Q.
0090 : 0C  00  B0  AF  21  98  A0  00  12  18  00  00  08  00  20  12   ....!......... .
00A0 : 21  80  83  00  23  80  12  02  21  20  00  02  09  F8  60  02   !...#...! ....`.
00B0 : FF  FF  05  24  FF  FF  31  26  FB  FF  20  56  23  80  12  02   ...$..1&.. V#...
00C0 : 1C  00  BF  8F  18  00  B3  8F  14  00  B2  8F  10  00  B1  8F   ................
00D0 : 0C  00  B0  8F  08  00  E0  03  20  00  BD  27  C0  FF  BD  27   ........ ..'...'
00E0 : 1C  00  BF  AF  18  00  B3  AF  14  00  B2  AF  10  00  B1  AF   ................

CHOVY-SIGN includes a tool to resign ELF files like EBOOT.BIN.

Open up cmd.exe window
Code: [Select]
<path to CHOVY-SIGN>\sign-np.exe -elf <input> <output> <tag>

Usage:
       sign_np -pbp [-c] <input> <output> <cid> <key>
                    <startdat> <opnssmp>
       sign_np -elf <input> <output> <tag>

- Modes:
[-pbp]: Encrypt and sign a PSP ISO into a PSN EBOOT.PBP
[-elf]: Encrypt and sign a ELF file into an EBOOT.BIN

<tag>
  0 - EBOOT tag 0xD91609F0 - 5.00 eboot.bin
  1 - EBOOT tag 0xD9160AF0 - 5.50 eboot.bin
  2 - EBOOT tag 0xD9160BF0 - 5.55 eboot.bin
  3 - EBOOT tag 0xD91611F0 - 6.10 eboot.bin
  4 - EBOOT tag 0xD91612F0 - 6.20 eboot.bin
  5 - EBOOT tag 0xD91613F0
  6 - EBOOT tag 0xD91614F0
  7 - EBOOT tag 0xD91615F0
  8 - EBOOT tag 0xD91624F0
  9 - EBOOT tag 0xD91628F0
  10 - EBOOT tag 0xD91680F0
  11 - EBOOT tag 0xD91681F0 -  6.36 eboot.bin

I used <tag> 9, since I was aiming for a 6.35 game.
Code: [Select]
D:\Emulation\PSVITA\CHOVY-SIGN\tools>sign_np.exe -elf d:\Emulation\PSP\ISO\SRW\EBOOT.BIN d:\Emulation\PSP\ISO\SRW\EBOOT_signed.BIN 9
Initializing KIRK engine...

Resigning EBOOT file with tag D91628F0
Done!

Step 2 - Insert signed EBOOT.BIN into ISO using UMDGen.

This is where the real problems start. UMDGen is "okay" when starting with an official ISO, but if you make a new ISO then UMDGen will be lacking proper structure.

Open original JP ISO in UMDGen.
    1. Replace EBOOT.BIN with signed EBOOT.BIN.
    2. Replace other translation files with their translated equivalents.
    3. Replace ICON0.PNG. (Because it was 32 bit color depth, and we have a max of 24 bit color depth)
      *(You could also let the original JP ICON0.PNG stay)
    4. Extract, modify, and replace PARAM.SFO.
    5. Save uncompressed (*.iso)

Step 3 - Test your ISO in PPSSPP.

CHOVY is finicky about ISOs, but you want to make sure that the ISO works before wasting too much time.

Step 4 - Convert ISO to CHOVY dump and QCMA over to Vita.

If everything has gone correctly, you should have a working CHOVY dump.

But wait, if your were following along with this guide, you'll have noticed that everything went horribly wrong in Step 3.

[Troubleshooting]

This is the hard part.

Signing error - The game will immediately exit to XMB upon launch. No error message given.
Resolution: Attempt to resign the game with another <tag>. I had bad luck with tags 10 and 11, tag 9 seemed pretty reliable.

 SRW A Portable failed at Step 3, installing it as a CHOVY dump to VITA will give you an error on run.

Code: [Select]
C1-2858-3    エラーが起きました。        0x80010089    SCE_ERROR_ERRNO_ECASECLASH
Hours of troubleshooting later. This turns out to be an error related to the translation assets.

Long story short, the EBOOT.BIN is looking for translation assets directly from LBA addresses. So to fix it, we need to get the files to the correct address.

Open up original translation ISO in UMDGen, open up your modified translation ISO, go to "Layout" in modified ISO, and manually shift LBA by right-clicking on the file and "Move to LBA..." using addresses from the other ISO.