Sunday, May 30, 2021

Japanese bookstore simulator translated into English after 24 years

Cover image: Screenshot of BookStory’s opening title screen, featuring the interior of the Kurome Shobo bookstore.

Usually, a Google Sheet is the site of bureaucratic misery and numbing digits; the exact sort of place you wouldn’t want to find yourself on a weekend night. Yet there I was: five hundred rows deep, carefully entering Japanese text I had extracted from the decompiled source code of a twenty-four-year-old .exe file. With me was a cadre of volunteers from around the world offering possible translations nearly as fast as I was pasting in characters. “能力 - skill level,” someone commented. “Ability,” wrote another. 好きな本 was decided as “favorite book”; 耐震工事, “seismic retrofitting.”

These are but a few choice elements of 本屋物語 a bookstore simulator created by the Japanese videogame developer Kairosoft in 1997 (the title translates literally as “Bookstore Story,” or more poetically, “BookStory”). I came across the game recently while searching for book-related sims. While sims (videogames that simulate activities) have been enjoying a genre renaissance lately, there’s still a decided lack of book-related titles, and so I was delighted to discover BookStory, with its charming yesteryear graphics and nostalgic UI elements. 

Eager to share my discovery, I tweeted “Someone absolutely needs to translate this Japanese used book store simulator from 1997” with a link to the freeware download on Kairosoft’s site. Some retro gaming accounts picked up the tweet and suddenly I had the attention of several thousand newly minted BookStory fans who also yearned to play this beguiling game.

I wondered what it would take to translate BookStory—there was not just the matter of translating the Japanese text, but also figuring out how to extract that text from the executable file and then patch the translation back in. Before I sought potential translators, I had to determine if the implementation of their work was even technically possible. 

Screenshot of the original .exe file opened in a hex editor. The machine instructions are on the left and the decoded “human-readable” text is on the right, containing the Japanese strings.

Using a hex editor, I was able to see that all the Japanese strings were represented unobfuscated in the game’s .exe binary. As a test, I changed one to “Here I am.” When I ran the modified .exe, it crashed immediately. I checked the amount of bytes needed in the section and added a few extra characters for padding. Still nothing but a crash, not even an error dialog. I could see all of the text in the file, waiting to be translated. But to change it was a trespass, as though it were trapped under ice. 

BookStory is written in Visual Basic 5, a programming language developed by Microsoft in the mid-90s. I reconstituted the .exe file’s machine-only instructions into human-readable source code with the help of a decompilation tool, but to view this source in any meaningful way and rebuild it into a newly translated game, I figured I’d need a copy of Visual Studio 97, the original software used to write it. I replied to my tweet seeking a copy and a kind, pseudonymous internet stranger sent one. Surprisingly, it installed and ran successfully on Windows 10. It was like being gifted a beautiful old instrument that still plays true.

Screenshot of the game’s decompiled source code running in the original software used to create it, Visual Studio 97. All of the game’s menus and user interface are designed using a WSIWYG editor.

Confirming the possibility of implementing a translation meant I could scrape the Japanese strings from the code and place them into a spreadsheet to be translated. Instead of consulting a lone translator, I decided to enlist the help of BookStory’s ardent Twitter following and enable anyone with the link to comment on the sheet.

The spreadsheet erupted into a collective language party where anyone could propose a meaning (or vouch for one) and contribute their part to digital archaeology. A distributed, ad-hoc nano-community sprung up around the translation effort, with numerous threads, posts, and chats propelling the effort forward.  

In less than forty-eight hours after my initial tweet, all menus and UI elements were translated by over a dozen volunteersmore than enough to render the game playable in English. And people were ready.

I just had to get the game into a playable state; in my excitement of extracting all the strings and setting up the spreadsheet, I forgot to actually check whether or not it would all work. When I finally hit the big green “Compile” button in the toolbar to build the newly translated source code, I received a cryptic error message. It was as though we had all the ingredients prepared, but I couldn’t get the oven to turn on.

Again I turned to BookStory’s eager Twitter following, uploading my reverse-engineered source for others to modify, but no one had success. Spinning up a Windows 98 VM with all the original files and libraries installed also didn’t work. After spending hours looking at reedy lines of hexadecimal numbers, I was struck by the idea to pursue the original route I had tried: directly modifying the game’s .exe, but this time correctly. 

The next morning I found a fortuitous program that would let me reliably patch Visual Basic binaries, albeit in a tedious manner. I rolled up my sleeves (and a newly legal spliff) and went to work. Before noon, I was playing BookStory in English for the first time ever. And so were hundreds of others. 

Screenshot of the patched .exe file with UI elements in English.

BookStory is a work in progress, a poem still being written. Much of the flavor text and book titles remain untranslated (they are stored in the game’s dynamic modules rather than in static strings, so modifying them is a little trickier). Since the consensus and emphasis is on human rather than machine translation, I invite you to try translating some of the book titles here. There are also efforts to translate the game into German and Romanian

On Kairosoft’s website, there is a caption underneath a screenshot of BookStory’s title screen: The interior of the now-defunct Kurome Shobo has been faithfully reproduced. The game itself is a restoration, an ode, a translation of a beloved bookstore into the digital realm; a testament to the archival imagination. As indie bookstores shutter and massive conglomerates dominate the publishing world, BookStory offers a space to create and manifest the ineffable experience we seek in our favorite local bookstore. In this virtual counter-narrative, the players are writing—and translating—their own parts. 

You can download a copy of BookStory in English (Windows only) here. 

Screenshot of BookStory running in English on Windows 95, the way it's meant to be played.

Special thanks to: @MintsJams @ayaLAN @HipsterMrMoon @IShoutedAI @netspooky @pgandlabs @Solvalou_ @indrora @cryptoxdisco and Kaitlin Schaer



from Hacker News https://ift.tt/3v0B4vw

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.