fix: tag regions only where the code picks by area

This commit is contained in:
Abdessamad Derraz committed 2026-10-06 09:37:44 +02:00
1 parent 3183ad982c
commit 4e3ae6a941
4 files changed
+32 -11

No files matched your search

-3
View File
@@ -101,7 +101,6 @@ files:
- name: "psxonpsp660.bin"
description: "PSP embedded PS1 BIOS (region-free override)"
region: [world]
required: false
size: 524288
sha1: "96880d1ca92a016ff054be5159bb06fe03cb4e14"
@@ -114,7 +113,6 @@ files:
- name: "ps1_rom.bin"
description: "PS3 embedded PS1 BIOS, first 512KB extracted (region-free override)"
region: [world]
required: false
sha1: "c40146361eb8cf670b19fdc9759190257803cab7"
md5: "81bbe60ba7a3d1cea1d48c14cbcc647b"
@@ -126,7 +124,6 @@ files:
- name: "openbios.bin"
description: "OpenBIOS (open-source PS1 HLE BIOS, region-free override)"
region: [world]
required: false
size: 524288
mode: libretro
+2 -2
View File
@@ -292,7 +292,7 @@ files:
- name: "scph5502.bin"
system: sony-playstation
description: "SCPH-5502 / v3.0E BIOS"
region: [europe]
region: [europe, oceania]
required: true
size: 524288
sha256: "1faaa18fa820a0225e488d9f086296b8e6c46df739666093987ff7d8fd352c09"
@@ -376,7 +376,7 @@ files:
- name: "epr-17952a.ic8"
system: sega-stv
description: "ST-V BIOS (North America)"
region: [north-america]
region: [north-america, south-korea, asia-pal, brazil, latin-america]
required: true
size: 524288
validation: [size]
-6
View File
@@ -23,28 +23,24 @@ notes: >
files:
- name: "syscard3.pce"
description: "CD-ROM System Card 3.0 (Japan)"
region: [japan]
required: true
source_ref: "libretro.c:65, libretro.c:1896-1901"
note: "Default value for pce_fast_cdbios option."
- name: "syscard2.pce"
description: "CD-ROM System Card 2.0 (Japan)"
region: [japan]
required: false
source_ref: "libretro.c:1903"
note: "pce_fast_cdbios = 'System Card 2'."
- name: "syscard1.pce"
description: "CD-ROM System Card 1.0 (Japan)"
region: [japan]
required: false
source_ref: "libretro.c:1905"
note: "pce_fast_cdbios = 'System Card 1'."
- name: "gexpress.pce"
description: "Games Express CD Card"
region: [japan]
required: false
aliases: ["gecard.pce"]
source_ref: "libretro.c:1906-1907"
@@ -52,14 +48,12 @@ files:
- name: "syscard3u.pce"
description: "CD-ROM System Card 3.0 (US / TurboGrafx-CD)"
region: [north-america]
required: false
source_ref: "libretro.c:1908-1909"
note: "pce_fast_cdbios = 'System Card 3 US'. Not in .info."
- name: "syscard2u.pce"
description: "CD-ROM System Card 2.0 (US / TurboGrafx-CD)"
region: [north-america]
required: false
source_ref: "libretro.c:1910-1911"
note: "pce_fast_cdbios = 'System Card 2 US'. Not in .info."
+30
View File
@@ -630,5 +630,35 @@ class TestReportAndBuilderNarrowTogether(unittest.TestCase):
self.assertIn("oceania", regions)
class RegionalRequestsKeepWhatTheCodeLoads(unittest.TestCase):
"""A --region request never drops the file the core opens for it.
mednafen_pce_fast tagged option-selected cards with territories, beetle_psx
tagged its override BIOS [world], mednafen tagged the ST-V NA BIOS for
America alone and the PAL PSX BIOS for Europe alone.
"""
CASES = (
("mednafen_pce_fast", ["north-america"], "syscard3.pce"),
("beetle_psx", ["brazil"], "scph5501.bin"),
("mednafen", ["south-korea", "europe"], "epr-17952a.ic8"),
("mednafen", ["australia", "north-america"], "scph5502.bin"),
)
def test_each_request_keeps_its_file(self):
sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..", "scripts"))
import common
from packextras import emulator_region_drops
profiles = common.load_emulator_profiles(
os.path.join(os.path.dirname(__file__), "..", "emulators")
)
for name, regions, kept in self.CASES:
with self.subTest(profile=name, regions=regions):
drops = emulator_region_drops([(name, profiles[name])], False, regions)
self.assertNotIn(kept, drops)
if __name__ == "__main__":
unittest.main()