mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 13:27:45 -07:00
Documented the general sound decoder. Now all we need is to implement it.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3613 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
5e65e94c4b
commit
2e7dd06cfd
@ -284,7 +284,6 @@ void CUCode_Zelda::MixAddVoice(ZeldaVoicePB &PB, s32* _LeftBuffer, s32* _RightBu
|
||||
return;
|
||||
|
||||
case 0x0005: // AFC / unknown
|
||||
case 0x0021: // AFC / ADPCM???
|
||||
case 0x0009: // AFC / ADPCM
|
||||
MixAddVoice_AFC(PB, m_TempBuffer, _Size);
|
||||
break;
|
||||
@ -293,7 +292,14 @@ void CUCode_Zelda::MixAddVoice(ZeldaVoicePB &PB, s32* _LeftBuffer, s32* _RightBu
|
||||
MixAddVoice_PCM16(PB, m_TempBuffer, _Size);
|
||||
break;
|
||||
|
||||
// Cases we're missing: 0x0008, 0x0020, 0x0021
|
||||
case 0x0008:
|
||||
case 0x0020:
|
||||
case 0x0021:
|
||||
PanicAlert("Unimplemented MixAddVoice format in zelda %04x", PB.Format);
|
||||
|
||||
default:
|
||||
// TODO: Implement general decoder here
|
||||
PanicAlert("Unknown MixAddVoice format in zelda %04x", PB.Format);
|
||||
break;
|
||||
}
|
||||
|
@ -2875,16 +2875,16 @@ void 087c_DefaultDecoder()
|
||||
{
|
||||
087c 8100 clr $ACC0
|
||||
087d 1f5e mrr $AX0.H, $AC0.M
|
||||
087e 00d8 0402 lr $AX0.L, @0x0402
|
||||
0880 00dc 0430 lr $AC0.L, @0x0430
|
||||
0882 0080 0520 lri $AR0, #0x0520
|
||||
0884 00df 0480 lr $AC1.M, @0x0480
|
||||
0886 1501 lsl $ACC1, #1
|
||||
0887 0340 007e andi $AC1.M, #0x007e
|
||||
0889 0300 0891 addi $AC1.M, #0x0891
|
||||
088b 1c5f mrr $AR2, $AC1.M
|
||||
088c 175f callr $AR2
|
||||
088d 00fc 0430 sr @0x0430, $AC0.L
|
||||
087e 00d8 0402 lr $AX0.L, @0x0402 // AX0.L = PB.RatioInt
|
||||
0880 00dc 0430 lr $AC0.L, @0x0430 // AC0.L = PB.RatioFrac
|
||||
0882 0080 0520 lri $AR0, #0x0520 // AR0 = 0x0520
|
||||
0884 00df 0480 lr $AC1.M, @0x0480
|
||||
0886 1501 lsl $ACC1, #1 // AC1.M = (PB.Format << 1)
|
||||
0887 0340 007e andi $AC1.M, #0x007e // AC1.M &= 0x007e
|
||||
0889 0300 0891 addi $AC1.M, #0x0891 // AC1.M += 0x0891
|
||||
088b 1c5f mrr $AR2, $AC1.M // AR2 = AC1.M
|
||||
088c 175f callr $AR2 // (*$AR2)() <-- Need to check where it actually goes
|
||||
088d 00fc 0430 sr @0x0430, $AC0.L // PB.RatioFrac = AC0.L
|
||||
|
||||
// 088f 029f 02d8 jmp 0x02d8
|
||||
GOTO ContinueWithBlock: // in SyncFrame
|
||||
|
Loading…
Reference in New Issue
Block a user