clean up HLE funcs for debug logging a little, add "__write_console", gives some interesting messages in wii sysmenu
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4464 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
73fda8cfbf
commit
7bff609ad8
|
@ -58,12 +58,13 @@ static const SPatch OSPatches[] =
|
|||
|
||||
|
||||
// debug out is very nice ;)
|
||||
{ "OSReport", HLE_OS::HLE_OSReport },
|
||||
{ "OSPanic", HLE_OS::HLE_OSPanic },
|
||||
{ "vprintf", HLE_OS::HLE_vprintf },
|
||||
{ "printf", HLE_OS::HLE_printf },
|
||||
{ "puts", HLE_OS::HLE_printf }, //gcc-optimized printf?
|
||||
{ "___blank(char *,...)", HLE_OS::HLE___blank }, // dunno, but awesome :D
|
||||
{ "OSReport", HLE_OS::HLE_GeneralDebugPrint },
|
||||
{ "OSPanic", HLE_OS::HLE_OSPanic },
|
||||
{ "vprintf", HLE_OS::HLE_GeneralDebugPrint },
|
||||
{ "printf", HLE_OS::HLE_GeneralDebugPrint },
|
||||
{ "puts", HLE_OS::HLE_GeneralDebugPrint }, // gcc-optimized printf?
|
||||
{ "___blank(char *,...)", HLE_OS::HLE_GeneralDebugPrint }, // dunno, but awesome :D
|
||||
{ "__write_console", HLE_OS::HLE_GeneralDebugPrint }, // used by sysmenu (+more?)
|
||||
|
||||
// wii only
|
||||
{ "__OSInitAudioSystem", HLE_Misc::UnimplementedFunction },
|
||||
|
|
|
@ -40,64 +40,15 @@ void HLE_OSPanic()
|
|||
NPC = LR;
|
||||
}
|
||||
|
||||
void HLE_OSReport()
|
||||
{
|
||||
std::string ReportMessage;
|
||||
GetStringVA(ReportMessage);
|
||||
NPC = LR;
|
||||
|
||||
u32 hackPC = PC;
|
||||
PC = LR;
|
||||
|
||||
// PanicAlert("(PC=%08x) OSReport: %s", LR, ReportMessage.c_str());
|
||||
NOTICE_LOG(OSREPORT, "(PC=%08x) OSReport: %s", LR, ReportMessage.c_str());
|
||||
|
||||
PC = hackPC;
|
||||
}
|
||||
|
||||
void HLE_vprintf()
|
||||
{
|
||||
std::string ReportMessage;
|
||||
GetStringVA(ReportMessage);
|
||||
NPC = LR;
|
||||
|
||||
u32 hackPC = PC;
|
||||
PC = LR;
|
||||
|
||||
// PanicAlert("(PC=%08x) VPrintf: %s", LR, ReportMessage.c_str());
|
||||
NOTICE_LOG(OSREPORT, "(PC=%08x) VPrintf: %s", LR, ReportMessage.c_str());
|
||||
|
||||
PC = hackPC;
|
||||
}
|
||||
|
||||
void HLE_printf()
|
||||
{
|
||||
std::string ReportMessage;
|
||||
GetStringVA(ReportMessage);
|
||||
NPC = LR;
|
||||
|
||||
u32 hackPC = PC;
|
||||
PC = LR;
|
||||
|
||||
// PanicAlert("(PC=%08x) Printf: %s ", LR, ReportMessage.c_str());
|
||||
NOTICE_LOG(OSREPORT, "(PC=%08x) Printf: %s ", LR, ReportMessage.c_str());
|
||||
|
||||
PC = hackPC;
|
||||
}
|
||||
|
||||
void HLE___blank()
|
||||
// Generalized func for just printing string pointed to by r3.
|
||||
void HLE_GeneralDebugPrint()
|
||||
{
|
||||
std::string ReportMessage;
|
||||
GetStringVA(ReportMessage);
|
||||
NPC = LR;
|
||||
|
||||
u32 hackPC = PC;
|
||||
PC = LR;
|
||||
|
||||
// PanicAlert("(PC=%08x) Printf: %s ", LR, ReportMessage.c_str());
|
||||
NOTICE_LOG(OSREPORT, "(PC=%08x) ___blank: %s ", LR, ReportMessage.c_str());
|
||||
|
||||
PC = hackPC;
|
||||
//PanicAlert("(%08x->%08x) %s", LR, PC, ReportMessage.c_str());
|
||||
NOTICE_LOG(OSREPORT, "%08x->%08x| %s", LR, PC, ReportMessage.c_str());
|
||||
}
|
||||
|
||||
void GetStringVA(std::string& _rOutBuffer)
|
||||
|
|
|
@ -22,10 +22,7 @@
|
|||
|
||||
namespace HLE_OS
|
||||
{
|
||||
void HLE_vprintf();
|
||||
void HLE_printf();
|
||||
void HLE___blank();
|
||||
void HLE_OSReport();
|
||||
void HLE_GeneralDebugPrint();
|
||||
void HLE_OSPanic();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue