added sceKernelGetTscFrequency

This commit is contained in:
georgemoralis 2024-05-07 16:28:42 +03:00
parent 9dff1975a3
commit 91dd175d6b
3 changed files with 6 additions and 1 deletions

View File

@ -34,7 +34,6 @@ int PS4_SYSV_ABI sceKernelOpen(const char* path, int flags, u16 mode) {
if (directory) {
UNREACHABLE(); // not supported yet
} else {
// only open files support!
u32 handle = h->CreateHandle();
auto* file = h->GetFile(handle);
file->m_guest_name = path;

View File

@ -10,6 +10,10 @@ namespace Libraries::Kernel {
static u64 initial_ptc;
static std::unique_ptr<Common::NativeClock> clock;
u64 PS4_SYSV_ABI sceKernelGetTscFrequency() {
return clock->GetTscFrequency();
}
u64 PS4_SYSV_ABI sceKernelGetProcessTime() {
return clock->GetProcessTimeUS();
}
@ -34,6 +38,7 @@ void timeSymbolsRegister(Core::Loader::SymbolsResolver* sym) {
LIB_FUNCTION("BNowx2l588E", "libkernel", 1, "libkernel", 1, 1,
sceKernelGetProcessTimeCounterFrequency);
LIB_FUNCTION("-2IRUCO--PM", "libkernel", 1, "libkernel", 1, 1, sceKernelReadTsc);
LIB_FUNCTION("1j3S3n-tTW4", "libkernel", 1, "libkernel", 1, 1, sceKernelGetTscFrequency);
}
} // namespace Libraries::Kernel

View File

@ -11,6 +11,7 @@ class SymbolsResolver;
namespace Libraries::Kernel {
u64 PS4_SYSV_ABI sceKernelGetTscFrequency();
u64 PS4_SYSV_ABI sceKernelGetProcessTime();
u64 PS4_SYSV_ABI sceKernelGetProcessTimeCounter();
u64 PS4_SYSV_ABI sceKernelGetProcessTimeCounterFrequency();