|
- # E01-S02: build and visibly run the MMU probe in VICE x128.
- [CmdletBinding()]
- param([int]$LimitCycles = 30000000)
-
- $ErrorActionPreference = "Stop"
- $project = Split-Path $PSScriptRoot -Parent
- $build = Join-Path $project "build"
- $program = Join-Path $build "mmu-probe.prg"
- $screenshot = Join-Path $build "mmu-probe-vicii.png"
- $x128 = "C:\Program Files\GTK3VICE-3.10-win64\bin\x128.exe"
-
- & (Join-Path $PSScriptRoot "build-mmu-probe.ps1")
- if ($LASTEXITCODE -ne 0) { throw "MMU probe 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
- 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)
|