{Project64] Cleanup MemoryVirtualMem.cpp

This commit is contained in:
zilmar 2015-12-13 18:26:31 +11:00
parent abcfe60a51
commit d8a4b4810b
2 changed files with 200 additions and 200 deletions

View File

@ -24,22 +24,22 @@ uint8_t * CMipsMemoryVM::m_Reserve2 = NULL;
CMipsMemoryVM::CMipsMemoryVM(CMipsMemory_CallBack * CallBack, bool SavesReadOnly) :
CPifRam(SavesReadOnly),
CFlashram(SavesReadOnly),
CSram(SavesReadOnly),
CDMA(*this, *this),
m_CBClass(CallBack),
m_RomMapped(false),
m_Rom(NULL),
m_RomSize(0),
m_RomWrittenTo(false),
m_RomWroteValue(0),
m_HalfLine(0),
m_HalfLineCheck(false),
m_FieldSerration(0),
m_TempValue(0),
m_TLB_ReadMap(NULL),
m_TLB_WriteMap(NULL)
CPifRam(SavesReadOnly),
CFlashram(SavesReadOnly),
CSram(SavesReadOnly),
CDMA(*this, *this),
m_CBClass(CallBack),
m_RomMapped(false),
m_Rom(NULL),
m_RomSize(0),
m_RomWrittenTo(false),
m_RomWroteValue(0),
m_HalfLine(0),
m_HalfLineCheck(false),
m_FieldSerration(0),
m_TempValue(0),
m_TLB_ReadMap(NULL),
m_TLB_WriteMap(NULL)
{
g_Settings->RegisterChangeCB(Game_RDRamSize, this, (CSettings::SettingChangedFunc)RdramChanged);
m_RDRAM = NULL;

View File

@ -66,34 +66,34 @@ public:
static void ReserveMemory();
static void FreeReservedMemory();
bool Initialize ();
void Reset ( bool EraseMemory );
bool Initialize();
void Reset(bool EraseMemory);
uint8_t * Rdram ();
uint32_t RdramSize ();
uint8_t * Dmem ();
uint8_t * Imem ();
uint8_t * PifRam ();
uint8_t * Rdram();
uint32_t RdramSize();
uint8_t * Dmem();
uint8_t * Imem();
uint8_t * PifRam();
bool LB_VAddr ( uint32_t VAddr, uint8_t & Value );
bool LH_VAddr ( uint32_t VAddr, uint16_t & Value );
bool LW_VAddr ( uint32_t VAddr, uint32_t & Value );
bool LD_VAddr ( uint32_t VAddr, uint64_t & Value );
bool LB_VAddr(uint32_t VAddr, uint8_t & Value);
bool LH_VAddr(uint32_t VAddr, uint16_t & Value);
bool LW_VAddr(uint32_t VAddr, uint32_t & Value);
bool LD_VAddr(uint32_t VAddr, uint64_t & Value);
bool LB_PAddr ( uint32_t PAddr, uint8_t & Value );
bool LH_PAddr ( uint32_t PAddr, uint16_t & Value );
bool LW_PAddr ( uint32_t PAddr, uint32_t & Value );
bool LD_PAddr ( uint32_t PAddr, uint64_t & Value );
bool LB_PAddr(uint32_t PAddr, uint8_t & Value);
bool LH_PAddr(uint32_t PAddr, uint16_t & Value);
bool LW_PAddr(uint32_t PAddr, uint32_t & Value);
bool LD_PAddr(uint32_t PAddr, uint64_t & Value);
bool SB_VAddr ( uint32_t VAddr, uint8_t Value );
bool SH_VAddr ( uint32_t VAddr, uint16_t Value );
bool SW_VAddr ( uint32_t VAddr, uint32_t Value );
bool SD_VAddr ( uint32_t VAddr, uint64_t Value );
bool SB_VAddr(uint32_t VAddr, uint8_t Value);
bool SH_VAddr(uint32_t VAddr, uint16_t Value);
bool SW_VAddr(uint32_t VAddr, uint32_t Value);
bool SD_VAddr(uint32_t VAddr, uint64_t Value);
bool SB_PAddr ( uint32_t PAddr, uint8_t Value );
bool SH_PAddr ( uint32_t PAddr, uint16_t Value );
bool SW_PAddr ( uint32_t PAddr, uint32_t Value );
bool SD_PAddr ( uint32_t PAddr, uint64_t Value );
bool SB_PAddr(uint32_t PAddr, uint8_t Value);
bool SH_PAddr(uint32_t PAddr, uint16_t Value);
bool SW_PAddr(uint32_t PAddr, uint32_t Value);
bool SD_PAddr(uint32_t PAddr, uint64_t Value);
int32_t MemoryFilter(uint32_t dwExptCode, void * lpExceptionPointer);
void UpdateFieldSerration(uint32_t interlaced);
@ -131,17 +131,17 @@ public:
void Compile_SWC1();
void Compile_SDC1();
void ResetMemoryStack ( CRegInfo& RegInfo );
void Compile_LB ( CX86Ops::x86Reg Reg, uint32_t Addr, bool SignExtend );
void Compile_LH ( CX86Ops::x86Reg Reg, uint32_t Addr, bool SignExtend );
void Compile_LW ( CX86Ops::x86Reg Reg, uint32_t Addr );
void Compile_SB_Const ( uint8_t Value, uint32_t Addr );
void Compile_SB_Register ( CX86Ops::x86Reg Reg, uint32_t Addr );
void Compile_SH_Const ( uint16_t Value, uint32_t Addr );
void Compile_SH_Register ( CX86Ops::x86Reg Reg, uint32_t Addr );
void Compile_SW_Const ( uint32_t Value, uint32_t Addr );
void ResetMemoryStack(CRegInfo& RegInfo);
void Compile_LB(CX86Ops::x86Reg Reg, uint32_t Addr, bool SignExtend);
void Compile_LH(CX86Ops::x86Reg Reg, uint32_t Addr, bool SignExtend);
void Compile_LW(CX86Ops::x86Reg Reg, uint32_t Addr);
void Compile_SB_Const(uint8_t Value, uint32_t Addr);
void Compile_SB_Register(CX86Ops::x86Reg Reg, uint32_t Addr);
void Compile_SH_Const(uint16_t Value, uint32_t Addr);
void Compile_SH_Register(CX86Ops::x86Reg Reg, uint32_t Addr);
void Compile_SW_Const(uint32_t Value, uint32_t Addr);
void Compile_SW_Register ( CX86Ops::x86Reg Reg, uint32_t Addr );
void Compile_SW_Register(CX86Ops::x86Reg Reg, uint32_t Addr);
//Functions for TLB notification
void TLB_Mapped(uint32_t VAddr, uint32_t Len, uint32_t PAddr, bool bReadOnly);
@ -160,28 +160,28 @@ private:
CMipsMemoryVM(const CMipsMemoryVM&); // Disable copy constructor
CMipsMemoryVM& operator=(const CMipsMemoryVM&); // Disable assignment
void Compile_LW ( bool ResultSigned, bool bRecordLLbit );
void Compile_SW ( bool bCheckLLbit );
void Compile_LW(bool ResultSigned, bool bRecordLLbit);
void Compile_SW(bool bCheckLLbit);
static void RdramChanged ( CMipsMemoryVM * _this );
static void ChangeSpStatus ();
static void RdramChanged(CMipsMemoryVM * _this);
static void ChangeSpStatus();
static void ChangeMiIntrMask();
bool LB_NonMemory ( uint32_t PAddr, uint32_t * Value, bool SignExtend );
bool LH_NonMemory ( uint32_t PAddr, uint32_t * Value, bool SignExtend );
bool LW_NonMemory ( uint32_t PAddr, uint32_t * Value );
bool LB_NonMemory(uint32_t PAddr, uint32_t * Value, bool SignExtend);
bool LH_NonMemory(uint32_t PAddr, uint32_t * Value, bool SignExtend);
bool LW_NonMemory(uint32_t PAddr, uint32_t * Value);
bool SB_NonMemory ( uint32_t PAddr, uint8_t Value );
bool SH_NonMemory ( uint32_t PAddr, uint16_t Value );
bool SW_NonMemory ( uint32_t PAddr, uint32_t Value );
bool SB_NonMemory(uint32_t PAddr, uint8_t Value);
bool SH_NonMemory(uint32_t PAddr, uint16_t Value);
bool SW_NonMemory(uint32_t PAddr, uint32_t Value);
void Compile_StoreInstructClean (x86Reg AddressReg, int32_t Length );
void Compile_StoreInstructClean(x86Reg AddressReg, int32_t Length);
CMipsMemory_CallBack * const m_CBClass;
//Memory Locations
static uint8_t * m_Reserve1, * m_Reserve2;
uint8_t * m_RDRAM, * m_DMEM, * m_IMEM;
static uint8_t * m_Reserve1, *m_Reserve2;
uint8_t * m_RDRAM, *m_DMEM, *m_IMEM;
uint32_t m_AllocatedRdramSize;
//Rom Information