Merge pull request #2875 from degasus/hle
DSP HLE: Remove timing informations from ucodes
This commit is contained in:
commit
869c5d7a8c
|
@ -75,10 +75,8 @@ void DSPHLE::DSP_Update(int cycles)
|
|||
u32 DSPHLE::DSP_UpdateRate()
|
||||
{
|
||||
// AX HLE uses 3ms (Wii) or 5ms (GC) timing period
|
||||
if (m_pUCode != nullptr)
|
||||
return (SystemTimers::GetTicksPerSecond() / 1000) * m_pUCode->GetUpdateMs();
|
||||
else
|
||||
return SystemTimers::GetTicksPerSecond() / 1000;
|
||||
// But to be sure, just update the HLE every ms.
|
||||
return SystemTimers::GetTicksPerSecond() / 1000;
|
||||
}
|
||||
|
||||
void DSPHLE::SendMailToDSP(u32 _uMail)
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
|
||||
AXUCode::AXUCode(DSPHLE* dsphle, u32 crc)
|
||||
: UCodeInterface(dsphle, crc)
|
||||
, m_work_available(false)
|
||||
, m_cmdlist_size(0)
|
||||
{
|
||||
WARN_LOG(DSPHLE, "Instantiating AXUCode: crc=%08x", crc);
|
||||
|
@ -609,7 +608,9 @@ void AXUCode::HandleMail(u32 mail)
|
|||
if (next_is_cmdlist)
|
||||
{
|
||||
CopyCmdList(mail, cmdlist_size);
|
||||
m_work_available = true;
|
||||
HandleCommandList();
|
||||
m_cmdlist_size = 0;
|
||||
SignalWorkEnd();
|
||||
}
|
||||
else if (m_upload_setup_in_progress)
|
||||
{
|
||||
|
@ -669,17 +670,6 @@ void AXUCode::Update()
|
|||
m_mail_handler.PushMail(DSP_RESUME);
|
||||
DSP::GenerateDSPInterruptFromDSPEmu(DSP::INT_DSP);
|
||||
}
|
||||
else if (m_work_available)
|
||||
{
|
||||
HandleCommandList();
|
||||
m_cmdlist_size = 0;
|
||||
SignalWorkEnd();
|
||||
}
|
||||
}
|
||||
|
||||
u32 AXUCode::GetUpdateMs()
|
||||
{
|
||||
return 5;
|
||||
}
|
||||
|
||||
void AXUCode::DoAXState(PointerWrap& p)
|
||||
|
|
|
@ -58,7 +58,6 @@ public:
|
|||
void HandleMail(u32 mail) override;
|
||||
void Update() override;
|
||||
void DoState(PointerWrap& p) override;
|
||||
u32 GetUpdateMs() override;
|
||||
|
||||
protected:
|
||||
enum MailType
|
||||
|
@ -84,9 +83,6 @@ protected:
|
|||
int m_samples_auxB_right[32 * 5];
|
||||
int m_samples_auxB_surround[32 * 5];
|
||||
|
||||
// This flag is set if there is anything to process.
|
||||
bool m_work_available;
|
||||
|
||||
u16 m_cmdlist[512];
|
||||
u32 m_cmdlist_size;
|
||||
|
||||
|
|
|
@ -660,11 +660,6 @@ void AXWiiUCode::OutputWMSamples(u32* addresses)
|
|||
}
|
||||
}
|
||||
|
||||
u32 AXWiiUCode::GetUpdateMs()
|
||||
{
|
||||
return 3;
|
||||
}
|
||||
|
||||
void AXWiiUCode::DoState(PointerWrap &p)
|
||||
{
|
||||
DoStateShared(p);
|
||||
|
|
|
@ -11,7 +11,6 @@ class AXWiiUCode : public AXUCode
|
|||
public:
|
||||
AXWiiUCode(DSPHLE *dsphle, u32 crc);
|
||||
virtual ~AXWiiUCode();
|
||||
u32 GetUpdateMs() override;
|
||||
|
||||
void DoState(PointerWrap &p) override;
|
||||
|
||||
|
|
|
@ -32,11 +32,6 @@ void CARDUCode::Update()
|
|||
}
|
||||
}
|
||||
|
||||
u32 CARDUCode::GetUpdateMs()
|
||||
{
|
||||
return SConfig::GetInstance().bWii ? 3 : 5;
|
||||
}
|
||||
|
||||
void CARDUCode::HandleMail(u32 mail)
|
||||
{
|
||||
if (mail == 0xFF000000) // unlock card
|
||||
|
|
|
@ -11,7 +11,6 @@ class CARDUCode : public UCodeInterface
|
|||
public:
|
||||
CARDUCode(DSPHLE *dsphle, u32 crc);
|
||||
virtual ~CARDUCode();
|
||||
u32 GetUpdateMs() override;
|
||||
|
||||
void HandleMail(u32 mail) override;
|
||||
void Update() override;
|
||||
|
|
|
@ -102,11 +102,6 @@ void GBAUCode::Update()
|
|||
}
|
||||
}
|
||||
|
||||
u32 GBAUCode::GetUpdateMs()
|
||||
{
|
||||
return SConfig::GetInstance().bWii ? 3 : 5;
|
||||
}
|
||||
|
||||
void GBAUCode::HandleMail(u32 mail)
|
||||
{
|
||||
static bool nextmail_is_mramaddr = false;
|
||||
|
|
|
@ -15,7 +15,6 @@ struct GBAUCode : public UCodeInterface
|
|||
{
|
||||
GBAUCode(DSPHLE *dsphle, u32 crc);
|
||||
virtual ~GBAUCode();
|
||||
u32 GetUpdateMs() override;
|
||||
|
||||
void HandleMail(u32 mail) override;
|
||||
void Update() override;
|
||||
|
|
|
@ -25,11 +25,6 @@ void INITUCode::Update()
|
|||
{
|
||||
}
|
||||
|
||||
u32 INITUCode::GetUpdateMs()
|
||||
{
|
||||
return SConfig::GetInstance().bWii ? 3 : 5;
|
||||
}
|
||||
|
||||
void INITUCode::HandleMail(u32 mail)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -11,7 +11,6 @@ class INITUCode : public UCodeInterface
|
|||
public:
|
||||
INITUCode(DSPHLE *dsphle, u32 crc);
|
||||
virtual ~INITUCode();
|
||||
u32 GetUpdateMs() override;
|
||||
|
||||
void HandleMail(u32 mail) override;
|
||||
void Update() override;
|
||||
|
|
|
@ -116,11 +116,6 @@ void ROMUCode::BootUCode()
|
|||
m_dsphle->SetUCode(ector_crc);
|
||||
}
|
||||
|
||||
u32 ROMUCode::GetUpdateMs()
|
||||
{
|
||||
return SConfig::GetInstance().bWii ? 3 : 5;
|
||||
}
|
||||
|
||||
void ROMUCode::DoState(PointerWrap &p)
|
||||
{
|
||||
p.Do(m_current_ucode);
|
||||
|
|
|
@ -11,7 +11,6 @@ class ROMUCode : public UCodeInterface
|
|||
public:
|
||||
ROMUCode(DSPHLE* dsphle, u32 crc);
|
||||
virtual ~ROMUCode();
|
||||
u32 GetUpdateMs() override;
|
||||
|
||||
void HandleMail(u32 mail) override;
|
||||
void Update() override;
|
||||
|
|
|
@ -77,7 +77,6 @@ public:
|
|||
|
||||
virtual void HandleMail(u32 mail) = 0;
|
||||
virtual void Update() = 0;
|
||||
virtual u32 GetUpdateMs() = 0;
|
||||
|
||||
virtual void DoState(PointerWrap &p)
|
||||
{
|
||||
|
|
|
@ -134,11 +134,6 @@ void ZeldaUCode::Update()
|
|||
}
|
||||
}
|
||||
|
||||
u32 ZeldaUCode::GetUpdateMs()
|
||||
{
|
||||
return SConfig::GetInstance().bWii ? 3 : 5;
|
||||
}
|
||||
|
||||
void ZeldaUCode::DoState(PointerWrap &p)
|
||||
{
|
||||
p.Do(m_flags);
|
||||
|
|
|
@ -189,7 +189,6 @@ class ZeldaUCode : public UCodeInterface
|
|||
public:
|
||||
ZeldaUCode(DSPHLE *dsphle, u32 crc);
|
||||
virtual ~ZeldaUCode();
|
||||
u32 GetUpdateMs() override;
|
||||
|
||||
void HandleMail(u32 mail) override;
|
||||
void Update() override;
|
||||
|
|
Loading…
Reference in New Issue