2022-10-09 05:13:17 +00:00
|
|
|
#ifndef _CARAMTOKEN
|
|
|
|
#define _CARAMTOKEN
|
2022-04-10 00:17:06 +00:00
|
|
|
|
|
|
|
#include "types.h"
|
|
|
|
|
|
|
|
class CARAMToken {
|
2022-12-06 07:59:41 +00:00
|
|
|
static CARAMToken* sLists[7];
|
2022-04-10 00:17:06 +00:00
|
|
|
public:
|
2022-12-03 21:31:54 +00:00
|
|
|
enum EStatus {
|
|
|
|
kS_Zero,
|
|
|
|
kS_One,
|
2022-12-06 07:59:41 +00:00
|
|
|
kS_Two,
|
|
|
|
kS_Three,
|
|
|
|
kS_Four,
|
|
|
|
kS_Five,
|
|
|
|
kS_Six,
|
2022-12-03 21:31:54 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
CARAMToken();
|
2022-12-06 07:59:41 +00:00
|
|
|
CARAMToken(void* ptr, uint len, int unk);
|
2022-12-03 21:31:54 +00:00
|
|
|
CARAMToken(const CARAMToken& other);
|
|
|
|
~CARAMToken();
|
|
|
|
void PostConstruct(void* ptr, uint len, int unk);
|
|
|
|
CARAMToken& operator=(const CARAMToken& other);
|
2022-12-06 07:59:41 +00:00
|
|
|
bool LoadToMRAM();
|
|
|
|
bool LoadToARAM();
|
|
|
|
bool RefreshStatus();
|
2022-04-10 00:17:06 +00:00
|
|
|
static void UpdateAllDMAs();
|
2022-12-03 21:31:54 +00:00
|
|
|
void InitiallyMoveToList();
|
|
|
|
void MoveToList(EStatus status);
|
|
|
|
void RemoveFromList();
|
|
|
|
void MakeInvalid();
|
|
|
|
|
2023-09-11 01:55:46 +00:00
|
|
|
void* ForceSyncMRAM();
|
|
|
|
void ForceSyncARAM();
|
2022-12-03 21:31:54 +00:00
|
|
|
|
|
|
|
void* GetMRAMSafe();
|
2022-12-06 07:59:41 +00:00
|
|
|
|
2022-12-03 21:31:54 +00:00
|
|
|
private:
|
2022-12-06 07:59:41 +00:00
|
|
|
EStatus x0_status;
|
|
|
|
void* x4_mramPtr;
|
|
|
|
const void* x8_aramPtr;
|
|
|
|
int xc_dataLen;
|
|
|
|
uint x10_dmaHandle;
|
|
|
|
CARAMToken* x14_prev;
|
|
|
|
CARAMToken* x18_next;
|
2022-12-03 21:31:54 +00:00
|
|
|
bool x1c_24_ : 1;
|
2022-04-10 00:17:06 +00:00
|
|
|
};
|
|
|
|
|
2022-10-09 05:13:17 +00:00
|
|
|
#endif // _CARAMTOKEN
|