diff --git a/runtime/README.md b/runtime/README.md index fadaa47ef..c99411660 100644 --- a/runtime/README.md +++ b/runtime/README.md @@ -114,12 +114,14 @@ folder that Windows refuses to load stops the run with the error code. Unset or loaded for the process lifetime. Only static imports go through this step; a run-time `LoadLibrary` of the same name does not yet. -It exists for drop-in implementations of console DLLs that have no shim here, such as the `AcpHal`, `chad`, `xapu` -and `XCRDAPI` crates of [omonkeyz/xbox-emulator](https://github.com/omonkeyz/xbox-emulator) (GPL-3.0-or-later). -Measured on the 1.0.2.1 executable at `867d922`: without the folder, `--dry-run` leaves 20 imports unimplemented -(AcpHal 9, chad 5, xapu 5, XCRDAPI 1); with those four DLLs built from `f89e410`, it leaves 0, with the four -package DLLs still mapped (`module=72`). Those DLLs run static initializers when Windows loads them, and with the -defaults one of them hooks the process: the package DLLs mapped after it then fail to map. With +It exists for drop-in implementations of console DLLs, such as the `AcpHal`, `chad`, `xapu` and `XCRDAPI` crates +of [omonkeyz/xbox-emulator](https://github.com/omonkeyz/xbox-emulator) (GPL-3.0-or-later). All four modules now +have a shim here as well (`shims/acphal.cpp`, `shims/xapu_queue.cpp` for `xapu.dll`, `shims/xapu_chad.cpp` for +`chad.dll`, and `shims/dstorage.cpp` for `xcrdapi.dll`); a DLL in the folder replaces its module's shim, as above. +Measured on the 1.0.2.1 executable at `867d922`, before those shims: without the folder, `--dry-run` leaves 20 +imports unimplemented (AcpHal 9, chad 5, xapu 5, XCRDAPI 1); with those four DLLs built from `f89e410`, it leaves 0, +with the four package DLLs still mapped (`module=72`). Those DLLs run static initializers when Windows loads them, +and with the defaults one of them hooks the process: the package DLLs mapped after it then fail to map. With `TOMBOX_GDK_EARLY=0 TOMBOX_GDK_RUNTIME=0 TOMBOX_OSHOST=0 TOMBOX_PAD=0 TOMBOX_TIMER_1MS=0` they map; their network guard stays on and denies all traffic. `loader_test` covers the step with a synthetic DLL (no game data). @@ -275,7 +277,11 @@ Current limits, by design: (`shims/dstorage.cpp`, declarations in `shims/dstorage_xs_abi.h`). Files open through the `GAME:` mapping and the overlay; each queue reads file or memory ranges into memory in order on its own worker thread, inflating zlib requests (RFC 1950, `src/shader_library.h`'s inflater), and reports through status arrays, `ID3D12Fence` signals - and events. BCPack, swizzle and physical-page requests are not done yet. + and events. BCPack requests are decoded by `src/bcpack.cpp` (BC1, BC3, BC4, BC5, BC6H and BC7; BC2 requests fail + with `E_NOTIMPL` because no decoder is available yet), followed by the optional macro-unshuffle (swizzle), and + physical page numbers resolve through `xmem` when the request runs. These paths are on by default; with + `LEONIDA_DSTORAGE_EXTENDED=0`, requests that use BCPack, swizzle or physical page lists fail with `E_NOTIMPL` + when the queue processes them. See [docs/directstorage.md](../docs/directstorage.md) for the ABI evidence and what is unverified. - `gameinput.dll` / `xgameruntime.dll` — `GameInputCreate`: the v0 GameInput API for gamepads on SDL3