DSP: Namespace remaining un-namespaced DSP code
This commit is contained in:
1 parent
a2e191649d
commit
3eb25cea6f
70 files changed
+672
-414
No files matched your search
@@ -22,15 +22,14 @@
|
||||
// registers will wrap in odd ways, dictated by the corresponding wrapping
|
||||
// register, WR0-3.
|
||||
|
||||
// Needs comments.
|
||||
namespace DSP
|
||||
{
|
||||
inline static void writeToBackLog(int i, int idx, u16 value)
|
||||
{
|
||||
writeBackLog[i] = value;
|
||||
writeBackLogIdx[i] = idx;
|
||||
}
|
||||
|
||||
namespace DSP
|
||||
{
|
||||
namespace Interpreter
|
||||
{
|
||||
namespace Ext
|
||||
@@ -500,7 +499,6 @@ void nop(const UDSPInstruction opc)
|
||||
|
||||
} // namespace Ext
|
||||
} // namespace Interpeter
|
||||
} // namespace DSP
|
||||
|
||||
// The ext ops are calculated in parallel with the actual op. That means that
|
||||
// both the main op and the ext op see the same register state as input. The
|
||||
@@ -518,9 +516,9 @@ void applyWriteBackLog()
|
||||
{
|
||||
u16 value = writeBackLog[i];
|
||||
#ifdef PRECISE_BACKLOG
|
||||
value |= DSP::Interpreter::dsp_op_read_reg(writeBackLogIdx[i]);
|
||||
value |= Interpreter::dsp_op_read_reg(writeBackLogIdx[i]);
|
||||
#endif
|
||||
DSP::Interpreter::dsp_op_write_reg(writeBackLogIdx[i], value);
|
||||
Interpreter::dsp_op_write_reg(writeBackLogIdx[i], value);
|
||||
|
||||
// Clear back log
|
||||
writeBackLogIdx[i] = -1;
|
||||
@@ -541,7 +539,7 @@ void zeroWriteBackLog()
|
||||
// infinitive loops
|
||||
for (int i = 0; writeBackLogIdx[i] != -1; i++)
|
||||
{
|
||||
DSP::Interpreter::dsp_op_write_reg(writeBackLogIdx[i], 0);
|
||||
Interpreter::dsp_op_write_reg(writeBackLogIdx[i], 0);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -563,7 +561,8 @@ void zeroWriteBackLogPreserveAcc(u8 acc)
|
||||
(writeBackLogIdx[i] == DSP_REG_ACH1)))
|
||||
continue;
|
||||
|
||||
DSP::Interpreter::dsp_op_write_reg(writeBackLogIdx[i], 0);
|
||||
Interpreter::dsp_op_write_reg(writeBackLogIdx[i], 0);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
} // namespace DSP
|
||||
@@ -102,7 +102,7 @@ void Step()
|
||||
u16 opc = dsp_fetch_code();
|
||||
ExecuteInstruction(UDSPInstruction(opc));
|
||||
|
||||
if (DSPAnalyzer::GetCodeFlags(static_cast<u16>(g_dsp.pc - 1u)) & DSPAnalyzer::CODE_LOOP_END)
|
||||
if (Analyzer::GetCodeFlags(static_cast<u16>(g_dsp.pc - 1u)) & Analyzer::CODE_LOOP_END)
|
||||
HandleLoop();
|
||||
}
|
||||
|
||||
@@ -160,7 +160,7 @@ int RunCyclesDebug(int cycles)
|
||||
return cycles;
|
||||
}
|
||||
// Idle skipping.
|
||||
if (DSPAnalyzer::GetCodeFlags(g_dsp.pc) & DSPAnalyzer::CODE_IDLE_SKIP)
|
||||
if (Analyzer::GetCodeFlags(g_dsp.pc) & Analyzer::CODE_IDLE_SKIP)
|
||||
return 0;
|
||||
Step();
|
||||
cycles--;
|
||||
@@ -210,7 +210,7 @@ int RunCycles(int cycles)
|
||||
if (g_dsp.cr & CR_HALT)
|
||||
return 0;
|
||||
// Idle skipping.
|
||||
if (DSPAnalyzer::GetCodeFlags(g_dsp.pc) & DSPAnalyzer::CODE_IDLE_SKIP)
|
||||
if (Analyzer::GetCodeFlags(g_dsp.pc) & Analyzer::CODE_IDLE_SKIP)
|
||||
return 0;
|
||||
Step();
|
||||
cycles--;
|
||||
|
||||
Reference in new issue
Block a user