2022-10-09 05:13:17 +00:00
|
|
|
#ifndef _CMEMORYCARDSYS
|
|
|
|
#define _CMEMORYCARDSYS
|
2022-04-10 00:17:06 +00:00
|
|
|
|
|
|
|
#include "types.h"
|
|
|
|
|
2022-10-10 19:58:03 +00:00
|
|
|
// TODO: likely comes from dolphin sdk
|
2022-10-10 22:53:28 +00:00
|
|
|
enum ECardResult { k_READY, k_NOCARD = -3 };
|
|
|
|
struct FileHandle {
|
|
|
|
u8 x0_pad[0x10];
|
|
|
|
};
|
|
|
|
|
|
|
|
struct ProbeResults {
|
|
|
|
ECardResult x0_error;
|
|
|
|
uint x4_cardSize; /* in megabits */
|
|
|
|
uint x8_sectorSize; /* in bytes */
|
|
|
|
};
|
2022-10-10 19:58:03 +00:00
|
|
|
|
2022-04-10 00:17:06 +00:00
|
|
|
class CMemoryCardSys {
|
|
|
|
public:
|
2022-10-10 22:53:28 +00:00
|
|
|
enum EMemoryCardPort { kCS_SlotA, kCS_SlotB };
|
|
|
|
|
2022-10-10 19:58:03 +00:00
|
|
|
struct CardFileHandle {
|
2022-10-10 22:53:28 +00:00
|
|
|
EMemoryCardPort slot;
|
2022-10-10 19:58:03 +00:00
|
|
|
FileHandle handle;
|
2022-10-10 22:53:28 +00:00
|
|
|
CardFileHandle(EMemoryCardPort slot) : slot(slot) {}
|
2022-10-10 19:58:03 +00:00
|
|
|
int getFileNo() const;
|
|
|
|
};
|
|
|
|
|
2022-10-10 22:53:28 +00:00
|
|
|
class CCardFileInfo {
|
|
|
|
uchar pad[0x114];
|
|
|
|
|
|
|
|
public:
|
|
|
|
~CCardFileInfo();
|
|
|
|
};
|
2022-10-10 19:58:03 +00:00
|
|
|
|
2022-09-13 04:26:54 +00:00
|
|
|
CMemoryCardSys();
|
2022-04-10 00:17:06 +00:00
|
|
|
~CMemoryCardSys();
|
|
|
|
|
2022-10-10 22:53:28 +00:00
|
|
|
static ECardResult GetResultCode(int);
|
|
|
|
static ProbeResults IsMemoryCardInserted(EMemoryCardPort);
|
|
|
|
|
2022-09-13 04:26:54 +00:00
|
|
|
void Initialize();
|
|
|
|
|
2022-04-10 00:17:06 +00:00
|
|
|
private:
|
|
|
|
// TODO
|
|
|
|
};
|
|
|
|
|
2022-10-09 05:13:17 +00:00
|
|
|
#endif // _CMEMORYCARDSYS
|