2016-03-03 13:27:51 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "common.h"
|
|
|
|
|
2016-04-04 22:45:49 +02:00
|
|
|
#define NAND_UNKNOWN 0
|
|
|
|
#define NAND_SYSNAND (1<<0)
|
|
|
|
#define NAND_EMUNAND (1<<1)
|
|
|
|
#define NAND_IMGNAND (1<<2)
|
|
|
|
#define NAND_TYPE_O3DS (1<<3)
|
|
|
|
#define NAND_TYPE_N3DS (1<<4)
|
|
|
|
#define NAND_TYPE_NO3DS (1<<5)
|
2016-03-15 16:25:27 +01:00
|
|
|
|
2016-03-03 13:27:51 +01:00
|
|
|
bool InitNandCrypto(void);
|
2016-03-22 19:24:21 +01:00
|
|
|
bool CheckSlot0x05Crypto(void);
|
2016-03-03 13:27:51 +01:00
|
|
|
|
2016-03-22 19:24:21 +01:00
|
|
|
void CryptNand(u8* buffer, u32 sector, u32 count, u32 keyslot);
|
2016-04-04 22:45:49 +02:00
|
|
|
int ReadNandSectors(u8* buffer, u32 sector, u32 count, u32 keyslot, u32 src);
|
|
|
|
int WriteNandSectors(const u8* buffer, u32 sector, u32 count, u32 keyslot, u32 dest);
|
2016-03-03 13:27:51 +01:00
|
|
|
|
2016-04-04 22:45:49 +02:00
|
|
|
u64 GetNandSizeSectors(u32 src);
|
|
|
|
u8 CheckNandType(u32 src);
|
2016-03-15 16:25:27 +01:00
|
|
|
|
2016-03-16 18:46:05 +01:00
|
|
|
bool InitEmuNandBase(void);
|