hackfix dsp reset: fixes zelda collector's edition and some other games which reset and hang (...are there any others?)

the problem was that the streaming audio interrupts were still being triggered, causing the game to try and jump to an invalid interrupt handler. The code for dsp lle looks like a hack :( (but it works)

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6163 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Shawn Hoffman 2010-09-02 01:36:45 +00:00
parent 9220ca1afc
commit baf82a0849
2 changed files with 18 additions and 3 deletions

View File

@ -387,6 +387,13 @@ void Write16(const u16 _Value, const u32 _Address)
tmpControl.Hex = (_Value & ~DSP_CONTROL_MASK) |
(dsp_plugin->DSP_WriteControlRegister(_Value) & DSP_CONTROL_MASK);
// HACK for DSPReset: do it instantaneously
if (_Value & 1)
{
Shutdown();
Init();
}
// Update DSP related flags
g_dspState.DSPControl.DSPReset = tmpControl.DSPReset;
g_dspState.DSPControl.DSPAssertInt = tmpControl.DSPAssertInt;

View File

@ -42,12 +42,20 @@ volatile u32 gdsp_running;
void WriteCR(u16 val)
{
// reset
if (val & 0x0001)
if (val & 1)
{
DSPCore_Reset();
val &= ~1;
}
// init - can reset and init be done at the same time?
else if (val == 4)
{
// this looks like a hack! OSInitAudioSystem ucode
// should send this mail - not dsp core itself
gdsp_mbox_write_h(GDSP_MBOX_DSP, 0x8054);
gdsp_mbox_write_l(GDSP_MBOX_DSP, 0x4348);
val |= 0x800;
}
val &= ~0x0001;
// update cr
g_dsp.cr = val;