mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-11 12:33:53 -06:00
feat: read Batocera's MAME search paths
Batocera starts MAME with -rompath <romDirname>;/userdata/bios/mame; /userdata/bios, /userdata/roms/mame and the softlist folder added for MESS systems, and -samplepath, -artpath and -crosshairpath below /userdata/bios/mame (generators/mame/mameGenerator.py:129-143, 189 at batocera-43.1, MAME_BIOS in mamePaths.py). No extractor read that generator. It now goes through the generic reader KNULLI uses for its fork of the same file, keeping the command line search settings: the Macintosh boot disk the command names is a file. Rescraped at batocera-43.1: the six records are the only change. Manifests: Batocera drops samples/bbc.zip at the BIOS root, read by neither build. mame/samples/bbc.zip, which its list declares, serves both. The sets stay at the BIOS root, which the rompath lists.
This commit is contained in:
1 parent
83e901a5d4
commit
409578e20e
4 files changed
+124
-1
No files matched your search
@@ -1119,10 +1119,32 @@ def patched_paths(read: Callable[[str], str], patches: tuple[str, ...] = PATH_PA
|
||||
return launchers
|
||||
|
||||
|
||||
# Generators whose command line hands the emulator /userdata/bios folders as
|
||||
# search paths: MAME's -rompath and -samplepath (mame/mameGenerator.py).
|
||||
SEARCH_PATH_GENERATORS = ("mame/mameGenerator.py",)
|
||||
|
||||
|
||||
def search_paths(cg: Configgen) -> list[Launcher]:
|
||||
"""Every /userdata/bios path a generator's command line names, read as
|
||||
KNULLI's generic reader reads its fork of the same generator."""
|
||||
try:
|
||||
from .knulli_launchers import GenericSites, bios_sites # noqa: PLC0415
|
||||
except ImportError:
|
||||
from knulli_launchers import GenericSites, bios_sites # type: ignore[no-redef] # noqa: PLC0415
|
||||
# A boot disk image the command line names (the Macintosh's
|
||||
# /userdata/bios/<boot_disk>.img) is a file, no search path.
|
||||
return [
|
||||
launcher
|
||||
for path in SEARCH_PATH_GENERATORS
|
||||
for launcher in bios_sites(cg, GenericSites(path, "passes_path"))
|
||||
if re.match(r"command line -\w", launcher.passes_to or "")
|
||||
]
|
||||
|
||||
|
||||
EXTRACTORS: tuple[Callable[[Configgen], list[Launcher]], ...] = (
|
||||
duckstation, duckstation_legacy, hatari, xemu, melonds, mupen64plus,
|
||||
x16emu, gsplus, lexaloffle, environment_directories, config_directories,
|
||||
core_file_options, working_directories,
|
||||
core_file_options, working_directories, search_paths,
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user