First pass of actual saving

This commit is contained in:
2026-08-17 09:18:44 -05:00
parent 08b4bbfe91
commit 092e259a06
15 changed files with 310 additions and 408 deletions
+4 -4
View File
@@ -7,7 +7,7 @@
#include "save/savedevice.h"
#include "save/savedevicedolphincard.h"
#include "save/savemanager.h"
#include "save/save.h"
#include "assert/assert.h"
errorret_t saveDeviceDolphinCardInit(savedevice_t *device) {
@@ -15,11 +15,11 @@ errorret_t saveDeviceDolphinCardInit(savedevice_t *device) {
device->state = SAVE_DEVICE_STATE_UNKNOWN;
// Each savedevice_t in SAVE_MANAGER.devices maps to one physical memory
// Each savedevice_t in SAVE.devices maps to one physical memory
// card slot - device 0 is slot A, device 1 is slot B, determined by this
// device's position in that array (the same index math savemanager.c
// device's position in that array (the same index math save.c
// itself uses to identify a device).
uint8_t index = (uint8_t)(device - &SAVE_MANAGER.devices[0]);
uint8_t index = (uint8_t)(device - &SAVE.devices[0]);
device->platform.channel = index == 0 ? CARD_SLOTA : CARD_SLOTB;
errorOk();
+1 -1
View File
@@ -18,7 +18,7 @@
#endif
typedef struct {
// Set from this device's index into SAVE_MANAGER.devices - device 0 is
// Set from this device's index into SAVE.devices - device 0 is
// CARD_SLOTA, device 1 is CARD_SLOTB.
int32_t channel;
uint8_t cardBuffer[CARD_WORKAREA] __attribute__((aligned(32)));