2023-08-15 16:21:19 +00:00
|
|
|
#ifndef Z64SRAM_H
|
|
|
|
#define Z64SRAM_H
|
|
|
|
|
|
|
|
#include "ultra64/ultratypes.h"
|
|
|
|
|
2024-08-12 07:07:48 +00:00
|
|
|
typedef struct SramContext {
|
2023-08-15 16:21:19 +00:00
|
|
|
/* 0x00 */ u8* readBuff;
|
|
|
|
} SramContext; // size = 0x4
|
|
|
|
|
|
|
|
#define SRAM_SIZE 0x8000
|
|
|
|
#define SRAM_HEADER_SIZE 0x10
|
|
|
|
|
2024-08-12 07:07:48 +00:00
|
|
|
typedef enum SramHeaderField {
|
2023-08-15 16:21:19 +00:00
|
|
|
/* 0x00 */ SRAM_HEADER_SOUND,
|
|
|
|
/* 0x01 */ SRAM_HEADER_ZTARGET,
|
|
|
|
/* 0x02 */ SRAM_HEADER_LANGUAGE,
|
|
|
|
/* 0x03 */ SRAM_HEADER_MAGIC // must be the value of `sZeldaMagic` for save to be considered valid
|
|
|
|
} SramHeaderField;
|
|
|
|
|
|
|
|
#endif
|