|
- # E01-S01: build and launch the platform proof in VICE x128.
- [CmdletBinding()]
- param(
- [int]$LimitCycles = 30000000
- )
-
- $ErrorActionPreference = "Stop"
- $project = Split-Path $PSScriptRoot -Parent
- $build = Join-Path $project "build"
- $program = Join-Path $build "minimal.prg"
- $screenshot = Join-Path $build "minimal-vicii.png"
- $x128 = "C:\Program Files\GTK3VICE-3.10-win64\bin\x128.exe"
-
- & (Join-Path $PSScriptRoot "build-minimal.ps1")
- if ($LASTEXITCODE -ne 0) { throw "minimal build failed" }
- if (-not (Test-Path -LiteralPath $x128)) { throw "x128.exe not found at $x128" }
-
- if (Test-Path -LiteralPath $screenshot) {
- Remove-Item -LiteralPath $screenshot -Force
- }
-
- $arguments = @(
- "-autostart", $program,
- "-autostart-warp", "-warp",
- "-sounddev", "dummy",
- "-limitcycles", "$LimitCycles",
- "-exitscreenshotvicii", $screenshot
- )
-
- $process = Start-Process -FilePath $x128 -ArgumentList $arguments -PassThru -Wait -WindowStyle Hidden
-
- # VICE uses a non-zero exit status when -limitcycles ends the session. The
- # screenshot and deterministic program state are the evidence, not that status.
- if (-not (Test-Path -LiteralPath $screenshot)) {
- throw "x128 did not create $screenshot"
- }
-
- Write-Host ("x128 exit code: {0} (cycle-limit exit may be non-zero)" -f $process.ExitCode)
- Write-Host ("screenshot: {0}" -f $screenshot)
|