Anyone on the forum who knows me knows that I like to take on little projects that I find interesting, rather than trying to translate a massive RPG. When it comes to Japanese systems, the one with arguably the largest amount of untranslated games, and relative obscurity, has to be the NEC PC-98. I'm used to translating 8-bit console games, and a bit of 16-bit ones, but the PC-98 is a different kettle of fish because in terms of text, it uses a fixed Shift JIS font, rather than programmers including whatever font they like.
For a hacker, this is absolute bliss, because a large amount of time on a console translation (for me) is figuring out the masses of kanji, whereas having a game in Shift JIS means the entire dictionary of kanji is already done for you, so assuming you have the text easily available, you can just copy-paste it into your translation program of choice and get to work.
It is with this in mind that I'm embarking on potentially my first PC-98 translation: Steam Hearts.
It's a vertical shooter, and a reasonably fun one. Being a PC-98 game, of course, between levels you convince the boss to talk by using, er, not so work safe means.
That's the reality of PC-98 gaming, whether you like it or not (personally I find it a refreshing change from console games, but whatever).
Being a computer, hacking the PC-98 is also different in that games don't come in solid ROM form, but in various files on disks. The typical way to find games is in either floppy disk format (with several disks) or as a hard disk file (with the game installed on the HDD, along with whatever other files are necessary). The latter seems to be the best option, since a 10MB HDD is hardly that big of a deal in 2018.
It also means that everything is in one place.
How the text is stored can vary. In the case of Steam Hearts, it appears that all of the text is inside numerous .EXE files, and if PC-98s are like regular DOS PCs, those are programs. The game doesn't have so much text, though, so I guess it made sense for them to keep the text inside the executable. The good news is that the text is sitting uncompressed and easy to find in the .EXE files. The bad news is that, because it's surrounded by code, I feel like a first-day hacker all over again, because I can only write inside the space available.
Each line is done separately, and in the first screenshot, I only have one line to play with, whereas I have two in the second. You'll notice the text is a bit large (limiting screen space), and I'm forced to fit the text in the space used by the original text (limiting storage space), but it's better than nothing, right? If I WERE a first-day hacker, I'd be pretty pleased with this, but the fact is that I'm not, so I want to do better.
My problems are two-fold: I don't know how to find the pointers saying where each line is stored, and I don't know how to switch the font to one that will allow 8-bit ANSI characters instead of 16-bit Shift JIS characters, thereby saving both screen space and storage space.
Look at the first screenshot for this translation of Marble Cooking: it uses a smaller font, but what's most interesting for me is that, internally, the hacker replaced the 16-bit Japanese text with 8-bit ANSI text and it works fine.http://www.romhacking.net/translations/824/
The problem for me is that if I try 8-bit characters in Steam Hearts, I just get a load of random kanji, so if I could tell the game to use the other font, I will be able to get a better translation in there. Of course, I'll also need to find out how the game figures out where the lines are, of course, but all searches I've made to find any pointers have come up blank.
I'd like to go the debugging route, although the x86 is the only major CPU from the 70s/80s that I have no experience with. The Neko Tracer in the RHDN database is a good start, but I couldn't see anything in the trace that looked like a reference to the text. A RAM dump shows that the whole .EXE is stored in RAM, and the first line is at $36A82, so that gives me something to go on at least.
The between-level cutscenes seem to use the same font mentioned in that other hack, but when I replaced text with 8-bit characters, it just messed everything up. This makes me wonder why the other hack was able to use 8-bit characters without issue, since as far as I can tell, no other modifications were made to that game.
So, in summary, the translation side of this game is easy-peasy, but fitting into the game the kind of translation I'd like will require some hacking, and the main reason I made this thread was because I was hoping someone might be able to help.
Normally I'd just use a debugger to break on a read to $36A82, but Neko Tracer only traces, rather than breaking, and all those damn registers make it hard for me to read a trace to figure out what's going on.
Anyone got any advice on this? If I can crack this game, maybe I'll have a go on some other ones...