fix: the US Mega-CD BIOS also serves Latin America

jgenesis picks it for GenesisRegion::Americas, md-emu for boot byte 0x7a, ares for an NTSC-U disc: one code for every disc of the Americas, Brazilian Tec Toy releases included. The three tagged it north-america alone, so --region brazil dropped the BIOS those discs need. genesis_plus_gx and picodrive already carried both.
This commit is contained in:
Abdessamad Derraz committed 2026-10-20 01:19:16 +02:00
1 parent 7aa9b3fcaa
commit 8f8020f27d
4 files changed
+25 -3

No files matched your search

+22
View File
@@ -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()