diff --git a/emulators/bizhawk.yml b/emulators/bizhawk.yml index 2d727fc13..e5c28dfc3 100644 --- a/emulators/bizhawk.yml +++ b/emulators/bizhawk.yml @@ -178,7 +178,7 @@ files: size: 251658304 storage: large_file description: "DSi NAND (USA)" - region: [north-america] + region: [north-america, latin-america] source_ref: "src/BizHawk.Emulation.Common/Database/FirmwareDatabase.cs:407, src/BizHawk.Emulation.Cores/Consoles/Nintendo/NDS/MelonDS.cs:484, 684-706" note: "Slot NDS+NAND_USA has a placeholder hash, so the scan never finds it. Only a user specification reaches it. Read in DSi mode. A title whose ID upper word is 0x000300xx (DSi) gets only the NAND of a region its header byte 0x1B0 allows, any other title the first held in the order JPN, USA, EUR, AUS, CHN, KOR. The size includes the 64-byte nocash footer." diff --git a/install/retrobat.json b/install/retrobat.json index f91c32258..c5bfa3a38 100644 --- a/install/retrobat.json +++ b/install/retrobat.json @@ -46107,6 +46107,7 @@ "nintendo-ds" ], "regions": [ + "latin-america", "north-america" ], "region_groups": [ diff --git a/tests/test_region.py b/tests/test_region.py index 22c5624a7..4cf0c2742 100644 --- a/tests/test_region.py +++ b/tests/test_region.py @@ -1437,6 +1437,20 @@ class UsaRegionServesTheAmericas(unittest.TestCase): regions = region.lookup_regions(index, destination, name) self.assertEqual(region.rank(regions, requested), 0) + def test_brazil_ranks_the_usa_dsi_nand_before_the_japanese_one(self): + """BizHawk's DecideNAND knows JPN, USA, EUR, AUS, CHN and KOR region + bits (MelonDS.cs:684-706): a DSi title from the Americas carries USA.""" + import yaml + + bizhawk = self.PROFILE.with_name("bizhawk.yml") + profile = yaml.safe_load(bizhawk.read_text(encoding="utf-8")) + index = region.build_region_index({"bizhawk": profile}) + requested = region.parse_requested("br,jp") + usa = region.lookup_regions(index, "", "DSi_Nand_USA.bin") + jpn = region.lookup_regions(index, "", "DSi_Nand_JPN.bin") + self.assertEqual(region.rank(usa, requested), 0) + self.assertEqual(region.rank(jpn, requested), 1) + if __name__ == "__main__": unittest.main()