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-10-31 23:26:18 +00:00
|
|
|
void nx_mv()
|
|
|
|
{
|
|
|
|
DSPJitTester tester(0x8000, 0x0010);
|
|
|
|
tester.AddTestData(DSP_REG_ACL0);
|
|
|
|
tester.AddTestData(DSP_REG_AXL0);
|
|
|
|
tester.TestAll(true);
|
|
|
|
tester.Report();
|
|
|
|
}
|
|
|
|
|
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();
|
|
|
|
}
|
|
|
|
|
2010-04-25 14:24:55 +00:00
|
|
|
void nx_s()
|
|
|
|
{
|
|
|
|
DSPJitTester tester(0x8000, 0x0020);
|
|
|
|
tester.AddTestData(DSP_REG_AR0);
|
2010-10-31 23:26:18 +00:00
|
|
|
tester.AddTestData(DSP_REG_WR0);
|
2010-04-25 14:24:55 +00:00
|
|
|
tester.AddTestData(DSP_REG_ACL0);
|
|
|
|
tester.TestAll(true);
|
|
|
|
tester.Report();
|
|
|
|
}
|
2010-10-31 23:26:18 +00:00
|
|
|
|
|
|
|
void nx_sn()
|
|
|
|
{
|
|
|
|
DSPJitTester tester(0x8000, 0x0024);
|
|
|
|
tester.AddTestData(DSP_REG_AR0);
|
|
|
|
tester.AddTestData(DSP_REG_WR0);
|
|
|
|
tester.AddTestData(DSP_REG_IX0);
|
|
|
|
tester.AddTestData(DSP_REG_ACL0);
|
|
|
|
tester.TestAll(true);
|
|
|
|
tester.Report();
|
|
|
|
}
|
|
|
|
|
|
|
|
void nx_l()
|
|
|
|
{
|
|
|
|
|
|
|
|
DSPJitTester tester(0x8000, 0x0040);
|
|
|
|
tester.AddTestData(DSP_REG_AR0);
|
|
|
|
tester.AddTestData(DSP_REG_WR0);
|
|
|
|
tester.AddTestData(DSP_REG_AXL0);
|
|
|
|
tester.TestAll(true);
|
|
|
|
tester.Report();
|
|
|
|
}
|
|
|
|
|
|
|
|
void set16_l()
|
|
|
|
{
|
|
|
|
|
|
|
|
DSPJitTester tester(0x8e00, 0x0070);
|
|
|
|
tester.AddTestData(DSP_REG_SR, 0);
|
|
|
|
tester.AddTestData(DSP_REG_SR, SR_40_MODE_BIT);
|
|
|
|
tester.AddTestData(DSP_REG_AR0);
|
|
|
|
tester.AddTestData(DSP_REG_WR0);
|
|
|
|
tester.AddTestData(DSP_REG_ACM0);
|
|
|
|
tester.TestAll(true);
|
|
|
|
tester.Report();
|
|
|
|
}
|
|
|
|
|
|
|
|
void nx_ln()
|
|
|
|
{
|
|
|
|
DSPJitTester tester(0x8000, 0x0044);
|
|
|
|
tester.AddTestData(DSP_REG_AR0);
|
|
|
|
tester.AddTestData(DSP_REG_WR0);
|
|
|
|
tester.AddTestData(DSP_REG_IX0);
|
|
|
|
tester.AddTestData(DSP_REG_AXL0);
|
|
|
|
tester.TestAll(true);
|
|
|
|
tester.Report();
|
|
|
|
}
|
|
|
|
|
|
|
|
void nx_ls()
|
|
|
|
{
|
|
|
|
DSPJitTester tester1(0x8000, 0x0080);
|
|
|
|
tester1.AddTestData(DSP_REG_ACM0);
|
|
|
|
tester1.AddTestData(DSP_REG_AR0);
|
|
|
|
tester1.AddTestData(DSP_REG_WR0);
|
|
|
|
tester1.TestAll(true);
|
|
|
|
tester1.Report();
|
|
|
|
|
|
|
|
DSPJitTester tester2(0x8000, 0x0080);
|
|
|
|
tester2.AddTestData(DSP_REG_ACM0);
|
|
|
|
tester2.AddTestData(DSP_REG_AR3);
|
|
|
|
tester2.AddTestData(DSP_REG_WR3);
|
|
|
|
tester2.TestAll(true);
|
|
|
|
tester2.Report();
|
|
|
|
}
|
|
|
|
|
|
|
|
void nx_lsn()
|
|
|
|
{
|
|
|
|
DSPJitTester tester1(0x8000, 0x0084);
|
|
|
|
tester1.AddTestData(DSP_REG_ACM0);
|
|
|
|
tester1.AddTestData(DSP_REG_AR0);
|
|
|
|
tester1.AddTestData(DSP_REG_WR0);
|
|
|
|
tester1.AddTestData(DSP_REG_IX0);
|
|
|
|
tester1.TestAll(true);
|
|
|
|
tester1.Report();
|
|
|
|
|
|
|
|
DSPJitTester tester2(0x8000, 0x0084);
|
|
|
|
tester2.AddTestData(DSP_REG_ACM0);
|
|
|
|
tester2.AddTestData(DSP_REG_AR3);
|
|
|
|
tester2.AddTestData(DSP_REG_WR3);
|
|
|
|
tester2.TestAll(true);
|
|
|
|
tester2.Report();
|
|
|
|
}
|
|
|
|
|
|
|
|
void nx_lsm()
|
|
|
|
{
|
|
|
|
DSPJitTester tester1(0x8000, 0x0088);
|
|
|
|
tester1.AddTestData(DSP_REG_ACM0);
|
|
|
|
tester1.AddTestData(DSP_REG_AR0);
|
|
|
|
tester1.AddTestData(DSP_REG_WR0);
|
|
|
|
tester1.TestAll(true);
|
|
|
|
tester1.Report();
|
|
|
|
|
|
|
|
DSPJitTester tester2(0x8000, 0x0088);
|
|
|
|
tester2.AddTestData(DSP_REG_ACM0);
|
|
|
|
tester2.AddTestData(DSP_REG_AR3);
|
|
|
|
tester2.AddTestData(DSP_REG_WR3);
|
|
|
|
tester2.AddTestData(DSP_REG_IX3);
|
|
|
|
tester2.TestAll(true);
|
|
|
|
tester2.Report();
|
|
|
|
}
|
|
|
|
|
|
|
|
void nx_lsnm()
|
|
|
|
{
|
|
|
|
DSPJitTester tester1(0x8000, 0x008c);
|
|
|
|
tester1.AddTestData(DSP_REG_ACM0);
|
|
|
|
tester1.AddTestData(DSP_REG_AR0);
|
|
|
|
tester1.AddTestData(DSP_REG_WR0);
|
|
|
|
tester1.AddTestData(DSP_REG_IX0);
|
|
|
|
tester1.TestAll(true);
|
|
|
|
tester1.Report();
|
|
|
|
|
|
|
|
DSPJitTester tester2(0x8000, 0x008c);
|
|
|
|
tester2.AddTestData(DSP_REG_ACM0);
|
|
|
|
tester2.AddTestData(DSP_REG_AR3);
|
|
|
|
tester2.AddTestData(DSP_REG_WR3);
|
|
|
|
tester2.AddTestData(DSP_REG_IX3);
|
|
|
|
tester2.TestAll(true);
|
|
|
|
tester2.Report();
|
|
|
|
}
|
|
|
|
|
|
|
|
void nx_sl()
|
|
|
|
{
|
|
|
|
DSPJitTester tester1(0x8000, 0x0082);
|
|
|
|
tester1.AddTestData(DSP_REG_ACM0);
|
|
|
|
tester1.AddTestData(DSP_REG_AR0);
|
|
|
|
tester1.AddTestData(DSP_REG_WR0);
|
|
|
|
tester1.TestAll(true);
|
|
|
|
tester1.Report();
|
|
|
|
|
|
|
|
DSPJitTester tester2(0x8000, 0x0082);
|
|
|
|
tester2.AddTestData(DSP_REG_ACM0);
|
|
|
|
tester2.AddTestData(DSP_REG_AR3);
|
|
|
|
tester2.AddTestData(DSP_REG_WR3);
|
|
|
|
tester2.TestAll(true);
|
|
|
|
tester2.Report();
|
|
|
|
}
|
|
|
|
|
|
|
|
void nx_sln()
|
|
|
|
{
|
|
|
|
DSPJitTester tester1(0x8000, 0x0086);
|
|
|
|
tester1.AddTestData(DSP_REG_ACM0);
|
|
|
|
tester1.AddTestData(DSP_REG_AR0);
|
|
|
|
tester1.AddTestData(DSP_REG_WR0);
|
|
|
|
tester1.AddTestData(DSP_REG_IX0);
|
|
|
|
tester1.TestAll(true);
|
|
|
|
tester1.Report();
|
|
|
|
|
|
|
|
DSPJitTester tester2(0x8000, 0x0086);
|
|
|
|
tester2.AddTestData(DSP_REG_ACM0);
|
|
|
|
tester2.AddTestData(DSP_REG_AR3);
|
|
|
|
tester2.AddTestData(DSP_REG_WR3);
|
|
|
|
tester2.TestAll(true);
|
|
|
|
tester2.Report();
|
|
|
|
}
|
|
|
|
|
|
|
|
void nx_slm()
|
|
|
|
{
|
|
|
|
DSPJitTester tester1(0x8000, 0x008a);
|
|
|
|
tester1.AddTestData(DSP_REG_ACM0);
|
|
|
|
tester1.AddTestData(DSP_REG_AR0);
|
|
|
|
tester1.AddTestData(DSP_REG_WR0);
|
|
|
|
tester1.TestAll(true);
|
|
|
|
tester1.Report();
|
|
|
|
|
|
|
|
DSPJitTester tester2(0x8000, 0x008a);
|
|
|
|
tester2.AddTestData(DSP_REG_ACM0);
|
|
|
|
tester2.AddTestData(DSP_REG_AR3);
|
|
|
|
tester2.AddTestData(DSP_REG_WR3);
|
|
|
|
tester2.AddTestData(DSP_REG_IX3);
|
|
|
|
tester2.TestAll(true);
|
|
|
|
tester2.Report();
|
|
|
|
}
|
|
|
|
|
|
|
|
void nx_slnm()
|
|
|
|
{
|
|
|
|
DSPJitTester tester1(0x8000, 0x008e);
|
|
|
|
tester1.AddTestData(DSP_REG_ACM0);
|
|
|
|
tester1.AddTestData(DSP_REG_AR0);
|
|
|
|
tester1.AddTestData(DSP_REG_WR0);
|
|
|
|
tester1.AddTestData(DSP_REG_IX0);
|
|
|
|
tester1.TestAll(true);
|
|
|
|
tester1.Report();
|
|
|
|
|
|
|
|
DSPJitTester tester2(0x8000, 0x008e);
|
|
|
|
tester2.AddTestData(DSP_REG_ACM0);
|
|
|
|
tester2.AddTestData(DSP_REG_AR3);
|
|
|
|
tester2.AddTestData(DSP_REG_WR3);
|
|
|
|
tester2.AddTestData(DSP_REG_IX3);
|
|
|
|
tester2.TestAll(true);
|
|
|
|
tester2.Report();
|
|
|
|
}
|
|
|
|
|
2010-11-07 23:15:31 +00:00
|
|
|
void nx_ld()
|
|
|
|
{
|
|
|
|
DSPJitTester tester1(0x8000, 0x00c0);
|
|
|
|
tester1.AddTestData(DSP_REG_AXL0,0xdead);
|
|
|
|
tester1.AddTestData(DSP_REG_AXL1,0xbeef);
|
|
|
|
tester1.AddTestData(DSP_REG_AR0);
|
|
|
|
tester1.AddTestData(DSP_REG_WR0);
|
|
|
|
tester1.AddTestData(DSP_REG_IX0);
|
|
|
|
tester1.TestAll(true);
|
|
|
|
tester1.Report();
|
|
|
|
|
|
|
|
DSPJitTester tester2(0x8000, 0x00c0);
|
|
|
|
tester2.AddTestData(DSP_REG_AXL0,0xdead);
|
|
|
|
tester2.AddTestData(DSP_REG_AXL1,0xbeef);
|
|
|
|
tester2.AddTestData(DSP_REG_AR3);
|
|
|
|
tester2.AddTestData(DSP_REG_WR3);
|
|
|
|
tester2.AddTestData(DSP_REG_IX3);
|
|
|
|
tester2.TestAll(true);
|
|
|
|
tester2.Report();
|
|
|
|
}
|
|
|
|
|
2010-04-09 19:28:18 +00:00
|
|
|
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-10-31 23:26:18 +00:00
|
|
|
nx_mv();
|
|
|
|
|
|
|
|
set16_l();
|
|
|
|
|
2010-04-25 14:24:55 +00:00
|
|
|
nx_s();
|
2010-10-31 23:26:18 +00:00
|
|
|
nx_sn();
|
|
|
|
nx_l();
|
|
|
|
nx_ln();
|
|
|
|
nx_ls();
|
|
|
|
nx_lsn();
|
|
|
|
nx_lsm();
|
|
|
|
nx_lsnm();
|
|
|
|
nx_sl();
|
|
|
|
nx_sln();
|
|
|
|
nx_slm();
|
|
|
|
nx_slnm();
|
2010-11-07 23:15:31 +00:00
|
|
|
nx_ld();
|
2010-04-09 19:28:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
//required to be able to link against DSPCore
|
|
|
|
void DSPHost_UpdateDebugger() { }
|
2013-05-22 00:40:00 +00:00
|
|
|
void DSPHost_CodeLoaded(unsigned const char*, int) { }
|
2010-04-09 19:28:18 +00:00
|
|
|
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; }
|