mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-06 01:53:56 -06:00
fix: mark openmsx system roms as found by sha1
openMSX reaches a ROM in share/systemroms through its file pool by SHA1 alone. A filename is only looked up beside the machine's XML (src/memory/Rom.cc:121-170, HardwareConfig.cc:279-280, FileContext.cc:152-156 at a557de7b). The labels read as names the core opens, and the export added 15 of them to KNULLI and 2 to Batocera.
This commit is contained in:
1 parent
2009f38256
commit
cb4649bb23
2 files changed
+24
-1
No files matched your search
@@ -10,6 +10,7 @@ version_basis:
|
||||
tag: "RELEASE_22_0_RC2"
|
||||
distance: 0
|
||||
display_name: "MSX / ColecoVision / Spectravideo (openMSX)"
|
||||
found_by: content
|
||||
cores:
|
||||
- openmsx
|
||||
systems:
|
||||
@@ -29,7 +30,9 @@ notes: |
|
||||
|
||||
ROM resolution via FilePool (src/file/FilePool.cc, FilePoolCore.cc):
|
||||
searches configured directories for files matching SHA1 checksums.
|
||||
Filenames are secondary hints, while SHA1 is the primary lookup key.
|
||||
A ROM in share/systemroms is reached by its SHA1 alone: a filename is only
|
||||
looked up beside the machine's XML (src/memory/Rom.cc:121-170,
|
||||
src/config/HardwareConfig.cc:279-280, src/file/FileContext.cc:152-156).
|
||||
Files may be gzipped or individually zipped.
|
||||
Each user data directory contributes share/systemroms, scanned
|
||||
recursively (src/file/FilePool.cc:27, src/file/FilePoolCore.cc:369-385). RetroBat
|
||||
|
||||
@@ -6924,5 +6924,25 @@ class Dev9FilesAreReadFromTheWorkingDirectory(unittest.TestCase):
|
||||
self.assertEqual(unset, [])
|
||||
|
||||
|
||||
class OpenMsxSystemRomsAreFoundBySha1(unittest.TestCase):
|
||||
"""openMSX reaches a ROM in share/systemroms through the file pool by
|
||||
SHA1 alone, a filename being looked up only beside the machine's XML
|
||||
(src/memory/Rom.cc:121-170). Read as names the core opens, the labels
|
||||
were added to the KNULLI and Batocera exports."""
|
||||
|
||||
def test_no_systemrom_label_reads_as_a_name(self):
|
||||
import yaml
|
||||
|
||||
from validation import opens_by_name
|
||||
|
||||
profile = yaml.safe_load((ROOT / "emulators" / "openmsx.yml").read_text())
|
||||
named = [
|
||||
entry["name"] for entry in profile["files"]
|
||||
if "share/systemroms/" in str(entry.get("path"))
|
||||
and opens_by_name(entry, profile)
|
||||
]
|
||||
self.assertEqual(named, [])
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
Reference in new issue
Block a user