Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

41 linhas
1.3KB

  1. # E01-S01: build and launch the platform proof in VICE x128.
  2. [CmdletBinding()]
  3. param(
  4. [int]$LimitCycles = 30000000
  5. )
  6. $ErrorActionPreference = "Stop"
  7. $project = Split-Path $PSScriptRoot -Parent
  8. $build = Join-Path $project "build"
  9. $program = Join-Path $build "minimal.prg"
  10. $screenshot = Join-Path $build "minimal-vicii.png"
  11. $x128 = "C:\Program Files\GTK3VICE-3.10-win64\bin\x128.exe"
  12. & (Join-Path $PSScriptRoot "build-minimal.ps1")
  13. if ($LASTEXITCODE -ne 0) { throw "minimal build failed" }
  14. if (-not (Test-Path -LiteralPath $x128)) { throw "x128.exe not found at $x128" }
  15. if (Test-Path -LiteralPath $screenshot) {
  16. Remove-Item -LiteralPath $screenshot -Force
  17. }
  18. $arguments = @(
  19. "-autostart", $program,
  20. "-autostart-warp", "-warp",
  21. "-sounddev", "dummy",
  22. "-limitcycles", "$LimitCycles",
  23. "-exitscreenshotvicii", $screenshot
  24. )
  25. $process = Start-Process -FilePath $x128 -ArgumentList $arguments -PassThru -Wait -WindowStyle Hidden
  26. # VICE uses a non-zero exit status when -limitcycles ends the session. The
  27. # screenshot and deterministic program state are the evidence, not that status.
  28. if (-not (Test-Path -LiteralPath $screenshot)) {
  29. throw "x128 did not create $screenshot"
  30. }
  31. Write-Host ("x128 exit code: {0} (cycle-limit exit may be non-zero)" -f $process.ExitCode)
  32. Write-Host ("screenshot: {0}" -f $screenshot)

Powered by TurnKey Linux.