upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/runtime/shims/registry.cpp
diff options
context:
space:
mode:
authorTortoche <corentinjanin31@gmail.com>2026-11-23 22:19:47 +0100
committerTortoche <corentinjanin31@gmail.com>2026-11-23 22:19:47 +0100
commitccd36246f7f50dc6a5f1f30ff76418d570f12fa2 (patch)
treee848016ed4bf9f6de308faa16f84a50f6a681e6e /runtime/shims/registry.cpp
parent5d74c272363f2703265d44e6aaab1a1df8ddfaf3 (diff)
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.
Diffstat (limited to 'runtime/shims/registry.cpp')
-rw-r--r--runtime/shims/registry.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/runtime/shims/registry.cpp b/runtime/shims/registry.cpp
index 1b0da8ca9..9b3ea0437 100644
--- a/runtime/shims/registry.cpp
+++ b/runtime/shims/registry.cpp
@@ -113,6 +113,11 @@ ReturnClass classify(const std::string& dll, const std::string& name) {
113 if (name == "GameInputCreate") return ReturnClass::HResult; 113 if (name == "GameInputCreate") return ReturnClass::HResult;
114 } else if (dll == "dstorage.dll" || dll == "dstorage_xs.dll") { 114 } else if (dll == "dstorage.dll" || dll == "dstorage_xs.dll") {
115 if (name == "DStorageGetFactory") return ReturnClass::HResult; 115 if (name == "DStorageGetFactory") return ReturnClass::HResult;
116 } else if (dll == "acphal.dll") {
117 if (name == "AcpHalAllocateShapeContexts" || name == "AcpHalCreate" ||
118 name == "AcpHalReleaseShapeContexts" || name == "ApuAlloc" ||
119 name == "ApuCreateHeap")
120 return ReturnClass::HResult;
116 } else if (dll == "xgameruntime.dll") { 121 } else if (dll == "xgameruntime.dll") {
117 if (name == "XGameRuntimeInitialize" || name == "XGameEventWrite") return ReturnClass::HResult; 122 if (name == "XGameRuntimeInitialize" || name == "XGameEventWrite") return ReturnClass::HResult;
118 for (const char* n : kNotHResult) 123 for (const char* n : kNotHResult)