diff options
| author | Aslan2142 <jan.trencansky@protonmail.com> | 2026-11-26 04:08:22 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-11-26 04:08:22 +0100 |
| commit | 0b11d86bc07a9be41aa28793eaa651bec768ddf6 (patch) | |
| tree | 53e0bbdcace9b8f7b83a550c07d402e03942828e /scripts | |
| parent | 7f3d0095a2d51892bc7048f24505c37168f25c34 (diff) | |
| parent | b3e541b224e1d0bb691d8b4b5cc719eeea7c7dd7 (diff) | |
Merge pull request #2138 from ubiquitarianism/integration/boot-combined
[integration] RT-BOOT-COMBINED: translator fixes + null-barrier fix on main; scripted pad past legal terms to the story load
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/windows-boot/README.md | 15 | ||||
| -rw-r--r-- | scripts/windows-boot/boot.ps1 | 19 |
2 files changed, 25 insertions, 9 deletions
diff --git a/scripts/windows-boot/README.md b/scripts/windows-boot/README.md index 3a875af4b..92121a211 100644 --- a/scripts/windows-boot/README.md +++ b/scripts/windows-boot/README.md | |||
| @@ -15,7 +15,7 @@ powershell -NoProfile -File scripts\windows-boot\boot.ps1 -DryRun -GameDir D:\GT | |||
| 15 | powershell -NoProfile -File scripts\windows-boot\boot.ps1 -Name first -Seconds 200 -GameDir D:\GTA6pkg -Shaders E:\leonida-work\shaders\spirv | 15 | powershell -NoProfile -File scripts\windows-boot\boot.ps1 -Name first -Seconds 200 -GameDir D:\GTA6pkg -Shaders E:\leonida-work\shaders\spirv |
| 16 | 16 | ||
| 17 | # Extra or changed switches: trailing KEY=VALUE arguments (KEY= removes one), as run-boot.sh takes them. | 17 | # Extra or changed switches: trailing KEY=VALUE arguments (KEY= removes one), as run-boot.sh takes them. |
| 18 | powershell -NoProfile -File scripts\windows-boot\boot.ps1 -Name split -Seconds 120 LEONIDA_PRESENT_PLANE1=0 "LEONIDA_PEEK=0x7446510,0x98f828c,0x78b2818" | 18 | powershell -NoProfile -File scripts\windows-boot\boot.ps1 -Name split -Seconds 120 LEONIDA_PRESENT_PLANE1=0 "LEONIDA_PEEK=<rva>,<rva>,<rva>" |
| 19 | 19 | ||
| 20 | # Every parameter. | 20 | # Every parameter. |
| 21 | Get-Help -Full .\scripts\windows-boot\boot.ps1 | 21 | Get-Help -Full .\scripts\windows-boot\boot.ps1 |
| @@ -38,7 +38,7 @@ Only when your shell has not set them already (`-DryRun` prints the final list): | |||
| 38 | | `LEONIDA_PIPELINE_CACHE_BYTES` | `4294967296` | pipeline cache size limit | | 38 | | `LEONIDA_PIPELINE_CACHE_BYTES` | `4294967296` | pipeline cache size limit | |
| 39 | | `LEONIDA_STARTUP_CACHE_CHECKPOINTS` | `1` | save the pipeline cache during startup | | 39 | | `LEONIDA_STARTUP_CACHE_CHECKPOINTS` | `1` | save the pipeline cache during startup | |
| 40 | | `LEONIDA_PIPELINE_CACHE_DIR` | `<out>\pipeline-cache` | one warmed cache shared by every build you boot | | 40 | | `LEONIDA_PIPELINE_CACHE_DIR` | `<out>\pipeline-cache` | one warmed cache shared by every build you boot | |
| 41 | | `LEONIDA_PEEK` / `_SECONDS` | `0x7446510,0x98f828c` / `5` | game state and session state (low dword), the two numbers every RESULT reports | | 41 | | `LEONIDA_PEEK` / `_SECONDS` | the game-state and session-state RVAs from `LEONIDA_GAME_STATE_RVA` and `LEONIDA_SESSION_STATE_RVA` (measured locally, not kept here; unset: no peek) / `5` | game state and session state (low dword), the two numbers every RESULT reports | |
| 42 | | `LEONIDA_DEVICE_FAULT` | `1` | on device loss: `VK_EXT_device_fault` info, checkpoints, last replay steps | | 42 | | `LEONIDA_DEVICE_FAULT` | `1` | on device loss: `VK_EXT_device_fault` info, checkpoints, last replay steps | |
| 43 | | `LEONIDA_KEYBOARD_PAD` | `always` (with an input script) | keyboard as a pad even unfocused, so the script's presses arrive | | 43 | | `LEONIDA_KEYBOARD_PAD` | `always` (with an input script) | keyboard as a pad even unfocused, so the script's presses arrive | |
| 44 | | `LEONIDA_CAPTURE_EVERY` / `_LIMIT` | `60` / `40` | a swapchain read-back every 60 presents, at most 40 | | 44 | | `LEONIDA_CAPTURE_EVERY` / `_LIMIT` | `60` / `40` | a swapchain read-back every 60 presents, at most 40 | |
| @@ -72,8 +72,15 @@ frames: 14 captured, 0 non-black; last mean rgb 0.00 0.00 0.00; brightest 0.00 | |||
| 72 | states only, which is what goes into a RESULT on the board; the logs, traces, captures and dumps can quote the game | 72 | states only, which is what goes into a RESULT on the board; the logs, traces, captures and dumps can quote the game |
| 73 | and stay on your machine ([AGENTS.md](../../AGENTS.md), "No game data"). | 73 | and stay on your machine ([AGENTS.md](../../AGENTS.md), "No game data"). |
| 74 | 74 | ||
| 75 | How to read the states: game state `0x7446510` goes 1, 2 (init), 3 (running); session state goes 0, 1, 3 (landing | 75 | How to read the states: game state goes 1, 2 (init), 3 (running); session state goes 0, 1, 3 (landing |
| 76 | screen waiting for A), `d` after A. `docs/linux_proton.md` (the same stages apply natively) | 76 | screen waiting for A), `d` after A. |
| 77 | |||
| 78 | **Changed: the states need two variables now.** The script used to set `LEONIDA_PEEK` to the game-state and | ||
| 79 | session-state RVAs by default. Those addresses of the retail executable are no longer kept in the repository, so set | ||
| 80 | `LEONIDA_GAME_STATE_RVA` and `LEONIDA_SESSION_STATE_RVA` (hex, measured locally) in the shell before the boot. | ||
| 81 | Without them the script warns, sets no `LEONIDA_PEEK`, and the `states:` line and the RESULT show `game=? | ||
| 82 | session=?`. A `LEONIDA_PEEK` of your own still works for the log, but the digest reads only the two RVAs those | ||
| 83 | variables name. `docs/linux_proton.md` (the same stages apply natively) | ||
| 77 | section 2 has the healthy sequence with times and section 3 "which blank do you have". | 84 | section 2 has the healthy sequence with times and section 3 "which blank do you have". |
| 78 | 85 | ||
| 79 | ## One game at a time | 86 | ## One game at a time |
diff --git a/scripts/windows-boot/boot.ps1 b/scripts/windows-boot/boot.ps1 index d052a79da..7863054b3 100644 --- a/scripts/windows-boot/boot.ps1 +++ b/scripts/windows-boot/boot.ps1 | |||
| @@ -66,7 +66,7 @@ | |||
| 66 | 66 | ||
| 67 | .PARAMETER EnvPairs | 67 | .PARAMETER EnvPairs |
| 68 | Any further arguments, each KEY=VALUE, as scripts/linux-boot/run-boot.sh takes them. These work with | 68 | Any further arguments, each KEY=VALUE, as scripts/linux-boot/run-boot.sh takes them. These work with |
| 69 | powershell -File too: ... -Name x LEONIDA_PRESENT_PLANE1=0 "LEONIDA_PEEK=0x7446510,0x75e8eb0". | 69 | powershell -File too: ... -Name x LEONIDA_PRESENT_PLANE1=0 "LEONIDA_PEEK=<rva>,<rva>". |
| 70 | Applied after -SetEnv. KEY= removes the variable for this boot. | 70 | Applied after -SetEnv. KEY= removes the variable for this boot. |
| 71 | 71 | ||
| 72 | .PARAMETER NoCapture | 72 | .PARAMETER NoCapture |
| @@ -97,7 +97,7 @@ | |||
| 97 | powershell -NoProfile -File scripts\windows-boot\boot.ps1 -Name first -Seconds 200 -GameDir D:\GTA6pkg -Shaders E:\leonida-work\shaders\spirv | 97 | powershell -NoProfile -File scripts\windows-boot\boot.ps1 -Name first -Seconds 200 -GameDir D:\GTA6pkg -Shaders E:\leonida-work\shaders\spirv |
| 98 | 98 | ||
| 99 | .EXAMPLE | 99 | .EXAMPLE |
| 100 | powershell -NoProfile -File scripts\windows-boot\boot.ps1 -Name stall -Seconds 90 -Stacks 40,80 "LEONIDA_PEEK=0x7446510,0x75e8eb0,0x75e8ea0,0x9844898" | 100 | powershell -NoProfile -File scripts\windows-boot\boot.ps1 -Name stall -Seconds 90 -Stacks 40,80 "LEONIDA_PEEK=<rva>,<rva>" |
| 101 | 101 | ||
| 102 | .EXAMPLE | 102 | .EXAMPLE |
| 103 | powershell -NoProfile -File scripts\windows-boot\boot.ps1 -DigestOnly -Name first | 103 | powershell -NoProfile -File scripts\windows-boot\boot.ps1 -DigestOnly -Name first |
| @@ -234,7 +234,8 @@ $defaults = [ordered]@{ | |||
| 234 | LEONIDA_PIPELINE_CACHE_BYTES = "4294967296" | 234 | LEONIDA_PIPELINE_CACHE_BYTES = "4294967296" |
| 235 | LEONIDA_STARTUP_CACHE_CHECKPOINTS = "1" | 235 | LEONIDA_STARTUP_CACHE_CHECKPOINTS = "1" |
| 236 | LEONIDA_PIPELINE_CACHE_DIR = (Join-Path $OutDir "pipeline-cache") | 236 | LEONIDA_PIPELINE_CACHE_DIR = (Join-Path $OutDir "pipeline-cache") |
| 237 | LEONIDA_PEEK = "0x7446510,0x98f828c" # game state, session state (low dword) | 237 | # LEONIDA_PEEK: the game-state and session-state RVAs (measured locally, not kept in the repository) when |
| 238 | # LEONIDA_GAME_STATE_RVA and LEONIDA_SESSION_STATE_RVA name them; see below. | ||
| 238 | LEONIDA_PEEK_SECONDS = "5" | 239 | LEONIDA_PEEK_SECONDS = "5" |
| 239 | LEONIDA_DEVICE_FAULT = "1" # device-loss report (VK_EXT_device_fault, checkpoints) | 240 | LEONIDA_DEVICE_FAULT = "1" # device-loss report (VK_EXT_device_fault, checkpoints) |
| 240 | LEONIDA_CAPTURE_EVERY = "60" | 241 | LEONIDA_CAPTURE_EVERY = "60" |
| @@ -243,6 +244,14 @@ $defaults = [ordered]@{ | |||
| 243 | DISABLE_VULKAN_OBS_CAPTURE = "1" | 244 | DISABLE_VULKAN_OBS_CAPTURE = "1" |
| 244 | } | 245 | } |
| 245 | if ($InputScript) { $defaults["LEONIDA_KEYBOARD_PAD"] = "always" } | 246 | if ($InputScript) { $defaults["LEONIDA_KEYBOARD_PAD"] = "always" } |
| 247 | $gameStateRva = "$env:LEONIDA_GAME_STATE_RVA".ToLowerInvariant() -replace '^0x', '' | ||
| 248 | $sessionStateRva = "$env:LEONIDA_SESSION_STATE_RVA".ToLowerInvariant() -replace '^0x', '' | ||
| 249 | if ($gameStateRva -and $sessionStateRva) { $defaults["LEONIDA_PEEK"] = "0x$gameStateRva,0x$sessionStateRva" } | ||
| 250 | else { | ||
| 251 | # The two RVAs were built in until they were taken out of the repository; say so rather than report "?" silently. | ||
| 252 | Write-Warning ("LEONIDA_GAME_STATE_RVA and LEONIDA_SESSION_STATE_RVA are not both set: no LEONIDA_PEEK by default, " + | ||
| 253 | "so the RESULT game and session states read '?' (scripts/windows-boot/README.md)") | ||
| 254 | } | ||
| 246 | # Per-run values: always this script's (from its parameters), whatever the shell has. | 255 | # Per-run values: always this script's (from its parameters), whatever the shell has. |
| 247 | $perRun = [ordered]@{ | 256 | $perRun = [ordered]@{ |
| 248 | LEONIDA_CAPTURE = $(if ($NoCapture) { "" } else { $Capture }) | 257 | LEONIDA_CAPTURE = $(if ($NoCapture) { "" } else { $Capture }) |
| @@ -393,8 +402,8 @@ if (Test-Path -LiteralPath $LogFile) { | |||
| 393 | $game = "?"; $session = "?" | 402 | $game = "?"; $session = "?" |
| 394 | foreach ($v in $valRx.Matches($m.Groups[2].Value)) { | 403 | foreach ($v in $valRx.Matches($m.Groups[2].Value)) { |
| 395 | $rva = $v.Groups[1].Value; $val = $v.Groups[2].Value | 404 | $rva = $v.Groups[1].Value; $val = $v.Groups[2].Value |
| 396 | if ($rva -eq "7446510") { $game = $val } | 405 | if ($gameStateRva -and $rva -eq $gameStateRva) { $game = $val } |
| 397 | elseif ($rva -eq "98f828c" -and $val -ne "?") { | 406 | elseif ($sessionStateRva -and $rva -eq $sessionStateRva -and $val -ne "?") { |
| 398 | $low = $val.PadLeft(16, '0').Substring(8).TrimStart('0') # the session state is the low dword | 407 | $low = $val.PadLeft(16, '0').Substring(8).TrimStart('0') # the session state is the low dword |
| 399 | $session = $(if ($low) { $low } else { "0" }) | 408 | $session = $(if ($low) { $low } else { "0" }) |
| 400 | } | 409 | } |