mirror of
https://github.com/ProjectLeonida/mandy.git
synced 2026-12-06 22:08:40 +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>
43 lines
2.4 KiB
Bash
Executable File
43 lines
2.4 KiB
Bash
Executable File
#!/bin/bash
|
|
# Boot the packaged port under Wine with the network off (unshare -rn: user + network namespace, no root).
|
|
# usage: boot.sh dry-run|init|run [seconds] (run defaults to 150 s, then the title is stopped)
|
|
# Traces stay local in /opt/leonida/traces: they can quote game data, never post them.
|
|
set -u
|
|
MODE=${1:?dry-run|init|run}; SECS=${2:-150}
|
|
OUT=/opt/leonida
|
|
REPO=${LEONIDA_REPO:-$(cd "$(dirname "$(readlink -f "$0")")/../.." && pwd)} # the checkout this script is in
|
|
STAMP=$(date +%H%M%S)
|
|
T=$OUT/traces; mkdir -p "$T" "$OUT/overlay" "$OUT/cache/nv"
|
|
|
|
WINE=${WINE:-wine} # e.g. WINE=".../Proton - Experimental/files/bin/wine" WINEPREFIX=~/.local/share/leonida-proton/pfx
|
|
export WINEPREFIX=${WINEPREFIX:-$HOME/.local/share/leonida-wine} WINEDEBUG=${WINEDEBUG:--all} WINEDLLOVERRIDES="mscoree,mshtml="
|
|
export LEONIDA_D3D12=vulkan
|
|
export LEONIDA_SHADERS=$OUT/work/shaders/spirv
|
|
export LEONIDA_ARENA_MB=${LEONIDA_ARENA_MB:-2048}
|
|
export LEONIDA_PIPELINE_CACHE_BYTES=${LEONIDA_PIPELINE_CACHE_BYTES:-4294967296}
|
|
export LEONIDA_STARTUP_CACHE_CHECKPOINTS=1
|
|
export __GL_SHADER_DISK_CACHE=1 __GL_SHADER_DISK_CACHE_PATH=$OUT/cache/nv __GL_SHADER_DISK_CACHE_SIZE=21474836480
|
|
export __GL_SHADER_DISK_CACHE_SKIP_CLEANUP=1
|
|
[ -n "${SKIP_INT3:-}" ] && export LEONIDA_SKIP_INT3=1
|
|
|
|
GAME_WIN='Z:\opt\gta6\GTA6.Xbox.v1.0.2.1'
|
|
EXE=/opt/gta6/GTA6.Xbox.v1.0.2.1/game_scarlett_master.exe
|
|
TRACE_WIN="Z:\\opt\\leonida\\traces\\boot-$MODE-$STAMP.jsonl"
|
|
D3D=$T/d3d12-$MODE-$STAMP.log
|
|
GTA6RT=${GTA6RT:-$OUT/gta6rt.exe}; [ -f "$GTA6RT" ] || GTA6RT=$REPO/runtime/build/boot/gta6rt.exe # GTA6RT=<your build>/gta6rt.exe boots a private build without installing it
|
|
|
|
args=(--"$MODE" "$EXE" --game-dir "$GAME_WIN" --overlay 'Z:\opt\leonida\overlay' --trace "$TRACE_WIN")
|
|
[ "$MODE" = run ] && args+=(--trace-d3d12)
|
|
echo "[boot] $MODE gta6rt=$GTA6RT trace=$T/boot-$MODE-$STAMP.jsonl d3d12=$D3D"
|
|
# unshare: new user + network namespace, so the title has no network at all
|
|
if [ "$MODE" = run ]; then
|
|
timeout --signal=INT --kill-after=20 "$SECS" unshare -rn "$WINE" "$GTA6RT" "${args[@]}" > "$T/stdout-$MODE-$STAMP.log" 2> "$D3D"
|
|
else
|
|
unshare -rn "$WINE" "$GTA6RT" "${args[@]}" > "$T/stdout-$MODE-$STAMP.log" 2> "$D3D"
|
|
fi
|
|
rc=$?; echo "[boot] exit=$rc"
|
|
sleep 0
|
|
python3 -I "$REPO/tools/boot_trace.py" "$T/boot-$MODE-$STAMP.jsonl" --d3d12 "$D3D" > "$T/summary-$MODE-$STAMP.txt" 2>&1
|
|
echo "[boot] summary: $T/summary-$MODE-$STAMP.txt"
|
|
exit $rc
|