add __FUNCTION__ to trace messages
This commit is contained in:
parent
5878f9d7d9
commit
a444ad3e52
|
@ -173,12 +173,12 @@ LRESULT CDebugMemoryView::OnMemoryModified ( LPNMHDR lpNMHDR )
|
|||
{
|
||||
if (!g_MMU->SB_VAddr(m_DataStartLoc+ Pos,(BYTE)Value))
|
||||
{
|
||||
WriteTraceF(TraceError,"CDebugMemoryView::OnMemoryModified - failed to store at %X",m_DataStartLoc + Pos);
|
||||
WriteTraceF(TraceError,__FUNCTION__ ": failed to store at %X",m_DataStartLoc + Pos);
|
||||
}
|
||||
} else {
|
||||
/*if (!g_MMU->SD_VAddr(m_DataStartLoc+ Pos,Value,_8Bit))
|
||||
{
|
||||
WriteTraceF(TraceError,"CDebugMemoryView::OnMemoryModified - failed to store at %X",m_DataStartLoc + Pos);
|
||||
WriteTraceF(TraceError,__FUNCTION__ ": failed to store at %X",m_DataStartLoc + Pos);
|
||||
}*/
|
||||
}
|
||||
Insert_MemoryLineDump(LineNumber);
|
||||
|
|
|
@ -121,7 +121,7 @@ void CEeprom::LoadEeprom (void) {
|
|||
FILE_ATTRIBUTE_NORMAL | FILE_FLAG_RANDOM_ACCESS, NULL);
|
||||
if (m_hFile == INVALID_HANDLE_VALUE)
|
||||
{
|
||||
WriteTraceF(TraceError,"CEeprom::LoadEeprom: Failed to open (%s), ReadOnly = %d, LastError = %X",(LPCTSTR)FileName, m_ReadOnly, GetLastError());
|
||||
WriteTraceF(TraceError,__FUNCTION__ ": Failed to open (%s), ReadOnly = %d, LastError = %X",(LPCTSTR)FileName, m_ReadOnly, GetLastError());
|
||||
g_Notify->DisplayError(GS(MSG_FAIL_OPEN_EEPROM));
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -119,7 +119,7 @@ bool CFlashram::LoadFlashram (void) {
|
|||
FILE_ATTRIBUTE_NORMAL | FILE_FLAG_RANDOM_ACCESS, NULL);
|
||||
if (m_hFile == INVALID_HANDLE_VALUE)
|
||||
{
|
||||
WriteTraceF(TraceError,"CFlashram::LoadFlashram: Failed to open (%s), ReadOnly = %d, LastError = %X",(LPCTSTR)FileName, m_ReadOnly, GetLastError());
|
||||
WriteTraceF(TraceError,__FUNCTION__ ": Failed to open (%s), ReadOnly = %d, LastError = %X",(LPCTSTR)FileName, m_ReadOnly, GetLastError());
|
||||
g_Notify->DisplayError(GS(MSG_FAIL_OPEN_FLASH));
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -66,7 +66,7 @@ BOOL CMipsMemoryVM::Initialize ( void )
|
|||
m_RDRAM = (unsigned char *) VirtualAlloc( NULL, 0x20000000, MEM_RESERVE | MEM_TOP_DOWN, PAGE_READWRITE );
|
||||
if( m_RDRAM == NULL )
|
||||
{
|
||||
WriteTraceF(TraceError,"CMipsMemoryVM::Initialize:: Failed to Reserve RDRAM (Size: 0x%X)",0x20000000);
|
||||
WriteTraceF(TraceError,__FUNCTION__ ": Failed to Reserve RDRAM (Size: 0x%X)",0x20000000);
|
||||
FreeMemory();
|
||||
return false;
|
||||
}
|
||||
|
@ -74,14 +74,14 @@ BOOL CMipsMemoryVM::Initialize ( void )
|
|||
m_AllocatedRdramSize = g_Settings->LoadDword(Game_RDRamSize);
|
||||
if(VirtualAlloc(m_RDRAM, m_AllocatedRdramSize, MEM_COMMIT, PAGE_READWRITE)==NULL)
|
||||
{
|
||||
WriteTraceF(TraceError,"CMipsMemoryVM::Initialize:: Failed to Allocate RDRAM (Size: 0x%X)",m_AllocatedRdramSize);
|
||||
WriteTraceF(TraceError,__FUNCTION__ ": Failed to Allocate RDRAM (Size: 0x%X)",m_AllocatedRdramSize);
|
||||
FreeMemory();
|
||||
return false;
|
||||
}
|
||||
|
||||
if(VirtualAlloc(m_RDRAM + 0x04000000, 0x2000, MEM_COMMIT, PAGE_READWRITE)==NULL)
|
||||
{
|
||||
WriteTraceF(TraceError,"CMipsMemoryVM::Initialize:: Failed to Allocate DMEM/IMEM (Size: 0x%X)",0x2000);
|
||||
WriteTraceF(TraceError,__FUNCTION__ ": Failed to Allocate DMEM/IMEM (Size: 0x%X)",0x2000);
|
||||
FreeMemory();
|
||||
return false;
|
||||
}
|
||||
|
@ -96,7 +96,7 @@ BOOL CMipsMemoryVM::Initialize ( void )
|
|||
m_RomSize = g_Rom->GetRomSize();
|
||||
if(VirtualAlloc(m_Rom, g_Rom->GetRomSize(), MEM_COMMIT, PAGE_READWRITE)==NULL)
|
||||
{
|
||||
WriteTraceF(TraceError,"CMipsMemoryVM::Initialize:: Failed to Allocate Rom (Size: 0x%X)",g_Rom->GetRomSize());
|
||||
WriteTraceF(TraceError,__FUNCTION__ ": Failed to Allocate Rom (Size: 0x%X)",g_Rom->GetRomSize());
|
||||
FreeMemory();
|
||||
return false;
|
||||
}
|
||||
|
@ -114,7 +114,7 @@ BOOL CMipsMemoryVM::Initialize ( void )
|
|||
m_TLB_ReadMap = (DWORD *)VirtualAlloc(NULL,0xFFFFF * sizeof(DWORD),MEM_RESERVE|MEM_COMMIT,PAGE_READWRITE);
|
||||
if (m_TLB_ReadMap == NULL)
|
||||
{
|
||||
WriteTraceF(TraceError,"CMipsMemoryVM::Initialize:: Failed to Allocate m_TLB_ReadMap (Size: 0x%X)",0xFFFFF * sizeof(DWORD));
|
||||
WriteTraceF(TraceError,__FUNCTION__ ": Failed to Allocate m_TLB_ReadMap (Size: 0x%X)",0xFFFFF * sizeof(DWORD));
|
||||
FreeMemory();
|
||||
return false;
|
||||
}
|
||||
|
@ -122,7 +122,7 @@ BOOL CMipsMemoryVM::Initialize ( void )
|
|||
m_TLB_WriteMap = (DWORD *)VirtualAlloc(NULL,0xFFFFF * sizeof(DWORD),MEM_RESERVE|MEM_COMMIT,PAGE_READWRITE);
|
||||
if (m_TLB_WriteMap == NULL)
|
||||
{
|
||||
WriteTraceF(TraceError,"CMipsMemoryVM::Initialize:: Failed to Allocate m_TLB_ReadMap (Size: 0x%X)",0xFFFFF * sizeof(DWORD));
|
||||
WriteTraceF(TraceError,__FUNCTION__ ": Failed to Allocate m_TLB_ReadMap (Size: 0x%X)",0xFFFFF * sizeof(DWORD));
|
||||
FreeMemory();
|
||||
return false;
|
||||
}
|
||||
|
@ -2377,7 +2377,7 @@ void CMipsMemoryVM::UpdateHalfLine (void)
|
|||
|
||||
void CMipsMemoryVM::ProtectMemory( DWORD StartVaddr, DWORD EndVaddr )
|
||||
{
|
||||
WriteTraceF(TraceProtectedMem,"ProtectMemory: StartVaddr: %X EndVaddr: %X",StartVaddr,EndVaddr);
|
||||
WriteTraceF(TraceProtectedMem,__FUNCTION__ ": StartVaddr: %X EndVaddr: %X",StartVaddr,EndVaddr);
|
||||
if (!ValidVaddr(StartVaddr) || !ValidVaddr(EndVaddr)) { return; }
|
||||
|
||||
//Get Physical Addresses passed
|
||||
|
@ -2392,14 +2392,14 @@ void CMipsMemoryVM::ProtectMemory( DWORD StartVaddr, DWORD EndVaddr )
|
|||
//Proect that memory address space
|
||||
DWORD OldProtect;
|
||||
BYTE * MemLoc = Rdram() + StartPAddr;
|
||||
WriteTraceF(TraceProtectedMem,"ProtectMemory: Paddr: %X Length: %X",StartPAddr,Length);
|
||||
WriteTraceF(TraceProtectedMem, __FUNCTION__ ": Paddr: %X Length: %X",StartPAddr,Length);
|
||||
|
||||
VirtualProtect(MemLoc, Length, PAGE_READONLY, &OldProtect);
|
||||
}
|
||||
|
||||
void CMipsMemoryVM::UnProtectMemory( DWORD StartVaddr, DWORD EndVaddr )
|
||||
{
|
||||
WriteTraceF(TraceProtectedMem,"UnProtectMemory: StartVaddr: %X EndVaddr: %X",StartVaddr,EndVaddr);
|
||||
WriteTraceF(TraceProtectedMem,__FUNCTION__ ": StartVaddr: %X EndVaddr: %X",StartVaddr,EndVaddr);
|
||||
if (!ValidVaddr(StartVaddr) || !ValidVaddr(EndVaddr)) { return; }
|
||||
|
||||
//Get Physical Addresses passed
|
||||
|
@ -3848,7 +3848,7 @@ void CMipsMemoryVM::RdramChanged ( CMipsMemoryVM * _this )
|
|||
if (_this->m_AllocatedRdramSize == 0x400000) {
|
||||
if (VirtualAlloc(_this->m_RDRAM + 0x400000, 0x400000, MEM_COMMIT, PAGE_READWRITE)==NULL)
|
||||
{
|
||||
WriteTrace(TraceError,"CMipsMemoryVM::RdramChanged: failed to allocate extended memory");
|
||||
WriteTrace(TraceError,__FUNCTION__ ": failed to allocate extended memory");
|
||||
g_Notify->FatalError(GS(MSG_MEM_ALLOC_ERROR));
|
||||
}
|
||||
_this->m_AllocatedRdramSize = 0x800000;
|
||||
|
|
|
@ -54,7 +54,7 @@ void LoadMempak (void) {
|
|||
|
||||
if (hMempakFile == INVALID_HANDLE_VALUE)
|
||||
{
|
||||
WriteTraceF(TraceError,"Mempak::LoadMempak: Failed to open (%s), lastError = %X",(LPCTSTR)FileName, GetLastError());
|
||||
WriteTraceF(TraceError,__FUNCTION__ ": Failed to open (%s), lastError = %X",(LPCTSTR)FileName, GetLastError());
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ BOOL CSram::LoadSram (void) {
|
|||
FILE_ATTRIBUTE_NORMAL | FILE_FLAG_RANDOM_ACCESS, NULL);
|
||||
if (m_hFile == INVALID_HANDLE_VALUE)
|
||||
{
|
||||
WriteTraceF(TraceError,"CEeprom::LoadSram: Failed to open (%s), ReadOnly = %d, LastError = %X",(LPCTSTR)FileName, m_ReadOnly, GetLastError());
|
||||
WriteTraceF(TraceError,__FUNCTION__ ": Failed to open (%s), ReadOnly = %d, LastError = %X",(LPCTSTR)FileName, m_ReadOnly, GetLastError());
|
||||
return false;
|
||||
}
|
||||
SetFilePointer(m_hFile,0,NULL,FILE_BEGIN);
|
||||
|
|
|
@ -196,7 +196,7 @@ void CSystemTimer::TimerDone (void)
|
|||
}
|
||||
catch (...)
|
||||
{
|
||||
WriteTraceF(TraceError,"Exception caught in Refresh Screen\nFile: %s\nLine: %d",__FILE__,__LINE__);
|
||||
WriteTraceF(TraceError,__FUNCTION__ ": Exception caught\nFile: %s\nLine: %d",__FILE__,__LINE__);
|
||||
}
|
||||
g_Reg->MI_INTR_REG |= MI_INTR_VI;
|
||||
g_Reg->CheckInterrupts();
|
||||
|
|
|
@ -3,16 +3,16 @@
|
|||
CTLB::CTLB(CTLB_CB * CallBack ):
|
||||
m_CB(CallBack)
|
||||
{
|
||||
WriteTrace(TraceTLB,"CTLB::CTLB - Start");
|
||||
WriteTrace(TraceTLB,__FUNCTION__ ": Start");
|
||||
memset(m_tlb,0,sizeof(m_tlb));
|
||||
memset(m_FastTlb,0,sizeof(m_FastTlb));
|
||||
Reset(true);
|
||||
WriteTrace(TraceTLB,"CTLB::CTLB - Done");
|
||||
WriteTrace(TraceTLB,__FUNCTION__ ": Done");
|
||||
}
|
||||
|
||||
CTLB::~CTLB (void) {
|
||||
WriteTrace(TraceTLB,"CTLB::~CTLB - Done");
|
||||
WriteTrace(TraceTLB,"CTLB::~CTLB - Done");
|
||||
WriteTrace(TraceTLB,__FUNCTION__ ": Start");
|
||||
WriteTrace(TraceTLB,__FUNCTION__ ": Done");
|
||||
}
|
||||
|
||||
void CTLB::Reset (bool InvalidateTLB) {
|
||||
|
@ -59,7 +59,7 @@ bool CTLB::AddressDefined ( DWORD VAddr) {
|
|||
void CTLB::Probe (void) {
|
||||
int Counter;
|
||||
|
||||
WriteTrace(TraceTLB,"TLB Probe");
|
||||
WriteTrace(TraceTLB,__FUNCTION__ ": Start");
|
||||
g_Reg->INDEX_REGISTER |= 0x80000000;
|
||||
for (Counter = 0; Counter < 32; Counter ++)
|
||||
{
|
||||
|
@ -85,6 +85,7 @@ void CTLB::Probe (void) {
|
|||
}
|
||||
}
|
||||
}
|
||||
WriteTrace(TraceTLB,__FUNCTION__ ": Done");
|
||||
}
|
||||
|
||||
void CTLB::ReadEntry (void) {
|
||||
|
@ -99,7 +100,7 @@ void CTLB::ReadEntry (void) {
|
|||
void CTLB::WriteEntry (int index, bool Random) {
|
||||
int FastIndx;
|
||||
|
||||
WriteTraceF(TraceTLB,"Write Entry %02d %d %08X %08X %08X %08X ",index,Random,g_Reg->PAGE_MASK_REGISTER,g_Reg->ENTRYHI_REGISTER,g_Reg->ENTRYLO0_REGISTER,g_Reg->ENTRYLO1_REGISTER);
|
||||
WriteTraceF(TraceTLB,__FUNCTION__ ": %02d %d %08X %08X %08X %08X ",index,Random,g_Reg->PAGE_MASK_REGISTER,g_Reg->ENTRYHI_REGISTER,g_Reg->ENTRYLO0_REGISTER,g_Reg->ENTRYLO1_REGISTER);
|
||||
|
||||
//Check to see if entry is unmapping it self
|
||||
if (m_tlb[index].EntryDefined) {
|
||||
|
@ -108,14 +109,14 @@ void CTLB::WriteEntry (int index, bool Random) {
|
|||
*_PROGRAM_COUNTER < m_FastTlb[FastIndx].VEND &&
|
||||
m_FastTlb[FastIndx].ValidEntry && m_FastTlb[FastIndx].VALID)
|
||||
{
|
||||
WriteTraceF(TraceTLB,"Write Entry: Ignored PC: %X VAddr Start: %X VEND: %X",*_PROGRAM_COUNTER,m_FastTlb[FastIndx].VSTART,m_FastTlb[FastIndx].VEND);
|
||||
WriteTraceF(TraceTLB,__FUNCTION__ ": Ignored PC: %X VAddr Start: %X VEND: %X",*_PROGRAM_COUNTER,m_FastTlb[FastIndx].VSTART,m_FastTlb[FastIndx].VEND);
|
||||
return;
|
||||
}
|
||||
if (*_PROGRAM_COUNTER >= m_FastTlb[FastIndx + 1].VSTART &&
|
||||
*_PROGRAM_COUNTER < m_FastTlb[FastIndx + 1].VEND &&
|
||||
m_FastTlb[FastIndx + 1].ValidEntry && m_FastTlb[FastIndx + 1].VALID)
|
||||
{
|
||||
WriteTraceF(TraceTLB,"Write Entry: Ignored PC: %X VAddr Start: %X VEND: %X",*_PROGRAM_COUNTER,m_FastTlb[FastIndx + 1].VSTART,m_FastTlb[FastIndx + 1].VEND);
|
||||
WriteTraceF(TraceTLB,__FUNCTION__ ": Ignored PC: %X VAddr Start: %X VEND: %X",*_PROGRAM_COUNTER,m_FastTlb[FastIndx + 1].VSTART,m_FastTlb[FastIndx + 1].VEND);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -132,7 +132,7 @@ void CN64System::ExternalEvent ( SystemEvent action )
|
|||
}
|
||||
break;
|
||||
default:
|
||||
WriteTraceF(TraceError,"CN64System::ExternalEvent - Unknown event %d",action);
|
||||
WriteTraceF(TraceError,__FUNCTION__ ": Unknown event %d",action);
|
||||
g_Notify->BreakPoint(__FILE__,__LINE__);
|
||||
}
|
||||
}
|
||||
|
@ -171,40 +171,40 @@ bool CN64System::EmulationStarting ( HANDLE hThread, DWORD ThreadId )
|
|||
|
||||
if (g_BaseSystem)
|
||||
{
|
||||
WriteTrace(TraceDebug,"CN64System::stLoadFileImage: Destroying old N64 system");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": Destroying old N64 system");
|
||||
delete g_BaseSystem;
|
||||
g_BaseSystem = NULL;
|
||||
}
|
||||
WriteTrace(TraceDebug,"CN64System::stLoadFileImage: Hide Rom Browser");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": Hide Rom Browser");
|
||||
g_Notify->HideRomBrowser();
|
||||
WriteTrace(TraceDebug,"CN64System::stLoadFileImage: Creating N64 system");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": Creating N64 system");
|
||||
g_BaseSystem = new CN64System(g_Plugins,false);
|
||||
WriteTrace(TraceDebug,"CN64System::stLoadFileImage: Setting N64 system as active");
|
||||
WriteTrace(TraceDebug, __FUNCTION__ ": Setting N64 system as active");
|
||||
if (g_BaseSystem->SetActiveSystem(true))
|
||||
{
|
||||
g_BaseSystem->m_CPU_Handle = hThread;
|
||||
g_BaseSystem->m_CPU_ThreadID = ThreadId;
|
||||
WriteTrace(TraceDebug,"CN64System::stLoadFileImage: Setting up N64 system done");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": Setting up N64 system done");
|
||||
g_Settings->SaveBool(GameRunning_LoadingInProgress,false);
|
||||
g_Notify->RefreshMenu();
|
||||
try
|
||||
{
|
||||
WriteTrace(TraceDebug,"CN64System::stLoadFileImage: Game set to auto start, starting");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": Game set to auto start, starting");
|
||||
g_BaseSystem->StartEmulation2(false);
|
||||
WriteTrace(TraceDebug,"CN64System::stLoadFileImage: Game Done");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": Game Done");
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
WriteTraceF(TraceError,"Exception caught\nFile: %s\nLine: %d",__FILE__,__LINE__);
|
||||
WriteTraceF(TraceError,__FUNCTION__ ": Exception caught\nFile: %s\nLine: %d",__FILE__,__LINE__);
|
||||
char Message[600];
|
||||
sprintf(Message,"CN64System::LoadFileImage - Exception caught\nFile: %s\nLine: %d",__FILE__,__LINE__);
|
||||
sprintf(Message,__FUNCTION__ ": Exception caught\nFile: %s\nLine: %d",__FILE__,__LINE__);
|
||||
MessageBox(NULL,Message,"Exception",MB_OK);
|
||||
}
|
||||
g_BaseSystem->m_CPU_Handle = NULL;
|
||||
g_BaseSystem->m_CPU_ThreadID = 0;
|
||||
} else {
|
||||
WriteTrace(TraceError,"CN64System::stLoadFileImage: SetActiveSystem failed");
|
||||
g_Notify->DisplayError("Failed to Initialize N64 System");
|
||||
WriteTrace(TraceError,__FUNCTION__ ": SetActiveSystem failed");
|
||||
g_Notify->DisplayError(__FUNCTION__ ": Failed to Initialize N64 System");
|
||||
g_Settings->SaveBool(GameRunning_LoadingInProgress,false);
|
||||
g_Notify->RefreshMenu();
|
||||
bRes = false;
|
||||
|
@ -222,7 +222,7 @@ void CN64System::stLoadFileImage ( FileImageInfo * Info )
|
|||
{
|
||||
CoInitialize(NULL);
|
||||
|
||||
WriteTrace(TraceDebug,"CN64System::stLoadFileImage: Copy thread Info");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": Copy thread Info");
|
||||
|
||||
FileImageInfo ImageInfo = *Info;
|
||||
HANDLE ThreadHandle = *(ImageInfo.ThreadHandle);
|
||||
|
@ -230,7 +230,7 @@ void CN64System::stLoadFileImage ( FileImageInfo * Info )
|
|||
ImageInfo.ThreadHandle = &ThreadHandle;
|
||||
delete Info;
|
||||
|
||||
WriteTrace(TraceDebug,"CN64System::stLoadFileImage: Mark Rom as loading");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": Mark Rom as loading");
|
||||
|
||||
//Mark the rom as loading
|
||||
g_Settings->SaveBool(GameRunning_LoadingInProgress,true);
|
||||
|
@ -239,18 +239,18 @@ void CN64System::stLoadFileImage ( FileImageInfo * Info )
|
|||
//Try to load the passed N64 rom
|
||||
if (g_Rom == NULL)
|
||||
{
|
||||
WriteTrace(TraceDebug,"CN64System::stLoadFileImage: Allocating global rom object");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": Allocating global rom object");
|
||||
g_Rom = new CN64Rom();
|
||||
} else {
|
||||
WriteTrace(TraceDebug,"CN64System::stLoadFileImage: Use existing global rom object");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": Use existing global rom object");
|
||||
}
|
||||
|
||||
WriteTraceF(TraceDebug,"CN64System::stLoadFileImage: Loading \"%s\"",ImageInfo.FileName.c_str());
|
||||
WriteTraceF(TraceDebug,__FUNCTION__ ": Loading \"%s\"",ImageInfo.FileName.c_str());
|
||||
if (g_Rom->LoadN64Image(ImageInfo.FileName.c_str()))
|
||||
{
|
||||
g_System->RefreshGameSettings();
|
||||
|
||||
WriteTrace(TraceDebug,"CN64System::stLoadFileImage: Add Recent Rom");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": Add Recent Rom");
|
||||
g_Notify->AddRecentRom(ImageInfo.FileName.c_str());
|
||||
g_Notify->SetWindowCaption(g_Settings->LoadString(Game_GoodName).c_str());
|
||||
if (g_Settings->LoadDword(Setting_AutoStart) != 0)
|
||||
|
@ -260,7 +260,7 @@ void CN64System::stLoadFileImage ( FileImageInfo * Info )
|
|||
g_Settings->SaveBool(GameRunning_LoadingInProgress,false);
|
||||
g_Notify->RefreshMenu();
|
||||
} else {
|
||||
WriteTraceF(TraceError,"CN64System::stLoadFileImage: LoadN64Image failed (\"%s\")",ImageInfo.FileName.c_str());
|
||||
WriteTraceF(TraceError,__FUNCTION__ ": LoadN64Image failed (\"%s\")",ImageInfo.FileName.c_str());
|
||||
g_Notify->DisplayError(g_Rom->GetError());
|
||||
delete g_Rom;
|
||||
g_Rom = NULL;
|
||||
|
@ -269,7 +269,7 @@ void CN64System::stLoadFileImage ( FileImageInfo * Info )
|
|||
return;
|
||||
}
|
||||
CoUninitialize();
|
||||
WriteTrace(TraceDebug,"CN64System::stLoadFileImage: Done");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": Done");
|
||||
}
|
||||
|
||||
void CN64System::StartEmulation2 ( bool NewThread )
|
||||
|
@ -288,7 +288,7 @@ void CN64System::StartEmulation2 ( bool NewThread )
|
|||
*hThread = CreateThread(NULL,0,(LPTHREAD_START_ROUTINE)StartEmulationThread,Info,0, &Info->ThreadID);
|
||||
return;
|
||||
}
|
||||
WriteTrace(TraceDebug,"CN64System::StartEmulation2: Starting");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": Starting");
|
||||
|
||||
g_Notify->HideRomBrowser();
|
||||
//RefreshSettings();
|
||||
|
@ -318,7 +318,7 @@ void CN64System::StartEmulation2 ( bool NewThread )
|
|||
|
||||
if (g_Settings->LoadBool(Setting_AutoFullscreen))
|
||||
{
|
||||
WriteTrace(TraceDebug,"CN64System::StartEmulation 15");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ " 15");
|
||||
CIniFile RomIniFile(g_Settings->LoadString(SupportFile_RomDatabase).c_str());
|
||||
stdstr Status = g_Settings->LoadString(Rdb_Status);
|
||||
|
||||
|
@ -576,13 +576,13 @@ bool CN64System::SetActiveSystem( bool bActive )
|
|||
|
||||
if (bInitPlugin)
|
||||
{
|
||||
WriteTrace(TraceDebug,"CN64System::SetActiveSystem: Reseting Plugins");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": Reseting Plugins");
|
||||
g_Notify->DisplayMessage(5,MSG_PLUGIN_INIT);
|
||||
g_Plugins->Reset();
|
||||
bRes = g_Plugins->Initiate();
|
||||
if (!bRes)
|
||||
{
|
||||
WriteTrace(TraceError,"CN64System::SetActiveSystem: g_Plugins->Initiate Failed");
|
||||
WriteTrace(TraceError, __FUNCTION__ ": g_Plugins->Initiate Failed");
|
||||
}
|
||||
}
|
||||
return bRes;
|
||||
|
@ -1161,7 +1161,7 @@ void CN64System::DumpSyncErrors (CN64System * SecondCPU) {
|
|||
|
||||
bool CN64System::SaveState(void)
|
||||
{
|
||||
WriteTrace(TraceDebug,"CN64System::SaveState 1");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": Start");
|
||||
|
||||
// if (!m_SystemTimer.SaveAllowed()) { return false; }
|
||||
if ((m_Reg.STATUS_REGISTER & STATUS_EXL) != 0) { return false; }
|
||||
|
@ -1294,7 +1294,7 @@ bool CN64System::SaveState(void)
|
|||
|
||||
g_Notify->DisplayMessage(5,"%s %s",SaveMessage.c_str(),SavedFileName.GetNameExtension().c_str());
|
||||
g_Notify->RefreshMenu();
|
||||
WriteTrace(TraceDebug,"CN64System::SaveState 20");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": Done");
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -1340,7 +1340,7 @@ bool CN64System::LoadState(LPCSTR FileName) {
|
|||
DWORD dwRead, Value,SaveRDRAMSize, NextVITimer = 0;
|
||||
bool LoadedZipFile = false;
|
||||
|
||||
WriteTraceF((TraceType)(TraceDebug | TraceRecompiler),"CN64System::LoadState %s",FileName);
|
||||
WriteTraceF((TraceType)(TraceDebug | TraceRecompiler),__FUNCTION__ "(%s): Start",FileName);
|
||||
|
||||
char drive[_MAX_DRIVE] ,dir[_MAX_DIR], fname[_MAX_FNAME],ext[_MAX_EXT];
|
||||
_splitpath(FileName, drive, dir, fname, ext);
|
||||
|
@ -1487,25 +1487,25 @@ bool CN64System::LoadState(LPCSTR FileName) {
|
|||
m_Reg.RANDOM_REGISTER += 32 - m_Reg.WIRED_REGISTER;
|
||||
}
|
||||
//Fix up timer
|
||||
WriteTrace(TraceDebug,"CN64System::LoadState 2");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": 2");
|
||||
m_SystemTimer.SetTimer(CSystemTimer::CompareTimer,m_Reg.COMPARE_REGISTER - m_Reg.COUNT_REGISTER,false);
|
||||
m_SystemTimer.SetTimer(CSystemTimer::ViTimer,NextVITimer,false);
|
||||
m_Reg.FixFpuLocations();
|
||||
WriteTrace(TraceDebug,"CN64System::LoadState 5");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": 5");
|
||||
m_TLB.Reset(false);
|
||||
WriteTrace(TraceDebug,"CN64System::LoadState 6");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": 6");
|
||||
m_CPU_Usage.ResetCounters();
|
||||
WriteTrace(TraceDebug,"CN64System::LoadState 7");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": 7");
|
||||
m_Profile.ResetCounters();
|
||||
WriteTrace(TraceDebug,"CN64System::LoadState 8");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": 8");
|
||||
m_FPS.Reset(true);
|
||||
WriteTrace(TraceDebug,"CN64System::LoadState 9");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": 9");
|
||||
if (bLogX86Code())
|
||||
{
|
||||
Stop_x86_Log();
|
||||
Start_x86_Log();
|
||||
}
|
||||
WriteTrace(TraceDebug,"CN64System::LoadState 12");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": Done");
|
||||
|
||||
#ifdef TEST_SP_TRACKING
|
||||
m_CurrentSP = GPR[29].UW[0];
|
||||
|
@ -1524,17 +1524,15 @@ bool CN64System::LoadState(LPCSTR FileName) {
|
|||
SyncCPU(m_SyncCPU);
|
||||
}
|
||||
}
|
||||
WriteTrace(TraceDebug,"CN64System::LoadState 13");
|
||||
WriteTrace(TraceDebug,"CN64System::LoadState 14");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": 13");
|
||||
stdstr LoadMsg = _Lang->GetString(MSG_LOADED_STATE);
|
||||
WriteTrace(TraceDebug,"CN64System::LoadState 15");
|
||||
g_Notify->DisplayMessage(5,"%s %s",LoadMsg.c_str(),CPath(FileNameStr).GetNameExtension().c_str());
|
||||
WriteTrace(TraceDebug,"CN64System::LoadState 16");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": Done");
|
||||
return true;
|
||||
}
|
||||
|
||||
void CN64System::RunRSP ( void ) {
|
||||
WriteTraceF(TraceRSP, "RunRSP: SP Status %X",m_Reg.SP_STATUS_REG);
|
||||
WriteTraceF(TraceRSP, __FUNCTION__ ": SP Status %X",m_Reg.SP_STATUS_REG);
|
||||
if ( ( m_Reg.SP_STATUS_REG & SP_STATUS_HALT ) == 0) {
|
||||
if ( ( m_Reg.SP_STATUS_REG & SP_STATUS_BROKE ) == 0 ) {
|
||||
DWORD Task; g_MMU->LW_VAddr(0xA4000FC0,Task);
|
||||
|
@ -1542,22 +1540,22 @@ void CN64System::RunRSP ( void ) {
|
|||
|
||||
if (Task == 1 && (m_Reg.DPC_STATUS_REG & DPC_STATUS_FREEZE) != 0)
|
||||
{
|
||||
WriteTrace(TraceRSP, "RunRSP: Dlist that is frozen");
|
||||
WriteTrace(TraceRSP, __FUNCTION__ ": Dlist that is frozen");
|
||||
return;
|
||||
}
|
||||
|
||||
switch (Task) {
|
||||
case 1:
|
||||
WriteTrace(TraceRSP, "RunRSP: *** Display list ***");
|
||||
WriteTrace(TraceRSP, __FUNCTION__ ": *** Display list ***");
|
||||
m_DlistCount += 1;
|
||||
m_FPS.UpdateDlCounter();
|
||||
break;
|
||||
case 2:
|
||||
WriteTrace(TraceRSP, "RunRSP: *** Audio list ***");
|
||||
WriteTrace(TraceRSP, __FUNCTION__ ": *** Audio list ***");
|
||||
m_AlistCount += 1;
|
||||
break;
|
||||
default:
|
||||
WriteTrace(TraceRSP, "RunRSP: *** Unknown list ***");
|
||||
WriteTrace(TraceRSP, __FUNCTION__ ": *** Unknown list ***");
|
||||
m_UnknownCount += 1;
|
||||
break;
|
||||
}
|
||||
|
@ -1579,12 +1577,12 @@ void CN64System::RunRSP ( void ) {
|
|||
// }
|
||||
// }
|
||||
__try {
|
||||
WriteTrace(TraceRSP, "RunRSP: do cycles - starting");
|
||||
WriteTrace(TraceRSP, __FUNCTION__ ": do cycles - starting");
|
||||
g_Plugins->RSP()->DoRspCycles(100);
|
||||
WriteTrace(TraceRSP, "RunRSP: do cycles - Done");
|
||||
WriteTrace(TraceRSP, __FUNCTION__ ": do cycles - Done");
|
||||
} __except( g_MMU->MemoryFilter( GetExceptionCode(), GetExceptionInformation()) ) {
|
||||
WriteTrace(TraceError, "RunRSP: exception generated");
|
||||
g_Notify->FatalError("Unknown memory action\n\nEmulation stop");
|
||||
WriteTrace(TraceError, __FUNCTION__ ": exception generated");
|
||||
g_Notify->FatalError(__FUNCTION__ "\nUnknown memory action\n\nEmulation stop");
|
||||
}
|
||||
if (Task == 1 && bDelayDP() && ((m_Reg.m_GfxIntrReg & MI_INTR_DP) != 0))
|
||||
{
|
||||
|
@ -1598,7 +1596,7 @@ void CN64System::RunRSP ( void ) {
|
|||
{
|
||||
g_SystemTimer->SetTimer(CSystemTimer::RspTimer,0x200,false);
|
||||
}
|
||||
WriteTrace(TraceRSP, "RunRSP: check interrupts");
|
||||
WriteTrace(TraceRSP, __FUNCTION__ ": check interrupts");
|
||||
g_Reg->CheckInterrupts();
|
||||
}
|
||||
}
|
||||
|
@ -1689,12 +1687,12 @@ void CN64System::RefreshScreen ( void ) {
|
|||
|
||||
__try
|
||||
{
|
||||
WriteTrace(TraceGfxPlugin,"UpdateScreen: Starting");
|
||||
WriteTrace(TraceGfxPlugin,__FUNCTION__ ": Starting");
|
||||
g_Plugins->Gfx()->UpdateScreen();
|
||||
WriteTrace(TraceGfxPlugin,"UpdateScreen: Done");
|
||||
WriteTrace(TraceGfxPlugin,__FUNCTION__ ": Done");
|
||||
} __except (g_MMU->MemoryFilter( GetExceptionCode(), GetExceptionInformation())) {
|
||||
WriteTrace(TraceGfxPlugin,"UpdateScreen: Exception caught");
|
||||
WriteTrace(TraceError,"Exception caught in UpdateScreen");
|
||||
WriteTrace(TraceGfxPlugin,__FUNCTION__ ": Exception caught");
|
||||
WriteTrace(TraceError,__FUNCTION__ ": Exception caught");
|
||||
}
|
||||
|
||||
if ((bBasicMode() || bLimitFPS() ) && !bSyncToAudio()) {
|
||||
|
@ -1734,7 +1732,7 @@ void CN64System::RefreshScreen ( void ) {
|
|||
|
||||
bool CN64System::WriteToProtectedMemory (DWORD Address, int length)
|
||||
{
|
||||
WriteTraceF(TraceDebug,"WriteToProtectedMemory Addres: %X Len: %d",Address,length);
|
||||
WriteTraceF(TraceDebug,__FUNCTION__ ": Address: %X Len: %d",Address,length);
|
||||
if (m_Recomp)
|
||||
{
|
||||
g_Notify->BreakPoint(__FILE__,__LINE__);
|
||||
|
|
|
@ -1933,7 +1933,7 @@ bool CCodeSection::InheritParentInfo ( void )
|
|||
}
|
||||
break;
|
||||
default:
|
||||
WriteTraceF(TraceError,"Unhandled Reg state %d\nin InheritParentInfo",GetMipsRegState(i2));
|
||||
WriteTraceF(TraceError,__FUNCTION__ ": Unhandled Reg state %d\nin InheritParentInfo",GetMipsRegState(i2));
|
||||
g_Notify->BreakPoint(__FILE__,__LINE__);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@ bool CFunctionMap::AllocateMemory()
|
|||
{
|
||||
m_FunctionTable = (PCCompiledFunc_TABLE *)VirtualAlloc(NULL,0xFFFFF * sizeof(CCompiledFunc *),MEM_RESERVE|MEM_COMMIT,PAGE_READWRITE);
|
||||
if (m_FunctionTable == NULL) {
|
||||
WriteTrace(TraceError,"CFunctionMap::AllocateMemory: failed to allocate function table");
|
||||
WriteTrace(TraceError,__FUNCTION__ ": failed to allocate function table");
|
||||
g_Notify->FatalError(MSG_MEM_ALLOC_ERROR);
|
||||
return false;
|
||||
}
|
||||
|
@ -30,7 +30,7 @@ bool CFunctionMap::AllocateMemory()
|
|||
{
|
||||
m_JumpTable = new PCCompiledFunc[g_MMU->RdramSize() >> 2];
|
||||
if (m_JumpTable == NULL) {
|
||||
WriteTrace(TraceError,"CFunctionMap::AllocateMemory: failed to allocate jump table");
|
||||
WriteTrace(TraceError,__FUNCTION__ ": failed to allocate jump table");
|
||||
g_Notify->FatalError(MSG_MEM_ALLOC_ERROR);
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -23,12 +23,12 @@ void CRecompiler::Run()
|
|||
|
||||
if (!CRecompMemory::AllocateMemory())
|
||||
{
|
||||
WriteTrace(TraceError,"CRecompiler::Run: CRecompMemory::AllocateMemory failed");
|
||||
WriteTrace(TraceError,__FUNCTION__ ": AllocateMemory failed");
|
||||
return;
|
||||
}
|
||||
if (!CFunctionMap::AllocateMemory())
|
||||
{
|
||||
WriteTrace(TraceError,"CRecompiler::Run: CFunctionMap::AllocateMemory failed");
|
||||
WriteTrace(TraceError,__FUNCTION__ ": AllocateMemory failed");
|
||||
return;
|
||||
}
|
||||
m_EndEmulation = false;
|
||||
|
@ -116,13 +116,13 @@ void CRecompiler::RecompilerMain_VirtualTable ( void )
|
|||
table = new PCCompiledFunc[(0x1000 >> 2)];
|
||||
if (table == NULL)
|
||||
{
|
||||
WriteTrace(TraceError,"CRecompiler::RecompilerMain_VirtualTable: failed to allocate PCCompiledFunc");
|
||||
WriteTrace(TraceError,__FUNCTION__ ": failed to allocate PCCompiledFunc");
|
||||
g_Notify->FatalError(MSG_MEM_ALLOC_ERROR);
|
||||
}
|
||||
memset(table,0,sizeof(PCCompiledFunc) * (0x1000 >> 2));
|
||||
if (g_System->bSMM_Protect())
|
||||
{
|
||||
WriteTraceF(TraceError,"Create Table (%X): Index = %d",table, PC >> 0xC);
|
||||
WriteTraceF(TraceError,__FUNCTION__ ": Create Table (%X): Index = %d",table, PC >> 0xC);
|
||||
g_MMU->ProtectMemory(PC & ~0xFFF,PC | 0xFFF);
|
||||
}
|
||||
}
|
||||
|
@ -837,7 +837,7 @@ CCompiledFunc * CRecompiler::CompilerCode ( void )
|
|||
DWORD pAddr = 0;
|
||||
if (!g_TransVaddr->TranslateVaddr(PROGRAM_COUNTER,pAddr))
|
||||
{
|
||||
WriteTraceF(TraceError,"CRecompiler::CompilerCode: Failed to translate %X",PROGRAM_COUNTER);
|
||||
WriteTraceF(TraceError,__FUNCTION__ ": Failed to translate %X",PROGRAM_COUNTER);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -862,7 +862,7 @@ CCompiledFunc * CRecompiler::CompilerCode ( void )
|
|||
CheckRecompMem();
|
||||
|
||||
//DWORD StartTime = timeGetTime();
|
||||
WriteTraceF(TraceRecompiler,"Compile Block-Start: Program Counter: %X pAddr: %X",PROGRAM_COUNTER,pAddr);
|
||||
WriteTraceF(TraceRecompiler,__FUNCTION__ ": Compile Block-Start: Program Counter: %X pAddr: %X",PROGRAM_COUNTER,pAddr);
|
||||
|
||||
CCodeBlock CodeBlock(PROGRAM_COUNTER, RecompPos());
|
||||
if (!CodeBlock.Compile())
|
||||
|
@ -887,9 +887,8 @@ CCompiledFunc * CRecompiler::CompilerCode ( void )
|
|||
}
|
||||
|
||||
|
||||
void CRecompiler::ClearRecompCode_Phys(DWORD Address, int length, REMOVE_REASON Reason ) {
|
||||
//WriteTraceF(TraceError,"CRecompiler::ClearRecompCode_Phys Not Implemented (Address: %X, Length: %d Reason: %d)",Address,length,Reason);
|
||||
|
||||
void CRecompiler::ClearRecompCode_Phys(DWORD Address, int length, REMOVE_REASON Reason )
|
||||
{
|
||||
if (g_System->LookUpMode() == FuncFind_VirtualLookup)
|
||||
{
|
||||
ClearRecompCode_Virt(Address + 0x80000000,length,Reason);
|
||||
|
@ -900,7 +899,7 @@ void CRecompiler::ClearRecompCode_Phys(DWORD Address, int length, REMOVE_REASON
|
|||
DWORD VAddr, Index = 0;
|
||||
while (g_TLB->PAddrToVAddr(Address,VAddr,Index))
|
||||
{
|
||||
WriteTraceF(TraceRecompiler,"ClearRecompCode Vaddr %X len: %d",VAddr,length);
|
||||
WriteTraceF(TraceRecompiler,__FUNCTION__ ": ClearRecompCode Vaddr %X len: %d",VAddr,length);
|
||||
ClearRecompCode_Virt(VAddr,length,Reason);
|
||||
}
|
||||
}
|
||||
|
@ -915,22 +914,20 @@ void CRecompiler::ClearRecompCode_Phys(DWORD Address, int length, REMOVE_REASON
|
|||
g_Notify->BreakPoint(__FILE__,__LINE__);
|
||||
ClearLen = g_System->RdramSize() - Address;
|
||||
}
|
||||
WriteTraceF(TraceRecompiler,"Reseting Jump Table, Addr: %X len: %d",Address,ClearLen);
|
||||
WriteTraceF(TraceRecompiler,__FUNCTION__ ": Reseting Jump Table, Addr: %X len: %d",Address,ClearLen);
|
||||
memset((BYTE *)JumpTable() + Address,0,ClearLen);
|
||||
if (g_System->bSMM_Protect())
|
||||
{
|
||||
g_MMU->UnProtectMemory(Address + 0x80000000,Address + 0x80000004);
|
||||
}
|
||||
} else{
|
||||
WriteTraceF(TraceRecompiler,"Ignoring reset of Jump Table, Addr: %X len: %d",Address,((length + 3) & ~3));
|
||||
WriteTraceF(TraceRecompiler,__FUNCTION__ ": Ignoring reset of Jump Table, Addr: %X len: %d",Address,((length + 3) & ~3));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CRecompiler::ClearRecompCode_Virt(DWORD Address, int length,REMOVE_REASON Reason )
|
||||
{
|
||||
//WriteTraceF(TraceError,"CRecompiler::ClearRecompCode_Virt Not Implemented (Address: %X, Length: %d Reason: %d)",Address,length,Reason);
|
||||
|
||||
switch (g_System->LookUpMode())
|
||||
{
|
||||
case FuncFind_VirtualLookup:
|
||||
|
@ -946,7 +943,7 @@ void CRecompiler::ClearRecompCode_Virt(DWORD Address, int length,REMOVE_REASON R
|
|||
PCCompiledFunc_TABLE & table = FunctionTable()[AddressIndex];
|
||||
if (table)
|
||||
{
|
||||
WriteTraceF(TraceError,"Delete Table (%X): Index = %d",table, AddressIndex);
|
||||
WriteTraceF(TraceError,__FUNCTION__ ": Delete Table (%X): Index = %d",table, AddressIndex);
|
||||
delete table;
|
||||
table = NULL;
|
||||
g_MMU->UnProtectMemory(Address,Address + length);
|
||||
|
|
|
@ -22,7 +22,7 @@ bool CRecompMemory::AllocateMemory()
|
|||
BYTE * RecompCodeBase = (BYTE *)VirtualAlloc( NULL, MaxCompileBufferSize + 4, MEM_RESERVE|MEM_TOP_DOWN, PAGE_EXECUTE_READWRITE);
|
||||
if (RecompCodeBase==NULL)
|
||||
{
|
||||
WriteTrace(TraceError,"CRecompMemory::AllocateMemory: failed to allocate RecompCodeBase");
|
||||
WriteTrace(TraceError,__FUNCTION__ ": failed to allocate RecompCodeBase");
|
||||
g_Notify->DisplayError(MSG_MEM_ALLOC_ERROR);
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -30,7 +30,7 @@ bool CRecompMemory::AllocateMemory()
|
|||
m_RecompCode = (BYTE *)VirtualAlloc( RecompCodeBase, InitialCompileBufferSize, MEM_COMMIT, PAGE_EXECUTE_READWRITE);
|
||||
if (m_RecompCode==NULL)
|
||||
{
|
||||
WriteTrace(TraceError,"CRecompMemory::AllocateMemory: failed to commit initial buffer");
|
||||
WriteTrace(TraceError,__FUNCTION__ ": failed to commit initial buffer");
|
||||
VirtualFree( RecompCodeBase, 0 , MEM_RELEASE);
|
||||
g_Notify->DisplayError(MSG_MEM_ALLOC_ERROR);
|
||||
return FALSE;
|
||||
|
@ -56,7 +56,7 @@ void CRecompMemory::CheckRecompMem ( void )
|
|||
LPVOID MemAddr = VirtualAlloc( m_RecompCode + m_RecompSize , IncreaseCompileBufferSize, MEM_COMMIT, PAGE_EXECUTE_READWRITE);
|
||||
if (MemAddr == NULL)
|
||||
{
|
||||
WriteTrace(TraceError,"CRecompMemory::CheckRecompMem: failed to increase buffer");
|
||||
WriteTrace(TraceError,__FUNCTION__ ": failed to increase buffer");
|
||||
g_Notify->FatalError(MSG_MEM_ALLOC_ERROR);
|
||||
}
|
||||
m_RecompSize += IncreaseCompileBufferSize;
|
||||
|
|
|
@ -720,7 +720,7 @@ CX86Ops::x86Reg CRegInfo::Map_TempReg (CX86Ops::x86Reg Reg, int MipsReg, BOOL Lo
|
|||
Reg = FreeX86Reg();
|
||||
if (Reg == x86_Unknown)
|
||||
{
|
||||
WriteTrace(TraceError,"CRegInfo::Map_TempReg: Failed to find a free register");
|
||||
WriteTrace(TraceError,__FUNCTION__ ": Failed to find a free register");
|
||||
g_Notify->BreakPoint(__FILE__,__LINE__);
|
||||
return x86_Unknown;
|
||||
}
|
||||
|
@ -737,7 +737,7 @@ CX86Ops::x86Reg CRegInfo::Map_TempReg (CX86Ops::x86Reg Reg, int MipsReg, BOOL Lo
|
|||
{
|
||||
Reg = Free8BitX86Reg();
|
||||
if (Reg < 0) {
|
||||
WriteTrace(TraceError,"CRegInfo::Map_TempReg: Failed to find a free 8 bit register");
|
||||
WriteTrace(TraceError,__FUNCTION__ ": Failed to find a free 8 bit register");
|
||||
g_Notify->BreakPoint(__FILE__,__LINE__);
|
||||
return x86_Unknown;
|
||||
}
|
||||
|
@ -745,7 +745,7 @@ CX86Ops::x86Reg CRegInfo::Map_TempReg (CX86Ops::x86Reg Reg, int MipsReg, BOOL Lo
|
|||
} else if (GetX86Mapped(Reg) == GPR_Mapped) {
|
||||
if (GetX86Protected(Reg))
|
||||
{
|
||||
WriteTrace(TraceError,"CRegInfo::Map_TempReg: Register is protected");
|
||||
WriteTrace(TraceError,__FUNCTION__ ": Register is protected");
|
||||
g_Notify->BreakPoint(__FILE__,__LINE__);
|
||||
return x86_Unknown;
|
||||
}
|
||||
|
|
|
@ -312,12 +312,12 @@ void CGfxPlugin::GameReset(void)
|
|||
{
|
||||
if (m_RomOpen)
|
||||
{
|
||||
WriteTrace(TraceGfxPlugin,"RomClosed: Starting");
|
||||
WriteTrace(TraceGfxPlugin,__FUNCTION__ ": Starting");
|
||||
RomClosed();
|
||||
WriteTrace(TraceGfxPlugin,"RomClosed: Done");
|
||||
WriteTrace(TraceGfxPlugin,"RomOpen: Starting");
|
||||
WriteTrace(TraceGfxPlugin,__FUNCTION__ ": Done");
|
||||
WriteTrace(TraceGfxPlugin,__FUNCTION__ ": Starting");
|
||||
RomOpen();
|
||||
WriteTrace(TraceGfxPlugin,"RomOpen: Done");
|
||||
WriteTrace(TraceGfxPlugin,__FUNCTION__ ": Done");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -82,43 +82,43 @@ void CPlugins::GameReset ( void )
|
|||
}
|
||||
void CPlugins::ShutDownPlugins( void ) {
|
||||
if (m_Gfx) {
|
||||
WriteTrace(TraceGfxPlugin,"Close: Starting");
|
||||
WriteTrace(TraceGfxPlugin,__FUNCTION__ ": Close - Starting");
|
||||
m_Gfx->Close();
|
||||
WriteTrace(TraceGfxPlugin,"Close: Done");
|
||||
WriteTrace(TraceGfxPlugin,"deconstructor: Starting");
|
||||
WriteTrace(TraceGfxPlugin,__FUNCTION__ ": Close - Done");
|
||||
WriteTrace(TraceGfxPlugin,__FUNCTION__ ": deconstructor - Starting");
|
||||
delete m_Gfx;
|
||||
WriteTrace(TraceGfxPlugin,"deconstructor: Done");
|
||||
WriteTrace(TraceGfxPlugin,__FUNCTION__ ": deconstructor -Done");
|
||||
m_Gfx = NULL;
|
||||
// g_Settings->UnknownSetting_GFX = NULL;
|
||||
}
|
||||
if (m_Audio) {
|
||||
WriteTrace(TraceDebug,"CPlugins::ShutDownPlugins 5");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": 5");
|
||||
m_Audio->Close();
|
||||
WriteTrace(TraceDebug,"CPlugins::ShutDownPlugins 6");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": 6");
|
||||
delete m_Audio;
|
||||
WriteTrace(TraceDebug,"CPlugins::ShutDownPlugins 7");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": 7");
|
||||
m_Audio = NULL;
|
||||
WriteTrace(TraceDebug,"CPlugins::ShutDownPlugins 8");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": 8");
|
||||
// g_Settings->UnknownSetting_AUDIO = NULL;
|
||||
}
|
||||
if (m_RSP) {
|
||||
WriteTrace(TraceDebug,"CPlugins::ShutDownPlugins 9");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": 9");
|
||||
m_RSP->Close();
|
||||
WriteTrace(TraceDebug,"CPlugins::ShutDownPlugins 10");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": 10");
|
||||
delete m_RSP;
|
||||
WriteTrace(TraceDebug,"CPlugins::ShutDownPlugins 11");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": 11");
|
||||
m_RSP = NULL;
|
||||
WriteTrace(TraceDebug,"CPlugins::ShutDownPlugins 12");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": 12");
|
||||
// g_Settings->UnknownSetting_RSP = NULL;
|
||||
}
|
||||
if (m_Control) {
|
||||
WriteTrace(TraceDebug,"CPlugins::ShutDownPlugins 12");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": 13");
|
||||
m_Control->Close();
|
||||
WriteTrace(TraceDebug,"CPlugins::ShutDownPlugins 13");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": 14");
|
||||
delete m_Control;
|
||||
WriteTrace(TraceDebug,"CPlugins::ShutDownPlugins 14");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": 15");
|
||||
m_Control = NULL;
|
||||
WriteTrace(TraceDebug,"CPlugins::ShutDownPlugins 15");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": 16");
|
||||
// g_Settings->UnknownSetting_CTRL = NULL;
|
||||
}
|
||||
}
|
||||
|
@ -143,36 +143,35 @@ bool CPlugins::Initiate ( void )
|
|||
|
||||
bool CPlugins::InitiateMainThread( void )
|
||||
{
|
||||
WriteTrace(TraceDebug,"CPlugins::Initiate 1");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": Start");
|
||||
//Check to make sure we have the plugin avaliable to be used
|
||||
if (m_Gfx == NULL) { return false; }
|
||||
if (m_Audio == NULL) { return false; }
|
||||
if (m_RSP == NULL) { return false; }
|
||||
if (m_Control == NULL) { return false; }
|
||||
|
||||
WriteTrace(TraceGfxPlugin,"Close: Starting");
|
||||
WriteTrace(TraceGfxPlugin,__FUNCTION__ ": Gfx Close Starting");
|
||||
m_Gfx->Close();
|
||||
WriteTrace(TraceGfxPlugin,"Close: Done");
|
||||
WriteTrace(TraceDebug,"CPlugins::Initiate 3");
|
||||
WriteTrace(TraceGfxPlugin,__FUNCTION__ ": Gfx Close Done");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": 3");
|
||||
m_Audio->Close();
|
||||
WriteTrace(TraceRSP,"Close: Starting");
|
||||
WriteTrace(TraceRSP,__FUNCTION__ ": Rsp Close starting");
|
||||
m_RSP->Close();
|
||||
WriteTrace(TraceRSP,"Close: Done");
|
||||
WriteTrace(TraceRSP,__FUNCTION__ ": Rsp Close done");
|
||||
m_Control->Close();
|
||||
WriteTrace(TraceDebug,"CPlugins::Initiate 6");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ " 6");
|
||||
|
||||
WriteTrace(TraceGfxPlugin,"Initiate: Starting");
|
||||
WriteTrace(TraceGfxPlugin,__FUNCTION__ ": Gfx Initiate Starting");
|
||||
if (!m_Gfx->Initiate(g_System,m_RenderWindow)) { return false; }
|
||||
WriteTrace(TraceGfxPlugin,"Initiate: Done");
|
||||
WriteTrace(TraceDebug,"CPlugins::Initiate 7");
|
||||
WriteTrace(TraceGfxPlugin,__FUNCTION__ ": Gfx Initiate Done");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": 7");
|
||||
if (!m_Audio->Initiate(g_System,m_RenderWindow)) { return false; }
|
||||
WriteTrace(TraceDebug,"CPlugins::Initiate 8");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": 8");
|
||||
if (!m_Control->Initiate(g_System,m_RenderWindow)) { return false; }
|
||||
WriteTrace(TraceRSP ,"Initiate: Starting");
|
||||
WriteTrace(TraceRSP,__FUNCTION__ ": 9");
|
||||
if (!m_RSP->Initiate(this,g_System)) { return false; }
|
||||
WriteTrace(TraceRSP,"Initiate: Done");
|
||||
WriteTrace(TraceDebug,"CPlugins::Initiate 10");
|
||||
|
||||
WriteTrace(TraceRSP,__FUNCTION__ ": 10");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": Done");
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -188,89 +187,89 @@ void CPlugins::Reset ( PLUGIN_TYPE Type )
|
|||
case PLUGIN_TYPE_RSP:
|
||||
if (m_RSP)
|
||||
{
|
||||
WriteTrace(TraceRSP,"Close: Starting");
|
||||
WriteTrace(TraceRSP,__FUNCTION__ ": Rsp close start");
|
||||
m_RSP->Close();
|
||||
WriteTrace(TraceRSP,"Close: Done");
|
||||
WriteTrace(TraceRSP,"deconstructor: Starting");
|
||||
WriteTrace(TraceRSP,__FUNCTION__ ": Rsp close done");
|
||||
WriteTrace(TraceRSP,__FUNCTION__ ": deconstructor Starting");
|
||||
delete m_RSP;
|
||||
WriteTrace(TraceRSP,"deconstructor: Done");
|
||||
WriteTrace(TraceRSP,__FUNCTION__ ": deconstructor Done");
|
||||
m_RSP = NULL;
|
||||
}
|
||||
{
|
||||
m_RSPFile = g_Settings->LoadString(Plugin_RSP_Current);
|
||||
CPath RspPluginFile(m_PluginDir.c_str(),m_RSPFile.c_str());
|
||||
WriteTraceF(TraceRSP,"Loading (%s): Starting",(LPCTSTR)RspPluginFile);
|
||||
WriteTraceF(TraceRSP,__FUNCTION__ "(%s): RSP Loading",(LPCTSTR)RspPluginFile);
|
||||
m_RSP = new CRSP_Plugin(RspPluginFile);
|
||||
WriteTrace(TraceRSP,"Loading Done");
|
||||
WriteTrace(TraceRSP,__FUNCTION__ ": RSP Loading Done");
|
||||
|
||||
}
|
||||
WriteTraceF(TraceRSP,"Current Ver: %s",m_RSP->PluginName().c_str());
|
||||
WriteTraceF(TraceRSP,__FUNCTION__ ": RSP Current Ver: %s",m_RSP->PluginName().c_str());
|
||||
g_Settings->SaveString(Plugin_RSP_CurVer,m_RSP->PluginName().c_str());
|
||||
|
||||
//Enable debugger
|
||||
if (m_RSP->EnableDebugging)
|
||||
{
|
||||
WriteTrace(TraceRSP,"EnableDebugging: starting");
|
||||
WriteTrace(TraceRSP,__FUNCTION__ ": EnableDebugging starting");
|
||||
m_RSP->EnableDebugging(bHaveDebugger());
|
||||
WriteTrace(TraceRSP,"EnableDebugging: done");
|
||||
WriteTrace(TraceRSP,__FUNCTION__ ": EnableDebugging done");
|
||||
}
|
||||
break;
|
||||
case PLUGIN_TYPE_GFX:
|
||||
if (m_Gfx)
|
||||
{
|
||||
WriteTrace(TraceGfxPlugin,"Close: Starting");
|
||||
WriteTrace(TraceGfxPlugin,__FUNCTION__ ": GFX Close Starting");
|
||||
m_Gfx->Close();
|
||||
WriteTrace(TraceGfxPlugin,"Close: Done");
|
||||
WriteTrace(TraceGfxPlugin,"deconstructor: Starting");
|
||||
WriteTrace(TraceGfxPlugin,__FUNCTION__ ": GFX Close Done");
|
||||
WriteTrace(TraceGfxPlugin,__FUNCTION__ ": GFX deconstructor: Starting");
|
||||
delete m_Gfx;
|
||||
WriteTrace(TraceGfxPlugin,"deconstructor: Done");
|
||||
WriteTrace(TraceGfxPlugin,__FUNCTION__ ": GFX deconstructor: Done");
|
||||
m_Gfx = NULL;
|
||||
}
|
||||
{
|
||||
m_GfxFile = g_Settings->LoadString(Game_Plugin_Gfx);
|
||||
CPath GfxPluginFile(m_PluginDir.c_str(),m_GfxFile.c_str());
|
||||
WriteTraceF(TraceGfxPlugin,"Loading (%s): Starting",(LPCTSTR)GfxPluginFile);
|
||||
WriteTraceF(TraceGfxPlugin,__FUNCTION__ ": GFX Loading (%s): Starting",(LPCTSTR)GfxPluginFile);
|
||||
m_Gfx = new CGfxPlugin(GfxPluginFile);
|
||||
WriteTrace(TraceGfxPlugin,"Loading Done");
|
||||
WriteTrace(TraceGfxPlugin,__FUNCTION__ ": GFX Loading Done");
|
||||
}
|
||||
WriteTraceF(TraceGfxPlugin,"Current Ver: %s",m_Gfx->PluginName().c_str());
|
||||
WriteTraceF(TraceGfxPlugin,__FUNCTION__ ": GFX Current Ver: %s",m_Gfx->PluginName().c_str());
|
||||
g_Settings->SaveString(Plugin_GFX_CurVer,m_Gfx->PluginName().c_str());
|
||||
break;
|
||||
case PLUGIN_TYPE_AUDIO:
|
||||
if (m_Audio) {
|
||||
WriteTrace(TraceDebug,"Audio Plugin: Close Starting");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": Audio Plugin: Close Starting");
|
||||
m_Audio->Close();
|
||||
WriteTrace(TraceDebug,"Audio Plugin: Close done");
|
||||
WriteTrace(TraceDebug,"Audio Plugin: Deconstructor Starting");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": Audio Plugin: Close done");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": Audio Plugin: Deconstructor Starting");
|
||||
delete m_Audio;
|
||||
WriteTrace(TraceDebug,"Audio Plugin: Deconstructor Done");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": Audio Plugin: Deconstructor Done");
|
||||
m_Audio = NULL;
|
||||
}
|
||||
{
|
||||
m_AudioFile = g_Settings->LoadString(Game_Plugin_Audio);
|
||||
CPath PluginFile(m_PluginDir.c_str(),m_AudioFile.c_str());
|
||||
WriteTraceF(TraceDebug,"Loading (%s): Starting",(LPCTSTR)PluginFile);
|
||||
WriteTraceF(TraceDebug,__FUNCTION__ ": Loading Audio Plugin (%s): Starting",(LPCTSTR)PluginFile);
|
||||
m_Audio = new CAudioPlugin(PluginFile);
|
||||
WriteTrace(TraceDebug,"Loading Done");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": Loading Audio Plugin Done");
|
||||
g_Settings->SaveString(Plugin_AUDIO_CurVer,m_Audio->PluginName().c_str());
|
||||
}
|
||||
break;
|
||||
case PLUGIN_TYPE_CONTROLLER:
|
||||
if (m_Control) {
|
||||
WriteTrace(TraceDebug,"Controller Plugin: Close Starting");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": Controller Plugin: Close Starting");
|
||||
m_Control->Close();
|
||||
WriteTrace(TraceDebug,"Controller Plugin: Close done");
|
||||
WriteTrace(TraceDebug,"Controller Plugin: Deconstructor Starting");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": Controller Plugin: Close done");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": Controller Plugin: Deconstructor Starting");
|
||||
delete m_Control;
|
||||
WriteTrace(TraceDebug,"Controller Plugin: Deconstructor Done");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": Controller Plugin: Deconstructor Done");
|
||||
m_Control = NULL;
|
||||
}
|
||||
{
|
||||
m_ControlFile = g_Settings->LoadString(Game_Plugin_Controller);
|
||||
CPath PluginFile(m_PluginDir.c_str(),m_ControlFile.c_str());
|
||||
WriteTraceF(TraceDebug,"Loading (%s): Starting",(LPCTSTR)PluginFile);
|
||||
WriteTraceF(TraceDebug,__FUNCTION__ ": Loading (%s): Starting",(LPCTSTR)PluginFile);
|
||||
m_Control = new CControl_Plugin(PluginFile);
|
||||
WriteTrace(TraceDebug,"Loading Done");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": Loading Done");
|
||||
g_Settings->SaveString(Plugin_CONT_CurVer,m_Control->PluginName().c_str());
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -30,10 +30,10 @@ const CPluginList::PLUGIN * CPluginList::GetPluginInfo ( int indx ) const
|
|||
|
||||
bool CPluginList::LoadList()
|
||||
{
|
||||
WriteTrace(TraceDebug,"CPluginList::LoadList - Start");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": Start");
|
||||
m_PluginList.clear();
|
||||
AddPluginFromDir(m_PluginDir);
|
||||
WriteTrace(TraceDebug,"CPluginList::LoadList - Done");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": Done");
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -60,7 +60,7 @@ void CPluginList::AddPluginFromDir ( CPath Dir)
|
|||
}
|
||||
|
||||
UINT LastErrorMode = SetErrorMode( SEM_FAILCRITICALERRORS );
|
||||
WriteTraceF(TraceDebug,"CPluginList::LoadList - loading %s",(LPCSTR)Dir);
|
||||
WriteTraceF(TraceDebug,__FUNCTION__ ": loading %s",(LPCSTR)Dir);
|
||||
hLib = LoadLibrary(Dir);
|
||||
SetErrorMode(LastErrorMode);
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ bool CSettingTypeRDBYesNo::Load ( int Index, bool & Value ) const
|
|||
LoadDefault(Index,Value);
|
||||
return false;
|
||||
} else {
|
||||
WriteTraceF(TraceError,"Invalid Yes/No setting value (Section: %s Key: %s Value: %s)",m_SectionIdent->c_str(),String,m_KeyName.c_str(),strValue.c_str());
|
||||
WriteTraceF(TraceError,__FUNCTION__ ": Invalid Yes/No setting value (Section: %s Key: %s Value: %s)",m_SectionIdent->c_str(),String,m_KeyName.c_str(),strValue.c_str());
|
||||
LoadDefault(Index,Value);
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -69,7 +69,7 @@ CMainGui::CMainGui (bool bMainWindow, const char * WindowTitle ) :
|
|||
|
||||
CMainGui::~CMainGui (void)
|
||||
{
|
||||
WriteTrace(TraceDebug,"CMainGui::~CMainGui - start");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": Start");
|
||||
if (m_bMainWindow)
|
||||
{
|
||||
g_Settings->UnregisterChangeCB(RomBrowser_Enabled,this,(CSettings::SettingChangedFunc)RomBowserEnabledChanged);
|
||||
|
@ -80,7 +80,7 @@ CMainGui::~CMainGui (void)
|
|||
{
|
||||
DestroyWindow((HWND)m_hMainWindow);
|
||||
}
|
||||
WriteTrace(TraceDebug,"CMainGui::~CMainGui - Done");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": Done");
|
||||
}
|
||||
|
||||
void RomBowserEnabledChanged (CMainGui * Gui)
|
||||
|
@ -524,9 +524,9 @@ DWORD CALLBACK CMainGui::MainGui_Proc (WND_HANDLE hWnd, DWORD uMsg, DWORD wParam
|
|||
}
|
||||
if (CGuiSettings::bCPURunning() && g_BaseSystem) {
|
||||
if (g_Plugins->Gfx() && g_Plugins->Gfx()->MoveScreen) {
|
||||
WriteTrace(TraceGfxPlugin,"MoveScreen: Starting");
|
||||
WriteTrace(TraceGfxPlugin,__FUNCTION__ ": Starting");
|
||||
g_Plugins->Gfx()->MoveScreen((int)(short) LOWORD(lParam), (int)(short) HIWORD(lParam));
|
||||
WriteTrace(TraceGfxPlugin,"MoveScreen: Done");
|
||||
WriteTrace(TraceGfxPlugin,__FUNCTION__ ": Done");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -784,9 +784,9 @@ DWORD CALLBACK CMainGui::MainGui_Proc (WND_HANDLE hWnd, DWORD uMsg, DWORD wParam
|
|||
} else if (LOWORD(wParam) > 5100 && LOWORD(wParam) <= 5200 ) {
|
||||
if (g_Plugins->Gfx())
|
||||
{
|
||||
WriteTrace(TraceGfxPlugin,"ProcessMenuItem: Starting");
|
||||
WriteTrace(TraceGfxPlugin,__FUNCTION__ ": Starting");
|
||||
g_Plugins->Gfx()->ProcessMenuItem(LOWORD(wParam));
|
||||
WriteTrace(TraceGfxPlugin,"ProcessMenuItem: Done");
|
||||
WriteTrace(TraceGfxPlugin,__FUNCTION__ ": Done");
|
||||
}
|
||||
} else if (LOWORD(wParam) > 5200 && LOWORD(wParam) <= 5300 ) {
|
||||
if (g_Plugins->Gfx() && g_Plugins->Gfx()->OnRomBrowserMenuItem != NULL)
|
||||
|
@ -799,9 +799,9 @@ DWORD CALLBACK CMainGui::MainGui_Proc (WND_HANDLE hWnd, DWORD uMsg, DWORD wParam
|
|||
Rom.SaveRomSettingID();
|
||||
g_Notify->DisplayMessage(0,"");
|
||||
BYTE * RomHeader = Rom.GetRomAddress();
|
||||
WriteTrace(TraceGfxPlugin,"OnRomBrowserMenuItem: Starting");
|
||||
WriteTrace(TraceGfxPlugin,__FUNCTION__ ": OnRomBrowserMenuItem - Starting");
|
||||
g_Plugins->Gfx()->OnRomBrowserMenuItem(LOWORD(wParam),hWnd,RomHeader);
|
||||
WriteTrace(TraceGfxPlugin,"OnRomBrowserMenuItem: Done");
|
||||
WriteTrace(TraceGfxPlugin,__FUNCTION__ ": OnRomBrowserMenuItem - Done");
|
||||
if (g_Rom) {
|
||||
g_Rom->SaveRomSettingID();
|
||||
} else {
|
||||
|
@ -816,7 +816,7 @@ DWORD CALLBACK CMainGui::MainGui_Proc (WND_HANDLE hWnd, DWORD uMsg, DWORD wParam
|
|||
}
|
||||
break;
|
||||
case WM_DESTROY:
|
||||
WriteTrace(TraceDebug,"WM_DESTROY - start");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": WM_DESTROY - start");
|
||||
{
|
||||
CMainGui * _this = (CMainGui *)GetProp((HWND)hWnd,"Class");
|
||||
if (_this->m_bMainWindow)
|
||||
|
@ -824,19 +824,19 @@ DWORD CALLBACK CMainGui::MainGui_Proc (WND_HANDLE hWnd, DWORD uMsg, DWORD wParam
|
|||
g_Notify->WindowMode();
|
||||
}
|
||||
_this->m_hMainWindow = NULL;
|
||||
WriteTrace(TraceDebug,"WM_DESTROY - 1");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": WM_DESTROY - 1");
|
||||
if (_this->m_bMainWindow)
|
||||
{
|
||||
_this->SaveRomListColoumnInfo();
|
||||
WriteTrace(TraceDebug,"WM_DESTROY - 2");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": WM_DESTROY - 2");
|
||||
_this->SaveWindowLoc();
|
||||
}
|
||||
}
|
||||
WriteTrace(TraceDebug,"WM_DESTROY - 3");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": WM_DESTROY - 3");
|
||||
RemoveProp((HWND)hWnd,"Class");
|
||||
WriteTrace(TraceDebug,"WM_DESTROY - 4");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": WM_DESTROY - 4");
|
||||
PostQuitMessage(0);
|
||||
WriteTrace(TraceDebug,"WM_DESTROY - end");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": WM_DESTROY - Done");
|
||||
break;
|
||||
default:
|
||||
{
|
||||
|
|
|
@ -80,53 +80,53 @@ bool CMainMenu::ProcessMessage(WND_HANDLE hWnd, DWORD /*FromAccelerator*/, DWORD
|
|||
g_BaseSystem->StartEmulation(true);
|
||||
break;
|
||||
case ID_FILE_ENDEMULATION:
|
||||
WriteTrace(TraceDebug,"ID_FILE_ENDEMULATION");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": ID_FILE_ENDEMULATION");
|
||||
g_BaseSystem->CloseCpu();
|
||||
_Gui->SaveWindowLoc();
|
||||
break;
|
||||
case ID_FILE_ROMDIRECTORY:
|
||||
WriteTrace(TraceDebug,"ID_FILE_ROMDIRECTORY 1");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": ID_FILE_ROMDIRECTORY 1");
|
||||
_Gui->SelectRomDir();
|
||||
WriteTrace(TraceDebug,"ID_FILE_ROMDIRECTORY 2");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": ID_FILE_ROMDIRECTORY 2");
|
||||
_Gui->RefreshMenu();
|
||||
WriteTrace(TraceDebug,"ID_FILE_ROMDIRECTORY 3");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": ID_FILE_ROMDIRECTORY 3");
|
||||
break;
|
||||
case ID_FILE_REFRESHROMLIST: _Gui->RefreshRomBrowser(); break;
|
||||
case ID_FILE_EXIT: DestroyWindow((HWND)hWnd); break;
|
||||
case ID_SYSTEM_RESET_SOFT:
|
||||
WriteTrace(TraceDebug,"ID_SYSTEM_RESET_SOFT");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": ID_SYSTEM_RESET_SOFT");
|
||||
g_BaseSystem->ExternalEvent(SysEvent_ResetCPU_Soft);
|
||||
break;
|
||||
case ID_SYSTEM_RESET_HARD:
|
||||
WriteTrace(TraceDebug,"ID_SYSTEM_RESET_HARD");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": ID_SYSTEM_RESET_HARD");
|
||||
g_BaseSystem->ExternalEvent(SysEvent_ResetCPU_Hard);
|
||||
break;
|
||||
case ID_SYSTEM_PAUSE:
|
||||
_Gui->SaveWindowLoc();
|
||||
WriteTrace(TraceDebug,"ID_SYSTEM_PAUSE");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": ID_SYSTEM_PAUSE");
|
||||
if (g_Settings->LoadBool(GameRunning_CPU_Paused))
|
||||
{
|
||||
g_BaseSystem->ExternalEvent(SysEvent_ResumeCPU_FromMenu);
|
||||
} else {
|
||||
g_BaseSystem->ExternalEvent(SysEvent_PauseCPU_FromMenu);
|
||||
}
|
||||
WriteTrace(TraceDebug,"ID_SYSTEM_PAUSE 1");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": ID_SYSTEM_PAUSE 1");
|
||||
break;
|
||||
case ID_SYSTEM_BITMAP:
|
||||
{
|
||||
stdstr Dir(g_Settings->LoadString(Directory_SnapShot));
|
||||
WriteTraceF(TraceGfxPlugin,"CaptureScreen(%s): Starting",Dir.c_str());
|
||||
WriteTraceF(TraceGfxPlugin,__FUNCTION__ ": CaptureScreen(%s): Starting",Dir.c_str());
|
||||
g_Plugins->Gfx()->CaptureScreen(Dir.c_str());
|
||||
WriteTrace(TraceGfxPlugin,"CaptureScreen: Done");
|
||||
WriteTrace(TraceGfxPlugin,__FUNCTION__ ": CaptureScreen: Done");
|
||||
}
|
||||
break;
|
||||
case ID_SYSTEM_LIMITFPS:
|
||||
WriteTrace(TraceDebug,"ID_SYSTEM_LIMITFPS");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": ID_SYSTEM_LIMITFPS");
|
||||
g_Settings->SaveBool(GameRunning_LimitFPS,!g_Settings->LoadBool(GameRunning_LimitFPS));
|
||||
WriteTrace(TraceDebug,"ID_SYSTEM_LIMITFPS 1");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": ID_SYSTEM_LIMITFPS 1");
|
||||
break;
|
||||
case ID_SYSTEM_SAVE:
|
||||
WriteTrace(TraceDebug,"ID_SYSTEM_SAVE");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": ID_SYSTEM_SAVE");
|
||||
g_BaseSystem->ExternalEvent(SysEvent_SaveMachineState);
|
||||
break;
|
||||
case ID_SYSTEM_SAVEAS:
|
||||
|
@ -172,7 +172,7 @@ bool CMainMenu::ProcessMessage(WND_HANDLE hWnd, DWORD /*FromAccelerator*/, DWORD
|
|||
g_BaseSystem->ExternalEvent(SysEvent_ResumeCPU_SaveGame);
|
||||
}
|
||||
break;
|
||||
case ID_SYSTEM_RESTORE: WriteTrace(TraceDebug,"ID_SYSTEM_RESTORE"); g_BaseSystem->ExternalEvent(SysEvent_LoadMachineState); break;
|
||||
case ID_SYSTEM_RESTORE: WriteTrace(TraceDebug,__FUNCTION__ ": ID_SYSTEM_RESTORE"); g_BaseSystem->ExternalEvent(SysEvent_LoadMachineState); break;
|
||||
case ID_SYSTEM_LOAD:
|
||||
{
|
||||
char Directory[255], SaveFile[255];
|
||||
|
@ -239,43 +239,43 @@ bool CMainMenu::ProcessMessage(WND_HANDLE hWnd, DWORD /*FromAccelerator*/, DWORD
|
|||
case ID_OPTIONS_FULLSCREEN2:
|
||||
if (g_Settings->LoadBool(UserInterface_InFullScreen))
|
||||
{
|
||||
WriteTrace(TraceDebug,"ID_OPTIONS_FULLSCREEN a");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": ID_OPTIONS_FULLSCREEN a");
|
||||
_Gui->MakeWindowOnTop(false);
|
||||
Notify().SetGfxPlugin(NULL);
|
||||
WriteTrace(TraceGfxPlugin,"ChangeWindow: Starting");
|
||||
WriteTrace(TraceGfxPlugin,__FUNCTION__ ": ChangeWindow: Starting");
|
||||
g_Plugins->Gfx()->ChangeWindow();
|
||||
WriteTrace(TraceGfxPlugin,"ChangeWindow: Done");
|
||||
WriteTrace(TraceGfxPlugin,__FUNCTION__ ": ChangeWindow: Done");
|
||||
ShowCursor(true);
|
||||
_Gui->ShowStatusBar(true);
|
||||
_Gui->MakeWindowOnTop(g_Settings->LoadBool(UserInterface_AlwaysOnTop));
|
||||
g_Settings->SaveBool(UserInterface_InFullScreen,(DWORD)false);
|
||||
} else {
|
||||
WriteTrace(TraceDebug,"ID_OPTIONS_FULLSCREEN b");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": ID_OPTIONS_FULLSCREEN b");
|
||||
ShowCursor(false);
|
||||
WriteTrace(TraceDebug,"ID_OPTIONS_FULLSCREEN b 1");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": ID_OPTIONS_FULLSCREEN b 1");
|
||||
_Gui->ShowStatusBar(false);
|
||||
WriteTrace(TraceDebug,"ID_OPTIONS_FULLSCREEN b 2");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": ID_OPTIONS_FULLSCREEN b 2");
|
||||
try {
|
||||
WriteTrace(TraceGfxPlugin,"ChangeWindow: Starting");
|
||||
WriteTrace(TraceGfxPlugin,__FUNCTION__ ": ChangeWindow: Starting");
|
||||
g_Plugins->Gfx()->ChangeWindow();
|
||||
WriteTrace(TraceGfxPlugin,"ChangeWindow: Done");
|
||||
WriteTrace(TraceGfxPlugin,__FUNCTION__ ": ChangeWindow: Done");
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
WriteTrace(TraceError,"Exception when going to full screen");
|
||||
WriteTrace(TraceError,__FUNCTION__ ": Exception when going to full screen");
|
||||
char Message[600];
|
||||
sprintf(Message,"Exception caught\nFile: %s\nLine: %d",__FILE__,__LINE__);
|
||||
MessageBox(NULL,Message,"Exception",MB_OK);
|
||||
}
|
||||
WriteTrace(TraceDebug,"ID_OPTIONS_FULLSCREEN b 4");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": ID_OPTIONS_FULLSCREEN b 4");
|
||||
_Gui->MakeWindowOnTop(false);
|
||||
WriteTrace(TraceDebug,"ID_OPTIONS_FULLSCREEN b 5");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": ID_OPTIONS_FULLSCREEN b 5");
|
||||
Notify().SetGfxPlugin(g_Plugins->Gfx());
|
||||
WriteTrace(TraceDebug,"ID_OPTIONS_FULLSCREEN b 3");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": ID_OPTIONS_FULLSCREEN b 3");
|
||||
g_Settings->SaveBool(UserInterface_InFullScreen,true);
|
||||
WriteTrace(TraceDebug,"ID_OPTIONS_FULLSCREEN b 6");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": ID_OPTIONS_FULLSCREEN b 6");
|
||||
}
|
||||
WriteTrace(TraceDebug,"ID_OPTIONS_FULLSCREEN 1");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": ID_OPTIONS_FULLSCREEN 1");
|
||||
break;
|
||||
case ID_OPTIONS_ALWAYSONTOP:
|
||||
if (g_Settings->LoadDword(UserInterface_AlwaysOnTop)) {
|
||||
|
@ -286,12 +286,12 @@ bool CMainMenu::ProcessMessage(WND_HANDLE hWnd, DWORD /*FromAccelerator*/, DWORD
|
|||
_Gui->MakeWindowOnTop(g_Settings->LoadBool(GameRunning_CPU_Running));
|
||||
}
|
||||
break;
|
||||
case ID_OPTIONS_CONFIG_RSP: WriteTrace(TraceDebug,"ID_OPTIONS_CONFIG_RSP"); g_Plugins->ConfigPlugin((DWORD)hWnd,PLUGIN_TYPE_RSP); break;
|
||||
case ID_OPTIONS_CONFIG_GFX: WriteTrace(TraceDebug,"ID_OPTIONS_CONFIG_GFX"); g_Plugins->ConfigPlugin((DWORD)hWnd,PLUGIN_TYPE_GFX); break;
|
||||
case ID_OPTIONS_CONFIG_AUDIO:WriteTrace(TraceDebug,"ID_OPTIONS_CONFIG_AUDIO"); g_Plugins->ConfigPlugin((DWORD)hWnd,PLUGIN_TYPE_AUDIO); break;
|
||||
case ID_OPTIONS_CONFIG_CONT: WriteTrace(TraceDebug,"ID_OPTIONS_CONFIG_CONT"); g_Plugins->ConfigPlugin((DWORD)hWnd,PLUGIN_TYPE_CONTROLLER); break;
|
||||
case ID_OPTIONS_CONFIG_RSP: WriteTrace(TraceDebug,__FUNCTION__ ": ID_OPTIONS_CONFIG_RSP"); g_Plugins->ConfigPlugin((DWORD)hWnd,PLUGIN_TYPE_RSP); break;
|
||||
case ID_OPTIONS_CONFIG_GFX: WriteTrace(TraceDebug,__FUNCTION__ ": ID_OPTIONS_CONFIG_GFX"); g_Plugins->ConfigPlugin((DWORD)hWnd,PLUGIN_TYPE_GFX); break;
|
||||
case ID_OPTIONS_CONFIG_AUDIO:WriteTrace(TraceDebug,__FUNCTION__ ": ID_OPTIONS_CONFIG_AUDIO"); g_Plugins->ConfigPlugin((DWORD)hWnd,PLUGIN_TYPE_AUDIO); break;
|
||||
case ID_OPTIONS_CONFIG_CONT: WriteTrace(TraceDebug,__FUNCTION__ ": ID_OPTIONS_CONFIG_CONT"); g_Plugins->ConfigPlugin((DWORD)hWnd,PLUGIN_TYPE_CONTROLLER); break;
|
||||
case ID_OPTIONS_CPU_USAGE:
|
||||
WriteTrace(TraceDebug,"ID_OPTIONS_CPU_USAGE");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": ID_OPTIONS_CPU_USAGE");
|
||||
if (g_Settings->LoadBool(UserInterface_ShowCPUPer))
|
||||
{
|
||||
g_Settings->SaveBool(UserInterface_ShowCPUPer,false);
|
||||
|
@ -1175,19 +1175,19 @@ void CMainMenu::RebuildAccelerators(void) {
|
|||
CGuard Guard(m_CS);
|
||||
|
||||
//Delete the old accel list
|
||||
WriteTrace(TraceDebug,"CMainMenu::RebuildAccelerators - Start");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": Start");
|
||||
|
||||
HACCEL m_OldAccelTable = (HACCEL)m_AccelTable;
|
||||
m_AccelTable = m_ShortCuts.GetAcceleratorTable();
|
||||
if (m_OldAccelTable) {
|
||||
DestroyAcceleratorTable(m_OldAccelTable);
|
||||
}
|
||||
WriteTrace(TraceDebug,"CMainMenu::RebuildAccelerators - Done");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": Done");
|
||||
}
|
||||
|
||||
void CMainMenu::ResetMenu(void) {
|
||||
WriteTrace(TraceDebug,"CMainMenu::ResetMenu - Start");
|
||||
|
||||
void CMainMenu::ResetMenu(void)
|
||||
{
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": Start");
|
||||
{
|
||||
CGuard Guard(m_CS);
|
||||
m_ShortCuts.Load();
|
||||
|
@ -1196,10 +1196,10 @@ void CMainMenu::ResetMenu(void) {
|
|||
if (!g_Settings->LoadBool(UserInterface_InFullScreen))
|
||||
{
|
||||
//Create a new window with all the items
|
||||
WriteTrace(TraceDebug,"CMainMenu::ResetMenu - Create Menu");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": Create Menu");
|
||||
MENU_HANDLE hMenu = (MENU_HANDLE)CreateMenu();
|
||||
FillOutMenu(hMenu);
|
||||
WriteTrace(TraceDebug,"CMainMenu::ResetMenu - Create Menu Done");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": Create Menu Done");
|
||||
|
||||
//save old menu to destroy latter
|
||||
MENU_HANDLE OldMenuHandle;
|
||||
|
@ -1208,12 +1208,12 @@ void CMainMenu::ResetMenu(void) {
|
|||
OldMenuHandle = m_MenuHandle;
|
||||
|
||||
//save handle and re-attach to a window
|
||||
WriteTrace(TraceDebug,"CMainMenu::ResetMenu - Attach Menu");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": Attach Menu");
|
||||
m_MenuHandle = hMenu;
|
||||
}
|
||||
_Gui->SetWindowMenu(this);
|
||||
|
||||
WriteTrace(TraceDebug,"CMainMenu::ResetMenu - Remove plugin menu");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": Remove plugin menu");
|
||||
if (g_Plugins->Gfx() != NULL && IsMenu((HMENU)g_Plugins->Gfx()->GetDebugMenu()))
|
||||
{
|
||||
RemoveMenu((HMENU)OldMenuHandle,(DWORD)g_Plugins->Gfx()->GetDebugMenu(), MF_BYCOMMAND);
|
||||
|
@ -1222,7 +1222,7 @@ void CMainMenu::ResetMenu(void) {
|
|||
{
|
||||
RemoveMenu((HMENU)OldMenuHandle,(DWORD)g_Plugins->RSP()->GetDebugMenu(), MF_BYCOMMAND);
|
||||
}
|
||||
WriteTrace(TraceDebug,"CMainMenu::ResetMenu - Destroy Old Menu");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": Destroy Old Menu");
|
||||
|
||||
//Destroy the old menu
|
||||
DestroyMenu((HMENU)OldMenuHandle);
|
||||
|
@ -1230,7 +1230,7 @@ void CMainMenu::ResetMenu(void) {
|
|||
|
||||
ResetAccelerators();
|
||||
|
||||
WriteTrace(TraceDebug,"CMainMenu::ResetMenu Done");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": Done");
|
||||
}
|
||||
|
||||
/*LanguageStringID CMainMenu::GetShortCutMenuItemName(MSC_MAP * ShortCuts, WORD key, bool bCtrl, bool bAlt, bool bShift, CMenuShortCutKey::ACCESS_MODE Access) {
|
||||
|
|
|
@ -487,9 +487,9 @@ HACCEL CShortCuts::GetAcceleratorTable ( void )
|
|||
}
|
||||
}
|
||||
|
||||
WriteTrace(TraceDebug,"CMainMenu::RebuildAccelerators - CreateAcceleratorTable");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": CreateAcceleratorTable");
|
||||
HACCEL AccelTable = CreateAcceleratorTable(AccelList,size);
|
||||
WriteTrace(TraceDebug,"CMainMenu::RebuildAccelerators - Delete accel list");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": Delete accel list");
|
||||
delete [] AccelList;
|
||||
return AccelTable;
|
||||
}
|
||||
|
|
|
@ -98,9 +98,9 @@ void CNotification::DisplayMessage ( int DisplayTime, const char * Message, va_
|
|||
{
|
||||
if (_gfxPlugin && _gfxPlugin->DrawStatus)
|
||||
{
|
||||
WriteTrace(TraceGfxPlugin,"DrawStatus: Starting");
|
||||
WriteTrace(TraceGfxPlugin,__FUNCTION__ ": DrawStatus - Starting");
|
||||
_gfxPlugin->DrawStatus(Msg,FALSE);
|
||||
WriteTrace(TraceGfxPlugin,"DrawStatus: Done");
|
||||
WriteTrace(TraceGfxPlugin,__FUNCTION__ ": DrawStatus - Done");
|
||||
}
|
||||
} else {
|
||||
_hWnd->SetStatusText(0,Msg);
|
||||
|
|
|
@ -976,41 +976,41 @@ void CRomBrowser::RefreshRomBrowserStatic (CRomBrowser * _this)
|
|||
DeleteFile(CacheFileName.c_str());
|
||||
|
||||
//clear all current items
|
||||
WriteTrace(TraceDebug,"CRomBrowser::RefreshRomBrowserStatic 1");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ " 1");
|
||||
ListView_DeleteAllItems((HWND)_this->m_hRomList);
|
||||
_this->DeallocateBrushs();
|
||||
_this->m_RomInfo.clear();
|
||||
WriteTrace(TraceDebug,"CRomBrowser::RefreshRomBrowserStatic 2");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ " 2");
|
||||
InvalidateRect((HWND)_this->m_hRomList,NULL,TRUE);
|
||||
Sleep(100);
|
||||
WriteTrace(TraceDebug,"CRomBrowser::RefreshRomBrowserStatic 3");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ " 3");
|
||||
|
||||
if (_this->m_WatchRomDir != g_Settings->LoadString(Directory_Game))
|
||||
{
|
||||
WriteTrace(TraceDebug,"CRomBrowser::RefreshRomBrowserStatic 4");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ " 4");
|
||||
_this->WatchThreadStop();
|
||||
WriteTrace(TraceDebug,"CRomBrowser::RefreshRomBrowserStatic 5");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ " 5");
|
||||
_this->WatchThreadStart();
|
||||
WriteTrace(TraceDebug,"CRomBrowser::RefreshRomBrowserStatic 6");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ " 6");
|
||||
}
|
||||
|
||||
WriteTrace(TraceDebug,"CRomBrowser::RefreshRomBrowserStatic 7");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ " 7");
|
||||
stdstr RomDir = g_Settings->LoadString(Directory_Game);
|
||||
stdstr LastRom = g_Settings->LoadStringIndex(File_RecentGameFileIndex,0);
|
||||
WriteTrace(TraceDebug,"CRomBrowser::RefreshRomBrowserStatic 8");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ " 8");
|
||||
|
||||
strlist FileNames;
|
||||
_this->FillRomList (FileNames, CPath(RomDir),stdstr(""), LastRom.c_str());
|
||||
WriteTrace(TraceDebug,"CRomBrowser::RefreshRomBrowserStatic 9");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ " 9");
|
||||
_this->SaveRomList(FileNames);
|
||||
WriteTrace(TraceDebug,"CRomBrowser::RefreshRomBrowserStatic 10");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ " 10");
|
||||
CloseHandle(_this->m_RefreshThread);
|
||||
_this->m_RefreshThread = NULL;
|
||||
WriteTrace(TraceDebug,"CRomBrowser::RefreshRomBrowserStatic 11");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ " 11");
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
WriteTraceF(TraceError,_T("CRomBrowser::RefreshRomBrowserStatic(): Unhandled Exception "));
|
||||
WriteTrace(TraceError,__FUNCTION__ "(): Unhandled Exception ");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1465,7 +1465,7 @@ void CRomBrowser::SaveRomList ( strlist & FileList )
|
|||
}
|
||||
|
||||
void CRomBrowser::SaveRomListColoumnInfo(void) {
|
||||
WriteTrace(TraceDebug,"SaveRomListColoumnInfo - Start");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": Start");
|
||||
// if (!RomBrowserVisible()) { return; }
|
||||
if (g_Settings == NULL) { return; }
|
||||
|
||||
|
@ -1493,7 +1493,7 @@ void CRomBrowser::SaveRomListColoumnInfo(void) {
|
|||
}
|
||||
}
|
||||
}
|
||||
WriteTrace(TraceDebug,"SaveRomListColoumnInfo - Done");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": Done");
|
||||
}
|
||||
|
||||
int CALLBACK CRomBrowser::SelectRomDirCallBack(WND_HANDLE hwnd,DWORD uMsg,DWORD /*lp*/, DWORD lpData)
|
||||
|
@ -1518,7 +1518,7 @@ void CRomBrowser::SelectRomDir(void)
|
|||
LPITEMIDLIST pidl;
|
||||
BROWSEINFO bi;
|
||||
|
||||
WriteTrace(TraceDebug,"CRomBrowser::SelectRomDir 1");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ " 1");
|
||||
stdstr RomDir = g_Settings->LoadString(Directory_Game);
|
||||
bi.hwndOwner = (HWND)m_MainWindow;
|
||||
bi.pidlRoot = NULL;
|
||||
|
@ -1527,25 +1527,25 @@ void CRomBrowser::SelectRomDir(void)
|
|||
bi.ulFlags = BIF_RETURNFSANCESTORS | BIF_RETURNONLYFSDIRS;
|
||||
bi.lpfn = (BFFCALLBACK)SelectRomDirCallBack;
|
||||
bi.lParam = (DWORD)RomDir.c_str();
|
||||
WriteTrace(TraceDebug,"CRomBrowser::SelectRomDir 2");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ " 2");
|
||||
if ((pidl = SHBrowseForFolder(&bi)) != NULL) {
|
||||
WriteTrace(TraceDebug,"CRomBrowser::SelectRomDir 3");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ " 3");
|
||||
char Directory[_MAX_PATH];
|
||||
if (SHGetPathFromIDList(pidl, Directory)) {
|
||||
int len = strlen(Directory);
|
||||
|
||||
WriteTrace(TraceDebug,"CRomBrowser::SelectRomDir 4");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ " 4");
|
||||
if (Directory[len - 1] != '\\') {
|
||||
strcat(Directory,"\\");
|
||||
}
|
||||
WriteTrace(TraceDebug,"CRomBrowser::SelectRomDir 4");
|
||||
WriteTrace(TraceDebug,"CRomBrowser::SelectRomDir 6");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ " 5");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ " 6");
|
||||
g_Settings->SaveString(Directory_Game,Directory);
|
||||
WriteTrace(TraceDebug,"CRomBrowser::SelectRomDir 7");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ " 7");
|
||||
g_Notify->AddRecentDir(Directory);
|
||||
WriteTrace(TraceDebug,"CRomBrowser::SelectRomDir 8");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ " 8");
|
||||
RefreshRomBrowser();
|
||||
WriteTrace(TraceDebug,"CRomBrowser::SelectRomDir 9");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ " 9");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1687,7 +1687,7 @@ MD5 CRomBrowser::RomListHash ( strlist & FileList )
|
|||
NewFileNames += ";";
|
||||
}
|
||||
MD5 md5Hash((const unsigned char *)NewFileNames.c_str(), NewFileNames.length());
|
||||
WriteTraceF(TraceDebug,"RomListHash: %s - %s",md5Hash.hex_digest(),NewFileNames.c_str());
|
||||
WriteTraceF(TraceDebug,__FUNCTION__ ": %s - %s",md5Hash.hex_digest(),NewFileNames.c_str());
|
||||
return md5Hash;
|
||||
}
|
||||
|
||||
|
|
|
@ -260,20 +260,20 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE /*hPrevInstance*/, LPSTR /*lps
|
|||
|
||||
InitializeLog();
|
||||
|
||||
WriteTrace(TraceDebug,"WinMain - Application Starting");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": Application Starting");
|
||||
FixUPXIssue((BYTE *)hInstance);
|
||||
|
||||
g_Notify = &Notify();
|
||||
|
||||
//Create the plugin container
|
||||
WriteTrace(TraceDebug,"WinMain - Create Plugins");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": Create Plugins");
|
||||
g_Plugins = new CPlugins(g_Settings->LoadString(Directory_Plugin));
|
||||
|
||||
//Select the language
|
||||
_Lang->LoadCurrentStrings(true);
|
||||
|
||||
//Create the main window with Menu
|
||||
WriteTrace(TraceDebug,"WinMain - Create Main Window");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": Create Main Window");
|
||||
stdstr WinTitle(AppName);
|
||||
if (g_Settings->LoadBool(Beta_IsBetaVersion))
|
||||
{
|
||||
|
@ -296,27 +296,27 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE /*hPrevInstance*/, LPSTR /*lps
|
|||
}
|
||||
|
||||
if (__argc > 1) {
|
||||
WriteTraceF(TraceDebug,"WinMain - Cmd line found \"%s\"",__argv[1]);
|
||||
WriteTraceF(TraceDebug,__FUNCTION__ ": Cmd line found \"%s\"",__argv[1]);
|
||||
MainWindow.Show(true); //Show the main window
|
||||
CN64System::RunFileImage(__argv[1]);
|
||||
} else {
|
||||
if (g_Settings->LoadDword(RomBrowser_Enabled))
|
||||
{
|
||||
WriteTrace(TraceDebug,"WinMain - Show Rom Browser");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": Show Rom Browser");
|
||||
//Display the rom browser
|
||||
MainWindow.ShowRomList();
|
||||
MainWindow.Show(true); //Show the main window
|
||||
MainWindow.HighLightLastRom();
|
||||
} else {
|
||||
WriteTrace(TraceDebug,"WinMain - Show Main Window");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": Show Main Window");
|
||||
MainWindow.Show(true); //Show the main window
|
||||
}
|
||||
}
|
||||
|
||||
//Process Messages till program is closed
|
||||
WriteTrace(TraceDebug,"WinMain - Entering Message Loop");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": Entering Message Loop");
|
||||
MainWindow.ProcessAllMessages();
|
||||
WriteTrace(TraceDebug,"WinMain - Message Loop Finished");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": Message Loop Finished");
|
||||
|
||||
if (g_BaseSystem)
|
||||
{
|
||||
|
@ -324,17 +324,17 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE /*hPrevInstance*/, LPSTR /*lps
|
|||
delete g_BaseSystem;
|
||||
g_BaseSystem = NULL;
|
||||
}
|
||||
WriteTrace(TraceDebug,"WinMain - System Closed");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": System Closed");
|
||||
|
||||
g_Settings->UnregisterChangeCB(Debugger_AppLogLevel,LogFile,(CSettings::SettingChangedFunc)LogLevelChanged);
|
||||
g_Settings->UnregisterChangeCB(Debugger_AppLogFlush,LogFile,(CSettings::SettingChangedFunc)LogFlushChanged);
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
WriteTraceF(TraceError,"WinMain - Exception caught (File: \"%s\" Line: %d)",__FILE__,__LINE__);
|
||||
WriteTraceF(TraceError,__FUNCTION__ ": Exception caught (File: \"%s\" Line: %d)",__FILE__,__LINE__);
|
||||
MessageBox(NULL,stdstr_f("Exception caught\nFile: %s\nLine: %d",__FILE__,__LINE__).c_str(),"Exception",MB_OK);
|
||||
}
|
||||
WriteTrace(TraceDebug,"WinMain - cleaning up global objects");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": cleaning up global objects");
|
||||
|
||||
if (g_Rom) { delete g_Rom; g_Rom = NULL; }
|
||||
if (g_Plugins) { delete g_Plugins; g_Plugins = NULL; }
|
||||
|
@ -342,7 +342,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE /*hPrevInstance*/, LPSTR /*lps
|
|||
if (_Lang) { delete _Lang; _Lang = NULL; }
|
||||
|
||||
CoUninitialize();
|
||||
WriteTrace(TraceDebug,"WinMain - Done");
|
||||
WriteTrace(TraceDebug,__FUNCTION__ ": Done");
|
||||
CloseTrace();
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue