fix: mark ps2 bios images as found by content

PCSX2 and its forks keep the first 4 to 8 MB image with a romdir in
the BIOS folder (pcsx2/ps2/BiosTools.cpp:258-282, 317-332 at f0523f8a),
and PCSX2 1.6 lists the same test in its BIOS picker
(BiosSelectorPanel.cpp:151-177). The names are labels. Without found_by
the truth model read ps2-0230a-20080220.bin as a name the core opens, and
the RetroDECK export added it as a required file.
This commit is contained in:
Abdessamad Derraz committed 2026-11-05 12:10:34 +01:00
1 parent 7722e96f5a
commit f0e488c558
12 files changed
+37

No files matched your search

+1
View File
@@ -102,6 +102,7 @@ notes: |
files:
- name: ps2-0230a-20080220.bin
found_by: content
path: bios/ps2-0230a-20080220.bin
required: true
min_size: 4194304
+1
View File
@@ -163,6 +163,7 @@ notes: |
files:
- name: ps2-0230a-20080220.bin
found_by: content
path: pcsx2/bios/ps2-0230a-20080220.bin
aliases: [ps2-0250j-20100415.bin]
standalone_path: bios/ps2-0230a-20080220.bin
+1
View File
@@ -45,6 +45,7 @@ data_directories:
files:
- name: "<bios>.bin"
found_by: content
path: "pcsx2/bios/<bios>.bin"
required: true
description: "PS2 BIOS binary"
+1
View File
@@ -168,6 +168,7 @@ notes: |
files:
- name: ps2-0230a-20080220.bin
found_by: content
path: bios/ps2-0230a-20080220.bin
required: true
min_size: 4194304
+1
View File
@@ -149,6 +149,7 @@ notes: |
files:
- name: ps2-0230a-20080220.bin
found_by: content
path: bios/ps2-0230a-20080220.bin
required: true
min_size: 4194304
+1
View File
@@ -129,6 +129,7 @@ notes: |
files:
- name: ps2-0230a-20080220.bin
found_by: content
path: bios/ps2-0230a-20080220.bin
required: true
min_size: 4194304
+1
View File
@@ -91,6 +91,7 @@ notes: |
files:
- name: "<bios>.bin"
found_by: content
path: "pcsx2/bios/<bios>.bin"
description: "PS2 BIOS image"
min_size: 4194304
+1
View File
@@ -77,6 +77,7 @@ notes: |
files:
- name: ps2-0230a-20080220.bin
found_by: content
system: sony-playstation-2
required: true
description: "PS2 console BIOS"
+1
View File
@@ -25,6 +25,7 @@ notes: |
files:
- name: ps2-0230a-20080220.bin
found_by: content
aliases: [ps2-0250j-20100415.bin, SCPH-70004_BIOS_V12_EUR_200.BIN]
required: true
min_size: 4194304
+1
View File
@@ -80,6 +80,7 @@ notes: |
files:
- name: COH-H31100.rom0
found_by: content
system: namco-system246
required: true
min_size: 4194304
+1
View File
@@ -179,6 +179,7 @@ notes: |
files:
- name: ps2-0230a-20080220.bin
found_by: content
path: pcsx2/bios/ps2-0230a-20080220.bin
aliases: [ps2-0250j-20100415.bin]
standalone_path: bios/ps2-0230a-20080220.bin
+26
View File
@@ -6878,5 +6878,31 @@ class ProfileNotesDescribeTheCoreAlone(unittest.TestCase):
self.assertEqual(found, [])
class Ps2BiosImagesAreFoundByContent(unittest.TestCase):
"""PCSX2 and its forks scan the BIOS folder and keep the first 4 to 8 MB
image with a romdir (pcsx2/ps2/BiosTools.cpp:258-282 at f0523f8a). With
no found_by the label ps2-0230a-20080220.bin read as a name the core
opens, and the RetroDECK export added it as a required file."""
def test_every_ps2_image_scan_is_marked(self):
import yaml
from validation import opens_by_name
named = []
for path in sorted((ROOT / "emulators").glob("*.yml")):
profile = yaml.safe_load(path.read_text(encoding="utf-8")) or {}
if profile.get("bios_mode") != "agnostic":
continue
for entry in profile.get("files") or []:
if (
entry.get("min_size") == 4194304
and entry.get("max_size") == 8388608
and opens_by_name(entry, profile)
):
named.append(f"{path.stem}: {entry['name']}")
self.assertEqual(named, [])
if __name__ == "__main__":
unittest.main()