ReC98/Research
nmlgc b8ca607c38 [Decompilation] [th02] Get zun_res1.c right
4½ years after aa56a7c, it turns out that the correct decompilation
involves… no-ops generated by assigning variables that just happen to
be in registers to themselves?! Which does get optimized out, but only
after TCC folded identical tail code in all branches of a function,
thus effectively functioning as an optimization barrier.

The initial attempt used register pseudovariables, but this definitely
is the best possible way this could work – portable, and doesn't
unnecessarily shred the code into tiny inlined functions pieces. The
mindblowing thing here is that ZUN could have actually written this to
have additional, albeit unnecessary, lines to place breakpoints on. But
that means he must have chosen those two local variables in SI and DI
completely by chance… 🤯

The best thing though? ~#pragma inline is gone~

Part of P0076, funded by [Anonymous] and -Tom-.
2020-02-23 17:12:35 +01:00
..
Borland C++ decompilation.md [Decompilation] [th02] Get zun_res1.c right 2020-02-23 17:12:35 +01:00
HOLDKEY.C [Research] Find out why ≥TH03 checks input twice per frame, with a 0.6ms delay 2018-09-13 18:32:24 +02:00
Makefile.mak [Research] Find out why ≥TH03 checks input twice per frame, with a 0.6ms delay 2018-09-13 18:32:24 +02:00
README.md [Research] Find out why ≥TH03 checks input twice per frame, with a 0.6ms delay 2018-09-13 18:32:24 +02:00

README.md

This directory collects various pieces of research into PC-98 hardware details that were made during the reverse-engineering phase, in order for us to better understand certain details and name functions/data more adequately.

Run maker to build the examples. The executables will be directly placed into this directory.