mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-10-27 14:17:25 -05:00
fix: serve australian mega cd discs their pal bios
BlastEm and Kega Fusion pick the European Mega CD BIOS for every disc whose region code is the PAL one, Australian discs included: BlastEm reads E or bit 8 of the header region (romdb.c:176-215), Fusion the security byte 0x64 at 0x20B. Both now carry oceania, and a repo-wide test holds every European Mega CD BIOS to it. Fusion picks its export Master System BIOS from the CountryOrder setting or a CRC32 list, never from the cart, so bios_U.sms and bios_E.sms carry no region.
This commit is contained in:
1 parent
348c56e94c
commit
4e8d375074
3 files changed
+47
-11
No files matched your search
@@ -889,6 +889,8 @@ class RegionalRequestsKeepWhatTheCodeLoads(unittest.TestCase):
|
||||
("ace-dl", ["france"], "private/firmware/Amstrad_s4.cpr"),
|
||||
("duckstation", ["brazil"], "scph5501.bin"),
|
||||
("duckstation", ["south-korea"], "scph5500.bin"),
|
||||
("blastem", ["australia", "north-america"], "bios_CD_E.bin"),
|
||||
("kega-fusion", ["australia", "north-america"], "eu_mcd1_9210.bin"),
|
||||
)
|
||||
|
||||
def test_each_request_keeps_its_file(self):
|
||||
@@ -1094,6 +1096,42 @@ class MegaCdAmericasIsOneCode(unittest.TestCase):
|
||||
self.assertEqual(narrow, [])
|
||||
|
||||
|
||||
class MegaCdEuropeServesOceania(unittest.TestCase):
|
||||
"""A Mega CD disc carries one PAL code for Europe and Australia, so every
|
||||
emulator picking the European BIOS by that code picks it for an
|
||||
Australian disc too. blastem and kega-fusion tagged it europe alone, and a
|
||||
--region au,us pack dropped the BIOS those discs boot with."""
|
||||
|
||||
def test_a_european_mega_cd_bios_includes_oceania(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 "europe" in regions \
|
||||
and "oceania" not in regions:
|
||||
narrow.append(f"{path.stem}: {entry.get('name')}")
|
||||
self.assertEqual(narrow, [])
|
||||
|
||||
|
||||
class FusionSmsExportBiosFollowsTheSetting(unittest.TestCase):
|
||||
"""Kega Fusion tells a Japanese Master System cart from an export one by
|
||||
the header, then picks USA or EUR from its CountryOrder setting or a CRC32
|
||||
list. Neither export BIOS is chosen for a territory the cart names."""
|
||||
|
||||
def test_the_export_bioses_are_unregioned(self):
|
||||
from common import load_emulator_profiles
|
||||
|
||||
files = {f["name"]: f for f in load_emulator_profiles("emulators")["kega-fusion"]["files"]}
|
||||
for name in ("bios_U.sms", "bios_E.sms"):
|
||||
with self.subTest(name=name):
|
||||
self.assertNotIn("region", files[name])
|
||||
|
||||
|
||||
class NoMarketStopsAtAustralia(unittest.TestCase):
|
||||
"""simple64 tagged its PAL PIF [europe, australia]. New Zealand is not
|
||||
under australia, so --region new-zealand kept only the NTSC PIF, though
|
||||
|
||||
Reference in new issue
Block a user