Files
libretro/schemas/romfolders.schema.json
T
Abdessamad Derraz 7a3d91585d feat: read ES-DE MAME search paths
ES-DE starts standalone MAME with -rompath %GAMEDIR%\;%ROMPATH%/<system>
in 78 live commands across 54 systems (resources/systems/linux/
es_systems.xml at retrodeck-main-20261103-162710, 15e1b236; two more
are commented out). The command line outranks mame.ini, so RetroDECK's
MAME reads its sets in the roms folder each command names and in no
BIOS folder. The ES-DE rom folders parser now records, per folder, the
folders a standalone command passes as its ROM search path and the
machines it starts, or that the game is the machine (%BASENAME%).
Rescraped at the pinned revisions: retrodeck, emudeck and
emudeck-windows gain these records and nothing else.

A command reads the sets its machines load: the machine's own set, the
BIOS sets on its romof chain and the device sets with ROMs it
instantiates, from games/arcade/mame.json (mame0289 -listxml). That
index now also lists the game and device sets of each driver source
file, so a %BASENAME% folder reads for its board: neogeo and stv by
their BIOS root, cps1-3 and model2 by source file, daphne and laserdisc
by the laserdisc player devices, gameandwatch and lcdgames by the
handheld sources, any other (arcade, mame, consolearcade) for every
machine. The published installer copy of the index leaves the sources
out.

Manifests: RetroDECK gains 1399 files, 378.2 MB, below roms/. Of the 219
sets named as read outside the BIOS folder, 58 reach 146 files (25.9 MB),
161 stay named, no command's machine reading them. 441 sets RetroDECK's
list also declares at bios/ reach 1253 files (352.3 MB), 429 each in
arcade and mame and 480 in consolearcade. No other platform changes.
2026-11-11 11:17:06 +01:00

146 lines
6.5 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://abdess.github.io/retrobios/api/v1/schemas/romfolders.schema.json",
"title": "RetroBIOS rom folders of one setup",
"description": "What a frontend's own source says about its game folders, read at pinned revisions (platforms/romfolders/<setup>.yml, written by python -m scripts.scraper.romfolders). Names are the OS's own: scripts/romfolders.py resolves them to repository systems and profiles.",
"type": "object",
"additionalProperties": false,
"required": ["setup", "name", "platform", "sources", "roms_root", "case_sensitive", "folders"],
"$defs": {
"ref": {
"type": "string",
"description": "'<source key> <path>:<line>[-<line>]', several joined by '; '. The key names an entry of sources.",
"pattern": "^[a-z0-9][a-z0-9-]* \\S+(?:; [a-z0-9][a-z0-9-]* \\S+)*$"
},
"named_rule": {
"type": "object",
"additionalProperties": false,
"required": ["source_ref"],
"properties": {
"name": { "type": "string", "minLength": 1 },
"pattern": { "type": "string", "minLength": 1 },
"reason": { "type": "string", "minLength": 1 },
"source_ref": { "$ref": "#/$defs/ref" }
},
"oneOf": [{ "required": ["name"] }, { "required": ["pattern"] }]
},
"board_default": {
"type": "object",
"additionalProperties": false,
"required": ["core", "source_ref"],
"properties": {
"core": { "type": "string", "minLength": 1 },
"emulator": { "type": "string", "minLength": 1 },
"source_ref": { "$ref": "#/$defs/ref" }
}
}
},
"properties": {
"setup": { "type": "string", "pattern": "^[a-z0-9][a-z0-9-]*$" },
"name": { "type": "string", "minLength": 1 },
"platform": {
"type": "string",
"description": "The install manifest (install/<platform>.json) the installer uses on this setup, as install.py's OS rules choose it. Empty for a setup the installer lays out with no manifest."
},
"sources": {
"type": "object",
"minProperties": 1,
"additionalProperties": {
"type": "object",
"additionalProperties": false,
"required": ["repo", "commit"],
"properties": {
"repo": { "type": "string", "pattern": "^https://" },
"commit": { "type": "string", "pattern": "^[0-9a-f]{40}$" },
"tag": { "type": "string" },
"note": { "type": "string" }
}
}
},
"roms_root": {
"type": "object",
"additionalProperties": false,
"required": ["path", "from_bios", "source_ref"],
"properties": {
"path": { "type": ["string", "null"], "minLength": 1, "description": "Null for a setup with no rom folder of its own." },
"from_bios": {
"type": ["string", "null"],
"description": "The roms root relative to the BIOS folder the installer already knows. Null when no fixed relation exists."
},
"source_ref": { "$ref": "#/$defs/ref" }
}
},
"case_sensitive": {
"type": ["boolean", "null"],
"description": "Whether the OS opens a folder only under the spelling it lists. Null when the source does not settle it (filesystem dependent)."
},
"case_ref": { "$ref": "#/$defs/ref" },
"skip": {
"type": "array",
"description": "Folders under the roms root the scan never enters (the ELEC family's bios folder, the OS's own data).",
"items": { "$ref": "#/$defs/named_rule" }
},
"hidden": {
"type": "array",
"description": "File and folder name patterns (fnmatch, case-insensitive) the OS hides from its game list.",
"items": { "$ref": "#/$defs/named_rule" }
},
"media": {
"type": "array",
"description": "Folders inside a system folder that hold artwork, never games.",
"items": { "$ref": "#/$defs/named_rule" }
},
"notes": { "type": "array", "items": { "type": "string", "minLength": 1 } },
"folders": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"required": ["folder", "source_ref"],
"properties": {
"folder": { "type": "string", "minLength": 1, "description": "Path under the roms root, as the OS writes it." },
"name": { "type": "string", "minLength": 1, "description": "The OS's own system id when it differs from the folder." },
"aliases": { "type": "array", "items": { "type": "string", "minLength": 1 }, "uniqueItems": true },
"extensions": {
"type": "array",
"description": "Lowercased, with the dot. Absent when the OS lists every file.",
"items": { "type": "string", "pattern": "^\\.[^A-Z\\s]+$" },
"uniqueItems": true
},
"files": {
"type": "array",
"description": "Whole file names the OS lists as games, as it writes them, in place of or beside extensions.",
"items": { "type": "string", "minLength": 1 },
"uniqueItems": true
},
"core": { "type": "string", "minLength": 1, "description": "The core or emulator the OS starts by default, in its own spelling." },
"emulator": { "type": "string", "minLength": 1 },
"source_ref": { "$ref": "#/$defs/ref" },
"board_defaults": {
"type": "object",
"additionalProperties": { "$ref": "#/$defs/board_default" }
},
"arcade": { "type": "boolean" },
"searched_by": {
"type": "array",
"description": "The standalone emulators whose commands for this folder pass a ROM search path, and the folders below the roms root it names.",
"items": {
"type": "object",
"additionalProperties": false,
"required": ["emulator", "reads", "source_ref"],
"properties": {
"emulator": { "type": "string", "minLength": 1 },
"reads": { "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1 }, "uniqueItems": true },
"machines": { "type": "array", "description": "The machines the commands start, as the emulator names them.", "items": { "type": "string", "minLength": 1 }, "uniqueItems": true },
"any_machine": { "type": "boolean", "description": "A command starts the game itself as the machine (ES-DE's %BASENAME%)." },
"source_ref": { "$ref": "#/$defs/ref" }
}
}
},
"note": { "type": "string", "minLength": 1 }
}
}
}
}
}