project64/Source/Project64-core/N64System/MemoryHandler/MIPSInterfaceHandler.h

48 lines
1.1 KiB
C
Raw Normal View History

2022-03-04 12:23:30 +00:00
#pragma once
#include "MemoryHandler.h"
#include <Project64-core\Logging.h>
2022-10-10 00:22:17 +00:00
#include <Project64-core\Settings\DebugSettings.h>
2022-03-04 12:23:30 +00:00
#include <stdint.h>
class MIPSInterfaceReg
{
protected:
MIPSInterfaceReg(uint32_t * MipsInterface);
public:
uint32_t & MI_INIT_MODE_REG;
uint32_t & MI_MODE_REG;
uint32_t & MI_VERSION_REG;
uint32_t & MI_NOOP_REG;
uint32_t & MI_INTR_REG;
uint32_t & MI_INTR_MASK_REG;
private:
MIPSInterfaceReg();
2022-10-10 00:22:17 +00:00
MIPSInterfaceReg(const MIPSInterfaceReg &);
MIPSInterfaceReg & operator=(const MIPSInterfaceReg &);
2022-03-04 12:23:30 +00:00
};
class CRegisters;
class MIPSInterfaceHandler :
public MemoryHandler,
private MIPSInterfaceReg,
private CDebugSettings,
private CLogging
{
public:
MIPSInterfaceHandler(CRegisters & Reg);
bool Read32(uint32_t Address, uint32_t & Value);
bool Write32(uint32_t Address, uint32_t Value, uint32_t Mask);
private:
MIPSInterfaceHandler();
MIPSInterfaceHandler(const MIPSInterfaceHandler &);
MIPSInterfaceHandler & operator=(const MIPSInterfaceHandler &);
CRegisters & m_Reg;
uint32_t & m_PC;
};