diff --git a/core/libs/prx/libSceGnmDriverForNeoMode/Export.cpp b/core/libs/prx/libSceGnmDriverForNeoMode/Export.cpp index 7c2819e779..cc389b98fd 100644 --- a/core/libs/prx/libSceGnmDriverForNeoMode/Export.cpp +++ b/core/libs/prx/libSceGnmDriverForNeoMode/Export.cpp @@ -75,13 +75,28 @@ int APS5_VABI sceGnmBeginWorkload(void) { return 0; } -int APS5_VABI sceGnmComputeWaitOnAddress(void) { - NotImplemented_nid_no_patch(__func__); +int APS5_VABI sceGnmComputeWaitOnAddress(std::uint32_t* cmdbuf, std::uint32_t size, std::uint64_t address, std::uint32_t mask, std::uint32_t compare, std::uint32_t reference) { + if (!cmdbuf || size != 14) return CommandFailed; + auto* at = Nop(cmdbuf, 3); + const bool memory = address > 0xffff; + at[0] = Header(0x3c, 6); + at[1] = (memory ? 1u << 4 : 0u) | (compare & 7); + at[2] = static_cast(address & (memory ? 0xfffffffcu : 0xffffu)); + at[3] = static_cast(address >> 32); + at[4] = reference; + at[5] = mask; + at[6] = 10; + Nop(at + 7, 2); return 0; } -int APS5_VABI sceGnmComputeWaitSemaphore(void) { - NotImplemented_nid_no_patch(__func__); +int APS5_VABI sceGnmComputeWaitSemaphore(std::uint32_t* cmdbuf, std::uint32_t size, std::uint64_t semaphoreAddress, std::uint32_t flags) { + if (!cmdbuf || size != 10) return CommandFailed; + auto* at = Nop(cmdbuf, 3); + at[0] = Header(0x39, 2); + at[1] = static_cast(semaphoreAddress); + at[2] = (flags == 1 ? 0x100000u : 0u) - 0x20000000u + static_cast(semaphoreAddress >> 32); + Nop(at + 3, 2); return 0; }