From d33295a9c4a476ce90d766f43f01eb5b86a7c7d5 Mon Sep 17 00:00:00 2001 From: Shawn Hoffman Date: Wed, 21 Oct 2009 04:26:34 +0000 Subject: [PATCH] HLE the ___blank(char*, ...) func. seems to show some interesting, but limited messages. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4446 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/Core/Src/HLE/HLE.cpp | 7 ++++--- Source/Core/Core/Src/HLE/HLE_OS.cpp | 15 +++++++++++++++ Source/Core/Core/Src/HLE/HLE_OS.h | 1 + 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/Source/Core/Core/Src/HLE/HLE.cpp b/Source/Core/Core/Src/HLE/HLE.cpp index aef0e63705..727b7eb6d9 100644 --- a/Source/Core/Core/Src/HLE/HLE.cpp +++ b/Source/Core/Core/Src/HLE/HLE.cpp @@ -54,15 +54,16 @@ static const SPatch OSPatches[] = // speedup { "OSProtectRange", HLE_Misc::UnimplementedFunctionFalse }, - // { "THPPlayerGetState", HLE_Misc:THPPlayerGetState }, + //{ "THPPlayerGetState", HLE_Misc:THPPlayerGetState }, // debug out is very nice ;) { "OSReport", HLE_OS::HLE_OSReport }, { "OSPanic", HLE_OS::HLE_OSPanic }, - { "vprintf", HLE_OS::HLE_vprintf }, + { "vprintf", HLE_OS::HLE_vprintf }, { "printf", HLE_OS::HLE_printf }, - { "puts", HLE_OS::HLE_printf }, //gcc-optimized printf? + { "puts", HLE_OS::HLE_printf }, //gcc-optimized printf? + { "___blank(char *,...)", HLE_OS::HLE___blank }, // dunno, but awesome :D // 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 8dd285c234..8eb59ebb8a 100644 --- a/Source/Core/Core/Src/HLE/HLE_OS.cpp +++ b/Source/Core/Core/Src/HLE/HLE_OS.cpp @@ -85,6 +85,21 @@ void HLE_printf() PC = hackPC; } +void HLE___blank() +{ + 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; +} + void GetStringVA(std::string& _rOutBuffer) { _rOutBuffer = ""; diff --git a/Source/Core/Core/Src/HLE/HLE_OS.h b/Source/Core/Core/Src/HLE/HLE_OS.h index 2c2c391ef0..4a1f1a36fd 100644 --- a/Source/Core/Core/Src/HLE/HLE_OS.h +++ b/Source/Core/Core/Src/HLE/HLE_OS.h @@ -24,6 +24,7 @@ namespace HLE_OS { void HLE_vprintf(); void HLE_printf(); + void HLE___blank(); void HLE_OSReport(); void HLE_OSPanic(); }