fix: tag regions by the branch the code takes

Mega CD US BIOS serves every non-EU, non-JP disc; Dolphin boots
Korean discs from the JAP directory; Beetle never opens scph5903.bin
under that name.
This commit is contained in:
Abdessamad Derraz committed 2026-10-18 14:48:14 +02:00
1 parent e7f714269a
commit a08827257d
22 files changed
+176 -104

No files matched your search

+1 -1
View File
@@ -45,8 +45,8 @@ files:
- name: "scph5903.bin"
description: "SCPH-5903 (System ROM Version 2.2 12/04/95 J), Video CD daughterboard"
region: [japan]
required: false
note: "No code path opens this name: the Japanese name list and the SHA-1 scan look for scph5500.bin (libretro.c:594-602, 486-490). Copied as scph5500.bin it loads with a SHA-1 warning (libretro.c:680-687) and enables the Video CD daughterboard."
size: 1048576
sha1: "15c94da3cc5a38a582429575af4198c487fe893c"
md5: "81328b966e6dcf7ea1e32e55e1c104bb"
+1 -1
View File
@@ -111,7 +111,7 @@ files:
system: nintendo-gamecube
required: false
hle_fallback: true
region: [japan]
region: [japan, south-korea]
size: 2097152
crc32: ["6dac1f2a", "d5e6feea", "86573808", "667d0b64"]
validation: [crc32]
+1 -1
View File
@@ -147,7 +147,7 @@ files:
system: nintendo-gamecube
required: false
hle_fallback: true
region: [japan]
region: [japan, south-korea]
size: 2097152
crc32: ["6dac1f2a", "d5e6feea", "86573808", "667d0b64"]
validation: [crc32]
+1 -1
View File
@@ -58,7 +58,7 @@ files:
- name: "IPL.bin"
path: "dolphin-emu/Sys/GC/JAP/IPL.bin"
standalone_path: "GC/JAP/IPL.bin"
region: [japan]
region: [japan, south-korea]
size: 2097152
required: false
hle_fallback: true
+2 -2
View File
@@ -40,9 +40,9 @@ files:
# -------------------------------------------------------
- name: bios_CD_U.bin
system: sega-megacd
region: [north-america]
region: [north-america, latin-america]
required: true
note: "Sega CD (NTSC-U) boot ROM. Loaded for REGION_USA."
note: "Sega CD (NTSC-U) boot ROM. Loaded for REGION_USA, which get_region sets for every disc whose security byte is neither 0x64 (Europe) nor 0xa1 (Japan) (core/loadrom.c:1065-1078)."
source_ref: "core/loadrom.c:409"
- name: bios_CD_E.bin
+1 -1
View File
@@ -27,7 +27,7 @@ notes: |
files:
- name: bios_CD_U.bin
system: sega-megacd
region: [north-america]
region: [north-america, latin-america]
required: true
size: 131072
source_ref: "core/loadrom.c:408"
+1 -1
View File
@@ -55,7 +55,7 @@ files:
- name: "IPL.bin"
path: "dolphin-emu/Sys/GC/JAP/IPL.bin"
standalone_path: "GC/JAP/IPL.bin"
region: [japan]
region: [japan, south-korea]
size: 2097152
required: false
hle_fallback: true
+5 -5
View File
@@ -65,17 +65,17 @@ files:
- name: "us_scd2_9306.bin"
system: sega-megacd
variant_group: "mega-cd-bios"
region: [north-america]
region: [north-america, latin-america]
priority: 1
required: true
size: 131072 # 128 KB (0x20000)
note: "US Sega CD Model 2 BIOS (September 1993). First in US search order."
note: "US Sega CD Model 2 BIOS (September 1993). First in US search order. The US list serves every disc whose security byte is neither 0x64 nor 0xa1 (pico/cd/cd_image.c:190, 247-248)."
source_ref: "platform/libretro/libretro.c:1273"
- name: "SegaCDBIOS9303.bin"
system: sega-megacd
variant_group: "mega-cd-bios"
region: [north-america]
region: [north-america, latin-america]
priority: 2
required: false
size: 131072
@@ -85,7 +85,7 @@ files:
- name: "us_scd1_9210.bin"
system: sega-megacd
variant_group: "mega-cd-bios"
region: [north-america]
region: [north-america, latin-america]
priority: 3
required: false
size: 131072
@@ -95,7 +95,7 @@ files:
- name: "bios_CD_U.bin"
system: sega-megacd
variant_group: "mega-cd-bios"
region: [north-america]
region: [north-america, latin-america]
priority: 4
required: false
size: 131072
+1 -1
View File
@@ -52,7 +52,7 @@ files:
- name: "IPL.bin"
path: "GC/JAP/IPL.bin"
region: [japan]
region: [japan, south-korea]
size: 2097152
required: false
hle_fallback: true
+2 -2
View File
@@ -141,7 +141,7 @@ files:
path: "GC/JAP/IPL_TRI.bin"
description: "Triforce boot ROM, NTSC-J directory"
system: sega-triforce
region: [japan]
region: [japan, south-korea]
size: 2097152
crc32: "d1883221"
validation: [crc32]
@@ -214,7 +214,7 @@ files:
- name: "IPL.bin"
path: "GC/JAP/IPL.bin"
description: "GameCube NTSC-J boot ROM"
region: [japan]
region: [japan, south-korea]
size: 2097152
required: false
hle_fallback: true
+12 -10
View File
@@ -8954,7 +8954,8 @@
"europe",
"japan",
"north-america",
"oceania"
"oceania",
"south-korea"
],
"region_groups": [
"Dolphin:file:GC/EUR/IPL.bin"
@@ -8992,7 +8993,8 @@
"europe",
"japan",
"north-america",
"oceania"
"oceania",
"south-korea"
],
"region_groups": [
"Dolphin:file:GC/JAP/IPL.bin"
@@ -9030,7 +9032,8 @@
"europe",
"japan",
"north-america",
"oceania"
"oceania",
"south-korea"
],
"region_groups": [
"Dolphin:file:GC/USA/IPL.bin"
@@ -9750,6 +9753,7 @@
"sega-mega-cd"
],
"regions": [
"latin-america",
"north-america"
],
"region_groups": [
@@ -11445,12 +11449,6 @@
],
"systems": [
"sony-playstation"
],
"regions": [
"japan"
],
"region_groups": [
"sony-playstation"
]
},
{
@@ -137884,6 +137882,7 @@
"sega-mega-cd"
],
"regions": [
"latin-america",
"north-america"
],
"region_groups": [
@@ -137904,6 +137903,7 @@
"sega-mega-cd"
],
"regions": [
"latin-america",
"north-america"
],
"region_groups": [
@@ -137924,6 +137924,7 @@
"sega-mega-cd"
],
"regions": [
"latin-america",
"north-america"
],
"region_groups": [
@@ -140944,7 +140945,8 @@
"triforce"
],
"regions": [
"japan"
"japan",
"south-korea"
],
"region_groups": [
"Dolphin:file:dolphin-emu/Sys/GC/JAP/IPL.bin"
+4 -6
View File
@@ -2259,12 +2259,6 @@
],
"systems": [
"sony-playstation"
],
"regions": [
"japan"
],
"region_groups": [
"sony-playstation"
]
},
{
@@ -8213,6 +8207,7 @@
"picodrive"
],
"regions": [
"latin-america",
"north-america"
],
"region_groups": [
@@ -10418,6 +10413,7 @@
"picodrive"
],
"regions": [
"latin-america",
"north-america"
],
"region_groups": [
@@ -10435,6 +10431,7 @@
"picodrive"
],
"regions": [
"latin-america",
"north-america"
],
"region_groups": [
@@ -10452,6 +10449,7 @@
"picodrive"
],
"regions": [
"latin-america",
"north-america"
],
"region_groups": [
+5 -3
View File
@@ -5,7 +5,7 @@
"platform": "emudeck",
"display_name": "EmuDeck",
"version": "1.0",
"generated": "2026-10-18T06:45:25Z",
"generated": "2026-10-18T11:24:19Z",
"base_destination": "bios",
"detect": [
{
@@ -752,7 +752,8 @@
"europe",
"japan",
"north-america",
"oceania"
"oceania",
"south-korea"
],
"region_system_groups": [
"nintendo-gamecube"
@@ -7362,7 +7363,8 @@
"nintendo-gamecube"
],
"regions": [
"japan"
"japan",
"south-korea"
],
"region_groups": [
"Dolphin:file:GC/JAP/IPL.bin"
+6 -7
View File
@@ -6038,7 +6038,8 @@
"nintendo-gamecube"
],
"regions": [
"japan"
"japan",
"south-korea"
],
"region_groups": [
"Dolphin:file:dolphin-emu/Sys/GC/JAP/IPL.bin"
@@ -9181,6 +9182,7 @@
"sega-mega-cd"
],
"regions": [
"latin-america",
"north-america"
],
"region_groups": [
@@ -13121,12 +13123,6 @@
],
"systems": [
"sony-playstation"
],
"regions": [
"japan"
],
"region_groups": [
"sony-playstation"
]
},
{
@@ -67219,6 +67215,7 @@
"sega-mega-cd"
],
"regions": [
"latin-america",
"north-america"
],
"region_groups": [
@@ -67239,6 +67236,7 @@
"sega-mega-cd"
],
"regions": [
"latin-america",
"north-america"
],
"region_groups": [
@@ -67259,6 +67257,7 @@
"sega-mega-cd"
],
"regions": [
"latin-america",
"north-america"
],
"region_groups": [
+19 -13
View File
@@ -4653,7 +4653,8 @@
"europe",
"japan",
"north-america",
"oceania"
"oceania",
"south-korea"
],
"region_system_groups": [
"nintendo-gamecube"
@@ -4673,7 +4674,8 @@
"europe",
"japan",
"north-america",
"oceania"
"oceania",
"south-korea"
],
"region_system_groups": [
"nintendo-gamecube"
@@ -4693,7 +4695,8 @@
"europe",
"japan",
"north-america",
"oceania"
"oceania",
"south-korea"
],
"region_system_groups": [
"nintendo-gamecube"
@@ -5658,6 +5661,7 @@
"sega-mega-drive"
],
"regions": [
"latin-america",
"north-america"
],
"region_system_groups": [
@@ -7560,12 +7564,6 @@
],
"systems": [
"sony-playstation"
],
"regions": [
"japan"
],
"region_groups": [
"sony-playstation"
]
},
{
@@ -36793,6 +36791,7 @@
"sega-mega-cd"
],
"regions": [
"latin-america",
"north-america"
],
"region_groups": [
@@ -36813,6 +36812,7 @@
"sega-mega-cd"
],
"regions": [
"latin-america",
"north-america"
],
"region_groups": [
@@ -36833,6 +36833,7 @@
"sega-mega-cd"
],
"regions": [
"latin-america",
"north-america"
],
"region_groups": [
@@ -38734,7 +38735,8 @@
"nintendo-gamecube"
],
"regions": [
"japan"
"japan",
"south-korea"
],
"region_groups": [
"Dolphin:file:dolphin-emu/Sys/GC/JAP/IPL.bin"
@@ -38756,7 +38758,8 @@
"europe",
"japan",
"north-america",
"oceania"
"oceania",
"south-korea"
],
"region_groups": [
"Dolphin:file:GC/USA/IPL.bin"
@@ -38778,7 +38781,8 @@
"europe",
"japan",
"north-america",
"oceania"
"oceania",
"south-korea"
],
"region_groups": [
"Dolphin:file:GC/EUR/IPL.bin"
@@ -38800,7 +38804,8 @@
"europe",
"japan",
"north-america",
"oceania"
"oceania",
"south-korea"
],
"region_groups": [
"Dolphin:file:GC/JAP/IPL.bin"
@@ -39222,6 +39227,7 @@
"sega-mega-cd"
],
"regions": [
"latin-america",
"north-america"
],
"region_groups": [
+6 -7
View File
@@ -6157,7 +6157,8 @@
"nintendo-gamecube"
],
"regions": [
"japan"
"japan",
"south-korea"
],
"region_groups": [
"Dolphin:file:dolphin-emu/Sys/GC/JAP/IPL.bin"
@@ -9300,6 +9301,7 @@
"sega-mega-cd"
],
"regions": [
"latin-america",
"north-america"
],
"region_groups": [
@@ -13240,12 +13242,6 @@
],
"systems": [
"sony-playstation"
],
"regions": [
"japan"
],
"region_groups": [
"sony-playstation"
]
},
{
@@ -67403,6 +67399,7 @@
"sega-mega-cd"
],
"regions": [
"latin-america",
"north-america"
],
"region_groups": [
@@ -67423,6 +67420,7 @@
"sega-mega-cd"
],
"regions": [
"latin-america",
"north-america"
],
"region_groups": [
@@ -67443,6 +67441,7 @@
"sega-mega-cd"
],
"regions": [
"latin-america",
"north-america"
],
"region_groups": [
+9 -9
View File
@@ -5916,6 +5916,7 @@
"megacd"
],
"regions": [
"latin-america",
"north-america"
],
"region_groups": [
@@ -9787,12 +9788,6 @@
],
"systems": [
"sony-playstation"
],
"regions": [
"japan"
],
"region_groups": [
"sony-playstation"
]
},
{
@@ -70493,7 +70488,8 @@
"triforce"
],
"regions": [
"japan"
"japan",
"south-korea"
],
"region_groups": [
"triforce"
@@ -75122,7 +75118,8 @@
"triforce"
],
"regions": [
"japan"
"japan",
"south-korea"
],
"region_groups": [
"Dolphin:file:dolphin-emu/Sys/GC/JAP/IPL.bin"
@@ -75235,7 +75232,8 @@
"triforce"
],
"regions": [
"japan"
"japan",
"south-korea"
],
"region_groups": [
"Dolphin:file:GC/JAP/IPL.bin"
@@ -85260,6 +85258,7 @@
"megacd"
],
"regions": [
"latin-america",
"north-america"
],
"region_groups": [
@@ -85280,6 +85279,7 @@
"megacd"
],
"regions": [
"latin-america",
"north-america"
],
"region_groups": [
+8 -8
View File
@@ -26064,6 +26064,7 @@
"sega-mega-cd"
],
"regions": [
"latin-america",
"north-america"
],
"region_system_groups": [
@@ -28809,12 +28810,6 @@
],
"systems": [
"sony-playstation"
],
"regions": [
"japan"
],
"region_groups": [
"sony-playstation"
]
},
{
@@ -76773,7 +76768,8 @@
"triforce"
],
"regions": [
"japan"
"japan",
"south-korea"
],
"region_groups": [
"Dolphin:file:GC/JAP/IPL.bin"
@@ -78558,7 +78554,8 @@
"ishiiruka"
],
"regions": [
"japan"
"japan",
"south-korea"
],
"region_groups": [
"Ishiiruka:file:dolphin-emu/Sys/GC/JAP/IPL.bin"
@@ -82785,6 +82782,7 @@
"sega-mega-cd"
],
"regions": [
"latin-america",
"north-america"
],
"region_groups": [
@@ -82805,6 +82803,7 @@
"sega-mega-cd"
],
"regions": [
"latin-america",
"north-america"
],
"region_groups": [
@@ -82825,6 +82824,7 @@
"sega-mega-cd"
],
"regions": [
"latin-america",
"north-america"
],
"region_groups": [
+6 -7
View File
@@ -7101,7 +7101,8 @@
"nintendo-gamecube"
],
"regions": [
"japan"
"japan",
"south-korea"
],
"region_groups": [
"Dolphin:file:dolphin-emu/Sys/GC/JAP/IPL.bin"
@@ -10245,6 +10246,7 @@
"sega-mega-cd"
],
"regions": [
"latin-america",
"north-america"
],
"region_groups": [
@@ -14207,12 +14209,6 @@
],
"systems": [
"sony-playstation"
],
"regions": [
"japan"
],
"region_groups": [
"sony-playstation"
]
},
{
@@ -107870,6 +107866,7 @@
"sega-mega-cd"
],
"regions": [
"latin-america",
"north-america"
],
"region_groups": [
@@ -107890,6 +107887,7 @@
"sega-mega-cd"
],
"regions": [
"latin-america",
"north-america"
],
"region_groups": [
@@ -107910,6 +107908,7 @@
"sega-mega-cd"
],
"regions": [
"latin-america",
"north-america"
],
"region_groups": [
+11 -10
View File
@@ -1246,7 +1246,8 @@
"europe",
"japan",
"north-america",
"oceania"
"oceania",
"south-korea"
],
"region_groups": [
"Dolphin:file:GC/EUR/IPL.bin"
@@ -1280,7 +1281,8 @@
"europe",
"japan",
"north-america",
"oceania"
"oceania",
"south-korea"
],
"region_groups": [
"Dolphin:file:GC/JAP/IPL.bin"
@@ -1314,7 +1316,8 @@
"europe",
"japan",
"north-america",
"oceania"
"oceania",
"south-korea"
],
"region_groups": [
"Dolphin:file:GC/USA/IPL.bin"
@@ -1569,6 +1572,7 @@
"sega-mega-cd"
],
"regions": [
"latin-america",
"north-america"
],
"region_groups": [
@@ -2416,12 +2420,6 @@
],
"systems": [
"sony-playstation"
],
"regions": [
"japan"
],
"region_groups": [
"sony-playstation"
]
},
{
@@ -59806,6 +59804,7 @@
"sega-mega-cd"
],
"regions": [
"latin-america",
"north-america"
],
"region_groups": [
@@ -59826,6 +59825,7 @@
"sega-mega-cd"
],
"regions": [
"latin-america",
"north-america"
],
"region_groups": [
@@ -62949,7 +62949,8 @@
"nintendo-gamecube"
],
"regions": [
"japan"
"japan",
"south-korea"
],
"region_groups": [
"Dolphin:file:dolphin-emu/Sys/GC/JAP/IPL.bin"
+8 -8
View File
@@ -3605,6 +3605,7 @@
"sega-mega-cd"
],
"regions": [
"latin-america",
"north-america"
],
"region_system_groups": [
@@ -5667,12 +5668,6 @@
],
"systems": [
"sony-playstation"
],
"regions": [
"japan"
],
"region_groups": [
"sony-playstation"
]
},
{
@@ -12866,7 +12861,8 @@
"nintendo-gamecube"
],
"regions": [
"japan"
"japan",
"south-korea"
],
"region_groups": [
"Dolphin:file:ngc/dolphin-emu/Sys/GC/JAP/IPL.bin"
@@ -13558,6 +13554,7 @@
"sega-mega-cd"
],
"regions": [
"latin-america",
"north-america"
],
"region_groups": [
@@ -13578,6 +13575,7 @@
"sega-mega-cd"
],
"regions": [
"latin-america",
"north-america"
],
"region_groups": [
@@ -13598,6 +13596,7 @@
"sega-mega-cd"
],
"regions": [
"latin-america",
"north-america"
],
"region_groups": [
@@ -13823,7 +13822,8 @@
"nintendo-gamecube"
],
"regions": [
"japan"
"japan",
"south-korea"
],
"region_groups": [
"PrimeHack:file:ngc/GC/JAP/IPL.bin"
+66
View File
@@ -963,5 +963,71 @@ class GenesisPlusGxUsBiosServesEurope(unittest.TestCase):
self.assertNotIn("bios/bios_U.sms", drops)
def _real_drops(profile: str, members: list[str], requested: str) -> set[str]:
from pathlib import Path
from common import load_emulator_profiles
from region import build_region_index, parse_requested, resolve_region_drops
root = Path(__file__).resolve().parents[1]
profiles = load_emulator_profiles(str(root / "emulators"))
index = build_region_index({profile: profiles[profile]})
group = {"g": [(m, m.rsplit("/", 1)[-1]) for m in members]}
return resolve_region_drops(group, index, parse_requested(requested), None)
class MegaCdUsBiosIsTheDefaultBranch(unittest.TestCase):
"""GPGX and PicoDrive load the US Mega CD BIOS for any disc whose
security byte is neither 0x64 nor 0xa1, Brazilian discs included:
--region brazil,jp dropped it and those discs found no BIOS."""
def test_brazil_keeps_the_us_bios(self):
cases = {
"genesis_plus_gx": ["bios_CD_U.bin", "bios_CD_E.bin", "bios_CD_J.bin"],
"genesis_plus_gx_wide": ["bios_CD_U.bin", "bios_CD_E.bin", "bios_CD_J.bin"],
"picodrive": ["us_scd2_9306.bin", "eu_mcd2_9306.bin", "jp_mcd2_921222.bin"],
}
for profile, members in cases.items():
with self.subTest(profile=profile):
drops = _real_drops(profile, members, "brazil,jp")
self.assertNotIn(members[0], drops)
class KoreanGameCubeDiscsReadTheJapaneseIpl(unittest.TestCase):
"""Dolphin's ToGameCubeRegion maps NTSC-K to NTSC-J, so a Korean disc
boots from GC/JAP/IPL.bin; --region south-korea,us dropped it."""
def test_korea_keeps_the_jap_ipl(self):
for profile in ("dolphin", "dolphin-mmjr", "dolphin-mmjr2", "ishiiruka",
"primehack", "triforce"):
with self.subTest(profile=profile):
from common import load_emulator_profiles
entries = [
f for f in load_emulator_profiles("emulators")[profile]["files"]
if "JAP/" in (f.get("path") or "")
]
self.assertTrue(entries)
for entry in entries:
self.assertIn("south-korea", entry.get("region") or [])
class ANameNoCodeOpensCarriesNoRegion(unittest.TestCase):
"""Beetle PSX never opens scph5903.bin: its Japanese list and scan want
scph5500.bin. Tagged japan, --region jp shipped a 1 MB file the core
does not read and --region us removed it, on a selection that does not
exist."""
def test_scph5903_is_unregioned(self):
from common import load_emulator_profiles
entry = next(
f for f in load_emulator_profiles("emulators")["beetle_psx"]["files"]
if f["name"] == "scph5903.bin"
)
self.assertNotIn("region", entry)
if __name__ == "__main__":
unittest.main()