Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bin files #1

Open
marcussacana opened this issue Aug 18, 2015 · 16 comments
Open

bin files #1

marcussacana opened this issue Aug 18, 2015 · 16 comments

Comments

@marcussacana
Copy link

man, for another lang translation project, can you send the decompile bins tool, or english source?
if you don't can send in public, can send email for: ddtank.marcus@gmail.com

sorry for all

@antonizoon
Copy link
Member

Hey there! I think I might be able to help you out, but it's nighttime here
now, so I'll reply in the morning.
2015/08/17 21:24 "marcussacana" notifications@github.com:

man, for another lang translation project, can you send the decompile bins
tool, or english source?
if you don't know send in public, can send email for:
ddtank.marcus@gmail.com

sorry for all


Reply to this email directly or view it on GitHub
#1.

@marcussacana
Copy link
Author

okay, thanks

@antonizoon
Copy link
Member

Hey there! Everything you need (other than the tools) can be found in the GitHub repository. Here is a downloadable zip: https://github.com/BASLQC/steins-gate-psp-patch/archive/master.zip

Unfortunately, we are not the original authors, we are liquidators, that give historically significant source code a final resting place. There was no documentation provided with this code. But I've taken the time to analyze it and give you my recommendations.

It would be awesome if you figure this out. PSP Game translation is a dying art, and we need information about how it's done. That's why we went to hell and back to rescue this Steins;Gate patch. For you.

How it Works

Basically, our task is to replace the Japanese text in the Visual Novel with translated text.

  1. The Japanese text for each scene is stored in binary data .BIN, in the Shift_JIS encoding, for ease of access by the VN engine. We've already extracted them and they can all be downloaded here.
    • Use a decompiler, called Cartographer, to decompile it into human-readable source code. This is easier said than done.
  2. We need to first copy over the English Translation (which has already been finished) by replacing each Japanese snippet with the corresponding English snippet.
    • After that, you can translate to your desired language off of the English translation.
  3. After changes have been made, the translated source code must be compiled back into the .BIN binaries, using ATLAS.EXE.
  4. Finally, we use PuyoTools to put all binaries into back into the SCENE00.AFS archive we got them from.
  5. Get the Steins;Gate PSP ISO. Use 7zip or WinRAR to replace the SCENE00.AFS archive inside the ISO with your modified one.
  6. Test out the modified ISO in your PSP. If it works, you're done.
  7. (Optional) If you'd rather not distribute the copyrighted ISO, create an .xdelta file against the original ISO to generate a ROM patch, and distribute that. This way, users will have to download the original ISO (or dump it from a legal copy), and apply your .xdelta to create a translated version.

Data/SEEN scripts

Criware uses the AFS archive standard. All binaries that we want to mess with are found inside the SCENE00.AFS archive in the Steins;Gate ISO.

DATA0.AFS
+ SCENE00.AFS
- DATA.BIN
- DMENU.BIN 
- SG00_01.BIN
- SG01_01.BIN
- ...
+ ...

You need to use PuyoTools to extract this archive. You will also need it again to recompress everything.

The original author has already extracted these and put them in an archive, SCENE00.rar. That archive contains all the scenario files you need to modify.

Decompilation to Source Code

These binaries need to be decompiled with Cartographer to convert them into ATLAS scripts.

Unfortunately, I have no idea how to use it. You need to provide the right settings to Cartographer (e.g. Little endian, beginning of pointers) for it to export correctly. The original author provided no information about how he did this. You may need to use a hex editor...

Maybe you could ask him yourself? Riku at GBATemp, he's still around.

If he does not feel like telling you, ask about it on GBATemp in this thread. Or create a new thread in the ROM Hacking section.

Scripting

You basically replace the Japanese text with translated text.

Since the game was made in Japan, make sure your text editor (Notepad++ recommended) is set to SHIFT_JIS when editing the script file, or things will get nasty.

  • Use <LINE> for linebreaks.
  • To make changed talker's name display correctly you need to change it in DATA.BIN as well. That also contains information about the dictionary.

It seems like you can write anything that can be encoded in Shift_JIS. Such as Latin, Cyrillic, Chinese. (I think diacritics are supported, for French, Spanish, and limited Vietnamese, but check first) You're screwed if you're using any other language though.

Make sure the character you want can be found here. https://github.com/BASLQC/steins-gate-psp-patch/blob/master/data/shiftjis.tbl

Compiling the Script

Compiling the script with ATLAS is easy, with the included Windows batch scripts. Here's the batch file for SG00_01.txt :

https://github.com/BASLQC/steins-gate-psp-patch/blob/master/SG00_01_build.bat

To compile something called SG00_03.txt to SG00_03.bin, just change all mentions of SG00_01 to SG00_03 in that batch file, and run it.

Now you can inject these .BIN files in the next step.

Injecting the New Script

Finally, we use PuyoTools to put all binaries into back into the SCENE00.AFS archive we got them from.

The author's SCENE00.rar file contains everything inside the SCENE00.AFS archive, so make sure everything there is in it when you create that archive.

Putting the AFS Archive into the ISO

  1. Get the Steins;Gate PSP ISO. Use 7zip or WinRAR to replace the SCENE00.AFS archive inside the ISO with your modified one.
  2. Test out the modified ISO in your PSP. If it works, you're done.
  3. (Optional) If you'd rather not distribute the copyrighted ISO, create an .xdelta file against the original ISO to generate a ROM patch, and distribute that. This way, users will have to torrent the original ISO themselves (or dump it from a legal copy), then apply your .xdelta to create a translated version.

@antonizoon
Copy link
Member

I've decided to post to the original thread in question. Hopefully someone will answer this question.

https://gbatemp.net/threads/steins-gate-anyone-familiar-with-this-game-engine.346275/page-2#post-5625813

@marcussacana
Copy link
Author

woooo thanks man, really... thanks...

@antonizoon
Copy link
Member

antonizoon commented Aug 19, 2015 via email

@marcussacana
Copy link
Author

for now, i need test my chars in the game...
the riku send-me the scripts... but in japanese, my group translate from english... with japanese... so hard...

@antonizoon
Copy link
Member

antonizoon commented Aug 20, 2015 via email

@marcussacana
Copy link
Author

yeah, don't exist english translation of the game? :/ this is bad, say your email, i send to you, but if you translate the riku request to write the credits

@antonizoon
Copy link
Member

antonizoon commented Aug 20, 2015

Ok, let me explain.

EVERYTHING in Steins;Gate has already been translated to English.
EVERYTHING. http://www.mediafire.com/download.php?9tm4tf8b8nu1p79 We just
need to convert it to work on the PSP, since these scripts were made for
iPhone and PC.

I can create an automated tool to match the Japanese text in the PSP with
the English text for you, as long as you send me the scripts Riku made.

Then, you can translate to the language you want off of the English
translation. OK?

Send it to me. My email is: antonizoon@bibanon.org

I will credit Riku, as it has already been done in the Github repository.

Also, please ask Riku *how he decompiled these ATLAS scripts. (probably
using Cartographer) *This is very important, because I may need to
decompile more stuff.

On Thu, Aug 20, 2015 at 12:04 PM, marcussacana notifications@github.com
wrote:

yeah, don't exist english translation of the game? :/ this is bad, say
your email, i send to you, but if you translate the riku request to write
the credits


Reply to this email directly or view it on GitHub
#1 (comment)
.

@jamescallen246
Copy link

jamescallen246 commented May 12, 2019

@antonizoon Hi antonizoon, I have a question but are you familiar with .scx files? It's a file that's for the scripts of the original Steins;Gate visual novel for PC. I have been trying to do some research about the file but there's not much information online, I'm trying to decompile it so I can translate the game or modify some of its code. Anyways, thank you.

@SpongebobSquamirez
Copy link

Did anyone happen to extract the original jp text files from the BINs? I could really use them.

@marcussacana
Copy link
Author

The creator of this tool does not like the open source community very much and therefore it is not public, you need to contact him.

@antonizoon
Copy link
Member

@weirdalsuperfan Yeah they didn't like us very much and probably won't answer lol.

@SpongebobSquamirez
Copy link

Sooo...I somehow located this file (I think I found it on some forum or on reddit), which has everything in text-(JIS) format in both English and Japanese... http://www.mediafire.com/file/lmm47ob3r07bzjc/watchv%253DrasJPVTyL0E%2526t%253D2m26s.rar/file

I imagine it was part of a translation project, but I can't for the life of me discover where in my browser history I ran across it. Anyway, I found what I was looking for, so I thought I'd post the link here. Let me know if you can figure out where it's posted online. I want to bookmark that page in case I ever lose the files/link.

@antonizoon
Copy link
Member

antonizoon commented May 10, 2020

@weirdalsuperfan Pretty cool. I mean it must have gotten decrypted at some point because Steins;Gate for PC was once fan translated, but all that is said and done now. But maybe it could be making something like ScummVM for all these VNs (such as VNDS or converter scripts to Ren'Py) at the very least for cross compatibility and additional language translations. Up to you to do that though.

https://web.archive.org/web/20131110031610/http://www.youtube.com/watch?v=rasJPVTyL0E

I thought the name of the mediafire link, which refers to a youtube video, would have a hint, but it leads me nowhere. Great song though:

https://www.youtube.com/watch?v=shxPF38klyY

Only other reference to the mediafire link is this russian imageboard archive, which has other mediafire links which might be of interest.

https://iichan.hk/vn/arch/res/25851.html#31461

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants