Skip to content

Commit

Permalink
Silence some log messages
Browse files Browse the repository at this point in the history
  • Loading branch information
elad335 committed Dec 20, 2019
1 parent 210a242 commit 674b5a4
Show file tree
Hide file tree
Showing 8 changed files with 49 additions and 41 deletions.
10 changes: 5 additions & 5 deletions rpcs3/Emu/Cell/Modules/cellCamera.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,7 @@ error_code cellCameraGetType(s32 dev_num, vm::ptr<s32> 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)
{
Expand All @@ -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)
{
Expand Down Expand Up @@ -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)
{
Expand All @@ -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)
{
Expand Down
8 changes: 4 additions & 4 deletions rpcs3/Emu/Cell/Modules/cellGem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -732,7 +732,7 @@ error_code cellGemGetImageState(u32 gem_num, vm::ptr<CellGemImageState> gem_imag

error_code cellGemGetInertialState(u32 gem_num, u32 state_flag, u64 timestamp, vm::ptr<CellGemInertialState> 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<gem_config>();

Expand Down Expand Up @@ -864,7 +864,7 @@ error_code cellGemGetRumble(u32 gem_num, vm::ptr<u8> rumble)

error_code cellGemGetState(u32 gem_num, u32 flag, u64 time_parameter, vm::ptr<CellGemState> 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<gem_config>();

Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -1293,7 +1293,7 @@ error_code cellGemUpdateStart(vm::cptr<void> 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;
Expand Down
44 changes: 22 additions & 22 deletions rpcs3/Emu/Cell/Modules/sceNp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -750,7 +750,7 @@ error_code sceNpBasicSendMessageGui(vm::cptr<SceNpBasicMessageDetails> 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;
Expand All @@ -777,7 +777,7 @@ error_code sceNpBasicSendMessageAttachment(vm::cptr<SceNpId> to, vm::cptr<char>

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;
Expand Down Expand Up @@ -884,7 +884,7 @@ error_code sceNpBasicAddFriend(vm::cptr<SceNpId> contact, vm::cptr<char> 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;
Expand Down Expand Up @@ -1102,7 +1102,7 @@ error_code sceNpBasicGetPlayersHistoryEntryCount(u32 options, vm::ptr<u32> count

error_code sceNpBasicGetPlayersHistoryEntry(u32 options, u32 index, vm::ptr<SceNpId> 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<sce_np_manager>()->is_initialized)
{
Expand All @@ -1126,7 +1126,7 @@ error_code sceNpBasicGetPlayersHistoryEntry(u32 options, u32 index, vm::ptr<SceN

error_code sceNpBasicAddBlockListEntry(vm::cptr<SceNpId> npid)
{
sceNp.todo("sceNpBasicAddBlockListEntry(npid=*0x%x)", npid);
sceNp.warning("sceNpBasicAddBlockListEntry(npid=*0x%x)", npid);

if (!g_fxo->get<sce_np_manager>()->is_initialized)
{
Expand All @@ -1140,15 +1140,15 @@ error_code sceNpBasicAddBlockListEntry(vm::cptr<SceNpId> 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;
}

error_code sceNpBasicGetBlockListEntryCount(vm::ptr<u32> count)
{
sceNp.todo("sceNpBasicGetBlockListEntryCount(count=*0x%x)", count);
sceNp.warning("sceNpBasicGetBlockListEntryCount(count=*0x%x)", count);

if (!g_fxo->get<sce_np_manager>()->is_initialized)
{
Expand Down Expand Up @@ -1438,7 +1438,7 @@ error_code sceNpBasicGetMessageEntry(u32 type, u32 index, vm::ptr<SceNpUserInfo>

error_code sceNpBasicGetEvent(vm::ptr<s32> event, vm::ptr<SceNpUserInfo> from, vm::ptr<s32> data, vm::ptr<u32> 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<sce_np_manager>()->is_initialized)
{
Expand All @@ -1453,7 +1453,7 @@ error_code sceNpBasicGetEvent(vm::ptr<s32> event, vm::ptr<SceNpUserInfo> 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<SceNpId> npId, vm::ptr<SceNpCommerceHandler> handler, vm::ptr<void> arg, vm::ptr<u32> ctx_id)
Expand Down Expand Up @@ -1729,7 +1729,7 @@ error_code sceNpCustomMenuRegisterExceptionList(vm::cptr<SceNpCustomMenuActionEx

error_code sceNpFriendlist(vm::ptr<SceNpFriendlistResultHandler> resultHandler, vm::ptr<void> 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<sce_np_manager>()->is_initialized)
{
Expand All @@ -1746,7 +1746,7 @@ error_code sceNpFriendlist(vm::ptr<SceNpFriendlistResultHandler> resultHandler,

error_code sceNpFriendlistCustom(SceNpFriendlistCustomOptions options, vm::ptr<SceNpFriendlistResultHandler> resultHandler, vm::ptr<void> 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<sce_np_manager>()->is_initialized)
{
Expand Down Expand Up @@ -2376,7 +2376,7 @@ error_code sceNpManagerGetNpId(ppu_thread& ppu, vm::ptr<SceNpId> npId)

error_code sceNpManagerGetOnlineName(vm::ptr<SceNpOnlineName> onlineName)
{
sceNp.todo("sceNpManagerGetOnlineName(onlineName=*0x%x)", onlineName);
sceNp.warning("sceNpManagerGetOnlineName(onlineName=*0x%x)", onlineName);

if (!g_fxo->get<sce_np_manager>()->is_initialized)
{
Expand All @@ -2403,7 +2403,7 @@ error_code sceNpManagerGetOnlineName(vm::ptr<SceNpOnlineName> onlineName)

error_code sceNpManagerGetAvatarUrl(vm::ptr<SceNpAvatarUrl> avatarUrl)
{
sceNp.todo("sceNpManagerGetAvatarUrl(avatarUrl=*0x%x)", avatarUrl);
sceNp.warning("sceNpManagerGetAvatarUrl(avatarUrl=*0x%x)", avatarUrl);

if (!g_fxo->get<sce_np_manager>()->is_initialized)
{
Expand All @@ -2430,7 +2430,7 @@ error_code sceNpManagerGetAvatarUrl(vm::ptr<SceNpAvatarUrl> avatarUrl)

error_code sceNpManagerGetMyLanguages(vm::ptr<SceNpMyLanguages> myLanguages)
{
sceNp.todo("sceNpManagerGetMyLanguages(myLanguages=*0x%x)", myLanguages);
sceNp.warning("sceNpManagerGetMyLanguages(myLanguages=*0x%x)", myLanguages);

if (!g_fxo->get<sce_np_manager>()->is_initialized)
{
Expand All @@ -2457,7 +2457,7 @@ error_code sceNpManagerGetMyLanguages(vm::ptr<SceNpMyLanguages> myLanguages)

error_code sceNpManagerGetAccountRegion(vm::ptr<SceNpCountryCode> countryCode, vm::ptr<s32> 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<sce_np_manager>()->is_initialized)
{
Expand All @@ -2484,7 +2484,7 @@ error_code sceNpManagerGetAccountRegion(vm::ptr<SceNpCountryCode> countryCode, v

error_code sceNpManagerGetAccountAge(vm::ptr<s32> age)
{
sceNp.todo("sceNpManagerGetAccountAge(age=*0x%x)", age);
sceNp.warning("sceNpManagerGetAccountAge(age=*0x%x)", age);

if (!g_fxo->get<sce_np_manager>()->is_initialized)
{
Expand All @@ -2511,7 +2511,7 @@ error_code sceNpManagerGetAccountAge(vm::ptr<s32> age)

error_code sceNpManagerGetContentRatingFlag(vm::ptr<s32> isRestricted, vm::ptr<s32> 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<sce_np_manager>()->is_initialized)
{
Expand Down Expand Up @@ -2542,7 +2542,7 @@ error_code sceNpManagerGetContentRatingFlag(vm::ptr<s32> isRestricted, vm::ptr<s

error_code sceNpManagerGetChatRestrictionFlag(vm::ptr<s32> isRestricted)
{
sceNp.todo("sceNpManagerGetChatRestrictionFlag(isRestricted=*0x%x)", isRestricted);
sceNp.warning("sceNpManagerGetChatRestrictionFlag(isRestricted=*0x%x)", isRestricted);

if (!g_fxo->get<sce_np_manager>()->is_initialized)
{
Expand Down Expand Up @@ -4285,7 +4285,7 @@ error_code sceNpUtilCmpNpId(vm::ptr<SceNpId> id1, vm::ptr<SceNpId> id2)

error_code sceNpUtilCmpNpIdInOrder(vm::cptr<SceNpId> id1, vm::cptr<SceNpId> id2, vm::ptr<s32> 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)
{
Expand Down Expand Up @@ -4332,7 +4332,7 @@ error_code sceNpUtilCmpNpIdInOrder(vm::cptr<SceNpId> id1, vm::cptr<SceNpId> id2,

error_code sceNpUtilCmpOnlineId(vm::cptr<SceNpId> id1, vm::cptr<SceNpId> 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)
{
Expand All @@ -4354,7 +4354,7 @@ error_code sceNpUtilCmpOnlineId(vm::cptr<SceNpId> id1, vm::cptr<SceNpId> id2)

error_code sceNpUtilGetPlatformType(vm::cptr<SceNpId> npId)
{
sceNp.todo("sceNpUtilGetPlatformType(npId=*0x%x)", npId);
sceNp.warning("sceNpUtilGetPlatformType(npId=*0x%x)", npId);

if (!npId)
{
Expand All @@ -4380,7 +4380,7 @@ error_code sceNpUtilGetPlatformType(vm::cptr<SceNpId> npId)

error_code sceNpUtilSetPlatformType(vm::ptr<SceNpId> 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)
{
Expand Down
4 changes: 2 additions & 2 deletions rpcs3/Emu/Cell/Modules/sceNpSns.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ error_code sceNpSnsFbGetAccessToken(u32 handle, vm::cptr<SceNpSnsFbAccessTokenPa

if (g_psn_connection_status == SCE_NP_MANAGER_STATUS_OFFLINE)
{
return SCE_NP_SNS_ERROR_NOT_SIGN_IN;
return not_an_error(SCE_NP_SNS_ERROR_NOT_SIGN_IN);
}

// TODO
Expand Down Expand Up @@ -309,7 +309,7 @@ error_code sceNpSnsFbGetLongAccessToken(u32 handle, vm::cptr<SceNpSnsFbAccessTok

if (g_psn_connection_status == SCE_NP_MANAGER_STATUS_OFFLINE)
{
return SCE_NP_SNS_ERROR_NOT_SIGN_IN;
return not_an_error(SCE_NP_SNS_ERROR_NOT_SIGN_IN);
}

return CELL_OK;
Expand Down
2 changes: 1 addition & 1 deletion rpcs3/Emu/Cell/lv2/sys_mmapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ error_code sys_mmapper_allocate_shared_memory_from_container(ppu_thread& ppu, u6
{
vm::temporary_unlock(ppu);

sys_mmapper.error("sys_mmapper_allocate_shared_memory_from_container(0x%llx, size=0x%x, cid=0x%x, flags=0x%llx, mem_id=*0x%x)", unk, size, cid, flags, mem_id);
sys_mmapper.warning("sys_mmapper_allocate_shared_memory_from_container(0x%llx, size=0x%x, cid=0x%x, flags=0x%llx, mem_id=*0x%x)", unk, size, cid, flags, mem_id);

// Check page granularity.
switch (flags & SYS_MEMORY_PAGE_SIZE_MASK)
Expand Down
2 changes: 1 addition & 1 deletion rpcs3/Emu/Cell/lv2/sys_ppu_thread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ error_code sys_ppu_thread_join(ppu_thread& ppu, u32 thread_id, vm::ptr<u64> vptr

if (!vptr)
{
return CELL_EFAULT;
return not_an_error(CELL_EFAULT);
}

// Get the exit status from the register
Expand Down
14 changes: 10 additions & 4 deletions rpcs3/Emu/Cell/lv2/sys_spu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ error_code sys_spu_thread_initialize(ppu_thread& ppu, vm::ptr<u32> 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))};
Expand Down Expand Up @@ -416,7 +416,7 @@ error_code sys_spu_thread_group_create(ppu_thread& ppu, vm::ptr<u32> 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<lv2_spu_group>(std::string(attr->name.get_ptr(), std::max<u32>(attr->nsize, 1) - 1), num, prio, attr->type, attr->ct);
Expand Down Expand Up @@ -782,14 +782,20 @@ error_code sys_spu_thread_group_join(ppu_thread& ppu, u32 id, vm::ptr<u32> cause

if (!cause)
{
return CELL_EFAULT;
if (status)
{
// Report unwritten data
return CELL_EFAULT;
}

return not_an_error(CELL_EFAULT);
}

*cause = static_cast<u32>(ppu.gpr[4]);

if (!status)
{
return CELL_EFAULT;
return not_an_error(CELL_EFAULT);
}

*status = static_cast<s32>(ppu.gpr[5]);
Expand Down
6 changes: 4 additions & 2 deletions rpcs3/Emu/Cell/lv2/sys_tty.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ error_code sys_tty_read(s32 ch, vm::ptr<char> buf, u32 len, vm::ptr<u32> preadle

error_code sys_tty_write(s32 ch, vm::cptr<char> buf, u32 len, vm::ptr<u32> 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<s32>(len) > 0 && vm::check_addr(buf.addr(), len))
Expand All @@ -100,8 +102,6 @@ error_code sys_tty_write(s32 ch, vm::cptr<char> buf, u32 len, vm::ptr<u32> 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)
{
Expand All @@ -125,6 +125,8 @@ error_code sys_tty_write(s32 ch, vm::cptr<char> buf, u32 len, vm::ptr<u32> pwrit
{
if (!msg.empty())
{
sys_tty.notice("sys_tty_write(): “%s”", msg);

if (g_tty)
{
// Lock size by making it negative
Expand Down

0 comments on commit 674b5a4

Please sign in to comment.