Files
libretro/scripts/exporter/amberelec_exporter.py
T
Abdessamad Derraz 5b083c45b5 feat: export md5 lists the pinned checker reads
The script exporters (Batocera, ROCKNIX, KNULLI, AmberELEC, EmuELEC)
read the checker of the pinned original: when checkBios hands an
item's md5 to a function that tests it with isinstance(..., list),
as md5Matches does since batocera.linux 6b08b873, an entry whose
emulator code accepts several dumps is written with all of them, and
an addition that needed several becomes writable. Items with altmd5
keep a string, since checkBios wraps them in a list of its own.

No cached original reads lists today, so every export is unchanged.
The report records a list as a list, counts the lists written, and
records a list the truth extends without contradicting it.
2026-10-23 08:06:58 +02:00

44 lines
1.3 KiB
Python

"""Exporter for AmberELEC's batocera-systems.
Batocera's script shape, so only the systems dict is rewritten. Two things
differ. Paths are relative to /storage/roms, where the list also names
neogeo/ beside bios/, and our destinations start there too. No entry carries
an emulator or core gate: coreExists() lets an ungated item through for
every build, and an addition is written the same way.
"""
from __future__ import annotations
from .baseline import NativeFile
from .batocera_exporter import Exporter as BatoceraExporter
SOURCE_URL = (
"https://raw.githubusercontent.com/AmberELEC/AmberELEC/dev"
"/packages/amberelec/sources/scripts/batocera-systems"
)
class Exporter(BatoceraExporter):
"""Write AmberELEC's batocera-systems, corrected."""
PATH_PREFIX = ""
# The list gates nothing on a runner, so an addition needs none.
RUNNER_GATED = False
def _addition_keys(self, fe: NativeFile) -> list[tuple[str, str | None]] | None:
return []
@staticmethod
def platform_name() -> str:
return "amberelec"
@staticmethod
def file_modes() -> dict[str, int]:
# 100755 at a21975bf (git/trees).
return {"batocera-systems": 0o755}
@staticmethod
def native_sources() -> dict[str, str]:
return {"batocera-systems": SOURCE_URL}