Play-/tools/SpuTest/Test.h

50 lines
1 KiB
C
Raw Permalink Normal View History

2020-12-28 20:54:11 -05:00
#pragma once
2020-12-29 12:34:47 -05:00
#include "Types.h"
#include "iop/Iop_Spu2.h"
2020-12-28 20:54:11 -05:00
#define TEST_VERIFY(a) \
if(!(a)) \
{ \
int* p = 0; \
(*p) = 0; \
}
class CTest
{
public:
2020-12-29 12:34:47 -05:00
CTest();
virtual ~CTest();
2020-12-28 20:54:11 -05:00
virtual void Execute() = 0;
2020-12-29 12:34:47 -05:00
protected:
2020-12-30 16:31:00 -05:00
enum
{
2024-03-11 18:33:56 -04:00
CORE_COUNT = 2,
2020-12-30 16:31:00 -05:00
VOICE_COUNT = 24,
};
2020-12-31 09:07:13 -05:00
2020-12-29 12:34:47 -05:00
void RunSpu(unsigned int);
2020-12-30 16:31:00 -05:00
uint32 GetCoreRegister(unsigned int, uint32);
2020-12-29 12:34:47 -05:00
void SetCoreRegister(unsigned int, uint32, uint32);
2020-12-30 16:31:00 -05:00
uint32 GetCoreAddress(unsigned int, uint32);
2020-12-29 12:34:47 -05:00
void SetCoreAddress(unsigned int, uint32, uint32);
2020-12-30 16:31:00 -05:00
2022-04-08 08:49:06 -04:00
uint32 GetVoiceRegister(unsigned int, unsigned int, uint32);
2020-12-29 12:34:47 -05:00
void SetVoiceRegister(unsigned int, unsigned int, uint32, uint32);
2020-12-31 09:07:13 -05:00
2020-12-30 16:31:00 -05:00
uint32 GetVoiceAddress(unsigned int, unsigned int, uint32);
2020-12-29 12:34:47 -05:00
void SetVoiceAddress(unsigned int, unsigned int, uint32, uint32);
2024-03-11 18:33:56 -04:00
uint32 GetCoreRegisterAddress(unsigned int, uint32);
2020-12-29 12:34:47 -05:00
uint8* m_ram = nullptr;
2023-05-17 16:55:50 -04:00
Iop::CSpuSampleCache m_spuSampleCache;
2024-03-14 14:48:43 -04:00
Iop::CSpuIrqWatcher m_irqWatcher;
2020-12-29 12:34:47 -05:00
Iop::CSpuBase m_spuCore0;
Iop::CSpuBase m_spuCore1;
Iop::CSpu2 m_spu;
2020-12-28 20:54:11 -05:00
};