Boot original Wii firmware through boot0, boot1, boot2 and IOS on an emulated ARM Starlet. Model the required IPC, memory, SD, USB and Bluetooth hardware behavior, including IOS reload into IOS58, and add focused tests, launch utilities and architecture documentation.
44 lines
1.3 KiB
PowerShell
44 lines
1.3 KiB
PowerShell
param(
|
|
[ValidateSet('Open', 'List', 'RefreshLetterBomb')]
|
|
[string]$Action = 'Open',
|
|
|
|
[string]$MacAddress = '02:00:00:43:18:01',
|
|
|
|
[ValidateSet('E', 'U', 'J', 'K')]
|
|
[string]$Region = 'E'
|
|
)
|
|
|
|
$repoRoot = Split-Path -Parent $MyInvocation.MyCommand.Path
|
|
$sdFolder = Join-Path $repoRoot 'Virtual-SD'
|
|
$generator = Join-Path $repoRoot 'Tools\Generate-LetterBomb.py'
|
|
$runningDolphin = Get-Process -Name DolphinNoGUI,Dolphin -ErrorAction SilentlyContinue
|
|
|
|
if ($runningDolphin -and $Action -ne 'List') {
|
|
throw 'Ferme Dolphin avant de modifier Virtual-SD : son arrêt resynchronise le dossier.'
|
|
}
|
|
|
|
if (-not (Test-Path -LiteralPath $sdFolder)) {
|
|
New-Item -ItemType Directory -Path $sdFolder | Out-Null
|
|
}
|
|
|
|
switch ($Action) {
|
|
'Open' {
|
|
Start-Process -FilePath 'explorer.exe' -ArgumentList @($sdFolder)
|
|
}
|
|
'List' {
|
|
Get-ChildItem -LiteralPath $sdFolder -Recurse -Force |
|
|
Select-Object FullName, Length, LastWriteTime
|
|
}
|
|
'RefreshLetterBomb' {
|
|
$python = Get-Command python.exe -ErrorAction Stop
|
|
& $python.Source $generator `
|
|
--mac $MacAddress `
|
|
--region $Region `
|
|
--output $sdFolder
|
|
if ($LASTEXITCODE -ne 0) {
|
|
throw "La génération de LetterBomb a échoué ($LASTEXITCODE)."
|
|
}
|
|
Write-Host 'LetterBomb actualisé. Il sera copié dans WiiSD.raw au prochain lancement.'
|
|
}
|
|
}
|