aorecomp

Anarchy Online classic in the browser

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


client/vendor/ace/README.md (2476B)


ACE source for Linux

source/ contains 9,770 mechanically translated functions from the AO vendor library, with dispatch metadata, 847 exception-handler mappings and non-code data initializers. The generated C preserves the 32-bit guest ABI and object layouts. It is editable source; normal builds must not regenerate it.

The input is client-standalone-14.9.1/ace.dll, SHA-256 a1a0d96a5ff605f6611b8584204dad855914b1cbeedc0389f3a68279e015c22d. Its exports report ACE 5.0.14 and compiler 6.0.0. The translation uses guest base 0x47000000 and pcrecomp revision 904ac3129d0c9d05efbeec19a1dce6abbe7f5d26. translation.json records the pipeline hash and zero unsupported instructions. All 101 generated source/header files reproduce byte-for-byte in a second fresh generation.

data-audit.json records 10,309 bytes of identified executable-section data, including switch tables, and zero unresolved references. Those bytes are data, not an executable fallback. The two overlapping byte-table classifications were checked against REA assembly; see the ACE analysis.

Generate a fresh staging tree with the repository Python environment:

$env:PYTHONPATH='C:/path/to/ao/venv/Lib/site-packages'
& 'python3' tools/reconstruction/generate_ace.py

This uses the shared generate_vendor.py pipeline and writes tools/reconstruction/work/linux-ace/src. It refuses to overwrite an existing staging source directory. Review changes before copying generated files into this source tree. The original DLL is needed only for generation and native differential tests, never as a Linux runtime dependency.

Translation success is not full runtime validation. ACE's Windows imports must be implemented through the platform facade, including synchronization, threading and networking. Unsupported calls remain explicit failures.

tools/reconstruction/test_ace_token.py compares the real Windows DLL with this translated C on native x86-64 Linux. It passes 4,864 snapshots (digest 4cecc1c5): 256 token lifecycles, recursion depths 1-16, null/zero deadlines, object state, stack balance, preserved registers and guest exception chains. Opaque handles and thread IDs are normalized. Linux uses the production critical-section and thread-ID adapters. This checks uncontended token paths, not multiple guest threads, semaphore waits or full ACE initialization. The Linux half also runs through make -f Makefile.linux test.