Added detection of DS mode DSiWare. Fixes #95.

This commit is contained in:
Gericom
2026-01-11 13:20:01 +01:00
parent c62945af58
commit 24346eaf30
6 changed files with 50 additions and 43 deletions

View File

@@ -24,7 +24,7 @@ bool CardSaveArranger::SetupCardSave(const nds_header_ntr_t* header, const TCHAR
if (header->nandBackupRegionStart != 0)
{
saveType = CardSaveType::Nand;
u32 blockSize = header->IsTwlRom() ? TWL_NAND_BLOCK_SIZE : NTR_NAND_BLOCK_SIZE;
u32 blockSize = header->SupportsDsiMode() ? TWL_NAND_BLOCK_SIZE : NTR_NAND_BLOCK_SIZE;
u32 nandBackupRegionStart = header->nandBackupRegionStart * blockSize;
saveSize = NAND_RW_REGION_END - nandBackupRegionStart;
LOG_DEBUG("NAND save. Size: 0x%X.", saveSize);