Files
dolphin/Run-Wii-IOS-LLE.ps1
T
Yaya48 c230971f07 IOS LLE: checkpoint NAND conformance and diagnostic tooling
Preserve formatted NAND boot and Wii Remote pairing, add DMA/SRAM conformance tests and a Wii comparison probe. Keep P1 profiling tools and native update A/B evidence; reject the unhelpful targeted SRAM shortcut.
2026-09-23 13:30:17 +02:00

81 lines
2.7 KiB
PowerShell

param(
[string]$BuildDirectory = '.starlet_msvc2',
[string]$UserDirectory = '.starlet_user3',
[switch]$DisableJIT,
[switch]$ProfileJitMemory,
[switch]$SafeTextureCache = $true,
[switch]$Ethernet,
[switch]$PerformanceTrace,
[switch]$Wait
)
$repoRoot = Split-Path -Parent $MyInvocation.MyCommand.Path
$dolphinPath = Join-Path $repoRoot "$BuildDirectory\Binaries\DolphinNoGUI.exe"
$userPath = Join-Path $repoRoot $UserDirectory
if (-not (Test-Path -LiteralPath $dolphinPath)) {
throw "DolphinNoGUI.exe is missing: $dolphinPath"
}
# NoGUI's file log listener expects the parent directory to exist on first launch.
New-Item -ItemType Directory -Force -Path (Join-Path $userPath 'Logs') | Out-Null
$dolphinArguments = @(
'-u', $userPath,
'-n', '0000000100000002',
'-C', "Dolphin.Core.WiiStarletJIT=$(-not $DisableJIT)",
'-C', "Dolphin.Core.WiiStarletJITMemoryProfiling=$($ProfileJitMemory.IsPresent)",
'-C', "Dolphin.Core.WiiLLEEthernet=$($Ethernet.IsPresent)",
# Keep the next BootMii run diagnostic rather than observational. BootMii reports its loader
# stages and panic codes through GPIO bits 16-23; the Starlet bus logs those writes under IOS.
'-C', 'Logger.Options.WriteToFile=True',
'-C', 'Logger.Options.Verbosity=4',
'-C', 'Logger.Logs.IOS=True',
'-v', 'D3D',
'-p', 'win32'
)
if ($SafeTextureCache) {
# Hash every texture byte: sparse samples can miss small CPU-rendered text updates.
# This is a per-run override and does not change the saved graphics configuration.
$dolphinArguments += @('-C', 'Graphics.Settings.SafeTextureCacheColorSamples=0')
}
if ($Ethernet) {
$dolphinArguments += @('-C', 'Logger.Logs.IOS_USB=True', '-C', 'Logger.Logs.IOS_NET=True')
}
$priorPerformanceTrace = [Environment]::GetEnvironmentVariable('DOLPHIN_PERF_TRACE', 'Process')
try {
if ($PerformanceTrace) { $env:DOLPHIN_PERF_TRACE = '1' }
$dolphin = Start-Process -FilePath $dolphinPath -ArgumentList $dolphinArguments `
-WorkingDirectory $repoRoot -PassThru
} finally {
[Environment]::SetEnvironmentVariable('DOLPHIN_PERF_TRACE', $priorPerformanceTrace, 'Process')
}
$dolphin.PriorityClass = 'High'
# Windows otherwise tends to schedule the ARM interpreter on an efficient core
# of this hybrid CPU. Logical processors 0-3 are its two performance cores.
$processorName = (Get-ItemPropertyValue `
-LiteralPath 'HKLM:\HARDWARE\DESCRIPTION\System\CentralProcessor\0' `
-Name 'ProcessorNameString' -ErrorAction SilentlyContinue)
if ($processorName -match '12th Gen Intel\(R\) Core\(TM\) i7-1255U') {
$dolphin.ProcessorAffinity = [IntPtr]0xF
}
Write-Host "Dolphin IOS LLE started (PID $($dolphin.Id))."
if ($Wait) {
$dolphin.WaitForExit()
exit $dolphin.ExitCode
}