Note: There's a lot of lead-up, but this is mainly about how to deal with text and pointers.
This is something I've wanted to do for years, as I have enormous nostalgia for this game. Anyone who's familiar with it knows that the translation is atrocious, and every time I'd replay it I'd think about how I'd write a particular line. I tried several times over the years, but could never locate the text in the iso I had. I have yet to read about anyone else doing so either, though I've seen several people try.
Anyway, I decided to give it one more go, and this time I found the encoding table they used in the game files! So I have that, and now I can search and read all the dialogue. As a test, I even changed a letter in the .iso, and this worked fine. What I want to do though is be able to shorten and lengthen lines of text as need when rewriting. So a full translation hack, translating from LoD English to real English.
To start, I have .iso images that I downloaded, not BIN/CUE files from the original discs. I'd use my own rips, but the final movie on the last disc is corrupted on my copy.If I convert the iso to bin/cue, the cue just has a single track instead of the file architecture. I don't know if this is a problem. I was able to save all the files from the iso using jPSXdec though, so hopefully I'm okay. The structure looks like this http://i.imgur.com/beyF8IE.png
, if that helps.
Next, the hex structure, in case it's helpful:
So DRGN21.BIN contains all of the background texture assets, plus the dialogue, all mashed together in a confusing jumble. The text is mostly consecutive within a "scene", but the scenes are jumbled weirdly (and occasionally there is duplicate dialogue for some reason). Text is preceded by one of several headers: two for initiating text boxes (two different types), one for new line, one to close out a text box, and some other less major stuff. After the full text for a text box closes, there's a short block that sets the width and height of the text box itself. This is followed by the header for the next text box. The text itself uses two bytes, where the second is always 00, so there is a space between all the characters. Like so: http://i.imgur.com/NRYikHh.png
I considered the idea that it used sequential text, but I don't think that's possible. The game occasionally has choices, so it needs conditionals. Not to mention some things are out of order even within a scene. In fact, in that screenshot I think there's an unused line. So somewhere there are pointers. But I don't know which file they're in, how to find them, how to calculate knew ones, or anything like that. Any suggestions on how I go about doing that? I've read about pointers, but I still find myself completely lost here.
A couple of side question:
1) If I add or remove bytes of text, doesn't that change the offset of everything downstream from that point? So would I have to calculate new pointers for every single thing in there every time I change length? Because since it's a huge file that contains images as well as text, I don't think that's feasible.
2) Why is it bad to edit the iso instead of the component files on the disc image?
Any help would be greatly appreciated. Including assistance on this project, if anyone's interested.