From 2bebce913e7d1a6d74950e470bb282ae2703fd67 Mon Sep 17 00:00:00 2001 From: zilmar Date: Sat, 17 Nov 2012 13:31:46 +1100 Subject: [PATCH] Global Variable: Rename _SystemTimer to g_SystemTimer --- .../N64 System/Interpreter/Interpreter CPU.cpp | 18 +++++++++--------- .../Interpreter/Interpreter Ops 32.cpp | 12 ++++++------ .../N64 System/Interpreter/Interpreter Ops.cpp | 12 ++++++------ Source/Project64/N64 System/Mips/Audio.cpp | 10 +++++----- Source/Project64/N64 System/Mips/Pif Ram.cpp | 4 ++-- .../N64 System/Mips/System Events.cpp | 2 +- .../N64 System/Mips/System Timing.cpp | 12 ++++++------ Source/Project64/N64 System/N64 Class.cpp | 14 +++++++------- .../N64 System/Recompiler/Code Section.cpp | 2 +- .../N64 System/Recompiler/Recompiler Ops.cpp | 16 ++++++++-------- Source/Project64/N64 System/System Globals.cpp | 2 +- Source/Project64/N64 System/System Globals.h | 2 +- 12 files changed, 53 insertions(+), 53 deletions(-) diff --git a/Source/Project64/N64 System/Interpreter/Interpreter CPU.cpp b/Source/Project64/N64 System/Interpreter/Interpreter CPU.cpp index 2d46bcf64..3686b2474 100644 --- a/Source/Project64/N64 System/Interpreter/Interpreter CPU.cpp +++ b/Source/Project64/N64 System/Interpreter/Interpreter CPU.cpp @@ -217,7 +217,7 @@ void CInterpreterCPU::InPermLoop (void) { if (*_NextTimer > 0) { *_NextTimer = 0 - m_CountPerOp; - _SystemTimer->UpdateTimers(); + g_SystemTimer->UpdateTimers(); } } } @@ -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 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,_SystemTimer->CurrentType()); + //WriteTraceF((TraceType)(TraceError | TraceNoHeader),"%X: %d %d",*_PROGRAM_COUNTER,*_NextTimer,g_SystemTimer->CurrentType()); }*/ m_R4300i_Opcode[ Opcode.op ](); NextTimer -= m_CountPerOp; @@ -270,7 +270,7 @@ void CInterpreterCPU::ExecuteCPU (void ) TestTimer = FALSE; if (NextTimer < 0) { - _SystemTimer->TimerDone(); + g_SystemTimer->TimerDone(); } if (bDoSomething) { @@ -283,7 +283,7 @@ void CInterpreterCPU::ExecuteCPU (void ) PROGRAM_COUNTER = JumpToLocation; R4300iOp::m_NextInstruction = NORMAL; CInterpreterCPU::InPermLoop(); - _SystemTimer->TimerDone(); + g_SystemTimer->TimerDone(); if (bDoSomething) { _SystemEvents->ExecuteEvents(); @@ -319,7 +319,7 @@ void CInterpreterCPU::ExecuteOps ( int Cycles ) { if (Cycles <= 0) { - _SystemTimer->UpdateTimers(); + g_SystemTimer->UpdateTimers(); return; } @@ -329,13 +329,13 @@ void CInterpreterCPU::ExecuteOps ( int Cycles ) { 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: %d %d",*_PROGRAM_COUNTER,*_NextTimer,_SystemTimer->CurrentType()); + //WriteTraceF((TraceType)(TraceError | TraceNoHeader),"%X: %d %d",*_PROGRAM_COUNTER,*_NextTimer,g_SystemTimer->CurrentType()); }*/ /*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 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,_SystemTimer->CurrentType()); + //WriteTraceF((TraceType)(TraceError | TraceNoHeader),"%X: %d %d",*_PROGRAM_COUNTER,*_NextTimer,g_SystemTimer->CurrentType()); }*/ m_R4300i_Opcode[ Opcode.op ](); _GPR[0].DW = 0; @@ -376,7 +376,7 @@ void CInterpreterCPU::ExecuteOps ( int Cycles ) TestTimer = FALSE; if (*_NextTimer < 0) { - _SystemTimer->TimerDone(); + g_SystemTimer->TimerDone(); } if (DoSomething) { @@ -389,7 +389,7 @@ void CInterpreterCPU::ExecuteOps ( int Cycles ) PROGRAM_COUNTER = JumpToLocation; R4300iOp::m_NextInstruction = NORMAL; CInterpreterCPU::InPermLoop(); - _SystemTimer->TimerDone(); + g_SystemTimer->TimerDone(); if (DoSomething) { _SystemEvents->ExecuteEvents(); diff --git a/Source/Project64/N64 System/Interpreter/Interpreter Ops 32.cpp b/Source/Project64/N64 System/Interpreter/Interpreter Ops 32.cpp index 31271e542..76d16fa7d 100644 --- a/Source/Project64/N64 System/Interpreter/Interpreter Ops 32.cpp +++ b/Source/Project64/N64 System/Interpreter/Interpreter Ops 32.cpp @@ -1187,7 +1187,7 @@ void R4300iOp32::COP0_MF (void) { #endif if (m_Opcode.rd == 9) { - _SystemTimer->UpdateTimers(); + g_SystemTimer->UpdateTimers(); } _GPR[m_Opcode.rt].W[0] = (int)_CP0[m_Opcode.rd]; } @@ -1219,22 +1219,22 @@ void R4300iOp32::COP0_MT (void) { _CP0[m_Opcode.rd] = _GPR[m_Opcode.rt].UW[0]; break; case 6: //Wired - _SystemTimer->UpdateTimers(); + g_SystemTimer->UpdateTimers(); _CP0[m_Opcode.rd] = _GPR[m_Opcode.rt].UW[0]; break; case 4: //Context _CP0[m_Opcode.rd] = _GPR[m_Opcode.rt].UW[0] & 0xFF800000; break; case 9: //Count - _SystemTimer->UpdateTimers(); + g_SystemTimer->UpdateTimers(); _CP0[m_Opcode.rd] = _GPR[m_Opcode.rt].UW[0]; - _SystemTimer->UpdateCompareTimer(); + g_SystemTimer->UpdateCompareTimer(); break; case 11: //Compare - _SystemTimer->UpdateTimers(); + g_SystemTimer->UpdateTimers(); _CP0[m_Opcode.rd] = _GPR[m_Opcode.rt].UW[0]; g_Reg->FAKE_CAUSE_REGISTER &= ~CAUSE_IP7; - _SystemTimer->UpdateCompareTimer(); + g_SystemTimer->UpdateCompareTimer(); break; case 12: //Status if ((_CP0[m_Opcode.rd] ^ _GPR[m_Opcode.rt].UW[0]) != 0) { diff --git a/Source/Project64/N64 System/Interpreter/Interpreter Ops.cpp b/Source/Project64/N64 System/Interpreter/Interpreter Ops.cpp index 8f2ceaec7..de2fcc4f8 100644 --- a/Source/Project64/N64 System/Interpreter/Interpreter Ops.cpp +++ b/Source/Project64/N64 System/Interpreter/Interpreter Ops.cpp @@ -1790,7 +1790,7 @@ void R4300iOp::COP0_MF (void) { #endif if (m_Opcode.rd == 9) { - _SystemTimer->UpdateTimers(); + g_SystemTimer->UpdateTimers(); } _GPR[m_Opcode.rt].DW = (int)_CP0[m_Opcode.rd]; } @@ -1822,22 +1822,22 @@ void R4300iOp::COP0_MT (void) { _CP0[m_Opcode.rd] = _GPR[m_Opcode.rt].UW[0]; break; case 6: //Wired - _SystemTimer->UpdateTimers(); + g_SystemTimer->UpdateTimers(); _CP0[m_Opcode.rd] = _GPR[m_Opcode.rt].UW[0]; break; case 4: //Context _CP0[m_Opcode.rd] = _GPR[m_Opcode.rt].UW[0] & 0xFF800000; break; case 9: //Count - _SystemTimer->UpdateTimers(); + g_SystemTimer->UpdateTimers(); _CP0[m_Opcode.rd] = _GPR[m_Opcode.rt].UW[0]; - _SystemTimer->UpdateCompareTimer(); + g_SystemTimer->UpdateCompareTimer(); break; case 11: //Compare - _SystemTimer->UpdateTimers(); + g_SystemTimer->UpdateTimers(); _CP0[m_Opcode.rd] = _GPR[m_Opcode.rt].UW[0]; g_Reg->FAKE_CAUSE_REGISTER &= ~CAUSE_IP7; - _SystemTimer->UpdateCompareTimer(); + g_SystemTimer->UpdateCompareTimer(); break; case 12: //Status if ((_CP0[m_Opcode.rd] ^ _GPR[m_Opcode.rt].UW[0]) != 0) { diff --git a/Source/Project64/N64 System/Mips/Audio.cpp b/Source/Project64/N64 System/Mips/Audio.cpp index 45b66a32b..9f57cbb55 100644 --- a/Source/Project64/N64 System/Mips/Audio.cpp +++ b/Source/Project64/N64 System/Mips/Audio.cpp @@ -21,7 +21,7 @@ void CAudio::Reset ( void ) DWORD CAudio::GetLength ( void ) { WriteTraceF(TraceAudio,__FUNCTION__ ": Start (m_SecondBuff = %d)",m_SecondBuff); - DWORD TimeLeft = _SystemTimer->GetTimer(CSystemTimer::AiTimer), Res = 0; + DWORD TimeLeft = g_SystemTimer->GetTimer(CSystemTimer::AiTimer), Res = 0; if (TimeLeft > 0) { Res = (TimeLeft / m_CountsPerByte) + m_SecondBuff; @@ -46,14 +46,14 @@ void CAudio::LenChanged ( void ) WriteTraceF(TraceAudio,__FUNCTION__ ": *** Ignoring Write, To Large (%X)",g_Reg->AI_LEN_REG); } else { m_Status |= 0x80000000; - if (_SystemTimer->GetTimer(CSystemTimer::AiTimer) == 0) + if (g_SystemTimer->GetTimer(CSystemTimer::AiTimer) == 0) { if (m_SecondBuff) { g_Notify->BreakPoint(__FILE__,__LINE__); } WriteTraceF(TraceAudio,__FUNCTION__ ": Set Timer AI_LEN_REG: %d m_CountsPerByte: %d",g_Reg->AI_LEN_REG,m_CountsPerByte); - _SystemTimer->SetTimer(CSystemTimer::AiTimer,g_Reg->AI_LEN_REG * m_CountsPerByte,false); + g_SystemTimer->SetTimer(CSystemTimer::AiTimer,g_Reg->AI_LEN_REG * m_CountsPerByte,false); } else { WriteTraceF(TraceAudio,__FUNCTION__ ": Increasing Second Buffer (m_SecondBuff %d Increase: %d)",m_SecondBuff,g_Reg->AI_LEN_REG); m_SecondBuff += g_Reg->AI_LEN_REG; @@ -61,7 +61,7 @@ void CAudio::LenChanged ( void ) } } else { WriteTraceF(TraceAudio,__FUNCTION__ ": *** Reset Timer to 0"); - _SystemTimer->StopTimer(CSystemTimer::AiTimer); + g_SystemTimer->StopTimer(CSystemTimer::AiTimer); m_SecondBuff = 0; m_Status = 0; } @@ -78,7 +78,7 @@ void CAudio::TimerDone ( void ) WriteTraceF(TraceAudio,__FUNCTION__ ": Start (m_SecondBuff = %d)",m_SecondBuff); if (m_SecondBuff != 0) { - _SystemTimer->SetTimer(CSystemTimer::AiTimer,m_SecondBuff * m_CountsPerByte,false); + g_SystemTimer->SetTimer(CSystemTimer::AiTimer,m_SecondBuff * m_CountsPerByte,false); m_SecondBuff = 0; } else { g_Reg->MI_INTR_REG |= MI_INTR_AI; diff --git a/Source/Project64/N64 System/Mips/Pif Ram.cpp b/Source/Project64/N64 System/Mips/Pif Ram.cpp index 73246c0ed..53245cb0a 100644 --- a/Source/Project64/N64 System/Mips/Pif Ram.cpp +++ b/Source/Project64/N64 System/Mips/Pif Ram.cpp @@ -286,7 +286,7 @@ void CPifRam::SI_DMA_READ (void) #endif if (bDelaySI()) { - _SystemTimer->SetTimer(CSystemTimer::SiTimer,0x900,false); + g_SystemTimer->SetTimer(CSystemTimer::SiTimer,0x900,false); } else { g_Reg->MI_INTR_REG |= MI_INTR_SI; g_Reg->SI_STATUS_REG |= SI_STATUS_INTERRUPT; @@ -382,7 +382,7 @@ void CPifRam::SI_DMA_WRITE (void) PifRamWrite(); if (bDelaySI()) { - _SystemTimer->SetTimer(CSystemTimer::SiTimer,0x900,false); + g_SystemTimer->SetTimer(CSystemTimer::SiTimer,0x900,false); } else { g_Reg->MI_INTR_REG |= MI_INTR_SI; g_Reg->SI_STATUS_REG |= SI_STATUS_INTERRUPT; diff --git a/Source/Project64/N64 System/Mips/System Events.cpp b/Source/Project64/N64 System/Mips/System Events.cpp index 5e1bfdeae..2148c00c4 100644 --- a/Source/Project64/N64 System/Mips/System Events.cpp +++ b/Source/Project64/N64 System/Mips/System Events.cpp @@ -45,7 +45,7 @@ void CSystemEvents::ExecuteEvents ( void ) g_System->m_EndEmulation = true; break; case SysEvent_ResetCPU_Soft: - _SystemTimer->SetTimer(CSystemTimer::SoftResetTimer,0x3000000,false); + g_SystemTimer->SetTimer(CSystemTimer::SoftResetTimer,0x3000000,false); g_Plugins->Gfx()->ShowCFB(); g_Reg->FAKE_CAUSE_REGISTER |= CAUSE_IP4; g_Reg->CheckInterrupts(); diff --git a/Source/Project64/N64 System/Mips/System Timing.cpp b/Source/Project64/N64 System/Mips/System Timing.cpp index 9f56b88ca..022302bbe 100644 --- a/Source/Project64/N64 System/Mips/System Timing.cpp +++ b/Source/Project64/N64 System/Mips/System Timing.cpp @@ -174,17 +174,17 @@ void CSystemTimer::TimerDone (void) UpdateCompareTimer(); break; case CSystemTimer::SoftResetTimer: - _SystemTimer->StopTimer(CSystemTimer::SoftResetTimer); + g_SystemTimer->StopTimer(CSystemTimer::SoftResetTimer); g_System->ExternalEvent(SysEvent_ResetCPU_SoftDone); break; case CSystemTimer::SiTimer: - _SystemTimer->StopTimer(CSystemTimer::SiTimer); + g_SystemTimer->StopTimer(CSystemTimer::SiTimer); g_Reg->MI_INTR_REG |= MI_INTR_SI; g_Reg->SI_STATUS_REG |= SI_STATUS_INTERRUPT; g_Reg->CheckInterrupts(); break; case CSystemTimer::PiTimer: - _SystemTimer->StopTimer(CSystemTimer::PiTimer); + g_SystemTimer->StopTimer(CSystemTimer::PiTimer); g_Reg->PI_STATUS_REG &= ~PI_STATUS_DMA_BUSY; g_Reg->MI_INTR_REG |= MI_INTR_PI; g_Reg->CheckInterrupts(); @@ -202,7 +202,7 @@ void CSystemTimer::TimerDone (void) g_Reg->CheckInterrupts(); break; case CSystemTimer::RspTimer: - _SystemTimer->StopTimer(CSystemTimer::RspTimer); + g_SystemTimer->StopTimer(CSystemTimer::RspTimer); try { g_System->RunRSP(); } catch (...) { @@ -210,12 +210,12 @@ void CSystemTimer::TimerDone (void) } break; case CSystemTimer::RSPTimerDlist: - _SystemTimer->StopTimer(CSystemTimer::RSPTimerDlist); + g_SystemTimer->StopTimer(CSystemTimer::RSPTimerDlist); g_Reg->m_GfxIntrReg |= MI_INTR_DP; g_Reg->CheckInterrupts(); break; case CSystemTimer::AiTimer: - _SystemTimer->StopTimer(CSystemTimer::AiTimer); + g_SystemTimer->StopTimer(CSystemTimer::AiTimer); g_Audio->TimerDone(); break; default: diff --git a/Source/Project64/N64 System/N64 Class.cpp b/Source/Project64/N64 System/N64 Class.cpp index 646f7f468..2fc2892b2 100644 --- a/Source/Project64/N64 System/N64 Class.cpp +++ b/Source/Project64/N64 System/N64 Class.cpp @@ -531,7 +531,7 @@ bool CN64System::SetActiveSystem( bool bActive ) g_TLB = &m_TLB; g_Reg = &m_Reg; g_Audio = &m_Audio; - _SystemTimer = &m_SystemTimer; + g_SystemTimer = &m_SystemTimer; _TransVaddr = &m_MMU_VM; _SystemEvents = this; _NextTimer = &m_NextTimer; @@ -562,7 +562,7 @@ bool CN64System::SetActiveSystem( bool bActive ) g_TLB = NULL; g_Reg = NULL; g_Audio = NULL; - _SystemTimer = NULL; + g_SystemTimer = NULL; _TransVaddr = NULL; _SystemEvents = NULL; _NextTimer = NULL; @@ -879,7 +879,7 @@ void CN64System::SyncCPUPC (CN64System * const SecondCPU) { bool ErrorFound = false; - _SystemTimer->UpdateTimers(); + g_SystemTimer->UpdateTimers(); if (m_Reg.m_PROGRAM_COUNTER != SecondCPU->m_Reg.m_PROGRAM_COUNTER) { ErrorFound = true; } @@ -901,7 +901,7 @@ void CN64System::SyncCPU (CN64System * const SecondCPU) bool ErrorFound = false; //WriteTraceF(TraceError,"SyncCPU PC = %08X",m_Reg.m_PROGRAM_COUNTER); - _SystemTimer->UpdateTimers(); + g_SystemTimer->UpdateTimers(); #ifdef TEST_SP_TRACKING if (m_CurrentSP != GPR[29].UW[0]) { @@ -1584,7 +1584,7 @@ void CN64System::RunRSP ( void ) { } if (Task == 1 && bDelayDP() && ((m_Reg.m_GfxIntrReg & MI_INTR_DP) != 0)) { - _SystemTimer->SetTimer(CSystemTimer::RSPTimerDlist,0x1000,false); + g_SystemTimer->SetTimer(CSystemTimer::RSPTimerDlist,0x1000,false); m_Reg.m_GfxIntrReg &= ~MI_INTR_DP; } if (bShowCPUPer()) { m_CPU_Usage.StartTimer(CPU_UsageAddr); } @@ -1592,7 +1592,7 @@ void CN64System::RunRSP ( void ) { if ( ( m_Reg.SP_STATUS_REG & SP_STATUS_HALT ) == 0 && ( m_Reg.SP_STATUS_REG & SP_STATUS_BROKE ) == 0) { - _SystemTimer->SetTimer(CSystemTimer::RspTimer,0x200,false); + g_SystemTimer->SetTimer(CSystemTimer::RspTimer,0x200,false); } WriteTrace(TraceRSP, "RunRSP: check interrupts"); g_Reg->CheckInterrupts(); @@ -1664,7 +1664,7 @@ void CN64System::RefreshScreen ( void ) { VI_INTR_TIME -= 38; } } - _SystemTimer->SetTimer(CSystemTimer::ViTimer,VI_INTR_TIME,true); + g_SystemTimer->SetTimer(CSystemTimer::ViTimer,VI_INTR_TIME,true); if (bFixedAudio()) { g_Audio->SetViIntr (VI_INTR_TIME); diff --git a/Source/Project64/N64 System/Recompiler/Code Section.cpp b/Source/Project64/N64 System/Recompiler/Code Section.cpp index 1a420f1a3..61e6b7ff9 100644 --- a/Source/Project64/N64 System/Recompiler/Code Section.cpp +++ b/Source/Project64/N64 System/Recompiler/Code Section.cpp @@ -411,7 +411,7 @@ void CCodeSection::GenerateSectionLinkage (void) m_Jump.RegSet.WriteBackRegisters(); UpdateCounters(m_Jump.RegSet,false, true); Call_Direct(AddressOf(CInterpreterCPU::InPermLoop),"CInterpreterCPU::InPermLoop"); - MoveConstToX86reg((DWORD)_SystemTimer,x86_ECX); + MoveConstToX86reg((DWORD)g_SystemTimer,x86_ECX); Call_Direct(AddressOf(&CSystemTimer::TimerDone),"CSystemTimer::TimerDone"); CPU_Message("CompileSystemCheck 3"); CompileSystemCheck((DWORD)-1,m_Jump.RegSet); diff --git a/Source/Project64/N64 System/Recompiler/Recompiler Ops.cpp b/Source/Project64/N64 System/Recompiler/Recompiler Ops.cpp index 55b355163..acee21106 100644 --- a/Source/Project64/N64 System/Recompiler/Recompiler Ops.cpp +++ b/Source/Project64/N64 System/Recompiler/Recompiler Ops.cpp @@ -3999,7 +3999,7 @@ void CRecompilerOps::COP0_MF(void) { UpdateCounters(m_RegWorkingSet,false, true); m_RegWorkingSet.SetBlockCycleCount(m_RegWorkingSet.GetBlockCycleCount() + CountPerOp()) ; BeforeCallDirect(m_RegWorkingSet); - MoveConstToX86reg((DWORD)_SystemTimer,x86_ECX); + MoveConstToX86reg((DWORD)g_SystemTimer,x86_ECX); Call_Direct(AddressOf(&CSystemTimer::UpdateTimers), "CSystemTimer::UpdateTimers"); AfterCallDirect(m_RegWorkingSet); } @@ -4043,7 +4043,7 @@ void CRecompilerOps::COP0_MT (void) { UpdateCounters(m_RegWorkingSet,false, true); m_RegWorkingSet.SetBlockCycleCount(m_RegWorkingSet.GetBlockCycleCount() + CountPerOp()) ; BeforeCallDirect(m_RegWorkingSet); - MoveConstToX86reg((DWORD)_SystemTimer,x86_ECX); + MoveConstToX86reg((DWORD)g_SystemTimer,x86_ECX); Call_Direct(AddressOf(&CSystemTimer::UpdateTimers), "CSystemTimer::UpdateTimers"); AfterCallDirect(m_RegWorkingSet); if (IsConst(m_Opcode.rt)) { @@ -4055,7 +4055,7 @@ void CRecompilerOps::COP0_MT (void) { } AndConstToVariable((DWORD)~CAUSE_IP7,&g_Reg->FAKE_CAUSE_REGISTER,"FAKE_CAUSE_REGISTER"); BeforeCallDirect(m_RegWorkingSet); - MoveConstToX86reg((DWORD)_SystemTimer,x86_ECX); + MoveConstToX86reg((DWORD)g_SystemTimer,x86_ECX); Call_Direct(AddressOf(&CSystemTimer::UpdateCompareTimer), "CSystemTimer::UpdateCompareTimer"); AfterCallDirect(m_RegWorkingSet); break; @@ -4064,7 +4064,7 @@ void CRecompilerOps::COP0_MT (void) { UpdateCounters(m_RegWorkingSet,false, true); m_RegWorkingSet.SetBlockCycleCount(m_RegWorkingSet.GetBlockCycleCount() + CountPerOp()) ; BeforeCallDirect(m_RegWorkingSet); - MoveConstToX86reg((DWORD)_SystemTimer,x86_ECX); + MoveConstToX86reg((DWORD)g_SystemTimer,x86_ECX); Call_Direct(AddressOf(&CSystemTimer::UpdateTimers), "CSystemTimer::UpdateTimers"); AfterCallDirect(m_RegWorkingSet); if (IsConst(m_Opcode.rt)) { @@ -4075,7 +4075,7 @@ void CRecompilerOps::COP0_MT (void) { MoveX86regToVariable(Map_TempReg(x86_Any,m_Opcode.rt,FALSE), &_CP0[m_Opcode.rd], CRegName::Cop0[m_Opcode.rd]); } BeforeCallDirect(m_RegWorkingSet); - MoveConstToX86reg((DWORD)_SystemTimer,x86_ECX); + MoveConstToX86reg((DWORD)g_SystemTimer,x86_ECX); Call_Direct(AddressOf(&CSystemTimer::UpdateCompareTimer), "CSystemTimer::UpdateCompareTimer"); AfterCallDirect(m_RegWorkingSet); break; @@ -4111,7 +4111,7 @@ void CRecompilerOps::COP0_MT (void) { break; case 6: //Wired BeforeCallDirect(m_RegWorkingSet); - MoveConstToX86reg((DWORD)_SystemTimer,x86_ECX); + MoveConstToX86reg((DWORD)g_SystemTimer,x86_ECX); Call_Direct(AddressOf(&CSystemTimer::UpdateTimers), "CSystemTimer::UpdateTimers"); AfterCallDirect(m_RegWorkingSet); if (IsConst(m_Opcode.rt)) { @@ -4178,7 +4178,7 @@ void CRecompilerOps::COP0_CO_TLBWR( void) { UpdateCounters(m_RegWorkingSet,false, true); m_RegWorkingSet.SetBlockCycleCount(m_RegWorkingSet.GetBlockCycleCount() + CountPerOp()) ; BeforeCallDirect(m_RegWorkingSet); - MoveConstToX86reg((DWORD)_SystemTimer,x86_ECX); + MoveConstToX86reg((DWORD)g_SystemTimer,x86_ECX); Call_Direct(AddressOf(&CSystemTimer::UpdateTimers), "CSystemTimer::UpdateTimers"); PushImm32("true",true); @@ -5141,7 +5141,7 @@ void CRecompilerOps::UpdateCounters ( CRegInfo & RegSet, bool CheckTimer, bool C JnsLabel8("Continue_From_Timer_Test",0); BYTE * Jump = m_RecompPos - 1; Pushad(); - MoveConstToX86reg((DWORD)_SystemTimer,x86_ECX); + MoveConstToX86reg((DWORD)g_SystemTimer,x86_ECX); Call_Direct(AddressOf(&CSystemTimer::TimerDone),"CSystemTimer::TimerDone"); Popad(); diff --git a/Source/Project64/N64 System/System Globals.cpp b/Source/Project64/N64 System/System Globals.cpp index e29e473c8..d76634246 100644 --- a/Source/Project64/N64 System/System Globals.cpp +++ b/Source/Project64/N64 System/System Globals.cpp @@ -11,7 +11,7 @@ CNotification * g_Notify = NULL; CPlugins * g_Plugins = NULL; CN64Rom * g_Rom = NULL; //The current rom that this system is executing.. it can only execute one file at the time CAudio * g_Audio = NULL; -CSystemTimer * _SystemTimer = NULL; +CSystemTimer * g_SystemTimer = NULL; CTransVaddr * _TransVaddr = NULL; CSystemEvents * _SystemEvents = NULL; DWORD * _TLBLoadAddress = NULL; diff --git a/Source/Project64/N64 System/System Globals.h b/Source/Project64/N64 System/System Globals.h index f53d23f3a..222a4af3f 100644 --- a/Source/Project64/N64 System/System Globals.h +++ b/Source/Project64/N64 System/System Globals.h @@ -11,7 +11,7 @@ extern CRegisters * g_Reg; //Current Register Set attached to the g_MMU extern CPlugins * g_Plugins; extern CN64Rom * g_Rom; //The current rom that this system is executing.. it can only execute one file at the time extern CAudio * g_Audio; -extern CSystemTimer * _SystemTimer; +extern CSystemTimer * g_SystemTimer; extern CTransVaddr * _TransVaddr; extern CSystemEvents * _SystemEvents; extern int * _NextTimer;