Commit Graph

5744 Commits

Author SHA1 Message Date
a4300e3eb0 Merge pull request #2594 from owenjbendon-creator/tools-d3d12-run-fps
tools: frame rate of a D3D12-runtime run by draws a frame, and two runs side by side (TOOLS-D3D12-RUN-FPS)
2026-11-30 11:04:31 +01:00
70ea7d6ec0 docs: document LEONIDA_TITLE_STREAM_BUDGET_MB in docs/d3d12_vulkan.md 2026-11-30 04:57:18 -05:00
07905380dc ps_ssharp: probe the bias at +-0.26, not +-0.3
NVIDIA (RTX 3090, driver 610.88) moves NEAREST mip selection to level 1 at
about +0.289, inside Vulkan's 0.25..0.5 range, so a single +0.3 already read
level 1 there (found by zmasi). +-0.26 stays under that on every driver, and
the bias counted twice (+-0.52) still crosses 0.5.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 10:55:18 +01:00
f98f4973ec docs: what the judge of the switches page found
The launcher column saw one way of assigning of four, three kinds were wrong,
names read by turns through a constant, a function or asked_for! were missing,
and test modules with a brace in a raw string were cut short. measuring_fps.md
now says how to give LEONIDA_AB to the launcher and what GPU_TIMING and
PROFILE need.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 10:42:33 +01:00
b8508a974b Merge branch 'main' of https://github.com/ProjectLeonida/mandy into fix/rendering-correctness
# Conflicts:
#	tests/semantic/test_interp_computed_ij_fallback.py
2026-11-30 04:36:05 -05:00
589b2d28fa docs: how to measure the D3D12 runtime's frame rates, and its LEONIDA_* variables
d3d12/docs/findings.md was reachable from d3d12/README.md alone, so a night of
runs repeated measurements it already holds. Index it, point AGENTS.md at it,
say how to measure (a switch by turns inside one run), and list the variables
the runtime names from its own sources: 415 of 669 were in no Markdown file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 10:29:56 +01:00
f7764579a3 Merge pull request #2668 from aslan2142/chore/tier1-main-hygiene
chore: remove dead Tier 1 files, wire 5 unwired C++ tests, and fix play.ps1 path
2026-11-30 09:33:39 +01:00
5ad756bd0b Merge origin/main into next (the x64 recompiler finds QEMU through QEMU_AARCH64 or PATH)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 03:14:24 -05:00
206bb4b688 run_game_wine.sh: --cache fresh is cold: drops the drivers' cache variables and an old session/cache (WINE-RUN-SHADER-CACHE)
Review follow-up (timbot103):
- A driver's own variable wins over XDG_CACHE_HOME, so a warm MESA_SHADER_CACHE_DIR, MESA_GLSL_CACHE_DIR or
  __GL_SHADER_DISK_CACHE_PATH reached Wine under --cache fresh. A fresh run now unsets them; with a kept cache the
  caller's variables stay and win. --help and docs/linux_proton.md say so.
- A run folder whose earlier launch did not start is accepted again: a fresh run now empties its session/cache, and
  session.txt is written anew instead of getting a second "shader cache:" line.
- test_run_game_wine_safety's shared fixture passes --cache fresh, so an inherited XDG_CACHE_HOME stays out.

Two new tests in tests/test_run_game_wine.py fail with the old script and pass with this one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JPqXc6svM4pbBagTsVEYA3
2026-11-30 08:14:20 +00:00
b7bca9eabf Trainer notes: a time of day set while the title loads ended it once; set in the world, the night is right
Runs d197 and d199: 23:00 asked 60 s after the start stopped the title within two seconds (an access violation in
KERNELBASE on another thread); asked at 120 s, in the world, it did not, and the night tour's 545 frames show no
one-frame dips or spikes.

AI-assisted (Claude). Tested on an RTX 4060 Ti 16 GB, driver 616.64, Ryzen 5 7600X.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 03:14:07 -05:00
d762b13973 Merge pull request #950 from barkodr/fix/x64-recomp-qemu-path
x64_recomp: find qemu through QEMU_AARCH64 or PATH, not a contributor's home folder
2026-11-30 09:13:23 +01:00
e1fe82f638 Merge origin/main into next (PlayStation glyphs, the x64 recompiler's test runners)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 02:20:43 -05:00
49e93960ca Game actions: the player's place in the world's coordinates (GET_ENTITY_COORDS); lift <metres>
Run d195 had the native teleport move the player at once, but into the bay far from the deck: the place read from
the ped (+0x70, as Game::position reads it) is relative to an origin of the title's own, and SET_ENTITY_COORDS takes
the world's coordinates (the native database has GET_ENTITY_COORDS decode +0x70 into them).

- Game::world_position: GET_ENTITY_COORDS on PLAYER_PED_ID's reference (its flag 1), the vector's three floats.
- The title's thread reads it every 15 of its updates while the natives are found; game_actions::position() (the
  menu's Teleport page and its saved spots) gives that place, never the ped's own for it.
- Request::Lift (lift <metres>): that far above the player's place in the world, through Request::Teleport.
- The info line and the teleport's line give both places.

Also seen in d195: 6,805 natives found by their handlers, PLAYER_PED_ID's reference, god mode on and off.

Tests: the game_actions tests pass (lift read in script_commands_read). Not yet seen in the running title.

AI-assisted (Claude). Tested on an RTX 4060 Ti 16 GB, driver 616.64, Ryzen 5 7600X.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 02:20:20 -05:00
3c4c5a5cc9 Merge pull request #2666 from ItsYusei99/ps-glyphs-dualsense
PlayStation glyphs: --mono, a look close to the PS5's prompts; the DualSense d-pad; no black halo (PS-GLYPHS-MONO-DUALSENSE)
2026-11-30 08:12:10 +01:00
bbd45f5cc1 Game actions: teleports by the title's own teleport (SET_ENTITY_COORDS), and a wanted clear the HUD sees
- Request::Teleport (	eleport <x> <y> <z>): SET_ENTITY_COORDS on PLAYER_PED_ID's reference, the place as four
  packed floats in two slots, the three axis flags off and the area cleared, the last float 0 (nine slots, as the
  native database has the native take). warp(), which the menu's Teleport page and leonida.teleport call, asks
  for it whenever both natives were found, in place of the experiment that writes the ped's position
  (LEONIDA_GAME_ACTIONS_WARP=1, still there without the natives).
- Request::Wanted(0) also calls CLEAR_PLAYER_WANTED_LEVEL on the player's reference: run d179 had the HUD keep
  two red stars after the title's own function cleared the level.

Hashes from modpapi/scripthook-vi's native database (CC BY 4.0). Tests: the game_actions tests pass (teleport
read in script_commands_read). Not yet seen in the running title.

AI-assisted (Claude).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 01:14:53 -05:00
24ccd36c2e Trainer: the game actions seen working in the running title (run d179); the HUD's stars after a clear
Weather, time, wanted level, the health cheat, and the spawn of any vehicle by its model's name (the airport bus, a
model none of the nine cheats holds, came down just ahead of the player) did what was asked on the title's thread.
The HUD kept two red stars after the wanted level was cleared through the title's own function (its state read 0).

AI-assisted (Claude). Tested on an RTX 4060 Ti 16 GB, driver 616.64, Ryzen 5 7600X.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 01:12:32 -05:00
5f8f20d774 Game actions: the title's script natives found by their handlers; god mode through them (god, native <hash>)
The natives were never found as a table (docs/mod-menu.md, "Looking for the script natives"): the title builds
its own at run time. Every handler has one shape, though: it checks its argument count first
(`cmp dword [rcx + 10h], 0`) and on a negative one jumps (`js`) to an error block that stores its native's own
64-bit hash where the result goes (`mov rax, [r]; mov r2, imm64; mov [rax], r2`).

- leonida_loader::natives: scan() reads that hash from every such handler in the code and keeps the start of the
  function it lies in (from .pdata, at most 0x20 bytes before the check); a hash at two handlers names neither.
  find() does it over the mapped image. In the 1.0.2.1 executable: more than 6,000 natives, PLAYER_PED_ID's and
  SET_ENTITY_INVINCIBLE's hashes among them (the handler with the latter is the one El1xr's trainer calls for it).
- Game actions: call_native() passes a handler its call context (argument slots, the results' slots, the count;
  16-byte aligned slots), on the title's thread that runs its cheats. New requests: God(on), SET_ENTITY_INVINCIBLE
  on PLAYER_PED_ID's reference (`god <0|1>`), and Native { hash, args } (`native <0x hash> [slots]`, for tests).
  The natives are scanned at install and counted in the console.

The shape and the call context are kylepelham/El1xr's findings (third_party/victory/.../modmenu/natives.rs,
GPL-3.0); the hashes are modpapi/scripthook-vi's native database's (CC BY 4.0). Written here anew.

Tests: natives::tests (a handler's hash names it, near and far jumps; a hash at two handlers, a handler outside the
unwind table, other registers or a load through rsp or a check too deep name nothing; the unwind table read
sorted; the retail executable's natives with LEONIDA_GAME_DIR), game_actions spawn_tests
a_native_call_hands_its_handler_the_slots_and_the_count, and the new commands in script_commands_read. All pass.
Not yet seen in the running title.

AI-assisted (Claude). Tested on an RTX 4060 Ti 16 GB, driver 616.64, Ryzen 5 7600X (unit tests and the
executable check only).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 01:02:21 -05:00
69454e705a Live prompts: call lnInit from each symbol class's constructor
In the second run in the title, Main's initialiser ran (the run-time
sentinels were found, four copies) but lnMade stayed 0: the hook in
mx.core.SpriteAsset never ran. The three movies that load the glyph movie
each define mx.core.SpriteAsset too, and theirs is the one used. The 38
Main_Button_N classes and platform_xbsx.input_icons.Main are defined only
in the glyph movie (the loaders' document classes are generic_movie.Main,
hud.Main and map_scripted_movie.Main), so each Main_Button_N constructor
now calls Main.lnInit(this) in a try block and SpriteAsset is left as it
is. 459 bytes to spare.
2026-11-29 23:20:51 -05:00
1fb8c4bfef Live prompts: sentinels made at run time, counters, PlayStation on top
The first run in the title found four copies of lnLo/lnFamily/lnHi eight
bytes apart, wrote them on every switch, and the prompts stayed keyboard.
The sentinels were the slots' defaults, so a template of defaults could
match, and the keyboard pieces were drawn over the PlayStation ones, so
code that never ran looked like writes that missed.

- Main's static initialiser now computes lnLo and lnHi (half of each
  sentinel times 2) before its own code: no copy of the movie or of a
  slot default holds them.
- lnMade (prompts made) and lnShown (pictures switched) follow lnHi; the
  runtime reads them through the found layout and logs them when found,
  on each write and every 30 s. A find needs whole numbers there and must
  not lie inside a copy of the movie; both rejects are counted.
- Sprites place the keyboard pieces first and the PlayStation pieces on
  top (the first named p): if the code does not run, prompts look
  PlayStation on every device.
2026-11-29 23:03:09 -05:00
54374cf53e Button prompts that follow a device switch during play
tools/live_prompt_glyphs.py builds ps_live_prompt_glyphs.gfx over the
title's glyph movie on the player's PC: each Main_Button_N sprite holds the
PlayStation and the keyboard picture (the first keyboard piece named k),
and the title's ActionScript block gets three static Number slots on Main
(lnLo, lnFamily, lnHi, the outer two sentinels), four static methods that
show the pad or the keyboard pieces when a prompt is made and on each frame
while it is on the stage, and a call from SpriteAsset's constructor, the
base of exactly the 38 symbol classes. Everything added is in try blocks.
tools/abc_file.py reads and writes ABC byte for byte. Both sets and the
code fit the 28,148 bytes with 1,057 to spare on the user's movie.

leonida-hle serves the live movie for a PlayStation pad or the keyboard
(unless LEONIDA_PROMPTS forces a family; LEONIDA_PROMPTS_LIVE=0 restores
one family's movie, LEONIDA_PROMPTS_PAD=xbox keeps a keyboard start on the
keyboard movie), with lnFamily's default set to the family in use, then a
below-normal thread finds the slots by their sentinels through
ReadProcessMemory and writes each change of the active family.

prompt_glyph_movies.py builds the live movie too (only over the title's).
Tested: the added code checked path by path and run in an interpreter over
fake display objects, the sentinel scan and writes on a fake heap. Not yet
run in the title.
2026-11-29 22:24:55 -05:00
95bc33f6e2 Built-in keyboard prompts, and both prompt movies built for every player
tools/pc_prompt_glyphs.py draws its own key caps, arrow keys and mouse in
code when --glyphs is not given (no pictures, Pillow or font), with the keys
of the runtime's on-foot table, each inside the outline of the Xbox glyph it
replaces and covering no more of the canvas (measured on the user's movie,
numbers only). tools/prompt_glyph_movies.py builds pc_ and ps_prompt_glyphs.gfx
over the title's movie (standalone if data.rpf cannot be read) into
d3d12/target, where leonida.exe looks; play-nvidia.ps1 runs it before a start
and make_game.py in its runtime stage. A movie the player made is never
touched or shadowed; its own are stamped and rebuilt only when inputs change.
2026-11-29 21:49:50 -05:00
18936010df chore: remove dead Tier 1 files, wire 5 unwired C++ tests, and fix play.ps1 path 2026-11-29 20:00:40 -05:00
4ae05e76c0 PlayStation glyphs: --mono, a look close to the PS5's prompts; the DualSense d-pad; no box behind a glyph
- `--mono` draws white keys and discs with black symbols, as the PS5's own button prompts look.
- In that look the d-pad is the DualSense's: four separate arrow keys pointing at the middle,
  the pressed ones white and the rest grey (all white for the plain d-pad and for all four).
- Mono sprites have no see-through bounding box behind them: when a menu highlights an option,
  the title's colour change showed that box as a black halo around the glyph.
- tests: no box behind any glyph in the mono look, the d-pad's key colours, the mono movie builds.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-29 18:32:16 -06:00
129c840089 ci: fix runtime/windows timeout, remove redundant CI legs, and harden caches 2026-11-29 19:17:38 -05:00
1786d7ad5b docs: table of which imported GDK names have a public page (DOCS-GDK-PUBLIC-PAGES)
Measured 2026-11-29 by HTTP against the public docs.xbox.com index and
Microsoft Learn; page contents not read, nothing copied from the GDK.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 23:43:34 +01:00
060c471604 Merge pull request #1730 from efeekrb/claude/vibrant-tesla-g37dow
docs/boot_leads: say which leads are done and which have open pull requests (DOC-BOOT-LEADS-STATUS)
2026-11-29 22:13:17 +01:00
345da0378d Merge pull request #2490 from thiefyzheng/fix/design-md-duplicated-rows
docs/design: de-duplicate the s_bfe contract-table row
2026-11-29 22:12:56 +01:00
ed089a96ae Merge pull request #1217 from robot00f/docs/ctest-hosts
docs: the runtime ctest suite by host, Wine against native Windows, on one Pascal card (#1150)
2026-11-29 22:12:47 +01:00
f359be5e6b Merge pull request #1125 from robot00f/docs/b1
docs(d3d12_vulkan): measured presentation slots 78-81 (D3D12-PRESENT-SLOTS-MEASURED)
2026-11-29 22:12:39 +01:00
255b6752ce Merge pull request #1056 from robot00f/docs/d3d12-other-pages-consistency
docs: align the other pages with the measured CreateDevice block size and slot 62/76 (D3D12-OTHER-PAGES-CONSISTENCY)
2026-11-29 22:12:30 +01:00
edf0ff5d02 Merge pull request #2631 from MoonEyes/docs/readme-index-missing
docs: index the 11 pages missing from docs/README.md (DOCS-README-INDEX)
2026-11-29 21:17:53 +01:00
f3684d98ce docs: index the 11 pages missing from docs/README.md (DOCS-README-INDEX)
port_status, port_plan, victory_gap_gpu, victory_gap_system, launcher, mod-menu, lua-modding, ultrawide, test_inventory, junit_triage and change_gate had no row in the index. Each row summarizes the page's own opening.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 20:39:13 +01:00
aa35c7eb6e docs: how to use the public PC GDK to write shims (DOCS-GDK-PUBLIC-REFERENCE)
One page for contributors: what the public GDK reference and headers cover for the imported console APIs, what they do not (d3d12_xs, NDA), the 4-step method on the existing shims and tests, and the lines not to cross. Indexed in docs/README.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 20:36:51 +01:00
dd87aa405a Merge pull request #339 from huanchong-99/docs/change-gate-proposal
docs: proposal for a change gate (module boundaries, function complexity, doubled text)
2026-11-29 20:02:41 +01:00
8f7101df63 Merge pull request #1179 from MalexAson/fix/srgb-rtv-clear-encode
vulkan_replay: sRGB render-target clears are encoded in the layer, as WARP encodes them (D3D-CLEAR-SRGB-ENCODE)
2026-11-29 20:00:27 +01:00
37d2d73dcd d3d12: save a rolling timeline after a frame stalls 2026-11-29 20:47:19 +02:00
4bf6c65254 Merge main: keep main's two KosmicKrisp rows, add the cs_fmt_all row
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 19:39:19 +01:00
7c330c76db Merge pull request #2236 from zmasi/fix/dstorage-multilevel-bcpack-fit
build_dstorage_history: fit missing BPTC history slots across multi-level sibling mips (DSTORAGE-MULTILEVEL-MIP-FIT)
2026-11-29 19:37:07 +01:00
878b024f4c Merge pull request #2602 from EvgHaze/docs/kosmickrisp-nan-rows
docs/testing: record the two ps_* KosmicKrisp NaN cases
2026-11-29 19:29:05 +01:00
e217665ce6 Merge pull request #1969 from j-weiner/docs/v100-cube-store-status
docs(testing): note V100 cube-store failure
2026-11-29 19:28:48 +01:00
0c6f42deaa Merge pull request #1872 from fiestorra/carry/shader-vcc-base-gpu
docs: the s_load vcc-base row is GPU-checked on RDNA2 and under wave64 emulation (SHADER-VCC-BASE-GPU-VERIFIED)
2026-11-29 19:28:41 +01:00
c4e3ae5118 Merge pull request #1802 from Ch1mpleo/carry/old-9801
docs: D3D-56 descriptor lookup numbers on RTX 3070 (Ampere, ReBAR off) (OLD-9801)
2026-11-29 19:28:35 +01:00
dd8200526b Merge pull request #1396 from qhukz13/cont/docs-1050ti-driver
docs/d3d12_vulkan.md: the GTX 1050 Ti host-transfer measurement names driver 582.66 too (DOC-1050TI-HOST-TRANSFER-DRIVER)
2026-11-29 19:27:54 +01:00
aacc89a1c3 Merge pull request #1395 from Diegobecker07/old-9961-skip-asserts
runtime: LEONIDA_SKIP_ASSERTS steps over guest asserts without a trace (OLD-9961, RT-526)
2026-11-29 19:27:49 +01:00
e6901a5a61 Merge pull request #1007 from robot00f/docs/d3d12-device-slot-arity
docs: device slot 62 takes five parameters and slot 76 has no call site in the executable (D3D12-DEVICE-SLOT-ARITY)
2026-11-29 19:27:31 +01:00
caf4fc3698 Merge upstream main into the PR branch 2026-11-29 16:54:24 +00:00
eff40832ef Merge remote-tracking branch 'refs/remotes/mandy/main' into fix/rendering-correctness
# Conflicts:
#	runtime/shims/d3d12_com.cpp
#	runtime/shims/d3d12_vulkan_device.cpp
#	runtime/src/command_list.h
#	runtime/src/vulkan_replay.h
#	runtime/test/gfx10_descriptors_test.cpp
2026-11-29 11:51:06 -05:00
59ce2c87b0 Merge origin/main into carry/pr-65
tools/rdna2spirv.py: main's d16 "destination is also read" check (now
DST_ALSO_READ, plus buffer_load_format_d16_hi_x) gains the PR's flat_load_
prefix. docs/design.md: main's 8/16-bit global row is kept and the PR's
"Flat memory" row follows it.

Co-authored-by: tiagonogueiraa-bit <360313680+tiagonogueiraa-bit@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 17:23:56 +01:00
0cedc3a625 Merge pull request #1918 from kawaii-shakal/fault-address-owner
d3d12: the device-fault report names what the process and the driver had at each fault address (RT-FAULT-ADDRESS-OWNER)
2026-11-29 16:45:59 +01:00
950259cd40 Merge pull request #1931 from kawaii-shakal/io-trace
dstorage, fs: LEONIDA_IO_TRACE logs every read the title asks for, flushed as it goes (RT-IO-TRACE)
2026-11-29 16:43:26 +01:00