diff --git a/installer/steps.py b/installer/steps.py index f114292e..0bfed29d 100644 --- a/installer/steps.py +++ b/installer/steps.py @@ -815,8 +815,10 @@ EMITTED = re.compile(r'^emitted (\d+)/(\d+) chunks') DISCOVERED = re.compile(r'^(\w+): \d+ functions \(.*discovery') -CHEAT_PLACES = ('cheats', 'atmosphere/contents/0100F2C0115B6000/cheats', 'contents/0100F2C0115B6000/cheats', - '0100F2C0115B6000/cheats') +MOD_TITLE = '0400486024DEC000' # the game's title id, which names a mod's Atmosphere folders (tools/cheats.py TITLE) + +CHEAT_PLACES = ('cheats', f'atmosphere/contents/{MOD_TITLE}/cheats', f'contents/{MOD_TITLE}/cheats', + f'{MOD_TITLE}/cheats') def cheat_files(ctx): @@ -831,8 +833,8 @@ def cheat_files(ctx): for f in ((mod / where).glob('*.txt') if (mod / where).is_dir() else ())) -EXEFS_PLACES = ('exefs', 'atmosphere/contents/0100F2C0115B6000/exefs', 'contents/0100F2C0115B6000/exefs', - '0100F2C0115B6000/exefs') +EXEFS_PLACES = ('exefs', f'atmosphere/contents/{MOD_TITLE}/exefs', f'contents/{MOD_TITLE}/exefs', + f'{MOD_TITLE}/exefs') def exefs_files(ctx): diff --git a/runtime/mods.c b/runtime/mods.c index 459855f9..f1271d70 100644 --- a/runtime/mods.c +++ b/runtime/mods.c @@ -27,7 +27,7 @@ #include "mods.h" #include "platform/platform.h" -#define TITLE "0100F2C0115B6000" +#define TITLE "0400486024DEC000" // the game's title id, which names a mod's Atmosphere folders #define MAX_MODS 512 static ModInfo *mods; diff --git a/runtime/mods_probe.c b/runtime/mods_probe.c index e7ee9812..0a7789bb 100644 --- a/runtime/mods_probe.c +++ b/runtime/mods_probe.c @@ -60,8 +60,8 @@ int probe_mods(void) { remove_tree(root); plat_file_mkdir_p(root); static const char *const files[] = { - "A/romfs/x.bin", "B/atmosphere/contents/0100F2C0115B6000/romfs/x.bin", - "C/contents/0100F2C0115B6000/romfs/y.bin", "D/exefs/main.pchtxt", "E/exefs/subsdk9", "F/romfs/", + "A/romfs/x.bin", "B/atmosphere/contents/0400486024DEC000/romfs/x.bin", + "C/contents/0400486024DEC000/romfs/y.bin", "D/exefs/main.pchtxt", "E/exefs/subsdk9", "F/romfs/", "G/romfs/z.bin", "G/exefs/1234.ips", "Ultra \xD0\x96/romfs/u.bin", "H/romfs/h.bin", "H/exefs/subsdk9", "I/romfs/i.bin", "I/exefs/main", "J/cheats/0123456789ABCDEF.txt", "K/romfslite/k.bin", "L/romfs/l.bin", "L/cheats/0123456789ABCDEF.txt", "L/exefs/main.npdm", @@ -90,8 +90,8 @@ int probe_mods(void) { *lm = mods_at(11), *mm = mods_at(12), *u = mods_at(13); CHECK(hm->kind == (MOD_ROMFS | MOD_SUBSDK) && hm->problem == MOD_PLUGIN, "RomFS + subsdk plugin: unusable"); CHECK(im->kind == (MOD_ROMFS | MOD_SUBSDK) && im->problem == MOD_PLUGIN, "RomFS + replaced exefs/main"); - CHECK(ends_with(b->romfs, "B/atmosphere/contents/0100F2C0115B6000/romfs"), "Atmosphere RomFS root"); - CHECK(ends_with(c->romfs, "C/contents/0100F2C0115B6000/romfs"), "contents RomFS root"); + CHECK(ends_with(b->romfs, "B/atmosphere/contents/0400486024DEC000/romfs"), "Atmosphere RomFS root"); + CHECK(ends_with(c->romfs, "C/contents/0400486024DEC000/romfs"), "contents RomFS root"); CHECK(ends_with(a->romfs, "A/romfs") && a->kind == MOD_ROMFS && a->problem == MOD_OK, "plain RomFS mod"); CHECK(!c->enabled && a->enabled && b->enabled && g->enabled && u->enabled, "mods_disabled switches C off"); CHECK(d->kind == MOD_EXEFS && d->problem == MOD_EXEFS_OTHER && d->other_version == 1, diff --git a/tests/installer_test.py b/tests/installer_test.py index afb26738..d070fb21 100644 --- a/tests/installer_test.py +++ b/tests/installer_test.py @@ -277,7 +277,7 @@ class LiftKeyTest(unittest.TestCase): self.add_cheats('277178B7DBA1B6D4.txt', '[b]') edited = self.key() self.assertNotEqual(edited, added) - self.add_cheats('277178B7DBA1B6D4.txt', '[c]', mod='Other', where='atmosphere/contents/0100F2C0115B6000/cheats') + self.add_cheats('277178B7DBA1B6D4.txt', '[c]', mod='Other', where='atmosphere/contents/0400486024DEC000/cheats') self.assertNotEqual(self.key(), edited) def test_exefs_patch_files_change_the_key(self): diff --git a/tools/cheats.py b/tools/cheats.py index ec23cbb5..df5c3c2c 100644 --- a/tools/cheats.py +++ b/tools/cheats.py @@ -90,7 +90,7 @@ def parse(text, mod): return out -TITLE = '0100F2C0115B6000' +TITLE = '0400486024DEC000' # the game's title id: a mod's Atmosphere folders are named after it def cheat_files(mods, bid):