mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-06 01:53:56 -06:00
fix: tag citra-mmj USA font for Latin America
apt.cpp:128-140 picks the shared font archive by GetRegionValue: CHN, KOR and TWN get their own, every other CFG region gets 0x00014002. The CFG region set has USA and no Latin America value, so the USA font serves the Americas, which the repo writes [north-america, latin-america]. With latin-america missing, --region br,cn kept only the Chinese archive.
This commit is contained in:
1 parent
da19bb5755
commit
3cd4ed2566
2 files changed
+29
-2
No files matched your search
@@ -129,7 +129,7 @@ files:
|
||||
system: nintendo-3ds
|
||||
required: false
|
||||
hle_fallback: true
|
||||
region: [japan, north-america, europe, oceania]
|
||||
region: [japan, north-america, latin-america, europe, oceania]
|
||||
description: "shared font system archive, title 0x0004009b00014002"
|
||||
note: "First step of the shared font chain, holding cbf_std.bcfnt.lz in its RomFS. This title low ID is the one the embedded open-source font answers."
|
||||
source_ref: "src/core/hle/service/apt/apt.cpp:124-182, src/core/file_sys/archive_ncch.cpp:143-148"
|
||||
@@ -178,7 +178,7 @@ files:
|
||||
required: false
|
||||
bundled: true
|
||||
hle_fallback: true
|
||||
region: [japan, north-america, europe, oceania]
|
||||
region: [japan, north-america, latin-america, europe, oceania]
|
||||
description: "shared font for JPN, USA, EUR and AUS"
|
||||
note: "Read to offset 0x80 of the shared memory block, so the file is a bare uncompressed BCFNT. Selected for every CFG region other than CHN, KOR and TWN. The embedded open-source font answers the archive request first, so this file is only reached when that archive path is taken out."
|
||||
source_ref: "src/core/hle/service/apt/apt.cpp:184-228, src/core/file_sys/archive_ncch.cpp:143-148"
|
||||
|
||||
@@ -1411,5 +1411,32 @@ class MachineModelRomsCarryNoTerritory(unittest.TestCase):
|
||||
)
|
||||
|
||||
|
||||
class UsaRegionServesTheAmericas(unittest.TestCase):
|
||||
"""A code that knows a USA region and no Latin America one selects the
|
||||
USA file there: Citra's shared font for CFG USA is 0x00014002
|
||||
(apt.cpp:128-140), and a --region br,cn pack dropped it for the Chinese
|
||||
archive alone."""
|
||||
|
||||
PROFILE = Path(__file__).resolve().parents[1] / "emulators" / "citra-mmj.yml"
|
||||
FONT = (
|
||||
"nand/00000000000000000000000000000000/title/0004009b/00014002/"
|
||||
"content/00000000.app.romfs"
|
||||
)
|
||||
|
||||
def test_brazil_ranks_the_default_shared_font(self):
|
||||
import yaml
|
||||
|
||||
profile = yaml.safe_load(self.PROFILE.read_text(encoding="utf-8"))
|
||||
index = region.build_region_index({"citra-mmj": profile})
|
||||
requested = region.parse_requested("br,cn")
|
||||
for destination, name in (
|
||||
(self.FONT, "00000000.app.romfs"),
|
||||
("sysdata/cbf_std.bcfnt", "cbf_std.bcfnt"),
|
||||
):
|
||||
with self.subTest(file=destination):
|
||||
regions = region.lookup_regions(index, destination, name)
|
||||
self.assertEqual(region.rank(regions, requested), 0)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
Reference in new issue
Block a user