aorecomp

Anarchy Online classic in the browser

git clone https://aorecomp.ubeagle.com/code/aorecomp.git


commit c6d40758ef2a7fda93821eabdaf5f74eb7f2bac4
parent ad50b598549e4e8b23c7c110136eabeae1d94f4d
Author: anon <anon@example.com>
Date:   Tue, 13 Oct 2026 09:46:07 +0000

Run input frame callback with a shared CRT environment

Diffstat:
Mdocs/browser-porting.md | 12++++++++++++
1 file changed, 12 insertions(+), 0 deletions(-)

diff --git a/docs/browser-porting.md b/docs/browser-porting.md @@ -945,6 +945,18 @@ buffer pointer. It clears the pending length and alternates between two 256-byte buffers at instance offsets +0x38 and +0x138. The callback thunk has no stack arguments and requires its own translation entry (REA method evidence `ev_9e632923750b63053982d0eb4c44300eecc5ade744b5f57308f8e9b4413b6ed8`). +CCR exports another no-argument cdecl frame callback at RVA `0x62c0`, +InputConverterModule_t::FramePreProcess. It obtains InputConfig_t through +its singleton getter at `0x3550` and calls the instance FramePreProcess +method at `0x4a00`. The scheduler invokes the callback indirectly, so the +export also needs a translation entry +(REA evidence `ev_dd3c4e18efbc35bee085b5fbf259a855dd873dcca1a0ac0712ba1c6176ae5945`). +CCR's input frame path also reaches the MSVCRT getenv import. On Windows, +names compare without regard to ASCII case and the result points into the +CRT-owned environment storage. Missing names return null. The environment +must exist before DLL initialization, independently of whether __getmainargs +has run; __getmainargs can expose the same zero-terminated pointer table. +See [MSVCRT getenv](https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/getenv-wgetenv). The browser bridge renders in a worker-owned WebGL2 OffscreenCanvas. D3D row vector matrices upload as transposes; clip depth 0..w becomes -w..w. Readback