From 347371c66a6ddf23c3f3a7df69037b53595d5a24 Mon Sep 17 00:00:00 2001 From: rmc Date: Fri, 24 Nov 2023 16:26:40 -0500 Subject: [PATCH] Fix home menu error - The home menu cannot be installed as a normal DSiWare title. Only allow it to be installed as a home menu, or a system title. - Fix (hopefully) Download Play, PictoChat, and TwlNmenu from being listed in "Titles" option - Add TWL EVA to install blocklist as it uses `00030011` --- arm9/src/install.c | 24 +++++++++++++++++------- arm9/src/titlemenu.c | 9 +++++++-- 2 files changed, 24 insertions(+), 9 deletions(-) diff --git a/arm9/src/install.c b/arm9/src/install.c index 88b1a52..c3a7a67 100644 --- a/arm9/src/install.c +++ b/arm9/src/install.c @@ -414,7 +414,7 @@ bool install(char* fpath, bool systemTitle) } //offer to patch system titles to normal DSiWare on SysNAND - if(!sdnandMode && h->tid_high != 0x00030004) + if(!sdnandMode && h->tid_high != 0x00030004 || != 0x00030017) //do not allow patching home menus to be normal DSiWare! This will trigger "ERROR! - 0x0000000000000008 HWINFO_SECURE" on prototype launchers. May also cause issues on the prod versions. { if(choiceBox("This is set as a system/dev\ntitle, would you like to patch\nit to be a normal DSiWare?\n\nThis is safer, but invalidates\nRSA checks and may not work.\n\nIf the title is homebrew this isstrongly recommended.") == YES) { @@ -423,6 +423,16 @@ bool install(char* fpath, bool systemTitle) } } + //offer to patch home menus to be system titles on SysNAND + if(!sdnandMode && h->tid_high == 0x00030017) + { + if(choiceBox("This title is a home menu.\nWould you like to patch it to bea system title?\n\nThis is safer and prevents your\nhome menu from being hidden.") == YES) + { + h->tid_high = 0x00030015; + fixHeader = true; + } + } + //no system titles without Unlaunch if (!unlaunchFound && h->tid_high != 0x00030004) { @@ -445,18 +455,18 @@ bool install(char* fpath, bool systemTitle) tidLow == 0x484e4900 || // Nintendo DSi Camera tidLow == 0x484e4a00 || // Nintendo Zone tidLow == 0x484e4b00 // Nintendo DSi Sound - )) || (h->tid_high == 0x00030011 && ( - tidLow == 0x34544e00 // TwlNmenu (blocking due to -2011 and brick potential) )) || (h->tid_high == 0x00030015 && ( tidLow == 0x484e4200 || // System Settings tidLow == 0x484e4600 // Nintendo DSi Shop )) || (h->tid_high == 0x00030017 && ( tidLow == 0x484e4100 // Launcher ))) && ( - (h->tid_low & 0xFF) == region || //only blacklist console region - h->tid_low == 0x484e4541 || //and block specifically international PictoChat - h->tid_low == 0x484e4441 || //and Download Play for good measure - h->tid_low == 0x30535541 || //just to be safe also block sysupdaters. iirc one dos fit in NAND if you've removed some things + (h->tid_low & 0xFF) == region || // Only blacklist console region, or the following programs that have all-region codes: + h->tid_low == 0x484e4541 || // PictoChat + h->tid_low == 0x484e4441 || // Download Play + h->tid_low == 0x30535541 || // Twl SystemUpdater (iirc one version fits in NAND) + h->tid_low == 0x34544e41 || // TwlNmenu (blocking due to potential to uninstall system titles) + h->tid_low == 0x54574c41 || // TWL EVA region == 0 //if the region check failed somehow, blacklist everything )) { diff --git a/arm9/src/titlemenu.c b/arm9/src/titlemenu.c index a367963..d52aaca 100644 --- a/arm9/src/titlemenu.c +++ b/arm9/src/titlemenu.c @@ -111,10 +111,9 @@ static void generateList(Menu* m) { // 00030015 "484e42", // System Settings "484e46", // Nintendo DSi Shop - "34544e", // TwlNmenu (blocking due to -2011 and brick potential) NULL }, - { + { // 00030017 "484e41", // Launcher NULL } @@ -158,6 +157,12 @@ static void generateList(Menu* m) sprintf(titleId, "%s%02x", blacklist[i][j], region); if (strcmp(titleId, ent->d_name) == 0) blacklisted = true; + + // also blacklist specific all-region titles + if (strcmp("484e4441", ent->d_name) == 0 || // Download Play + ("484e4541", ent->d_name) == 0 || // PictoChat + ("34544e41", ent->d_name) == 0) // TwlNmenu + blacklisted = true; } if (blacklisted) continue; }