Skip to content
This repository has been archived by the owner on Feb 4, 2021. It is now read-only.

Commit

Permalink
Really fix larger payloads
Browse files Browse the repository at this point in the history
  • Loading branch information
AuroraWright committed Jun 23, 2016
1 parent bedb002 commit 6f56b84
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/installer.c
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ static inline void installer(u32 a9lhBoot)
posY = drawString("All checks passed, installing...", 10, posY + SPACING_Y, COLOR_WHITE);

//Point of no return, install stuff in the safest order
sdmmc_nand_writesectors(0x5C000, 0x20, (vu8 *)STAGE2_OFFSET);
sdmmc_nand_writesectors(0x5C000, MAX_STAGE2_SIZE / 0x200, (vu8 *)STAGE2_OFFSET);
if(!a9lhBoot) writeFirm((u8 *)FIRM1_OFFSET, 1, FIRM1_SIZE);
if(!a9lhBoot || updatea9lh) sdmmc_nand_writesectors(0x96, 1, (vu8 *)SECTOR_OFFSET);
writeFirm((u8 *)FIRM0_OFFSET, 0, FIRM0_SIZE);
Expand Down Expand Up @@ -229,7 +229,7 @@ static inline void uninstaller(void)
sdmmc_nand_writesectors(0x96, 1, (vu8 *)SECTOR_OFFSET);
writeFirm((u8 *)FIRM0_OFFSET, 0, firmSize);
writeFirm((u8 *)FIRM1_OFFSET, 1, firmSize);
sdmmc_nand_writesectors(0x5C000, 0x20, (vu8 *)STAGE2_OFFSET);
sdmmc_nand_writesectors(0x5C000, MAX_STAGE2_SIZE / 0x200, (vu8 *)STAGE2_OFFSET);

shutdown(2, "Uninstall: success!");
}

2 comments on commit 6f56b84

@Ninoh-FOX
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hi, your a9lh install work fine, and a9lh work in me new3ds, but... why the offset for stage2 in my nand is 0xB800000 and not is 0x5C000? Thanks XD

@AuroraWright
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because 0x5C000 is the NAND sector, each sector is 512 bytes so 0xB800000

Please sign in to comment.