From a0130ff89648806c7e04b2098cac66082e85e421 Mon Sep 17 00:00:00 2001 From: zilmar Date: Thu, 16 Nov 2023 09:03:32 +1030 Subject: [PATCH] Core: Convert %I64U to %llx --- Source/Project64-core/N64System/Mips/Register.cpp | 2 +- Source/Project64-core/N64System/Mips/TLB.cpp | 4 ++-- Source/Project64-core/N64System/N64Rom.cpp | 2 +- .../Project64/UserInterface/Debugger/Debugger-TLB.cpp | 10 +++++----- Source/Project64/UserInterface/Debugger/Symbols.cpp | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Source/Project64-core/N64System/Mips/Register.cpp b/Source/Project64-core/N64System/Mips/Register.cpp index 4d4c552a1..8a8980b51 100644 --- a/Source/Project64-core/N64System/Mips/Register.cpp +++ b/Source/Project64-core/N64System/Mips/Register.cpp @@ -541,7 +541,7 @@ void CRegisters::Cop0_MT(COP0Reg Reg, uint64_t Value) { if (LogCP0changes() && Reg <= COP0Reg_31) { - LogMessage("%08X: Writing 0x%I64U to %s register (originally: 0x%I64U)", m_PROGRAM_COUNTER, Value, CRegName::Cop0[Reg], m_CP0[Reg]); + LogMessage("%08X: Writing 0x%llX to %s register (originally: 0x%llX)", m_PROGRAM_COUNTER, Value, CRegName::Cop0[Reg], m_CP0[Reg]); if (Reg == 11) // Compare { LogMessage("%08X: Cause register changed from %08X to %08X", m_PROGRAM_COUNTER, (uint32_t)CAUSE_REGISTER.Value, (uint32_t)(g_Reg->CAUSE_REGISTER.Value & ~CAUSE_IP7)); diff --git a/Source/Project64-core/N64System/Mips/TLB.cpp b/Source/Project64-core/N64System/Mips/TLB.cpp index 4f9cf4740..337f5da77 100644 --- a/Source/Project64-core/N64System/Mips/TLB.cpp +++ b/Source/Project64-core/N64System/Mips/TLB.cpp @@ -125,7 +125,7 @@ void CTLB::ReadEntry() void CTLB::WriteEntry(uint32_t Index, bool Random) { - WriteTrace(TraceTLB, TraceDebug, "%02d %d %I64X %I64X %I64X %I64X", Index, Random, m_Reg.PAGE_MASK_REGISTER, m_Reg.ENTRYHI_REGISTER, m_Reg.ENTRYLO0_REGISTER, m_Reg.ENTRYLO1_REGISTER); + WriteTrace(TraceTLB, TraceDebug, "%02d %d %llX %llX %llX %llX", Index, Random, m_Reg.PAGE_MASK_REGISTER, m_Reg.ENTRYHI_REGISTER, m_Reg.ENTRYLO0_REGISTER, m_Reg.ENTRYLO1_REGISTER); // Check to see if entry is unmapping itself if (m_tlb[Index].EntryDefined) @@ -135,7 +135,7 @@ void CTLB::WriteEntry(uint32_t Index, bool Random) m_Reg.m_PROGRAM_COUNTER < m_FastTlb[FastIndx].VEND && m_FastTlb[FastIndx].ValidEntry && m_FastTlb[FastIndx].VALID) { - WriteTrace(TraceTLB, TraceDebug, "Ignored PC: %X VAddr Start: %I64X VEND: %I64X", m_Reg.m_PROGRAM_COUNTER, m_FastTlb[FastIndx].VSTART, m_FastTlb[FastIndx].VEND); + WriteTrace(TraceTLB, TraceDebug, "Ignored PC: %X VAddr Start: %llX VEND: %llX", m_Reg.m_PROGRAM_COUNTER, m_FastTlb[FastIndx].VSTART, m_FastTlb[FastIndx].VEND); return; } if (m_Reg.m_PROGRAM_COUNTER >= m_FastTlb[FastIndx + 1].VSTART && diff --git a/Source/Project64-core/N64System/N64Rom.cpp b/Source/Project64-core/N64System/N64Rom.cpp index 8d7c304ef..8bdcdff99 100644 --- a/Source/Project64-core/N64System/N64Rom.cpp +++ b/Source/Project64-core/N64System/N64Rom.cpp @@ -327,7 +327,7 @@ void CN64Rom::CalculateCicChip() { if (HaveDebugger()) { - g_Notify->DisplayError(stdstr_f("Unknown CIC checksum:\n%I64X.", CRC).c_str()); + g_Notify->DisplayError(stdstr_f("Unknown CIC checksum:\n%llX.", CRC).c_str()); } } } diff --git a/Source/Project64/UserInterface/Debugger/Debugger-TLB.cpp b/Source/Project64/UserInterface/Debugger/Debugger-TLB.cpp index bc17d2b04..1fc66be7d 100644 --- a/Source/Project64/UserInterface/Debugger/Debugger-TLB.cpp +++ b/Source/Project64/UserInterface/Debugger/Debugger-TLB.cpp @@ -139,7 +139,7 @@ void CDebugTlb::RefreshTLBWindow(void) } if (tlb[count].EntryDefined) { - swprintf(Output, sizeof(Output), L"0x%I64X", tlb[count].PageMask.Value); + swprintf(Output, sizeof(Output), L"0x%llX", tlb[count].PageMask.Value); } else { @@ -155,7 +155,7 @@ void CDebugTlb::RefreshTLBWindow(void) if (tlb[count].EntryDefined) { - swprintf(Output, sizeof(Output), L"0x%I64X", tlb[count].EntryHi.Value); + swprintf(Output, sizeof(Output), L"0x%llX", tlb[count].EntryHi.Value); } else { @@ -171,7 +171,7 @@ void CDebugTlb::RefreshTLBWindow(void) if (tlb[count].EntryDefined) { - swprintf(Output, sizeof(Output), L"0x%I64X", tlb[count].EntryLo0.Value); + swprintf(Output, sizeof(Output), L"0x%llX", tlb[count].EntryLo0.Value); } else { @@ -187,7 +187,7 @@ void CDebugTlb::RefreshTLBWindow(void) if (tlb[count].EntryDefined) { - swprintf(Output, sizeof(Output), L"0x%I64X", tlb[count].EntryLo1.Value); + swprintf(Output, sizeof(Output), L"0x%llX", tlb[count].EntryLo1.Value); } else { @@ -265,7 +265,7 @@ void CDebugTlb::RefreshTLBWindow(void) if (FastTlb[count].ValidEntry && FastTlb[count].VALID) { - swprintf(Output, sizeof(Output), L"%I64X:%I64X -> %08X:%08X", FastTlb[count].VSTART, FastTlb[count].VEND, + swprintf(Output, sizeof(Output), L"%llX:%llX -> %08X:%08X", FastTlb[count].VSTART, FastTlb[count].VEND, FastTlb[count].PHYSSTART, FastTlb[count].PHYSEND); } else diff --git a/Source/Project64/UserInterface/Debugger/Symbols.cpp b/Source/Project64/UserInterface/Debugger/Symbols.cpp index 9dfb4e3ce..e6796f96c 100644 --- a/Source/Project64/UserInterface/Debugger/Symbols.cpp +++ b/Source/Project64/UserInterface/Debugger/Symbols.cpp @@ -330,7 +330,7 @@ void CSymbolTable::GetValueString(char * dst, CSymbol * symbol) break; case SYM_U64: m_Debugger->DebugLoad_VAddr(address, value.u64); - sprintf(dst, "%I64u", value.u64); + sprintf(dst, "%lld", value.u64); break; case SYM_S8: m_Debugger->DebugLoad_VAddr(address, value.s8);