Thread Status:
Not open for further replies.
  1. NocturnalMoon

    OP NocturnalMoon Member
    Newcomer

    Joined:
    Dec 27, 2020
    Messages:
    23
    Country:
    Germany
    Introduction
    These past days I looked into hacking Disaster Report 3 to create an english translation patch and stumbled upon the previous efforts from @TwistedZeon and his team which produced a completed translation but didn't succeeded in inserting the text into the rom. But the team gathered a ton of information and released some PoC to the public.

    I played ZZT 1,2 and 4 this year and loved them so I decided to give it a try and hack ZZT 3 to make it playable in english.
    My goal is a bit different than the previous translation project: I just want to get a playable english version of ZZT 3 out there. I don't necessarily need it to look pretty nor is my goal to translate every picture or cutscene. As it stands there will be japanese text left in my release but that's better than no release in my book.
    When the basic translation work is done I will look into improving the patch.

    Progress
    (24th of January, 2021)


    Things are going smoothly and we are currently in the process of editing the script. We decided that the translation we already had from the old project was way too literal so we decided to give it a massive overhaul.
    This might take a while so don't panic when we're not updating this thread for a while. We will make a public announcement when the script is done.

    Help wanted:
    We need help with editing the menu images so please contact us if you have some skills with Photoshop/Gimp and want to help out. We'll provide you with the translations and the images so all you would have to do is inserting the translated text into the images and send it back to us.

    Other then that we haven't touched the cutscenes yet so if you have any tips on that topic beforehand we would be glad to hear them!

    ETA
    We're working on this in our spare time and as I mentioned above there are still some things to resolve so please don't expect a quick release. We can't provide an ETA but if there are any major issues or other important updates we will update this thread.

    *mod edit*
    Continued discussion :arrow:: here
     
    Last edited by DinohScene, Jan 26, 2021 - Reason: OP requested continuation in a different thread due to cooperation
  2. Haytham

    Haytham Member
    Newcomer

    Joined:
    Oct 12, 2019
    Messages:
    30
    Country:
    Morocco
    keep up the good work , i'm looking forward to it , thank you very much
     
  3. master801

    master801 GBAtemp Fan
    Member

    Joined:
    Feb 24, 2011
    Messages:
    449
    Country:
    United States
    Text is in UTF-16LE, see intro.txt

    Made a PKG extractor in Python.
    Install Python 3.9, use command "pip install -r requirements.txt" in dir to install dependencies, copy folder ARCHIVE to where main.py is, run main.py script to extract.
     

    Attached Files:

    Last edited by master801, Dec 30, 2020
  4. NocturnalMoon

    OP NocturnalMoon Member
    Newcomer

    Joined:
    Dec 27, 2020
    Messages:
    23
    Country:
    Germany
    Thank you for the script. I already figured out the encoding and developed a tool to extract the dialogue from the game. Although mine extracted it from the TEXT/JP folder using the .bin files.

    Since you created a tool so easily I assume you are familiar with the game and PSP hacking in general. Could you please look over this post: https://forums.ppsspp.org/showthread.php?tid=2956&page=2 and tell me what I'm supposed to do with the mentioned HEADER.bin? I found the file in the INSTALL folder but it's just a list of the files the Iso contains and contrary to what LunaMoo says the file sizes aren't stored in there.

    I just re-arrange the files with UMDgen and that seems to work well enough. Is there something I'm missing since LunaMoo says multiple times you have to edit the Header.bin?
     
    Gil_Unx likes this.
  5. master801

    master801 GBAtemp Fan
    Member

    Joined:
    Feb 24, 2011
    Messages:
    449
    Country:
    United States
    File sizes are definitely in HEADER.BIN
     
  6. NocturnalMoon

    OP NocturnalMoon Member
    Newcomer

    Joined:
    Dec 27, 2020
    Messages:
    23
    Country:
    Germany
    You're right. I forgot that the hex value of each size is stored in little endian so that's why I haven't found them before when searching through the header.bin file. Thanks for confirming this.

    So the first half of the Header.bin is the size of each file stored as 4 Byte (little endian) and the second half lists the path of each file.
    I understood that I have to edit the file size for each file I modified but what about rearranging the location of the file? For example if I move map0001.bin to the end of the iso and edit the exported LBA list from UMDgen accordingly, do I have to edit/move the file path in the header.bin?
     
  7. master801

    master801 GBAtemp Fan
    Member

    Joined:
    Feb 24, 2011
    Messages:
    449
    Country:
    United States
    No idea if location lbas are hardcoded, sorry.
     
  8. NocturnalMoon

    OP NocturnalMoon Member
    Newcomer

    Joined:
    Dec 27, 2020
    Messages:
    23
    Country:
    Germany
    Good news: TwistedZeon provided the translated script to me. I updated the first post.
     
    JamRules and stranno like this.
  9. master801

    master801 GBAtemp Fan
    Member

    Joined:
    Feb 24, 2011
    Messages:
    449
    Country:
    United States
    Have you figured out the file structure for the BIN files in SCRIPT/JP yet?

    It's pretty simple
     
  10. NocturnalMoon

    OP NocturnalMoon Member
    Newcomer

    Joined:
    Dec 27, 2020
    Messages:
    23
    Country:
    Germany
    There may be a few things I haven't figured out yet but here's what I implemented in my tool so far:

    0x0000 points to the start of the dialogue segment (starts with 0xFFFE)
    0x0004 tells you the total number of bytes in the dialogue segment
    0x000C is the number of dialogue lines
    0x0020 points the address of the first dialogue line
    0x0028 is the offset where the second dialogue line starts

    0x0028 + (lineNumber * 0x0004) points to the start address for each following dialogue line in the .bin file.
     
    Last edited by NocturnalMoon, Jan 1, 2021
  11. Gil_Unx

    Gil_Unx Newbie
    Newcomer

    Joined:
    Oct 20, 2020
    Messages:
    7
    Country:
    Indonesia
    This is a simple python script for rearranging HEADER.BIN
    for edited ZZT3 iso.
    The concept is simple, read lba and size from Toc iso, and write to HEADER.BIN.

    Export list from iso that has been edited with umdgen.
    Continue to execute the script:
    HF.py ZZT3.iso list.txt

    But I think the main problem is not rearranging HEADER.BIN.
    But string limitation.
    I have tried it with modified EBOOT.BIN
    from @TwistedZeon thread.
    You can enlarge the script file * .bin,
    as long as it doesn't cross the limit.
    With modified eboot,
    the limit is 44x2 line,
    just add more 1 letter, the game will freeze/forceclose when load next scene.
    Maybe it's a memory issue or ppsspp issue?.
     

    Attached Files:

    Last edited by Gil_Unx, Jan 1, 2021
  12. NocturnalMoon

    OP NocturnalMoon Member
    Newcomer

    Joined:
    Dec 27, 2020
    Messages:
    23
    Country:
    Germany
    First of all, thank you and master801 for participating and helping out. I really appreciate the support and will try your python script later today.

    Freezing after expanding a .bin file wasn't a problem to me before. In one of my tests I had a map0001.bin which was way bigger than the original and it did not freeze.
    The game just froze every time I tried to put a .bin in a different location.

    What did you use the Map0001.PKG you attached for? When preparing a ISO for testing I delete every PKG file in the ARCHIVE folder except for CONFIG.PKG, MOVIE02_BUS_CRASH.PKG, MP_LOBBY.PKG, MP_SYSTEM.PKG, TITLE.PKG, TITLE_SYSTEM.PKG to force the game to read from the .bin files.
     
    Last edited by NocturnalMoon, Jan 1, 2021
  13. master801

    master801 GBAtemp Fan
    Member

    Joined:
    Feb 24, 2011
    Messages:
    449
    Country:
    United States
  14. NocturnalMoon

    OP NocturnalMoon Member
    Newcomer

    Joined:
    Dec 27, 2020
    Messages:
    23
    Country:
    Germany
    The script prints the following message after listing the iso content:
    Traceback (most recent call last):
    File "H:\ZZT3\HF.py", line 3288, in <module>
    patch(sys.argv[1],sys.argv[2])
    File "H:\ZZT3\HF.py", line 3276, in patch
    iso.write(virLba.to_bytes(4, byteorder="little", signed=False))
    OverflowError: int too big to convert

    I'm using python 3.9. Here's what I did:

    1. Open a clean ZZT3 iso in UMDgen
    2. Deleting all files in ARCHIVE except the six I mentioned in my previous post.
    3. Replace the original Map0001.bin with a modified Map0001.bin
    4. Export the LBA list
    5. Execute HF.py original.iso export.txt

    Wow, thank you very much, your script runs without a problem. I will definitely use this in my toolchain.
     
  15. Gil_Unx

    Gil_Unx Newbie
    Newcomer

    Joined:
    Oct 20, 2020
    Messages:
    7
    Country:
    Indonesia
    oh you want force the game to read from the .bin files?
    i think better to make that dummy with umdgen
    To keep the TOC iso doesn't change too much


    1. Open a clean ZZT3 iso in UMDgen
    2. Make dummy all files in ARCHIVE except the six you mentioned in your previous post.
    3. Replace the original Map0001.bin with a modified Map0001.bin
    4. Export the LBA list
    5. Save modified iso
    6. Execute HF.py modified.iso export.txt
     

    Attached Files:

    Last edited by Gil_Unx, Jan 2, 2021
  16. NocturnalMoon

    OP NocturnalMoon Member
    Newcomer

    Joined:
    Dec 27, 2020
    Messages:
    23
    Country:
    Germany
    Works like a charm! Your tool is exactly what this project needed to resolve the issue with expanding the ISO and re-arranging the files.
    I was able to move some .bin files around and the game worked flawless after patching it with your tool.

    With the tools from Gil_Unx, master801 and myself I'm now ready to make some tests with inserting the actual script and see where it goes. One thing I can for sure is that many lines of the translated script are way too long for the text box space. As Gil_Unx already mentioned the limit is 44 characters for each of the two lines which makes a total of 88 characters. Although it does not crash when inputting more characters the third line will be cut in half and unreadable.

    As I see it there are three ways to progress from here:
    1. Edit the script so it fits into the constraints mentioned above.
    2. Make the font smaller to make the third line fit into the text box
    3. Move the entire text a bit to the top so the third line fits into the box

    @JamRules hacked the EBOOT.bin previously to reduce the font margin which looks really good. This doesn't solve the problem with the existing character limit maybe it's possible to manipulate the font size or text position this way. I will update the first post to include this problem. Maybe some ASM wizard is reading this thread and wants to take up the challenge. :P

    Edit: Here's a screenshot how the game looks with the third line mentioned above:
    [​IMG]
     
    Last edited by NocturnalMoon, Jan 2, 2021
    JamRules, Usuario299 and TwistedZeon like this.
  17. Gil_Unx

    Gil_Unx Newbie
    Newcomer

    Joined:
    Oct 20, 2020
    Messages:
    7
    Country:
    Indonesia
    crash while iso still load from *.pkg file,
    good information :yay:.
     
  18. NocturnalMoon

    OP NocturnalMoon Member
    Newcomer

    Joined:
    Dec 27, 2020
    Messages:
    23
    Country:
    Germany
    I modified to game's font to have a maximum glyph height of 10 instead of 15 which was enough to reduce the line spacing to fit in the third line.
    It's not pretty but at least we won't have to compromise on the translation.

    [​IMG]
     
    JamRules, Gil_Unx and TwistedZeon like this.
  19. Malckyor

    Malckyor The One and Only!
    Member

    Joined:
    Sep 19, 2018
    Messages:
    250
    Country:
    Brazil
    Oh, I like the way this is heading. Keep up the good work and I hope everything goes smoothly.
     
  20. NashvilleSkyline

    Newcomer

    Joined:
    Dec 3, 2018
    Messages:
    4
    Country:
    Argentina
    This is great! I was waiting for this translation!
     
    sloppycrap likes this.
Loading...

Hide similar threads Similar threads with keywords - Translation, Disaster, Zetsumei

Thread Status:
Not open for further replies.