Nikhil Narayana 2021-11-22 20:31:19 -08:00
commit a2a5772731
3 changed files with 17 additions and 2 deletions

View file

@ -113,6 +113,9 @@ CEXISlippi::CEXISlippi()
// Initialize local selections to empty
localSelections.Reset();
// Forces savestate to re-init regions when a new ISO is loaded
SlippiSavestate::shouldForceInit = true;
// Update user file and then listen for User
#ifndef IS_PLAYBACK
user->ListenForLogIn();

View file

@ -12,6 +12,9 @@
#include "Core/HW/ProcessorInterface.h"
#include "Core/HW/SI/SI.h"
#include "Core/HW/VideoInterface.h"
#include "Core/PowerPC/PowerPC.h"
bool SlippiSavestate::shouldForceInit;
SlippiSavestate::SlippiSavestate()
{
@ -52,8 +55,9 @@ void SlippiSavestate::initBackupLocs()
// Full Unknown Region: [804fec00 - 80BD5C40)
// https://docs.google.com/spreadsheets/d/16ccNK_qGrtPfx4U25w7OWIDMZ-NxN1WNBmyQhaDxnEg/edit?usp=sharing
{0x8065c000, 0x8071b000, nullptr}, // Unknown Region Pt1
{0x80bb0000, 0x811AD5A0, nullptr}, // Unknown Region Pt2, Heap [80bd5c40 - 811AD5A0)
{0x8065c000, 0x8071b000, nullptr}, // Unknown Region Pt1. Maybe get the low bound pointer at
// 804d5c10 and the size of the audio heap at 804d5e18
{0x0, 0x0, nullptr}, // Unknown Region Pt2, Heap [80bd5c40 - 811AD5A0).
};
static std::vector<PreserveBlock> excludeSections = {
@ -104,6 +108,12 @@ void SlippiSavestate::initBackupLocs()
return;
}
// Get Main Heap Boundaries
fullBackupRegions[3].startAddress = PowerPC::HostRead_U32(0x804d76b8);
fullBackupRegions[3].endAddress = PowerPC::HostRead_U32(0x804d76bc);
WARN_LOG(SLIPPI_ONLINE, "Heap start is: 0x%X", fullBackupRegions[3].startAddress);
WARN_LOG(SLIPPI_ONLINE, "Heap end is: 0x%X", fullBackupRegions[3].endAddress);
// Sort exclude sections
std::sort(excludeSections.begin(), excludeSections.end(), cmpFn);

View file

@ -26,6 +26,8 @@ public:
void Capture();
void Load(std::vector<PreserveBlock> blocks);
static bool shouldForceInit;
private:
typedef struct
{