From 94ab3ae7cf0a62c0c7c07ba3895a9622475a8f96 Mon Sep 17 00:00:00 2001 From: Ani Date: Thu, 13 Apr 2017 17:30:25 +0100 Subject: [PATCH] Misc (#2614) * cellSysmodule: Register libad modules Register libad_core, libad_async, libad_billboard_util * Misc sys_ss_get_console_open_psid (Called on Project Diva F 2nd), sys_ss_get_console_id Stub cellWebBrowserGetUsrdataOnGameExit for Professional Baseball Spirits 2015 Fix two logs on GcmSys --- rpcs3/Emu/Cell/Modules/cellGcmSys.cpp | 4 ++-- rpcs3/Emu/Cell/Modules/cellSysmodule.cpp | 10 ++++++++ rpcs3/Emu/Cell/Modules/cellWebBrowser.cpp | 5 ++-- rpcs3/Emu/Cell/lv2/lv2.cpp | 5 ++-- rpcs3/Emu/Cell/lv2/sys_ss.cpp | 28 +++++++++++++++++++++++ rpcs3/Emu/Cell/lv2/sys_ss.h | 13 +++++++++++ rpcs3/emucore.vcxproj | 2 ++ rpcs3/emucore.vcxproj.filters | 8 ++++++- 8 files changed, 68 insertions(+), 7 deletions(-) create mode 100644 rpcs3/Emu/Cell/lv2/sys_ss.cpp create mode 100644 rpcs3/Emu/Cell/lv2/sys_ss.h diff --git a/rpcs3/Emu/Cell/Modules/cellGcmSys.cpp b/rpcs3/Emu/Cell/Modules/cellGcmSys.cpp index 488b831aaa..8df3099829 100644 --- a/rpcs3/Emu/Cell/Modules/cellGcmSys.cpp +++ b/rpcs3/Emu/Cell/Modules/cellGcmSys.cpp @@ -1026,7 +1026,7 @@ s32 cellGcmUnmapEaIoAddress(u32 ea) } else { - cellGcmSys.error("cellGcmUnmapEaIoAddress(ea=0x%x): UnmapRealAddress() failed"); + cellGcmSys.error("cellGcmUnmapEaIoAddress(ea=0x%x): UnmapRealAddress() failed", ea); return CELL_GCM_ERROR_FAILURE; } @@ -1050,7 +1050,7 @@ s32 cellGcmUnmapIoAddress(u32 io) } else { - cellGcmSys.error("cellGcmUnmapIoAddress(io=0x%x): UnmapAddress() failed"); + cellGcmSys.error("cellGcmUnmapIoAddress(io=0x%x): UnmapAddress() failed", io); return CELL_GCM_ERROR_FAILURE; } diff --git a/rpcs3/Emu/Cell/Modules/cellSysmodule.cpp b/rpcs3/Emu/Cell/Modules/cellSysmodule.cpp index 44f7a21d8d..6ed5671246 100644 --- a/rpcs3/Emu/Cell/Modules/cellSysmodule.cpp +++ b/rpcs3/Emu/Cell/Modules/cellSysmodule.cpp @@ -93,6 +93,11 @@ static const char* get_module_name(u16 id) case 0x0048: return "cellCelp8Enc"; case 0x0049: return "cellSysutilMisc"; case 0x004a: return "cellMusicUtility"; + // TODO: Check if those libad are correctly matched. + // They belong to those IDs but actual order is unknown. + case 0x004b: return "libad_core"; + case 0x004c: return "libad_async"; + case 0x004d: return "libad_billboard_util"; case 0x004e: return "cellScreenShotUtility"; case 0x004f: return "cellMusicDecodeUtility"; case 0x0050: return "cellSpursJq"; @@ -211,6 +216,11 @@ static const char* get_module_id(u16 id) case 0x0048: return "CELL_SYSMODULE_CELP8ENC"; case 0x0049: return "CELL_SYSMODULE_SYSUTIL_LICENSEAREA"; case 0x004a: return "CELL_SYSMODULE_SYSUTIL_MUSIC2"; + // TODO: Check if those libad are correctly matched. + // They belong to those IDs but actual order is unknown. + case 0x004b: return "CELL_SYSMODULE_AD_CORE"; + case 0x004c: return "CELL_SYSMODULE_AD_ASYNC"; + case 0x004d: return "CELL_SYSMODULE_AD_BILLBOARD_UTIL"; case 0x004e: return "CELL_SYSMODULE_SYSUTIL_SCREENSHOT"; case 0x004f: return "CELL_SYSMODULE_SYSUTIL_MUSIC_DECODE"; case 0x0050: return "CELL_SYSMODULE_SPURS_JQ"; diff --git a/rpcs3/Emu/Cell/Modules/cellWebBrowser.cpp b/rpcs3/Emu/Cell/Modules/cellWebBrowser.cpp index 940303ca9e..b338fe5450 100644 --- a/rpcs3/Emu/Cell/Modules/cellWebBrowser.cpp +++ b/rpcs3/Emu/Cell/Modules/cellWebBrowser.cpp @@ -190,9 +190,10 @@ s32 cellWebBrowserEstimate2(vm::cptr config, vm::ptr return CELL_OK; } -s32 cellWebBrowserGetUsrdataOnGameExit() +s32 cellWebBrowserGetUsrdataOnGameExit(vm::ptr ptr) { - fmt::throw_exception("Unimplemented" HERE); + cellSysutil.todo("cellWebBrowserGetUsrdataOnGameExit(ptr=*0x%x", ptr); + return CELL_OK; } s32 cellWebBrowserInitialize() diff --git a/rpcs3/Emu/Cell/lv2/lv2.cpp b/rpcs3/Emu/Cell/lv2/lv2.cpp index fd19e45ca2..5b540041f4 100644 --- a/rpcs3/Emu/Cell/lv2/lv2.cpp +++ b/rpcs3/Emu/Cell/lv2/lv2.cpp @@ -31,6 +31,7 @@ #include "sys_fs.h" #include "sys_dbg.h" #include "sys_gamepad.h" +#include "sys_ss.h" LOG_CHANNEL(sys_cond); LOG_CHANNEL(sys_dbg); @@ -781,9 +782,9 @@ std::array g_ppu_syscall_table null_func,//BIND_FUNC(sys_...) //867 ROOT null_func,//BIND_FUNC(sys_...) //868 ROOT / DBG AUTHID null_func,//BIND_FUNC(sys_...) //869 ROOT - null_func,//BIND_FUNC(sys_ss_get_console_id), //870 (0x366) + BIND_FUNC(sys_ss_get_console_id), //870 (0x366) null_func,//BIND_FUNC(sys_ss_access_control_engine), //871 (0x367) DBG - null_func,//BIND_FUNC(sys_ss_get_open_psid), //872 (0x368) + BIND_FUNC(sys_ss_get_open_psid), //872 (0x368) null_func,//BIND_FUNC(sys_ss_get_cache_of_product_mode), //873 (0x369) null_func,//BIND_FUNC(sys_ss_get_cache_of_flash_ext_flag), //874 (0x36A) null_func,//BIND_FUNC(sys_ss_get_boot_device) //875 (0x36B) diff --git a/rpcs3/Emu/Cell/lv2/sys_ss.cpp b/rpcs3/Emu/Cell/lv2/sys_ss.cpp new file mode 100644 index 0000000000..a41513c5e1 --- /dev/null +++ b/rpcs3/Emu/Cell/lv2/sys_ss.cpp @@ -0,0 +1,28 @@ +#include "stdafx.h" +#include "Emu/Cell/PPUThread.h" + +#include "sys_ss.h" + +namespace vm { using namespace ps3; } + +logs::channel sys_ss("sys_ss", logs::level::notice); + +s32 sys_ss_get_console_id(vm::ps3::ptr buf) +{ + sys_ss.todo("sys_ss_get_console_id(buf=*0x%x)", buf); + + // TODO: Return some actual IDPS? + *buf = 0; + + return CELL_OK; +} + +s32 sys_ss_get_open_psid(vm::ps3::ptr psid) +{ + sys_ss.warning("sys_ss_get_open_psid(psid=*0x%x)", psid); + + psid->high = 0; + psid->low = 0; + + return CELL_OK; +} diff --git a/rpcs3/Emu/Cell/lv2/sys_ss.h b/rpcs3/Emu/Cell/lv2/sys_ss.h new file mode 100644 index 0000000000..655532adf4 --- /dev/null +++ b/rpcs3/Emu/Cell/lv2/sys_ss.h @@ -0,0 +1,13 @@ +#pragma once + +#include "Emu/Memory/Memory.h" +#include "Emu/Cell/ErrorCodes.h" + +struct CellSsOpenPSID +{ + be_t high; + be_t low; +}; + +s32 sys_ss_get_console_id(vm::ps3::ptr buf); +s32 sys_ss_get_open_psid(vm::ps3::ptr ptr); diff --git a/rpcs3/emucore.vcxproj b/rpcs3/emucore.vcxproj index 7f8c520aad..5a5fcbc1ca 100644 --- a/rpcs3/emucore.vcxproj +++ b/rpcs3/emucore.vcxproj @@ -138,6 +138,7 @@ + @@ -541,6 +542,7 @@ + diff --git a/rpcs3/emucore.vcxproj.filters b/rpcs3/emucore.vcxproj.filters index b48947d452..4453e75509 100644 --- a/rpcs3/emucore.vcxproj.filters +++ b/rpcs3/emucore.vcxproj.filters @@ -920,6 +920,9 @@ Utilities + + Emu\Cell\lv2 + @@ -1771,5 +1774,8 @@ Utilities + + Emu\Cell\lv2 + - + \ No newline at end of file