stubbed PlayGo, Usbd and load Json2 lle

This commit is contained in:
raziel1000 2024-06-14 13:05:01 -06:00
parent 6a47f8ae50
commit 1cec01644b
10 changed files with 720 additions and 2 deletions

View file

@ -194,6 +194,15 @@ set(PNG_LIB src/core/libraries/libpng/pngdec.cpp
src/core/libraries/libpng/pngdec.h
)
set(PLAYGO_LIB src/core/libraries/playgo/playgo.cpp
src/core/libraries/playgo/playgo.h
src/core/libraries/playgo/playgo_types.h
)
set(USBD_LIB src/core/libraries/usbd/usbd.cpp
src/core/libraries/usbd/usbd.h
)
set(NP_LIBS src/core/libraries/np_manager/np_manager.cpp
src/core/libraries/np_manager/np_manager.h
src/core/libraries/np_score/np_score.cpp
@ -295,6 +304,8 @@ set(CORE src/core/aerolib/stubs.cpp
${VIDEOOUT_LIB}
${NP_LIBS}
${PNG_LIB}
${PLAYGO_LIB}
${USBD_LIB}
${MISC_LIBS}
src/core/linker.cpp
src/core/linker.h

View file

@ -105,6 +105,8 @@ bool ParseFilterRule(Filter& instance, Iterator begin, Iterator end) {
SUB(Lib, Rtc) \
SUB(Lib, DiscMap) \
SUB(Lib, Png) \
SUB(Lib, PlayGo) \
SUB(Lib, Usbd) \
CLS(Frontend) \
CLS(Render) \
SUB(Render, Vulkan) \

View file

@ -72,6 +72,8 @@ enum class Class : u8 {
Lib_Rtc, ///< The LibSceRtc implementation.
Lib_DiscMap, ///< The LibSceDiscMap implementation.
Lib_Png, ///< The LibScePng implementation.
Lib_PlayGo, ///< The LibScePlayGo implementation.
Lib_Usbd, ///< The LibSceUsbd implementation.
Frontend, ///< Emulator UI
Render, ///< Video Core
Render_Vulkan, ///< Vulkan backend

View file

@ -10,6 +10,7 @@
#include "core/libraries/kernel/libkernel.h"
#include "core/libraries/libc/libc.h"
#include "core/libraries/libc_internal/libc_internal.h"
#include "core/libraries/libpng/pngdec.h"
#include "core/libraries/libs.h"
#include "core/libraries/network/http.h"
#include "core/libraries/network/net.h"
@ -19,6 +20,7 @@
#include "core/libraries/np_score/np_score.h"
#include "core/libraries/np_trophy/np_trophy.h"
#include "core/libraries/pad/pad.h"
#include "core/libraries/playgo/playgo.h"
#include "core/libraries/rtc/rtc.h"
#include "core/libraries/save_data/savedata.h"
#include "core/libraries/screenshot/screenshot.h"
@ -29,8 +31,8 @@
#include "core/libraries/system/sysmodule.h"
#include "core/libraries/system/systemservice.h"
#include "core/libraries/system/userservice.h"
#include "core/libraries/usbd/usbd.h"
#include "core/libraries/videoout/video_out.h"
#include "src/core/libraries/libpng/pngdec.h"
namespace Libraries {
@ -67,6 +69,8 @@ void InitHLELibs(Core::Loader::SymbolsResolver* sym) {
Libraries::Rtc::RegisterlibSceRtc(sym);
Libraries::DiscMap::RegisterlibSceDiscMap(sym);
Libraries::PngDec::RegisterlibScePngDec(sym);
Libraries::PlayGo::RegisterlibScePlayGo(sym);
Libraries::Usbd::RegisterlibSceUsbd(sym);
}
} // namespace Libraries

View file

@ -0,0 +1,131 @@
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#include "common/logging/log.h"
#include "common/singleton.h"
#include "core/libraries/error_codes.h"
#include "core/libraries/libs.h"
#include "playgo.h"
namespace Libraries::PlayGo {
// this lib is used to play as the game is being installed.
// can be skipped by just returning and assigning the correct values.
int PS4_SYSV_ABI sceDbgPlayGoRequestNextChunk() {
LOG_ERROR(Lib_PlayGo, "(STUBBED)called");
return ORBIS_OK;
}
int PS4_SYSV_ABI sceDbgPlayGoSnapshot() {
LOG_ERROR(Lib_PlayGo, "(STUBBED)called");
return ORBIS_OK;
}
int PS4_SYSV_ABI scePlayGoClose() {
LOG_ERROR(Lib_PlayGo, "(STUBBED)called");
return ORBIS_OK;
}
int PS4_SYSV_ABI scePlayGoGetChunkId() {
LOG_ERROR(Lib_PlayGo, "(STUBBED)called");
return ORBIS_OK;
}
int PS4_SYSV_ABI scePlayGoGetEta() {
LOG_ERROR(Lib_PlayGo, "(STUBBED)called");
return ORBIS_OK;
}
int PS4_SYSV_ABI scePlayGoGetInstallSpeed() {
LOG_ERROR(Lib_PlayGo, "(STUBBED)called");
return ORBIS_OK;
}
int PS4_SYSV_ABI scePlayGoGetLanguageMask() {
LOG_ERROR(Lib_PlayGo, "(STUBBED)called");
return ORBIS_OK;
}
int PS4_SYSV_ABI scePlayGoGetLocus() {
LOG_ERROR(Lib_PlayGo, "(STUBBED)called");
return ORBIS_OK;
}
int PS4_SYSV_ABI scePlayGoGetProgress() {
LOG_ERROR(Lib_PlayGo, "(STUBBED)called");
return ORBIS_OK;
}
int PS4_SYSV_ABI scePlayGoGetToDoList(OrbisPlayGoHandle handle, OrbisPlayGoToDo* outTodoList,
u32 numberOfEntries, u32* outEntries) {
LOG_ERROR(Lib_PlayGo, "(STUBBED)called");
if (handle != shadMagic)
return ORBIS_PLAYGO_ERROR_BAD_HANDLE;
if (outTodoList == nullptr)
return ORBIS_PLAYGO_ERROR_BAD_POINTER;
*outEntries = 0; // nothing to do
return ORBIS_OK;
}
int PS4_SYSV_ABI scePlayGoInitialize(OrbisPlayGoInitParams* param) {
if (param->bufAddr == nullptr)
return ORBIS_PLAYGO_ERROR_BAD_POINTER;
if (param->bufSize < 0x200000)
return ORBIS_PLAYGO_ERROR_BAD_SIZE;
LOG_INFO(Lib_PlayGo, "(STUBBED)called, bufSize = {}", param->bufSize);
return ORBIS_OK;
}
int PS4_SYSV_ABI scePlayGoOpen(OrbisPlayGoHandle* outHandle, const void* param) {
*outHandle = shadMagic;
LOG_INFO(Lib_PlayGo, "(STUBBED)called");
return ORBIS_OK;
}
int PS4_SYSV_ABI scePlayGoPrefetch() {
LOG_ERROR(Lib_PlayGo, "(STUBBED)called");
return ORBIS_OK;
}
int PS4_SYSV_ABI scePlayGoSetInstallSpeed() {
LOG_ERROR(Lib_PlayGo, "(STUBBED)called");
return ORBIS_OK;
}
int PS4_SYSV_ABI scePlayGoSetLanguageMask() {
LOG_ERROR(Lib_PlayGo, "(STUBBED)called");
return ORBIS_OK;
}
int PS4_SYSV_ABI scePlayGoSetToDoList() {
LOG_ERROR(Lib_PlayGo, "(STUBBED)called");
return ORBIS_OK;
}
int PS4_SYSV_ABI scePlayGoTerminate() {
LOG_ERROR(Lib_PlayGo, "(STUBBED)called");
return ORBIS_OK;
}
void RegisterlibScePlayGo(Core::Loader::SymbolsResolver* sym) {
LIB_FUNCTION("uEqMfMITvEI", "libSceDbgPlayGo", 1, "libScePlayGo", 1, 0,
sceDbgPlayGoRequestNextChunk);
LIB_FUNCTION("vU+FqrH+pEY", "libSceDbgPlayGo", 1, "libScePlayGo", 1, 0, sceDbgPlayGoSnapshot);
LIB_FUNCTION("Uco1I0dlDi8", "libScePlayGo", 1, "libScePlayGo", 1, 0, scePlayGoClose);
LIB_FUNCTION("73fF1MFU8hA", "libScePlayGo", 1, "libScePlayGo", 1, 0, scePlayGoGetChunkId);
LIB_FUNCTION("v6EZ-YWRdMs", "libScePlayGo", 1, "libScePlayGo", 1, 0, scePlayGoGetEta);
LIB_FUNCTION("rvBSfTimejE", "libScePlayGo", 1, "libScePlayGo", 1, 0, scePlayGoGetInstallSpeed);
LIB_FUNCTION("3OMbYZBaa50", "libScePlayGo", 1, "libScePlayGo", 1, 0, scePlayGoGetLanguageMask);
LIB_FUNCTION("uWIYLFkkwqk", "libScePlayGo", 1, "libScePlayGo", 1, 0, scePlayGoGetLocus);
LIB_FUNCTION("-RJWNMK3fC8", "libScePlayGo", 1, "libScePlayGo", 1, 0, scePlayGoGetProgress);
LIB_FUNCTION("Nn7zKwnA5q0", "libScePlayGo", 1, "libScePlayGo", 1, 0, scePlayGoGetToDoList);
LIB_FUNCTION("ts6GlZOKRrE", "libScePlayGo", 1, "libScePlayGo", 1, 0, scePlayGoInitialize);
LIB_FUNCTION("M1Gma1ocrGE", "libScePlayGo", 1, "libScePlayGo", 1, 0, scePlayGoOpen);
LIB_FUNCTION("-Q1-u1a7p0g", "libScePlayGo", 1, "libScePlayGo", 1, 0, scePlayGoPrefetch);
LIB_FUNCTION("4AAcTU9R3XM", "libScePlayGo", 1, "libScePlayGo", 1, 0, scePlayGoSetInstallSpeed);
LIB_FUNCTION("LosLlHOpNqQ", "libScePlayGo", 1, "libScePlayGo", 1, 0, scePlayGoSetLanguageMask);
LIB_FUNCTION("gUPGiOQ1tmQ", "libScePlayGo", 1, "libScePlayGo", 1, 0, scePlayGoSetToDoList);
LIB_FUNCTION("MPe0EeBGM-E", "libScePlayGo", 1, "libScePlayGo", 1, 0, scePlayGoTerminate);
};
} // namespace Libraries::PlayGo

View file

@ -0,0 +1,35 @@
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#include "common/types.h"
#include "playgo_types.h"
namespace Core::Loader {
class SymbolsResolver;
}
namespace Libraries::PlayGo {
constexpr int shadMagic = 0x53484144;
int PS4_SYSV_ABI sceDbgPlayGoRequestNextChunk();
int PS4_SYSV_ABI sceDbgPlayGoSnapshot();
int PS4_SYSV_ABI scePlayGoClose();
int PS4_SYSV_ABI scePlayGoGetChunkId();
int PS4_SYSV_ABI scePlayGoGetEta();
int PS4_SYSV_ABI scePlayGoGetInstallSpeed();
int PS4_SYSV_ABI scePlayGoGetLanguageMask();
int PS4_SYSV_ABI scePlayGoGetLocus();
int PS4_SYSV_ABI scePlayGoGetProgress();
int PS4_SYSV_ABI scePlayGoGetToDoList(OrbisPlayGoHandle handle, OrbisPlayGoToDo* outTodoList,
u32 numberOfEntries, u32* outEntries);
int PS4_SYSV_ABI scePlayGoInitialize(OrbisPlayGoInitParams* param);
int PS4_SYSV_ABI scePlayGoOpen(OrbisPlayGoHandle* outHandle, const void* param);
int PS4_SYSV_ABI scePlayGoPrefetch();
int PS4_SYSV_ABI scePlayGoSetInstallSpeed();
int PS4_SYSV_ABI scePlayGoSetLanguageMask();
int PS4_SYSV_ABI scePlayGoSetToDoList();
int PS4_SYSV_ABI scePlayGoTerminate();
void RegisterlibScePlayGo(Core::Loader::SymbolsResolver* sym);
} // namespace Libraries::PlayGo

View file

@ -0,0 +1,43 @@
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#include "common/types.h"
typedef u32 OrbisPlayGoHandle;
typedef u16 OrbisPlayGoChunkId;
typedef s8 OrbisPlayGoLocus;
typedef s32 OrbisPlayGoInstallSpeed;
typedef s64 OrbisPlayGoEta;
typedef u64 OrbisPlayGoLanguageMask;
typedef struct OrbisPlayGoInitParams {
const void* bufAddr;
u32 bufSize;
u32 reserved;
} OrbisPlayGoInitParams;
typedef struct OrbisPlayGoToDo {
OrbisPlayGoChunkId chunkId;
OrbisPlayGoLocus locus;
s8 reserved;
} OrbisPlayGoToDo;
constexpr int ORBIS_PLAYGO_ERROR_UNKNOWN = -2135818239; /* 0x80B20001 */
constexpr int ORBIS_PLAYGO_ERROR_FATAL = -2135818238; /* 0x80B20002 */
constexpr int ORBIS_PLAYGO_ERROR_NO_MEMORY = -2135818237; /* 0x80B20003 */
constexpr int ORBIS_PLAYGO_ERROR_INVALID_ARGUMENT = -2135818236; /* 0x80B20004 */
constexpr int ORBIS_PLAYGO_ERROR_NOT_INITIALIZED = -2135818235; /* 0x80B20005 */
constexpr int ORBIS_PLAYGO_ERROR_ALREADY_INITIALIZED = -2135818234; /* 0x80B20006 */
constexpr int ORBIS_PLAYGO_ERROR_ALREADY_STARTED = -2135818233; /* 0x80B20007 */
constexpr int ORBIS_PLAYGO_ERROR_NOT_STARTED = -2135818232; /* 0x80B20008 */
constexpr int ORBIS_PLAYGO_ERROR_BAD_HANDLE = -2135818231; /* 0x80B20009 */
constexpr int ORBIS_PLAYGO_ERROR_BAD_POINTER = -2135818230; /* 0x80B2000A */
constexpr int ORBIS_PLAYGO_ERROR_BAD_SIZE = -2135818229; /* 0x80B2000B */
constexpr int ORBIS_PLAYGO_ERROR_BAD_CHUNK_ID = -2135818228; /* 0x80B2000C */
constexpr int ORBIS_PLAYGO_ERROR_BAD_SPEED = -2135818227; /* 0x80B2000D */
constexpr int ORBIS_PLAYGO_ERROR_NOT_SUPPORT_PLAYGO = -2135818226; /* 0x80B2000E */
constexpr int ORBIS_PLAYGO_ERROR_EPERM = -2135818225; /* 0x80B2000F */
constexpr int ORBIS_PLAYGO_ERROR_BAD_LOCUS = -2135818224; /* 0x80B20010 */
constexpr int ORBIS_PLAYGO_ERROR_NEED_DATA_DISC = -2135818223; /* 0x80B20011 */

View file

@ -0,0 +1,410 @@
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
// Generated By moduleGenerator
#include "common/logging/log.h"
#include "common/singleton.h"
#include "core/libraries/error_codes.h"
#include "core/libraries/libs.h"
#include "usbd.h"
namespace Libraries::Usbd {
int PS4_SYSV_ABI sceUsbdAllocTransfer() {
LOG_ERROR(Lib_Usbd, "(STUBBED)called");
return ORBIS_OK;
}
int PS4_SYSV_ABI sceUsbdAttachKernelDriver() {
LOG_ERROR(Lib_Usbd, "(STUBBED)called");
return ORBIS_OK;
}
int PS4_SYSV_ABI sceUsbdBulkTransfer() {
LOG_ERROR(Lib_Usbd, "(STUBBED)called");
return ORBIS_OK;
}
int PS4_SYSV_ABI sceUsbdCancelTransfer() {
LOG_ERROR(Lib_Usbd, "(STUBBED)called");
return ORBIS_OK;
}
int PS4_SYSV_ABI sceUsbdCheckConnected() {
LOG_ERROR(Lib_Usbd, "(STUBBED)called");
return ORBIS_OK;
}
int PS4_SYSV_ABI sceUsbdClaimInterface() {
LOG_ERROR(Lib_Usbd, "(STUBBED)called");
return ORBIS_OK;
}
int PS4_SYSV_ABI sceUsbdClearHalt() {
LOG_ERROR(Lib_Usbd, "(STUBBED)called");
return ORBIS_OK;
}
int PS4_SYSV_ABI sceUsbdClose() {
LOG_ERROR(Lib_Usbd, "(STUBBED)called");
return ORBIS_OK;
}
int PS4_SYSV_ABI sceUsbdControlTransfer() {
LOG_ERROR(Lib_Usbd, "(STUBBED)called");
return ORBIS_OK;
}
int PS4_SYSV_ABI sceUsbdControlTransferGetData() {
LOG_ERROR(Lib_Usbd, "(STUBBED)called");
return ORBIS_OK;
}
int PS4_SYSV_ABI sceUsbdControlTransferGetSetup() {
LOG_ERROR(Lib_Usbd, "(STUBBED)called");
return ORBIS_OK;
}
int PS4_SYSV_ABI sceUsbdDetachKernelDriver() {
LOG_ERROR(Lib_Usbd, "(STUBBED)called");
return ORBIS_OK;
}
int PS4_SYSV_ABI sceUsbdEventHandlerActive() {
LOG_ERROR(Lib_Usbd, "(STUBBED)called");
return ORBIS_OK;
}
int PS4_SYSV_ABI sceUsbdEventHandlingOk() {
LOG_ERROR(Lib_Usbd, "(STUBBED)called");
return ORBIS_OK;
}
int PS4_SYSV_ABI sceUsbdExit() {
LOG_ERROR(Lib_Usbd, "(STUBBED)called");
return ORBIS_OK;
}
int PS4_SYSV_ABI sceUsbdFillBulkTransfer() {
LOG_ERROR(Lib_Usbd, "(STUBBED)called");
return ORBIS_OK;
}
int PS4_SYSV_ABI sceUsbdFillControlSetup() {
LOG_ERROR(Lib_Usbd, "(STUBBED)called");
return ORBIS_OK;
}
int PS4_SYSV_ABI sceUsbdFillControlTransfer() {
LOG_ERROR(Lib_Usbd, "(STUBBED)called");
return ORBIS_OK;
}
int PS4_SYSV_ABI sceUsbdFillInterruptTransfer() {
LOG_ERROR(Lib_Usbd, "(STUBBED)called");
return ORBIS_OK;
}
int PS4_SYSV_ABI sceUsbdFillIsoTransfer() {
LOG_ERROR(Lib_Usbd, "(STUBBED)called");
return ORBIS_OK;
}
int PS4_SYSV_ABI sceUsbdFreeConfigDescriptor() {
LOG_ERROR(Lib_Usbd, "(STUBBED)called");
return ORBIS_OK;
}
int PS4_SYSV_ABI sceUsbdFreeDeviceList() {
LOG_ERROR(Lib_Usbd, "(STUBBED)called");
return ORBIS_OK;
}
int PS4_SYSV_ABI sceUsbdFreeTransfer() {
LOG_ERROR(Lib_Usbd, "(STUBBED)called");
return ORBIS_OK;
}
int PS4_SYSV_ABI sceUsbdGetActiveConfigDescriptor() {
LOG_ERROR(Lib_Usbd, "(STUBBED)called");
return ORBIS_OK;
}
int PS4_SYSV_ABI sceUsbdGetBusNumber() {
LOG_ERROR(Lib_Usbd, "(STUBBED)called");
return ORBIS_OK;
}
int PS4_SYSV_ABI sceUsbdGetConfigDescriptor() {
LOG_ERROR(Lib_Usbd, "(STUBBED)called");
return ORBIS_OK;
}
int PS4_SYSV_ABI sceUsbdGetConfigDescriptorByValue() {
LOG_ERROR(Lib_Usbd, "(STUBBED)called");
return ORBIS_OK;
}
int PS4_SYSV_ABI sceUsbdGetConfiguration() {
LOG_ERROR(Lib_Usbd, "(STUBBED)called");
return ORBIS_OK;
}
int PS4_SYSV_ABI sceUsbdGetDescriptor() {
LOG_ERROR(Lib_Usbd, "(STUBBED)called");
return ORBIS_OK;
}
int PS4_SYSV_ABI sceUsbdGetDevice() {
LOG_ERROR(Lib_Usbd, "(STUBBED)called");
return ORBIS_OK;
}
int PS4_SYSV_ABI sceUsbdGetDeviceAddress() {
LOG_ERROR(Lib_Usbd, "(STUBBED)called");
return ORBIS_OK;
}
int PS4_SYSV_ABI sceUsbdGetDeviceDescriptor() {
LOG_ERROR(Lib_Usbd, "(STUBBED)called");
return ORBIS_OK;
}
int PS4_SYSV_ABI sceUsbdGetDeviceList() {
LOG_ERROR(Lib_Usbd, "(STUBBED)called");
return ORBIS_OK;
}
int PS4_SYSV_ABI sceUsbdGetDeviceSpeed() {
LOG_ERROR(Lib_Usbd, "(STUBBED)called");
return ORBIS_OK;
}
int PS4_SYSV_ABI sceUsbdGetIsoPacketBuffer() {
LOG_ERROR(Lib_Usbd, "(STUBBED)called");
return ORBIS_OK;
}
int PS4_SYSV_ABI sceUsbdGetMaxIsoPacketSize() {
LOG_ERROR(Lib_Usbd, "(STUBBED)called");
return ORBIS_OK;
}
int PS4_SYSV_ABI sceUsbdGetMaxPacketSize() {
LOG_ERROR(Lib_Usbd, "(STUBBED)called");
return ORBIS_OK;
}
int PS4_SYSV_ABI sceUsbdGetStringDescriptor() {
LOG_ERROR(Lib_Usbd, "(STUBBED)called");
return ORBIS_OK;
}
int PS4_SYSV_ABI sceUsbdGetStringDescriptorAscii() {
LOG_ERROR(Lib_Usbd, "(STUBBED)called");
return ORBIS_OK;
}
int PS4_SYSV_ABI sceUsbdHandleEvents() {
LOG_ERROR(Lib_Usbd, "(STUBBED)called");
return ORBIS_OK;
}
int PS4_SYSV_ABI sceUsbdHandleEventsLocked() {
LOG_ERROR(Lib_Usbd, "(STUBBED)called");
return ORBIS_OK;
}
int PS4_SYSV_ABI sceUsbdHandleEventsTimeout() {
LOG_ERROR(Lib_Usbd, "(STUBBED)called");
return ORBIS_OK;
}
int PS4_SYSV_ABI sceUsbdInit() {
LOG_ERROR(Lib_Usbd, "(STUBBED)called");
return 0x80240005; // Skip
}
int PS4_SYSV_ABI sceUsbdInterruptTransfer() {
LOG_ERROR(Lib_Usbd, "(STUBBED)called");
return ORBIS_OK;
}
int PS4_SYSV_ABI sceUsbdKernelDriverActive() {
LOG_ERROR(Lib_Usbd, "(STUBBED)called");
return ORBIS_OK;
}
int PS4_SYSV_ABI sceUsbdLockEvents() {
LOG_ERROR(Lib_Usbd, "(STUBBED)called");
return ORBIS_OK;
}
int PS4_SYSV_ABI sceUsbdLockEventWaiters() {
LOG_ERROR(Lib_Usbd, "(STUBBED)called");
return ORBIS_OK;
}
int PS4_SYSV_ABI sceUsbdOpen() {
LOG_ERROR(Lib_Usbd, "(STUBBED)called");
return ORBIS_OK;
}
int PS4_SYSV_ABI sceUsbdOpenDeviceWithVidPid() {
LOG_ERROR(Lib_Usbd, "(STUBBED)called");
return ORBIS_OK;
}
int PS4_SYSV_ABI sceUsbdRefDevice() {
LOG_ERROR(Lib_Usbd, "(STUBBED)called");
return ORBIS_OK;
}
int PS4_SYSV_ABI sceUsbdReleaseInterface() {
LOG_ERROR(Lib_Usbd, "(STUBBED)called");
return ORBIS_OK;
}
int PS4_SYSV_ABI sceUsbdResetDevice() {
LOG_ERROR(Lib_Usbd, "(STUBBED)called");
return ORBIS_OK;
}
int PS4_SYSV_ABI sceUsbdSetConfiguration() {
LOG_ERROR(Lib_Usbd, "(STUBBED)called");
return ORBIS_OK;
}
int PS4_SYSV_ABI sceUsbdSetInterfaceAltSetting() {
LOG_ERROR(Lib_Usbd, "(STUBBED)called");
return ORBIS_OK;
}
int PS4_SYSV_ABI sceUsbdSetIsoPacketLengths() {
LOG_ERROR(Lib_Usbd, "(STUBBED)called");
return ORBIS_OK;
}
int PS4_SYSV_ABI sceUsbdSubmitTransfer() {
LOG_ERROR(Lib_Usbd, "(STUBBED)called");
return ORBIS_OK;
}
int PS4_SYSV_ABI sceUsbdTryLockEvents() {
LOG_ERROR(Lib_Usbd, "(STUBBED)called");
return ORBIS_OK;
}
int PS4_SYSV_ABI sceUsbdUnlockEvents() {
LOG_ERROR(Lib_Usbd, "(STUBBED)called");
return ORBIS_OK;
}
int PS4_SYSV_ABI sceUsbdUnlockEventWaiters() {
LOG_ERROR(Lib_Usbd, "(STUBBED)called");
return ORBIS_OK;
}
int PS4_SYSV_ABI sceUsbdUnrefDevice() {
LOG_ERROR(Lib_Usbd, "(STUBBED)called");
return ORBIS_OK;
}
int PS4_SYSV_ABI sceUsbdWaitForEvent() {
LOG_ERROR(Lib_Usbd, "(STUBBED)called");
return ORBIS_OK;
}
int PS4_SYSV_ABI Func_65F6EF33E38FFF50() {
LOG_ERROR(Lib_Usbd, "(STUBBED)called");
return ORBIS_OK;
}
int PS4_SYSV_ABI Func_97F056BAD90AADE7() {
LOG_ERROR(Lib_Usbd, "(STUBBED)called");
return ORBIS_OK;
}
int PS4_SYSV_ABI Func_C55104A33B35B264() {
LOG_ERROR(Lib_Usbd, "(STUBBED)called");
return ORBIS_OK;
}
int PS4_SYSV_ABI Func_D56B43060720B1E0() {
LOG_ERROR(Lib_Usbd, "(STUBBED)called");
return ORBIS_OK;
}
void RegisterlibSceUsbd(Core::Loader::SymbolsResolver* sym) {
LIB_FUNCTION("0ktE1PhzGFU", "libSceUsbd", 1, "libSceUsbd", 1, 1, sceUsbdAllocTransfer);
LIB_FUNCTION("BKMEGvfCPyU", "libSceUsbd", 1, "libSceUsbd", 1, 1, sceUsbdAttachKernelDriver);
LIB_FUNCTION("fotb7DzeHYw", "libSceUsbd", 1, "libSceUsbd", 1, 1, sceUsbdBulkTransfer);
LIB_FUNCTION("-KNh1VFIzlM", "libSceUsbd", 1, "libSceUsbd", 1, 1, sceUsbdCancelTransfer);
LIB_FUNCTION("MlW6deWfPp0", "libSceUsbd", 1, "libSceUsbd", 1, 1, sceUsbdCheckConnected);
LIB_FUNCTION("AE+mHBHneyk", "libSceUsbd", 1, "libSceUsbd", 1, 1, sceUsbdClaimInterface);
LIB_FUNCTION("3tPPMo4QRdY", "libSceUsbd", 1, "libSceUsbd", 1, 1, sceUsbdClearHalt);
LIB_FUNCTION("HarYYlaFGJY", "libSceUsbd", 1, "libSceUsbd", 1, 1, sceUsbdClose);
LIB_FUNCTION("RRKFcKQ1Ka4", "libSceUsbd", 1, "libSceUsbd", 1, 1, sceUsbdControlTransfer);
LIB_FUNCTION("XUWtxI31YEY", "libSceUsbd", 1, "libSceUsbd", 1, 1, sceUsbdControlTransferGetData);
LIB_FUNCTION("SEdQo8CFmus", "libSceUsbd", 1, "libSceUsbd", 1, 1,
sceUsbdControlTransferGetSetup);
LIB_FUNCTION("Y5go+ha6eDs", "libSceUsbd", 1, "libSceUsbd", 1, 1, sceUsbdDetachKernelDriver);
LIB_FUNCTION("Vw8Hg1CN028", "libSceUsbd", 1, "libSceUsbd", 1, 1, sceUsbdEventHandlerActive);
LIB_FUNCTION("e7gp1xhu6RI", "libSceUsbd", 1, "libSceUsbd", 1, 1, sceUsbdEventHandlingOk);
LIB_FUNCTION("Fq6+0Fm55xU", "libSceUsbd", 1, "libSceUsbd", 1, 1, sceUsbdExit);
LIB_FUNCTION("oHCade-0qQ0", "libSceUsbd", 1, "libSceUsbd", 1, 1, sceUsbdFillBulkTransfer);
LIB_FUNCTION("8KrqbaaPkE0", "libSceUsbd", 1, "libSceUsbd", 1, 1, sceUsbdFillControlSetup);
LIB_FUNCTION("7VGfMerK6m0", "libSceUsbd", 1, "libSceUsbd", 1, 1, sceUsbdFillControlTransfer);
LIB_FUNCTION("t3J5pXxhJlI", "libSceUsbd", 1, "libSceUsbd", 1, 1, sceUsbdFillInterruptTransfer);
LIB_FUNCTION("xqmkjHCEOSY", "libSceUsbd", 1, "libSceUsbd", 1, 1, sceUsbdFillIsoTransfer);
LIB_FUNCTION("Hvd3S--n25w", "libSceUsbd", 1, "libSceUsbd", 1, 1, sceUsbdFreeConfigDescriptor);
LIB_FUNCTION("EQ6SCLMqzkM", "libSceUsbd", 1, "libSceUsbd", 1, 1, sceUsbdFreeDeviceList);
LIB_FUNCTION("-sgi7EeLSO8", "libSceUsbd", 1, "libSceUsbd", 1, 1, sceUsbdFreeTransfer);
LIB_FUNCTION("S1o1C6yOt5g", "libSceUsbd", 1, "libSceUsbd", 1, 1,
sceUsbdGetActiveConfigDescriptor);
LIB_FUNCTION("t7WE9mb1TB8", "libSceUsbd", 1, "libSceUsbd", 1, 1, sceUsbdGetBusNumber);
LIB_FUNCTION("Dkm5qe8j3XE", "libSceUsbd", 1, "libSceUsbd", 1, 1, sceUsbdGetConfigDescriptor);
LIB_FUNCTION("GQsAVJuy8gM", "libSceUsbd", 1, "libSceUsbd", 1, 1,
sceUsbdGetConfigDescriptorByValue);
LIB_FUNCTION("L7FoTZp3bZs", "libSceUsbd", 1, "libSceUsbd", 1, 1, sceUsbdGetConfiguration);
LIB_FUNCTION("-JBoEtvTxvA", "libSceUsbd", 1, "libSceUsbd", 1, 1, sceUsbdGetDescriptor);
LIB_FUNCTION("rsl9KQ-agyA", "libSceUsbd", 1, "libSceUsbd", 1, 1, sceUsbdGetDevice);
LIB_FUNCTION("GjlCrU4GcIY", "libSceUsbd", 1, "libSceUsbd", 1, 1, sceUsbdGetDeviceAddress);
LIB_FUNCTION("bhomgbiQgeo", "libSceUsbd", 1, "libSceUsbd", 1, 1, sceUsbdGetDeviceDescriptor);
LIB_FUNCTION("8qB9Ar4P5nc", "libSceUsbd", 1, "libSceUsbd", 1, 1, sceUsbdGetDeviceList);
LIB_FUNCTION("e1UWb8cWPJM", "libSceUsbd", 1, "libSceUsbd", 1, 1, sceUsbdGetDeviceSpeed);
LIB_FUNCTION("vokkJ0aDf54", "libSceUsbd", 1, "libSceUsbd", 1, 1, sceUsbdGetIsoPacketBuffer);
LIB_FUNCTION("nuIRlpbxauM", "libSceUsbd", 1, "libSceUsbd", 1, 1, sceUsbdGetMaxIsoPacketSize);
LIB_FUNCTION("YJ0cMAlLuxQ", "libSceUsbd", 1, "libSceUsbd", 1, 1, sceUsbdGetMaxPacketSize);
LIB_FUNCTION("g2oYm1DitDg", "libSceUsbd", 1, "libSceUsbd", 1, 1, sceUsbdGetStringDescriptor);
LIB_FUNCTION("t4gUfGsjk+g", "libSceUsbd", 1, "libSceUsbd", 1, 1,
sceUsbdGetStringDescriptorAscii);
LIB_FUNCTION("EkqGLxWC-S0", "libSceUsbd", 1, "libSceUsbd", 1, 1, sceUsbdHandleEvents);
LIB_FUNCTION("rt-WeUGibfg", "libSceUsbd", 1, "libSceUsbd", 1, 1, sceUsbdHandleEventsLocked);
LIB_FUNCTION("+wU6CGuZcWk", "libSceUsbd", 1, "libSceUsbd", 1, 1, sceUsbdHandleEventsTimeout);
LIB_FUNCTION("TOhg7P6kTH4", "libSceUsbd", 1, "libSceUsbd", 1, 1, sceUsbdInit);
LIB_FUNCTION("rxi1nCOKWc8", "libSceUsbd", 1, "libSceUsbd", 1, 1, sceUsbdInterruptTransfer);
LIB_FUNCTION("RLf56F-WjKQ", "libSceUsbd", 1, "libSceUsbd", 1, 1, sceUsbdKernelDriverActive);
LIB_FUNCTION("u9yKks02-rA", "libSceUsbd", 1, "libSceUsbd", 1, 1, sceUsbdLockEvents);
LIB_FUNCTION("AeGaY8JrAV4", "libSceUsbd", 1, "libSceUsbd", 1, 1, sceUsbdLockEventWaiters);
LIB_FUNCTION("VJ6oMq-Di2U", "libSceUsbd", 1, "libSceUsbd", 1, 1, sceUsbdOpen);
LIB_FUNCTION("vrQXYRo1Gwk", "libSceUsbd", 1, "libSceUsbd", 1, 1, sceUsbdOpenDeviceWithVidPid);
LIB_FUNCTION("U1t1SoJvV-A", "libSceUsbd", 1, "libSceUsbd", 1, 1, sceUsbdRefDevice);
LIB_FUNCTION("REfUTmTchMw", "libSceUsbd", 1, "libSceUsbd", 1, 1, sceUsbdReleaseInterface);
LIB_FUNCTION("hvMn0QJXj5g", "libSceUsbd", 1, "libSceUsbd", 1, 1, sceUsbdResetDevice);
LIB_FUNCTION("FhU9oYrbXoA", "libSceUsbd", 1, "libSceUsbd", 1, 1, sceUsbdSetConfiguration);
LIB_FUNCTION("DVCQW9o+ki0", "libSceUsbd", 1, "libSceUsbd", 1, 1, sceUsbdSetInterfaceAltSetting);
LIB_FUNCTION("dJxro8Nzcjk", "libSceUsbd", 1, "libSceUsbd", 1, 1, sceUsbdSetIsoPacketLengths);
LIB_FUNCTION("L0EHgZZNVas", "libSceUsbd", 1, "libSceUsbd", 1, 1, sceUsbdSubmitTransfer);
LIB_FUNCTION("TcXVGc-LPbQ", "libSceUsbd", 1, "libSceUsbd", 1, 1, sceUsbdTryLockEvents);
LIB_FUNCTION("RA2D9rFH-Uw", "libSceUsbd", 1, "libSceUsbd", 1, 1, sceUsbdUnlockEvents);
LIB_FUNCTION("1DkGvUQYFKI", "libSceUsbd", 1, "libSceUsbd", 1, 1, sceUsbdUnlockEventWaiters);
LIB_FUNCTION("OULgIo1zAsA", "libSceUsbd", 1, "libSceUsbd", 1, 1, sceUsbdUnrefDevice);
LIB_FUNCTION("ys2e9VRBPrY", "libSceUsbd", 1, "libSceUsbd", 1, 1, sceUsbdWaitForEvent);
LIB_FUNCTION("ZfbvM+OP-1A", "libSceUsbd", 1, "libSceUsbd", 1, 1, Func_65F6EF33E38FFF50);
LIB_FUNCTION("l-BWutkKrec", "libSceUsbd", 1, "libSceUsbd", 1, 1, Func_97F056BAD90AADE7);
LIB_FUNCTION("xVEEozs1smQ", "libSceUsbd", 1, "libSceUsbd", 1, 1, Func_C55104A33B35B264);
LIB_FUNCTION("1WtDBgcgseA", "libSceUsbd", 1, "libSceUsbd", 1, 1, Func_D56B43060720B1E0);
};
} // namespace Libraries::Usbd

View file

@ -0,0 +1,79 @@
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#include "common/types.h"
namespace Core::Loader {
class SymbolsResolver;
}
namespace Libraries::Usbd {
int PS4_SYSV_ABI sceUsbdAllocTransfer();
int PS4_SYSV_ABI sceUsbdAttachKernelDriver();
int PS4_SYSV_ABI sceUsbdBulkTransfer();
int PS4_SYSV_ABI sceUsbdCancelTransfer();
int PS4_SYSV_ABI sceUsbdCheckConnected();
int PS4_SYSV_ABI sceUsbdClaimInterface();
int PS4_SYSV_ABI sceUsbdClearHalt();
int PS4_SYSV_ABI sceUsbdClose();
int PS4_SYSV_ABI sceUsbdControlTransfer();
int PS4_SYSV_ABI sceUsbdControlTransferGetData();
int PS4_SYSV_ABI sceUsbdControlTransferGetSetup();
int PS4_SYSV_ABI sceUsbdDetachKernelDriver();
int PS4_SYSV_ABI sceUsbdEventHandlerActive();
int PS4_SYSV_ABI sceUsbdEventHandlingOk();
int PS4_SYSV_ABI sceUsbdExit();
int PS4_SYSV_ABI sceUsbdFillBulkTransfer();
int PS4_SYSV_ABI sceUsbdFillControlSetup();
int PS4_SYSV_ABI sceUsbdFillControlTransfer();
int PS4_SYSV_ABI sceUsbdFillInterruptTransfer();
int PS4_SYSV_ABI sceUsbdFillIsoTransfer();
int PS4_SYSV_ABI sceUsbdFreeConfigDescriptor();
int PS4_SYSV_ABI sceUsbdFreeDeviceList();
int PS4_SYSV_ABI sceUsbdFreeTransfer();
int PS4_SYSV_ABI sceUsbdGetActiveConfigDescriptor();
int PS4_SYSV_ABI sceUsbdGetBusNumber();
int PS4_SYSV_ABI sceUsbdGetConfigDescriptor();
int PS4_SYSV_ABI sceUsbdGetConfigDescriptorByValue();
int PS4_SYSV_ABI sceUsbdGetConfiguration();
int PS4_SYSV_ABI sceUsbdGetDescriptor();
int PS4_SYSV_ABI sceUsbdGetDevice();
int PS4_SYSV_ABI sceUsbdGetDeviceAddress();
int PS4_SYSV_ABI sceUsbdGetDeviceDescriptor();
int PS4_SYSV_ABI sceUsbdGetDeviceList();
int PS4_SYSV_ABI sceUsbdGetDeviceSpeed();
int PS4_SYSV_ABI sceUsbdGetIsoPacketBuffer();
int PS4_SYSV_ABI sceUsbdGetMaxIsoPacketSize();
int PS4_SYSV_ABI sceUsbdGetMaxPacketSize();
int PS4_SYSV_ABI sceUsbdGetStringDescriptor();
int PS4_SYSV_ABI sceUsbdGetStringDescriptorAscii();
int PS4_SYSV_ABI sceUsbdHandleEvents();
int PS4_SYSV_ABI sceUsbdHandleEventsLocked();
int PS4_SYSV_ABI sceUsbdHandleEventsTimeout();
int PS4_SYSV_ABI sceUsbdInit();
int PS4_SYSV_ABI sceUsbdInterruptTransfer();
int PS4_SYSV_ABI sceUsbdKernelDriverActive();
int PS4_SYSV_ABI sceUsbdLockEvents();
int PS4_SYSV_ABI sceUsbdLockEventWaiters();
int PS4_SYSV_ABI sceUsbdOpen();
int PS4_SYSV_ABI sceUsbdOpenDeviceWithVidPid();
int PS4_SYSV_ABI sceUsbdRefDevice();
int PS4_SYSV_ABI sceUsbdReleaseInterface();
int PS4_SYSV_ABI sceUsbdResetDevice();
int PS4_SYSV_ABI sceUsbdSetConfiguration();
int PS4_SYSV_ABI sceUsbdSetInterfaceAltSetting();
int PS4_SYSV_ABI sceUsbdSetIsoPacketLengths();
int PS4_SYSV_ABI sceUsbdSubmitTransfer();
int PS4_SYSV_ABI sceUsbdTryLockEvents();
int PS4_SYSV_ABI sceUsbdUnlockEvents();
int PS4_SYSV_ABI sceUsbdUnlockEventWaiters();
int PS4_SYSV_ABI sceUsbdUnrefDevice();
int PS4_SYSV_ABI sceUsbdWaitForEvent();
int PS4_SYSV_ABI Func_65F6EF33E38FFF50();
int PS4_SYSV_ABI Func_97F056BAD90AADE7();
int PS4_SYSV_ABI Func_C55104A33B35B264();
int PS4_SYSV_ABI Func_D56B43060720B1E0();
void RegisterlibSceUsbd(Core::Loader::SymbolsResolver* sym);
} // namespace Libraries::Usbd

View file

@ -126,7 +126,8 @@ void Emulator::Run(const std::filesystem::path& file) {
void Emulator::LoadSystemModules(const std::filesystem::path& file) {
const auto& sys_module_path = Common::FS::GetUserPath(Common::FS::PathType::SysModuleDir);
for (const auto& entry : std::filesystem::directory_iterator(sys_module_path)) {
if (entry.path().filename() == "libSceNgs2.sprx") {
if (entry.path().filename() == "libSceNgs2.sprx" ||
entry.path().filename() == "libSceJson2.sprx") {
LOG_INFO(Loader, "Loading {}", entry.path().string().c_str());
linker->LoadModule(entry.path());
}