fix: read recalbox mandatory per named core

An element lists its cores. Its mandatory flag now follows whether those
cores need the file, and stays as written where none of them reads it.
cdi/cdibios.zip keeps mandatory=false (same_cdi does not read it), the
two amiberry kickstarts keep theirs, saturn_bios.bin becomes optional
for the three HLE cores it names.
This commit is contained in:
Abdessamad Derraz committed 2026-10-21 05:10:54 +02:00
1 parent fbf7cb191b
commit 2e29b3be03
6 files changed
+108 -48

No files matched your search

+8
View File
@@ -200,6 +200,14 @@ class BaseExporter(ABC):
return self.single_value(fe, field_name)
return ",".join(fe.hashes(field_name))
def required_value(self, fe: NativeFile) -> bool:
"""The requirement the render writes for an entry.
The model's flag is true when any core needs the file. A format
that names the cores of each entry narrows it to those cores.
"""
return fe.required
def states(self, fe: NativeFile, field_name: str) -> bool:
"""Whether the written file carries this entry's corrected field.