I'm currently translating a script dump for Otogirisou for Super Famicom

Started by ButThouMust, April 15, 2022, 06:05:29 PM

Previous topic - Next topic

ButThouMust

Hi, I've been working on this on and off for a few weeks. With the help of tools from the abandoned translation effort hosted here (https://romhacking.net/abandoned), I finished a full table file for Otogirisou for Super Famicom.

It has all the mappings for kana, 1300+ kanji, the English alphabet, digits, and punctuation. Notably, I was able to use it with the translation effort's tools to obtain a readable dump of the entire script!

Less impressive than the script dump, I used the table file to make a simple hack for the name entry screen. You can insert an English name for your save files with it (uppercase replaces hiragana, lowercase replaces katakana). The main game script is unaltered, sorry. I included it in both .bps and .ips formats.

I uploaded everything plus a readme to the below Google Drive folder:
https://drive.google.com/drive/folders/1a4Mfxb-hxiiu0-xWVKhXhWxZYEeYq_I-?usp=sharing




Edit April 21, 2022: Since I got a readable dump of the script, I decided to try playing the game myself and translating* as I go. When doing that, I found some errors in the table file, so I fixed them. I updated the files in the Google Drive folder.

* Disclaimer: I'm nowhere near fluent in Japanese, but I've been learning the language on my own for several months now (closing in on WaniKani level 14). I think this could be a good learning experience.




Edit June 21, 2022: Changed topic title to "I'm currently translating a script dump for Otogirisou for Super Famicom" from "I made a table file for Otogirisou for Super Famicom."

ButThouMust

It's only been two months since the last update here, but I'm still working on this. These are the big updates I have:

  • I've finished two playthroughs of the game and translated all the text I found in both. The first playthrough definitely took longer than the second, mainly because I had to look up a bunch of vocabulary/grammar for the first playthrough but less so for the second. I think I can translate a playthough in about one or two weeks now, depending on my free time and motivation.
  • The game has "control codes" for doing stuff like visual effects, sound effects, text "effects" (e.g. print player's name, line break, print choices), etc. I was able to identify most of the codes' functions from the two playthroughs, and I made a writeup about them.
  • About two weeks ago, I found a misidentified kanji in the table file and fixed it. This was an actual misidentification, and not a copy-paste error like in my first post. I'm certain the whole table file is correct now, after running through the font dump again.
  • I made a still very incomplete document about some interesting game ROM offsets. It's mostly about data for the file select and name entry screens, but there are a few other things.
I feel like this question has an obvious answer, but I want to have a second opinion here. Would uploading and sharing my translation text file classify as distributing copyrighted material? It has all the raw Japanese text in it, plus the translation so far, translation notes, and notes about control codes ("the game fades in this background image, starts this sound effect, etc."). I didn't put it into my Drive folder, but I did upload a sample screenshot of the text for one of the two possible beginnings.

Pennywise

If you want to look up copyright law etc, that's the place to start. I'm not an expert on the subject, but if you're a US citizen, the Berne Convention is of interest to you. Also DMCA as well.

But for the purposes of this site, the only thing that's not allowed are distribution of ROMs etc and using this site to sell one's work or selling physical copies (literally piracy and counterfeiting). Everything else exists in a legal grey area that none of the big companies bother challenging since it'd be a waste of time and resources.


koitsu

I've been working on this same project since roughly 2011 (heaviest work between 2011 and 2014).  I tend to not publicly discuss projects I'm working on for various reasons.  But when someone chimes in publicly that they're doing the same thing, I will pipe up and provide stuff that I have so that I can step aside/remove something from my to-be-romhacked list and let more talented people do the work.  A couple close friends knew, a few co-workers, and a pal of mine (who I enlisted to code up a quick font dumper in Allegro; screenshots are provided.  He and I both have a crazy/silly sense of humour, so the stuff you read at the bottom of the font dump screenshot is just random silliness) -- were about it.

Why I bothered on the game at all: Otogirisou is kind of special to me.  Back in 1994, a friend of mine downloaded the ROM off an overseas BBS, ran it on his MultiGameHunter, and we both were super interested.  Neither of us knew (and still don't know) Japanese, but the atmosphere of the game and the suspense/horror was amazing and it always stuck with me.  We had nothing like this in the States.  I spent hours playing it just fooling around/picking options/trying to get further than before (or a different series of events) without having a single idea what I was doing.  I realise it sounds bizarre to say that about a game I couldn't read, but it's true.  I have always wanted to play it in its full entirety in English, and did not want to play the (later) PSX variant.

You've made more progress than I have, and I appreciate your work on deciphering the C++ code of the previous individual (who you call "Guest"), though I'm disappointed you rewrote it all in Java "... because C wasn't playing nice with handling files" (this makes absolutely no sense).  I don't think many people will resort to installing Java for this reason.  In general romhackers want single .exe files and don't want to mess about with other stuff.  Even requiring a Python interpreter installation (on Windows) turns a lot of people off.  It's for this reason that things like Go/Rust/that-weird-thing-that-can-convert-Node.js-into-a-single-binary tend to be better choices (IMO).  I do 65816 and C both (so this probably explains my bias -- sorry, don't mean to offend), but I found the previous individual's C++ code to be too heavy to comprehend, so I certainly don't blame you for rewriting it.

What I spent most of my time on was the font compression/decompression, and in the process figuring out how ChunSoft did the shadowing effect on their font (I assumed it was part of the font and I was wrong, it's done on-the-fly).  I'm old and I tend to work a lot of things on paper (and sometimes both digitally and paper together), then I take extensive notes.  (Case in point: there's an unrelated Famicom game I've been working on since 2018 and I've got about 60KBytes of notes at this point just based on subroutine/assembly reverse-engineering.)  The .txt write-up about the font and the shadowing effect should be easy enough to understand for anyone.  I wish I had taken better notes.

I didn't bother with script translation (again: I don't do Japanese, just Korean and Chinese).  My goal was just to get some English text into the game at the start using the existing (and awful) English font that's already in the game, which I was able to achieve, and then life/job took over.

ROM expansion for an English translation would require use of one of the less-commonly-used 24mbit or 32mbit Mode20 (vs. Mode21, which is more common for larger-capacity) PCB variations that only use the upper 32KB of each bank ($8000-FFFF), otherwise a lot of code would have to be rewritten.  Huffman coding is remarkably efficient for Japanese but terrible for English, so something else for English text compression would be needed.

Anyway, I wanted to provide my work/notes/pictures of Otogirisou here so someone else can benefit from them if needed.  I do not have the time/energy/etc. in my life at my current age (45+) to spend on it any longer.  I found ChunSoft's 65816 code to be extremely complicated as well.  They're apparently notorious for this; whoever their programmers were quite skilled and talented.

My Drive share: https://drive.google.com/drive/folders/1PGe1NSHxB6LXuLZH3t8acn7CnwjRYQYr?usp=sharing

Big kudos to all those who have worked on this so far.  For now, I shall archive/RAR up my Otogirisou-Work folder and store it away in my personal archives.  Hopefully sometime during my lifetime I'll be able to play this game in English and actually understand it + enjoy it in its fullest form.  I will not be replying past this point, nor answer any DMS about it.  <3
Making life hard for others since 1977.

ButThouMust

#4
I know you said you won't reply anymore after this, but I will reply anyway, even if about two days late. First, thank you for sharing your findings about how the game displays its font!

Quote from: koitsu on August 10, 2022, 05:22:32 AMI'm disappointed you rewrote it all in Java "... because C wasn't playing nice with handling files" (this makes absolutely no sense).
....
I do 65816 and C both (so this probably explains my bias -- sorry, don't mean to offend), but I found the previous individual's C++ code to be too heavy to comprehend, so I certainly don't blame you for rewriting it.
About the C/Java deal, I'm decently comfortable with coding in C and used it as my first choice for my program. However, when I compiled it with gcc in WSL and ran it, it would segfault when I tried to close the file handle for the ROM file. No idea why, and I spent a few days trying to debug it without any success. Taking my C code and porting it over to Java was a last resort (I don't know C++). In retrospect, though, I don't know why I didn't just close all my files at the very end of my program instead of thinking "I'd better close the file when I don't need to read from it anymore."

My program isn't really a rewrite of Guest's code (it doesn't actually dump any of the script), but more just a program I wrote to see all the actual Huffman codes. I wanted to understand how the Huffman decompression part of the script dumper actually worked. I thought seeing all the Huffman codes would both make it more concrete and potentially help with script insertion (mainly, knowing where to insert text). Also, thank you for reminding me I have an offline writeup about how this works. I'll upload that, too. [edit: done]

I have a bachelor's degree in computer engineering, which exposed me to some assembly programming. I wasn't amazing at it, though, and I definitely didn't learn 65816 there. My lack of, dare I say "real-world," experience with assembly is definitely my weak point with trying to work on this project. With all the online documentation out there about 65816 (I've looked through and bookmarked some of it before), I'm sure I can figure out some of it.

Quote from: koitsu on August 10, 2022, 05:22:32 AMI didn't bother with script translation (again: I don't do Japanese, just Korean and Chinese).  My goal was just to get some English text into the game at the start using the existing (and awful) English font that's already in the game, which I was able to achieve, and then life/job took over.

ROM expansion for an English translation would require use of one of the less-commonly-used 24mbit or 32mbit Mode20 (vs. Mode21, which is more common for larger-capacity) PCB variations that only use the upper 32KB of each bank ($8000-FFFF), otherwise a lot of code would have to be rewritten.  Huffman coding is remarkably efficient for Japanese but terrible for English, so something else for English text compression would be needed.
Agreed, the existing English font is ugly for actual prose, particularly the letters like "g" or "q" that have tails extending downward. I appreciate your insight about ROM expansion and about my idea to reuse the existing Huffman decompression system for the translation. This is my first time fan translating anything at all.

Quote from: koitsu on August 10, 2022, 05:22:32 AMWhy I bothered on the game at all: Otogirisou is kind of special to me.  Back in 1994, a friend of mine downloaded the ROM off an overseas BBS, ran it on his MultiGameHunter, and we both were super interested.  Neither of us knew (and still don't know) Japanese, but the atmosphere of the game and the suspense/horror was amazing and it always stuck with me.  We had nothing like this in the States.  I spent hours playing it just fooling around/picking options/trying to get further than before (or a different series of events) without having a single idea what I was doing.  I realise it sounds bizarre to say that about a game I couldn't read, but it's true.  I have always wanted to play it in its full entirety in English, and did not want to play the (later) PSX variant.
That's a really cool story about how you found out about the game! I personally discovered it from this series of events: about two years ago, I wanted to try something new and played the fan translation of The Portopia Serial Murder Case for Famicom. I thought it was really interesting, if admittedly a little cryptic, as an early visual novel/adventure game. It got me into visual novels, which eventually led me to playing 428 Shibuya Scramble (another ChunSoft sound novel, which got an official translation in 2018).

428 has a particular bad end that I thought was really weird and random when I first saw it: a protagonist finds a creepy old mansion surrounded by yellow flowers, and gets trapped inside. Later, I found a YouTube video about Super Famicom sound novels (https://www.youtube.com/watch?v=vvPaFpX5Rw0), and sort of had my mind blown when I found out the bad end in 428 was actually a reference to Otogirisou!

About the PS1 version of Otogirisou, I got a copy of it for really cheap a while ago. During my second playthrough of the SFC version, I played a little of the PS1 version to see what it was like. Personally, I much prefer the presentation/atmosphere of the SFC version, due to the limited visuals (it leaves much more to the imagination) and, ironically, a better soundtrack. The PS1's font is easier to read, though, and the use of the DualShock's rumble is neat.

I also found out the game got a movie adaptation "St. John's Wort" in 2001. I've read it's unfortunately kind of an average horror movie that doesn't really compare well against the game.

Final note, there is an are two English-translated playthroughs of the game on YouTube:
- Tara Devlin a.k.a. Kowabana: An English voiceover, I think reading from a script. Five part playthrough: https://www.youtube.com/watch?v=qoa-1UbDv7w&list=PL_3nZk9WWsQCG8mMnnqlKn3xbv2IKiXcb&index=2
- reinofhearts: An English translation done in real time. 22 part playlist: https://www.youtube.com/playlist?list=PL8D822DE67C0DF686
I've tried to not watch these myself.

ButThouMust

I have some updates that I think are significant enough to warrant making another post here.

Would it be possible to move this topic into Personal Projects? If not, should I just make a separate topic there? When I first made my account here and made this topic, I didn't want to post there because I wasn't sure how far I wanted to go with it. I now fully intend to keep going towards making an English patch.

First update: I discovered on VNDB's page for Otogirisou that it got a Korean translation patch. VNDB's link to it is dead/outdated, so I had to jump through some hoops to find a working link and download the patch. I don't know Korean but think the patch will be useful to examine from a ROM hacking perspective. It has some interesting changes, notably doubling the ROM size to 2 MiB, and using over half of that extra MiB for the Korean script.

Second update: I know enough about how Otogirisou stores and decompresses its script that I was able to insert English text (the pangram "Sphinx of black quartz, judge my vow.") in both uppercase and lowercase into the game. I made an IPS patch for this. Here is a screenshot of that sentence, along with a sample of the original Japanese font:
Spoiler
     
[close]

Third "update"/question: I think the English font that's already in the game is pretty ugly (in particular, the lowercase "sph", "g", "j", "y"). I know how the game decompresses its font data (1 bpp, variable width from 1 to 13 pixels, and variable height from 2 to 14 pixels) and should be able to insert a more appealing one. I'm aware RHDN has a font page; any particular recommendations for one to pick for this game?

Fourth update: I know how the game knows where to start a new playthrough of the game. If I edit this data in the right way, I can make the game go to any point in the script I want, which is useful for checking the script, timings, graphics, etc. without necessarily playing the game normally.

Final note, I'm currently playing the game for the seventh time while translating the text.