aboutsummaryrefslogtreecommitdiff
path: root/src/DSi_AES.cpp
diff options
context:
space:
mode:
authorArisotura <thetotalworm@gmail.com>2022-01-07 14:00:43 +0100
committerGitHub <noreply@github.com>2022-01-07 14:00:43 +0100
commite665e25bd3ea4b9af932e182b1c93e77b762ccb0 (patch)
tree06b5ceb336e42868806113cbf1f45add2b56a3e8 /src/DSi_AES.cpp
parentc4cd9da674bcfb8dca89086ce3ffa2d3b03438eb (diff)
Custom path support (#1333)
also including: * getting rid of shitty strings * all new, cleaner ROM handling code * base for DSi savestates * GBA slot addons (for now, memory cart)
Diffstat (limited to 'src/DSi_AES.cpp')
-rw-r--r--src/DSi_AES.cpp37
1 files changed, 37 insertions, 0 deletions
diff --git a/src/DSi_AES.cpp b/src/DSi_AES.cpp
index 02e4f1c..ec7b0e6 100644
--- a/src/DSi_AES.cpp
+++ b/src/DSi_AES.cpp
@@ -155,6 +155,43 @@ void Reset()
*(u32*)&KeyY[3][8] = 0x202DDD1D;
}
+void DoSavestate(Savestate* file)
+{
+ file->Section("AESi");
+
+ file->Var32(&Cnt);
+
+ file->Var32(&BlkCnt);
+ file->Var32(&RemExtra);
+ file->Var32(&RemBlocks);
+
+ file->Bool32(&OutputFlush);
+
+ file->Var32(&InputDMASize);
+ file->Var32(&OutputDMASize);
+ file->Var32(&AESMode);
+
+ InputFIFO.DoSavestate(file);
+ OutputFIFO.DoSavestate(file);
+
+ file->VarArray(IV, 16);
+
+ file->VarArray(MAC, 16);
+
+ file->VarArray(KeyNormal, 4*16);
+ file->VarArray(KeyX, 4*16);
+ file->VarArray(KeyY, 4*16);
+
+ file->VarArray(CurKey, 16);
+ file->VarArray(CurMAC, 16);
+
+ file->VarArray(OutputMAC, 16);
+ file->Bool32(&OutputMACDue);
+
+ file->VarArray(Ctx.RoundKey, AES_keyExpSize);
+ file->VarArray(Ctx.Iv, AES_BLOCKLEN);
+}
+
void ProcessBlock_CCM_Extra()
{