2016-03-03 13:27:51 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "common.h"
|
|
|
|
|
2016-03-15 16:25:27 +01:00
|
|
|
#define NAND_TYPE_UNK 0
|
|
|
|
#define NAND_TYPE_O3DS 1
|
|
|
|
#define NAND_TYPE_N3DS 2
|
|
|
|
#define NAND_TYPE_NO3DS 3
|
|
|
|
|
2016-03-03 13:27:51 +01:00
|
|
|
bool InitNandCrypto(void);
|
|
|
|
void CryptNand(u8* buffer, u32 sector, u32 count, u32 keyslot);
|
|
|
|
|
|
|
|
int ReadNandSectors(u8* buffer, u32 sector, u32 count, u32 keyslot, bool read_emunand);
|
|
|
|
int WriteNandSectors(const u8* buffer, u32 sector, u32 count, u32 keyslot, bool write_emunand);
|
|
|
|
|
2016-03-15 16:25:27 +01:00
|
|
|
u8 CheckNandType(bool check_emunand);
|
|
|
|
|
2016-03-03 13:27:51 +01:00
|
|
|
u32 GetEmuNandBase(void);
|
|
|
|
u32 SwitchEmuNandBase(int start_sector);
|
|
|
|
|