Commit Graph

6 Commits

Author SHA1 Message Date
c59ae5ed63 docs(cpu_features): record baseline instruction counts and AVX1/SSE4.2 host delta
Record the baseline instruction counts measured by tools/cpu_feature_scan.py
(at 0b11d86b) on the 1.0.2.1 executable (AVX, FMA, AVX2, BMI1, BMI2, F16C,
AES, ADX, PCLMULQDQ, POPCNT, MOVBE, LZCNT, CX16, PREFETCHW, and the absent
RDRAND/RDSEED/FSGSBASE/CLFLUSHOPT sets), including the 32,101 register-source
vbroadcastss/vbroadcastsd sites counted under AVX that require AVX2 and the zero
vgather*/vpgather* count.

Add a subsection on AVX1 + SSE4.2 hosts (Intel Sandy Bridge and Ivy Bridge)
separating the Haswell/ABM delta that faults with #UD from legacy LZCNT/TZCNT
(F3 0F BD / F3 0F BC), which execute silently as BSR/BSF without #UD while 988
.pdata tzcnt sites immediately feed a CF consumer and 149 .pdata lzcnt sites
are 4-byte encodings.

Claim: https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7181466437
AI-assisted: yes (Antigravity, Gemini 4 Carbon)
2026-11-26 00:37:35 -03:00
7c39802eaa Merge pull request #854 from dpalacios69/docs-no-avx-hosts
docs/cpu_features.md: document hosts without AVX and SDE+Wine findings (DOC-NO-AVX-HOSTS)
2026-11-25 22:15:25 +01:00
273b3bdf9d [integration] Linux/Proton and native Windows: boot through the story load (RT-PROTON-STORY-LOAD)
One squashed commit of a fork that was developed on a Linux/Proton machine and
tested on two native Windows machines. On all of them the retail 1.0.2.1
package now launches, shows its launch movie, first-run pages and landing
prompt, runs the story load to its end with the loading slideshow drawing its
artwork, and enters the world phase. A first world frame is not verified yet.
docs/linux_proton.md has the setup, a healthy boot's timeline, the machines
and where it stops.

Runtime: frames in the title's own window; DirectStorage pinned reads,
page-list scatter/gather, BCPack and unshuffle with a locally generated
predictor file; pooled, device-local and deferred image backing for streamed
and placed textures; enhanced barriers into LAYOUT_UNDEFINED; a bindless table
that degrades instead of refusing a submission; a descriptor hash finalizer
(off until a library carries it); directly indexed heap offsets for compute
dispatches and VS/PS/GS draws; title buffer windows outside a fragmented
arena; opt-in device-local copies of streamed buffer views; write-fault
retries under the tracker lock, shared trackers and write-watched title memory
for native Windows; device-loss, compute-input and memory probes.

Translator: loop bounds at structured exits, the eight FidelityFX programs
that use a packed-dot form the disassembler skips, buffer bounds modes per
view kind, a compaction option, the hash finalizer option.

Tools and scripts: Linux boot scripts (Wine/Proton, no network), a Windows
boot script, the paired compute translation script.

No game data. AI-assisted (Claude Code and Codex agents), reviewed and booted
by people on the machines named in docs/linux_proton.md.

Co-authored-by: Plaaasma <47513553+Plaaasma@users.noreply.github.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-24 11:42:12 -06:00
37c601760e docs/cpu_features.md: document hosts without AVX and SDE+Wine findings (DOC-NO-AVX-HOSTS) 2026-11-24 15:18:07 +01:00
62b410e756 gta6rt: emulate the Zen 2 instructions a desktop CPU may lack (INSERTQ/EXTRQ, CLZERO, MONITORX/MWAITX, CLWB)
The executable uses SSE4a INSERTQ, CLZERO and MONITORX/MWAITX (AMD only) and CLWB (Intel since Ice Lake)
without asking CPUID (docs/cpu_features.md). A host without one raises #UD there. src/cpu_emulation.h adds
a vectored handler that recognises those encodings at the faulting RIP, does the same work on the CONTEXT
and steps past the instruction; gta6rt installs it before any image code runs, after the startup trace's
handler so it runs first. One [rt] line names what the host lacks, one more per instruction on first use.

cpu_emulation_test checks the decoder on hand-written encodings, the bit-field helpers and apply() on a
synthetic CONTEXT, then runs every form for real from an executable buffer: natively on a Zen host,
through the handler on an Intel one, with the same expected values.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 16:57:59 +01:00
85daaa1bb1 cpu_feature_scan: list the CPU instructions an x64 image needs that a desktop CPU may lack
The runtime runs the Xbox Series (Zen 2) executable natively, so an instruction the host CPU lacks raises #UD
where it is reached. tools/cpu_feature_scan.py streams dumpbin /disasm like inline_scan.py, maps each
instruction to its CPUID feature or privilege class (AMD-only, newer-Intel-only, not on Zen 2, privileged,
kernel call, host query, baseline), and splits the counts by .pdata range.

docs/cpu_features.md records the 1.0.2.1 result (counts only): 19 SSE4a, 10 CLZERO and 4 MONITORX/MWAITX
sites (AMD only) and 8 CLWB sites, all real code; the privileged hits are jump-table data.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 16:44:42 +01:00