Vi lascio questo script powershell che fa cose che gia altre utility fanno, ma siamo nel 2026, vuoi non usare l'ai?
Lo script A.R.C.A.M.A.D.O.(Automated Retro Compatibility & Arcade Machine Asset Distribution Orchestrator), prende in input:
- il file xml del mame (che devi aver gia creato),
- la directory dove hai il tuo romset full (chiaramente della stessa versione del mame dal quale hai estratto l'xml)
- la directory dove verranno ricopiate le sole roms di giochi arcade perfetti e imperfetti ad esclusione di bios, device, console, laserdisc, pinball e porcaria varia
Nella directory di output le roms saranno poi sudddivise in quattro sotto directory parent-orrizzontali, parent-verticali, clone-orrizzontali, clone-verticali
Lo script si lancia come qualsiasi altro script powershell
.\ARCAMADO.ps1 -XmlPath "D:\mame0278b_64bit\mame-gamelist.xml" -RomSourcePath "D:\mame0278b_64bit\roms" -OutputBasePath "E:\roms-smallset" `
Codice: Seleziona tutto
param(
[string]$XmlPath,
[string]$RomSourcePath,
[string]$OutputBasePath,
[string]$DriverStatus,
[string]$Emulation
)
# -------------------------
# FILTRI GIOCABILITÀ
# -------------------------
$allowedStatus = @("good", "imperfect")
$allowedEmu = @("good", "imperfect")
if ($DriverStatus) {
$allowedStatus = $DriverStatus.Split(",") | ForEach-Object { $_.Trim().ToLower() }
}
if ($Emulation) {
$allowedEmu = $Emulation.Split(",") | ForEach-Object { $_.Trim().ToLower() }
}
# -------------------------
# ARCADE FILTER BASE
# -------------------------
function IsArcadeGame($m) {
if ($m.isbios -eq "yes") { return $false }
if ($m.isdevice -eq "yes") { return $false }
if ($m.sourcefile -match "console|computer|home|bios|handheld") { return $false }
if ($m.sourcefile -match "laserdisc|ld-|pinball|slot|pachinko|electro") { return $false }
if ($m.runnable -eq "no") { return $false }
return $true
}
# -------------------------
# LOAD XML
# -------------------------
[xml]$xml = Get-Content $XmlPath
$machines = $xml.SelectNodes("//machine")
$total = $machines.Count
$index = 0
# -------------------------
# LOOP PRINCIPALE
# -------------------------
foreach ($m in $machines) {
$index++
Write-Progress `
-Activity "A.R.C.A.M.A.D.O." `
-Status "$index / $total : $($m.name)" `
-PercentComplete (($index / $total) * 100)
if (-not (IsArcadeGame $m)) { continue }
if (-not $m.driver) { continue }
$status = if ($m.driver.status) { $m.driver.status.ToLower() } else { "" }
$emu = if ($m.driver.emulation) { $m.driver.emulation.ToLower() } else { "" }
if (-not ($allowedStatus -contains $status)) { continue }
if (-not ($allowedEmu -contains $emu)) { continue }
# ROTAZIONE SCHERMO
$rotate = 0
if ($m.display.rotate) {
$r = $m.display.rotate
if ($r -is [Array]) { $rotate = [int]$r[0] }
else { $rotate = [int]$r }
}
$orientation = if ($rotate -eq 90 -or $rotate -eq 270) { "vertical" } else { "horizontal" }
# parent / clone
$type = if ($m.cloneof) { "clone" } else { "parent" }
# ROM FILE
$romFile = "$($m.name).zip"
$sourceFile = Join-Path $RomSourcePath $romFile
if (-not (Test-Path $sourceFile)) { continue }
# DESTINAZIONE
$destPath = Join-Path $OutputBasePath "$type`_$orientation"
New-Item -ItemType Directory -Force -Path $destPath | Out-Null
Copy-Item $sourceFile $destPath -Force
}
# -------------------------
# FINE
# -------------------------
Write-Progress -Activity "A.R.C.A.M.A.D.O." -Completed
Write-Host "`nCOMPLETATO"

