HW/Memmap: Refactor Memory to class, move to Core::System.

This commit is contained in:
Admiral H. Curtiss
2022-12-02 20:07:30 +01:00
parent 7cd9a78ebf
commit 839db591d9
83 changed files with 2222 additions and 1361 deletions

View File

@ -18,6 +18,7 @@
#include "Core/HW/DSPLLE/DSPSymbols.h"
#include "Core/HW/Memmap.h"
#include "Core/Host.h"
#include "Core/System.h"
#include "VideoCommon/OnScreenDisplay.h"
// The user of the DSPCore library must supply a few functions so that the
@ -39,12 +40,16 @@ void WriteHostMemory(u8 value, u32 addr)
void DMAToDSP(u16* dst, u32 addr, u32 size)
{
Memory::CopyFromEmuSwapped(dst, addr, size);
auto& system = Core::System::GetInstance();
auto& memory = system.GetMemory();
memory.CopyFromEmuSwapped(dst, addr, size);
}
void DMAFromDSP(const u16* src, u32 addr, u32 size)
{
Memory::CopyToEmuSwapped(addr, src, size);
auto& system = Core::System::GetInstance();
auto& memory = system.GetMemory();
memory.CopyToEmuSwapped(addr, src, size);
}
void OSD_AddMessage(std::string str, u32 ms)
@ -70,7 +75,9 @@ void InterruptRequest()
void CodeLoaded(DSPCore& dsp, u32 addr, size_t size)
{
CodeLoaded(dsp, Memory::GetPointer(addr), size);
auto& system = Core::System::GetInstance();
auto& memory = system.GetMemory();
CodeLoaded(dsp, memory.GetPointer(addr), size);
}
void CodeLoaded(DSPCore& dsp, const u8* ptr, size_t size)