Global Variable: Rename _TransVaddr to g_TransVaddr
This commit is contained in:
parent
2bebce913e
commit
e8b96dd915
|
@ -176,7 +176,7 @@ void Log_LW (DWORD PC, DWORD VAddr) {
|
|||
if ( VAddr < 0xA0000000 || VAddr >= 0xC0000000 )
|
||||
{
|
||||
DWORD PAddr;
|
||||
if (!_TransVaddr->TranslateVaddr(VAddr,PAddr))
|
||||
if (!g_TransVaddr->TranslateVaddr(VAddr,PAddr))
|
||||
{
|
||||
if (LogOptions.LogUnknown)
|
||||
{
|
||||
|
@ -398,7 +398,7 @@ void Log_SW (DWORD PC, DWORD VAddr, DWORD Value) {
|
|||
if ( VAddr < 0xA0000000 || VAddr >= 0xC0000000 )
|
||||
{
|
||||
DWORD PAddr;
|
||||
if (!_TransVaddr->TranslateVaddr(VAddr,PAddr))
|
||||
if (!g_TransVaddr->TranslateVaddr(VAddr,PAddr))
|
||||
{
|
||||
if (LogOptions.LogUnknown)
|
||||
{
|
||||
|
|
|
@ -532,7 +532,7 @@ bool CN64System::SetActiveSystem( bool bActive )
|
|||
g_Reg = &m_Reg;
|
||||
g_Audio = &m_Audio;
|
||||
g_SystemTimer = &m_SystemTimer;
|
||||
_TransVaddr = &m_MMU_VM;
|
||||
g_TransVaddr = &m_MMU_VM;
|
||||
_SystemEvents = this;
|
||||
_NextTimer = &m_NextTimer;
|
||||
g_Plugins = m_Plugins;
|
||||
|
@ -563,7 +563,7 @@ bool CN64System::SetActiveSystem( bool bActive )
|
|||
g_Reg = NULL;
|
||||
g_Audio = NULL;
|
||||
g_SystemTimer = NULL;
|
||||
_TransVaddr = NULL;
|
||||
g_TransVaddr = NULL;
|
||||
_SystemEvents = NULL;
|
||||
_NextTimer = NULL;
|
||||
g_Plugins = m_Plugins;
|
||||
|
|
|
@ -33,7 +33,7 @@ CCodeBlock::CCodeBlock(DWORD VAddrEnter, BYTE * RecompPos) :
|
|||
m_Sections.push_back(m_EnterSection);
|
||||
m_SectionMap.insert(SectionMap::value_type(VAddrEnter,m_EnterSection));
|
||||
|
||||
if (_TransVaddr->VAddrToRealAddr(VAddrEnter,*(reinterpret_cast<void **>(&m_MemLocation[0]))))
|
||||
if (g_TransVaddr->VAddrToRealAddr(VAddrEnter,*(reinterpret_cast<void **>(&m_MemLocation[0]))))
|
||||
{
|
||||
m_MemLocation[1] = m_MemLocation[0] + 1;
|
||||
m_MemContents[0] = *m_MemLocation[0];
|
||||
|
@ -651,7 +651,7 @@ bool CCodeBlock::Compile()
|
|||
CompileExitCode();
|
||||
|
||||
DWORD PAddr;
|
||||
_TransVaddr->TranslateVaddr(VAddrFirst(),PAddr);
|
||||
g_TransVaddr->TranslateVaddr(VAddrFirst(),PAddr);
|
||||
MD5(g_MMU->Rdram() + PAddr,(VAddrLast() - VAddrFirst()) + 4).get_digest(m_Hash);
|
||||
|
||||
return true;
|
||||
|
|
|
@ -83,10 +83,10 @@ void CRecompiler::RecompilerMain_VirtualTable ( void )
|
|||
|
||||
while(!Done)
|
||||
{
|
||||
if (!_TransVaddr->ValidVaddr(PC))
|
||||
if (!g_TransVaddr->ValidVaddr(PC))
|
||||
{
|
||||
g_Reg->DoTLBReadMiss(false,PC);
|
||||
if (!_TransVaddr->ValidVaddr(PC))
|
||||
if (!g_TransVaddr->ValidVaddr(PC))
|
||||
{
|
||||
g_Notify->DisplayError("Failed to translate PC to a PAddr: %X\n\nEmulation stopped",PC);
|
||||
return;
|
||||
|
@ -331,7 +331,7 @@ void CRecompiler::RecompilerMain_Lookup( void )
|
|||
} else {
|
||||
DWORD opsExecuted = 0;
|
||||
|
||||
while (_TransVaddr->TranslateVaddr(PROGRAM_COUNTER, PhysicalAddr) && PhysicalAddr >= RdramSize())
|
||||
while (g_TransVaddr->TranslateVaddr(PROGRAM_COUNTER, PhysicalAddr) && PhysicalAddr >= RdramSize())
|
||||
{
|
||||
CInterpreterCPU::ExecuteOps(CountPerOp());
|
||||
opsExecuted += CountPerOp();
|
||||
|
@ -502,10 +502,10 @@ void CRecompiler::RecompilerMain_Lookup_TLB( void )
|
|||
|
||||
while(!m_EndEmulation)
|
||||
{
|
||||
if (!_TransVaddr->TranslateVaddr(PROGRAM_COUNTER, PhysicalAddr))
|
||||
if (!g_TransVaddr->TranslateVaddr(PROGRAM_COUNTER, PhysicalAddr))
|
||||
{
|
||||
g_Reg->DoTLBReadMiss(false,PROGRAM_COUNTER);
|
||||
if (!_TransVaddr->TranslateVaddr(PROGRAM_COUNTER, PhysicalAddr))
|
||||
if (!g_TransVaddr->TranslateVaddr(PROGRAM_COUNTER, PhysicalAddr))
|
||||
{
|
||||
g_Notify->DisplayError("Failed to translate PC to a PAddr: %X\n\nEmulation stopped",PROGRAM_COUNTER);
|
||||
m_EndEmulation = true;
|
||||
|
@ -533,7 +533,7 @@ void CRecompiler::RecompilerMain_Lookup_TLB( void )
|
|||
} else {
|
||||
DWORD opsExecuted = 0;
|
||||
|
||||
while (_TransVaddr->TranslateVaddr(PROGRAM_COUNTER, PhysicalAddr) && PhysicalAddr >= RdramSize())
|
||||
while (g_TransVaddr->TranslateVaddr(PROGRAM_COUNTER, PhysicalAddr) && PhysicalAddr >= RdramSize())
|
||||
{
|
||||
CInterpreterCPU::ExecuteOps(CountPerOp());
|
||||
opsExecuted += CountPerOp();
|
||||
|
@ -581,7 +581,7 @@ void CRecompiler::RecompilerMain_Lookup_validate( void )
|
|||
} else {
|
||||
DWORD opsExecuted = 0;
|
||||
|
||||
while (_TransVaddr->TranslateVaddr(PROGRAM_COUNTER, PhysicalAddr) && PhysicalAddr >= RdramSize())
|
||||
while (g_TransVaddr->TranslateVaddr(PROGRAM_COUNTER, PhysicalAddr) && PhysicalAddr >= RdramSize())
|
||||
{
|
||||
CInterpreterCPU::ExecuteOps(CountPerOp());
|
||||
opsExecuted += CountPerOp();
|
||||
|
@ -602,10 +602,10 @@ void CRecompiler::RecompilerMain_Lookup_validate_TLB( void )
|
|||
|
||||
while(!m_EndEmulation)
|
||||
{
|
||||
if (!_TransVaddr->TranslateVaddr(PROGRAM_COUNTER, PhysicalAddr))
|
||||
if (!g_TransVaddr->TranslateVaddr(PROGRAM_COUNTER, PhysicalAddr))
|
||||
{
|
||||
g_Reg->DoTLBReadMiss(false,PROGRAM_COUNTER);
|
||||
if (!_TransVaddr->TranslateVaddr(PROGRAM_COUNTER, PhysicalAddr))
|
||||
if (!g_TransVaddr->TranslateVaddr(PROGRAM_COUNTER, PhysicalAddr))
|
||||
{
|
||||
g_Notify->DisplayError("Failed to translate PC to a PAddr: %X\n\nEmulation stopped",PROGRAM_COUNTER);
|
||||
m_EndEmulation = true;
|
||||
|
@ -651,7 +651,7 @@ void CRecompiler::RecompilerMain_Lookup_validate_TLB( void )
|
|||
} else {
|
||||
DWORD opsExecuted = 0;
|
||||
|
||||
while (_TransVaddr->TranslateVaddr(PROGRAM_COUNTER, PhysicalAddr) && PhysicalAddr >= RdramSize())
|
||||
while (g_TransVaddr->TranslateVaddr(PROGRAM_COUNTER, PhysicalAddr) && PhysicalAddr >= RdramSize())
|
||||
{
|
||||
CInterpreterCPU::ExecuteOps(CountPerOp());
|
||||
opsExecuted += CountPerOp();
|
||||
|
@ -835,7 +835,7 @@ void CRecompiler::RecompilerMain_ChangeMemory ( void )
|
|||
CCompiledFunc * CRecompiler::CompilerCode ( void )
|
||||
{
|
||||
DWORD pAddr = 0;
|
||||
if (!_TransVaddr->TranslateVaddr(PROGRAM_COUNTER,pAddr))
|
||||
if (!g_TransVaddr->TranslateVaddr(PROGRAM_COUNTER,pAddr))
|
||||
{
|
||||
WriteTraceF(TraceError,"CRecompiler::CompilerCode: Failed to translate %X",PROGRAM_COUNTER);
|
||||
return NULL;
|
||||
|
@ -847,7 +847,7 @@ CCompiledFunc * CRecompiler::CompilerCode ( void )
|
|||
for (CCompiledFunc * Func = iter->second; Func != NULL; Func = Func->Next())
|
||||
{
|
||||
DWORD PAddr;
|
||||
if (_TransVaddr->TranslateVaddr(Func->MinPC(),PAddr))
|
||||
if (g_TransVaddr->TranslateVaddr(Func->MinPC(),PAddr))
|
||||
{
|
||||
MD5Digest Hash;
|
||||
MD5(g_MMU->Rdram() + PAddr,(Func->MaxPC() - Func->MinPC())+ 4).get_digest(Hash);
|
||||
|
@ -961,7 +961,7 @@ void CRecompiler::ClearRecompCode_Virt(DWORD Address, int length,REMOVE_REASON R
|
|||
case FuncFind_PhysicalLookup:
|
||||
{
|
||||
DWORD pAddr = 0;
|
||||
if (_TransVaddr->TranslateVaddr(Address,pAddr))
|
||||
if (g_TransVaddr->TranslateVaddr(Address,pAddr))
|
||||
{
|
||||
ClearRecompCode_Phys(pAddr,length,Reason);
|
||||
}
|
||||
|
|
|
@ -1650,7 +1650,7 @@ void CRecompilerOps::LUI (void) {
|
|||
x86Reg Reg = Map_MemoryStack(x86_Any, true, false);
|
||||
DWORD Address;
|
||||
|
||||
_TransVaddr->TranslateVaddr(((short)m_Opcode.offset << 16), Address);
|
||||
g_TransVaddr->TranslateVaddr(((short)m_Opcode.offset << 16), Address);
|
||||
if (Reg < 0) {
|
||||
MoveConstToVariable((DWORD)(Address + g_MMU->Rdram()), &(g_Recompiler->MemoryStackPos()), "MemoryStack");
|
||||
} else {
|
||||
|
|
|
@ -12,7 +12,7 @@ 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 * g_SystemTimer = NULL;
|
||||
CTransVaddr * _TransVaddr = NULL;
|
||||
CTransVaddr * g_TransVaddr = NULL;
|
||||
CSystemEvents * _SystemEvents = NULL;
|
||||
DWORD * _TLBLoadAddress = NULL;
|
||||
DWORD * _TLBStoreAddress = NULL;
|
||||
|
|
|
@ -12,7 +12,7 @@ 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 * g_SystemTimer;
|
||||
extern CTransVaddr * _TransVaddr;
|
||||
extern CTransVaddr * g_TransVaddr;
|
||||
extern CSystemEvents * _SystemEvents;
|
||||
extern int * _NextTimer;
|
||||
extern DWORD * _TLBLoadAddress;
|
||||
|
|
Loading…
Reference in New Issue