Kingdom Hearts: Final Mix Translation Patch (In progress)

Discussion in 'Code Vault' started by Trilix, Feb 20, 2012.

  1. crazycatz00 Twilight Town Denizen

    Joined:
    Apr 12, 2013
    40
    236
    ....., I forgot it has a dependency on the log; that tells it where everything actually saved.
    As for that error, the log format changed a bit (It pretty much copies the IDX entry + a file-name to where it saved for each file).
    Attached current extractor (difference=saves new log format) and a current log file from my end.

    (Gotta like Xemnas :p)

    Edit: --Removed old program, see newer post--
     
  2. Hidden Smithery King's Apprentice

    Joined:
    Feb 2, 2010
    81
    452
    Alright, now it's working. Perfectly ruined text <3

    Okay, now. To see if I can get the data (hash I think?) for the Xemnas fight. I have a save RIGHT before it. Activate the console and the EE console...

    EDIT:
    Or I would if I wasn't a complete idiot. I feel like all I'm doing now is asking questions. I put the cheat into a file called "0x3E68955A.pnach" inside the "cheats" folder inside my PCSX folder. It looks like this:
    Code:
    gametitle=Kingdom Hearts - Final Mix [SLPS_251.98] (J) [0x3E68955A]
    comment=A way to record data
    //the Code.
     
    patch=1,EE,00100010,word,08040044
    patch=1,EE,00100018,word,27bdfff0
    patch=1,EE,0010001c,word,ffbf0000
    patch=1,EE,00100020,word,ffa40008
    patch=1,EE,00100024,word,64850000
    patch=1,EE,00100028,word,3c040049
    patch=1,EE,0010002c,word,0c094092
    patch=1,EE,00100030,word,6484fe18
    patch=1,EE,00100034,word,dfbf0000
    patch=1,EE,00100038,word,dfa40008
    patch=1,EE,0010003c,word,27bd0010
    patch=1,EE,00100040,word,080944b1
    patch=1,EE,00100044,word,0080802d
    patch=1,EE,00120104,word,0c040006
    Every time I launch the game the console says that no cheats were found.
     
  3. crazycatz00 Twilight Town Denizen

    Joined:
    Apr 12, 2013
    40
    236
    Hey, I'd rather ask then be stuck on something.
    Try "3E68955A.pnach". :p

    And my progress on the file replacer: I think I got the compressor. It's not very fast (about 10-15 secs per megabyte; I'm brute-forcing), and someone who knows LZ77 compression tricks would be able to write it so much better then I, but if the game accepts it I don't care honestly. On the up side, because I'm brute forcing it should produce the smallest output possible.
    Once I can confirm the game accepts it, I'll have updated tools posted. ^^
     
  4. Hidden Smithery King's Apprentice

    Joined:
    Feb 2, 2010
    81
    452
    FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF...

    Still nothing. I'm going insane.

    EDIT:
    I'm guessing that the cutscenes are supposed to still be in Japanese and not ruined like all of the menu text?
     
  5. sora6645 Kingdom Keeper

    Joined:
    Feb 17, 2011
    51
    909
    How the English patch coming alone ?
     
  6. Hidden Smithery King's Apprentice

    Joined:
    Feb 2, 2010
    81
    452
    Things take time. Right now I'm trying to figure out why my emulator isn't doing what it should be, and crazy is working on a more elegant reinserter/compressor. I'm getting depressed! :D
     
  7. root670 Destiny Islands Resident

    Joined:
    Feb 28, 2013
    5
    52
    crazycatz00, have you taken a look at the memory management in your extractor? I saw the process jump over 2GB at one point! Not trying to be critical or anything, just putting it out there as a bug report I guess. I don't know much about C#, but is it true that you can't manually control memory allocation and deallocation? In C you could just malloc() and free(), but I guess you can't do that in C# since it has automatic garbage collection.
     
  8. sora6645 Kingdom Keeper

    Joined:
    Feb 17, 2011
    51
    909
    Hey root . Can u help them with this ?
     
  9. Hiro ✩ Guardian

    Joined:
    Dec 28, 2010
    Gender:
    Enby
    3,222
    I think that's what he's doing in the post you quoted. Did you even read it? ._.
     
  10. the blue keyblade Moogle Assistant

    Joined:
    Apr 8, 2013
    Gender:
    Male
    0
    5
    just name the file 3E68955A.pnach
    i just tried the patch and it loaded the cheats but i had to use word
    because with extended there's an error
     
  11. sora6645 Kingdom Keeper

    Joined:
    Feb 17, 2011
    51
    909
    Did u translate any of the game yet ?????
     
  12. Hidden Smithery King's Apprentice

    Joined:
    Feb 2, 2010
    81
    452
    Sora, for the love of everything KH-related, just wait until someone shows something. Please.
     
  13. gledson999 Destiny Islands Resident

    Joined:
    Mar 15, 2013
    Gender:
    Male
    Location:
    Brazil
    28
    96
    Crazycatzoo I overwritted the file called "titl (1c)" from spanish version on the Final Mix Version inside oh the "Title.2ld" File and it can displayed full the text. but an erro occour see bellow:
    [​IMG]

    The barmk can create *.2ld files too

    when you have the time available, can give a little help?
     
  14. Hidden Smithery King's Apprentice

    Joined:
    Feb 2, 2010
    81
    452
    Here's something we can do in the mean time; come up with translations of the extra cutscenes in preparation. I know that it's been done but there are countless ways you can phrase a thought and we should go with what flows/sounds the best. Xemnas' cutscenes, Riku in the Realm of Darkness, etc.
     
  15. crazycatz00 Twilight Town Denizen

    Joined:
    Apr 12, 2013
    40
    236
    Woo! Got the compressions function! In some cases, I can create an exact replica of the Square-compressed file, sometimes we just choose different flag bytes. Out of the couple files I've tried, there is no size difference at all. In copying SE's odd method, it also runs faster; from ~15 seconds for a 1 MB file to ~8 secs. :cool:
    This means we have the best chance of getting files back in, as we have their compression.

    I'll get the compression function into the file-replacer, and have a new version uploaded soon.

    I'll help however you'd like, but I know nothing of Japanese; Sorta limit's my usefulness in translating... :p

    KH2FM discussions are better left to Private Conversations, to not sidetrack this thread. But I'll take a look at it once I get the file-replacer for KH1 working.
     
  16. Hidden Smithery King's Apprentice

    Joined:
    Feb 2, 2010
    81
    452
    Well, at least with the translating of new cutscenes, it's mostly English grammar differences. For instance, a lot of sources have Xemnas saying "That's a familiar sound." when asked by Goofy if he is Ansem. A different way to say that is "That name sounds familar" or " I am familiar with that name", etc. Basically we can just decide what sounds best, in context, while making sure the sentences mean the same basic thing.
     
  17. sora6645 Kingdom Keeper

    Joined:
    Feb 17, 2011
    51
    909
    "That's a familiar sound." That sound the best for that scene
     
  18. crazycatz00 Twilight Town Denizen

    Joined:
    Apr 12, 2013
    40
    236
    New Extractor and Replacer, with compression. Compression works as far as I can tell, but there might be a few rarer bugs left.
    I also changed how they work internally. They use the IDX from inside the ISO, no need to extract it. They also use that internal IDX instead of an extraction log, so no log file either. (The replacer makes another log file, but that's for a different reason)
    All you need now is KH.ISO.

    Man, just saw this now, sorry. -.-
    You can control memory allocation, but more indirectly. What you saw was this:
    Code:
                t=img.ReadBytes(size,sector); //Read file to memory
                if(flags&0x0001===1){t=decompress(t);} //If the file is compressed, run it through the decompressrr.
                File.WriteAllBytes(hash,t); //Write memory to file
    I didn't want to spend a while coding file-writing, so I just used the built-in .NET ones. Result being it loads the whole file. There are some >1GB files in this game, and that memory gets released when the runtime decides to do so.
    I could, if I really wanted to, read the file in chunks; but this won't work if the file is compressed (without a ton more work; the compression is wonky in this game), and this already requires a bit more.
    And I have no idea if this has to do with Garbage-Collection\Memory-usage, but these apps are running as .NET 2.0.

    On the up side, you don't have to extract the game every time to work on it.

    Edit: Removed horribly outdated attachment.
     
  19. root670 Destiny Islands Resident

    Joined:
    Feb 28, 2013
    5
    52
    Thanks for clarifying that. Looks like the extractor doesn't work, however. When I try the new extractor, it says "IMGFile: found IMG (BOOT2) ~ Offset: 569344" and just sits there for about a minute. After about a minute, it crashes with this error:
    "Unhandled Exception: System.InvalidCastException: Unable to cast object of type
    'System.Boolean' to type 'System.Byte[]'.
    at JScript 0.main(Object this, VsaEngine vsa Engine)
    at JScript 0.Global Code()
    at JScript Main.Main(String[] )"
     
  20. Hidden Smithery King's Apprentice

    Joined:
    Feb 2, 2010
    81
    452