GTE: Stub and register read/write function

This commit is contained in:
Connor McLaughlin
2019-09-17 23:35:17 +10:00
parent 6df8d42480
commit 4025d6e4a6
11 changed files with 258 additions and 200 deletions

32
src/pse/gte.h Normal file
View File

@@ -0,0 +1,32 @@
#pragma once
#include "common/state_wrapper.h"
#include "gte_types.h"
namespace GTE {
class Core
{
public:
Core();
~Core();
void Initialize();
void Reset();
bool DoState(StateWrapper& sw);
u32 ReadRegister(u32 index) const { return m_regs.r32[index]; }
void WriteRegister(u32 index, u32 value) { m_regs.r32[index] = value; }
u32 ReadDataRegister(u32 index) const { return m_regs.r32[index]; }
void WriteDataRegister(u32 index, u32 value) { m_regs.r32[index] = value; }
u32 ReadControlRegister(u32 index) const { return m_regs.r32[index + 32]; }
void WriteControlRegister(u32 index, u32 value) { m_regs.r32[index + 32] = value; }
void ExecuteInstruction(Instruction inst);
private:
Regs m_regs = {};
};
} // namespace GTE