← Awesome REA

Touhou TH04 / PC-98 / REA / N0zoM1z0 / EN

Recover a bullet-ring calculation from 16-bit code

ENGLISH SUMMARY

Recover a bullet-ring calculation from 16-bit code

Inspect a PC-98 game's angle helper and connect its arithmetic to a readable C++ reconstruction of fixed and aimed bullet rings.

The question

How does the bullet ring choose an aiming angle from the player's position?

The workflow

  1. Inspect the original DOS program's 16-bit function.
  2. Map coordinates, multiplication, and division to C++.
  3. Check the reconstruction against historical compiler output.

Findings & output

The official case presents the recovered angle calculation and links a public reconstruction repository.

Evidence scope

This entry concerns an angle helper, without extending the result to a fully verified reconstruction of the whole game.

中文摘要

从 16 位指令,恢复弹幕瞄准计算

检查 PC-98 游戏的角度计算,把乘除法与坐标运算整理成 C++,理解固定与瞄准弹幕的生成规则。

调查的问题

弹幕环怎样根据玩家坐标确定瞄准角度?

怎么做的

  1. 分析原始 DOS 程序的 16 位函数。
  2. 把坐标、乘法与除法对应到 C++。
  3. 结合历史编译器输出检查重建。

发现与产出

官方案例展示了恢复的角度算法,并链接公开重建仓库。

证据范围

此条关注角度辅助函数;不把局部重建结论推广为整款游戏都已验证。

Original sources / 原始来源

Checked / 核对 2026-10-12 · Public code / 有公开代码