From 551cf4b2a295cd736309f08b60134c6231be783f Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sat, 26 Jul 2014 20:04:15 -0400 Subject: [PATCH] Core: Remove the unused cycle parameter from DSPHLE update calls --- Source/Core/Core/HW/DSPHLE/DSPHLE.cpp | 4 +--- Source/Core/Core/HW/DSPHLE/UCodes/AX.cpp | 2 +- Source/Core/Core/HW/DSPHLE/UCodes/AX.h | 2 +- Source/Core/Core/HW/DSPHLE/UCodes/CARD.cpp | 2 +- Source/Core/Core/HW/DSPHLE/UCodes/CARD.h | 2 +- Source/Core/Core/HW/DSPHLE/UCodes/GBA.cpp | 2 +- Source/Core/Core/HW/DSPHLE/UCodes/GBA.h | 2 +- Source/Core/Core/HW/DSPHLE/UCodes/INIT.cpp | 5 +---- Source/Core/Core/HW/DSPHLE/UCodes/INIT.h | 2 +- Source/Core/Core/HW/DSPHLE/UCodes/ROM.cpp | 8 +++++--- Source/Core/Core/HW/DSPHLE/UCodes/ROM.h | 2 +- Source/Core/Core/HW/DSPHLE/UCodes/UCodes.h | 20 +++++++++++++------- Source/Core/Core/HW/DSPHLE/UCodes/Zelda.cpp | 2 +- Source/Core/Core/HW/DSPHLE/UCodes/Zelda.h | 2 +- 14 files changed, 30 insertions(+), 27 deletions(-) diff --git a/Source/Core/Core/HW/DSPHLE/DSPHLE.cpp b/Source/Core/Core/HW/DSPHLE/DSPHLE.cpp index eed5fbd92e..4898ab7057 100644 --- a/Source/Core/Core/HW/DSPHLE/DSPHLE.cpp +++ b/Source/Core/Core/HW/DSPHLE/DSPHLE.cpp @@ -66,10 +66,8 @@ void DSPHLE::Shutdown() void DSPHLE::DSP_Update(int cycles) { - // This is called OFTEN - better not do anything expensive! - // ~1/6th as many cycles as the period PPC-side. if (m_pUCode != nullptr) - m_pUCode->Update(cycles / 6); + m_pUCode->Update(); } u32 DSPHLE::DSP_UpdateRate() diff --git a/Source/Core/Core/HW/DSPHLE/UCodes/AX.cpp b/Source/Core/Core/HW/DSPHLE/UCodes/AX.cpp index 3f523add10..f6debb76ae 100644 --- a/Source/Core/Core/HW/DSPHLE/UCodes/AX.cpp +++ b/Source/Core/Core/HW/DSPHLE/UCodes/AX.cpp @@ -661,7 +661,7 @@ void AXUCode::CopyCmdList(u32 addr, u16 size) m_cmdlist_size = size; } -void AXUCode::Update(int cycles) +void AXUCode::Update() { // Used for UCode switching. if (NeedsResumeMail()) diff --git a/Source/Core/Core/HW/DSPHLE/UCodes/AX.h b/Source/Core/Core/HW/DSPHLE/UCodes/AX.h index 08b5dd4951..5ccf3c7d9b 100644 --- a/Source/Core/Core/HW/DSPHLE/UCodes/AX.h +++ b/Source/Core/Core/HW/DSPHLE/UCodes/AX.h @@ -56,7 +56,7 @@ public: virtual ~AXUCode(); virtual void HandleMail(u32 mail) override; - virtual void Update(int cycles) override; + virtual void Update() override; virtual void DoState(PointerWrap& p) override; u32 GetUpdateMs() override; diff --git a/Source/Core/Core/HW/DSPHLE/UCodes/CARD.cpp b/Source/Core/Core/HW/DSPHLE/UCodes/CARD.cpp index 4179a7eeb8..aabafc3f85 100644 --- a/Source/Core/Core/HW/DSPHLE/UCodes/CARD.cpp +++ b/Source/Core/Core/HW/DSPHLE/UCodes/CARD.cpp @@ -23,7 +23,7 @@ CARDUCode::~CARDUCode() } -void CARDUCode::Update(int cycles) +void CARDUCode::Update() { // check if we have to sent something if (!m_mail_handler.IsEmpty()) diff --git a/Source/Core/Core/HW/DSPHLE/UCodes/CARD.h b/Source/Core/Core/HW/DSPHLE/UCodes/CARD.h index 5e8e4df5dd..49c54d9a6f 100644 --- a/Source/Core/Core/HW/DSPHLE/UCodes/CARD.h +++ b/Source/Core/Core/HW/DSPHLE/UCodes/CARD.h @@ -14,6 +14,6 @@ public: u32 GetUpdateMs() override; void HandleMail(u32 mail) override; - void Update(int cycles) override; + void Update() override; }; diff --git a/Source/Core/Core/HW/DSPHLE/UCodes/GBA.cpp b/Source/Core/Core/HW/DSPHLE/UCodes/GBA.cpp index 23c99c1eb4..2edc0e182f 100644 --- a/Source/Core/Core/HW/DSPHLE/UCodes/GBA.cpp +++ b/Source/Core/Core/HW/DSPHLE/UCodes/GBA.cpp @@ -18,7 +18,7 @@ GBAUCode::~GBAUCode() m_mail_handler.Clear(); } -void GBAUCode::Update(int cycles) +void GBAUCode::Update() { // check if we have to send something if (!m_mail_handler.IsEmpty()) diff --git a/Source/Core/Core/HW/DSPHLE/UCodes/GBA.h b/Source/Core/Core/HW/DSPHLE/UCodes/GBA.h index 77964da9b4..b103c88a5b 100644 --- a/Source/Core/Core/HW/DSPHLE/UCodes/GBA.h +++ b/Source/Core/Core/HW/DSPHLE/UCodes/GBA.h @@ -13,5 +13,5 @@ struct GBAUCode : public UCodeInterface u32 GetUpdateMs() override; void HandleMail(u32 mail) override; - void Update(int cycles) override; + void Update() override; }; diff --git a/Source/Core/Core/HW/DSPHLE/UCodes/INIT.cpp b/Source/Core/Core/HW/DSPHLE/UCodes/INIT.cpp index d2eb7a3296..4afbe129c6 100644 --- a/Source/Core/Core/HW/DSPHLE/UCodes/INIT.cpp +++ b/Source/Core/Core/HW/DSPHLE/UCodes/INIT.cpp @@ -12,18 +12,15 @@ INITUCode::INITUCode(DSPHLE *dsphle, u32 crc) DEBUG_LOG(DSPHLE, "INITUCode - initialized"); } - INITUCode::~INITUCode() { } - void INITUCode::Init() { } - -void INITUCode::Update(int cycles) +void INITUCode::Update() { if (m_mail_handler.IsEmpty()) { diff --git a/Source/Core/Core/HW/DSPHLE/UCodes/INIT.h b/Source/Core/Core/HW/DSPHLE/UCodes/INIT.h index c70b99f778..cfe6b9a2ac 100644 --- a/Source/Core/Core/HW/DSPHLE/UCodes/INIT.h +++ b/Source/Core/Core/HW/DSPHLE/UCodes/INIT.h @@ -14,6 +14,6 @@ public: u32 GetUpdateMs() override; void HandleMail(u32 mail) override; - void Update(int cycles) override; + void Update() override; void Init(); }; diff --git a/Source/Core/Core/HW/DSPHLE/UCodes/ROM.cpp b/Source/Core/Core/HW/DSPHLE/UCodes/ROM.cpp index 0c10d0c1d1..b5ca1acf4d 100644 --- a/Source/Core/Core/HW/DSPHLE/UCodes/ROM.cpp +++ b/Source/Core/Core/HW/DSPHLE/UCodes/ROM.cpp @@ -26,10 +26,12 @@ ROMUCode::ROMUCode(DSPHLE *dsphle, u32 crc) } ROMUCode::~ROMUCode() -{} +{ +} -void ROMUCode::Update(int cycles) -{} +void ROMUCode::Update() +{ +} void ROMUCode::HandleMail(u32 mail) { diff --git a/Source/Core/Core/HW/DSPHLE/UCodes/ROM.h b/Source/Core/Core/HW/DSPHLE/UCodes/ROM.h index 749369ea21..fc294c4aaf 100644 --- a/Source/Core/Core/HW/DSPHLE/UCodes/ROM.h +++ b/Source/Core/Core/HW/DSPHLE/UCodes/ROM.h @@ -14,7 +14,7 @@ public: u32 GetUpdateMs() override; void HandleMail(u32 mail) override; - void Update(int cycles) override; + void Update() override; void DoState(PointerWrap &p) override; diff --git a/Source/Core/Core/HW/DSPHLE/UCodes/UCodes.h b/Source/Core/Core/HW/DSPHLE/UCodes/UCodes.h index f952cb5b15..9e46bc659b 100644 --- a/Source/Core/Core/HW/DSPHLE/UCodes/UCodes.h +++ b/Source/Core/Core/HW/DSPHLE/UCodes/UCodes.h @@ -68,20 +68,26 @@ public: , m_next_ucode() , m_next_ucode_steps(0) , m_needs_resume_mail(false) - {} + { + } virtual ~UCodeInterface() - {} + { + } virtual void HandleMail(u32 mail) = 0; - - // Cycles are out of the 81/121mhz the DSP runs at. - virtual void Update(int cycles) = 0; + virtual void Update() = 0; virtual u32 GetUpdateMs() = 0; - virtual void DoState(PointerWrap &p) { DoStateShared(p); } + virtual void DoState(PointerWrap &p) + { + DoStateShared(p); + } - static u32 GetCRC(UCodeInterface* ucode) { return ucode ? ucode->m_crc : UCODE_NULL; } + static u32 GetCRC(UCodeInterface* ucode) + { + return ucode ? ucode->m_crc : UCODE_NULL; + } protected: void PrepareBootUCode(u32 mail); diff --git a/Source/Core/Core/HW/DSPHLE/UCodes/Zelda.cpp b/Source/Core/Core/HW/DSPHLE/UCodes/Zelda.cpp index c966ee09af..c56f5c273c 100644 --- a/Source/Core/Core/HW/DSPHLE/UCodes/Zelda.cpp +++ b/Source/Core/Core/HW/DSPHLE/UCodes/Zelda.cpp @@ -82,7 +82,7 @@ u8 *ZeldaUCode::GetARAMPointer(u32 address) return DSP::GetARAMPtr() + address; } -void ZeldaUCode::Update(int cycles) +void ZeldaUCode::Update() { if (!IsLightVersion()) { diff --git a/Source/Core/Core/HW/DSPHLE/UCodes/Zelda.h b/Source/Core/Core/HW/DSPHLE/UCodes/Zelda.h index 31fd5729cb..020edad5a2 100644 --- a/Source/Core/Core/HW/DSPHLE/UCodes/Zelda.h +++ b/Source/Core/Core/HW/DSPHLE/UCodes/Zelda.h @@ -125,7 +125,7 @@ public: void HandleMail_LightVersion(u32 mail); void HandleMail_SMSVersion(u32 mail); void HandleMail_NormalVersion(u32 mail); - void Update(int cycles) override; + void Update() override; void CopyPBsFromRAM(); void CopyPBsToRAM();