Translation Gekijouban Mahou Shoujo Madoka Magica - The Battle Pentagram (translation project)

universal_eternity

Active Member
OP
Newcomer
Joined
Feb 6, 2022
Messages
29
Trophies
0
Location
Spain
XP
597
Country
Spain
This is a work in progress.
Quick status of the translation: overall 98% complete. Prologue: 100%, main story : 100%, (all events: 100%), skills: all but DLC ones, gui: a good chunk is done (% difficult to estimate).

INSTRUCTIONS

I'll provide instructions for both a real Vita and the vita3k emulator (despite the game doesn't run particular well on the emulator, but just in case someone want to test).

For a real vita, these instructions will assume that you have a cfw, repatch installed, VitaShell installed and that you've already either a) installed the game (if it is digital, which I guess it is the most likely case...) or b) that you have a physical copy.

For the emulator, these instructions will assume that you've already set up the emulator and installed a digital copy of the game.

STEP 1
Download this and extract it somewhere in your computer.
This contains both the translator tool (HolyPentagram.exe) and the translation files.
This tool will generate the translation patch. But before it can do that, you'll need to download a couple of programs and get 4 game files decrypted.
So make sure to pay attention to the next steps.

STEP 2
You can see that the translator tool has a folder called "external_programs".
You need to download these two programs, and place their .exe files there.

vita-unmake-fself: Download at https://github.com/CelesteBlue-dev/PSVita-RE-tools/tree/master/vita-unmake-fself/release
vita-elf-inject: Download at https://github.com/CelesteBlue-dev/...master/elf_injector/build/vita-elf-inject.exe

STEP 3
You can see that the translator tool has a folder called "game_data".
You need to get 4 files from the game decrypted and put them there.
This is the most difficult step, but don't worry, you can do it!

There are two methods of doing this. The "real Vita method" and the "emulator method".
The files obtained from "real Vita method" works in both, real vita and emulator while the files obtained with "emulator method" only works on the emulator.
(in concrete, the eboot.bin decrypted by the emulator method doesn't work on real vita, because of being uncompressed or something)

Method 1) Real vita method.
- Let's begin with decrypting the eboot.bin. To decrypt this file you need a homebrew called FAGDec.
You can download the tool at https://github.com/CelesteBlue-dev/PSVita-RE-tools/tree/master/FAGDec/build
The interface of this homebrew can be a bit misleading, so make sure to pay attention if you are not used to this tool.

Start this homebrew. It will list all things you have installed (and the physycal game, if any)
Navigate to the battle pentagram game (which will appear as 劇場版 魔法少女まどか☆マギカ) and press X.
Wait for it to list modules (will be almost immediate) and now navigate to the eboot.bin and press X.
Now press circle to go back.
Now press start. Select the second option START DECRYPT (SELF) and press start again.
The program will take some time (ignore errors about kuEntente is busy). Make sure to navigate down to see all messages.
When a message called "[!] Done" appears, it will be finished.

Now start VitaShell and connect to computer either by usb or ftp.
Grab the following file: ux0:/FAGDec/app/PCSG00214/eboot.bin.
Copy that file to your PC, to the "game_data" folder of the translator tool.

- Now it is time to decrypt the remaining 3 files.
In VitaShell navigate to ux0:/app, position the cursor over the PCSG00214 folder, press triangle and choose "Open decrypted".
(If you have a physical copy of the game, the path would be gr0:/app instead)
Now enter the data folder. Position your self over data.apk and press square. Now the same for pack.idx and stage.apk.
Press triangle and choose Copy (you will see a message that says "Copied 3 files/folder(s)"

Now navigate to somewhere else in ux0. For example the root (ux0: ). Press triangle and Paste.
These copies of the files are decrypted and can be transfered to the PC either by usb or FTP.
Do it, and place them in the game_data folder.
After you are done, you probably want to remove those copies from the vita to not waste space, as data.apk is pretty big.

Method 2) Emulator method
The emulator is so nice, that if you have already installed the game, all the 4 files are already decrypted in your PC, even the eboot.bin!
You just need to grab and copy the files.

The eboot.bin is at this path C:\Users\[USERNAME]\AppData\Roaming\Vita3K\Vita3K\ux0\app\PCSG00214
And data.apk, stage.apk and pack.idx at C:\Users\[USERNAME]\AppData\Roaming\Vita3K\Vita3K\ux0\app\PCSG00214\data
(Replace [USERNAME] with your actual user name)
(These assume default Vita3K settings; otherwise you are on your own searching for them)

Copy them to the "game_data" folder of the translator tool.


STEP 4
Run the translator program, HolyPentagram.
It will list 3 options. Choose option 1: "Create translation patch" (just type 1 and press enter).
It will list all translations available, which atm should be english and japanese. Choose the number associated to the english option and press enter.
Wait for the program to complete; when it is done, it will say "Translation successfully done", and it will prompt you to exit by pressing enter.

STEP 5
On, step 4, a folder called "PCSG00214" will have been generated in "output" folder. This is the folder you have to copy.

Real Vita) Copy the "PCSG00214" folder to ux0:/rePatch. If you are updating the translation, press Yes to any overwriting/merging messages.
Emulator) Copy the "PCSG00214" folder to C:\Users\[USERNAME]\AppData\Roaming\Vita3K\Vita3K\ux0\app\ (replace [USERNAME] with your actual username) and press Yes to any overwriting/merging messages.

STEP 6
Just run the game.
If you did things properly, when booting the game, instead of the japanese warning message with black background, you'll see this "Congratulations" message:


notice.png

----------------------------------------

PROGRESS

- Prologue: 100%
- Main story: 100%
- Friendship events: 100%
- Main menu: done.
- Guide bar: mostly done, missing parts in the gallery
- Battle tutorial: ~95%, missing a texture that has several texts, and the sticks buttons with kanji.
- Special magic and support skills: all done except DLC skills.
- Stage objectives: all the ones of main story stages and some in extra content. Missing some in extra content.
- Message boxes: most are done, missing DLC ones
- Battle gui. mostly done, still missing "LEVEL" texture.
- Evaluation messages of the partner girl or Kyubey at the end of a stage: 100%

TODO LIST

Highest Priority
- Nothing: all things that had the highest priority are done now.

High Priority
- Remaining stage objectives.
- Any remaining part of the gui that is important for the player from a practical point of view goes here (but not including dlc/gallery/extra barriers, which are in Average priority)

Average Priority
- DLC things (costume names, "superior skills" names and descriptions, error message boxes)
- Gallery things
- Extra barriers mission names.

Low Priority
- Character names that are in textures. Since these ones usually have a character portrait next to them, they aren't a special priority. Some of them already done thanks to the textures of InochiPM, some still missing.
- Section titles (usually in a texture with purple background) Some of them already done thanks to the textures of InochiPM, some still missing.
- Any part of the gui that is not specially relevant from a practical point of view goes here.

Lowest priority
- Loading screens. As much as I would like to translate these, it won't be easy. Not because of the translation itself, but because cleaning these textures from japanese texts will be a pain.
- "First time messages". These are some messages that appear the first time you do something in the gui. Since they only appear once and never again, they have this priority (that and because of being in textures, I hate textures)

Will not be done (aka NOT TO DO LIST)
- The digital manual. The typesetting there is a hell. And some people don't even know these manuals exist (I know because I was one of them) = doesn't worth.

Still to be considered
- Trophies. I'm not well versed in these trophies things, so I don't know yet if they can be modifed without any risk or not.

---------------

KNOWN ISSUES

- Some place names had to be shortened considerably because the screen space there is so small.
E.g. -> Homura's House -> Homura H.
- Some lost meaning in translation of mission names/descriptions because of screen space limitations.
E.g: "An unavoidable fate and a torn heart" -> "An unavoidable fate".
When the translation is mostly complete (99%), I will try to see if I can fix these with some font and/or eboot.bin hacking.
Luckily, these space problems don't affect the events themselves, since the limit there is much more permissible, and in worst case I know how to insert extra text boxes.
- In an event of Day 1, the audio of a Kyubey line is repeated. (this is because I had to insert an extra text box, and these require an audio file id). I'll fix this in the future somehow.
 
Last edited by universal_eternity,

Nouka

Member
Newcomer
Joined
Apr 3, 2020
Messages
17
Trophies
0
XP
327
Country
France
Thanks a bunch for working on this! I unfortunately don't have a Vita to test it out now but I am looking forward to try it in the future. Good luck to you!
 

RussiaSushi

Member
Newcomer
Joined
Jun 18, 2011
Messages
21
Trophies
1
XP
2,250
Country
United States
Awesome! It was easy to get the English patch installed, and it's great so far! Looking forward to seeing further progress on this project. Thank you so much for working on this game!
 
  • Like
Reactions: Nouka

universal_eternity

Active Member
OP
Newcomer
Joined
Feb 6, 2022
Messages
29
Trophies
0
Location
Spain
XP
597
Country
Spain
That is a weird error. It says "Unsupported 16-Bit Application", but vita-elf-inject is definitely not a 16 bit exe, it is a 64 bit one.

Can you do a test? Can you try running the vita-elf-inject.exe in the external_programs folder? If you get that message again, maybe there is something wrong either in the downloaded file or a weird thing in your OS, but if you just get a black screen that closes inmediately, maybe the way I run that exe from within my app is somehow incompatible with your OS.
 
  • Like
Reactions: Modular511

Modular511

Well-Known Member
Member
Joined
Sep 12, 2009
Messages
347
Trophies
1
Age
32
Location
Canada
XP
1,106
Country
United States
That is a weird error. It says "Unsupported 16-Bit Application", but vita-elf-inject is definitely not a 16 bit exe, it is a 64 bit one.

Can you do a test? Can you try running the vita-elf-inject.exe in the external_programs folder? If you get that message again, maybe there is something wrong either in the downloaded file or a weird thing in your OS, but if you just get a black screen that closes inmediately, maybe the way I run that exe from within my app is somehow incompatible with your OS.
c20a66e4c19bc5dc59740244fbce6ba2.png
it dont work, if someone wants to upload the patch somewhere and message me it, would be great! I have updated windows 10, idk why it wont work lol
 

universal_eternity

Active Member
OP
Newcomer
Joined
Feb 6, 2022
Messages
29
Trophies
0
Location
Spain
XP
597
Country
Spain
View attachment 305423it dont work, if someone wants to upload the patch somewhere and message me it, would be great! I have updated windows 10, idk why it wont work lol

Can you send me the vita-elf-inject.exe by pm? I want to check it, maybe download was corrupted or something weird.
 

Modular511

Well-Known Member
Member
Joined
Sep 12, 2009
Messages
347
Trophies
1
Age
32
Location
Canada
XP
1,106
Country
United States
Can you send me the vita-elf-inject.exe by pm? I want to check it, maybe download was corrupted or something weird.
will do right now! EDIT ALL GOOD! "Ok, i know what is wrong. The files aren't actually .exe files, but .html files with .exe extension. Somehow, your browser downloaded the pages containing the exe instead of the exe, but saved them with the .exe extension, quite weird."

I ended up with improper exe files, pasted this in case someone else ends up with issues, thx @universal_eternity look forward to the progress =3
 
Last edited by Modular511,

universal_eternity

Active Member
OP
Newcomer
Joined
Feb 6, 2022
Messages
29
Trophies
0
Location
Spain
XP
597
Country
Spain
Update time!

50% update patch uploaded. (The download is in the "this" link in the Step 1 of instructions)

Changelog:
- Overall: ~50% complete
- Main story is now at 50% complete
- Translated all friends and combination magic events of following pairs: Madoka-Sayaka, Mami-Kyoko and Madoka-Mami. (Total: 50% complete)
- Translation of special events started, total progress 60%
- Pause and retry menu translated (except in gallery)
- Translated the titles of all possible stages until day 15
- Some translation done on the status screen.
- "Evaluation" remarks from partner/Kyubey at end of stage are now at ~37%
- Message boxes: translated the pink outlined ones from bonds messages.
- Stages objectives: translated a lot more, a few still missing.
- Corrected: a stage end remark from Homura wasn't showing one line.


To update from an old version, either: a) copy "HolyPentagram.exe" and "translations" folder from the update to your old version or b) copy the "game_data" and "external_programs" folders from the old version to the new. And of course, after that, create the patch again and replace the existing one in your vita or emulator.
 

Modular511

Well-Known Member
Member
Joined
Sep 12, 2009
Messages
347
Trophies
1
Age
32
Location
Canada
XP
1,106
Country
United States
Update time!

50% update patch uploaded. (The download is in the "this" link in the Step 1 of instructions)

Changelog:
- Overall: ~50% complete
- Main story is now at 50% complete
- Translated all friends and combination magic events of following pairs: Madoka-Sayaka, Mami-Kyoko and Madoka-Mami. (Total: 50% complete)
- Translation of special events started, total progress 60%
- Pause and retry menu translated (except in gallery)
- Translated the titles of all possible stages until day 15
- Some translation done on the status screen.
- "Evaluation" remarks from partner/Kyubey at end of stage are now at ~37%
- Message boxes: translated the pink outlined ones from bonds messages.
- Stages objectives: translated a lot more, a few still missing.
- Corrected: a stage end remark from Homura wasn't showing one line.


To update from an old version, either: a) copy "HolyPentagram.exe" and "translations" folder from the update to your old version or b) copy the "game_data" and "external_programs" folders from the old version to the new. And of course, after that, create the patch again and replace the existing one in your vita or emulator.
soooo will the mega link ( https://mega.nz/file/P8913KgZ#fW3CieUsppAhljc9_PPCRIWzjsbnH7E15BoBZ4Nrahs ) always up to date? I think it was the only patch link i seen, gonna update mny copy right now! thx!! :)
 

universal_eternity

Active Member
OP
Newcomer
Joined
Feb 6, 2022
Messages
29
Trophies
0
Location
Spain
XP
597
Country
Spain

Modular511

Well-Known Member
Member
Joined
Sep 12, 2009
Messages
347
Trophies
1
Age
32
Location
Canada
XP
1,106
Country
United States
The link itself will be different each time, as every time I have to upload a new file, and I guess mega generates a new link when I upload new file, even if it is named like the older one. But the link will always be in the Step 1 of instructions.
kk I got it going, nice work! the 3ds and psp ones r being translated as well it seems!
 

chamychu

New Member
Newbie
Joined
May 1, 2022
Messages
1
Trophies
0
Age
29
Location
Kuwait
XP
24
Country
Kuwait
This is really well made, i've been wanting to play this for a while, thank you very much universal_eternity

 

universal_eternity

Active Member
OP
Newcomer
Joined
Feb 6, 2022
Messages
29
Trophies
0
Location
Spain
XP
597
Country
Spain
What kind of process does making translations entail?

Well. I can tell you what the process I followed for this game. I don't know if everyone else do the same things as me or not. Some parts are generic and can be extended to other games. Some others are more particular of this case or the Vita.

- First of all is extracting the game files to your PC. In the case of Vita, you have to make sure that they get decrypted first. (VitaShell has option for that)

- Upon that two things can happen: if you are lucky, the game will use loose files; if you're unlucky (the case of Battle Pentagram), they will be in one or more big files that are package of multiple of subfiles.

- If packaged, there are also a lucky and unlucky case: you search in internet if someone else has figured out the package format and already created a tool to extract/inject the package, and if it exists, you are lucky, otherwise you are unlucky and have to create the tool yourself. In BP case, the result was mixed: I found online some code to extract the package, but it had some bugs with BP files, and the inject code didn't allow for bigger files than original (which is not acceptable for me), so I ended programming on my own a parser of this .apk/.idx format that the BP uses.

- So once you have the real files, you just search for which files have the text. Japanese text is usually encoded in either UTF8, SJIS or UCS2. In BP case, some files use SJIS (.asb) and some files use UTF8 (.gop, .lua and the EBOOT.bin itself) and no files use UCS2. To search for text, well just use a program that can search text. In this case, the easier thing was just to search for "まどか" (Madoka) to find out which formats had text.

- Next is reverse engeneering the binary file formats (for BP, that was .gop and .asb formats; .lua files are alread text files). If you are lucky, someone else already figured the format, otherwise you have to figure out yourself. In BP, I was unlucky, I had to do all by myself. Ideally, you create a tool that convert these binary format in a text representation of the format so that you can easily edit it (and also the opposite, from text to binary), which is what I did with both .asb and .gop files of BP. There are some people that just hex edit, but if the file format is complex, that will actually take more time than just creating a tool.
Some formats are more complex than others and may even require you to reverse engineering the executable (the EBOOT.BIN in vita). This was the case of BP .asb files: these files actually use virtual machine with variable byte-code, and I had to reverse part of that virtual machine to figure out the format.

- Next thing are textures. Some text are in textures. Usually with textures you have more luck because they tend to use more generic formats, so the possibility that tools already exist is much higher. This was the case of BP: I found online a tool that converted Vita .gxt textures into .png. And the official Vita SDK has a tool to convert from DDS to .gxt.
So these textures, you just edit them using Photoshop/Gimp/Paint.net or whatever.

- And after all of that, you do the actual translation.
 
Last edited by universal_eternity,
  • Like
Reactions: Nouka

Cadesy

New Member
Newbie
Joined
May 22, 2022
Messages
4
Trophies
0
Age
19
Location
Georgia
XP
13
Country
United States
That's such a strenuous process. I wish you luck completing the translation! I myself want to start doing those but since I have no programming expertise I've been trying to poke around trying to find information on how to exactly start out. Thanks for replying!
 

Cadesy

New Member
Newbie
Joined
May 22, 2022
Messages
4
Trophies
0
Age
19
Location
Georgia
XP
13
Country
United States
Well. I can tell you what the process I followed for this game. I don't know if everyone else do the same things as me or not. Some parts are generic and can be extended to other games. Some others are more particular of this case or the Vita.

- First of all is extracting the game files to your PC. In the case of Vita, you have to make sure that they get decrypted first. (VitaShell has option for that)

- Upon that two things can happen: if you are lucky, the game will use loose files; if you're unlucky (the case of Battle Pentagram), they will be in one or more big files that are package of multiple of subfiles.

- If packaged, there are also a lucky and unlucky case: you search in internet if someone else has figured out the package format and already created a tool to extract/inject the package, and if it exists, you are lucky, otherwise you are unlucky and have to create the tool yourself. In BP case, the result was mixed: I found online some code to extract the package, but it had some bugs with BP files, and the inject code didn't allow for bigger files than original (which is not acceptable for me), so I ended programming on my own a parser of this .apk/.idx format that the BP uses.

- So once you have the real files, you just search for which files have the text. Japanese text is usually encoded in either UTF8, SJIS or UCS2. In BP case, some files use SJIS (.asb) and some files use UTF8 (.gop, .lua and the EBOOT.bin itself) and no files use UCS2. To search for text, well just use a program that can search text. In this case, the easier thing was just to search for "まどか" (Madoka) to find out which formats had text.

- Next is reverse engeneering the binary file formats (for BP, that was .gop and .asb formats; .lua files are alread text files). If you are lucky, someone else already figured the format, otherwise you have to figure out yourself. In BP, I was unlucky, I had to do all by myself. Ideally, you create a tool that convert these binary format in a text representation of the format so that you can easily edit it (and also the opposite, from text to binary), which is what I did with both .asb and .gop files of BP. There are some people that just hex edit, but if the file format is complex, that will actually take more time than just creating a tool.
Some formats are more complex than others and may even require you to reverse engineering the executable (the EBOOT.BIN in vita). This was the case of BP .asb files: these files actually use virtual machine with variable byte-code, and I had to reverse part of that virtual machine to figure out the format.

- Next thing are textures. Some text are in textures. Usually with textures you have more luck because they tend to use more generic formats, so the possibility that tools already exist is much higher. This was the case of BP: I found online a tool that converted Vita .gxt textures into .png. And the official Vita SDK has a tool to convert from DDS to .gxt.
So these textures, you just edit them using Photoshop/Gimp/Paint.net or whatever.

- And after all of that, you do the actual translation.
also, do you happen to know any communities for translation scene? Or is it one of those things I will have to play by ear and figure it out myself?
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    K3Nv2 @ K3Nv2: Sorry for accidentally bending over