mirror of
https://github.com/SysRay/psOff_public.git
synced 2024-11-26 16:10:49 +00:00
Merge remote-tracking branch 'origin/features' into trophies
This commit is contained in:
commit
e144c04672
@ -1,7 +1,7 @@
|
||||
cmake_minimum_required(VERSION 3.24)
|
||||
include(ExternalProject)
|
||||
|
||||
set(PSOFF_LIB_VERSION v.0.0)
|
||||
set(PSOFF_LIB_VERSION v.0.1)
|
||||
set(PSOFF_RENDER_VERSION v.0.5-nightly_29.04.24-fix)
|
||||
|
||||
set(ProjectName psOff_${CMAKE_BUILD_TYPE})
|
||||
|
@ -47,6 +47,7 @@ target_link_libraries(core PRIVATE
|
||||
config_emu.lib
|
||||
onecore.lib
|
||||
IPHLPAPI.lib
|
||||
wepoll.lib
|
||||
Ws2_32.lib
|
||||
libcrypto.lib
|
||||
libssl.lib
|
||||
|
@ -6,7 +6,6 @@ add_library(networking OBJECT
|
||||
states/online/socket.cpp
|
||||
states/online/epoll.cpp
|
||||
states/online/http.cpp
|
||||
wepoll.c
|
||||
|
||||
networking.cpp
|
||||
)
|
||||
|
@ -1,9 +1,9 @@
|
||||
#include "../../wepoll.h"
|
||||
#include "../online.h"
|
||||
#include "logging.h"
|
||||
|
||||
#include <WinSock2.h>
|
||||
#include <unordered_map>
|
||||
#include <wepoll.h>
|
||||
|
||||
LOG_DEFINE_MODULE(OnlineNetCore_epoll);
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,113 +0,0 @@
|
||||
/*
|
||||
* wepoll - epoll for Windows
|
||||
* https://github.com/piscisaureus/wepoll
|
||||
*
|
||||
* Copyright 2012-2020, Bert Belder <bertbelder@gmail.com>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
* met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef WEPOLL_H_
|
||||
#define WEPOLL_H_
|
||||
|
||||
#ifndef WEPOLL_EXPORT
|
||||
#define WEPOLL_EXPORT
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
enum EPOLL_EVENTS {
|
||||
EPOLLIN = (int) (1U << 0),
|
||||
EPOLLPRI = (int) (1U << 1),
|
||||
EPOLLOUT = (int) (1U << 2),
|
||||
EPOLLERR = (int) (1U << 3),
|
||||
EPOLLHUP = (int) (1U << 4),
|
||||
EPOLLRDNORM = (int) (1U << 6),
|
||||
EPOLLRDBAND = (int) (1U << 7),
|
||||
EPOLLWRNORM = (int) (1U << 8),
|
||||
EPOLLWRBAND = (int) (1U << 9),
|
||||
EPOLLMSG = (int) (1U << 10), /* Never reported. */
|
||||
EPOLLRDHUP = (int) (1U << 13),
|
||||
EPOLLONESHOT = (int) (1U << 31)
|
||||
};
|
||||
|
||||
#define EPOLLIN (1U << 0)
|
||||
#define EPOLLPRI (1U << 1)
|
||||
#define EPOLLOUT (1U << 2)
|
||||
#define EPOLLERR (1U << 3)
|
||||
#define EPOLLHUP (1U << 4)
|
||||
#define EPOLLRDNORM (1U << 6)
|
||||
#define EPOLLRDBAND (1U << 7)
|
||||
#define EPOLLWRNORM (1U << 8)
|
||||
#define EPOLLWRBAND (1U << 9)
|
||||
#define EPOLLMSG (1U << 10)
|
||||
#define EPOLLRDHUP (1U << 13)
|
||||
#define EPOLLONESHOT (1U << 31)
|
||||
|
||||
#define EPOLL_CTL_ADD 1
|
||||
#define EPOLL_CTL_MOD 2
|
||||
#define EPOLL_CTL_DEL 3
|
||||
|
||||
typedef void* HANDLE;
|
||||
typedef uintptr_t SOCKET;
|
||||
|
||||
typedef union epoll_data {
|
||||
void* ptr;
|
||||
int fd;
|
||||
uint32_t u32;
|
||||
uint64_t u64;
|
||||
SOCKET sock; /* Windows specific */
|
||||
HANDLE hnd; /* Windows specific */
|
||||
} epoll_data_t;
|
||||
|
||||
struct epoll_event {
|
||||
uint32_t events; /* Epoll events and flags */
|
||||
epoll_data_t data; /* User data variable */
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
WEPOLL_EXPORT HANDLE epoll_create(int size);
|
||||
WEPOLL_EXPORT HANDLE epoll_create1(int flags);
|
||||
|
||||
WEPOLL_EXPORT int epoll_close(HANDLE ephnd);
|
||||
|
||||
WEPOLL_EXPORT int epoll_ctl(HANDLE ephnd,
|
||||
int op,
|
||||
SOCKET sock,
|
||||
struct epoll_event* event);
|
||||
|
||||
WEPOLL_EXPORT int epoll_wait(HANDLE ephnd,
|
||||
struct epoll_event* events,
|
||||
int maxevents,
|
||||
int timeout);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
#endif /* WEPOLL_H_ */
|
@ -1,4 +1,6 @@
|
||||
#pragma once
|
||||
#include <stdint.h>
|
||||
|
||||
namespace Err {} // namespace Err
|
||||
namespace Err {} // namespace Err
|
||||
|
||||
constexpr uint64_t SCE_AJM_FLAG_SIDEBAND_STREAM = (1ULL << 47);
|
@ -18,6 +18,46 @@ EXPORT SYSV_ABI int32_t sceAjmFinalize(const SceAjmContextId uiContext) {
|
||||
return Ok;
|
||||
}
|
||||
|
||||
void FixSideband(uint64_t uiFlags, void* pSidebandOutput, uint64_t szSidebandOutputSize) {
|
||||
if ((uiFlags & SCE_AJM_FLAG_SIDEBAND_STREAM) != 0) {
|
||||
SceAjmSidebandStreamResult* pResult = reinterpret_cast<SceAjmSidebandStreamResult*>(pSidebandOutput);
|
||||
pResult->sStream.iSizeConsumed = 1;
|
||||
pResult->sStream.iSizeProduced = 1;
|
||||
pResult->sStream.uiTotalDecodedSamples = 1;
|
||||
}
|
||||
}
|
||||
|
||||
EXPORT SYSV_ABI int32_t sceAjmBatchJobControlBufferRa(void* pBatchPosition, SceAjmInstanceId uiInstance, uint64_t uiFlags, void* pSidebandInput,
|
||||
uint64_t szSidebandInputSize, void* pSidebandOutput, uint64_t szSidebandOutputSize,
|
||||
void** pReturnAddress) {
|
||||
if (pSidebandOutput != nullptr) {
|
||||
std::memset(pSidebandOutput, 0, szSidebandOutputSize);
|
||||
FixSideband(uiFlags, pSidebandOutput, szSidebandOutputSize);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
EXPORT SYSV_ABI int32_t sceAjmBatchJobRunBufferRa(void* pBatchPosition, SceAjmInstanceId uiInstance, uint64_t uiFlags, void* pDataInput,
|
||||
uint64_t szDataInputSize, void* pDataOutput, uint64_t szDataOutputSize, void* pSidebandOutput,
|
||||
uint64_t szSidebandOutputSize, void** pReturnAddress) {
|
||||
if (pSidebandOutput != nullptr) {
|
||||
std::memset(pSidebandOutput, 0, szSidebandOutputSize);
|
||||
FixSideband(uiFlags, pSidebandOutput, szSidebandOutputSize);
|
||||
}
|
||||
|
||||
std::memset(pDataOutput, 0, szDataOutputSize);
|
||||
return 0;
|
||||
}
|
||||
|
||||
EXPORT SYSV_ABI int32_t sceAjmBatchStartBuffer(SceAjmContextId uiContext, void* pBatchCommands, uint64_t szBatchSize, int iPriority,
|
||||
SceAjmBatchError pBatchError, SceAjmBatchId pBatch) {
|
||||
return Ok;
|
||||
}
|
||||
|
||||
EXPORT SYSV_ABI int32_t sceAjmBatchWait(SceAjmContextId uiContext, SceAjmBatchId uiBatch, uint32_t uiTimeout, SceAjmBatchError pBatchError) {
|
||||
return Ok;
|
||||
}
|
||||
|
||||
EXPORT SYSV_ABI int32_t sceAjmMemoryRegister(const SceAjmContextId uiContext, void* const pRegion, const size_t szNumPages) {
|
||||
return Ok;
|
||||
}
|
||||
|
@ -4,4 +4,21 @@
|
||||
typedef unsigned int SceAjmContextId;
|
||||
typedef unsigned int SceAjmCodecType;
|
||||
typedef unsigned int SceAjmInstanceId;
|
||||
typedef unsigned int SceAjmBatchId;
|
||||
typedef unsigned int SceAjmBatchId;
|
||||
|
||||
struct SceAjmSidebandStreamResult {
|
||||
struct {
|
||||
int iSizeConsumed;
|
||||
int iSizeProduced;
|
||||
unsigned int uiTotalDecodedSamples;
|
||||
} sStream;
|
||||
};
|
||||
|
||||
struct SceAjmBatchError {
|
||||
int iErrorCode;
|
||||
int align1;
|
||||
void* pJobAddress;
|
||||
int uiCommandOffset;
|
||||
int align2;
|
||||
void* pJobOriginRa;
|
||||
};
|
@ -261,7 +261,11 @@ EXPORT SYSV_ABI int32_t sceAudioOutOpen(int32_t userId, SceAudioOutPortType type
|
||||
port->userId = userId;
|
||||
port->samplesNum = len;
|
||||
port->freq = freq;
|
||||
port->format = SceAudioOutParamFormat(param & 0x000000FE);
|
||||
port->format = SceAudioOutParamFormat(param & 0x0000007F);
|
||||
|
||||
if ((param & 0x000F0000) != 0) {
|
||||
LOG_ERR(L"todo handle attributes");
|
||||
}
|
||||
|
||||
switch (port->format) {
|
||||
case SceAudioOutParamFormat::S16_MONO:
|
||||
@ -451,7 +455,7 @@ EXPORT SYSV_ABI int32_t sceAudioOutOutputs(SceAudioOutOutputParam* param, uint32
|
||||
|
||||
for (uint32_t i = 0; i < num; i++) {
|
||||
auto port = pimpl->portsOut.GetPort(param[i].handle);
|
||||
if (auto err = writeOut(port, param[i].ptr, false); err != 0) {
|
||||
if (auto err = writeOut(port, param[i].ptr, false); err <= 0) {
|
||||
for (uint32_t j = 0; j < num; j++) {
|
||||
clearQueue(pimpl->portsOut.GetPort(param[i].handle));
|
||||
}
|
||||
@ -459,7 +463,7 @@ EXPORT SYSV_ABI int32_t sceAudioOutOutputs(SceAudioOutOutputParam* param, uint32
|
||||
}
|
||||
if (!firstport)
|
||||
firstport = port;
|
||||
else if ((firstport->freq != port->freq) || (firstport->samplesNum != port->samplesNum) || (firstport->format != port->format))
|
||||
else if (firstport->samplesNum != port->samplesNum)
|
||||
return Err::AudioOut::INVALID_SIZE;
|
||||
}
|
||||
|
||||
|
9
modules/libSceFace/CMakeLists.txt
Normal file
9
modules/libSceFace/CMakeLists.txt
Normal file
@ -0,0 +1,9 @@
|
||||
cmake_minimum_required(VERSION 3.24)
|
||||
include(../setupModule.cmake)
|
||||
|
||||
set(libName libSceFace)
|
||||
project(${libName})
|
||||
|
||||
add_library(${libName} SHARED entry.cpp)
|
||||
|
||||
setupModule(${libName})
|
11
modules/libSceFace/codes.h
Normal file
11
modules/libSceFace/codes.h
Normal file
@ -0,0 +1,11 @@
|
||||
#pragma once
|
||||
#include <stdint.h>
|
||||
|
||||
namespace Err {} // namespace Err
|
||||
|
||||
constexpr int AGE_BIN_SIZE = 81;
|
||||
constexpr int IDENTIFY_FEATURE_SIZE = 4096;
|
||||
constexpr int IDENTIFY_LITE_FEATURE_SIZE = 256;
|
||||
constexpr int IDENTIFY_EX_FEATURE_SIZE = 1024;
|
||||
constexpr int SHAPE_POINT_NUM_MAX = 46;
|
||||
constexpr int PARTS_NUM_MAX = 4;
|
171
modules/libSceFace/entry.cpp
Normal file
171
modules/libSceFace/entry.cpp
Normal file
@ -0,0 +1,171 @@
|
||||
#include "common.h"
|
||||
#include "logging.h"
|
||||
#include "types.h"
|
||||
|
||||
LOG_DEFINE_MODULE(libSceFace);
|
||||
|
||||
namespace {} // namespace
|
||||
|
||||
extern "C" {
|
||||
|
||||
EXPORT const char* MODULE_NAME = "libSceFace";
|
||||
|
||||
EXPORT SYSV_ABI int sceFaceDetection(const unsigned char* imgPtr, int width, int height, int rowstride, const SceFaceDetectionDictPtr detectDictPtr,
|
||||
float magBegin, float magStep, float magEnd, int xScanStep, int yScanStep, float thresholdScore, int resultPrecision,
|
||||
SceFaceDetectionResult resultFaceArray[], int resultFaceArraySize, int* resultFaceNum, void* workMemory,
|
||||
int workMemorySize) {
|
||||
return Ok;
|
||||
}
|
||||
|
||||
EXPORT SYSV_ABI int sceFaceDetectionEx(const unsigned char* imgPtr, int width, int height, int rowstride, const SceFaceDetectionDictPtr detectDictPtr,
|
||||
const SceFaceDetectionParam* detectParam, SceFaceDetectionResult resultFaceArray[], int resultFaceArraySize,
|
||||
int* resultFaceNum, void* workMemory, int workMemorySize) {
|
||||
return Ok;
|
||||
}
|
||||
|
||||
EXPORT SYSV_ABI int sceFaceDetectionLocal(const unsigned char* imgPtr, int width, int height, int rowstride, const SceFaceDetectionDictPtr detectDictPtr,
|
||||
float magStep, float xExpandRegion, float yExpandRegion, int xScanStep, int yScanStep, float thresholdScore,
|
||||
const SceFaceDetectionResult referenceFaceArray[], int referenceFaceArraySize,
|
||||
SceFaceDetectionResult resultFaceArray[], int resultFaceArraySize, int* resultFaceNum, void* workMemory,
|
||||
int workMemorySize) {
|
||||
return Ok;
|
||||
}
|
||||
|
||||
EXPORT SYSV_ABI int sceFaceDetectionGetDefaultParam(SceFaceDetectionParam* detectParam) {
|
||||
return Ok;
|
||||
}
|
||||
|
||||
EXPORT SYSV_ABI int sceFaceDetectionGetWorkingMemorySize(int width, int height, int rowstride, const SceFaceDetectionDictPtr detectDictPtr) {
|
||||
return Ok;
|
||||
}
|
||||
|
||||
EXPORT SYSV_ABI int sceFaceParts(const unsigned char* imgPtr, int width, int height, int rowstride, const SceFacePartsDictPtr partsDictPtr, int xScanStep,
|
||||
int yScanStep, const SceFaceDetectionResult* detectedFace, SceFacePartsResult resultPartsArray[], int resultPartsArraySize,
|
||||
int* resultPartsNum, void* workMemory, int workMemorySize) {
|
||||
return Ok;
|
||||
}
|
||||
|
||||
EXPORT SYSV_ABI int sceFacePartsEx(const unsigned char* imgPtr, int width, int height, int rowstride, const SceFacePartsDictPtr partsDictPtr,
|
||||
const SceFacePartsCheckDictPtr partsCheckDictPtr, int xScanStep, int yScanStep, const SceFaceDetectionResult* detectedFace,
|
||||
SceFacePartsResult resultPartsArray[], int resultPartsArraySize, int* resultPartsNum, void* workMemory, int workMemorySize) {
|
||||
return Ok;
|
||||
}
|
||||
|
||||
EXPORT SYSV_ABI int sceFaceAllParts(const unsigned char* imgPtr, int width, int height, int rowstride, const SceFacePartsDictPtr partsDictPtr,
|
||||
const SceFaceShapeDictPtr shapeDictPtr, int xScanStep, int yScanStep, const SceFaceDetectionResult* detectedFace,
|
||||
SceFacePartsResult resultPartsArray[], int resultPartsArraySize, int* resultPartsNum, void* workMemory,
|
||||
int workMemorySize) {
|
||||
return Ok;
|
||||
}
|
||||
|
||||
EXPORT SYSV_ABI int sceFaceEstimatePoseRegion(int width, int height, const SceFaceDetectionResult* detectedFace, const SceFacePartsResult detectedPartsArray[],
|
||||
int detectedPartsNum, SceFacePose* resultFacePose, SceFaceRegion* resultFaceRegion) {
|
||||
return Ok;
|
||||
}
|
||||
|
||||
EXPORT SYSV_ABI int sceFacePartsResultCheck(const SceFaceDetectionResult* detectedFace, const SceFacePartsResult detectedPartsArray[], int detectedPartsNum,
|
||||
const SceFacePartsCheckDictPtr partsCheckDictPtr, bool* good) {
|
||||
return Ok;
|
||||
}
|
||||
|
||||
EXPORT SYSV_ABI int sceFacePartsGetWorkingMemorySize(int width, int height, int rowstride, const SceFacePartsDictPtr partsDictPtr) {
|
||||
return Ok;
|
||||
}
|
||||
|
||||
EXPORT SYSV_ABI int sceFaceAllPartsGetWorkingMemorySize(int width, int height, int rowstride, const SceFacePartsDictPtr partsDictPtr) {
|
||||
return Ok;
|
||||
}
|
||||
|
||||
EXPORT SYSV_ABI int sceFaceAttribute(const unsigned char* imgPtr, int width, int height, int rowstride, const SceFaceAttribDictPtr attribDictPtr,
|
||||
const SceFaceDetectionResult* detectedFace, const SceFacePartsResult detectedPartsArray[], int detectedPartsNum,
|
||||
SceFaceAttribResult resultAttribArray[], int resultAttribArraySize, int* resultAttribNum, void* workMemory,
|
||||
int workMemorySize) {
|
||||
return Ok;
|
||||
}
|
||||
|
||||
EXPORT SYSV_ABI int sceFaceAgeRangeEstimate(const unsigned char* imgPtr, int width, int height, int rowstride, const SceFaceAgeDictPtr ageDictPtr,
|
||||
const SceFaceDetectionResult* detectedFace, const SceFacePartsResult detectedPartsArray[], int detectedPartsNum,
|
||||
SceFaceAgeRangeResult* resultAge, void* workMemory, int workMemorySize) {
|
||||
return Ok;
|
||||
}
|
||||
|
||||
EXPORT SYSV_ABI int sceFaceAgeRangeIntegrate(const SceFaceAgeRangeResult* ageRange, SceFaceAgeDistrData* ageDistrData, int* ageResult) {
|
||||
return Ok;
|
||||
}
|
||||
|
||||
EXPORT SYSV_ABI int sceFaceAttributeGetWorkingMemorySize(int width, int height, int rowstride, const SceFaceAttribDictPtr attribDictPtr) {
|
||||
return Ok;
|
||||
}
|
||||
|
||||
EXPORT SYSV_ABI int sceFaceAgeGetWorkingMemorySize(int width, int height, int rowstride, const SceFaceAgeDictPtr ageDictPtr) {
|
||||
return Ok;
|
||||
}
|
||||
|
||||
EXPORT SYSV_ABI int sceFaceIdentifyGetFeature(const unsigned char* imgPtr, int width, int height, int rowstride, const SceFaceIdentifyDictPtr identifyDictPtr,
|
||||
const SceFaceDetectionResult* detectedFace, const SceFacePartsResult detectedPartsArray[], int detectedPartsNum,
|
||||
SceFaceIdentifyFeature* resultFeature, void* workMemory, int workMemorySize) {
|
||||
return Ok;
|
||||
}
|
||||
|
||||
EXPORT SYSV_ABI int sceFaceIdentifyLiteGetFeature(const unsigned char* imgPtr, int width, int height, int rowstride,
|
||||
const SceFaceIdentifyLiteDictPtr identifyDictPtr, const SceFaceDetectionResult* detectedFace,
|
||||
const SceFacePartsResult detectedPartsArray[], int detectedPartsNum,
|
||||
SceFaceIdentifyLiteFeature* resultFeature, void* workMemory, int workMemorySize) {
|
||||
return Ok;
|
||||
}
|
||||
|
||||
EXPORT SYSV_ABI int sceFaceIdentifyExGetFeature(const unsigned char* imgPtr, int width, int height, int rowstride,
|
||||
const SceFaceIdentifyExDictPtr identifyDictPtr, const SceFaceDetectionResult* detectedFace,
|
||||
const SceFacePartsResult detectedPartsArray[], int detectedPartsNum,
|
||||
const SceFaceAttribResult detectedAttribArray[], int detectedAttribNum, SceFaceIdentifyExFeature* resultFeature,
|
||||
void* workMemory, int workMemorySize) {
|
||||
return Ok;
|
||||
}
|
||||
|
||||
EXPORT SYSV_ABI int sceFaceIdentifySimilarity(const SceFaceIdentifyFeature* extractedFeature, const SceFaceIdentifyFeature registeredFeatureArray[],
|
||||
int registeredFeatureNum, const SceFaceIdentifyDictPtr identifyDictPtr, float* maxScore, int* maxScoreId,
|
||||
float resultScoreArray[]) {
|
||||
return Ok;
|
||||
}
|
||||
|
||||
EXPORT SYSV_ABI int sceFaceIdentifyLiteSimilarity(const SceFaceIdentifyLiteFeature* extractedFeature, const SceFaceIdentifyLiteFeature registeredFeatureArray[],
|
||||
int registeredFeatureNum, const SceFaceIdentifyLiteDictPtr identifyDictPtr, float* maxScore, int* maxScoreId,
|
||||
float resultScoreArray[]) {
|
||||
return Ok;
|
||||
}
|
||||
|
||||
EXPORT SYSV_ABI int sceFaceIdentifyExSimilarity(const SceFaceIdentifyExFeature* extractedFeature, const SceFaceIdentifyExFeature registeredFeatureArray[],
|
||||
int registeredFeatureNum, const SceFaceIdentifyExDictPtr identifyDictPtr, float* maxScore, int* maxScoreId,
|
||||
float resultScoreArray[]) {
|
||||
return Ok;
|
||||
}
|
||||
|
||||
EXPORT SYSV_ABI int sceFaceIdentifyGetWorkingMemorySize(int width, int height, int rowstride, const SceFaceIdentifyDictPtr identifyDictPtr) {
|
||||
return Ok;
|
||||
}
|
||||
|
||||
EXPORT SYSV_ABI int sceFaceIdentifyLiteGetWorkingMemorySize(int width, int height, int rowstride, const SceFaceIdentifyLiteDictPtr identifyDictPtr) {
|
||||
return Ok;
|
||||
}
|
||||
|
||||
EXPORT SYSV_ABI int sceFaceIdentifyExGetWorkingMemorySize(int width, int height, int rowstride, const SceFaceIdentifyExDictPtr identifyDictPtr) {
|
||||
return Ok;
|
||||
}
|
||||
|
||||
EXPORT SYSV_ABI int sceFaceShapeFit(const unsigned char* imgPtr, int width, int height, int rowstride, const SceFaceShapeModelDictPtr shapeDictPtr,
|
||||
SceFaceShapeResult* shape, float lostThreshold, const SceFaceDetectionResult* detectedFace,
|
||||
const SceFacePartsResult detectedPartsArray[], int detectedPartsNum, void* workMemory, int workMemorySize) {
|
||||
return Ok;
|
||||
}
|
||||
|
||||
EXPORT SYSV_ABI int sceFaceShapeTrack(const unsigned char* imgPtrCur, const unsigned char* imgPtrPrv, int width, int height, int rowstride,
|
||||
const SceFaceShapeModelDictPtr shapeDictPtr, SceFaceShapeResult* shape, float lostThreshold, void* workMemory,
|
||||
int workMemorySize) {
|
||||
return Ok;
|
||||
}
|
||||
|
||||
EXPORT SYSV_ABI int sceFaceShapeGetWorkingMemorySize(int width, int height, int rowstride, const SceFaceShapeModelDictPtr shapeDictPtr, int maxFaceWidth,
|
||||
int maxFaceHeight, bool isVideoInput) {
|
||||
return Ok;
|
||||
}
|
||||
}
|
105
modules/libSceFace/types.h
Normal file
105
modules/libSceFace/types.h
Normal file
@ -0,0 +1,105 @@
|
||||
#pragma once
|
||||
#include "codes.h"
|
||||
|
||||
typedef void* SceFaceAttribDictPtr;
|
||||
typedef void* SceFaceAgeDictPtr;
|
||||
typedef void* SceFaceDetectionDictPtr;
|
||||
typedef void* SceFacePartsDictPtr;
|
||||
typedef void* SceFacePartsCheckDictPtr;
|
||||
typedef void* SceFaceShapeDictPtr;
|
||||
typedef void* SceFaceIdentifyDictPtr;
|
||||
typedef void* SceFaceIdentifyLiteDictPtr;
|
||||
typedef void* SceFaceIdentifyExDictPtr;
|
||||
typedef void* SceFaceShapeModelDictPtr;
|
||||
|
||||
struct SceFaceAgeDistrData {
|
||||
float score[AGE_BIN_SIZE];
|
||||
int numIntegrated;
|
||||
};
|
||||
|
||||
struct SceFaceAttribResult {
|
||||
unsigned int attribId;
|
||||
float score;
|
||||
};
|
||||
|
||||
struct SceFaceAgeRangeResult {
|
||||
unsigned char maxAge;
|
||||
unsigned char minAge;
|
||||
};
|
||||
|
||||
struct SceFaceDetectionResult {
|
||||
float faceX;
|
||||
float faceY;
|
||||
float faceW;
|
||||
float faceH;
|
||||
float faceRoll;
|
||||
float facePitch;
|
||||
float faceYaw;
|
||||
float score;
|
||||
};
|
||||
|
||||
struct SceFacePartsResult {
|
||||
unsigned int partsId;
|
||||
float partsX;
|
||||
float partsY;
|
||||
float score;
|
||||
};
|
||||
|
||||
struct SceFaceDetectionParam {
|
||||
int version;
|
||||
int size;
|
||||
float magBegin;
|
||||
float magStep;
|
||||
float magEnd;
|
||||
int xScanStart;
|
||||
int yScanStart;
|
||||
int xScanStep;
|
||||
int yScanStep;
|
||||
float xScanOver;
|
||||
float yScanOver;
|
||||
float thresholdScore;
|
||||
int resultPrecision;
|
||||
int searchType;
|
||||
};
|
||||
|
||||
struct SceFaceIdentifyFeature {
|
||||
unsigned char data[IDENTIFY_FEATURE_SIZE];
|
||||
};
|
||||
|
||||
struct SceFaceIdentifyLiteFeature {
|
||||
unsigned char data[IDENTIFY_LITE_FEATURE_SIZE];
|
||||
};
|
||||
|
||||
struct SceFaceIdentifyExFeature {
|
||||
unsigned char data[IDENTIFY_EX_FEATURE_SIZE];
|
||||
};
|
||||
|
||||
struct SceFaceShapeResult {
|
||||
int modelID;
|
||||
int pointNum;
|
||||
float pointX[SHAPE_POINT_NUM_MAX];
|
||||
float pointY[SHAPE_POINT_NUM_MAX];
|
||||
int isLost[SHAPE_POINT_NUM_MAX];
|
||||
float fourPointX[PARTS_NUM_MAX];
|
||||
float fourPointY[PARTS_NUM_MAX];
|
||||
float rectCenterX;
|
||||
float rectCenterY;
|
||||
float rectWidth;
|
||||
float rectHeight;
|
||||
float faceRoll;
|
||||
float facePitch;
|
||||
float faceYaw;
|
||||
float score;
|
||||
unsigned char data[4096];
|
||||
};
|
||||
|
||||
struct SceFacePose {
|
||||
float faceRoll;
|
||||
float facePitch;
|
||||
float faceYaw;
|
||||
};
|
||||
|
||||
struct SceFaceRegion {
|
||||
float faceRegionX[4];
|
||||
float faceRegionY[4];
|
||||
};
|
9
modules/libSceFaceTracker/CMakeLists.txt
Normal file
9
modules/libSceFaceTracker/CMakeLists.txt
Normal file
@ -0,0 +1,9 @@
|
||||
cmake_minimum_required(VERSION 3.24)
|
||||
include(../setupModule.cmake)
|
||||
|
||||
set(libName libSceFaceTracker)
|
||||
project(${libName})
|
||||
|
||||
add_library(${libName} SHARED entry.cpp)
|
||||
|
||||
setupModule(${libName})
|
6
modules/libSceFaceTracker/codes.h
Normal file
6
modules/libSceFaceTracker/codes.h
Normal file
@ -0,0 +1,6 @@
|
||||
#pragma once
|
||||
#include <stdint.h>
|
||||
|
||||
namespace Err {} // namespace Err
|
||||
|
||||
constexpr int PARTS_NUM_MAX = 4;
|
90
modules/libSceFaceTracker/entry.cpp
Normal file
90
modules/libSceFaceTracker/entry.cpp
Normal file
@ -0,0 +1,90 @@
|
||||
#include "common.h"
|
||||
#include "logging.h"
|
||||
#include "types.h"
|
||||
|
||||
LOG_DEFINE_MODULE(libSceFaceTracker);
|
||||
|
||||
namespace {} // namespace
|
||||
|
||||
extern "C" {
|
||||
|
||||
EXPORT const char* MODULE_NAME = "libSceFaceTracker";
|
||||
|
||||
EXPORT SYSV_ABI int sceFaceTrackerInitialize(int width, int height, int rowstride, int maxTrackingNum, uint32_t* threadFuncMutex,
|
||||
const SceFaceTrackerConfig* pConfig, void* work, int workSize) {
|
||||
return Ok;
|
||||
}
|
||||
|
||||
EXPORT SYSV_ABI int sceFaceTrackerFinalize(void* work) {
|
||||
return Ok;
|
||||
}
|
||||
|
||||
EXPORT SYSV_ABI int sceFaceTrackerUpdate(const unsigned char* imageData, void* work) {
|
||||
return Ok;
|
||||
}
|
||||
|
||||
EXPORT SYSV_ABI int sceFaceTrackerSearchTarget(uint32_t* threadFuncMutex, void* work) {
|
||||
return Ok;
|
||||
}
|
||||
|
||||
EXPORT SYSV_ABI int sceFaceTrackerGetResult(int trackId, SceFaceTrackerResult* result, void* work) {
|
||||
return Ok;
|
||||
}
|
||||
|
||||
EXPORT SYSV_ABI int sceFaceTrackerStartTracking(int trackId, void* work) {
|
||||
return Ok;
|
||||
}
|
||||
|
||||
EXPORT SYSV_ABI int sceFaceTrackerStopTracking(int trackId, void* work) {
|
||||
return Ok;
|
||||
}
|
||||
|
||||
EXPORT SYSV_ABI int sceFaceTrackerReset(bool isClearRegisterUser, void* work) {
|
||||
return Ok;
|
||||
}
|
||||
|
||||
EXPORT SYSV_ABI int sceFaceTrackerAddUserFeature(int userId, const void* featureData, int featureDataSize, void* work) {
|
||||
return Ok;
|
||||
}
|
||||
|
||||
EXPORT SYSV_ABI int sceFaceTrackerRegisterUser(int userId, const void* featureData, int featureDataSize, void* work) {
|
||||
return Ok;
|
||||
}
|
||||
|
||||
EXPORT SYSV_ABI int sceFaceTrackerUnregisterUser(int userId, void* work) {
|
||||
return Ok;
|
||||
}
|
||||
|
||||
EXPORT SYSV_ABI int sceFaceTrackerGetUserFeature(int userId, const void** featureData, int* featureDataSize, void* work) {
|
||||
return Ok;
|
||||
}
|
||||
|
||||
EXPORT SYSV_ABI int sceFaceTrackerGetUserIdByTrackId(int trackId, void* work) {
|
||||
return Ok;
|
||||
}
|
||||
|
||||
EXPORT SYSV_ABI int sceFaceTrackerGetTrackIdByUserId(int trackId, void* work) {
|
||||
return Ok;
|
||||
}
|
||||
|
||||
EXPORT SYSV_ABI int sceFaceTrackerRegisterStartTrackingCallback(SceFaceTrackerStartTrackingCallbackFunc func, void* callbackParam, void* work) {
|
||||
return Ok;
|
||||
}
|
||||
|
||||
EXPORT SYSV_ABI int sceFaceTrackerRegisterFixUserIdCallback(SceFaceTrackerFixUserIdCallbackFunc func, void* callbackParam, void* work) {
|
||||
return Ok;
|
||||
}
|
||||
|
||||
EXPORT SYSV_ABI int sceFaceTrackerRegisterLostTargetCallback(SceFaceTrackerLostTargetCallbackFunc func, void* callbackParam, void* work) {
|
||||
return Ok;
|
||||
}
|
||||
|
||||
EXPORT SYSV_ABI int sceFaceTrackerRegisterRecoveryFromLostTargetCallback(SceFaceTrackerRecoveryFromLostTargetCallbackFunc func, void* callbackParam,
|
||||
void* work) {
|
||||
return Ok;
|
||||
}
|
||||
|
||||
EXPORT SYSV_ABI int sceFaceTrackerRegisterStopTrackingCallback(SceFaceTrackerStopTrackingCallbackFunc func, void* callbackParam, void* work) {
|
||||
return Ok;
|
||||
}
|
||||
}
|
108
modules/libSceFaceTracker/types.h
Normal file
108
modules/libSceFaceTracker/types.h
Normal file
@ -0,0 +1,108 @@
|
||||
#pragma once
|
||||
#include "codes.h"
|
||||
|
||||
enum class SceFaceTrackerFaceDetectDictionary {
|
||||
FACE_FRONTAL_DICT = 0,
|
||||
FACE_ROLL_DICT = 1,
|
||||
FACE_YAW_DICT = 2,
|
||||
FACE_PITCH_DICT = 3,
|
||||
FACE_ROLL_YAW_DICT = 4,
|
||||
FACE_ROLL_YAW_PITCH_DICT = 5,
|
||||
FACE_DICT_MAX = 6,
|
||||
FACE_DICT_UNDEF = 0xFFFF,
|
||||
};
|
||||
|
||||
typedef void* SceFaceTrackerStartTrackingCallbackFunc(void* callbackParam);
|
||||
|
||||
typedef void* SceFaceTrackerFixUserIdCallbackFunc(int trackId, int userId, const void* featureData, int featureDataSize, void* callbackParam);
|
||||
|
||||
typedef void* SceFaceTrackerLostTargetCallbackFunc(int trackId, int userId, void* callbackParam);
|
||||
|
||||
typedef void* SceFaceTrackerRecoveryFromLostTargetCallbackFunc(int trackId, int userId, void* callbackParam);
|
||||
|
||||
typedef void* SceFaceTrackerStopTrackingCallbackFunc(int trackId, int userId, void* callbackParam);
|
||||
|
||||
struct SceFaceTrackerAttributeScores {
|
||||
float smile;
|
||||
float gender;
|
||||
float baby;
|
||||
float adult;
|
||||
float elder;
|
||||
float leyeopen;
|
||||
float reyeopen;
|
||||
float glasses;
|
||||
};
|
||||
|
||||
struct SceFacePartsResult {
|
||||
unsigned int partsId;
|
||||
float partsX;
|
||||
float partsY;
|
||||
float score;
|
||||
};
|
||||
|
||||
struct SceFaceTrackerResult {
|
||||
int status;
|
||||
int trackId;
|
||||
int userId;
|
||||
float posX;
|
||||
float posY;
|
||||
float faceWidth;
|
||||
float faceHeight;
|
||||
float faceRoll;
|
||||
float facePitch;
|
||||
float faceYaw;
|
||||
float score;
|
||||
float partsX[PARTS_NUM_MAX];
|
||||
float partsY[PARTS_NUM_MAX];
|
||||
SceFacePartsResult partsResult[PARTS_NUM_MAX];
|
||||
int partsCheckFlag;
|
||||
SceFaceTrackerAttributeScores attributeScores;
|
||||
};
|
||||
|
||||
struct SceFaceTrackerGlobalSearchConfig {
|
||||
float magBegin;
|
||||
float magEnd;
|
||||
float magStep;
|
||||
int xScanStart;
|
||||
int yScanStart;
|
||||
int xScanStep;
|
||||
int yScanStep;
|
||||
float xScanOver;
|
||||
float yScanOver;
|
||||
float thresholdScore;
|
||||
int resultPrecision;
|
||||
int searchType;
|
||||
int maxFaceNum;
|
||||
SceFaceTrackerFaceDetectDictionary dictionary;
|
||||
};
|
||||
|
||||
struct SceFaceTrackerLocalSearchConfig {
|
||||
float magStep;
|
||||
float xExpandRegion;
|
||||
float yExpandRegion;
|
||||
int xScanStep;
|
||||
int yScanStep;
|
||||
float thresholdScore;
|
||||
SceFaceTrackerFaceDetectDictionary dictionary;
|
||||
};
|
||||
|
||||
struct SceFaceTrackerIdentifyConfig {
|
||||
float fixUserIdThresholdScore;
|
||||
int fixUserIdIdentifyCount;
|
||||
float unknownUserThresholdScore;
|
||||
int unknownUserIdentifyCount;
|
||||
bool enableFeatureUpdate;
|
||||
};
|
||||
|
||||
struct SceFaceTrackerConfig {
|
||||
SceFaceTrackerGlobalSearchConfig globalSearchConfig;
|
||||
SceFaceTrackerLocalSearchConfig localSearchConfig;
|
||||
SceFaceTrackerIdentifyConfig identifyConfig;
|
||||
int framesToLost;
|
||||
float trackThresholdScore;
|
||||
int localSearchInterval;
|
||||
int userIdentifyInterval;
|
||||
int attributeInterval;
|
||||
bool enableUserIdentify;
|
||||
bool enableAttribute;
|
||||
};
|
@ -342,6 +342,14 @@ uint32_t SYSV_ABI sceGnmDrawInitDefaultHardwareState350(uint32_t* cmdOut, uint64
|
||||
return 2;
|
||||
}
|
||||
|
||||
uint32_t SYSV_ABI sceGnmDrawInitToDefaultContextState400(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;
|
||||
}
|
||||
|
||||
uint32_t SYSV_ABI sceGnmDispatchInitDefaultHardwareState(uint32_t* cmdOut, uint64_t size) {
|
||||
LOG_USE_MODULE(libSceGraphicsDriver);
|
||||
LOG_DEBUG(L"%S", __FUNCTION__);
|
||||
|
@ -280,7 +280,7 @@ EXPORT SYSV_ABI int __NID(setjmp)(unwinding_jmp_buf* jb) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
EXPORT SYSV_ABI int __NID(gmtime_s)(tm* tm, const time_t* time) {
|
||||
EXPORT SYSV_ABI int __NID(gmtime_s)(const time_t* time, tm* tm) {
|
||||
return ::gmtime_s(tm, time);
|
||||
}
|
||||
|
||||
|
@ -70,6 +70,10 @@ EXPORT SYSV_ABI int32_t sceNpWebApiDeleteRequest(int64_t requestId) {
|
||||
return Ok;
|
||||
}
|
||||
|
||||
EXPORT SYSV_ABI int32_t sceNpWebApiSendRequest(int64_t requestId, const void* pData, size_t dataSize, SceNpWebApiResponseInformationOption* pRespInfoOption) {
|
||||
return Ok;
|
||||
}
|
||||
|
||||
EXPORT SYSV_ABI int32_t sceNpWebApiSendRequest2(int64_t requestId, const void* pData, size_t dataSize, SceNpWebApiResponseInformationOption* pRespInfoOption) {
|
||||
return Ok;
|
||||
}
|
||||
@ -103,6 +107,10 @@ EXPORT SYSV_ABI int32_t sceNpWebApiGetHttpResponseHeaderValue(int64_t requestId,
|
||||
return Ok;
|
||||
}
|
||||
|
||||
EXPORT SYSV_ABI int32_t sceNpWebApiGetHttpStatusCode(int64_t requestId, int32_t* pStatusCode) {
|
||||
return Ok;
|
||||
}
|
||||
|
||||
EXPORT SYSV_ABI int32_t sceNpWebApiAbortRequest(int64_t requestId) {
|
||||
return Ok;
|
||||
}
|
||||
|
9
modules/libScePadTracker/CMakeLists.txt
Normal file
9
modules/libScePadTracker/CMakeLists.txt
Normal file
@ -0,0 +1,9 @@
|
||||
cmake_minimum_required(VERSION 3.24)
|
||||
include(../setupModule.cmake)
|
||||
|
||||
set(libName libScePadTracker)
|
||||
project(${libName})
|
||||
|
||||
add_library(${libName} SHARED entry.cpp)
|
||||
|
||||
setupModule(${libName})
|
7
modules/libScePadTracker/codes.h
Normal file
7
modules/libScePadTracker/codes.h
Normal file
@ -0,0 +1,7 @@
|
||||
#pragma once
|
||||
#include <stdint.h>
|
||||
|
||||
namespace Err {} // namespace Err
|
||||
|
||||
constexpr int TRACKER_CONTROLLER_MAX = 4;
|
||||
constexpr int TRACKER_IMAGE_MAX = 2;
|
36
modules/libScePadTracker/entry.cpp
Normal file
36
modules/libScePadTracker/entry.cpp
Normal file
@ -0,0 +1,36 @@
|
||||
#include "common.h"
|
||||
#include "logging.h"
|
||||
#include "types.h"
|
||||
|
||||
LOG_DEFINE_MODULE(libScePadTracker);
|
||||
|
||||
namespace {} // namespace
|
||||
|
||||
extern "C" {
|
||||
|
||||
EXPORT const char* MODULE_NAME = "libScePadTracker";
|
||||
|
||||
EXPORT SYSV_ABI int32_t scePadTrackerCalibrate(int32_t* onionSize, int32_t* garlicSize) {
|
||||
return Ok;
|
||||
}
|
||||
|
||||
EXPORT SYSV_ABI int32_t scePadTrackerGetWorkingMemorySize(int32_t* onionSize, int32_t* garlicSize) {
|
||||
return Ok;
|
||||
}
|
||||
|
||||
EXPORT SYSV_ABI int32_t scePadTrackerInit(void* onionMemory, void* garlicMemory, int pipeId, int queueId) {
|
||||
return Ok;
|
||||
}
|
||||
|
||||
EXPORT SYSV_ABI int32_t scePadTrackerReadState(int32_t handle, ScePadTrackerData* data) {
|
||||
return Ok;
|
||||
}
|
||||
|
||||
EXPORT SYSV_ABI int32_t scePadTrackerTerm() {
|
||||
return Ok;
|
||||
}
|
||||
|
||||
EXPORT SYSV_ABI int32_t scePadTrackerUpdate(ScePadTrackerInput input) {
|
||||
return Ok;
|
||||
}
|
||||
}
|
32
modules/libScePadTracker/types.h
Normal file
32
modules/libScePadTracker/types.h
Normal file
@ -0,0 +1,32 @@
|
||||
#pragma once
|
||||
#include "codes.h"
|
||||
|
||||
enum class ScePadTrackerStatus {
|
||||
TRACKER_TRACKING = 0,
|
||||
TRACKER_NOT_TRACKING = 1,
|
||||
TRACKER_ROOM_CONFLICT = 2,
|
||||
TRACKER_CALIBRATING = 3,
|
||||
};
|
||||
|
||||
struct ScePadTrackerImageCoordinates {
|
||||
ScePadTrackerStatus status;
|
||||
float x;
|
||||
float y;
|
||||
};
|
||||
|
||||
struct ScePadTrackerImage {
|
||||
int exposure;
|
||||
int gain;
|
||||
int width;
|
||||
int height;
|
||||
void* data;
|
||||
};
|
||||
|
||||
struct ScePadTrackerInput {
|
||||
int32_t handles[TRACKER_CONTROLLER_MAX];
|
||||
ScePadTrackerImage images[TRACKER_IMAGE_MAX];
|
||||
};
|
||||
|
||||
struct ScePadTrackerData {
|
||||
ScePadTrackerImageCoordinates imageCoordinates[TRACKER_IMAGE_MAX];
|
||||
};
|
9
modules/libSceRudp/CMakeLists.txt
Normal file
9
modules/libSceRudp/CMakeLists.txt
Normal file
@ -0,0 +1,9 @@
|
||||
cmake_minimum_required(VERSION 3.24)
|
||||
include(../setupModule.cmake)
|
||||
|
||||
set(libName libSceRudp)
|
||||
project(${libName})
|
||||
|
||||
add_library(${libName} SHARED entry.cpp)
|
||||
|
||||
setupModule(${libName})
|
4
modules/libSceRudp/codes.h
Normal file
4
modules/libSceRudp/codes.h
Normal file
@ -0,0 +1,4 @@
|
||||
#pragma once
|
||||
#include <stdint.h>
|
||||
|
||||
namespace Err {} // namespace Err
|
140
modules/libSceRudp/entry.cpp
Normal file
140
modules/libSceRudp/entry.cpp
Normal file
@ -0,0 +1,140 @@
|
||||
#include "common.h"
|
||||
#include "logging.h"
|
||||
#include "types.h"
|
||||
|
||||
LOG_DEFINE_MODULE(libSceRudp);
|
||||
|
||||
namespace {} // namespace
|
||||
|
||||
extern "C" {
|
||||
|
||||
EXPORT const char* MODULE_NAME = "libSceRudp";
|
||||
|
||||
EXPORT SYSV_ABI int sceRudpInit(void* memPool, int memPoolSize) {
|
||||
return Ok;
|
||||
}
|
||||
|
||||
EXPORT SYSV_ABI int sceRudpEnableInternalIOThread(uint32_t stackSize, uint32_t priority) {
|
||||
return Ok;
|
||||
}
|
||||
|
||||
EXPORT SYSV_ABI int sceRudpEnableInternalIOThread2(uint32_t stackSize, uint32_t priority, uint32_t affinityMask) {
|
||||
return Ok;
|
||||
}
|
||||
|
||||
EXPORT SYSV_ABI int sceRudpGetMaxSegmentSize(uint16_t* mss) {
|
||||
return Ok;
|
||||
}
|
||||
|
||||
EXPORT SYSV_ABI int sceRudpSetEventHandler(SceRudpEventHandler handler, void* arg) {
|
||||
return Ok;
|
||||
}
|
||||
|
||||
EXPORT SYSV_ABI int sceRudpSetMaxSegmentSize(uint16_t mss) {
|
||||
return Ok;
|
||||
}
|
||||
|
||||
EXPORT SYSV_ABI int sceRudpCreateContext(SceRudpContextEventHandler handler, void* arg, int* ctxId) {
|
||||
return Ok;
|
||||
}
|
||||
|
||||
EXPORT SYSV_ABI int sceRudpGetOption(int ctxId, int option, void* optVal, size_t optLen) {
|
||||
return Ok;
|
||||
}
|
||||
|
||||
EXPORT SYSV_ABI int sceRudpSetOption(int ctxId, int option, void const* optVal, size_t optLen) {
|
||||
return Ok;
|
||||
}
|
||||
|
||||
EXPORT SYSV_ABI int sceRudpGetContextStatus(int ctxId, SceRudpContextStatus* status, size_t statusSize) {
|
||||
return Ok;
|
||||
}
|
||||
|
||||
EXPORT SYSV_ABI int sceRudpGetLocalInfo(int ctxId, int* soc, struct SceNetSockaddr* addr, SceNetSocklen_t* addrLen, uint16_t* vport, uint8_t* muxMode) {
|
||||
return Ok;
|
||||
}
|
||||
|
||||
EXPORT SYSV_ABI int sceRudpGetRemoteInfo(int ctxId, struct SceNetSockaddr* addr, SceNetSocklen_t* addrLen, uint16_t* vport) {
|
||||
return Ok;
|
||||
}
|
||||
|
||||
EXPORT SYSV_ABI int sceRudpGetStatus(SceRudpStatus* status, size_t statusSize) {
|
||||
return Ok;
|
||||
}
|
||||
|
||||
EXPORT SYSV_ABI int sceRudpFlush(int ctxId) {
|
||||
return Ok;
|
||||
}
|
||||
|
||||
EXPORT SYSV_ABI int sceRudpNetFlush(void) {
|
||||
return Ok;
|
||||
}
|
||||
|
||||
EXPORT SYSV_ABI int sceRudpGetNumberOfPacketsToRead(int ctxId) {
|
||||
return Ok;
|
||||
}
|
||||
|
||||
EXPORT SYSV_ABI int sceRudpGetSizeReadable(int ctxId) {
|
||||
return Ok;
|
||||
}
|
||||
|
||||
EXPORT SYSV_ABI int sceRudpGetSizeWritable(int ctxId) {
|
||||
return Ok;
|
||||
}
|
||||
|
||||
EXPORT SYSV_ABI int sceRudpRead(int ctxId, void* data, size_t len, uint8_t flags, SceRudpReadInfo* info) {
|
||||
return Ok;
|
||||
}
|
||||
|
||||
EXPORT SYSV_ABI int sceRudpWrite(int ctxId, void const* data, size_t len, uint8_t flags) {
|
||||
return Ok;
|
||||
}
|
||||
|
||||
EXPORT SYSV_ABI int sceRudpPollCancel(int pollId) {
|
||||
return Ok;
|
||||
}
|
||||
|
||||
EXPORT SYSV_ABI int sceRudpPollControl(int pollId, int op, int ctxId, uint16_t events) {
|
||||
return Ok;
|
||||
}
|
||||
|
||||
EXPORT SYSV_ABI int sceRudpPollCreate(size_t size) {
|
||||
return Ok;
|
||||
}
|
||||
|
||||
EXPORT SYSV_ABI int sceRudpPollDestroy(int pollId) {
|
||||
return Ok;
|
||||
}
|
||||
|
||||
EXPORT SYSV_ABI int sceRudpPollWait(int pollId, SceRudpPollEvent* events, size_t eventLen, uint32_t timeout) {
|
||||
return Ok;
|
||||
}
|
||||
|
||||
EXPORT SYSV_ABI int sceRudpEnd(void) {
|
||||
return Ok;
|
||||
}
|
||||
|
||||
EXPORT SYSV_ABI int sceRudpActivate(int ctxId, struct SceNetSockaddr const* to, SceNetSocklen_t toLen) {
|
||||
return Ok;
|
||||
}
|
||||
|
||||
EXPORT SYSV_ABI int sceRudpBind(int ctxId, int soc, uint16_t vport, uint8_t muxMode) {
|
||||
return Ok;
|
||||
}
|
||||
|
||||
EXPORT SYSV_ABI int sceRudpInitiate(int ctxId, struct SceNetSockaddr const* to, SceNetSocklen_t toLen, uint16_t vport) {
|
||||
return Ok;
|
||||
}
|
||||
|
||||
EXPORT SYSV_ABI int sceRudpNetReceived(int soc, uint8_t const* data, size_t dataLen, struct SceNetSockaddr const* from, SceNetSocklen_t fromLen) {
|
||||
return Ok;
|
||||
}
|
||||
|
||||
EXPORT SYSV_ABI int sceRudpProcessEvents(uint32_t timeout) {
|
||||
return Ok;
|
||||
}
|
||||
|
||||
EXPORT SYSV_ABI int sceRudpTerminate(int ctxId) {
|
||||
return Ok;
|
||||
}
|
||||
}
|
98
modules/libSceRudp/types.h
Normal file
98
modules/libSceRudp/types.h
Normal file
@ -0,0 +1,98 @@
|
||||
#pragma once
|
||||
#include "codes.h"
|
||||
|
||||
typedef int SceNetSocklen_t;
|
||||
typedef uint8_t SceNetSaFamily_t;
|
||||
|
||||
struct SceNetSockaddr {
|
||||
uint8_t sa_len;
|
||||
SceNetSaFamily_t sa_family;
|
||||
char sa_data[14];
|
||||
};
|
||||
|
||||
typedef int* SceRudpEventHandler(int eventId, int soc, uint8_t const* data, size_t dataLen, struct SceNetSockaddr const* addr, SceNetSocklen_t addrLen,
|
||||
void* arg);
|
||||
|
||||
typedef void* SceRudpContextEventHandler(int ctxId, int eventId, int errorCode, void* arg);
|
||||
|
||||
struct SceRudpContextStatus {
|
||||
uint32_t state;
|
||||
int parentId;
|
||||
uint32_t children;
|
||||
uint32_t lostPackets;
|
||||
uint32_t sentPackets;
|
||||
uint32_t rcvdPackets;
|
||||
uint64_t sentBytes;
|
||||
uint64_t rcvdBytes;
|
||||
uint32_t retransmissions;
|
||||
uint32_t rtt;
|
||||
};
|
||||
|
||||
struct SceRudpStatus {
|
||||
uint64_t sentUdpBytes;
|
||||
uint64_t rcvdUdpBytes;
|
||||
uint32_t sentUdpPackets;
|
||||
uint32_t rcvdUdpPackets;
|
||||
uint64_t sentUserBytes;
|
||||
uint32_t sentUserPackets;
|
||||
uint64_t rcvdUserBytes;
|
||||
uint32_t rcvdUserPackets;
|
||||
uint32_t sentLatencyCriticalPackets;
|
||||
uint32_t rcvdLatencyCriticalPackets;
|
||||
uint32_t sentSynPackets;
|
||||
uint32_t rcvdSynPackets;
|
||||
uint32_t sentUsrPackets;
|
||||
uint32_t rcvdUsrPackets;
|
||||
uint32_t sentPrbPackets;
|
||||
uint32_t rcvdPrbPackets;
|
||||
uint32_t sentRstPackets;
|
||||
uint32_t rcvdRstPackets;
|
||||
uint32_t lostPackets;
|
||||
uint32_t retransmittedPackets;
|
||||
uint32_t reorderedPackets;
|
||||
uint32_t currentContexts;
|
||||
uint64_t sentQualityLevel1Bytes;
|
||||
uint64_t rcvdQualityLevel1Bytes;
|
||||
uint32_t sentQualityLevel1Packets;
|
||||
uint32_t rcvdQualityLevel1Packets;
|
||||
uint64_t sentQualityLevel2Bytes;
|
||||
uint64_t rcvdQualityLevel2Bytes;
|
||||
uint32_t sentQualityLevel2Packets;
|
||||
uint32_t rcvdQualityLevel2Packets;
|
||||
uint64_t sentQualityLevel3Bytes;
|
||||
uint64_t rcvdQualityLevel3Bytes;
|
||||
uint32_t sentQualityLevel3Packets;
|
||||
uint32_t rcvdQualityLevel3Packets;
|
||||
uint64_t sentQualityLevel4Bytes;
|
||||
uint64_t rcvdQualityLevel4Bytes;
|
||||
uint32_t sentQualityLevel4Packets;
|
||||
uint32_t rcvdQualityLevel4Packets;
|
||||
uint32_t allocs;
|
||||
uint32_t frees;
|
||||
uint32_t memCurrent;
|
||||
uint32_t memPeak;
|
||||
uint32_t establishedConnections;
|
||||
uint32_t failedConnections;
|
||||
uint32_t failedConnectionsReset;
|
||||
uint32_t failedConnectionsRefused;
|
||||
uint32_t failedConnectionsTimeout;
|
||||
uint32_t failedConnectionsVersionMismatch;
|
||||
uint32_t failedConnectionsTransportTypeMismatch;
|
||||
uint32_t failedConnectionsQualityLevelMismatch;
|
||||
};
|
||||
|
||||
struct SceRudpReadInfo {
|
||||
uint8_t size;
|
||||
uint8_t retransmissionCount;
|
||||
uint16_t retransmissionDelay;
|
||||
uint8_t retransmissionDelay2;
|
||||
uint8_t flags;
|
||||
uint16_t sequenceNumber;
|
||||
uint32_t timestamp;
|
||||
};
|
||||
|
||||
struct SceRudpPollEvent {
|
||||
int ctxId;
|
||||
uint16_t reqEvents;
|
||||
uint16_t rtnEvents;
|
||||
};
|
@ -91,7 +91,21 @@ EXPORT SYSV_ABI int sceKernelAioSubmitWriteCommandsMultiple(SceKernelAioRWReques
|
||||
|
||||
EXPORT SYSV_ABI void sceKernelAioInitializeParam(SceKernelAioParam* param) {
|
||||
LOG_USE_MODULE(aio);
|
||||
LOG_ERR(L"todo %S", __FUNCTION__);
|
||||
(param->low).schedulingWindowSize = 0x20;
|
||||
(param->low).delayedCountLimit = 0x20;
|
||||
(param->low).enableSplit = 1;
|
||||
(param->low).splitSize = 0x100000;
|
||||
(param->low).splitChunkSize = 0x100000;
|
||||
(param->mid).schedulingWindowSize = 0x20;
|
||||
(param->mid).delayedCountLimit = 0x20;
|
||||
(param->mid).enableSplit = 1;
|
||||
(param->mid).splitSize = 0x100000;
|
||||
(param->mid).splitChunkSize = 0x100000;
|
||||
(param->high).schedulingWindowSize = 0x20;
|
||||
(param->high).delayedCountLimit = 0x20;
|
||||
(param->high).enableSplit = 0;
|
||||
(param->high).splitSize = 0;
|
||||
(param->high).splitChunkSize = 0;
|
||||
}
|
||||
|
||||
EXPORT SYSV_ABI int sceKernelAioSetParam(SceKernelAioSchedulingParam* param, int schedulingWindowSize, int handleelayedCountLimit, uint32_t enableSplit,
|
||||
|
Loading…
Reference in New Issue
Block a user