Add a couple of comments to Zelda ucode HLE - now we know exactly what the DSPADPCM_FILTER is at least.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3467 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
hrydgard 2009-06-16 19:35:54 +00:00
parent 635a1a3a37
commit 4ed15aedf5
1 changed files with 31 additions and 18 deletions

View File

@ -188,7 +188,7 @@ void CUCode_Zelda::ExecuteList()
// DsetupTable ... zelda ww jumps to 0x0095 // DsetupTable ... zelda ww jumps to 0x0095
case 0x01: case 0x01:
{ {
u32 tmp[4]; u32 tmp[4];
tmp[0] = Read32(); tmp[0] = Read32();
tmp[1] = Read32(); tmp[1] = Read32();
tmp[2] = Read32(); tmp[2] = Read32();
@ -197,20 +197,24 @@ void CUCode_Zelda::ExecuteList()
m_SyncMaxStep = CmdMail & 0xFFFF; m_SyncMaxStep = CmdMail & 0xFFFF;
DEBUG_LOG(DSPHLE, "DsetupTable"); DEBUG_LOG(DSPHLE, "DsetupTable");
DEBUG_LOG(DSPHLE, "???: 0x%08x", tmp[0]); DEBUG_LOG(DSPHLE, "Some mixing buffer: 0x%08x", tmp[0]);
DEBUG_LOG(DSPHLE, "DSPRES_FILTER (size: 0x40): 0x%08x", tmp[1]);
DEBUG_LOG(DSPHLE, "DSPADPCM_FILTER (size: 0x500): 0x%08x", tmp[2]);
DEBUG_LOG(DSPHLE, "???: 0x%08x", tmp[3]);
}
break;
// SyncFrame ... zelda ww jumps to 0x0243 // This points to some strange data table.
case 0x02: DEBUG_LOG(DSPHLE, "DSPRES_FILTER (size: 0x40): 0x%08x", tmp[1]);
{
u32 tmp[3]; // See 0x02, same thing as DSPADPCM_FILTER there.
tmp[0] = Read32(); DEBUG_LOG(DSPHLE, "DSPADPCM_FILTER (size: 0x500): 0x%08x", tmp[2]);
tmp[1] = Read32(); DEBUG_LOG(DSPHLE, "Some other mixing buffer: 0x%08x", tmp[3]);
tmp[2] = Read32(); }
break;
// SyncFrame ... zelda ww jumps to 0x0243
case 0x02:
{
u32 tmp[3];
tmp[0] = Read32();
tmp[1] = Read32();
tmp[2] = Read32();
// We're ready to mix // We're ready to mix
// soundStream->GetMixer()->SetHLEReady(true); // soundStream->GetMixer()->SetHLEReady(true);
@ -222,10 +226,19 @@ void CUCode_Zelda::ExecuteList()
m_SyncCount = 0; m_SyncCount = 0;
m_SyncMax = (CmdMail >> 16) & 0xFF; m_SyncMax = (CmdMail >> 16) & 0xFF;
DEBUG_LOG(DSPHLE, "DsyncFrame"); DEBUG_LOG(DSPHLE, "DsyncFrame");
DEBUG_LOG(DSPHLE, "???: 0x%08x", tmp[0]);
DEBUG_LOG(DSPHLE, "???: 0x%08x", tmp[1]); // These alternate between three sets of mixing buffers. They are all three fairly near,
DEBUG_LOG(DSPHLE, "DSPADPCM_FILTER (size: 0x500): 0x%08x", tmp[2]); // but not at, the ADMA read addresses.
DEBUG_LOG(DSPHLE, "Left mixing buffer? 0x%08x", tmp[0]);
DEBUG_LOG(DSPHLE, "Right mixing buffer? 0x%08x", tmp[1]);
// Zelda WW: This points to a 64-byte array of coefficients, which are EXACTLY the same
// as the AFC ADPCM coef array in decode.c of the in_cube winamp plugin,
// which can play Zelda audio.
// There's also a lot more table-looking data immediately after - maybe alternative
// tables? I wonder where the parameter blocks are?
DEBUG_LOG(DSPHLE, "DSPADPCM_FILTER (size: 0x40): 0x%08x", tmp[2]);
} }
return; return;
break; break;