just some debug helper
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2526 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
cee711bd5e
commit
10e027b48b
|
@ -294,6 +294,9 @@ bool CBoot::BootUp()
|
|||
// ===================================================================================
|
||||
case SCoreStartupParameter::BOOT_WII_NAND:
|
||||
Boot_WiiWAD(_StartupPara.m_strFilename.c_str());
|
||||
|
||||
if (LoadMapFromFilename(_StartupPara.m_strFilename))
|
||||
HLE::PatchFunctions();
|
||||
break;
|
||||
|
||||
|
||||
|
|
|
@ -103,7 +103,7 @@ void Write32(const u32 _Value, const u32 _Address)
|
|||
{
|
||||
// NANDLoader ... no idea
|
||||
case 0x18:
|
||||
ERROR_LOG(WII_IOB, 0, "IOP: Write32 0x%08x to 0x%08x (NANDLoader)", _Value, _Address);
|
||||
ERROR_LOG(WII_IOB, "IOP: Write32 0x%08x to 0x%08x (NANDLoader)", _Value, _Address);
|
||||
break;
|
||||
// WiiMenu... no idea
|
||||
case 0x24:
|
||||
|
|
|
@ -164,8 +164,8 @@ s32 CWII_IPC_HLE_Device_net_kd_request::ExecuteCommand(u32 _Parameter, u32 _Buff
|
|||
case IOCTL_NWC24_STARTUP:
|
||||
return 0;
|
||||
|
||||
case IOCTL_SO_GETSOCKOPT: // WiiMenu
|
||||
case IOCTL_SO_SETSOCKOPT:
|
||||
case 8: // WiiMenu
|
||||
case 9:
|
||||
return 0;
|
||||
|
||||
case 0xf: // NWC24iRequestGenerateUserId (Input: none, Output: 32 bytes)
|
||||
|
|
|
@ -138,6 +138,7 @@ BEGIN_EVENT_TABLE(CCodeWindow, wxFrame)
|
|||
EVT_MENU(IDM_CREATESIGNATUREFILE, CCodeWindow::OnSymbolsMenu)
|
||||
EVT_MENU(IDM_USESIGNATUREFILE, CCodeWindow::OnSymbolsMenu)
|
||||
EVT_MENU(IDM_PATCHHLEFUNCTIONS, CCodeWindow::OnSymbolsMenu)
|
||||
EVT_MENU(IDM_RENAME_SYMBOLS, CCodeWindow::OnSymbolsMenu)
|
||||
|
||||
EVT_MENU(IDM_CLEARCODECACHE, CCodeWindow::OnJitMenu)
|
||||
EVT_MENU(IDM_LOGINSTRUCTIONS, CCodeWindow::OnJitMenu)
|
||||
|
|
|
@ -99,6 +99,7 @@ class CCodeWindow
|
|||
IDM_LOADMAPFILE,
|
||||
IDM_SAVEMAPFILE, IDM_SAVEMAPFILEWITHCODES,
|
||||
IDM_CREATESIGNATUREFILE,
|
||||
IDM_RENAME_SYMBOLS,
|
||||
IDM_USESIGNATUREFILE,
|
||||
//IDM_USESYMBOLFILE, // not used
|
||||
IDM_PATCHHLEFUNCTIONS,
|
||||
|
|
|
@ -105,6 +105,7 @@ void CCodeWindow::CreateSymbolsMenu()
|
|||
pSymbolsMenu->Append(IDM_USESIGNATUREFILE, _T("&Use signature file..."));
|
||||
pSymbolsMenu->AppendSeparator();
|
||||
pSymbolsMenu->Append(IDM_PATCHHLEFUNCTIONS, _T("&Patch HLE functions"));
|
||||
pSymbolsMenu->Append(IDM_RENAME_SYMBOLS, _T("&Rename symbols from file..."));
|
||||
pMenuBar->Append(pSymbolsMenu, _T("&Symbols"));
|
||||
|
||||
wxMenu *pJitMenu = new wxMenu;
|
||||
|
@ -160,7 +161,7 @@ void CCodeWindow::OnSymbolsMenu(wxCommandEvent& event)
|
|||
break;
|
||||
case IDM_SCANFUNCTIONS:
|
||||
{
|
||||
PPCAnalyst::FindFunctions(0x80000000, 0x80400000, &g_symbolDB);
|
||||
PPCAnalyst::FindFunctions(0x81300000, 0x81800000, &g_symbolDB);
|
||||
SignatureDB db;
|
||||
if (db.Load(TOTALDB_FILE))
|
||||
db.Apply(&g_symbolDB);
|
||||
|
@ -173,13 +174,14 @@ void CCodeWindow::OnSymbolsMenu(wxCommandEvent& event)
|
|||
if (!File::Exists(mapfile.c_str()))
|
||||
{
|
||||
g_symbolDB.Clear();
|
||||
PPCAnalyst::FindFunctions(0x80000000, 0x80400000, &g_symbolDB);
|
||||
PPCAnalyst::FindFunctions(0x81300000, 0x81800000, &g_symbolDB);
|
||||
SignatureDB db;
|
||||
if (db.Load(TOTALDB_FILE))
|
||||
db.Apply(&g_symbolDB);
|
||||
} else {
|
||||
g_symbolDB.LoadMap(mapfile.c_str());
|
||||
}
|
||||
HLE::PatchFunctions();
|
||||
NotifyMapLoaded();
|
||||
break;
|
||||
case IDM_SAVEMAPFILE:
|
||||
|
@ -188,6 +190,42 @@ void CCodeWindow::OnSymbolsMenu(wxCommandEvent& event)
|
|||
case IDM_SAVEMAPFILEWITHCODES:
|
||||
g_symbolDB.SaveMap(mapfile.c_str(), true);
|
||||
break;
|
||||
|
||||
case IDM_RENAME_SYMBOLS:
|
||||
{
|
||||
wxString path = wxFileSelector(
|
||||
_T("Apply signature file"), wxEmptyString, wxEmptyString, wxEmptyString,
|
||||
_T("Dolphin Symbole Rename File (*.sym)|*.sym;"), wxFD_OPEN | wxFD_FILE_MUST_EXIST,
|
||||
this);
|
||||
if (path)
|
||||
{
|
||||
FILE *f = fopen(path, "r");
|
||||
if (!f)
|
||||
return;
|
||||
|
||||
bool started = false;
|
||||
while (!feof(f))
|
||||
{
|
||||
char line[512], temp[256];
|
||||
fgets(line, 511, f);
|
||||
if (strlen(line) < 4)
|
||||
continue;
|
||||
|
||||
u32 address, type;
|
||||
char name[512];
|
||||
sscanf(line, "%08x %02i %s", &address, &type, name);
|
||||
|
||||
Symbol *symbol = g_symbolDB.GetSymbolFromAddr(address);
|
||||
if (symbol) {
|
||||
symbol->name = line+12;
|
||||
}
|
||||
}
|
||||
fclose(f);
|
||||
Host_NotifyMapLoaded();
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case IDM_CREATESIGNATUREFILE:
|
||||
{
|
||||
wxTextEntryDialog input_prefix(this, wxString::FromAscii("Only export symbols with prefix:"), wxGetTextFromUserPromptStr, _T("."));
|
||||
|
|
Loading…
Reference in New Issue