From 1d947daa81cf6de96b15cb5c27003a1c6f8b6713 Mon Sep 17 00:00:00 2001 From: scribam Date: Wed, 10 Apr 2019 19:34:44 +0200 Subject: [PATCH] hle: Add some more functions --- rpcs3/Emu/Cell/Modules/cellCamera.cpp | 46 +++++++++++++++++++++++-- rpcs3/Emu/Cell/Modules/cellGameExec.cpp | 7 ++++ rpcs3/Emu/Cell/Modules/cellRtcAlarm.cpp | 7 ++-- rpcs3/Emu/Cell/Modules/cellUsbd.cpp | 7 ++++ rpcs3/Emu/Cell/Modules/libad_async.cpp | 21 +++++++++++ rpcs3/Emu/Cell/Modules/libad_core.cpp | 21 +++++++++++ rpcs3/Emu/Cell/Modules/sceNpTrophy.cpp | 21 +++++++++++ 7 files changed, 124 insertions(+), 6 deletions(-) diff --git a/rpcs3/Emu/Cell/Modules/cellCamera.cpp b/rpcs3/Emu/Cell/Modules/cellCamera.cpp index 5afb4b14a7..e66daab4ca 100644 --- a/rpcs3/Emu/Cell/Modules/cellCamera.cpp +++ b/rpcs3/Emu/Cell/Modules/cellCamera.cpp @@ -448,6 +448,12 @@ s32 cellCameraOpenEx(s32 dev_num, vm::ptr info) return CELL_OK; } +s32 cellCameraOpenPost() +{ + UNIMPLEMENTED_FUNC(cellCamera); + return CELL_OK; +} + s32 cellCameraClose(s32 dev_num) { cellCamera.todo("cellCameraClose(dev_num=%d)", dev_num); @@ -488,6 +494,12 @@ s32 cellCameraCloseAsync() return CELL_OK; } +s32 cellCameraClosePost() +{ + UNIMPLEMENTED_FUNC(cellCamera); + return CELL_OK; +} + s32 cellCameraGetDeviceGUID(s32 dev_num, vm::ptr guid) { cellCamera.todo("cellCameraGetDeviceGUID(dev_num=%d, guid=*0x%x)", dev_num, guid); @@ -718,6 +730,12 @@ s32 cellCameraSetAttribute(s32 dev_num, s32 attrib, u32 arg1, u32 arg2) return CELL_OK; } +s32 cellCameraResetAttribute() +{ + UNIMPLEMENTED_FUNC(cellCamera); + return CELL_OK; +} + s32 cellCameraGetBufferSize(s32 dev_num, vm::ptr info) { cellCamera.todo("cellCameraGetBufferSize(dev_num=%d, info=*0x%x)", dev_num, info); @@ -898,6 +916,12 @@ s32 cellCameraResetAsync() return CELL_OK; } +s32 cellCameraResetPost() +{ + UNIMPLEMENTED_FUNC(cellCamera); + return CELL_OK; +} + s32 cellCameraStart(s32 dev_num) { cellCamera.todo("cellCameraStart(dev_num=%d)", dev_num); @@ -943,6 +967,12 @@ s32 cellCameraStartAsync() return CELL_OK; } +s32 cellCameraStartPost() +{ + UNIMPLEMENTED_FUNC(cellCamera); + return CELL_OK; +} + s32 cellCameraRead(s32 dev_num, vm::ptr frame_num, vm::ptr bytes_read) { cellCamera.todo("cellCameraRead(dev_num=%d, frame_num=*0x%x, bytes_read=*0x%x)", dev_num, frame_num, bytes_read); @@ -1086,6 +1116,12 @@ s32 cellCameraStopAsync() return CELL_OK; } +s32 cellCameraStopPost() +{ + UNIMPLEMENTED_FUNC(cellCamera); + return CELL_OK; +} + s32 cellCameraSetNotifyEventQueue(u64 key) { cellCamera.todo("cellCameraSetNotifyEventQueue(key=0x%x)", key); @@ -1162,11 +1198,13 @@ DECLARE(ppu_module_manager::cellCamera)("cellCamera", []() { REG_FUNC(cellCamera, cellCameraInit); REG_FUNC(cellCamera, cellCameraEnd); - REG_FUNC(cellCamera, cellCameraOpen); // was "renamed", but exists + REG_FUNC(cellCamera, cellCameraOpen); REG_FUNC(cellCamera, cellCameraOpenAsync); REG_FUNC(cellCamera, cellCameraOpenEx); + REG_FUNC(cellCamera, cellCameraOpenPost); REG_FUNC(cellCamera, cellCameraClose); REG_FUNC(cellCamera, cellCameraCloseAsync); + REG_FUNC(cellCamera, cellCameraClosePost); REG_FUNC(cellCamera, cellCameraGetDeviceGUID); REG_FUNC(cellCamera, cellCameraGetType); @@ -1176,8 +1214,9 @@ DECLARE(ppu_module_manager::cellCamera)("cellCamera", []() REG_FUNC(cellCamera, cellCameraIsStarted); REG_FUNC(cellCamera, cellCameraGetAttribute); REG_FUNC(cellCamera, cellCameraSetAttribute); + REG_FUNC(cellCamera, cellCameraResetAttribute); REG_FUNC(cellCamera, cellCameraGetBufferSize); - REG_FUNC(cellCamera, cellCameraGetBufferInfo); // was "renamed", but exists + REG_FUNC(cellCamera, cellCameraGetBufferInfo); REG_FUNC(cellCamera, cellCameraGetBufferInfoEx); REG_FUNC(cellCamera, cellCameraPrepExtensionUnit); @@ -1188,14 +1227,17 @@ DECLARE(ppu_module_manager::cellCamera)("cellCamera", []() REG_FUNC(cellCamera, cellCameraReset); REG_FUNC(cellCamera, cellCameraResetAsync); + REG_FUNC(cellCamera, cellCameraResetPost); REG_FUNC(cellCamera, cellCameraStart); REG_FUNC(cellCamera, cellCameraStartAsync); + REG_FUNC(cellCamera, cellCameraStartPost); REG_FUNC(cellCamera, cellCameraRead); REG_FUNC(cellCamera, cellCameraRead2); REG_FUNC(cellCamera, cellCameraReadEx); REG_FUNC(cellCamera, cellCameraReadComplete); REG_FUNC(cellCamera, cellCameraStop); REG_FUNC(cellCamera, cellCameraStopAsync); + REG_FUNC(cellCamera, cellCameraStopPost); REG_FUNC(cellCamera, cellCameraSetNotifyEventQueue); REG_FUNC(cellCamera, cellCameraRemoveNotifyEventQueue); diff --git a/rpcs3/Emu/Cell/Modules/cellGameExec.cpp b/rpcs3/Emu/Cell/Modules/cellGameExec.cpp index 9bf583b867..9da76074ec 100644 --- a/rpcs3/Emu/Cell/Modules/cellGameExec.cpp +++ b/rpcs3/Emu/Cell/Modules/cellGameExec.cpp @@ -58,6 +58,12 @@ s32 cellGameGetHomeLaunchOptionPath(vm::ptr commonPath, vm::ptr pers return CELL_GAME_ERROR_NOAPP; } +s32 cellGameExecGame() +{ + UNIMPLEMENTED_FUNC(cellGameExec); + return CELL_OK; +} + s32 cellGameGetBootGameInfo(vm::ptr type, vm::ptr dirName, vm::ptr execdata) { cellGameExec.todo("cellGameGetBootGameInfo(type=*0x%x, dirName=%s, execdata=*0x%x)", type, dirName, execdata); @@ -80,5 +86,6 @@ DECLARE(ppu_module_manager::cellGameExec)("cellGameExec", []() REG_FUNC(cellGameExec, cellGameGetHomePath); REG_FUNC(cellGameExec, cellGameGetHomeDataImportPath); REG_FUNC(cellGameExec, cellGameGetHomeLaunchOptionPath); + REG_FUNC(cellGameExec, cellGameExecGame); REG_FUNC(cellGameExec, cellGameGetBootGameInfo); }); diff --git a/rpcs3/Emu/Cell/Modules/cellRtcAlarm.cpp b/rpcs3/Emu/Cell/Modules/cellRtcAlarm.cpp index 6c481c4cd6..c357d7dbf5 100644 --- a/rpcs3/Emu/Cell/Modules/cellRtcAlarm.cpp +++ b/rpcs3/Emu/Cell/Modules/cellRtcAlarm.cpp @@ -21,13 +21,13 @@ s32 cellRtcAlarmNotification() return CELL_OK; } -s32 cellRtcAlarmGetStatus() +s32 cellRtcAlarmStopRunning() { UNIMPLEMENTED_FUNC(cellRtcAlarm); return CELL_OK; } -s32 cellRtcAlarm_B287748C() +s32 cellRtcAlarmGetStatus() { UNIMPLEMENTED_FUNC(cellRtcAlarm); return CELL_OK; @@ -38,7 +38,6 @@ DECLARE(ppu_module_manager::cellRtcAlarm)("cellRtcAlarm", []() REG_FUNC(cellRtcAlarm, cellRtcAlarmRegister); REG_FUNC(cellRtcAlarm, cellRtcAlarmUnregister); REG_FUNC(cellRtcAlarm, cellRtcAlarmNotification); + REG_FUNC(cellRtcAlarm, cellRtcAlarmStopRunning); REG_FUNC(cellRtcAlarm, cellRtcAlarmGetStatus); - - REG_FNID(cellRtcAlarm, 0xB287748C, cellRtcAlarm_B287748C); }); diff --git a/rpcs3/Emu/Cell/Modules/cellUsbd.cpp b/rpcs3/Emu/Cell/Modules/cellUsbd.cpp index 6bbcc38a36..937ea737c9 100644 --- a/rpcs3/Emu/Cell/Modules/cellUsbd.cpp +++ b/rpcs3/Emu/Cell/Modules/cellUsbd.cpp @@ -156,6 +156,12 @@ s32 cellUsbdAllocateMemory() return CELL_OK; } +s32 cellUsbdAllocateMemoryFromContainer() +{ + UNIMPLEMENTED_FUNC(cellUsbd); + return CELL_OK; +} + s32 cellUsbdAllocateSharedMemory() { UNIMPLEMENTED_FUNC(cellUsbd); @@ -209,6 +215,7 @@ DECLARE(ppu_module_manager::cellUsbd)("cellUsbd", []() REG_FUNC(cellUsbd, cellUsbdGetPrivateData); REG_FUNC(cellUsbd, cellUsbdAllocateMemory); + REG_FUNC(cellUsbd, cellUsbdAllocateMemoryFromContainer); REG_FUNC(cellUsbd, cellUsbdAllocateSharedMemory); REG_FUNC(cellUsbd, cellUsbdFreeMemory); diff --git a/rpcs3/Emu/Cell/Modules/libad_async.cpp b/rpcs3/Emu/Cell/Modules/libad_async.cpp index b086eb4301..a008cc6e69 100644 --- a/rpcs3/Emu/Cell/Modules/libad_async.cpp +++ b/rpcs3/Emu/Cell/Modules/libad_async.cpp @@ -3,12 +3,30 @@ LOG_CHANNEL(libad_async); +s32 sceAdAsyncOpenContext() +{ + UNIMPLEMENTED_FUNC(libad_async); + return CELL_OK; +} + +s32 sceAdAsyncConnectContext() +{ + UNIMPLEMENTED_FUNC(libad_async); + return CELL_OK; +} + s32 sceAdAsyncSpaceOpen() { UNIMPLEMENTED_FUNC(libad_async); return CELL_OK; } +s32 sceAdAsyncFlushReports() +{ + UNIMPLEMENTED_FUNC(libad_async); + return CELL_OK; +} + s32 sceAdAsyncSpaceClose() { UNIMPLEMENTED_FUNC(libad_async); @@ -23,7 +41,10 @@ s32 sceAdAsyncCloseContext() DECLARE(ppu_module_manager::libad_async)("libad_async", []() { + REG_FUNC(libad_async, sceAdAsyncOpenContext); + REG_FUNC(libad_async, sceAdAsyncConnectContext); REG_FUNC(libad_async, sceAdAsyncSpaceOpen); + REG_FUNC(libad_async, sceAdAsyncFlushReports); REG_FUNC(libad_async, sceAdAsyncSpaceClose); REG_FUNC(libad_async, sceAdAsyncCloseContext); }); diff --git a/rpcs3/Emu/Cell/Modules/libad_core.cpp b/rpcs3/Emu/Cell/Modules/libad_core.cpp index d65276abaa..b7d4a8089b 100644 --- a/rpcs3/Emu/Cell/Modules/libad_core.cpp +++ b/rpcs3/Emu/Cell/Modules/libad_core.cpp @@ -3,6 +3,18 @@ LOG_CHANNEL(libad_core); +s32 sceAdOpenContext() +{ + UNIMPLEMENTED_FUNC(libad_core); + return CELL_OK; +} + +s32 sceAdFlushReports() +{ + UNIMPLEMENTED_FUNC(libad_core); + return CELL_OK; +} + s32 sceAdGetAssetInfo() { UNIMPLEMENTED_FUNC(libad_core); @@ -27,10 +39,19 @@ s32 sceAdGetConnectionInfo() return CELL_OK; } +s32 sceAdConnectContext() +{ + UNIMPLEMENTED_FUNC(libad_core); + return CELL_OK; +} + DECLARE(ppu_module_manager::libad_core)("libad_core", []() { + REG_FUNC(libad_core, sceAdOpenContext); + REG_FUNC(libad_core, sceAdFlushReports); REG_FUNC(libad_core, sceAdGetAssetInfo); REG_FUNC(libad_core, sceAdCloseContext); REG_FUNC(libad_core, sceAdGetSpaceInfo); REG_FUNC(libad_core, sceAdGetConnectionInfo); + REG_FUNC(libad_core, sceAdConnectContext); }); diff --git a/rpcs3/Emu/Cell/Modules/sceNpTrophy.cpp b/rpcs3/Emu/Cell/Modules/sceNpTrophy.cpp index 7541f39652..5eaa868930 100644 --- a/rpcs3/Emu/Cell/Modules/sceNpTrophy.cpp +++ b/rpcs3/Emu/Cell/Modules/sceNpTrophy.cpp @@ -145,6 +145,12 @@ error_code sceNpTrophyDestroyHandle(u32 handle) return CELL_OK; } +error_code sceNpTrophyGetGameDetails() +{ + UNIMPLEMENTED_FUNC(sceNpTrophy); + return CELL_OK; +} + error_code sceNpTrophyAbortHandle(u32 handle) { sceNpTrophy.todo("sceNpTrophyAbortHandle(handle=0x%x)", handle); @@ -523,6 +529,12 @@ error_code sceNpTrophyGetGameInfo(u32 context, u32 handle, vm::ptr platinumId) { sceNpTrophy.error("sceNpTrophyUnlockTrophy(context=0x%x, handle=0x%x, trophyId=%d, platinumId=*0x%x)", context, handle, trophyId, platinumId); @@ -632,6 +644,12 @@ error_code sceNpTrophyGetTrophyUnlockState(u32 context, u32 handle, vm::ptr details, vm::ptr data) { sceNpTrophy.warning("sceNpTrophyGetTrophyInfo(context=0x%x, handle=0x%x, trophyId=%d, details=*0x%x, data=*0x%x)", context, handle, trophyId, details, data); @@ -889,12 +907,15 @@ DECLARE(ppu_module_manager::sceNpTrophy)("sceNpTrophy", []() REG_FUNC(sceNpTrophy, sceNpTrophyAbortHandle); REG_FUNC(sceNpTrophy, sceNpTrophyGetGameInfo); REG_FUNC(sceNpTrophy, sceNpTrophyDestroyHandle); + REG_FUNC(sceNpTrophy, sceNpTrophyGetGameDetails); REG_FUNC(sceNpTrophy, sceNpTrophyUnlockTrophy); + REG_FUNC(sceNpTrophy, sceNpTrophyGetLatestTrophies); REG_FUNC(sceNpTrophy, sceNpTrophyTerm); REG_FUNC(sceNpTrophy, sceNpTrophyGetTrophyUnlockState); REG_FUNC(sceNpTrophy, sceNpTrophyGetUserInfo); REG_FUNC(sceNpTrophy, sceNpTrophyGetTrophyIcon); REG_FUNC(sceNpTrophy, sceNpTrophyCreateContext); + REG_FUNC(sceNpTrophy, sceNpTrophyGetTrophyDetails); REG_FUNC(sceNpTrophy, sceNpTrophyGetTrophyInfo); REG_FUNC(sceNpTrophy, sceNpTrophyGetGameIcon); });