2010-04-09 19:28:18 +00:00
|
|
|
#include "DSPJitTester.h"
|
|
|
|
|
|
|
|
void nx_dr()
|
|
|
|
{
|
2010-04-13 19:31:31 +00:00
|
|
|
DSPJitTester tester(0x8000, 0x0004);
|
2010-04-14 06:19:07 +00:00
|
|
|
tester.AddTestData(DSP_REG_AR0);
|
2010-04-13 19:31:31 +00:00
|
|
|
tester.AddTestData(DSP_REG_WR0);
|
|
|
|
tester.TestAll();
|
2010-04-09 19:28:18 +00:00
|
|
|
tester.Report();
|
|
|
|
}
|
|
|
|
|
|
|
|
void nx_ir()
|
|
|
|
{
|
2010-04-13 19:31:31 +00:00
|
|
|
DSPJitTester tester(0x8000, 0x0008);
|
2010-04-14 06:19:07 +00:00
|
|
|
tester.AddTestData(DSP_REG_AR0);
|
2010-04-13 19:31:31 +00:00
|
|
|
tester.AddTestData(DSP_REG_WR0);
|
|
|
|
tester.TestAll();
|
2010-04-09 19:28:18 +00:00
|
|
|
tester.Report();
|
|
|
|
}
|
|
|
|
|
|
|
|
void nx_nr()
|
|
|
|
{
|
2010-04-13 19:31:31 +00:00
|
|
|
DSPJitTester tester(0x8000, 0x000c);
|
2010-04-14 06:19:07 +00:00
|
|
|
tester.AddTestData(DSP_REG_AR0);
|
2010-04-13 19:31:31 +00:00
|
|
|
tester.AddTestData(DSP_REG_WR0);
|
|
|
|
tester.AddTestData(DSP_REG_IX0);
|
|
|
|
tester.TestAll(true);
|
|
|
|
tester.Report();
|
|
|
|
}
|
2010-04-09 19:28:18 +00:00
|
|
|
|
2010-04-13 19:31:31 +00:00
|
|
|
void dar()
|
|
|
|
{
|
|
|
|
DSPJitTester tester(0x0004);
|
2010-04-14 06:19:07 +00:00
|
|
|
tester.AddTestData(DSP_REG_AR0);
|
2010-04-13 19:31:31 +00:00
|
|
|
tester.AddTestData(DSP_REG_WR0);
|
|
|
|
tester.TestAll();
|
|
|
|
tester.Report();
|
|
|
|
}
|
|
|
|
void iar()
|
|
|
|
{
|
|
|
|
DSPJitTester tester(0x0008);
|
2010-04-14 06:19:07 +00:00
|
|
|
tester.AddTestData(DSP_REG_AR0);
|
2010-04-13 19:31:31 +00:00
|
|
|
tester.AddTestData(DSP_REG_WR0);
|
|
|
|
tester.TestAll();
|
|
|
|
tester.Report();
|
|
|
|
}
|
|
|
|
void subarn()
|
|
|
|
{
|
|
|
|
DSPJitTester tester(0x000c);
|
2010-04-14 06:19:07 +00:00
|
|
|
tester.AddTestData(DSP_REG_AR0);
|
2010-04-13 19:31:31 +00:00
|
|
|
tester.AddTestData(DSP_REG_WR0);
|
|
|
|
tester.AddTestData(DSP_REG_IX0);
|
|
|
|
tester.TestAll();
|
|
|
|
tester.Report();
|
|
|
|
}
|
|
|
|
void addarn()
|
|
|
|
{
|
|
|
|
DSPJitTester tester(0x0010);
|
2010-04-14 06:19:07 +00:00
|
|
|
tester.AddTestData(DSP_REG_AR0);
|
2010-04-13 19:31:31 +00:00
|
|
|
tester.AddTestData(DSP_REG_WR0);
|
|
|
|
tester.AddTestData(DSP_REG_IX0);
|
|
|
|
tester.TestAll();
|
|
|
|
tester.Report();
|
|
|
|
}
|
|
|
|
void sbclr()
|
|
|
|
{
|
|
|
|
DSPJitTester tester(0x1200);
|
|
|
|
tester.AddTestData(DSP_REG_SR);
|
|
|
|
tester.TestAll();
|
|
|
|
tester.Report();
|
|
|
|
}
|
|
|
|
void sbset()
|
|
|
|
{
|
|
|
|
DSPJitTester tester(0x1300);
|
|
|
|
tester.AddTestData(DSP_REG_SR);
|
|
|
|
tester.TestAll();
|
2010-04-09 19:28:18 +00:00
|
|
|
tester.Report();
|
|
|
|
}
|
|
|
|
|
|
|
|
void AudioJitTests()
|
|
|
|
{
|
|
|
|
DSPJitTester::Initialize();
|
|
|
|
|
2010-04-13 19:31:31 +00:00
|
|
|
dar();
|
|
|
|
iar();
|
|
|
|
subarn();
|
|
|
|
addarn();
|
|
|
|
sbclr();
|
|
|
|
sbset();
|
|
|
|
|
2010-04-09 19:28:18 +00:00
|
|
|
nx_ir();
|
|
|
|
nx_dr();
|
2010-04-11 14:06:46 +00:00
|
|
|
nx_nr();
|
2010-04-09 19:28:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
//required to be able to link against DSPCore
|
|
|
|
void DSPHost_UpdateDebugger() { }
|
|
|
|
unsigned int DSPHost_CodeLoaded(unsigned const char*, int) { return 0; }
|
|
|
|
void DSPHost_InterruptRequest() { }
|
|
|
|
bool DSPHost_OnThread() { return false; }
|
|
|
|
void DSPHost_WriteHostMemory(unsigned char, unsigned int) { }
|
2010-04-12 05:33:17 +00:00
|
|
|
unsigned char DSPHost_ReadHostMemory(unsigned int) { return 0; }
|