2016-01-28 03:02:05 +00:00
|
|
|
#pragma once
|
|
|
|
|
2016-07-07 11:51:06 +00:00
|
|
|
class CMempak
|
2016-01-28 03:02:05 +00:00
|
|
|
{
|
|
|
|
public:
|
2017-01-20 23:11:14 +00:00
|
|
|
CMempak();
|
|
|
|
|
2016-07-07 11:51:06 +00:00
|
|
|
void ReadFrom(int32_t Control, uint32_t address, uint8_t * data);
|
|
|
|
void WriteTo(int32_t Control, uint32_t address, uint8_t * data);
|
|
|
|
|
2017-01-20 23:11:14 +00:00
|
|
|
static uint8_t CalculateCrc(uint8_t * DataToCrc);
|
|
|
|
|
2016-05-16 08:23:31 +00:00
|
|
|
private:
|
2022-10-10 00:22:17 +00:00
|
|
|
CMempak(const CMempak &);
|
|
|
|
CMempak & operator=(const CMempak &);
|
2017-01-20 23:11:14 +00:00
|
|
|
|
|
|
|
void LoadMempak(int32_t Control, bool Create);
|
2016-07-07 11:51:06 +00:00
|
|
|
void Format(int32_t Control);
|
|
|
|
|
|
|
|
uint8_t m_Mempaks[4][128 * 256]; /* [CONTROLLERS][PAGES][BYTES_PER_PAGE] */
|
|
|
|
CFile m_MempakHandle[4];
|
2017-01-20 23:11:14 +00:00
|
|
|
bool m_Formatted[4];
|
2017-01-22 08:59:26 +00:00
|
|
|
bool m_SaveExists[4];
|
2016-01-28 03:02:05 +00:00
|
|
|
};
|