Merge pull request #2875 from degasus/hle

DSP HLE: Remove timing informations from ucodes
This commit is contained in:
Markus Wick 2015-08-19 16:47:38 +02:00
commit 869c5d7a8c
16 changed files with 5 additions and 58 deletions

View File

@ -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)

View File

@ -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)

View File

@ -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;

View File

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

View File

@ -11,7 +11,6 @@ class AXWiiUCode : public AXUCode
public:
AXWiiUCode(DSPHLE *dsphle, u32 crc);
virtual ~AXWiiUCode();
u32 GetUpdateMs() 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)
{
if (mail == 0xFF000000) // unlock card

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

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

View File

@ -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;

View File

@ -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);

View File

@ -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;

View File

@ -77,7 +77,6 @@ public:
virtual void HandleMail(u32 mail) = 0;
virtual void Update() = 0;
virtual u32 GetUpdateMs() = 0;
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)
{
p.Do(m_flags);

View File

@ -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;