From d7247f9e8d6c2a19168d3e9c80dab2cd07a81cb8 Mon Sep 17 00:00:00 2001 From: georgemoralis Date: Wed, 26 Jul 2023 13:18:10 +0300 Subject: [PATCH] stubbed Assert function . should fix #26 --- src/Core/PS4/HLE/LibC.cpp | 2 ++ src/Core/PS4/HLE/LibC.h | 1 + src/Core/PS4/Util/aerolib.h | 1 + 3 files changed, 4 insertions(+) diff --git a/src/Core/PS4/HLE/LibC.cpp b/src/Core/PS4/HLE/LibC.cpp index 4cb874db..a3651e4d 100644 --- a/src/Core/PS4/HLE/LibC.cpp +++ b/src/Core/PS4/HLE/LibC.cpp @@ -45,6 +45,7 @@ namespace HLE::Libs::LibC { } return rt; } + static PS4_SYSV_ABI void _Assert() { BREAKPOINT(); } void LibC_Register(SymbolsResolver* sym) { @@ -56,6 +57,7 @@ namespace HLE::Libs::LibC { LIB_FUNCTION("XKRegsFpEpk", "libc", 1, "libc", 1, 1, catchReturnFromMain); LIB_FUNCTION("uMei1W9uyNo", "libc", 1, "libc", 1, 1, exit); LIB_FUNCTION("8G2LB+A3rzg", "libc", 1, "libc", 1, 1, atexit); + LIB_FUNCTION("-QgqOT5u2Vk", "libc", 1, "libc", 1, 1, _Assert); LIB_OBJ("P330P3dFF68", "libc", 1, "libc", 1, 1, &HLE::Libs::LibC::g_need_sceLibc); } diff --git a/src/Core/PS4/HLE/LibC.h b/src/Core/PS4/HLE/LibC.h index 3d76b337..d554a073 100644 --- a/src/Core/PS4/HLE/LibC.h +++ b/src/Core/PS4/HLE/LibC.h @@ -8,6 +8,7 @@ namespace HLE::Libs::LibC { //functions static PS4_SYSV_ABI void init_env(); static PS4_SYSV_ABI void exit(int code); + static PS4_SYSV_ABI void _Assert(); static PS4_SYSV_ABI void catchReturnFromMain(int status); int PS4_SYSV_ABI __cxa_guard_acquire(u64* guard_object); int PS4_SYSV_ABI memcmp(const void* s1, const void* s2, size_t n); diff --git a/src/Core/PS4/Util/aerolib.h b/src/Core/PS4/Util/aerolib.h index 9c210888..f0fa730a 100644 --- a/src/Core/PS4/Util/aerolib.h +++ b/src/Core/PS4/Util/aerolib.h @@ -11219,6 +11219,7 @@ namespace aerolib { {"9rAeANT2tyE", "__cxa_guard_release"}, {"DfivPArhucg", "memcmp"}, {"Q3VBxCXhUHs", "memcpy"}, + {"-QgqOT5u2Vk", "_Assert"}, //libkernel {"Ou3iL1abvng", "__stack_chk_fail"}, {"f7uOxY9mM1U", "__stack_chk_guard"}