Skip to content

Commit

Permalink
Patch lgy k11 for agb_firm, too
Browse files Browse the repository at this point in the history
  • Loading branch information
TuxSH committed Jun 21, 2024
1 parent 1c7a2b6 commit 52a1f4a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions arm9/source/firm.c
Original file line number Diff line number Diff line change
Expand Up @@ -645,6 +645,11 @@ u32 patchAgbFirm(bool loadFromStorage, bool doUnitinfoPatch)
{
u8 *arm9Section = (u8 *)firm + firm->section[3].offset;

u8 *section1 = (u8 *)firm + firm->section[1].offset;
u32 section1Size = firm->section[1].size;
u8 *section2 = (u8 *)firm + firm->section[2].offset;
u32 section2Size = firm->section[2].size;

//On N3DS, decrypt Arm9Bin and patch Arm9 entrypoint to skip kernel9loader
if(ISN3DS)
{
Expand All @@ -662,6 +667,7 @@ u32 patchAgbFirm(bool loadFromStorage, bool doUnitinfoPatch)

ret += patchLgySignatureChecks(process9Offset, process9Size);
if(CONFIG(SHOWGBABOOT)) ret += patchAgbBootSplash(process9Offset, process9Size);
ret += patchLgyK11(section1, section1Size, section2, section2Size);

//Apply UNITINFO patch
if(doUnitinfoPatch) ret += patchUnitInfoValueSet(arm9Section, kernel9Size);
Expand Down

0 comments on commit 52a1f4a

Please sign in to comment.