diff --git a/Source/Core/Core/Src/HLE/HLE.cpp b/Source/Core/Core/Src/HLE/HLE.cpp index 727b7eb6d9..1ae34277fc 100644 --- a/Source/Core/Core/Src/HLE/HLE.cpp +++ b/Source/Core/Core/Src/HLE/HLE.cpp @@ -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 }, diff --git a/Source/Core/Core/Src/HLE/HLE_OS.cpp b/Source/Core/Core/Src/HLE/HLE_OS.cpp index 8eb59ebb8a..909a8c7490 100644 --- a/Source/Core/Core/Src/HLE/HLE_OS.cpp +++ b/Source/Core/Core/Src/HLE/HLE_OS.cpp @@ -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) diff --git a/Source/Core/Core/Src/HLE/HLE_OS.h b/Source/Core/Core/Src/HLE/HLE_OS.h index 4a1f1a36fd..ac1d1b48ae 100644 --- a/Source/Core/Core/Src/HLE/HLE_OS.h +++ b/Source/Core/Core/Src/HLE/HLE_OS.h @@ -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(); }