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
No known key found for this signature in database
GPG key ID: F051B4C4044F33FB
83 changed files with 2222 additions and 1361 deletions

View file

@ -153,7 +153,9 @@ public:
if constexpr (is_preprocess)
{
const u8* const start_address = Memory::GetPointer(address);
auto& system = Core::System::GetInstance();
auto& memory = system.GetMemory();
const u8* const start_address = memory.GetPointer(address);
Fifo::PushFifoAuxBuffer(start_address, size);
@ -167,11 +169,17 @@ public:
const u8* start_address;
if (Fifo::UseDeterministicGPUThread())
{
start_address = static_cast<u8*>(Fifo::PopFifoAuxBuffer(size));
}
else
start_address = Memory::GetPointer(address);
{
auto& system = Core::System::GetInstance();
auto& memory = system.GetMemory();
start_address = memory.GetPointer(address);
}
// Avoid the crash if Memory::GetPointer failed ..
// Avoid the crash if memory.GetPointer failed ..
if (start_address != nullptr)
{
// temporarily swap dl and non-dl (small "hack" for the stats)