fix: drop territory tags from msx font roms

This commit is contained in:
Abdessamad Derraz committed 2026-10-10 09:58:05 +02:00
1 parent 2a049dc9c9
commit 65d396e996
2 files changed
+22 -3

No files matched your search

-3
View File
@@ -406,7 +406,6 @@ files:
- name: KANJI.rom
path: "Machines/Shared Roms/KANJI.rom"
region: [japan]
size: 262144
required: false
note: "Kanji font ROM (256 KB). Used by MSX2+, turboR, and Japanese MSX2 machines."
@@ -414,7 +413,6 @@ files:
- name: MSXKANJI.rom
path: "Machines/Shared Roms/MSXKANJI.rom"
region: [japan]
size: 32768
required: false
note: "MSX-Kanji driver ROM. Used by MSX2+, turboR, and Japanese MSX2 for kanji display."
@@ -456,7 +454,6 @@ files:
- name: HANGUL.rom
path: "Machines/Shared Roms/HANGUL.rom"
region: [south-korea]
size: 131072
required: false
note: "Korean Hangul font ROM (128 KB)."
+22
View File
@@ -668,6 +668,9 @@ class RegionalRequestsKeepWhatTheCodeLoads(unittest.TestCase):
("beetle_psx", ["brazil"], "scph5501.bin"),
("mednafen", ["south-korea", "europe"], "epr-17952a.ic8"),
("mednafen", ["australia", "north-america"], "scph5502.bin"),
("bluemsx", ["south-korea"], "Machines/Shared Roms/KANJI.rom"),
("bluemsx", ["south-korea"], "Machines/Shared Roms/MSXKANJI.rom"),
("bluemsx", ["japan"], "Machines/Shared Roms/HANGUL.rom"),
)
def test_each_request_keeps_its_file(self):
@@ -680,5 +683,24 @@ class RegionalRequestsKeepWhatTheCodeLoads(unittest.TestCase):
self.assertNotIn(kept, drops)
class FontRomsCarryNoTerritory(unittest.TestCase):
"""A CJK font ROM is a language, not a territory. blueMSX tagged KANJI.rom
and MSXKANJI.rom [japan], which a --region south-korea request withdrew
from the generic MSX2+ machine whose config.ini loads both."""
def test_no_kanji_or_hangul_font_declares_a_region(self):
profiles = common.load_emulator_profiles(
os.path.join(os.path.dirname(__file__), "..", "emulators")
)
tagged = [
f"{name}:{entry['name']}"
for name, profile in profiles.items()
for entry in profile.get("files", [])
if any(word in entry.get("name", "").lower() for word in ("kanji", "hangul"))
and entry.get("region")
]
self.assertEqual(tagged, [])
if __name__ == "__main__":
unittest.main()