DeSmuME_Savestate - Managing savestates

class desmume.emulator.DeSmuME_Savestate(emu: DeSmuME)[source]

Bases: object

Load and save savestates. Either slots can be used (maximum number of slots is in the constant NB_STATES), or savestates can be directly loaded from / saved to files.

Should not be instantiated manually!

date(slot_id: int) str[source]

Return the date a savestate was saved at as a string.

exists(slot_id: int) bool[source]

Returns whether or not a savestate in the specified slot exists.

load(slot_id: int)[source]

Load the savestate in the specified slot. It needs to exist.

load_file(file_name: str)[source]

Load a savestate from file.

Raise:

RuntimeError If the savestate could not be loaded.

save(slot_id: int)[source]

Save the current game state to the savestate in the specified slot.

save_file(file_name: str)[source]

Save a savestate to file.

Raise:

RuntimeError If the savestate could not be saved.

scan()[source]

Scan all savestate slots for if they exist or not. Required to be called before calling exists.