diff --git a/emulators/ares.yml b/emulators/ares.yml index afe61555..4aefd9b3 100644 --- a/emulators/ares.yml +++ b/emulators/ares.yml @@ -170,7 +170,7 @@ files: # Also used by Mega CD 32X (desktop-ui/emulator/mega-cd-32x.cpp) - name: SegaCDBIOS9303.bin system: mega-cd - region: [north-america] + region: [north-america, latin-america] required: true sha256: "fb477cdbf94c84424c2feca4fe40656d85393fe7b7b401911b45ad2eb991258c" validation: [sha256] diff --git a/emulators/jgenesis.yml b/emulators/jgenesis.yml index 06f8f1b1..cbd04fe8 100644 --- a/emulators/jgenesis.yml +++ b/emulators/jgenesis.yml @@ -77,7 +77,7 @@ files: - name: "bios_CD_U.bin" system: sega-megacd description: "Sega CD BIOS (US)" - region: [north-america] + region: [north-america, latin-america] required: true size: 131072 validation: [size] diff --git a/emulators/md-emu.yml b/emulators/md-emu.yml index 8522a9a4..f6d98a90 100644 --- a/emulators/md-emu.yml +++ b/emulators/md-emu.yml @@ -94,7 +94,7 @@ notes: | files: - name: bios_CD_U.bin system: sega-megacd - region: [north-america] + region: [north-america, latin-america] required: true agnostic: true size: 131072 diff --git a/tests/test_region.py b/tests/test_region.py index 943fe854..372591a5 100644 --- a/tests/test_region.py +++ b/tests/test_region.py @@ -1072,5 +1072,27 @@ class ANameNoCodeOpensCarriesNoRegion(unittest.TestCase): self.assertNotIn("region", entry) +class MegaCdAmericasIsOneCode(unittest.TestCase): + """A Sega CD disc carries one region code for all the Americas, so every + emulator picking the US BIOS by that code picks it for a Brazilian disc + too. jgenesis, md-emu and ares tagged it north-america alone, and a + --region brazil pack dropped the BIOS those discs boot with.""" + + def test_a_us_mega_cd_bios_includes_latin_america(self): + import yaml + + root = Path(__file__).resolve().parents[1] + narrow = [] + for path in sorted((root / "emulators").glob("*.yml")): + profile = yaml.safe_load(path.read_text(encoding="utf-8")) or {} + for entry in profile.get("files") or []: + system = str(entry.get("system", "")) + regions = entry.get("region") or [] + if system in ("sega-megacd", "mega-cd") and "north-america" in regions \ + and "latin-america" not in regions: + narrow.append(f"{path.stem}: {entry.get('name')}") + self.assertEqual(narrow, []) + + if __name__ == "__main__": unittest.main()