Merge pull request #423 from lioncash/void
Remove superfluous void parameter usages.
This commit is contained in:
commit
f75a6e489c
|
@ -29,7 +29,8 @@ CCheats::CCheats (const CN64Rom * Rom ) :
|
|||
m_hCheatTree = NULL;
|
||||
}
|
||||
|
||||
CCheats::~CCheats(void) {
|
||||
CCheats::~CCheats()
|
||||
{
|
||||
delete m_rcList;
|
||||
delete m_rcAdd;
|
||||
}
|
||||
|
@ -613,7 +614,7 @@ bool CCheats::CheatUsesCodeExtensions (const stdstr &LineEntry) {
|
|||
return CodeExtension;
|
||||
}
|
||||
|
||||
void CCheats::RefreshCheatManager(void)
|
||||
void CCheats::RefreshCheatManager()
|
||||
{
|
||||
if (m_Window == NULL) { return; }
|
||||
|
||||
|
|
|
@ -62,11 +62,11 @@ private:
|
|||
enum { MaxGSEntries = 100, IDC_MYTREE = 0x500 };
|
||||
|
||||
bool LoadCode ( int CheatNo, LPCSTR CheatString );
|
||||
void AddCodeLayers ( int CheatNumber, const stdstr &CheatName, HWND hParent, bool CheatActive );
|
||||
void AddCodeLayers ( int CheatNumber, const stdstr &CheatName, HWND hParent, bool CheatActive );
|
||||
//Reload the cheats from the ini file to the select gui
|
||||
void RefreshCheatManager ( void );
|
||||
void ChangeChildrenStatus ( HWND hParent, bool Checked );
|
||||
void CheckParentStatus ( HWND hParent );
|
||||
void RefreshCheatManager ();
|
||||
void ChangeChildrenStatus ( HWND hParent, bool Checked );
|
||||
void CheckParentStatus ( HWND hParent );
|
||||
static stdstr ReadCodeString ( HWND hDlg, bool &validcodes, bool &validoption, bool &nooptions, int &codeformat );
|
||||
static stdstr ReadOptionsString( HWND hDlg, bool &validcodes, bool &validoptions, bool &nooptions, int &codeformat );
|
||||
int ApplyCheatEntry (CMipsMemory * MMU,const CODES & CodeEntry, int CurrentEntry, BOOL Execute );
|
||||
|
|
|
@ -227,7 +227,7 @@ bool DelaySlotEffectsCompare (DWORD PC, DWORD Reg1, DWORD Reg2)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
void CInterpreterCPU::BuildCPU (void)
|
||||
void CInterpreterCPU::BuildCPU()
|
||||
{
|
||||
R4300iOp::m_TestTimer = FALSE;
|
||||
R4300iOp::m_NextInstruction = NORMAL;
|
||||
|
@ -243,7 +243,7 @@ void CInterpreterCPU::BuildCPU (void)
|
|||
}
|
||||
}
|
||||
|
||||
void CInterpreterCPU::InPermLoop (void)
|
||||
void CInterpreterCPU::InPermLoop()
|
||||
{
|
||||
// *** Changed ***/
|
||||
//if (CPU_Type == CPU_SyncCores)
|
||||
|
@ -277,7 +277,7 @@ void CInterpreterCPU::InPermLoop (void)
|
|||
}
|
||||
}
|
||||
|
||||
void CInterpreterCPU::ExecuteCPU (void)
|
||||
void CInterpreterCPU::ExecuteCPU()
|
||||
{
|
||||
bool & Done = g_System->m_EndEmulation;
|
||||
DWORD & PROGRAM_COUNTER = *_PROGRAM_COUNTER;
|
||||
|
@ -363,7 +363,7 @@ void CInterpreterCPU::ExecuteCPU (void)
|
|||
}
|
||||
|
||||
|
||||
void CInterpreterCPU::ExecuteOps ( int Cycles )
|
||||
void CInterpreterCPU::ExecuteOps(int Cycles)
|
||||
{
|
||||
bool & Done = g_System->m_EndEmulation;
|
||||
DWORD & PROGRAM_COUNTER = *_PROGRAM_COUNTER;
|
||||
|
|
|
@ -14,15 +14,15 @@ class CInterpreterCPU :
|
|||
private R4300iOp
|
||||
{
|
||||
public:
|
||||
static void BuildCPU ( void );
|
||||
static void ExecuteCPU ( void );
|
||||
static void ExecuteOps ( int Cycles );
|
||||
static void InPermLoop ( void );
|
||||
static void BuildCPU();
|
||||
static void ExecuteCPU();
|
||||
static void ExecuteOps(int Cycles);
|
||||
static void InPermLoop();
|
||||
|
||||
private:
|
||||
CInterpreterCPU(void); // Disable default constructor
|
||||
CInterpreterCPU(const CInterpreterCPU&); // Disable copy constructor
|
||||
CInterpreterCPU& operator=(const CInterpreterCPU&); // Disable assignment
|
||||
CInterpreterCPU(); // Disable default constructor
|
||||
CInterpreterCPU(const CInterpreterCPU&); // Disable copy constructor
|
||||
CInterpreterCPU& operator=(const CInterpreterCPU&); // Disable assignment
|
||||
|
||||
static R4300iOp::Func * m_R4300i_Opcode;
|
||||
};
|
||||
|
|
|
@ -34,7 +34,7 @@ bool DelaySlotEffectsCompare ( DWORD PC, DWORD Reg1, DWORD Reg2 );
|
|||
m_JumpToLocation = (*_PROGRAM_COUNTER);\
|
||||
return;
|
||||
|
||||
R4300iOp32::Func * R4300iOp32::BuildInterpreter (void )
|
||||
R4300iOp32::Func * R4300iOp32::BuildInterpreter()
|
||||
{
|
||||
Jump_Opcode[ 0] = SPECIAL;
|
||||
Jump_Opcode[ 1] = REGIMM;
|
||||
|
@ -628,7 +628,7 @@ R4300iOp32::Func * R4300iOp32::BuildInterpreter (void )
|
|||
|
||||
|
||||
/************************* Opcode functions *************************/
|
||||
void R4300iOp32::JAL (void)
|
||||
void R4300iOp32::JAL()
|
||||
{
|
||||
m_NextInstruction = DELAY_SLOT;
|
||||
m_JumpToLocation = ((*_PROGRAM_COUNTER) & 0xF0000000) + (m_Opcode.target << 2);
|
||||
|
@ -640,7 +640,7 @@ void R4300iOp32::JAL (void)
|
|||
}
|
||||
}
|
||||
|
||||
void R4300iOp32::BEQ (void)
|
||||
void R4300iOp32::BEQ()
|
||||
{
|
||||
m_NextInstruction = DELAY_SLOT;
|
||||
if (_GPR[m_Opcode.rs].W[0] == _GPR[m_Opcode.rt].W[0])
|
||||
|
@ -660,7 +660,7 @@ void R4300iOp32::BEQ (void)
|
|||
}
|
||||
}
|
||||
|
||||
void R4300iOp32::BNE (void)
|
||||
void R4300iOp32::BNE()
|
||||
{
|
||||
m_NextInstruction = DELAY_SLOT;
|
||||
if (_GPR[m_Opcode.rs].W[0] != _GPR[m_Opcode.rt].W[0])
|
||||
|
@ -680,7 +680,7 @@ void R4300iOp32::BNE (void)
|
|||
}
|
||||
}
|
||||
|
||||
void R4300iOp32::BLEZ (void) {
|
||||
void R4300iOp32::BLEZ() {
|
||||
m_NextInstruction = DELAY_SLOT;
|
||||
if (_GPR[m_Opcode.rs].W[0] <= 0)
|
||||
{
|
||||
|
@ -699,7 +699,7 @@ void R4300iOp32::BLEZ (void) {
|
|||
}
|
||||
}
|
||||
|
||||
void R4300iOp32::BGTZ (void)
|
||||
void R4300iOp32::BGTZ()
|
||||
{
|
||||
m_NextInstruction = DELAY_SLOT;
|
||||
if (_GPR[m_Opcode.rs].W[0] > 0)
|
||||
|
@ -719,7 +719,7 @@ void R4300iOp32::BGTZ (void)
|
|||
}
|
||||
}
|
||||
|
||||
void R4300iOp32::ADDI (void)
|
||||
void R4300iOp32::ADDI()
|
||||
{
|
||||
#ifdef Interpreter_StackTest
|
||||
if (m_Opcode.rs == 29 && m_Opcode.rt == 29)
|
||||
|
@ -736,7 +736,7 @@ void R4300iOp32::ADDI (void)
|
|||
#endif
|
||||
}
|
||||
|
||||
void R4300iOp32::ADDIU (void)
|
||||
void R4300iOp32::ADDIU()
|
||||
{
|
||||
#ifdef Interpreter_StackTest
|
||||
if (m_Opcode.rs == 29 && m_Opcode.rt == 29)
|
||||
|
@ -753,7 +753,7 @@ void R4300iOp32::ADDIU (void)
|
|||
#endif
|
||||
}
|
||||
|
||||
void R4300iOp32::SLTI (void)
|
||||
void R4300iOp32::SLTI()
|
||||
{
|
||||
if (_GPR[m_Opcode.rs].W[0] < (__int64)((short)m_Opcode.immediate))
|
||||
{
|
||||
|
@ -765,7 +765,7 @@ void R4300iOp32::SLTI (void)
|
|||
}
|
||||
}
|
||||
|
||||
void R4300iOp32::SLTIU (void)
|
||||
void R4300iOp32::SLTIU()
|
||||
{
|
||||
int imm32 = (short)m_Opcode.immediate;
|
||||
__int64 imm64;
|
||||
|
@ -774,22 +774,22 @@ void R4300iOp32::SLTIU (void)
|
|||
_GPR[m_Opcode.rt].W[0] = _GPR[m_Opcode.rs].UW[0] < (unsigned __int64)imm64?1:0;
|
||||
}
|
||||
|
||||
void R4300iOp32::ANDI (void)
|
||||
void R4300iOp32::ANDI()
|
||||
{
|
||||
_GPR[m_Opcode.rt].W[0] = _GPR[m_Opcode.rs].W[0] & m_Opcode.immediate;
|
||||
}
|
||||
|
||||
void R4300iOp32::ORI (void)
|
||||
void R4300iOp32::ORI()
|
||||
{
|
||||
_GPR[m_Opcode.rt].W[0] = _GPR[m_Opcode.rs].W[0] | m_Opcode.immediate;
|
||||
}
|
||||
|
||||
void R4300iOp32::XORI (void)
|
||||
void R4300iOp32::XORI()
|
||||
{
|
||||
_GPR[m_Opcode.rt].W[0] = _GPR[m_Opcode.rs].W[0] ^ m_Opcode.immediate;
|
||||
}
|
||||
|
||||
void R4300iOp32::LUI (void)
|
||||
void R4300iOp32::LUI()
|
||||
{
|
||||
_GPR[m_Opcode.rt].W[0] = (long)((short)m_Opcode.offset << 16);
|
||||
#ifdef Interpreter_StackTest
|
||||
|
@ -800,7 +800,7 @@ void R4300iOp32::LUI (void)
|
|||
#endif
|
||||
}
|
||||
|
||||
void R4300iOp32::BEQL (void)
|
||||
void R4300iOp32::BEQL()
|
||||
{
|
||||
if (_GPR[m_Opcode.rs].W[0] == _GPR[m_Opcode.rt].W[0])
|
||||
{
|
||||
|
@ -821,7 +821,7 @@ void R4300iOp32::BEQL (void)
|
|||
}
|
||||
}
|
||||
|
||||
void R4300iOp32::BNEL (void)
|
||||
void R4300iOp32::BNEL()
|
||||
{
|
||||
if (_GPR[m_Opcode.rs].W[0] != _GPR[m_Opcode.rt].W[0])
|
||||
{
|
||||
|
@ -842,7 +842,7 @@ void R4300iOp32::BNEL (void)
|
|||
}
|
||||
}
|
||||
|
||||
void R4300iOp32::BLEZL (void)
|
||||
void R4300iOp32::BLEZL()
|
||||
{
|
||||
if (_GPR[m_Opcode.rs].W[0] <= 0)
|
||||
{
|
||||
|
@ -863,7 +863,7 @@ void R4300iOp32::BLEZL (void)
|
|||
}
|
||||
}
|
||||
|
||||
void R4300iOp32::BGTZL (void)
|
||||
void R4300iOp32::BGTZL()
|
||||
{
|
||||
if (_GPR[m_Opcode.rs].W[0] > 0)
|
||||
{
|
||||
|
@ -884,7 +884,7 @@ void R4300iOp32::BGTZL (void)
|
|||
}
|
||||
}
|
||||
|
||||
void R4300iOp32::LB (void)
|
||||
void R4300iOp32::LB()
|
||||
{
|
||||
DWORD Address = _GPR[m_Opcode.base].UW[0] + (short)m_Opcode.offset;
|
||||
if (!g_MMU->LB_VAddr(Address,_GPR[m_Opcode.rt].UB[0]))
|
||||
|
@ -901,7 +901,7 @@ void R4300iOp32::LB (void)
|
|||
}
|
||||
}
|
||||
|
||||
void R4300iOp32::LH (void)
|
||||
void R4300iOp32::LH()
|
||||
{
|
||||
DWORD Address = _GPR[m_Opcode.base].UW[0] + (short)m_Opcode.offset;
|
||||
if ((Address & 1) != 0)
|
||||
|
@ -922,7 +922,7 @@ void R4300iOp32::LH (void)
|
|||
}
|
||||
}
|
||||
|
||||
void R4300iOp32::LWL (void)
|
||||
void R4300iOp32::LWL()
|
||||
{
|
||||
DWORD Offset, Address, Value;
|
||||
|
||||
|
@ -943,7 +943,7 @@ void R4300iOp32::LWL (void)
|
|||
_GPR[m_Opcode.rt].W[0] += (int)(Value << LWL_SHIFT[Offset]);
|
||||
}
|
||||
|
||||
void R4300iOp32::LW (void)
|
||||
void R4300iOp32::LW()
|
||||
{
|
||||
DWORD Address = _GPR[m_Opcode.base].UW[0] + (short)m_Opcode.offset;
|
||||
if ((Address & 3) != 0)
|
||||
|
@ -970,7 +970,7 @@ void R4300iOp32::LW (void)
|
|||
}
|
||||
}
|
||||
|
||||
void R4300iOp32::LBU (void)
|
||||
void R4300iOp32::LBU()
|
||||
{
|
||||
DWORD Address = _GPR[m_Opcode.base].UW[0] + (short)m_Opcode.offset;
|
||||
if (!g_MMU->LB_VAddr(Address,_GPR[m_Opcode.rt].UB[0]))
|
||||
|
@ -987,7 +987,7 @@ void R4300iOp32::LBU (void)
|
|||
}
|
||||
}
|
||||
|
||||
void R4300iOp32::LHU (void)
|
||||
void R4300iOp32::LHU()
|
||||
{
|
||||
DWORD Address = _GPR[m_Opcode.base].UW[0] + (short)m_Opcode.offset;
|
||||
if ((Address & 1) != 0)
|
||||
|
@ -1008,7 +1008,7 @@ void R4300iOp32::LHU (void)
|
|||
}
|
||||
}
|
||||
|
||||
void R4300iOp32::LWR (void)
|
||||
void R4300iOp32::LWR()
|
||||
{
|
||||
DWORD Offset, Address, Value;
|
||||
|
||||
|
@ -1029,7 +1029,7 @@ void R4300iOp32::LWR (void)
|
|||
_GPR[m_Opcode.rt].W[0] += (int)(Value >> LWR_SHIFT[Offset]);
|
||||
}
|
||||
|
||||
void R4300iOp32::LWU (void)
|
||||
void R4300iOp32::LWU()
|
||||
{
|
||||
DWORD Address = _GPR[m_Opcode.base].UW[0] + (short)m_Opcode.offset;
|
||||
if ((Address & 3) != 0)
|
||||
|
@ -1052,7 +1052,7 @@ void R4300iOp32::LWU (void)
|
|||
}
|
||||
|
||||
|
||||
void R4300iOp32::LL (void)
|
||||
void R4300iOp32::LL()
|
||||
{
|
||||
DWORD Address = _GPR[m_Opcode.base].UW[0] + (short)m_Opcode.offset;
|
||||
if ((Address & 3) != 0)
|
||||
|
@ -1076,37 +1076,37 @@ void R4300iOp32::LL (void)
|
|||
}
|
||||
|
||||
/********************** R4300i OpCodes: Special **********************/
|
||||
void R4300iOp32::SPECIAL_SLL (void)
|
||||
void R4300iOp32::SPECIAL_SLL()
|
||||
{
|
||||
_GPR[m_Opcode.rd].W[0] = (_GPR[m_Opcode.rt].W[0] << m_Opcode.sa);
|
||||
}
|
||||
|
||||
void R4300iOp32::SPECIAL_SRL (void)
|
||||
void R4300iOp32::SPECIAL_SRL()
|
||||
{
|
||||
_GPR[m_Opcode.rd].W[0] = (int)(_GPR[m_Opcode.rt].UW[0] >> m_Opcode.sa);
|
||||
}
|
||||
|
||||
void R4300iOp32::SPECIAL_SRA (void)
|
||||
void R4300iOp32::SPECIAL_SRA()
|
||||
{
|
||||
_GPR[m_Opcode.rd].W[0] = (_GPR[m_Opcode.rt].W[0] >> m_Opcode.sa);
|
||||
}
|
||||
|
||||
void R4300iOp32::SPECIAL_SLLV (void)
|
||||
void R4300iOp32::SPECIAL_SLLV()
|
||||
{
|
||||
_GPR[m_Opcode.rd].W[0] = (_GPR[m_Opcode.rt].W[0] << (_GPR[m_Opcode.rs].UW[0] & 0x1F));
|
||||
}
|
||||
|
||||
void R4300iOp32::SPECIAL_SRLV (void)
|
||||
void R4300iOp32::SPECIAL_SRLV()
|
||||
{
|
||||
_GPR[m_Opcode.rd].W[0] = (int)(_GPR[m_Opcode.rt].UW[0] >> (_GPR[m_Opcode.rs].UW[0] & 0x1F));
|
||||
}
|
||||
|
||||
void R4300iOp32::SPECIAL_SRAV (void)
|
||||
void R4300iOp32::SPECIAL_SRAV()
|
||||
{
|
||||
_GPR[m_Opcode.rd].W[0] = (_GPR[m_Opcode.rt].W[0] >> (_GPR[m_Opcode.rs].UW[0] & 0x1F));
|
||||
}
|
||||
|
||||
void R4300iOp32::SPECIAL_JALR (void)
|
||||
void R4300iOp32::SPECIAL_JALR()
|
||||
{
|
||||
m_NextInstruction = DELAY_SLOT;
|
||||
m_JumpToLocation = _GPR[m_Opcode.rs].UW[0];
|
||||
|
@ -1114,32 +1114,32 @@ void R4300iOp32::SPECIAL_JALR (void)
|
|||
m_TestTimer = TRUE;
|
||||
}
|
||||
|
||||
void R4300iOp32::SPECIAL_ADD (void)
|
||||
void R4300iOp32::SPECIAL_ADD()
|
||||
{
|
||||
_GPR[m_Opcode.rd].W[0] = _GPR[m_Opcode.rs].W[0] + _GPR[m_Opcode.rt].W[0];
|
||||
}
|
||||
|
||||
void R4300iOp32::SPECIAL_ADDU (void)
|
||||
void R4300iOp32::SPECIAL_ADDU()
|
||||
{
|
||||
_GPR[m_Opcode.rd].W[0] = _GPR[m_Opcode.rs].W[0] + _GPR[m_Opcode.rt].W[0];
|
||||
}
|
||||
|
||||
void R4300iOp32::SPECIAL_SUB (void)
|
||||
void R4300iOp32::SPECIAL_SUB()
|
||||
{
|
||||
_GPR[m_Opcode.rd].W[0] = _GPR[m_Opcode.rs].W[0] - _GPR[m_Opcode.rt].W[0];
|
||||
}
|
||||
|
||||
void R4300iOp32::SPECIAL_SUBU (void)
|
||||
void R4300iOp32::SPECIAL_SUBU()
|
||||
{
|
||||
_GPR[m_Opcode.rd].W[0] = _GPR[m_Opcode.rs].W[0] - _GPR[m_Opcode.rt].W[0];
|
||||
}
|
||||
|
||||
void R4300iOp32::SPECIAL_AND (void)
|
||||
void R4300iOp32::SPECIAL_AND()
|
||||
{
|
||||
_GPR[m_Opcode.rd].W[0] = _GPR[m_Opcode.rs].W[0] & _GPR[m_Opcode.rt].W[0];
|
||||
}
|
||||
|
||||
void R4300iOp32::SPECIAL_OR (void)
|
||||
void R4300iOp32::SPECIAL_OR()
|
||||
{
|
||||
_GPR[m_Opcode.rd].W[0] = _GPR[m_Opcode.rs].W[0] | _GPR[m_Opcode.rt].W[0];
|
||||
#ifdef Interpreter_StackTest
|
||||
|
@ -1150,12 +1150,12 @@ void R4300iOp32::SPECIAL_OR (void)
|
|||
#endif
|
||||
}
|
||||
|
||||
void R4300iOp32::SPECIAL_NOR (void)
|
||||
void R4300iOp32::SPECIAL_NOR()
|
||||
{
|
||||
_GPR[m_Opcode.rd].W[0] = ~(_GPR[m_Opcode.rs].W[0] | _GPR[m_Opcode.rt].W[0]);
|
||||
}
|
||||
|
||||
void R4300iOp32::SPECIAL_SLT (void)
|
||||
void R4300iOp32::SPECIAL_SLT()
|
||||
{
|
||||
if (_GPR[m_Opcode.rs].W[0] < _GPR[m_Opcode.rt].W[0])
|
||||
{
|
||||
|
@ -1167,7 +1167,7 @@ void R4300iOp32::SPECIAL_SLT (void)
|
|||
}
|
||||
}
|
||||
|
||||
void R4300iOp32::SPECIAL_SLTU (void)
|
||||
void R4300iOp32::SPECIAL_SLTU()
|
||||
{
|
||||
if (_GPR[m_Opcode.rs].UW[0] < _GPR[m_Opcode.rt].UW[0])
|
||||
{
|
||||
|
@ -1179,7 +1179,7 @@ void R4300iOp32::SPECIAL_SLTU (void)
|
|||
}
|
||||
}
|
||||
|
||||
void R4300iOp32::SPECIAL_TEQ (void)
|
||||
void R4300iOp32::SPECIAL_TEQ()
|
||||
{
|
||||
if (_GPR[m_Opcode.rs].W[0] == _GPR[m_Opcode.rt].W[0] && g_Settings->LoadBool(Debugger_Enabled))
|
||||
{
|
||||
|
@ -1187,18 +1187,18 @@ void R4300iOp32::SPECIAL_TEQ (void)
|
|||
}
|
||||
}
|
||||
|
||||
void R4300iOp32::SPECIAL_DSRL32 (void)
|
||||
void R4300iOp32::SPECIAL_DSRL32()
|
||||
{
|
||||
_GPR[m_Opcode.rd].UW[0] = (DWORD)(_GPR[m_Opcode.rt].UDW >> (m_Opcode.sa + 32));
|
||||
}
|
||||
|
||||
void R4300iOp32::SPECIAL_DSRA32 (void)
|
||||
void R4300iOp32::SPECIAL_DSRA32()
|
||||
{
|
||||
_GPR[m_Opcode.rd].W[0] = (long)(_GPR[m_Opcode.rt].DW >> (m_Opcode.sa + 32));
|
||||
}
|
||||
|
||||
/********************** R4300i OpCodes: RegImm **********************/
|
||||
void R4300iOp32::REGIMM_BLTZ (void)
|
||||
void R4300iOp32::REGIMM_BLTZ()
|
||||
{
|
||||
m_NextInstruction = DELAY_SLOT;
|
||||
if (_GPR[m_Opcode.rs].W[0] < 0)
|
||||
|
@ -1218,7 +1218,7 @@ void R4300iOp32::REGIMM_BLTZ (void)
|
|||
}
|
||||
}
|
||||
|
||||
void R4300iOp32::REGIMM_BGEZ (void)
|
||||
void R4300iOp32::REGIMM_BGEZ()
|
||||
{
|
||||
m_NextInstruction = DELAY_SLOT;
|
||||
if (_GPR[m_Opcode.rs].W[0] >= 0)
|
||||
|
@ -1238,7 +1238,7 @@ void R4300iOp32::REGIMM_BGEZ (void)
|
|||
}
|
||||
}
|
||||
|
||||
void R4300iOp32::REGIMM_BLTZL (void)
|
||||
void R4300iOp32::REGIMM_BLTZL()
|
||||
{
|
||||
if (_GPR[m_Opcode.rs].W[0] < 0)
|
||||
{
|
||||
|
@ -1259,7 +1259,7 @@ void R4300iOp32::REGIMM_BLTZL (void)
|
|||
}
|
||||
}
|
||||
|
||||
void R4300iOp32::REGIMM_BGEZL (void)
|
||||
void R4300iOp32::REGIMM_BGEZL()
|
||||
{
|
||||
if (_GPR[m_Opcode.rs].W[0] >= 0)
|
||||
{
|
||||
|
@ -1280,7 +1280,7 @@ void R4300iOp32::REGIMM_BGEZL (void)
|
|||
}
|
||||
}
|
||||
|
||||
void R4300iOp32::REGIMM_BLTZAL (void)
|
||||
void R4300iOp32::REGIMM_BLTZAL()
|
||||
{
|
||||
m_NextInstruction = DELAY_SLOT;
|
||||
if (_GPR[m_Opcode.rs].W[0] < 0)
|
||||
|
@ -1301,7 +1301,7 @@ void R4300iOp32::REGIMM_BLTZAL (void)
|
|||
_GPR[31].W[0]= (long)((*_PROGRAM_COUNTER) + 8);
|
||||
}
|
||||
|
||||
void R4300iOp32::REGIMM_BGEZAL (void)
|
||||
void R4300iOp32::REGIMM_BGEZAL()
|
||||
{
|
||||
m_NextInstruction = DELAY_SLOT;
|
||||
if (_GPR[m_Opcode.rs].W[0] >= 0)
|
||||
|
@ -1322,7 +1322,7 @@ void R4300iOp32::REGIMM_BGEZAL (void)
|
|||
_GPR[31].W[0] = (long)((*_PROGRAM_COUNTER) + 8);
|
||||
}
|
||||
/************************** COP0 functions **************************/
|
||||
void R4300iOp32::COP0_MF (void) {
|
||||
void R4300iOp32::COP0_MF() {
|
||||
if (LogOptions.LogCP0reads)
|
||||
{
|
||||
LogMessage("%08X: R4300i Read from %s (0x%08X)", (*_PROGRAM_COUNTER), CRegName::Cop0[m_Opcode.rd], _CP0[m_Opcode.rd]);
|
||||
|
@ -1335,7 +1335,7 @@ void R4300iOp32::COP0_MF (void) {
|
|||
_GPR[m_Opcode.rt].W[0] = (int)_CP0[m_Opcode.rd];
|
||||
}
|
||||
|
||||
void R4300iOp32::COP0_MT (void)
|
||||
void R4300iOp32::COP0_MT()
|
||||
{
|
||||
if (LogOptions.LogCP0changes)
|
||||
{
|
||||
|
@ -1409,13 +1409,13 @@ void R4300iOp32::COP0_MT (void)
|
|||
}
|
||||
|
||||
/************************** COP1 functions **************************/
|
||||
void R4300iOp32::COP1_MF (void)
|
||||
void R4300iOp32::COP1_MF()
|
||||
{
|
||||
TEST_COP1_USABLE_EXCEPTION
|
||||
_GPR[m_Opcode.rt].W[0] = *(int *)_FPR_S[m_Opcode.fs];
|
||||
}
|
||||
|
||||
void R4300iOp32::COP1_CF (void)
|
||||
void R4300iOp32::COP1_CF()
|
||||
{
|
||||
TEST_COP1_USABLE_EXCEPTION
|
||||
if (m_Opcode.fs != 31 && m_Opcode.fs != 0)
|
||||
|
@ -1426,7 +1426,7 @@ void R4300iOp32::COP1_CF (void)
|
|||
_GPR[m_Opcode.rt].W[0] = (int)_FPCR[m_Opcode.fs];
|
||||
}
|
||||
|
||||
void R4300iOp32::COP1_DMT (void)
|
||||
void R4300iOp32::COP1_DMT()
|
||||
{
|
||||
TEST_COP1_USABLE_EXCEPTION
|
||||
*(__int64 *)_FPR_D[m_Opcode.fs] = _GPR[m_Opcode.rt].W[0];
|
||||
|
|
|
@ -15,70 +15,70 @@ class R4300iOp32 :
|
|||
{
|
||||
public:
|
||||
/************************* OpCode functions *************************/
|
||||
static void JAL ( void );
|
||||
static void BEQ ( void );
|
||||
static void BNE ( void );
|
||||
static void BLEZ ( void );
|
||||
static void BGTZ ( void );
|
||||
static void ADDI ( void );
|
||||
static void ADDIU ( void );
|
||||
static void SLTI ( void );
|
||||
static void SLTIU ( void );
|
||||
static void ANDI ( void );
|
||||
static void ORI ( void );
|
||||
static void XORI ( void );
|
||||
static void LUI ( void );
|
||||
static void BEQL ( void );
|
||||
static void BNEL ( void );
|
||||
static void BLEZL ( void );
|
||||
static void BGTZL ( void );
|
||||
static void LB ( void );
|
||||
static void LH ( void );
|
||||
static void LWL ( void );
|
||||
static void LW ( void );
|
||||
static void LBU ( void );
|
||||
static void LHU ( void );
|
||||
static void LWR ( void );
|
||||
static void LWU ( void );
|
||||
static void LL ( void );
|
||||
static void JAL();
|
||||
static void BEQ();
|
||||
static void BNE();
|
||||
static void BLEZ();
|
||||
static void BGTZ();
|
||||
static void ADDI();
|
||||
static void ADDIU();
|
||||
static void SLTI();
|
||||
static void SLTIU();
|
||||
static void ANDI();
|
||||
static void ORI();
|
||||
static void XORI();
|
||||
static void LUI();
|
||||
static void BEQL();
|
||||
static void BNEL();
|
||||
static void BLEZL();
|
||||
static void BGTZL();
|
||||
static void LB();
|
||||
static void LH();
|
||||
static void LWL();
|
||||
static void LW();
|
||||
static void LBU();
|
||||
static void LHU();
|
||||
static void LWR();
|
||||
static void LWU();
|
||||
static void LL();
|
||||
|
||||
/********************** R4300i OpCodes: Special **********************/
|
||||
static void SPECIAL_SLL ( void );
|
||||
static void SPECIAL_SRL ( void );
|
||||
static void SPECIAL_SRA ( void );
|
||||
static void SPECIAL_SLLV ( void );
|
||||
static void SPECIAL_SRLV ( void );
|
||||
static void SPECIAL_SRAV ( void );
|
||||
static void SPECIAL_JALR ( void );
|
||||
static void SPECIAL_ADD ( void );
|
||||
static void SPECIAL_ADDU ( void );
|
||||
static void SPECIAL_SUB ( void );
|
||||
static void SPECIAL_SUBU ( void );
|
||||
static void SPECIAL_AND ( void );
|
||||
static void SPECIAL_OR ( void );
|
||||
static void SPECIAL_NOR ( void );
|
||||
static void SPECIAL_SLT ( void );
|
||||
static void SPECIAL_SLTU ( void );
|
||||
static void SPECIAL_TEQ ( void );
|
||||
static void SPECIAL_DSRL32 ( void );
|
||||
static void SPECIAL_DSRA32 ( void );
|
||||
static void SPECIAL_SLL();
|
||||
static void SPECIAL_SRL();
|
||||
static void SPECIAL_SRA();
|
||||
static void SPECIAL_SLLV();
|
||||
static void SPECIAL_SRLV();
|
||||
static void SPECIAL_SRAV();
|
||||
static void SPECIAL_JALR();
|
||||
static void SPECIAL_ADD();
|
||||
static void SPECIAL_ADDU();
|
||||
static void SPECIAL_SUB();
|
||||
static void SPECIAL_SUBU();
|
||||
static void SPECIAL_AND();
|
||||
static void SPECIAL_OR();
|
||||
static void SPECIAL_NOR();
|
||||
static void SPECIAL_SLT();
|
||||
static void SPECIAL_SLTU();
|
||||
static void SPECIAL_TEQ();
|
||||
static void SPECIAL_DSRL32();
|
||||
static void SPECIAL_DSRA32();
|
||||
|
||||
/********************** R4300i OpCodes: RegImm **********************/
|
||||
static void REGIMM_BLTZ ( void );
|
||||
static void REGIMM_BGEZ ( void );
|
||||
static void REGIMM_BLTZL ( void );
|
||||
static void REGIMM_BGEZL ( void );
|
||||
static void REGIMM_BLTZAL ( void );
|
||||
static void REGIMM_BGEZAL ( void );
|
||||
static void REGIMM_BLTZ();
|
||||
static void REGIMM_BGEZ();
|
||||
static void REGIMM_BLTZL();
|
||||
static void REGIMM_BGEZL();
|
||||
static void REGIMM_BLTZAL();
|
||||
static void REGIMM_BGEZAL();
|
||||
|
||||
/************************** COP0 functions **************************/
|
||||
static void COP0_MF ( void );
|
||||
static void COP0_MT ( void );
|
||||
static void COP0_MF();
|
||||
static void COP0_MT();
|
||||
|
||||
/************************** COP1 functions **************************/
|
||||
static void COP1_MF ( void );
|
||||
static void COP1_CF ( void );
|
||||
static void COP1_DMT ( void );
|
||||
static void COP1_MF();
|
||||
static void COP1_CF();
|
||||
static void COP1_DMT();
|
||||
|
||||
static Func * BuildInterpreter (void );
|
||||
static Func* BuildInterpreter();
|
||||
};
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -15,192 +15,193 @@ class R4300iOp :
|
|||
protected CSystemRegisters
|
||||
{
|
||||
public:
|
||||
typedef void ( * Func )();
|
||||
typedef void(*Func)();
|
||||
|
||||
/************************* OpCode functions *************************/
|
||||
static void J ( void );
|
||||
static void JAL ( void );
|
||||
static void BNE ( void );
|
||||
static void BEQ ( void );
|
||||
static void BLEZ ( void );
|
||||
static void BGTZ ( void );
|
||||
static void ADDI ( void );
|
||||
static void ADDIU ( void );
|
||||
static void SLTI ( void );
|
||||
static void SLTIU ( void );
|
||||
static void ANDI ( void );
|
||||
static void ORI ( void );
|
||||
static void XORI ( void );
|
||||
static void LUI ( void );
|
||||
static void BEQL ( void );
|
||||
static void BNEL ( void );
|
||||
static void BLEZL ( void );
|
||||
static void BGTZL ( void );
|
||||
static void DADDIU ( void );
|
||||
static void LDL ( void );
|
||||
static void LDR ( void );
|
||||
static void LB ( void );
|
||||
static void LH ( void );
|
||||
static void LWL ( void );
|
||||
static void LW ( void );
|
||||
static void LBU ( void );
|
||||
static void LHU ( void );
|
||||
static void LWR ( void );
|
||||
static void LWU ( void );
|
||||
static void SB ( void );
|
||||
static void SH ( void );
|
||||
static void SWL ( void );
|
||||
static void SW ( void );
|
||||
static void SDL ( void );
|
||||
static void SDR ( void );
|
||||
static void SWR ( void );
|
||||
static void CACHE ( void );
|
||||
static void LL ( void );
|
||||
static void LWC1 ( void );
|
||||
static void LDC1 ( void );
|
||||
static void LD ( void );
|
||||
static void SC ( void );
|
||||
static void SWC1 ( void );
|
||||
static void SDC1 ( void );
|
||||
static void SD ( void );
|
||||
static void J();
|
||||
static void JAL();
|
||||
static void BNE();
|
||||
static void BEQ();
|
||||
static void BLEZ();
|
||||
static void BGTZ();
|
||||
static void ADDI();
|
||||
static void ADDIU();
|
||||
static void SLTI();
|
||||
static void SLTIU();
|
||||
static void ANDI();
|
||||
static void ORI();
|
||||
static void XORI();
|
||||
static void LUI();
|
||||
static void BEQL();
|
||||
static void BNEL();
|
||||
static void BLEZL();
|
||||
static void BGTZL();
|
||||
static void DADDIU();
|
||||
static void LDL();
|
||||
static void LDR();
|
||||
static void LB();
|
||||
static void LH();
|
||||
static void LWL();
|
||||
static void LW();
|
||||
static void LBU();
|
||||
static void LHU();
|
||||
static void LWR();
|
||||
static void LWU();
|
||||
static void SB();
|
||||
static void SH();
|
||||
static void SWL();
|
||||
static void SW();
|
||||
static void SDL();
|
||||
static void SDR();
|
||||
static void SWR();
|
||||
static void CACHE();
|
||||
static void LL();
|
||||
static void LWC1();
|
||||
static void LDC1();
|
||||
static void LD();
|
||||
static void SC();
|
||||
static void SWC1();
|
||||
static void SDC1();
|
||||
static void SD();
|
||||
|
||||
|
||||
/********************** R4300i OpCodes: Special **********************/
|
||||
static void SPECIAL_SLL ( void );
|
||||
static void SPECIAL_SRL ( void );
|
||||
static void SPECIAL_SRA ( void );
|
||||
static void SPECIAL_SLLV ( void );
|
||||
static void SPECIAL_SRLV ( void );
|
||||
static void SPECIAL_SRAV ( void );
|
||||
static void SPECIAL_JR ( void );
|
||||
static void SPECIAL_JALR ( void );
|
||||
static void SPECIAL_SYSCALL ( void );
|
||||
static void SPECIAL_BREAK ( void );
|
||||
static void SPECIAL_SYNC ( void );
|
||||
static void SPECIAL_MFHI ( void );
|
||||
static void SPECIAL_MTHI ( void );
|
||||
static void SPECIAL_MFLO ( void );
|
||||
static void SPECIAL_MTLO ( void );
|
||||
static void SPECIAL_DSLLV ( void );
|
||||
static void SPECIAL_DSRLV ( void );
|
||||
static void SPECIAL_DSRAV ( void );
|
||||
static void SPECIAL_MULT ( void );
|
||||
static void SPECIAL_MULTU ( void );
|
||||
static void SPECIAL_DIV ( void );
|
||||
static void SPECIAL_DIVU ( void );
|
||||
static void SPECIAL_DMULT ( void );
|
||||
static void SPECIAL_DMULTU ( void );
|
||||
static void SPECIAL_DDIV ( void );
|
||||
static void SPECIAL_DDIVU ( void );
|
||||
static void SPECIAL_ADD ( void );
|
||||
static void SPECIAL_ADDU ( void );
|
||||
static void SPECIAL_SUB ( void );
|
||||
static void SPECIAL_SUBU ( void );
|
||||
static void SPECIAL_AND ( void );
|
||||
static void SPECIAL_OR ( void );
|
||||
static void SPECIAL_XOR ( void );
|
||||
static void SPECIAL_NOR ( void );
|
||||
static void SPECIAL_SLT ( void );
|
||||
static void SPECIAL_SLTU ( void );
|
||||
static void SPECIAL_DADD ( void );
|
||||
static void SPECIAL_DADDU ( void );
|
||||
static void SPECIAL_DSUB ( void );
|
||||
static void SPECIAL_DSUBU ( void );
|
||||
static void SPECIAL_TEQ ( void );
|
||||
static void SPECIAL_DSLL ( void );
|
||||
static void SPECIAL_DSRL ( void );
|
||||
static void SPECIAL_DSRA ( void );
|
||||
static void SPECIAL_DSLL32 ( void );
|
||||
static void SPECIAL_DSRL32 ( void );
|
||||
static void SPECIAL_DSRA32 ( void );
|
||||
static void SPECIAL_SLL();
|
||||
static void SPECIAL_SRL();
|
||||
static void SPECIAL_SRA();
|
||||
static void SPECIAL_SLLV();
|
||||
static void SPECIAL_SRLV();
|
||||
static void SPECIAL_SRAV();
|
||||
static void SPECIAL_JR();
|
||||
static void SPECIAL_JALR();
|
||||
static void SPECIAL_SYSCALL();
|
||||
static void SPECIAL_BREAK();
|
||||
static void SPECIAL_SYNC();
|
||||
static void SPECIAL_MFHI();
|
||||
static void SPECIAL_MTHI();
|
||||
static void SPECIAL_MFLO();
|
||||
static void SPECIAL_MTLO();
|
||||
static void SPECIAL_DSLLV();
|
||||
static void SPECIAL_DSRLV();
|
||||
static void SPECIAL_DSRAV();
|
||||
static void SPECIAL_MULT();
|
||||
static void SPECIAL_MULTU();
|
||||
static void SPECIAL_DIV();
|
||||
static void SPECIAL_DIVU();
|
||||
static void SPECIAL_DMULT();
|
||||
static void SPECIAL_DMULTU();
|
||||
static void SPECIAL_DDIV();
|
||||
static void SPECIAL_DDIVU();
|
||||
static void SPECIAL_ADD();
|
||||
static void SPECIAL_ADDU();
|
||||
static void SPECIAL_SUB();
|
||||
static void SPECIAL_SUBU();
|
||||
static void SPECIAL_AND();
|
||||
static void SPECIAL_OR();
|
||||
static void SPECIAL_XOR();
|
||||
static void SPECIAL_NOR();
|
||||
static void SPECIAL_SLT();
|
||||
static void SPECIAL_SLTU();
|
||||
static void SPECIAL_DADD();
|
||||
static void SPECIAL_DADDU();
|
||||
static void SPECIAL_DSUB();
|
||||
static void SPECIAL_DSUBU();
|
||||
static void SPECIAL_TEQ();
|
||||
static void SPECIAL_DSLL();
|
||||
static void SPECIAL_DSRL();
|
||||
static void SPECIAL_DSRA();
|
||||
static void SPECIAL_DSLL32();
|
||||
static void SPECIAL_DSRL32();
|
||||
static void SPECIAL_DSRA32();
|
||||
|
||||
/********************** R4300i OpCodes: RegImm **********************/
|
||||
static void REGIMM_BLTZ ( void );
|
||||
static void REGIMM_BGEZ ( void );
|
||||
static void REGIMM_BLTZL ( void );
|
||||
static void REGIMM_BGEZL ( void );
|
||||
static void REGIMM_BLTZAL ( void );
|
||||
static void REGIMM_BGEZAL ( void );
|
||||
static void REGIMM_BLTZ();
|
||||
static void REGIMM_BGEZ();
|
||||
static void REGIMM_BLTZL();
|
||||
static void REGIMM_BGEZL();
|
||||
static void REGIMM_BLTZAL();
|
||||
static void REGIMM_BGEZAL();
|
||||
|
||||
/************************** COP0 functions **************************/
|
||||
static void COP0_MF ( void );
|
||||
static void COP0_MT ( void );
|
||||
static void COP0_MF();
|
||||
static void COP0_MT();
|
||||
|
||||
/************************** COP0 CO functions ***********************/
|
||||
static void COP0_CO_TLBR ( void );
|
||||
static void COP0_CO_TLBWI ( void );
|
||||
static void COP0_CO_TLBWR ( void );
|
||||
static void COP0_CO_TLBP ( void );
|
||||
static void COP0_CO_ERET ( void );
|
||||
static void COP0_CO_TLBR();
|
||||
static void COP0_CO_TLBWI();
|
||||
static void COP0_CO_TLBWR();
|
||||
static void COP0_CO_TLBP();
|
||||
static void COP0_CO_ERET();
|
||||
|
||||
/************************** COP1 functions **************************/
|
||||
static void COP1_MF ( void );
|
||||
static void COP1_DMF ( void );
|
||||
static void COP1_CF ( void );
|
||||
static void COP1_MT ( void );
|
||||
static void COP1_DMT ( void );
|
||||
static void COP1_CT ( void );
|
||||
static void COP1_MF();
|
||||
static void COP1_DMF();
|
||||
static void COP1_CF();
|
||||
static void COP1_MT();
|
||||
static void COP1_DMT();
|
||||
static void COP1_CT();
|
||||
|
||||
/************************* COP1: BC1 functions ***********************/
|
||||
static void COP1_BCF ( void );
|
||||
static void COP1_BCT ( void );
|
||||
static void COP1_BCFL ( void );
|
||||
static void COP1_BCTL ( void );
|
||||
static void COP1_BCF();
|
||||
static void COP1_BCT();
|
||||
static void COP1_BCFL();
|
||||
static void COP1_BCTL();
|
||||
|
||||
/************************** COP1: S functions ************************/
|
||||
static void COP1_S_ADD ( void );
|
||||
static void COP1_S_SUB ( void );
|
||||
static void COP1_S_MUL ( void );
|
||||
static void COP1_S_DIV ( void );
|
||||
static void COP1_S_SQRT ( void );
|
||||
static void COP1_S_ABS ( void );
|
||||
static void COP1_S_MOV ( void );
|
||||
static void COP1_S_NEG ( void );
|
||||
static void COP1_S_TRUNC_L ( void );
|
||||
static void COP1_S_CEIL_L ( void ); //added by Witten
|
||||
static void COP1_S_FLOOR_L ( void ); //added by Witten
|
||||
static void COP1_S_ROUND_W ( void );
|
||||
static void COP1_S_TRUNC_W ( void );
|
||||
static void COP1_S_CEIL_W ( void ); //added by Witten
|
||||
static void COP1_S_FLOOR_W ( void );
|
||||
static void COP1_S_CVT_D ( void );
|
||||
static void COP1_S_CVT_W ( void );
|
||||
static void COP1_S_CVT_L ( void );
|
||||
static void COP1_S_CMP ( void );
|
||||
static void COP1_S_ADD();
|
||||
static void COP1_S_SUB();
|
||||
static void COP1_S_MUL();
|
||||
static void COP1_S_DIV();
|
||||
static void COP1_S_SQRT();
|
||||
static void COP1_S_ABS();
|
||||
static void COP1_S_MOV();
|
||||
static void COP1_S_NEG();
|
||||
static void COP1_S_TRUNC_L();
|
||||
static void COP1_S_CEIL_L(); //added by Witten
|
||||
static void COP1_S_FLOOR_L(); //added by Witten
|
||||
static void COP1_S_ROUND_W();
|
||||
static void COP1_S_TRUNC_W();
|
||||
static void COP1_S_CEIL_W(); //added by Witten
|
||||
static void COP1_S_FLOOR_W();
|
||||
static void COP1_S_CVT_D();
|
||||
static void COP1_S_CVT_W();
|
||||
static void COP1_S_CVT_L();
|
||||
static void COP1_S_CMP();
|
||||
|
||||
/************************** COP1: D functions ************************/
|
||||
static void COP1_D_ADD ( void );
|
||||
static void COP1_D_SUB ( void );
|
||||
static void COP1_D_MUL ( void );
|
||||
static void COP1_D_DIV ( void );
|
||||
static void COP1_D_SQRT ( void );
|
||||
static void COP1_D_ABS ( void );
|
||||
static void COP1_D_MOV ( void );
|
||||
static void COP1_D_NEG ( void );
|
||||
static void COP1_D_TRUNC_L ( void ); //added by Witten
|
||||
static void COP1_D_CEIL_L ( void ); //added by Witten
|
||||
static void COP1_D_FLOOR_L ( void ); //added by Witten
|
||||
static void COP1_D_ROUND_W ( void );
|
||||
static void COP1_D_TRUNC_W ( void );
|
||||
static void COP1_D_CEIL_W ( void ); //added by Witten
|
||||
static void COP1_D_FLOOR_W ( void ); //added by Witten
|
||||
static void COP1_D_CVT_S ( void );
|
||||
static void COP1_D_CVT_W ( void );
|
||||
static void COP1_D_CVT_L ( void );
|
||||
static void COP1_D_CMP ( void );
|
||||
static void COP1_D_ADD();
|
||||
static void COP1_D_SUB();
|
||||
static void COP1_D_MUL();
|
||||
static void COP1_D_DIV();
|
||||
static void COP1_D_SQRT();
|
||||
static void COP1_D_ABS();
|
||||
static void COP1_D_MOV();
|
||||
static void COP1_D_NEG();
|
||||
static void COP1_D_TRUNC_L(); //added by Witten
|
||||
static void COP1_D_CEIL_L(); //added by Witten
|
||||
static void COP1_D_FLOOR_L(); //added by Witten
|
||||
static void COP1_D_ROUND_W();
|
||||
static void COP1_D_TRUNC_W();
|
||||
static void COP1_D_CEIL_W(); //added by Witten
|
||||
static void COP1_D_FLOOR_W(); //added by Witten
|
||||
static void COP1_D_CVT_S();
|
||||
static void COP1_D_CVT_W();
|
||||
static void COP1_D_CVT_L();
|
||||
static void COP1_D_CMP();
|
||||
|
||||
/************************** COP1: W functions ************************/
|
||||
static void COP1_W_CVT_S ( void );
|
||||
static void COP1_W_CVT_D ( void );
|
||||
static void COP1_W_CVT_S();
|
||||
static void COP1_W_CVT_D();
|
||||
|
||||
/************************** COP1: L functions ************************/
|
||||
static void COP1_L_CVT_S ( void );
|
||||
static void COP1_L_CVT_D ( void );
|
||||
static void COP1_L_CVT_S();
|
||||
static void COP1_L_CVT_D();
|
||||
|
||||
/************************** Other functions **************************/
|
||||
static void UnknownOpcode ( void );
|
||||
/************************** Other functions **************************/
|
||||
static void UnknownOpcode();
|
||||
|
||||
|
||||
static Func * BuildInterpreter (void );
|
||||
static Func* BuildInterpreter();
|
||||
|
||||
static BOOL m_TestTimer;
|
||||
static DWORD m_NextInstruction;
|
||||
|
@ -208,16 +209,16 @@ public:
|
|||
static DWORD m_JumpToLocation;
|
||||
|
||||
protected:
|
||||
static void SPECIAL (void);
|
||||
static void REGIMM (void);
|
||||
static void COP0 (void);
|
||||
static void COP0_CO (void);
|
||||
static void COP1 (void);
|
||||
static void COP1_BC (void);
|
||||
static void COP1_S (void);
|
||||
static void COP1_D (void);
|
||||
static void COP1_W (void);
|
||||
static void COP1_L (void);
|
||||
static void SPECIAL();
|
||||
static void REGIMM();
|
||||
static void COP0();
|
||||
static void COP0_CO();
|
||||
static void COP1();
|
||||
static void COP1_BC();
|
||||
static void COP1_S();
|
||||
static void COP1_D();
|
||||
static void COP1_W();
|
||||
static void COP1_L();
|
||||
|
||||
static Func Jump_Opcode[64];
|
||||
static Func Jump_Special[64];
|
||||
|
|
|
@ -10,17 +10,17 @@
|
|||
****************************************************************************/
|
||||
#include "stdafx.h"
|
||||
|
||||
CAudio::CAudio (void)
|
||||
CAudio::CAudio()
|
||||
{
|
||||
Reset();
|
||||
}
|
||||
|
||||
CAudio::~CAudio (void)
|
||||
CAudio::~CAudio()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void CAudio::Reset ( void )
|
||||
void CAudio::Reset()
|
||||
{
|
||||
m_SecondBuff = 0;
|
||||
m_Status = 0;
|
||||
|
@ -29,7 +29,7 @@ void CAudio::Reset ( void )
|
|||
m_FramesPerSecond = 60;
|
||||
}
|
||||
|
||||
DWORD CAudio::GetLength ( void )
|
||||
DWORD CAudio::GetLength()
|
||||
{
|
||||
WriteTraceF(TraceAudio,__FUNCTION__ ": Start (m_SecondBuff = %d)",m_SecondBuff);
|
||||
DWORD TimeLeft = g_SystemTimer->GetTimer(CSystemTimer::AiTimerInterrupt), Res = 0;
|
||||
|
@ -41,13 +41,13 @@ DWORD CAudio::GetLength ( void )
|
|||
return Res;
|
||||
}
|
||||
|
||||
DWORD CAudio::GetStatus ( void )
|
||||
DWORD CAudio::GetStatus()
|
||||
{
|
||||
WriteTraceF(TraceAudio,__FUNCTION__ ": m_Status = %X",m_Status);
|
||||
return m_Status;
|
||||
}
|
||||
|
||||
void CAudio::LenChanged ( void )
|
||||
void CAudio::LenChanged()
|
||||
{
|
||||
WriteTraceF(TraceAudio,__FUNCTION__ ": Start (g_Reg->AI_LEN_REG = %d)",g_Reg->AI_LEN_REG);
|
||||
if (g_Reg->AI_LEN_REG != 0)
|
||||
|
@ -90,7 +90,7 @@ void CAudio::LenChanged ( void )
|
|||
WriteTraceF(TraceAudio,__FUNCTION__ ": Done");
|
||||
}
|
||||
|
||||
void CAudio::InterruptTimerDone ( void )
|
||||
void CAudio::InterruptTimerDone()
|
||||
{
|
||||
WriteTraceF(TraceAudio,__FUNCTION__ ": Start (m_SecondBuff = %d)",m_SecondBuff);
|
||||
if (m_SecondBuff != 0)
|
||||
|
@ -111,7 +111,7 @@ void CAudio::InterruptTimerDone ( void )
|
|||
WriteTrace(TraceAudio,__FUNCTION__ ": Done");
|
||||
}
|
||||
|
||||
void CAudio::BusyTimerDone ( void )
|
||||
void CAudio::BusyTimerDone()
|
||||
{
|
||||
WriteTraceF(TraceAudio,__FUNCTION__ ": Start (m_SecondBuff = %d)",m_SecondBuff);
|
||||
g_Notify->BreakPoint(__FILEW__,__LINE__);
|
||||
|
|
|
@ -18,15 +18,15 @@ class CAudio
|
|||
ai_busy = 0x40000000,
|
||||
};
|
||||
public:
|
||||
CAudio (void);
|
||||
~CAudio (void);
|
||||
CAudio();
|
||||
~CAudio();
|
||||
|
||||
DWORD GetLength ( void );
|
||||
DWORD GetStatus ( void );
|
||||
void LenChanged ( void );
|
||||
void InterruptTimerDone( void );
|
||||
void BusyTimerDone ( void );
|
||||
void Reset ( void );
|
||||
DWORD GetLength ();
|
||||
DWORD GetStatus ();
|
||||
void LenChanged ();
|
||||
void InterruptTimerDone();
|
||||
void BusyTimerDone ();
|
||||
void Reset ();
|
||||
void SetViIntr ( DWORD VI_INTR_TIME );
|
||||
void SetFrequency ( DWORD Dacrate, DWORD System );
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ CDMA::CDMA(CFlashram & FlashRam, CSram & Sram) :
|
|||
|
||||
}
|
||||
|
||||
void CDMA::OnFirstDMA (void)
|
||||
void CDMA::OnFirstDMA()
|
||||
{
|
||||
switch (g_Rom->CicChipID())
|
||||
{
|
||||
|
@ -31,7 +31,7 @@ void CDMA::OnFirstDMA (void)
|
|||
}
|
||||
}
|
||||
|
||||
void CDMA::PI_DMA_READ (void)
|
||||
void CDMA::PI_DMA_READ()
|
||||
{
|
||||
// PI_STATUS_REG |= PI_STATUS_DMA_BUSY;
|
||||
|
||||
|
@ -96,7 +96,7 @@ void CDMA::PI_DMA_READ (void)
|
|||
return;
|
||||
}
|
||||
|
||||
void CDMA::PI_DMA_WRITE (void)
|
||||
void CDMA::PI_DMA_WRITE()
|
||||
{
|
||||
DWORD PI_WR_LEN_REG = ((g_Reg->PI_WR_LEN_REG) & 0x00FFFFFFul) + 1;
|
||||
|
||||
|
@ -208,7 +208,7 @@ void CDMA::PI_DMA_WRITE (void)
|
|||
|
||||
}
|
||||
|
||||
void CDMA::SP_DMA_READ (void)
|
||||
void CDMA::SP_DMA_READ()
|
||||
{
|
||||
g_Reg->SP_DRAM_ADDR_REG &= 0x1FFFFFFF;
|
||||
|
||||
|
@ -252,7 +252,7 @@ void CDMA::SP_DMA_READ (void)
|
|||
g_Reg->SP_STATUS_REG &= ~SP_STATUS_DMA_BUSY;
|
||||
}
|
||||
|
||||
void CDMA::SP_DMA_WRITE (void)
|
||||
void CDMA::SP_DMA_WRITE()
|
||||
{
|
||||
if (g_Reg->SP_DRAM_ADDR_REG > g_MMU->RdramSize())
|
||||
{
|
||||
|
|
|
@ -16,20 +16,20 @@ class CDMA :
|
|||
CDMA();
|
||||
|
||||
public:
|
||||
void SP_DMA_READ ( void );
|
||||
void SP_DMA_WRITE ( void );
|
||||
void PI_DMA_READ ( void );
|
||||
void PI_DMA_WRITE ( void );
|
||||
void SP_DMA_READ();
|
||||
void SP_DMA_WRITE();
|
||||
void PI_DMA_READ();
|
||||
void PI_DMA_WRITE();
|
||||
|
||||
protected:
|
||||
CDMA (CFlashram & FlashRam, CSram & Sram);
|
||||
|
||||
//void SI_DMA_READ ( void );
|
||||
//void SI_DMA_WRITE ( void );
|
||||
//void SI_DMA_READ();
|
||||
//void SI_DMA_WRITE();
|
||||
|
||||
private:
|
||||
CFlashram & m_FlashRam;
|
||||
CSram & m_Sram;
|
||||
|
||||
void OnFirstDMA ( void );
|
||||
void OnFirstDMA();
|
||||
};
|
||||
|
|
|
@ -11,14 +11,14 @@
|
|||
#include "stdafx.h"
|
||||
#include <time.h>
|
||||
|
||||
CEeprom::CEeprom (bool ReadOnly):
|
||||
CEeprom::CEeprom(bool ReadOnly):
|
||||
m_ReadOnly(ReadOnly),
|
||||
m_hFile(NULL)
|
||||
{
|
||||
memset(m_EEPROM,0xFF,sizeof(m_EEPROM));
|
||||
}
|
||||
|
||||
CEeprom::~CEeprom (void)
|
||||
CEeprom::~CEeprom()
|
||||
{
|
||||
if (m_hFile)
|
||||
{
|
||||
|
@ -136,7 +136,7 @@ void CEeprom::EepromCommand ( BYTE * Command)
|
|||
}
|
||||
}
|
||||
|
||||
void CEeprom::LoadEeprom (void)
|
||||
void CEeprom::LoadEeprom()
|
||||
{
|
||||
CPath FileName;
|
||||
DWORD dwRead;
|
||||
|
|
|
@ -15,12 +15,12 @@ class CEeprom :
|
|||
{
|
||||
public:
|
||||
CEeprom ( bool ReadOnly );
|
||||
~CEeprom ( void );
|
||||
~CEeprom();
|
||||
|
||||
void EepromCommand ( BYTE * Command );
|
||||
void EepromCommand ( BYTE * Command );
|
||||
|
||||
private:
|
||||
void LoadEeprom ( void );
|
||||
void LoadEeprom ();
|
||||
void ReadFrom ( BYTE * Buffer, int line );
|
||||
void WriteTo ( BYTE * Buffer, int line );
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
****************************************************************************/
|
||||
#include "stdafx.h"
|
||||
|
||||
CFlashram::CFlashram (bool ReadOnly):
|
||||
CFlashram::CFlashram(bool ReadOnly):
|
||||
m_FlashFlag(FLASHRAM_MODE_NOPES),
|
||||
m_FlashStatus(0),
|
||||
m_FlashRamPointer(NULL),
|
||||
|
@ -21,7 +21,7 @@ CFlashram::CFlashram (bool ReadOnly):
|
|||
|
||||
}
|
||||
|
||||
CFlashram::~CFlashram (void)
|
||||
CFlashram::~CFlashram()
|
||||
{
|
||||
if (m_hFile)
|
||||
{
|
||||
|
@ -135,7 +135,7 @@ DWORD CFlashram::ReadFromFlashStatus (DWORD PAddr)
|
|||
return (DWORD)(m_FlashStatus >> 32);
|
||||
}
|
||||
|
||||
bool CFlashram::LoadFlashram (void)
|
||||
bool CFlashram::LoadFlashram()
|
||||
{
|
||||
CPath FileName;
|
||||
|
||||
|
|
|
@ -23,8 +23,8 @@ class CFlashram :
|
|||
};
|
||||
|
||||
public:
|
||||
CFlashram ( bool ReadOnly );
|
||||
~CFlashram ( void );
|
||||
CFlashram(bool ReadOnly);
|
||||
~CFlashram();
|
||||
|
||||
void DmaFromFlashram ( BYTE * dest, int StartOffset, int len );
|
||||
void DmaToFlashram ( BYTE * Source, int StartOffset, int len );
|
||||
|
@ -32,7 +32,7 @@ public:
|
|||
void WriteToFlashCommand ( DWORD Value );
|
||||
|
||||
private:
|
||||
bool LoadFlashram ( void );
|
||||
bool LoadFlashram();
|
||||
|
||||
BYTE * m_FlashRamPointer;
|
||||
Modes m_FlashFlag;
|
||||
|
|
|
@ -19,11 +19,11 @@ interface CMipsMemory_CallBack
|
|||
class CMipsMemory
|
||||
{
|
||||
public:
|
||||
virtual BYTE * Rdram ( void ) = 0;
|
||||
virtual DWORD RdramSize ( void ) = 0;
|
||||
virtual BYTE * Dmem ( void ) = 0;
|
||||
virtual BYTE * Imem ( void ) = 0;
|
||||
virtual BYTE * PifRam ( void ) = 0;
|
||||
virtual BYTE * Rdram () = 0;
|
||||
virtual DWORD RdramSize() = 0;
|
||||
virtual BYTE * Dmem () = 0;
|
||||
virtual BYTE * Imem () = 0;
|
||||
virtual BYTE * PifRam () = 0;
|
||||
|
||||
virtual BOOL LB_VAddr ( DWORD VAddr, BYTE & Value ) = 0;
|
||||
virtual BOOL LH_VAddr ( DWORD VAddr, WORD & Value ) = 0;
|
||||
|
@ -55,31 +55,31 @@ public:
|
|||
virtual void UnProtectMemory ( DWORD StartVaddr, DWORD EndVaddr ) = 0;
|
||||
|
||||
//Compilation Functions
|
||||
virtual void ResetMemoryStack ( void ) = 0;
|
||||
virtual void ResetMemoryStack () = 0;
|
||||
|
||||
virtual void Compile_LB ( void ) = 0;
|
||||
virtual void Compile_LBU ( void ) = 0;
|
||||
virtual void Compile_LH ( void ) = 0;
|
||||
virtual void Compile_LHU ( void ) = 0;
|
||||
virtual void Compile_LW ( void ) = 0;
|
||||
virtual void Compile_LL ( void ) = 0;
|
||||
virtual void Compile_LWC1 ( void ) = 0;
|
||||
virtual void Compile_LWU ( void ) = 0;
|
||||
virtual void Compile_LWL ( void ) = 0;
|
||||
virtual void Compile_LWR ( void ) = 0;
|
||||
virtual void Compile_LD ( void ) = 0;
|
||||
virtual void Compile_LDC1 ( void ) = 0;
|
||||
virtual void Compile_LDL ( void ) = 0;
|
||||
virtual void Compile_LDR ( void ) = 0;
|
||||
virtual void Compile_SB ( void ) = 0;
|
||||
virtual void Compile_SH ( void ) = 0;
|
||||
virtual void Compile_SW ( void ) = 0;
|
||||
virtual void Compile_SWL ( void ) = 0;
|
||||
virtual void Compile_SWR ( void ) = 0;
|
||||
virtual void Compile_SD ( void ) = 0;
|
||||
virtual void Compile_SDL ( void ) = 0;
|
||||
virtual void Compile_SDR ( void ) = 0;
|
||||
virtual void Compile_SC ( void ) = 0;
|
||||
virtual void Compile_SWC1 ( void ) = 0;
|
||||
virtual void Compile_SDC1 ( void ) = 0;
|
||||
virtual void Compile_LB () = 0;
|
||||
virtual void Compile_LBU () = 0;
|
||||
virtual void Compile_LH () = 0;
|
||||
virtual void Compile_LHU () = 0;
|
||||
virtual void Compile_LW () = 0;
|
||||
virtual void Compile_LL () = 0;
|
||||
virtual void Compile_LWC1 () = 0;
|
||||
virtual void Compile_LWU () = 0;
|
||||
virtual void Compile_LWL () = 0;
|
||||
virtual void Compile_LWR () = 0;
|
||||
virtual void Compile_LD () = 0;
|
||||
virtual void Compile_LDC1 () = 0;
|
||||
virtual void Compile_LDL () = 0;
|
||||
virtual void Compile_LDR () = 0;
|
||||
virtual void Compile_SB () = 0;
|
||||
virtual void Compile_SH () = 0;
|
||||
virtual void Compile_SW () = 0;
|
||||
virtual void Compile_SWL () = 0;
|
||||
virtual void Compile_SWR () = 0;
|
||||
virtual void Compile_SD () = 0;
|
||||
virtual void Compile_SDL () = 0;
|
||||
virtual void Compile_SDR () = 0;
|
||||
virtual void Compile_SC () = 0;
|
||||
virtual void Compile_SWC1 () = 0;
|
||||
virtual void Compile_SDC1 () = 0;
|
||||
};
|
||||
|
|
|
@ -135,12 +135,12 @@ void CMemoryLabel::LoadLabelList ( char * file )
|
|||
}
|
||||
|
||||
// How many new labels been added since loading/saving label file
|
||||
int CMemoryLabel::NewLabels ( void )
|
||||
int CMemoryLabel::NewLabels()
|
||||
{
|
||||
return m_NewLabels;
|
||||
}
|
||||
|
||||
void CMemoryLabel::SaveLabelList ( void )
|
||||
void CMemoryLabel::SaveLabelList()
|
||||
{
|
||||
m_NewLabels = 0;
|
||||
|
||||
|
|
|
@ -28,6 +28,6 @@ public:
|
|||
stdstr LabelName ( DWORD Address ) const;
|
||||
stdstr StoredLabelName ( DWORD Address );
|
||||
void LoadLabelList ( char * file );
|
||||
int NewLabels ( void ); // How many new labels been added since loading/saveing label file
|
||||
void SaveLabelList ( void );
|
||||
int NewLabels (); // How many new labels been added since loading/saving label file
|
||||
void SaveLabelList ();
|
||||
};
|
||||
|
|
|
@ -15,7 +15,7 @@ DWORD RegModValue;
|
|||
BYTE * CMipsMemoryVM::m_Reserve1 = NULL;
|
||||
BYTE * CMipsMemoryVM::m_Reserve2 = NULL;
|
||||
|
||||
CMipsMemoryVM::CMipsMemoryVM ( CMipsMemory_CallBack * CallBack, bool SavesReadOnly ) :
|
||||
CMipsMemoryVM::CMipsMemoryVM( CMipsMemory_CallBack * CallBack, bool SavesReadOnly ) :
|
||||
|
||||
CPifRam(SavesReadOnly),
|
||||
CFlashram(SavesReadOnly),
|
||||
|
@ -40,7 +40,7 @@ CMipsMemoryVM::CMipsMemoryVM ( CMipsMemory_CallBack * CallBack, bool SavesReadOn
|
|||
m_IMEM = NULL;
|
||||
}
|
||||
|
||||
CMipsMemoryVM::~CMipsMemoryVM (void)
|
||||
CMipsMemoryVM::~CMipsMemoryVM()
|
||||
{
|
||||
g_Settings->UnregisterChangeCB(Game_RDRamSize,this,(CSettings::SettingChangedFunc)RdramChanged);
|
||||
FreeMemory();
|
||||
|
@ -73,7 +73,7 @@ void CMipsMemoryVM::Reset( bool /*EraseMemory*/ )
|
|||
}
|
||||
}
|
||||
|
||||
void CMipsMemoryVM::ReserveMemory ( void )
|
||||
void CMipsMemoryVM::ReserveMemory()
|
||||
{
|
||||
m_Reserve1 = (unsigned char *) VirtualAlloc( NULL, 0x20000000, MEM_RESERVE | MEM_TOP_DOWN, PAGE_READWRITE );
|
||||
if (g_Settings->LoadBool(Debugger_Enabled))
|
||||
|
@ -82,7 +82,7 @@ void CMipsMemoryVM::ReserveMemory ( void )
|
|||
}
|
||||
}
|
||||
|
||||
void CMipsMemoryVM::FreeReservedMemory ( void )
|
||||
void CMipsMemoryVM::FreeReservedMemory()
|
||||
{
|
||||
if (m_Reserve1)
|
||||
{
|
||||
|
@ -96,7 +96,7 @@ void CMipsMemoryVM::FreeReservedMemory ( void )
|
|||
}
|
||||
}
|
||||
|
||||
BOOL CMipsMemoryVM::Initialize ( void )
|
||||
BOOL CMipsMemoryVM::Initialize()
|
||||
{
|
||||
if (m_RDRAM != NULL)
|
||||
{
|
||||
|
@ -183,7 +183,7 @@ BOOL CMipsMemoryVM::Initialize ( void )
|
|||
return true;
|
||||
}
|
||||
|
||||
void CMipsMemoryVM::FreeMemory ( void )
|
||||
void CMipsMemoryVM::FreeMemory()
|
||||
{
|
||||
if (m_RDRAM)
|
||||
{
|
||||
|
@ -221,27 +221,27 @@ void CMipsMemoryVM::FreeMemory ( void )
|
|||
CPifRam::Reset();
|
||||
}
|
||||
|
||||
BYTE * CMipsMemoryVM::Rdram ( void )
|
||||
BYTE * CMipsMemoryVM::Rdram()
|
||||
{
|
||||
return m_RDRAM;
|
||||
}
|
||||
|
||||
DWORD CMipsMemoryVM::RdramSize ( void )
|
||||
DWORD CMipsMemoryVM::RdramSize()
|
||||
{
|
||||
return m_AllocatedRdramSize;
|
||||
return m_AllocatedRdramSize;
|
||||
}
|
||||
|
||||
BYTE * CMipsMemoryVM::Dmem ( void )
|
||||
BYTE * CMipsMemoryVM::Dmem()
|
||||
{
|
||||
return m_DMEM;
|
||||
}
|
||||
|
||||
BYTE * CMipsMemoryVM::Imem ( void )
|
||||
BYTE * CMipsMemoryVM::Imem()
|
||||
{
|
||||
return m_IMEM;
|
||||
}
|
||||
|
||||
BYTE * CMipsMemoryVM::PifRam ( void )
|
||||
BYTE * CMipsMemoryVM::PifRam()
|
||||
{
|
||||
return m_PifRam;
|
||||
}
|
||||
|
@ -1863,7 +1863,7 @@ void CMipsMemoryVM::Compile_SW_Register (x86Reg Reg, DWORD VAddr )
|
|||
}
|
||||
}
|
||||
|
||||
void CMipsMemoryVM::ResetMemoryStack ( void)
|
||||
void CMipsMemoryVM::ResetMemoryStack()
|
||||
{
|
||||
x86Reg Reg, TempReg;
|
||||
|
||||
|
@ -3305,7 +3305,7 @@ int CMipsMemoryVM::SW_NonMemory ( DWORD PAddr, DWORD Value )
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
void CMipsMemoryVM::UpdateHalfLine (void)
|
||||
void CMipsMemoryVM::UpdateHalfLine()
|
||||
{
|
||||
DWORD NextViTimer = g_SystemTimer->GetTimer(CSystemTimer::ViTimer);
|
||||
|
||||
|
@ -3402,7 +3402,7 @@ void CMipsMemoryVM::UnProtectMemory( DWORD StartVaddr, DWORD EndVaddr )
|
|||
VirtualProtect(MemLoc, Length, PAGE_READWRITE, &OldProtect);
|
||||
}
|
||||
|
||||
void CMipsMemoryVM::Compile_LB (void)
|
||||
void CMipsMemoryVM::Compile_LB()
|
||||
{
|
||||
OPCODE & Opcode = CRecompilerOps::m_Opcode;
|
||||
x86Reg TempReg1, TempReg2;
|
||||
|
@ -3463,7 +3463,7 @@ void CMipsMemoryVM::Compile_LB (void)
|
|||
}
|
||||
}
|
||||
|
||||
void CMipsMemoryVM::Compile_LBU (void)
|
||||
void CMipsMemoryVM::Compile_LBU()
|
||||
{
|
||||
OPCODE & Opcode = CRecompilerOps::m_Opcode;
|
||||
x86Reg TempReg1, TempReg2;
|
||||
|
@ -3524,7 +3524,7 @@ void CMipsMemoryVM::Compile_LBU (void)
|
|||
}
|
||||
}
|
||||
|
||||
void CMipsMemoryVM::Compile_LH (void)
|
||||
void CMipsMemoryVM::Compile_LH()
|
||||
{
|
||||
OPCODE & Opcode = CRecompilerOps::m_Opcode;
|
||||
x86Reg TempReg1, TempReg2;
|
||||
|
@ -3582,7 +3582,7 @@ void CMipsMemoryVM::Compile_LH (void)
|
|||
}
|
||||
}
|
||||
|
||||
void CMipsMemoryVM::Compile_LHU (void)
|
||||
void CMipsMemoryVM::Compile_LHU()
|
||||
{
|
||||
OPCODE & Opcode = CRecompilerOps::m_Opcode;
|
||||
x86Reg TempReg1, TempReg2;
|
||||
|
@ -3643,12 +3643,12 @@ void CMipsMemoryVM::Compile_LHU (void)
|
|||
}
|
||||
}
|
||||
|
||||
void CMipsMemoryVM::Compile_LW (void)
|
||||
void CMipsMemoryVM::Compile_LW()
|
||||
{
|
||||
Compile_LW(true,false);
|
||||
}
|
||||
|
||||
void CMipsMemoryVM::Compile_LL (void)
|
||||
void CMipsMemoryVM::Compile_LL()
|
||||
{
|
||||
Compile_LW(true,true);
|
||||
}
|
||||
|
@ -3767,7 +3767,7 @@ void CMipsMemoryVM::Compile_LW (bool ResultSigned, bool bRecordLLBit)
|
|||
}
|
||||
}
|
||||
|
||||
void CMipsMemoryVM::Compile_LWC1 (void)
|
||||
void CMipsMemoryVM::Compile_LWC1()
|
||||
{
|
||||
OPCODE & Opcode = CRecompilerOps::m_Opcode;
|
||||
x86Reg TempReg1, TempReg2, TempReg3;
|
||||
|
@ -3875,7 +3875,7 @@ void CMipsMemoryVM::Compile_LWC1 (void)
|
|||
MoveX86regToX86Pointer(TempReg3,TempReg2);
|
||||
}
|
||||
|
||||
void CMipsMemoryVM::Compile_LWL (void)
|
||||
void CMipsMemoryVM::Compile_LWL()
|
||||
{
|
||||
OPCODE & Opcode = CRecompilerOps::m_Opcode;
|
||||
x86Reg TempReg1 = x86_Unknown, TempReg2 = x86_Unknown, OffsetReg = x86_Unknown, shift = x86_Unknown;
|
||||
|
@ -3955,7 +3955,7 @@ void CMipsMemoryVM::Compile_LWL (void)
|
|||
AddX86RegToX86Reg(GetMipsRegMapLo(Opcode.rt),TempReg1);
|
||||
}
|
||||
|
||||
void CMipsMemoryVM::Compile_LWR (void)
|
||||
void CMipsMemoryVM::Compile_LWR()
|
||||
{
|
||||
OPCODE & Opcode = CRecompilerOps::m_Opcode;
|
||||
x86Reg TempReg1 = x86_Unknown, TempReg2 = x86_Unknown, OffsetReg = x86_Unknown, shift = x86_Unknown;
|
||||
|
@ -4036,12 +4036,12 @@ void CMipsMemoryVM::Compile_LWR (void)
|
|||
AddX86RegToX86Reg(GetMipsRegMapLo(Opcode.rt),TempReg1);
|
||||
}
|
||||
|
||||
void CMipsMemoryVM::Compile_LWU (void)
|
||||
void CMipsMemoryVM::Compile_LWU()
|
||||
{
|
||||
Compile_LW(false,false);
|
||||
}
|
||||
|
||||
void CMipsMemoryVM::Compile_LD (void)
|
||||
void CMipsMemoryVM::Compile_LD()
|
||||
{
|
||||
OPCODE & Opcode = CRecompilerOps::m_Opcode;
|
||||
CPU_Message(" %X %s",m_CompilePC,R4300iOpcodeName(Opcode.Hex,m_CompilePC));
|
||||
|
@ -4127,7 +4127,7 @@ void CMipsMemoryVM::Compile_LD (void)
|
|||
}
|
||||
}
|
||||
|
||||
void CMipsMemoryVM::Compile_LDC1 (void)
|
||||
void CMipsMemoryVM::Compile_LDC1()
|
||||
{
|
||||
OPCODE & Opcode = CRecompilerOps::m_Opcode;
|
||||
x86Reg TempReg1, TempReg2, TempReg3;
|
||||
|
@ -4243,7 +4243,7 @@ void CMipsMemoryVM::Compile_LDC1 (void)
|
|||
}
|
||||
}
|
||||
|
||||
void CMipsMemoryVM::Compile_LDL (void)
|
||||
void CMipsMemoryVM::Compile_LDL()
|
||||
{
|
||||
OPCODE & Opcode = CRecompilerOps::m_Opcode;
|
||||
|
||||
|
@ -4262,7 +4262,7 @@ void CMipsMemoryVM::Compile_LDL (void)
|
|||
AfterCallDirect(m_RegWorkingSet);
|
||||
}
|
||||
|
||||
void CMipsMemoryVM::Compile_LDR (void)
|
||||
void CMipsMemoryVM::Compile_LDR()
|
||||
{
|
||||
OPCODE & Opcode = CRecompilerOps::m_Opcode;
|
||||
|
||||
|
@ -4281,7 +4281,7 @@ void CMipsMemoryVM::Compile_LDR (void)
|
|||
AfterCallDirect(m_RegWorkingSet);
|
||||
}
|
||||
|
||||
void CMipsMemoryVM::Compile_SB (void)
|
||||
void CMipsMemoryVM::Compile_SB()
|
||||
{
|
||||
OPCODE & Opcode = CRecompilerOps::m_Opcode;
|
||||
x86Reg TempReg1, TempReg2;
|
||||
|
@ -4371,7 +4371,7 @@ void CMipsMemoryVM::Compile_SB (void)
|
|||
}
|
||||
}
|
||||
|
||||
void CMipsMemoryVM::Compile_SH (void)
|
||||
void CMipsMemoryVM::Compile_SH()
|
||||
{
|
||||
OPCODE & Opcode = CRecompilerOps::m_Opcode;
|
||||
x86Reg TempReg1, TempReg2;
|
||||
|
@ -4459,12 +4459,12 @@ void CMipsMemoryVM::Compile_SH (void)
|
|||
}
|
||||
}
|
||||
|
||||
void CMipsMemoryVM::Compile_SW (void)
|
||||
void CMipsMemoryVM::Compile_SW()
|
||||
{
|
||||
Compile_SW(false);
|
||||
}
|
||||
|
||||
void CMipsMemoryVM::Compile_SC (void)
|
||||
void CMipsMemoryVM::Compile_SC()
|
||||
{
|
||||
Compile_SW(true);
|
||||
}
|
||||
|
@ -4612,7 +4612,7 @@ void CMipsMemoryVM::Compile_SW (bool bCheckLLbit)
|
|||
}
|
||||
}
|
||||
|
||||
void CMipsMemoryVM::Compile_SWC1 (void)
|
||||
void CMipsMemoryVM::Compile_SWC1()
|
||||
{
|
||||
OPCODE & Opcode = CRecompilerOps::m_Opcode;
|
||||
x86Reg TempReg1, TempReg2, TempReg3;
|
||||
|
@ -4694,7 +4694,7 @@ void CMipsMemoryVM::Compile_SWC1 (void)
|
|||
}
|
||||
}
|
||||
|
||||
void CMipsMemoryVM::Compile_SWL (void)
|
||||
void CMipsMemoryVM::Compile_SWL()
|
||||
{
|
||||
OPCODE & Opcode = CRecompilerOps::m_Opcode;
|
||||
x86Reg TempReg1 = x86_Unknown, TempReg2 = x86_Unknown, Value = x86_Unknown,
|
||||
|
@ -4797,7 +4797,7 @@ void CMipsMemoryVM::Compile_SWL (void)
|
|||
}
|
||||
}
|
||||
|
||||
void CMipsMemoryVM::Compile_SWR (void)
|
||||
void CMipsMemoryVM::Compile_SWR()
|
||||
{
|
||||
OPCODE & Opcode = CRecompilerOps::m_Opcode;
|
||||
x86Reg TempReg1 = x86_Unknown, TempReg2 = x86_Unknown, Value = x86_Unknown,
|
||||
|
@ -4950,7 +4950,7 @@ void CMipsMemoryVM::Compile_StoreInstructClean (x86Reg AddressReg, int Length )
|
|||
X86Protected(StoreTemp1) = false;*/
|
||||
}
|
||||
|
||||
void CMipsMemoryVM::Compile_SD (void)
|
||||
void CMipsMemoryVM::Compile_SD()
|
||||
{
|
||||
OPCODE & Opcode = CRecompilerOps::m_Opcode;
|
||||
x86Reg TempReg1, TempReg2;
|
||||
|
@ -5093,7 +5093,7 @@ void CMipsMemoryVM::Compile_SD (void)
|
|||
}
|
||||
}
|
||||
|
||||
void CMipsMemoryVM::Compile_SDC1 (void)
|
||||
void CMipsMemoryVM::Compile_SDC1()
|
||||
{
|
||||
OPCODE & Opcode = CRecompilerOps::m_Opcode;
|
||||
x86Reg TempReg1, TempReg2, TempReg3;
|
||||
|
@ -5190,7 +5190,7 @@ void CMipsMemoryVM::Compile_SDC1 (void)
|
|||
}
|
||||
}
|
||||
|
||||
void CMipsMemoryVM::Compile_SDL (void)
|
||||
void CMipsMemoryVM::Compile_SDL()
|
||||
{
|
||||
OPCODE & Opcode = CRecompilerOps::m_Opcode;
|
||||
|
||||
|
@ -5209,7 +5209,7 @@ void CMipsMemoryVM::Compile_SDL (void)
|
|||
AfterCallDirect(m_RegWorkingSet);
|
||||
}
|
||||
|
||||
void CMipsMemoryVM::Compile_SDR (void)
|
||||
void CMipsMemoryVM::Compile_SDR()
|
||||
{
|
||||
OPCODE & Opcode = CRecompilerOps::m_Opcode;
|
||||
|
||||
|
@ -5286,7 +5286,7 @@ void CMipsMemoryVM::RdramChanged ( CMipsMemoryVM * _this )
|
|||
|
||||
}
|
||||
|
||||
void CMipsMemoryVM::ChangeSpStatus (void)
|
||||
void CMipsMemoryVM::ChangeSpStatus()
|
||||
{
|
||||
if ( ( RegModValue & SP_CLR_HALT ) != 0)
|
||||
{
|
||||
|
@ -5413,7 +5413,7 @@ void CMipsMemoryVM::ChangeSpStatus (void)
|
|||
//}
|
||||
}
|
||||
|
||||
void CMipsMemoryVM::ChangeMiIntrMask (void)
|
||||
void CMipsMemoryVM::ChangeMiIntrMask()
|
||||
{
|
||||
if ( ( RegModValue & MI_INTR_MASK_CLR_SP ) != 0 )
|
||||
{
|
||||
|
|
|
@ -21,20 +21,20 @@ class CMipsMemoryVM :
|
|||
private CDMA
|
||||
{
|
||||
public:
|
||||
CMipsMemoryVM ( CMipsMemory_CallBack * CallBack, bool SavesReadOnly );
|
||||
~CMipsMemoryVM ( void );
|
||||
CMipsMemoryVM(CMipsMemory_CallBack * CallBack, bool SavesReadOnly);
|
||||
~CMipsMemoryVM();
|
||||
|
||||
static void ReserveMemory ( void );
|
||||
static void FreeReservedMemory ( void );
|
||||
static void ReserveMemory();
|
||||
static void FreeReservedMemory();
|
||||
|
||||
BOOL Initialize ( void );
|
||||
BOOL Initialize ();
|
||||
void Reset ( bool EraseMemory );
|
||||
|
||||
BYTE * Rdram ( void );
|
||||
DWORD RdramSize ( void );
|
||||
BYTE * Dmem ( void );
|
||||
BYTE * Imem ( void );
|
||||
BYTE * PifRam ( void );
|
||||
BYTE * Rdram ();
|
||||
DWORD RdramSize ();
|
||||
BYTE * Dmem ();
|
||||
BYTE * Imem ();
|
||||
BYTE * PifRam ();
|
||||
|
||||
BOOL LB_VAddr ( DWORD VAddr, BYTE & Value );
|
||||
BOOL LH_VAddr ( DWORD VAddr, WORD & Value );
|
||||
|
@ -56,44 +56,44 @@ public:
|
|||
BOOL SW_PAddr ( DWORD PAddr, DWORD Value );
|
||||
BOOL SD_PAddr ( DWORD PAddr, QWORD Value );
|
||||
|
||||
int MemoryFilter ( DWORD dwExptCode, void * lpExceptionPointer );
|
||||
void UpdateFieldSerration (unsigned int interlaced);
|
||||
int MemoryFilter(DWORD dwExptCode, void * lpExceptionPointer);
|
||||
void UpdateFieldSerration(unsigned int interlaced);
|
||||
|
||||
//Protect the Memory from being written to
|
||||
void ProtectMemory ( DWORD StartVaddr, DWORD EndVaddr );
|
||||
void UnProtectMemory ( DWORD StartVaddr, DWORD EndVaddr );
|
||||
void ProtectMemory(DWORD StartVaddr, DWORD EndVaddr);
|
||||
void UnProtectMemory(DWORD StartVaddr, DWORD EndVaddr);
|
||||
|
||||
//Compilation Functions
|
||||
void ResetMemoryStack ( void );
|
||||
void ResetTLB ( void );
|
||||
|
||||
void Compile_LB ( void );
|
||||
void Compile_LBU ( void );
|
||||
void Compile_LH ( void );
|
||||
void Compile_LHU ( void );
|
||||
void Compile_LW ( void );
|
||||
void Compile_LL ( void );
|
||||
void Compile_LWC1 ( void );
|
||||
void Compile_LWU ( void );
|
||||
void Compile_LWL ( void );
|
||||
void Compile_LWR ( void );
|
||||
void Compile_LD ( void );
|
||||
void Compile_LDC1 ( void );
|
||||
void Compile_LDL ( void );
|
||||
void Compile_LDR ( void );
|
||||
void Compile_SB ( void );
|
||||
void Compile_SH ( void );
|
||||
void Compile_SW ( void );
|
||||
void Compile_SWL ( void );
|
||||
void Compile_SWR ( void );
|
||||
void Compile_SD ( void );
|
||||
void Compile_SDL ( void );
|
||||
void Compile_SDR ( void );
|
||||
void Compile_SC ( void );
|
||||
void Compile_SWC1 ( void );
|
||||
void Compile_SDC1 ( void );
|
||||
void ResetMemoryStack();
|
||||
void ResetTLB();
|
||||
|
||||
void ResetMemoryStack ( CRegInfo & RegInfo );
|
||||
void Compile_LB();
|
||||
void Compile_LBU();
|
||||
void Compile_LH();
|
||||
void Compile_LHU();
|
||||
void Compile_LW();
|
||||
void Compile_LL();
|
||||
void Compile_LWC1();
|
||||
void Compile_LWU();
|
||||
void Compile_LWL();
|
||||
void Compile_LWR();
|
||||
void Compile_LD();
|
||||
void Compile_LDC1();
|
||||
void Compile_LDL();
|
||||
void Compile_LDR();
|
||||
void Compile_SB();
|
||||
void Compile_SH();
|
||||
void Compile_SW();
|
||||
void Compile_SWL();
|
||||
void Compile_SWR();
|
||||
void Compile_SD();
|
||||
void Compile_SDL();
|
||||
void Compile_SDR();
|
||||
void Compile_SC();
|
||||
void Compile_SWC1();
|
||||
void Compile_SDC1();
|
||||
|
||||
void ResetMemoryStack ( CRegInfo& RegInfo );
|
||||
void Compile_LB ( CX86Ops::x86Reg Reg, DWORD Addr, BOOL SignExtend );
|
||||
void Compile_LH ( CX86Ops::x86Reg Reg, DWORD Addr, BOOL SignExtend );
|
||||
void Compile_LW ( CX86Ops::x86Reg Reg, DWORD Addr );
|
||||
|
@ -106,28 +106,28 @@ public:
|
|||
void Compile_SW_Register ( CX86Ops::x86Reg Reg, DWORD Addr );
|
||||
|
||||
//Functions for TLB notification
|
||||
void TLB_Mapped ( DWORD VAddr, DWORD Len, DWORD PAddr, bool bReadOnly );
|
||||
void TLB_Unmaped ( DWORD Vaddr, DWORD Len );
|
||||
void TLB_Mapped(DWORD VAddr, DWORD Len, DWORD PAddr, bool bReadOnly);
|
||||
void TLB_Unmaped(DWORD Vaddr, DWORD Len);
|
||||
|
||||
// CTransVaddr interface
|
||||
bool TranslateVaddr ( DWORD VAddr, DWORD &PAddr) const;
|
||||
bool ValidVaddr ( DWORD VAddr ) const;
|
||||
bool VAddrToRealAddr ( DWORD VAddr, void * &RealAddress ) const;
|
||||
bool TranslateVaddr(DWORD VAddr, DWORD &PAddr) const;
|
||||
bool ValidVaddr(DWORD VAddr) const;
|
||||
bool VAddrToRealAddr(DWORD VAddr, void * &RealAddress) const;
|
||||
|
||||
// Labels
|
||||
LPCTSTR LabelName ( DWORD Address ) const;
|
||||
LPCTSTR LabelName(DWORD Address) const;
|
||||
|
||||
private:
|
||||
CMipsMemoryVM(void); // Disable default constructor
|
||||
CMipsMemoryVM(const CMipsMemoryVM&); // Disable copy constructor
|
||||
CMipsMemoryVM& operator=(const CMipsMemoryVM&); // Disable assignment
|
||||
CMipsMemoryVM(); // Disable default constructor
|
||||
CMipsMemoryVM(const CMipsMemoryVM&); // Disable copy constructor
|
||||
CMipsMemoryVM& operator=(const CMipsMemoryVM&); // Disable assignment
|
||||
|
||||
void Compile_LW ( bool ResultSigned, bool bRecordLLbit );
|
||||
void Compile_SW ( bool bCheckLLbit );
|
||||
|
||||
static void RdramChanged ( CMipsMemoryVM * _this );
|
||||
static void ChangeSpStatus ( void );
|
||||
static void ChangeMiIntrMask ( void );
|
||||
static void RdramChanged ( CMipsMemoryVM * _this );
|
||||
static void ChangeSpStatus ();
|
||||
static void ChangeMiIntrMask();
|
||||
|
||||
int LB_NonMemory ( DWORD PAddr, DWORD * Value, BOOL SignExtend );
|
||||
int LH_NonMemory ( DWORD PAddr, DWORD * Value, int SignExtend );
|
||||
|
@ -154,14 +154,14 @@ private:
|
|||
DWORD m_RomWroteValue;
|
||||
|
||||
//Current Half line
|
||||
void UpdateHalfLine ( void );
|
||||
void UpdateHalfLine();
|
||||
DWORD m_HalfLine;
|
||||
DWORD m_HalfLineCheck;
|
||||
DWORD m_FieldSerration;
|
||||
DWORD m_TempValue;
|
||||
|
||||
//Initializing and resetting information about the memory system
|
||||
void FreeMemory ( void );
|
||||
void FreeMemory();
|
||||
|
||||
mutable char m_strLabelName[100];
|
||||
|
||||
|
|
|
@ -13,9 +13,9 @@
|
|||
class Mempak
|
||||
{
|
||||
public:
|
||||
static void Close ( void );
|
||||
static BYTE CalculateCrc ( BYTE * DataToCrc );
|
||||
static void ReadFrom ( int Control, int Address, BYTE * Buffer );
|
||||
static void WriteTo ( int Control, int Address, BYTE * Buffer );
|
||||
static void Close();
|
||||
static BYTE CalculateCrc(BYTE * DataToCrc);
|
||||
static void ReadFrom(int Control, int Address, BYTE * Buffer);
|
||||
static void WriteTo(int Control, int Address, BYTE * Buffer);
|
||||
|
||||
};
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
static BYTE Mempaks[4][0x8000];
|
||||
HANDLE hMempakFile[4];
|
||||
|
||||
void Mempak::Close(void)
|
||||
void Mempak::Close()
|
||||
{
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
|
|
|
@ -43,12 +43,12 @@ CPifRam::CPifRam( bool SavesReadOnly ) :
|
|||
Reset();
|
||||
}
|
||||
|
||||
CPifRam::~CPifRam( void )
|
||||
CPifRam::~CPifRam()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void CPifRam::Reset ( void )
|
||||
void CPifRam::Reset()
|
||||
{
|
||||
memset(m_PifRam,0,sizeof(m_PifRam));
|
||||
memset(m_PifRom,0,sizeof(m_PifRom));
|
||||
|
@ -87,7 +87,7 @@ void CPifRam::n64_cic_nus_6105(char challenge[], char respone[], int length)
|
|||
}
|
||||
|
||||
|
||||
void CPifRam::PifRamRead (void)
|
||||
void CPifRam::PifRamRead()
|
||||
{
|
||||
if (m_PifRam[0x3F] == 0x2)
|
||||
{
|
||||
|
@ -148,7 +148,7 @@ void CPifRam::PifRamRead (void)
|
|||
}
|
||||
}
|
||||
|
||||
void CPifRam::PifRamWrite (void)
|
||||
void CPifRam::PifRamWrite()
|
||||
{
|
||||
CONTROL * Controllers = g_Plugins->Control()->PluginControllers();
|
||||
int Channel = 0, CurPos;
|
||||
|
@ -269,7 +269,7 @@ void CPifRam::PifRamWrite (void)
|
|||
}
|
||||
}
|
||||
|
||||
void CPifRam::SI_DMA_READ (void)
|
||||
void CPifRam::SI_DMA_READ()
|
||||
{
|
||||
BYTE * PifRamPos = m_PifRam;
|
||||
BYTE * RDRAM = g_MMU->Rdram();
|
||||
|
@ -376,7 +376,7 @@ void CPifRam::SI_DMA_READ (void)
|
|||
}
|
||||
}
|
||||
|
||||
void CPifRam::SI_DMA_WRITE (void)
|
||||
void CPifRam::SI_DMA_WRITE()
|
||||
{
|
||||
BYTE * PifRamPos = m_PifRam;
|
||||
|
||||
|
|
|
@ -16,15 +16,15 @@ protected:
|
|||
CPifRamSettings();
|
||||
virtual ~CPifRamSettings();
|
||||
|
||||
inline bool bShowPifRamErrors ( void ) const
|
||||
bool bShowPifRamErrors() const
|
||||
{
|
||||
return m_bShowPifRamErrors;
|
||||
}
|
||||
|
||||
private:
|
||||
static void RefreshSettings ( void * );
|
||||
static void RefreshSettings(void*);
|
||||
|
||||
static bool m_bShowPifRamErrors;
|
||||
static bool m_bShowPifRamErrors;
|
||||
|
||||
static int m_RefCount;
|
||||
|
||||
|
@ -35,17 +35,16 @@ class CPifRam :
|
|||
private CEeprom
|
||||
{
|
||||
public:
|
||||
public:
|
||||
CPifRam ( bool SavesReadOnly );
|
||||
~CPifRam ( void );
|
||||
CPifRam(bool SavesReadOnly);
|
||||
~CPifRam();
|
||||
|
||||
void Reset ( void );
|
||||
void Reset();
|
||||
|
||||
void PifRamWrite ( void );
|
||||
void PifRamRead ( void );
|
||||
void PifRamWrite();
|
||||
void PifRamRead();
|
||||
|
||||
void SI_DMA_READ ( void );
|
||||
void SI_DMA_WRITE ( void );
|
||||
void SI_DMA_READ();
|
||||
void SI_DMA_WRITE();
|
||||
|
||||
protected:
|
||||
BYTE m_PifRom[0x7C0];
|
||||
|
@ -56,5 +55,5 @@ private:
|
|||
void ProcessControllerCommand ( int Control, BYTE * Command );
|
||||
void ReadControllerCommand ( int Control, BYTE * Command );
|
||||
void LogControllerPakData ( char * Description );
|
||||
void n64_cic_nus_6105 (char challenge[], char response[], int length);
|
||||
void n64_cic_nus_6105 (char challenge[], char response[], int length);
|
||||
};
|
||||
|
|
|
@ -269,7 +269,7 @@ void CRegisters::Reset()
|
|||
FixFpuLocations();
|
||||
}
|
||||
|
||||
void CRegisters::SetAsCurrentSystem ( void )
|
||||
void CRegisters::SetAsCurrentSystem()
|
||||
{
|
||||
_PROGRAM_COUNTER = &m_PROGRAM_COUNTER;
|
||||
_GPR = m_GPR;
|
||||
|
@ -284,7 +284,7 @@ void CRegisters::SetAsCurrentSystem ( void )
|
|||
_RoundingModel = &m_RoundingModel;
|
||||
}
|
||||
|
||||
void CRegisters::CheckInterrupts ( void )
|
||||
void CRegisters::CheckInterrupts()
|
||||
{
|
||||
if (!m_System->bFixedAudio() && CpuType() != CPU_SyncCores)
|
||||
{
|
||||
|
@ -366,7 +366,7 @@ void CRegisters::DoAddressError ( BOOL DelaySlot, DWORD BadVaddr, BOOL FromRead)
|
|||
m_PROGRAM_COUNTER = 0x80000180;
|
||||
}
|
||||
|
||||
void CRegisters::FixFpuLocations ( void )
|
||||
void CRegisters::FixFpuLocations()
|
||||
{
|
||||
if ((STATUS_REGISTER & STATUS_FR) == 0)
|
||||
{
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
//CPO registers by name
|
||||
class CP0registers
|
||||
{
|
||||
CP0registers (void);
|
||||
CP0registers();
|
||||
|
||||
protected:
|
||||
CP0registers (DWORD * _CP0);
|
||||
|
@ -114,7 +114,7 @@ enum
|
|||
//Rdram Registers
|
||||
class Rdram_InterfaceReg
|
||||
{
|
||||
Rdram_InterfaceReg (void);
|
||||
Rdram_InterfaceReg();
|
||||
|
||||
protected:
|
||||
Rdram_InterfaceReg (DWORD * _RdramInterface);
|
||||
|
@ -198,7 +198,7 @@ enum
|
|||
//Mips interface registers
|
||||
class Video_InterfaceReg
|
||||
{
|
||||
Video_InterfaceReg (void);
|
||||
Video_InterfaceReg();
|
||||
|
||||
protected:
|
||||
Video_InterfaceReg (DWORD * _VideoInterface);
|
||||
|
@ -232,7 +232,7 @@ public:
|
|||
//Display Processor Control Registers
|
||||
class DisplayControlReg
|
||||
{
|
||||
DisplayControlReg (void);
|
||||
DisplayControlReg();
|
||||
|
||||
protected:
|
||||
DisplayControlReg (DWORD * _DisplayProcessor);
|
||||
|
@ -279,7 +279,7 @@ enum
|
|||
*/
|
||||
class AudioInterfaceReg
|
||||
{
|
||||
AudioInterfaceReg (void);
|
||||
AudioInterfaceReg();
|
||||
|
||||
protected:
|
||||
AudioInterfaceReg (DWORD * _AudioInterface);
|
||||
|
@ -303,7 +303,7 @@ enum
|
|||
|
||||
class PeripheralInterfaceReg
|
||||
{
|
||||
PeripheralInterfaceReg (void);
|
||||
PeripheralInterfaceReg();
|
||||
|
||||
protected:
|
||||
PeripheralInterfaceReg (DWORD * PeripheralInterface);
|
||||
|
@ -328,7 +328,7 @@ public:
|
|||
|
||||
class RDRAMInt_InterfaceReg
|
||||
{
|
||||
RDRAMInt_InterfaceReg (void);
|
||||
RDRAMInt_InterfaceReg();
|
||||
|
||||
protected:
|
||||
RDRAMInt_InterfaceReg (DWORD * RdramInterface);
|
||||
|
@ -424,7 +424,7 @@ enum
|
|||
|
||||
class Serial_InterfaceReg
|
||||
{
|
||||
Serial_InterfaceReg (void);
|
||||
Serial_InterfaceReg();
|
||||
|
||||
protected:
|
||||
Serial_InterfaceReg (DWORD * SerialInterface);
|
||||
|
@ -473,7 +473,7 @@ protected:
|
|||
static DWORD * _CP0;
|
||||
static MIPS_DWORD * _RegHI;
|
||||
static MIPS_DWORD * _RegLO;
|
||||
static float ** _FPR_S;
|
||||
static float ** _FPR_S;
|
||||
static double ** _FPR_D;
|
||||
static DWORD * _FPCR;
|
||||
static DWORD * _LLBit;
|
||||
|
@ -513,7 +513,7 @@ public:
|
|||
DWORD m_FPCR[32];
|
||||
ROUNDING_MODE m_RoundingModel;
|
||||
MIPS_DWORD m_FPR[32];
|
||||
float * m_FPR_S[32];
|
||||
float * m_FPR_S[32];
|
||||
double * m_FPR_D[32];
|
||||
|
||||
//Memory Mapped N64 registers
|
||||
|
@ -531,21 +531,21 @@ public:
|
|||
DWORD m_RspIntrReg;
|
||||
|
||||
|
||||
void CheckInterrupts ( void );
|
||||
void CheckInterrupts ();
|
||||
void DoAddressError ( BOOL DelaySlot, DWORD BadVaddr, BOOL FromRead );
|
||||
void DoBreakException ( BOOL DelaySlot );
|
||||
void DoCopUnusableException ( BOOL DelaySlot, int Coprocessor );
|
||||
BOOL DoIntrException ( BOOL DelaySlot );
|
||||
void DoTLBReadMiss ( BOOL DelaySlot, DWORD BadVaddr );
|
||||
void DoSysCallException ( BOOL DelaySlot);
|
||||
void FixFpuLocations ( void );
|
||||
void Reset ( void );
|
||||
void SetAsCurrentSystem ( void );
|
||||
void FixFpuLocations ();
|
||||
void Reset ();
|
||||
void SetAsCurrentSystem ();
|
||||
|
||||
private:
|
||||
CRegisters(void); // Disable default constructor
|
||||
CRegisters(const CRegisters&); // Disable copy constructor
|
||||
CRegisters& operator=(const CRegisters&); // Disable assignment
|
||||
CRegisters(); // Disable default constructor
|
||||
CRegisters(const CRegisters&); // Disable copy constructor
|
||||
CRegisters& operator=(const CRegisters&); // Disable assignment
|
||||
|
||||
bool m_FirstInterupt;
|
||||
CN64System * m_System;
|
||||
|
|
|
@ -17,7 +17,7 @@ CSram::CSram ( bool ReadOnly ) :
|
|||
|
||||
}
|
||||
|
||||
CSram::~CSram (void)
|
||||
CSram::~CSram()
|
||||
{
|
||||
if (m_hFile)
|
||||
{
|
||||
|
@ -26,7 +26,7 @@ CSram::~CSram (void)
|
|||
}
|
||||
}
|
||||
|
||||
BOOL CSram::LoadSram (void)
|
||||
BOOL CSram::LoadSram()
|
||||
{
|
||||
CPath FileName;
|
||||
|
||||
|
|
|
@ -13,14 +13,14 @@
|
|||
class CSram
|
||||
{
|
||||
public:
|
||||
CSram ( bool ReadOnly );
|
||||
~CSram ( void );
|
||||
CSram(bool ReadOnly);
|
||||
~CSram();
|
||||
|
||||
void DmaFromSram ( BYTE * dest, int StartOffset, int len);
|
||||
void DmaToSram ( BYTE * Source, int StartOffset, int len);
|
||||
void DmaFromSram(BYTE * dest, int StartOffset, int len);
|
||||
void DmaToSram(BYTE * Source, int StartOffset, int len);
|
||||
|
||||
private:
|
||||
BOOL LoadSram ( void );
|
||||
BOOL LoadSram();
|
||||
|
||||
bool m_ReadOnly;
|
||||
HANDLE m_hFile;
|
||||
|
|
|
@ -38,7 +38,7 @@ void CSystemEvents::QueueEvent(SystemEvent action)
|
|||
m_Events.push_back(action);
|
||||
}
|
||||
|
||||
void CSystemEvents::ExecuteEvents ( void )
|
||||
void CSystemEvents::ExecuteEvents()
|
||||
{
|
||||
EventList Events;
|
||||
{
|
||||
|
@ -207,7 +207,7 @@ void CSystemEvents::ExecuteEvents ( void )
|
|||
}
|
||||
}
|
||||
|
||||
void CSystemEvents::ChangePluginFunc ( void )
|
||||
void CSystemEvents::ChangePluginFunc()
|
||||
{
|
||||
g_Notify->DisplayMessage(0,MSG_PLUGIN_INIT);
|
||||
m_System->PluginReset();
|
||||
|
|
|
@ -59,20 +59,20 @@ protected:
|
|||
virtual ~CSystemEvents();
|
||||
|
||||
public:
|
||||
void ExecuteEvents ( void );
|
||||
void QueueEvent ( SystemEvent action);
|
||||
void ExecuteEvents();
|
||||
void QueueEvent(SystemEvent action);
|
||||
|
||||
inline const BOOL & DoSomething ( void ) const
|
||||
const BOOL& DoSomething() const
|
||||
{
|
||||
return m_bDoSomething;
|
||||
}
|
||||
|
||||
private:
|
||||
CSystemEvents(void); // Disable default constructor
|
||||
CSystemEvents(const CSystemEvents&); // Disable copy constructor
|
||||
CSystemEvents& operator=(const CSystemEvents&); // Disable assignment
|
||||
CSystemEvents(); // Disable default constructor
|
||||
CSystemEvents(const CSystemEvents&); // Disable copy constructor
|
||||
CSystemEvents& operator=(const CSystemEvents&); // Disable assignment
|
||||
|
||||
void ChangePluginFunc( void );
|
||||
void ChangePluginFunc();
|
||||
|
||||
CN64System * m_System;
|
||||
CPlugins * m_Plugins;
|
||||
|
|
|
@ -17,7 +17,7 @@ CSystemTimer::CSystemTimer( int & NextTimer ) :
|
|||
|
||||
}
|
||||
|
||||
void CSystemTimer::Reset ( void )
|
||||
void CSystemTimer::Reset()
|
||||
{
|
||||
//initialise Structure
|
||||
for (int i = 0; i < MaxTimer; i++)
|
||||
|
@ -96,7 +96,7 @@ void CSystemTimer::StopTimer ( TimerType Type )
|
|||
}
|
||||
|
||||
|
||||
void CSystemTimer::FixTimers (void)
|
||||
void CSystemTimer::FixTimers()
|
||||
{
|
||||
|
||||
if (m_inFixTimer)
|
||||
|
@ -153,7 +153,7 @@ void CSystemTimer::FixTimers (void)
|
|||
m_inFixTimer = false;
|
||||
}
|
||||
|
||||
void CSystemTimer::UpdateTimers ( void )
|
||||
void CSystemTimer::UpdateTimers()
|
||||
{
|
||||
int TimeTaken = m_LastUpdate - m_NextTimer;
|
||||
if (TimeTaken != 0)
|
||||
|
@ -168,7 +168,7 @@ void CSystemTimer::UpdateTimers ( void )
|
|||
}
|
||||
}
|
||||
|
||||
void CSystemTimer::TimerDone (void)
|
||||
void CSystemTimer::TimerDone()
|
||||
{
|
||||
UpdateTimers();
|
||||
|
||||
|
@ -251,7 +251,7 @@ void CSystemTimer::TimerDone (void)
|
|||
}*/
|
||||
}
|
||||
|
||||
void CSystemTimer::SetCompareTimer ( void )
|
||||
void CSystemTimer::SetCompareTimer()
|
||||
{
|
||||
DWORD NextCompare = 0x7FFFFFFF;
|
||||
if (g_Reg)
|
||||
|
|
|
@ -42,29 +42,29 @@ public:
|
|||
void SetTimer ( TimerType Type, DWORD Cycles, bool bRelative );
|
||||
DWORD GetTimer ( TimerType Type );
|
||||
void StopTimer ( TimerType Type );
|
||||
void UpdateTimers ( void );
|
||||
void TimerDone ( void );
|
||||
void Reset ( void );
|
||||
void UpdateCompareTimer ( void );
|
||||
bool SaveAllowed ( void );
|
||||
void UpdateTimers ();
|
||||
void TimerDone ();
|
||||
void Reset ();
|
||||
void UpdateCompareTimer ();
|
||||
bool SaveAllowed ();
|
||||
|
||||
void SaveData ( void * file ) const;
|
||||
void LoadData ( void * file );
|
||||
|
||||
void RecordDifference( CLog &LogFile, const CSystemTimer& rSystemTimer);
|
||||
|
||||
inline TimerType CurrentType ( void ) const { return m_Current; }
|
||||
TimerType CurrentType() const { return m_Current; }
|
||||
|
||||
bool operator == (const CSystemTimer& rSystemTimer) const;
|
||||
bool operator != (const CSystemTimer& rSystemTimer) const;
|
||||
bool operator == (const CSystemTimer& rSystemTimer) const;
|
||||
bool operator != (const CSystemTimer& rSystemTimer) const;
|
||||
|
||||
private:
|
||||
private:
|
||||
TIMER_DETAILS m_TimerDetatils[MaxTimer];
|
||||
int m_LastUpdate; //Timer at last update
|
||||
int & m_NextTimer;
|
||||
int & m_NextTimer;
|
||||
TimerType m_Current;
|
||||
bool m_inFixTimer;
|
||||
|
||||
void SetCompareTimer ( void );
|
||||
void FixTimers ( void );
|
||||
void SetCompareTimer();
|
||||
void FixTimers();
|
||||
};
|
||||
|
|
|
@ -12,12 +12,12 @@
|
|||
|
||||
class CDebugTlb;
|
||||
|
||||
class CTLB_CB
|
||||
class CTLB_CB
|
||||
{
|
||||
public:
|
||||
virtual void TLB_Mapped ( DWORD VAddr, DWORD Len, DWORD PAddr, bool bReadOnly ) = 0;
|
||||
virtual void TLB_Unmaped ( DWORD VAddr, DWORD Len ) = 0;
|
||||
virtual void TLB_Changed ( void ) = 0;
|
||||
public:
|
||||
virtual void TLB_Mapped(DWORD VAddr, DWORD Len, DWORD PAddr, bool bReadOnly) = 0;
|
||||
virtual void TLB_Unmaped(DWORD VAddr, DWORD Len) = 0;
|
||||
virtual void TLB_Changed() = 0;
|
||||
};
|
||||
|
||||
class CTLB :
|
||||
|
@ -92,27 +92,27 @@ public:
|
|||
} TLB_ENTRY;
|
||||
|
||||
public:
|
||||
CTLB ( CTLB_CB * CallBack );
|
||||
~CTLB ( void );
|
||||
CTLB(CTLB_CB * CallBack);
|
||||
~CTLB();
|
||||
|
||||
void Reset ( bool InvalidateTLB );
|
||||
void Reset(bool InvalidateTLB);
|
||||
|
||||
//Used by opcodes of the same name to manipulate the tlb (reads the registers)
|
||||
void Probe ( void );
|
||||
void ReadEntry ( void );
|
||||
void WriteEntry ( int index, bool Random );
|
||||
void Probe();
|
||||
void ReadEntry();
|
||||
void WriteEntry(int index, bool Random);
|
||||
|
||||
//See if a VAddr has an entry to translate to a PAddr
|
||||
bool AddressDefined ( DWORD VAddr );
|
||||
bool AddressDefined(DWORD VAddr);
|
||||
|
||||
const TLB_ENTRY & TlbEntry ( int Entry) const
|
||||
const TLB_ENTRY & TlbEntry(int Entry) const
|
||||
{
|
||||
return m_tlb[Entry];
|
||||
}
|
||||
|
||||
bool PAddrToVAddr ( DWORD PAddr, DWORD & VAddr, DWORD & Index );
|
||||
bool PAddrToVAddr(DWORD PAddr, DWORD & VAddr, DWORD & Index);
|
||||
|
||||
void RecordDifference ( CLog &LogFile, const CTLB& rTLB);
|
||||
void RecordDifference(CLog &LogFile, const CTLB& rTLB);
|
||||
|
||||
bool operator == (const CTLB& rTLB) const;
|
||||
bool operator != (const CTLB& rTLB) const;
|
||||
|
@ -140,5 +140,5 @@ private:
|
|||
TLB_ENTRY m_tlb[32];
|
||||
FASTTLB m_FastTlb[64];
|
||||
|
||||
void SetupTLB_Entry ( int index, bool Random );
|
||||
void SetupTLB_Entry(int index, bool Random);
|
||||
};
|
||||
|
|
|
@ -20,7 +20,7 @@ CTLB::CTLB(CTLB_CB * CallBack ):
|
|||
WriteTrace(TraceTLB,__FUNCTION__ ": Done");
|
||||
}
|
||||
|
||||
CTLB::~CTLB (void)
|
||||
CTLB::~CTLB()
|
||||
{
|
||||
WriteTrace(TraceTLB,__FUNCTION__ ": Start");
|
||||
WriteTrace(TraceTLB,__FUNCTION__ ": Done");
|
||||
|
@ -72,7 +72,7 @@ bool CTLB::AddressDefined ( DWORD VAddr)
|
|||
return false;
|
||||
}
|
||||
|
||||
void CTLB::Probe (void)
|
||||
void CTLB::Probe()
|
||||
{
|
||||
int Counter;
|
||||
|
||||
|
@ -106,7 +106,8 @@ void CTLB::Probe (void)
|
|||
WriteTrace(TraceTLB,__FUNCTION__ ": Done");
|
||||
}
|
||||
|
||||
void CTLB::ReadEntry (void) {
|
||||
void CTLB::ReadEntry()
|
||||
{
|
||||
DWORD index = g_Reg->INDEX_REGISTER & 0x1F;
|
||||
|
||||
g_Reg->PAGE_MASK_REGISTER = m_tlb[index].PageMask.Value ;
|
||||
|
|
|
@ -55,7 +55,7 @@ CN64System::CN64System ( CPlugins * Plugins, bool SavesReadOnly ) :
|
|||
m_Cheats.LoadCheats(!g_Settings->LoadDword(Setting_RememberCheats), Plugins);
|
||||
}
|
||||
|
||||
CN64System::~CN64System ( void )
|
||||
CN64System::~CN64System()
|
||||
{
|
||||
SetActiveSystem(false);
|
||||
Mempak::Close();
|
||||
|
@ -231,11 +231,11 @@ bool CN64System::RunFileImage ( const char * FileLoc )
|
|||
return true;
|
||||
}
|
||||
|
||||
void CN64System::CloseSystem ( void )
|
||||
void CN64System::CloseSystem()
|
||||
{
|
||||
if (g_BaseSystem)
|
||||
{
|
||||
g_BaseSystem->CloseCpu();
|
||||
g_BaseSystem->CloseCpu();
|
||||
delete g_BaseSystem;
|
||||
g_BaseSystem = NULL;
|
||||
}
|
||||
|
@ -398,7 +398,7 @@ void CN64System::StartEmulationThread ( ThreadInfo * Info )
|
|||
CoUninitialize();
|
||||
}
|
||||
|
||||
void CN64System::CloseCpu ( void )
|
||||
void CN64System::CloseCpu()
|
||||
{
|
||||
if (m_CPU_Handle == NULL)
|
||||
{
|
||||
|
@ -461,7 +461,7 @@ void CN64System::DisplayRomInfo ( HWND hParent )
|
|||
Info.DisplayInformation(hParent);
|
||||
}
|
||||
|
||||
void CN64System::Pause(void)
|
||||
void CN64System::Pause()
|
||||
{
|
||||
if (m_EndEmulation)
|
||||
{
|
||||
|
@ -512,7 +512,7 @@ bool CN64System::IsDialogMsg( MSG * msg )
|
|||
return false;
|
||||
}
|
||||
|
||||
void CN64System::GameReset (void)
|
||||
void CN64System::GameReset()
|
||||
{
|
||||
m_SystemTimer.SetTimer(CSystemTimer::SoftResetTimer,0x3000000,false);
|
||||
m_Plugins->Gfx()->ShowCFB();
|
||||
|
@ -524,7 +524,7 @@ void CN64System::GameReset (void)
|
|||
}
|
||||
}
|
||||
|
||||
void CN64System::PluginReset ( void )
|
||||
void CN64System::PluginReset()
|
||||
{
|
||||
if (!m_Plugins->ResetInUiThread(this))
|
||||
{
|
||||
|
@ -880,7 +880,7 @@ void CN64System::InitRegisters( bool bPostPif, CMipsMemory & MMU )
|
|||
}
|
||||
}
|
||||
|
||||
void CN64System::ExecuteCPU ( void )
|
||||
void CN64System::ExecuteCPU()
|
||||
{
|
||||
//reset code
|
||||
g_Settings->SaveBool(GameRunning_CPU_Running,true);
|
||||
|
@ -911,24 +911,24 @@ void CN64System::ExecuteCPU ( void )
|
|||
}
|
||||
}
|
||||
|
||||
void CN64System::ExecuteInterpret ()
|
||||
void CN64System::ExecuteInterpret()
|
||||
{
|
||||
SetActiveSystem();
|
||||
CInterpreterCPU::ExecuteCPU();
|
||||
}
|
||||
|
||||
void CN64System::ExecuteRecompiler ()
|
||||
void CN64System::ExecuteRecompiler()
|
||||
{
|
||||
m_Recomp->Run();
|
||||
}
|
||||
|
||||
void CN64System::ExecuteSyncCPU ()
|
||||
void CN64System::ExecuteSyncCPU()
|
||||
{
|
||||
g_Notify->BringToTop();
|
||||
m_Recomp->Run();
|
||||
}
|
||||
|
||||
void CN64System::CpuStopped ( void )
|
||||
void CN64System::CpuStopped()
|
||||
{
|
||||
g_Settings->SaveBool(GameRunning_CPU_Running,(DWORD)false);
|
||||
g_Notify->WindowMode();
|
||||
|
@ -1376,7 +1376,7 @@ void CN64System::DumpSyncErrors (CN64System * SecondCPU)
|
|||
// AddEvent(CloseCPU);
|
||||
}
|
||||
|
||||
bool CN64System::SaveState(void)
|
||||
bool CN64System::SaveState()
|
||||
{
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": Start");
|
||||
|
||||
|
@ -1525,7 +1525,7 @@ bool CN64System::SaveState(void)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool CN64System::LoadState(void)
|
||||
bool CN64System::LoadState()
|
||||
{
|
||||
stdstr InstantFileName = g_Settings->LoadString(GameRunning_InstantSaveFile);
|
||||
if (!InstantFileName.empty())
|
||||
|
@ -1787,7 +1787,7 @@ bool CN64System::LoadState(LPCSTR FileName)
|
|||
return true;
|
||||
}
|
||||
|
||||
void CN64System::RunRSP ( void )
|
||||
void CN64System::RunRSP()
|
||||
{
|
||||
WriteTraceF(TraceRSP, __FUNCTION__ ": Start (SP Status %X)",m_Reg.SP_STATUS_REG);
|
||||
if ( ( m_Reg.SP_STATUS_REG & SP_STATUS_HALT ) == 0)
|
||||
|
@ -1877,7 +1877,7 @@ void CN64System::RunRSP ( void )
|
|||
WriteTraceF(TraceRSP, __FUNCTION__ ": Done (SP Status %X)",m_Reg.SP_STATUS_REG);
|
||||
}
|
||||
|
||||
void CN64System::SyncToAudio ( void )
|
||||
void CN64System::SyncToAudio()
|
||||
{
|
||||
if (!bSyncToAudio() || !bLimitFPS())
|
||||
{
|
||||
|
@ -1902,7 +1902,7 @@ void CN64System::SyncToAudio ( void )
|
|||
}
|
||||
}
|
||||
|
||||
void CN64System::RefreshScreen ( void )
|
||||
void CN64System::RefreshScreen()
|
||||
{
|
||||
SPECIAL_TIMERS CPU_UsageAddr = Timer_None/*, ProfilingAddr = Timer_None*/;
|
||||
DWORD VI_INTR_TIME = 500000;
|
||||
|
@ -2028,7 +2028,7 @@ void CN64System::TLB_Unmaped ( DWORD VAddr, DWORD Len )
|
|||
}
|
||||
}
|
||||
|
||||
void CN64System::TLB_Changed ( void )
|
||||
void CN64System::TLB_Changed()
|
||||
{
|
||||
Debug_RefreshTLBWindow();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -46,29 +46,29 @@ public:
|
|||
static bool RunFileImage ( const char * FileLoc );
|
||||
static void CloseSystem ( void );
|
||||
|
||||
void CloseCpu ( void );
|
||||
void CloseCpu ();
|
||||
void ExternalEvent ( SystemEvent action ); //covers gui interacting and timers etc..
|
||||
stdstr ChooseFileToOpen ( HWND hParent );
|
||||
void DisplayRomInfo ( HWND hParent );
|
||||
void SelectCheats ( HWND hParent );
|
||||
void StartEmulation ( bool NewThread );
|
||||
void SyncToAudio ( void );
|
||||
void SyncToAudio ();
|
||||
bool IsDialogMsg ( MSG * msg );
|
||||
void IncreaseSpeed ( void ) { m_Limitor.IncreaseSpeed(); }
|
||||
void DecreaseSpeed ( void ) { m_Limitor.DecreaseSpeed(); }
|
||||
void IncreaseSpeed () { m_Limitor.IncreaseSpeed(); }
|
||||
void DecreaseSpeed () { m_Limitor.DecreaseSpeed(); }
|
||||
void Reset ( bool bInitReg, bool ClearMenory );
|
||||
void GameReset ( void );
|
||||
void PluginReset ( void );
|
||||
void GameReset ();
|
||||
void PluginReset ();
|
||||
|
||||
void Pause ( void );
|
||||
void RunRSP ( void );
|
||||
bool SaveState ( void );
|
||||
void Pause ();
|
||||
void RunRSP ();
|
||||
bool SaveState ();
|
||||
bool LoadState ( LPCSTR FileName );
|
||||
bool LoadState ( void );
|
||||
bool LoadState ();
|
||||
|
||||
inline bool DmaUsed ( void ) const { return m_DMAUsed; }
|
||||
inline void SetDmaUsed ( bool DMAUsed) { m_DMAUsed = DMAUsed; }
|
||||
inline DWORD GetButtons ( int Control ) { return m_Buttons[Control]; }
|
||||
bool DmaUsed() const { return m_DMAUsed; }
|
||||
void SetDmaUsed(bool DMAUsed) { m_DMAUsed = DMAUsed; }
|
||||
DWORD GetButtons(int Control) const { return m_Buttons[Control]; }
|
||||
|
||||
//Variable used to track that the SP is being handled and stays the same as the real SP in sync core
|
||||
#ifdef TEST_SP_TRACKING
|
||||
|
@ -78,8 +78,8 @@ public:
|
|||
void UpdateSyncCPU ( CN64System * const SecondCPU, DWORD const Cycles );
|
||||
void SyncCPU ( CN64System * const SecondCPU );
|
||||
void SyncCPUPC ( CN64System * const SecondCPU );
|
||||
void SyncSystem ( void );
|
||||
void SyncSystemPC ( void );
|
||||
void SyncSystem ();
|
||||
void SyncSystemPC ();
|
||||
private:
|
||||
//Make sure plugins can directly access this information
|
||||
friend CGfxPlugin;
|
||||
|
@ -90,50 +90,50 @@ private:
|
|||
//Recompiler has access to manipulate and call functions
|
||||
friend CSystemTimer;
|
||||
|
||||
//Used for loading and potentialy executing the CPU in its own thread.
|
||||
//Used for loading and potentially executing the CPU in its own thread.
|
||||
static void StartEmulationThread ( ThreadInfo * Info );
|
||||
static bool EmulationStarting ( HANDLE hThread, DWORD ThreadId );
|
||||
|
||||
void ExecuteCPU ( void );
|
||||
void RefreshScreen ( void );
|
||||
bool InternalEvent ( void );
|
||||
void ExecuteCPU ();
|
||||
void RefreshScreen ();
|
||||
bool InternalEvent ();
|
||||
void DumpSyncErrors ( CN64System * SecondCPU );
|
||||
void StartEmulation2 ( bool NewThread );
|
||||
bool SetActiveSystem ( bool bActive = true );
|
||||
void InitRegisters ( bool bPostPif, CMipsMemory & MMU );
|
||||
|
||||
//CPU Methods
|
||||
void ExecuteRecompiler ( );
|
||||
void ExecuteInterpret ( );
|
||||
void ExecuteSyncCPU ();
|
||||
void ExecuteRecompiler();
|
||||
void ExecuteInterpret();
|
||||
void ExecuteSyncCPU();
|
||||
|
||||
void AddEvent ( SystemEvent Event);
|
||||
void AddEvent(SystemEvent Event);
|
||||
|
||||
//Notification of changing conditions
|
||||
void FunctionStarted ( DWORD NewFuncAddress, DWORD OldFuncAddress, DWORD ReturnAddress );
|
||||
void FunctionEnded ( DWORD ReturnAddress, DWORD StackPos );
|
||||
void FunctionStarted(DWORD NewFuncAddress, DWORD OldFuncAddress, DWORD ReturnAddress);
|
||||
void FunctionEnded(DWORD ReturnAddress, DWORD StackPos);
|
||||
|
||||
//Mark information saying that the CPU has stoped
|
||||
void CpuStopped ( void );
|
||||
//Mark information saying that the CPU has stopped
|
||||
void CpuStopped();
|
||||
|
||||
//Function in CMipsMemory_CallBack
|
||||
virtual bool WriteToProtectedMemory (DWORD Address, int length);
|
||||
virtual bool WriteToProtectedMemory(DWORD Address, int length);
|
||||
|
||||
//Functions in CTLB_CB
|
||||
void TLB_Mapped ( DWORD VAddr, DWORD Len, DWORD PAddr, bool bReadOnly );
|
||||
void TLB_Unmaped ( DWORD VAddr, DWORD Len );
|
||||
void TLB_Changed ( void );
|
||||
void TLB_Mapped(DWORD VAddr, DWORD Len, DWORD PAddr, bool bReadOnly);
|
||||
void TLB_Unmaped(DWORD VAddr, DWORD Len);
|
||||
void TLB_Changed();
|
||||
|
||||
CPlugins * const m_Plugins; //The plugin container
|
||||
CN64System * m_SyncCPU;
|
||||
CPlugins * m_SyncPlugins;
|
||||
CMainGui * m_SyncWindow;
|
||||
CMipsMemoryVM m_MMU_VM; //Memory of the n64
|
||||
CTLB m_TLB;
|
||||
CRegisters m_Reg;
|
||||
CMipsMemoryVM m_MMU_VM; //Memory of the n64
|
||||
CTLB m_TLB;
|
||||
CRegisters m_Reg;
|
||||
CFramePerSecond m_FPS;
|
||||
CProfiling m_CPU_Usage; //used to track the cpu usage
|
||||
CRecompiler * m_Recomp;
|
||||
CProfiling m_CPU_Usage; //used to track the cpu usage
|
||||
CRecompiler * m_Recomp;
|
||||
CAudio m_Audio;
|
||||
CSpeedLimitor m_Limitor;
|
||||
bool m_InReset;
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
****************************************************************************/
|
||||
#include "stdafx.h"
|
||||
|
||||
CN64Rom::CN64Rom ( void )
|
||||
CN64Rom::CN64Rom()
|
||||
{
|
||||
m_hRomFile = NULL;
|
||||
m_hRomFileMapping = NULL;
|
||||
|
@ -23,7 +23,8 @@ CN64Rom::CN64Rom ( void )
|
|||
m_CicChip = CIC_UNKNOWN;
|
||||
}
|
||||
|
||||
CN64Rom::~CN64Rom ( void ) {
|
||||
CN64Rom::~CN64Rom()
|
||||
{
|
||||
UnallocateRomImage();
|
||||
}
|
||||
|
||||
|
@ -193,7 +194,7 @@ bool CN64Rom::AllocateAndLoadZipImage ( const char * FileLoc, bool LoadBootCodeO
|
|||
return FoundRom;
|
||||
}
|
||||
|
||||
void CN64Rom::ByteSwapRom (void) {
|
||||
void CN64Rom::ByteSwapRom() {
|
||||
DWORD count;
|
||||
|
||||
switch (*((DWORD *)&m_ROMImage[0])) {
|
||||
|
@ -201,20 +202,20 @@ void CN64Rom::ByteSwapRom (void) {
|
|||
for( count = 0 ; count < m_RomFileSize; count += 4 ) {
|
||||
m_ROMImage[count] ^= m_ROMImage[count+2];
|
||||
m_ROMImage[count + 2] ^= m_ROMImage[count];
|
||||
m_ROMImage[count] ^= m_ROMImage[count+2];
|
||||
m_ROMImage[count] ^= m_ROMImage[count+2];
|
||||
m_ROMImage[count + 1] ^= m_ROMImage[count + 3];
|
||||
m_ROMImage[count + 3] ^= m_ROMImage[count + 1];
|
||||
m_ROMImage[count + 1] ^= m_ROMImage[count + 3];
|
||||
m_ROMImage[count + 1] ^= m_ROMImage[count + 3];
|
||||
}
|
||||
break;
|
||||
case 0x40123780:
|
||||
for( count = 0 ; count < m_RomFileSize; count += 4 ) {
|
||||
m_ROMImage[count] ^= m_ROMImage[count+3];
|
||||
m_ROMImage[count + 3] ^= m_ROMImage[count];
|
||||
m_ROMImage[count] ^= m_ROMImage[count+3];
|
||||
m_ROMImage[count] ^= m_ROMImage[count+3];
|
||||
m_ROMImage[count + 1] ^= m_ROMImage[count + 2];
|
||||
m_ROMImage[count + 2] ^= m_ROMImage[count + 1];
|
||||
m_ROMImage[count + 1] ^= m_ROMImage[count + 2];
|
||||
m_ROMImage[count + 1] ^= m_ROMImage[count + 2];
|
||||
}
|
||||
break;
|
||||
case 0x80371240: break;
|
||||
|
@ -223,7 +224,7 @@ void CN64Rom::ByteSwapRom (void) {
|
|||
}
|
||||
}
|
||||
|
||||
void CN64Rom::CalculateCicChip ( void )
|
||||
void CN64Rom::CalculateCicChip()
|
||||
{
|
||||
__int64 CRC = 0;
|
||||
|
||||
|
@ -251,7 +252,8 @@ void CN64Rom::CalculateCicChip ( void )
|
|||
|
||||
}
|
||||
|
||||
CICChip CN64Rom::CicChipID ( void ) {
|
||||
CICChip CN64Rom::CicChipID()
|
||||
{
|
||||
return m_CicChip;
|
||||
}
|
||||
|
||||
|
@ -483,17 +485,19 @@ void CN64Rom::SaveRomSettingID ( bool temp )
|
|||
}
|
||||
}
|
||||
|
||||
void CN64Rom::ClearRomSettingID ( void )
|
||||
void CN64Rom::ClearRomSettingID()
|
||||
{
|
||||
g_Settings->SaveString(Game_GameName,"");
|
||||
g_Settings->SaveString(Game_IniKey,"");
|
||||
}
|
||||
|
||||
void CN64Rom::SetError ( LanguageStringID ErrorMsg ) {
|
||||
void CN64Rom::SetError(LanguageStringID ErrorMsg)
|
||||
{
|
||||
m_ErrorMsg = ErrorMsg;
|
||||
}
|
||||
|
||||
void CN64Rom::UnallocateRomImage ( void ) {
|
||||
void CN64Rom::UnallocateRomImage()
|
||||
{
|
||||
if (m_hRomFileMapping) {
|
||||
UnmapViewOfFile (m_ROMImage);
|
||||
CloseHandle(m_hRomFileMapping);
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
class CN64Rom :
|
||||
protected CDebugSettings
|
||||
{
|
||||
{
|
||||
//constant values
|
||||
enum { ReadFromRomSection = 0x400000 };
|
||||
|
||||
|
@ -29,27 +29,28 @@ class CN64Rom :
|
|||
|
||||
bool AllocateAndLoadN64Image ( const char * FileLoc, bool LoadBootCodeOnly );
|
||||
bool AllocateAndLoadZipImage ( const char * FileLoc, bool LoadBootCodeOnly );
|
||||
void ByteSwapRom ( void );
|
||||
void SetError ( LanguageStringID ErrorMsg );
|
||||
void ByteSwapRom ();
|
||||
void SetError ( LanguageStringID ErrorMsg );
|
||||
static void __stdcall NotificationCB ( LPCWSTR Status, CN64Rom * _this );
|
||||
void CalculateCicChip ( void );
|
||||
void CalculateCicChip ();
|
||||
|
||||
public:
|
||||
CN64Rom ( void );
|
||||
~CN64Rom ( void );
|
||||
CN64Rom();
|
||||
~CN64Rom();
|
||||
|
||||
bool LoadN64Image ( const char * FileLoc, bool LoadBootCodeOnly = false );
|
||||
static bool IsValidRomImage( BYTE Test[4] );
|
||||
void SaveRomSettingID ( bool temp );
|
||||
void ClearRomSettingID ( void );
|
||||
CICChip CicChipID ( void );
|
||||
BYTE * GetRomAddress ( void ) { return m_ROMImage; }
|
||||
DWORD GetRomSize ( void ) { return m_RomFileSize; }
|
||||
stdstr GetRomMD5 ( void ) { return m_MD5; }
|
||||
stdstr GetRomName ( void ) { return m_RomName; }
|
||||
stdstr GetFileName ( void ) { return m_FileName; }
|
||||
Country GetCountry ( void ) { return m_Country; }
|
||||
void UnallocateRomImage ( void );
|
||||
|
||||
void ClearRomSettingID ();
|
||||
CICChip CicChipID ();
|
||||
BYTE * GetRomAddress () { return m_ROMImage; }
|
||||
DWORD GetRomSize () const { return m_RomFileSize; }
|
||||
stdstr GetRomMD5 () const { return m_MD5; }
|
||||
stdstr GetRomName () const { return m_RomName; }
|
||||
stdstr GetFileName () const { return m_FileName; }
|
||||
Country GetCountry () const { return m_Country; }
|
||||
void UnallocateRomImage ();
|
||||
|
||||
//Get a message id for the reason that you failed to load the rom
|
||||
LanguageStringID GetError ( void ) { return m_ErrorMsg; }
|
||||
LanguageStringID GetError () const { return m_ErrorMsg; }
|
||||
};
|
||||
|
|
|
@ -38,7 +38,7 @@ SPECIAL_TIMERS CProfiling::StartTimer(SPECIAL_TIMERS Address)
|
|||
return OldTimerAddr;
|
||||
}
|
||||
|
||||
SPECIAL_TIMERS CProfiling::StopTimer(void) {
|
||||
SPECIAL_TIMERS CProfiling::StopTimer() {
|
||||
DWORD HiValue, LoValue;
|
||||
|
||||
if (m_CurrentTimerAddr == Timer_None) { return m_CurrentTimerAddr; }
|
||||
|
@ -67,7 +67,7 @@ SPECIAL_TIMERS CProfiling::StopTimer(void) {
|
|||
return OldTimerAddr;
|
||||
}
|
||||
|
||||
void CProfiling::ShowCPU_Usage (void) {
|
||||
void CProfiling::ShowCPU_Usage() {
|
||||
__int64 TotalTime, CPU = 0, Alist = 0, Dlist = 0, Idle = 0;
|
||||
PROFILE_ENRTY Entry;
|
||||
|
||||
|
@ -104,13 +104,13 @@ void CProfiling::ShowCPU_Usage (void) {
|
|||
ResetCounters();
|
||||
}
|
||||
|
||||
void CProfiling::ResetCounters (void) {
|
||||
void CProfiling::ResetCounters() {
|
||||
m_Entries.clear();
|
||||
}
|
||||
|
||||
typedef struct { SPECIAL_TIMERS Timer; char * Name; } TIMER_NAME;
|
||||
|
||||
void CProfiling::GenerateLog(void) {
|
||||
void CProfiling::GenerateLog() {
|
||||
stdstr LogFileName;
|
||||
{
|
||||
CLog Log;
|
||||
|
|
|
@ -14,27 +14,27 @@ typedef std::map<SPECIAL_TIMERS, __int64 > PROFILE_ENRTIES;
|
|||
typedef PROFILE_ENRTIES::iterator PROFILE_ENRTY;
|
||||
typedef PROFILE_ENRTIES::value_type PROFILE_VALUE;
|
||||
|
||||
class CProfiling
|
||||
class CProfiling
|
||||
{
|
||||
public:
|
||||
CProfiling (void);
|
||||
public:
|
||||
CProfiling();
|
||||
|
||||
//recording timing against current timer, returns the address of the timer stoped
|
||||
SPECIAL_TIMERS StartTimer ( SPECIAL_TIMERS Address );
|
||||
SPECIAL_TIMERS StopTimer ( void );
|
||||
//recording timing against current timer, returns the address of the timer stopped
|
||||
SPECIAL_TIMERS StartTimer(SPECIAL_TIMERS Address);
|
||||
SPECIAL_TIMERS StopTimer();
|
||||
|
||||
//Display the CPU Usage
|
||||
void ShowCPU_Usage ( void );
|
||||
void ShowCPU_Usage();
|
||||
|
||||
//Reset all the counters back to 0
|
||||
void ResetCounters ( void );
|
||||
void ResetCounters();
|
||||
|
||||
//Generate a log file with the current results, this will also reset the counters
|
||||
void GenerateLog ( void );
|
||||
void GenerateLog();
|
||||
|
||||
private:
|
||||
CProfiling(const CProfiling&); // Disable copy constructor
|
||||
CProfiling& operator=(const CProfiling&); // Disable assignment
|
||||
CProfiling(const CProfiling&); // Disable copy constructor
|
||||
CProfiling& operator=(const CProfiling&); // Disable assignment
|
||||
|
||||
SPECIAL_TIMERS m_CurrentTimerAddr;
|
||||
DWORD m_CurrentDisplayCount;
|
||||
|
|
|
@ -352,7 +352,7 @@ bool CCodeBlock::CreateBlockLinkage ( CCodeSection * EnterSection )
|
|||
return true;
|
||||
}
|
||||
|
||||
void CCodeBlock::DetermineLoops ( void )
|
||||
void CCodeBlock::DetermineLoops()
|
||||
{
|
||||
for (SectionMap::iterator itr = m_SectionMap.begin(); itr != m_SectionMap.end(); itr++)
|
||||
{
|
||||
|
@ -363,7 +363,7 @@ void CCodeBlock::DetermineLoops ( void )
|
|||
}
|
||||
}
|
||||
|
||||
void CCodeBlock::LogSectionInfo ( void )
|
||||
void CCodeBlock::LogSectionInfo()
|
||||
{
|
||||
for (SectionList::iterator itr = m_Sections.begin(); itr != m_Sections.end(); itr++)
|
||||
{
|
||||
|
@ -372,7 +372,7 @@ void CCodeBlock::LogSectionInfo ( void )
|
|||
}
|
||||
}
|
||||
|
||||
bool CCodeBlock::AnalyseBlock ( void )
|
||||
bool CCodeBlock::AnalyseBlock()
|
||||
{
|
||||
if (!g_System->bLinkBlocks())
|
||||
{
|
||||
|
@ -738,7 +738,7 @@ bool CCodeBlock::Compile()
|
|||
}
|
||||
|
||||
|
||||
void CCodeBlock::CompileExitCode ( void )
|
||||
void CCodeBlock::CompileExitCode()
|
||||
{
|
||||
for (EXIT_LIST::iterator ExitIter = m_ExitInfo.begin(); ExitIter != m_ExitInfo.end(); ExitIter++)
|
||||
{
|
||||
|
@ -750,7 +750,7 @@ void CCodeBlock::CompileExitCode ( void )
|
|||
}
|
||||
}
|
||||
|
||||
DWORD CCodeBlock::NextTest ( void )
|
||||
DWORD CCodeBlock::NextTest()
|
||||
{
|
||||
return InterlockedIncrement(&m_Test);
|
||||
}
|
||||
|
|
|
@ -17,48 +17,49 @@ public:
|
|||
CCodeBlock(DWORD VAddrEnter, BYTE * RecompPos );
|
||||
~CCodeBlock();
|
||||
|
||||
bool Compile ( void );
|
||||
bool Compile();
|
||||
|
||||
inline DWORD VAddrEnter ( void ) const { return m_VAddrEnter; }
|
||||
inline DWORD VAddrFirst ( void ) const { return m_VAddrFirst; }
|
||||
inline DWORD VAddrLast ( void ) const { return m_VAddrLast; }
|
||||
inline BYTE * CompiledLocation ( void ) const { return m_CompiledLocation; }
|
||||
inline int NoOfSections ( void ) const { return m_Sections.size(); }
|
||||
inline const CCodeSection & EnterSection ( void ) const { return *m_EnterSection; }
|
||||
inline const MD5Digest & Hash ( void ) const { return m_Hash; }
|
||||
DWORD VAddrEnter() const { return m_VAddrEnter; }
|
||||
DWORD VAddrFirst() const { return m_VAddrFirst; }
|
||||
DWORD VAddrLast() const { return m_VAddrLast; }
|
||||
BYTE * CompiledLocation() const { return m_CompiledLocation; }
|
||||
int NoOfSections() const { return m_Sections.size(); }
|
||||
const CCodeSection & EnterSection() const { return *m_EnterSection; }
|
||||
const MD5Digest & Hash() const { return m_Hash; }
|
||||
|
||||
inline void SetVAddrFirst ( DWORD VAddr ) { m_VAddrFirst = VAddr; }
|
||||
inline void SetVAddrLast ( DWORD VAddr ) { m_VAddrLast = VAddr; }
|
||||
void SetVAddrFirst(DWORD VAddr) { m_VAddrFirst = VAddr; }
|
||||
void SetVAddrLast(DWORD VAddr) { m_VAddrLast = VAddr; }
|
||||
|
||||
CCodeSection * ExistingSection ( DWORD Addr ) { return m_EnterSection->ExistingSection(Addr,NextTest()); }
|
||||
bool SectionAccessible ( DWORD m_SectionID ) { return m_EnterSection->SectionAccessible(m_SectionID,NextTest()); }
|
||||
CCodeSection * ExistingSection(DWORD Addr) { return m_EnterSection->ExistingSection(Addr, NextTest()); }
|
||||
bool SectionAccessible(DWORD m_SectionID) { return m_EnterSection->SectionAccessible(m_SectionID, NextTest()); }
|
||||
|
||||
inline QWORD MemContents(int i) const { return m_MemContents[i]; }
|
||||
inline QWORD * MemLocation(int i) const { return m_MemLocation[i]; }
|
||||
QWORD MemContents(int i) const { return m_MemContents[i]; }
|
||||
QWORD * MemLocation(int i) const { return m_MemLocation[i]; }
|
||||
|
||||
DWORD NextTest();
|
||||
|
||||
EXIT_LIST m_ExitInfo;
|
||||
DWORD NextTest ( void );
|
||||
|
||||
private:
|
||||
CCodeBlock(void); // Disable default constructor
|
||||
CCodeBlock(const CCodeBlock&); // Disable copy constructor
|
||||
CCodeBlock& operator=(const CCodeBlock&); // Disable assignment
|
||||
CCodeBlock(); // Disable default constructor
|
||||
CCodeBlock(const CCodeBlock&); // Disable copy constructor
|
||||
CCodeBlock& operator=(const CCodeBlock&); // Disable assignment
|
||||
|
||||
bool AnalyseBlock ( void );
|
||||
void CompileExitCode ( void );
|
||||
bool AnalyseBlock();
|
||||
void CompileExitCode();
|
||||
|
||||
bool CreateBlockLinkage ( CCodeSection * EnterSection ) ;
|
||||
void DetermineLoops ( void ) ;
|
||||
void LogSectionInfo ( void ) ;
|
||||
bool CreateBlockLinkage ( CCodeSection * EnterSection );
|
||||
void DetermineLoops ();
|
||||
void LogSectionInfo ();
|
||||
bool SetSection ( CCodeSection * & Section, CCodeSection * CurrentSection, DWORD TargetPC, bool LinkAllowed, DWORD CurrentPC );
|
||||
bool SetJumpInfo ( CCodeSection * & Section, DWORD TargetPC, DWORD CurrentPC );
|
||||
bool AnalyzeInstruction ( DWORD PC, DWORD & TargetPC, DWORD & ContinuePC, bool & LikelyBranch, bool & IncludeDelaySlot,
|
||||
bool & EndBlock, bool & PermLoop );
|
||||
|
||||
DWORD m_VAddrEnter;
|
||||
DWORD m_VAddrFirst; // the address of the first opcode in the block
|
||||
DWORD m_VAddrLast; // the address of the first opcode in the block
|
||||
BYTE * m_CompiledLocation; // What address is this compiled at
|
||||
DWORD m_VAddrEnter;
|
||||
DWORD m_VAddrFirst; // the address of the first opcode in the block
|
||||
DWORD m_VAddrLast; // the address of the first opcode in the block
|
||||
BYTE* m_CompiledLocation; // What address is this compiled at
|
||||
|
||||
typedef std::map<DWORD,CCodeSection *> SectionMap;
|
||||
typedef std::list<CCodeSection *> SectionList;
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
****************************************************************************/
|
||||
#include "stdafx.h"
|
||||
|
||||
void InPermLoop ( void );
|
||||
void InPermLoop();
|
||||
|
||||
bool DelaySlotEffectsCompare ( DWORD PC, DWORD Reg1, DWORD Reg2 );
|
||||
|
||||
|
@ -102,7 +102,7 @@ CCodeSection::CCodeSection( CCodeBlock * CodeBlock, DWORD EnterPC, DWORD ID, boo
|
|||
CPU_Message(__FUNCTION__ ": ID %d EnterPC 0x%08X",ID,EnterPC);
|
||||
}
|
||||
|
||||
CCodeSection::~CCodeSection( void )
|
||||
CCodeSection::~CCodeSection()
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -341,7 +341,7 @@ void CCodeSection::CompileExit ( DWORD JumpPC, DWORD TargetPC, CRegInfo &ExitReg
|
|||
}
|
||||
}
|
||||
|
||||
void CCodeSection::GenerateSectionLinkage (void)
|
||||
void CCodeSection::GenerateSectionLinkage()
|
||||
{
|
||||
CCodeSection * TargetSection[] = { m_ContinueSection, m_JumpSection };
|
||||
CJumpInfo * JumpInfo[] = { &m_Cont, &m_Jump };
|
||||
|
@ -837,7 +837,7 @@ void CCodeSection::SyncRegState ( const CRegInfo & SyncTo )
|
|||
}
|
||||
}
|
||||
|
||||
void CCodeSection::SetDelaySlot (void)
|
||||
void CCodeSection::SetDelaySlot()
|
||||
{
|
||||
m_DelaySlot = true;
|
||||
}
|
||||
|
@ -857,14 +857,15 @@ void CCodeSection::SetContinueAddress (DWORD JumpPC, DWORD TargetPC)
|
|||
m_Cont.BranchLabel.Format("0x%08X",TargetPC);
|
||||
}
|
||||
|
||||
void CCodeSection::CompileCop1Test (void) {
|
||||
void CCodeSection::CompileCop1Test()
|
||||
{
|
||||
if (m_RegWorkingSet.FpuBeenUsed()) { return; }
|
||||
TestVariable(STATUS_CU1,&g_Reg->STATUS_REGISTER,"STATUS_REGISTER");
|
||||
CompileExit(m_CompilePC,m_CompilePC,m_RegWorkingSet,CExitInfo::COP1_Unuseable,FALSE,JeLabel32);
|
||||
m_RegWorkingSet.FpuBeenUsed() = TRUE;
|
||||
}
|
||||
|
||||
bool CCodeSection::ParentContinue ( void )
|
||||
bool CCodeSection::ParentContinue()
|
||||
{
|
||||
if (m_ParentSection.size() > 0)
|
||||
{
|
||||
|
@ -884,7 +885,7 @@ bool CCodeSection::ParentContinue ( void )
|
|||
}
|
||||
|
||||
/*int TestValue = 0;
|
||||
void TestFunc ( void )
|
||||
void TestFunc()
|
||||
{
|
||||
TestValue += 1;
|
||||
if (TestValue >= 4)
|
||||
|
@ -1607,7 +1608,7 @@ bool CCodeSection::IsAllParentLoops(CCodeSection * Parent, bool IgnoreIfCompiled
|
|||
return true;
|
||||
}
|
||||
|
||||
bool CCodeSection::SetupRegisterForLoop ( void )
|
||||
bool CCodeSection::SetupRegisterForLoop()
|
||||
{
|
||||
CRegInfo OriginalReg = m_RegWorkingSet;
|
||||
if (!LoopAnalysis(m_BlockInfo, this).SetupRegisterForLoop())
|
||||
|
@ -1624,7 +1625,7 @@ bool CCodeSection::SetupRegisterForLoop ( void )
|
|||
return true;
|
||||
}
|
||||
|
||||
bool CCodeSection::InheritParentInfo ( void )
|
||||
bool CCodeSection::InheritParentInfo()
|
||||
{
|
||||
if (m_CompiledLocation == NULL)
|
||||
{
|
||||
|
@ -2037,7 +2038,7 @@ bool CCodeSection::DisplaySectionInformation (DWORD ID, DWORD Test)
|
|||
return true;
|
||||
}
|
||||
|
||||
void CCodeSection::DisplaySectionInformation (void)
|
||||
void CCodeSection::DisplaySectionInformation()
|
||||
{
|
||||
if (m_SectionID == 0)
|
||||
{
|
||||
|
|
|
@ -19,22 +19,22 @@ public:
|
|||
typedef std::list<CCodeSection *> SECTION_LIST;
|
||||
|
||||
CCodeSection( CCodeBlock * CodeBlock, DWORD EnterPC, DWORD ID, bool LinkAllowed);
|
||||
~CCodeSection( void );
|
||||
~CCodeSection();
|
||||
|
||||
void SetDelaySlot ( void );
|
||||
void SetDelaySlot ();
|
||||
void SetJumpAddress ( DWORD JumpPC, DWORD TargetPC, bool PermLoop );
|
||||
void SetContinueAddress ( DWORD JumpPC, DWORD TargetPC );
|
||||
void CompileCop1Test ( void );
|
||||
bool CreateSectionLinkage ( void );
|
||||
void CompileCop1Test ();
|
||||
bool CreateSectionLinkage ();
|
||||
bool GenerateX86Code ( DWORD Test );
|
||||
void GenerateSectionLinkage ( void );
|
||||
void GenerateSectionLinkage ();
|
||||
void CompileExit ( DWORD JumpPC, DWORD TargetPC, CRegInfo &ExitRegSet, CExitInfo::EXIT_REASON reason, int CompileNow, void (*x86Jmp)(const char * Label, DWORD Value));
|
||||
void DetermineLoop ( DWORD Test, DWORD Test2, DWORD TestID );
|
||||
bool FixConstants ( DWORD Test );
|
||||
CCodeSection * ExistingSection ( DWORD Addr, DWORD Test );
|
||||
bool SectionAccessible ( DWORD SectionId, DWORD Test );
|
||||
bool DisplaySectionInformation ( DWORD ID, DWORD Test );
|
||||
void DisplaySectionInformation ( void );
|
||||
void DisplaySectionInformation ();
|
||||
void AddParent ( CCodeSection * Parent );
|
||||
void SwitchParent ( CCodeSection * OldParent, CCodeSection * NewParent );
|
||||
|
||||
|
@ -48,14 +48,14 @@ public:
|
|||
CCodeSection * m_JumpSection;
|
||||
bool m_EndSection; // if this section does not link
|
||||
bool m_LinkAllowed; // are other sections allowed to find block to link to it
|
||||
DWORD m_Test;
|
||||
DWORD m_Test2;
|
||||
DWORD m_Test;
|
||||
DWORD m_Test2;
|
||||
BYTE * m_CompiledLocation;
|
||||
bool m_InLoop;
|
||||
bool m_DelaySlot;
|
||||
bool m_InLoop;
|
||||
bool m_DelaySlot;
|
||||
|
||||
/* Register Info */
|
||||
CRegInfo m_RegEnter;
|
||||
CRegInfo m_RegEnter;
|
||||
|
||||
/* Jump Info */
|
||||
CJumpInfo m_Jump;
|
||||
|
@ -63,12 +63,12 @@ public:
|
|||
|
||||
private:
|
||||
void UnlinkParent ( CCodeSection * Parent, bool ContinueSection );
|
||||
void InheritConstants ( void );
|
||||
void InheritConstants ();
|
||||
void TestRegConstantStates ( CRegInfo & Base, CRegInfo & Reg );
|
||||
void SyncRegState ( const CRegInfo & SyncTo );
|
||||
bool IsAllParentLoops ( CCodeSection * Parent, bool IgnoreIfCompiled, DWORD Test );
|
||||
bool ParentContinue ( void );
|
||||
bool InheritParentInfo ( void );
|
||||
bool SetupRegisterForLoop ( void );
|
||||
bool ParentContinue ();
|
||||
bool InheritParentInfo ();
|
||||
bool SetupRegisterForLoop ();
|
||||
};
|
||||
|
||||
|
|
|
@ -17,13 +17,13 @@ class CDelaySlotFunctionMap
|
|||
FUNCTION_MAP FunctionMap;
|
||||
|
||||
public:
|
||||
CDelaySlotFunctionMap ( void );
|
||||
~CDelaySlotFunctionMap ( void );
|
||||
CDelaySlotFunctionMap();
|
||||
~CDelaySlotFunctionMap();
|
||||
|
||||
CCompiledFunc * AddFunctionInfo ( DWORD vAddr, DWORD pAddr );
|
||||
CCompiledFunc * FindFunction ( DWORD vAddr, int Length );
|
||||
CCompiledFunc * FindFunction ( DWORD vAddr ) const;
|
||||
CCompiledFunc* AddFunctionInfo(DWORD vAddr, DWORD pAddr);
|
||||
CCompiledFunc* FindFunction(DWORD vAddr, int Length);
|
||||
CCompiledFunc* FindFunction(DWORD vAddr) const;
|
||||
|
||||
void Remove ( CCompiledFunc * info );
|
||||
void Reset ( void );
|
||||
void Remove(CCompiledFunc* info);
|
||||
void Reset();
|
||||
};
|
||||
|
|
|
@ -13,37 +13,37 @@
|
|||
class CCompiledFunc
|
||||
{
|
||||
//constructor
|
||||
CCompiledFunc ( void ); // not implemented
|
||||
CCompiledFunc(); // not implemented
|
||||
|
||||
public:
|
||||
CCompiledFunc ( const CCodeBlock & CodeBlock );
|
||||
CCompiledFunc(const CCodeBlock & CodeBlock);
|
||||
|
||||
typedef void (* Func)(void);
|
||||
typedef void (*Func)();
|
||||
|
||||
//Get Private Information
|
||||
inline const DWORD EnterPC ( void ) const { return m_EnterPC; }
|
||||
inline const DWORD MinPC ( void ) const { return m_MinPC; }
|
||||
inline const DWORD MaxPC ( void ) const { return m_MaxPC; }
|
||||
inline const Func Function ( void ) const { return m_Function; }
|
||||
inline const MD5Digest & Hash ( void ) const { return m_Hash; }
|
||||
const DWORD EnterPC () const { return m_EnterPC; }
|
||||
const DWORD MinPC () const { return m_MinPC; }
|
||||
const DWORD MaxPC () const { return m_MaxPC; }
|
||||
const Func Function () const { return m_Function; }
|
||||
const MD5Digest& Hash () const { return m_Hash; }
|
||||
|
||||
inline CCompiledFunc * Next ( void ) const { return m_Next; }
|
||||
inline void SetNext ( CCompiledFunc * Next ) { m_Next = Next; }
|
||||
CCompiledFunc* Next () const { return m_Next; }
|
||||
void SetNext(CCompiledFunc* Next) { m_Next = Next; }
|
||||
|
||||
inline QWORD MemContents(int i) { return m_MemContents[i]; }
|
||||
inline QWORD * MemLocation(int i) { return m_MemLocation[i]; }
|
||||
QWORD MemContents(int i) { return m_MemContents[i]; }
|
||||
QWORD* MemLocation(int i) { return m_MemLocation[i]; }
|
||||
|
||||
private:
|
||||
//Information
|
||||
DWORD m_EnterPC; // The Entry PC
|
||||
DWORD m_MinPC; // The Lowest PC in the function
|
||||
DWORD m_MaxPC; // The Highest PC in the function
|
||||
DWORD m_EnterPC; // The Entry PC
|
||||
DWORD m_MinPC; // The Lowest PC in the function
|
||||
DWORD m_MaxPC; // The Highest PC in the function
|
||||
|
||||
MD5Digest m_Hash;
|
||||
//From querying the recompiler get information about the function
|
||||
Func m_Function;
|
||||
|
||||
CCompiledFunc * m_Next;
|
||||
CCompiledFunc* m_Next;
|
||||
|
||||
//Validation
|
||||
QWORD m_MemContents[2], * m_MemLocation[2];
|
||||
|
|
|
@ -47,7 +47,7 @@ bool CFunctionMap::AllocateMemory()
|
|||
return true;
|
||||
}
|
||||
|
||||
void CFunctionMap::CleanBuffers ( void )
|
||||
void CFunctionMap::CleanBuffers()
|
||||
{
|
||||
if (m_FunctionTable)
|
||||
{
|
||||
|
|
|
@ -19,15 +19,15 @@ protected:
|
|||
CFunctionMap();
|
||||
~CFunctionMap();
|
||||
|
||||
bool AllocateMemory ( void );
|
||||
void Reset ( bool bAllocate);
|
||||
bool AllocateMemory();
|
||||
void Reset(bool bAllocate);
|
||||
|
||||
public:
|
||||
inline PCCompiledFunc_TABLE * FunctionTable ( void ) const { return m_FunctionTable; }
|
||||
inline PCCompiledFunc * JumpTable ( void ) const { return m_JumpTable; }
|
||||
PCCompiledFunc_TABLE * FunctionTable() const { return m_FunctionTable; }
|
||||
PCCompiledFunc * JumpTable() const { return m_JumpTable; }
|
||||
|
||||
private:
|
||||
void CleanBuffers ( void );
|
||||
void CleanBuffers();
|
||||
|
||||
PCCompiledFunc * m_JumpTable;
|
||||
PCCompiledFunc_TABLE * m_FunctionTable;
|
||||
|
|
|
@ -47,7 +47,7 @@ LoopAnalysis::~LoopAnalysis()
|
|||
m_JumpRegisters.clear();
|
||||
}
|
||||
|
||||
bool LoopAnalysis::SetupRegisterForLoop ( void )
|
||||
bool LoopAnalysis::SetupRegisterForLoop()
|
||||
{
|
||||
if (!m_EnterSection->m_InLoop)
|
||||
{
|
||||
|
@ -808,25 +808,25 @@ void LoopAnalysis::SetContinueRegSet ( CCodeSection * Section, const CRegInfo &R
|
|||
}
|
||||
}
|
||||
|
||||
void LoopAnalysis::SPECIAL_SLL ( void )
|
||||
void LoopAnalysis::SPECIAL_SLL()
|
||||
{
|
||||
if (m_Command.rd == 0) { return; }
|
||||
m_Reg.SetMipsRegState(m_Command.rd,CRegInfo::STATE_MODIFIED);
|
||||
}
|
||||
|
||||
void LoopAnalysis::SPECIAL_SRL ( void )
|
||||
void LoopAnalysis::SPECIAL_SRL()
|
||||
{
|
||||
if (m_Command.rd == 0) { return; }
|
||||
m_Reg.SetMipsRegState(m_Command.rd,CRegInfo::STATE_MODIFIED);
|
||||
}
|
||||
|
||||
void LoopAnalysis::SPECIAL_SRA ( void )
|
||||
void LoopAnalysis::SPECIAL_SRA()
|
||||
{
|
||||
if (m_Command.rd == 0) { return; }
|
||||
m_Reg.SetMipsRegState(m_Command.rd,CRegInfo::STATE_MODIFIED);
|
||||
}
|
||||
|
||||
void LoopAnalysis::SPECIAL_SLLV ( void )
|
||||
void LoopAnalysis::SPECIAL_SLLV()
|
||||
{
|
||||
if (m_Command.rd == 0) { return; }
|
||||
if (m_Command.rt == m_Command.rd || m_Command.rs == m_Command.rd) {
|
||||
|
@ -840,7 +840,7 @@ void LoopAnalysis::SPECIAL_SLLV ( void )
|
|||
}
|
||||
}
|
||||
|
||||
void LoopAnalysis::SPECIAL_SRLV ( void )
|
||||
void LoopAnalysis::SPECIAL_SRLV()
|
||||
{
|
||||
if (m_Command.rd == 0) { return; }
|
||||
if (m_Command.rt == m_Command.rd || m_Command.rs == m_Command.rd)
|
||||
|
@ -855,7 +855,7 @@ void LoopAnalysis::SPECIAL_SRLV ( void )
|
|||
}
|
||||
}
|
||||
|
||||
void LoopAnalysis::SPECIAL_SRAV ( void )
|
||||
void LoopAnalysis::SPECIAL_SRAV()
|
||||
{
|
||||
if (m_Command.rd == 0) { return; }
|
||||
if (m_Command.rt == m_Command.rd || m_Command.rs == m_Command.rd)
|
||||
|
@ -870,7 +870,7 @@ void LoopAnalysis::SPECIAL_SRAV ( void )
|
|||
}
|
||||
}
|
||||
|
||||
void LoopAnalysis::SPECIAL_JR ( void )
|
||||
void LoopAnalysis::SPECIAL_JR()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILEW__,__LINE__);
|
||||
#ifdef tofix
|
||||
|
@ -883,7 +883,7 @@ void LoopAnalysis::SPECIAL_JR ( void )
|
|||
m_NextInstruction = DELAY_SLOT;
|
||||
}
|
||||
|
||||
void LoopAnalysis::SPECIAL_JALR ( void )
|
||||
void LoopAnalysis::SPECIAL_JALR()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILEW__,__LINE__);
|
||||
#ifdef tofix
|
||||
|
@ -938,27 +938,27 @@ void LoopAnalysis::SPECIAL_BREAK ( CCodeSection * Section )
|
|||
m_PC -= 4;
|
||||
}
|
||||
|
||||
void LoopAnalysis::SPECIAL_MFHI ( void )
|
||||
void LoopAnalysis::SPECIAL_MFHI()
|
||||
{
|
||||
m_Reg.SetMipsRegState(m_Command.rd,CRegInfo::STATE_MODIFIED);
|
||||
}
|
||||
|
||||
void LoopAnalysis::SPECIAL_MTHI ( void )
|
||||
void LoopAnalysis::SPECIAL_MTHI()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void LoopAnalysis::SPECIAL_MFLO ( void )
|
||||
void LoopAnalysis::SPECIAL_MFLO()
|
||||
{
|
||||
m_Reg.SetMipsRegState(m_Command.rd,CRegInfo::STATE_MODIFIED);
|
||||
}
|
||||
|
||||
void LoopAnalysis::SPECIAL_MTLO ( void )
|
||||
void LoopAnalysis::SPECIAL_MTLO()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void LoopAnalysis::SPECIAL_DSLLV ( void )
|
||||
void LoopAnalysis::SPECIAL_DSLLV()
|
||||
{
|
||||
if (m_Command.rd == 0) { return; }
|
||||
if (m_Command.rt == m_Command.rd || m_Command.rs == m_Command.rd)
|
||||
|
@ -973,7 +973,7 @@ void LoopAnalysis::SPECIAL_DSLLV ( void )
|
|||
}
|
||||
}
|
||||
|
||||
void LoopAnalysis::SPECIAL_DSRLV ( void )
|
||||
void LoopAnalysis::SPECIAL_DSRLV()
|
||||
{
|
||||
if (m_Command.rd == 0) { return; }
|
||||
if (m_Command.rt == m_Command.rd || m_Command.rs == m_Command.rd)
|
||||
|
@ -989,7 +989,7 @@ void LoopAnalysis::SPECIAL_DSRLV ( void )
|
|||
|
||||
}
|
||||
|
||||
void LoopAnalysis::SPECIAL_DSRAV ( void )
|
||||
void LoopAnalysis::SPECIAL_DSRAV()
|
||||
{
|
||||
if (m_Command.rd == 0) { return; }
|
||||
if (m_Command.rt == m_Command.rd || m_Command.rs == m_Command.rd)
|
||||
|
@ -1004,67 +1004,67 @@ void LoopAnalysis::SPECIAL_DSRAV ( void )
|
|||
}
|
||||
}
|
||||
|
||||
void LoopAnalysis::SPECIAL_ADD ( void )
|
||||
void LoopAnalysis::SPECIAL_ADD()
|
||||
{
|
||||
if (m_Command.rd == 0) { return; }
|
||||
m_Reg.SetMipsRegState(m_Command.rd,CRegInfo::STATE_MODIFIED);
|
||||
}
|
||||
|
||||
void LoopAnalysis::SPECIAL_ADDU ( void )
|
||||
void LoopAnalysis::SPECIAL_ADDU()
|
||||
{
|
||||
if (m_Command.rd == 0) { return; }
|
||||
m_Reg.SetMipsRegState(m_Command.rd,CRegInfo::STATE_MODIFIED);
|
||||
}
|
||||
|
||||
void LoopAnalysis::SPECIAL_SUB ( void )
|
||||
void LoopAnalysis::SPECIAL_SUB()
|
||||
{
|
||||
if (m_Command.rd == 0) { return; }
|
||||
m_Reg.SetMipsRegState(m_Command.rd,CRegInfo::STATE_MODIFIED);
|
||||
}
|
||||
|
||||
void LoopAnalysis::SPECIAL_SUBU ( void )
|
||||
void LoopAnalysis::SPECIAL_SUBU()
|
||||
{
|
||||
if (m_Command.rd == 0) { return; }
|
||||
m_Reg.SetMipsRegState(m_Command.rd,CRegInfo::STATE_MODIFIED);
|
||||
}
|
||||
|
||||
void LoopAnalysis::SPECIAL_AND ( void )
|
||||
void LoopAnalysis::SPECIAL_AND()
|
||||
{
|
||||
if (m_Command.rd == 0) { return; }
|
||||
m_Reg.SetMipsRegState(m_Command.rd,CRegInfo::STATE_MODIFIED);
|
||||
}
|
||||
|
||||
void LoopAnalysis::SPECIAL_OR ( void )
|
||||
void LoopAnalysis::SPECIAL_OR()
|
||||
{
|
||||
if (m_Command.rd == 0) { return; }
|
||||
m_Reg.SetMipsRegState(m_Command.rd,CRegInfo::STATE_MODIFIED);
|
||||
}
|
||||
|
||||
void LoopAnalysis::SPECIAL_XOR ( void )
|
||||
void LoopAnalysis::SPECIAL_XOR()
|
||||
{
|
||||
if (m_Command.rd == 0) { return; }
|
||||
m_Reg.SetMipsRegState(m_Command.rd,CRegInfo::STATE_MODIFIED);
|
||||
}
|
||||
|
||||
void LoopAnalysis::SPECIAL_NOR ( void )
|
||||
void LoopAnalysis::SPECIAL_NOR()
|
||||
{
|
||||
if (m_Command.rd == 0) { return; }
|
||||
m_Reg.SetMipsRegState(m_Command.rd,CRegInfo::STATE_MODIFIED);
|
||||
}
|
||||
|
||||
void LoopAnalysis::SPECIAL_SLT ( void )
|
||||
void LoopAnalysis::SPECIAL_SLT()
|
||||
{
|
||||
if (m_Command.rd == 0) { return; }
|
||||
m_Reg.SetMipsRegState(m_Command.rd,CRegInfo::STATE_MODIFIED);
|
||||
}
|
||||
|
||||
void LoopAnalysis::SPECIAL_SLTU ( void )
|
||||
void LoopAnalysis::SPECIAL_SLTU()
|
||||
{
|
||||
if (m_Command.rd == 0) { return; }
|
||||
m_Reg.SetMipsRegState(m_Command.rd,CRegInfo::STATE_MODIFIED);
|
||||
}
|
||||
|
||||
void LoopAnalysis::SPECIAL_DADD ( void )
|
||||
void LoopAnalysis::SPECIAL_DADD()
|
||||
{
|
||||
if (m_Command.rd == 0) { return; }
|
||||
if (m_Command.rt == m_Command.rd || m_Command.rs == m_Command.rd)
|
||||
|
@ -1082,7 +1082,7 @@ void LoopAnalysis::SPECIAL_DADD ( void )
|
|||
}
|
||||
}
|
||||
|
||||
void LoopAnalysis::SPECIAL_DADDU ( void )
|
||||
void LoopAnalysis::SPECIAL_DADDU()
|
||||
{
|
||||
if (m_Command.rd == 0) { return; }
|
||||
if (m_Command.rt == m_Command.rd || m_Command.rs == m_Command.rd)
|
||||
|
@ -1100,7 +1100,7 @@ void LoopAnalysis::SPECIAL_DADDU ( void )
|
|||
}
|
||||
}
|
||||
|
||||
void LoopAnalysis::SPECIAL_DSUB ( void )
|
||||
void LoopAnalysis::SPECIAL_DSUB()
|
||||
{
|
||||
if (m_Command.rd == 0) { return; }
|
||||
if (m_Command.rt == m_Command.rd || m_Command.rs == m_Command.rd)
|
||||
|
@ -1118,7 +1118,7 @@ void LoopAnalysis::SPECIAL_DSUB ( void )
|
|||
}
|
||||
}
|
||||
|
||||
void LoopAnalysis::SPECIAL_DSUBU ( void )
|
||||
void LoopAnalysis::SPECIAL_DSUBU()
|
||||
{
|
||||
if (m_Command.rd == 0) { return; }
|
||||
if (m_Command.rt == m_Command.rd || m_Command.rs == m_Command.rd)
|
||||
|
@ -1136,7 +1136,7 @@ void LoopAnalysis::SPECIAL_DSUBU ( void )
|
|||
}
|
||||
}
|
||||
|
||||
void LoopAnalysis::SPECIAL_DSLL ( void )
|
||||
void LoopAnalysis::SPECIAL_DSLL()
|
||||
{
|
||||
if (m_Command.rd == 0) { return; }
|
||||
if (m_Command.rt == m_Command.rd)
|
||||
|
@ -1151,7 +1151,7 @@ void LoopAnalysis::SPECIAL_DSLL ( void )
|
|||
}
|
||||
}
|
||||
|
||||
void LoopAnalysis::SPECIAL_DSRL ( void )
|
||||
void LoopAnalysis::SPECIAL_DSRL()
|
||||
{
|
||||
if (m_Command.rd == 0) { return; }
|
||||
if (m_Command.rt == m_Command.rd)
|
||||
|
@ -1166,7 +1166,7 @@ void LoopAnalysis::SPECIAL_DSRL ( void )
|
|||
}
|
||||
}
|
||||
|
||||
void LoopAnalysis::SPECIAL_DSRA ( void )
|
||||
void LoopAnalysis::SPECIAL_DSRA()
|
||||
{
|
||||
if (m_Command.rd == 0) { return; }
|
||||
if (m_Command.rt == m_Command.rd)
|
||||
|
@ -1181,7 +1181,7 @@ void LoopAnalysis::SPECIAL_DSRA ( void )
|
|||
}
|
||||
}
|
||||
|
||||
void LoopAnalysis::SPECIAL_DSLL32 ( void )
|
||||
void LoopAnalysis::SPECIAL_DSLL32()
|
||||
{
|
||||
if (m_Command.rd == 0) { return; }
|
||||
if (m_Command.rt == m_Command.rd)
|
||||
|
@ -1196,7 +1196,7 @@ void LoopAnalysis::SPECIAL_DSLL32 ( void )
|
|||
}
|
||||
}
|
||||
|
||||
void LoopAnalysis::SPECIAL_DSRL32 ( void )
|
||||
void LoopAnalysis::SPECIAL_DSRL32()
|
||||
{
|
||||
if (m_Command.rd == 0) { return; }
|
||||
if (m_Command.rt == m_Command.rd)
|
||||
|
@ -1211,7 +1211,7 @@ void LoopAnalysis::SPECIAL_DSRL32 ( void )
|
|||
}
|
||||
}
|
||||
|
||||
void LoopAnalysis::SPECIAL_DSRA32 ( void )
|
||||
void LoopAnalysis::SPECIAL_DSRA32()
|
||||
{
|
||||
if (m_Command.rd == 0) { return; }
|
||||
if (m_Command.rt == m_Command.rd)
|
||||
|
|
|
@ -19,57 +19,57 @@ public:
|
|||
LoopAnalysis(CCodeBlock * CodeBlock, CCodeSection * Section);
|
||||
~LoopAnalysis();
|
||||
|
||||
bool SetupRegisterForLoop ( void );
|
||||
bool SetupRegisterForLoop();
|
||||
|
||||
private:
|
||||
LoopAnalysis(void); // Disable default constructor
|
||||
LoopAnalysis(const LoopAnalysis&); // Disable copy constructor
|
||||
LoopAnalysis& operator=(const LoopAnalysis&); // Disable assignment
|
||||
LoopAnalysis(); // Disable default constructor
|
||||
LoopAnalysis(const LoopAnalysis&); // Disable copy constructor
|
||||
LoopAnalysis& operator=(const LoopAnalysis&); // Disable assignment
|
||||
|
||||
bool SetupEnterSection ( CCodeSection * Section, bool & bChanged, bool & bSkipedSection );
|
||||
bool CheckLoopRegisterUsage ( CCodeSection * Section );
|
||||
bool SyncRegState ( CRegInfo & RegSet, const CRegInfo& SyncReg );
|
||||
void SetJumpRegSet ( CCodeSection * Section, const CRegInfo &Reg );
|
||||
void SetContinueRegSet ( CCodeSection * Section, const CRegInfo &Reg );
|
||||
void SetContinueRegSet(CCodeSection * Section, const CRegInfo &Reg);
|
||||
|
||||
/********************** R4300i OpCodes: Special **********************/
|
||||
void SPECIAL_SLL ( void );
|
||||
void SPECIAL_SRL ( void );
|
||||
void SPECIAL_SRA ( void );
|
||||
void SPECIAL_SLLV ( void );
|
||||
void SPECIAL_SRLV ( void );
|
||||
void SPECIAL_SRAV ( void );
|
||||
void SPECIAL_JR ( void );
|
||||
void SPECIAL_JALR ( void );
|
||||
void SPECIAL_SYSCALL ( CCodeSection * Section );
|
||||
void SPECIAL_BREAK ( CCodeSection * Section );
|
||||
void SPECIAL_MFHI ( void );
|
||||
void SPECIAL_MTHI ( void );
|
||||
void SPECIAL_MFLO ( void );
|
||||
void SPECIAL_MTLO ( void );
|
||||
void SPECIAL_DSLLV ( void );
|
||||
void SPECIAL_DSRLV ( void );
|
||||
void SPECIAL_DSRAV ( void );
|
||||
void SPECIAL_ADD ( void );
|
||||
void SPECIAL_ADDU ( void );
|
||||
void SPECIAL_SUB ( void );
|
||||
void SPECIAL_SUBU ( void );
|
||||
void SPECIAL_AND ( void );
|
||||
void SPECIAL_OR ( void );
|
||||
void SPECIAL_XOR ( void );
|
||||
void SPECIAL_NOR ( void );
|
||||
void SPECIAL_SLT ( void );
|
||||
void SPECIAL_SLTU ( void );
|
||||
void SPECIAL_DADD ( void );
|
||||
void SPECIAL_DADDU ( void );
|
||||
void SPECIAL_DSUB ( void );
|
||||
void SPECIAL_DSUBU ( void );
|
||||
void SPECIAL_DSLL ( void );
|
||||
void SPECIAL_DSRL ( void );
|
||||
void SPECIAL_DSRA ( void );
|
||||
void SPECIAL_DSLL32 ( void );
|
||||
void SPECIAL_DSRL32 ( void );
|
||||
void SPECIAL_DSRA32 ( void );
|
||||
void SPECIAL_SLL();
|
||||
void SPECIAL_SRL();
|
||||
void SPECIAL_SRA();
|
||||
void SPECIAL_SLLV();
|
||||
void SPECIAL_SRLV();
|
||||
void SPECIAL_SRAV();
|
||||
void SPECIAL_JR();
|
||||
void SPECIAL_JALR();
|
||||
void SPECIAL_SYSCALL(CCodeSection * Section);
|
||||
void SPECIAL_BREAK(CCodeSection * Section);
|
||||
void SPECIAL_MFHI();
|
||||
void SPECIAL_MTHI();
|
||||
void SPECIAL_MFLO();
|
||||
void SPECIAL_MTLO();
|
||||
void SPECIAL_DSLLV();
|
||||
void SPECIAL_DSRLV();
|
||||
void SPECIAL_DSRAV();
|
||||
void SPECIAL_ADD();
|
||||
void SPECIAL_ADDU();
|
||||
void SPECIAL_SUB();
|
||||
void SPECIAL_SUBU();
|
||||
void SPECIAL_AND();
|
||||
void SPECIAL_OR();
|
||||
void SPECIAL_XOR();
|
||||
void SPECIAL_NOR();
|
||||
void SPECIAL_SLT();
|
||||
void SPECIAL_SLTU();
|
||||
void SPECIAL_DADD();
|
||||
void SPECIAL_DADDU();
|
||||
void SPECIAL_DSUB();
|
||||
void SPECIAL_DSUBU();
|
||||
void SPECIAL_DSLL();
|
||||
void SPECIAL_DSRL();
|
||||
void SPECIAL_DSRA();
|
||||
void SPECIAL_DSLL32();
|
||||
void SPECIAL_DSRL32();
|
||||
void SPECIAL_DSRA32();
|
||||
|
||||
typedef std::map<int,CRegInfo *> RegisterMap;
|
||||
|
||||
|
@ -79,7 +79,7 @@ private:
|
|||
CCodeSection * m_EnterSection;
|
||||
CCodeBlock * m_BlockInfo;
|
||||
DWORD m_PC;
|
||||
CRegInfo m_Reg;
|
||||
CRegInfo m_Reg;
|
||||
STEP_TYPE m_NextInstruction;
|
||||
OPCODE m_Command;
|
||||
DWORD m_Test;
|
||||
|
|
|
@ -90,7 +90,7 @@ void CRecompiler::Run()
|
|||
}
|
||||
}
|
||||
|
||||
void CRecompiler::RecompilerMain_VirtualTable ( void )
|
||||
void CRecompiler::RecompilerMain_VirtualTable()
|
||||
{
|
||||
bool & Done = m_EndEmulation;
|
||||
DWORD & PC = PROGRAM_COUNTER;
|
||||
|
@ -146,7 +146,7 @@ void CRecompiler::RecompilerMain_VirtualTable ( void )
|
|||
}
|
||||
}
|
||||
|
||||
void CRecompiler::RecompilerMain_VirtualTable_validate ( void )
|
||||
void CRecompiler::RecompilerMain_VirtualTable_validate()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILEW__,__LINE__);
|
||||
/* PCCompiledFunc_TABLE * m_FunctionTable = m_Functions.GetFunctionTable();
|
||||
|
@ -320,7 +320,7 @@ void CRecompiler::RecompilerMain_VirtualTable_validate ( void )
|
|||
*/
|
||||
}
|
||||
|
||||
void CRecompiler::RecompilerMain_Lookup( void )
|
||||
void CRecompiler::RecompilerMain_Lookup()
|
||||
{
|
||||
while(!m_EndEmulation)
|
||||
{
|
||||
|
@ -510,7 +510,7 @@ void CRecompiler::RecompilerMain_Lookup( void )
|
|||
}*/
|
||||
}
|
||||
|
||||
void CRecompiler::RecompilerMain_Lookup_TLB( void )
|
||||
void CRecompiler::RecompilerMain_Lookup_TLB()
|
||||
{
|
||||
DWORD PhysicalAddr;
|
||||
|
||||
|
@ -562,7 +562,7 @@ void CRecompiler::RecompilerMain_Lookup_TLB( void )
|
|||
}
|
||||
}
|
||||
|
||||
void CRecompiler::RecompilerMain_Lookup_validate( void )
|
||||
void CRecompiler::RecompilerMain_Lookup_validate()
|
||||
{
|
||||
while(!m_EndEmulation)
|
||||
{
|
||||
|
@ -610,7 +610,7 @@ void CRecompiler::RecompilerMain_Lookup_validate( void )
|
|||
}
|
||||
}
|
||||
|
||||
void CRecompiler::RecompilerMain_Lookup_validate_TLB( void )
|
||||
void CRecompiler::RecompilerMain_Lookup_validate_TLB()
|
||||
{
|
||||
DWORD PhysicalAddr;
|
||||
|
||||
|
@ -705,7 +705,7 @@ void CRecompiler::ResetRecompCode( bool bAllocate )
|
|||
m_Functions.clear();
|
||||
}
|
||||
|
||||
void CRecompiler::RecompilerMain_ChangeMemory ( void )
|
||||
void CRecompiler::RecompilerMain_ChangeMemory()
|
||||
{
|
||||
g_Notify->BreakPoint(__FILEW__,__LINE__);
|
||||
#ifdef tofix
|
||||
|
@ -842,7 +842,7 @@ void CRecompiler::RecompilerMain_ChangeMemory ( void )
|
|||
#endif
|
||||
}
|
||||
|
||||
CCompiledFunc * CRecompiler::CompilerCode ( void )
|
||||
CCompiledFunc * CRecompiler::CompilerCode()
|
||||
{
|
||||
DWORD pAddr = 0;
|
||||
if (!g_TransVaddr->TranslateVaddr(PROGRAM_COUNTER,pAddr))
|
||||
|
@ -979,7 +979,7 @@ void CRecompiler::ClearRecompCode_Virt(DWORD Address, int length,REMOVE_REASON R
|
|||
}
|
||||
}
|
||||
|
||||
void CRecompiler::ResetMemoryStackPos( void )
|
||||
void CRecompiler::ResetMemoryStackPos()
|
||||
{
|
||||
if (g_MMU == NULL)
|
||||
{
|
||||
|
|
|
@ -29,15 +29,15 @@ public:
|
|||
Remove_StoreInstruc,
|
||||
};
|
||||
|
||||
typedef void (* DelayFunc)(void);
|
||||
typedef void (*DelayFunc)();
|
||||
|
||||
public:
|
||||
CRecompiler (CRegisters & Registers, CProfiling & Profile, bool & EndEmulation );
|
||||
~CRecompiler (void);
|
||||
CRecompiler(CRegisters & Registers, CProfiling & Profile, bool & EndEmulation);
|
||||
~CRecompiler();
|
||||
|
||||
void Run ( void );
|
||||
void Reset ( void );
|
||||
void ResetRecompCode ( bool bAllocate );
|
||||
void Run();
|
||||
void Reset();
|
||||
void ResetRecompCode(bool bAllocate);
|
||||
|
||||
bool GenerateX86Code (CCodeBlock & BlockInfo, CCodeSection * Section, DWORD Test );
|
||||
|
||||
|
@ -45,16 +45,16 @@ public:
|
|||
void ClearRecompCode_Virt ( DWORD VirtualAddress, int length, REMOVE_REASON Reason );
|
||||
void ClearRecompCode_Phys ( DWORD PhysicalAddress, int length, REMOVE_REASON Reason );
|
||||
|
||||
void ResetMemoryStackPos ( void );
|
||||
void ResetMemoryStackPos();
|
||||
|
||||
inline DWORD & MemoryStackPos ( void ) { return m_MemoryStack; }
|
||||
DWORD& MemoryStackPos() { return m_MemoryStack; }
|
||||
|
||||
private:
|
||||
CRecompiler(void); // Disable default constructor
|
||||
CRecompiler(const CRecompiler&); // Disable copy constructor
|
||||
CRecompiler& operator=(const CRecompiler&); // Disable assignment
|
||||
CRecompiler(); // Disable default constructor
|
||||
CRecompiler(const CRecompiler&); // Disable copy constructor
|
||||
CRecompiler& operator=(const CRecompiler&); // Disable assignment
|
||||
|
||||
CCompiledFunc * CompilerCode ( void );
|
||||
CCompiledFunc * CompilerCode();
|
||||
bool Compiler4300iBlock ( CCompiledFunc * info );
|
||||
|
||||
// Compiling code
|
||||
|
@ -62,13 +62,13 @@ private:
|
|||
bool DisplaySectionInformation (CCodeSection * Section, DWORD ID, DWORD Test);
|
||||
|
||||
// Main loops for the different look up methods
|
||||
void RecompilerMain_VirtualTable ( void );
|
||||
void RecompilerMain_VirtualTable_validate ( void );
|
||||
void RecompilerMain_ChangeMemory ( void );
|
||||
void RecompilerMain_Lookup ( void );
|
||||
void RecompilerMain_Lookup_TLB ( void );
|
||||
void RecompilerMain_Lookup_validate ( void );
|
||||
void RecompilerMain_Lookup_validate_TLB ( void );
|
||||
void RecompilerMain_VirtualTable();
|
||||
void RecompilerMain_VirtualTable_validate();
|
||||
void RecompilerMain_ChangeMemory();
|
||||
void RecompilerMain_Lookup();
|
||||
void RecompilerMain_Lookup_TLB();
|
||||
void RecompilerMain_Lookup_validate();
|
||||
void RecompilerMain_Lookup_validate_TLB();
|
||||
|
||||
void RemoveFunction (CCompiledFunc * FunInfo, bool DelaySlot, REMOVE_REASON Reason );
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@ bool CRecompMemory::AllocateMemory()
|
|||
return true;
|
||||
}
|
||||
|
||||
void CRecompMemory::CheckRecompMem ( void )
|
||||
void CRecompMemory::CheckRecompMem()
|
||||
{
|
||||
DWORD Size = (DWORD)((BYTE *)m_RecompPos - (BYTE *)m_RecompCode);
|
||||
if ((Size + 0x20000) < m_RecompSize)
|
||||
|
|
|
@ -17,17 +17,17 @@ protected:
|
|||
CRecompMemory();
|
||||
~CRecompMemory();
|
||||
|
||||
bool AllocateMemory ( void );
|
||||
void CheckRecompMem ( void );
|
||||
void Reset ( void );
|
||||
void ShowMemUsed ( void );
|
||||
|
||||
inline BYTE * RecompPos ( void ) const { return m_RecompPos; }
|
||||
bool AllocateMemory();
|
||||
void CheckRecompMem();
|
||||
void Reset();
|
||||
void ShowMemUsed();
|
||||
|
||||
BYTE* RecompPos() const { return m_RecompPos; }
|
||||
|
||||
private:
|
||||
BYTE * m_RecompCode;
|
||||
DWORD m_RecompSize;
|
||||
|
||||
|
||||
enum { MaxCompileBufferSize = 0x03C00000 };
|
||||
enum { InitialCompileBufferSize = 0x00500000 };
|
||||
enum { IncreaseCompileBufferSize = 0x00100000 };
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
#include "stdafx.h"
|
||||
|
||||
CCodeSection * CRecompilerOps::m_Section = NULL;
|
||||
CRegInfo CRecompilerOps::m_RegWorkingSet;
|
||||
CRegInfo CRecompilerOps::m_RegWorkingSet;
|
||||
STEP_TYPE CRecompilerOps::m_NextInstruction;
|
||||
DWORD CRecompilerOps::m_CompilePC;
|
||||
OPCODE CRecompilerOps::m_Opcode;
|
||||
|
@ -423,7 +423,7 @@ void CRecompilerOps::Compile_BranchLikely (BranchFunction CompareFunc, BOOL Link
|
|||
}
|
||||
}
|
||||
|
||||
void CRecompilerOps::BNE_Compare (void)
|
||||
void CRecompilerOps::BNE_Compare()
|
||||
{
|
||||
BYTE *Jump = NULL;
|
||||
|
||||
|
@ -656,7 +656,7 @@ void CRecompilerOps::BNE_Compare (void)
|
|||
}
|
||||
}
|
||||
|
||||
void CRecompilerOps::BEQ_Compare (void) {
|
||||
void CRecompilerOps::BEQ_Compare() {
|
||||
BYTE *Jump = NULL;
|
||||
|
||||
if (IsKnown(m_Opcode.rs) && IsKnown(m_Opcode.rt)) {
|
||||
|
@ -880,7 +880,7 @@ void CRecompilerOps::BEQ_Compare (void) {
|
|||
}
|
||||
}
|
||||
|
||||
void CRecompilerOps::BGTZ_Compare (void) {
|
||||
void CRecompilerOps::BGTZ_Compare() {
|
||||
if (IsConst(m_Opcode.rs)) {
|
||||
if (Is64Bit(m_Opcode.rs)) {
|
||||
if (GetMipsReg_S(m_Opcode.rs) > 0) {
|
||||
|
@ -976,7 +976,7 @@ void CRecompilerOps::BGTZ_Compare (void) {
|
|||
}
|
||||
}
|
||||
|
||||
void CRecompilerOps::BLEZ_Compare (void) {
|
||||
void CRecompilerOps::BLEZ_Compare() {
|
||||
if (IsConst(m_Opcode.rs)) {
|
||||
if (Is64Bit(m_Opcode.rs)) {
|
||||
if (GetMipsReg_S(m_Opcode.rs) <= 0) {
|
||||
|
@ -1134,7 +1134,7 @@ void CRecompilerOps::BLEZ_Compare (void) {
|
|||
}
|
||||
}
|
||||
|
||||
void CRecompilerOps::BLTZ_Compare (void) {
|
||||
void CRecompilerOps::BLTZ_Compare() {
|
||||
if (IsConst(m_Opcode.rs)) {
|
||||
if (Is64Bit(m_Opcode.rs)) {
|
||||
if (GetMipsReg_S(m_Opcode.rs) < 0) {
|
||||
|
@ -1211,7 +1211,7 @@ void CRecompilerOps::BLTZ_Compare (void) {
|
|||
}
|
||||
}
|
||||
|
||||
void CRecompilerOps::BGEZ_Compare (void) {
|
||||
void CRecompilerOps::BGEZ_Compare() {
|
||||
if (IsConst(m_Opcode.rs)) {
|
||||
if (Is64Bit(m_Opcode.rs)) {
|
||||
g_Notify->BreakPoint(__FILEW__,__LINE__);
|
||||
|
@ -1283,7 +1283,7 @@ void CRecompilerOps::BGEZ_Compare (void) {
|
|||
}
|
||||
}
|
||||
|
||||
void CRecompilerOps::COP1_BCF_Compare (void) {
|
||||
void CRecompilerOps::COP1_BCF_Compare() {
|
||||
TestVariable(FPCSR_C,&_FPCR[31],"_FPCR[31]");
|
||||
if (m_Section->m_Cont.FallThrough) {
|
||||
JeLabel32 ( m_Section->m_Jump.BranchLabel.c_str(), 0 );
|
||||
|
@ -1299,7 +1299,7 @@ void CRecompilerOps::COP1_BCF_Compare (void) {
|
|||
}
|
||||
}
|
||||
|
||||
void CRecompilerOps::COP1_BCT_Compare (void) {
|
||||
void CRecompilerOps::COP1_BCT_Compare() {
|
||||
TestVariable(FPCSR_C,&_FPCR[31],"_FPCR[31]");
|
||||
if (m_Section->m_Cont.FallThrough) {
|
||||
JneLabel32 ( m_Section->m_Jump.BranchLabel.c_str(), 0 );
|
||||
|
@ -1316,7 +1316,7 @@ void CRecompilerOps::COP1_BCT_Compare (void) {
|
|||
}
|
||||
|
||||
/************************* OpCode functions *************************/
|
||||
void CRecompilerOps::J (void) {
|
||||
void CRecompilerOps::J() {
|
||||
if ( m_NextInstruction == NORMAL ) {
|
||||
CPU_Message(" %X %s",m_CompilePC,R4300iOpcodeName(m_Opcode.Hex,m_CompilePC));
|
||||
if ((m_CompilePC & 0xFFC) == 0xFFC)
|
||||
|
@ -1346,7 +1346,7 @@ void CRecompilerOps::J (void) {
|
|||
}
|
||||
}
|
||||
|
||||
void CRecompilerOps::JAL (void) {
|
||||
void CRecompilerOps::JAL() {
|
||||
if ( m_NextInstruction == NORMAL )
|
||||
{
|
||||
CPU_Message(" %X %s",m_CompilePC,R4300iOpcodeName(m_Opcode.Hex,m_CompilePC));
|
||||
|
@ -1398,7 +1398,7 @@ void CRecompilerOps::JAL (void) {
|
|||
return;
|
||||
}
|
||||
|
||||
void CRecompilerOps::ADDI (void) {
|
||||
void CRecompilerOps::ADDI() {
|
||||
CPU_Message(" %X %s",m_CompilePC,R4300iOpcodeName(m_Opcode.Hex,m_CompilePC));
|
||||
|
||||
if (m_Opcode.rt == 0) { return; }
|
||||
|
@ -1421,7 +1421,7 @@ void CRecompilerOps::ADDI (void) {
|
|||
}
|
||||
}
|
||||
|
||||
void CRecompilerOps::ADDIU (void) {
|
||||
void CRecompilerOps::ADDIU() {
|
||||
CPU_Message(" %X %s",m_CompilePC,R4300iOpcodeName(m_Opcode.Hex,m_CompilePC));
|
||||
|
||||
if (m_Opcode.rt == 0 || (m_Opcode.immediate == 0 && m_Opcode.rs == m_Opcode.rt)) { return; }
|
||||
|
@ -1449,7 +1449,7 @@ void CRecompilerOps::ADDIU (void) {
|
|||
}
|
||||
}
|
||||
|
||||
void CRecompilerOps::SLTIU (void) {
|
||||
void CRecompilerOps::SLTIU() {
|
||||
CPU_Message(" %X %s",m_CompilePC,R4300iOpcodeName(m_Opcode.Hex,m_CompilePC));
|
||||
if (m_Opcode.rt == 0) { return; }
|
||||
|
||||
|
@ -1507,7 +1507,7 @@ void CRecompilerOps::SLTIU (void) {
|
|||
}
|
||||
}
|
||||
|
||||
void CRecompilerOps::SLTI (void)
|
||||
void CRecompilerOps::SLTI()
|
||||
{
|
||||
CPU_Message(" %X %s",m_CompilePC,R4300iOpcodeName(m_Opcode.Hex,m_CompilePC));
|
||||
if (m_Opcode.rt == 0) { return; }
|
||||
|
@ -1593,7 +1593,7 @@ void CRecompilerOps::SLTI (void)
|
|||
}
|
||||
}
|
||||
|
||||
void CRecompilerOps::ANDI (void) {
|
||||
void CRecompilerOps::ANDI() {
|
||||
CPU_Message(" %X %s",m_CompilePC,R4300iOpcodeName(m_Opcode.Hex,m_CompilePC));
|
||||
|
||||
if (m_Opcode.rt == 0) { return;}
|
||||
|
@ -1610,7 +1610,7 @@ void CRecompilerOps::ANDI (void) {
|
|||
}
|
||||
}
|
||||
|
||||
void CRecompilerOps::ORI (void) {
|
||||
void CRecompilerOps::ORI() {
|
||||
CPU_Message(" %X %s",m_CompilePC,R4300iOpcodeName(m_Opcode.Hex,m_CompilePC));
|
||||
if (m_Opcode.rt == 0) { return;}
|
||||
|
||||
|
@ -1651,7 +1651,7 @@ void CRecompilerOps::ORI (void) {
|
|||
}
|
||||
}
|
||||
|
||||
void CRecompilerOps::XORI (void) {
|
||||
void CRecompilerOps::XORI() {
|
||||
CPU_Message(" %X %s",m_CompilePC,R4300iOpcodeName(m_Opcode.Hex,m_CompilePC));
|
||||
if (m_Opcode.rt == 0) { return;}
|
||||
|
||||
|
@ -1672,7 +1672,7 @@ void CRecompilerOps::XORI (void) {
|
|||
}
|
||||
}
|
||||
|
||||
void CRecompilerOps::LUI (void) {
|
||||
void CRecompilerOps::LUI() {
|
||||
CPU_Message(" %X %s",m_CompilePC,R4300iOpcodeName(m_Opcode.Hex,m_CompilePC));
|
||||
if (m_Opcode.rt == 0) { return;}
|
||||
|
||||
|
@ -1693,7 +1693,7 @@ void CRecompilerOps::LUI (void) {
|
|||
m_RegWorkingSet.SetMipsRegState(m_Opcode.rt,CRegInfo::STATE_CONST_32_SIGN);
|
||||
}
|
||||
|
||||
void CRecompilerOps::DADDIU (void) {
|
||||
void CRecompilerOps::DADDIU() {
|
||||
CPU_Message(" %X %s",m_CompilePC,R4300iOpcodeName(m_Opcode.Hex,m_CompilePC));
|
||||
|
||||
if (m_Opcode.rs != 0) { UnMap_GPR(m_Opcode.rs,TRUE); }
|
||||
|
@ -1704,7 +1704,7 @@ void CRecompilerOps::DADDIU (void) {
|
|||
AfterCallDirect(m_RegWorkingSet);
|
||||
}
|
||||
|
||||
void CRecompilerOps::CACHE (void){
|
||||
void CRecompilerOps::CACHE(){
|
||||
CPU_Message(" %X %s",m_CompilePC,R4300iOpcodeName(m_Opcode.Hex,m_CompilePC));
|
||||
|
||||
if (g_Settings->LoadDword(Game_SMM_Cache) == 0)
|
||||
|
@ -1752,7 +1752,7 @@ void CRecompilerOps::CACHE (void){
|
|||
}
|
||||
|
||||
/********************** R4300i OpCodes: Special **********************/
|
||||
void CRecompilerOps::SPECIAL_SLL (void) {
|
||||
void CRecompilerOps::SPECIAL_SLL() {
|
||||
CPU_Message(" %X %s",m_CompilePC,R4300iOpcodeName(m_Opcode.Hex,m_CompilePC));
|
||||
|
||||
if (m_Opcode.rd == 0) { return; }
|
||||
|
@ -1793,7 +1793,7 @@ void CRecompilerOps::SPECIAL_SLL (void) {
|
|||
}
|
||||
}
|
||||
|
||||
void CRecompilerOps::SPECIAL_SRL (void) {
|
||||
void CRecompilerOps::SPECIAL_SRL() {
|
||||
CPU_Message(" %X %s",m_CompilePC,R4300iOpcodeName(m_Opcode.Hex,m_CompilePC));
|
||||
if (m_Opcode.rd == 0) { return; }
|
||||
|
||||
|
@ -1807,7 +1807,7 @@ void CRecompilerOps::SPECIAL_SRL (void) {
|
|||
ShiftRightUnsignImmed(GetMipsRegMapLo(m_Opcode.rd),(BYTE)m_Opcode.sa);
|
||||
}
|
||||
|
||||
void CRecompilerOps::SPECIAL_SRA (void) {
|
||||
void CRecompilerOps::SPECIAL_SRA() {
|
||||
CPU_Message(" %X %s",m_CompilePC,R4300iOpcodeName(m_Opcode.Hex,m_CompilePC));
|
||||
if (m_Opcode.rd == 0) { return; }
|
||||
|
||||
|
@ -1821,7 +1821,7 @@ void CRecompilerOps::SPECIAL_SRA (void) {
|
|||
ShiftRightSignImmed(GetMipsRegMapLo(m_Opcode.rd),(BYTE)m_Opcode.sa);
|
||||
}
|
||||
|
||||
void CRecompilerOps::SPECIAL_SLLV (void) {
|
||||
void CRecompilerOps::SPECIAL_SLLV() {
|
||||
CPU_Message(" %X %s",m_CompilePC,R4300iOpcodeName(m_Opcode.Hex,m_CompilePC));
|
||||
if (m_Opcode.rd == 0) { return; }
|
||||
|
||||
|
@ -1843,7 +1843,7 @@ void CRecompilerOps::SPECIAL_SLLV (void) {
|
|||
ShiftLeftSign(GetMipsRegMapLo(m_Opcode.rd));
|
||||
}
|
||||
|
||||
void CRecompilerOps::SPECIAL_SRLV (void) {
|
||||
void CRecompilerOps::SPECIAL_SRLV() {
|
||||
CPU_Message(" %X %s",m_CompilePC,R4300iOpcodeName(m_Opcode.Hex,m_CompilePC));
|
||||
if (m_Opcode.rd == 0) { return; }
|
||||
|
||||
|
@ -1865,7 +1865,7 @@ void CRecompilerOps::SPECIAL_SRLV (void) {
|
|||
ShiftRightUnsign(GetMipsRegMapLo(m_Opcode.rd));
|
||||
}
|
||||
|
||||
void CRecompilerOps::SPECIAL_SRAV (void) {
|
||||
void CRecompilerOps::SPECIAL_SRAV() {
|
||||
CPU_Message(" %X %s",m_CompilePC,R4300iOpcodeName(m_Opcode.Hex,m_CompilePC));
|
||||
if (m_Opcode.rd == 0) { return; }
|
||||
|
||||
|
@ -1887,7 +1887,7 @@ void CRecompilerOps::SPECIAL_SRAV (void) {
|
|||
ShiftRightSign(GetMipsRegMapLo(m_Opcode.rd));
|
||||
}
|
||||
|
||||
void CRecompilerOps::SPECIAL_JR (void) {
|
||||
void CRecompilerOps::SPECIAL_JR() {
|
||||
if ( m_NextInstruction == NORMAL )
|
||||
{
|
||||
CPU_Message(" %X %s",m_CompilePC,R4300iOpcodeName(m_Opcode.Hex,m_CompilePC));
|
||||
|
@ -1945,7 +1945,7 @@ void CRecompilerOps::SPECIAL_JR (void) {
|
|||
}
|
||||
}
|
||||
|
||||
void CRecompilerOps::SPECIAL_JALR (void)
|
||||
void CRecompilerOps::SPECIAL_JALR()
|
||||
{
|
||||
if ( m_NextInstruction == NORMAL )
|
||||
{
|
||||
|
@ -2008,13 +2008,13 @@ void CRecompilerOps::SPECIAL_JALR (void)
|
|||
}
|
||||
}
|
||||
|
||||
void CRecompilerOps::SPECIAL_SYSCALL (void) {
|
||||
void CRecompilerOps::SPECIAL_SYSCALL() {
|
||||
CPU_Message(" %X %s",m_CompilePC,R4300iOpcodeName(m_Opcode.Hex,m_CompilePC));
|
||||
m_Section->CompileExit(m_CompilePC,(DWORD)-1,m_RegWorkingSet,CExitInfo::DoSysCall,TRUE,NULL);
|
||||
m_NextInstruction = END_BLOCK;
|
||||
}
|
||||
|
||||
void CRecompilerOps::SPECIAL_MFLO (void) {
|
||||
void CRecompilerOps::SPECIAL_MFLO() {
|
||||
CPU_Message(" %X %s",m_CompilePC,R4300iOpcodeName(m_Opcode.Hex,m_CompilePC));
|
||||
if (m_Opcode.rd == 0) { return; }
|
||||
|
||||
|
@ -2023,7 +2023,7 @@ void CRecompilerOps::SPECIAL_MFLO (void) {
|
|||
MoveVariableToX86reg(&_RegLO->UW[1],"_RegLO->UW[1]",GetMipsRegMapHi(m_Opcode.rd));
|
||||
}
|
||||
|
||||
void CRecompilerOps::SPECIAL_MTLO (void) {
|
||||
void CRecompilerOps::SPECIAL_MTLO() {
|
||||
CPU_Message(" %X %s",m_CompilePC,R4300iOpcodeName(m_Opcode.Hex,m_CompilePC));
|
||||
|
||||
if (IsKnown(m_Opcode.rs) && IsConst(m_Opcode.rs)) {
|
||||
|
@ -2051,7 +2051,7 @@ void CRecompilerOps::SPECIAL_MTLO (void) {
|
|||
}
|
||||
}
|
||||
|
||||
void CRecompilerOps::SPECIAL_MFHI (void) {
|
||||
void CRecompilerOps::SPECIAL_MFHI() {
|
||||
CPU_Message(" %X %s",m_CompilePC,R4300iOpcodeName(m_Opcode.Hex,m_CompilePC));
|
||||
if (m_Opcode.rd == 0) { return; }
|
||||
|
||||
|
@ -2060,7 +2060,7 @@ void CRecompilerOps::SPECIAL_MFHI (void) {
|
|||
MoveVariableToX86reg(&_RegHI->UW[1],"_RegHI->UW[1]",GetMipsRegMapHi(m_Opcode.rd));
|
||||
}
|
||||
|
||||
void CRecompilerOps::SPECIAL_MTHI (void) {
|
||||
void CRecompilerOps::SPECIAL_MTHI() {
|
||||
CPU_Message(" %X %s",m_CompilePC,R4300iOpcodeName(m_Opcode.Hex,m_CompilePC));
|
||||
|
||||
if (IsKnown(m_Opcode.rs) && IsConst(m_Opcode.rs)) {
|
||||
|
@ -2088,7 +2088,7 @@ void CRecompilerOps::SPECIAL_MTHI (void) {
|
|||
}
|
||||
}
|
||||
|
||||
void CRecompilerOps::SPECIAL_DSLLV (void) {
|
||||
void CRecompilerOps::SPECIAL_DSLLV() {
|
||||
BYTE * Jump[2];
|
||||
|
||||
CPU_Message(" %X %s",m_CompilePC,R4300iOpcodeName(m_Opcode.Hex,m_CompilePC));
|
||||
|
@ -2126,7 +2126,7 @@ void CRecompilerOps::SPECIAL_DSLLV (void) {
|
|||
SetJump8(Jump[1],m_RecompPos);
|
||||
}
|
||||
|
||||
void CRecompilerOps::SPECIAL_DSRLV (void) {
|
||||
void CRecompilerOps::SPECIAL_DSRLV() {
|
||||
BYTE * Jump[2];
|
||||
|
||||
CPU_Message(" %X %s",m_CompilePC,R4300iOpcodeName(m_Opcode.Hex,m_CompilePC));
|
||||
|
@ -2194,7 +2194,7 @@ void CRecompilerOps::SPECIAL_DSRLV (void) {
|
|||
}
|
||||
}
|
||||
|
||||
void CRecompilerOps::SPECIAL_DSRAV (void)
|
||||
void CRecompilerOps::SPECIAL_DSRAV()
|
||||
{
|
||||
BYTE * Jump[2];
|
||||
|
||||
|
@ -2233,7 +2233,7 @@ void CRecompilerOps::SPECIAL_DSRAV (void)
|
|||
SetJump8(Jump[1],m_RecompPos);
|
||||
}
|
||||
|
||||
void CRecompilerOps::SPECIAL_MULT ( void) {
|
||||
void CRecompilerOps::SPECIAL_MULT() {
|
||||
CPU_Message(" %X %s",m_CompilePC,R4300iOpcodeName(m_Opcode.Hex,m_CompilePC));
|
||||
|
||||
m_RegWorkingSet.SetX86Protected(x86_EDX,TRUE);
|
||||
|
@ -2251,7 +2251,7 @@ void CRecompilerOps::SPECIAL_MULT ( void) {
|
|||
MoveX86regToVariable(x86_EDX,&_RegHI->UW[1],"_RegHI->UW[1]");
|
||||
}
|
||||
|
||||
void CRecompilerOps::SPECIAL_MULTU (void) {
|
||||
void CRecompilerOps::SPECIAL_MULTU() {
|
||||
CPU_Message(" %X %s",m_CompilePC,R4300iOpcodeName(m_Opcode.Hex,m_CompilePC));
|
||||
|
||||
m_RegWorkingSet.SetX86Protected(x86_EDX, TRUE);
|
||||
|
@ -2269,7 +2269,7 @@ void CRecompilerOps::SPECIAL_MULTU (void) {
|
|||
MoveX86regToVariable(x86_EDX,&_RegHI->UW[1],"_RegHI->UW[1]");
|
||||
}
|
||||
|
||||
void CRecompilerOps::SPECIAL_DIV (void)
|
||||
void CRecompilerOps::SPECIAL_DIV()
|
||||
{
|
||||
CPU_Message(" %X %s",m_CompilePC,R4300iOpcodeName(m_Opcode.Hex,m_CompilePC));
|
||||
|
||||
|
@ -2317,7 +2317,7 @@ void CRecompilerOps::SPECIAL_DIV (void)
|
|||
MoveX86regToVariable(x86_EDX,&_RegHI->UW[1],"_RegHI->UW[1]");
|
||||
}
|
||||
|
||||
void CRecompilerOps::SPECIAL_DIVU ( void) {
|
||||
void CRecompilerOps::SPECIAL_DIVU() {
|
||||
BYTE *Jump[2];
|
||||
x86Reg Reg;
|
||||
|
||||
|
@ -2384,7 +2384,7 @@ void CRecompilerOps::SPECIAL_DIVU ( void) {
|
|||
}
|
||||
}
|
||||
|
||||
void CRecompilerOps::SPECIAL_DMULT (void)
|
||||
void CRecompilerOps::SPECIAL_DMULT()
|
||||
{
|
||||
CPU_Message(" %X %s",m_CompilePC,R4300iOpcodeName(m_Opcode.Hex,m_CompilePC));
|
||||
|
||||
|
@ -2396,7 +2396,7 @@ void CRecompilerOps::SPECIAL_DMULT (void)
|
|||
AfterCallDirect(m_RegWorkingSet);
|
||||
}
|
||||
|
||||
void CRecompilerOps::SPECIAL_DMULTU (void) {
|
||||
void CRecompilerOps::SPECIAL_DMULTU() {
|
||||
CPU_Message(" %X %s",m_CompilePC,R4300iOpcodeName(m_Opcode.Hex,m_CompilePC));
|
||||
|
||||
UnMap_GPR(m_Opcode.rs,TRUE);
|
||||
|
@ -2474,7 +2474,7 @@ void CRecompilerOps::SPECIAL_DMULTU (void) {
|
|||
#endif
|
||||
}
|
||||
|
||||
void CRecompilerOps::SPECIAL_DDIV (void) {
|
||||
void CRecompilerOps::SPECIAL_DDIV() {
|
||||
CPU_Message(" %X %s",m_CompilePC,R4300iOpcodeName(m_Opcode.Hex,m_CompilePC));
|
||||
|
||||
UnMap_GPR(m_Opcode.rs,TRUE);
|
||||
|
@ -2485,7 +2485,7 @@ void CRecompilerOps::SPECIAL_DDIV (void) {
|
|||
AfterCallDirect(m_RegWorkingSet);
|
||||
}
|
||||
|
||||
void CRecompilerOps::SPECIAL_DDIVU (void)
|
||||
void CRecompilerOps::SPECIAL_DDIVU()
|
||||
{
|
||||
CPU_Message(" %X %s",m_CompilePC,R4300iOpcodeName(m_Opcode.Hex,m_CompilePC));
|
||||
|
||||
|
@ -2497,7 +2497,7 @@ void CRecompilerOps::SPECIAL_DDIVU (void)
|
|||
AfterCallDirect(m_RegWorkingSet);
|
||||
}
|
||||
|
||||
void CRecompilerOps::SPECIAL_ADD (void) {
|
||||
void CRecompilerOps::SPECIAL_ADD() {
|
||||
int source1 = m_Opcode.rd == m_Opcode.rt?m_Opcode.rt:m_Opcode.rs;
|
||||
int source2 = m_Opcode.rd == m_Opcode.rt?m_Opcode.rs:m_Opcode.rt;
|
||||
|
||||
|
@ -2526,7 +2526,7 @@ void CRecompilerOps::SPECIAL_ADD (void) {
|
|||
}
|
||||
}
|
||||
|
||||
void CRecompilerOps::SPECIAL_ADDU (void) {
|
||||
void CRecompilerOps::SPECIAL_ADDU() {
|
||||
int source1 = m_Opcode.rd == m_Opcode.rt?m_Opcode.rt:m_Opcode.rs;
|
||||
int source2 = m_Opcode.rd == m_Opcode.rt?m_Opcode.rs:m_Opcode.rt;
|
||||
|
||||
|
@ -2555,7 +2555,7 @@ void CRecompilerOps::SPECIAL_ADDU (void) {
|
|||
}
|
||||
}
|
||||
|
||||
void CRecompilerOps::SPECIAL_SUB (void) {
|
||||
void CRecompilerOps::SPECIAL_SUB() {
|
||||
CPU_Message(" %X %s",m_CompilePC,R4300iOpcodeName(m_Opcode.Hex,m_CompilePC));
|
||||
if (m_Opcode.rd == 0) { return; }
|
||||
|
||||
|
@ -2586,7 +2586,7 @@ void CRecompilerOps::SPECIAL_SUB (void) {
|
|||
}
|
||||
}
|
||||
|
||||
void CRecompilerOps::SPECIAL_SUBU (void) {
|
||||
void CRecompilerOps::SPECIAL_SUBU() {
|
||||
CPU_Message(" %X %s",m_CompilePC,R4300iOpcodeName(m_Opcode.Hex,m_CompilePC));
|
||||
if (m_Opcode.rd == 0) { return; }
|
||||
|
||||
|
@ -2618,7 +2618,7 @@ void CRecompilerOps::SPECIAL_SUBU (void) {
|
|||
}
|
||||
}
|
||||
|
||||
void CRecompilerOps::SPECIAL_AND (void)
|
||||
void CRecompilerOps::SPECIAL_AND()
|
||||
{
|
||||
CPU_Message(" %X %s",m_CompilePC,R4300iOpcodeName(m_Opcode.Hex,m_CompilePC));
|
||||
|
||||
|
@ -2757,7 +2757,7 @@ void CRecompilerOps::SPECIAL_AND (void)
|
|||
}
|
||||
}
|
||||
|
||||
void CRecompilerOps::SPECIAL_OR (void) {
|
||||
void CRecompilerOps::SPECIAL_OR() {
|
||||
CPU_Message(" %X %s",m_CompilePC,R4300iOpcodeName(m_Opcode.Hex,m_CompilePC));
|
||||
|
||||
if (IsKnown(m_Opcode.rt) && IsKnown(m_Opcode.rs)) {
|
||||
|
@ -2875,7 +2875,7 @@ void CRecompilerOps::SPECIAL_OR (void) {
|
|||
}
|
||||
}
|
||||
|
||||
void CRecompilerOps::SPECIAL_XOR (void) {
|
||||
void CRecompilerOps::SPECIAL_XOR() {
|
||||
CPU_Message(" %X %s",m_CompilePC,R4300iOpcodeName(m_Opcode.Hex,m_CompilePC));
|
||||
if (m_Opcode.rd == 0) { return; }
|
||||
|
||||
|
@ -2985,7 +2985,7 @@ void CRecompilerOps::SPECIAL_XOR (void) {
|
|||
}
|
||||
}
|
||||
|
||||
void CRecompilerOps::SPECIAL_NOR (void) {
|
||||
void CRecompilerOps::SPECIAL_NOR() {
|
||||
CPU_Message(" %X %s",m_CompilePC,R4300iOpcodeName(m_Opcode.Hex,m_CompilePC));
|
||||
|
||||
if (IsKnown(m_Opcode.rt) && IsKnown(m_Opcode.rs)) {
|
||||
|
@ -3107,7 +3107,7 @@ void CRecompilerOps::SPECIAL_NOR (void) {
|
|||
}
|
||||
}
|
||||
|
||||
void CRecompilerOps::SPECIAL_SLT (void) {
|
||||
void CRecompilerOps::SPECIAL_SLT() {
|
||||
CPU_Message(" %X %s",m_CompilePC,R4300iOpcodeName(m_Opcode.Hex,m_CompilePC));
|
||||
if (m_Opcode.rd == 0) { return; }
|
||||
|
||||
|
@ -3340,7 +3340,7 @@ void CRecompilerOps::SPECIAL_SLT (void) {
|
|||
}
|
||||
}
|
||||
|
||||
void CRecompilerOps::SPECIAL_SLTU (void) {
|
||||
void CRecompilerOps::SPECIAL_SLTU() {
|
||||
CPU_Message(" %X %s",m_CompilePC,R4300iOpcodeName(m_Opcode.Hex,m_CompilePC));
|
||||
if (m_Opcode.rd == 0) { return; }
|
||||
|
||||
|
@ -3556,7 +3556,7 @@ void CRecompilerOps::SPECIAL_SLTU (void) {
|
|||
}
|
||||
}
|
||||
|
||||
void CRecompilerOps::SPECIAL_DADD (void) {
|
||||
void CRecompilerOps::SPECIAL_DADD() {
|
||||
CPU_Message(" %X %s",m_CompilePC,R4300iOpcodeName(m_Opcode.Hex,m_CompilePC));
|
||||
if (m_Opcode.rd == 0) { return; }
|
||||
|
||||
|
@ -3593,7 +3593,7 @@ void CRecompilerOps::SPECIAL_DADD (void) {
|
|||
}
|
||||
}
|
||||
|
||||
void CRecompilerOps::SPECIAL_DADDU (void) {
|
||||
void CRecompilerOps::SPECIAL_DADDU() {
|
||||
CPU_Message(" %X %s",m_CompilePC,R4300iOpcodeName(m_Opcode.Hex,m_CompilePC));
|
||||
if (m_Opcode.rd == 0) { return; }
|
||||
|
||||
|
@ -3629,7 +3629,7 @@ void CRecompilerOps::SPECIAL_DADDU (void) {
|
|||
}
|
||||
}
|
||||
|
||||
void CRecompilerOps::SPECIAL_DSUB (void) {
|
||||
void CRecompilerOps::SPECIAL_DSUB() {
|
||||
CPU_Message(" %X %s",m_CompilePC,R4300iOpcodeName(m_Opcode.Hex,m_CompilePC));
|
||||
if (m_Opcode.rd == 0) { return; }
|
||||
|
||||
|
@ -3672,7 +3672,7 @@ void CRecompilerOps::SPECIAL_DSUB (void) {
|
|||
}
|
||||
}
|
||||
|
||||
void CRecompilerOps::SPECIAL_DSUBU (void) {
|
||||
void CRecompilerOps::SPECIAL_DSUBU() {
|
||||
CPU_Message(" %X %s",m_CompilePC,R4300iOpcodeName(m_Opcode.Hex,m_CompilePC));
|
||||
if (m_Opcode.rd == 0) { return; }
|
||||
|
||||
|
@ -3714,7 +3714,7 @@ void CRecompilerOps::SPECIAL_DSUBU (void) {
|
|||
}
|
||||
}
|
||||
|
||||
void CRecompilerOps::SPECIAL_DSLL (void) {
|
||||
void CRecompilerOps::SPECIAL_DSLL() {
|
||||
CPU_Message(" %X %s",m_CompilePC,R4300iOpcodeName(m_Opcode.Hex,m_CompilePC));
|
||||
|
||||
if (m_Opcode.rd == 0) { return; }
|
||||
|
@ -3740,7 +3740,7 @@ void CRecompilerOps::SPECIAL_DSLL (void) {
|
|||
ShiftLeftSignImmed( GetMipsRegMapLo(m_Opcode.rd),(BYTE)m_Opcode.sa);
|
||||
}
|
||||
|
||||
void CRecompilerOps::SPECIAL_DSRL (void) {
|
||||
void CRecompilerOps::SPECIAL_DSRL() {
|
||||
CPU_Message(" %X %s",m_CompilePC,R4300iOpcodeName(m_Opcode.Hex,m_CompilePC));
|
||||
|
||||
if (m_Opcode.rd == 0) { return; }
|
||||
|
@ -3764,7 +3764,7 @@ void CRecompilerOps::SPECIAL_DSRL (void) {
|
|||
ShiftRightUnsignImmed(GetMipsRegMapHi(m_Opcode.rd),(BYTE)m_Opcode.sa);
|
||||
}
|
||||
|
||||
void CRecompilerOps::SPECIAL_DSRA (void) {
|
||||
void CRecompilerOps::SPECIAL_DSRA() {
|
||||
CPU_Message(" %X %s",m_CompilePC,R4300iOpcodeName(m_Opcode.Hex,m_CompilePC));
|
||||
|
||||
if (m_Opcode.rd == 0) { return; }
|
||||
|
@ -3788,7 +3788,7 @@ void CRecompilerOps::SPECIAL_DSRA (void) {
|
|||
ShiftRightSignImmed(GetMipsRegMapHi(m_Opcode.rd),(BYTE)m_Opcode.sa);
|
||||
}
|
||||
|
||||
void CRecompilerOps::SPECIAL_DSLL32 (void) {
|
||||
void CRecompilerOps::SPECIAL_DSLL32() {
|
||||
CPU_Message(" %X %s",m_CompilePC,R4300iOpcodeName(m_Opcode.Hex,m_CompilePC));
|
||||
|
||||
if (m_Opcode.rd == 0) { return; }
|
||||
|
@ -3829,7 +3829,7 @@ void CRecompilerOps::SPECIAL_DSLL32 (void) {
|
|||
}
|
||||
}
|
||||
|
||||
void CRecompilerOps::SPECIAL_DSRL32 (void) {
|
||||
void CRecompilerOps::SPECIAL_DSRL32() {
|
||||
CPU_Message(" %X %s",m_CompilePC,R4300iOpcodeName(m_Opcode.Hex,m_CompilePC));
|
||||
|
||||
if (IsConst(m_Opcode.rt)) {
|
||||
|
@ -3864,7 +3864,7 @@ void CRecompilerOps::SPECIAL_DSRL32 (void) {
|
|||
}
|
||||
}
|
||||
|
||||
void CRecompilerOps::SPECIAL_DSRA32 (void) {
|
||||
void CRecompilerOps::SPECIAL_DSRA32() {
|
||||
CPU_Message(" %X %s",m_CompilePC,R4300iOpcodeName(m_Opcode.Hex,m_CompilePC));
|
||||
|
||||
if (IsConst(m_Opcode.rt)) {
|
||||
|
@ -3917,7 +3917,7 @@ void CRecompilerOps::COP0_MF(void) {
|
|||
MoveVariableToX86reg(&_CP0[m_Opcode.rd],CRegName::Cop0[m_Opcode.rd],GetMipsRegMapLo(m_Opcode.rt));
|
||||
}
|
||||
|
||||
void CRecompilerOps::COP0_MT (void) {
|
||||
void CRecompilerOps::COP0_MT() {
|
||||
CPU_Message(" %X %s",m_CompilePC,R4300iOpcodeName(m_Opcode.Hex,m_CompilePC));
|
||||
|
||||
BYTE *Jump;
|
||||
|
@ -4107,7 +4107,7 @@ void CRecompilerOps::COP0_CO_TLBP( void) {
|
|||
AfterCallDirect(m_RegWorkingSet);
|
||||
}
|
||||
|
||||
void compiler_COP0_CO_ERET (void) {
|
||||
void compiler_COP0_CO_ERET() {
|
||||
if ((g_Reg->STATUS_REGISTER & STATUS_ERL) != 0) {
|
||||
g_Reg->m_PROGRAM_COUNTER = g_Reg->ERROREPC_REGISTER;
|
||||
g_Reg->STATUS_REGISTER &= ~STATUS_ERL;
|
||||
|
@ -4131,7 +4131,7 @@ void CRecompilerOps::COP0_CO_ERET( void) {
|
|||
}
|
||||
|
||||
/************************** FPU Options **************************/
|
||||
void CRecompilerOps::ChangeDefaultRoundingModel (void) {
|
||||
void CRecompilerOps::ChangeDefaultRoundingModel() {
|
||||
switch((_FPCR[31] & 3)) {
|
||||
case 0: *_RoundingModel = ROUND_NEAR; break;
|
||||
case 1: *_RoundingModel = ROUND_CHOP; break;
|
||||
|
@ -4141,7 +4141,7 @@ void CRecompilerOps::ChangeDefaultRoundingModel (void) {
|
|||
}
|
||||
|
||||
/************************** COP1 functions **************************/
|
||||
void CRecompilerOps::COP1_MF (void) {
|
||||
void CRecompilerOps::COP1_MF() {
|
||||
x86Reg TempReg;
|
||||
|
||||
CPU_Message(" %X %s",m_CompilePC,R4300iOpcodeName(m_Opcode.Hex,m_CompilePC));
|
||||
|
@ -4156,7 +4156,7 @@ void CRecompilerOps::COP1_MF (void) {
|
|||
MoveX86PointerToX86reg(GetMipsRegMapLo(m_Opcode.rt),TempReg);
|
||||
}
|
||||
|
||||
void CRecompilerOps::COP1_DMF (void) {
|
||||
void CRecompilerOps::COP1_DMF() {
|
||||
x86Reg TempReg;
|
||||
char Name[50];
|
||||
|
||||
|
@ -4272,7 +4272,7 @@ void CRecompilerOps::COP1_CT(void) {
|
|||
}
|
||||
|
||||
/************************** COP1: S functions ************************/
|
||||
void CRecompilerOps::COP1_S_ADD (void) {
|
||||
void CRecompilerOps::COP1_S_ADD() {
|
||||
DWORD Reg1 = m_Opcode.ft == m_Opcode.fd?m_Opcode.ft:m_Opcode.fs;
|
||||
DWORD Reg2 = m_Opcode.ft == m_Opcode.fd?m_Opcode.fs:m_Opcode.ft;
|
||||
|
||||
|
@ -4298,7 +4298,7 @@ void CRecompilerOps::COP1_S_ADD (void) {
|
|||
UnMap_FPR(m_Opcode.fd,TRUE);
|
||||
}
|
||||
|
||||
void CRecompilerOps::COP1_S_SUB (void) {
|
||||
void CRecompilerOps::COP1_S_SUB() {
|
||||
DWORD Reg1 = m_Opcode.ft == m_Opcode.fd?m_Opcode.ft:m_Opcode.fs;
|
||||
DWORD Reg2 = m_Opcode.ft == m_Opcode.fd?m_Opcode.fs:m_Opcode.ft;
|
||||
x86Reg TempReg;
|
||||
|
@ -4334,7 +4334,7 @@ void CRecompilerOps::COP1_S_SUB (void) {
|
|||
UnMap_FPR(m_Opcode.fd,TRUE);
|
||||
}
|
||||
|
||||
void CRecompilerOps::COP1_S_MUL (void) {
|
||||
void CRecompilerOps::COP1_S_MUL() {
|
||||
DWORD Reg1 = m_Opcode.ft == m_Opcode.fd?m_Opcode.ft:m_Opcode.fs;
|
||||
DWORD Reg2 = m_Opcode.ft == m_Opcode.fd?m_Opcode.fs:m_Opcode.ft;
|
||||
x86Reg TempReg;
|
||||
|
@ -4360,7 +4360,7 @@ void CRecompilerOps::COP1_S_MUL (void) {
|
|||
UnMap_FPR(m_Opcode.fd,TRUE);
|
||||
}
|
||||
|
||||
void CRecompilerOps::COP1_S_DIV (void) {
|
||||
void CRecompilerOps::COP1_S_DIV() {
|
||||
DWORD Reg1 = m_Opcode.ft == m_Opcode.fd?m_Opcode.ft:m_Opcode.fs;
|
||||
DWORD Reg2 = m_Opcode.ft == m_Opcode.fd?m_Opcode.fs:m_Opcode.ft;
|
||||
x86Reg TempReg;
|
||||
|
@ -4397,7 +4397,7 @@ void CRecompilerOps::COP1_S_DIV (void) {
|
|||
UnMap_FPR(m_Opcode.fd,TRUE);
|
||||
}
|
||||
|
||||
void CRecompilerOps::COP1_S_ABS (void) {
|
||||
void CRecompilerOps::COP1_S_ABS() {
|
||||
CPU_Message(" %X %s",m_CompilePC,R4300iOpcodeName(m_Opcode.Hex,m_CompilePC));
|
||||
m_Section->CompileCop1Test();
|
||||
FixRoundModel(CRegInfo::RoundDefault);
|
||||
|
@ -4406,7 +4406,7 @@ void CRecompilerOps::COP1_S_ABS (void) {
|
|||
UnMap_FPR(m_Opcode.fd,TRUE);
|
||||
}
|
||||
|
||||
void CRecompilerOps::COP1_S_NEG (void) {
|
||||
void CRecompilerOps::COP1_S_NEG() {
|
||||
CPU_Message(" %X %s",m_CompilePC,R4300iOpcodeName(m_Opcode.Hex,m_CompilePC));
|
||||
m_Section->CompileCop1Test();
|
||||
FixRoundModel(CRegInfo::RoundDefault);
|
||||
|
@ -4415,7 +4415,7 @@ void CRecompilerOps::COP1_S_NEG (void) {
|
|||
UnMap_FPR(m_Opcode.fd,TRUE);
|
||||
}
|
||||
|
||||
void CRecompilerOps::COP1_S_SQRT (void) {
|
||||
void CRecompilerOps::COP1_S_SQRT() {
|
||||
CPU_Message(" %X %s",m_CompilePC,R4300iOpcodeName(m_Opcode.Hex,m_CompilePC));
|
||||
m_Section->CompileCop1Test();
|
||||
FixRoundModel(CRegInfo::RoundDefault);
|
||||
|
@ -4424,14 +4424,14 @@ void CRecompilerOps::COP1_S_SQRT (void) {
|
|||
UnMap_FPR(m_Opcode.fd,TRUE);
|
||||
}
|
||||
|
||||
void CRecompilerOps::COP1_S_MOV (void) {
|
||||
void CRecompilerOps::COP1_S_MOV() {
|
||||
CPU_Message(" %X %s",m_CompilePC,R4300iOpcodeName(m_Opcode.Hex,m_CompilePC));
|
||||
m_Section->CompileCop1Test();
|
||||
FixRoundModel(CRegInfo::RoundDefault);
|
||||
Load_FPR_ToTop(m_Opcode.fd,m_Opcode.fs,CRegInfo::FPU_Float);
|
||||
}
|
||||
|
||||
void CRecompilerOps::COP1_S_TRUNC_L (void) {
|
||||
void CRecompilerOps::COP1_S_TRUNC_L() {
|
||||
CPU_Message(" %X %s",m_CompilePC,R4300iOpcodeName(m_Opcode.Hex,m_CompilePC));
|
||||
|
||||
m_Section->CompileCop1Test();
|
||||
|
@ -4441,7 +4441,7 @@ void CRecompilerOps::COP1_S_TRUNC_L (void) {
|
|||
ChangeFPURegFormat(m_Opcode.fd,CRegInfo::FPU_Float,CRegInfo::FPU_Qword,CRegInfo::RoundTruncate);
|
||||
}
|
||||
|
||||
void CRecompilerOps::COP1_S_CEIL_L (void) { //added by Witten
|
||||
void CRecompilerOps::COP1_S_CEIL_L() { //added by Witten
|
||||
CPU_Message(" %X %s",m_CompilePC,R4300iOpcodeName(m_Opcode.Hex,m_CompilePC));
|
||||
|
||||
m_Section->CompileCop1Test();
|
||||
|
@ -4451,7 +4451,7 @@ void CRecompilerOps::COP1_S_CEIL_L (void) { //added by Witten
|
|||
ChangeFPURegFormat(m_Opcode.fd,CRegInfo::FPU_Float,CRegInfo::FPU_Qword,CRegInfo::RoundUp);
|
||||
}
|
||||
|
||||
void CRecompilerOps::COP1_S_FLOOR_L (void) { //added by Witten
|
||||
void CRecompilerOps::COP1_S_FLOOR_L() { //added by Witten
|
||||
CPU_Message(" %X %s",m_CompilePC,R4300iOpcodeName(m_Opcode.Hex,m_CompilePC));
|
||||
|
||||
m_Section->CompileCop1Test();
|
||||
|
@ -4461,7 +4461,7 @@ void CRecompilerOps::COP1_S_FLOOR_L (void) { //added by Witten
|
|||
ChangeFPURegFormat(m_Opcode.fd,CRegInfo::FPU_Float,CRegInfo::FPU_Qword,CRegInfo::RoundDown);
|
||||
}
|
||||
|
||||
void CRecompilerOps::COP1_S_ROUND_W (void)
|
||||
void CRecompilerOps::COP1_S_ROUND_W()
|
||||
{
|
||||
CPU_Message(" %X %s",m_CompilePC,R4300iOpcodeName(m_Opcode.Hex,m_CompilePC));
|
||||
|
||||
|
@ -4472,7 +4472,7 @@ void CRecompilerOps::COP1_S_ROUND_W (void)
|
|||
ChangeFPURegFormat(m_Opcode.fd,CRegInfo::FPU_Float,CRegInfo::FPU_Dword,CRegInfo::RoundNearest);
|
||||
}
|
||||
|
||||
void CRecompilerOps::COP1_S_TRUNC_W (void) {
|
||||
void CRecompilerOps::COP1_S_TRUNC_W() {
|
||||
CPU_Message(" %X %s",m_CompilePC,R4300iOpcodeName(m_Opcode.Hex,m_CompilePC));
|
||||
|
||||
m_Section->CompileCop1Test();
|
||||
|
@ -4482,7 +4482,7 @@ void CRecompilerOps::COP1_S_TRUNC_W (void) {
|
|||
ChangeFPURegFormat(m_Opcode.fd,CRegInfo::FPU_Float,CRegInfo::FPU_Dword,CRegInfo::RoundTruncate);
|
||||
}
|
||||
|
||||
void CRecompilerOps::COP1_S_CEIL_W (void) { // added by Witten
|
||||
void CRecompilerOps::COP1_S_CEIL_W() { // added by Witten
|
||||
CPU_Message(" %X %s",m_CompilePC,R4300iOpcodeName(m_Opcode.Hex,m_CompilePC));
|
||||
|
||||
m_Section->CompileCop1Test();
|
||||
|
@ -4492,7 +4492,7 @@ void CRecompilerOps::COP1_S_CEIL_W (void) { // added by Witten
|
|||
ChangeFPURegFormat(m_Opcode.fd,CRegInfo::FPU_Float,CRegInfo::FPU_Dword,CRegInfo::RoundUp);
|
||||
}
|
||||
|
||||
void CRecompilerOps::COP1_S_FLOOR_W (void) {
|
||||
void CRecompilerOps::COP1_S_FLOOR_W() {
|
||||
CPU_Message(" %X %s",m_CompilePC,R4300iOpcodeName(m_Opcode.Hex,m_CompilePC));
|
||||
|
||||
m_Section->CompileCop1Test();
|
||||
|
@ -4502,7 +4502,7 @@ void CRecompilerOps::COP1_S_FLOOR_W (void) {
|
|||
ChangeFPURegFormat(m_Opcode.fd,CRegInfo::FPU_Float,CRegInfo::FPU_Dword,CRegInfo::RoundDown);
|
||||
}
|
||||
|
||||
void CRecompilerOps::COP1_S_CVT_D (void)
|
||||
void CRecompilerOps::COP1_S_CVT_D()
|
||||
{
|
||||
CPU_Message(" %X %s",m_CompilePC,R4300iOpcodeName(m_Opcode.Hex,m_CompilePC));
|
||||
|
||||
|
@ -4513,7 +4513,7 @@ void CRecompilerOps::COP1_S_CVT_D (void)
|
|||
ChangeFPURegFormat(m_Opcode.fd,CRegInfo::FPU_Float,CRegInfo::FPU_Double,CRegInfo::RoundDefault);
|
||||
}
|
||||
|
||||
void CRecompilerOps::COP1_S_CVT_W (void) {
|
||||
void CRecompilerOps::COP1_S_CVT_W() {
|
||||
CPU_Message(" %X %s",m_CompilePC,R4300iOpcodeName(m_Opcode.Hex,m_CompilePC));
|
||||
|
||||
m_Section->CompileCop1Test();
|
||||
|
@ -4523,7 +4523,7 @@ void CRecompilerOps::COP1_S_CVT_W (void) {
|
|||
ChangeFPURegFormat(m_Opcode.fd,CRegInfo::FPU_Float,CRegInfo::FPU_Dword,CRegInfo::RoundDefault);
|
||||
}
|
||||
|
||||
void CRecompilerOps::COP1_S_CVT_L (void) {
|
||||
void CRecompilerOps::COP1_S_CVT_L() {
|
||||
CPU_Message(" %X %s",m_CompilePC,R4300iOpcodeName(m_Opcode.Hex,m_CompilePC));
|
||||
|
||||
m_Section->CompileCop1Test();
|
||||
|
@ -4533,7 +4533,7 @@ void CRecompilerOps::COP1_S_CVT_L (void) {
|
|||
ChangeFPURegFormat(m_Opcode.fd,CRegInfo::FPU_Float,CRegInfo::FPU_Qword,CRegInfo::RoundDefault);
|
||||
}
|
||||
|
||||
void CRecompilerOps::COP1_S_CMP (void) {
|
||||
void CRecompilerOps::COP1_S_CMP() {
|
||||
DWORD Reg1 = m_Opcode.fs;
|
||||
DWORD Reg2 = m_Opcode.ft;
|
||||
DWORD cmp = 0;
|
||||
|
@ -4593,7 +4593,7 @@ void CRecompilerOps::COP1_S_CMP (void) {
|
|||
}
|
||||
|
||||
/************************** COP1: D functions ************************/
|
||||
void CRecompilerOps::COP1_D_ADD (void) {
|
||||
void CRecompilerOps::COP1_D_ADD() {
|
||||
DWORD Reg1 = m_Opcode.ft == m_Opcode.fd?m_Opcode.ft:m_Opcode.fs;
|
||||
DWORD Reg2 = m_Opcode.ft == m_Opcode.fd?m_Opcode.fs:m_Opcode.ft;
|
||||
char Name[50];
|
||||
|
@ -4617,7 +4617,7 @@ void CRecompilerOps::COP1_D_ADD (void) {
|
|||
}
|
||||
}
|
||||
|
||||
void CRecompilerOps::COP1_D_SUB (void) {
|
||||
void CRecompilerOps::COP1_D_SUB() {
|
||||
DWORD Reg1 = m_Opcode.ft == m_Opcode.fd?m_Opcode.ft:m_Opcode.fs;
|
||||
DWORD Reg2 = m_Opcode.ft == m_Opcode.fd?m_Opcode.fs:m_Opcode.ft;
|
||||
x86Reg TempReg;
|
||||
|
@ -4650,7 +4650,7 @@ void CRecompilerOps::COP1_D_SUB (void) {
|
|||
}
|
||||
}
|
||||
|
||||
void CRecompilerOps::COP1_D_MUL (void) {
|
||||
void CRecompilerOps::COP1_D_MUL() {
|
||||
DWORD Reg1 = m_Opcode.ft == m_Opcode.fd?m_Opcode.ft:m_Opcode.fs;
|
||||
DWORD Reg2 = m_Opcode.ft == m_Opcode.fd?m_Opcode.fs:m_Opcode.ft;
|
||||
x86Reg TempReg;
|
||||
|
@ -4674,7 +4674,7 @@ void CRecompilerOps::COP1_D_MUL (void) {
|
|||
}
|
||||
}
|
||||
|
||||
void CRecompilerOps::COP1_D_DIV (void) {
|
||||
void CRecompilerOps::COP1_D_DIV() {
|
||||
DWORD Reg1 = m_Opcode.ft == m_Opcode.fd?m_Opcode.ft:m_Opcode.fs;
|
||||
DWORD Reg2 = m_Opcode.ft == m_Opcode.fd?m_Opcode.fs:m_Opcode.ft;
|
||||
x86Reg TempReg;
|
||||
|
@ -4706,30 +4706,30 @@ void CRecompilerOps::COP1_D_DIV (void) {
|
|||
}
|
||||
}
|
||||
|
||||
void CRecompilerOps::COP1_D_ABS (void) {
|
||||
void CRecompilerOps::COP1_D_ABS() {
|
||||
CPU_Message(" %X %s",m_CompilePC,R4300iOpcodeName(m_Opcode.Hex,m_CompilePC));
|
||||
Load_FPR_ToTop(m_Opcode.fd,m_Opcode.fs,CRegInfo::FPU_Double);
|
||||
fpuAbs();
|
||||
}
|
||||
|
||||
void CRecompilerOps::COP1_D_NEG (void) {
|
||||
void CRecompilerOps::COP1_D_NEG() {
|
||||
CPU_Message(" %X %s",m_CompilePC,R4300iOpcodeName(m_Opcode.Hex,m_CompilePC));
|
||||
Load_FPR_ToTop(m_Opcode.fd,m_Opcode.fs,CRegInfo::FPU_Double);
|
||||
fpuNeg();
|
||||
}
|
||||
|
||||
void CRecompilerOps::COP1_D_SQRT (void) {
|
||||
void CRecompilerOps::COP1_D_SQRT() {
|
||||
CPU_Message(" %X %s",m_CompilePC,R4300iOpcodeName(m_Opcode.Hex,m_CompilePC));
|
||||
Load_FPR_ToTop(m_Opcode.fd,m_Opcode.fs,CRegInfo::FPU_Double);
|
||||
fpuSqrt();
|
||||
}
|
||||
|
||||
void CRecompilerOps::COP1_D_MOV (void) {
|
||||
void CRecompilerOps::COP1_D_MOV() {
|
||||
CPU_Message(" %X %s",m_CompilePC,R4300iOpcodeName(m_Opcode.Hex,m_CompilePC));
|
||||
Load_FPR_ToTop(m_Opcode.fd,m_Opcode.fs,CRegInfo::FPU_Double);
|
||||
}
|
||||
|
||||
void CRecompilerOps::COP1_D_TRUNC_L (void) { //added by Witten
|
||||
void CRecompilerOps::COP1_D_TRUNC_L() { //added by Witten
|
||||
CPU_Message(" %X %s",m_CompilePC,R4300iOpcodeName(m_Opcode.Hex,m_CompilePC));
|
||||
|
||||
m_Section->CompileCop1Test();
|
||||
|
@ -4742,7 +4742,7 @@ void CRecompilerOps::COP1_D_TRUNC_L (void) { //added by Witten
|
|||
ChangeFPURegFormat(m_Opcode.fd,CRegInfo::FPU_Double,CRegInfo::FPU_Qword,CRegInfo::RoundTruncate);
|
||||
}
|
||||
|
||||
void CRecompilerOps::COP1_D_CEIL_L (void) { //added by Witten
|
||||
void CRecompilerOps::COP1_D_CEIL_L() { //added by Witten
|
||||
CPU_Message(" %X %s",m_CompilePC,R4300iOpcodeName(m_Opcode.Hex,m_CompilePC));
|
||||
|
||||
m_Section->CompileCop1Test();
|
||||
|
@ -4755,7 +4755,7 @@ void CRecompilerOps::COP1_D_CEIL_L (void) { //added by Witten
|
|||
ChangeFPURegFormat(m_Opcode.fd,CRegInfo::FPU_Double,CRegInfo::FPU_Qword,CRegInfo::RoundUp);
|
||||
}
|
||||
|
||||
void CRecompilerOps::COP1_D_FLOOR_L (void) { //added by Witten
|
||||
void CRecompilerOps::COP1_D_FLOOR_L() { //added by Witten
|
||||
CPU_Message(" %X %s",m_CompilePC,R4300iOpcodeName(m_Opcode.Hex,m_CompilePC));
|
||||
|
||||
m_Section->CompileCop1Test();
|
||||
|
@ -4768,7 +4768,7 @@ void CRecompilerOps::COP1_D_FLOOR_L (void) { //added by Witten
|
|||
ChangeFPURegFormat(m_Opcode.fd,CRegInfo::FPU_Double,CRegInfo::FPU_Qword,CRegInfo::RoundDown);
|
||||
}
|
||||
|
||||
void CRecompilerOps::COP1_D_ROUND_W (void) {
|
||||
void CRecompilerOps::COP1_D_ROUND_W() {
|
||||
CPU_Message(" %X %s",m_CompilePC,R4300iOpcodeName(m_Opcode.Hex,m_CompilePC));
|
||||
|
||||
m_Section->CompileCop1Test();
|
||||
|
@ -4781,7 +4781,7 @@ void CRecompilerOps::COP1_D_ROUND_W (void) {
|
|||
ChangeFPURegFormat(m_Opcode.fd,CRegInfo::FPU_Double,CRegInfo::FPU_Dword,CRegInfo::RoundNearest);
|
||||
}
|
||||
|
||||
void CRecompilerOps::COP1_D_TRUNC_W (void) {
|
||||
void CRecompilerOps::COP1_D_TRUNC_W() {
|
||||
CPU_Message(" %X %s",m_CompilePC,R4300iOpcodeName(m_Opcode.Hex,m_CompilePC));
|
||||
|
||||
m_Section->CompileCop1Test();
|
||||
|
@ -4794,7 +4794,7 @@ void CRecompilerOps::COP1_D_TRUNC_W (void) {
|
|||
ChangeFPURegFormat(m_Opcode.fd,CRegInfo::FPU_Double,CRegInfo::FPU_Dword,CRegInfo::RoundTruncate);
|
||||
}
|
||||
|
||||
void CRecompilerOps::COP1_D_CEIL_W (void) { // added by Witten
|
||||
void CRecompilerOps::COP1_D_CEIL_W() { // added by Witten
|
||||
CPU_Message(" %X %s",m_CompilePC,R4300iOpcodeName(m_Opcode.Hex,m_CompilePC));
|
||||
|
||||
m_Section->CompileCop1Test();
|
||||
|
@ -4807,7 +4807,7 @@ void CRecompilerOps::COP1_D_CEIL_W (void) { // added by Witten
|
|||
ChangeFPURegFormat(m_Opcode.fd,CRegInfo::FPU_Double,CRegInfo::FPU_Dword,CRegInfo::RoundUp);
|
||||
}
|
||||
|
||||
void CRecompilerOps::COP1_D_FLOOR_W (void) { //added by Witten
|
||||
void CRecompilerOps::COP1_D_FLOOR_W() { //added by Witten
|
||||
CPU_Message(" %X %s",m_CompilePC,R4300iOpcodeName(m_Opcode.Hex,m_CompilePC));
|
||||
|
||||
m_Section->CompileCop1Test();
|
||||
|
@ -4820,7 +4820,7 @@ void CRecompilerOps::COP1_D_FLOOR_W (void) { //added by Witten
|
|||
ChangeFPURegFormat(m_Opcode.fd,CRegInfo::FPU_Double,CRegInfo::FPU_Dword,CRegInfo::RoundDown);
|
||||
}
|
||||
|
||||
void CRecompilerOps::COP1_D_CVT_S (void) {
|
||||
void CRecompilerOps::COP1_D_CVT_S() {
|
||||
CPU_Message(" %X %s",m_CompilePC,R4300iOpcodeName(m_Opcode.Hex,m_CompilePC));
|
||||
|
||||
m_Section->CompileCop1Test();
|
||||
|
@ -4833,7 +4833,7 @@ void CRecompilerOps::COP1_D_CVT_S (void) {
|
|||
ChangeFPURegFormat(m_Opcode.fd,CRegInfo::FPU_Double,CRegInfo::FPU_Float,CRegInfo::RoundDefault);
|
||||
}
|
||||
|
||||
void CRecompilerOps::COP1_D_CVT_W (void) {
|
||||
void CRecompilerOps::COP1_D_CVT_W() {
|
||||
CPU_Message(" %X %s",m_CompilePC,R4300iOpcodeName(m_Opcode.Hex,m_CompilePC));
|
||||
|
||||
m_Section->CompileCop1Test();
|
||||
|
@ -4846,7 +4846,7 @@ void CRecompilerOps::COP1_D_CVT_W (void) {
|
|||
ChangeFPURegFormat(m_Opcode.fd,CRegInfo::FPU_Double,CRegInfo::FPU_Dword,CRegInfo::RoundDefault);
|
||||
}
|
||||
|
||||
void CRecompilerOps::COP1_D_CVT_L (void) {
|
||||
void CRecompilerOps::COP1_D_CVT_L() {
|
||||
CPU_Message(" %X %s",m_CompilePC,R4300iOpcodeName(m_Opcode.Hex,m_CompilePC));
|
||||
|
||||
m_Section->CompileCop1Test();
|
||||
|
@ -4859,7 +4859,7 @@ void CRecompilerOps::COP1_D_CVT_L (void) {
|
|||
ChangeFPURegFormat(m_Opcode.fd,CRegInfo::FPU_Double,CRegInfo::FPU_Qword,CRegInfo::RoundDefault);
|
||||
}
|
||||
|
||||
void CRecompilerOps::COP1_D_CMP (void) {
|
||||
void CRecompilerOps::COP1_D_CMP() {
|
||||
DWORD Reg1 = m_Opcode.fs;
|
||||
DWORD Reg2 = m_Opcode.ft;
|
||||
DWORD cmp = 0;
|
||||
|
@ -4917,7 +4917,7 @@ void CRecompilerOps::COP1_D_CMP (void) {
|
|||
}
|
||||
|
||||
/************************** COP1: W functions ************************/
|
||||
void CRecompilerOps::COP1_W_CVT_S (void) {
|
||||
void CRecompilerOps::COP1_W_CVT_S() {
|
||||
CPU_Message(" %X %s",m_CompilePC,R4300iOpcodeName(m_Opcode.Hex,m_CompilePC));
|
||||
|
||||
m_Section->CompileCop1Test();
|
||||
|
@ -4927,7 +4927,7 @@ void CRecompilerOps::COP1_W_CVT_S (void) {
|
|||
ChangeFPURegFormat(m_Opcode.fd,CRegInfo::FPU_Dword,CRegInfo::FPU_Float,CRegInfo::RoundDefault);
|
||||
}
|
||||
|
||||
void CRecompilerOps::COP1_W_CVT_D (void) {
|
||||
void CRecompilerOps::COP1_W_CVT_D() {
|
||||
CPU_Message(" %X %s",m_CompilePC,R4300iOpcodeName(m_Opcode.Hex,m_CompilePC));
|
||||
|
||||
m_Section->CompileCop1Test();
|
||||
|
@ -4938,7 +4938,7 @@ void CRecompilerOps::COP1_W_CVT_D (void) {
|
|||
}
|
||||
|
||||
/************************** COP1: L functions ************************/
|
||||
void CRecompilerOps::COP1_L_CVT_S (void) {
|
||||
void CRecompilerOps::COP1_L_CVT_S() {
|
||||
CPU_Message(" %X %s",m_CompilePC,R4300iOpcodeName(m_Opcode.Hex,m_CompilePC));
|
||||
|
||||
m_Section->CompileCop1Test();
|
||||
|
@ -4948,7 +4948,7 @@ void CRecompilerOps::COP1_L_CVT_S (void) {
|
|||
ChangeFPURegFormat(m_Opcode.fd,CRegInfo::FPU_Qword,CRegInfo::FPU_Float,CRegInfo::RoundDefault);
|
||||
}
|
||||
|
||||
void CRecompilerOps::COP1_L_CVT_D (void) {
|
||||
void CRecompilerOps::COP1_L_CVT_D() {
|
||||
CPU_Message(" %X %s",m_CompilePC,R4300iOpcodeName(m_Opcode.Hex,m_CompilePC));
|
||||
|
||||
m_Section->CompileCop1Test();
|
||||
|
@ -4959,7 +4959,7 @@ void CRecompilerOps::COP1_L_CVT_D (void) {
|
|||
}
|
||||
|
||||
/************************** Other functions **************************/
|
||||
void CRecompilerOps::UnknownOpcode (void) {
|
||||
void CRecompilerOps::UnknownOpcode() {
|
||||
CPU_Message(" %X Unhandled Opcode: %s",m_CompilePC, R4300iOpcodeName(m_Opcode.Hex,m_CompilePC));
|
||||
|
||||
m_RegWorkingSet.WriteBackRegisters();
|
||||
|
@ -4989,7 +4989,7 @@ void CRecompilerOps::AfterCallDirect ( CRegInfo & RegSet )
|
|||
RegSet.SetRoundingModel(CRegInfo::RoundUnknown);
|
||||
}
|
||||
|
||||
void CRecompilerOps::EnterCodeBlock ( void )
|
||||
void CRecompilerOps::EnterCodeBlock()
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
Push(x86_ESI);
|
||||
|
@ -5000,7 +5000,7 @@ void CRecompilerOps::EnterCodeBlock ( void )
|
|||
#endif
|
||||
}
|
||||
|
||||
void CRecompilerOps::ExitCodeBlock ( void )
|
||||
void CRecompilerOps::ExitCodeBlock()
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
Pop(x86_ESI);
|
||||
|
|
|
@ -30,302 +30,302 @@ protected:
|
|||
/************************** Branch functions ************************/
|
||||
static void Compile_Branch ( BranchFunction CompareFunc, BRANCH_TYPE BranchType, BOOL Link);
|
||||
static void Compile_BranchLikely ( BranchFunction CompareFunc, BOOL Link);
|
||||
static void BNE_Compare ( void );
|
||||
static void BEQ_Compare ( void );
|
||||
static void BGTZ_Compare ( void );
|
||||
static void BLEZ_Compare ( void );
|
||||
static void BLTZ_Compare ( void );
|
||||
static void BGEZ_Compare ( void );
|
||||
static void COP1_BCF_Compare ( void );
|
||||
static void COP1_BCT_Compare ( void );
|
||||
static void BNE_Compare();
|
||||
static void BEQ_Compare();
|
||||
static void BGTZ_Compare();
|
||||
static void BLEZ_Compare();
|
||||
static void BLTZ_Compare();
|
||||
static void BGEZ_Compare();
|
||||
static void COP1_BCF_Compare();
|
||||
static void COP1_BCT_Compare();
|
||||
|
||||
/************************* OpCode functions *************************/
|
||||
static void J ( void );
|
||||
static void JAL ( void );
|
||||
static void ADDI ( void );
|
||||
static void ADDIU ( void );
|
||||
static void SLTI ( void );
|
||||
static void SLTIU ( void );
|
||||
static void ANDI ( void );
|
||||
static void ORI ( void );
|
||||
static void XORI ( void );
|
||||
static void LUI ( void );
|
||||
static void DADDIU ( void );
|
||||
// static void LDL ( void );
|
||||
// static void LDR ( void );
|
||||
// static void LB ( void );
|
||||
// static void LH ( void );
|
||||
// static void LWL ( void );
|
||||
// static void LW ( void );
|
||||
// static void LBU ( void );
|
||||
// static void LHU ( void );
|
||||
// static void LWR ( void );
|
||||
// static void LWU ( void ); //added by Witten
|
||||
// static void SB ( void );
|
||||
// static void SH ( void );
|
||||
// static void SWL ( void );
|
||||
// static void SW ( void );
|
||||
// static void SWR ( void );
|
||||
// static void SDL ( void );
|
||||
// static void SDR ( void );
|
||||
static void CACHE ( void );
|
||||
// static void LL ( void );
|
||||
// static void LWC1 ( void );
|
||||
// static void LDC1 ( void );
|
||||
// static void LD ( void );
|
||||
// static void SC ( void );
|
||||
// static void SWC1 ( void );
|
||||
// static void SDC1 ( void );
|
||||
// static void SD ( void );
|
||||
static void J ();
|
||||
static void JAL ();
|
||||
static void ADDI ();
|
||||
static void ADDIU ();
|
||||
static void SLTI ();
|
||||
static void SLTIU ();
|
||||
static void ANDI ();
|
||||
static void ORI ();
|
||||
static void XORI ();
|
||||
static void LUI ();
|
||||
static void DADDIU ();
|
||||
// static void LDL ();
|
||||
// static void LDR ();
|
||||
// static void LB ();
|
||||
// static void LH ();
|
||||
// static void LWL ();
|
||||
// static void LW ();
|
||||
// static void LBU ();
|
||||
// static void LHU ();
|
||||
// static void LWR ();
|
||||
// static void LWU (); //added by Witten
|
||||
// static void SB ();
|
||||
// static void SH ();
|
||||
// static void SWL ();
|
||||
// static void SW ();
|
||||
// static void SWR ();
|
||||
// static void SDL ();
|
||||
// static void SDR ();
|
||||
static void CACHE ();
|
||||
// static void LL ();
|
||||
// static void LWC1 ();
|
||||
// static void LDC1 ();
|
||||
// static void LD ();
|
||||
// static void SC ();
|
||||
// static void SWC1 ();
|
||||
// static void SDC1 ();
|
||||
// static void SD ();
|
||||
|
||||
/********************** R4300i OpCodes: Special **********************/
|
||||
static void SPECIAL_SLL ( void );
|
||||
static void SPECIAL_SRL ( void );
|
||||
static void SPECIAL_SRA ( void );
|
||||
static void SPECIAL_SLLV ( void );
|
||||
static void SPECIAL_SRLV ( void );
|
||||
static void SPECIAL_SRAV ( void );
|
||||
static void SPECIAL_JR ( void );
|
||||
static void SPECIAL_JALR ( void );
|
||||
static void SPECIAL_SYSCALL( void );
|
||||
static void SPECIAL_MFLO ( void );
|
||||
static void SPECIAL_MTLO ( void );
|
||||
static void SPECIAL_MFHI ( void );
|
||||
static void SPECIAL_MTHI ( void );
|
||||
static void SPECIAL_DSLLV ( void );
|
||||
static void SPECIAL_DSRLV ( void );
|
||||
static void SPECIAL_DSRAV ( void );
|
||||
static void SPECIAL_MULT ( void );
|
||||
static void SPECIAL_MULTU ( void );
|
||||
static void SPECIAL_DIV ( void );
|
||||
static void SPECIAL_DIVU ( void );
|
||||
static void SPECIAL_DMULT ( void );
|
||||
static void SPECIAL_DMULTU ( void );
|
||||
static void SPECIAL_DDIV ( void );
|
||||
static void SPECIAL_DDIVU ( void );
|
||||
static void SPECIAL_ADD ( void );
|
||||
static void SPECIAL_ADDU ( void );
|
||||
static void SPECIAL_SUB ( void );
|
||||
static void SPECIAL_SUBU ( void );
|
||||
static void SPECIAL_AND ( void );
|
||||
static void SPECIAL_OR ( void );
|
||||
static void SPECIAL_XOR ( void );
|
||||
static void SPECIAL_NOR ( void );
|
||||
static void SPECIAL_SLT ( void );
|
||||
static void SPECIAL_SLTU ( void );
|
||||
static void SPECIAL_DADD ( void );
|
||||
static void SPECIAL_DADDU ( void );
|
||||
static void SPECIAL_DSUB ( void );
|
||||
static void SPECIAL_DSUBU ( void );
|
||||
static void SPECIAL_DSLL ( void );
|
||||
static void SPECIAL_DSRL ( void );
|
||||
static void SPECIAL_DSRA ( void );
|
||||
static void SPECIAL_DSLL32 ( void );
|
||||
static void SPECIAL_DSRL32 ( void );
|
||||
static void SPECIAL_DSRA32 ( void );
|
||||
static void SPECIAL_SLL ();
|
||||
static void SPECIAL_SRL ();
|
||||
static void SPECIAL_SRA ();
|
||||
static void SPECIAL_SLLV ();
|
||||
static void SPECIAL_SRLV ();
|
||||
static void SPECIAL_SRAV ();
|
||||
static void SPECIAL_JR ();
|
||||
static void SPECIAL_JALR ();
|
||||
static void SPECIAL_SYSCALL();
|
||||
static void SPECIAL_MFLO ();
|
||||
static void SPECIAL_MTLO ();
|
||||
static void SPECIAL_MFHI ();
|
||||
static void SPECIAL_MTHI ();
|
||||
static void SPECIAL_DSLLV ();
|
||||
static void SPECIAL_DSRLV ();
|
||||
static void SPECIAL_DSRAV ();
|
||||
static void SPECIAL_MULT ();
|
||||
static void SPECIAL_MULTU ();
|
||||
static void SPECIAL_DIV ();
|
||||
static void SPECIAL_DIVU ();
|
||||
static void SPECIAL_DMULT ();
|
||||
static void SPECIAL_DMULTU ();
|
||||
static void SPECIAL_DDIV ();
|
||||
static void SPECIAL_DDIVU ();
|
||||
static void SPECIAL_ADD ();
|
||||
static void SPECIAL_ADDU ();
|
||||
static void SPECIAL_SUB ();
|
||||
static void SPECIAL_SUBU ();
|
||||
static void SPECIAL_AND ();
|
||||
static void SPECIAL_OR ();
|
||||
static void SPECIAL_XOR ();
|
||||
static void SPECIAL_NOR ();
|
||||
static void SPECIAL_SLT ();
|
||||
static void SPECIAL_SLTU ();
|
||||
static void SPECIAL_DADD ();
|
||||
static void SPECIAL_DADDU ();
|
||||
static void SPECIAL_DSUB ();
|
||||
static void SPECIAL_DSUBU ();
|
||||
static void SPECIAL_DSLL ();
|
||||
static void SPECIAL_DSRL ();
|
||||
static void SPECIAL_DSRA ();
|
||||
static void SPECIAL_DSLL32 ();
|
||||
static void SPECIAL_DSRL32 ();
|
||||
static void SPECIAL_DSRA32 ();
|
||||
|
||||
/************************** COP0 functions **************************/
|
||||
static void COP0_MF ( void );
|
||||
static void COP0_MT ( void );
|
||||
static void COP0_MF ();
|
||||
static void COP0_MT ();
|
||||
|
||||
/************************** COP0 CO functions ***********************/
|
||||
static void COP0_CO_TLBR ( void );
|
||||
static void COP0_CO_TLBWI ( void );
|
||||
static void COP0_CO_TLBWR ( void );
|
||||
static void COP0_CO_TLBP ( void );
|
||||
static void COP0_CO_ERET ( void );
|
||||
static void COP0_CO_TLBR ();
|
||||
static void COP0_CO_TLBWI ();
|
||||
static void COP0_CO_TLBWR ();
|
||||
static void COP0_CO_TLBP ();
|
||||
static void COP0_CO_ERET ();
|
||||
|
||||
/************************** COP1 functions **************************/
|
||||
static void COP1_MF ( void );
|
||||
static void COP1_DMF ( void );
|
||||
static void COP1_CF ( void );
|
||||
static void COP1_MT ( void );
|
||||
static void COP1_DMT ( void );
|
||||
static void COP1_CT ( void );
|
||||
static void COP1_MF ();
|
||||
static void COP1_DMF ();
|
||||
static void COP1_CF ();
|
||||
static void COP1_MT ();
|
||||
static void COP1_DMT ();
|
||||
static void COP1_CT ();
|
||||
|
||||
/************************** COP1: S functions ************************/
|
||||
static void COP1_S_ADD ( void );
|
||||
static void COP1_S_SUB ( void );
|
||||
static void COP1_S_MUL ( void );
|
||||
static void COP1_S_DIV ( void );
|
||||
static void COP1_S_ABS ( void );
|
||||
static void COP1_S_NEG ( void );
|
||||
static void COP1_S_SQRT ( void );
|
||||
static void COP1_S_MOV ( void );
|
||||
static void COP1_S_TRUNC_L ( void );
|
||||
static void COP1_S_CEIL_L ( void ); //added by Witten
|
||||
static void COP1_S_FLOOR_L ( void ); //added by Witten
|
||||
static void COP1_S_ROUND_W ( void );
|
||||
static void COP1_S_TRUNC_W ( void );
|
||||
static void COP1_S_CEIL_W ( void ); //added by Witten
|
||||
static void COP1_S_FLOOR_W ( void );
|
||||
static void COP1_S_CVT_D ( void );
|
||||
static void COP1_S_CVT_W ( void );
|
||||
static void COP1_S_CVT_L ( void );
|
||||
static void COP1_S_CMP ( void );
|
||||
static void COP1_S_ADD ();
|
||||
static void COP1_S_SUB ();
|
||||
static void COP1_S_MUL ();
|
||||
static void COP1_S_DIV ();
|
||||
static void COP1_S_ABS ();
|
||||
static void COP1_S_NEG ();
|
||||
static void COP1_S_SQRT ();
|
||||
static void COP1_S_MOV ();
|
||||
static void COP1_S_TRUNC_L ();
|
||||
static void COP1_S_CEIL_L (); //added by Witten
|
||||
static void COP1_S_FLOOR_L (); //added by Witten
|
||||
static void COP1_S_ROUND_W ();
|
||||
static void COP1_S_TRUNC_W ();
|
||||
static void COP1_S_CEIL_W (); //added by Witten
|
||||
static void COP1_S_FLOOR_W ();
|
||||
static void COP1_S_CVT_D ();
|
||||
static void COP1_S_CVT_W ();
|
||||
static void COP1_S_CVT_L ();
|
||||
static void COP1_S_CMP ();
|
||||
|
||||
/************************** COP1: D functions ************************/
|
||||
static void COP1_D_ADD ( void );
|
||||
static void COP1_D_SUB ( void );
|
||||
static void COP1_D_MUL ( void );
|
||||
static void COP1_D_DIV ( void );
|
||||
static void COP1_D_ABS ( void );
|
||||
static void COP1_D_NEG ( void );
|
||||
static void COP1_D_SQRT ( void );
|
||||
static void COP1_D_MOV ( void );
|
||||
static void COP1_D_TRUNC_L ( void ); //added by Witten
|
||||
static void COP1_D_CEIL_L ( void ); //added by Witten
|
||||
static void COP1_D_FLOOR_L ( void ); //added by Witten
|
||||
static void COP1_D_ROUND_W ( void );
|
||||
static void COP1_D_TRUNC_W ( void );
|
||||
static void COP1_D_CEIL_W ( void ); //added by Witten
|
||||
static void COP1_D_FLOOR_W ( void ); //added by Witten
|
||||
static void COP1_D_CVT_S ( void );
|
||||
static void COP1_D_CVT_W ( void );
|
||||
static void COP1_D_CVT_L ( void );
|
||||
static void COP1_D_CMP ( void );
|
||||
static void COP1_D_ADD ();
|
||||
static void COP1_D_SUB ();
|
||||
static void COP1_D_MUL ();
|
||||
static void COP1_D_DIV ();
|
||||
static void COP1_D_ABS ();
|
||||
static void COP1_D_NEG ();
|
||||
static void COP1_D_SQRT ();
|
||||
static void COP1_D_MOV ();
|
||||
static void COP1_D_TRUNC_L (); //added by Witten
|
||||
static void COP1_D_CEIL_L (); //added by Witten
|
||||
static void COP1_D_FLOOR_L (); //added by Witten
|
||||
static void COP1_D_ROUND_W ();
|
||||
static void COP1_D_TRUNC_W ();
|
||||
static void COP1_D_CEIL_W (); //added by Witten
|
||||
static void COP1_D_FLOOR_W (); //added by Witten
|
||||
static void COP1_D_CVT_S ();
|
||||
static void COP1_D_CVT_W ();
|
||||
static void COP1_D_CVT_L ();
|
||||
static void COP1_D_CMP ();
|
||||
|
||||
/************************** COP1: W functions ************************/
|
||||
static void COP1_W_CVT_S ( void );
|
||||
static void COP1_W_CVT_D ( void );
|
||||
static void COP1_W_CVT_S ();
|
||||
static void COP1_W_CVT_D ();
|
||||
|
||||
/************************** COP1: L functions ************************/
|
||||
static void COP1_L_CVT_S ( void );
|
||||
static void COP1_L_CVT_D ( void );
|
||||
static void COP1_L_CVT_S ();
|
||||
static void COP1_L_CVT_D ();
|
||||
|
||||
/************************** Other functions **************************/
|
||||
static void UnknownOpcode ( void );
|
||||
static void UnknownOpcode ();
|
||||
|
||||
|
||||
static void BeforeCallDirect ( CRegInfo & RegSet );
|
||||
static void AfterCallDirect ( CRegInfo & RegSet );
|
||||
static void EnterCodeBlock ( void );
|
||||
static void ExitCodeBlock ( void );
|
||||
static void CompileReadTLBMiss (DWORD VirtualAddress, x86Reg LookUpReg );
|
||||
static void CompileReadTLBMiss (x86Reg AddressReg, x86Reg LookUpReg );
|
||||
static void CompileWriteTLBMiss (DWORD VirtualAddress, x86Reg LookUpReg );
|
||||
static void CompileWriteTLBMiss (x86Reg AddressReg, x86Reg LookUpReg );
|
||||
static void UpdateSyncCPU (CRegInfo & RegSet, DWORD Cycles);
|
||||
static void UpdateCounters (CRegInfo & RegSet, bool CheckTimer, bool ClearValues = false );
|
||||
static void CompileSystemCheck ( DWORD TargetPC, const CRegInfo & RegSet );
|
||||
static void ChangeDefaultRoundingModel ( void );
|
||||
static void OverflowDelaySlot ( BOOL TestTimer );
|
||||
static void BeforeCallDirect(CRegInfo & RegSet);
|
||||
static void AfterCallDirect(CRegInfo & RegSet);
|
||||
static void EnterCodeBlock();
|
||||
static void ExitCodeBlock();
|
||||
static void CompileReadTLBMiss(DWORD VirtualAddress, x86Reg LookUpReg);
|
||||
static void CompileReadTLBMiss(x86Reg AddressReg, x86Reg LookUpReg);
|
||||
static void CompileWriteTLBMiss(DWORD VirtualAddress, x86Reg LookUpReg);
|
||||
static void CompileWriteTLBMiss(x86Reg AddressReg, x86Reg LookUpReg);
|
||||
static void UpdateSyncCPU(CRegInfo & RegSet, DWORD Cycles);
|
||||
static void UpdateCounters(CRegInfo & RegSet, bool CheckTimer, bool ClearValues = false);
|
||||
static void CompileSystemCheck(DWORD TargetPC, const CRegInfo & RegSet);
|
||||
static void ChangeDefaultRoundingModel();
|
||||
static void OverflowDelaySlot(BOOL TestTimer);
|
||||
|
||||
|
||||
|
||||
static STEP_TYPE m_NextInstruction;
|
||||
static DWORD m_CompilePC;
|
||||
static OPCODE m_Opcode;
|
||||
static CRegInfo m_RegWorkingSet;
|
||||
static CRegInfo m_RegWorkingSet;
|
||||
static DWORD m_BranchCompare;
|
||||
static CCodeSection * m_Section;
|
||||
|
||||
/********* Helper Functions *********/
|
||||
typedef CRegInfo::REG_STATE REG_STATE;
|
||||
|
||||
static inline REG_STATE GetMipsRegState ( int Reg ) { return m_RegWorkingSet.GetMipsRegState(Reg); }
|
||||
static inline unsigned __int64 GetMipsReg ( int Reg ) { return m_RegWorkingSet.GetMipsReg(Reg); }
|
||||
static inline __int64 GetMipsReg_S ( int Reg ) { return m_RegWorkingSet.GetMipsReg_S(Reg); }
|
||||
static inline DWORD GetMipsRegLo ( int Reg ) { return m_RegWorkingSet.GetMipsRegLo(Reg); }
|
||||
static inline long GetMipsRegLo_S ( int Reg ) { return m_RegWorkingSet.GetMipsRegLo_S(Reg); }
|
||||
static inline DWORD GetMipsRegHi ( int Reg ) { return m_RegWorkingSet.GetMipsRegHi(Reg); }
|
||||
static inline long GetMipsRegHi_S ( int Reg ) { return m_RegWorkingSet.GetMipsRegHi_S(Reg); }
|
||||
static inline CX86Ops::x86Reg GetMipsRegMapLo ( int Reg ) { return m_RegWorkingSet.GetMipsRegMapLo(Reg); }
|
||||
static inline CX86Ops::x86Reg GetMipsRegMapHi ( int Reg ) { return m_RegWorkingSet.GetMipsRegMapHi(Reg); }
|
||||
static REG_STATE GetMipsRegState ( int Reg ) { return m_RegWorkingSet.GetMipsRegState(Reg); }
|
||||
static unsigned __int64 GetMipsReg ( int Reg ) { return m_RegWorkingSet.GetMipsReg(Reg); }
|
||||
static __int64 GetMipsReg_S ( int Reg ) { return m_RegWorkingSet.GetMipsReg_S(Reg); }
|
||||
static DWORD GetMipsRegLo ( int Reg ) { return m_RegWorkingSet.GetMipsRegLo(Reg); }
|
||||
static long GetMipsRegLo_S ( int Reg ) { return m_RegWorkingSet.GetMipsRegLo_S(Reg); }
|
||||
static DWORD GetMipsRegHi ( int Reg ) { return m_RegWorkingSet.GetMipsRegHi(Reg); }
|
||||
static long GetMipsRegHi_S ( int Reg ) { return m_RegWorkingSet.GetMipsRegHi_S(Reg); }
|
||||
static CX86Ops::x86Reg GetMipsRegMapLo ( int Reg ) { return m_RegWorkingSet.GetMipsRegMapLo(Reg); }
|
||||
static CX86Ops::x86Reg GetMipsRegMapHi ( int Reg ) { return m_RegWorkingSet.GetMipsRegMapHi(Reg); }
|
||||
|
||||
static inline bool IsKnown ( int Reg ) { return m_RegWorkingSet.IsKnown(Reg); }
|
||||
static inline bool IsUnknown ( int Reg ) { return m_RegWorkingSet.IsUnknown(Reg); }
|
||||
static inline bool IsMapped ( int Reg ) { return m_RegWorkingSet.IsMapped(Reg); }
|
||||
static inline bool IsConst ( int Reg ) { return m_RegWorkingSet.IsConst(Reg); }
|
||||
static inline bool IsSigned ( int Reg ) { return m_RegWorkingSet.IsSigned(Reg); }
|
||||
static inline bool IsUnsigned ( int Reg ) { return m_RegWorkingSet.IsUnsigned(Reg); }
|
||||
static inline bool Is32Bit ( int Reg ) { return m_RegWorkingSet.Is32Bit(Reg); }
|
||||
static inline bool Is64Bit ( int Reg ) { return m_RegWorkingSet.Is64Bit(Reg); }
|
||||
static inline bool Is32BitMapped ( int Reg ) { return m_RegWorkingSet.Is32BitMapped(Reg); }
|
||||
static inline bool Is64BitMapped ( int Reg ) { return m_RegWorkingSet.Is64BitMapped(Reg); }
|
||||
static bool IsKnown ( int Reg ) { return m_RegWorkingSet.IsKnown(Reg); }
|
||||
static bool IsUnknown ( int Reg ) { return m_RegWorkingSet.IsUnknown(Reg); }
|
||||
static bool IsMapped ( int Reg ) { return m_RegWorkingSet.IsMapped(Reg); }
|
||||
static bool IsConst ( int Reg ) { return m_RegWorkingSet.IsConst(Reg); }
|
||||
static bool IsSigned ( int Reg ) { return m_RegWorkingSet.IsSigned(Reg); }
|
||||
static bool IsUnsigned ( int Reg ) { return m_RegWorkingSet.IsUnsigned(Reg); }
|
||||
static bool Is32Bit ( int Reg ) { return m_RegWorkingSet.Is32Bit(Reg); }
|
||||
static bool Is64Bit ( int Reg ) { return m_RegWorkingSet.Is64Bit(Reg); }
|
||||
static bool Is32BitMapped ( int Reg ) { return m_RegWorkingSet.Is32BitMapped(Reg); }
|
||||
static bool Is64BitMapped ( int Reg ) { return m_RegWorkingSet.Is64BitMapped(Reg); }
|
||||
|
||||
static inline void FixRoundModel ( CRegInfo::FPU_ROUND RoundMethod )
|
||||
static void FixRoundModel ( CRegInfo::FPU_ROUND RoundMethod )
|
||||
{
|
||||
m_RegWorkingSet.FixRoundModel(RoundMethod);
|
||||
}
|
||||
static inline void ChangeFPURegFormat ( int Reg, CRegInfo::FPU_STATE OldFormat, CRegInfo::FPU_STATE NewFormat, CRegInfo::FPU_ROUND RoundingModel )
|
||||
static void ChangeFPURegFormat ( int Reg, CRegInfo::FPU_STATE OldFormat, CRegInfo::FPU_STATE NewFormat, CRegInfo::FPU_ROUND RoundingModel )
|
||||
{
|
||||
m_RegWorkingSet.ChangeFPURegFormat(Reg,OldFormat,NewFormat,RoundingModel);
|
||||
}
|
||||
static inline void Load_FPR_ToTop ( int Reg, int RegToLoad, CRegInfo::FPU_STATE Format)
|
||||
static void Load_FPR_ToTop ( int Reg, int RegToLoad, CRegInfo::FPU_STATE Format)
|
||||
{
|
||||
m_RegWorkingSet.Load_FPR_ToTop(Reg,RegToLoad,Format);
|
||||
}
|
||||
static inline BOOL RegInStack ( int Reg, CRegInfo::FPU_STATE Format )
|
||||
static BOOL RegInStack ( int Reg, CRegInfo::FPU_STATE Format )
|
||||
{
|
||||
return m_RegWorkingSet.RegInStack(Reg,Format);
|
||||
}
|
||||
static inline x86FpuValues StackPosition ( int Reg )
|
||||
static x86FpuValues StackPosition ( int Reg )
|
||||
{
|
||||
return m_RegWorkingSet.StackPosition(Reg);
|
||||
}
|
||||
static inline void UnMap_AllFPRs ( void )
|
||||
static void UnMap_AllFPRs()
|
||||
{
|
||||
m_RegWorkingSet.UnMap_AllFPRs();
|
||||
m_RegWorkingSet.UnMap_AllFPRs();
|
||||
}
|
||||
static inline void UnMap_FPR ( DWORD Reg, bool WriteBackValue )
|
||||
static void UnMap_FPR ( DWORD Reg, bool WriteBackValue )
|
||||
{
|
||||
m_RegWorkingSet.UnMap_FPR(Reg,WriteBackValue);
|
||||
}
|
||||
|
||||
static inline x86Reg FreeX86Reg ( void )
|
||||
static x86Reg FreeX86Reg()
|
||||
{
|
||||
return m_RegWorkingSet.FreeX86Reg();
|
||||
return m_RegWorkingSet.FreeX86Reg();
|
||||
}
|
||||
static inline x86Reg Free8BitX86Reg ( void )
|
||||
static x86Reg Free8BitX86Reg()
|
||||
{
|
||||
return m_RegWorkingSet.Free8BitX86Reg();
|
||||
}
|
||||
static inline void Map_GPR_32bit ( int Reg, bool SignValue, int MipsRegToLoad )
|
||||
static void Map_GPR_32bit ( int Reg, bool SignValue, int MipsRegToLoad )
|
||||
{
|
||||
m_RegWorkingSet.Map_GPR_32bit(Reg,SignValue,MipsRegToLoad);
|
||||
}
|
||||
static inline void Map_GPR_64bit ( int Reg, int MipsRegToLoad )
|
||||
static void Map_GPR_64bit ( int Reg, int MipsRegToLoad )
|
||||
{
|
||||
m_RegWorkingSet.Map_GPR_64bit(Reg,MipsRegToLoad);
|
||||
}
|
||||
static inline x86Reg Get_MemoryStack ( void )
|
||||
static x86Reg Get_MemoryStack()
|
||||
{
|
||||
return m_RegWorkingSet.Get_MemoryStack();
|
||||
}
|
||||
static inline x86Reg Map_MemoryStack ( x86Reg Reg, bool bMapRegister, bool LoadValue = true )
|
||||
static x86Reg Map_MemoryStack ( x86Reg Reg, bool bMapRegister, bool LoadValue = true )
|
||||
{
|
||||
return m_RegWorkingSet.Map_MemoryStack(Reg,bMapRegister,LoadValue);
|
||||
}
|
||||
static inline x86Reg Map_TempReg ( x86Reg Reg, int MipsReg, BOOL LoadHiWord )
|
||||
static x86Reg Map_TempReg ( x86Reg Reg, int MipsReg, BOOL LoadHiWord )
|
||||
{
|
||||
return m_RegWorkingSet.Map_TempReg(Reg,MipsReg,LoadHiWord);
|
||||
}
|
||||
static inline void ProtectGPR ( DWORD Reg )
|
||||
static void ProtectGPR ( DWORD Reg )
|
||||
{
|
||||
m_RegWorkingSet.ProtectGPR(Reg);
|
||||
}
|
||||
static inline void UnProtectGPR ( DWORD Reg )
|
||||
static void UnProtectGPR ( DWORD Reg )
|
||||
{
|
||||
m_RegWorkingSet.UnProtectGPR(Reg);
|
||||
}
|
||||
static inline void ResetX86Protection ( void )
|
||||
static void ResetX86Protection()
|
||||
{
|
||||
m_RegWorkingSet.ResetX86Protection();
|
||||
}
|
||||
static inline x86Reg UnMap_TempReg ( void )
|
||||
static x86Reg UnMap_TempReg()
|
||||
{
|
||||
return m_RegWorkingSet.UnMap_TempReg();
|
||||
}
|
||||
static inline void UnMap_GPR ( DWORD Reg, bool WriteBackValue )
|
||||
static void UnMap_GPR ( DWORD Reg, bool WriteBackValue )
|
||||
{
|
||||
m_RegWorkingSet.UnMap_GPR(Reg,WriteBackValue);
|
||||
}
|
||||
static inline bool UnMap_X86reg ( x86Reg Reg )
|
||||
static bool UnMap_X86reg ( x86Reg Reg )
|
||||
{
|
||||
return m_RegWorkingSet.UnMap_X86reg(Reg);
|
||||
}
|
||||
|
||||
public:
|
||||
static DWORD CompilePC ( void ) { return m_CompilePC; }
|
||||
static DWORD CompilePC() { return m_CompilePC; }
|
||||
};
|
||||
|
|
|
@ -14,7 +14,7 @@ unsigned int CRegInfo::m_fpuControl = 0;
|
|||
|
||||
char *Format_Name[] = {"Unknown","dword","qword","float","double"};
|
||||
|
||||
CRegInfo::CRegInfo ( void ) :
|
||||
CRegInfo::CRegInfo() :
|
||||
m_CycleCount(0),
|
||||
m_Stack_TopPos(0),
|
||||
m_Fpu_Used(false),
|
||||
|
@ -359,7 +359,7 @@ CRegInfo::x86FpuValues CRegInfo::StackPosition (int Reg)
|
|||
return x86_ST_Unknown;
|
||||
}
|
||||
|
||||
CX86Ops::x86Reg CRegInfo::FreeX86Reg ( void )
|
||||
CX86Ops::x86Reg CRegInfo::FreeX86Reg()
|
||||
{
|
||||
if (GetX86Mapped(x86_EDI) == NotMapped && !GetX86Protected(x86_EDI)) { return x86_EDI; }
|
||||
if (GetX86Mapped(x86_ESI) == NotMapped && !GetX86Protected(x86_ESI)) { return x86_ESI; }
|
||||
|
@ -418,7 +418,7 @@ CX86Ops::x86Reg CRegInfo::FreeX86Reg ( void )
|
|||
return x86_Unknown;
|
||||
}
|
||||
|
||||
CX86Ops::x86Reg CRegInfo::Free8BitX86Reg ( void )
|
||||
CX86Ops::x86Reg CRegInfo::Free8BitX86Reg()
|
||||
{
|
||||
|
||||
if (GetX86Mapped(x86_EBX) == NotMapped && !GetX86Protected(x86_EBX)) {return x86_EBX; }
|
||||
|
@ -463,7 +463,7 @@ CX86Ops::x86Reg CRegInfo::Free8BitX86Reg ( void )
|
|||
return x86_Unknown;
|
||||
}
|
||||
|
||||
CX86Ops::x86Reg CRegInfo::UnMap_8BitTempReg (void )
|
||||
CX86Ops::x86Reg CRegInfo::UnMap_8BitTempReg()
|
||||
{
|
||||
int count;
|
||||
|
||||
|
@ -480,7 +480,7 @@ CX86Ops::x86Reg CRegInfo::UnMap_8BitTempReg (void )
|
|||
return x86_Unknown;
|
||||
}
|
||||
|
||||
CRegInfo::x86Reg CRegInfo::Get_MemoryStack ( void ) const
|
||||
CRegInfo::x86Reg CRegInfo::Get_MemoryStack() const
|
||||
{
|
||||
for (int i = 0, n = sizeof(x86_Registers)/ sizeof(x86_Registers[0]); i < n; i++)
|
||||
{
|
||||
|
@ -868,7 +868,7 @@ void CRegInfo::UnProtectGPR(DWORD Reg) {
|
|||
SetX86Protected(GetMipsRegMapLo(Reg),false);
|
||||
}
|
||||
|
||||
void CRegInfo::ResetX86Protection (void)
|
||||
void CRegInfo::ResetX86Protection()
|
||||
{
|
||||
for (int count = 0; count < 10; count ++)
|
||||
{
|
||||
|
@ -893,7 +893,7 @@ BOOL CRegInfo::RegInStack( int Reg, FPU_STATE Format) {
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
void CRegInfo::UnMap_AllFPRs ( void )
|
||||
void CRegInfo::UnMap_AllFPRs()
|
||||
{
|
||||
for (;;) {
|
||||
int StackPos = StackTopPos();
|
||||
|
@ -1051,7 +1051,7 @@ void CRegInfo::UnMap_GPR (DWORD Reg, bool WriteBackValue)
|
|||
SetMipsRegState(Reg,STATE_UNKNOWN);
|
||||
}
|
||||
|
||||
CX86Ops::x86Reg CRegInfo::UnMap_TempReg ( void )
|
||||
CX86Ops::x86Reg CRegInfo::UnMap_TempReg()
|
||||
{
|
||||
CX86Ops::x86Reg Reg = x86_Unknown;
|
||||
|
||||
|
@ -1126,7 +1126,7 @@ bool CRegInfo::UnMap_X86reg ( CX86Ops::x86Reg Reg )
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
void CRegInfo::WriteBackRegisters ()
|
||||
void CRegInfo::WriteBackRegisters()
|
||||
{
|
||||
UnMap_AllFPRs();
|
||||
|
||||
|
|
|
@ -74,103 +74,103 @@ public:
|
|||
void ChangeFPURegFormat ( int Reg, FPU_STATE OldFormat, FPU_STATE NewFormat, FPU_ROUND RoundingModel );
|
||||
void Load_FPR_ToTop ( int Reg, int RegToLoad, FPU_STATE Format);
|
||||
BOOL RegInStack ( int Reg, FPU_STATE Format );
|
||||
void UnMap_AllFPRs ( void );
|
||||
void UnMap_AllFPRs ();
|
||||
void UnMap_FPR ( int Reg, int WriteBackValue );
|
||||
x86FpuValues StackPosition ( int Reg );
|
||||
x86FpuValues StackPosition( int Reg );
|
||||
|
||||
x86Reg FreeX86Reg ( void );
|
||||
x86Reg Free8BitX86Reg ( void );
|
||||
x86Reg FreeX86Reg ();
|
||||
x86Reg Free8BitX86Reg ();
|
||||
void Map_GPR_32bit ( int MipsReg, bool SignValue, int MipsRegToLoad );
|
||||
void Map_GPR_64bit ( int MipsReg, int MipsRegToLoad );
|
||||
x86Reg Get_MemoryStack ( void ) const;
|
||||
x86Reg Get_MemoryStack () const;
|
||||
x86Reg Map_MemoryStack ( x86Reg Reg, bool bMapRegister, bool LoadValue = true );
|
||||
x86Reg Map_TempReg ( x86Reg Reg, int MipsReg, BOOL LoadHiWord );
|
||||
void ProtectGPR ( DWORD Reg );
|
||||
void UnProtectGPR ( DWORD Reg );
|
||||
void ResetX86Protection ( void );
|
||||
x86Reg UnMap_TempReg ( void );
|
||||
void ResetX86Protection ();
|
||||
x86Reg UnMap_TempReg ();
|
||||
void UnMap_GPR ( DWORD Reg, bool WriteBackValue );
|
||||
bool UnMap_X86reg ( x86Reg Reg );
|
||||
void WriteBackRegisters ( void );
|
||||
void WriteBackRegisters ();
|
||||
|
||||
inline bool IsKnown(int Reg) const { return ((GetMipsRegState(Reg) & STATE_KNOWN_VALUE) != 0); }
|
||||
inline bool IsUnknown(int Reg) const { return ((GetMipsRegState(Reg) & STATE_KNOWN_VALUE) == 0); }
|
||||
inline bool IsModified(int Reg) const { return ((GetMipsRegState(Reg) & STATE_MODIFIED) != 0); }
|
||||
bool IsKnown(int Reg) const { return ((GetMipsRegState(Reg) & STATE_KNOWN_VALUE) != 0); }
|
||||
bool IsUnknown(int Reg) const { return ((GetMipsRegState(Reg) & STATE_KNOWN_VALUE) == 0); }
|
||||
bool IsModified(int Reg) const { return ((GetMipsRegState(Reg) & STATE_MODIFIED) != 0); }
|
||||
|
||||
inline bool IsMapped(int Reg) const { return ((GetMipsRegState(Reg) & (STATE_KNOWN_VALUE | STATE_X86_MAPPED)) == (STATE_KNOWN_VALUE | STATE_X86_MAPPED)); }
|
||||
inline bool IsConst(int Reg) const { return ((GetMipsRegState(Reg) & (STATE_KNOWN_VALUE | STATE_X86_MAPPED)) == STATE_KNOWN_VALUE); }
|
||||
bool IsMapped(int Reg) const { return ((GetMipsRegState(Reg) & (STATE_KNOWN_VALUE | STATE_X86_MAPPED)) == (STATE_KNOWN_VALUE | STATE_X86_MAPPED)); }
|
||||
bool IsConst(int Reg) const { return ((GetMipsRegState(Reg) & (STATE_KNOWN_VALUE | STATE_X86_MAPPED)) == STATE_KNOWN_VALUE); }
|
||||
|
||||
inline bool IsSigned(int Reg) const { return ((GetMipsRegState(Reg) & (STATE_KNOWN_VALUE | STATE_SIGN)) == (STATE_KNOWN_VALUE | STATE_SIGN)); }
|
||||
inline bool IsUnsigned(int Reg) const { return ((GetMipsRegState(Reg) & (STATE_KNOWN_VALUE | STATE_SIGN)) == STATE_KNOWN_VALUE); }
|
||||
bool IsSigned(int Reg) const { return ((GetMipsRegState(Reg) & (STATE_KNOWN_VALUE | STATE_SIGN)) == (STATE_KNOWN_VALUE | STATE_SIGN)); }
|
||||
bool IsUnsigned(int Reg) const { return ((GetMipsRegState(Reg) & (STATE_KNOWN_VALUE | STATE_SIGN)) == STATE_KNOWN_VALUE); }
|
||||
|
||||
inline bool Is32Bit(int Reg) const { return ((GetMipsRegState(Reg) & (STATE_KNOWN_VALUE | STATE_32BIT)) == (STATE_KNOWN_VALUE | STATE_32BIT)); }
|
||||
inline bool Is64Bit(int Reg) const { return ((GetMipsRegState(Reg) & (STATE_KNOWN_VALUE | STATE_32BIT)) == STATE_KNOWN_VALUE); }
|
||||
bool Is32Bit(int Reg) const { return ((GetMipsRegState(Reg) & (STATE_KNOWN_VALUE | STATE_32BIT)) == (STATE_KNOWN_VALUE | STATE_32BIT)); }
|
||||
bool Is64Bit(int Reg) const { return ((GetMipsRegState(Reg) & (STATE_KNOWN_VALUE | STATE_32BIT)) == STATE_KNOWN_VALUE); }
|
||||
|
||||
inline bool Is32BitMapped(int Reg) const { return ((GetMipsRegState(Reg) & (STATE_KNOWN_VALUE | STATE_32BIT | STATE_X86_MAPPED)) == (STATE_KNOWN_VALUE | STATE_32BIT | STATE_X86_MAPPED)); }
|
||||
inline bool Is64BitMapped(int Reg) const { return ((GetMipsRegState(Reg) & (STATE_KNOWN_VALUE | STATE_32BIT | STATE_X86_MAPPED)) == (STATE_KNOWN_VALUE | STATE_X86_MAPPED)); }
|
||||
bool Is32BitMapped(int Reg) const { return ((GetMipsRegState(Reg) & (STATE_KNOWN_VALUE | STATE_32BIT | STATE_X86_MAPPED)) == (STATE_KNOWN_VALUE | STATE_32BIT | STATE_X86_MAPPED)); }
|
||||
bool Is64BitMapped(int Reg) const { return ((GetMipsRegState(Reg) & (STATE_KNOWN_VALUE | STATE_32BIT | STATE_X86_MAPPED)) == (STATE_KNOWN_VALUE | STATE_X86_MAPPED)); }
|
||||
|
||||
inline REG_STATE GetMipsRegState ( int Reg ) const { return m_MIPS_RegState[Reg]; }
|
||||
inline unsigned __int64 GetMipsReg ( int Reg ) const { return m_MIPS_RegVal[Reg].UDW; }
|
||||
inline __int64 GetMipsReg_S ( int Reg ) const { return m_MIPS_RegVal[Reg].DW; }
|
||||
inline DWORD GetMipsRegLo ( int Reg ) const { return m_MIPS_RegVal[Reg].UW[0]; }
|
||||
inline long GetMipsRegLo_S ( int Reg ) const { return m_MIPS_RegVal[Reg].W[0]; }
|
||||
inline DWORD GetMipsRegHi ( int Reg ) const { return m_MIPS_RegVal[Reg].UW[1]; }
|
||||
inline long GetMipsRegHi_S ( int Reg ) const { return m_MIPS_RegVal[Reg].W[1]; }
|
||||
inline CX86Ops::x86Reg GetMipsRegMapLo ( int Reg ) const { return m_RegMapLo[Reg]; }
|
||||
inline CX86Ops::x86Reg GetMipsRegMapHi ( int Reg ) const { return m_RegMapHi[Reg]; }
|
||||
REG_STATE GetMipsRegState ( int Reg ) const { return m_MIPS_RegState[Reg]; }
|
||||
unsigned __int64 GetMipsReg ( int Reg ) const { return m_MIPS_RegVal[Reg].UDW; }
|
||||
__int64 GetMipsReg_S ( int Reg ) const { return m_MIPS_RegVal[Reg].DW; }
|
||||
DWORD GetMipsRegLo ( int Reg ) const { return m_MIPS_RegVal[Reg].UW[0]; }
|
||||
long GetMipsRegLo_S ( int Reg ) const { return m_MIPS_RegVal[Reg].W[0]; }
|
||||
DWORD GetMipsRegHi ( int Reg ) const { return m_MIPS_RegVal[Reg].UW[1]; }
|
||||
long GetMipsRegHi_S ( int Reg ) const { return m_MIPS_RegVal[Reg].W[1]; }
|
||||
CX86Ops::x86Reg GetMipsRegMapLo ( int Reg ) const { return m_RegMapLo[Reg]; }
|
||||
CX86Ops::x86Reg GetMipsRegMapHi ( int Reg ) const { return m_RegMapHi[Reg]; }
|
||||
|
||||
inline DWORD GetX86MapOrder ( x86Reg Reg ) const { return m_x86reg_MapOrder[Reg]; }
|
||||
inline bool GetX86Protected ( x86Reg Reg ) const { return m_x86reg_Protected[Reg]; }
|
||||
inline REG_MAPPED GetX86Mapped ( x86Reg Reg ) const { return m_x86reg_MappedTo[Reg]; }
|
||||
DWORD GetX86MapOrder ( x86Reg Reg ) const { return m_x86reg_MapOrder[Reg]; }
|
||||
bool GetX86Protected ( x86Reg Reg ) const { return m_x86reg_Protected[Reg]; }
|
||||
REG_MAPPED GetX86Mapped ( x86Reg Reg ) const { return m_x86reg_MappedTo[Reg]; }
|
||||
|
||||
inline DWORD GetBlockCycleCount ( void ) const { return m_CycleCount; }
|
||||
DWORD GetBlockCycleCount() const { return m_CycleCount; }
|
||||
|
||||
inline void SetMipsReg ( int Reg, unsigned __int64 Value ) { m_MIPS_RegVal[Reg].UDW = Value; }
|
||||
inline void SetMipsReg_S ( int Reg, __int64 Value) { m_MIPS_RegVal[Reg].DW = Value; }
|
||||
inline void SetMipsRegLo ( int Reg, DWORD Value ) { m_MIPS_RegVal[Reg].UW[0] = Value; }
|
||||
inline void SetMipsRegHi ( int Reg, DWORD Value ) { m_MIPS_RegVal[Reg].UW[1] = Value; }
|
||||
inline void SetMipsRegMapLo ( int GetMipsReg, x86Reg Reg ) { m_RegMapLo[GetMipsReg] = Reg; }
|
||||
inline void SetMipsRegMapHi ( int GetMipsReg, x86Reg Reg ) { m_RegMapHi[GetMipsReg] = Reg; }
|
||||
inline void SetMipsRegState ( int GetMipsReg, REG_STATE State ) { m_MIPS_RegState[GetMipsReg] = State; }
|
||||
void SetMipsReg ( int Reg, unsigned __int64 Value ) { m_MIPS_RegVal[Reg].UDW = Value; }
|
||||
void SetMipsReg_S ( int Reg, __int64 Value) { m_MIPS_RegVal[Reg].DW = Value; }
|
||||
void SetMipsRegLo ( int Reg, DWORD Value ) { m_MIPS_RegVal[Reg].UW[0] = Value; }
|
||||
void SetMipsRegHi ( int Reg, DWORD Value ) { m_MIPS_RegVal[Reg].UW[1] = Value; }
|
||||
void SetMipsRegMapLo ( int GetMipsReg, x86Reg Reg ) { m_RegMapLo[GetMipsReg] = Reg; }
|
||||
void SetMipsRegMapHi ( int GetMipsReg, x86Reg Reg ) { m_RegMapHi[GetMipsReg] = Reg; }
|
||||
void SetMipsRegState ( int GetMipsReg, REG_STATE State ) { m_MIPS_RegState[GetMipsReg] = State; }
|
||||
|
||||
inline void SetX86MapOrder ( x86Reg Reg, DWORD Order ) { m_x86reg_MapOrder[Reg] = Order; }
|
||||
inline void SetX86Protected ( x86Reg Reg, bool Protected ) { m_x86reg_Protected[Reg] = Protected; }
|
||||
inline void SetX86Mapped ( x86Reg Reg, REG_MAPPED Mapping ) { m_x86reg_MappedTo[Reg] = Mapping; }
|
||||
void SetX86MapOrder ( x86Reg Reg, DWORD Order ) { m_x86reg_MapOrder[Reg] = Order; }
|
||||
void SetX86Protected ( x86Reg Reg, bool Protected ) { m_x86reg_Protected[Reg] = Protected; }
|
||||
void SetX86Mapped ( x86Reg Reg, REG_MAPPED Mapping ) { m_x86reg_MappedTo[Reg] = Mapping; }
|
||||
|
||||
|
||||
inline void SetBlockCycleCount ( DWORD CyleCount ) { m_CycleCount = CyleCount; }
|
||||
void SetBlockCycleCount(DWORD CyleCount) { m_CycleCount = CyleCount; }
|
||||
|
||||
inline int & StackTopPos ( void ) { return m_Stack_TopPos; }
|
||||
inline int & FpuMappedTo( int Reg) { return x86fpu_MappedTo[Reg]; }
|
||||
inline FPU_STATE & FpuState(int Reg) { return x86fpu_State[Reg]; }
|
||||
inline FPU_ROUND & FpuRoundingModel(int Reg) { return x86fpu_RoundingModel[Reg]; }
|
||||
inline bool & FpuBeenUsed (void ) { return m_Fpu_Used; }
|
||||
int & StackTopPos() { return m_Stack_TopPos; }
|
||||
int & FpuMappedTo(int Reg) { return x86fpu_MappedTo[Reg]; }
|
||||
FPU_STATE & FpuState(int Reg) { return x86fpu_State[Reg]; }
|
||||
FPU_ROUND & FpuRoundingModel(int Reg) { return x86fpu_RoundingModel[Reg]; }
|
||||
bool & FpuBeenUsed() { return m_Fpu_Used; }
|
||||
|
||||
inline FPU_ROUND GetRoundingModel ( void ) const { return m_RoundingModel; }
|
||||
inline void SetRoundingModel ( FPU_ROUND RoundingModel ) { m_RoundingModel = RoundingModel; }
|
||||
FPU_ROUND GetRoundingModel() const { return m_RoundingModel; }
|
||||
void SetRoundingModel(FPU_ROUND RoundingModel) { m_RoundingModel = RoundingModel; }
|
||||
|
||||
private:
|
||||
const char * RoundingModelName ( FPU_ROUND RoundType );
|
||||
x86Reg UnMap_8BitTempReg ( void );
|
||||
const char * RoundingModelName(FPU_ROUND RoundType);
|
||||
x86Reg UnMap_8BitTempReg();
|
||||
|
||||
//r4k
|
||||
REG_STATE m_MIPS_RegState[32];
|
||||
MIPS_DWORD m_MIPS_RegVal[32];
|
||||
x86Reg m_RegMapHi[32];
|
||||
x86Reg m_RegMapLo[32];
|
||||
MIPS_DWORD m_MIPS_RegVal[32];
|
||||
x86Reg m_RegMapHi[32];
|
||||
x86Reg m_RegMapLo[32];
|
||||
|
||||
REG_MAPPED m_x86reg_MappedTo[10];
|
||||
DWORD m_x86reg_MapOrder[10];
|
||||
bool m_x86reg_Protected[10];
|
||||
REG_MAPPED m_x86reg_MappedTo[10];
|
||||
DWORD m_x86reg_MapOrder[10];
|
||||
bool m_x86reg_Protected[10];
|
||||
|
||||
DWORD m_CycleCount;
|
||||
DWORD m_CycleCount;
|
||||
|
||||
//FPU
|
||||
int m_Stack_TopPos;
|
||||
int x86fpu_MappedTo[8];
|
||||
FPU_STATE x86fpu_State[8];
|
||||
BOOL x86fpu_StateChanged[8];
|
||||
FPU_ROUND x86fpu_RoundingModel[8];
|
||||
int m_Stack_TopPos;
|
||||
int x86fpu_MappedTo[8];
|
||||
FPU_STATE x86fpu_State[8];
|
||||
BOOL x86fpu_StateChanged[8];
|
||||
FPU_ROUND x86fpu_RoundingModel[8];
|
||||
|
||||
bool m_Fpu_Used;
|
||||
FPU_ROUND m_RoundingModel;
|
||||
|
|
|
@ -103,7 +103,7 @@ void CCodeSection::UnlinkParent( CCodeSection * Parent, bool AllowDelete, bool C
|
|||
}
|
||||
}
|
||||
|
||||
CCodeSection::~CCodeSection ( void )
|
||||
CCodeSection::~CCodeSection()
|
||||
{
|
||||
while (ParentSection.size() > 0)
|
||||
{
|
||||
|
@ -132,7 +132,7 @@ CCodeSection::~CCodeSection ( void )
|
|||
}
|
||||
}
|
||||
|
||||
DWORD CCodeSection::GetNewTestValue(void)
|
||||
DWORD CCodeSection::GetNewTestValue()
|
||||
{
|
||||
static DWORD LastTest = 0;
|
||||
if (LastTest == 0xFFFFFFFF) { LastTest = 0; }
|
||||
|
@ -140,7 +140,7 @@ DWORD CCodeSection::GetNewTestValue(void)
|
|||
return LastTest;
|
||||
}
|
||||
|
||||
void CRegInfo::Initialize ( void )
|
||||
void CRegInfo::Initialize()
|
||||
{
|
||||
int count;
|
||||
|
||||
|
|
|
@ -168,7 +168,7 @@ void CX86Ops::BreakPointNotification (const wchar_t * const FileName, const int
|
|||
g_Notify->BreakPoint(FileName,LineNumber);
|
||||
}
|
||||
|
||||
void CX86Ops::X86HardBreakPoint (void)
|
||||
void CX86Ops::X86HardBreakPoint()
|
||||
{
|
||||
CPU_Message(" int 3");
|
||||
PUTDST8(m_RecompPos,0xCC);
|
||||
|
|
|
@ -76,7 +76,7 @@ protected:
|
|||
static void AndVariableToX86Reg ( void * Variable, const char * VariableName, x86Reg Reg );
|
||||
static void AndVariableDispToX86Reg ( void * Variable, const char * VariableName, x86Reg Reg, x86Reg AddrReg, Multipler Multiply);
|
||||
static void AndX86RegToX86Reg ( x86Reg Destination, x86Reg Source );
|
||||
static void X86HardBreakPoint ( void );
|
||||
static void X86HardBreakPoint ();
|
||||
static void X86BreakPoint ( const wchar_t * FileName, int LineNumber );
|
||||
static void Call_Direct ( void * FunctAddress, const char * FunctName );
|
||||
static void Call_Indirect ( void * FunctAddress, const char * FunctName );
|
||||
|
@ -84,7 +84,7 @@ protected:
|
|||
static void CompConstToX86reg ( x86Reg Reg, DWORD Const );
|
||||
static void CompConstToX86regPointer ( x86Reg Reg, DWORD Const );
|
||||
static void CompX86regToVariable ( x86Reg Reg, void * Variable, const char * VariableName );
|
||||
static void CompVariableToX86reg ( x86Reg Reg, void * Variable, const char * VariableName );
|
||||
static void CompVariableToX86reg ( x86Reg Reg, void * Variable, const char * VariableName );
|
||||
static void CompX86RegToX86Reg ( x86Reg Destination, x86Reg Source );
|
||||
static void DecX86reg ( x86Reg Reg );
|
||||
static void DivX86reg ( x86Reg reg );
|
||||
|
@ -181,13 +181,13 @@ protected:
|
|||
static void OrVariableToX86Reg ( void * Variable, const char * VariableName, x86Reg Reg );
|
||||
static void OrX86RegToVariable ( void * Variable, const char * VariableName, x86Reg Reg );
|
||||
static void OrX86RegToX86Reg ( x86Reg Destination, x86Reg Source );
|
||||
static void Push ( x86Reg reg );
|
||||
static void Pushad ( void );
|
||||
static void Push ( x86Reg reg );
|
||||
static void Pushad ();
|
||||
static void PushImm32 ( DWORD Value );
|
||||
static void PushImm32 ( const char * String, DWORD Value );
|
||||
static void Pop ( x86Reg reg );
|
||||
static void Popad ( void );
|
||||
static void Ret ( void );
|
||||
static void Pop ( x86Reg reg );
|
||||
static void Popad ();
|
||||
static void Ret ();
|
||||
static void Seta ( x86Reg reg );
|
||||
static void Setae ( x86Reg reg );
|
||||
static void SetaVariable ( void * Variable, const char * VariableName );
|
||||
|
@ -197,8 +197,8 @@ protected:
|
|||
static void SetgVariable ( void * Variable, const char * VariableName );
|
||||
static void Setl ( x86Reg reg );
|
||||
static void SetlVariable ( void * Variable, const char * VariableName );
|
||||
static void Setz ( x86Reg reg );
|
||||
static void Setnz ( x86Reg reg );
|
||||
static void Setz ( x86Reg reg );
|
||||
static void Setnz ( x86Reg reg );
|
||||
static void ShiftLeftDouble ( x86Reg Destination, x86Reg Source );
|
||||
static void ShiftLeftDoubleImmed ( x86Reg Destination, x86Reg Source, BYTE Immediate );
|
||||
static void ShiftLeftSign ( x86Reg reg );
|
||||
|
@ -224,38 +224,38 @@ protected:
|
|||
static void XorVariableToX86reg ( void * Variable, const char * VariableName, x86Reg reg );
|
||||
|
||||
|
||||
static void fpuAbs ( void );
|
||||
static void fpuAddDword ( void * Variable, const char * VariableName );
|
||||
static void fpuAbs ();
|
||||
static void fpuAddDword ( void * Variable, const char * VariableName );
|
||||
static void fpuAddDwordRegPointer ( x86Reg x86Pointer );
|
||||
static void fpuAddQword ( void * Variable, const char * VariableName );
|
||||
static void fpuAddQword ( void * Variable, const char * VariableName );
|
||||
static void fpuAddQwordRegPointer ( x86Reg X86Pointer );
|
||||
static void fpuAddReg ( x86FpuValues reg );
|
||||
static void fpuAddRegPop ( int * StackPos, x86FpuValues reg );
|
||||
static void fpuComDword ( void * Variable, const char * VariableName, BOOL Pop );
|
||||
static void fpuAddReg ( x86FpuValues reg );
|
||||
static void fpuAddRegPop ( int * StackPos, x86FpuValues reg );
|
||||
static void fpuComDword ( void * Variable, const char * VariableName, BOOL Pop );
|
||||
static void fpuComDwordRegPointer ( x86Reg X86Pointer, BOOL Pop );
|
||||
static void fpuComQword ( void * Variable, const char * VariableName, BOOL Pop );
|
||||
static void fpuComQword ( void * Variable, const char * VariableName, BOOL Pop );
|
||||
static void fpuComQwordRegPointer ( x86Reg X86Pointer, BOOL Pop );
|
||||
static void fpuComReg ( x86FpuValues reg, BOOL Pop );
|
||||
static void fpuDivDword ( void * Variable, const char * VariableName );
|
||||
static void fpuDivDword ( void * Variable, const char * VariableName );
|
||||
static void fpuDivDwordRegPointer ( x86Reg X86Pointer );
|
||||
static void fpuDivQword ( void * Variable, const char * VariableName );
|
||||
static void fpuDivQword ( void * Variable, const char * VariableName );
|
||||
static void fpuDivQwordRegPointer ( x86Reg X86Pointer );
|
||||
static void fpuDivReg ( x86FpuValues Reg );
|
||||
static void fpuDivRegPop ( x86FpuValues reg );
|
||||
static void fpuDivRegPop ( x86FpuValues reg );
|
||||
static void fpuExchange ( x86FpuValues Reg );
|
||||
static void fpuFree ( x86FpuValues Reg );
|
||||
static void fpuDecStack ( int * StackPos );
|
||||
static void fpuIncStack ( int * StackPos );
|
||||
static void fpuLoadControl ( void * Variable, const char * VariableName );
|
||||
static void fpuLoadDword ( int * StackPos, void * Variable, const char * VariableName );
|
||||
static void fpuLoadControl ( void * Variable, const char * VariableName );
|
||||
static void fpuLoadDword ( int * StackPos, void * Variable, const char * VariableName );
|
||||
static void fpuLoadDwordFromX86Reg ( int * StackPos, x86Reg reg );
|
||||
static void fpuLoadDwordFromN64Mem ( int * StackPos, x86Reg reg );
|
||||
static void fpuLoadInt32bFromN64Mem ( int * StackPos, x86Reg reg );
|
||||
static void fpuLoadIntegerDword ( int * StackPos, void * Variable, const char * VariableName );
|
||||
static void fpuLoadIntegerDword ( int * StackPos, void * Variable, const char * VariableName );
|
||||
static void fpuLoadIntegerDwordFromX86Reg ( int * StackPos,x86Reg Reg );
|
||||
static void fpuLoadIntegerQword ( int * StackPos, void * Variable, const char * VariableName );
|
||||
static void fpuLoadIntegerQword ( int * StackPos, void * Variable, const char * VariableName );
|
||||
static void fpuLoadIntegerQwordFromX86Reg ( int * StackPos,x86Reg Reg );
|
||||
static void fpuLoadQword ( int * StackPos, void * Variable, const char * VariableName );
|
||||
static void fpuLoadQword ( int * StackPos, void * Variable, const char * VariableName );
|
||||
static void fpuLoadQwordFromX86Reg ( int * StackPos, x86Reg Reg );
|
||||
static void fpuLoadQwordFromN64Mem ( int * StackPos, x86Reg reg );
|
||||
static void fpuLoadReg ( int * StackPos, x86FpuValues Reg );
|
||||
|
@ -265,28 +265,28 @@ protected:
|
|||
static void fpuMulQwordRegPointer ( x86Reg X86Pointer );
|
||||
static void fpuMulReg ( x86FpuValues reg );
|
||||
static void fpuMulRegPop ( x86FpuValues reg );
|
||||
static void fpuNeg ( void );
|
||||
static void fpuRound ( void );
|
||||
static void fpuSqrt ( void );
|
||||
static void fpuStoreControl ( void * Variable, const char * VariableName );
|
||||
static void fpuStoreDword ( int * StackPos, void * Variable, const char * VariableName, BOOL pop );
|
||||
static void fpuNeg ();
|
||||
static void fpuRound ();
|
||||
static void fpuSqrt ();
|
||||
static void fpuStoreControl ( void * Variable, const char * VariableName );
|
||||
static void fpuStoreDword ( int * StackPos, void * Variable, const char * VariableName, BOOL pop );
|
||||
static void fpuStoreDwordFromX86Reg ( int * StackPos,x86Reg Reg, BOOL pop );
|
||||
static void fpuStoreDwordToN64Mem ( int * StackPos, x86Reg reg, BOOL Pop );
|
||||
static void fpuStoreDwordToN64Mem ( int * StackPos, x86Reg reg, BOOL Pop );
|
||||
static void fpuStoreIntegerDword ( int * StackPos, void * Variable, const char * VariableName, BOOL pop );
|
||||
static void fpuStoreIntegerDwordFromX86Reg ( int * StackPos,x86Reg Reg, BOOL pop );
|
||||
static void fpuStoreIntegerQword ( int * StackPos, void * Variable, const char * VariableName, BOOL pop );
|
||||
static void fpuStoreIntegerQwordFromX86Reg ( int * StackPos, x86Reg Reg, BOOL pop );
|
||||
static void fpuStoreQword ( int * StackPos, void * Variable, const char * VariableName, BOOL pop );
|
||||
static void fpuStoreQword ( int * StackPos, void * Variable, const char * VariableName, BOOL pop );
|
||||
static void fpuStoreQwordFromX86Reg ( int * StackPos, x86Reg Reg, BOOL pop );
|
||||
static void fpuStoreStatus ( void );
|
||||
static void fpuSubDword ( void * Variable, const char * VariableName );
|
||||
static void fpuStoreStatus ();
|
||||
static void fpuSubDword ( void * Variable, const char * VariableName );
|
||||
static void fpuSubDwordRegPointer ( x86Reg X86Pointer );
|
||||
static void fpuSubDwordReverse ( void * Variable, const char * VariableName );
|
||||
static void fpuSubQword ( void * Variable, const char * VariableName );
|
||||
static void fpuSubQword ( void * Variable, const char * VariableName );
|
||||
static void fpuSubQwordRegPointer ( x86Reg X86Pointer );
|
||||
static void fpuSubQwordReverse ( void * Variable, const char * VariableName );
|
||||
static void fpuSubReg ( x86FpuValues reg );
|
||||
static void fpuSubRegPop ( x86FpuValues reg );
|
||||
static void fpuSubReg ( x86FpuValues reg );
|
||||
static void fpuSubRegPop ( x86FpuValues reg );
|
||||
|
||||
static BOOL Is8BitReg ( x86Reg Reg );
|
||||
static BYTE CalcMultiplyCode ( Multipler Multiply );
|
||||
|
|
|
@ -31,10 +31,10 @@ RomInformation::RomInformation (CN64Rom * RomInfo) :
|
|||
{
|
||||
}
|
||||
|
||||
RomInformation::~RomInformation(void) {
|
||||
if (m_DeleteRomInfo) {
|
||||
RomInformation::~RomInformation()
|
||||
{
|
||||
if (m_DeleteRomInfo)
|
||||
delete m_pRomInfo;
|
||||
}
|
||||
}
|
||||
|
||||
#include <windows.h>
|
||||
|
|
|
@ -19,9 +19,9 @@ class RomInformation
|
|||
friend DWORD CALLBACK RomInfoProc ( HWND, DWORD, DWORD, DWORD );
|
||||
|
||||
public:
|
||||
RomInformation(const char * RomFile );
|
||||
RomInformation(CN64Rom * RomInfo );
|
||||
~RomInformation(void);
|
||||
RomInformation(const char* RomFile);
|
||||
RomInformation(CN64Rom* RomInfo);
|
||||
~RomInformation();
|
||||
|
||||
void DisplayInformation (HWND hParent) const;
|
||||
void DisplayInformation(HWND hParent) const;
|
||||
};
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
#include "stdafx.h"
|
||||
#pragma comment(lib, "winmm.lib")
|
||||
|
||||
CSpeedLimitor::CSpeedLimitor(void)
|
||||
CSpeedLimitor::CSpeedLimitor()
|
||||
{
|
||||
m_Frames = 0;
|
||||
m_LastTime = 0;
|
||||
|
@ -26,19 +26,21 @@ CSpeedLimitor::CSpeedLimitor(void)
|
|||
}
|
||||
}
|
||||
|
||||
CSpeedLimitor::~CSpeedLimitor(void) {
|
||||
CSpeedLimitor::~CSpeedLimitor()
|
||||
{
|
||||
TIMECAPS Caps;
|
||||
timeGetDevCaps(&Caps, sizeof(Caps));
|
||||
timeEndPeriod(Caps.wPeriodMin);
|
||||
}
|
||||
|
||||
void CSpeedLimitor::SetHertz (DWORD Hertz ) {
|
||||
void CSpeedLimitor::SetHertz(DWORD Hertz)
|
||||
{
|
||||
m_Speed = Hertz;
|
||||
m_BaseSpeed = Hertz;
|
||||
FixSpeedRatio();
|
||||
}
|
||||
|
||||
void CSpeedLimitor::FixSpeedRatio ( void )
|
||||
void CSpeedLimitor::FixSpeedRatio()
|
||||
{
|
||||
m_Ratio = 1000.0f / static_cast<double>(m_Speed);
|
||||
m_Frames = 0;
|
||||
|
@ -73,37 +75,37 @@ bool CSpeedLimitor::Timer_Process (DWORD * FrameRate ) {
|
|||
}
|
||||
}
|
||||
|
||||
void CSpeedLimitor::IncreaseSpeed ( void )
|
||||
void CSpeedLimitor::IncreaseSpeed()
|
||||
{
|
||||
if (m_Speed >= 60)
|
||||
if (m_Speed >= 60)
|
||||
{
|
||||
m_Speed += 10;
|
||||
m_Speed += 10;
|
||||
}
|
||||
else if (m_Speed >= 15)
|
||||
else if (m_Speed >= 15)
|
||||
{
|
||||
m_Speed += 5;
|
||||
m_Speed += 5;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_Speed += 1;
|
||||
m_Speed += 1;
|
||||
}
|
||||
SpeedChanged(m_Speed);
|
||||
FixSpeedRatio();
|
||||
}
|
||||
|
||||
void CSpeedLimitor::DecreaseSpeed ( void )
|
||||
void CSpeedLimitor::DecreaseSpeed()
|
||||
{
|
||||
if (m_Speed > 60)
|
||||
if (m_Speed > 60)
|
||||
{
|
||||
m_Speed -= 10;
|
||||
m_Speed -= 10;
|
||||
}
|
||||
else if (m_Speed > 15)
|
||||
else if (m_Speed > 15)
|
||||
{
|
||||
m_Speed -= 5;
|
||||
m_Speed -= 5;
|
||||
}
|
||||
else if (m_Speed > 1)
|
||||
{
|
||||
m_Speed -= 1;
|
||||
m_Speed -= 1;
|
||||
}
|
||||
SpeedChanged(m_Speed);
|
||||
FixSpeedRatio();
|
||||
|
|
|
@ -14,20 +14,20 @@ class CSpeedLimitor :
|
|||
private CGameSettings
|
||||
{
|
||||
public:
|
||||
CSpeedLimitor ( void );
|
||||
~CSpeedLimitor ( void );
|
||||
CSpeedLimitor();
|
||||
~CSpeedLimitor();
|
||||
|
||||
void SetHertz ( const DWORD Hertz );
|
||||
bool Timer_Process ( DWORD * const FrameRate );
|
||||
void IncreaseSpeed ( void );
|
||||
void DecreaseSpeed ( void );
|
||||
void SetHertz(const DWORD Hertz);
|
||||
bool Timer_Process(DWORD* const FrameRate);
|
||||
void IncreaseSpeed();
|
||||
void DecreaseSpeed();
|
||||
|
||||
private:
|
||||
CSpeedLimitor(const CSpeedLimitor&); // Disable copy constructor
|
||||
CSpeedLimitor& operator=(const CSpeedLimitor&); // Disable assignment
|
||||
CSpeedLimitor(const CSpeedLimitor&); // Disable copy constructor
|
||||
CSpeedLimitor& operator=(const CSpeedLimitor&); // Disable assignment
|
||||
|
||||
void FixSpeedRatio ( void );
|
||||
void FixSpeedRatio();
|
||||
|
||||
DWORD m_Speed, m_BaseSpeed, m_Frames, m_LastTime;
|
||||
double m_Ratio;
|
||||
DWORD m_Speed, m_BaseSpeed, m_Frames, m_LastTime;
|
||||
double m_Ratio;
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue