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

@ -809,7 +809,10 @@ static void ReadMemory()
if (!PowerPC::HostIsRAMAddress(addr))
return SendReply("E00");
u8* data = Memory::GetPointer(addr);
auto& system = Core::System::GetInstance();
auto& memory = system.GetMemory();
u8* data = memory.GetPointer(addr);
Mem2hex(reply, data, len);
reply[len * 2] = '\0';
SendReply((char*)reply);
@ -833,7 +836,10 @@ static void WriteMemory()
if (!PowerPC::HostIsRAMAddress(addr))
return SendReply("E00");
u8* dst = Memory::GetPointer(addr);
auto& system = Core::System::GetInstance();
auto& memory = system.GetMemory();
u8* dst = memory.GetPointer(addr);
Hex2mem(dst, s_cmd_bfr + i + 1, len);
SendReply("OK");
}