Files
libretro/schemas/romfolders.schema.json
T
Abdessamad Derraz 801af113b7 feat: record every core a rom folder offers
The rom folders files kept the default core of each folder only, so a
core the user picks in the frontend's menu was not known to read its
sets there. Each folder now lists its offers: every <core> of every
<emulator> in AmberELEC's es_systems.cfg (arcade:
packages/ui/emulationstation/config/es_systems.cfg:116-150), every core
of EmuELEC's es_systems.json, every add_emu_core of ROCKNIX's emulators
package.mk with the device case it is written under (arcade: 218-229),
and the emulator of every ES-DE <command>. A core written under every
branch of a case is offered unconditionally. The ES-XML, ES-JSON,
ELEC-conf and ES-DE setups are rescraped at their pins: archr, arkos,
chaos, darkos, jelos, kolos, pan4elec, retrobat and unofficialos gain
the same records and nothing else.

A libretro core offered for a folder reads the sets it loads beside the
game there, as the default one does.

Manifests, roms folders gaining sets read beside the game:
- AmberELEC: +215 (293.1 MB) in fbneo, arcade and mame, for MAME 2010,
  2015, 2016 and 2003-Plus. 1 omission leaves.
- EmuELEC: +291 (232.0 MB) in cps1, cps2, cps3, mame, fbneo and
  arcade, for MAME 2010 and 2003-Plus. 47 omissions leave.
- ROCKNIX: +501 (538.7 MB) in fbneo, neogeo, cps1, cps2, cps3, arcade
  and mame, for MAME 2010, 2015 and 2003-Plus. 120 omissions leave.
- EmuDeck: +306 (251.2 MB) in cps, cps1, cps2, cps3, arcade and mame,
  for MAME 2000, 2003, 2003-Plus and 2010. 92 omissions leave.
Each omission that leaves was a set named as read outside the BIOS
folder. RetroDECK and the other platforms do not change. No file
leaves, and verify --all keeps its severity and status counts.
2026-11-11 12:57:45 +01:00

162 lines
7.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" }
},
"offers": {
"type": "array",
"description": "Every emulator and core the frontend can start for this folder, the default included, in the list's order. Absent when the default is the only one.",
"items": {
"type": "object",
"additionalProperties": false,
"required": ["core"],
"properties": {
"emulator": { "type": "string", "minLength": 1 },
"core": { "type": "string", "minLength": 1 },
"when": { "type": "string", "minLength": 1, "description": "The build condition the offer is written under (a device case)." },
"source_ref": { "$ref": "#/$defs/ref" }
}
}
},
"arcade": { "type": "boolean" },
"searched_by": {
"type": "array",
"description": "The emulators, or the libretro core with its runner, 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 },
"core": { "type": "string", "minLength": 1, "description": "The libretro core RetroArch starts, handed the search path in its content command line." },
"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 }
}
}
}
}
}