Project64-core: Move handling of RDRam Interface Register handling to its own file

This commit is contained in:
zilmar 2022-01-04 16:11:52 +10:30
parent 7e80d952cb
commit eafcb96c01
11 changed files with 212 additions and 142 deletions

View File

@ -200,26 +200,6 @@ void CLogging::Log_LW(uint32_t PC, uint32_t VAddr)
case 0xA4600030: LogMessage("%08X: read from PI_BSD_DOM2_RLS_REG (%08X)", PC, Value); return; case 0xA4600030: LogMessage("%08X: read from PI_BSD_DOM2_RLS_REG (%08X)", PC, Value); return;
} }
} }
if (VAddr >= 0xA4700000 && VAddr <= 0xA470001C)
{
if (!LogRDRAMInterface())
{
return;
}
g_MMU->LW_VAddr(VAddr, Value);
switch (VAddr)
{
case 0xA4700000: LogMessage("%08X: read from RI_MODE_REG (%08X)", PC, Value); return;
case 0xA4700004: LogMessage("%08X: read from RI_CONFIG_REG (%08X)", PC, Value); return;
case 0xA4700008: LogMessage("%08X: read from RI_CURRENT_LOAD_REG (%08X)", PC, Value); return;
case 0xA470000C: LogMessage("%08X: read from RI_SELECT_REG (%08X)", PC, Value); return;
case 0xA4700010: LogMessage("%08X: read from RI_REFRESH_REG/RI_COUNT_REG (%08X)", PC, Value); return;
case 0xA4700014: LogMessage("%08X: read from RI_LATENCY_REG (%08X)", PC, Value); return;
case 0xA4700018: LogMessage("%08X: read from RI_RERROR_REG (%08X)", PC, Value); return;
case 0xA470001C: LogMessage("%08X: read from RI_WERROR_REG (%08X)", PC, Value); return;
}
}
if (VAddr == 0xA4800000) if (VAddr == 0xA4800000)
{ {
if (!LogSerialInterface()) if (!LogSerialInterface())
@ -494,24 +474,6 @@ void CLogging::Log_SW(uint32_t PC, uint32_t VAddr, uint32_t Value)
case 0xA4600030: LogMessage("%08X: Writing 0x%08X to PI_BSD_DOM2_RLS_REG", PC, Value); return; case 0xA4600030: LogMessage("%08X: Writing 0x%08X to PI_BSD_DOM2_RLS_REG", PC, Value); return;
} }
} }
if (VAddr >= 0xA4700000 && VAddr <= 0xA470001C)
{
if (!LogRDRAMInterface())
{
return;
}
switch (VAddr)
{
case 0xA4700000: LogMessage("%08X: Writing 0x%08X to RI_MODE_REG", PC, Value); return;
case 0xA4700004: LogMessage("%08X: Writing 0x%08X to RI_CONFIG_REG", PC, Value); return;
case 0xA4700008: LogMessage("%08X: Writing 0x%08X to RI_CURRENT_LOAD_REG", PC, Value); return;
case 0xA470000C: LogMessage("%08X: Writing 0x%08X to RI_SELECT_REG", PC, Value); return;
case 0xA4700010: LogMessage("%08X: Writing 0x%08X to RI_REFRESH_REG/RI_COUNT_REG", PC, Value); return;
case 0xA4700014: LogMessage("%08X: Writing 0x%08X to RI_LATENCY_REG", PC, Value); return;
case 0xA4700018: LogMessage("%08X: Writing 0x%08X to RI_RERROR_REG", PC, Value); return;
case 0xA470001C: LogMessage("%08X: Writing 0x%08X to RI_WERROR_REG", PC, Value); return;
}
}
if (VAddr == 0xA4800000) if (VAddr == 0xA4800000)
{ {
if (!LogSerialInterface()) if (!LogSerialInterface())

View File

@ -0,0 +1,8 @@
#pragma once
#include <stdint.h>
__interface MemoryHandler
{
bool Read32(uint32_t Address, uint32_t & Value);
bool Write32(uint32_t Address, uint32_t Value, uint32_t Mask);
};

View File

@ -0,0 +1,106 @@
#include "stdafx.h"
#include <Project64-core\N64System\SystemGlobals.h>
#include <Project64-core\N64System\Mips\Register.h>
#include "RDRAMInterfaceHandler.h"
RDRAMInterfaceReg::RDRAMInterfaceReg(uint32_t * RdramInterface) :
RI_MODE_REG(RdramInterface[0]),
RI_CONFIG_REG(RdramInterface[1]),
RI_CURRENT_LOAD_REG(RdramInterface[2]),
RI_SELECT_REG(RdramInterface[3]),
RI_COUNT_REG(RdramInterface[4]),
RI_REFRESH_REG(RdramInterface[4]),
RI_LATENCY_REG(RdramInterface[5]),
RI_RERROR_REG(RdramInterface[6]),
RI_WERROR_REG(RdramInterface[7])
{
}
RDRAMInterfaceHandler::RDRAMInterfaceHandler(CRegisters & Reg) :
RDRAMInterfaceReg(Reg.m_RDRAM_Interface),
m_PC(Reg.m_PROGRAM_COUNTER)
{
}
bool RDRAMInterfaceHandler::Read32(uint32_t Address, uint32_t & Value)
{
switch (Address & 0x1FFFFFFF)
{
case 0x04700000: Value = RI_MODE_REG; break;
case 0x04700004: Value = RI_CONFIG_REG; break;
case 0x04700008: Value = RI_CURRENT_LOAD_REG; break;
case 0x0470000C: Value = RI_SELECT_REG; break;
case 0x04700010: Value = RI_REFRESH_REG; break;
case 0x04700014: Value = RI_LATENCY_REG; break;
case 0x04700018: Value = RI_RERROR_REG; break;
case 0x0470001C: Value = RI_WERROR_REG; break;
default:
Value = 0;
if (HaveDebugger())
{
g_Notify->BreakPoint(__FILE__, __LINE__);
}
}
if (GenerateLog() && LogRDRAMInterface())
{
switch (Address & 0x1FFFFFFF)
{
case 0x04700000: LogMessage("%08X: read from RI_MODE_REG (%08X)", m_PC, Value); break;
case 0x04700004: LogMessage("%08X: read from RI_CONFIG_REG (%08X)", m_PC, Value); break;
case 0x04700008: LogMessage("%08X: read from RI_CURRENT_LOAD_REG (%08X)", m_PC, Value); break;
case 0x0470000C: LogMessage("%08X: read from RI_SELECT_REG (%08X)", m_PC, Value); break;
case 0x04700010: LogMessage("%08X: read from RI_REFRESH_REG/RI_COUNT_REG (%08X)", m_PC, Value); break;
case 0x04700014: LogMessage("%08X: read from RI_LATENCY_REG (%08X)", m_PC, Value); break;
case 0x04700018: LogMessage("%08X: read from RI_RERROR_REG (%08X)", m_PC, Value); break;
case 0x0470001C: LogMessage("%08X: read from RI_WERROR_REG (%08X)", m_PC, Value); break;
default:
if (HaveDebugger())
{
g_Notify->BreakPoint(__FILE__, __LINE__);
}
}
}
return true;
}
bool RDRAMInterfaceHandler::Write32(uint32_t Address, uint32_t Value, uint32_t Mask)
{
if (GenerateLog() && LogRDRAMInterface())
{
switch (Address & 0x1FFFFFFF)
{
case 0x04700000: LogMessage("%08X: Writing 0x%08X (Mask: 0x%08X) to RI_MODE_REG", m_PC, Value, Mask); break;
case 0x04700004: LogMessage("%08X: Writing 0x%08X (Mask: 0x%08X) to RI_CONFIG_REG", m_PC, Value, Mask); break;
case 0x04700008: LogMessage("%08X: Writing 0x%08X (Mask: 0x%08X) to RI_CURRENT_LOAD_REG", m_PC, Value, Mask); break;
case 0x0470000C: LogMessage("%08X: Writing 0x%08X (Mask: 0x%08X) to RI_SELECT_REG", m_PC, Value, Mask); break;
case 0x04700010: LogMessage("%08X: Writing 0x%08X (Mask: 0x%08X) to RI_REFRESH_REG/RI_COUNT_REG", m_PC, Value, Mask); break;
case 0x04700014: LogMessage("%08X: Writing 0x%08X (Mask: 0x%08X) to RI_LATENCY_REG", m_PC, Value, Mask); break;
case 0x04700018: LogMessage("%08X: Writing 0x%08X (Mask: 0x%08X) to RI_RERROR_REG", m_PC, Value, Mask); break;
case 0x0470001C: LogMessage("%08X: Writing 0x%08X (Mask: 0x%08X) to RI_WERROR_REG", m_PC, Value, Mask); break;
default:
if (HaveDebugger())
{
g_Notify->BreakPoint(__FILE__, __LINE__);
}
}
}
switch (Address & 0x1FFFFFFF)
{
case 0x04700000: RI_MODE_REG = (RI_MODE_REG & ~Mask) | (Value & Mask); break;
case 0x04700004: RI_CONFIG_REG = (RI_CONFIG_REG & ~Mask) | (Value & Mask); break;
case 0x04700008: RI_CURRENT_LOAD_REG = (RI_CURRENT_LOAD_REG & ~Mask) | (Value & Mask); break;
case 0x0470000C: RI_SELECT_REG = (RI_SELECT_REG & ~Mask) | (Value & Mask); break;
case 0x04700010: RI_REFRESH_REG = (RI_REFRESH_REG & ~Mask) | (Value & Mask); break;
case 0x04700014: RI_LATENCY_REG = (RI_LATENCY_REG & ~Mask) | (Value & Mask); break;
case 0x04700018: RI_RERROR_REG = (RI_RERROR_REG & ~Mask) | (Value & Mask); break;
case 0x0470001C: RI_WERROR_REG = (RI_WERROR_REG & ~Mask) | (Value & Mask); break;
default:
if (HaveDebugger())
{
g_Notify->BreakPoint(__FILE__, __LINE__);
}
}
return true;
}

View File

@ -0,0 +1,48 @@
#pragma once
#include "MemoryHandler.h"
#include <Project64-core\Settings\DebugSettings.h>
#include <Project64-core\Logging.h>
#include <stdint.h>
class RDRAMInterfaceReg
{
protected:
RDRAMInterfaceReg(uint32_t * RdramInterface);
public:
uint32_t & RI_MODE_REG;
uint32_t & RI_CONFIG_REG;
uint32_t & RI_CURRENT_LOAD_REG;
uint32_t & RI_SELECT_REG;
uint32_t & RI_COUNT_REG;
uint32_t & RI_REFRESH_REG;
uint32_t & RI_LATENCY_REG;
uint32_t & RI_RERROR_REG;
uint32_t & RI_WERROR_REG;
private:
RDRAMInterfaceReg();
RDRAMInterfaceReg(const RDRAMInterfaceReg &);
RDRAMInterfaceReg & operator=(const RDRAMInterfaceReg &);
};
class CRegisters;
class RDRAMInterfaceHandler :
public MemoryHandler,
private RDRAMInterfaceReg,
private CDebugSettings,
private CLogging
{
public:
RDRAMInterfaceHandler(CRegisters & Reg);
bool Read32(uint32_t Address, uint32_t & Value);
bool Write32(uint32_t Address, uint32_t Value, uint32_t Mask);
private:
RDRAMInterfaceHandler();
RDRAMInterfaceHandler(const RDRAMInterfaceHandler &);
RDRAMInterfaceHandler & operator=(const RDRAMInterfaceHandler &);
uint32_t & m_PC;
};

View File

@ -1,13 +1,13 @@
#include "stdafx.h" #include "stdafx.h"
#include <Project64-core/N64System/Mips/MemoryVirtualMem.h> #include <Project64-core\N64System\Mips\MemoryVirtualMem.h>
#include <Project64-core/N64System/SystemGlobals.h> #include <Project64-core\N64System\SystemGlobals.h>
#include <Project64-core/N64System/N64Rom.h> #include <Project64-core\N64System\N64Rom.h>
#include <Project64-core/N64System/N64System.h> #include <Project64-core\N64System\N64System.h>
#include <Project64-core/N64System/Recompiler/RecompilerCodeLog.h> #include <Project64-core\N64System\Recompiler\RecompilerCodeLog.h>
#include <Project64-core/N64System/Mips/OpcodeName.h> #include <Project64-core\N64System\Mips\OpcodeName.h>
#include <Project64-core/N64System/Mips/Disk.h> #include <Project64-core\N64System\Mips\Disk.h>
#include <Project64-core/ExceptionHandler.h> #include <Project64-core\ExceptionHandler.h>
#include <stdio.h> #include <stdio.h>
#include <Common/MemoryManagement.h> #include <Common/MemoryManagement.h>
@ -21,12 +21,14 @@ uint32_t CMipsMemoryVM::RegModValue;
#pragma warning(disable:4355) // Disable 'this' : used in base member initializer list #pragma warning(disable:4355) // Disable 'this' : used in base member initializer list
CMipsMemoryVM::CMipsMemoryVM(bool SavesReadOnly) : CMipsMemoryVM::CMipsMemoryVM(CRegisters & Reg, bool SavesReadOnly) :
CPifRam(SavesReadOnly), CPifRam(SavesReadOnly),
CFlashram(SavesReadOnly), CFlashram(SavesReadOnly),
CSram(SavesReadOnly), CSram(SavesReadOnly),
CDMA(*this, *this), CDMA(*this, *this),
m_Reg(Reg),
m_RomMapped(false), m_RomMapped(false),
m_RDRAMInterfaceHandler(Reg),
m_Rom(nullptr), m_Rom(nullptr),
m_RomSize(0), m_RomSize(0),
m_RomWrittenTo(false), m_RomWrittenTo(false),
@ -697,7 +699,7 @@ bool CMipsMemoryVM::LW_NonMemory(uint32_t PAddr, uint32_t* Value)
case 0x04400000: Load32VideoInterface(); break; case 0x04400000: Load32VideoInterface(); break;
case 0x04500000: Load32AudioInterface(); break; case 0x04500000: Load32AudioInterface(); break;
case 0x04600000: Load32PeripheralInterface(); break; case 0x04600000: Load32PeripheralInterface(); break;
case 0x04700000: Load32RDRAMInterface(); break; case 0x04700000: m_RDRAMInterfaceHandler.Read32(PAddr, m_MemLookupValue.UW[0]); break;
case 0x04800000: Load32SerialInterface(); break; case 0x04800000: Load32SerialInterface(); break;
case 0x05000000: Load32CartridgeDomain2Address1(); break; case 0x05000000: Load32CartridgeDomain2Address1(); break;
case 0x06000000: Load32CartridgeDomain1Address1(); break; case 0x06000000: Load32CartridgeDomain1Address1(); break;
@ -861,7 +863,7 @@ bool CMipsMemoryVM::SW_NonMemory(uint32_t PAddr, uint32_t Value)
case 0x04400000: Write32VideoInterface(); break; case 0x04400000: Write32VideoInterface(); break;
case 0x04500000: Write32AudioInterface(); break; case 0x04500000: Write32AudioInterface(); break;
case 0x04600000: Write32PeripheralInterface(); break; case 0x04600000: Write32PeripheralInterface(); break;
case 0x04700000: Write32RDRAMInterface(); break; case 0x04700000: m_RDRAMInterfaceHandler.Write32(PAddr, Value, 0xFFFFFFFF); break;
case 0x04800000: Write32SerialInterface(); break; case 0x04800000: Write32SerialInterface(); break;
case 0x05000000: Write32CartridgeDomain2Address1(); break; case 0x05000000: Write32CartridgeDomain2Address1(); break;
case 0x08000000: Write32CartridgeDomain2Address2(); break; case 0x08000000: Write32CartridgeDomain2Address2(); break;
@ -1395,27 +1397,6 @@ void CMipsMemoryVM::Load32PeripheralInterface(void)
} }
} }
void CMipsMemoryVM::Load32RDRAMInterface(void)
{
switch (m_MemLookupAddress & 0x1FFFFFFF)
{
case 0x04700000: m_MemLookupValue.UW[0] = g_Reg->RI_MODE_REG; break;
case 0x04700004: m_MemLookupValue.UW[0] = g_Reg->RI_CONFIG_REG; break;
case 0x04700008: m_MemLookupValue.UW[0] = g_Reg->RI_CURRENT_LOAD_REG; break;
case 0x0470000C: m_MemLookupValue.UW[0] = g_Reg->RI_SELECT_REG; break;
case 0x04700010: m_MemLookupValue.UW[0] = g_Reg->RI_REFRESH_REG; break;
case 0x04700014: m_MemLookupValue.UW[0] = g_Reg->RI_LATENCY_REG; break;
case 0x04700018: m_MemLookupValue.UW[0] = g_Reg->RI_RERROR_REG; break;
case 0x0470001C: m_MemLookupValue.UW[0] = g_Reg->RI_WERROR_REG; break;
default:
m_MemLookupValue.UW[0] = 0;
if (HaveDebugger())
{
g_Notify->BreakPoint(__FILE__, __LINE__);
}
}
}
void CMipsMemoryVM::Load32SerialInterface(void) void CMipsMemoryVM::Load32SerialInterface(void)
{ {
switch (m_MemLookupAddress & 0x1FFFFFFF) switch (m_MemLookupAddress & 0x1FFFFFFF)
@ -2090,26 +2071,6 @@ void CMipsMemoryVM::Write32PeripheralInterface(void)
} }
} }
void CMipsMemoryVM::Write32RDRAMInterface(void)
{
switch (m_MemLookupAddress & 0xFFFFFFF)
{
case 0x04700000: g_Reg->RI_MODE_REG = m_MemLookupValue.UW[0]; break;
case 0x04700004: g_Reg->RI_CONFIG_REG = m_MemLookupValue.UW[0]; break;
case 0x04700008: g_Reg->RI_CURRENT_LOAD_REG = m_MemLookupValue.UW[0]; break;
case 0x0470000C: g_Reg->RI_SELECT_REG = m_MemLookupValue.UW[0]; break;
case 0x04700010: g_Reg->RI_REFRESH_REG = m_MemLookupValue.UW[0]; break;
case 0x04700014: g_Reg->RI_LATENCY_REG = m_MemLookupValue.UW[0]; break;
case 0x04700018: g_Reg->RI_RERROR_REG = m_MemLookupValue.UW[0]; break;
case 0x0470001C: g_Reg->RI_WERROR_REG = m_MemLookupValue.UW[0]; break;
default:
if (HaveDebugger())
{
g_Notify->BreakPoint(__FILE__, __LINE__);
}
}
}
void CMipsMemoryVM::Write32SerialInterface(void) void CMipsMemoryVM::Write32SerialInterface(void)
{ {
switch (m_MemLookupAddress & 0xFFFFFFF) switch (m_MemLookupAddress & 0xFFFFFFF)

View File

@ -1,12 +1,13 @@
#pragma once #pragma once
#include <Project64-core/N64System/Mips/MemoryVirtualMem.h> #include <Project64-core\N64System\Mips\MemoryVirtualMem.h>
#include "TranslateVaddr.h" #include "TranslateVaddr.h"
#include <Project64-core/N64System/Recompiler/RecompilerOps.h> #include <Project64-core\N64System\Recompiler\RecompilerOps.h>
#include <Project64-core/N64System/Interpreter/InterpreterOps.h> #include <Project64-core\N64System\Interpreter\InterpreterOps.h>
#include <Project64-core/N64System/Mips/PifRam.h> #include <Project64-core\N64System\Mips\PifRam.h>
#include <Project64-core/N64System/Mips/FlashRam.h> #include <Project64-core\N64System\Mips\FlashRam.h>
#include <Project64-core/N64System/Mips/Sram.h> #include <Project64-core\N64System\Mips\Sram.h>
#include <Project64-core/N64System/Mips/Dma.h> #include <Project64-core\N64System\Mips\Dma.h>
#include <Project64-core\N64System\MemoryHandler\RDRAMInterfaceHandler.h>
#include <Project64-core\Settings\GameSettings.h> #include <Project64-core\Settings\GameSettings.h>
#ifdef __arm__ #ifdef __arm__
@ -45,7 +46,7 @@ class CMipsMemoryVM :
private CGameSettings private CGameSettings
{ {
public: public:
CMipsMemoryVM(bool SavesReadOnly); CMipsMemoryVM(CRegisters & Reg, bool SavesReadOnly);
~CMipsMemoryVM(); ~CMipsMemoryVM();
static void ReserveMemory(); static void ReserveMemory();
@ -138,7 +139,6 @@ private:
static void Load32VideoInterface(void); static void Load32VideoInterface(void);
static void Load32AudioInterface(void); static void Load32AudioInterface(void);
static void Load32PeripheralInterface(void); static void Load32PeripheralInterface(void);
static void Load32RDRAMInterface(void);
static void Load32SerialInterface(void); static void Load32SerialInterface(void);
static void Load32CartridgeDomain1Address1(void); static void Load32CartridgeDomain1Address1(void);
static void Load32CartridgeDomain1Address3(void); static void Load32CartridgeDomain1Address3(void);
@ -154,7 +154,6 @@ private:
static void Write32VideoInterface(void); static void Write32VideoInterface(void);
static void Write32AudioInterface(void); static void Write32AudioInterface(void);
static void Write32PeripheralInterface(void); static void Write32PeripheralInterface(void);
static void Write32RDRAMInterface(void);
static void Write32SerialInterface(void); static void Write32SerialInterface(void);
static void Write32CartridgeDomain2Address1(void); static void Write32CartridgeDomain2Address1(void);
static void Write32CartridgeDomain2Address2(void); static void Write32CartridgeDomain2Address2(void);
@ -185,6 +184,8 @@ private:
void FreeMemory(); void FreeMemory();
static uint8_t * m_Reserve1, *m_Reserve2; static uint8_t * m_Reserve1, *m_Reserve2;
CRegisters & m_Reg;
RDRAMInterfaceHandler m_RDRAMInterfaceHandler;
uint8_t * m_RDRAM, *m_DMEM, *m_IMEM; uint8_t * m_RDRAM, *m_DMEM, *m_IMEM;
uint32_t m_AllocatedRdramSize; uint32_t m_AllocatedRdramSize;
bool m_RomMapped; bool m_RomMapped;

View File

@ -156,19 +156,6 @@ PeripheralInterfaceReg::PeripheralInterfaceReg(uint32_t * PeripheralInterface) :
{ {
} }
RDRAMInt_InterfaceReg::RDRAMInt_InterfaceReg(uint32_t * RdramInterface) :
RI_MODE_REG(RdramInterface[0]),
RI_CONFIG_REG(RdramInterface[1]),
RI_CURRENT_LOAD_REG(RdramInterface[2]),
RI_SELECT_REG(RdramInterface[3]),
RI_COUNT_REG(RdramInterface[4]),
RI_REFRESH_REG(RdramInterface[4]),
RI_LATENCY_REG(RdramInterface[5]),
RI_RERROR_REG(RdramInterface[6]),
RI_WERROR_REG(RdramInterface[7])
{
}
DisplayControlReg::DisplayControlReg(uint32_t * _DisplayProcessor) : DisplayControlReg::DisplayControlReg(uint32_t * _DisplayProcessor) :
DPC_START_REG(_DisplayProcessor[0]), DPC_START_REG(_DisplayProcessor[0]),
DPC_END_REG(_DisplayProcessor[1]), DPC_END_REG(_DisplayProcessor[1]),
@ -236,7 +223,7 @@ CRegisters::CRegisters(CN64System * System, CSystemEvents * SystemEvents) :
Video_InterfaceReg(m_Video_Interface), Video_InterfaceReg(m_Video_Interface),
AudioInterfaceReg(m_Audio_Interface), AudioInterfaceReg(m_Audio_Interface),
PeripheralInterfaceReg(m_Peripheral_Interface), PeripheralInterfaceReg(m_Peripheral_Interface),
RDRAMInt_InterfaceReg(m_RDRAM_Interface), RDRAMInterfaceReg(m_RDRAM_Interface),
SigProcessor_InterfaceReg(m_SigProcessor_Interface), SigProcessor_InterfaceReg(m_SigProcessor_Interface),
DisplayControlReg(m_Display_ControlReg), DisplayControlReg(m_Display_ControlReg),
Serial_InterfaceReg(m_SerialInterface), Serial_InterfaceReg(m_SerialInterface),

View File

@ -1,10 +1,11 @@
#pragma once #pragma once
#include <Common/Platform.h> #include <Common/Platform.h>
#include <Project64-core/N64System/N64Types.h> #include <Project64-core\N64System\N64Types.h>
#include <Project64-core/Settings/DebugSettings.h> #include <Project64-core\N64System\MemoryHandler\RDRAMInterfaceHandler.h>
#include <Project64-core/Settings/GameSettings.h> #include <Project64-core\Settings\DebugSettings.h>
#include <Project64-core/Logging.h> #include <Project64-core\Settings\GameSettings.h>
#include <Project64-core\Logging.h>
// CPO registers by name // CPO registers by name
class CP0registers class CP0registers
@ -341,28 +342,6 @@ private:
PeripheralInterfaceReg& operator=(const PeripheralInterfaceReg&); PeripheralInterfaceReg& operator=(const PeripheralInterfaceReg&);
}; };
class RDRAMInt_InterfaceReg
{
protected:
RDRAMInt_InterfaceReg (uint32_t * RdramInterface);
public:
uint32_t & RI_MODE_REG;
uint32_t & RI_CONFIG_REG;
uint32_t & RI_CURRENT_LOAD_REG;
uint32_t & RI_SELECT_REG;
uint32_t & RI_COUNT_REG;
uint32_t & RI_REFRESH_REG;
uint32_t & RI_LATENCY_REG;
uint32_t & RI_RERROR_REG;
uint32_t & RI_WERROR_REG;
private:
RDRAMInt_InterfaceReg();
RDRAMInt_InterfaceReg(const RDRAMInt_InterfaceReg&);
RDRAMInt_InterfaceReg& operator=(const RDRAMInt_InterfaceReg&);
};
// Signal processor interface // Signal processor interface
class SigProcessor_InterfaceReg class SigProcessor_InterfaceReg
{ {
@ -577,7 +556,7 @@ class CRegisters :
public Video_InterfaceReg, public Video_InterfaceReg,
public AudioInterfaceReg, public AudioInterfaceReg,
public PeripheralInterfaceReg, public PeripheralInterfaceReg,
public RDRAMInt_InterfaceReg, public RDRAMInterfaceReg,
public SigProcessor_InterfaceReg, public SigProcessor_InterfaceReg,
public DisplayControlReg, public DisplayControlReg,
public Serial_InterfaceReg, public Serial_InterfaceReg,

View File

@ -30,7 +30,7 @@ CN64System::CN64System(CPlugins * Plugins, uint32_t randomizer_seed, bool SavesR
m_Plugins(Plugins), m_Plugins(Plugins),
m_SyncCPU(nullptr), m_SyncCPU(nullptr),
m_SyncPlugins(nullptr), m_SyncPlugins(nullptr),
m_MMU_VM(SavesReadOnly), m_MMU_VM(m_Reg, SavesReadOnly),
//m_Cheats(m_MMU_VM), //m_Cheats(m_MMU_VM),
m_TLB(this), m_TLB(this),
m_Reg(this, this), m_Reg(this, this),

View File

@ -53,6 +53,7 @@
<ClCompile Include="N64System\Interpreter\InterpreterCPU.cpp" /> <ClCompile Include="N64System\Interpreter\InterpreterCPU.cpp" />
<ClCompile Include="N64System\Interpreter\InterpreterOps.cpp" /> <ClCompile Include="N64System\Interpreter\InterpreterOps.cpp" />
<ClCompile Include="N64System\Interpreter\InterpreterOps32.cpp" /> <ClCompile Include="N64System\Interpreter\InterpreterOps32.cpp" />
<ClCompile Include="N64System\MemoryHandler\RDRAMInterfaceHandler.cpp" />
<ClCompile Include="N64System\Mips\Audio.cpp" /> <ClCompile Include="N64System\Mips\Audio.cpp" />
<ClCompile Include="N64System\Mips\Disk.cpp" /> <ClCompile Include="N64System\Mips\Disk.cpp" />
<ClCompile Include="N64System\Mips\Dma.cpp" /> <ClCompile Include="N64System\Mips\Dma.cpp" />
@ -148,6 +149,8 @@
<ClInclude Include="N64System\Interpreter\InterpreterCPU.h" /> <ClInclude Include="N64System\Interpreter\InterpreterCPU.h" />
<ClInclude Include="N64System\Interpreter\InterpreterOps32.h" /> <ClInclude Include="N64System\Interpreter\InterpreterOps32.h" />
<ClInclude Include="N64System\Interpreter\InterpreterOps.h" /> <ClInclude Include="N64System\Interpreter\InterpreterOps.h" />
<ClInclude Include="N64System\MemoryHandler\MemoryHandler.h" />
<ClInclude Include="N64System\MemoryHandler\RDRAMInterfaceHandler.h" />
<ClInclude Include="N64System\Mips\Audio.h" /> <ClInclude Include="N64System\Mips\Audio.h" />
<ClInclude Include="N64System\Mips\Disk.h" /> <ClInclude Include="N64System\Mips\Disk.h" />
<ClInclude Include="N64System\Mips\Dma.h" /> <ClInclude Include="N64System\Mips\Dma.h" />

View File

@ -94,6 +94,12 @@
<Filter Include="Header Files\N64 System\Enhancement"> <Filter Include="Header Files\N64 System\Enhancement">
<UniqueIdentifier>{ec73ae9e-54e8-4cbe-93fb-1d98d6755619}</UniqueIdentifier> <UniqueIdentifier>{ec73ae9e-54e8-4cbe-93fb-1d98d6755619}</UniqueIdentifier>
</Filter> </Filter>
<Filter Include="Header Files\N64 System\MemoryHandler">
<UniqueIdentifier>{3e6f4352-4933-4138-bbed-1094b988638e}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\N64 System\MemoryHandler">
<UniqueIdentifier>{f32cf723-4acb-4d3d-9bd9-05823579f8dd}</UniqueIdentifier>
</Filter>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClCompile Include="stdafx.cpp"> <ClCompile Include="stdafx.cpp">
@ -351,6 +357,9 @@
<ClCompile Include="N64System\N64Rom.cpp"> <ClCompile Include="N64System\N64Rom.cpp">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="N64System\MemoryHandler\RDRAMInterfaceHandler.cpp">
<Filter>Source Files\N64 System\MemoryHandler</Filter>
</ClCompile>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClInclude Include="stdafx.h"> <ClInclude Include="stdafx.h">
@ -668,6 +677,12 @@
<ClInclude Include="N64System\Enhancement\EnhancementList.h"> <ClInclude Include="N64System\Enhancement\EnhancementList.h">
<Filter>Header Files\N64 System\Enhancement</Filter> <Filter>Header Files\N64 System\Enhancement</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="N64System\MemoryHandler\RDRAMInterfaceHandler.h">
<Filter>Header Files\N64 System\MemoryHandler</Filter>
</ClInclude>
<ClInclude Include="N64System\MemoryHandler\MemoryHandler.h">
<Filter>Header Files\N64 System\MemoryHandler</Filter>
</ClInclude>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="Version.h.in"> <None Include="Version.h.in">