From bc4b0baf1f9f38e2486f5f453c0b07aa53584226 Mon Sep 17 00:00:00 2001 From: Pk11 Date: Wed, 6 Oct 2021 01:00:24 -0500 Subject: [PATCH] Fix dumping the save in the ROM Technically this is actually more accurate, however it makes the dump not match a 'clean' dump (and there couldn't be a 'clean' dump like this as the save will always vary) --- arm9/source/read_card.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arm9/source/read_card.c b/arm9/source/read_card.c index 818c8a4..f26c78e 100644 --- a/arm9/source/read_card.c +++ b/arm9/source/read_card.c @@ -535,7 +535,7 @@ void cardRead (u32 src, void* dest, bool nandSave) if ((src < cardNandRomEnd || !nandSave) && nandSection != -1) { cardParamCommand(CARD_CMD_NAND_ROM_MODE, 0, portFlags | CARD_ACTIVATE | CARD_nRESET | CARD_CLK_SLOW, NULL, 0); nandSection = -1; - } else if (src >= cardNandRwStart && nandSection != (src - cardNandRwStart) / (128 << 10)) { + } else if (src >= cardNandRwStart && nandSection != (src - cardNandRwStart) / (128 << 10) && nandSave) { if(nandSection != -1) // Need to switch back to ROM mode before switching to another RW section cardParamCommand(CARD_CMD_NAND_ROM_MODE, 0, portFlags | CARD_ACTIVATE | CARD_nRESET | CARD_CLK_SLOW, NULL, 0); cardParamCommand(CARD_CMD_NAND_RW_MODE, src, portFlags | CARD_ACTIVATE | CARD_nRESET | CARD_CLK_SLOW, NULL, 0);