docs: name where psxonpsp660.bin is not world

This commit is contained in:
Abdessamad Derraz committed 2026-11-06 14:43:31 +01:00
1 parent a99682beeb
commit 7657d4aa02
2 files changed
+33 -3

No files matched your search

+27
View File
@@ -2004,3 +2004,30 @@ class TheCatalogRowsStateFacts(unittest.TestCase):
if __name__ == "__main__":
unittest.main()
class RegionFreeRuleNamesWhereItDoesNotHold(unittest.TestCase):
"""advanced-usage.md said psxonpsp660.bin is declared [world] and always
survives --region. PCSX ReARMed declares it [japan], and on the platforms
where it is the only PlayStation core the filter drops it."""
def test_every_platform_that_drops_a_named_file_is_named(self):
from common import (list_registered_platforms, load_emulator_profiles,
load_platform_config)
from region import WORLD, platform_region_index
section = _section(_page("advanced-usage.md"), "Region filtering")
bullet = next(p for p in section.split("\n- ") if "Region-free" in p)
files = re.findall(r"`([^`]+\.bin)`", bullet)
self.assertTrue(files)
profiles = load_emulator_profiles(str(ROOT / "emulators"))
for platform in list_registered_platforms(str(ROOT / "platforms")):
config = load_platform_config(platform, str(ROOT / "platforms"))
index = platform_region_index(config, profiles)
for name in files:
entry = index.get(name)
drops = bool(entry and entry["regions"] and WORLD not in entry["regions"]
and not entry["has_untagged"])
if drops:
with self.subTest(platform=platform, file=name):
self.assertRegex(bullet, rf"(?i)\b{re.escape(platform)}\b")
+6 -3
View File
@@ -134,9 +134,12 @@ Three rules keep a filtered pack usable:
- **No system is ever emptied.** If nothing matches, the whole group is kept.
`--region us` still ships `disksys.rom`, because the Famicom Disk System has no
American BIOS.
- **Region-free files always survive.** `psxonpsp660.bin`, `ps1_rom.bin` and
`openbios.bin` are declared `[world]`: they add a capability rather than
competing regionally.
- **Region-free files survive.** A file one of the platform's cores declares
`[world]` is kept. SwanStation declares `psxonpsp660.bin` and `ps1_rom.bin`
that way, DuckStation `openbios.bin`. The tag comes from each core:
PCSX ReARMed reads the region inside `psxonpsp660.bin` and files it as
`[japan]`, so on MinUI, NextUI and MyMinUI, where it is the only PlayStation
core, `--region us` drops it.
- **Untagged files always survive.** Most BIOS are not regional and carry no
`region:` at all.