diff options
| author | Kam471 <115741199+Kam471@users.noreply.github.com> | 2026-11-21 17:09:33 +0000 |
|---|---|---|
| committer | Kam471 <115741199+Kam471@users.noreply.github.com> | 2026-11-21 17:23:05 +0000 |
| commit | 34d2e63c65e66bd70fbd2766fb48a3a9cb57e651 (patch) | |
| tree | c593a200e986799a40ac7a3e9fa0a64d23b3e4af /docs | |
| parent | 718b714871e07ea1aa156095d45a0c8f9ff4794e (diff) | |
Runtime: match the measured Xbox xmem/d3d12_xs ABI
- xmem: XMemVirtualQuery(process, address, out64) fills the known MEMORY_BASIC_INFORMATION prefix and zeroes the rest; the working-set size goes at +8 with a TRUE return; allocator alignment and size-0 behaviour are documented.
- d3d12_xs: copy root-signature descriptors and clear the Xbox high flag byte (0x03000000) before forwarding to the PC serializer; add the legacy serializer; keep the deserializer.
- d3d12_xs: add D3D12XboxCreateDevice, create a PC device and log the 24-word params block. The Xbox ABI proxy is not implemented; measured slot overrides are documented as TODO and logged at runtime.
- test: root_sig_test serializes synthetic flags=0x03000000 descriptors through the PC d3d12.dll, checks the untouched copy is rejected and the cleared copy is accepted, and exercises the registered shim.
Clean-room: implemented from an ABI-facts spec derived from public write-ups; no source from americas-recomp or AnyPS5 was read or copied.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/design.md | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/docs/design.md b/docs/design.md index ea80212f9..188046cc6 100644 --- a/docs/design.md +++ b/docs/design.md | |||
| @@ -120,9 +120,11 @@ Full-scan indexes are also saved to `%LOCALAPPDATA%\RpfPreview\Indexes`, so the | |||
| 120 | - `tools\hashdict.py`: joaat hash→name dictionary (`<work>\hashes.json`, 1.9M entries, checked against | 120 | - `tools\hashdict.py`: joaat hash→name dictionary (`<work>\hashes.json`, 1.9M entries, checked against |
| 121 | `adder` = 0xB779A091). On day one, rerun with `--extra <exe>` so PSO field and type names resolve. Without the exe | 121 | `adder` = 0xB779A091). On day one, rerun with `--extra <exe>` so PSO field and type names resolve. Without the exe |
| 122 | only about 1% do. | 122 | only about 1% do. |
| 123 | - Runtime shims: all of `xmem.dll` is shimmed (`XMemAlloc`, `XMemFree`, `XMemVirtualQuery`, | 123 | - Runtime shims: all of `xmem.dll` is shimmed with the measured argument shapes (`XMemAlloc`, `XMemFree`, |
| 124 | `XMemGetWorkingSetStatistics`). The only imports the bundled DLLs still can't bind are two `d3d12_xs` | 124 | `XMemVirtualQuery(process, address, out64)`, `XMemGetWorkingSetStatistics(out)`). The `d3d12_xs` root-signature |
| 125 | root-signature calls. | 125 | serializer forwards to the PC `d3d12.dll` after clearing the Xbox flag byte; the deserializer forwards unchanged. |
| 126 | `D3D12XboxCreateDevice` returns a PC device; the Xbox-ABI proxy for its measured slot overrides is not implemented | ||
| 127 | yet. | ||
| 126 | - PSO metadata is a new variant (`PSIN`, `LSCH` schema, `LENM`, `LSNS`, `LGID`, `LRSC`, `CHKS`, little-endian). | 128 | - PSO metadata is a new variant (`PSIN`, `LSCH` schema, `LENM`, `LSNS`, `LGID`, `LRSC`, `CHKS`, little-endian). |
| 127 | CodeWalker's parser reads the container but not the new schema; dump it once the exe gives the field names. | 129 | CodeWalker's parser reads the container but not the new schema; dump it once the exe gives the field names. |
| 128 | 130 | ||
| @@ -266,6 +268,6 @@ gfx1030 and 283 clean for gfx1010–1012. | |||
| 266 | `python -I tools\manifest.py verify <game>` to check a copy against it. | 268 | `python -I tools\manifest.py verify <game>` to check a copy against it. |
| 267 | - `reports/rpf_probe.json`: all 22 archives are **RPF9**. Five have tables that look packed or encrypted (`levels`, | 269 | - `reports/rpf_probe.json`: all 22 archives are **RPF9**. Five have tables that look packed or encrypted (`levels`, |
| 268 | `movies`, `core_bvh4`, `navmeshes`, `data`). | 270 | `movies`, `core_bvh4`, `navmeshes`, `data`). |
| 269 | - `reports/pe/`: the 16 bundled DLLs are plain x86-64 PE with no encrypted sections. Through the loader they need | 271 | - `reports/pe/`: the 16 bundled DLLs are plain x86-64 PE with no encrypted sections. Through the loader their |
| 270 | only `xmem.dll` (`XMemAlloc` and `XMemFree` are shimmed; `XMemVirtualQuery` and `XMemGetWorkingSetStatistics` aren't | 272 | `xmem.dll` imports and two `d3d12_xs.dll` root-signature calls bind to shims. Every other import resolves on |
| 271 | yet) and two `d3d12_xs.dll` root-signature calls. Every other import resolves on desktop Windows. | 273 | desktop Windows. The `D3D12XboxCreateDevice` slot layout beyond the measured entries remains unknown. |