From 007f0f243755a0d5dbb023021d07deac45ce8b2b Mon Sep 17 00:00:00 2001 From: lioncash Date: Thu, 27 Mar 2014 07:36:24 -0400 Subject: [PATCH 1/3] More specific log message for adecRawRead. Was previously logging as adecRead. --- rpcs3/Emu/SysCalls/Modules/cellAdec.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rpcs3/Emu/SysCalls/Modules/cellAdec.cpp b/rpcs3/Emu/SysCalls/Modules/cellAdec.cpp index fec5d753be..9c7b4e8a59 100644 --- a/rpcs3/Emu/SysCalls/Modules/cellAdec.cpp +++ b/rpcs3/Emu/SysCalls/Modules/cellAdec.cpp @@ -30,7 +30,7 @@ next: { if (Emu.IsStopped()) { - ConLog.Warning("adecRead() aborted"); + ConLog.Warning("adecRawRead() aborted"); return 0; } Sleep(1); @@ -47,7 +47,7 @@ next: { if (!Memory.CopyToReal(buf, adec.reader.addr, adec.reader.size)) { - ConLog.Error("adecRead: data reading failed (reader.size=0x%x)", adec.reader.size); + ConLog.Error("adecRawRead: data reading failed (reader.size=0x%x)", adec.reader.size); Emu.Pause(); return 0; } @@ -68,7 +68,7 @@ next: } break; default: - ConLog.Error("adecRead(): sequence error (task %d)", adec.job.Peek().type); + ConLog.Error("adecRawRead(): sequence error (task %d)", adec.job.Peek().type); return -1; } @@ -85,7 +85,7 @@ next: } else if (!Memory.CopyToReal(buf, adec.reader.addr, buf_size)) { - ConLog.Error("adecRead: data reading failed (buf_size=0x%x)", buf_size); + ConLog.Error("adecRawRead: data reading failed (buf_size=0x%x)", buf_size); Emu.Pause(); return 0; } From 7f5412f4270ec75278722ca3478936177a6bcf6b Mon Sep 17 00:00:00 2001 From: lioncash Date: Thu, 27 Mar 2014 08:26:20 -0400 Subject: [PATCH 2/3] Make a some printfs into error log calls. --- rpcs3/Emu/SysCalls/Modules/cellGcmSys.cpp | 2 +- rpcs3/Emu/SysCalls/Modules/sys_fs.cpp | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/rpcs3/Emu/SysCalls/Modules/cellGcmSys.cpp b/rpcs3/Emu/SysCalls/Modules/cellGcmSys.cpp index 877075b86f..d90e4a3705 100644 --- a/rpcs3/Emu/SysCalls/Modules/cellGcmSys.cpp +++ b/rpcs3/Emu/SysCalls/Modules/cellGcmSys.cpp @@ -701,7 +701,7 @@ int32_t cellGcmMapLocalMemory(u64 address, u64 size) } else { - printf("RSX local memory already mapped"); + cellGcmSys.Error("RSX local memory already mapped"); return CELL_GCM_ERROR_FAILURE; } diff --git a/rpcs3/Emu/SysCalls/Modules/sys_fs.cpp b/rpcs3/Emu/SysCalls/Modules/sys_fs.cpp index a76a583acc..f37f2f1723 100644 --- a/rpcs3/Emu/SysCalls/Modules/sys_fs.cpp +++ b/rpcs3/Emu/SysCalls/Modules/sys_fs.cpp @@ -50,9 +50,10 @@ int sdata_unpack(wxString packed_file, wxString unpacked_file) char buffer [10200]; packed_stream->Read(buffer, 256); - if (re32(*(u32*)&buffer[0]) != 0x4E504400) // "NPD\x00" + u32 format = re32(*(u32*)&buffer[0]); + if (format != 0x4E504400) // "NPD\x00" { - printf("ERROR: illegal format."); + sys_fs.Error("Illegal format. Expected 0x4E504400, but got 0x%08x", format); return CELL_EFSSPECIFIC; } From a5f35cc43780b3203842e7968c66aa8c3ad87ddd Mon Sep 17 00:00:00 2001 From: lioncash Date: Thu, 27 Mar 2014 09:04:44 -0400 Subject: [PATCH 3/3] Fix a typo in a log message Also moved a logging statement after an if statement check. We don't want to signify creation of something before checking its validity. --- rpcs3/Emu/HDD/HDD.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/rpcs3/Emu/HDD/HDD.h b/rpcs3/Emu/HDD/HDD.h index c403df21f5..ba7c86e0ed 100644 --- a/rpcs3/Emu/HDD/HDD.h +++ b/rpcs3/Emu/HDD/HDD.h @@ -583,13 +583,12 @@ public: } u64 new_block = FindFreeBlock(); - - ConLog.Write("CREATION ENTRY AT 0x%llx", new_block); if(!new_block) { return false; } + ConLog.Write("CREATING ENTRY AT 0x%llx", new_block); WriteBlock(new_block, g_used_block); { @@ -739,7 +738,7 @@ public: return false; } - ConLog.Write("ENTRY FINDED AT 0x%llx", file_block); + ConLog.Write("ENTRY FOUND AT 0x%llx", file_block); m_file.Open(file_block); return vfsFileBase::Open(path, mode); @@ -769,7 +768,7 @@ public: if(entry.type == vfsHDD_Entry_Dir && name != "." && name != "..") { - ConLog.Warning("removing sub folder '%s'", name.wx_str()); + ConLog.Warning("Removing sub folder '%s'", name.wx_str()); RemoveBlocksDir(entry.data_block); } else if(entry.type == vfsHDD_Entry_File)