a little more cleanup.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6949 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
d61a79266a
commit
0df636ca39
|
@ -487,10 +487,6 @@
|
||||||
RelativePath="..\..\PluginSpecs\PluginSpecs.h"
|
RelativePath="..\..\PluginSpecs\PluginSpecs.h"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
|
||||||
RelativePath="..\..\PluginSpecs\pluginspecs_dsp.h"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\PluginSpecs\pluginspecs_video.h"
|
RelativePath="..\..\PluginSpecs\pluginspecs_video.h"
|
||||||
>
|
>
|
||||||
|
|
|
@ -80,10 +80,12 @@ void DSPHLE::Shutdown()
|
||||||
AudioCommon::ShutdownSoundStream();
|
AudioCommon::ShutdownSoundStream();
|
||||||
}
|
}
|
||||||
|
|
||||||
void DSPHLE::Update(int cycles)
|
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 != NULL)
|
if (m_pUCode != NULL)
|
||||||
m_pUCode->Update(cycles);
|
m_pUCode->Update(cycles / 6);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DSPHLE::SendMailToDSP(u32 _uMail)
|
void DSPHLE::SendMailToDSP(u32 _uMail)
|
||||||
|
@ -191,32 +193,8 @@ void DSPHLE::DSP_WriteMailBoxLow(bool _CPUMailbox, unsigned short _Value)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
u16 DSPHLE::WriteControlRegister(u16 _Value)
|
|
||||||
{
|
|
||||||
UDSPControl Temp(_Value);
|
|
||||||
if (Temp.DSPReset)
|
|
||||||
{
|
|
||||||
SetUCode(UCODE_ROM);
|
|
||||||
Temp.DSPReset = 0;
|
|
||||||
}
|
|
||||||
if (Temp.DSPInit == 0)
|
|
||||||
{
|
|
||||||
// copy 128 byte from ARAM 0x000000 to IMEM
|
|
||||||
SetUCode(UCODE_INIT_AUDIO_SYSTEM);
|
|
||||||
Temp.DSPInitCode = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
m_DSPControl.Hex = Temp.Hex;
|
|
||||||
return m_DSPControl.Hex;
|
|
||||||
}
|
|
||||||
|
|
||||||
u16 DSPHLE::ReadControlRegister()
|
|
||||||
{
|
|
||||||
return m_DSPControl.Hex;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Other DSP fuctions
|
// Other DSP fuctions
|
||||||
unsigned short DSPHLE::DSP_WriteControlRegister(unsigned short _Value)
|
u16 DSPHLE::DSP_WriteControlRegister(unsigned short _Value)
|
||||||
{
|
{
|
||||||
UDSPControl Temp(_Value);
|
UDSPControl Temp(_Value);
|
||||||
if (!m_InitMixer)
|
if (!m_InitMixer)
|
||||||
|
@ -238,20 +216,28 @@ unsigned short DSPHLE::DSP_WriteControlRegister(unsigned short _Value)
|
||||||
m_InitMixer = true;
|
m_InitMixer = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return WriteControlRegister(_Value);
|
|
||||||
|
if (Temp.DSPReset)
|
||||||
|
{
|
||||||
|
SetUCode(UCODE_ROM);
|
||||||
|
Temp.DSPReset = 0;
|
||||||
|
}
|
||||||
|
if (Temp.DSPInit == 0)
|
||||||
|
{
|
||||||
|
// copy 128 byte from ARAM 0x000000 to IMEM
|
||||||
|
SetUCode(UCODE_INIT_AUDIO_SYSTEM);
|
||||||
|
Temp.DSPInitCode = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
m_DSPControl.Hex = Temp.Hex;
|
||||||
|
return m_DSPControl.Hex;
|
||||||
}
|
}
|
||||||
|
|
||||||
u16 DSPHLE::DSP_ReadControlRegister()
|
u16 DSPHLE::DSP_ReadControlRegister()
|
||||||
{
|
{
|
||||||
return ReadControlRegister();
|
return m_DSPControl.Hex;
|
||||||
}
|
}
|
||||||
|
|
||||||
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.
|
|
||||||
Update(cycles / 6);
|
|
||||||
}
|
|
||||||
|
|
||||||
// The reason that we don't disable this entire
|
// The reason that we don't disable this entire
|
||||||
// function when Other Audio is disabled is that then we can't turn it back on
|
// function when Other Audio is disabled is that then we can't turn it back on
|
||||||
|
|
|
@ -56,18 +56,16 @@ public:
|
||||||
virtual void DSP_StopSoundStream();
|
virtual void DSP_StopSoundStream();
|
||||||
virtual void DSP_ClearAudioBuffer(bool mute);
|
virtual void DSP_ClearAudioBuffer(bool mute);
|
||||||
|
|
||||||
|
CMailHandler& AccessMailHandler() { return m_MailHandler; }
|
||||||
|
|
||||||
// Formerly DSPHandler
|
// Formerly DSPHandler
|
||||||
void Update(int cycles);
|
|
||||||
u16 WriteControlRegister(u16 _Value);
|
|
||||||
u16 ReadControlRegister();
|
|
||||||
void SendMailToDSP(u32 _uMail);
|
|
||||||
IUCode *GetUCode();
|
IUCode *GetUCode();
|
||||||
void SetUCode(u32 _crc);
|
void SetUCode(u32 _crc);
|
||||||
void SwapUCode(u32 _crc);
|
void SwapUCode(u32 _crc);
|
||||||
|
|
||||||
CMailHandler& AccessMailHandler() { return m_MailHandler; }
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
void SendMailToDSP(u32 _uMail);
|
||||||
|
|
||||||
// Declarations and definitions
|
// Declarations and definitions
|
||||||
void *m_hWnd;
|
void *m_hWnd;
|
||||||
bool m_bWii;
|
bool m_bWii;
|
||||||
|
|
|
@ -56,12 +56,6 @@ enum PLUGIN_COMM
|
||||||
// Plugin types
|
// Plugin types
|
||||||
enum PLUGIN_TYPE {
|
enum PLUGIN_TYPE {
|
||||||
PLUGIN_TYPE_VIDEO = 1,
|
PLUGIN_TYPE_VIDEO = 1,
|
||||||
PLUGIN_TYPE_DVD,
|
|
||||||
PLUGIN_TYPE_PAD_REMOVED,
|
|
||||||
PLUGIN_TYPE_AUDIO,
|
|
||||||
PLUGIN_TYPE_COMPILER,
|
|
||||||
PLUGIN_TYPE_DSP,
|
|
||||||
PLUGIN_TYPE_WIIMOTE_REMOVED,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#define STATE_MODE_READ 1
|
#define STATE_MODE_READ 1
|
||||||
|
|
Loading…
Reference in New Issue