Do not call a title trace the only source. The checker verifies that the local export table and CONSOLE_IIDS do not assign the four values; SCARAB's vendor-runtime observation stays attributed, and a QueryInterface trace is one possible future source.
From @CharlyRien's review of 056661d:
- XUserUnregisterForChangeEvent returns true for every token: false means
"still pending", which never happens offline, so a title polling with
wait = false spun on an unknown or repeated token.
- XUserIsStoreUser is true, also for a null handle (_In_opt_; documented
as always true on console).
- Slot 15 (no public signature) answers E_NOTIMPL instead of S_OK with
nothing written. XUserIsSignOutPresent (47) stays 0: it is read as a
bool, and E_NOTIMPL's low byte would mean true.
- Handles are validated by lookup in a live set rather than by reading a
magic in memory that may already be freed; a double close is a no-op.
- LEONIDA_GAMERTAG of any length reaches the "longer than 15" message
(the length is queried first; 64+ characters fell back silently).
Tests: 42 checks; a new ctest run with a 70-character gamertag.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Combine real graphics-chain manifests and translator wave tiers with per-stage Vulkan subgroup properties. Report aggregate counts and offer a strict gate for approximate or unverified stages.
AI-assisted. Tested with synthetic 32/64-lane capabilities, translated hand-written RDNA2 programs, and the live Vulkan probe on Mesa llvmpipe.
- the round-40 fix (ec8ec4c9) stitched the five s_cmov_b64-titled rows
into one sentence by sentence: two Source:/CPU-checked groups, a
pasted half-sentence fragment, and "**Not measured on RDNA2.**"
right after the gfx1035 (SHADER-137) and gfx1036 measurements the row
itself lists; the older row without s_cmov_b64 in the topic survived
at line 335, so test_docs_design_rows does not flag the pair
(self-sourced; found by @jayneebabageyus in issuecomment-7083604496
while fixing PROC-132).
- keep one row with the s_cmov_b64 topic cell: the lane-mask rationale,
the SOPInstructions.td source and the test_salu_cmov_b64.py CPU list
from the pre-merge row (43f8e34d), the cs_w32_salu64/cs_w32_int_ext
GPU-test naming (8564110a), the gfx1035 SHADER-137 and gfx1036
int_hw_probe/salu_diff measurements (06f36cec, fe7edb58); the stale
"Not measured on RDNA2." tail and the line-335 duplicate dropped.
- docs checks 4/4 green (11 tests).
AI-assisted.
# Conflicts:
# docs/design.md
The census in the "Wave64 graphics: partition invariance" row (11,405
shaders; A 1,919, B 17, C 9,469; GS 0/0/195) predates the FSSM-header
wave size and the GS ring-address rule. wave64_halves.py --census over
all 26,503 shaders translated at f847748c gives 13,405 shaders
(2,236 VS, 10,974 PS, 195 GS); A 4,033, B 85, C 9,287; GS 195/0/0.
The row left "if the corpus GS form their GSVS base from v_mbcnt, they
were all a false tier C; --census shows it" open: it shows it. The
"Geometry shaders" row said wave64 was inferred, not confirmed: the
FSSM header flag and the index say wave64 for 195 of 195. Its stale
duplicate sentence that still said wave32 is removed.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
A string table with more than 1 MiB of text splits its blob into several
tag-0x10 descriptor entries. From the blob on, the descriptor is a run of
16-byte entries (u32 tag, u32 bytes, pointer). An index entry names its chunk
in the low bits of its second word (0b1cc, chunk = flags & 3). string_tables()
read every offset from the first chunk, so 293,292 strings in 23 data.rpf
tables came out with the wrong text and no error. story000.rpf and
shared_minigame000.rpf tables read the same as before.
docs/text.md documents the entries and the chunk bits, updates the
story000.rpf table count to what main reads today (15,951), and lists the
hash entries with byte +8 = 5/7/8 as an open question.
Section 5 still listed "whether all 515 streams are playable" as
unknown (nine decoded, 506 only header-validated) and said
BinkOpenTrack/BinkGetTrackData were not called successfully.
bink_decode_test, run on every stream of movies.rpf in turn, exits 0 on
515 of 515 (BinkOpen, frames 0 and 1). bink_audio_test, run per track
with LEONIDA_AUDIO_FRAMES=60, passes on all 229 tracks of the 196
streams that have audio, each returning PCM. Measured at main 16282101
and f847748c. Counts only; no frame was viewed and nothing is compared
with a reference, which the page now says.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Two rows for Known problems, both hit while setting up the clang-cl
cross-build and the Wine tests on Ubuntu 24.04:
- clang-cl-19 isn't in the clang-19 package: Debian and Ubuntu put the
versioned clang-cl link in clang-tools-19.
- Ubuntu's Wine 9.0 aborts at once (free(): invalid pointer, or a
segfault) when /run/user/<uid> doesn't exist, as in a container or a
root shell without a login session. Creating the folder fixes it;
setting XDG_RUNTIME_DIR alone does not (checked both ways).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GN11jcpJWD4phrXJyDgED6
The shim's CopyFile2 called ::CopyFile2 directly. Wine 9's kernel32 and
kernelbase don't export it, so Wine binds that import to a stub that
aborts the process: under Wine 9 (or a Proton built on it), a title that
calls CopyFile2 is killed. The file_system test shows it: it aborts at
its CopyFile2 check and runs into ctest's timeout.
The host's CopyFile2 is now looked up with GetProcAddress (kernelbase,
then kernel32) and used where it exists, so Windows behaves as before.
Where it doesn't, the copy goes through CopyFileExW: the flags both calls
define and the cancel flag are passed on, the CopyFile2-only hints are
dropped, and a COPYFILE2 progress routine is not called. pe_loader.cpp
and loader_tls_test.cpp already avoid CopyFile2 for the same reason.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GN11jcpJWD4phrXJyDgED6
bvh_builder_test measures 53 PSO creations over XboxBvhBuilder.dll's 52 containers.
With LEONIDA_BVH_RECORD62=1 the test now prints each container's ILDN module name and the
first bytes of its digest, which answers the open question in docs/embedded_shaders.md:
creations 1-51 are 51 distinct containers (GetBVHCompactedSize at 47), 52 is
CopyAndCompactBVH (0x1134 bytes) and 53 is GetBVHCompactedSize again (0x14a4 bytes, same
digest): the container FUN_18001d400 passes for "XDXR PostBuildInfoQuery".
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Native image_bvh_intersect_ray on an RX 6900 XT (gfx1030, tools/hw_oracle, 338 cases) picks each axis's near
and far plane by the sign of the inverse direction, takes the inverse direction as given (0 x inf is NaN),
reduces the three near and the three far t with NaN skipped (all-NaN is a miss), and sorts by max(tnear, 0)
through the network (0,2) (1,3) (0,1) (2,3) (1,2). A lone NaN bound leaves its plane open and an empty box
misses without a separate check, so #3373's empty-box test is folded into this rule.
The translator now matches all 338 measured cases (main 43). cs_bvh/cs_bvh32 and vk_compute_test expect the
scene's NaN box at t = 0, as native gfx1030 returns. tests/semantic/test_image_bvh_box_hw.py holds 241 of the
measured cases. docs/design.md Ray tracing row updated; the descriptor base is measured too.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
docs/audio.md still listed a custom RSC8 audio resource as the only
mission-side container not decoded, and story.md and restofworld.md
still called the RSC8 bodies opaque. rsc8_audio.md (ASSET-56) decoded
them: all 641,428 raw RSC8 headers in the package are AWC tag 0x5c
facial/lip-sync clips beside their Opus dialogue line, none outside an
ADAT bank and none holding an audio container. Re-measured on a local
1.0.2.1 copy with tools/rsc8_audio.py over all 22 archives (counts only).
restofworld.md also said its archives hold no audio banks; story-rest
holds 15 ADAT banks, the other five none.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review follow-up on #3500 (@whattheflop): the status paragraph now says
M1 is met with stand-in shaders (d3d12_draw_test), M1.5 with hand-written
RDNA2 run through the translator (d3d12_translated_draw_test), and M2's
synthetic part by d3d12_m2_textured_test (descriptor heaps, SRVs, a
sampler and a translated textured-quad draw, 4,096 exact pixels), as the
milestone table records. The pipeline-state-stream and mesh gap links to
D3D-29 (#1712).
Written with AI assistance (Claude, via OpenBot).
Tested: python -I tests/test_docs_{design_rows,links,list_items,repo_paths}.py,
tests/test_i18n_index.py and tests/test_text_write_line_endings.py pass
(Windows 11, docs only).
Co-authored-by: OpenBot <335604065+openbotgit[bot]@users.noreply.github.com>
vk_sandbox draws the props around a point with one translated game VS/PS
pair chosen by signature and descriptor layout: a real camera through the
VS constants, DiffuseTex albedo through the bindless set and the PS's own
S#, depth, and a fly/walk/drive window. tools/sandbox.py packs the scene
(tools/sandbox_scene.py), picks the pair and runs it; --check prints
counts only. docs/sandbox.md has the table layout and the measurements.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PiKMETzszqwfnV8QQyzocY
All six nonzero values of u32@0xE8, read as bytes from the lowest
address, are a second, minute, hour and day of month (struct tm order);
no month or year is stored. The day-22 stamp marks the 3,003 tiles
stacked on 940 grid positions on top of the day-9 base grid (2,984 share
a position with a day-9 tile, and always come later in the archive).
Counts from tools/navmesh_decode.py's scan of the 1.0.2.1 package; no
geometry or game data.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
docs/design.md listed four s_buffer_load bound cases as not measured. Three
of them are now measured natively on gfx1036 (tools/hw_oracle, wave32 =
wave64, every read inside a seeded region): s_buffer_load_dwordx16 is
bounded per dword like x8, NUM_RECORDS x stride is not cut to 32 bits
(2^32 and 2^32 + 8 keep all dwords in range), and NUM_RECORDS at or above
2^31 is unsigned. These are the rules the translator already used, so no
code changes; SmemHardwareRuleTests now pins each of them. A 32-bit
product, a signed NUM_RECORDS or one bound for the whole load each fail a
test. sOFF >= 2^31 was measured by #2255 (SHADER-336), so the row's
not-measured list now keeps only V# dword1[31:30] and gfx1013, and the
stale copy of the old list after it is dropped.
The on-screen colour check ran whenever the test's window was the foreground window, but the foreground window
can still be covered at its centre (an always-on-top window, or one another process showed without taking the
foreground). GetPixel on the screen DC then returned that window's pixel and the test failed, although the
presented images had already been checked: 3 of 20 runs on the Radeon iGPU and 5 of 30 on the RTX 3070 with
another application in use.
A read now counts only when WindowFromPoint at the centre, taken to its root window, is the test's window before
and after the read; otherwise the check is skipped with a line saying the centre is covered, like the existing
"not in front", HDR and CLR_INVALID skips. A pixel that is not the clear colour is read again every 50 ms for up
to a second before the EXPECT, since how long the compositor takes to show the last frame is not known; nothing is
presented meanwhile, so a wrong colour that stays still fails. A click-through layered overlay is not seen by
WindowFromPoint and still fails the check; the comment says so.
docs/d3d12_vulkan.md: the sentence on the check names the new condition.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
A row listing the opcodes that exist only on GFX10.1 (the console's
gfx1013) or only on GFX10.3 (gfx1030/gfx1036, the hardware oracle), from an
llvm-mc sweep of every GFX10 opcode, with the translator's status for each.
The v_mad_f32/v_mac_f32 denormal row no longer says an RDNA2 part has those
opcodes: on gfx103x their legacy encodings are the fused fma_legacy forms.
AI-assisted.
The tool staged the chosen VS and PS containers in <work>/first_light/dxbc and had them translated into
<work>/first_light/spirv, and emptied neither. fssm_unpack.py, shader_disasm.py and rdna2spirv.py take every file
in the folder they are given, so a second run with another shader translated the first run's container again:
"3 shaders: 2 translated" for a pair, the extra one with "stage ?", and its files stayed beside this run's.
reset_run_folders() removes both folders at the start of translate() and creates an empty dxbc. first_light/out,
another --out and <work>/shaders are not touched. A folder that is a symlink or a junction, or sits behind a
linked first_light, is refused before anything is removed; a link inside is unlinked without being entered; a
file that cannot be removed ends the run with one line naming it.
tests/test_first_light.py: RunFolderTests runs the tool twice in one synthetic work folder, with stand-ins for
the three tools that take every file like the real ones. docs/first_light.md says the two folders are per-run.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The 1.0.2.1 package has 16 DLLs and no D3D12 runtime DLL; gameos.xvd is encrypted with no plaintext D3D12 strings, and the executable that would call QueryInterface is absent. SCARAB's provenance note also says the runtime does not export ID3D12ConsComputeCommandList/6/8 or ID3D12ConsCopyCommandList6, so no export table can supply them. Correct the surface/export-contract rows and lock the negative in the checker and test. All four stay unknown until the title's QueryInterface is logged.
The error block at 0x106ba stores 0x80070057 and calls
VCRUNTIME140!_CxxThrowException (0x10702, through the thunk at 0x2302e);
the export returns void. Found by @CLHelper. The §5 bullet said "not in
the package" twice; drop the second sentence (@ramenbellic).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
All ten saveexec kinds and both wrexec forms match the EXEC-logic table, including lanes switched back
on by nand/nor/orn/xnor and the SCC vote. 36 of 36 programs on native gfx1100.
A buffer_load_format with a V# format decoded every format and selected one.
A binary search now runs only that format's decode, and the element size is
picked from the format alone. Identical output on an RTX 4090 for all 128
codes in four configurations, 4.2x to 6.1x faster in a load benchmark.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
vk_harness takes VKH_COLOR_FORMAT=<VkFormat>:<bytes> for its color target
and writes the target's texels as stored. ps_oracle.py --format picks it
(the driver then picks the export format, as for a game pipeline), with
an integer-output const template for integer targets. docs gets the
export behaviour measured on gfx1036: 32_GR / 32_R take the last enabled
channels, a compr export reaches 16-bit UNORM/SNORM/UINT/SINT targets bit
for bit, FP16 targets get the halves as f16 (a NaN half becomes 0xfe00).
AI-assisted.
Review follow-up: section 4.5's "What exists" said the DXGI shim's Present
and PresentX are both implemented over leonida::VulkanPresenter and that
on both paths GetBuffer(i) returns ordinary textures blitted at present.
Only PresentX goes through VulkanPresenter (xbox_present.cpp:25-30) and
takes ordinary textures. SwapChain::Present (dxgi_com.cpp:194) presents
through leonida::VulkanSwapchain (dxgi_com.cpp:452, dxgi_swapchain.h:107);
its GetBuffer(i) returns the swapchain images (dxgi_com.cpp:432-436,
dxgi_swapchain.h:218-229) and uses offscreen images plus a blit only when
the size or format differs from the surface's (dxgi_swapchain.h:538-541).
Section 3.2's "the part every present front end needs" now names PresentX.
Written with AI assistance (Claude, via OpenBot).
Tested: python -I tests/test_docs_{design_rows,links,list_items,repo_paths}.py,
tests/test_i18n_index.py and tests/test_text_write_line_endings.py pass
(Windows 11, docs only).
Co-authored-by: OpenBot <335604065+openbotgit[bot]@users.noreply.github.com>
- Add parse_texture_dict_page in tools/tex_headers.py to extract grcTexture descriptors, name hashes, and data offsets from pgDictionary pages.
- Update docs/textures.md resolving the ASSET-274 hypothesis: all 1,313 texture page pairs are keyed by waterfog/waterfog2 joaat32 hashes matching the active world streaming grid cells, with formats strictly matching DXGI enums (0x5f = BC6H_UF16, 0x62 = BC7_UNORM, 0x4d = BC3_UNORM).
- Add synthetic unit tests in tests/test_tex_headers.py for parse_texture_dict_page.
RDNA2 ignores VOP3 OPSEL on v_cmp(x)_*_{f16,u16,i16}_e64: on a gfx1036, through the Windows HIP launcher and
independently the Linux DRM one (#3329), all 50 raw-word rows read the low halves, wave32 and wave64, while the
same bits on v_add_nc_u16_e64 select the high halves. Gen.compare honoured op_sel (from the ISA text and ACO) since
2026-11-22; it now reads bits [15:0] of both sources and applies neg/abs or the zero/sign extension to those.
No listing can carry op_sel on these compares (llvm-mc rejects it and drops the bits), so this changes the output
only for a hand-encoded word.
tests/semantic/test_vcmp16_opsel.py keeps every listing and op_sel combination but expects the low-half answer
(neg/abs rows computed from the low halves, v_cmpx lanes from the low-half result); the translator that honoured
op_sel fails 111 of its checks. The docs/design.md row describes the rule and the measurement.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>