2010-04-09 13:28:18 -06:00
|
|
|
#include "DSPJitTester.h"
|
|
|
|
|
|
|
|
void nx_dr()
|
|
|
|
{
|
2010-04-13 13:31:31 -06:00
|
|
|
DSPJitTester tester(0x8000, 0x0004);
|
2010-04-14 00:19:07 -06:00
|
|
|
tester.AddTestData(DSP_REG_AR0);
|
2010-04-13 13:31:31 -06:00
|
|
|
tester.AddTestData(DSP_REG_WR0);
|
|
|
|
tester.TestAll();
|
2010-04-09 13:28:18 -06:00
|
|
|
tester.Report();
|
|
|
|
}
|
|
|
|
|
|
|
|
void nx_ir()
|
|
|
|
{
|
2010-04-13 13:31:31 -06:00
|
|
|
DSPJitTester tester(0x8000, 0x0008);
|
2010-04-14 00:19:07 -06:00
|
|
|
tester.AddTestData(DSP_REG_AR0);
|
2010-04-13 13:31:31 -06:00
|
|
|
tester.AddTestData(DSP_REG_WR0);
|
|
|
|
tester.TestAll();
|
2010-04-09 13:28:18 -06:00
|
|
|
tester.Report();
|
|
|
|
}
|
|
|
|
|
|
|
|
void nx_nr()
|
|
|
|
{
|
2010-04-13 13:31:31 -06:00
|
|
|
DSPJitTester tester(0x8000, 0x000c);
|
2010-04-14 00:19:07 -06:00
|
|
|
tester.AddTestData(DSP_REG_AR0);
|
2010-04-13 13:31:31 -06:00
|
|
|
tester.AddTestData(DSP_REG_WR0);
|
|
|
|
tester.AddTestData(DSP_REG_IX0);
|
|
|
|
tester.TestAll(true);
|
|
|
|
tester.Report();
|
|
|
|
}
|
2010-04-09 13:28:18 -06:00
|
|
|
|
2010-04-13 13:31:31 -06:00
|
|
|
void dar()
|
|
|
|
{
|
|
|
|
DSPJitTester tester(0x0004);
|
2010-04-14 00:19:07 -06:00
|
|
|
tester.AddTestData(DSP_REG_AR0);
|
2010-04-13 13:31:31 -06:00
|
|
|
tester.AddTestData(DSP_REG_WR0);
|
|
|
|
tester.TestAll();
|
|
|
|
tester.Report();
|
|
|
|
}
|
|
|
|
void iar()
|
|
|
|
{
|
|
|
|
DSPJitTester tester(0x0008);
|
2010-04-14 00:19:07 -06:00
|
|
|
tester.AddTestData(DSP_REG_AR0);
|
2010-04-13 13:31:31 -06:00
|
|
|
tester.AddTestData(DSP_REG_WR0);
|
|
|
|
tester.TestAll();
|
|
|
|
tester.Report();
|
|
|
|
}
|
|
|
|
void subarn()
|
|
|
|
{
|
|
|
|
DSPJitTester tester(0x000c);
|
2010-04-14 00:19:07 -06:00
|
|
|
tester.AddTestData(DSP_REG_AR0);
|
2010-04-13 13:31:31 -06:00
|
|
|
tester.AddTestData(DSP_REG_WR0);
|
|
|
|
tester.AddTestData(DSP_REG_IX0);
|
|
|
|
tester.TestAll();
|
|
|
|
tester.Report();
|
|
|
|
}
|
|
|
|
void addarn()
|
|
|
|
{
|
|
|
|
DSPJitTester tester(0x0010);
|
2010-04-14 00:19:07 -06:00
|
|
|
tester.AddTestData(DSP_REG_AR0);
|
2010-04-13 13:31:31 -06: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 13:28:18 -06:00
|
|
|
tester.Report();
|
|
|
|
}
|
|
|
|
|
2010-04-25 08:24:55 -06:00
|
|
|
void nx_s()
|
|
|
|
{
|
|
|
|
DSPJitTester tester(0x8000, 0x0020);
|
|
|
|
tester.AddTestData(DSP_REG_AR0);
|
|
|
|
tester.AddTestData(DSP_REG_ACL0);
|
|
|
|
tester.TestAll(true);
|
|
|
|
tester.Report();
|
|
|
|
}
|
2010-04-09 13:28:18 -06:00
|
|
|
void AudioJitTests()
|
|
|
|
{
|
|
|
|
DSPJitTester::Initialize();
|
|
|
|
|
2010-04-13 13:31:31 -06:00
|
|
|
dar();
|
|
|
|
iar();
|
|
|
|
subarn();
|
|
|
|
addarn();
|
|
|
|
sbclr();
|
|
|
|
sbset();
|
|
|
|
|
2010-04-09 13:28:18 -06:00
|
|
|
nx_ir();
|
|
|
|
nx_dr();
|
2010-04-11 08:06:46 -06:00
|
|
|
nx_nr();
|
2010-04-25 08:24:55 -06:00
|
|
|
nx_s();
|
2010-04-09 13:28:18 -06: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-11 23:33:17 -06:00
|
|
|
unsigned char DSPHost_ReadHostMemory(unsigned int) { return 0; }
|