mirror of
https://github.com/ProjectLeonida/mandy.git
synced 2026-12-06 13:08:37 +00:00
140 lines
28 KiB
Markdown
140 lines
28 KiB
Markdown
# Documentation
|
||
|
||
These notes record what has been measured in the local Xbox Series package and what is still open.
|
||
The headline counts are the measured numbers at the time of the note; the linked page has the
|
||
method, scope and caveats. No game data is included.
|
||
|
||
## Start here
|
||
|
||
| Document | What it covers |
|
||
|---|---|
|
||
| [design.md](design.md) | Overall project design, asset status, translator contract and open blockers. |
|
||
| [related_projects.md](related_projects.md) | Prior art we may read and the licence boundaries on it. |
|
||
| [boot_leads.md](boot_leads.md) | Open leads that may move the retail boot further (TLS at module index 0, feature level at device creation, command-list replay, descriptor words, shader corpus count, frame pacing), each with where it lands, how to implement it and how to test it, and a status table: BL-2, BL-5 and BL-6 are done, BL-3 and BL-4 have open pull requests, BL-1 waits for a retail confirmation. |
|
||
| [rpf.md](rpf.md) | RPF9 archive layout, the carve tools and the unreadable encrypted TOC. |
|
||
| [linux.md](linux.md) | Linux in one page: what runs natively and what runs under Wine or Proton, the Ubuntu packages, `Build.sh`, the runtime cross-build, and why there is no native Linux `gta6rt`. |
|
||
| [running.md](running.md) | Running the game per platform and GPU (Linux/Wine with AMD and NVIDIA, Linux/Proton and Windows with NVIDIA, Windows with AMD, Intel, macOS): build, shaders, pipeline pre-compile, driver settings, environment, what to expect; each value measured by us, reported by others (linked) or TBD. |
|
||
| [testing.md](testing.md) | Running the GPU tests on your own GPU: setup per OS, wave64 emulation, running without a GPU on Mesa llvmpipe, and known problems. |
|
||
| [gpu_test_results.md](gpu_test_results.md) | Published GPU test results by hardware, driver and commit, with pass, skip and failure counts. |
|
||
| [progress_dashboard.md](progress_dashboard.md) | A local page of what works, what changed since it last passed and what blocks next: unit and runtime tests, the translator contract by confirmation method, measured imports, corpus counts and, with `--github`, CI and the D3D- items (`tools/progress_dashboard.py`). |
|
||
| [dev-tools.md](dev-tools.md) | The development CLI `scripts/dev.py`: `discover` (text or `--json`, schema version 1) lists the boot-trace analyzer and the guest-scene runner with their help commands and prerequisites, without running them; live attach, pause, step and screenshots are not available through it. |
|
||
| [agent_collaboration.md](agent_collaboration.md) | How contributors' coding agents work together through GitHub: which machine profile takes which work, the `AGENT-MSG`, `RUN`, `PICTURE` and `TEST-WANTED` blocks (`PICTURE` from `tools/picture_metrics.py`: a frame's luma, dark regions, lattice and block detectors, an 8x8 diff and a defect class, numbers only), and the evidence tags. A convention, not a measurement. |
|
||
| [history/README.md](history/README.md) | The original repository's surviving history as portable, hashed text: the 251 `old-pr/*` branch tips and the 135 indexed old issues, with the script that regenerates them ([#563](https://github.com/ProjectLeonida/mandy/issues/563)). |
|
||
| [port_status.md](port_status.md) | Where the port stands: Leonida's runtime and shader pipeline as the base, what was patched in from VIctory, and what is still open. |
|
||
| [port_plan.md](port_plan.md) | What the title needs that Leonida's runtime does not do yet, taken from VIctory, in the order the title hits it and where each fix lands. |
|
||
|
||
## Archives and assets
|
||
|
||
| Document | Measured content |
|
||
|---|---|
|
||
| [models.md](models.md) | 382,781 models (0 decode failures) at the `e293917` pin, including 159,511 drawable-dictionary children; 55,417 fragments, 89,887 bone-bound and 2,636,248,990 triangles over all ten archives (`levels.rpf` from a full export); the re-count table is in models.md. |
|
||
| [strand_grooms.md](strand_grooms.md) | GPU strand grooms (`smh`): hair, beards, brows and fur are groom LOD resources consumed by the `smh_*` compute passes, not triangle drawables (each is a one-triangle stub); 5,751 assets / 20,046 LOD resources, 0 decode errors, 902,456,856 GPU buffer bytes and 112,491,621 strands; the measured resource layout, the `smh_gen_1` Class 0 strand scattering RNG, barycentric strand interpolation and split-chain rejoin, and a GLB export (`tools/smh_groom.py`). |
|
||
| [character_models.md](character_models.md) | `packs.rpf` character parts at `e293917`: 26,585 rows / 11,335 unique names, 2,865 fragments (all a flat 25-vertex / 32-triangle 5x5 bounds grid at z=0), Lucia's 22 named records and the decoded 13-part export, the `player_story000_00` drawable set, slot-name token counts, texture coverage (184/215), and what is not decoded (fragment children, ped variation, hair, bind pose). |
|
||
| [character_skeleton.md](character_skeleton.md) | Character `.#ft` fragments: the 597-name shared skeleton table (596 `joaat32` hashes), the 597-record instance tree with 580 measured parents, the model-side bone-hash mapping, and the measured vertex joint-index/skin-weight layouts (`tools/skin_streams.py`); the default bone transforms compose to the stored inverse bind matrices, and `tools/anim_glb.py` exports a skinned part with clips as an animated GLB. |
|
||
| [ped_catalogues.md](ped_catalogues.md) | Ped and wardrobe appearance catalogues: one schema rooted at struct `0x8dcb4cf5`, in `0DRP` v122 resources in `packs.rpf` and in the standalone `PSIN` player/wardrobe catalogue, with both framings' 1-based block table and 64-bit pointer encoding (`block = ptr & 0xfffff`, `offset = ptr >> 20`); 2,716 catalogues and 632,778 presets (612,950 in resource-packed `0DRP`, 19,828 in one standalone `PSIN`), 345,780 presets with a parent (chain depth 3, 0 cycles), 896,115 `0x37e52277` states resolved, 0 parse errors (`tools/ped_catalogues.py`). |
|
||
| [resource_names.md](resource_names.md) | RPF9 named-resource index: bounded-inflate lookup for `name.#dr`/`#ft`/`#dd` without the TOC. |
|
||
| [sgd5_render_states.md](sgd5_render_states.md) | The three effect-local render-state indices in an SGD5 pass, checked across all 28,798 passes. |
|
||
| [textures.md](textures.md) | 357,115 TTPF descriptors across 57 pools: `rpf9dump` (`e293917`) decodes 354,991 strict-clean (99.41%) directly including BCPack BC1/BC3/BC4/BC5; `tools/bcpack.py` decodes all six BCPack modes (BC1–BC7). |
|
||
| [textures_arrays.md](textures_arrays.md) | All 697 multi-slice TTPF descriptors resolved (127 mip-major `SW_64KB_D` 2D arrays, 567 streaming slice-major `SW_4KB_S` cubemaps, 3 `SW_4KB_S` 3D volumes) plus 357,115/357,115 chunk-page metadata validation. |
|
||
| [animation.md](animation.md) | 130,470 `anim.rpf` streams, 95.4% readable; 1,126 rig sets / 6,677 source-to-rig entries / 3,669 rigs. |
|
||
| [navmesh.md](navmesh.md) | 90,295 `navmeshes.rpf` streams (0 unclassified): 9,603 `0DRP` cover-point `0x7a` pages, 27,644 `0x00010015` navmesh tiles (`136×180` grid), 27,482 Band-3 sparse grids, 22 `PSIN`. |
|
||
| [bvh.md](bvh.md) | 565,596 `core_bvh4.rpf` streams; 271,627 BVH4 streams and 269,106 instances, prebuilt acceleration data. |
|
||
| [rbf0.md](rbf0.md) | 1,263 RBF0 resources, 475,461 elements; UI/Scaleform definitions, not a sectioned container; strict JSON/CSV/XML tree decoder. |
|
||
| [gamedata.md](gamedata.md) | `common.rpf`: 954 streams, 266 XML documents / 118 roots; 0 RBF0/PSIN; a streaming reader (`gamedata_reader.py`) converts 259 documents by root and `type`. |
|
||
| [gamedata_graph.md](gamedata_graph.md) | `common.rpf` mount graph: 25 manifest documents, 30 content-set ids, 14 include refs (12 resolve), 3,386 target refs, 0 cycles. |
|
||
| [weather.md](weather.md) | The weather document measured: 168 types (151 tagged / 17 untagged, a family split), exact-case `Mod*` vocabulary mismatches, axis-to-field Spearman (niceness tracks its field, `Rain` is a 7-of-25 data-set split), `TimeMult` and the inert `Honor*` values. |
|
||
| [world.md](world.md) | `levels.rpf` placement: 9,918 map files / 680,228 entities measured in 55% of the archive (lower bound; estimate 16k-39.6k / 1.03M-2.64M); `0x7a` resource layout. Building a placed world from entity rows (`world_build.py --placements`): shared geometry per chunk (`EXT_mesh_gpu_instancing`), bounded memory for the whole archive, and per-tier LOD chunk sets with distance bands (`--lod-sets`). |
|
||
| [world_census.md](world_census.md) | Full `levels.rpf` pass: 23,535 maps / 1,670,442 entities, 98.32% stream coverage, sharded and exact; the SixNG 30,785-map difference reconciled map by map (interiors and entity groups). |
|
||
| [world_names.md](world_names.md) | Name resolution: `archetypeName` and map `name`/`parent` are lower-cased joaat; 64-bit keys are MurmurHash3 x64 low 64. With `rpf9_names.py` names, 99.85% of the 1,670,435 entities a whole-archive `world_index` run reads resolve (64-bit verified); 5/23,535 map names, all five confirmed by the map 64-bit key. |
|
||
| [world_lights_paths.md](world_lights_paths.md) | Map lights (`CExtensionDefLightEffect`/`CLightAttrDef`, 280,105 lights, placed through map entities) and the vehicle lane graph (63,808 nodes, 145,518 links, 1,546 junctions, 369 signalised); identical to SixNG on the lane graph, lights reconciled resource by resource. |
|
||
| [page_directory.md](page_directory.md) | RPF9 `0DRP`: 0x60-byte header, `q38` 16-byte records; 15,768 pages / 60,880 records in `data.rpf`; targets and sizes, names still TOC-only. |
|
||
| [text.md](text.md) | 30,511 localized string tables (hash table, index, UTF-8 blob in `0DRP` resources) and the dialogue table: 138,104 lines joined to their subtitles in every language; language guessed per table. |
|
||
| [psin.md](psin.md) | PSIN metadata container: header, section walk, `LSCH`/`LENM` schema, and the instance data (block table, pointers, arrays, maps) read through it on 17,507 containers, 99.986% of block bytes reached; hash-typed members resolved to resource names. |
|
||
| [story.md](story.md) | `story000.rpf` 18.65 GiB mixed: 264 Bink 2 streams / 3.33 GB, 225,281 `RSC8` headers, 442 nested RPF9; `story000_script` PSIN, `shared_minigame` mixed content. |
|
||
| [restofworld.md](restofworld.md) | Six rest-of-world/script archives, 1.57 GB total: `core_restofworld` 1.21 GB (11 Bink 2, 37 models, 958 graphics pages), `story000_script` PSIN, small `appdata0`/licences. |
|
||
| [movies.md](movies.md) | Bink 2 streams and audio tracks; decode through the real loader and `Bink2Scarlett.dll`; stream names from the mount lists. |
|
||
| [pso_cache.md](pso_cache.md) | The PSO/shader cache: 0x80 header, 25,471 graphics and 2,693 compute records, two 8-byte index tables, meta chunk types 0x41/0x42/0x43 and 26,092 `s_endpgm`; `tools/psocache_extract.py` carves it, `tools/psocache_inspect.py --meta` decodes the chunks and `tools/psocache_usersig.py` maps the graphics user data to root parameters. |
|
||
|
||
## Audio
|
||
|
||
| Document | Measured content |
|
||
|---|---|
|
||
| [audio.md](audio.md) | AWC banks: Opus, PCM and XMA2; lossless Ogg Opus repack and WAV paths; stream names from dictionary hits with a salted control; names and subtitles written into the Ogg Opus tags. |
|
||
| [rsc8_audio.md](rsc8_audio.md) | 641,428 `RSC8` v8001 resources across 4 archives: 100% AWC tag `0x5c` facial/lip-sync `crClipDictionary` paired with 48 kHz mono Opus dialogue, 0 hidden audio containers; the undocumented `0x5a`/`0xd9` companion tags (1,185 `audio.rpf` streams) decoded structurally. |
|
||
| [awc_shorts.md](awc_shorts.md) | Export short streamed-music idents/stings by duration; stereo-aware, no re-encode. |
|
||
| [audio_config.md](audio_config.md) | The music/radio record table: 1,589 records, exact durations, AWC stream ids; no start offsets. AWC tag `0xBD`: 16-byte marker events on 938 of the 3,008 streamed-music banks, track markers in five long mixes. |
|
||
| [radio_stations.md](radio_stations.md) | Audio-config station blocks: 19 records, boundary u32, content-id lists; VCRR 80/80 mapping; no start offsets. |
|
||
|
||
## Runtime, GPU and validation
|
||
|
||
| Document | Measured content |
|
||
|---|---|
|
||
| [d3d12_vulkan.md](d3d12_vulkan.md) | Xbox D3D12 to Vulkan plan and status; device proxy, queues, command lists, barriers, copies. |
|
||
| [mobile.md](mobile.md) | arm64/mobile path: the x86-64 → arm64 static-recompiler groundwork (`tools/x64_recomp.py`), the `.pdata` coverage census (`tools/recomp_census.py`), and what still blocks iOS. |
|
||
| [first_run_ui.md](first_run_ui.md) | Build the Windows integration and display the offline first-run controller prompts; the scripted-pad route through the first-run pages to the story load. |
|
||
| [boot.md](boot.md) | The first real boot: the `gta6rt --trace`/`--trace-d3d12` runbook, the startup + D3D12 trace summary (`tools/boot_trace.py`), the triage order and the Q1–Q22 checklist. |
|
||
| [retail_boot_chain.md](retail_boot_chain.md) | How far `gta6rt --run` gets with the retail executable: the stops in order and what clears each, the physical-page export shapes, device slots 26, 48 and 73, and the device slots the executable calls, counted from the file (`tools/d3d12_device_calls.py`). |
|
||
| [retail_boot_intel_host.md](retail_boot_intel_host.md) | The retail boot on an Intel host with 16 GB: which stops of the two boot pages hold there with #7111, the commit-limit stop at the 6.1 GiB physical-page request that #7556 clears, the frame loop to the 900 s timeout with stub pipelines, and what the layer refuses at that depth (the console mesh-shader subobject among it). |
|
||
| [descriptor_lookup.md](descriptor_lookup.md) | `vk_descriptor_bench` GPU timings at 1k, 10k and 100k live entries across Apple M3 Max, RTX 4070 SUPER (Ada, ReBAR on), RTX 3070 (Ampere, ReBAR off / 214 MiB BAR1) and Intel UHD 770 (Xe-LP). |
|
||
| [d3d12_xs_surface.md](d3d12_xs_surface.md) | The 116-slot `d3d12_xs.dll` export surface; 83/83 standard GUIDs match the PC SDK. |
|
||
| [xdxr.md](xdxr.md) | `BATCHED_DESC2` (`0x50`) and `XDXR_STREAM_DESC` (`0x10`) from `XboxBvhBuilder.dll`'s reads; stream records' offsets and defaults; offline statistics not in the package. |
|
||
| [d3d12_xs_console_abi.md](d3d12_xs_console_abi.md) | The D3D12.X console ABI the `d3d12_xs` shim must reproduce: device/queue/list vtable slots, command-list object fields and record encodings, root-argument SGPR rules, unified memory; sibling-layer measurements marked unverified here. |
|
||
| [d3d12_command_objects.md](d3d12_command_objects.md) | Measured command queue/list/fence/`PresentX` surface; verified vs prior art vs open. |
|
||
| [xbox_d3d12_xs.md](xbox_d3d12_xs.md) | The `d3d12_xs` graphics ABI quoted from Microsoft's public GDK reference: root signatures, state objects, DXIL libraries, hit groups, shader cache sessions; which pages are missing or NDA-gated. |
|
||
| [runtime_imports.md](runtime_imports.md) | The 16 shipped modules' measured imports and shim/host/unimplemented split. |
|
||
| [gdk_public_reference.md](gdk_public_reference.md) | How to use the public PC GDK reference and headers to write shims for the imported console APIs: what it covers (XGameRuntime, XTaskQueue, XUser, XStore, XGameSave, GameInput), what it does not (`d3d12_xs`, NDA), the 4-step method, a measured table of which imported names have a public page (2026-11-29) and the lines not to cross. |
|
||
| [linux_proton.md](linux_proton.md) | Building and booting under Proton/Wine on Linux, one bounded game run with `scripts/run_game_wine.sh`, a healthy boot's timeline, and the test report of one Linux and two Windows machines |
|
||
| [xmem_exe_calls.md](xmem_exe_calls.md) | How the retail executable calls `xmem.dll`: call sites and constant arguments per import (`tools/import_call_sites.py`), the 23 `XMemVirtualAlloc` calls that all pass an attribute word, and the inferred shape of the physical-page family. |
|
||
| [exe_fail_fast.md](exe_fail_fast.md) | Where the retail executable stops itself (`int3`) on an import's result: 78 sites over 27 imports (`tools/import_fail_fast.py`), grouped by how `main` binds each import (all 13 non-host fatal-checked imports now bind to shims; 0 unbound). |
|
||
| [audio_hal_exe_calls.md](audio_hal_exe_calls.md) | How the retail executable calls the 22 audio coprocessor, texture layout and DirectStorage imports that have no shim: call sites, constant arguments, and the four calls with a negative-result branch. |
|
||
| [directstorage.md](directstorage.md) | Console DirectStorage: the DLL and ABI the title is expected to use (`DStorageGetFactory`, `dstorage_xs`, `XCRDAPI`), how sure that is and the evidence for it, and what `runtime/shims/dstorage.cpp` serves on the PC. The executable's own imports are unmeasured. |
|
||
| [cpu_features.md](cpu_features.md) | CPU instructions in the executable a desktop CPU may lack (`tools/cpu_feature_scan.py`): 19 SSE4a, 10 CLZERO and 4 MONITORX/MWAITX sites (AMD only) and 8 CLWB sites (Intel since Ice Lake), all real code; `#UD` on hosts without them. |
|
||
| [xcl_compare.md](xcl_compare.md) | XCL's synthetic test title under `gta6rt --run` and under XCL (`tools/xcl_compare.py`): 5 of 50 checks pass here, both hangs are the documented manual-queue terminate deadlock, and each other difference mapped to an open item or a lead. |
|
||
| [gameinput.md](gameinput.md) | The GameInput shim on SDL3: `GameInputCreate` and the v0 `IGameInput`/`IGameInputDevice`/`IGameInputReading`/`IGameInputDispatcher` surface on any SDL gamepad, DualSense adaptive-trigger approximation and lightbar, force-feedback motors and trigger haptics through SDL's haptic API; without SDL3, one scripted pad for `LEONIDA_INPUT_SCRIPT`; 261 checks on virtual joysticks and a fake haptic backend, plus real-hardware runs on an Xbox Series X pad (Bluetooth) and a DualSense (USB). |
|
||
| [prompt_glyphs.md](prompt_glyphs.md) | The title's one button-prompt movie (a Scaleform GFX of 38 Xbox glyph sprites, `platform_xbsx.input_icons.Main_Button_<N>`): where it is in `data.rpf`, its tags and canvas sizes, which N is which button, which class of the larger movies asks for a glyph and when, the original PlayStation-style replacement `tools/ps_prompt_glyphs.py` builds, the keyboard-and-mouse set `tools/pc_prompt_glyphs.py` draws itself (key caps fitted to the Xbox glyphs' size) or traces from the player's pictures, `tools/prompt_glyph_movies.py`, which builds both for the launcher and make_game.py, how the runtime serves the one for the device in use, and why the glyphs cannot follow a switch of device during play. |
|
||
| [vi_patch.md](vi_patch.md) | ZiZc3's VI-Patch (game patches for the PS5 build) on the Xbox executable: the title's frame limiter and the 60 fps patch that is always on (RVAs `0x224359a`, `0x1e0fc62`), no vignette behind `LEONIDA_VIPATCH_NO_VIGNETTE=1` (the `spotmeter_aiming` and `spotmeter_fast` exposure profiles), and why the other six are not found or not ported; no licence, so only what each patch does is taken. |
|
||
| [victory_gap_media.md](victory_gap_media.md) | VIctory's audio, DSP, media, speech and GameInput modules against Leonida, export by export: what was already the same, what `port/gap-media` ported (the XInput/keyboard GameInput shim for builds without SDL3, `#1` registration, silent speech, the local-only Media Foundation resolver) and what is left (Opus decoding, diagnostics aids). |
|
||
| [victory_gap_gpu.md](victory_gap_gpu.md) | VIctory against Leonida on the console D3D12 surface (`d3d12x`, display, FidelityFX, DirectStorage, the GPU crate): what was the same, what `port/gap-gpu` ported and what is left. |
|
||
| [victory_gap_system.md](victory_gap_system.md) | VIctory against Leonida in the system modules and the loader (kernel, xmem, files, lifecycle, xsystem, xpackage...): what `port/gap-system` ported, each piece naming its VIctory source. |
|
||
| [saves.md](saves.md) | Save containers: `JSAV` (index + JSON story save, byte-exact rebuild), `ASAV` header, `SLAYER1` packed copy (not decoded); `tools/saves.py` and import into the offline `XGameSave` folder; key hashes are case-sensitive joaat (`tools/save_keys.py`). |
|
||
| [pipeline_check.md](pipeline_check.md) | Driver-level corpus check: the full corpus, 26,503 of 26,503 modules and pipelines, 0 failures (RTX 4060 Ti); an earlier 10/12-shard run (22,092 modules and 2,217 compute pipelines) also had 0 failures. |
|
||
| [runtime_ctest_hosts.md](runtime_ctest_hosts.md) | The runtime ctest suite on two hosts, Wine and native Windows 10, on one Pascal card: the 19 failures that are Wine's host, the 5 that reproduce (ours), and the 6 that only fail natively, deterministic, including a SegFault. |
|
||
| [multi_gpu_validation.md](multi_gpu_validation.md) | Running disjoint shards on eight identical RDNA1/RADV GPUs: PCI-BDF pinning, base controls, per-card logs, the V540 farm's aggregate results and its known driver limitations. |
|
||
| [shader_validation.md](shader_validation.md) | Differential CPU/GPU validation design and the current CPU interpreter prototype. |
|
||
| [isa_coverage.md](isa_coverage.md) | RDNA2 ISA coverage of the translator against AMD's machine-readable XML: which of its 1,153 instructions have a rule, and which matched names are not RDNA2. |
|
||
| [buffer_bounds.md](buffer_bounds.md) | V# `OOB_SELECT` bounds measured natively: RDNA2 (gfx1036) follows Mesa's GFX11 column (729/732 cases), not GFX10; raw mode also counts `soffset`. |
|
||
| [buffer_formats.md](buffer_formats.md) | Every GFX10 buffer data format a V# or MTBUF can name, loaded and stored, measured on a Radeon 880M (RDNA3.5, not RDNA2): 1.33 million validated elements, 0 mismatches; SCALED stores convert as NORM, float stores round toward zero. |
|
||
| [fssm_crosscheck.md](fssm_crosscheck.md) | FSSM/RDNA2 facts cross-checked against SCARAB; code starts at `code_off + 0x28`. |
|
||
| [fspx.md](fspx.md) | `FSPX`, the FidelityFX DLL's native compute programs (its shaders' `ACCC` part): directory as the DLL reads it, kind-0 dispatch state, the hash prologue, `gfx1030` for its `v_dot4` code; 20 of 29 translate and pass `spirv-val` with `tools/fspx_unpack.py` (the recount after SHADER-813 in fspx.md). |
|
||
| [first_light.md](first_light.md) | First draw of an exported game model with its own translated VS/PS on a GPU (UV draw or `--dds` texture): 4,213 vertices, 7,968 triangles, 78.1% coverage on an RTX 2060 SUPER; `tools/first_light.py`, `vk_harness` mesh mode, and `d3d12_first_light`. |
|
||
| [material_pass_replay.md](material_pass_replay.md) | How one authored mesh writes packed draw indices, how six compute programs read the layout, and which sibling passes read the surface material. |
|
||
| [embedded_shaders.md](embedded_shaders.md) | DXBC containers embedded in the package's DLLs: 52 in `XboxBvhBuilder.dll` (console `FSSM` via the `XDAT`/`XBCH` record; 52/52 pass `spirv-val` today) and 29 `ACCC`/`FSPX` in the FidelityFX upscaler; the scan/extract tool, the rules the programs needed, and the build step and run-time lookup of the builder's programs (`<shaders>/bvh/index.json`). |
|
||
| [shader_library.md](shader_library.md) | The pipeline library in `shaders.rpf`'s zlib part, which the carve doesn't read: 25,471 graphics and 2,693 compute pipeline records (stage slots: PS, VS, MS) and 21,522 native programs, 21,509 of them pipeline builds of 6,522 carved shaders (named by their `HASH` digest); `tools/shader_library.py`. |
|
||
| [shader_inputs.md](shader_inputs.md) | Inputs that specific game shaders need to be right, as a first check for a black frame or a device-lost: the studio-shot lighting shader's 512-byte light records, eight-light loop, plane count at +0x4C (#1892 said +0x40), profile table and shadow-strength byte; the ACES LUT bakes' two tone-curve splines (reference order at +0x00, points-first at +0x70 behind the +0x118 switch), the +0x13C luminance mode and the quasi-log addressing (#1896); the sky LUT order and the +0xD0 dword that picks RGB9E5 or float outputs (#1897); the shared atmosphere constant buffer, its table slots (+0x220, +0xC60) and the layout with the two scale-height dwords no pass consumes (#3990). |
|
||
| [sandbox.md](sandbox.md) | Placed world props through one translated VS/PS pair with a real camera, TTPF albedo and the game's sampler: 442 of 446 draws textured; fly/walk/drive window, `tools/sandbox.py --check`. |
|
||
| [coder.md](coder.md) | The compressed mass in `story000_script.rpf`: entry framing (`align16(entry+8)` payload), the 32-value tag alphabet, deflate-shaped but proprietary, variable-length 7/8-bit LSB-first codes with no stored table, and the `n7 = 116..127` search that finishes it. |
|
||
| [mission_logic.md](mission_logic.md) | Mission state tables: 0x20 record layout (band counter, byte offsets), the 64-byte pool element with world transforms, case-folding joaat keys, 53.5 % of states named, 113 state-set clusters covering 82.4 % of files. |
|
||
| [gbuffer.md](gbuffer.md) | Deferred G-buffer targets (`PS_DeferredTextured` and all 2,989 `*Deferred*` pixel shaders, `PROC-146`): 5- and 6-target `OSG1`/`PSV0` signatures (`float32` + `exp ... compr` on all outputs), the 24-bit octahedral normal split across `mrt1.gba` (`2047.5` scale, `1/255` byte packing), sqrt-encoded `mrt2`, byte IDs in `mrt3.zw`, float motion in `mrt4`, and why binding `f16` targets mangles the normal bytes. |
|
||
|
||
## Runtime features, tools and proposals
|
||
|
||
| Document | What it covers |
|
||
|---|---|
|
||
| [game_gate.md](game_gate.md) | The in-game gate for the D3D12 runtime: one command runs the game a set time in the world, stops it cleanly and writes `summary.json` (PASS/FAIL/ERROR, time to the world, warm cache, fps, crashes), the same on every machine. |
|
||
| [measuring_fps.md](measuring_fps.md) | How to measure frame rates of the D3D12 runtime (`d3d12/`): look in the findings first, turn a switch inside one run with `LEONIDA_AB`, separate runs, which log number means what, what to write before reporting a cause. |
|
||
| [d3d12/docs/findings.md](../d3d12/docs/findings.md) | What was measured of the D3D12 runtime's frame on several PCs: where a frame goes, switches by turns with their spread, what was not worth it, picture faults and what they were. |
|
||
| [benchmarks-4060-laptop-8gb.md](../d3d12/docs/benchmarks-4060-laptop-8gb.md) | Source-attributed RTX 4060 Laptop (8 GB) session and switch A/B measurements ported from `edsuuu/VI-BR-PORT`; not reproduced on Mandy or by the porter. |
|
||
| [d3d12/docs/switches.md](../d3d12/docs/switches.md) | The `LEONIDA_*` variables the D3D12 runtime names, made from its sources (`tools/d3d12_switches.py`): how each is read, whether `LEONIDA_AB` can turn it, the sentence of the code's comment. |
|
||
| [launcher.md](launcher.md) | The Leonida Launcher: the desktop window with navigation, a PLAY button, status line and pages; Leonida's own design, no game assets. |
|
||
| [mod-menu.md](mod-menu.md) | The in-game trainer menu drawn by the D3D12 runtime (`d3d12/`): on by default, `LEONIDA_MENU=0` turns it off; single player only, nothing online. |
|
||
| [modding.md](modding.md) | Archetype-swap and camera mod format (`mods/<folder>/mod.json` next to `gta6rt.exe` or under `--mods DIR`), `tools/leonida_mods.py` manager (`Mods.bat` / `Mods.sh`), load order and start-up log (swaps wait for RT-5). |
|
||
| [lua-modding.md](lua-modding.md) | Lua 5.4 mods in the D3D12 runtime: a folder in `mods\` with the same `mod.json` the mod manager lists, and a script next to it. |
|
||
| [ultrawide.md](ultrawide.md) | How the output size goes from the window to the title and back to the screen, and what the opt-in 21:9 and 32:9 settings change; measured versus hypothesis marked. |
|
||
| [test_inventory.md](test_inventory.md) | The subsystem test map and prerequisite catalog (`tools/test_inventory.py`, DX-10): how test modules across `tests/` and `runtime/test/` are discovered and grouped. |
|
||
| [junit_triage.md](junit_triage.md) | Comparing two JUnit XML reports (`tools/junit_triage.py`, e.g. from `ctest --output-junit`): aggregate counts only, never test names or output. |
|
||
| [change_gate.md](change_gate.md) | A proposal, not implemented: a change gate for module boundaries, function complexity and doubled text, with the numbers measured on the merge history. |
|
||
|
||
## Other languages
|
||
|
||
Community quickstarts (stable onboarding text only; English docs remain authoritative): [i18n/README.md](i18n/README.md) (`fr`, `pt-BR`, `pt-PT`, `zh-CN`, `pl-PL`, `tr`, `ru`, `ja`, `es`, `it`, `de`, `ar`, `vi`).
|