This commit is contained in:
Ordinary205 2024-04-16 16:39:34 +00:00
parent 48bc506cf5
commit 42ef9263cc
10 changed files with 185 additions and 0 deletions

View File

@ -334,6 +334,14 @@ uint32_t SYSV_ABI sceGnmDispatchInitDefaultHardwareState(uint32_t* cmdOut, uint6
return 2; return 2;
} }
uint32_t SYSV_ABI sceGnmDrawInitToDefaultContextState(uint32_t* cmdOut, uint64_t size) {
LOG_USE_MODULE(libSceGraphicsDriver);
LOG_DEBUG(L"%S", __FUNCTION__);
cmdOut[0] = Pm4::create(2, Pm4::Custom::R_DRAW_RESET);
return 2;
}
int SYSV_ABI sceGnmInsertWaitFlipDone(uint32_t* cmdOut, uint64_t size, uint32_t video_out_handle, uint32_t display_buffer_index) { int SYSV_ABI sceGnmInsertWaitFlipDone(uint32_t* cmdOut, uint64_t size, uint32_t video_out_handle, uint32_t display_buffer_index) {
LOG_USE_MODULE(libSceGraphicsDriver); LOG_USE_MODULE(libSceGraphicsDriver);
LOG_TRACE(L"%S", __FUNCTION__); LOG_TRACE(L"%S", __FUNCTION__);

View File

@ -93,6 +93,14 @@ EXPORT SYSV_ABI int __NID(strncmp)(const char* str1, const char* str2, size_t si
return std::strncmp(str1, str2, size); return std::strncmp(str1, str2, size);
} }
EXPORT SYSV_ABI int __NID(strncpy)(char* dst, char* src, int len ) {
return std::strncpy(dst, src, len);
}
EXPORT SYSV_ABI int __NID(strcmp)(char* a, char* b) {
return std::strcmp(a, b);
}
EXPORT SYSV_ABI errno_t __NID(strcpy_s)(char* dst, size_t size, const char* src) { EXPORT SYSV_ABI errno_t __NID(strcpy_s)(char* dst, size_t size, const char* src) {
return ::strcpy_s(dst, size, src); return ::strcpy_s(dst, size, src);
} }

View File

@ -13,4 +13,8 @@ EXPORT const char* MODULE_NAME = "libSceNetCtl";
EXPORT SYSV_ABI int sceNetCtlRegisterCallbackForNpToolkit() { EXPORT SYSV_ABI int sceNetCtlRegisterCallbackForNpToolkit() {
return Ok; return Ok;
} }
EXPORT SYSV_ABI int sceNetCtlCheckCallbackForNpToolkit() {
return Ok;
}
} }

View File

@ -0,0 +1,9 @@
cmake_minimum_required(VERSION 3.24)
include(../setupModule.cmake)
set(libName libSceNpMatching2)
project(${libName})
add_library(${libName} SHARED entry.cpp)
setupModule(${libName})

View File

@ -0,0 +1,4 @@
#pragma once
#include <stdint.h>
namespace Err {} // namespace Err

View File

@ -0,0 +1,78 @@
#include "common.h"
#include "logging.h"
#include "types.h"
LOG_DEFINE_MODULE(libSceNpMatching2);
namespace {} // namespace
extern "C" {
EXPORT const char* MODULE_NAME = "libSceNpMatching2";
EXPORT SYSV_ABI int32_t sceNpMatching2Initialize() {
LOG_USE_MODULE(libSceNpMatching2);
LOG_ERR(L"todo %S", __FUNCTION__);
return Ok;
}
EXPORT SYSV_ABI int32_t sceNpMatching2RegisterContextCallback() {
LOG_USE_MODULE(libSceNpMatching2);
LOG_ERR(L"todo %S", __FUNCTION__);
return Ok;
}
EXPORT SYSV_ABI int32_t sceNpMatching2RegisterLobbyEventCallback() {
LOG_USE_MODULE(libSceNpMatching2);
LOG_ERR(L"todo %S", __FUNCTION__);
return Ok;
}
EXPORT SYSV_ABI int32_t sceNpMatching2RegisterRoomEventCallback() {
LOG_USE_MODULE(libSceNpMatching2);
LOG_ERR(L"todo %S", __FUNCTION__);
return Ok;
}
EXPORT SYSV_ABI int32_t sceNpMatching2RegisterRoomMessageCallback() {
LOG_USE_MODULE(libSceNpMatching2);
LOG_ERR(L"todo %S", __FUNCTION__);
return Ok;
}
EXPORT SYSV_ABI int32_t sceNpMatching2RegisterSignalingCallback() {
LOG_USE_MODULE(libSceNpMatching2);
LOG_ERR(L"todo %S", __FUNCTION__);
return Ok;
}
EXPORT SYSV_ABI int32_t sceNpMatching2ContextStart() {
LOG_USE_MODULE(libSceNpMatching2);
LOG_ERR(L"todo %S", __FUNCTION__);
return Ok;
}
EXPORT SYSV_ABI int32_t sceNpMatching2CreateContext() {
LOG_USE_MODULE(libSceNpMatching2);
LOG_ERR(L"todo %S", __FUNCTION__);
return Ok;
}
EXPORT SYSV_ABI int32_t sceNpMatching2CreateContextA() {
LOG_USE_MODULE(libSceNpMatching2);
LOG_ERR(L"todo %S", __FUNCTION__);
return Ok;
}
EXPORT SYSV_ABI int32_t sceNpMatching2SetDefaultRequestOptParam() {
LOG_USE_MODULE(libSceNpMatching2);
LOG_ERR(L"todo %S", __FUNCTION__);
return Ok;
}
EXPORT SYSV_ABI int32_t sceNpMatching2Terminate() {
LOG_USE_MODULE(libSceNpMatching2);
LOG_ERR(L"todo %S", __FUNCTION__);
return Ok;
}
}

View File

@ -0,0 +1,2 @@
#pragma once
#include "codes.h"

View File

@ -260,6 +260,19 @@ EXPORT SYSV_ABI int scePadDeviceClassGetExtendedInformation(int32_t handle, SceP
return Ok; return Ok;
} }
EXPORT SYSV_ABI int scePadOpenExt(int userId, int type, int index, p_pad_ext_param param) {
LOG_USE_MODULE(libScePad);
LOG_DEBUG(L"todo %S", __FUNCTION__);
return Ok;
}
EXPORT SYSV_ABI int scePadGetExtControllerInformation(int32_t handle, ScePadExtControllerInformation* pInfo) {
LOG_USE_MODULE(libScePad);
LOG_DEBUG(L"todo %S", __FUNCTION__);
if (handle < 0) return Err::INVALID_HANDLE;
return Ok;
}
EXPORT SYSV_ABI void scePadTerminate() { EXPORT SYSV_ABI void scePadTerminate() {
auto pData = getData(); auto pData = getData();

View File

@ -336,3 +336,12 @@ struct ScePadDeviceClassExtendedInformation {
uint8_t data[12]; uint8_t data[12];
} classData; } classData;
}; };
struct p_pad_ext_param param {
uint16_t param_0;
uint16_t param_1;
uint16_t param_2;
uint8_t param_3;
};
struct ScePadExtControllerInformation {};

View File

@ -116,4 +116,54 @@ EXPORT SYSV_ABI int __NID(sched_yield)(void) {
boost::this_thread::yield(); boost::this_thread::yield();
return Ok; return Ok;
} }
EXPORT SYSV_ABI int __NID(socket)(const char* name, int family, int type, int protocol) {
LOG_USE_MODULE(libScePosix);
return Ok;
}
EXPORT SYSV_ABI int __NID(bind)(SceNetId s, const SceNetSockaddr* addr, SceNetSocklen_t addrlen) {
LOG_USE_MODULE(libScePosix);
return Ok;
}
EXPORT SYSV_ABI int __NID(setsockopt)(SceNetId s, int level, int optname, const void* optval, SceNetSocklen_t optlen) {
LOG_USE_MODULE(libScePosix);
return Ok;
}
EXPORT SYSV_ABI int __NID(select)(SceNetId s, void* readfds, void* writefds, void* exceptfds, void* timeout) {
LOG_USE_MODULE(libScePosix);
return Ok;
}
EXPORT SYSV_ABI int __NID(recvfrom)(SceNetId s, void* buf, size_t len, int flags, SceNetSockaddr* from, SceNetSocklen_t* fromlen) {
LOG_USE_MODULE(libScePosix);
return Ok;
}
EXPORT SYSV_ABI int __NID(listen)(SceNetId s, int backlog) {
LOG_USE_MODULE(libScePosix);
return Ok;
}
EXPORT SYSV_ABI int __NID(accept)(SceNetId s, SceNetSockaddr* addr, SceNetSocklen_t* addrlen) {
LOG_USE_MODULE(libScePosix);
return Ok;
}
EXPORT SYSV_ABI int __NID(sendto)(SceNetId s, const void* msg, size_t len, int flags, const SceNetSockaddr* to, SceNetSocklen_t tolen) {
LOG_USE_MODULE(libScePosix);
return Ok;
}
EXPORT SYSV_ABI int __NID(getsockname)(SceNetId s, SceNetSockaddr* name, SceNetSocklen_t* namelen) {
LOG_USE_MODULE(libScePosix);
return Ok;
}
EXPORT SYSV_ABI int __NID(connect)(SceNetId s, SceNetSockaddr* name, SceNetSocklen_t* namelen) {
LOG_USE_MODULE(libScePosix);
return Ok;
}
} }