Save file update (incomplete)

This commit is contained in:
2026-05-10 11:20:09 -05:00
parent d7f515575a
commit a8fd55cb38
42 changed files with 2678 additions and 1 deletions
+63
View File
@@ -0,0 +1,63 @@
/**
* Copyright (c) 2026 Dominic Masters
*
* This software is released under the MIT License.
* https://opensource.org/licenses/MIT
*/
#pragma once
#include "error/error.h"
#include "save/savefile.h"
#include <pspiofilemgr.h>
#define SAVE_PSP_PATH_MAX 256
#define SAVE_PSP_FILE_FORMAT "ms0:/PSP/SAVEDATA/%s%02u/save.dat"
#define SAVE_PSP_DIR_FORMAT "ms0:/PSP/SAVEDATA/%s%02u"
#ifndef SAVE_PSP_TITLE_ID
#define SAVE_PSP_TITLE_ID "DUSK00001"
#endif
typedef struct {
uint8_t unused;
} savepsp_t;
/**
* Initializes the save system on PSP.
*
* @return An error code if initialization fails.
*/
errorret_t saveInitPSP(void);
/**
* Disposes of the save system on PSP.
*
* @return An error code if disposal fails.
*/
errorret_t saveDisposePSP(void);
/**
* Loads a save file from PSP save data for the given slot.
*
* @param slot The save slot index.
* @param file Output save file data.
* @return An error code if the load fails.
*/
errorret_t saveLoadPSP(const uint8_t slot, savefile_t *file);
/**
* Writes a save file to PSP save data for the given slot.
*
* @param slot The save slot index.
* @param file Save file data to write.
* @return An error code if the write fails.
*/
errorret_t saveWritePSP(const uint8_t slot, const savefile_t *file);
/**
* Deletes the save file for the given slot from PSP save data.
*
* @param slot The save slot index.
* @return An error code if the delete fails.
*/
errorret_t saveDeletePSP(const uint8_t slot);