Steins;Gate - Anyone familiar with this game engine?

Discussion in 'PSP - Games & Content' started by Rintalie, Apr 14, 2013.

  1. Rintalie
    OP

    Newcomer Rintalie Member

    Joined:
    Apr 14, 2013
    Messages:
    18
    Country:
    Thailand
    Steins;Gate [PSP] translation patch &&
    Steins;Gate Hiyoku Renri no Darling

    Translation website:

    http://addchannel.mooo.com
    If you would like to help (the script is very similar to other version) just let me know.

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

    Patch for Steins;Gate can be found on 10th post (Prologue chapter)
    It is still being work on but it would be great if you can test run and report any bugs you found.

    Since there are no available translation of Hiyoku renri no darling (AFAIK), I might be doing a machine translate instead. Lets see if I can make this work.

    Update:
    - New info on Steins;Gate Hiyoku Renri no Darling
    - Old images are hidden, to view them use this link.

    ---------------------------------------------------------------------------------
    Update:
    - Apostrophe character issue is now fixed
    - Pointers position has been corrected
    - Dialogue name has been translated (incomplete)

    [​IMG]



    ----------------------------------------------------------------------------------------
    Well, this game uses AFS - somewhat standard archieve for CRIware and their scripts reside in SCENE00.AFS, having *.BIN extension.

    File structure:
    What I'm trying to do is to replace the text script with an English text, looking like this;

    [​IMG]

    The game does read the end of sentence properly (%K%P) but the problem arise at the starting of the next sentence; the starting point probably lies somewhere (or even at the unreadable part of this file) as it always follow the original script.

    Here is how the script would run;

    [​IMG]
    First sentence works fine as it always stop at %K%P.

    [​IMG]
    Since the last sentence is shorter than the original, the text starts shifting.

    [​IMG]
    And its getting more interesting.

    [​IMG]
    Even Mayuri lost her title bar when she talks now.

    I'm pretty sure Corpse Party - Book of Shadow also uses this same engine. If anyone happen to knows the workaround, do let me know. I might be able to port the English version of iOS to psp system.

    PS. I'm using translation from http://tsuuun.blogspot.com/

    Le Ysp Oorgnoc
     
    Coto likes this.


  2. StorMyu

    Member StorMyu "I'm too old for this"

    Joined:
    Jan 2, 2010
    Messages:
    892
    Country:
    France
    That's what we call Pointer.
     
  3. Rintalie
    OP

    Newcomer Rintalie Member

    Joined:
    Apr 14, 2013
    Messages:
    18
    Country:
    Thailand
    Yea if only we could find and shift these pointers to another address, everything would have been perfect.

    Anyway, I will just add the padding for shorter sentence and trim those extra bytes out. Translation of the game prologue is done by the way, you are welcome try.

    [​IMG]
    Those spaces are padding.

    [​IMG]
    An incomplete sentence.

    In case you are wondering how it would looked like in general;
    [​IMG]

    Patching instruction (only prologue)
    1. Download xdelta.
    2. Get the translation patch here
    3. Put clean iso, translation patch and xdelta to the same folder.
    4. Run xdelta -d -s CLEAN_ISO_NAME.iso patch.xdelta OUTPUT_ISO_NAME.ISO
    5. Be prepared to witness incomplete sentences !

    ーーーーー
     
  4. StorMyu

    Member StorMyu "I'm too old for this"

    Joined:
    Jan 2, 2010
    Messages:
    892
    Country:
    France
    don't add spaces to do some padding, just put some 0x00.
    But anyway, finding the pointer is the key here. It's really not that difficult.
     
  5. Rintalie
    OP

    Newcomer Rintalie Member

    Joined:
    Apr 14, 2013
    Messages:
    18
    Country:
    Thailand
    Thanks for your suggestions. In fact, I have already tried inserting x00 as a padding but the game just advance to next sentence whenever it read this null character. Probably because this character is also part of ending sequence (%?%? and followed by null), so instead I put x20. The ideal is to write ending sequence right at the end of the text and padding after null, I guess.

    However, these are just a quick fix but the real problem still remains. I have also upload raw file of this script here in case anyone may have a look. The text is readable using shift-JIS charset starting from the address 7429.

    Otherwise, It would be great if anyone can give me some idea of how can these pointers be found, I'm pretty new to psp especially its programming by the way.
     
  6. StorMyu

    Member StorMyu "I'm too old for this"

    Joined:
    Jan 2, 2010
    Messages:
    892
    Country:
    France
    It's an action script combined with some text, pretty basic and it's not "at all" related to PSP, it's general Romhacking knowledge.

    By action script, I mean that the game will read the file from beginning to end while doing what every bytecode represents.
    And when it needs to read some text.
    Your pointer starts at 0x10E0. The command to throw some text is 0x0670 apparently (you'll have to look backward, I'm thinking in Little Endian here so in the hex editor it'll show as 0x7006)
    after that, you can find the next pointers near 0xFFFF after the first pointer (which is just 0x7006, search in your hex editor, it's a 32bits value in Little Endian as well.)
    I think 0xFFFF is to clear the textbox before launching another sentence. Then there's more bytecode and the game throw another sentence. (the bytecode inbetween is probably "Deleting character on screen" "load another one" "play xxx voices" stuff like that) Then you have to increment the original command.
    next set of pointers start with 0x0671 (again, 0x7106 in your hex editor)
    and again those 0xFFFF to clear the text before each pointer.

    and you start over, 0x0672 / 0x0673 etc etc


    Took me 30sec to understand that, and 5min to write this lol


    Edit: Just to say, I try to get dragged into "too" many projects while I clearly have no time. So no, it was a pleasure to give you those informations but I can't do much more for now. Because you'll clearly need a special program here. Or you'll get really bored trying to do it by hand (and by hand I DO NOT mean Hex editing) I meant using Atlas (which is a good insertor program) to write down each pointer by sentence, and it'll be a great idea btw if you can't program yourself, and it'll avoid problem when you'll go through editing or such since it'll automatize everything for you.

    You can fnd that program at Romhacking.net btw.
     
    Coto likes this.
  7. Exiron

    Newcomer Exiron Advanced Member

    Joined:
    Dec 14, 2010
    Messages:
    58
    Location:
    Bahia Blanca
    Country:
    Argentina
    I have to say something, there have already been attempts to do this but we failed, here's the video I did when I first inserted some text in the game



    Got to say though, that if you find some very good hacker, you'll be able to bypass the only problem this game has. The amount of symbols you can use in the names and text.

    If you find a workaround this, I'll gladly help you reinsert the text
     
  8. StorMyu

    Member StorMyu "I'm too old for this"

    Joined:
    Jan 2, 2010
    Messages:
    892
    Country:
    France
    what's the problem with the limitation ?
     
  9. Exiron

    Newcomer Exiron Advanced Member

    Joined:
    Dec 14, 2010
    Messages:
    58
    Location:
    Bahia Blanca
    Country:
    Argentina
    It could either crash the game or don't display the information. I used some weird hex japanese editor to make it work, it was called sakura if I'm not mistaken.
     
  10. Rintalie
    OP

    Newcomer Rintalie Member

    Joined:
    Apr 14, 2013
    Messages:
    18
    Country:
    Thailand
    @StorMyu; Many thanks ! I was too focused on finding the address 7429 in hex and not its backward. I will try continue working on this now that I know these pointers. The text insertion is done by program, I made it so that it detect the sentence between null and %?%? then find the text to replace accordingly. But that was only the text part I prepared in advance. Now I just have to make it memorise the address and editing these pointers. I will also try with the tool you suggested. Again, many thanks for your time !

    @Exiron; Thanks for your information. Actually, I watched that video before I started to think of making the translation port (just thinking may be I could play with it). I will try and test with prologue first and see if it works. Also I might need your help regarding to the translation text if this really works.

    EDIT: Alrighty ! It works !
    [​IMG]

    The script can handle longer sentence now without affecting one another.
    [​IMG]

    Running this patched game on actual device.
    [​IMG]

    Also, in case anyone want to try this (please do, as I don't really have time to check line by line, usually just holding start and skip them -_-), you will need to apply first patch before this one.
    1. Download UMDGen and start it.
    2. Load previously patched iso and select import file, replacing file structure with this LBA.
    3. Save your ISO. Notice that the iso size will be smaller.
    4. Download this translation patch then placing this, xdelta and previous iso to the same folder.
    5. Run xdelta -d -s PATCHED_ISO_NAME.iso patch.xdelta OUTPUT_ISO_NAME.ISO
    6. Enjoy ! And let me know if there are any problems with the game.

    EDIT: You might notice that apostrophe(') is shown as ?, caused by full width latin character, will fix this.
    EDIT: The game will freeze sometime after you meet Christina, this is caused by wrong pointer address.
     
  11. Rintalie
    OP

    Newcomer Rintalie Member

    Joined:
    Apr 14, 2013
    Messages:
    18
    Country:
    Thailand
  12. Exiron

    Newcomer Exiron Advanced Member

    Joined:
    Dec 14, 2010
    Messages:
    58
    Location:
    Bahia Blanca
    Country:
    Argentina
    There's still the problem about the names, have you solved it?
     
  13. StorMyu

    Member StorMyu "I'm too old for this"

    Joined:
    Jan 2, 2010
    Messages:
    892
    Country:
    France
    No problem, happy to have helped.
     
  14. Rintalie
    OP

    Newcomer Rintalie Member

    Joined:
    Apr 14, 2013
    Messages:
    18
    Country:
    Thailand
    Steins;Gate: Some names has been translated and I have decided to use ASCII for those (ss of Mayuri on the first post shows how it would look like).
    Only some names can be replaced right the way; "まゆり" and "Mayuri" both have the same byte size while "倫太郎" and "Rintarou" wasn't. The latter requires address remapping thus it takes time.

    Steins;Gate's sequel; Sill working on it. Since there are some encryption involved, it can't be done the same way as the original. I have managed to replace its text though so it isn't impossible.
     
  15. Exiron

    Newcomer Exiron Advanced Member

    Joined:
    Dec 14, 2010
    Messages:
    58
    Location:
    Bahia Blanca
    Country:
    Argentina
    That was what I was asking. If you need any help, just PM me, I know a little bit of japanese so I can help with some easy lines.
    I really wish you luck with this proyect, I don't want to see it dying again
     
  16. Coto

    Member Coto GBAtemp Addict

    Joined:
    Jun 4, 2010
    Messages:
    2,275
    Country:
    Chile
    I loved the series, so if it's possible to see this game translated i'd be uber happy..

    many thanks to everyone
     
  17. StorMyu

    Member StorMyu "I'm too old for this"

    Joined:
    Jan 2, 2010
    Messages:
    892
    Country:
    France
    Still a pointer issue for the name ?
    That's probably easy to check like the other one... size is never a problem when you know what you're doing.
     
  18. Rintalie
    OP

    Newcomer Rintalie Member

    Joined:
    Apr 14, 2013
    Messages:
    18
    Country:
    Thailand
    @StorMyu: Everything is working fine, I meant it takes time to manually remap pointers pointing to these name as I have not automated it yet. And yes, it is not really a problem once these pattern and can be programmatically recognised.

    @Coto: I am glad to see anyone interested in this series ! Since there is an English version released for iOS already, this will also be a replacement for android users ;P (I can't promise you anything though)
    [​IMG]

    @Exiron: It is not really a project but thanks, I will let you know when I need help !
    However, I tend to prioritize doing Hiyoku renri no darling for now as it has more complex file structure and interesting header encryption. Its prequel will likely to be put on hold until I have finished playing around with it.
     
  19. mkdms14

    Member mkdms14 GBAtemp Fan

    Joined:
    Jan 30, 2012
    Messages:
    358
    Country:
    United States
    I am really surprised that Xseed or another publisher has not jumped on this yet. I finished watching the anime a while ago after which I found out the anime was based off the game. I then ask myself why has this not been localized yet it has such a fantastic story. Rintalie it looks really good what you have done so far keep it up.
     
  20. tiduscrying

    Member tiduscrying that butt...

    Joined:
    Jun 12, 2012
    Messages:
    372
    Country:
    United States
    Hey all. Not to be one of those guys, but just wondering here how the progress of this is going? :)
    I've just recently installed the original PC version on my Laptop via Wine, but it is rather finicky. Crashes are pretty frequent due to incompatibility with Wine... :cry:. Any news?
     

Share This Page