Global Variable: rename _NextTimer to g_NextTimer
This commit is contained in:
parent
0410fafd3b
commit
7f00d50dc6
|
@ -215,8 +215,8 @@ void CInterpreterCPU::InPermLoop (void) {
|
||||||
/* check RSP running */
|
/* check RSP running */
|
||||||
/* check RDP running */
|
/* check RDP running */
|
||||||
|
|
||||||
if (*_NextTimer > 0) {
|
if (*g_NextTimer > 0) {
|
||||||
*_NextTimer = 0 - m_CountPerOp;
|
*g_NextTimer = 0 - m_CountPerOp;
|
||||||
g_SystemTimer->UpdateTimers();
|
g_SystemTimer->UpdateTimers();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -230,7 +230,7 @@ void CInterpreterCPU::ExecuteCPU (void )
|
||||||
DWORD & JumpToLocation = R4300iOp::m_JumpToLocation;
|
DWORD & JumpToLocation = R4300iOp::m_JumpToLocation;
|
||||||
BOOL & TestTimer = R4300iOp::m_TestTimer;
|
BOOL & TestTimer = R4300iOp::m_TestTimer;
|
||||||
const BOOL & bDoSomething= g_SystemEvents->DoSomething();
|
const BOOL & bDoSomething= g_SystemEvents->DoSomething();
|
||||||
int & NextTimer = *_NextTimer;
|
int & NextTimer = *g_NextTimer;
|
||||||
|
|
||||||
__try
|
__try
|
||||||
{
|
{
|
||||||
|
@ -242,7 +242,7 @@ void CInterpreterCPU::ExecuteCPU (void )
|
||||||
{
|
{
|
||||||
WriteTraceF((TraceType)(TraceError | TraceNoHeader),"%X: %s",*_PROGRAM_COUNTER,R4300iOpcodeName(Opcode.Hex,*_PROGRAM_COUNTER));
|
WriteTraceF((TraceType)(TraceError | TraceNoHeader),"%X: %s",*_PROGRAM_COUNTER,R4300iOpcodeName(Opcode.Hex,*_PROGRAM_COUNTER));
|
||||||
//WriteTraceF((TraceType)(TraceError | TraceNoHeader),"%X: %s t9: %08X v1: %08X",*_PROGRAM_COUNTER,R4300iOpcodeName(Opcode.Hex,*_PROGRAM_COUNTER),_GPR[0x19].UW[0],_GPR[0x03].UW[0]);
|
//WriteTraceF((TraceType)(TraceError | TraceNoHeader),"%X: %s t9: %08X v1: %08X",*_PROGRAM_COUNTER,R4300iOpcodeName(Opcode.Hex,*_PROGRAM_COUNTER),_GPR[0x19].UW[0],_GPR[0x03].UW[0]);
|
||||||
//WriteTraceF((TraceType)(TraceError | TraceNoHeader),"%X: %d %d",*_PROGRAM_COUNTER,*_NextTimer,g_SystemTimer->CurrentType());
|
//WriteTraceF((TraceType)(TraceError | TraceNoHeader),"%X: %d %d",*_PROGRAM_COUNTER,*g_NextTimer,g_SystemTimer->CurrentType());
|
||||||
}*/
|
}*/
|
||||||
m_R4300i_Opcode[ Opcode.op ]();
|
m_R4300i_Opcode[ Opcode.op ]();
|
||||||
NextTimer -= m_CountPerOp;
|
NextTimer -= m_CountPerOp;
|
||||||
|
@ -329,19 +329,19 @@ void CInterpreterCPU::ExecuteOps ( int Cycles )
|
||||||
{
|
{
|
||||||
WriteTraceF((TraceType)(TraceError | TraceNoHeader),"%X: %s",*_PROGRAM_COUNTER,R4300iOpcodeName(Opcode.Hex,*_PROGRAM_COUNTER));
|
WriteTraceF((TraceType)(TraceError | TraceNoHeader),"%X: %s",*_PROGRAM_COUNTER,R4300iOpcodeName(Opcode.Hex,*_PROGRAM_COUNTER));
|
||||||
//WriteTraceF((TraceType)(TraceError | TraceNoHeader),"%X: %s t9: %08X v1: %08X",*_PROGRAM_COUNTER,R4300iOpcodeName(Opcode.Hex,*_PROGRAM_COUNTER),_GPR[0x19].UW[0],_GPR[0x03].UW[0]);
|
//WriteTraceF((TraceType)(TraceError | TraceNoHeader),"%X: %s t9: %08X v1: %08X",*_PROGRAM_COUNTER,R4300iOpcodeName(Opcode.Hex,*_PROGRAM_COUNTER),_GPR[0x19].UW[0],_GPR[0x03].UW[0]);
|
||||||
//WriteTraceF((TraceType)(TraceError | TraceNoHeader),"%X: %d %d",*_PROGRAM_COUNTER,*_NextTimer,g_SystemTimer->CurrentType());
|
//WriteTraceF((TraceType)(TraceError | TraceNoHeader),"%X: %d %d",*_PROGRAM_COUNTER,*g_NextTimer,g_SystemTimer->CurrentType());
|
||||||
}*/
|
}*/
|
||||||
/*if (PROGRAM_COUNTER > 0x80323000 && PROGRAM_COUNTER< 0x80380000)
|
/*if (PROGRAM_COUNTER > 0x80323000 && PROGRAM_COUNTER< 0x80380000)
|
||||||
{
|
{
|
||||||
WriteTraceF((TraceType)(TraceError | TraceNoHeader),"%X: %s",*_PROGRAM_COUNTER,R4300iOpcodeName(Opcode.Hex,*_PROGRAM_COUNTER));
|
WriteTraceF((TraceType)(TraceError | TraceNoHeader),"%X: %s",*_PROGRAM_COUNTER,R4300iOpcodeName(Opcode.Hex,*_PROGRAM_COUNTER));
|
||||||
//WriteTraceF((TraceType)(TraceError | TraceNoHeader),"%X: %s t9: %08X v1: %08X",*_PROGRAM_COUNTER,R4300iOpcodeName(Opcode.Hex,*_PROGRAM_COUNTER),_GPR[0x19].UW[0],_GPR[0x03].UW[0]);
|
//WriteTraceF((TraceType)(TraceError | TraceNoHeader),"%X: %s t9: %08X v1: %08X",*_PROGRAM_COUNTER,R4300iOpcodeName(Opcode.Hex,*_PROGRAM_COUNTER),_GPR[0x19].UW[0],_GPR[0x03].UW[0]);
|
||||||
//WriteTraceF((TraceType)(TraceError | TraceNoHeader),"%X: %d %d",*_PROGRAM_COUNTER,*_NextTimer,g_SystemTimer->CurrentType());
|
//WriteTraceF((TraceType)(TraceError | TraceNoHeader),"%X: %d %d",*_PROGRAM_COUNTER,*g_NextTimer,g_SystemTimer->CurrentType());
|
||||||
}*/
|
}*/
|
||||||
m_R4300i_Opcode[ Opcode.op ]();
|
m_R4300i_Opcode[ Opcode.op ]();
|
||||||
_GPR[0].DW = 0;
|
_GPR[0].DW = 0;
|
||||||
|
|
||||||
Cycles -= m_CountPerOp;
|
Cycles -= m_CountPerOp;
|
||||||
*_NextTimer -= m_CountPerOp;
|
*g_NextTimer -= m_CountPerOp;
|
||||||
|
|
||||||
/*static DWORD TestAddress = 0x80077B0C, TestValue = 0, CurrentValue = 0;
|
/*static DWORD TestAddress = 0x80077B0C, TestValue = 0, CurrentValue = 0;
|
||||||
if (g_MMU->LW_VAddr(TestAddress, TestValue))
|
if (g_MMU->LW_VAddr(TestAddress, TestValue))
|
||||||
|
@ -374,7 +374,7 @@ void CInterpreterCPU::ExecuteOps ( int Cycles )
|
||||||
if (CheckTimer)
|
if (CheckTimer)
|
||||||
{
|
{
|
||||||
TestTimer = FALSE;
|
TestTimer = FALSE;
|
||||||
if (*_NextTimer < 0)
|
if (*g_NextTimer < 0)
|
||||||
{
|
{
|
||||||
g_SystemTimer->TimerDone();
|
g_SystemTimer->TimerDone();
|
||||||
}
|
}
|
||||||
|
|
|
@ -2369,11 +2369,11 @@ int CMipsMemoryVM::SW_NonMemory ( DWORD PAddr, DWORD Value ) {
|
||||||
|
|
||||||
void CMipsMemoryVM::UpdateHalfLine (void)
|
void CMipsMemoryVM::UpdateHalfLine (void)
|
||||||
{
|
{
|
||||||
if (*_NextTimer < 0) {
|
if (*g_NextTimer < 0) {
|
||||||
m_HalfLine = 0;
|
m_HalfLine = 0;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
m_HalfLine = (DWORD)(*_NextTimer / ViRefreshRate());
|
m_HalfLine = (DWORD)(*g_NextTimer / ViRefreshRate());
|
||||||
m_HalfLine &= ~1;
|
m_HalfLine &= ~1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -534,7 +534,7 @@ bool CN64System::SetActiveSystem( bool bActive )
|
||||||
g_SystemTimer = &m_SystemTimer;
|
g_SystemTimer = &m_SystemTimer;
|
||||||
g_TransVaddr = &m_MMU_VM;
|
g_TransVaddr = &m_MMU_VM;
|
||||||
g_SystemEvents = this;
|
g_SystemEvents = this;
|
||||||
_NextTimer = &m_NextTimer;
|
g_NextTimer = &m_NextTimer;
|
||||||
g_Plugins = m_Plugins;
|
g_Plugins = m_Plugins;
|
||||||
_TLBLoadAddress = &m_TLBLoadAddress;
|
_TLBLoadAddress = &m_TLBLoadAddress;
|
||||||
_TLBStoreAddress = &m_TLBStoreAddress;
|
_TLBStoreAddress = &m_TLBStoreAddress;
|
||||||
|
@ -565,7 +565,7 @@ bool CN64System::SetActiveSystem( bool bActive )
|
||||||
g_SystemTimer = NULL;
|
g_SystemTimer = NULL;
|
||||||
g_TransVaddr = NULL;
|
g_TransVaddr = NULL;
|
||||||
g_SystemEvents = NULL;
|
g_SystemEvents = NULL;
|
||||||
_NextTimer = NULL;
|
g_NextTimer = NULL;
|
||||||
g_Plugins = m_Plugins;
|
g_Plugins = m_Plugins;
|
||||||
_TLBLoadAddress = NULL;
|
_TLBLoadAddress = NULL;
|
||||||
_TLBStoreAddress = NULL;
|
_TLBStoreAddress = NULL;
|
||||||
|
|
|
@ -5127,13 +5127,13 @@ void CRecompilerOps::UpdateCounters ( CRegInfo & RegSet, bool CheckTimer, bool C
|
||||||
{
|
{
|
||||||
UpdateSyncCPU(RegSet,RegSet.GetBlockCycleCount());
|
UpdateSyncCPU(RegSet,RegSet.GetBlockCycleCount());
|
||||||
WriteX86Comment("Update Counter");
|
WriteX86Comment("Update Counter");
|
||||||
SubConstFromVariable(RegSet.GetBlockCycleCount(),_NextTimer,"_NextTimer"); // updates compare flag
|
SubConstFromVariable(RegSet.GetBlockCycleCount(),g_NextTimer,"g_NextTimer"); // updates compare flag
|
||||||
if (ClearValues)
|
if (ClearValues)
|
||||||
{
|
{
|
||||||
RegSet.SetBlockCycleCount(0);
|
RegSet.SetBlockCycleCount(0);
|
||||||
}
|
}
|
||||||
} else if (CheckTimer) {
|
} else if (CheckTimer) {
|
||||||
CompConstToVariable(0,_NextTimer,"_NextTimer");
|
CompConstToVariable(0,g_NextTimer,"g_NextTimer");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CheckTimer)
|
if (CheckTimer)
|
||||||
|
|
|
@ -17,6 +17,6 @@ CSystemEvents * g_SystemEvents = NULL;
|
||||||
DWORD * _TLBLoadAddress = NULL;
|
DWORD * _TLBLoadAddress = NULL;
|
||||||
DWORD * _TLBStoreAddress = NULL;
|
DWORD * _TLBStoreAddress = NULL;
|
||||||
|
|
||||||
int * _NextTimer;
|
int * g_NextTimer;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,6 @@ extern CAudio * g_Audio;
|
||||||
extern CSystemTimer * g_SystemTimer;
|
extern CSystemTimer * g_SystemTimer;
|
||||||
extern CTransVaddr * g_TransVaddr;
|
extern CTransVaddr * g_TransVaddr;
|
||||||
extern CSystemEvents * g_SystemEvents;
|
extern CSystemEvents * g_SystemEvents;
|
||||||
extern int * _NextTimer;
|
extern int * g_NextTimer;
|
||||||
extern DWORD * _TLBLoadAddress;
|
extern DWORD * _TLBLoadAddress;
|
||||||
extern DWORD * _TLBStoreAddress;
|
extern DWORD * _TLBStoreAddress;
|
||||||
|
|
Loading…
Reference in New Issue