From 7d95311a0107d1c4a76006b5775137ec586bbee5 Mon Sep 17 00:00:00 2001 From: Nekotekina Date: Mon, 29 Sep 2014 19:38:04 +0400 Subject: [PATCH] Some %x fixed --- Utilities/AutoPause.cpp | 8 ++-- rpcs3/Emu/Cell/PPUDisAsm.h | 2 +- rpcs3/Emu/Cell/PPUInterpreter.h | 8 ++-- rpcs3/Emu/RSX/RSXThread.cpp | 56 +++++++++++------------ rpcs3/Emu/SysCalls/Modules/cellL10n.cpp | 4 +- rpcs3/Emu/SysCalls/Modules/cellNetCtl.cpp | 8 ++-- rpcs3/Emu/SysCalls/Modules/cellPamf.cpp | 2 +- rpcs3/Loader/ELF32.cpp | 16 +++---- rpcs3/Loader/ELF64.cpp | 16 +++---- rpcs3/Loader/Loader.cpp | 8 ++-- rpcs3/Loader/PSF.cpp | 2 +- rpcs3/Loader/TRP.cpp | 2 +- 12 files changed, 66 insertions(+), 66 deletions(-) diff --git a/Utilities/AutoPause.cpp b/Utilities/AutoPause.cpp index 9c3fc70edf..b1e4c3ed0a 100644 --- a/Utilities/AutoPause.cpp +++ b/Utilities/AutoPause.cpp @@ -69,12 +69,12 @@ void AutoPause::Reload(void) //Less than 1024 - be regarded as a system call. //emplace_back may not cause reductant move/copy operation. m_pause_syscall.emplace_back(num); - LOG_WARNING(HLE, "Auto Pause: Find System Call ID %x", num); + LOG_WARNING(HLE, "Auto Pause: Find System Call ID 0x%x", num); } else { m_pause_function.emplace_back(num); - LOG_WARNING(HLE, "Auto Pause: Find Function Call ID %x", num); + LOG_WARNING(HLE, "Auto Pause: Find Function Call ID 0x%x", num); } } list.Close(); @@ -103,7 +103,7 @@ void AutoPause::TryPause(u32 code) { if (code == m_pause_syscall[i]) { Emu.Pause(); - LOG_ERROR(HLE, "Auto Pause Triggered: System call %x", code); //Used Error + LOG_ERROR(HLE, "Auto Pause Triggered: System call 0x%x", code); // Used Error } } } @@ -121,7 +121,7 @@ void AutoPause::TryPause(u32 code) { if (code == m_pause_function[i]) { Emu.Pause(); - LOG_ERROR(HLE, "Auto Pause Triggered: Function call %x", code); //Used Error + LOG_ERROR(HLE, "Auto Pause Triggered: Function call 0x%x", code); // Used Error } } } diff --git a/rpcs3/Emu/Cell/PPUDisAsm.h b/rpcs3/Emu/Cell/PPUDisAsm.h index 34e51f7fb2..81cd3029d4 100644 --- a/rpcs3/Emu/Cell/PPUDisAsm.h +++ b/rpcs3/Emu/Cell/PPUDisAsm.h @@ -1037,7 +1037,7 @@ private: case 0x1: Write("HyperCall"); break; case 0x2: Write("sc"); break; case 0x22: Write("HyperCall LV1"); break; - default: Write(fmt::Format("Unknown sc: %x", sc_code)); + default: Write(fmt::Format("Unknown sc: 0x%x", sc_code)); } } void B(s32 ll, u32 aa, u32 lk) diff --git a/rpcs3/Emu/Cell/PPUInterpreter.h b/rpcs3/Emu/Cell/PPUInterpreter.h index 3ad8ba2eea..c44c8a9a21 100644 --- a/rpcs3/Emu/Cell/PPUInterpreter.h +++ b/rpcs3/Emu/Cell/PPUInterpreter.h @@ -149,7 +149,7 @@ private: ((u64)a < (u64)simm16 && (to & 0x2)) || ((u64)a > (u64)simm16 && (to & 0x1)) ) { - UNK(fmt::Format("Trap! (tdi %x, r%d, %x)", to, ra, simm16)); + UNK(fmt::Format("Trap! (tdi 0x%x, r%d, 0x%x)", to, ra, simm16)); } } @@ -163,7 +163,7 @@ private: ((u32)a < (u32)simm16 && (to & 0x2)) || ((u32)a > (u32)simm16 && (to & 0x1)) ) { - UNK(fmt::Format("Trap! (twi %x, r%d, %x)", to, ra, simm16)); + UNK(fmt::Format("Trap! (twi 0x%x, r%d, 0x%x)", to, ra, simm16)); } } @@ -2102,7 +2102,7 @@ private: break; case 0x4: CPU.FastStop(); break; case 0x22: UNK("HyperCall LV1"); break; - default: UNK(fmt::Format("Unknown sc: %x", sc_code)); + default: UNK(fmt::Format("Unknown sc: 0x%x", sc_code)); } } void B(s32 ll, u32 aa, u32 lk) @@ -2266,7 +2266,7 @@ private: ((u32)a < (u32)b && (to & 0x2)) || ((u32)a > (u32)b && (to & 0x1)) ) { - UNK(fmt::Format("Trap! (tw %x, r%d, r%d)", to, ra, rb)); + UNK(fmt::Format("Trap! (tw 0x%x, r%d, r%d)", to, ra, rb)); } } void LVSL(u32 vd, u32 ra, u32 rb) diff --git a/rpcs3/Emu/RSX/RSXThread.cpp b/rpcs3/Emu/RSX/RSXThread.cpp index 952a963f1b..02231cf848 100644 --- a/rpcs3/Emu/RSX/RSXThread.cpp +++ b/rpcs3/Emu/RSX/RSXThread.cpp @@ -239,7 +239,7 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const case NV406E_SET_CONTEXT_DMA_SEMAPHORE: { if (ARGS(0)) - LOG_WARNING(RSX, "NV406E_SET_CONTEXT_DMA_SEMAPHORE: %x", ARGS(0)); + LOG_WARNING(RSX, "NV406E_SET_CONTEXT_DMA_SEMAPHORE: 0x%x", ARGS(0)); } break; @@ -254,7 +254,7 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const case NV406E_SEMAPHORE_ACQUIRE: { if (ARGS(0)) - LOG_WARNING(RSX, "NV406E_SEMAPHORE_ACQUIRE: %x", ARGS(0)); + LOG_WARNING(RSX, "NV406E_SEMAPHORE_ACQUIRE: 0x%x", ARGS(0)); } break; @@ -315,21 +315,21 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const case NV4097_NOTIFY: { if (ARGS(0)) - LOG_WARNING(RSX, "NV4097_NOTIFY: %x", ARGS(0)); + LOG_WARNING(RSX, "NV4097_NOTIFY: 0x%x", ARGS(0)); } break; case NV4097_WAIT_FOR_IDLE: { if (ARGS(0)) - LOG_WARNING(RSX, "NV4097_WAIT_FOR_IDLE: %x", ARGS(0)); + LOG_WARNING(RSX, "NV4097_WAIT_FOR_IDLE: 0x%x", ARGS(0)); } break; case NV4097_PM_TRIGGER: { if (ARGS(0)) - LOG_WARNING(RSX, "NV4097_PM_TRIGGER: %x", ARGS(0)); + LOG_WARNING(RSX, "NV4097_PM_TRIGGER: 0x%x", ARGS(0)); } break; @@ -458,7 +458,7 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const case NV4097_SET_VERTEX_ATTRIB_INPUT_MASK: { if (ARGS(0)) - LOG_WARNING(RSX, "NV4097_SET_VERTEX_ATTRIB_INPUT_MASK: %x", ARGS(0)); + LOG_WARNING(RSX, "NV4097_SET_VERTEX_ATTRIB_INPUT_MASK: 0x%x", ARGS(0)); //VertexData[0].prog.attributeInputMask = ARGS(0); } @@ -467,7 +467,7 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const case NV4097_SET_VERTEX_ATTRIB_OUTPUT_MASK: { if (ARGS(0)) - LOG_WARNING(RSX, "NV4097_SET_VERTEX_ATTRIB_OUTPUT_MASK: %x", ARGS(0)); + LOG_WARNING(RSX, "NV4097_SET_VERTEX_ATTRIB_OUTPUT_MASK: 0x%x", ARGS(0)); //VertexData[0].prog.attributeOutputMask = ARGS(0); //FragmentData.prog.attributeInputMask = ARGS(0)/* & ~0x20*/; @@ -490,7 +490,7 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const case NV4097_SET_COLOR_MASK_MRT: { if (ARGS(0)) - LOG_WARNING(RSX, "NV4097_SET_COLOR_MASK_MRT: %x", ARGS(0)); + LOG_WARNING(RSX, "NV4097_SET_COLOR_MASK_MRT: 0x%x", ARGS(0)); } break; @@ -829,14 +829,14 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const case NV4097_SET_CLEAR_RECT_HORIZONTAL: { if (ARGS(0)) - LOG_WARNING(RSX, "NV4097_SET_CLEAR_RECT_HORIZONTAL: %x", ARGS(0)); + LOG_WARNING(RSX, "NV4097_SET_CLEAR_RECT_HORIZONTAL: 0x%x", ARGS(0)); } break; case NV4097_SET_CLEAR_RECT_VERTICAL: { if (ARGS(0)) - LOG_WARNING(RSX, "NV4097_SET_CLEAR_RECT_VERTICAL: %x", ARGS(0)); + LOG_WARNING(RSX, "NV4097_SET_CLEAR_RECT_VERTICAL: 0x%x", ARGS(0)); } break; @@ -933,7 +933,7 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const { const u32 a0 = ARGS(0); - //LOG_WARNING(RSX, "NV4097_SET_BEGIN_END: %x", a0); + //LOG_WARNING(RSX, "NV4097_SET_BEGIN_END: 0x%x", a0); m_read_buffer = false; @@ -1066,7 +1066,7 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const case NV4097_INVALIDATE_L2: { if (ARGS(0)) - LOG_WARNING(RSX, "NV4097_INVALIDATE_L2: %x", ARGS(0)); + LOG_WARNING(RSX, "NV4097_INVALIDATE_L2: 0x%x", ARGS(0)); } break; @@ -1085,7 +1085,7 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const case NV4097_INVALIDATE_ZCULL: { if (ARGS(0)) - LOG_WARNING(RSX, "NV4097_INVALIDATE_ZCULL: %x", ARGS(0)); + LOG_WARNING(RSX, "NV4097_INVALIDATE_ZCULL: 0x%x", ARGS(0)); } break; @@ -1249,7 +1249,7 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const case NV4097_SET_SCULL_CONTROL: { if (ARGS(0)) - LOG_WARNING(RSX, "NV4097_SET_SCULL_CONTROL: %x", ARGS(0)); + LOG_WARNING(RSX, "NV4097_SET_SCULL_CONTROL: 0x%x", ARGS(0)); //This is stencil culling , nothing to do with stencil masking on regular color or depth buffer //const u32 a0 = ARGS(0); @@ -1287,7 +1287,7 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const case NV4097_SET_POINT_PARAMS_ENABLE: { if (ARGS(0)) - LOG_ERROR(RSX, "NV4097_SET_POINT_PARAMS_ENABLE: %x", ARGS(0)); + LOG_ERROR(RSX, "NV4097_SET_POINT_PARAMS_ENABLE: 0x%x", ARGS(0)); } break; @@ -1427,7 +1427,7 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const case NV4097_SET_SURFACE_PITCH_D: { if (ARGS(0)) - LOG_WARNING(RSX, "NV4097_SET_SURFACE_PITCH_D: %x", ARGS(0)); + LOG_WARNING(RSX, "NV4097_SET_SURFACE_PITCH_D: 0x%x", ARGS(0)); } break; @@ -1467,7 +1467,7 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const case NV4097_SET_CONTEXT_DMA_COLOR_D: { if (ARGS(0)) - LOG_WARNING(RSX, "NV4097_SET_CONTEXT_DMA_COLOR_D: %x", ARGS(0)); + LOG_WARNING(RSX, "NV4097_SET_CONTEXT_DMA_COLOR_D: 0x%x", ARGS(0)); } break; @@ -1481,14 +1481,14 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const case NV4097_SET_CONTEXT_DMA_SEMAPHORE: { if (ARGS(0)) - LOG_WARNING(RSX, "NV4097_SET_CONTEXT_DMA_SEMAPHORE: %x", ARGS(0)); + LOG_WARNING(RSX, "NV4097_SET_CONTEXT_DMA_SEMAPHORE: 0x%x", ARGS(0)); } break; case NV4097_SET_CONTEXT_DMA_NOTIFIES: { if (ARGS(0)) - LOG_WARNING(RSX, "NV4097_SET_CONTEXT_DMA_NOTIFIES: %x", ARGS(0)); + LOG_WARNING(RSX, "NV4097_SET_CONTEXT_DMA_NOTIFIES: 0x%x", ARGS(0)); } break; @@ -1529,7 +1529,7 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const const u8 alphaToOne = (a0 >> 8) & 0xf; const u16 sampleMask = a0 >> 16; - LOG_WARNING(RSX, "TODO: NV4097_SET_ANTI_ALIASING_CONTROL: %x", a0); + LOG_WARNING(RSX, "TODO: NV4097_SET_ANTI_ALIASING_CONTROL: 0x%x", a0); } break; @@ -1599,7 +1599,7 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const case NV4097_SET_ZCULL_CONTROL0: { if (ARGS(0)) - LOG_WARNING(RSX, "NV4097_SET_ZCULL_CONTROL0: %x", ARGS(0)); + LOG_WARNING(RSX, "NV4097_SET_ZCULL_CONTROL0: 0x%x", ARGS(0)); //m_set_depth_func = true; //m_depth_func = ARGS(0) >> 4; @@ -1609,7 +1609,7 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const case NV4097_SET_ZCULL_CONTROL1: { if (ARGS(0)) - LOG_WARNING(RSX, "NV4097_SET_ZCULL_CONTROL1: %x", ARGS(0)); + LOG_WARNING(RSX, "NV4097_SET_ZCULL_CONTROL1: 0x%x", ARGS(0)); //m_set_depth_func = true; //m_depth_func = ARGS(0) >> 4; @@ -1619,14 +1619,14 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const case NV4097_SET_ZCULL_STATS_ENABLE: { if (ARGS(0)) - LOG_WARNING(RSX, "NV4097_SET_ZCULL_STATS_ENABLE: %x", ARGS(0)); + LOG_WARNING(RSX, "NV4097_SET_ZCULL_STATS_ENABLE: 0x%x", ARGS(0)); } break; case NV4097_ZCULL_SYNC: { if (ARGS(0)) - LOG_WARNING(RSX, "NV4097_ZCULL_SYNC: %x", ARGS(0)); + LOG_WARNING(RSX, "NV4097_ZCULL_SYNC: 0x%x", ARGS(0)); } break; @@ -1745,7 +1745,7 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const { const u32 offset = ARGS(0) & 0xffffff; const u8 mode = ARGS(0) >> 24; - LOG_WARNING(RSX, "NV4097_SET_RENDER_ENABLE: Offset=%06x, Mode=%x", offset, mode); + LOG_WARNING(RSX, "NV4097_SET_RENDER_ENABLE: Offset=0x%06x, Mode=0x%x", offset, mode); } break; @@ -1812,14 +1812,14 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const case NV0039_PITCH_IN: { if (ARGS(0)) - LOG_WARNING(RSX, "NV0039_PITCH_IN: %x", ARGS(0)); + LOG_WARNING(RSX, "NV0039_PITCH_IN: 0x%x", ARGS(0)); } break; case NV0039_BUFFER_NOTIFY: { if (ARGS(0)) - LOG_WARNING(RSX, "NV0039_BUFFER_NOTIFY: %x", ARGS(0)); + LOG_WARNING(RSX, "NV0039_BUFFER_NOTIFY: 0x%x", ARGS(0)); } break; @@ -1848,7 +1848,7 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const case NV309E_SET_CONTEXT_DMA_IMAGE: { if (ARGS(0)) - LOG_WARNING(RSX, "NV309E_SET_CONTEXT_DMA_IMAGE: %x", ARGS(0)); + LOG_WARNING(RSX, "NV309E_SET_CONTEXT_DMA_IMAGE: 0x%x", ARGS(0)); } break; diff --git a/rpcs3/Emu/SysCalls/Modules/cellL10n.cpp b/rpcs3/Emu/SysCalls/Modules/cellL10n.cpp index ef71786077..6c06746ebb 100644 --- a/rpcs3/Emu/SysCalls/Modules/cellL10n.cpp +++ b/rpcs3/Emu/SysCalls/Modules/cellL10n.cpp @@ -283,9 +283,9 @@ int _L10nConvertStr(int src_code, const void* src, size_t * src_len, int dst_cod //TODO: Check the code in emulation. If support for UTF8/UTF16/UTF32/UCS2/UCS4 should use wider chars.. awful. int L10nConvertStr(int src_code, vm::ptr src, vm::ptr> src_len, int dst_code, vm::ptr dst, vm::ptr> dst_len) { - cellL10n->Todo("L10nConvertStr(src_code=%d,src=0x%x,src_len=%ld,dst_code=%d,dst=0x%x,dst_len=%ld)", + cellL10n->Error("L10nConvertStr(src_code=%d, srca_addr=0x%x, src_len_addr=0x%x, dst_code=%d, dst_addr=0x%x, dst_len_addr=0x%x)", src_code, src.addr(), src_len.addr(), dst_code, dst.addr(), dst_len.addr()); - cellL10n->Todo("L10nConvertStr: 1st char at dst: %x(Hex)", *((char*)src.get_ptr())); + //cellL10n->Todo("L10nConvertStr: 1st char at dst: 0x%x", *((char*)src.get_ptr())); #ifdef _MSC_VER unsigned int srcCode = 0, dstCode = 0; //OEM code pages bool src_page_converted = _L10nCodeParse(src_code, srcCode); //Check if code is in list. diff --git a/rpcs3/Emu/SysCalls/Modules/cellNetCtl.cpp b/rpcs3/Emu/SysCalls/Modules/cellNetCtl.cpp index 995b633b96..389ae23c34 100644 --- a/rpcs3/Emu/SysCalls/Modules/cellNetCtl.cpp +++ b/rpcs3/Emu/SysCalls/Modules/cellNetCtl.cpp @@ -46,7 +46,7 @@ int cellNetCtlTerm() int cellNetCtlGetState(vm::ptr> state) { - cellNetCtl->Log("cellNetCtlGetState(state_addr=0x%x)", state.addr()); + cellNetCtl->Warning("cellNetCtlGetState(state_addr=0x%x)", state.addr()); *state = CELL_NET_CTL_STATE_Disconnected; // TODO: Allow other states @@ -55,21 +55,21 @@ int cellNetCtlGetState(vm::ptr> state) int cellNetCtlAddHandler(vm::ptr handler, vm::ptr> arg, s32 hid) { - cellNetCtl->Todo("cellNetCtlAddHandler(handler_addr=0x%x, arg_addr=0x%x, hid=%x)", handler.addr(), arg.addr(), hid); + cellNetCtl->Todo("cellNetCtlAddHandler(handler_addr=0x%x, arg_addr=0x%x, hid=0x%x)", handler.addr(), arg.addr(), hid); return CELL_OK; } int cellNetCtlDelHandler(s32 hid) { - cellNetCtl->Todo("cellNetCtlDelHandler(hid=%x)", hid); + cellNetCtl->Todo("cellNetCtlDelHandler(hid=0x%x)", hid); return CELL_OK; } int cellNetCtlGetInfo(s32 code, vm::ptr info) { - cellNetCtl->Todo("cellNetCtlGetInfo(code=%x, info_addr=0x%x)", code, info.addr()); + cellNetCtl->Todo("cellNetCtlGetInfo(code=0x%x, info_addr=0x%x)", code, info.addr()); return CELL_OK; } diff --git a/rpcs3/Emu/SysCalls/Modules/cellPamf.cpp b/rpcs3/Emu/SysCalls/Modules/cellPamf.cpp index e06df6d5dd..ae5095c809 100644 --- a/rpcs3/Emu/SysCalls/Modules/cellPamf.cpp +++ b/rpcs3/Emu/SysCalls/Modules/cellPamf.cpp @@ -105,7 +105,7 @@ u8 pamfGetStreamChannel(vm::ptr pSelf, u8 stream) } else { - cellPamf->Error("pamfGetStreamChannel: stream type %x got invalid stream id=%x", pAddr->stream_headers[stream].type, pAddr->stream_headers[stream].stream_id); + cellPamf->Error("pamfGetStreamChannel: stream type 0x%x got invalid stream id=0x%x", pAddr->stream_headers[stream].type, pAddr->stream_headers[stream].stream_id); return 0; } case 0xdc: diff --git a/rpcs3/Loader/ELF32.cpp b/rpcs3/Loader/ELF32.cpp index 03517368e9..430ae52f32 100644 --- a/rpcs3/Loader/ELF32.cpp +++ b/rpcs3/Loader/ELF32.cpp @@ -155,16 +155,16 @@ void Elf32_Shdr::LoadLE(vfsStream& f) void Elf32_Shdr::Show() { #ifdef LOADER_DEBUG - LOG_NOTICE(LOADER, "Name offset: %x", sh_name); - LOG_NOTICE(LOADER, "Type: %d", sh_type); - LOG_NOTICE(LOADER, "Addr: %x", sh_addr); - LOG_NOTICE(LOADER, "Offset: %x", sh_offset); - LOG_NOTICE(LOADER, "Size: %x", sh_size); + LOG_NOTICE(LOADER, "Name offset: 0x%x", sh_name); + LOG_NOTICE(LOADER, "Type: 0x%d", sh_type); + LOG_NOTICE(LOADER, "Addr: 0x%x", sh_addr); + LOG_NOTICE(LOADER, "Offset: 0x%x", sh_offset); + LOG_NOTICE(LOADER, "Size: 0x%x", sh_size); LOG_NOTICE(LOADER, "EntSize: %d", sh_entsize); - LOG_NOTICE(LOADER, "Flags: %x", sh_flags); - LOG_NOTICE(LOADER, "Link: %x", sh_link); + LOG_NOTICE(LOADER, "Flags: 0x%x", sh_flags); + LOG_NOTICE(LOADER, "Link: 0x%x", sh_link); LOG_NOTICE(LOADER, "Info: %d", sh_info); - LOG_NOTICE(LOADER, "Address align: %x", sh_addralign); + LOG_NOTICE(LOADER, "Address align: 0x%x", sh_addralign); #endif } diff --git a/rpcs3/Loader/ELF64.cpp b/rpcs3/Loader/ELF64.cpp index 141d5b5031..b8a917b6e7 100644 --- a/rpcs3/Loader/ELF64.cpp +++ b/rpcs3/Loader/ELF64.cpp @@ -77,16 +77,16 @@ void Elf64_Shdr::Load(vfsStream& f) void Elf64_Shdr::Show() { #ifdef LOADER_DEBUG - LOG_NOTICE(LOADER, "Name offset: %x", sh_name); + LOG_NOTICE(LOADER, "Name offset: 0x%x", sh_name); LOG_NOTICE(LOADER, "Type: %d", sh_type); - LOG_NOTICE(LOADER, "Addr: %llx", sh_addr); - LOG_NOTICE(LOADER, "Offset: %llx", sh_offset); - LOG_NOTICE(LOADER, "Size: %llx", sh_size); + LOG_NOTICE(LOADER, "Addr: 0x%llx", sh_addr); + LOG_NOTICE(LOADER, "Offset: 0x%llx", sh_offset); + LOG_NOTICE(LOADER, "Size: 0x%llx", sh_size); LOG_NOTICE(LOADER, "EntSize: %lld", sh_entsize); - LOG_NOTICE(LOADER, "Flags: %llx", sh_flags); - LOG_NOTICE(LOADER, "Link: %x", sh_link); - LOG_NOTICE(LOADER, "Info: %x", sh_info); - LOG_NOTICE(LOADER, "Address align: %llx", sh_addralign); + LOG_NOTICE(LOADER, "Flags: 0x%llx", sh_flags); + LOG_NOTICE(LOADER, "Link: 0x%x", sh_link); + LOG_NOTICE(LOADER, "Info: 0x%x", sh_info); + LOG_NOTICE(LOADER, "Address align: 0x%llx", sh_addralign); #endif } diff --git a/rpcs3/Loader/Loader.cpp b/rpcs3/Loader/Loader.cpp index d06511889e..ed804f1f40 100644 --- a/rpcs3/Loader/Loader.cpp +++ b/rpcs3/Loader/Loader.cpp @@ -35,7 +35,7 @@ const std::string Ehdr_OS_ABIToString(const u8 os_abi) case 0x66: return "Cell OS LV-2"; }; - return fmt::Format("Unknown (%x)", os_abi); + return fmt::Format("Unknown (0x%x)", os_abi); } const std::string Ehdr_MachineToString(const u16 machine) @@ -48,7 +48,7 @@ const std::string Ehdr_MachineToString(const u16 machine) case MACHINE_ARM: return "ARM"; }; - return fmt::Format("Unknown (%x)", machine); + return fmt::Format("Unknown (0x%x)", machine); } const std::string Phdr_FlagsToString(u32 flags) @@ -73,7 +73,7 @@ const std::string Phdr_FlagsToString(u32 flags) flags &= ~spu << 0x14; flags &= ~rsx << 0x18; - if(flags != 0) return fmt::Format("Unknown %s PPU[%x] SPU[%x] RSX[%x]", ret.c_str(), ppu, spu, rsx); + if(flags != 0) return fmt::Format("Unknown %s PPU[0x%x] SPU[0x%x] RSX[0x%x]", ret.c_str(), ppu, spu, rsx); ret += "PPU[" + FLAGS_TO_STRING(ppu) + "] "; ret += "SPU[" + FLAGS_TO_STRING(spu) + "] "; @@ -93,7 +93,7 @@ const std::string Phdr_TypeToString(const u32 type) case 0x60000002: return "LOOS+2"; }; - return fmt::Format("Unknown (%x)", type); + return fmt::Format("Unknown (0x%x)", type); } Loader::Loader() diff --git a/rpcs3/Loader/PSF.cpp b/rpcs3/Loader/PSF.cpp index 9f9813a950..6bf66f4378 100644 --- a/rpcs3/Loader/PSF.cpp +++ b/rpcs3/Loader/PSF.cpp @@ -44,7 +44,7 @@ bool PSFLoader::LoadHeader() if(!m_header.CheckMagic()) return false; - if(m_show_log) LOG_NOTICE(LOADER, "PSF version: %x", m_header.psf_version); + if(m_show_log) LOG_NOTICE(LOADER, "PSF version: 0x%x", m_header.psf_version); m_psfindxs.clear(); m_entries.clear(); diff --git a/rpcs3/Loader/TRP.cpp b/rpcs3/Loader/TRP.cpp index 8f3e55c4ab..6c02e4221a 100644 --- a/rpcs3/Loader/TRP.cpp +++ b/rpcs3/Loader/TRP.cpp @@ -51,7 +51,7 @@ bool TRPLoader::LoadHeader(bool show) return false; if (show) - LOG_NOTICE(LOADER, "TRP version: %x", m_header.trp_version); + LOG_NOTICE(LOADER, "TRP version: 0x%x", m_header.trp_version); m_entries.clear(); m_entries.resize(m_header.trp_files_count);