Merge SrcSelect.c, AX.c, Crazy Taxi.txt, and DSP_UC_AX1.txt into new and improved disasm -> DSP/DSP_UC_6A696CE7.txt
Goal is complete/near complete RE of DSP_UC_6A696CE7 (GC AX), and hopefully ROM. From there, seeing the additional changes in other GC AX versions (there are only 4 others, with minor differences), should be "simple". git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4818 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
94570d31f5
commit
d558c534d2
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="9,00"
|
||||
Version="9.00"
|
||||
Name="Plugin_DSP_LLE"
|
||||
ProjectGUID="{3D8156A9-64D1-4C8E-ADBE-1B319030E4A4}"
|
||||
RootNamespace="Plugin_DSP_LLE"
|
||||
|
@ -584,208 +584,132 @@
|
|||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Logging"
|
||||
Name="RE"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\Src\Logging\AXTask.cpp"
|
||||
RelativePath="..\..\..\docs\DSP\DSP_UC_ROM.txt"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Src\Logging\Logging.cpp"
|
||||
RelativePath="..\..\..\docs\DSP\unlockmemcard.ds"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Src\Logging\Logging.h"
|
||||
<Filter
|
||||
Name="AX_GC"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Src\Logging\ReadPBs.cpp"
|
||||
<File
|
||||
RelativePath="..\..\..\docs\DSP\Crazy Taxi.txt"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\docs\DSP\DSP_UC_6A696CE7.txt"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\docs\DSP\DSP_UC_MP2.txt"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="JA_GC"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Src\Logging\UCode_AXStructs.h"
|
||||
<File
|
||||
RelativePath="..\..\..\docs\DSP\DSP_UC_Luigi.txt"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\docs\DSP\DSP_UC_Zelda.txt"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\docs\DSP\wwdsp.c"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|x64"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|x64"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="DebugFast|Win32"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="DebugFast|x64"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\docs\DSP\Zelda.txt"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\docs\DSP\zeldaNotes.txt"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="JA_WII"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Docs"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\..\..\docs\DSP\AX.c"
|
||||
<File
|
||||
RelativePath="..\..\..\docs\DSP\DSP_UC_Pikmin2Wii.txt"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\docs\DSP\DSP_UC_PikminWii.txt"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\docs\DSP\DSP_UC_SuperMarioGalaxy.txt"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\docs\DSP\DSP_UC_Zelda_Wii.txt"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="AX_WII"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
ExcludedFromBuild="true"
|
||||
<File
|
||||
RelativePath="..\..\..\docs\DSP\DSP_UC_AXWii.txt"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|x64"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|x64"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="DebugFast|Win32"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="DebugFast|x64"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\docs\DSP\Crazy Taxi.txt"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\docs\DSP\dsp_rom.txt"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\docs\DSP\DSP_UC_Zelda.txt"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\docs\DSP\SrcSelect_.c"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|x64"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|x64"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="DebugFast|Win32"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="DebugFast|x64"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\docs\DSP\wwdsp.c"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|x64"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|x64"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="DebugFast|Win32"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="DebugFast|x64"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\docs\DSP\Zelda.txt"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\docs\DSP\zeldaNotes.txt"
|
||||
>
|
||||
</File>
|
||||
</File>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="ConfigDialog"
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
#include "Common.h"
|
||||
#include "Hash.h"
|
||||
#include "DSPHost.h"
|
||||
#include "DSPSymbols.h"
|
||||
#include "Tools.h"
|
||||
|
@ -70,21 +71,15 @@ u32 DSPHost_CodeLoaded(const u8 *ptr, int size)
|
|||
u32 crc = GenerateCRC(ptr, size);
|
||||
DumpDSPCode(ptr, size, crc);
|
||||
|
||||
// this crc is comparable with the HLE plugin
|
||||
u32 ector_crc = 0;
|
||||
for (int i = 0; i < size; i++)
|
||||
{
|
||||
ector_crc ^= ptr[i];
|
||||
//let's rol
|
||||
ector_crc = (ector_crc << 3) | (ector_crc >> 29);
|
||||
}
|
||||
// HLE plugin uses this crc method
|
||||
u32 ector_crc = HashEctor(ptr, size);
|
||||
|
||||
DSPSymbols::Clear();
|
||||
|
||||
// Auto load text file - if none just disassemble.
|
||||
|
||||
// TODO: Don't hardcode for Zelda.
|
||||
NOTICE_LOG(DSPLLE, "CRC: %08x", ector_crc);
|
||||
NOTICE_LOG(DSPLLE, "ector_crc: %08x", ector_crc);
|
||||
|
||||
DSPSymbols::Clear();
|
||||
bool success = false;
|
||||
|
@ -92,7 +87,11 @@ u32 DSPHost_CodeLoaded(const u8 *ptr, int size)
|
|||
{
|
||||
case 0x86840740: success = DSPSymbols::ReadAnnotatedAssembly("../../docs/DSP/DSP_UC_Zelda.txt"); break;
|
||||
case 0x42f64ac4: success = DSPSymbols::ReadAnnotatedAssembly("../../docs/DSP/DSP_UC_Luigi.txt"); break;
|
||||
case 0x4e8a8b21: success = DSPSymbols::ReadAnnotatedAssembly("../../docs/DSP/DSP_UC_AX1.txt"); break;
|
||||
case 0x07f88145: success = DSPSymbols::ReadAnnotatedAssembly("../../docs/DSP/DSP_UC_4CB8233B.txt"); break;
|
||||
case 0x3ad3b7ac: success = DSPSymbols::ReadAnnotatedAssembly("../../docs/DSP/DSP_UC_8A7A05E2.txt"); break;
|
||||
case 0x3daf59b9: success = DSPSymbols::ReadAnnotatedAssembly("../../docs/DSP/DSP_UC_D9D066EA.txt"); break;
|
||||
case 0x4e8a8b21: success = DSPSymbols::ReadAnnotatedAssembly("../../docs/DSP/DSP_UC_6A696CE7.txt"); break;
|
||||
case 0xe2136399: success = DSPSymbols::ReadAnnotatedAssembly("../../docs/DSP/DSP_UC_EB79C705.txt"); break;
|
||||
default: success = false; break;
|
||||
}
|
||||
|
||||
|
|
|
@ -17,10 +17,7 @@ files = [
|
|||
"Globals.cpp",
|
||||
"main.cpp",
|
||||
"Tools.cpp",
|
||||
"DSPHost.cpp",
|
||||
"Logging/AXTask.cpp",
|
||||
"Logging/Logging.cpp",
|
||||
"Logging/ReadPBs.cpp",
|
||||
"DSPHost.cpp",
|
||||
]
|
||||
|
||||
if env['HAVE_WX']:
|
||||
|
|
213
docs/DSP/AX.c
213
docs/DSP/AX.c
|
@ -1,213 +0,0 @@
|
|||
//
|
||||
// Pseudo C
|
||||
//
|
||||
|
||||
//
|
||||
// DSP:
|
||||
//
|
||||
|
||||
// Memory USAGE
|
||||
|
||||
|
||||
|
||||
0x0B80 to 0x0C40 CurrentPB
|
||||
|
||||
0x0B87
|
||||
|
||||
0x0E15 SrcSelectFunction // perhaps CMD0 setups some kind of jmp table at this addresses
|
||||
0x0E16 CoefFunction
|
||||
0x0E14 MixCtrlFunction
|
||||
|
||||
0x0e17 TmpBuffer exceptions
|
||||
0x0e18 TmpBuffer exceptions
|
||||
0x0e19 TmpBuffer exceptions
|
||||
|
||||
// instrcution memory
|
||||
0x0B31 to 0x0B33 some kind of JMP-Table to handle srcSelect ???
|
||||
0x0B34 to 0x0B36 some kind of JMP-Table to handle coefSelect ???
|
||||
0x0B11 to 0x0B1F some kind of JMP-Table to handle mixerCtrl ???
|
||||
|
||||
void CMD2()
|
||||
{
|
||||
// 0x1BC
|
||||
int_addrPB = (*r00 << 16) | *(r00+1)
|
||||
DMA_From_Memory(0x0B80, _addrPB, 0xC0); // read first PB to 0x0B80
|
||||
|
||||
// 0x1C7
|
||||
*0x0E08 = 0x0000
|
||||
*0x0E09 = 0x0140
|
||||
*0x0E0A = 0x0280
|
||||
*0x0E0B = 0x0400
|
||||
*0x0E0C = 0x0540
|
||||
*0x0E0D = 0x0680
|
||||
*0x0E0E = 0x07C0
|
||||
*0x0E0F = 0x0900
|
||||
*0x0E10 = 0x0A40
|
||||
|
||||
// 0x1E4
|
||||
WaitForDMATransfer()
|
||||
|
||||
// 0x1E6
|
||||
Addr = (*0x0BA7 << 16) | *0x0BA8
|
||||
DMA_From_Memory(0x03C0, Addr, 0x80); // Copy Update Data to 0x03C0 (AXPBUPDATE dataHi, dataLo)
|
||||
|
||||
// 0x1F4
|
||||
R03 = (*0x0B84) + 0x0B31 // AXPB->srcSelect + 0x0B31 ??? some kind of flag handling ??? SRCSEL can be 0x0 to 0x2
|
||||
AC0.M = *R03
|
||||
*0x0E15 = *AC0.M
|
||||
|
||||
// 0x1FD
|
||||
R03 = (*0x0B85) + 0x0B34 // AXPB->coefSelect + 0x0B34 ??? some kind of flag handling ??? COEF can be 0x0 to 0x2
|
||||
AC0.M = *R03
|
||||
*0x0E16 = *AC0.M
|
||||
|
||||
// 0x206
|
||||
R03 = (*0x0B86) + 0x0B11 // AXPB->mixerCtrl + 0x0B36 ??? some kind of flag handling ??? MIXCTRL can be 0x0 to 0xE
|
||||
AC0.M = *R03
|
||||
*0x0E14 = *AC0.M
|
||||
|
||||
// 0x20F
|
||||
if (*0x0B9B == 0) // AXPBITD->flag (on or off for this voice)
|
||||
{
|
||||
// jmp to 0x23a
|
||||
*0x0E42 = 0x0CE0
|
||||
*0x0E40 = 0x0CE0
|
||||
*0x0E41 = 0x0CE0
|
||||
*0x0E43 = 0x0CE0
|
||||
|
||||
WaitForDMATransfer()
|
||||
}
|
||||
else
|
||||
{
|
||||
// code at 0x216
|
||||
*0x0E40 = *0x0B9E + 0x0CC0 // AXPBITD->shiftL
|
||||
*0x0E41 = *0x0B9F + 0x0CC0 // AXPBITD->shiftR
|
||||
*0x0E42 = 0xCE0
|
||||
*0x0E43 = 0xCE0
|
||||
|
||||
WaitForDMATransfer()
|
||||
|
||||
// 0x22a
|
||||
Addr = (*0x0B9C << 16) | *0x0B9D
|
||||
DMA_From_Memory(0x0CC0, Addr, 0x40); // (AXPBITD->bufferHi << 16 | AXPBITD->bufferLo) -> 0xCC0
|
||||
WaitForDMATransfer()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void CMD0()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
void CMD3()
|
||||
{
|
||||
|
||||
0x0E07 = R00
|
||||
R00 = 0x0BA2 // AXPBUPDATE->updNum
|
||||
R01 = 0x03C0
|
||||
*0x0E04 = 0x05
|
||||
|
||||
AC1 = 0
|
||||
AC0 = 0
|
||||
AX0.H = *R00++ // AXPBUPDATE->updNum[0]
|
||||
AC1.M = 0x0B80
|
||||
|
||||
// 0x256
|
||||
for (i=0; i<AX0.H; i++)
|
||||
{
|
||||
AC0.M = *R01++
|
||||
AC0.M = AC0.M + AC1.M
|
||||
AX1.L = *R01++
|
||||
R02 = AC0.M
|
||||
*R02 = AX1.L
|
||||
}
|
||||
|
||||
// 0x25c
|
||||
R03 = 0x0E05
|
||||
*R03++ = R01
|
||||
*R03++ = R02
|
||||
|
||||
// 0x260
|
||||
AC0.M = *0x0B87 // AXPB->state
|
||||
|
||||
if (AC0.M == 1)
|
||||
{
|
||||
// JMP 0x267 (AX_PB_STATE_RUN)
|
||||
*0x0E1C = *0x0E42
|
||||
|
||||
CALLR *0x0E15 // Load Sample (SrcSelectFunction)
|
||||
|
||||
// 0x270
|
||||
AC0.M = *0xBB3 // AXPBVE->currentDelta (.15 volume at start of frame)
|
||||
AC1.M = *0xBB2 // AXPBVE->currentVolume
|
||||
|
||||
// 0x278
|
||||
AX0.L = AC1.M
|
||||
AC1.M = AC1.M + AC0.M
|
||||
AC0.M = AC0.M << 1
|
||||
|
||||
SET15 // ????
|
||||
|
||||
AX1.H = AC0.M
|
||||
AC0.M = AX0.L
|
||||
|
||||
AX0.L = 0x8000
|
||||
R00 = 0x0E44
|
||||
|
||||
// 0x27f
|
||||
// scale volume table
|
||||
.
|
||||
.
|
||||
.
|
||||
/* for (int i=0; i<32; i++)
|
||||
{
|
||||
*R00++ = AC0.M;
|
||||
prod = AX0.L * AX1.H
|
||||
|
||||
*R00++ = AC1.M;
|
||||
AC0 = AC0 + prod
|
||||
prod = AX0.L * AX1.H
|
||||
|
||||
*R00++ = AC0.M;
|
||||
AC1 = AC1 + prod
|
||||
prod = AX0.L * AX1.H
|
||||
}*/
|
||||
|
||||
// 0x29f
|
||||
*0xBB2 = CurrentVolume
|
||||
|
||||
|
||||
// 0x2a1
|
||||
// mutiply volume with sample
|
||||
.
|
||||
.
|
||||
.
|
||||
|
||||
|
||||
// 0x2ea
|
||||
// Call mixer
|
||||
|
||||
// 0x02f0
|
||||
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
// JMP 0x332
|
||||
.
|
||||
.
|
||||
.
|
||||
.
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// ===============================================================
|
||||
void Func_0x065D()
|
||||
{
|
||||
|
||||
|
||||
}
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -1,226 +0,0 @@
|
|||
|
||||
// Init Hardware PCM decoder
|
||||
|
||||
/*
|
||||
06a3 0082 0bb8 LRI $R02, #0x0bb8
|
||||
06a5 195e LRRI $AC0.M, @$R02
|
||||
06a6 2ed1 SRS @SampleFormat, $AC0.M
|
||||
06a7 195e LRRI $AC0.M, @$R02
|
||||
06a8 2ed4 SRS @ACSAH, $AC0.M
|
||||
06a9 195e LRRI $AC0.M, @$R02
|
||||
06aa 2ed5 SRS @ACSAL, $AC0.M
|
||||
06ab 195e LRRI $AC0.M, @$R02
|
||||
06ac 2ed6 SRS @ACEAH, $AC0.M
|
||||
06ad 195e LRRI $AC0.M, @$R02
|
||||
06ae 2ed7 SRS @ACEAL, $AC0.M
|
||||
06af 195e LRRI $AC0.M, @$R02
|
||||
06b0 2ed8 SRS @ACCAH, $AC0.M
|
||||
06b1 195e LRRI $AC0.M, @$R02
|
||||
06b2 2ed9 SRS @ACCAL, $AC0.M
|
||||
06b3 195e LRRI $AC0.M, @$R02
|
||||
06b4 2ea0 SRS @COEF_A1_0, $AC0.M
|
||||
06b5 195e LRRI $AC0.M, @$R02
|
||||
06b6 2ea1 SRS @COEF_A2_0, $AC0.M
|
||||
06b7 195e LRRI $AC0.M, @$R02
|
||||
06b8 2ea2 SRS @COEF_A1_1, $AC0.M
|
||||
06b9 195e LRRI $AC0.M, @$R02
|
||||
06ba 2ea3 SRS @COEF_A2_1, $AC0.M
|
||||
06bb 195e LRRI $AC0.M, @$R02
|
||||
06bc 2ea4 SRS @COEF_A1_2, $AC0.M
|
||||
06bd 195e LRRI $AC0.M, @$R02
|
||||
06be 2ea5 SRS @COEF_A2_2, $AC0.M
|
||||
06bf 195e LRRI $AC0.M, @$R02
|
||||
06c0 2ea6 SRS @COEF_A1_3, $AC0.M
|
||||
06c1 195e LRRI $AC0.M, @$R02
|
||||
06c2 2ea7 SRS @COEF_A2_3, $AC0.M
|
||||
06c3 195e LRRI $AC0.M, @$R02
|
||||
06c4 2ea8 SRS @COEF_A1_4, $AC0.M
|
||||
06c5 195e LRRI $AC0.M, @$R02
|
||||
06c6 2ea9 SRS @COEF_A2_4, $AC0.M
|
||||
06c7 195e LRRI $AC0.M, @$R02
|
||||
06c8 2eaa SRS @COEF_A1_5, $AC0.M
|
||||
06c9 195e LRRI $AC0.M, @$R02
|
||||
06ca 2eab SRS @COEF_A2_5, $AC0.M
|
||||
06cb 195e LRRI $AC0.M, @$R02
|
||||
06cc 2eac SRS @COEF_A1_6, $AC0.M
|
||||
06cd 195e LRRI $AC0.M, @$R02
|
||||
06ce 2ead SRS @COEF_A2_6, $AC0.M
|
||||
06cf 195e LRRI $AC0.M, @$R02
|
||||
06d0 2eae SRS @COEF_A1_7, $AC0.M
|
||||
06d1 195e LRRI $AC0.M, @$R02
|
||||
06d2 2eaf SRS @COEF_A2_7, $AC0.M
|
||||
06d3 195e LRRI $AC0.M, @$R02
|
||||
06d4 2ede SRS @GAIN, $AC0.M
|
||||
06d5 195e LRRI $AC0.M, @$R02
|
||||
06d6 2eda SRS @pred_scale, $AC0.M
|
||||
06d7 195e LRRI $AC0.M, @$R02
|
||||
06d8 2edb SRS @yn1, $AC0.M
|
||||
06d9 195e LRRI $AC0.M, @$R02
|
||||
06da 2edc SRS @yn2, $AC0.M
|
||||
*/
|
||||
|
||||
/// hmmmmmm
|
||||
/*
|
||||
06db 8c00 CLR15
|
||||
06dc 8a00 M2
|
||||
06dd 8e00 S40
|
||||
*/
|
||||
|
||||
///
|
||||
|
||||
AX0.L = *0xe16
|
||||
AX1.H = ratioHi // sample ratio from AXPBSRC
|
||||
AX1.L = ratioLo // sample ratio from AXPBSRC
|
||||
|
||||
AC0 = 0
|
||||
AC0.L = currentAddressFrac // AXPBSRC
|
||||
|
||||
*0x0e48 = last_samples[0]
|
||||
*0x0e49 = last_samples[1]
|
||||
*0x0e4A = last_samples[2]
|
||||
*0x0e4B = last_samples[3]
|
||||
|
||||
AC1.M = AX1.L
|
||||
ACC = ACC >> 0x05
|
||||
AC1 = AC1 + AC0
|
||||
|
||||
R04 = AC1.M
|
||||
R05 = AC1.L
|
||||
|
||||
AC1 = AC1 + 0xe0 // ?????? AC1 = AC1 - 2097152 (because 0xe0 is converted to signed and shift << 16)
|
||||
AC1 = AC1 >> 16
|
||||
AC1 = -AC1
|
||||
|
||||
R06 = -AC1
|
||||
|
||||
//////////////
|
||||
AC1 = 0
|
||||
AC1.L = R05
|
||||
AC1 = AC1 << 2
|
||||
R05 = AC1.M
|
||||
|
||||
|
||||
// 0x06fc
|
||||
|
||||
AX.0 = 0x1fc
|
||||
AC0 = 0xe48
|
||||
R01 = 0xFFDD
|
||||
R03 = 0x0D80
|
||||
|
||||
// 0x0704
|
||||
for (i=0; i<R04; i++)
|
||||
{
|
||||
AC0 = AC0 + AX1
|
||||
*R03++ = AC0.M
|
||||
|
||||
AC1.M = AC0.L
|
||||
LSR $AC1.M, #0x79
|
||||
AC1 = AC1 & AX0.H
|
||||
AC1 += AX0.L
|
||||
*R03++ = AC1
|
||||
|
||||
*R00++ = *ADPCM_DECODER
|
||||
*R00++ = *ADPCM_DECODER
|
||||
*R00++ = *ADPCM_DECODER
|
||||
*R00++ = *ADPCM_DECODER
|
||||
}
|
||||
|
||||
/*
|
||||
0704 0064 0715 BLOOP $R04, 0x0715
|
||||
0706 1827 LRR $R07, @$R01
|
||||
0707 1b07 SRRI @$R00, $R07
|
||||
0708 4a00 ADDAX $AC0.M, $AX1.L
|
||||
0709 1ffc MRR $AC1.M, $AC0.L
|
||||
070a 1827 LRR $R07, @$R01
|
||||
070b 1b07 SRRI @$R00, $R07
|
||||
070c 1579 LSR $AC1.M, #0x79
|
||||
070d 3500 ANDR $AC1.M, $R00
|
||||
070e 1827 LRR $R07, @$R01
|
||||
070f 1b07 SRRI @$R00, $R07
|
||||
0710 4100 ADDR $AC1.M, $AX0.L
|
||||
0711 1b7e SRRI @$R03, $AC0.M
|
||||
0712 1827 LRR $R07, @$R01
|
||||
0713 1b07 SRRI @$R00, $R07
|
||||
0714 1b7f SRRI @$R03, $AC1.M
|
||||
0715 0000 NOP */
|
||||
|
||||
// 0x0715
|
||||
// prolly copies the "rest"
|
||||
|
||||
for (i=0; i<r05; i++)
|
||||
{
|
||||
R07 = *ADPCM_DECODER
|
||||
*R00++ = R07
|
||||
}
|
||||
|
||||
// 0x71c
|
||||
R03--
|
||||
AC1 = *R03
|
||||
|
||||
/* 071c 0007 DAR $R03
|
||||
071d 187f LRR $AC1.M, @$R03 */
|
||||
|
||||
for (i<0; i<r06; i++)
|
||||
{
|
||||
AC0 = AX1
|
||||
*R03++ = AC1.M
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
071e 0066 0724 BLOOP $R06, 0x0724
|
||||
0720 4a3b ADDAXĚS $AC0.M, $AX1.L : @$R03, $AC1.M
|
||||
0721 1ffc MRR $AC1.M, $AC0.L
|
||||
0722 1579 LSR $AC1.M, #0x79
|
||||
0723 3533 ANDRĚS $AC1.M, $R00 : @$R03, $AC0.M
|
||||
0724 4100 ADDR $AC1.M, $AX0.L
|
||||
*/
|
||||
|
||||
0725 1b7f SRRI @$R03, $AC1.M
|
||||
0726 0004 DAR $R00
|
||||
0727 189f LRRD $AC1.M, @$R00
|
||||
0728 1adf SRRD @$R02, $AC1.M
|
||||
0729 189f LRRD $AC1.M, @$R00
|
||||
072a 1adf SRRD @$R02, $AC1.M
|
||||
072b 189f LRRD $AC1.M, @$R00
|
||||
072c 1adf SRRD @$R02, $AC1.M
|
||||
072d 189f LRRD $AC1.M, @$R00
|
||||
072e 1adf SRRD @$R02, $AC1.M
|
||||
072f 1adc SRRD @$R02, $AC0.L
|
||||
0730 0082 0bd2 LRI $R02, #0x0bd2
|
||||
0732 27dc LRS $AC1.M, @yn2
|
||||
0733 1adf SRRD @$R02, $AC1.M
|
||||
0734 27db LRS $AC1.M, @yn1
|
||||
0735 1adf SRRD @$R02, $AC1.M
|
||||
0736 27da LRS $AC1.M, @pred_scale
|
||||
0737 1adf SRRD @$R02, $AC1.M
|
||||
0738 0082 0bbe LRI $R02, #0x0bbe
|
||||
073a 27d9 LRS $AC1.M, @ACCAL
|
||||
073b 1adf SRRD @$R02, $AC1.M
|
||||
073c 27d8 LRS $AC1.M, @ACCAH
|
||||
073d 1adf SRRD @$R02, $AC1.M
|
||||
|
||||
|
||||
073e 8f00 S16
|
||||
073f 00c1 0e42 LR $R01, @0x0e42
|
||||
0741 0082 0d80 LRI $R02, #0x0d80
|
||||
0743 1940 LRRI $R00, @$R02
|
||||
0744 1943 LRRI $R03, @$R02
|
||||
0745 80f0 NXĚLDX : $AX1.L, $AX1.H, @$R01
|
||||
0746 b8c0 MULXĚLDX $AX0.H, $AX1.H : $AX0.L, $AX0.H, @$R00
|
||||
0747 111f 074f BLOOPI #0x1f, 0x074f
|
||||
0749 a6f0 MULXMVĚLDX $AX0.L, $AX1.L, $AC0.M : $AX1.L, $AX1.H, @$R01
|
||||
074a bcf0 MULXACĚLDX $AX0.H, $AX1.H, $AC0.M : $AX1.L, $AX1.H, @$R01
|
||||
074b 1940 LRRI $R00, @$R02
|
||||
074c 1943 LRRI $R03, @$R02
|
||||
074d bcf0 MULXACĚLDX $AX0.H, $AX1.H, $AC0.M : $AX1.L, $AX1.H, @$R01
|
||||
074e 4ec0 ADDPĚLDX $AC0.M : $AX0.L, $AX0.H, @$R00
|
||||
074f b831 MULXĚS $AX0.H, $AX1.H : @$R01, $AC0.M
|
||||
0750 a6f0 MULXMVĚLDX $AX0.L, $AX1.L, $AC0.M : $AX1.L, $AX1.H, @$R01
|
||||
0751 bcf0 MULXACĚLDX $AX0.H, $AX1.H, $AC0.M : $AX1.L, $AX1.H, @$R01
|
||||
0752 bc00 MULXAC $AX0.H, $AX1.H, $AC0.M
|
||||
0753 4e00 ADDP $AC0.M
|
||||
0754 1b3e SRRI @$R01, $AC0.M
|
||||
0755 00e1 0e42 SR @0x0e42, $R01
|
||||
0757 02df RET
|
||||
|
Loading…
Reference in New Issue