Gundam Ghiren's Greed Translation

Discussion in 'PSP - Hacking & Homebrew' started by Rex0009, Oct 2, 2016.

  1. Rex0009
    OP

    Rex0009 Member

    Newcomer
    31
    10
    Sep 27, 2016
    United States
    Hey guys,

    Recently I've taken in interest in what I think is one of the greatest PSP games ever made.
    It's Mobile Suit Gundam Ghiren's Greed Axis no Kyoui V. Picture Romance of three kingdoms
    or Nobunaga's ambition with a Gundam overaly.

    The Cool thing is I'm fluent in Japanese, and I've taken the liberty of extracting and translating
    the majority of the Menu's, major decisions and pilot data(This is all stored in images,
    the game has very little text and most of that is in the EBOOT.bin)
    A ton of text still remains untranslated (mostly pilot dialog etc.)

    The issue is I used a program that I found on a Japanese site to extract all of the images.
    The program has no option to re-compress and insert the images I've translated.


    Here is some of the technical info I've figured out:

    The Game major storage system are large MKD files, this is where most of the images and game data are found and inside everything is stored in SD0 Containers The other major file is the MIF file which keeps track of all SD0 containers spread over all the MKD files. It does so in a weird way that I dont fully understand (yet) but generally, it keeps flags to tell you which file is in which mkd file... and where in the mkd file its located. It stores that value as a block number (2B) that gets multiplied by 2048 to get the actual offset, from there it jumps into the mkd(SD0) files...

    The SD0 Files inside the MKD start with a 4B "SD0-filesize" And another 4B that I can only assume at this point to be some kind of descriptor. Followed by a 1B flag that tells the filetype that follows... and then the actual payload which again, branches into several other subtypes.


    At this point I'm fresh out of ideas of where to go next

    if anyone is interested in assisting let me know.

    I've attached an image of the SD0 hex dump.
    [​IMG]

    also upon request I can send the program I used to extract the images
     
    Bad Bunny likes this.
  2. Bad Bunny

    Bad Bunny Bunny from Japan

    Member
    124
    169
    Feb 27, 2016
    Japan
    Shinjuku
    Can I see a picture all file inside this game iso. Maybe I can help because I hack PSP game before like persona 3, shining ark and Brother Conflict. I want to know all file inside this game before I try to help with what I can do.
     
  3. Rex0009
    OP

    Rex0009 Member

    Newcomer
    31
    10
    Sep 27, 2016
    United States
    Hey here is the main directory
    [​IMG]

    — Posts automatically merged - Please don't double post! —

    Also here is a sample of extracted images [​IMG]
     
  4. flame1234

    flame1234 GBAtemp Advanced Fan

    Member
    727
    409
    May 17, 2009
    United States
    Did you try GE Debugger?
    Are those textures? Can you see them when you step through the appropriate scene in GE Debugger?
     
  5. Rex0009
    OP

    Rex0009 Member

    Newcomer
    31
    10
    Sep 27, 2016
    United States
    Hey, yes I can see all the textures in ge debugger
     
  6. flame1234

    flame1234 GBAtemp Advanced Fan

    Member
    727
    409
    May 17, 2009
    United States
    OK, post a screenshot of GE debugger with one of those textures up.
    It will tell you texture address.
    Set a write breakpoint on the texture address, then hit resume and see what happens. For science.

    With the texture up in GE debugger:
    1. Click on the main window.
    2. CTRL+D to open the CPU debugger.
    3. Click the breakpoints tab at the bottom.
    4. Right click the empty space in the breakpoints window, choose Add.
    5. Type the texture address 0x######## in the box.
    6. Set the options so that it will break on a write.
    7. Press OK.
    Your write breakpoint is now set.
    8. Push "resume" on GE debugger and see what happens. Post a screenshot of that, too, the CPU debugger at the breakpoint.

    You can always use your breakpoints to figure out what the PSP is doing at any given time. Hopefully you'll be able to find the decompression code and reverse-engineer it.
     
  7. Rex0009
    OP

    Rex0009 Member

    Newcomer
    31
    10
    Sep 27, 2016
    United States
    ok here is the texture

    [​IMG]

    — Posts automatically merged - Please don't double post! —

    CPU Debugger at break point

    [​IMG]
     
  8. Bad Bunny

    Bad Bunny Bunny from Japan

    Member
    124
    169
    Feb 27, 2016
    Japan
    Shinjuku
    So it's MKD file... Hmnn so you manage to find Japanese text on this file?
     
  9. Rex0009
    OP

    Rex0009 Member

    Newcomer
    31
    10
    Sep 27, 2016
    United States
    the only text is the traditional sense is in the eboot.bin.... it's only for unit names, stats, etc...The actual menu and most of the game text are all graphics...I figured that out when I dumped it.
     
    Bad Bunny likes this.
  10. Bad Bunny

    Bad Bunny Bunny from Japan

    Member
    124
    169
    Feb 27, 2016
    Japan
    Shinjuku
    Do you already download mad edit hex software and crystal tile2? If you have this software, I will tell you what to do next.
     
  11. Rex0009
    OP

    Rex0009 Member

    Newcomer
    31
    10
    Sep 27, 2016
    United States
    Yes, but the files are compressed crystal tile 2 doesn't see anything
     
  12. Bad Bunny

    Bad Bunny Bunny from Japan

    Member
    124
    169
    Feb 27, 2016
    Japan
    Shinjuku
    Wait in 30 minute, I will teach you some method with mad edit hex software.
     
  13. Bad Bunny

    Bad Bunny Bunny from Japan

    Member
    124
    169
    Feb 27, 2016
    Japan
    Shinjuku
    Done now, go see in your private message.:)
     
  14. Rex0009
    OP

    Rex0009 Member

    Newcomer
    31
    10
    Sep 27, 2016
    United States
    Hey, thanks for your help bunny....

    still a long way to go
     
    Bad Bunny likes this.
  15. Bad Bunny

    Bad Bunny Bunny from Japan

    Member
    124
    169
    Feb 27, 2016
    Japan
    Shinjuku
    I suggest you learn to hack SNES games first for beginner from website called romhacking.net. in there you can learn how many way to hack the game like from nds and PSP games.:)

    Just take your time to learn broB-)
     
  16. Rex0009
    OP

    Rex0009 Member

    Newcomer
    31
    10
    Sep 27, 2016
    United States
    I've recently bought a book on MIPS. (Mips Assembly Language by Robert Britton, a co worker told me about it)
    I'm sure it will take me months of study and playing around with MARS to be competent enough to figure out decompression
    and re-compression. I know java and python relatively well and the best way to do something is to learn it yourself.

    If I don't get the game images reinserted and the script dumped (the script seems small).
    I plan on creating and updating a wiki with all my translations and images I've found.

    If anyone enjoys strategy games and has a small amount of patience and Japanese language knowledge, do yourself a favor and play this
    awesome game.

    It's right behind hearts of iron 2 in terms of grand strategy games.

    Update:

    Game Menu 100%
    Pilot Menu: 100%
    Unit Menu: 100%
    Adviser/Decision Menu: 5% I'm doing it by campaign

    Future Plans:
    Unit Translations
    Pilot Name Translations

    Stretch:
    Incidental Dialog - There's over 2000 instances
     
  17. flame1234

    flame1234 GBAtemp Advanced Fan

    Member
    727
    409
    May 17, 2009
    United States
    It could be something simple, and if that's the case it's going to be pretty quick.

    The MIPS book might not help you that much, you need to study reverse engineering techniques rather than MIPS.
    Like, install Cheat Engine and then complete the tutorial. They have a forum if you have trouble with the Cheat Engine tutorial.

    Reverse engineering techniques for what you're doing I'm not sure.

    Anyway, in the test above you had a read/write breakpoint (rather than write only).
    We want to set a write breakpoint because we want to break where in our program that texture is getting set. That texture is coming from those source data files; we need to look at the code that reads those files to understand what is going on. To do that we need to find that code that's reading those files in the haystack. To find it, you set a breakpoint on the plaintext version. If you keep backtracing, you eventually get to the point in the code where that data is being decompressed or read from. I mean, when the decompression routine decompresses the data, it will need to put it somewhere. We want to set our write breakpoint on that point: where the decompression routine is storing the decompressed data.
     
  18. Rex0009
    OP

    Rex0009 Member

    Newcomer
    31
    10
    Sep 27, 2016
    United States
    I did some research after you posted the technique above. For me the frustrating part is not being able to understand what I'm reading, which is why I assumed MIPS would help.

    so bear with me the highlighted portion where the break is it says:

    add unsigned a0 = s0+0x2978
     
  19. BetaXenon

    BetaXenon Advanced Member

    Newcomer
    84
    18
    Jan 21, 2015
    Russia
    Samara, Russia
    Can you upload a current eboot file then (and any other that you chaged if you done it already and they can be reinserted)? I playing this game once on a while and game menus is going to be quite a handy.

    Also, if you manage to extract unit and pilot names then i can translate them for you. Aside of this i can't help much.
     
    Last edited by BetaXenon, Oct 9, 2016
  20. Rex0009
    OP

    Rex0009 Member

    Newcomer
    31
    10
    Sep 27, 2016
    United States
    I edited all of the menu images and translated them, but I have no way to insert them. so the only thing I could send you is translated images.

    I'll be clearer:
    When you go to the menu with pilot data...and see the list 'that' is text.
    it's all in the boot.bin, just s-jis.

    when you select a pilot and his picture an stats comes up that's an image, I personally edited and translated those menu's and images into english.
    plus the main menu, battle menu, and now I'm starting on main dialog and decision points.

    Send me your info, and I will shoot the program I use to you...and if you want you can mass extract the images yourself.

    When I have the images done the way I want them, I'll just put them in several rar files on G-Drive, and people can do whatever they want with them.
     
    BetaXenon likes this.