mirror of
https://github.com/ProjectLeonida/mandy.git
synced 2026-12-06 13:48:36 +00:00
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>
41 lines
1.9 KiB
CMake
41 lines
1.9 KiB
CMake
# gta6rt --dry-run, --init and --dry-run again with tiny_tls_clones.exe, which maps three TLS modules and so makes a
|
|
# helper clone for one of its DLLs. After each run no clone file of that run's process may remain in the temporary
|
|
# folder but its home clone (leonida_tls_host_<pid>_home.dll), which is mapped until the process ends and cannot be
|
|
# deleted before; the next run's sweep must delete that one. The process ID comes from the trace's first line. A gta6rt
|
|
# running beside this test may sweep the home clone first, so its absence is fine.
|
|
if(DEFINED ENV{TMP})
|
|
set(temp "$ENV{TMP}")
|
|
else()
|
|
set(temp "$ENV{TEMP}")
|
|
endif()
|
|
file(TO_CMAKE_PATH "${temp}" temp)
|
|
set(previous "")
|
|
foreach(mode dry-run init dry-run)
|
|
set(trace "${TRACE_DIR}/tls_clone_cleanup.jsonl")
|
|
file(REMOVE "${trace}") # --trace only creates a new file
|
|
execute_process(
|
|
COMMAND ${RUNNER} "${LOADER}" --${mode} "${GUEST}" --trace "${trace}"
|
|
TIMEOUT 90
|
|
RESULT_VARIABLE code OUTPUT_VARIABLE output ERROR_VARIABLE error)
|
|
if(NOT code STREQUAL "0" OR NOT output MATCHES "3 module\\(s\\) mapped")
|
|
message(FATAL_ERROR "--${mode} returned ${code}\n${output}\n${error}")
|
|
endif()
|
|
file(STRINGS "${trace}" first LIMIT_COUNT 1)
|
|
file(REMOVE "${trace}")
|
|
if(NOT first MATCHES "\"pid\":([0-9]+)")
|
|
message(FATAL_ERROR "--${mode}: no pid in the trace: ${first}")
|
|
endif()
|
|
set(pid "${CMAKE_MATCH_1}")
|
|
file(GLOB left "${temp}/leonida_tls_host_${pid}_*.dll")
|
|
if(left AND NOT left STREQUAL "${temp}/leonida_tls_host_${pid}_home.dll")
|
|
message(FATAL_ERROR "--${mode} (pid ${pid}) left clone files other than its home clone: ${left}")
|
|
endif()
|
|
if(previous)
|
|
file(GLOB swept "${temp}/leonida_tls_host_${previous}_*.dll")
|
|
if(swept)
|
|
message(FATAL_ERROR "the run after pid ${previous} did not delete its clone files: ${swept}")
|
|
endif()
|
|
endif()
|
|
set(previous "${pid}")
|
|
endforeach()
|