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>
With it, d3d12_xs reads list slot 48 as the console's IASetVertexBuffers, so the PC-shaped fixture list's
ClearRenderTargetView never runs and Close fails. The branch also changes runtime/src/pe_loader.cpp and carried
committed conflict markers in docs/fssm_crosscheck.md. Its docs rows go with it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
pe_loader: resolve() and resolve_forwarder() key the DLL name with
dll_key() — lower-case, trailing '.' dropped, ".dll" added when there
is no extension — the file-name rule LoadLibrary applies. Without it an
import naming "GameInput" or "gameinput.dll." missed the shim and
owns_dll lookups while LoadLibraryExA still bound a host namesake.
registry: xaudio2_9.dll ordinals 8-10 classify as hresult (host table
measured: XAudio2CreateV2_9 / WithVersionInfo / WithSharedContexts);
the redist's ordinal table is unconfirmed and stays other.
import_inventory: classify parity for the #1 ordinals; the delay-import
directory (entry 13) is read with the loader's checks; the descriptor
table stops at Name == 0 and unreadable names fail like read_string;
host-bound imports report as host instead of unimplemented thunk
(owns_dll ported); thunk tables deduplicate by RVA under a global cap.
Generated with [Devin](https://devin.ai)
Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
loader_test, test_pe_loader_bounds and unimplemented_policy_test build relocation-less images fixed at
0x140000000..0x1a0000000. Under arm64 Wine (CrossOver on Apple Silicon) the process's own allocations sit at
0x100000000 and up and macOS maps its shared region at 0x180000000 (RT-22), so the loader rejected those images
with "preferred base is taken" before the checks ran: loader stopped after 31 checks with 3 failures,
pe_loader_bounds failed 13 checks and unimplemented_policy failed.
New test/free_image_base.h: on Windows it returns the constants unchanged. Under Wine (ntdll exports
wine_get_version) it moves the whole 0x140000000..0x200000000 span to a free window picked top-down, away from
the heap, so each constant keeps its offset and images loaded together still get different bases. The init
image reads its TLS callback addresses from its own ImageBase instead of a constant.
AI-assisted. No game files.
Other Xbox Series compatibility-layer efforts have run the same package's
console DLLs, shader pack and retail titles. This folds their published
measurements into docs/d3d12_vulkan.md §7 — the CS root-argument packing, the
inline record opcodes, the mesh inputs, the OpenExistingHeapFromAddress UMA
recipe, 64 KiB physical pages, more command-list slot numbers and the console
export surface — each row paraphrased with its measurement basis noted.
The unimplemented-import classifier learns the console DLL names from that
surface (d3d12_xs!D3D12XboxCreateSyntheticDevice, xaudio2_9!XAudio2Create,
gameinput!GameInputCreate, dstorage_xs!DStorageGetFactory) so fail/stop
policies report E_NOTIMPL honestly instead of faking success; functions with
no measured return (xg_xs, AcpHal, D3D12XboxSetProcessDebugFlags) stay `other`.
Classification checks added to unimplemented_policy_test.
AI-assisted. Tested: test_i18n_index, test_docs_links, compileall. The
registry/test change is Windows-only C++ and was not compiled here.
Data directories past NumberOfRvaAndSizes were read anyway (only the
exception directory checked the count), so stale bytes there were parsed
as import, delay-import, export or relocation tables. And resolve_forwarder
range-checked the ordinal before adding each digit, so '#65537' passed and
was cast to ordinal 1. The hand-built test images now declare their 16
directories.
- make_common_stub checks RtlAddFunctionTable and reports a failure once;
the stub keeps working, only stack walks through it stop.
- rt_unimplemented keys per-import state by the thunk's `what` pointer, so a
repeat call does one map lookup and builds no strings.
- A test hook (set_unimplemented_test_hook) lets unimplemented_policy_test
check, from inside the call, that rsp is aligned and that
RtlLookupFunctionEntry/RtlVirtualUnwind walk through rt_unimplemented and
the stub back to the caller.
- abi_probe.asm (MASM) calls a thunk with rbx/rbp/rdi/rsi/r12-r15 and
xmm6-xmm15 set to patterns and compares them afterwards, with a control
callee that clobbers rbx and xmm6.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
An unimplemented import used to return 0 silently, which is S_OK for an
HRESULT function with its out parameters never written. The thunk now passes
the caller's return address and rcx/rdx/r8/r9 to a shared stub, and
LEONIDA_UNIMPLEMENTED picks the behaviour:
- log (default): exactly as before.
- fail: E_NOTIMPL for imports known to return HRESULT (D3D12Create*/Serialize*,
CreateDXGIFactory*, XGameRuntimeInitialize, and the GDK XAsync/XTaskQueue/
XUser/XStore/XGameSave/XPackage/XGameUi families minus their documented
void/bool/int functions), 0 otherwise.
- stop: print the import, the caller as module+RVA and the four argument
registers, then break under a debugger or exit with code 3.
--dry-run now counts unimplemented imports by return class. The stub zeroes
xmm0 and has unwind info, so float callers and debuggers are unaffected.
unimplemented_policy_test builds a synthetic image and checks all three modes.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>