2015-05-24 06:55:12 +02:00
|
|
|
// Copyright 2011 Dolphin Emulator Project
|
2015-05-18 01:08:10 +02:00
|
|
|
// Licensed under GPLv2+
|
2013-04-17 22:43:11 -04:00
|
|
|
// Refer to the license.txt file included.
|
2011-01-28 18:39:30 +00:00
|
|
|
|
2014-02-10 13:54:46 -05:00
|
|
|
#pragma once
|
2011-01-28 18:39:30 +00:00
|
|
|
|
2016-01-17 22:33:21 -05:00
|
|
|
#include <memory>
|
2015-05-10 20:16:05 -05:00
|
|
|
#include "Common/CommonTypes.h"
|
|
|
|
|
2015-05-08 17:28:03 -04:00
|
|
|
class PointerWrap;
|
2011-01-28 18:39:30 +00:00
|
|
|
|
2011-02-02 16:34:12 +00:00
|
|
|
class DSPEmulator
|
2011-01-28 18:39:30 +00:00
|
|
|
{
|
|
|
|
public:
|
2016-06-24 10:43:46 +02:00
|
|
|
virtual ~DSPEmulator() {}
|
|
|
|
virtual bool IsLLE() = 0;
|
|
|
|
|
2016-10-07 08:55:54 -04:00
|
|
|
virtual bool Initialize(bool wii, bool dsp_thread) = 0;
|
2016-06-24 10:43:46 +02:00
|
|
|
virtual void Shutdown() = 0;
|
|
|
|
|
|
|
|
virtual void DoState(PointerWrap& p) = 0;
|
2017-01-18 12:13:02 -05:00
|
|
|
virtual void PauseAndLock(bool do_lock, bool unpause_on_unlock = true) = 0;
|
|
|
|
|
|
|
|
virtual void DSP_WriteMailBoxHigh(bool cpu_mailbox, u16 value) = 0;
|
|
|
|
virtual void DSP_WriteMailBoxLow(bool cpu_mailbox, u16 value) = 0;
|
|
|
|
virtual u16 DSP_ReadMailBoxHigh(bool cpu_mailbox) = 0;
|
|
|
|
virtual u16 DSP_ReadMailBoxLow(bool cpu_mailbox) = 0;
|
|
|
|
virtual u16 DSP_ReadControlRegister() = 0;
|
|
|
|
virtual u16 DSP_WriteControlRegister(u16 value) = 0;
|
2016-06-24 10:43:46 +02:00
|
|
|
virtual void DSP_Update(int cycles) = 0;
|
|
|
|
virtual void DSP_StopSoundStream() = 0;
|
|
|
|
virtual u32 DSP_UpdateRate() = 0;
|
2016-10-07 08:55:54 -04:00
|
|
|
|
|
|
|
protected:
|
|
|
|
bool m_wii = false;
|
2011-01-28 18:39:30 +00:00
|
|
|
};
|
|
|
|
|
2016-01-17 22:33:21 -05:00
|
|
|
std::unique_ptr<DSPEmulator> CreateDSPEmulator(bool hle);
|