fix: system.dat rom quoting, native_ids, acronym display names

This commit is contained in:
Abdessamad Derraz
2026-03-30 16:17:50 +02:00
parent e2d0510f4e
commit c4f3192020
3 changed files with 68 additions and 15 deletions

View File

@@ -42,8 +42,9 @@ class BaseExporter(ABC):
return name
# Fallback: convert slug to display name with acronym handling
_UPPER = {
"3do", "cps1", "cps2", "cps3", "dos", "gba", "gbc", "msx",
"nes", "nds", "ngp", "psp", "psx", "sms", "snes", "tvc",
"3do", "cdi", "cpc", "cps1", "cps2", "cps3", "dos", "gba",
"gbc", "hle", "msx", "nes", "nds", "ngp", "psp", "psx",
"sms", "snes", "stv", "tvc", "vb", "zx",
}
parts = sys_id.replace("-", " ").split()
result = []

View File

@@ -85,7 +85,10 @@ class Exporter(BaseExporter):
if name.startswith("_") or self._is_pattern(name):
continue
rom_parts = [f"name {name}"]
# Quote names with spaces or special chars (matching original format)
needs_quote = " " in name or "(" in name or ")" in name
name_str = f'"{name}"' if needs_quote else name
rom_parts = [f"name {name_str}"]
size = fe.get("size")
if size:
rom_parts.append(f"size {size}")