aboutsummaryrefslogtreecommitdiff
path: root/src/DSi_I2C.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/DSi_I2C.cpp')
-rw-r--r--src/DSi_I2C.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/DSi_I2C.cpp b/src/DSi_I2C.cpp
index 6f5f2e5..9e865b1 100644
--- a/src/DSi_I2C.cpp
+++ b/src/DSi_I2C.cpp
@@ -72,6 +72,14 @@ void Reset()
Registers[0x81] = 0x64;
}
+void DoSavestate(Savestate* file)
+{
+ file->Section("I2BP");
+
+ file->VarArray(Registers, 0x100);
+ file->Var32(&CurPos);
+}
+
u8 GetBootFlag() { return Registers[0x70]; }
void Start()
@@ -169,6 +177,18 @@ void Reset()
DSi_Camera::Reset();
}
+void DoSavestate(Savestate* file)
+{
+ file->Section("I2Ci");
+
+ file->Var8(&Cnt);
+ file->Var8(&Data);
+ file->Var32(&Device);
+
+ DSi_BPTWL::DoSavestate(file);
+ // cameras are savestated from the DSi_Camera module
+}
+
void WriteCnt(u8 val)
{
//printf("I2C: write CNT %02X, %08X\n", val, NDS::GetPC(1));