This all got started when I reached out to Nagato via a PM on this forum proposing the project earlier this month. Nagato was up for it and got started by working on injecting new text, as you can see here:http://i.imgur.com/7j8xK3q.png
Those of you read kana will be able to see this is a “hello world” proof of concept execution of text insertion. (Bonus points for spotting the missing dakuten.) You may also notice some other immediate challenges such as the graphic text for the name of the castle you’re in at the top right, and the character name Hayabusa.
The game lets you enter a name for your character but if you leave it blank, Hayabusa is the default and the name he's called in the prologue. Hayabusa is four characters in Japanese and reprogamming the game for a longer name, be it default or custom, was beyond the scope of our intent and in any case, the text display areas are so small that it wouldn’t have been very useful. Extending it may even have caused further line-breaking issues.
Anyway, since Hayabusa in English is eight characters we had to change this. I went for Koga. Finding out why is left as a research exercise for the reader.
Nagato is the one to ask about the technical aspects of inserting English text into this game, but I can tell you the limitations were extreme. Game Boy games are very small data-wise, and Japanese programmers often programmed in the exact amount of space needed to display the Japanese text. If you know anything about Japanese you’ll know this is a problem because the equivalent English length is usually a lot more.
A key early task was the addition of an English character set for our text display, which Nagato did, along with provided me with a text dump of all the text needing translation. I got started by translating all the text as fully as I wanted to, knowing this would not be the text that would be usable in the game. I find it useful to start this way and cut down late rather than work to the constraints as I go. It also meant as we were able to claw back some space later, I could easily refer back to my ideal translation.
To get the ball rolling, Nagato inserted my full-sized translation into the game and compiled it, making a command- line tool which allows me to see by how much (measured in bytes) my text was overflowing. Any overflow at all and the game doesn’t work properly. It would still boot but it was a complete unplayable mess. And boy, was my text over. It initially seemed like I was going to have to match character length to the Japanese. This is incredibly problematic for all sorts of obvious reasons but for some examples of where it’s downright unworkable, consider that map ちず and key かぎ are two characters each in Japanese. MP and KY are hardly very readable, and besides, MP clashes with the move points and KY already stands for other things. Iit was the same for enemy names. Bat, rat and so on were fine but anything over two or three characters and it was a mess of unreadable contractions.
Fortunately, this phase didn’t last long as Nagato worked out that the game checks the byte total for the text but not on a line-by-line basis. Having a game-wide total would have been the most flexible, but it turned out the code is split into four sections, broadly speaking the enemy and item names, battle text, some dialogue, and the ending sequence. Each of these sections has a hard upper limit for how many bytes of text all its lines can contain, but I was able to shorten one line in order to gain space in another in the same section. This greatly improved the readability of enemy and item names.
The process of finding text that needed to be expanded for comprehensibility led us to the idea of adding icon glyphs. Since the game code has space for 60-odd Japanese characters and punctuation to be displayed and our character set wasn’t using all that space, we could use the blanks to create small letter-sized icons that could stand for longer words. For example, you can find new weapons and armour and the length restrictions made the names pretty unreadable - what should have been Shinobi Katana or Demon Sword were getting shortened to NinjBld and DmnBld. Since there wasn’t space to add lowercase letters, these were even worse as without CamelCaps they just read as NINJBLD and DMNBLD or what have you.
To solve this, I designed some monochrome 8x8 icons for a sword, armour piece, mask and key and since each of those was one byte, the equivalent of a single letter, the space savings started adding up and I could use the free bytes clawed back this way to expand other text lines that were suffering in terms of readability or context due to their constricted size.
Another way we saved some space was taking some key terms like the castle names (there’s more than one castle to explore!) and some longish words like poison which were causing issues, and designing glyphs that crammed two letters into the space of one, which we used specifically to replace these words. This let us cut those words down by half in terms of byte usage while keeping the full name - for example if you get an item with Suzaku in the name while in Suzaku castle, you need that to read the same in order to make the connection. The first-pass version SuzBld wasn’t really cutting it.
Nagato was also able to optimise the game code and find me some extra pockets of space. For a game this small, every single byte counts, and the current “prerelease” translated English text uses literally every single byte available (as you can see from this command line output:
Names section size: 573 bytes out of 573 bytes
Dialog section size: 2057 bytes out of 2057 bytes
Pointer table section size: 597 bytes out of 597 bytes
Ending section size: 195 bytes out of 195 bytes
That’s about the long and short of it - we went back and forth trading files and pointing out issues, booting the ROM up in an emulator to test it out and seeing what text was working right, what was wrong in context, what was causing display issues and so on.