diff options
| author | Admiral H. Curtiss <pikachu025@gmail.com> | 2022-12-02 20:07:30 +0100 |
|---|---|---|
| committer | Admiral H. Curtiss <pikachu025@gmail.com> | 2022-12-03 13:27:02 +0100 |
| commit | 839db591d9daa388c1b6eb944a9f34a9aa41c871 (patch) | |
| tree | 38ea0e3d41b297c6adf6fba87c35d7a7a36a12e6 /Source/Core/VideoCommon/BPStructs.cpp | |
| parent | 7cd9a78ebf6e49b21a5a5eee99858822a8946faa (diff) | |
HW/Memmap: Refactor Memory to class, move to Core::System.
Diffstat (limited to 'Source/Core/VideoCommon/BPStructs.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/BPStructs.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/Source/Core/VideoCommon/BPStructs.cpp b/Source/Core/VideoCommon/BPStructs.cpp index a4c381d313..1bc9f69150 100644 --- a/Source/Core/VideoCommon/BPStructs.cpp +++ b/Source/Core/VideoCommon/BPStructs.cpp @@ -357,7 +357,9 @@ static void BPWritten(const BPCmd& bp, int cycles_into_future) if (!SConfig::GetInstance().bWii) addr = addr & 0x01FFFFFF; - Memory::CopyFromEmu(texMem + tlutTMemAddr, addr, tlutXferCount); + auto& system = Core::System::GetInstance(); + auto& memory = system.GetMemory(); + memory.CopyFromEmu(texMem + tlutTMemAddr, addr, tlutXferCount); if (OpcodeDecoder::g_record_fifo_data) FifoRecorder::GetInstance().UseMemory(addr, tlutXferCount, MemoryUpdate::TMEM); @@ -549,11 +551,15 @@ static void BPWritten(const BPCmd& bp, int cycles_into_future) if (tmem_addr_even + bytes_read > TMEM_SIZE) bytes_read = TMEM_SIZE - tmem_addr_even; - Memory::CopyFromEmu(texMem + tmem_addr_even, src_addr, bytes_read); + auto& system = Core::System::GetInstance(); + auto& memory = system.GetMemory(); + memory.CopyFromEmu(texMem + tmem_addr_even, src_addr, bytes_read); } else // RGBA8 tiles (and CI14, but that might just be stupid libogc!) { - u8* src_ptr = Memory::GetPointer(src_addr); + auto& system = Core::System::GetInstance(); + auto& memory = system.GetMemory(); + u8* src_ptr = memory.GetPointer(src_addr); // AR and GB tiles are stored in separate TMEM banks => can't use a single memcpy for // everything |
