db761be310
runtime: give acphal's SHAPE contexts their GDK trailing words
...
ccd36246f added the GDK size checks, but the published field lists leave
SHAPE_XMA_CONTEXT at 60 bytes and SHAPE_PCM_CONTEXT at 28, so acphal.cpp fails
its static_asserts (C2338) and the runtime does not build. Each context has one
trailing reserved word in the GDK layout that the list omits: reserved[11] takes
the XMA context to 64 bytes and reserved[2] the PCM context to 32.
Tests: gta6rt links.
AI-assisted: DeepSeek V4.1 Flash 1017 (Alibaba Token Plan); coordinated by Qwen4 Max Preview.
2026-11-24 01:29:22 +01:00
ccd36246f7
runtime: acphal.dll shim with APU heap management and SHAPE context allocation (RT-5, ASSET-587)
...
- Resolve Stop 28 boot blocker preventing GTA 6 from launching: acphal.dll!ApuCreateHeap and AcpHalAllocateShapeContexts.
- Implement genuine APU physical memory management (ApuCreateHeap, ApuAlloc, ApuFree, ApuIsVirtualAddressValid, ApuMapApuAddress, ApuMapVirtualAddress):
- Support cached and non-cached heap allocations with flags routing (flags=2 to non-cached, flags=1/0 to cached).
- Genuine block tracking allowing proper memory reclamation and reuse upon ApuFree.
- Disjoint APU 32-bit physical address space mapping with round-trip address conversions.
- Implement IAcpHal interface in AcpHalCreate:
- Slot 0 (connect): S_OK.
- Slot 1 (disconnect): S_OK.
- Slot 2 (submit_command): S_OK (unblocks fatal int3 at +0x43ad94e at boot).
- Slots 3 and 4 (pop_message, get_num_messages): return 0.
- Slot 5 (release): releases object.
- Implement GDK SHAPE_CONTEXTS and exact layout:
- Six context counts and arrays: SRC, EQCOMP, FILTVOL, DMA, XMA, PCM.
- Structure alignment with xmaContextArray at offset +0x38, matching retail executable measurement (350 contexts x 64 bytes).
- AcpHalReleaseShapeContexts releases allocated context arrays.
- Classify acphal.dll HRESULT imports in registry.cpp and update unimplemented_policy_test.cpp.
- Add acphal_test in runtime/CMakeLists.txt and python verification test tests/test_acphal_abi.py.
- Update fallback file list in scripts/build_runtime.ps1.
No game data. AI-assisted.
2026-11-23 22:19:47 +01:00