diff options
| author | NotRexed <therealnothingfn@gmail.com> | 2026-11-27 17:58:38 -0500 |
|---|---|---|
| committer | NotRexed <therealnothingfn@gmail.com> | 2026-11-27 17:58:38 -0500 |
| commit | 00131bb85ee294179e5179b00a2c68f4ea3610b5 (patch) | |
| tree | 11854f35d928e964919b81746360146c3657ce07 /docs | |
| parent | eac96d744c3a899fa6e326e296f387fe11e05eab (diff) | |
main keeps its own runtime, tools and tests; the branch's variants stay on port/d3d12-nvidia
After the merge the tree held this branch's older states of files main maintains. Run against main's code,
tests/test_acphal_abi.py and 11 of the 15 translator tests that differed failed, and the C++ runtime would have
been built from two generations of its sources. So that the merge cannot break what main builds and tests:
- runtime/ is main's, file for file (68 files only this branch had are not carried over);
- every file under tools/, tests/ and docs/ that both sides have is main's (80 files);
- ten translator tests only this branch has, which test rules main's translator does not have, and their
fixtures are left out.
What main gains: d3d12/ (the Rust D3D12 runtime), its launchers and helpers (Launcher.bat, scripts/play*.ps1,
play-linux.sh, port_ctl.py, smooth-motion.ps1, fetch_vkd3d_proton.py, sync_victory.py), mods/example_lua, eleven
notes under docs/, seven tools and the tests that pass with main's code, the README's sections and credits, and
the "Runtime traps" section of AGENTS.md. Everything left out here is on the branch port/d3d12-nvidia.
Checked: compileall; make_game.py --help; check_no_game_data.py over every file this adds to main; the
line-ending, docs-encoding, CI-registration and docs tests; each test file that differs from main, on its own.
Not run: the whole translator suite, the C++ build, cargo over d3d12/ after the merge (d3d12/ is byte for byte the
branch's), CI.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/d3d12_command_objects.md | 7 | ||||
| -rw-r--r-- | docs/i18n/fr/quickstart.md | 4 | ||||
| -rw-r--r-- | docs/mobile.md | 2 | ||||
| -rw-r--r-- | docs/modding.md | 7 | ||||
| -rw-r--r-- | docs/restofworld.md | 29 | ||||
| -rw-r--r-- | docs/story.md | 15 |
6 files changed, 26 insertions, 38 deletions
diff --git a/docs/d3d12_command_objects.md b/docs/d3d12_command_objects.md index 7afd38a5f..eea693c70 100644 --- a/docs/d3d12_command_objects.md +++ b/docs/d3d12_command_objects.md | |||
| @@ -807,13 +807,6 @@ first calls; a wrong slot would therefore be visible as a misnamed call, not a s | |||
| 807 | 807 | ||
| 808 | Queues and fences are wrapped the same way. | 808 | Queues and fences are wrapped the same way. |
| 809 | 809 | ||
| 810 | A device created as `ID3D12Device11`, as the title creates its own, has the console layouts instead: its queues, | ||
| 811 | fences, allocators and lists follow the slot tables in `runtime/shims/d3d12_xs_slots.h`, taken from VIctory | ||
| 812 | (`victory/crates/victory-gpu/src/{device,queue,list,fence}.rs`, which runs the title) and from the measurements on | ||
| 813 | this page, each entry with its source. There the queue methods from slot 14 on are two later than the PC's, the | ||
| 814 | fence has a value address at slot 12, and device slot 12 makes console list proxies. What follows describes the PC | ||
| 815 | layout, which every other device keeps. | ||
| 816 | |||
| 817 | - **What is wrapped.** Device slots 8 (`CreateCommandQueue`), 75 (`CreateCommandQueue1`), 36 | 810 | - **What is wrapped.** Device slots 8 (`CreateCommandQueue`), 75 (`CreateCommandQueue1`), 36 |
| 818 | (`CreateFence`) and 32 (`OpenSharedHandle`, when it opens a fence) return queue and fence proxies. Each | 811 | (`CreateFence`) and 32 (`OpenSharedHandle`, when it opens a fence) return queue and fence proxies. Each |
| 819 | proxy forwards the public chain in PC order: 19 queue slots, and 11 or 12 fence slots, in SDK 10.0.26100. | 812 | proxy forwards the public chain in PC order: 19 queue slots, and 11 or 12 fence slots, in SDK 10.0.26100. |
diff --git a/docs/i18n/fr/quickstart.md b/docs/i18n/fr/quickstart.md index a3bc71e2b..933a74d4e 100644 --- a/docs/i18n/fr/quickstart.md +++ b/docs/i18n/fr/quickstart.md | |||
| @@ -44,7 +44,7 @@ l'[issue #166](https://github.com/ItsNotRexed/Leonida/issues/166). | |||
| 44 | 44 | ||
| 45 | - **Votre propre copie** du paquet Xbox Series, version `1.0.2.1` : le dossier qui contient `MicrosoftGame.Config` et | 45 | - **Votre propre copie** du paquet Xbox Series, version `1.0.2.1` : le dossier qui contient `MicrosoftGame.Config` et |
| 46 | les archives `.rpf`, sous forme de fichiers lisibles sur le disque. | 46 | les archives `.rpf`, sous forme de fichiers lisibles sur le disque. |
| 47 | - **Windows 10/11 x64**, avec environ **400 Go libres** pour les fichiers de travail. Ils peuvent aller sur un autre | 47 | - **Windows 10/11 x64**, avec environ **350 Go libres** pour les fichiers de travail. Ils peuvent aller sur un autre |
| 48 | disque avec `--work`. | 48 | disque avec `--work`. |
| 49 | - [Python 3.12+](https://www.python.org/downloads/) (cochez « Add python.exe to PATH » à l'installation). | 49 | - [Python 3.12+](https://www.python.org/downloads/) (cochez « Add python.exe to PATH » à l'installation). |
| 50 | - [SDK .NET 8](https://dotnet.microsoft.com/download/dotnet/8.0). | 50 | - [SDK .NET 8](https://dotnet.microsoft.com/download/dotnet/8.0). |
| @@ -137,7 +137,7 @@ encore ce cache. | |||
| 137 | - **Ce qui est refait automatiquement** : la compilation enregistre la commande et la version de `llvm-mc`, les | 137 | - **Ce qui est refait automatiquement** : la compilation enregistre la commande et la version de `llvm-mc`, les |
| 138 | sources du traducteur et le décodeur des ressources (`third_party/rpf9-explorer` et `tools/rpf9dump`). Si l'un | 138 | sources du traducteur et le décodeur des ressources (`third_party/rpf9-explorer` et `tools/rpf9dump`). Si l'un |
| 139 | d'eux change, seule l'étape concernée est refaite (désassemblage, traduction ou export des modèles et textures). | 139 | d'eux change, seule l'étape concernée est refaite (désassemblage, traduction ou export des modèles et textures). |
| 140 | - **`--work`** : choisissez un disque avec au moins 400 Go libres. La traduction des shaders est l'étape la plus | 140 | - **`--work`** : choisissez un disque avec au moins 350 Go libres. La traduction des shaders est l'étape la plus |
| 141 | longue ; elle utilise par défaut la moitié des threads du processeur (réglable avec `--jobs`). | 141 | longue ; elle utilise par défaut la moitié des threads du processeur (réglable avec `--jobs`). |
| 142 | - **`--wav`** : désactivé par défaut, car le WAV PCM 16 bits est plusieurs fois plus volumineux que l'Ogg Opus. | 142 | - **`--wav`** : désactivé par défaut, car le WAV PCM 16 bits est plusieurs fois plus volumineux que l'Ogg Opus. |
| 143 | - **Linux et Wine/Proton** : `make_game.py` fonctionne aussi sous Linux. L'étape `pipelines` utilise | 143 | - **Linux et Wine/Proton** : `make_game.py` fonctionne aussi sous Linux. L'étape `pipelines` utilise |
diff --git a/docs/mobile.md b/docs/mobile.md index aaca95670..d2a8b9dca 100644 --- a/docs/mobile.md +++ b/docs/mobile.md | |||
| @@ -32,7 +32,7 @@ of the x86-64 → arm64 groundwork. | |||
| 32 | | Dispatch runtime | `tools/x64_recomp.py` `emit_rt` | `rt_dispatch` (guest pc → host pc through a generated table), `rt_mkflags` (NZCV+operands → canonical x86 EFLAGS; preserves NZCV), `rt_print` (semihosting result output) | | 32 | | Dispatch runtime | `tools/x64_recomp.py` `emit_rt` | `rt_dispatch` (guest pc → host pc through a generated table), `rt_mkflags` (NZCV+operands → canonical x86 EFLAGS; preserves NZCV), `rt_print` (semihosting result output) | |
| 33 | | Verification | `tools/x64_recomp.py` `build_test_kernel`/`run_kernel` | flat kernel image → `qemu-system-aarch64 -M virt -cpu cortex-a53 -kernel -semihosting`; guest `ret` off the sentinel stack exits and prints `R=xxxxxxxx` (guest edi) | | 33 | | Verification | `tools/x64_recomp.py` `build_test_kernel`/`run_kernel` | flat kernel image → `qemu-system-aarch64 -M virt -cpu cortex-a53 -kernel -semihosting`; guest `ret` off the sentinel stack exits and prints `R=xxxxxxxx` (guest edi) | |
| 34 | | PE census | `tools/recomp_census.py` | walks every `.pdata` function, decodes + translates it, reports coverage %, hazard mnemonics, indirect control flow, unwind-info flags | | 34 | | PE census | `tools/recomp_census.py` | walks every `.pdata` function, decodes + translates it, reports coverage %, hazard mnemonics, indirect control flow, unwind-info flags | |
| 35 | | Tests | `tests/test_x64_recomp.py`, `tests/test_recomp_census.py` | hand-built byte fixtures only; exec tests skip when qemu is absent (`QEMU_AARCH64` names the binary, else `qemu-system-aarch64` on `PATH`) | | 35 | | Tests | `tests/test_x64_recomp.py`, `tests/test_recomp_census.py` | hand-built byte fixtures only; exec tests skip when qemu is absent | |
| 36 | 36 | ||
| 37 | ### Translator contract (as implemented) | 37 | ### Translator contract (as implemented) |
| 38 | 38 | ||
diff --git a/docs/modding.md b/docs/modding.md index e0ccbb953..41ee5daed 100644 --- a/docs/modding.md +++ b/docs/modding.md | |||
| @@ -74,13 +74,6 @@ are installed disabled so a copied folder cannot surprise anyone or silently fig | |||
| 74 | | `monalisa_player_model` | `player_story000_00` -> `cs_monalisa` | disabled | | 74 | | `monalisa_player_model` | `player_story000_00` -> `cs_monalisa` | disabled | |
| 75 | | `mandy_to_monalisa` | `cs_mandy` -> `cs_monalisa` | disabled | | 75 | | `mandy_to_monalisa` | `cs_mandy` -> `cs_monalisa` | disabled | |
| 76 | 76 | ||
| 77 | ## Lua mods | ||
| 78 | |||
| 79 | The D3D12 runtime (`leonida.exe`) also runs a `"script": "main.lua"` that sits next to a `mod.json` in the same | ||
| 80 | `mods/<folder>/`; `tools/leonida_mods.py` lists, enables, disables, installs and packs such a mod like any other (it | ||
| 81 | shows `Lua main.lua` where an asset mod shows its swaps, and does not warn that it has none). What a script can do is | ||
| 82 | in [lua-modding.md](lua-modding.md); `mods/example_lua` is the example, installed disabled. | ||
| 83 | |||
| 84 | ## mod.json | 77 | ## mod.json |
| 85 | 78 | ||
| 86 | ```json | 79 | ```json |
diff --git a/docs/restofworld.md b/docs/restofworld.md index b21203300..ae2bb90c3 100644 --- a/docs/restofworld.md +++ b/docs/restofworld.md | |||
| @@ -734,11 +734,16 @@ triangle or accept that documented exception. This does not by itself explain th | |||
| 734 | 8-bit score above, whose per-block UV coverage was not measured here; the mixed-determinant vertex is one | 734 | 8-bit score above, whose per-block UV coverage was not measured here; the mixed-determinant vertex is one |
| 735 | candidate. | 735 | candidate. |
| 736 | 736 | ||
| 737 | Opaque: the encrypted RPF9 tables of contents, the Bink 2 bodies, the `LSNS` record contents, the bodies of the | ||
| 738 | `RSC8` headers, the nested RPF9 payloads, and the whole `appdata0` data area. Across the 971 | ||
| 739 | core graphics blocks, final-slot widths remain unresolved (`0x21`, the last unread component type, | ||
| 740 | is decoded above). The stride check | ||
| 737 | Opaque: the encrypted RPF9 tables of contents, the Bink 2 bodies, the `LSNS` record contents, the nested RPF9 | 741 | Opaque: the encrypted RPF9 tables of contents, the Bink 2 bodies, the `LSNS` record contents, the nested RPF9 |
| 738 | payloads, and the whole `appdata0` data area. The bodies of the nine `RSC8` headers are decoded in | 742 | payloads, and the whole `appdata0` data area. The bodies of the nine `RSC8` headers are decoded in |
| 739 | [rsc8_audio.md](rsc8_audio.md): facial/lip-sync clips. Across the 971 core graphics blocks, final-slot widths remain | 743 | [rsc8_audio.md](rsc8_audio.md): facial/lip-sync clips. Across the 971 |
| 740 | unresolved (the recurring component types, including both the normal and tangent bits of `0x21`, are decoded above). | 744 | core graphics blocks, final-slot widths remain unresolved, and of the component types the non-normal |
| 741 | The stride check also leaves 436 blocks unclassified, including 18 with a validated following meshlet group. | 745 | bits of `0x21` (see above). The stride check |
| 746 | also leaves 436 blocks unclassified, including 18 with a validated following meshlet group. | ||
| 742 | "Unread" in the tables above is not a claim that those bytes are empty: in | 747 | "Unread" in the tables above is not a claim that those bytes are empty: in |
| 743 | `story000_restofworld` the 9.33 MB unread gap contains 15 `ADAT` (AWC) banks (8,908,216 bytes), which hold the | 748 | `story000_restofworld` the 9.33 MB unread gap contains 15 `ADAT` (AWC) banks (8,908,216 bytes), which hold the |
| 744 | nine `RSC8` headers as tag `0x5c` clips, and nested RPF9 headers, and | 749 | nine `RSC8` headers as tag `0x5c` clips, and nested RPF9 headers, and |
| @@ -928,13 +933,11 @@ streams found with `tools/restofworld_index.py`'s `find_rage_textures` / `is_pg_ | |||
| 928 | all 924 `core_restofworld` model resources (936 drawables across 926 system and 1,020 graphics streams) | 933 | all 924 `core_restofworld` model resources (936 drawables across 926 system and 1,020 graphics streams) |
| 929 | and the single `story000_restofworld` drawable dictionary (3 drawables) without the TOC. Archive path | 934 | and the single `story000_restofworld` drawable dictionary (3 drawables) without the TOC. Archive path |
| 930 | names and external texture-dictionary links still need the TOC or hash matching. | 935 | names and external texture-dictionary links still need the TOC or hash matching. |
| 931 | 7. A full vertex decoder for `42 40 00 00` blocks. ASSET-57 measured recurring stream widths, | 936 | 7. A vertex decoder for `42 40 00 00` blocks. ASSET-57 measured recurring stream widths; |
| 932 | `tools/vertex_types.py` decodes the recurring component types above (`0x42`, `0x28`, `0x27`, | 937 | decoding vertex values still requires component types, final-stream widths and a way to |
| 933 | `0x26`, `0x25`, `0x21`), and `tools/meshlet_page.py --draw-system` / | 938 | locate the owning geometry when only a graphics page is available. (Texture identification is |
| 934 | `tools/restofworld_model_join.py` resolve draw ownership when system metadata is available; | 939 | resolved above under **Textures (`ASSET-148`)**: embedded `0x980` descriptors in `zero-prefix` |
| 935 | final-stream widths and locating the owning geometry from a graphics page alone remain open. | 940 | CPU-segment streams plus the companion `ttdb/*.ttpf` pools.) |
| 936 | (Texture identification is resolved above under **Textures (`ASSET-148`)**: embedded `0x980` | ||
| 937 | descriptors in `zero-prefix` CPU-segment streams plus the companion `ttdb/*.ttpf` pools.) | ||
| 938 | 8. Runtime consumers for the XML content-definition records read by `tools/content_definitions.py` | 941 | 8. Runtime consumers for the XML content-definition records read by `tools/content_definitions.py` |
| 939 | (see above). Their roots describe configuration, not UI layout; reference resolution and mapping | 942 | (see above). Their roots describe configuration, not UI layout; reference resolution and mapping |
| 940 | to resources remain unimplemented. | 943 | to resources remain unimplemented. |
| @@ -971,6 +974,6 @@ decrypts the TOC. | |||
| 971 | 974 | ||
| 972 | - [docs/rpf.md](rpf.md) - RPF9 carving and recovery tools. | 975 | - [docs/rpf.md](rpf.md) - RPF9 carving and recovery tools. |
| 973 | - [docs/design.md](design.md) - the model manifest and the archive-stage table. | 976 | - [docs/design.md](design.md) - the model manifest and the archive-stage table. |
| 974 | - [docs/story.md](story.md) - the `story000`/`shared_minigame000` archive family. | 977 | - `docs/story.md` - the `story000`/`shared_minigame000` archive family (pending story PR). |
| 975 | - [docs/world.md](world.md) - map placement and the `0x7a` metadata resource (PR #117). | 978 | - `docs/world.md` - map placement and the `0x7a` metadata resource (PR #117). |
| 976 | - [docs/psin.md](psin.md) - the `PSIN` container measured on `script.rpf` and `data.rpf` (PR #110). | 979 | - `docs/psin.md` - the `PSIN` container measured on `script.rpf` and `data.rpf` (PR #110). |
diff --git a/docs/story.md b/docs/story.md index 49e8c8064..a0a0e1770 100644 --- a/docs/story.md +++ b/docs/story.md | |||
| @@ -278,7 +278,7 @@ Deliberately wrong reads of the first 300 streams don't hold up: | |||
| 278 | - **The low bytes swapped between `a` and `b`:** the same at 25°, but fewer neighbours within 0.1° than with no low | 278 | - **The low bytes swapped between `a` and `b`:** the same at 25°, but fewer neighbours within 0.1° than with no low |
| 279 | bytes at all. Within 0.1° the counts are 7.56% swapped, 8.59% with the high 16 bits only, and 9.19% with the rule. | 279 | bytes at all. Within 0.1° the counts are 7.56% swapped, 8.59% with the high 16 bits only, and 9.19% with the rule. |
| 280 | 280 | ||
| 281 | The 4-byte attribute streams (`0x21` and `0x27` normals and tangents) are decoded below; `0x26` (colour/skin weights) and `0x28` (`int16` UVs) are measured across the full corpus in [restofworld.md](restofworld.md). | 281 | The 4-byte attribute streams (tags 0x21, 0x26, 0x27, 0x28) are still not decoded. |
| 282 | 282 | ||
| 283 | With these blocks sized, the archive walk accepts 1,569 streams and leaves 0 unparsed: | 283 | With these blocks sized, the archive walk accepts 1,569 streams and leaves 0 unparsed: |
| 284 | 284 | ||
| @@ -406,6 +406,7 @@ chunks on a 256-byte boundary behind zero padding; the walk stops there (`stoppe | |||
| 406 | | positions finite | all | | 406 | | positions finite | all | |
| 407 | | positions within 300 m | 29,572,450 (99.9%) | | 407 | | positions within 300 m | 29,572,450 (99.9%) | |
| 408 | | shared edges with neighbouring faces within ~25° | 33,342,470 of 36,707,506 (90.8%); 1.4% opposed | | 408 | | shared edges with neighbouring faces within ~25° | 33,342,470 of 36,707,506 (90.8%); 1.4% opposed | |
| 409 | | normals within 8° / 25° of their faces | 76.5% / 94.6% of 20,801,089; 2.1% opposed | | ||
| 409 | | normals within 8° / 25° of their faces | 76.5% / 94.5% of 20,801,089; 2.1% opposed | | 410 | | normals within 8° / 25° of their faces | 76.5% / 94.5% of 20,801,089; 2.1% opposed | |
| 410 | | tangents perpendicular to the normal | 30,473,135 of 30,569,246 (99.7%) | | 411 | | tangents perpendicular to the normal | 30,473,135 of 30,569,246 (99.7%) | |
| 411 | | radius covers the farthest vertex from the stored centre | 257,091 of 275,832 meshlets (93.2%); 94.8% within rounding | | 412 | | radius covers the farthest vertex from the stored centre | 257,091 of 275,832 meshlets (93.2%); 94.8% within rounding | |
| @@ -570,12 +571,10 @@ was found in the inflated sample. | |||
| 570 | headers in `story000`; a decoder needs their spans and TOCs to group resources. | 571 | headers in `story000`; a decoder needs their spans and TOCs to group resources. |
| 571 | 3. An `RSC8` decoder for version 8001: done. `tools/rsc8_audio.py` decodes the header and the | 572 | 3. An `RSC8` decoder for version 8001: done. `tools/rsc8_audio.py` decodes the header and the |
| 572 | facial/lip-sync clip payload ([rsc8_audio.md](rsc8_audio.md)). | 573 | facial/lip-sync clip payload ([rsc8_audio.md](rsc8_audio.md)). |
| 573 | 4. A `PSIN` section and instance decoder: `tools/psin_index.py`, `tools/psin_data.py` and | 574 | 4. A `PSIN` section walker. The tag/length chain is measured; `LSCH`, `LENM`, `LSNS`, `LGID`, |
| 574 | `tools/odrp_7a.py` decode `LSCH`, `LENM`, `LRSC`, `CHKS`, the `LSNS` block layout and instance | 575 | `LRSC` and `CHKS` semantics are still open. |
| 575 | data ([psin.md](psin.md)); `LSNS` 16-byte record contents and unhashed schema names remain open. | 576 | 5. `0DRP` page grouping. The page count at +0x20 is the only measured grouping field; a decoder |
| 576 | 5. `0DRP` page grouping: `tools/page_index.py` and `tools/odrp_7a.py` derive resource stream | 577 | still needs the following stream boundaries. |
| 577 | boundaries from the `q38` table (`+0x20` was tested on `story000.rpf` and does not mark stream | ||
| 578 | boundaries; see [page_directory.md](page_directory.md#the-0x20-count-does-not-mark-stream-boundaries)). | ||
| 579 | 6. Bink 2 decoding for the 264 story streams and 7 restofworld streams (see `docs/movies.md`). | 578 | 6. Bink 2 decoding for the 264 story streams and 7 restofworld streams (see `docs/movies.md`). |
| 580 | 7. The existing model exporter for drawables; texture identification needs a real container | 579 | 7. The existing model exporter for drawables; texture identification needs a real container |
| 581 | signature, which this pass did not find. | 580 | signature, which this pass did not find. |
| @@ -593,7 +592,7 @@ sizes, signatures and header fields; it does not write resource payloads or carv | |||
| 593 | python -I tools/story_index.py <archive.rpf> <out.csv|out.json> [--start N] [--limit BYTES] | 592 | python -I tools/story_index.py <archive.rpf> <out.csv|out.json> [--start N] [--limit BYTES] |
| 594 | python -I tools/rpf9_carve.py <archive.rpf> <out_dir> --index-only [--start N] [--limit BYTES] | 593 | python -I tools/rpf9_carve.py <archive.rpf> <out_dir> --index-only [--start N] [--limit BYTES] |
| 595 | python -I tests/test_story_index.py | 594 | python -I tests/test_story_index.py |
| 596 | python -I tools/meshlet_page.py <archive.rpf | carved-dir | page.bin> [...] [--faces] [--normals] [--cones] [--centres] [--json out.json] [--quiet] | 595 | python -I tools/meshlet_page.py <archive.rpf | carved-dir | page.bin> [...] [--json out.json] [--quiet] |
| 597 | python -I tests/test_meshlet_page.py | 596 | python -I tests/test_meshlet_page.py |
| 598 | ``` | 597 | ``` |
| 599 | 598 | ||