some cleanup, don't update the log window too often

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@399 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
hrydgard 2008-08-31 08:29:43 +00:00
parent 8bd78a21b4
commit 55c18d1d10
7 changed files with 26 additions and 36 deletions

View File

@ -383,7 +383,6 @@ bool CBoot::EmulatedBIOS_Wii(bool _bDebug)
void CBoot::UpdateDebugger_MapLoaded(const char *_gameID) void CBoot::UpdateDebugger_MapLoaded(const char *_gameID)
{ {
HLE::PatchFunctions();
Host_NotifyMapLoaded(); Host_NotifyMapLoaded();
Host_UpdateMemoryView(); Host_UpdateMemoryView();
} }
@ -507,10 +506,8 @@ bool CBoot::BootUp(const SCoreStartupParameter& _StartupPara)
} }
} }
if (LoadMapFromFilename(_StartupPara.m_strFilename, gameID)) if (LoadMapFromFilename(_StartupPara.m_strFilename, gameID))
{
HLE::PatchFunctions(); HLE::PatchFunctions();
} }
}
break; break;
// DOL // DOL
@ -520,7 +517,8 @@ bool CBoot::BootUp(const SCoreStartupParameter& _StartupPara)
CDolLoader dolLoader(_StartupPara.m_strFilename.c_str()); CDolLoader dolLoader(_StartupPara.m_strFilename.c_str());
PC = dolLoader.GetEntryPoint(); PC = dolLoader.GetEntryPoint();
#ifdef _DEBUG #ifdef _DEBUG
LoadMapFromFilename(_StartupPara.m_strFilename); if (LoadMapFromFilename(_StartupPara.m_strFilename))
HLE::PatchFunctions();
#endif #endif
} }
break; break;
@ -569,7 +567,8 @@ bool CBoot::BootUp(const SCoreStartupParameter& _StartupPara)
} }
Boot_BIN(_StartupPara.m_strFilename); Boot_BIN(_StartupPara.m_strFilename);
LoadMapFromFilename(_StartupPara.m_strFilename); if (LoadMapFromFilename(_StartupPara.m_strFilename))
HLE::PatchFunctions();
} }
break; break;
@ -580,7 +579,8 @@ bool CBoot::BootUp(const SCoreStartupParameter& _StartupPara)
DVDInterface::SetDiscInside(false); DVDInterface::SetDiscInside(false);
if (Load_BIOS(_StartupPara.m_strBios)) if (Load_BIOS(_StartupPara.m_strBios))
{ {
LoadMapFromFilename(_StartupPara.m_strFilename); if (LoadMapFromFilename(_StartupPara.m_strFilename))
HLE::PatchFunctions();
} }
else else
{ {

View File

@ -1,5 +1,6 @@
#include "../PowerPC/PowerPC.h" #include "../PowerPC/PowerPC.h"
#include "Boot.h" #include "Boot.h"
#include "../HLE/HLE.h"
#include "Boot_ELF.h" #include "Boot_ELF.h"
#include "ElfReader.h" #include "ElfReader.h"
#include "MappedFile.h" #include "MappedFile.h"
@ -8,8 +9,9 @@ bool CBoot::IsElfWii(const char *filename)
{ {
Common::IMappedFile *mapfile = Common::IMappedFile::CreateMappedFile(); Common::IMappedFile *mapfile = Common::IMappedFile::CreateMappedFile();
bool ok = mapfile->Open(filename); bool ok = mapfile->Open(filename);
if (!ok) return false; if (!ok)
size_t filesize = mapfile->GetSize(); return false;
size_t filesize = (size_t)mapfile->GetSize();
u8 *ptr = mapfile->Lock(0, filesize); u8 *ptr = mapfile->Lock(0, filesize);
u8 *mem = new u8[filesize]; u8 *mem = new u8[filesize];
memcpy(mem, ptr, filesize); memcpy(mem, ptr, filesize);
@ -39,7 +41,10 @@ bool CBoot::Boot_ELF(const char *filename)
reader.LoadInto(0x80000000); reader.LoadInto(0x80000000);
if (!reader.LoadSymbols()) if (!reader.LoadSymbols())
{ {
LoadMapFromFilename(filename); if (LoadMapFromFilename(filename))
HLE::PatchFunctions();
} else {
HLE::PatchFunctions();
} }
delete [] mem; delete [] mem;

View File

@ -48,8 +48,6 @@ void Host_SetDebugMode(bool enable);
void Host_SetWaitCursor(bool enable); void Host_SetWaitCursor(bool enable);
void Host_CreateDisplay();
void Host_CloseDisplay();
void Host_UpdateStatusBar(const char* _pText); void Host_UpdateStatusBar(const char* _pText);
#endif #endif

View File

@ -160,7 +160,8 @@ void SymbolDB::FillInCallers()
} }
else else
{ {
LOG(HLE,"FillInCallers tries to fill data in an unknown function 0x%08x.", FunctionAddress); //LOG(HLE,"FillInCallers tries to fill data in an unknown function 0x%08x.", FunctionAddress);
// TODO - analyze the function instead.
} }
} }
} }

View File

@ -580,7 +580,6 @@ void CCodeWindow::Update()
} }
UpdateButtonStates(); UpdateButtonStates();
Host_UpdateLogDisplay();
} }

View File

@ -31,7 +31,7 @@
IMPLEMENT_APP(DolphinApp) IMPLEMENT_APP(DolphinApp)
CFrame * main_frame = NULL; CFrame* main_frame = NULL;
CCodeWindow* g_pCodeWindow = NULL; CCodeWindow* g_pCodeWindow = NULL;
// The `main program' equivalent, creating the windows and returning the // The `main program' equivalent, creating the windows and returning the
@ -65,10 +65,6 @@ bool DolphinApp::OnInit()
bool UseDebugger = false; bool UseDebugger = false;
#if wxUSE_CMDLINE_PARSER #if wxUSE_CMDLINE_PARSER
//
// What this does is get all the command line arguments
// and treat each one as a file to put to the initial playlist
//
wxCmdLineEntryDesc cmdLineDesc[] = wxCmdLineEntryDesc cmdLineDesc[] =
{ {
{wxCMD_LINE_SWITCH, _T("h"), _T("help"), _T("Show this help message"), wxCMD_LINE_VAL_NONE, wxCMD_LINE_OPTION_HELP}, {wxCMD_LINE_SWITCH, _T("h"), _T("help"), _T("Show this help message"), wxCMD_LINE_VAL_NONE, wxCMD_LINE_OPTION_HELP},
@ -82,7 +78,7 @@ bool DolphinApp::OnInit()
// get filenames from the command line // get filenames from the command line
if (parser.Parse() != 0) if (parser.Parse() != 0)
{ {
return(false); return false;
} }
UseDebugger = parser.Found(_T("debugger")); UseDebugger = parser.Found(_T("debugger"));
@ -99,9 +95,9 @@ bool DolphinApp::OnInit()
#endif #endif
#else #else
#ifdef _DEBUG #ifdef _DEBUG
const char *title = "Dolphin Debug SVN Linux Build"; // Do this for now const char *title = "Dolphin Debug SVN Linux";
#else #else
const char *title = "Dolphin SVN Linux Build"; const char *title = "Dolphin SVN Linux";
#endif #endif
#endif #endif
main_frame = new CFrame((wxFrame*) NULL, wxID_ANY, wxString::FromAscii(title), main_frame = new CFrame((wxFrame*) NULL, wxID_ANY, wxString::FromAscii(title),
@ -115,8 +111,7 @@ bool DolphinApp::OnInit()
} }
SetTopWindow(main_frame); SetTopWindow(main_frame);
return true;
return(true);
} }
@ -240,14 +235,6 @@ void Host_SetWaitCursor(bool enable)
} }
void Host_CreateDisplay()
{}
void Host_CloseDisplay()
{}
void Host_UpdateStatusBar(const char* _pText) void Host_UpdateStatusBar(const char* _pText)
{ {
wxCommandEvent event(wxEVT_HOST_COMMAND, IDM_UPDATESTATUSBAR); wxCommandEvent event(wxEVT_HOST_COMMAND, IDM_UPDATESTATUSBAR);

View File

@ -128,7 +128,7 @@ void TextureMngr::Cleanup()
{ {
TexCache::iterator iter = textures.begin(); TexCache::iterator iter = textures.begin();
while(iter != textures.end()) { while (iter != textures.end()) {
if (frameCount > 20 + iter->second.frameCount) { if (frameCount > 20 + iter->second.frameCount) {
if (!iter->second.isRenderTarget) { if (!iter->second.isRenderTarget) {
iter->second.Destroy(); iter->second.Destroy();
@ -171,7 +171,7 @@ inline u32 _rotl(u32 x, int shift) {
#endif #endif
TextureMngr::TCacheEntry* TextureMngr::Load(int texstage, u32 address, int width, int height, int format, int tlutaddr, int tlutfmt) TextureMngr::TCacheEntry* TextureMngr::Load(int texstage, u32 address, int width, int height, int format, int tlutaddr, int tlutfmt)
{ {
if (address == 0 ) if (address == 0)
return NULL; return NULL;
TexCache::iterator iter = textures.find(address); TexCache::iterator iter = textures.find(address);
@ -182,11 +182,11 @@ TextureMngr::TCacheEntry* TextureMngr::Load(int texstage, u32 address, int width
u32 palhash = 0xc0debabe; u32 palhash = 0xc0debabe;
if (palSize) { if (palSize) {
if (palSize>16) if (palSize > 32)
palSize = 16; //let's not do excessive amount of checking palSize = 32; //let's not do excessive amount of checking
u8 *pal = g_VideoInitialize.pGetMemoryPointer(tlutaddr); u8 *pal = g_VideoInitialize.pGetMemoryPointer(tlutaddr);
if (pal != 0) { if (pal != 0) {
for (int i=0; i<palSize; i++) { for (int i = 0; i < palSize; i++) {
palhash = _rotl(palhash,13); palhash = _rotl(palhash,13);
palhash ^= pal[i]; palhash ^= pal[i];
palhash += 31; palhash += 31;