This repository has been archived on 2022-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
Luma3DS-3GX/source/emunand.c
2016-01-18 16:41:49 -05:00

21 lines
463 B
C

/*
* emunand.c
* by Reisyukaku
* Copyright (c) 2015 All Rights Reserved
*/
#include "emunand.h"
#include "fatfs/ff.h"
#include "fatfs/sdmmc/sdmmc.h"
static u8 *temp = (u8*)0x24300000;
void getEmunand(u32 *off, u32 *head){
u32 nandSize = getMMCDevice(0)->total_size;
if (sdmmc_sdcard_readsectors(nandSize, 1, temp) == 0) {
if (*(u32*)(temp + 0x100) == NCSD_MAGIC) {
*off = 0;
*head = nandSize;
}
}
}