mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-02 22:29:21 +00:00
HW/Memmap: Refactor Memory to class, move to Core::System.
This commit is contained in:
parent
7cd9a78ebf
commit
839db591d9
83 changed files with 2222 additions and 1361 deletions
|
@ -43,6 +43,7 @@
|
|||
#include "Core/PowerPC/PowerPC.h"
|
||||
#include "Core/PowerPC/SignatureDB/SignatureDB.h"
|
||||
#include "Core/State.h"
|
||||
#include "Core/System.h"
|
||||
#include "Core/TitleDatabase.h"
|
||||
#include "Core/WiiUtils.h"
|
||||
|
||||
|
@ -1194,15 +1195,21 @@ void MenuBar::ClearSymbols()
|
|||
|
||||
void MenuBar::GenerateSymbolsFromAddress()
|
||||
{
|
||||
auto& system = Core::System::GetInstance();
|
||||
auto& memory = system.GetMemory();
|
||||
|
||||
PPCAnalyst::FindFunctions(Memory::MEM1_BASE_ADDR,
|
||||
Memory::MEM1_BASE_ADDR + Memory::GetRamSizeReal(), &g_symbolDB);
|
||||
Memory::MEM1_BASE_ADDR + memory.GetRamSizeReal(), &g_symbolDB);
|
||||
emit NotifySymbolsUpdated();
|
||||
}
|
||||
|
||||
void MenuBar::GenerateSymbolsFromSignatureDB()
|
||||
{
|
||||
auto& system = Core::System::GetInstance();
|
||||
auto& memory = system.GetMemory();
|
||||
|
||||
PPCAnalyst::FindFunctions(Memory::MEM1_BASE_ADDR,
|
||||
Memory::MEM1_BASE_ADDR + Memory::GetRamSizeReal(), &g_symbolDB);
|
||||
Memory::MEM1_BASE_ADDR + memory.GetRamSizeReal(), &g_symbolDB);
|
||||
SignatureDB db(SignatureDB::HandlerType::DSY);
|
||||
if (db.Load(File::GetSysDirectory() + TOTALDB))
|
||||
{
|
||||
|
@ -1409,6 +1416,9 @@ RSOVector MenuBar::DetectRSOModules(ParallelProgressDialog& progress)
|
|||
|
||||
void MenuBar::LoadSymbolMap()
|
||||
{
|
||||
auto& system = Core::System::GetInstance();
|
||||
auto& memory = system.GetMemory();
|
||||
|
||||
std::string existing_map_file, writable_map_file;
|
||||
bool map_exists = CBoot::FindMapFile(&existing_map_file, &writable_map_file);
|
||||
|
||||
|
@ -1416,7 +1426,7 @@ void MenuBar::LoadSymbolMap()
|
|||
{
|
||||
g_symbolDB.Clear();
|
||||
PPCAnalyst::FindFunctions(Memory::MEM1_BASE_ADDR + 0x1300000,
|
||||
Memory::MEM1_BASE_ADDR + Memory::GetRamSizeReal(), &g_symbolDB);
|
||||
Memory::MEM1_BASE_ADDR + memory.GetRamSizeReal(), &g_symbolDB);
|
||||
SignatureDB db(SignatureDB::HandlerType::DSY);
|
||||
if (db.Load(File::GetSysDirectory() + TOTALDB))
|
||||
db.Apply(&g_symbolDB);
|
||||
|
@ -1657,8 +1667,11 @@ void MenuBar::SearchInstruction()
|
|||
if (!good)
|
||||
return;
|
||||
|
||||
auto& system = Core::System::GetInstance();
|
||||
auto& memory = system.GetMemory();
|
||||
|
||||
bool found = false;
|
||||
for (u32 addr = Memory::MEM1_BASE_ADDR; addr < Memory::MEM1_BASE_ADDR + Memory::GetRamSizeReal();
|
||||
for (u32 addr = Memory::MEM1_BASE_ADDR; addr < Memory::MEM1_BASE_ADDR + memory.GetRamSizeReal();
|
||||
addr += 4)
|
||||
{
|
||||
const auto ins_name =
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue