From e3effe8c0aef3f31443c2e79196b97e0ffd8ea1a Mon Sep 17 00:00:00 2001 From: georgemoralis Date: Thu, 19 Oct 2023 12:27:28 +0300 Subject: [PATCH] few libc (pow ,_Sin ) for ps4nes --- src/Core/PS4/HLE/LibC.cpp | 2 ++ src/Emulator/HLE/Libraries/LibC/libc.cpp | 5 +++++ src/Emulator/HLE/Libraries/LibC/libc.h | 2 ++ 3 files changed, 9 insertions(+) diff --git a/src/Core/PS4/HLE/LibC.cpp b/src/Core/PS4/HLE/LibC.cpp index 77cda914..4d591c39 100644 --- a/src/Core/PS4/HLE/LibC.cpp +++ b/src/Core/PS4/HLE/LibC.cpp @@ -84,6 +84,8 @@ void LibC_Register(SymbolsResolver* sym) { LIB_FUNCTION("QI-x0SL8jhw", "libc", 1, "libc", 1, 1, Emulator::HLE::Libraries::LibC::acosf); LIB_FUNCTION("ZE6RNL+eLbk", "libc", 1, "libc", 1, 1, Emulator::HLE::Libraries::LibC::tanf); LIB_FUNCTION("GZWjF-YIFFk", "libc", 1, "libc", 1, 1, Emulator::HLE::Libraries::LibC::asinf); + LIB_FUNCTION("9LCjpWyQ5Zc", "libc", 1, "libc", 1, 1, Emulator::HLE::Libraries::LibC::pow); + LIB_FUNCTION("cCXjU72Z0Ow", "libc", 1, "libc", 1, 1, Emulator::HLE::Libraries::LibC::_Sin); LIB_OBJ("P330P3dFF68", "libc", 1, "libc", 1, 1, &HLE::Libs::LibC::g_need_sceLibc); diff --git a/src/Emulator/HLE/Libraries/LibC/libc.cpp b/src/Emulator/HLE/Libraries/LibC/libc.cpp index bf0d9e61..ec531b4e 100644 --- a/src/Emulator/HLE/Libraries/LibC/libc.cpp +++ b/src/Emulator/HLE/Libraries/LibC/libc.cpp @@ -55,4 +55,9 @@ float PS4_SYSV_ABI acosf(float num) { return std::acosf(num); } float PS4_SYSV_ABI tanf(float num) { return std::tanf(num); } float PS4_SYSV_ABI asinf(float num) { return std::asinf(num); } + +double PS4_SYSV_ABI pow(double base, double exponent) { return std::pow(base, exponent); } + +double PS4_SYSV_ABI _Sin(double x) { return std::sin(x); } + }; // namespace Emulator::HLE::Libraries::LibC \ No newline at end of file diff --git a/src/Emulator/HLE/Libraries/LibC/libc.h b/src/Emulator/HLE/Libraries/LibC/libc.h index 3047283b..1608612e 100644 --- a/src/Emulator/HLE/Libraries/LibC/libc.h +++ b/src/Emulator/HLE/Libraries/LibC/libc.h @@ -26,5 +26,7 @@ float PS4_SYSV_ABI atan2f(float y, float x); float PS4_SYSV_ABI acosf(float num); float PS4_SYSV_ABI tanf(float num); float PS4_SYSV_ABI asinf(float num); +double PS4_SYSV_ABI pow(double base, double exponent); +double PS4_SYSV_ABI _Sin(double x); } // namespace Emulator::HLE::Libraries::LibC \ No newline at end of file