From b76f4dd5f81e786bc68150369e377d040aed12d3 Mon Sep 17 00:00:00 2001 From: Pokechu22 Date: Wed, 20 Jul 2022 17:27:37 -0700 Subject: [PATCH] ProcessorInterface: Remove unused fields --- Source/Core/Core/HW/ProcessorInterface.cpp | 19 +++++-------------- Source/Core/Core/State.cpp | 2 +- 2 files changed, 6 insertions(+), 15 deletions(-) diff --git a/Source/Core/Core/HW/ProcessorInterface.cpp b/Source/Core/Core/HW/ProcessorInterface.cpp index 795a169205..bc0321c2dd 100644 --- a/Source/Core/Core/HW/ProcessorInterface.cpp +++ b/Source/Core/Core/HW/ProcessorInterface.cpp @@ -22,6 +22,10 @@ namespace ProcessorInterface { +constexpr u32 FLIPPER_REV_A = 0x046500B0; +constexpr u32 FLIPPER_REV_B = 0x146500B1; +constexpr u32 FLIPPER_REV_C = 0x246500B1; + // STATE_TO_SAVE u32 m_InterruptCause; u32 m_InterruptMask; @@ -30,10 +34,7 @@ u32 Fifo_CPUBase; u32 Fifo_CPUEnd; u32 Fifo_CPUWritePointer; -static u32 m_Fifo_Reset; static u32 m_ResetCode; -static u32 m_FlipperRev; -static u32 m_Unknown; // ID and callback for scheduling reset button presses/releases static CoreTiming::EventType* toggleResetButton; @@ -55,10 +56,7 @@ void DoState(PointerWrap& p) p.Do(Fifo_CPUBase); p.Do(Fifo_CPUEnd); p.Do(Fifo_CPUWritePointer); - p.Do(m_Fifo_Reset); p.Do(m_ResetCode); - p.Do(m_FlipperRev); - p.Do(m_Unknown); } void Init() @@ -69,13 +67,6 @@ void Init() Fifo_CPUBase = 0; Fifo_CPUEnd = 0; Fifo_CPUWritePointer = 0; - /* - Previous Flipper IDs: - 0x046500B0 = A - 0x146500B1 = B - */ - m_FlipperRev = 0x246500B1; // revision C - m_Unknown = 0; m_ResetCode = 0; // Cold reset m_InterruptCause = INT_CAUSE_RST_BUTTON | INT_CAUSE_VI; @@ -131,7 +122,7 @@ void RegisterMMIO(MMIO::Mapping* mmio, u32 base) } })); - mmio->Register(base | PI_FLIPPER_REV, MMIO::DirectRead(&m_FlipperRev), + mmio->Register(base | PI_FLIPPER_REV, MMIO::Constant(FLIPPER_REV_C), MMIO::InvalidWrite()); // 16 bit reads are based on 32 bit reads. diff --git a/Source/Core/Core/State.cpp b/Source/Core/Core/State.cpp index bccb56a835..c0ab42a64b 100644 --- a/Source/Core/Core/State.cpp +++ b/Source/Core/Core/State.cpp @@ -74,7 +74,7 @@ static std::recursive_mutex g_save_thread_mutex; static std::thread g_save_thread; // Don't forget to increase this after doing changes on the savestate system -constexpr u32 STATE_VERSION = 145; // Last changed in PR 10879 +constexpr u32 STATE_VERSION = 146; // Last changed in PR 10883 // Maps savestate versions to Dolphin versions. // Versions after 42 don't need to be added to this list,