- 📝 Posted:
- 🏷 Tags:
Yet another small interruption before we get to Shuusou Gyoku, but only because I've got a big announcement to make! Touhou Patch Center has just commissioned the basic feature set that would allow PC-98 Touhou to be translated into non-ASCII languages. 💰 And we're in fact doing it on PC-98, and don't wait for the games to be ported to other systems first.
How is this going to work?
This project will start sometime after I've completed the current big
project of porting Shuusou
Gyoku to Linux, so probably in the last few months of 2023. Similar to
the previous MediaWiki update, this will bypass the ReC98 push and cap
model: Touhou Patch Center is going to guarantee a minimum budget out of
their Open Collective funds, which can be increased with further donations
from the community, and I'm going to send an invoice once I'm done. In
addition, I'm also going to keep in contact with all interested translators
and backers via a Discord room throughout the process for additional
technical quality control.
Since ReC98 hasn't really focused on text so far, the amount of moddable text-related code would be fairly limited if I started working on it right away. As of 2023-11-30, it only includes the following:
- All of TH01
- All of TH02's
OP.EXE, i.e., the main menu
- All Music Rooms (📝 completed in P0265)
- TH02's, TH04's, and TH05's in-game dialog (📝 completed in P0261)
- TH03's win messages (📝 completed in P0261)
- TH04's and TH05's first-launch sound setup menu (📝 completed in P0263)
- TH04's and TH05's main menu (📝 completed in P0262)
- TH04's and TH05's endings
Therefore, I'll put any general and unconstrained reverse-engineering,
position independence, or
anything contributions that come in during
the next few months towards covering everything that's still missing there:
MAINE.EXEneeds to be fully RE'd since all of its screens contain translatable text. Due to its highly copy-pasted nature, it should be much cheaper than currently estimated on the main page. 3 pushes should be enough there.
- Similarly, TH04's and TH05's
MAINE.EXEcontains some not yet RE'd text in their verdict screens. 1 push there, since it's unfortunately contained in the same function that also performs the highly complex skill value calculation.
MAINL.EXEneeds 100% PI to enable convenient translations of the win messages, the character titles and names at the beginning of a stage, the Stage 8/9 cutscenes, and the endings. Let's go with 2 pushes there just to be safe, and finalize the missing code to not 📝 incur more technical debt.
- Technically, we'd need TH02's
MAIN.EXEto be 100% position-independent for any translation-related code modifications, but reaching that goal before I get to work on translation support is probably unrealistic. However, this new translation code needs to work across 13 executables to begin with, so I'm going to put most of it into a separate TSR program anyway. Including this TSR in a non-PI'd executable shouldn't be that painful, then.
- The same is true for TH03's
MAIN.EXE, but the ＷＩＮＮＥＲ ＢＯＮＵＳ popup is the only translatable piece of text there. Should be even less of a problem.
In total, that's the next 6 general pushes that will go towards ensuring translatability of most of PC-98 Touhou, if possible. If you'd like your contribution (or existing subscription) to go to gameplay code instead, be sure to tell me!
What's the minimum guaranteed set of features?
The main feature will be a custom renderer for a subsetted, monospaced
Unicode bitmap font, and its integration into any translatable part of the
game. For the script files, this means UTF-8 support with Shift-JIS
fallback. For the glyphs, I'll use GNU Unifont by default, but we
could also use any other freely licensed bitmap font with 8×16 or 16×16
glyphs for alphabets of certain languages. Everything about this will be the
real deal: The system will potentially support all of Unicode without font
ROM hacks so that the translations will work on real hardware, and there
will be no shortcuts for just a few Latin characters. And if someone wants
to translate this game into a language with more complex
shaping rules, I'll make sure that they look pretty as well if there's
some budget left.
This will allow translation teams to build static translation patches into any language by editing the original script files, and using -Tom-'s existing tools for any images. Modifications of hardcoded strings would still require recompiling the binary, and each group would have to distribute and advertise the result on their own.
🌐 Which languages are we getting?
As of 2023-10-10, the following translators and teams have expressed interest:
- Arabic: Team Fantasy Boundary
- Chinese, Simplified: ROCO2018, XiTieShiZ, Yanstime (Enko)
- Chinese, Traditional: Haniyasuko Okina
- Croatian: TRDario
- English, literal: Yova
- French: Lance, Slime900
- Gaelic: nitori
- German: Splashman / Reality Dreamers, PK Eager Maribel
- Greek: Tasos500
- Hungarian: Spectatorsatori
- Italian: Shin
- Polish: Matt
- Romanian: Adi125
- Russian: CyrusVorazan, Badass1987
- Scots: nitori
- Serbian, literal: Yova
- Spanish, Argentinean: Mr. Tremolo Measure
- Spanish, Latin American: Xziled, DarkeyeSide, Mr. Tremolo Measure
- Vietnamese: Shinka
Wait, Arabic?! On my PC-98?! What's the plan there?
The two challenges with Arabic scripts are transforming
a text to use the codepoints for contextual glyph forms
shaping), and right-to-left rendering. Shaping requires not too
much code, which is easily added to the font subsetting build step.
Right-to-left rendering, on the other hand, must be a feature of the new
PC-98-native text renderer, because there are several places in PC-98 Touhou
where text is gradually typed character-by-character. So it will require a
bit of dedicated budget, but not all too much from what I can tell. Bidirectional
text would add a great deal of complexity here, but we most
likely won't need to implement it – I'll simply pick a direction based
first codepoint on a line, and ask translators to manually reverse
any Latin-script runs of text in the middle of an Arabic-script line.
How much better could it all be?
- The most important feature: We could finally move away from the concept
of translation patches, integrate all translations as part of the
ReC98 repo, and ship them directly as part of new ReC98 builds. Languages
could then be switched at runtime, through a new setting in the Option
- And why stop there? How about binding a keyboard key to a new language selection window that can be opened at any point during the game, and even switches out any text that is currently shown on screen?
- I could finally translate a canon Touhou game via a gettext-like dictionary system. This would allow modded source text to override translations, and even make it possible to translate mods as well.
- Ideally, all translators I get to work with are highly motivated and finish translating each game they start, so that we don't even have to think about translation stacking, but maybe we still should.
- We could use proportional fonts instead of aligning every glyph to the
8×16 text RAM grid. Unlike the Windows Touhou games where proportional fonts
are crucial because adding more text space would desync replays, they are
not that important in PC-98 Touhou. With no replays to be desynced,
we can arbitrarily add new boxes without worrying about the font.
- However, supporting proportional fonts would make it possible to lift some of the text sprites into the custom font system, allowing their glyphs to be shared more easily across languages:
- On the topic of new text boxes: Automatic line and box breaks at word boundaries would completely remove the need for in-game proofreading.
- In-game TL notes… nah, probably not. Where would we even put them in the original screen layout?
- Due to the continued interest in TH01's Anniversary Edition, any code
modifications would be exclusive to a respective game's bugfixed
anniversarybranch – i.e., any translated builds will be bundled with a growing number of fixes for issues in the original games that fall under my current definition of bugs. This avoids a combinatorial explosion of the number of branches, merges, and releases I'd have to do. For a small amount of extra money though, I could merge them back to the ZUN bug-preserving
debloatedbranch. And for a lot of extra money, I could reimplement everything on
masterwhile preserving the original memory layout of ZUN's original binaries. This would allow the translation-supporting binaries to be easily diffed against the original ones, and retain compatibility with existing hacks or cheat tables. The latter was already something that 📝 the Shuusou Gyoku community previously expected my recompiled builds to have.
- Just like with all custom PC-98 Touhou game builds I've shipped so far, you would install the translations by manually dropping files into the game directory, or editing .HDI images using third-party tools. I can make this step pretty much arbitrarily more user-friendly by writing nice installers that cover all imaginable setups and use cases.
- I could top off the project with some smaller, more intricate localizations that translators might request for certain languages. Most notably, this category would include any localization of TH01's 東方★靈異伝, STAGE #, and HARRY UP popups that goes beyond just fixing the Engrish.
- The previous static English patches from 2014 introduced quite a few fanfiction changes that have been interpreted as canon in the years since. I could write a blog post to highlight these, and also compare the translation as a whole with the more literal English translation we're likely to get this time around.
- Finally, if you all really want to, I could move all translatable content to the Touhou Patch Center interface, which would truly turn that site into the one central translation source for all canon Touhou games. Automatic updates won't be feasible before porting away the games from PC-98 hardware, so the thpatch server would have to communicate with the ReC98 repo via a GitHub webhook. This will be rather expensive though, as I'd also have to set up some kind of build/release CI for ReC98 first.
You might remember most of this from 📝 my initial pitch back in November, but I did have quite a bit of additional ideas since then.
These features are mostly independent of each other, and it will be up to Touhou Patch Center to pick a priority order. That's also where all of you could come in and influence this order with your donations. So it's closer to a traditional crowdfunding campaign with stretch goals, where the sky is the limit, than it is to the usual ReC98 model. And while there can be no fixed prices for any of the goals, you can be sure that anything you invest will improve the quality of the final product.
Touhou Patch Center on Open Collective
From now on, this will be the only way of funding any translation-related goals; I've removed the respective options from the ReC98 order form. Looking forward to how many of these additional ideas I get to implement – but, as always, please invest responsibly.
Shuusou Gyoku finally coming this weekend.