DSP HLE: Remove timing informations from ucodes

On HLE, we don't emulate the timings on HLE, so there is also no need
to setup periods callbacks.
This commit is contained in:
degasus 2015-08-19 15:44:41 +02:00
parent 7277eb0e6c
commit 896a02b3a8
16 changed files with 2 additions and 47 deletions

View File

@ -75,10 +75,8 @@ void DSPHLE::DSP_Update(int cycles)
u32 DSPHLE::DSP_UpdateRate() u32 DSPHLE::DSP_UpdateRate()
{ {
// AX HLE uses 3ms (Wii) or 5ms (GC) timing period // AX HLE uses 3ms (Wii) or 5ms (GC) timing period
if (m_pUCode != nullptr) // But to be sure, just update the HLE every ms.
return (SystemTimers::GetTicksPerSecond() / 1000) * m_pUCode->GetUpdateMs(); return SystemTimers::GetTicksPerSecond() / 1000;
else
return SystemTimers::GetTicksPerSecond() / 1000;
} }
void DSPHLE::SendMailToDSP(u32 _uMail) void DSPHLE::SendMailToDSP(u32 _uMail)

View File

@ -672,11 +672,6 @@ void AXUCode::Update()
} }
} }
u32 AXUCode::GetUpdateMs()
{
return 5;
}
void AXUCode::DoAXState(PointerWrap& p) void AXUCode::DoAXState(PointerWrap& p)
{ {
p.Do(m_cmdlist); p.Do(m_cmdlist);

View File

@ -58,7 +58,6 @@ public:
void HandleMail(u32 mail) override; void HandleMail(u32 mail) override;
void Update() override; void Update() override;
void DoState(PointerWrap& p) override; void DoState(PointerWrap& p) override;
u32 GetUpdateMs() override;
protected: protected:
enum MailType enum MailType

View File

@ -660,11 +660,6 @@ void AXWiiUCode::OutputWMSamples(u32* addresses)
} }
} }
u32 AXWiiUCode::GetUpdateMs()
{
return 3;
}
void AXWiiUCode::DoState(PointerWrap &p) void AXWiiUCode::DoState(PointerWrap &p)
{ {
DoStateShared(p); DoStateShared(p);

View File

@ -11,7 +11,6 @@ class AXWiiUCode : public AXUCode
public: public:
AXWiiUCode(DSPHLE *dsphle, u32 crc); AXWiiUCode(DSPHLE *dsphle, u32 crc);
virtual ~AXWiiUCode(); virtual ~AXWiiUCode();
u32 GetUpdateMs() override;
void DoState(PointerWrap &p) override; void DoState(PointerWrap &p) override;

View File

@ -32,11 +32,6 @@ void CARDUCode::Update()
} }
} }
u32 CARDUCode::GetUpdateMs()
{
return SConfig::GetInstance().bWii ? 3 : 5;
}
void CARDUCode::HandleMail(u32 mail) void CARDUCode::HandleMail(u32 mail)
{ {
if (mail == 0xFF000000) // unlock card if (mail == 0xFF000000) // unlock card

View File

@ -11,7 +11,6 @@ class CARDUCode : public UCodeInterface
public: public:
CARDUCode(DSPHLE *dsphle, u32 crc); CARDUCode(DSPHLE *dsphle, u32 crc);
virtual ~CARDUCode(); virtual ~CARDUCode();
u32 GetUpdateMs() override;
void HandleMail(u32 mail) override; void HandleMail(u32 mail) override;
void Update() override; void Update() override;

View File

@ -102,11 +102,6 @@ void GBAUCode::Update()
} }
} }
u32 GBAUCode::GetUpdateMs()
{
return SConfig::GetInstance().bWii ? 3 : 5;
}
void GBAUCode::HandleMail(u32 mail) void GBAUCode::HandleMail(u32 mail)
{ {
static bool nextmail_is_mramaddr = false; static bool nextmail_is_mramaddr = false;

View File

@ -15,7 +15,6 @@ struct GBAUCode : public UCodeInterface
{ {
GBAUCode(DSPHLE *dsphle, u32 crc); GBAUCode(DSPHLE *dsphle, u32 crc);
virtual ~GBAUCode(); virtual ~GBAUCode();
u32 GetUpdateMs() override;
void HandleMail(u32 mail) override; void HandleMail(u32 mail) override;
void Update() override; void Update() override;

View File

@ -25,11 +25,6 @@ void INITUCode::Update()
{ {
} }
u32 INITUCode::GetUpdateMs()
{
return SConfig::GetInstance().bWii ? 3 : 5;
}
void INITUCode::HandleMail(u32 mail) void INITUCode::HandleMail(u32 mail)
{ {
} }

View File

@ -11,7 +11,6 @@ class INITUCode : public UCodeInterface
public: public:
INITUCode(DSPHLE *dsphle, u32 crc); INITUCode(DSPHLE *dsphle, u32 crc);
virtual ~INITUCode(); virtual ~INITUCode();
u32 GetUpdateMs() override;
void HandleMail(u32 mail) override; void HandleMail(u32 mail) override;
void Update() override; void Update() override;

View File

@ -116,11 +116,6 @@ void ROMUCode::BootUCode()
m_dsphle->SetUCode(ector_crc); m_dsphle->SetUCode(ector_crc);
} }
u32 ROMUCode::GetUpdateMs()
{
return SConfig::GetInstance().bWii ? 3 : 5;
}
void ROMUCode::DoState(PointerWrap &p) void ROMUCode::DoState(PointerWrap &p)
{ {
p.Do(m_current_ucode); p.Do(m_current_ucode);

View File

@ -11,7 +11,6 @@ class ROMUCode : public UCodeInterface
public: public:
ROMUCode(DSPHLE* dsphle, u32 crc); ROMUCode(DSPHLE* dsphle, u32 crc);
virtual ~ROMUCode(); virtual ~ROMUCode();
u32 GetUpdateMs() override;
void HandleMail(u32 mail) override; void HandleMail(u32 mail) override;
void Update() override; void Update() override;

View File

@ -77,7 +77,6 @@ public:
virtual void HandleMail(u32 mail) = 0; virtual void HandleMail(u32 mail) = 0;
virtual void Update() = 0; virtual void Update() = 0;
virtual u32 GetUpdateMs() = 0;
virtual void DoState(PointerWrap &p) virtual void DoState(PointerWrap &p)
{ {

View File

@ -134,11 +134,6 @@ void ZeldaUCode::Update()
} }
} }
u32 ZeldaUCode::GetUpdateMs()
{
return SConfig::GetInstance().bWii ? 3 : 5;
}
void ZeldaUCode::DoState(PointerWrap &p) void ZeldaUCode::DoState(PointerWrap &p)
{ {
p.Do(m_flags); p.Do(m_flags);

View File

@ -189,7 +189,6 @@ class ZeldaUCode : public UCodeInterface
public: public:
ZeldaUCode(DSPHLE *dsphle, u32 crc); ZeldaUCode(DSPHLE *dsphle, u32 crc);
virtual ~ZeldaUCode(); virtual ~ZeldaUCode();
u32 GetUpdateMs() override;
void HandleMail(u32 mail) override; void HandleMail(u32 mail) override;
void Update() override; void Update() override;