diff options
| author | Pokechu22 <Pokechu022@gmail.com> | 2022-02-15 22:34:29 -0800 |
|---|---|---|
| committer | Pokechu22 <Pokechu022@gmail.com> | 2022-02-15 22:34:31 -0800 |
| commit | 68d987bbee49f96f25b0e74c3e24946c0f0183a6 (patch) | |
| tree | 26b7d23bf946425c7cb91ccfefef6410367c8832 /Source/Core/VideoCommon/CommandProcessor.cpp | |
| parent | bb097c0576d4ea847f627b31887399f152e50e12 (diff) | |
CommandProcessor: Add FIFO_BP_LO/HI to directly_mapped_vars
directly_mapped_vars was added in #69 (4129b30494757a79daf8a07e6a07ea937ba1c94b), but for some reason FIFO_BP_LO/HI were split out from it in in #885 (65af90669bd5f9e02bbaa994d51d5c83d147b868). As far as I can tell, this code (and the code that existed at the time) is identical, so there's no reason to have it handled separately.
Diffstat (limited to 'Source/Core/VideoCommon/CommandProcessor.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/CommandProcessor.cpp | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/Source/Core/VideoCommon/CommandProcessor.cpp b/Source/Core/VideoCommon/CommandProcessor.cpp index 890d7ebfa4..6ebb726d23 100644 --- a/Source/Core/VideoCommon/CommandProcessor.cpp +++ b/Source/Core/VideoCommon/CommandProcessor.cpp @@ -121,11 +121,6 @@ void DoState(PointerWrap& p) p.Do(s_interrupt_waiting); } -static inline void WriteLow(std::atomic<u32>& reg, u16 lowbits) -{ - reg.store((reg.load(std::memory_order_relaxed) & 0xFFFF0000) | lowbits, - std::memory_order_relaxed); -} static inline void WriteHigh(std::atomic<u32>& reg, u16 highbits) { reg.store((reg.load(std::memory_order_relaxed) & 0x0000FFFF) | (static_cast<u32>(highbits) << 16), @@ -205,6 +200,8 @@ void RegisterMMIO(MMIO::Mapping* mmio, u32 base) {FIFO_WRITE_POINTER_HI, MMIO::Utils::HighPart(&fifo.CPWritePointer), false, WMASK_HI_RESTRICT}, // FIFO_READ_POINTER has different code for single/dual core. + {FIFO_BP_LO, MMIO::Utils::LowPart(&fifo.CPBreakpoint), false, WMASK_LO_ALIGN_32BIT}, + {FIFO_BP_HI, MMIO::Utils::HighPart(&fifo.CPBreakpoint), false, WMASK_HI_RESTRICT}, }; for (auto& mapped_var : directly_mapped_vars) @@ -214,16 +211,6 @@ void RegisterMMIO(MMIO::Mapping* mmio, u32 base) MMIO::DirectWrite<u16>(mapped_var.ptr, mapped_var.wmask)); } - mmio->Register(base | FIFO_BP_LO, MMIO::DirectRead<u16>(MMIO::Utils::LowPart(&fifo.CPBreakpoint)), - MMIO::ComplexWrite<u16>([](u32, u16 val) { - WriteLow(fifo.CPBreakpoint, val & WMASK_LO_ALIGN_32BIT); - })); - mmio->Register(base | FIFO_BP_HI, - MMIO::DirectRead<u16>(MMIO::Utils::HighPart(&fifo.CPBreakpoint)), - MMIO::ComplexWrite<u16>([WMASK_HI_RESTRICT](u32, u16 val) { - WriteHigh(fifo.CPBreakpoint, val & WMASK_HI_RESTRICT); - })); - // Timing and metrics MMIOs are stubbed with fixed values. struct { |
