From 71c4a2a15ffcfd5a0d51ac0dbd8207d840419c9e Mon Sep 17 00:00:00 2001 From: Eladash Date: Fri, 20 Dec 2019 09:17:22 +0200 Subject: [PATCH] Silence some log messages --- rpcs3/Emu/Cell/Modules/cellCamera.cpp | 10 +++--- rpcs3/Emu/Cell/Modules/cellGem.cpp | 14 ++++---- rpcs3/Emu/Cell/Modules/cellNetCtl.cpp | 2 +- rpcs3/Emu/Cell/Modules/sceNp.cpp | 46 +++++++++++++-------------- rpcs3/Emu/Cell/Modules/sceNpSns.cpp | 4 +-- rpcs3/Emu/Cell/lv2/sys_mmapper.cpp | 2 +- rpcs3/Emu/Cell/lv2/sys_ppu_thread.cpp | 2 +- rpcs3/Emu/Cell/lv2/sys_spu.cpp | 14 +++++--- rpcs3/Emu/Cell/lv2/sys_tty.cpp | 6 ++-- 9 files changed, 54 insertions(+), 46 deletions(-) diff --git a/rpcs3/Emu/Cell/Modules/cellCamera.cpp b/rpcs3/Emu/Cell/Modules/cellCamera.cpp index 0bfbed5875..1524975d71 100644 --- a/rpcs3/Emu/Cell/Modules/cellCamera.cpp +++ b/rpcs3/Emu/Cell/Modules/cellCamera.cpp @@ -587,7 +587,7 @@ error_code cellCameraGetType(s32 dev_num, vm::ptr type) s32 cellCameraIsAvailable(s32 dev_num) { - cellCamera.todo("cellCameraIsAvailable(dev_num=%d)", dev_num); + cellCamera.warning("cellCameraIsAvailable(dev_num=%d)", dev_num); if (g_cfg.io.camera == camera_handler::null) { @@ -611,7 +611,7 @@ s32 cellCameraIsAvailable(s32 dev_num) s32 cellCameraIsAttached(s32 dev_num) { - cellCamera.todo("cellCameraIsAttached(dev_num=%d)", dev_num); + cellCamera.warning("cellCameraIsAttached(dev_num=%d)", dev_num); if (g_cfg.io.camera == camera_handler::null) { @@ -650,7 +650,7 @@ s32 cellCameraIsAttached(s32 dev_num) s32 cellCameraIsOpen(s32 dev_num) { - cellCamera.todo("cellCameraIsOpen(dev_num=%d)", dev_num); + cellCamera.warning("cellCameraIsOpen(dev_num=%d)", dev_num); if (g_cfg.io.camera == camera_handler::null) { @@ -674,9 +674,9 @@ s32 cellCameraIsOpen(s32 dev_num) return g_camera->is_open; } -error_code cellCameraIsStarted(s32 dev_num) +s32 cellCameraIsStarted(s32 dev_num) { - cellCamera.todo("cellCameraIsStarted(dev_num=%d)", dev_num); + cellCamera.warning("cellCameraIsStarted(dev_num=%d)", dev_num); if (g_cfg.io.camera == camera_handler::null) { diff --git a/rpcs3/Emu/Cell/Modules/cellGem.cpp b/rpcs3/Emu/Cell/Modules/cellGem.cpp index f9a4ac8f6b..4b61a9c43e 100644 --- a/rpcs3/Emu/Cell/Modules/cellGem.cpp +++ b/rpcs3/Emu/Cell/Modules/cellGem.cpp @@ -732,7 +732,7 @@ error_code cellGemGetImageState(u32 gem_num, vm::ptr gem_imag error_code cellGemGetInertialState(u32 gem_num, u32 state_flag, u64 timestamp, vm::ptr inertial_state) { - cellGem.todo("cellGemGetInertialState(gem_num=%d, state_flag=%d, timestamp=0x%x, inertial_state=0x%x)", gem_num, state_flag, timestamp, inertial_state); + cellGem.warning("cellGemGetInertialState(gem_num=%d, state_flag=%d, timestamp=0x%x, inertial_state=0x%x)", gem_num, state_flag, timestamp, inertial_state); const auto gem = g_fxo->get(); @@ -767,7 +767,7 @@ error_code cellGemGetInertialState(u32 gem_num, u32 state_flag, u64 timestamp, v error_code cellGemGetInfo(vm::ptr info) { - cellGem.todo("cellGemGetInfo(info=*0x%x)", info); + cellGem.warning("cellGemGetInfo(info=*0x%x)", info); const auto gem = g_fxo->get(); @@ -864,7 +864,7 @@ error_code cellGemGetRumble(u32 gem_num, vm::ptr rumble) error_code cellGemGetState(u32 gem_num, u32 flag, u64 time_parameter, vm::ptr gem_state) { - cellGem.todo("cellGemGetState(gem_num=%d, flag=0x%x, time=0x%llx, gem_state=*0x%x)", gem_num, flag, time_parameter, gem_state); + cellGem.warning("cellGemGetState(gem_num=%d, flag=0x%x, time=0x%llx, gem_state=*0x%x)", gem_num, flag, time_parameter, gem_state); const auto gem = g_fxo->get(); @@ -1247,7 +1247,7 @@ error_code cellGemTrackHues(vm::cptr req_hues, vm::ptr res_hues) error_code cellGemUpdateFinish() { - cellGem.todo("cellGemUpdateFinish()"); + cellGem.warning("cellGemUpdateFinish()"); const auto gem = g_fxo->get(); @@ -1265,7 +1265,7 @@ error_code cellGemUpdateFinish() if (!gem->camera_frame) { - return CELL_GEM_NO_VIDEO; + return not_an_error(CELL_GEM_NO_VIDEO); } return CELL_OK; @@ -1273,7 +1273,7 @@ error_code cellGemUpdateFinish() error_code cellGemUpdateStart(vm::cptr camera_frame, u64 timestamp) { - cellGem.todo("cellGemUpdateStart(camera_frame=*0x%x, timestamp=%d)", camera_frame, timestamp); + cellGem.warning("cellGemUpdateStart(camera_frame=*0x%x, timestamp=%d)", camera_frame, timestamp); const auto gem = g_fxo->get(); @@ -1293,7 +1293,7 @@ error_code cellGemUpdateStart(vm::cptr camera_frame, u64 timestamp) gem->camera_frame = camera_frame.addr(); if (!camera_frame) { - return CELL_GEM_NO_VIDEO; + return not_an_error(CELL_GEM_NO_VIDEO); } return CELL_OK; diff --git a/rpcs3/Emu/Cell/Modules/cellNetCtl.cpp b/rpcs3/Emu/Cell/Modules/cellNetCtl.cpp index 404f77dbf4..521f92d7a8 100644 --- a/rpcs3/Emu/Cell/Modules/cellNetCtl.cpp +++ b/rpcs3/Emu/Cell/Modules/cellNetCtl.cpp @@ -300,7 +300,7 @@ error_code cellNetCtlNetStartDialogUnloadAsync(vm::ptr natInfo) { - cellNetCtl.todo("cellNetCtlGetNatInfo(natInfo=*0x%x)", natInfo); + cellNetCtl.warning("cellNetCtlGetNatInfo(natInfo=*0x%x)", natInfo); if (!g_fxo->get()->is_initialized) { diff --git a/rpcs3/Emu/Cell/Modules/sceNp.cpp b/rpcs3/Emu/Cell/Modules/sceNp.cpp index 1a53ab4541..34662b01c5 100644 --- a/rpcs3/Emu/Cell/Modules/sceNp.cpp +++ b/rpcs3/Emu/Cell/Modules/sceNp.cpp @@ -750,7 +750,7 @@ error_code sceNpBasicSendMessageGui(vm::cptr msg, sys_ if (g_psn_connection_status != SCE_NP_MANAGER_STATUS_ONLINE) { - return SCE_NP_BASIC_ERROR_NOT_CONNECTED; + return not_an_error(SCE_NP_BASIC_ERROR_NOT_CONNECTED); } return CELL_OK; @@ -777,7 +777,7 @@ error_code sceNpBasicSendMessageAttachment(vm::cptr to, vm::cptr if (g_psn_connection_status != SCE_NP_MANAGER_STATUS_ONLINE) { - return SCE_NP_BASIC_ERROR_NOT_CONNECTED; + return not_an_error(SCE_NP_BASIC_ERROR_NOT_CONNECTED); } return CELL_OK; @@ -884,7 +884,7 @@ error_code sceNpBasicAddFriend(vm::cptr contact, vm::cptr body, s if (g_psn_connection_status != SCE_NP_MANAGER_STATUS_ONLINE) { - return SCE_NP_BASIC_ERROR_NOT_CONNECTED; + return not_an_error(SCE_NP_BASIC_ERROR_NOT_CONNECTED); } return CELL_OK; @@ -1102,7 +1102,7 @@ error_code sceNpBasicGetPlayersHistoryEntryCount(u32 options, vm::ptr count error_code sceNpBasicGetPlayersHistoryEntry(u32 options, u32 index, vm::ptr npid) { - sceNp.todo("sceNpBasicGetPlayersHistoryEntry(options=%d, index=%d, npid=*0x%x)", options, index, npid); + sceNp.warning("sceNpBasicGetPlayersHistoryEntry(options=%d, index=%d, npid=*0x%x)", options, index, npid); if (!g_fxo->get()->is_initialized) { @@ -1126,7 +1126,7 @@ error_code sceNpBasicGetPlayersHistoryEntry(u32 options, u32 index, vm::ptr npid) { - sceNp.todo("sceNpBasicAddBlockListEntry(npid=*0x%x)", npid); + sceNp.warning("sceNpBasicAddBlockListEntry(npid=*0x%x)", npid); if (!g_fxo->get()->is_initialized) { @@ -1140,7 +1140,7 @@ error_code sceNpBasicAddBlockListEntry(vm::cptr npid) if (g_psn_connection_status != SCE_NP_MANAGER_STATUS_ONLINE) { - return SCE_NP_BASIC_ERROR_NOT_CONNECTED; + return not_an_error(SCE_NP_BASIC_ERROR_NOT_CONNECTED); } return CELL_OK; @@ -1148,7 +1148,7 @@ error_code sceNpBasicAddBlockListEntry(vm::cptr npid) error_code sceNpBasicGetBlockListEntryCount(vm::ptr count) { - sceNp.todo("sceNpBasicGetBlockListEntryCount(count=*0x%x)", count); + sceNp.warning("sceNpBasicGetBlockListEntryCount(count=*0x%x)", count); if (!g_fxo->get()->is_initialized) { @@ -1438,7 +1438,7 @@ error_code sceNpBasicGetMessageEntry(u32 type, u32 index, vm::ptr error_code sceNpBasicGetEvent(vm::ptr event, vm::ptr from, vm::ptr data, vm::ptr size) { - sceNp.todo("sceNpBasicGetEvent(event=*0x%x, from=*0x%x, data=*0x%x, size=*0x%x)", event, from, data, size); + sceNp.warning("sceNpBasicGetEvent(event=*0x%x, from=*0x%x, data=*0x%x, size=*0x%x)", event, from, data, size); if (!g_fxo->get()->is_initialized) { @@ -1453,7 +1453,7 @@ error_code sceNpBasicGetEvent(vm::ptr event, vm::ptr from, v // TODO: Check for other error and pass other events //*event = SCE_NP_BASIC_EVENT_OFFLINE; // This event only indicates a contact is offline, not the current status of the connection - return SCE_NP_BASIC_ERROR_NO_EVENT; + return not_an_error(SCE_NP_BASIC_ERROR_NO_EVENT); } error_code sceNpCommerceCreateCtx(u32 version, vm::ptr npId, vm::ptr handler, vm::ptr arg, vm::ptr ctx_id) @@ -1729,7 +1729,7 @@ error_code sceNpCustomMenuRegisterExceptionList(vm::cptr resultHandler, vm::ptr userArg, sys_memory_container_t containerId) { - sceNp.todo("sceNpFriendlist(resultHandler=*0x%x, userArg=*0x%x, containerId=%d)", resultHandler, userArg, containerId); + sceNp.warning("sceNpFriendlist(resultHandler=*0x%x, userArg=*0x%x, containerId=%d)", resultHandler, userArg, containerId); if (!g_fxo->get()->is_initialized) { @@ -1746,7 +1746,7 @@ error_code sceNpFriendlist(vm::ptr resultHandler, error_code sceNpFriendlistCustom(SceNpFriendlistCustomOptions options, vm::ptr resultHandler, vm::ptr userArg, sys_memory_container_t containerId) { - sceNp.todo("sceNpFriendlistCustom(options=0x%x, resultHandler=*0x%x, userArg=*0x%x, containerId=%d)", options, resultHandler, userArg, containerId); + sceNp.warning("sceNpFriendlistCustom(options=0x%x, resultHandler=*0x%x, userArg=*0x%x, containerId=%d)", options, resultHandler, userArg, containerId); if (!g_fxo->get()->is_initialized) { @@ -2272,7 +2272,7 @@ error_code sceNpManagerUnregisterCallback() error_code sceNpManagerGetStatus(vm::ptr status) { - sceNp.todo("sceNpManagerGetStatus(status=*0x%x)", status); + sceNp.warning("sceNpManagerGetStatus(status=*0x%x)", status); if (!g_fxo->get()->is_initialized) { @@ -2376,7 +2376,7 @@ error_code sceNpManagerGetNpId(ppu_thread& ppu, vm::ptr npId) error_code sceNpManagerGetOnlineName(vm::ptr onlineName) { - sceNp.todo("sceNpManagerGetOnlineName(onlineName=*0x%x)", onlineName); + sceNp.warning("sceNpManagerGetOnlineName(onlineName=*0x%x)", onlineName); if (!g_fxo->get()->is_initialized) { @@ -2403,7 +2403,7 @@ error_code sceNpManagerGetOnlineName(vm::ptr onlineName) error_code sceNpManagerGetAvatarUrl(vm::ptr avatarUrl) { - sceNp.todo("sceNpManagerGetAvatarUrl(avatarUrl=*0x%x)", avatarUrl); + sceNp.warning("sceNpManagerGetAvatarUrl(avatarUrl=*0x%x)", avatarUrl); if (!g_fxo->get()->is_initialized) { @@ -2430,7 +2430,7 @@ error_code sceNpManagerGetAvatarUrl(vm::ptr avatarUrl) error_code sceNpManagerGetMyLanguages(vm::ptr myLanguages) { - sceNp.todo("sceNpManagerGetMyLanguages(myLanguages=*0x%x)", myLanguages); + sceNp.warning("sceNpManagerGetMyLanguages(myLanguages=*0x%x)", myLanguages); if (!g_fxo->get()->is_initialized) { @@ -2457,7 +2457,7 @@ error_code sceNpManagerGetMyLanguages(vm::ptr myLanguages) error_code sceNpManagerGetAccountRegion(vm::ptr countryCode, vm::ptr language) { - sceNp.todo("sceNpManagerGetAccountRegion(countryCode=*0x%x, language=*0x%x)", countryCode, language); + sceNp.warning("sceNpManagerGetAccountRegion(countryCode=*0x%x, language=*0x%x)", countryCode, language); if (!g_fxo->get()->is_initialized) { @@ -2484,7 +2484,7 @@ error_code sceNpManagerGetAccountRegion(vm::ptr countryCode, v error_code sceNpManagerGetAccountAge(vm::ptr age) { - sceNp.todo("sceNpManagerGetAccountAge(age=*0x%x)", age); + sceNp.warning("sceNpManagerGetAccountAge(age=*0x%x)", age); if (!g_fxo->get()->is_initialized) { @@ -2511,7 +2511,7 @@ error_code sceNpManagerGetAccountAge(vm::ptr age) error_code sceNpManagerGetContentRatingFlag(vm::ptr isRestricted, vm::ptr age) { - sceNp.todo("sceNpManagerGetContentRatingFlag(isRestricted=*0x%x, age=*0x%x)", isRestricted, age); + sceNp.warning("sceNpManagerGetContentRatingFlag(isRestricted=*0x%x, age=*0x%x)", isRestricted, age); if (!g_fxo->get()->is_initialized) { @@ -2542,7 +2542,7 @@ error_code sceNpManagerGetContentRatingFlag(vm::ptr isRestricted, vm::ptr isRestricted) { - sceNp.todo("sceNpManagerGetChatRestrictionFlag(isRestricted=*0x%x)", isRestricted); + sceNp.warning("sceNpManagerGetChatRestrictionFlag(isRestricted=*0x%x)", isRestricted); if (!g_fxo->get()->is_initialized) { @@ -4285,7 +4285,7 @@ error_code sceNpUtilCmpNpId(vm::ptr id1, vm::ptr id2) error_code sceNpUtilCmpNpIdInOrder(vm::cptr id1, vm::cptr id2, vm::ptr order) { - sceNp.todo("sceNpUtilCmpNpIdInOrder(id1=*0x%x, id2=*0x%x, order=*0x%x)", id1, id2, order); + sceNp.warning("sceNpUtilCmpNpIdInOrder(id1=*0x%x, id2=*0x%x, order=*0x%x)", id1, id2, order); if (!id1 || !id2) { @@ -4332,7 +4332,7 @@ error_code sceNpUtilCmpNpIdInOrder(vm::cptr id1, vm::cptr id2, error_code sceNpUtilCmpOnlineId(vm::cptr id1, vm::cptr id2) { - sceNp.todo("sceNpUtilCmpOnlineId(id1=*0x%x, id2=*0x%x)", id1, id2); + sceNp.warning("sceNpUtilCmpOnlineId(id1=*0x%x, id2=*0x%x)", id1, id2); if (!id1 || !id2) { @@ -4354,7 +4354,7 @@ error_code sceNpUtilCmpOnlineId(vm::cptr id1, vm::cptr id2) error_code sceNpUtilGetPlatformType(vm::cptr npId) { - sceNp.todo("sceNpUtilGetPlatformType(npId=*0x%x)", npId); + sceNp.warning("sceNpUtilGetPlatformType(npId=*0x%x)", npId); if (!npId) { @@ -4380,7 +4380,7 @@ error_code sceNpUtilGetPlatformType(vm::cptr npId) error_code sceNpUtilSetPlatformType(vm::ptr npId, SceNpPlatformType platformType) { - sceNp.todo("sceNpUtilSetPlatformType(npId=*0x%x, platformType=%d)", npId, platformType); + sceNp.warning("sceNpUtilSetPlatformType(npId=*0x%x, platformType=%d)", npId, platformType); if (!npId) { diff --git a/rpcs3/Emu/Cell/Modules/sceNpSns.cpp b/rpcs3/Emu/Cell/Modules/sceNpSns.cpp index 58d3951fab..1f20fd12fc 100644 --- a/rpcs3/Emu/Cell/Modules/sceNpSns.cpp +++ b/rpcs3/Emu/Cell/Modules/sceNpSns.cpp @@ -184,7 +184,7 @@ error_code sceNpSnsFbGetAccessToken(u32 handle, vm::cptr vptr if (!vptr) { - return CELL_EFAULT; + return not_an_error(CELL_EFAULT); } // Get the exit status from the register diff --git a/rpcs3/Emu/Cell/lv2/sys_spu.cpp b/rpcs3/Emu/Cell/lv2/sys_spu.cpp index 1bea099906..adb3bc47cc 100644 --- a/rpcs3/Emu/Cell/lv2/sys_spu.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_spu.cpp @@ -311,7 +311,7 @@ error_code sys_spu_thread_initialize(ppu_thread& ppu, vm::ptr thread, u32 g if (u32 option = attr->option) { - sys_spu.todo("Unimplemented SPU Thread options (0x%x)", option); + sys_spu.warning("Unimplemented SPU Thread options (0x%x)", option); } const vm::addr_t ls_addr{verify("SPU LS" HERE, vm::alloc(0x80000, vm::main))}; @@ -418,7 +418,7 @@ error_code sys_spu_thread_group_create(ppu_thread& ppu, vm::ptr id, u32 num if (attr->type) { - sys_spu.todo("Unsupported SPU Thread Group type (0x%x)", attr->type); + sys_spu.warning("sys_spu_thread_group_create(): SPU Thread Group type (0x%x)", attr->type); } *id = idm::make(std::string(attr->name.get_ptr(), std::max(attr->nsize, 1) - 1), num, prio, attr->type, attr->ct); @@ -784,14 +784,20 @@ error_code sys_spu_thread_group_join(ppu_thread& ppu, u32 id, vm::ptr cause if (!cause) { - return CELL_EFAULT; + if (status) + { + // Report unwritten data + return CELL_EFAULT; + } + + return not_an_error(CELL_EFAULT); } *cause = static_cast(ppu.gpr[4]); if (!status) { - return CELL_EFAULT; + return not_an_error(CELL_EFAULT); } *status = static_cast(ppu.gpr[5]); diff --git a/rpcs3/Emu/Cell/lv2/sys_tty.cpp b/rpcs3/Emu/Cell/lv2/sys_tty.cpp index f74756ee67..006b3efb42 100644 --- a/rpcs3/Emu/Cell/lv2/sys_tty.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_tty.cpp @@ -88,6 +88,8 @@ error_code sys_tty_read(s32 ch, vm::ptr buf, u32 len, vm::ptr preadle error_code sys_tty_write(s32 ch, vm::cptr buf, u32 len, vm::ptr pwritelen) { + sys_tty.notice("sys_tty_write(ch=%d, buf=*0x%x, len=%d, pwritelen=*0x%x)", ch, buf, len, pwritelen); + std::string msg; if (static_cast(len) > 0 && vm::check_addr(buf.addr(), len)) @@ -100,8 +102,6 @@ error_code sys_tty_write(s32 ch, vm::cptr buf, u32 len, vm::ptr pwrit } } - sys_tty.notice("sys_tty_write(ch=%d, buf=*0x%x (ā€œ%sā€), len=%d, pwritelen=*0x%x)", ch, buf, msg, len, pwritelen); - // Hack: write to tty even on CEX mode, but disable all error checks if (ch < 0 || ch > 15) { @@ -125,6 +125,8 @@ error_code sys_tty_write(s32 ch, vm::cptr buf, u32 len, vm::ptr pwrit { if (!msg.empty()) { + sys_tty.notice("sys_tty_write(): ā€œ%sā€", msg); + if (g_tty) { // Lock size by making it negative