Expand description
Shared, allocator-free game preferences.
The record holds settings that recur across PSoXide games, seven
game-owned flag bits and GAME_BYTES_LEN game-owned bytes. Games remain
free to keep larger simulation or renderer-specific data in their own saves.
The byte format is explicit and checksummed so a newer executable can reject
a torn or incompatible card write and fall back to its shipped defaults.
Structs§
- Profile
- A game profile shared by menus, input and memory-card persistence.
Enums§
- Card
Error - Persistence failure from the settings layer.
- Codec
Error - Settings codec failure.
Constants§
- FLAG_
INVERT_ Y - Settings flag: invert vertical look.
- GAME_
BYTES_ LEN - Number of game-defined bytes in a
Profile(version 3 onward). - GAME_
FLAGS_ MASK - Bits in the existing settings flag byte owned by each game. Bit 0 stays
reserved for
FLAG_INVERT_Y, and no future shared setting may use these seven bits. Unknown game bits survive loading, sanitizing and saving with this SDK. Older executables masked these bits on load and may erase them on a later save, so rolling back a game build cannot preserve their meaning. - MAGIC
- On-card record magic.
- MAX_
RECORD_ LEN - Largest settings record accepted by the card helpers.
- VERSION
- Current record format version.
Functions§
- format_
and_ save - Format the card if it has no
MCheader, then save the profile. Call this only after the player agreed to format: it replaces the directory of an unformatted card, and every save the card held stops being listed. A formatted card is left alone and the profile is saved onto it. - format_
and_ save_ to_ slot_ one format_and_saveon the controller-1 memory-card slot. This is the call that can erase a card’s directory; reach it only from an explicit “format this card?” answer.- load
- Load one exact profile shape from a standard PS1 memory-card file.
- load_
from_ slot_ one - Load a profile from the controller-1 memory-card slot, driving the port
through
port. - load_
slot_ one Deprecated load_from_slot_oneon a token the caller does not hold.- save
- Save one profile into a standard PS1 memory-card file.
- save_
slot_ one Deprecated save_to_slot_oneon a token the caller does not hold.- save_
to_ slot_ one - Save a profile to the controller-1 memory-card slot, driving the port
through
port. Existing files with the same name are replaced. A card that is not formatted is refused withCardError::Card(psx_mc::Error::NotFormatted)and not touched; useformat_and_save_to_slot_oneonce the player has agreed to format.