RSP: Use bool instead of Boolean
This commit is contained in:
parent
2ce9eaa667
commit
02da0ccad1
|
@ -35,7 +35,7 @@ DWORD Mfc0Count, SemaphoreExit = 0;
|
|||
|
||||
void SetCPU(DWORD core)
|
||||
{
|
||||
WaitForSingleObjectEx(hMutex, 1000 * 100, FALSE);
|
||||
WaitForSingleObjectEx(hMutex, 1000 * 100, false);
|
||||
CPUCore = core;
|
||||
switch (core)
|
||||
{
|
||||
|
@ -169,7 +169,7 @@ DWORD RunRecompilerCPU(DWORD Cycles);
|
|||
|
||||
uint32_t DoRspCycles(uint32_t Cycles)
|
||||
{
|
||||
extern Boolean AudioHle, GraphicsHle;
|
||||
extern bool AudioHle, GraphicsHle;
|
||||
DWORD TaskType = *(DWORD *)(RSPInfo.DMEM + 0xFC0);
|
||||
|
||||
/* if (*RSPInfo.SP_STATUS_REG & SP_STATUS_SIG0)
|
||||
|
@ -215,7 +215,7 @@ uint32_t DoRspCycles(uint32_t Cycles)
|
|||
RSPInfo.ShowCFB();
|
||||
}
|
||||
|
||||
Compiler.bAudioUcode = (TaskType == 2) ? TRUE : FALSE;
|
||||
Compiler.bAudioUcode = (TaskType == 2) ? true : false;
|
||||
|
||||
/*
|
||||
*RSPInfo.SP_STATUS_REG |= (0x0203 );
|
||||
|
@ -232,7 +232,7 @@ uint32_t DoRspCycles(uint32_t Cycles)
|
|||
StartTimer((DWORD)Timer_RSP_Running);
|
||||
}
|
||||
|
||||
WaitForSingleObjectEx(hMutex, 1000 * 100, FALSE);
|
||||
WaitForSingleObjectEx(hMutex, 1000 * 100, false);
|
||||
|
||||
if (BreakOnStart)
|
||||
{
|
||||
|
|
|
@ -380,7 +380,7 @@ void BuildInterpreterCPU(void)
|
|||
DWORD RunInterpreterCPU(DWORD Cycles)
|
||||
{
|
||||
DWORD CycleCount;
|
||||
RSP_Running = TRUE;
|
||||
RSP_Running = true;
|
||||
Enable_RSP_Commands_Window();
|
||||
CycleCount = 0;
|
||||
|
||||
|
@ -414,15 +414,15 @@ DWORD RunInterpreterCPU(DWORD Cycles)
|
|||
|
||||
if (Stepping_Commands)
|
||||
{
|
||||
WaitingForStep = TRUE;
|
||||
WaitingForStep = true;
|
||||
SetRSPCommandViewto(*PrgCount);
|
||||
UpdateRSPRegistersScreen();
|
||||
while (WaitingForStep == TRUE)
|
||||
while (WaitingForStep == true)
|
||||
{
|
||||
Sleep(20);
|
||||
if (!Stepping_Commands)
|
||||
{
|
||||
WaitingForStep = FALSE;
|
||||
WaitingForStep = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -453,7 +453,7 @@ DWORD RunInterpreterCPU(DWORD Cycles)
|
|||
case SINGLE_STEP_DONE:
|
||||
*PrgCount = (*PrgCount + 4) & 0xFFC;
|
||||
*RSPInfo.SP_STATUS_REG |= SP_STATUS_HALT;
|
||||
RSP_Running = FALSE;
|
||||
RSP_Running = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
#endif
|
||||
|
||||
extern UWORD32 Recp, RecpResult, SQroot, SQrootResult;
|
||||
extern Boolean AudioHle, GraphicsHle;
|
||||
extern bool AudioHle, GraphicsHle;
|
||||
|
||||
// Opcode functions
|
||||
|
||||
|
@ -244,7 +244,7 @@ void RSP_Special_JALR(void)
|
|||
|
||||
void RSP_Special_BREAK(void)
|
||||
{
|
||||
RSP_Running = FALSE;
|
||||
RSP_Running = false;
|
||||
*RSPInfo.SP_STATUS_REG |= (SP_STATUS_HALT | SP_STATUS_BROKE);
|
||||
if ((*RSPInfo.SP_STATUS_REG & SP_STATUS_INTR_BREAK) != 0)
|
||||
{
|
||||
|
@ -348,7 +348,7 @@ void RSP_Cop0_MF(void)
|
|||
RSP_GPR[RSPOpC.rt].UW = *RSPInfo.SP_STATUS_REG;
|
||||
if (Mfc0Count != 0 && RSP_MfStatusCount > Mfc0Count)
|
||||
{
|
||||
RSP_Running = FALSE;
|
||||
RSP_Running = false;
|
||||
}
|
||||
break;
|
||||
case 5: RSP_GPR[RSPOpC.rt].UW = *RSPInfo.SP_DMA_FULL_REG; break;
|
||||
|
@ -362,7 +362,7 @@ void RSP_Cop0_MF(void)
|
|||
{
|
||||
RSP_GPR[RSPOpC.rt].W = *RSPInfo.SP_SEMAPHORE_REG;
|
||||
*RSPInfo.SP_SEMAPHORE_REG = 1;
|
||||
RSP_Running = FALSE;
|
||||
RSP_Running = false;
|
||||
}
|
||||
break;
|
||||
case 8: RSP_GPR[RSPOpC.rt].UW = *RSPInfo.DPC_START_REG; break;
|
||||
|
@ -414,7 +414,7 @@ void RSP_Cop0_MT(void)
|
|||
{
|
||||
*RSPInfo.MI_INTR_REG |= R4300i_SP_Intr;
|
||||
RSPInfo.CheckInterrupts();
|
||||
RSP_Running = FALSE;
|
||||
RSP_Running = false;
|
||||
}
|
||||
if ((RSP_GPR[RSPOpC.rt].W & SP_CLR_SSTEP) != 0)
|
||||
{
|
||||
|
@ -1824,8 +1824,6 @@ void RSP_Vector_VNXOR(void)
|
|||
|
||||
void RSP_Vector_VRCP(void)
|
||||
{
|
||||
int count, neg;
|
||||
|
||||
RecpResult.W = RSP_Vect[RSPOpC.rt].HW[EleSpec[RSPOpC.rs].B[(RSPOpC.rd & 0x7)]];
|
||||
if (RecpResult.UW == 0)
|
||||
{
|
||||
|
@ -1833,16 +1831,12 @@ void RSP_Vector_VRCP(void)
|
|||
}
|
||||
else
|
||||
{
|
||||
if (RecpResult.W < 0)
|
||||
bool neg = RecpResult.W < 0;
|
||||
if (neg)
|
||||
{
|
||||
neg = TRUE;
|
||||
RecpResult.W = ~RecpResult.W + 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
neg = FALSE;
|
||||
}
|
||||
for (count = 15; count > 0; count--)
|
||||
for (int count = 15; count > 0; count--)
|
||||
{
|
||||
if ((RecpResult.W & (1 << count)))
|
||||
{
|
||||
|
@ -1856,7 +1850,7 @@ void RSP_Vector_VRCP(void)
|
|||
RecpResult.W = (long)((0x7FFFFFFF / (double)RecpResult.W));
|
||||
OldModel = _controlfp(OldModel, _MCW_RC);
|
||||
}
|
||||
for (count = 31; count > 0; count--)
|
||||
for (int count = 31; count > 0; count--)
|
||||
{
|
||||
if ((RecpResult.W & (1 << count)))
|
||||
{
|
||||
|
@ -1864,12 +1858,12 @@ void RSP_Vector_VRCP(void)
|
|||
count = 0;
|
||||
}
|
||||
}
|
||||
if (neg == TRUE)
|
||||
if (neg == true)
|
||||
{
|
||||
RecpResult.W = ~RecpResult.W;
|
||||
}
|
||||
}
|
||||
for (count = 0; count < 8; count++)
|
||||
for (int count = 0; count < 8; count++)
|
||||
{
|
||||
RSP_ACCUM[count].HW[1] = RSP_Vect[RSPOpC.rt].UHW[EleSpec[RSPOpC.rs].B[count]];
|
||||
}
|
||||
|
@ -1889,7 +1883,7 @@ void RSP_Vector_VRCPL(void)
|
|||
{
|
||||
if (RecpResult.W < 0)
|
||||
{
|
||||
neg = TRUE;
|
||||
neg = true;
|
||||
if (RecpResult.UHW[1] == 0xFFFF && RecpResult.HW[0] < 0)
|
||||
{
|
||||
RecpResult.W = ~RecpResult.W + 1;
|
||||
|
@ -1901,7 +1895,7 @@ void RSP_Vector_VRCPL(void)
|
|||
}
|
||||
else
|
||||
{
|
||||
neg = FALSE;
|
||||
neg = false;
|
||||
}
|
||||
for (count = 31; count > 0; count--)
|
||||
{
|
||||
|
@ -1925,7 +1919,7 @@ void RSP_Vector_VRCPL(void)
|
|||
count = 0;
|
||||
}
|
||||
}
|
||||
if (neg == TRUE)
|
||||
if (neg == true)
|
||||
{
|
||||
RecpResult.W = ~RecpResult.W;
|
||||
}
|
||||
|
@ -1978,12 +1972,12 @@ void RSP_Vector_VRSQ(void)
|
|||
{
|
||||
if (SQrootResult.W < 0)
|
||||
{
|
||||
neg = TRUE;
|
||||
neg = true;
|
||||
SQrootResult.W = ~SQrootResult.W + 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
neg = FALSE;
|
||||
neg = false;
|
||||
}
|
||||
for (count = 15; count > 0; count--)
|
||||
{
|
||||
|
@ -2007,7 +2001,7 @@ void RSP_Vector_VRSQ(void)
|
|||
count = 0;
|
||||
}
|
||||
}
|
||||
if (neg == TRUE)
|
||||
if (neg == true)
|
||||
{
|
||||
SQrootResult.W = ~SQrootResult.W;
|
||||
}
|
||||
|
@ -2036,7 +2030,7 @@ void RSP_Vector_VRSQL(void)
|
|||
{
|
||||
if (SQrootResult.W < 0)
|
||||
{
|
||||
neg = TRUE;
|
||||
neg = true;
|
||||
if (SQrootResult.UHW[1] == 0xFFFF && SQrootResult.HW[0] < 0)
|
||||
{
|
||||
SQrootResult.W = ~SQrootResult.W + 1;
|
||||
|
@ -2048,7 +2042,7 @@ void RSP_Vector_VRSQL(void)
|
|||
}
|
||||
else
|
||||
{
|
||||
neg = FALSE;
|
||||
neg = false;
|
||||
}
|
||||
for (count = 31; count > 0; count--)
|
||||
{
|
||||
|
@ -2071,7 +2065,7 @@ void RSP_Vector_VRSQL(void)
|
|||
count = 0;
|
||||
}
|
||||
}
|
||||
if (neg == TRUE)
|
||||
if (neg == true)
|
||||
{
|
||||
SQrootResult.W = ~SQrootResult.W;
|
||||
}
|
||||
|
|
|
@ -30,18 +30,18 @@
|
|||
void ClearAllx86Code(void);
|
||||
void ProcessMenuItem(int ID);
|
||||
#ifdef _WIN32
|
||||
Boolean CALLBACK CompilerDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
bool CALLBACK CompilerDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
HMENU hRSPMenu = NULL;
|
||||
#endif
|
||||
|
||||
Boolean GraphicsHle = TRUE, AudioHle, ConditionalMove;
|
||||
Boolean DebuggingEnabled = FALSE,
|
||||
bool GraphicsHle = true, AudioHle, ConditionalMove;
|
||||
bool DebuggingEnabled = false,
|
||||
Profiling,
|
||||
IndvidualBlock,
|
||||
ShowErrors,
|
||||
BreakOnStart = FALSE,
|
||||
LogRDP = FALSE,
|
||||
LogX86Code = FALSE;
|
||||
BreakOnStart = false,
|
||||
LogRDP = false,
|
||||
LogX86Code = false;
|
||||
uint32_t CPUCore = RecompilerCPU;
|
||||
|
||||
void * hMutex = NULL;
|
||||
|
@ -191,7 +191,7 @@ EXPORT void DllAbout(void * hParent)
|
|||
BOOL WINAPI DllMain(HINSTANCE hinst, DWORD /*fdwReason*/, LPVOID /*lpvReserved*/)
|
||||
{
|
||||
hinstDLL = hinst;
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
void FixMenuState(void)
|
||||
|
@ -233,8 +233,8 @@ EXPORT void GetDllInfo(PLUGIN_INFO * PluginInfo)
|
|||
#else
|
||||
sprintf(PluginInfo->Name, "RSP plugin %s", VER_FILE_VERSION_STR);
|
||||
#endif
|
||||
PluginInfo->Reserved2 = FALSE;
|
||||
PluginInfo->Reserved1 = TRUE;
|
||||
PluginInfo->Reserved2 = false;
|
||||
PluginInfo->Reserved1 = true;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -259,7 +259,7 @@ EXPORT void GetRspDebugInfo(RSPDEBUG_INFO * _DebugInfo)
|
|||
#endif
|
||||
_DebugInfo->ProcessMenuItem = ProcessMenuItem;
|
||||
|
||||
_DebugInfo->UseBPoints = TRUE;
|
||||
_DebugInfo->UseBPoints = true;
|
||||
sprintf(_DebugInfo->BPPanelName, " RSP ");
|
||||
_DebugInfo->Add_BPoint = Add_BPoint;
|
||||
_DebugInfo->CreateBPPanel = CreateBPPanel;
|
||||
|
@ -330,32 +330,32 @@ needs five arguments, not two. Also, GCC lacks SEH.
|
|||
|
||||
if (Intel_Features & 0x02000000)
|
||||
{
|
||||
Compiler.mmx2 = TRUE;
|
||||
Compiler.sse = TRUE;
|
||||
Compiler.mmx2 = true;
|
||||
Compiler.sse = true;
|
||||
}
|
||||
if (Intel_Features & 0x00800000)
|
||||
{
|
||||
Compiler.mmx = TRUE;
|
||||
Compiler.mmx = true;
|
||||
}
|
||||
if (AMD_Features & 0x40000000)
|
||||
{
|
||||
Compiler.mmx2 = TRUE;
|
||||
Compiler.mmx2 = true;
|
||||
}
|
||||
if (Intel_Features & 0x00008000)
|
||||
{
|
||||
ConditionalMove = TRUE;
|
||||
ConditionalMove = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
ConditionalMove = FALSE;
|
||||
ConditionalMove = false;
|
||||
}
|
||||
}
|
||||
|
||||
EXPORT void InitiateRSP(RSP_INFO Rsp_Info, uint32_t * CycleCount)
|
||||
{
|
||||
RSPInfo = Rsp_Info;
|
||||
AudioHle = GetSystemSetting(Set_AudioHle);
|
||||
GraphicsHle = GetSystemSetting(Set_GraphicsHle);
|
||||
AudioHle = GetSystemSetting(Set_AudioHle) != 0;
|
||||
GraphicsHle = GetSystemSetting(Set_GraphicsHle) != 0;
|
||||
|
||||
*CycleCount = 0;
|
||||
AllocateMemory();
|
||||
|
@ -402,20 +402,20 @@ void ProcessMenuItem(int ID)
|
|||
{
|
||||
CheckMenuItem(hRSPMenu, ID_PROFILING_ON, MF_BYCOMMAND | MFS_UNCHECKED);
|
||||
CheckMenuItem(hRSPMenu, ID_PROFILING_OFF, MF_BYCOMMAND | MFS_CHECKED);
|
||||
SetSetting(Set_Profiling, FALSE);
|
||||
SetSetting(Set_Profiling, false);
|
||||
if (DebuggingEnabled)
|
||||
{
|
||||
Profiling = FALSE;
|
||||
Profiling = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
CheckMenuItem(hRSPMenu, ID_PROFILING_ON, MF_BYCOMMAND | MFS_CHECKED);
|
||||
CheckMenuItem(hRSPMenu, ID_PROFILING_OFF, MF_BYCOMMAND | MFS_UNCHECKED);
|
||||
SetSetting(Set_Profiling, TRUE);
|
||||
SetSetting(Set_Profiling, true);
|
||||
if (DebuggingEnabled)
|
||||
{
|
||||
Profiling = TRUE;
|
||||
Profiling = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -429,19 +429,19 @@ void ProcessMenuItem(int ID)
|
|||
if (uState & MFS_CHECKED)
|
||||
{
|
||||
CheckMenuItem(hRSPMenu, ID_PROFILING_LOGINDIVIDUALBLOCKS, MF_BYCOMMAND | MFS_UNCHECKED);
|
||||
SetSetting(Set_IndvidualBlock, FALSE);
|
||||
SetSetting(Set_IndvidualBlock, false);
|
||||
if (DebuggingEnabled)
|
||||
{
|
||||
IndvidualBlock = FALSE;
|
||||
IndvidualBlock = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
CheckMenuItem(hRSPMenu, ID_PROFILING_LOGINDIVIDUALBLOCKS, MF_BYCOMMAND | MFS_CHECKED);
|
||||
SetSetting(Set_IndvidualBlock, TRUE);
|
||||
SetSetting(Set_IndvidualBlock, true);
|
||||
if (DebuggingEnabled)
|
||||
{
|
||||
IndvidualBlock = TRUE;
|
||||
IndvidualBlock = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -453,19 +453,19 @@ void ProcessMenuItem(int ID)
|
|||
if (uState & MFS_CHECKED)
|
||||
{
|
||||
CheckMenuItem(hRSPMenu, ID_SHOWCOMPILERERRORS, MF_BYCOMMAND | MFS_UNCHECKED);
|
||||
SetSetting(Set_ShowErrors, FALSE);
|
||||
SetSetting(Set_ShowErrors, false);
|
||||
if (DebuggingEnabled)
|
||||
{
|
||||
ShowErrors = FALSE;
|
||||
ShowErrors = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
CheckMenuItem(hRSPMenu, ID_SHOWCOMPILERERRORS, MF_BYCOMMAND | MFS_CHECKED);
|
||||
SetSetting(Set_ShowErrors, TRUE);
|
||||
SetSetting(Set_ShowErrors, true);
|
||||
if (DebuggingEnabled)
|
||||
{
|
||||
ShowErrors = TRUE;
|
||||
ShowErrors = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -480,19 +480,19 @@ void ProcessMenuItem(int ID)
|
|||
if (uState & MFS_CHECKED)
|
||||
{
|
||||
CheckMenuItem(hRSPMenu, ID_BREAKONSTARTOFTASK, MF_BYCOMMAND | MFS_UNCHECKED);
|
||||
SetSetting(Set_BreakOnStart, FALSE);
|
||||
SetSetting(Set_BreakOnStart, false);
|
||||
if (DebuggingEnabled)
|
||||
{
|
||||
BreakOnStart = FALSE;
|
||||
BreakOnStart = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
CheckMenuItem(hRSPMenu, ID_BREAKONSTARTOFTASK, MF_BYCOMMAND | MFS_CHECKED);
|
||||
SetSetting(Set_BreakOnStart, TRUE);
|
||||
SetSetting(Set_BreakOnStart, true);
|
||||
if (DebuggingEnabled)
|
||||
{
|
||||
BreakOnStart = TRUE;
|
||||
BreakOnStart = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -504,20 +504,20 @@ void ProcessMenuItem(int ID)
|
|||
if (uState & MFS_CHECKED)
|
||||
{
|
||||
CheckMenuItem(hRSPMenu, ID_LOGRDPCOMMANDS, MF_BYCOMMAND | MFS_UNCHECKED);
|
||||
SetSetting(Set_LogRDP, FALSE);
|
||||
SetSetting(Set_LogRDP, false);
|
||||
if (DebuggingEnabled)
|
||||
{
|
||||
LogRDP = FALSE;
|
||||
LogRDP = false;
|
||||
StopRDPLog();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
CheckMenuItem(hRSPMenu, ID_LOGRDPCOMMANDS, MF_BYCOMMAND | MFS_CHECKED);
|
||||
SetSetting(Set_LogRDP, TRUE);
|
||||
SetSetting(Set_LogRDP, true);
|
||||
if (DebuggingEnabled)
|
||||
{
|
||||
LogRDP = TRUE;
|
||||
LogRDP = true;
|
||||
StartRDPLog();
|
||||
}
|
||||
}
|
||||
|
@ -530,20 +530,20 @@ void ProcessMenuItem(int ID)
|
|||
if (uState & MFS_CHECKED)
|
||||
{
|
||||
CheckMenuItem(hRSPMenu, ID_SETTINGS_LOGX86CODE, MF_BYCOMMAND | MFS_UNCHECKED);
|
||||
SetSetting(Set_LogX86Code, FALSE);
|
||||
SetSetting(Set_LogX86Code, false);
|
||||
if (DebuggingEnabled)
|
||||
{
|
||||
LogX86Code = FALSE;
|
||||
LogX86Code = false;
|
||||
StopCPULog();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
CheckMenuItem(hRSPMenu, ID_SETTINGS_LOGX86CODE, MF_BYCOMMAND | MFS_CHECKED);
|
||||
SetSetting(Set_LogX86Code, TRUE);
|
||||
SetSetting(Set_LogX86Code, true);
|
||||
if (DebuggingEnabled)
|
||||
{
|
||||
LogX86Code = TRUE;
|
||||
LogX86Code = true;
|
||||
StartCPULog();
|
||||
}
|
||||
}
|
||||
|
@ -612,39 +612,39 @@ EXPORT void RomClosed(void)
|
|||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
static BOOL GetBooleanCheck(HWND hDlg, DWORD DialogID)
|
||||
static bool GetBooleanCheck(HWND hDlg, DWORD DialogID)
|
||||
{
|
||||
return (IsDlgButtonChecked(hDlg, DialogID) == BST_CHECKED) ? TRUE : FALSE;
|
||||
return (IsDlgButtonChecked(hDlg, DialogID) == BST_CHECKED) ? true : false;
|
||||
}
|
||||
|
||||
BOOL CALLBACK CompilerDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM /*lParam*/)
|
||||
bool CALLBACK CompilerDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM /*lParam*/)
|
||||
{
|
||||
char Buffer[256];
|
||||
|
||||
switch (uMsg)
|
||||
{
|
||||
case WM_INITDIALOG:
|
||||
if (Compiler.bDest == TRUE)
|
||||
if (Compiler.bDest == true)
|
||||
CheckDlgButton(hDlg, IDC_COMPILER_DEST, BST_CHECKED);
|
||||
if (Compiler.mmx == TRUE)
|
||||
if (Compiler.mmx == true)
|
||||
CheckDlgButton(hDlg, IDC_CHECK_MMX, BST_CHECKED);
|
||||
if (Compiler.mmx2 == TRUE)
|
||||
if (Compiler.mmx2 == true)
|
||||
CheckDlgButton(hDlg, IDC_CHECK_MMX2, BST_CHECKED);
|
||||
if (Compiler.sse == TRUE)
|
||||
if (Compiler.sse == true)
|
||||
CheckDlgButton(hDlg, IDC_CHECK_SSE, BST_CHECKED);
|
||||
|
||||
if (Compiler.bAlignVector == TRUE)
|
||||
if (Compiler.bAlignVector == true)
|
||||
CheckDlgButton(hDlg, IDC_COMPILER_ALIGNVEC, BST_CHECKED);
|
||||
|
||||
if (Compiler.bSections == TRUE)
|
||||
if (Compiler.bSections == true)
|
||||
CheckDlgButton(hDlg, IDC_COMPILER_SECTIONS, BST_CHECKED);
|
||||
if (Compiler.bGPRConstants == TRUE)
|
||||
if (Compiler.bGPRConstants == true)
|
||||
CheckDlgButton(hDlg, IDC_COMPILER_GPRCONSTANTS, BST_CHECKED);
|
||||
if (Compiler.bReOrdering == TRUE)
|
||||
if (Compiler.bReOrdering == true)
|
||||
CheckDlgButton(hDlg, IDC_COMPILER_REORDER, BST_CHECKED);
|
||||
if (Compiler.bFlags == TRUE)
|
||||
if (Compiler.bFlags == true)
|
||||
CheckDlgButton(hDlg, IDC_COMPILER_FLAGS, BST_CHECKED);
|
||||
if (Compiler.bAccum == TRUE)
|
||||
if (Compiler.bAccum == true)
|
||||
CheckDlgButton(hDlg, IDC_COMPILER_ACCUM, BST_CHECKED);
|
||||
|
||||
SetTimer(hDlg, 1, 250, NULL);
|
||||
|
@ -681,18 +681,18 @@ BOOL CALLBACK CompilerDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM /*lPar
|
|||
SetSetting(Set_AlignVector, Compiler.bAlignVector);
|
||||
|
||||
KillTimer(hDlg, 1);
|
||||
EndDialog(hDlg, TRUE);
|
||||
EndDialog(hDlg, true);
|
||||
break;
|
||||
case IDCANCEL:
|
||||
KillTimer(hDlg, 1);
|
||||
EndDialog(hDlg, TRUE);
|
||||
EndDialog(hDlg, true);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
BOOL CALLBACK ConfigDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM /*lParam*/)
|
||||
|
@ -703,11 +703,11 @@ BOOL CALLBACK ConfigDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM /*lParam
|
|||
switch (uMsg)
|
||||
{
|
||||
case WM_INITDIALOG:
|
||||
if (AudioHle == TRUE)
|
||||
if (AudioHle == true)
|
||||
{
|
||||
CheckDlgButton(hDlg, IDC_AUDIOHLE, BST_CHECKED);
|
||||
}
|
||||
if (GraphicsHle == TRUE)
|
||||
if (GraphicsHle == true)
|
||||
{
|
||||
CheckDlgButton(hDlg, IDC_GRAPHICSHLE, BST_CHECKED);
|
||||
}
|
||||
|
@ -728,17 +728,17 @@ BOOL CALLBACK ConfigDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM /*lParam
|
|||
AudioHle = GetBooleanCheck(hDlg, IDC_AUDIOHLE);
|
||||
GraphicsHle = GetBooleanCheck(hDlg, IDC_GRAPHICSHLE);
|
||||
|
||||
EndDialog(hDlg, TRUE);
|
||||
EndDialog(hDlg, true);
|
||||
break;
|
||||
case IDCANCEL:
|
||||
EndDialog(hDlg, TRUE);
|
||||
EndDialog(hDlg, true);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -748,29 +748,29 @@ BOOL CALLBACK ConfigDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM /*lParam
|
|||
DialogBox(hinstDLL, "RSPCONFIG", GetForegroundWindow(), ConfigDlgProc);
|
||||
}*/
|
||||
|
||||
EXPORT void EnableDebugging(Boolean Enabled)
|
||||
EXPORT void EnableDebugging(int Enabled)
|
||||
{
|
||||
DebuggingEnabled = Enabled;
|
||||
DebuggingEnabled = Enabled != 0;
|
||||
if (DebuggingEnabled)
|
||||
{
|
||||
BreakOnStart = GetSetting(Set_BreakOnStart);
|
||||
CPUCore = GetSetting(Set_CPUCore);
|
||||
LogRDP = GetSetting(Set_LogRDP);
|
||||
LogX86Code = GetSetting(Set_LogX86Code);
|
||||
Profiling = GetSetting(Set_Profiling);
|
||||
IndvidualBlock = GetSetting(Set_IndvidualBlock);
|
||||
ShowErrors = GetSetting(Set_ShowErrors);
|
||||
BreakOnStart = GetSetting(Set_BreakOnStart) != 0;
|
||||
CPUCore = GetSetting(Set_CPUCore) != 0;
|
||||
LogRDP = GetSetting(Set_LogRDP) != 0;
|
||||
LogX86Code = GetSetting(Set_LogX86Code) != 0;
|
||||
Profiling = GetSetting(Set_Profiling) != 0;
|
||||
IndvidualBlock = GetSetting(Set_IndvidualBlock) != 0;
|
||||
ShowErrors = GetSetting(Set_ShowErrors) != 0;
|
||||
|
||||
Compiler.bDest = GetSetting(Set_CheckDest);
|
||||
Compiler.bAccum = GetSetting(Set_Accum);
|
||||
Compiler.mmx = GetSetting(Set_Mmx);
|
||||
Compiler.mmx2 = GetSetting(Set_Mmx2);
|
||||
Compiler.sse = GetSetting(Set_Sse);
|
||||
Compiler.bSections = GetSetting(Set_Sections);
|
||||
Compiler.bReOrdering = GetSetting(Set_ReOrdering);
|
||||
Compiler.bGPRConstants = GetSetting(Set_GPRConstants);
|
||||
Compiler.bFlags = GetSetting(Set_Flags);
|
||||
Compiler.bAlignVector = GetSetting(Set_AlignVector);
|
||||
Compiler.bDest = GetSetting(Set_CheckDest) != 0;
|
||||
Compiler.bAccum = GetSetting(Set_Accum) != 0;
|
||||
Compiler.mmx = GetSetting(Set_Mmx) != 0;
|
||||
Compiler.mmx2 = GetSetting(Set_Mmx2) != 0;
|
||||
Compiler.sse = GetSetting(Set_Sse) != 0;
|
||||
Compiler.bSections = GetSetting(Set_Sections) != 0;
|
||||
Compiler.bReOrdering = GetSetting(Set_ReOrdering) != 0;
|
||||
Compiler.bGPRConstants = GetSetting(Set_GPRConstants) != 0;
|
||||
Compiler.bFlags = GetSetting(Set_Flags) != 0;
|
||||
Compiler.bAlignVector = GetSetting(Set_AlignVector) != 0;
|
||||
SetCPU(CPUCore);
|
||||
}
|
||||
#ifdef _WIN32
|
||||
|
@ -796,21 +796,21 @@ EXPORT void PluginLoaded(void)
|
|||
#else
|
||||
CPUCore = InterpreterCPU;
|
||||
#endif
|
||||
LogRDP = FALSE;
|
||||
LogX86Code = FALSE;
|
||||
Profiling = FALSE;
|
||||
IndvidualBlock = FALSE;
|
||||
ShowErrors = FALSE;
|
||||
LogRDP = false;
|
||||
LogX86Code = false;
|
||||
Profiling = false;
|
||||
IndvidualBlock = false;
|
||||
ShowErrors = false;
|
||||
|
||||
memset(&Compiler, 0, sizeof(Compiler));
|
||||
|
||||
Compiler.bDest = TRUE;
|
||||
Compiler.bAlignVector = FALSE;
|
||||
Compiler.bFlags = TRUE;
|
||||
Compiler.bReOrdering = TRUE;
|
||||
Compiler.bSections = TRUE;
|
||||
Compiler.bAccum = TRUE;
|
||||
Compiler.bGPRConstants = TRUE;
|
||||
Compiler.bDest = true;
|
||||
Compiler.bAlignVector = false;
|
||||
Compiler.bFlags = true;
|
||||
Compiler.bReOrdering = true;
|
||||
Compiler.bSections = true;
|
||||
Compiler.bAccum = true;
|
||||
Compiler.bGPRConstants = true;
|
||||
DetectCpuSpecs();
|
||||
|
||||
SetModuleName("RSP");
|
||||
|
@ -841,10 +841,10 @@ EXPORT void PluginLoaded(void)
|
|||
RegisterSetting(Set_Mfc0Count, Data_DWORD_Game, "Mfc0Count", NULL, 0x0, NULL);
|
||||
RegisterSetting(Set_SemaphoreExit, Data_DWORD_Game, "SemaphoreExit", NULL, 0x0, NULL);
|
||||
|
||||
AudioHle = Set_AudioHle != 0 ? GetSystemSetting(Set_AudioHle) : false;
|
||||
GraphicsHle = Set_GraphicsHle != 0 ? GetSystemSetting(Set_GraphicsHle) : true;
|
||||
AudioHle = Set_AudioHle != 0 ? GetSystemSetting(Set_AudioHle) != 0 : false;
|
||||
GraphicsHle = Set_GraphicsHle != 0 ? GetSystemSetting(Set_GraphicsHle) != 0 : true;
|
||||
#ifdef _WIN32
|
||||
hMutex = (HANDLE)CreateMutex(NULL, FALSE, NULL);
|
||||
hMutex = (HANDLE)CreateMutex(NULL, false, NULL);
|
||||
#endif
|
||||
SetCPU(CPUCore);
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@ RSPCOMMANDLINE RSPCommandLine[30];
|
|||
HWND RSPCommandshWnd, hList, hAddress, hFunctionlist, hGoButton, hBreakButton,
|
||||
hStepButton, hSkipButton, hBPButton, hR4300iRegisters, hR4300iDebugger, hRSPRegisters,
|
||||
hMemory, hScrlBar;
|
||||
Boolean InRSPCommandsWindow;
|
||||
bool InRSPCommandsWindow;
|
||||
char CommandName[100];
|
||||
DWORD Stepping_Commands, WaitingForStep;
|
||||
|
||||
|
@ -57,10 +57,10 @@ void Create_RSP_Commands_Window(int Child)
|
|||
|
||||
if (Child)
|
||||
{
|
||||
InRSPCommandsWindow = TRUE;
|
||||
InRSPCommandsWindow = true;
|
||||
DialogBoxA((HINSTANCE)hinstDLL, "RSPCOMMAND", NULL, (DLGPROC)RSP_Commands_Proc);
|
||||
|
||||
InRSPCommandsWindow = FALSE;
|
||||
InRSPCommandsWindow = false;
|
||||
memset(RSPCommandLine, 0, sizeof(RSPCommandLine));
|
||||
SetRSPCommandToRunning();
|
||||
}
|
||||
|
@ -68,9 +68,9 @@ void Create_RSP_Commands_Window(int Child)
|
|||
{
|
||||
if (!InRSPCommandsWindow)
|
||||
{
|
||||
Stepping_Commands = TRUE;
|
||||
Stepping_Commands = true;
|
||||
CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)Create_RSP_Commands_Window,
|
||||
(LPVOID)TRUE, 0, &ThreadID);
|
||||
(LPVOID)true, 0, &ThreadID);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -91,16 +91,16 @@ void Disable_RSP_Commands_Window(void)
|
|||
{
|
||||
return;
|
||||
}
|
||||
EnableWindow(hList, FALSE);
|
||||
EnableWindow(hAddress, FALSE);
|
||||
EnableWindow(hScrlBar, FALSE);
|
||||
EnableWindow(hGoButton, FALSE);
|
||||
EnableWindow(hStepButton, FALSE);
|
||||
EnableWindow(hSkipButton, FALSE);
|
||||
EnableWindow(hR4300iRegisters, FALSE);
|
||||
EnableWindow(hRSPRegisters, FALSE);
|
||||
EnableWindow(hR4300iDebugger, FALSE);
|
||||
EnableWindow(hMemory, FALSE);
|
||||
EnableWindow(hList, false);
|
||||
EnableWindow(hAddress, false);
|
||||
EnableWindow(hScrlBar, false);
|
||||
EnableWindow(hGoButton, false);
|
||||
EnableWindow(hStepButton, false);
|
||||
EnableWindow(hSkipButton, false);
|
||||
EnableWindow(hR4300iRegisters, false);
|
||||
EnableWindow(hRSPRegisters, false);
|
||||
EnableWindow(hR4300iDebugger, false);
|
||||
EnableWindow(hMemory, false);
|
||||
|
||||
si.cbSize = sizeof(si);
|
||||
si.fMask = SIF_RANGE | SIF_POS | SIF_PAGE;
|
||||
|
@ -108,14 +108,14 @@ void Disable_RSP_Commands_Window(void)
|
|||
si.nMax = 0;
|
||||
si.nPos = 1;
|
||||
si.nPage = 1;
|
||||
SetScrollInfo(hScrlBar, SB_CTL, &si, TRUE);
|
||||
SetScrollInfo(hScrlBar, SB_CTL, &si, true);
|
||||
}
|
||||
|
||||
int DisplayRSPCommand(DWORD location, int InsertPos)
|
||||
{
|
||||
uint32_t OpCode;
|
||||
DWORD LinesUsed = 1, status;
|
||||
Boolean Redraw = FALSE;
|
||||
bool Redraw = false;
|
||||
|
||||
RSP_LW_IMEM(location, &OpCode);
|
||||
|
||||
|
@ -130,15 +130,15 @@ int DisplayRSPCommand(DWORD location, int InsertPos)
|
|||
}
|
||||
if (RSPCommandLine[InsertPos].opcode != OpCode)
|
||||
{
|
||||
Redraw = TRUE;
|
||||
Redraw = true;
|
||||
}
|
||||
if (RSPCommandLine[InsertPos].Location != location)
|
||||
{
|
||||
Redraw = TRUE;
|
||||
Redraw = true;
|
||||
}
|
||||
if (RSPCommandLine[InsertPos].status != status)
|
||||
{
|
||||
Redraw = TRUE;
|
||||
Redraw = true;
|
||||
}
|
||||
if (Redraw)
|
||||
{
|
||||
|
@ -320,19 +320,19 @@ void DrawRSPCommand(LPARAM lParam)
|
|||
|
||||
if (*PrgCount == RSPCommandLine[ditem->itemID].Location)
|
||||
{
|
||||
ResetColor = TRUE;
|
||||
ResetColor = true;
|
||||
hBrush = (HBRUSH)(COLOR_HIGHLIGHT + 1);
|
||||
oldColor = SetTextColor(ditem->hDC, RGB(255, 255, 255));
|
||||
}
|
||||
else
|
||||
{
|
||||
ResetColor = FALSE;
|
||||
ResetColor = false;
|
||||
hBrush = (HBRUSH)GetStockObject(WHITE_BRUSH);
|
||||
}
|
||||
|
||||
if (CheckForRSPBPoint(RSPCommandLine[ditem->itemID].Location))
|
||||
{
|
||||
ResetColor = TRUE;
|
||||
ResetColor = true;
|
||||
if (*PrgCount == RSPCommandLine[ditem->itemID].Location)
|
||||
{
|
||||
SetTextColor(ditem->hDC, RGB(255, 0, 0));
|
||||
|
@ -381,7 +381,7 @@ void DrawRSPCommand(LPARAM lParam)
|
|||
DT_SINGLELINE | DT_VCENTER);
|
||||
}
|
||||
|
||||
if (ResetColor == TRUE)
|
||||
if (ResetColor == true)
|
||||
{
|
||||
SetTextColor(ditem->hDC, oldColor);
|
||||
}
|
||||
|
@ -395,18 +395,18 @@ void Enable_RSP_Commands_Window(void)
|
|||
{
|
||||
return;
|
||||
}
|
||||
EnableWindow(hList, TRUE);
|
||||
EnableWindow(hAddress, TRUE);
|
||||
EnableWindow(hScrlBar, TRUE);
|
||||
EnableWindow(hGoButton, TRUE);
|
||||
EnableWindow(hStepButton, TRUE);
|
||||
EnableWindow(hSkipButton, FALSE);
|
||||
EnableWindow(hR4300iRegisters, TRUE);
|
||||
EnableWindow(hRSPRegisters, TRUE);
|
||||
EnableWindow(hR4300iDebugger, TRUE);
|
||||
EnableWindow(hMemory, TRUE);
|
||||
SendMessage(hBPButton, BM_SETSTYLE, BS_PUSHBUTTON, TRUE);
|
||||
SendMessage(hStepButton, BM_SETSTYLE, BS_DEFPUSHBUTTON, TRUE);
|
||||
EnableWindow(hList, true);
|
||||
EnableWindow(hAddress, true);
|
||||
EnableWindow(hScrlBar, true);
|
||||
EnableWindow(hGoButton, true);
|
||||
EnableWindow(hStepButton, true);
|
||||
EnableWindow(hSkipButton, false);
|
||||
EnableWindow(hR4300iRegisters, true);
|
||||
EnableWindow(hRSPRegisters, true);
|
||||
EnableWindow(hR4300iDebugger, true);
|
||||
EnableWindow(hMemory, true);
|
||||
SendMessage(hBPButton, BM_SETSTYLE, BS_PUSHBUTTON, true);
|
||||
SendMessage(hStepButton, BM_SETSTYLE, BS_DEFPUSHBUTTON, true);
|
||||
SendMessage(RSPCommandshWnd, DM_SETDEFID, IDC_STEP_BUTTON, 0);
|
||||
|
||||
if (Stepping_Commands)
|
||||
|
@ -417,7 +417,7 @@ void Enable_RSP_Commands_Window(void)
|
|||
si.nMax = (0x1000 >> 2) - 1;
|
||||
si.nPos = (*PrgCount >> 2);
|
||||
si.nPage = 30;
|
||||
SetScrollInfo(hScrlBar, SB_CTL, &si, TRUE);
|
||||
SetScrollInfo(hScrlBar, SB_CTL, &si, true);
|
||||
|
||||
SetRSPCommandViewto(*PrgCount);
|
||||
SetForegroundWindow(RSPCommandshWnd);
|
||||
|
@ -426,7 +426,7 @@ void Enable_RSP_Commands_Window(void)
|
|||
|
||||
void Enter_RSP_Commands_Window(void)
|
||||
{
|
||||
Create_RSP_Commands_Window(FALSE);
|
||||
Create_RSP_Commands_Window(false);
|
||||
}
|
||||
|
||||
void Paint_RSP_Commands(HWND hDlg)
|
||||
|
@ -501,7 +501,7 @@ void RefreshRSPCommands(void)
|
|||
char AsciiAddress[20];
|
||||
int count;
|
||||
|
||||
if (InRSPCommandsWindow == FALSE)
|
||||
if (InRSPCommandsWindow == false)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -540,7 +540,7 @@ LRESULT CALLBACK RSP_Commands_Proc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM l
|
|||
case WM_PAINT:
|
||||
Paint_RSP_Commands(hDlg);
|
||||
RedrawWindow(hScrlBar, NULL, NULL, RDW_INVALIDATE | RDW_ERASE);
|
||||
return TRUE;
|
||||
return true;
|
||||
case WM_COMMAND:
|
||||
switch (LOWORD(wParam))
|
||||
{
|
||||
|
@ -560,7 +560,7 @@ LRESULT CALLBACK RSP_Commands_Proc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM l
|
|||
}
|
||||
else
|
||||
{
|
||||
AddRSP_BPoint(Location, FALSE);
|
||||
AddRSP_BPoint(Location, false);
|
||||
}
|
||||
RefreshRSPCommands();
|
||||
}
|
||||
|
@ -579,11 +579,11 @@ LRESULT CALLBACK RSP_Commands_Proc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM l
|
|||
SetRSPCommandToStepping();
|
||||
break;
|
||||
case IDC_STEP_BUTTON:
|
||||
WaitingForStep = FALSE;
|
||||
WaitingForStep = false;
|
||||
break;
|
||||
/*case IDC_SKIP_BUTTON:
|
||||
SkipNextRSPOpCode = TRUE;
|
||||
WaitingFor_RSPStep = FALSE;
|
||||
SkipNextRSPOpCode = true;
|
||||
WaitingFor_RSPStep = false;
|
||||
break;*/
|
||||
case IDC_BP_BUTTON:
|
||||
if (DebugInfo.Enter_BPoint_Window != NULL)
|
||||
|
@ -635,7 +635,7 @@ LRESULT CALLBACK RSP_Commands_Proc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM l
|
|||
si.cbSize = sizeof(si);
|
||||
si.fMask = SIF_POS;
|
||||
si.nPos = (short int)HIWORD(wParam);
|
||||
SetScrollInfo(hScrlBar, SB_CTL, &si, TRUE);
|
||||
SetScrollInfo(hScrlBar, SB_CTL, &si, true);
|
||||
break;
|
||||
case SB_LINEDOWN:
|
||||
if (location < 0xF88)
|
||||
|
@ -645,7 +645,7 @@ LRESULT CALLBACK RSP_Commands_Proc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM l
|
|||
si.cbSize = sizeof(si);
|
||||
si.fMask = SIF_POS;
|
||||
si.nPos = ((location + 0x4) >> 2);
|
||||
SetScrollInfo(hScrlBar, SB_CTL, &si, TRUE);
|
||||
SetScrollInfo(hScrlBar, SB_CTL, &si, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -654,7 +654,7 @@ LRESULT CALLBACK RSP_Commands_Proc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM l
|
|||
si.cbSize = sizeof(si);
|
||||
si.fMask = SIF_POS;
|
||||
si.nPos = (0xFFC >> 2);
|
||||
SetScrollInfo(hScrlBar, SB_CTL, &si, TRUE);
|
||||
SetScrollInfo(hScrlBar, SB_CTL, &si, true);
|
||||
}
|
||||
break;
|
||||
case SB_LINEUP:
|
||||
|
@ -665,7 +665,7 @@ LRESULT CALLBACK RSP_Commands_Proc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM l
|
|||
si.cbSize = sizeof(si);
|
||||
si.fMask = SIF_POS;
|
||||
si.nPos = ((location - 0x4) >> 2);
|
||||
SetScrollInfo(hScrlBar, SB_CTL, &si, TRUE);
|
||||
SetScrollInfo(hScrlBar, SB_CTL, &si, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -674,7 +674,7 @@ LRESULT CALLBACK RSP_Commands_Proc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM l
|
|||
si.cbSize = sizeof(si);
|
||||
si.fMask = SIF_POS;
|
||||
si.nPos = 0;
|
||||
SetScrollInfo(hScrlBar, SB_CTL, &si, TRUE);
|
||||
SetScrollInfo(hScrlBar, SB_CTL, &si, true);
|
||||
}
|
||||
break;
|
||||
case SB_PAGEDOWN:
|
||||
|
@ -685,7 +685,7 @@ LRESULT CALLBACK RSP_Commands_Proc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM l
|
|||
si.cbSize = sizeof(si);
|
||||
si.fMask = SIF_POS;
|
||||
si.nPos = ((location + 0x74) >> 2);
|
||||
SetScrollInfo(hScrlBar, SB_CTL, &si, TRUE);
|
||||
SetScrollInfo(hScrlBar, SB_CTL, &si, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -694,7 +694,7 @@ LRESULT CALLBACK RSP_Commands_Proc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM l
|
|||
si.cbSize = sizeof(si);
|
||||
si.fMask = SIF_POS;
|
||||
si.nPos = (0xF8F >> 2);
|
||||
SetScrollInfo(hScrlBar, SB_CTL, &si, TRUE);
|
||||
SetScrollInfo(hScrlBar, SB_CTL, &si, true);
|
||||
}
|
||||
break;
|
||||
case SB_PAGEUP:
|
||||
|
@ -705,7 +705,7 @@ LRESULT CALLBACK RSP_Commands_Proc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM l
|
|||
si.cbSize = sizeof(si);
|
||||
si.fMask = SIF_POS;
|
||||
si.nPos = ((location - 0x74) >> 2);
|
||||
SetScrollInfo(hScrlBar, SB_CTL, &si, TRUE);
|
||||
SetScrollInfo(hScrlBar, SB_CTL, &si, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -714,16 +714,16 @@ LRESULT CALLBACK RSP_Commands_Proc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM l
|
|||
si.cbSize = sizeof(si);
|
||||
si.fMask = SIF_POS;
|
||||
si.nPos = 0;
|
||||
SetScrollInfo(hScrlBar, SB_CTL, &si, TRUE);
|
||||
SetScrollInfo(hScrlBar, SB_CTL, &si, true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
void RSP_Commands_Setup(HWND hDlg)
|
||||
|
@ -878,36 +878,36 @@ void RSP_Commands_Setup(HWND hDlg)
|
|||
|
||||
void SetRSPCommandToRunning(void)
|
||||
{
|
||||
Stepping_Commands = FALSE;
|
||||
if (InRSPCommandsWindow == FALSE)
|
||||
Stepping_Commands = false;
|
||||
if (InRSPCommandsWindow == false)
|
||||
{
|
||||
return;
|
||||
}
|
||||
EnableWindow(hGoButton, FALSE);
|
||||
EnableWindow(hBreakButton, TRUE);
|
||||
EnableWindow(hStepButton, FALSE);
|
||||
EnableWindow(hSkipButton, FALSE);
|
||||
EnableWindow(hGoButton, false);
|
||||
EnableWindow(hBreakButton, true);
|
||||
EnableWindow(hStepButton, false);
|
||||
EnableWindow(hSkipButton, false);
|
||||
SendMessage(RSPCommandshWnd, DM_SETDEFID, IDC_BREAK_BUTTON, 0);
|
||||
SendMessage(hGoButton, BM_SETSTYLE, BS_PUSHBUTTON, TRUE);
|
||||
SendMessage(hBreakButton, BM_SETSTYLE, BS_DEFPUSHBUTTON, TRUE);
|
||||
SendMessage(hGoButton, BM_SETSTYLE, BS_PUSHBUTTON, true);
|
||||
SendMessage(hBreakButton, BM_SETSTYLE, BS_DEFPUSHBUTTON, true);
|
||||
SetFocus(hBreakButton);
|
||||
}
|
||||
|
||||
void SetRSPCommandToStepping(void)
|
||||
{
|
||||
if (InRSPCommandsWindow == FALSE)
|
||||
if (InRSPCommandsWindow == false)
|
||||
{
|
||||
return;
|
||||
}
|
||||
EnableWindow(hGoButton, TRUE);
|
||||
EnableWindow(hBreakButton, FALSE);
|
||||
EnableWindow(hStepButton, TRUE);
|
||||
EnableWindow(hSkipButton, TRUE);
|
||||
SendMessage(hBreakButton, BM_SETSTYLE, BS_PUSHBUTTON, TRUE);
|
||||
SendMessage(hStepButton, BM_SETSTYLE, BS_DEFPUSHBUTTON, TRUE);
|
||||
EnableWindow(hGoButton, true);
|
||||
EnableWindow(hBreakButton, false);
|
||||
EnableWindow(hStepButton, true);
|
||||
EnableWindow(hSkipButton, true);
|
||||
SendMessage(hBreakButton, BM_SETSTYLE, BS_PUSHBUTTON, true);
|
||||
SendMessage(hStepButton, BM_SETSTYLE, BS_DEFPUSHBUTTON, true);
|
||||
SendMessage(RSPCommandshWnd, DM_SETDEFID, IDC_STEP_BUTTON, 0);
|
||||
SetFocus(hStepButton);
|
||||
Stepping_Commands = TRUE;
|
||||
Stepping_Commands = true;
|
||||
}
|
||||
|
||||
void SetRSPCommandViewto(UINT NewLocation)
|
||||
|
@ -915,7 +915,7 @@ void SetRSPCommandViewto(UINT NewLocation)
|
|||
unsigned int location;
|
||||
char Value[20];
|
||||
|
||||
if (InRSPCommandsWindow == FALSE)
|
||||
if (InRSPCommandsWindow == false)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -9,4 +9,4 @@ void SetRSPCommandToStepping(void);
|
|||
void SetRSPCommandViewto(unsigned int NewLocation);
|
||||
|
||||
extern DWORD Stepping_Commands, WaitingForStep;
|
||||
extern Boolean InRSPCommandsWindow;
|
||||
extern bool InRSPCommandsWindow;
|
||||
|
|
|
@ -34,7 +34,7 @@ LRESULT CALLBACK RSP_Registers_Proc(HWND, UINT, WPARAM, LPARAM);
|
|||
|
||||
HWND RSP_Registers_hDlg, hTab, hStatic, hGPR[32], hCP0[16], hHIDDEN[12],
|
||||
hVECT1[16], hVECT2[16];
|
||||
int InRSPRegisterWindow = FALSE;
|
||||
int InRSPRegisterWindow = false;
|
||||
WNDPROC RefreshProc;
|
||||
|
||||
// RSP registers
|
||||
|
@ -53,16 +53,16 @@ void Create_RSP_Register_Window(int Child)
|
|||
DWORD ThreadID;
|
||||
if (Child)
|
||||
{
|
||||
InRSPRegisterWindow = TRUE;
|
||||
InRSPRegisterWindow = true;
|
||||
DialogBoxA((HINSTANCE)hinstDLL, "RSPREGISTERS", NULL, (DLGPROC)RSP_Registers_Proc);
|
||||
InRSPRegisterWindow = FALSE;
|
||||
InRSPRegisterWindow = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!InRSPRegisterWindow)
|
||||
{
|
||||
CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)Create_RSP_Register_Window,
|
||||
(LPVOID)TRUE, 0, &ThreadID);
|
||||
(LPVOID)true, 0, &ThreadID);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -77,7 +77,7 @@ void Create_RSP_Register_Window(int Child)
|
|||
|
||||
void Enter_RSP_Register_Window(void)
|
||||
{
|
||||
Create_RSP_Register_Window(FALSE);
|
||||
Create_RSP_Register_Window(false);
|
||||
}
|
||||
|
||||
void HideRSP_RegisterPanel(int Panel)
|
||||
|
@ -89,31 +89,31 @@ void HideRSP_RegisterPanel(int Panel)
|
|||
case GeneralPurpose:
|
||||
for (count = 0; count < 32; count++)
|
||||
{
|
||||
ShowWindow(hGPR[count], FALSE);
|
||||
ShowWindow(hGPR[count], false);
|
||||
}
|
||||
break;
|
||||
case ControlProcessor0:
|
||||
for (count = 0; count < 16; count++)
|
||||
{
|
||||
ShowWindow(hCP0[count], FALSE);
|
||||
ShowWindow(hCP0[count], false);
|
||||
}
|
||||
break;
|
||||
case HiddenRegisters:
|
||||
for (count = 0; count < 12; count++)
|
||||
{
|
||||
ShowWindow(hHIDDEN[count], FALSE);
|
||||
ShowWindow(hHIDDEN[count], false);
|
||||
}
|
||||
break;
|
||||
case Vector1:
|
||||
for (count = 0; count < 16; count++)
|
||||
{
|
||||
ShowWindow(hVECT1[count], FALSE);
|
||||
ShowWindow(hVECT1[count], false);
|
||||
}
|
||||
break;
|
||||
case Vector2:
|
||||
for (count = 0; count < 16; count++)
|
||||
{
|
||||
ShowWindow(hVECT2[count], FALSE);
|
||||
ShowWindow(hVECT2[count], false);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -413,18 +413,18 @@ LRESULT CALLBACK RSP_Registers_Proc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM
|
|||
break;
|
||||
case WM_SIZE:
|
||||
GetClientRect(hDlg, &rcDisp);
|
||||
TabCtrl_AdjustRect(hTab, FALSE, &rcDisp);
|
||||
TabCtrl_AdjustRect(hTab, false, &rcDisp);
|
||||
break;
|
||||
case WM_NOTIFY:
|
||||
switch (((NMHDR *)lParam)->code)
|
||||
{
|
||||
case TCN_SELCHANGE:
|
||||
InvalidateRect(hTab, &rcDisp, TRUE);
|
||||
InvalidateRect(hTab, &rcDisp, true);
|
||||
HideRSP_RegisterPanel(CurrentPanel);
|
||||
item.mask = TCIF_PARAM;
|
||||
TabCtrl_GetItem(hTab, TabCtrl_GetCurSel(hTab), &item);
|
||||
CurrentPanel = (int)item.lParam;
|
||||
InvalidateRect(hStatic, NULL, FALSE);
|
||||
InvalidateRect(hStatic, NULL, false);
|
||||
UpdateRSPRegistersScreen();
|
||||
ShowRSP_RegisterPanel(CurrentPanel);
|
||||
break;
|
||||
|
@ -439,9 +439,9 @@ LRESULT CALLBACK RSP_Registers_Proc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM
|
|||
break;
|
||||
}
|
||||
default:
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
void SetupRSP_HiddenPanel(HWND hDlg)
|
||||
|
@ -603,31 +603,31 @@ void ShowRSP_RegisterPanel(int Panel)
|
|||
case GeneralPurpose:
|
||||
for (count = 0; count < 32; count++)
|
||||
{
|
||||
ShowWindow(hGPR[count], TRUE);
|
||||
ShowWindow(hGPR[count], true);
|
||||
}
|
||||
break;
|
||||
case ControlProcessor0:
|
||||
for (count = 0; count < 16; count++)
|
||||
{
|
||||
ShowWindow(hCP0[count], TRUE);
|
||||
ShowWindow(hCP0[count], true);
|
||||
}
|
||||
break;
|
||||
case HiddenRegisters:
|
||||
for (count = 0; count < 12; count++)
|
||||
{
|
||||
ShowWindow(hHIDDEN[count], TRUE);
|
||||
ShowWindow(hHIDDEN[count], true);
|
||||
}
|
||||
break;
|
||||
case Vector1:
|
||||
for (count = 0; count < 16; count++)
|
||||
{
|
||||
ShowWindow(hVECT1[count], TRUE);
|
||||
ShowWindow(hVECT1[count], true);
|
||||
}
|
||||
break;
|
||||
case Vector2:
|
||||
for (count = 0; count < 16; count++)
|
||||
{
|
||||
ShowWindow(hVECT2[count], TRUE);
|
||||
ShowWindow(hVECT2[count], true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -27,7 +27,7 @@
|
|||
|
||||
uint32_t CompilePC, JumpTableSize, BlockID = 0;
|
||||
DWORD dwBuffer = MainBuffer;
|
||||
Boolean ChangedPC;
|
||||
bool ChangedPC;
|
||||
|
||||
RSP_BLOCK CurrentBlock;
|
||||
RSP_CODE RspCode;
|
||||
|
@ -397,7 +397,7 @@ void BuildRecompilerCPU(void)
|
|||
RSP_Sc2[31] = Compile_UnknownOpcode;
|
||||
|
||||
BlockID = 0;
|
||||
ChangedPC = FALSE;
|
||||
ChangedPC = false;
|
||||
#ifdef Log_x86Code
|
||||
Start_x86_Log();
|
||||
#endif
|
||||
|
@ -419,7 +419,7 @@ void ReOrderInstructions(DWORD StartPC, DWORD EndPC)
|
|||
|
||||
PreviousOp.Value = *(DWORD *)(RSPInfo.IMEM + StartPC);
|
||||
|
||||
if (TRUE == IsOpcodeBranch(StartPC, PreviousOp))
|
||||
if (IsOpcodeBranch(StartPC, PreviousOp))
|
||||
{
|
||||
// The sub block ends here anyway
|
||||
return;
|
||||
|
@ -464,7 +464,7 @@ void ReOrderInstructions(DWORD StartPC, DWORD EndPC)
|
|||
}
|
||||
CurrentOp.Value = *(DWORD *)(RSPInfo.IMEM + CurrentPC);
|
||||
|
||||
if (TRUE == CompareInstructions(CurrentPC, &PreviousOp, &CurrentOp))
|
||||
if (CompareInstructions(CurrentPC, &PreviousOp, &CurrentOp))
|
||||
{
|
||||
// Move current opcode up
|
||||
*(DWORD *)(RSPInfo.IMEM + CurrentPC - 4) = CurrentOp.Value;
|
||||
|
@ -549,7 +549,7 @@ void DetectGPRConstants(RSP_CODE * code)
|
|||
{
|
||||
DWORD Count, Constant = 0;
|
||||
|
||||
memset(&code->bIsRegConst, 0, sizeof(Boolean) * 0x20);
|
||||
memset(&code->bIsRegConst, 0, sizeof(bool) * 0x20);
|
||||
memset(&code->MipsRegConst, 0, sizeof(DWORD) * 0x20);
|
||||
|
||||
if (!Compiler.bGPRConstants)
|
||||
|
@ -559,16 +559,16 @@ void DetectGPRConstants(RSP_CODE * code)
|
|||
CPU_Message("***** Detecting constants *****");
|
||||
|
||||
// R0 is constant zero, R31 or RA is not constant
|
||||
code->bIsRegConst[0] = TRUE;
|
||||
code->bIsRegConst[0] = true;
|
||||
code->MipsRegConst[0] = 0;
|
||||
|
||||
// Do your global search for them
|
||||
for (Count = 1; Count < 31; Count++)
|
||||
{
|
||||
if (IsRegisterConstant(Count, &Constant) == TRUE)
|
||||
if (IsRegisterConstant(Count, &Constant))
|
||||
{
|
||||
CPU_Message("Global: %s is a constant of: %08X", GPR_Name(Count), Constant);
|
||||
code->bIsRegConst[Count] = TRUE;
|
||||
code->bIsRegConst[Count] = true;
|
||||
code->MipsRegConst[Count] = Constant;
|
||||
}
|
||||
}
|
||||
|
@ -702,7 +702,7 @@ void BuildBranchLabels(void)
|
|||
{
|
||||
RspOp.Value = *(DWORD *)(RSPInfo.IMEM + i);
|
||||
|
||||
if (TRUE == IsOpcodeBranch(i, RspOp))
|
||||
if (IsOpcodeBranch(i, RspOp))
|
||||
{
|
||||
if (RspCode.LabelCount >= (sizeof(RspCode.BranchLabels) / sizeof(RspCode.BranchLabels[0])) - 1)
|
||||
{
|
||||
|
@ -748,23 +748,23 @@ void BuildBranchLabels(void)
|
|||
#endif
|
||||
}
|
||||
|
||||
Boolean IsJumpLabel(DWORD PC)
|
||||
bool IsJumpLabel(DWORD PC)
|
||||
{
|
||||
DWORD Count;
|
||||
|
||||
if (!RspCode.LabelCount)
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
for (Count = 0; Count < RspCode.LabelCount; Count++)
|
||||
{
|
||||
if (PC == RspCode.BranchLabels[Count])
|
||||
{
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
void CompilerLinkBlocks(void)
|
||||
|
@ -810,7 +810,7 @@ void CompilerRSPBlock(void)
|
|||
CPU_Message("Start of block: %X", CurrentBlock.StartPC);
|
||||
CPU_Message("====== Recompiled code ======");
|
||||
|
||||
if (Compiler.bReOrdering == TRUE)
|
||||
if (Compiler.bReOrdering)
|
||||
{
|
||||
memcpy(IMEM_SAVE, RSPInfo.IMEM, 0x1000);
|
||||
ReOrderSubBlock(&CurrentBlock);
|
||||
|
@ -845,16 +845,16 @@ void CompilerRSPBlock(void)
|
|||
}
|
||||
}
|
||||
|
||||
if (Compiler.bSections == TRUE)
|
||||
if (Compiler.bSections)
|
||||
{
|
||||
if (TRUE == RSP_DoSections())
|
||||
if (RSP_DoSections())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef X86_RECOMP_VERBOSE
|
||||
if (FALSE == IsOpcodeNop(CompilePC))
|
||||
if (!IsOpcodeNop(CompilePC))
|
||||
{
|
||||
CPU_Message("X86 Address: %08X", RecompPos);
|
||||
}
|
||||
|
@ -930,7 +930,7 @@ void CompilerRSPBlock(void)
|
|||
} while (NextInstruction != FINISH_BLOCK && (CompilePC < 0x1000 || NextInstruction == DELAY_SLOT));
|
||||
CPU_Message("===== End of recompiled code =====");
|
||||
|
||||
if (Compiler.bReOrdering == TRUE)
|
||||
if (Compiler.bReOrdering)
|
||||
{
|
||||
memcpy(RSPInfo.IMEM, IMEM_SAVE, 0x1000);
|
||||
}
|
||||
|
@ -941,7 +941,7 @@ DWORD RunRecompilerCPU(DWORD Cycles)
|
|||
{
|
||||
BYTE * Block;
|
||||
|
||||
RSP_Running = TRUE;
|
||||
RSP_Running = true;
|
||||
SetJumpTable(JumpTableSize);
|
||||
|
||||
while (RSP_Running)
|
||||
|
@ -1008,11 +1008,11 @@ DWORD RunRecompilerCPU(DWORD Cycles)
|
|||
}
|
||||
if (RSP_NextInstruction == SINGLE_STEP)
|
||||
{
|
||||
RSP_Running = FALSE;
|
||||
RSP_Running = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (IsMmxEnabled == TRUE)
|
||||
if (IsMmxEnabled)
|
||||
{
|
||||
#if defined(_M_IX86) && defined(_MSC_VER)
|
||||
_asm emms
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#include "RspTypes.h"
|
||||
|
||||
extern uint32_t CompilePC, NextInstruction, JumpTableSize;
|
||||
extern Boolean ChangedPC;
|
||||
extern bool ChangedPC;
|
||||
|
||||
#define CompilerWarning \
|
||||
if (ShowErrors) DisplayError
|
||||
|
@ -12,17 +12,17 @@ extern Boolean ChangedPC;
|
|||
#define Low16BitAccum 4
|
||||
#define EntireAccum (Low16BitAccum | Middle16BitAccum | High16BitAccum)
|
||||
|
||||
Boolean WriteToAccum(int Location, int PC);
|
||||
Boolean WriteToVectorDest(DWORD DestReg, int PC);
|
||||
Boolean UseRspFlags(int PC);
|
||||
bool WriteToAccum(int Location, int PC);
|
||||
bool WriteToVectorDest(DWORD DestReg, int PC);
|
||||
bool UseRspFlags(int PC);
|
||||
|
||||
Boolean DelaySlotAffectBranch(DWORD PC);
|
||||
Boolean CompareInstructions(DWORD PC, RSPOpcode * Top, RSPOpcode * Bottom);
|
||||
Boolean IsOpcodeBranch(DWORD PC, RSPOpcode RspOp);
|
||||
Boolean IsOpcodeNop(DWORD PC);
|
||||
bool DelaySlotAffectBranch(DWORD PC);
|
||||
bool CompareInstructions(DWORD PC, RSPOpcode * Top, RSPOpcode * Bottom);
|
||||
bool IsOpcodeBranch(DWORD PC, RSPOpcode RspOp);
|
||||
bool IsOpcodeNop(DWORD PC);
|
||||
|
||||
Boolean IsNextInstructionMmx(DWORD PC);
|
||||
Boolean IsRegisterConstant(DWORD Reg, DWORD * Constant);
|
||||
bool IsNextInstructionMmx(DWORD PC);
|
||||
bool IsRegisterConstant(DWORD Reg, DWORD * Constant);
|
||||
|
||||
void RSP_Element2Mmx(int MmxReg);
|
||||
void RSP_MultiElement2Mmx(int MmxReg1, int MmxReg2);
|
||||
|
@ -35,7 +35,7 @@ void BuildRecompilerCPU(void);
|
|||
|
||||
void CompilerRSPBlock(void);
|
||||
void CompilerToggleBuffer(void);
|
||||
Boolean RSP_DoSections(void);
|
||||
bool RSP_DoSections(void);
|
||||
|
||||
typedef struct
|
||||
{
|
||||
|
@ -54,7 +54,7 @@ extern RSP_BLOCK CurrentBlock;
|
|||
|
||||
typedef struct
|
||||
{
|
||||
Boolean bIsRegConst[32]; // Boolean toggle for constant
|
||||
bool bIsRegConst[32]; // bool toggle for constant
|
||||
DWORD MipsRegConst[32]; // Value of register 32-bit
|
||||
DWORD BranchLabels[250];
|
||||
DWORD LabelCount;
|
||||
|
@ -69,15 +69,15 @@ extern RSP_CODE RspCode;
|
|||
|
||||
typedef struct
|
||||
{
|
||||
Boolean mmx, mmx2, sse; // CPU specs and compiling
|
||||
Boolean bFlags; // RSP flag analysis
|
||||
Boolean bReOrdering; // Instruction reordering
|
||||
Boolean bSections; // Microcode sections
|
||||
Boolean bDest; // Vector destination toggle
|
||||
Boolean bAccum; // Accumulator toggle
|
||||
Boolean bGPRConstants; // Analyze GPR constants
|
||||
Boolean bAlignVector; // Align known vector loads
|
||||
Boolean bAudioUcode; // Audio microcode analysis
|
||||
bool mmx, mmx2, sse; // CPU specs and compiling
|
||||
bool bFlags; // RSP flag analysis
|
||||
bool bReOrdering; // Instruction reordering
|
||||
bool bSections; // Microcode sections
|
||||
bool bDest; // Vector destination toggle
|
||||
bool bAccum; // Accumulator toggle
|
||||
bool bGPRConstants; // Analyze GPR constants
|
||||
bool bAlignVector; // Align known vector loads
|
||||
bool bAudioUcode; // Audio microcode analysis
|
||||
} RSP_COMPILER;
|
||||
|
||||
extern RSP_COMPILER Compiler;
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -829,7 +829,7 @@ void RSP_Sections_VMACF(RSPOpcode RspOp, DWORD AccumStyle)
|
|||
|
||||
static DWORD Section_000_VMADN; // Yeah I know, but leave it
|
||||
|
||||
Boolean Check_Section_000(void)
|
||||
bool Check_Section_000(void)
|
||||
{
|
||||
DWORD i;
|
||||
RSPOpcode op0, op1;
|
||||
|
@ -842,7 +842,7 @@ Boolean Check_Section_000(void)
|
|||
|
||||
if (!(op0.op == RSP_CP2 && (op0.rs & 0x10) != 0 && op0.funct == RSP_VECTOR_VMUDN))
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
Section_000_VMADN = 0;
|
||||
|
||||
|
@ -859,28 +859,28 @@ Boolean Check_Section_000(void)
|
|||
Section_000_VMADN++;
|
||||
}
|
||||
|
||||
if ((op1.rs & 0xF) >= 2 && (op1.rs & 0xF) <= 7 && IsMmx2Enabled == FALSE)
|
||||
if ((op1.rs & 0xF) >= 2 && (op1.rs & 0xF) <= 7 && IsMmx2Enabled == false)
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// We need at least 1 VMADN
|
||||
if (Section_000_VMADN == 0)
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
// TODO: check destination and flushes
|
||||
if (TRUE == WriteToAccum(7, CompilePC + 0x4 + (Section_000_VMADN * 4) - 0x4))
|
||||
if (true == WriteToAccum(7, CompilePC + 0x4 + (Section_000_VMADN * 4) - 0x4))
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
if (IsMmxEnabled == FALSE)
|
||||
if (!IsMmxEnabled)
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
void Compile_Section_000(void)
|
||||
|
@ -925,7 +925,7 @@ void Compile_Section_000(void)
|
|||
RSP_LW_IMEM(CompilePC, &vmadn.Value);
|
||||
CompilePC += 4;
|
||||
RSP_Sections_VMADN(vmadn, Low16BitAccum);
|
||||
if (WriteToVectorDest(vmadn.sa, CompilePC - 4) == TRUE)
|
||||
if (WriteToVectorDest(vmadn.sa, CompilePC - 4) == true)
|
||||
{
|
||||
sprintf(Reg, "RSP_Vect[%i].HW[0]", vmadn.sa);
|
||||
MmxMoveQwordRegToVariable(x86_MM0, &RSP_Vect[vmadn.sa].HW[0], Reg);
|
||||
|
@ -944,7 +944,7 @@ void Compile_Section_000(void)
|
|||
|
||||
static DWORD Section_001_VMACF;
|
||||
|
||||
Boolean Check_Section_001(void)
|
||||
bool Check_Section_001(void)
|
||||
{
|
||||
DWORD i;
|
||||
RSPOpcode op0, op1;
|
||||
|
@ -957,7 +957,7 @@ Boolean Check_Section_001(void)
|
|||
|
||||
if (!(op0.op == RSP_CP2 && (op0.rs & 0x10) != 0 && op0.funct == RSP_VECTOR_VMULF))
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
Section_001_VMACF = 0;
|
||||
|
||||
|
@ -974,30 +974,30 @@ Boolean Check_Section_001(void)
|
|||
Section_001_VMACF++;
|
||||
}
|
||||
|
||||
if ((op1.rs & 0xF) >= 2 && (op1.rs & 0xF) <= 7 && IsMmx2Enabled == FALSE)
|
||||
if ((op1.rs & 0xF) >= 2 && (op1.rs & 0xF) <= 7 && IsMmx2Enabled == false)
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// We need at least 1 VMACF
|
||||
if (Section_001_VMACF == 0)
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (IsMmxEnabled == FALSE)
|
||||
if (!IsMmxEnabled)
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
// Destinations are checked elsewhere, this is fine
|
||||
if (TRUE == WriteToAccum(7, CompilePC + 0x4 + (Section_001_VMACF * 4) - 0x4))
|
||||
if (true == WriteToAccum(7, CompilePC + 0x4 + (Section_001_VMACF * 4) - 0x4))
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
void Compile_Section_001(void)
|
||||
|
@ -1019,7 +1019,7 @@ void Compile_Section_001(void)
|
|||
|
||||
RSP_Sections_VMULF(vmulf, Middle16BitAccum);
|
||||
|
||||
if (WriteToVectorDest(vmulf.sa, CompilePC) == TRUE)
|
||||
if (WriteToVectorDest(vmulf.sa, CompilePC) == true)
|
||||
{
|
||||
sprintf(Reg, "RSP_Vect[%i].HW[0]", vmulf.sa);
|
||||
MmxMoveQwordRegToVariable(x86_MM0, &RSP_Vect[vmulf.sa].HW[0], Reg);
|
||||
|
@ -1034,7 +1034,7 @@ void Compile_Section_001(void)
|
|||
CompilePC += 4;
|
||||
|
||||
RSP_Sections_VMACF(vmacf, Middle16BitAccum);
|
||||
if (WriteToVectorDest(vmacf.sa, CompilePC - 4) == TRUE)
|
||||
if (WriteToVectorDest(vmacf.sa, CompilePC - 4) == true)
|
||||
{
|
||||
sprintf(Reg, "RSP_Vect[%i].HW[0]", vmacf.sa);
|
||||
MmxMoveQwordRegToVariable(x86_MM0, &RSP_Vect[vmacf.sa].HW[0], Reg);
|
||||
|
@ -1046,7 +1046,7 @@ void Compile_Section_001(void)
|
|||
MmxEmptyMultimediaState();
|
||||
}
|
||||
|
||||
Boolean Check_Section_002(void)
|
||||
bool Check_Section_002(void)
|
||||
{
|
||||
DWORD Count;
|
||||
RSPOpcode op[0x0C];
|
||||
|
@ -1072,48 +1072,48 @@ Boolean Check_Section_002(void)
|
|||
** 620 VSAW $v28 [8], $v7, $v28
|
||||
*/
|
||||
|
||||
if (IsMmxEnabled == FALSE)
|
||||
if (!IsMmxEnabled)
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!(op[0].op == RSP_CP2 && (op[0].rs & 0x10) != 0 && op[0].funct == RSP_VECTOR_VMUDH))
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
if ((op[0].rs & 0xF) < 8)
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
for (Count = 1; Count < 10; Count++)
|
||||
{
|
||||
if (!(op[Count].op == RSP_CP2 && (op[Count].rs & 0x10) != 0 && op[Count].funct == RSP_VECTOR_VMADH))
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
if ((op[Count].rs & 0xF) < 8)
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (!(op[10].op == RSP_CP2 && (op[10].rs & 0x10) != 0 && op[10].funct == RSP_VECTOR_VSAW)) return FALSE;
|
||||
if (!(op[11].op == RSP_CP2 && (op[11].rs & 0x10) != 0 && op[11].funct == RSP_VECTOR_VSAW)) return FALSE;
|
||||
if (!(op[10].op == RSP_CP2 && (op[10].rs & 0x10) != 0 && op[10].funct == RSP_VECTOR_VSAW)) return false;
|
||||
if (!(op[11].op == RSP_CP2 && (op[11].rs & 0x10) != 0 && op[11].funct == RSP_VECTOR_VSAW)) return false;
|
||||
|
||||
if ((op[10].rs & 0xF) != 9)
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
if ((op[11].rs & 0xF) != 8)
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (TRUE == WriteToAccum(7, CompilePC + 0x2C))
|
||||
return FALSE;
|
||||
if (true == WriteToAccum(7, CompilePC + 0x2C))
|
||||
return false;
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
void Compile_Section_002(void)
|
||||
|
@ -1168,7 +1168,7 @@ void Compile_Section_002(void)
|
|||
CompilePC += 12 * sizeof(RSPOpcode);
|
||||
}
|
||||
|
||||
Boolean Check_Section_003(void)
|
||||
bool Check_Section_003(void)
|
||||
{
|
||||
DWORD Count;
|
||||
RSPOpcode op[4];
|
||||
|
@ -1186,12 +1186,12 @@ Boolean Check_Section_003(void)
|
|||
|
||||
if (op[0].Value == 0x4BF7FDC5 && op[1].Value == 0x4BF6FDCF && op[2].Value == 0x4B92CD8D && op[3].Value == 0x4B1EFDCE)
|
||||
{
|
||||
if (TRUE == WriteToAccum(7, CompilePC + 0xc))
|
||||
return FALSE;
|
||||
if (true == WriteToAccum(7, CompilePC + 0xc))
|
||||
return false;
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
static void resampler_hle()
|
||||
|
@ -1249,27 +1249,27 @@ void Compile_Section_003(void)
|
|||
CompilePC += 4 * sizeof(RSPOpcode);
|
||||
}
|
||||
|
||||
Boolean RSP_DoSections(void)
|
||||
bool RSP_DoSections(void)
|
||||
{
|
||||
if (TRUE == Check_Section_000())
|
||||
if (true == Check_Section_000())
|
||||
{
|
||||
Compile_Section_000();
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
if (TRUE == Check_Section_001())
|
||||
if (true == Check_Section_001())
|
||||
{
|
||||
Compile_Section_001();
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
if (TRUE == Check_Section_002())
|
||||
if (true == Check_Section_002())
|
||||
{
|
||||
Compile_Section_002();
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
if (TRUE == Check_Section_003())
|
||||
if (true == Check_Section_003())
|
||||
{
|
||||
Compile_Section_003();
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -5,10 +5,10 @@
|
|||
#include <stdint.h>
|
||||
|
||||
// Profiling
|
||||
#define Default_ProfilingOn FALSE
|
||||
#define Default_IndvidualBlock FALSE
|
||||
#define Default_ShowErrors FALSE
|
||||
#define Default_AudioHle FALSE
|
||||
#define Default_ProfilingOn false
|
||||
#define Default_IndvidualBlock false
|
||||
#define Default_ShowErrors false
|
||||
#define Default_AudioHle false
|
||||
|
||||
uint32_t AsciiToHex(char * HexValue);
|
||||
void DisplayError(char * Message, ...);
|
||||
|
@ -16,7 +16,7 @@ void DisplayError(char * Message, ...);
|
|||
#define InterpreterCPU 0
|
||||
#define RecompilerCPU 1
|
||||
|
||||
extern int DebuggingEnabled, Profiling, IndvidualBlock, ShowErrors, BreakOnStart, LogRDP, LogX86Code;
|
||||
extern bool DebuggingEnabled, Profiling, IndvidualBlock, ShowErrors, BreakOnStart, LogRDP, LogX86Code;
|
||||
extern uint32_t CPUCore;
|
||||
extern DEBUG_INFO DebugInfo;
|
||||
extern RSP_INFO RSPInfo;
|
||||
|
|
|
@ -8,23 +8,6 @@
|
|||
|
||||
typedef void (*p_func)(void);
|
||||
|
||||
// TODO: Rewrite/remove/address?
|
||||
/*
|
||||
`BOOL` is Windows-specific so is going to tend to be avoided.
|
||||
`int` is the exact replacement.
|
||||
|
||||
However, saying "int" all the time for true/false is a little ambiguous.
|
||||
|
||||
Maybe in the future, with C++ (or C99) rewrites, we can switch to `bool`.
|
||||
Until then, a simple type definition will help emphasize true/false logic.
|
||||
*/
|
||||
|
||||
typedef int Boolean;
|
||||
#if !defined(FALSE) && !defined(TRUE)
|
||||
#define FALSE 0
|
||||
#define TRUE 1
|
||||
#endif
|
||||
|
||||
typedef union tagUWORD
|
||||
{
|
||||
int32_t W;
|
||||
|
|
|
@ -35,7 +35,7 @@ char * x86_HalfStrings[8] = {
|
|||
"ax", "bx", "cx", "dx",
|
||||
"si", "di", "bp", "sp"};
|
||||
|
||||
extern Boolean ConditionalMove;
|
||||
extern bool ConditionalMove;
|
||||
|
||||
#define x86Byte_Name(Reg) (x86_ByteStrings[(Reg)])
|
||||
#define x86Half_Name(Reg) (x86_HalfStrings[(Reg)])
|
||||
|
@ -515,7 +515,7 @@ void Call_Indirect(void * FunctAddress, char * FunctName)
|
|||
|
||||
void CondMoveEqual(int Destination, int Source)
|
||||
{
|
||||
if (ConditionalMove == FALSE)
|
||||
if (ConditionalMove == false)
|
||||
{
|
||||
BYTE * Jump;
|
||||
CPU_Message(" [*]cmove %s, %s", x86_Name(Destination), x86_Name(Source));
|
||||
|
@ -563,7 +563,7 @@ void CondMoveEqual(int Destination, int Source)
|
|||
|
||||
void CondMoveNotEqual(int Destination, int Source)
|
||||
{
|
||||
if (ConditionalMove == FALSE)
|
||||
if (ConditionalMove == false)
|
||||
{
|
||||
BYTE * Jump;
|
||||
CPU_Message(" [*]cmovne %s, %s", x86_Name(Destination), x86_Name(Source));
|
||||
|
@ -611,7 +611,7 @@ void CondMoveNotEqual(int Destination, int Source)
|
|||
|
||||
void CondMoveGreater(int Destination, int Source)
|
||||
{
|
||||
if (ConditionalMove == FALSE)
|
||||
if (ConditionalMove == false)
|
||||
{
|
||||
BYTE * Jump;
|
||||
CPU_Message(" [*]cmovg %s, %s", x86_Name(Destination), x86_Name(Source));
|
||||
|
@ -659,7 +659,7 @@ void CondMoveGreater(int Destination, int Source)
|
|||
|
||||
void CondMoveGreaterEqual(int Destination, int Source)
|
||||
{
|
||||
if (ConditionalMove == FALSE)
|
||||
if (ConditionalMove == false)
|
||||
{
|
||||
BYTE * Jump;
|
||||
CPU_Message(" [*]cmovge %s, %s", x86_Name(Destination), x86_Name(Source));
|
||||
|
@ -707,7 +707,7 @@ void CondMoveGreaterEqual(int Destination, int Source)
|
|||
|
||||
void CondMoveLess(int Destination, int Source)
|
||||
{
|
||||
if (ConditionalMove == FALSE)
|
||||
if (ConditionalMove == false)
|
||||
{
|
||||
BYTE * Jump;
|
||||
CPU_Message(" [*]cmovl %s, %s", x86_Name(Destination), x86_Name(Source));
|
||||
|
@ -755,7 +755,7 @@ void CondMoveLess(int Destination, int Source)
|
|||
|
||||
void CondMoveLessEqual(int Destination, int Source)
|
||||
{
|
||||
if (ConditionalMove == FALSE)
|
||||
if (ConditionalMove == false)
|
||||
{
|
||||
BYTE * Jump;
|
||||
CPU_Message(" [*]cmovle %s, %s", x86_Name(Destination), x86_Name(Source));
|
||||
|
|
|
@ -15,7 +15,7 @@ void Add_BPoint(void)
|
|||
char Title[10];
|
||||
|
||||
GetWindowTextA(hRSPLocation, Title, sizeof(Title));
|
||||
if (!AddRSP_BPoint(AsciiToHex(Title), TRUE))
|
||||
if (!AddRSP_BPoint(AsciiToHex(Title), true))
|
||||
{
|
||||
SendMessage(hRSPLocation, EM_SETSEL, (WPARAM)0, (LPARAM)-1);
|
||||
SetFocus(hRSPLocation);
|
||||
|
@ -29,7 +29,7 @@ int AddRSP_BPoint(DWORD Location, int Confirm)
|
|||
if (NoOfBpoints == MaxBPoints)
|
||||
{
|
||||
DisplayError("Max amount of breakpoints set");
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
for (count = 0; count < NoOfBpoints; count++)
|
||||
|
@ -37,7 +37,7 @@ int AddRSP_BPoint(DWORD Location, int Confirm)
|
|||
if (BPoint[count].Location == Location)
|
||||
{
|
||||
DisplayError("You already have this breakpoint");
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -51,7 +51,7 @@ int AddRSP_BPoint(DWORD Location, int Confirm)
|
|||
Response = MessageBoxA(BPoint_Win_hDlg, Message, "Breakpoint", MB_YESNO | MB_ICONINFORMATION);
|
||||
if (Response == IDNO)
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
BPoint[NoOfBpoints].Location = Location;
|
||||
|
@ -60,7 +60,7 @@ int AddRSP_BPoint(DWORD Location, int Confirm)
|
|||
{
|
||||
DebugInfo.UpdateBreakPoints();
|
||||
}
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
int CheckForRSPBPoint(DWORD Location)
|
||||
|
@ -71,10 +71,10 @@ int CheckForRSPBPoint(DWORD Location)
|
|||
{
|
||||
if (BPoint[count].Location == Location)
|
||||
{
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
void CreateBPPanel(void * hDlg, rectangle rcBox)
|
||||
|
@ -102,7 +102,7 @@ void CreateBPPanel(void * hDlg, rectangle rcBox)
|
|||
|
||||
void HideBPPanel(void)
|
||||
{
|
||||
ShowWindow(hRSPLocation, FALSE);
|
||||
ShowWindow(hRSPLocation, false);
|
||||
}
|
||||
|
||||
void PaintBPPanel(window_paint ps)
|
||||
|
@ -113,7 +113,7 @@ void PaintBPPanel(window_paint ps)
|
|||
|
||||
void ShowBPPanel(void)
|
||||
{
|
||||
ShowWindow(hRSPLocation, TRUE);
|
||||
ShowWindow(hRSPLocation, true);
|
||||
}
|
||||
|
||||
void RefreshBpoints(void * hList)
|
||||
|
|
|
@ -22,7 +22,7 @@ int AllocateMemory(void)
|
|||
if (RecompCode == NULL)
|
||||
{
|
||||
DisplayError("Not enough memory for RSP RecompCode!");
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -32,7 +32,7 @@ int AllocateMemory(void)
|
|||
if (RecompCodeSecondary == NULL)
|
||||
{
|
||||
DisplayError("Not enough memory for RSP RecompCode Secondary!");
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -42,14 +42,14 @@ int AllocateMemory(void)
|
|||
if (JumpTables == NULL)
|
||||
{
|
||||
DisplayError("Not enough memory for jump table!");
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
JumpTable = (void **)JumpTables;
|
||||
RecompPos = RecompCode;
|
||||
NoOfMaps = 0;
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
void FreeMemory(void)
|
||||
|
|
Loading…
Reference in New Issue