<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/reverse-engineer-of-pc-98-touhou-games-retires-6upgkhfe9" -->

---
title: Reverse engineer of PC-98 Touhou games retires | daily.dev
description: Shuusou Gyoku's point items can score negative values because the collection formula isn't clamped to zero, a bug hidden for years because the game's font has...
canonical: https://daily.dev/posts/reverse-engineer-of-pc-98-touhou-games-retires-6upgkhfe9
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Reverse engineer of PC-98 Touhou games retires | daily.dev
og:description: Shuusou Gyoku's point items can score negative values because the collection formula isn't clamped to zero, a bug hidden for years because the game's font has...
og:url: https://daily.dev/posts/reverse-engineer-of-pc-98-touhou-games-retires-6upgkhfe9
og:image: https://api.daily.dev/og/posts/6Upgkhfe9.png
og:image:alt: Reverse engineer of PC-98 Touhou games retires
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Reverse engineer of PC-98 Touhou games retires

**[Hacker News](https://daily.dev/sources/hn)** · 89 min read · 0 upvotes · 0 comments

## Summary

Shuusou Gyoku's point items can score negative values because the collection formula isn't clamped to zero, a bug hidden for years because the game's font has no minus-sign sprite. The fix only patches the rendering glitch, since changing the recorded score would break replay compatibility. The bulk of the post covers splitting Shuusou Gyoku's game logic into a standalone DLL (ssg.v1.005.dll) for replay validation and a future CLI tool, including removing sprintf() and C runtime initialization to shrink the DLL. A replay simulation runs 7 minutes of Extra Stage gameplay in under 200ms, and the resulting shared code gets organized into a new cross-game library called Hatoyama for future PC-98 Touhou and Kioh Gyoku ports.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://rec98.nmlgc.net/blog/2026-10-05>

## Questions this post answers

### How do I remove the MSVC C runtime initialization dependency on sprintf() in a Windows DLL?

MSVC's sprintf() implementation depends on C runtime locale initialization, so eliminating that initialization requires replacing sprintf() entirely with a minimal drop-in implementation. The eyalroz/printf library works well, compiling to about 3.5 KiB in its minimal configuration, letting a freestanding DLL avoid roughly 34.5 KiB of locale bloat and C runtime startup code.

_Developers chasing minimal Windows binaries can track low-level build tricks like this on daily.dev._

### Does /EHsc affect exception handling behavior inside precompiled C++ standard library modules?

No, /EHsc on the module compilation itself doesn't matter because the compiled std.obj contains no executable code, only static data; all templated and inline code gets instantiated under the importing translation unit's own exception handling settings. Only the /EHsc setting on the source file that imports the module actually controls whether stack unwinding happens for standard library code used there.

_Anyone debugging C++20 module build warnings can keep up with these edge cases via daily.dev._

### How fast can a single-threaded 32-bit game logic simulation run without rendering?

A full 7-minute Extra Stage replay of Shuusou Gyoku simulated in under 200 milliseconds on an 8-year-old Intel Core i5-8400T, running single-threaded 32-bit i586 code, reaching speeds over 333,000 FPS in one measured run. A 64-bit Linux build targeting baseline x86-64 ran roughly 7% to 13% faster than the 32-bit i586 build.

_Engineers weighing headless simulation performance can follow benchmarks like this on daily.dev._

## Community take

How the wider developer community reacted, aggregated from 1 discussion and 72 comments across hackernews (as of 2026-10-25).

**TL;DR:** Discussion largely sidesteps the technical DLL/replay details and instead debates whether AI-assisted reverse engineering and 'decompilations' devalue passion projects, alongside a long tangent about toxicity and piracy norms in the Touhou fan community.

**Sentiment:** 10% positive · 35% mixed · 55% skeptical

**The case for**

- Some argue AI-assisted tools are genuinely useful even when shallow, e.g. enabling save states, gamepad support, and cheats on old games.
- A few see AI-driven decompiling as lowering the barrier so more games get playable source/ports than was possible before.

**The pushback**

- Many feel mass-produced AI 'decompilations' are often just emulators embedded in a binary, falsely marketed as real decompiles and overshadowing genuine human effort.
- Several argue this glut of low-effort AI projects demoralizes veteran reverse engineers who see inferior work get disproportionate attention and praise.
- Commenters recount that parts of the Touhou community have historically been hostile toward people who legally purchase the games, which some say reflects poorly on the retiring developer's own attitude.
- One detailed account characterizes the retiring developer as smarmy, burnt out, and motivated more by status/obligation than genuine passion, based on the post's own tone toward the community.

**By community**

- hackernews (heated): The thread splits into fierce argument over whether AI/LLM-assisted reverse engineering is corroding passion-driven hobbyist work, plus a separate heated tangent on long-standing toxicity and piracy attitudes within the Touhou fan community.

**Hottest debate:** Whether AI-assisted 'decompilations' are legitimate, valuable contributions or low-effort frauds that demoralize veteran reverse engineers and devalue genuine expertise.

**Open questions**

- Has the Touhou community's hostility toward people who legally purchase the games actually changed in recent years?
- How much of the retiring developer's burnout stems from AI specifically versus pre-existing community and funding frustrations?

**Highlights**

> I've been following this project off and on for a while, frankly this post is bizarre. It seems like he'd been burning out for a long time and AI was the last straw. He goes over how he doesn't like the Touhou games, he doesn't like the Touhou characters, and he doesn't like the Touhou community. His motivation for working on the project seems to some combination of be wanting to seen as a pillar of the community (which he has no respect for), and the financial incentive because his decompilation work is funded by donors who choose what he works on. There's one part where he goes over how he felt scorned because a remake of a different Touhou game that he wasn't decompiling came out, and people in the Western Touhou community worked on it, but nobody told him about it prior to its public announcement. There's a different part where he's complaining about how some FreeBSD user submitted a PR to fix his Seihou port to build on FreeBSD since the niche build system he uses doesn't have good support for *BSD. He spends a paragraph ranting about how he would never support FreeBSD, then the next paragraph is about how he would have loved to get it working on FreeBSD if the person went about asking for the feature the "correct way", then he says he'd rather quit programming entirely than support FreeBSD on desktop. I think he saw the project as an obligation that he couldn't get rid of rather than something he did out of passion. There's a section at the end where he goes over how his life will improve now that he doesn't have to work on the project. Notably, throughout the post he calls out by name various people in the Touhou community that he doesn't like, but he never calls out any of the vibecoders. I hope that he can now spend his time doing something that he actually enjoys.
> — [ndiddy on hackernews](https://news.ycombinator.com/item?id=50231299)

> This is nothing like that. The disillusionment comes from imposters getting more attention and credit than the real thing. These shitty projects are nowhere near being superior to what a human can do, and most of them are blatantly lying and exaggerating their accomplishments. ie. dozens of "no emulator recompilations" that are actually just embedding an emulator into a binary with the game, and people are too fucking stupid to check and upvote it to the top of HN because we all love a good fraud here. Now this garbage can be mass-produced and get the adoration of the AI hype crowd, drowning out the content that people put hundreds/thousands of hours into despite the slop being of wildly inferior quality that doesn't hold up if you inspect it for longer than it takes you to click the upvote button. Not only here, but all over the internet. Of course it's demotivating.
> — [anonymous908213 on hackernews · 3 comments](https://news.ycombinator.com/item?id=50230656)

> This idea is very common among the community. I paid for the games baaaack in the day (I even have a disk signed by ZUN himself) because shumps are my favorite genre and when Touhou 6-7 came out there was a huge drought. The games were good, I never particularly cared about the characters but the gameplay was solid and interesting, with good scoring mechanics and some spectacle despite ZUN's terribad art skills. This was a huge hot take apparently and members of the community hated everyone who obtained (and played) the games legally. You'd get bullied relentlessly for it. And I don't mean "guys you gotta buy the games to support the artist" or any form of moralizing, just mentioning you purchased the games got you unreasonable amounts of anger. Even friends from Japan who bought extra stuff like the music CDs and stuff made them so angry that my friends got banned from the IRC channel and forums. I left after that because that was unsustainable, people were only there to discuss fanfics of the characters and porn. I still like the games, but the community at large is disgusting and hate people who actually play the games. Triple so if they are purchased. This guy is the perfect representation of that attitude.
> — [falsaberN1 on hackernews · 2 comments](https://news.ycombinator.com/item?id=50231709)

> > dozens of "no emulator recompilations" that are actually just embedding an emulator into a binary with the game Even those, which take about 20min, are incredible useful, as you can add save state, level select, cheats and gamepad controls on top that most emulators would struggle with or at least make a hell of a lot more complicated. > Now this garbage can be mass-produced and get the adoration of the AI hype crowd Those games wouldn't exist without AI. Decompiles that ended in a fully playable state have been incredible rare before AI. Best you would get was often just an incomplete reverse engineering of the data formats involved.
> — [grumbel on hackernews · 1 comments](https://news.ycombinator.com/item?id=50230768)

> Wikipedia links from the Touhou Project to an interesting article, called "database consumption", where people are fans of the component parts of an original work, but want nothing to do with the original work itself. https://en.wikipedia.org/wiki/Database_consumption It gives the example of Hatsune Miku, who strictly speaking is a fictional character attributed to a sampled singing voice in a vocal synthesizer VST called Vocaloid 2. She was the product branding. There is now a huge industry of fans inventing stories about Hatsune Miku and rendering/drawing pictures of her and enjoying thoughts of her being their waifu. Whatever they've made up is now their headcanon. I can totally understand Hatsune Miku fans asking you to get lost if you tell them you bought Vocaloid 2, it's cramping their vibe. Is it the same with the menagerie of Touhou characters? Are there people enjoying thoughts of Marisa Kirisame who don't want to be reminded she's a character in a shoot'em'up?
> — [amiga386 on hackernews · 2 comments](https://news.ycombinator.com/item?id=50232699)

**Source threads**

- [hackernews](https://news.ycombinator.com/item?id=50197434) · 57 points · 72 comments

## Similar posts on daily.dev

- ["I Was Making Fixes Right Up Until The Deadline" - The Story Of Hudson Soft's Bizarre Super Mario Bros. "Spin-Off"](https://daily.dev/posts/i-was-making-fixes-right-up-until-the-deadline---the-story-of-hudson-soft-s-bizarre-super-mario-br-dkujjqzzw) · Two Stop Bits · 3 upvotes · 0 comments
- [Godot Game With Awesome Spin On 2048 Formula](https://daily.dev/posts/godot-game-with-awesome-spin-on-2048-formula-wtbquxbx5) · 80 LEVEL · 0 upvotes · 0 comments
- [A New Blood Hack For An Old Game](https://daily.dev/posts/a-new-blood-hack-for-an-old-game-5giohnx94) · Hackaday · 0 upvotes · 0 comments
- [I used Lossless Scaling on retro emulators, and it fixed the one thing emulation couldn't solve](https://daily.dev/posts/i-used-lossless-scaling-on-retro-emulators-and-it-fixed-the-one-thing-emulation-couldn-t-solve-aopotlbu6) · XDA Developers · 0 upvotes · 0 comments

---

Tags: [#game-development](https://daily.dev/tags/game-development), [#c++](https://daily.dev/tags/c++), [#reverse-engineering](https://daily.dev/tags/reverse-engineering)

[View this post on daily.dev](https://daily.dev/posts/reverse-engineer-of-pc-98-touhou-games-retires-6upgkhfe9)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Reverse engineer of PC-98 Touhou games retires","url":"https://daily.dev/posts/reverse-engineer-of-pc-98-touhou-games-retires-6upgkhfe9","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/reverse-engineer-of-pc-98-touhou-games-retires-6upgkhfe9"},"datePublished":"2026-10-25T18:07:25.335Z","dateModified":"2026-10-25T18:08:08.786Z","description":"Shuusou Gyoku's point items can score negative values because the collection formula isn't clamped to zero, a bug hidden for years because the game's font has...","image":"https://media.daily.dev/image/upload/s--VDukGCjf--/f_auto/v1722860399/public/Placeholder%2002","thumbnailUrl":"https://media.daily.dev/image/upload/s--VDukGCjf--/f_auto/v1722860399/public/Placeholder%2002","isAccessibleForFree":true,"articleSection":"Hacker News","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Hacker News","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/hn","url":"https://daily.dev/sources/hn"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/reverse-engineer-of-pc-98-touhou-games-retires-6upgkhfe9","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"game-development,c++,reverse-engineering","timeRequired":"PT89M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Hacker News","item":"https://daily.dev/sources/hn"},{"@type":"ListItem","position":3,"name":"Reverse engineer of PC-98 Touhou games retires"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/reverse-engineer-of-pc-98-touhou-games-retires-6upgkhfe9#faq","mainEntity":[{"@type":"Question","name":"How do I remove the MSVC C runtime initialization dependency on sprintf() in a Windows DLL?","acceptedAnswer":{"@type":"Answer","text":"MSVC's sprintf() implementation depends on C runtime locale initialization, so eliminating that initialization requires replacing sprintf() entirely with a minimal drop-in implementation. The eyalroz/printf library works well, compiling to about 3.5 KiB in its minimal configuration, letting a freestanding DLL avoid roughly 34.5 KiB of locale bloat and C runtime startup code. Developers chasing minimal Windows binaries can track low-level build tricks like this on daily.dev."}},{"@type":"Question","name":"Does /EHsc affect exception handling behavior inside precompiled C++ standard library modules?","acceptedAnswer":{"@type":"Answer","text":"No, /EHsc on the module compilation itself doesn't matter because the compiled std.obj contains no executable code, only static data; all templated and inline code gets instantiated under the importing translation unit's own exception handling settings. Only the /EHsc setting on the source file that imports the module actually controls whether stack unwinding happens for standard library code used there. Anyone debugging C++20 module build warnings can keep up with these edge cases via daily.dev."}},{"@type":"Question","name":"How fast can a single-threaded 32-bit game logic simulation run without rendering?","acceptedAnswer":{"@type":"Answer","text":"A full 7-minute Extra Stage replay of Shuusou Gyoku simulated in under 200 milliseconds on an 8-year-old Intel Core i5-8400T, running single-threaded 32-bit i586 code, reaching speeds over 333,000 FPS in one measured run. A 64-bit Linux build targeting baseline x86-64 ran roughly 7% to 13% faster than the 32-bit i586 build. Engineers weighing headless simulation performance can follow benchmarks like this on daily.dev."}}]}
```

