Skip to main content
← PSoXide SDK guides and examples · SDK f2fec1c301f1 · All Cargo features enabled; check feature gates before use.

Crate psx_settings

Crate psx_settings 

Source
Expand description

Shared, allocator-free game preferences.

The record intentionally contains only settings that recur across PSoXide games. Games remain free to keep simulation or renderer-specific options in their own save data. 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§

CardError
Persistence failure from the settings layer.
CodecError
Settings codec failure.

Constants§

FLAG_INVERT_Y
Settings flag: invert vertical look.
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 MC header, 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_save on 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_oneDeprecated
load_from_slot_one on a token the caller does not hold.
save
Save one profile into a standard PS1 memory-card file.
save_slot_oneDeprecated
save_to_slot_one on 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 with CardError::Card(psx_mc::Error::NotFormatted) and not touched; use format_and_save_to_slot_one once the player has agreed to format.