29 lines
905 B
C
Raw Normal View History

#pragma once
#include "common.h"
2016-04-04 22:45:49 +02:00
#define NAND_SYSNAND (1<<0)
#define NAND_EMUNAND (1<<1)
#define NAND_IMGNAND (1<<2)
#define NAND_ZERONAND (1<<3)
#define NAND_TYPE_O3DS (1<<4)
#define NAND_TYPE_N3DS (1<<5)
#define NAND_TYPE_NO3DS (1<<6)
bool InitNandCrypto(void);
bool CheckSlot0x05Crypto(void);
2016-05-15 18:16:45 +02:00
bool CheckSector0x96Crypto(void);
2016-11-15 23:12:14 +01:00
bool CheckA9lh(void);
void CryptNand(u8* buffer, u32 sector, u32 count, u32 keyslot);
2016-05-15 18:16:45 +02:00
void CryptSector0x96(u8* buffer, bool encrypt);
int ReadNandBytes(u8* buffer, u32 offset, u32 count, u32 keyslot, u32 nand_src);
int WriteNandBytes(const u8* buffer, u32 offset, u32 count, u32 keyslot, u32 nand_dst);
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-04-04 22:45:49 +02:00
u64 GetNandSizeSectors(u32 src);
2016-04-09 21:50:50 +02:00
u32 CheckNandType(u32 src);
2016-03-16 18:46:05 +01:00
bool InitEmuNandBase(void);