Gaming Steins;Gate - Anyone familiar with this game engine?

Rintalie

Member
OP
Newcomer
Joined
Apr 14, 2013
Messages
18
Trophies
0
XP
55
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)

uload




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

File structure:
DATA0.AFS
+ SCENE00.AFS
- DATA.BIN
- DMENU.BIN
- SG00_01.BIN
- ...
+ ...

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

uload


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;

uload

First sentence works fine as it always stop at %K%P.

uload

Since the last sentence is shorter than the original, the text starts shifting.

uload

And its getting more interesting.

uload

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
 
  • Like
Reactions: Coto

Rintalie

Member
OP
Newcomer
Joined
Apr 14, 2013
Messages
18
Trophies
0
XP
55
Country
Thailand
That's what we call Pointer.
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.

index.php

Those spaces are padding.

index.php

An incomplete sentence.

In case you are wondering how it would looked like in general;
index.php


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 !

ーーーーー
 

StorMyu

"I'm way too old for this"
Member
Joined
Jan 2, 2010
Messages
943
Trophies
1
Age
97
XP
1,093
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.
 

Rintalie

Member
OP
Newcomer
Joined
Apr 14, 2013
Messages
18
Trophies
0
XP
55
Country
Thailand
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.

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.
 

StorMyu

"I'm way too old for this"
Member
Joined
Jan 2, 2010
Messages
943
Trophies
1
Age
97
XP
1,093
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.
 
  • Like
Reactions: Coto

Exiron

Well-Known Member
Newcomer
Joined
Dec 14, 2010
Messages
71
Trophies
1
Age
33
Location
Bahia Blanca
XP
2,101
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
 

Exiron

Well-Known Member
Newcomer
Joined
Dec 14, 2010
Messages
71
Trophies
1
Age
33
Location
Bahia Blanca
XP
2,101
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.
 

Rintalie

Member
OP
Newcomer
Joined
Apr 14, 2013
Messages
18
Trophies
0
XP
55
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 !
index.php


The script can handle longer sentence now without affecting one another.
index.php


Running this patched game on actual device.
uload


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.
 

StorMyu

"I'm way too old for this"
Member
Joined
Jan 2, 2010
Messages
943
Trophies
1
Age
97
XP
1,093
Country
France
@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 .
No problem, happy to have helped.
 

Rintalie

Member
OP
Newcomer
Joined
Apr 14, 2013
Messages
18
Trophies
0
XP
55
Country
Thailand
There's still the problem about the names, have you solved it?
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.
 

Exiron

Well-Known Member
Newcomer
Joined
Dec 14, 2010
Messages
71
Trophies
1
Age
33
Location
Bahia Blanca
XP
2,101
Country
Argentina
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.
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
 

StorMyu

"I'm way too old for this"
Member
Joined
Jan 2, 2010
Messages
943
Trophies
1
Age
97
XP
1,093
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.
 

Rintalie

Member
OP
Newcomer
Joined
Apr 14, 2013
Messages
18
Trophies
0
XP
55
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)
uload


@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.
 

mkdms14

Well-Known Member
Member
Joined
Jan 30, 2012
Messages
358
Trophies
0
XP
174
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.
 

tiduscrying

that butt...
Member
Joined
Jun 12, 2012
Messages
509
Trophies
1
Location
HELL
Website
tiduscrying.wordpress.com
XP
2,491
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?
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Psionic Roshambo @ Psionic Roshambo: https://m.youtube.com/watch?v=lDRjqI-fBVI&pp=ygUPVml0Z2luIG1hZ2ljaWFu