Merge pull request #581 from LegendOfDragoon/Fixes

Fix some mistakes
This commit is contained in:
zilmar 2015-09-02 14:14:30 +10:00
commit 94341be840
3 changed files with 34 additions and 36 deletions

View File

@ -2147,9 +2147,9 @@ int CMipsMemoryVM::MemoryFilter( DWORD dwExptCode, void * lpExceptionPointer )
{
if (g_Settings->LoadDword(Debugger_ShowUnhandledMemory))
{
g_Notify->DisplayError(L"Failed to load byte\n\nMIPS Address: %08X\nX86 Address: %02X",
g_Notify->DisplayError(L"Failed to load byte\n\nMIPS Address: %08X\nX86 Address: %08X",
(char *)exRec.ExceptionInformation[1] - (char *)m_RDRAM,
*(unsigned char *)lpEP->ContextRecord->Eip);
(unsigned char *)lpEP->ContextRecord->Eip);
}
}
lpEP->ContextRecord->Eip = (DWORD)ReadPos;
@ -2159,9 +2159,9 @@ int CMipsMemoryVM::MemoryFilter( DWORD dwExptCode, void * lpExceptionPointer )
{
if (g_Settings->LoadDword(Debugger_ShowUnhandledMemory))
{
g_Notify->DisplayError(L"Failed to load half word\n\nMIPS Address: %08X\nX86 Address: %02X",
g_Notify->DisplayError(L"Failed to load half word\n\nMIPS Address: %08X\nX86 Address: %08X",
(char *)exRec.ExceptionInformation[1] - (char *)m_RDRAM,
*(unsigned char *)lpEP->ContextRecord->Eip);
(unsigned char *)lpEP->ContextRecord->Eip);
}
}
lpEP->ContextRecord->Eip = (DWORD)ReadPos;
@ -2171,9 +2171,9 @@ int CMipsMemoryVM::MemoryFilter( DWORD dwExptCode, void * lpExceptionPointer )
{
if (g_Settings->LoadDword(Debugger_ShowUnhandledMemory))
{
g_Notify->DisplayError(L"Failed to load byte\n\nMIPS Address: %08X\nX86 Address: %02X",
g_Notify->DisplayError(L"Failed to load byte\n\nMIPS Address: %08X\nX86 Address: %08X",
(char *)exRec.ExceptionInformation[1] - (char *)m_RDRAM,
*(unsigned char *)lpEP->ContextRecord->Eip);
(unsigned char *)lpEP->ContextRecord->Eip);
}
}
lpEP->ContextRecord->Eip = (DWORD)ReadPos;
@ -2183,9 +2183,9 @@ int CMipsMemoryVM::MemoryFilter( DWORD dwExptCode, void * lpExceptionPointer )
{
if (g_Settings->LoadDword(Debugger_ShowUnhandledMemory))
{
g_Notify->DisplayError(L"Failed to load half word\n\nMIPS Address: %08X\nX86 Address: %02X",
g_Notify->DisplayError(L"Failed to load half word\n\nMIPS Address: %08X\nX86 Address: %08X",
(char *)exRec.ExceptionInformation[1] - (char *)m_RDRAM,
*(unsigned char *)lpEP->ContextRecord->Eip);
(unsigned char *)lpEP->ContextRecord->Eip);
}
}
lpEP->ContextRecord->Eip = (DWORD)ReadPos;
@ -2206,9 +2206,9 @@ int CMipsMemoryVM::MemoryFilter( DWORD dwExptCode, void * lpExceptionPointer )
{
if (g_Settings->LoadDword(Debugger_ShowUnhandledMemory))
{
g_Notify->DisplayError(L"Failed to half word\n\nMIPS Address: %08X\nX86 Address: %02X",
g_Notify->DisplayError(L"Failed to half word\n\nMIPS Address: %08X\nX86 Address: %08X",
(char *)exRec.ExceptionInformation[1] - (char *)m_RDRAM,
*(unsigned char *)lpEP->ContextRecord->Eip);
(unsigned char *)lpEP->ContextRecord->Eip);
}
}
lpEP->ContextRecord->Eip = (DWORD)ReadPos;
@ -2218,8 +2218,8 @@ int CMipsMemoryVM::MemoryFilter( DWORD dwExptCode, void * lpExceptionPointer )
{
if (g_Settings->LoadDword(Debugger_ShowUnhandledMemory))
{
g_Notify->DisplayError(L"Failed to store half word\n\nMIPS Address: %08X\nX86 Address: %02X",MemAddress,
*(unsigned char *)lpEP->ContextRecord->Eip);
g_Notify->DisplayError(L"Failed to store half word\n\nMIPS Address: %08X\nX86 Address: %08X",MemAddress,
(unsigned char *)lpEP->ContextRecord->Eip);
}
}
lpEP->ContextRecord->Eip = (DWORD)ReadPos;
@ -2236,8 +2236,8 @@ int CMipsMemoryVM::MemoryFilter( DWORD dwExptCode, void * lpExceptionPointer )
if (!SH_NonMemory(MemAddress,*(WORD *)ReadPos)) {
if (g_Settings->LoadDword(Debugger_ShowUnhandledMemory))
{
g_Notify->DisplayError(L"Failed to store half word\n\nMIPS Address: %08X\nX86 Address: %02X",MemAddress,
*(unsigned char *)lpEP->ContextRecord->Eip);
g_Notify->DisplayError(L"Failed to store half word\n\nMIPS Address: %08X\nX86 Address: %08X",MemAddress,
(unsigned char *)lpEP->ContextRecord->Eip);
}
}
lpEP->ContextRecord->Eip = (DWORD)(ReadPos + 2);
@ -2255,9 +2255,9 @@ int CMipsMemoryVM::MemoryFilter( DWORD dwExptCode, void * lpExceptionPointer )
{
if (g_Settings->LoadDword(Debugger_ShowUnhandledMemory))
{
g_Notify->DisplayError(L"Failed to store byte\n\nMIPS Address: %08X\nX86 Address: %02X",
g_Notify->DisplayError(L"Failed to store byte\n\nMIPS Address: %08X\nX86 Address: %08X",
(char *)exRec.ExceptionInformation[1] - (char *)m_RDRAM,
*(unsigned char *)lpEP->ContextRecord->Eip);
(unsigned char *)lpEP->ContextRecord->Eip);
}
}
lpEP->ContextRecord->Eip = (DWORD)ReadPos;
@ -2267,9 +2267,9 @@ int CMipsMemoryVM::MemoryFilter( DWORD dwExptCode, void * lpExceptionPointer )
{
if (g_Settings->LoadDword(Debugger_ShowUnhandledMemory))
{
g_Notify->DisplayError(L"Failed to load byte\n\nMIPS Address: %08X\nX86 Address: %02X",
g_Notify->DisplayError(L"Failed to load byte\n\nMIPS Address: %08X\nX86 Address: %08X",
(char *)exRec.ExceptionInformation[1] - (char *)m_RDRAM,
*(unsigned char *)lpEP->ContextRecord->Eip);
(unsigned char *)lpEP->ContextRecord->Eip);
}
}
lpEP->ContextRecord->Eip = (DWORD)ReadPos;
@ -2279,9 +2279,9 @@ int CMipsMemoryVM::MemoryFilter( DWORD dwExptCode, void * lpExceptionPointer )
{
if (g_Settings->LoadDword(Debugger_ShowUnhandledMemory))
{
g_Notify->DisplayError(L"Failed to load word\n\nMIPS Address: %08X\nX86 Address: %02X",
g_Notify->DisplayError(L"Failed to load word\n\nMIPS Address: %08X\nX86 Address: %08X",
(char *)exRec.ExceptionInformation[1] - (char *)m_RDRAM,
*(unsigned char *)lpEP->ContextRecord->Eip);
(unsigned char *)lpEP->ContextRecord->Eip);
}
}
lpEP->ContextRecord->Eip = (DWORD)ReadPos;
@ -2291,8 +2291,8 @@ int CMipsMemoryVM::MemoryFilter( DWORD dwExptCode, void * lpExceptionPointer )
{
if (g_Settings->LoadDword(Debugger_ShowUnhandledMemory))
{
g_Notify->DisplayError(L"Failed to store word\n\nMIPS Address: %08X\nX86 Address: %02X",MemAddress,
*(unsigned char *)lpEP->ContextRecord->Eip);
g_Notify->DisplayError(L"Failed to store word\n\nMIPS Address: %08X\nX86 Address: %08X",MemAddress,
(unsigned char *)lpEP->ContextRecord->Eip);
}
}
lpEP->ContextRecord->Eip = (DWORD)ReadPos;
@ -2310,8 +2310,8 @@ int CMipsMemoryVM::MemoryFilter( DWORD dwExptCode, void * lpExceptionPointer )
{
if (g_Settings->LoadDword(Debugger_ShowUnhandledMemory))
{
g_Notify->DisplayError(L"Failed to store byte\n\nMIPS Address: %08X\nX86 Address: %02X",MemAddress,
*(unsigned char *)lpEP->ContextRecord->Eip);
g_Notify->DisplayError(L"Failed to store byte\n\nMIPS Address: %08X\nX86 Address: %08X",MemAddress,
(unsigned char *)lpEP->ContextRecord->Eip);
}
}
lpEP->ContextRecord->Eip = (DWORD)(ReadPos + 1);
@ -2329,8 +2329,8 @@ int CMipsMemoryVM::MemoryFilter( DWORD dwExptCode, void * lpExceptionPointer )
{
if (g_Settings->LoadDword(Debugger_ShowUnhandledMemory))
{
g_Notify->DisplayError(L"Failed to store word\n\nMIPS Address: %08X\nX86 Address: %02X",MemAddress,
*(unsigned char *)lpEP->ContextRecord->Eip);
g_Notify->DisplayError(L"Failed to store word\n\nMIPS Address: %08X\nX86 Address: %08X",MemAddress,
(unsigned char *)lpEP->ContextRecord->Eip);
}
}
lpEP->ContextRecord->Eip = (DWORD)(ReadPos + 4);

View File

@ -3934,15 +3934,8 @@ void CRecompilerOps::SPECIAL_DSRL32() {
if (m_Opcode.rt != m_Opcode.rd)
UnMap_GPR(m_Opcode.rd, false);
if (m_Opcode.sa == 0) {
MIPS_DWORD Value;
Value.UW[0] = Value.UW[1] = GetMipsRegHi(m_Opcode.rt);
m_RegWorkingSet.SetMipsRegState(m_Opcode.rd,CRegInfo::STATE_CONST_64);
m_RegWorkingSet.SetMipsReg(m_Opcode.rd, Value.UDW);
} else {
m_RegWorkingSet.SetMipsRegState(m_Opcode.rd,CRegInfo::STATE_CONST_32_ZERO);
m_RegWorkingSet.SetMipsRegLo(m_Opcode.rd, (DWORD)(GetMipsReg(m_Opcode.rt) >> (m_Opcode.sa + 32)));
}
m_RegWorkingSet.SetMipsRegState(m_Opcode.rd, CRegInfo::STATE_CONST_64);
m_RegWorkingSet.SetMipsReg(m_Opcode.rd, (DWORD)(GetMipsRegHi(m_Opcode.rt) >> m_Opcode.sa));
} else if (IsMapped(m_Opcode.rt)) {
ProtectGPR(m_Opcode.rt);
if (Is64Bit(m_Opcode.rt)) {

View File

@ -135,8 +135,13 @@ bool CAudioPlugin::Initiate(CN64System * System, CMainGui * RenderWindow)
if (System != NULL)
{
if (AiUpdate && !m_hAudioThread)
if (AiUpdate)
{
if (m_hAudioThread)
{
WriteTraceF(TraceAudio, __FUNCTION__ ": Terminate Audio Thread");
TerminateThread(m_hAudioThread, 0);
}
m_hAudioThread = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)AudioThread, (LPVOID)this, 0, &ThreadID);
}