mirror of
https://github.com/ProjectLeonida/mandy.git
synced 2026-12-06 21:18:38 +00:00
Every GDK title calls XGameRuntimeInitialize first and builds its async work on XTaskQueue/XAsync. Add an xgameruntime.dll shim table for those, ahead of the executable: XGameRuntimeInitialize/Uninitialize (reference counted), XSystemGetDeviceType (Series X; LEONIDA_DEVICE_TYPE overrides) and XSystemGetConsoleId (placeholder), plus the 23 XTaskQueue/XAsync functions. XTaskQueue/XAsync come from microsoft/libHttpClient (MIT), copied unmodified into third_party/xtaskqueue (task queue only, no HTTP stack); a small pch.h stand-in lets them build alone. xgameruntime_test drives the table through the shim registry the way a title boots. Nothing goes online.
113 lines
6.4 KiB
Markdown
113 lines
6.4 KiB
Markdown
# Related projects and prior art
|
|
|
|
Leonida is **GPL-3.0-or-later**. Some useful reverse-engineering work lives under other licences, and some of it
|
|
cannot be mixed with this repository. This page records what we may learn from each project and where the line is.
|
|
|
|
The rule is the same for every entry: **facts are fine; code is not.** A format layout, an ABI observation or a
|
|
measured behaviour can be reimplemented independently. The source that expressed it cannot be copied.
|
|
|
|
## rpatty-dev/PercyStar
|
|
|
|
<https://github.com/rpatty-dev/PercyStar>
|
|
|
|
A source-available Rust explorer for RPF9/TTPF, with an RDNA2 disassembler, texture decoders and an `ADAT` Opus audio
|
|
decoder. Its format observations are relevant to the archive, texture and audio work here.
|
|
|
|
**Licence:** the "PercyStar Non-Commercial Attribution & Copyleft License (v1.2)". It is source-available, says
|
|
"All rights reserved", and adds non-commercial, attribution, naming and share-alike conditions. It is not
|
|
GPL-compatible, so **no PercyStar code, comments or tables may be copied into Leonida**.
|
|
|
|
**What we use it for:** reading about format facts, then implementing them independently. If a fact is useful,
|
|
record the observation in our own words, cite the project and verify it against the package or a public
|
|
specification. Do not paste even a small function "to save time".
|
|
|
|
## realdody/americas-recomp
|
|
|
|
<https://github.com/realdody/americas-recomp>
|
|
|
|
A **GPL-2.0-only** fork of [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5), on its `xbox-series` branch. It
|
|
recompiles the same Xbox Series shaders and has run the package's DLLs against a PC D3D12 device behind an Xbox-ABI
|
|
proxy.
|
|
|
|
**Licence:** GPL-2.0-only is **incompatible with GPL-3.0-or-later**. GPLv2-only code cannot be combined into a
|
|
GPLv3 work, so **no code may be copied**, and there is no "just this one file" exception.
|
|
|
|
**What we use it for:** the measured ABI facts only. The useful findings are summarised in
|
|
[d3d12_vulkan.md §7](d3d12_vulkan.md#7-prior-art-and-measured-xbox-abi): the Xbox device entry point, the slot
|
|
deviations, the descriptor-heap start-handle return convention, the root-signature flag word and the BVH builder's
|
|
compute-pipeline path. Those are observations to verify, not code to port. The document paraphrases them; no code or
|
|
long passages are copied.
|
|
|
|
## breadbbbb/rpf9-explorer
|
|
|
|
<https://github.com/breadbbbb/rpf9-explorer>
|
|
|
|
A Windows viewer for RPF archives, and the source of the Core library behind `tools/rpf9dump` (models, textures,
|
|
TTPF pools and AWC audio). It is a `third_party` **submodule**, not code copied into this repository.
|
|
|
|
**Licence:** the repository has **no licence file** (GitHub reports no licence), so all rights are reserved by
|
|
default. A submodule is an external dependency; it is not a grant to copy its code. Do not paste its functions,
|
|
tables or comments into Leonida. If a format fact learned from it is useful, verify it against the package and
|
|
write our own implementation. The model-recovery gap measured in [models.md](models.md) is in that submodule; the
|
|
fix should go upstream, not into a copy.
|
|
|
|
## p-portela/SCARAB
|
|
|
|
<https://github.com/p-portela/SCARAB>
|
|
|
|
A GPL-3.0 "Scarlett Compatibility And Runtime API Bridge" that forwards the console D3D12 runtime to PC D3D12 (and
|
|
to vkd3d-proton on Linux). It carries a measured catalogue of the console `d3d12_xs.dll` export surface, standard
|
|
and console-only IIDs, extension interfaces, command-list interception and presentation entry points.
|
|
|
|
**Licence:** GPL-3.0. That is compatible with this project's GPL-3.0-or-later for study, and adapted code can be
|
|
used with attribution and the original licence notice, unlike the two projects above. Even so, **facts first**:
|
|
verify a claim against SCARAB's code and, where possible, this package; write the implementation in our style; and
|
|
say in the pull request which file a borrowed fact came from. Do not copy a whole component just because the
|
|
licence allows it.
|
|
|
|
**What we use it for:** the measured console runtime surface (see `docs/d3d12_xs_surface.md` when that study
|
|
lands), the IID/extension tables, and the call-sequence observations that Leonida's own
|
|
[d3d12_vulkan.md §7](d3d12_vulkan.md#7-prior-art-and-measured-xbox-abi) still lists as unknown. SCARAB forwards to
|
|
D3D12; Leonida translates to Vulkan. The ABI facts carry over, the forwarding architecture does not.
|
|
|
|
## microsoft/libHttpClient
|
|
|
|
<https://github.com/microsoft/libHttpClient>
|
|
|
|
Microsoft's HTTP/WebSocket library for GDK titles. Its `Source/Task` folder is the implementation of the GDK's
|
|
`XTaskQueue` and `XAsync`.
|
|
|
|
**Licence:** MIT, which is compatible with GPL-3.0-or-later.
|
|
|
|
**What we use:** the task queue's headers and Win32 sources, copied unmodified into `third_party/xtaskqueue` (commit
|
|
and file list in its README) with the licence file. `runtime/shims/xgameruntime.cpp` registers those functions as
|
|
`xgameruntime.dll` imports. The HTTP and WebSocket stack is not included. Unlike the projects above, this is code
|
|
use under a compatible licence, so the MIT notice must stay with the files.
|
|
|
|
## The line
|
|
|
|
| Fine | Not fine |
|
|
|---|---|
|
|
| A format layout, field offset or enum value | Copying the function that parses it |
|
|
| An ABI measurement (slot number, return register, flag word) | Copying the proxy, thunk or struct definitions |
|
|
| A behaviour observed by running a tool | Copying comments, identifiers or test code |
|
|
| A public specification or vendor documentation | A line-by-line port, a translated port, or a "cleaned up" copy |
|
|
| A table of facts you rebuilt from your own observations | A table copied from the source, even with renamed columns |
|
|
|
|
A table of constants is still expression. Rebuild it from your own measurements or a public specification. A
|
|
struct definition is still expression even if the field names are changed. If the only way to use a fact is to
|
|
copy the surrounding code, stop and find the fact another way.
|
|
|
|
When in doubt:
|
|
|
|
1. Write down the fact, not the code.
|
|
2. Cite the project and the section or file where you read it.
|
|
3. Verify the fact against the game package, a public specification or a test of your own.
|
|
4. Implement it independently, in this repository's style.
|
|
|
|
Never paste code from either project into a pull request, an issue, a commit message or a chat log that becomes
|
|
part of the repository history. If a contribution was written while looking at incompatible source, say so in the
|
|
pull request so the provenance can be checked.
|
|
|
|
Other dependencies keep their own licences; see the Credits and License sections of [README.md](../README.md).
|