From 316527dd6dc71485495d5efb493f24ff6138b2eb Mon Sep 17 00:00:00 2001 From: "fires.gc" Date: Sat, 11 Oct 2008 08:44:21 +0000 Subject: [PATCH] missing file git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@838 8ced0084-cf51-0410-be5f-012b33b47a6e --- .../Plugin_DSP_LLE/Src/HLE_Functions.cpp | 1561 +++++++++++++++++ 1 file changed, 1561 insertions(+) create mode 100644 Source/Plugins/Plugin_DSP_LLE/Src/HLE_Functions.cpp diff --git a/Source/Plugins/Plugin_DSP_LLE/Src/HLE_Functions.cpp b/Source/Plugins/Plugin_DSP_LLE/Src/HLE_Functions.cpp new file mode 100644 index 0000000000..2e45f1b83b --- /dev/null +++ b/Source/Plugins/Plugin_DSP_LLE/Src/HLE_Functions.cpp @@ -0,0 +1,1561 @@ +#include "stdafx.h" + +#include "globals.h" +#include "gdsp_interpreter.h" +#include "gdsp_memory.h" +#include "gdsp_opcodes_helper.h" + +uint16& R00 = g_dsp.r[0x00]; +uint16& R01 = g_dsp.r[0x01]; +uint16& R02 = g_dsp.r[0x02]; +uint16& R03 = g_dsp.r[0x03]; +uint16& R04 = g_dsp.r[0x04]; +uint16& R05 = g_dsp.r[0x05]; +uint16& R06 = g_dsp.r[0x06]; +uint16& R07 = g_dsp.r[0x07]; +uint16& R08 = g_dsp.r[0x08]; +uint16& R09 = g_dsp.r[0x09]; +uint16& R0A = g_dsp.r[0x0a]; +uint16& R0B = g_dsp.r[0x0b]; +uint16& R0C = g_dsp.r[0x0c]; +uint16& R0D = g_dsp.r[0x0d]; +uint16& R0E = g_dsp.r[0x0e]; +uint16& R0F = g_dsp.r[0x0f]; +uint16& R10 = g_dsp.r[0x10]; +uint16& R11 = g_dsp.r[0x11]; +uint16& R12 = g_dsp.r[0x12]; +uint16& R13 = g_dsp.r[0x13]; +uint16& R14 = g_dsp.r[0x14]; +uint16& R15 = g_dsp.r[0x15]; +uint16& R16 = g_dsp.r[0x16]; +uint16& R17 = g_dsp.r[0x17]; +uint16& R18 = g_dsp.r[0x18]; +uint16& R19 = g_dsp.r[0x19]; +uint16& R1A = g_dsp.r[0x1a]; +uint16& R1B = g_dsp.r[0x1b]; +uint16& R1C = g_dsp.r[0x1c]; +uint16& R1D = g_dsp.r[0x1d]; +uint16& R1E = g_dsp.r[0x1e]; +uint16& R1F = g_dsp.r[0x1f]; + + +uint16& ST0 = g_dsp.r[0x0c]; +uint16& ST1 = g_dsp.r[0x0d]; +uint16& ST2 = g_dsp.r[0x0e]; +uint16& ST3 = g_dsp.r[0x0f]; +uint16& ACH0 = g_dsp.r[0x10]; +uint16& ACH1 = g_dsp.r[0x11]; +uint16& CR = g_dsp.r[0x12]; +uint16& SR = g_dsp.r[0x13]; +uint16& PROD_l = g_dsp.r[0x14]; +uint16& PROD_m1 = g_dsp.r[0x15]; +uint16& PROD_h = g_dsp.r[0x16]; +uint16& PROD_m2 = g_dsp.r[0x17]; +uint16& AX0_l = g_dsp.r[0x18]; +uint16& AX1_l = g_dsp.r[0x19]; +uint16& AX0_h = g_dsp.r[0x1a]; +uint16& AX1_h = g_dsp.r[0x1b]; +uint16& AC0_l = g_dsp.r[0x1c]; +uint16& AC1_l = g_dsp.r[0x1d]; +uint16& AC0_m = g_dsp.r[0x1e]; +uint16& AC1_m = g_dsp.r[0x1f]; + + + +bool WriteDMEM(uint16 addr, uint16 val) +{ + return dsp_dmem_write(addr, val); +} + +uint16 ReadDMEM(uint16 addr) +{ + return dsp_dmem_read(addr); +} + +extern void Update_SR_Register(sint64 _Value); +sint8 GetMultiplyModifier(); + +class ACCU +{ +public: + ACCU(uint8 _num) + { + m_num = _num; + } + + void operator=(sint64 value) + { + dsp_set_long_acc(m_num, value); + } + + void operator<<=(sint64 value) + { + sint64 acc = dsp_get_long_acc(m_num); + acc <<= value; + dsp_set_long_acc(m_num, acc); + } + + void operator>>=(sint64 value) + { + sint64 acc = dsp_get_long_acc(m_num); + acc >>= value; + dsp_set_long_acc(m_num, acc); + } + + void operator+=(sint64 value) + { + sint64 acc = dsp_get_long_acc(m_num); + acc += value; + dsp_set_long_acc(m_num, acc); + } + + operator sint64() + { + return dsp_get_long_acc(m_num); + } + + operator uint64() + { + return dsp_get_long_acc(m_num); + } + +private: + + uint8 m_num; +}; + + +ACCU ACC0(0); +ACCU ACC1(1); + + +class CProd +{ +public: + CProd() + { + } + + void operator=(sint64 value) + { + dsp_set_long_prod(value); + } + + operator sint64() + { + return dsp_get_long_prod(); + } + +private: + +}; + +CProd PROD; + + +u16 HLE_ROM_80E7_81F8() +{ + sint8 MultiplyModifier = GetMultiplyModifier(); +l_80E7: + AX0_h = ReadDMEM(R00); + R00++; + ACC0 = 0; + Update_SR_Register(ACC0); +l_80E8: + AX1_l = ReadDMEM(R01); + R01++; + ACC1 = 0; + Update_SR_Register(ACC1); +l_80E9: + AC0_m = ReadDMEM(R02); + R02++; + PROD = AX0_h * AX1_l * MultiplyModifier; + Update_SR_Register(PROD); +l_80EA: + AC0_l = ReadDMEM(R02); + R02++; + ACC1 = 0; + Update_SR_Register(ACC1); +l_80EB: + AC1_m = ReadDMEM(R02); + R02++; + ACC0 <<= 16; + Update_SR_Register(ACC0); +l_80EC: + AX0_h = ReadDMEM(R00); + R00++; +l_80ED: + AC1_l = ReadDMEM(R02); + R02++; + ACC0 += PROD; + PROD = AX0_h * AX1_l * MultiplyModifier; + Update_SR_Register(PROD); +l_80EE: + ACC0 >>= 16; + Update_SR_Register(ACC0); +l_80EF: + WriteDMEM(R03, AC0_m); + R03++; + ACC1 <<= 16; + Update_SR_Register(ACC1); + AX0_h = ReadDMEM(R00); + R00++; +l_80F0: + WriteDMEM(R03, AC0_l); + R03++; + ACC1 += PROD; + PROD = AX0_h * AX1_l * MultiplyModifier; + Update_SR_Register(PROD); +l_80F1: + AC0_m = ReadDMEM(R02); + R02++; + ACC1 >>= 16; + Update_SR_Register(ACC1); +l_80F2: + AC0_l = ReadDMEM(R02); + R02++; +l_80F3: + WriteDMEM(R03, AC1_m); + R03++; + ACC0 <<= 16; + Update_SR_Register(ACC0); + AX0_h = ReadDMEM(R00); + R00++; +l_80F4: + WriteDMEM(R03, AC1_l); + R03++; + ACC0 += PROD; + PROD = AX0_h * AX1_l * MultiplyModifier; + Update_SR_Register(PROD); +l_80F5: + AC1_m = ReadDMEM(R02); + R02++; + ACC0 >>= 16; + Update_SR_Register(ACC0); +l_80F6: + AC1_l = ReadDMEM(R02); + R02++; +l_80F7: + WriteDMEM(R03, AC0_m); + R03++; + ACC1 <<= 16; + Update_SR_Register(ACC1); + AX0_h = ReadDMEM(R00); + R00++; +l_80F8: + WriteDMEM(R03, AC0_l); + R03++; + ACC1 += PROD; + PROD = AX0_h * AX1_l * MultiplyModifier; + Update_SR_Register(PROD); +l_80F9: + AC0_m = ReadDMEM(R02); + R02++; + ACC1 >>= 16; + Update_SR_Register(ACC1); +l_80FA: + AC0_l = ReadDMEM(R02); + R02++; +l_80FB: + WriteDMEM(R03, AC1_m); + R03++; + ACC0 <<= 16; + Update_SR_Register(ACC0); + AX0_h = ReadDMEM(R00); + R00++; +l_80FC: + WriteDMEM(R03, AC1_l); + R03++; + ACC0 += PROD; + PROD = AX0_h * AX1_l * MultiplyModifier; + Update_SR_Register(PROD); +l_80FD: + AC1_m = ReadDMEM(R02); + R02++; + ACC0 >>= 16; + Update_SR_Register(ACC0); +l_80FE: + AC1_l = ReadDMEM(R02); + R02++; +l_80FF: + WriteDMEM(R03, AC0_m); + R03++; + ACC1 <<= 16; + Update_SR_Register(ACC1); + AX0_h = ReadDMEM(R00); + R00++; +l_8100: + WriteDMEM(R03, AC0_l); + R03++; + ACC1 += PROD; + PROD = AX0_h * AX1_l * MultiplyModifier; + Update_SR_Register(PROD); +l_8101: + AC0_m = ReadDMEM(R02); + R02++; + ACC1 >>= 16; + Update_SR_Register(ACC1); +l_8102: + AC0_l = ReadDMEM(R02); + R02++; +l_8103: + WriteDMEM(R03, AC1_m); + R03++; + ACC0 <<= 16; + Update_SR_Register(ACC0); + AX0_h = ReadDMEM(R00); + R00++; +l_8104: + WriteDMEM(R03, AC1_l); + R03++; + ACC0 += PROD; + PROD = AX0_h * AX1_l * MultiplyModifier; + Update_SR_Register(PROD); +l_8105: + AC1_m = ReadDMEM(R02); + R02++; + ACC0 >>= 16; + Update_SR_Register(ACC0); +l_8106: + AC1_l = ReadDMEM(R02); + R02++; +l_8107: + WriteDMEM(R03, AC0_m); + R03++; + ACC1 <<= 16; + Update_SR_Register(ACC1); + AX0_h = ReadDMEM(R00); + R00++; +l_8108: + WriteDMEM(R03, AC0_l); + R03++; + ACC1 += PROD; + PROD = AX0_h * AX1_l * MultiplyModifier; + Update_SR_Register(PROD); +l_8109: + AC0_m = ReadDMEM(R02); + R02++; + ACC1 >>= 16; + Update_SR_Register(ACC1); +l_810A: + AC0_l = ReadDMEM(R02); + R02++; +l_810B: + WriteDMEM(R03, AC1_m); + R03++; + ACC0 <<= 16; + Update_SR_Register(ACC0); + AX0_h = ReadDMEM(R00); + R00++; +l_810C: + WriteDMEM(R03, AC1_l); + R03++; + ACC0 += PROD; + PROD = AX0_h * AX1_l * MultiplyModifier; + Update_SR_Register(PROD); +l_810D: + AC1_m = ReadDMEM(R02); + R02++; + ACC0 >>= 16; + Update_SR_Register(ACC0); +l_810E: + AC1_l = ReadDMEM(R02); + R02++; +l_810F: + WriteDMEM(R03, AC0_m); + R03++; + ACC1 <<= 16; + Update_SR_Register(ACC1); + AX0_h = ReadDMEM(R00); + R00++; +l_8110: + WriteDMEM(R03, AC0_l); + R03++; + ACC1 += PROD; + PROD = AX0_h * AX1_l * MultiplyModifier; + Update_SR_Register(PROD); +l_8111: + AC0_m = ReadDMEM(R02); + R02++; + ACC1 >>= 16; + Update_SR_Register(ACC1); +l_8112: + AC0_l = ReadDMEM(R02); + R02++; +l_8113: + WriteDMEM(R03, AC1_m); + R03++; + ACC0 <<= 16; + Update_SR_Register(ACC0); + AX0_h = ReadDMEM(R00); + R00++; +l_8114: + WriteDMEM(R03, AC1_l); + R03++; + ACC0 += PROD; + PROD = AX0_h * AX1_l * MultiplyModifier; + Update_SR_Register(PROD); +l_8115: + AC1_m = ReadDMEM(R02); + R02++; + ACC0 >>= 16; + Update_SR_Register(ACC0); +l_8116: + AC1_l = ReadDMEM(R02); + R02++; +l_8117: + WriteDMEM(R03, AC0_m); + R03++; + ACC1 <<= 16; + Update_SR_Register(ACC1); + AX0_h = ReadDMEM(R00); + R00++; +l_8118: + WriteDMEM(R03, AC0_l); + R03++; + ACC1 += PROD; + PROD = AX0_h * AX1_l * MultiplyModifier; + Update_SR_Register(PROD); +l_8119: + AC0_m = ReadDMEM(R02); + R02++; + ACC1 >>= 16; + Update_SR_Register(ACC1); +l_811A: + AC0_l = ReadDMEM(R02); + R02++; +l_811B: + WriteDMEM(R03, AC1_m); + R03++; + ACC0 <<= 16; + Update_SR_Register(ACC0); + AX0_h = ReadDMEM(R00); + R00++; +l_811C: + WriteDMEM(R03, AC1_l); + R03++; + ACC0 += PROD; + PROD = AX0_h * AX1_l * MultiplyModifier; + Update_SR_Register(PROD); +l_811D: + AC1_m = ReadDMEM(R02); + R02++; + ACC0 >>= 16; + Update_SR_Register(ACC0); +l_811E: + AC1_l = ReadDMEM(R02); + R02++; +l_811F: + WriteDMEM(R03, AC0_m); + R03++; + ACC1 <<= 16; + Update_SR_Register(ACC1); + AX0_h = ReadDMEM(R00); + R00++; +l_8120: + WriteDMEM(R03, AC0_l); + R03++; + ACC1 += PROD; + PROD = AX0_h * AX1_l * MultiplyModifier; + Update_SR_Register(PROD); +l_8121: + AC0_m = ReadDMEM(R02); + R02++; + ACC1 >>= 16; + Update_SR_Register(ACC1); +l_8122: + AC0_l = ReadDMEM(R02); + R02++; +l_8123: + WriteDMEM(R03, AC1_m); + R03++; + ACC0 <<= 16; + Update_SR_Register(ACC0); + AX0_h = ReadDMEM(R00); + R00++; +l_8124: + WriteDMEM(R03, AC1_l); + R03++; + ACC0 += PROD; + PROD = AX0_h * AX1_l * MultiplyModifier; + Update_SR_Register(PROD); +l_8125: + AC1_m = ReadDMEM(R02); + R02++; + ACC0 >>= 16; + Update_SR_Register(ACC0); +l_8126: + AC1_l = ReadDMEM(R02); + R02++; +l_8127: + WriteDMEM(R03, AC0_m); + R03++; + ACC1 <<= 16; + Update_SR_Register(ACC1); + AX0_h = ReadDMEM(R00); + R00++; +l_8128: + WriteDMEM(R03, AC0_l); + R03++; + ACC1 += PROD; + PROD = AX0_h * AX1_l * MultiplyModifier; + Update_SR_Register(PROD); +l_8129: + AC0_m = ReadDMEM(R02); + R02++; + ACC1 >>= 16; + Update_SR_Register(ACC1); +l_812A: + AC0_l = ReadDMEM(R02); + R02++; +l_812B: + WriteDMEM(R03, AC1_m); + R03++; + ACC0 <<= 16; + Update_SR_Register(ACC0); + AX0_h = ReadDMEM(R00); + R00++; +l_812C: + WriteDMEM(R03, AC1_l); + R03++; + ACC0 += PROD; + PROD = AX0_h * AX1_l * MultiplyModifier; + Update_SR_Register(PROD); +l_812D: + AC1_m = ReadDMEM(R02); + R02++; + ACC0 >>= 16; + Update_SR_Register(ACC0); +l_812E: + AC1_l = ReadDMEM(R02); + R02++; +l_812F: + WriteDMEM(R03, AC0_m); + R03++; + ACC1 <<= 16; + Update_SR_Register(ACC1); + AX0_h = ReadDMEM(R00); + R00++; +l_8130: + WriteDMEM(R03, AC0_l); + R03++; + ACC1 += PROD; + PROD = AX0_h * AX1_l * MultiplyModifier; + Update_SR_Register(PROD); +l_8131: + AC0_m = ReadDMEM(R02); + R02++; + ACC1 >>= 16; + Update_SR_Register(ACC1); +l_8132: + AC0_l = ReadDMEM(R02); + R02++; +l_8133: + WriteDMEM(R03, AC1_m); + R03++; + ACC0 <<= 16; + Update_SR_Register(ACC0); + AX0_h = ReadDMEM(R00); + R00++; +l_8134: + WriteDMEM(R03, AC1_l); + R03++; + ACC0 += PROD; + PROD = AX0_h * AX1_l * MultiplyModifier; + Update_SR_Register(PROD); +l_8135: + AC1_m = ReadDMEM(R02); + R02++; + ACC0 >>= 16; + Update_SR_Register(ACC0); +l_8136: + AC1_l = ReadDMEM(R02); + R02++; +l_8137: + WriteDMEM(R03, AC0_m); + R03++; + ACC1 <<= 16; + Update_SR_Register(ACC1); + AX0_h = ReadDMEM(R00); + R00++; +l_8138: + WriteDMEM(R03, AC0_l); + R03++; + ACC1 += PROD; + PROD = AX0_h * AX1_l * MultiplyModifier; + Update_SR_Register(PROD); +l_8139: + AC0_m = ReadDMEM(R02); + R02++; + ACC1 >>= 16; + Update_SR_Register(ACC1); +l_813A: + AC0_l = ReadDMEM(R02); + R02++; +l_813B: + WriteDMEM(R03, AC1_m); + R03++; + ACC0 <<= 16; + Update_SR_Register(ACC0); + AX0_h = ReadDMEM(R00); + R00++; +l_813C: + WriteDMEM(R03, AC1_l); + R03++; + ACC0 += PROD; + PROD = AX0_h * AX1_l * MultiplyModifier; + Update_SR_Register(PROD); +l_813D: + AC1_m = ReadDMEM(R02); + R02++; + ACC0 >>= 16; + Update_SR_Register(ACC0); +l_813E: + AC1_l = ReadDMEM(R02); + R02++; +l_813F: + WriteDMEM(R03, AC0_m); + R03++; + ACC1 <<= 16; + Update_SR_Register(ACC1); + AX0_h = ReadDMEM(R00); + R00++; +l_8140: + WriteDMEM(R03, AC0_l); + R03++; + ACC1 += PROD; + PROD = AX0_h * AX1_l * MultiplyModifier; + Update_SR_Register(PROD); +l_8141: + AC0_m = ReadDMEM(R02); + R02++; + ACC1 >>= 16; + Update_SR_Register(ACC1); +l_8142: + AC0_l = ReadDMEM(R02); + R02++; +l_8143: + WriteDMEM(R03, AC1_m); + R03++; + ACC0 <<= 16; + Update_SR_Register(ACC0); + AX0_h = ReadDMEM(R00); + R00++; +l_8144: + WriteDMEM(R03, AC1_l); + R03++; + ACC0 += PROD; + PROD = AX0_h * AX1_l * MultiplyModifier; + Update_SR_Register(PROD); +l_8145: + AC1_m = ReadDMEM(R02); + R02++; + ACC0 >>= 16; + Update_SR_Register(ACC0); +l_8146: + AC1_l = ReadDMEM(R02); + R02++; +l_8147: + WriteDMEM(R03, AC0_m); + R03++; + ACC1 <<= 16; + Update_SR_Register(ACC1); + AX0_h = ReadDMEM(R00); + R00++; +l_8148: + WriteDMEM(R03, AC0_l); + R03++; + ACC1 += PROD; + PROD = AX0_h * AX1_l * MultiplyModifier; + Update_SR_Register(PROD); +l_8149: + AC0_m = ReadDMEM(R02); + R02++; + ACC1 >>= 16; + Update_SR_Register(ACC1); +l_814A: + AC0_l = ReadDMEM(R02); + R02++; +l_814B: + WriteDMEM(R03, AC1_m); + R03++; + ACC0 <<= 16; + Update_SR_Register(ACC0); + AX0_h = ReadDMEM(R00); + R00++; +l_814C: + WriteDMEM(R03, AC1_l); + R03++; + ACC0 += PROD; + PROD = AX0_h * AX1_l * MultiplyModifier; + Update_SR_Register(PROD); +l_814D: + AC1_m = ReadDMEM(R02); + R02++; + ACC0 >>= 16; + Update_SR_Register(ACC0); +l_814E: + AC1_l = ReadDMEM(R02); + R02++; +l_814F: + WriteDMEM(R03, AC0_m); + R03++; + ACC1 <<= 16; + Update_SR_Register(ACC1); + AX0_h = ReadDMEM(R00); + R00++; +l_8150: + WriteDMEM(R03, AC0_l); + R03++; + ACC1 += PROD; + PROD = AX0_h * AX1_l * MultiplyModifier; + Update_SR_Register(PROD); +l_8151: + AC0_m = ReadDMEM(R02); + R02++; + ACC1 >>= 16; + Update_SR_Register(ACC1); +l_8152: + AC0_l = ReadDMEM(R02); + R02++; +l_8153: + WriteDMEM(R03, AC1_m); + R03++; + ACC0 <<= 16; + Update_SR_Register(ACC0); + AX0_h = ReadDMEM(R00); + R00++; +l_8154: + WriteDMEM(R03, AC1_l); + R03++; + ACC0 += PROD; + PROD = AX0_h * AX1_l * MultiplyModifier; + Update_SR_Register(PROD); +l_8155: + AC1_m = ReadDMEM(R02); + R02++; + ACC0 >>= 16; + Update_SR_Register(ACC0); +l_8156: + AC1_l = ReadDMEM(R02); + R02++; +l_8157: + WriteDMEM(R03, AC0_m); + R03++; + ACC1 <<= 16; + Update_SR_Register(ACC1); + AX0_h = ReadDMEM(R00); + R00++; +l_8158: + WriteDMEM(R03, AC0_l); + R03++; + ACC1 += PROD; + PROD = AX0_h * AX1_l * MultiplyModifier; + Update_SR_Register(PROD); +l_8159: + AC0_m = ReadDMEM(R02); + R02++; + ACC1 >>= 16; + Update_SR_Register(ACC1); +l_815A: + AC0_l = ReadDMEM(R02); + R02++; +l_815B: + WriteDMEM(R03, AC1_m); + R03++; + ACC0 <<= 16; + Update_SR_Register(ACC0); + AX0_h = ReadDMEM(R00); + R00++; +l_815C: + WriteDMEM(R03, AC1_l); + R03++; + ACC0 += PROD; + PROD = AX0_h * AX1_l * MultiplyModifier; + Update_SR_Register(PROD); +l_815D: + AC1_m = ReadDMEM(R02); + R02++; + ACC0 >>= 16; + Update_SR_Register(ACC0); +l_815E: + AC1_l = ReadDMEM(R02); + R02++; +l_815F: + WriteDMEM(R03, AC0_m); + R03++; + ACC1 <<= 16; + Update_SR_Register(ACC1); + AX0_h = ReadDMEM(R00); + R00++; +l_8160: + WriteDMEM(R03, AC0_l); + R03++; + ACC1 += PROD; + PROD = AX0_h * AX1_l * MultiplyModifier; + Update_SR_Register(PROD); +l_8161: + AC0_m = ReadDMEM(R02); + R02++; + ACC1 >>= 16; + Update_SR_Register(ACC1); +l_8162: + AC0_l = ReadDMEM(R02); + R02++; +l_8163: + WriteDMEM(R03, AC1_m); + R03++; + ACC0 <<= 16; + Update_SR_Register(ACC0); + AX0_h = ReadDMEM(R00); + R00++; +l_8164: + WriteDMEM(R03, AC1_l); + R03++; + ACC0 += PROD; + PROD = AX0_h * AX1_l * MultiplyModifier; + Update_SR_Register(PROD); +l_8165: + AC1_m = ReadDMEM(R02); + R02++; + ACC0 >>= 16; + Update_SR_Register(ACC0); +l_8166: + AC1_l = ReadDMEM(R02); + R02++; +l_8167: + WriteDMEM(R03, AC0_m); + R03++; + ACC1 <<= 16; + Update_SR_Register(ACC1); + AX0_h = ReadDMEM(R00); + R00++; +l_8168: + WriteDMEM(R03, AC0_l); + R03++; +l_8169: + ACC0 = PROD; +l_816A: + AX0_l = AC0_m; + ACC1 += PROD; + PROD = AX0_h * AX1_l * MultiplyModifier; + Update_SR_Register(PROD); +l_816B: + R01++; + ACC1 >>= 16; + Update_SR_Register(ACC1); +l_816C: + WriteDMEM(R03, AC1_m); + R03++; +l_816D: + WriteDMEM(R03, AC1_l); + R03++; + ACC0 = 0; + Update_SR_Register(ACC0); +l_816E: + R00 = R04; +l_816F: + R02 = R05; +l_8170: + R03 = R02; +l_8171: + AX0_h = ReadDMEM(R00); + R00++; + ACC0 = 0; + Update_SR_Register(ACC0); +l_8172: + AX1_l = ReadDMEM(R01); + R01++; + ACC1 = 0; + Update_SR_Register(ACC1); +l_8173: + AC0_m = ReadDMEM(R02); + R02++; + PROD = AX0_h * AX1_l * MultiplyModifier; + Update_SR_Register(PROD); +l_8174: + AC0_l = ReadDMEM(R02); + R02++; + ACC1 = 0; + Update_SR_Register(ACC1); +l_8175: + AC1_m = ReadDMEM(R02); + R02++; + ACC0 <<= 16; + Update_SR_Register(ACC0); +l_8176: + AX0_h = ReadDMEM(R00); + R00++; +l_8177: + AC1_l = ReadDMEM(R02); + R02++; + ACC0 += PROD; + PROD = AX0_h * AX1_l * MultiplyModifier; + Update_SR_Register(PROD); +l_8178: + ACC0 >>= 16; + Update_SR_Register(ACC0); +l_8179: + WriteDMEM(R03, AC0_m); + R03++; + ACC1 <<= 16; + Update_SR_Register(ACC1); + AX0_h = ReadDMEM(R00); + R00++; +l_817A: + WriteDMEM(R03, AC0_l); + R03++; + ACC1 += PROD; + PROD = AX0_h * AX1_l * MultiplyModifier; + Update_SR_Register(PROD); +l_817B: + AC0_m = ReadDMEM(R02); + R02++; + ACC1 >>= 16; + Update_SR_Register(ACC1); +l_817C: + AC0_l = ReadDMEM(R02); + R02++; +l_817D: + WriteDMEM(R03, AC1_m); + R03++; + ACC0 <<= 16; + Update_SR_Register(ACC0); + AX0_h = ReadDMEM(R00); + R00++; +l_817E: + WriteDMEM(R03, AC1_l); + R03++; + ACC0 += PROD; + PROD = AX0_h * AX1_l * MultiplyModifier; + Update_SR_Register(PROD); +l_817F: + AC1_m = ReadDMEM(R02); + R02++; + ACC0 >>= 16; + Update_SR_Register(ACC0); +l_8180: + AC1_l = ReadDMEM(R02); + R02++; +l_8181: + WriteDMEM(R03, AC0_m); + R03++; + ACC1 <<= 16; + Update_SR_Register(ACC1); + AX0_h = ReadDMEM(R00); + R00++; +l_8182: + WriteDMEM(R03, AC0_l); + R03++; + ACC1 += PROD; + PROD = AX0_h * AX1_l * MultiplyModifier; + Update_SR_Register(PROD); +l_8183: + AC0_m = ReadDMEM(R02); + R02++; + ACC1 >>= 16; + Update_SR_Register(ACC1); +l_8184: + AC0_l = ReadDMEM(R02); + R02++; +l_8185: + WriteDMEM(R03, AC1_m); + R03++; + ACC0 <<= 16; + Update_SR_Register(ACC0); + AX0_h = ReadDMEM(R00); + R00++; +l_8186: + WriteDMEM(R03, AC1_l); + R03++; + ACC0 += PROD; + PROD = AX0_h * AX1_l * MultiplyModifier; + Update_SR_Register(PROD); +l_8187: + AC1_m = ReadDMEM(R02); + R02++; + ACC0 >>= 16; + Update_SR_Register(ACC0); +l_8188: + AC1_l = ReadDMEM(R02); + R02++; +l_8189: + WriteDMEM(R03, AC0_m); + R03++; + ACC1 <<= 16; + Update_SR_Register(ACC1); + AX0_h = ReadDMEM(R00); + R00++; +l_818A: + WriteDMEM(R03, AC0_l); + R03++; + ACC1 += PROD; + PROD = AX0_h * AX1_l * MultiplyModifier; + Update_SR_Register(PROD); +l_818B: + AC0_m = ReadDMEM(R02); + R02++; + ACC1 >>= 16; + Update_SR_Register(ACC1); +l_818C: + AC0_l = ReadDMEM(R02); + R02++; +l_818D: + WriteDMEM(R03, AC1_m); + R03++; + ACC0 <<= 16; + Update_SR_Register(ACC0); + AX0_h = ReadDMEM(R00); + R00++; +l_818E: + WriteDMEM(R03, AC1_l); + R03++; + ACC0 += PROD; + PROD = AX0_h * AX1_l * MultiplyModifier; + Update_SR_Register(PROD); +l_818F: + AC1_m = ReadDMEM(R02); + R02++; + ACC0 >>= 16; + Update_SR_Register(ACC0); +l_8190: + AC1_l = ReadDMEM(R02); + R02++; +l_8191: + WriteDMEM(R03, AC0_m); + R03++; + ACC1 <<= 16; + Update_SR_Register(ACC1); + AX0_h = ReadDMEM(R00); + R00++; +l_8192: + WriteDMEM(R03, AC0_l); + R03++; + ACC1 += PROD; + PROD = AX0_h * AX1_l * MultiplyModifier; + Update_SR_Register(PROD); +l_8193: + AC0_m = ReadDMEM(R02); + R02++; + ACC1 >>= 16; + Update_SR_Register(ACC1); +l_8194: + AC0_l = ReadDMEM(R02); + R02++; +l_8195: + WriteDMEM(R03, AC1_m); + R03++; + ACC0 <<= 16; + Update_SR_Register(ACC0); + AX0_h = ReadDMEM(R00); + R00++; +l_8196: + WriteDMEM(R03, AC1_l); + R03++; + ACC0 += PROD; + PROD = AX0_h * AX1_l * MultiplyModifier; + Update_SR_Register(PROD); +l_8197: + AC1_m = ReadDMEM(R02); + R02++; + ACC0 >>= 16; + Update_SR_Register(ACC0); +l_8198: + AC1_l = ReadDMEM(R02); + R02++; +l_8199: + WriteDMEM(R03, AC0_m); + R03++; + ACC1 <<= 16; + Update_SR_Register(ACC1); + AX0_h = ReadDMEM(R00); + R00++; +l_819A: + WriteDMEM(R03, AC0_l); + R03++; + ACC1 += PROD; + PROD = AX0_h * AX1_l * MultiplyModifier; + Update_SR_Register(PROD); +l_819B: + AC0_m = ReadDMEM(R02); + R02++; + ACC1 >>= 16; + Update_SR_Register(ACC1); +l_819C: + AC0_l = ReadDMEM(R02); + R02++; +l_819D: + WriteDMEM(R03, AC1_m); + R03++; + ACC0 <<= 16; + Update_SR_Register(ACC0); + AX0_h = ReadDMEM(R00); + R00++; +l_819E: + WriteDMEM(R03, AC1_l); + R03++; + ACC0 += PROD; + PROD = AX0_h * AX1_l * MultiplyModifier; + Update_SR_Register(PROD); +l_819F: + AC1_m = ReadDMEM(R02); + R02++; + ACC0 >>= 16; + Update_SR_Register(ACC0); +l_81A0: + AC1_l = ReadDMEM(R02); + R02++; +l_81A1: + WriteDMEM(R03, AC0_m); + R03++; + ACC1 <<= 16; + Update_SR_Register(ACC1); + AX0_h = ReadDMEM(R00); + R00++; +l_81A2: + WriteDMEM(R03, AC0_l); + R03++; + ACC1 += PROD; + PROD = AX0_h * AX1_l * MultiplyModifier; + Update_SR_Register(PROD); +l_81A3: + AC0_m = ReadDMEM(R02); + R02++; + ACC1 >>= 16; + Update_SR_Register(ACC1); +l_81A4: + AC0_l = ReadDMEM(R02); + R02++; +l_81A5: + WriteDMEM(R03, AC1_m); + R03++; + ACC0 <<= 16; + Update_SR_Register(ACC0); + AX0_h = ReadDMEM(R00); + R00++; +l_81A6: + WriteDMEM(R03, AC1_l); + R03++; + ACC0 += PROD; + PROD = AX0_h * AX1_l * MultiplyModifier; + Update_SR_Register(PROD); +l_81A7: + AC1_m = ReadDMEM(R02); + R02++; + ACC0 >>= 16; + Update_SR_Register(ACC0); +l_81A8: + AC1_l = ReadDMEM(R02); + R02++; +l_81A9: + WriteDMEM(R03, AC0_m); + R03++; + ACC1 <<= 16; + Update_SR_Register(ACC1); + AX0_h = ReadDMEM(R00); + R00++; +l_81AA: + WriteDMEM(R03, AC0_l); + R03++; + ACC1 += PROD; + PROD = AX0_h * AX1_l * MultiplyModifier; + Update_SR_Register(PROD); +l_81AB: + AC0_m = ReadDMEM(R02); + R02++; + ACC1 >>= 16; + Update_SR_Register(ACC1); +l_81AC: + AC0_l = ReadDMEM(R02); + R02++; +l_81AD: + WriteDMEM(R03, AC1_m); + R03++; + ACC0 <<= 16; + Update_SR_Register(ACC0); + AX0_h = ReadDMEM(R00); + R00++; +l_81AE: + WriteDMEM(R03, AC1_l); + R03++; + ACC0 += PROD; + PROD = AX0_h * AX1_l * MultiplyModifier; + Update_SR_Register(PROD); +l_81AF: + AC1_m = ReadDMEM(R02); + R02++; + ACC0 >>= 16; + Update_SR_Register(ACC0); +l_81B0: + AC1_l = ReadDMEM(R02); + R02++; +l_81B1: + WriteDMEM(R03, AC0_m); + R03++; + ACC1 <<= 16; + Update_SR_Register(ACC1); + AX0_h = ReadDMEM(R00); + R00++; +l_81B2: + WriteDMEM(R03, AC0_l); + R03++; + ACC1 += PROD; + PROD = AX0_h * AX1_l * MultiplyModifier; + Update_SR_Register(PROD); +l_81B3: + AC0_m = ReadDMEM(R02); + R02++; + ACC1 >>= 16; + Update_SR_Register(ACC1); +l_81B4: + AC0_l = ReadDMEM(R02); + R02++; +l_81B5: + WriteDMEM(R03, AC1_m); + R03++; + ACC0 <<= 16; + Update_SR_Register(ACC0); + AX0_h = ReadDMEM(R00); + R00++; +l_81B6: + WriteDMEM(R03, AC1_l); + R03++; + ACC0 += PROD; + PROD = AX0_h * AX1_l * MultiplyModifier; + Update_SR_Register(PROD); +l_81B7: + AC1_m = ReadDMEM(R02); + R02++; + ACC0 >>= 16; + Update_SR_Register(ACC0); +l_81B8: + AC1_l = ReadDMEM(R02); + R02++; +l_81B9: + WriteDMEM(R03, AC0_m); + R03++; + ACC1 <<= 16; + Update_SR_Register(ACC1); + AX0_h = ReadDMEM(R00); + R00++; +l_81BA: + WriteDMEM(R03, AC0_l); + R03++; + ACC1 += PROD; + PROD = AX0_h * AX1_l * MultiplyModifier; + Update_SR_Register(PROD); +l_81BB: + AC0_m = ReadDMEM(R02); + R02++; + ACC1 >>= 16; + Update_SR_Register(ACC1); +l_81BC: + AC0_l = ReadDMEM(R02); + R02++; +l_81BD: + WriteDMEM(R03, AC1_m); + R03++; + ACC0 <<= 16; + Update_SR_Register(ACC0); + AX0_h = ReadDMEM(R00); + R00++; +l_81BE: + WriteDMEM(R03, AC1_l); + R03++; + ACC0 += PROD; + PROD = AX0_h * AX1_l * MultiplyModifier; + Update_SR_Register(PROD); +l_81BF: + AC1_m = ReadDMEM(R02); + R02++; + ACC0 >>= 16; + Update_SR_Register(ACC0); +l_81C0: + AC1_l = ReadDMEM(R02); + R02++; +l_81C1: + WriteDMEM(R03, AC0_m); + R03++; + ACC1 <<= 16; + Update_SR_Register(ACC1); + AX0_h = ReadDMEM(R00); + R00++; +l_81C2: + WriteDMEM(R03, AC0_l); + R03++; + ACC1 += PROD; + PROD = AX0_h * AX1_l * MultiplyModifier; + Update_SR_Register(PROD); +l_81C3: + AC0_m = ReadDMEM(R02); + R02++; + ACC1 >>= 16; + Update_SR_Register(ACC1); +l_81C4: + AC0_l = ReadDMEM(R02); + R02++; +l_81C5: + WriteDMEM(R03, AC1_m); + R03++; + ACC0 <<= 16; + Update_SR_Register(ACC0); + AX0_h = ReadDMEM(R00); + R00++; +l_81C6: + WriteDMEM(R03, AC1_l); + R03++; + ACC0 += PROD; + PROD = AX0_h * AX1_l * MultiplyModifier; + Update_SR_Register(PROD); +l_81C7: + AC1_m = ReadDMEM(R02); + R02++; + ACC0 >>= 16; + Update_SR_Register(ACC0); +l_81C8: + AC1_l = ReadDMEM(R02); + R02++; +l_81C9: + WriteDMEM(R03, AC0_m); + R03++; + ACC1 <<= 16; + Update_SR_Register(ACC1); + AX0_h = ReadDMEM(R00); + R00++; +l_81CA: + WriteDMEM(R03, AC0_l); + R03++; + ACC1 += PROD; + PROD = AX0_h * AX1_l * MultiplyModifier; + Update_SR_Register(PROD); +l_81CB: + AC0_m = ReadDMEM(R02); + R02++; + ACC1 >>= 16; + Update_SR_Register(ACC1); +l_81CC: + AC0_l = ReadDMEM(R02); + R02++; +l_81CD: + WriteDMEM(R03, AC1_m); + R03++; + ACC0 <<= 16; + Update_SR_Register(ACC0); + AX0_h = ReadDMEM(R00); + R00++; +l_81CE: + WriteDMEM(R03, AC1_l); + R03++; + ACC0 += PROD; + PROD = AX0_h * AX1_l * MultiplyModifier; + Update_SR_Register(PROD); +l_81CF: + AC1_m = ReadDMEM(R02); + R02++; + ACC0 >>= 16; + Update_SR_Register(ACC0); +l_81D0: + AC1_l = ReadDMEM(R02); + R02++; +l_81D1: + WriteDMEM(R03, AC0_m); + R03++; + ACC1 <<= 16; + Update_SR_Register(ACC1); + AX0_h = ReadDMEM(R00); + R00++; +l_81D2: + WriteDMEM(R03, AC0_l); + R03++; + ACC1 += PROD; + PROD = AX0_h * AX1_l * MultiplyModifier; + Update_SR_Register(PROD); +l_81D3: + AC0_m = ReadDMEM(R02); + R02++; + ACC1 >>= 16; + Update_SR_Register(ACC1); +l_81D4: + AC0_l = ReadDMEM(R02); + R02++; +l_81D5: + WriteDMEM(R03, AC1_m); + R03++; + ACC0 <<= 16; + Update_SR_Register(ACC0); + AX0_h = ReadDMEM(R00); + R00++; +l_81D6: + WriteDMEM(R03, AC1_l); + R03++; + ACC0 += PROD; + PROD = AX0_h * AX1_l * MultiplyModifier; + Update_SR_Register(PROD); +l_81D7: + AC1_m = ReadDMEM(R02); + R02++; + ACC0 >>= 16; + Update_SR_Register(ACC0); +l_81D8: + AC1_l = ReadDMEM(R02); + R02++; +l_81D9: + WriteDMEM(R03, AC0_m); + R03++; + ACC1 <<= 16; + Update_SR_Register(ACC1); + AX0_h = ReadDMEM(R00); + R00++; +l_81DA: + WriteDMEM(R03, AC0_l); + R03++; + ACC1 += PROD; + PROD = AX0_h * AX1_l * MultiplyModifier; + Update_SR_Register(PROD); +l_81DB: + AC0_m = ReadDMEM(R02); + R02++; + ACC1 >>= 16; + Update_SR_Register(ACC1); +l_81DC: + AC0_l = ReadDMEM(R02); + R02++; +l_81DD: + WriteDMEM(R03, AC1_m); + R03++; + ACC0 <<= 16; + Update_SR_Register(ACC0); + AX0_h = ReadDMEM(R00); + R00++; +l_81DE: + WriteDMEM(R03, AC1_l); + R03++; + ACC0 += PROD; + PROD = AX0_h * AX1_l * MultiplyModifier; + Update_SR_Register(PROD); +l_81DF: + AC1_m = ReadDMEM(R02); + R02++; + ACC0 >>= 16; + Update_SR_Register(ACC0); +l_81E0: + AC1_l = ReadDMEM(R02); + R02++; +l_81E1: + WriteDMEM(R03, AC0_m); + R03++; + ACC1 <<= 16; + Update_SR_Register(ACC1); + AX0_h = ReadDMEM(R00); + R00++; +l_81E2: + WriteDMEM(R03, AC0_l); + R03++; + ACC1 += PROD; + PROD = AX0_h * AX1_l * MultiplyModifier; + Update_SR_Register(PROD); +l_81E3: + AC0_m = ReadDMEM(R02); + R02++; + ACC1 >>= 16; + Update_SR_Register(ACC1); +l_81E4: + AC0_l = ReadDMEM(R02); + R02++; +l_81E5: + WriteDMEM(R03, AC1_m); + R03++; + ACC0 <<= 16; + Update_SR_Register(ACC0); + AX0_h = ReadDMEM(R00); + R00++; +l_81E6: + WriteDMEM(R03, AC1_l); + R03++; + ACC0 += PROD; + PROD = AX0_h * AX1_l * MultiplyModifier; + Update_SR_Register(PROD); +l_81E7: + AC1_m = ReadDMEM(R02); + R02++; + ACC0 >>= 16; + Update_SR_Register(ACC0); +l_81E8: + AC1_l = ReadDMEM(R02); + R02++; +l_81E9: + WriteDMEM(R03, AC0_m); + R03++; + ACC1 <<= 16; + Update_SR_Register(ACC1); + AX0_h = ReadDMEM(R00); + R00++; +l_81EA: + WriteDMEM(R03, AC0_l); + R03++; + ACC1 += PROD; + PROD = AX0_h * AX1_l * MultiplyModifier; + Update_SR_Register(PROD); +l_81EB: + AC0_m = ReadDMEM(R02); + R02++; + ACC1 >>= 16; + Update_SR_Register(ACC1); +l_81EC: + AC0_l = ReadDMEM(R02); + R02++; +l_81ED: + WriteDMEM(R03, AC1_m); + R03++; + ACC0 <<= 16; + Update_SR_Register(ACC0); + AX0_h = ReadDMEM(R00); + R00++; +l_81EE: + WriteDMEM(R03, AC1_l); + R03++; + ACC0 += PROD; + PROD = AX0_h * AX1_l * MultiplyModifier; + Update_SR_Register(PROD); +l_81EF: + AC1_m = ReadDMEM(R02); + R02++; + ACC0 >>= 16; + Update_SR_Register(ACC0); +l_81F0: + AC1_l = ReadDMEM(R02); + R02++; +l_81F1: + WriteDMEM(R03, AC0_m); + R03++; + ACC1 <<= 16; + Update_SR_Register(ACC1); + AX0_h = ReadDMEM(R00); + R00++; +l_81F2: + WriteDMEM(R03, AC0_l); + R03++; +l_81F3: + ACC0 = PROD; +l_81F4: + AX1_h = AC0_m; + ACC1 += PROD; + PROD = AX0_h * AX1_l * MultiplyModifier; + Update_SR_Register(PROD); +l_81F5: + R01++; + ACC1 >>= 16; + Update_SR_Register(ACC1); +l_81F6: + WriteDMEM(R03, AC1_m); + R03++; +l_81F7: + WriteDMEM(R03, AC1_l); + R03++; + ACC0 = 0; + Update_SR_Register(ACC0); +l_81F8: +//missing: dsp_opc_ret; + + return 0x81f8; +} \ No newline at end of file