From c5d434e7d0ff3b4aaa2154f4bc6bf3b7e31e1689 Mon Sep 17 00:00:00 2001 From: Abdessamad Derraz <3028866+Abdess@users.noreply.github.com> Date: Fri, 16 Oct 2026 09:49:32 +0200 Subject: [PATCH] fix: tag the clk western sms bios for brazil --- emulators/clk.yml | 6 +++--- tests/test_profile_checks.py | 16 ++++++++++++++++ 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/emulators/clk.yml b/emulators/clk.yml index 475a0a62..f9afdcbb 100644 --- a/emulators/clk.yml +++ b/emulators/clk.yml @@ -708,12 +708,12 @@ files: path: MasterSystem/bios.sms system: sega-mastersystem description: "European/US Master System BIOS" - region: [north-america, europe] + region: [north-america, europe, brazil] size: 8192 crc32: "0072ed54" required: false - note: "Optional. Boots cartridge directly if absent." - source_ref: "Machines/Utility/ROMCatalogue.cpp:764-771" + note: "Optional. Boots cartridge directly if absent. Loaded for every region but Japan." + source_ref: "Machines/Utility/ROMCatalogue.cpp:764-771, Machines/MasterSystem/MasterSystem.cpp:137-140, Analyser/Static/Sega/Target.hpp:24-29" - name: japanese-bios.sms path: MasterSystem/japanese-bios.sms diff --git a/tests/test_profile_checks.py b/tests/test_profile_checks.py index 8624b9ed..e3897b2f 100644 --- a/tests/test_profile_checks.py +++ b/tests/test_profile_checks.py @@ -344,5 +344,21 @@ class AzaharConsoleUniqueData(_Probe): self.assertFalse(self.accepts("azahar", name, b"\0" * (size + 7))) +class ClkMasterSystemBios(unittest.TestCase): + """CLK loads the western Master System BIOS for every region but Japan, + Brazil included (Machines/MasterSystem/MasterSystem.cpp:137-140, + Analyser/Static/Sega/Target.hpp:24-29 at 53a1ee7). Tagged north-america + and europe only, a Brazilian pack dropped it for the Japanese one.""" + + def test_brazil_keeps_the_western_bios(self): + import region + + index = region.build_region_index({"clk": _profile("clk")}) + group = {"sms": [("MasterSystem/bios.sms", "bios.sms"), + ("MasterSystem/japanese-bios.sms", "japanese-bios.sms")]} + drops = region.resolve_region_drops(group, index, ["brazil"]) + self.assertEqual(drops, {"MasterSystem/japanese-bios.sms"}) + + if __name__ == "__main__": unittest.main()