Alchemy
Loading...
Searching...
No Matches

SaveSlotHeader Struct Reference

The header of a save sector in flash: its signature, the record it holds, its checksum and its sequence number. More...

#include <save_state.h>

Data Fields

u8 signature [7]
 CAMELOT, unterminated
u8 recordId
 File n's records are n and n + 3 (n from 0 to 2); 16 marks a free sector.
u16 checksum
 low half of the payload's checksum
u16 sequence
 the highest is the current copy; restarts after 65000
u8 reserved [4]
 not named by TBS code

Detailed Description

The header of a save sector in flash: its signature, the record it holds, its checksum and its sequence number.

Definition at line 18 of file save_state.h.

Field Documentation

◆ signature

u8 SaveSlotHeader::signature[7]

CAMELOT, unterminated

Definition at line 19 of file save_state.h.

Referenced by SaveState_InitializeWorkspace().

◆ recordId

u8 SaveSlotHeader::recordId

File n's records are n and n + 3 (n from 0 to 2); 16 marks a free sector.

Definition at line 21 of file save_state.h.

Referenced by SaveState_InitializeWorkspace(), SaveState_InvalidateSlot(), and SaveState_WriteRecord().

◆ checksum

u16 SaveSlotHeader::checksum

low half of the payload's checksum

Definition at line 22 of file save_state.h.

Referenced by SaveState_ReadSlotAndCheckChecksum(), and SaveState_WriteRecord().

◆ sequence

u16 SaveSlotHeader::sequence

the highest is the current copy; restarts after 65000

Definition at line 23 of file save_state.h.

Referenced by SaveState_InitializeWorkspace(), SaveState_InvalidateSlot(), and SaveState_WriteRecord().

◆ reserved

u8 SaveSlotHeader::reserved[4]

not named by TBS code

Definition at line 24 of file save_state.h.