diff options
Diffstat (limited to 'src/CP15.cpp')
-rw-r--r-- | src/CP15.cpp | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/src/CP15.cpp b/src/CP15.cpp index cc6a6af..e3f0bae 100644 --- a/src/CP15.cpp +++ b/src/CP15.cpp @@ -1,5 +1,5 @@ /* - Copyright 2016-2017 StapleButter + Copyright 2016-2019 StapleButter This file is part of melonDS. @@ -57,6 +57,25 @@ void Reset() DTCMSize = 0; } +void DoSavestate(Savestate* file) +{ + file->Section("CP15"); + + file->Var32(&Control); + + file->Var32(&DTCMSetting); + file->Var32(&ITCMSetting); + + if (!file->Saving) + { + UpdateDTCMSetting(); + UpdateITCMSetting(); + } + + file->VarArray(ITCM, 0x8000); + file->VarArray(DTCM, 0x4000); +} + void UpdateDTCMSetting() { |