From 850deed6c1209b2b17ac5a4ac163fdaa4647309f Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Tue, 12 Apr 2022 21:54:30 +1000 Subject: [PATCH] HwRegs: Swap wxString desc() for std::string --- pcsx2/Dmac.h | 57 +++++++++++++++++++--------------------- pcsx2/Gif.h | 18 +++++++------ pcsx2/IPU/IPU.h | 8 +++--- pcsx2/IPU/IPU_Fifo.cpp | 8 +++--- pcsx2/IPU/IPU_Fifo.h | 12 ++++----- pcsx2/IopHw.h | 6 +++-- pcsx2/Sif0.cpp | 2 +- pcsx2/Sif1.cpp | 4 +-- pcsx2/System.h | 4 +++ pcsx2/VUmicro.h | 10 +++---- pcsx2/Vif.h | 8 +++--- pcsx2/ps2/LegacyDmac.cpp | 8 +++--- pcsx2/sif2.cpp | 2 +- 13 files changed, 77 insertions(+), 70 deletions(-) diff --git a/pcsx2/Dmac.h b/pcsx2/Dmac.h index bfa4519ffa..084edd5ac7 100644 --- a/pcsx2/Dmac.h +++ b/pcsx2/Dmac.h @@ -15,6 +15,8 @@ #pragma once +#include "common/StringUtil.h" + // Useful enums for some of the fields. enum pce_values { @@ -97,19 +99,19 @@ union tDMA_TAG { tDMA_TAG(u32 val) { _u32 = val; } u16 upper() const { return (_u32 >> 16); } u16 lower() const { return (u16)_u32; } - wxString tag_to_str() const + std::string tag_to_str() const { switch(ID) { - case TAG_REFE: return wxsFormat(L"REFE %08X", _u32); break; - case TAG_CNT: return L"CNT"; break; - case TAG_NEXT: return wxsFormat(L"NEXT %08X", _u32); break; - case TAG_REF: return wxsFormat(L"REF %08X", _u32); break; - case TAG_REFS: return wxsFormat(L"REFS %08X", _u32); break; - case TAG_CALL: return L"CALL"; break; - case TAG_RET: return L"RET"; break; - case TAG_END: return L"END"; break; - default: return L"????"; break; + case TAG_REFE: return StringUtil::StdStringFromFormat("REFE %08X", _u32); + case TAG_CNT: return "CNT"; + case TAG_NEXT: return StringUtil::StdStringFromFormat("NEXT %08X", _u32); + case TAG_REF: return StringUtil::StdStringFromFormat("REF %08X", _u32); + case TAG_REFS: return StringUtil::StdStringFromFormat("REFS %08X", _u32); + case TAG_CALL: return "CALL"; + case TAG_RET: return "RET"; + case TAG_END: return "END"; + default: return "????"; } } void reset() { _u32 = 0; } @@ -139,7 +141,7 @@ union tDMA_CHCR { void reset() { _u32 = 0; } u16 upper() const { return (_u32 >> 16); } u16 lower() const { return (u16)_u32; } - wxString desc() const { return wxsFormat(L"Chcr: 0x%x", _u32); } + std::string desc() const { return StringUtil::StdStringFromFormat("Chcr: 0x%x", _u32); } tDMA_TAG tag() { return (tDMA_TAG)_u32; } }; @@ -155,7 +157,7 @@ union tDMA_SADR { tDMA_SADR(u32 val) { _u32 = val; } void reset() { _u32 = 0; } - wxString desc() const { return wxsFormat(L"Sadr: 0x%x", _u32); } + std::string desc() const { return StringUtil::StdStringFromFormat("Sadr: 0x%x", _u32); } tDMA_TAG tag() const { return (tDMA_TAG)_u32; } }; @@ -168,7 +170,7 @@ union tDMA_QWC { tDMA_QWC(u32 val) { _u32 = val; } void reset() { _u32 = 0; } - wxString desc() const { return wxsFormat(L"QWC: 0x%04x", QWC); } + std::string desc() const { return StringUtil::StdStringFromFormat("QWC: 0x%04x", QWC); } tDMA_TAG tag() const { return (tDMA_TAG)_u32; } }; @@ -203,8 +205,8 @@ struct DMACh { tDMA_TAG *DMAtransfer(u32 addr, u32 num); tDMA_TAG dma_tag(); - wxString cmq_to_str() const; - wxString cmqt_to_str() const; + std::string cmq_to_str() const; + std::string cmqt_to_str() const; }; enum INTCIrqs @@ -337,7 +339,7 @@ union tDMAC_CTRL { void set_flags(u32 flags) { _u32 |= flags; } void clear_flags(u32 flags) { _u32 &= ~flags; } void reset() { _u32 = 0; } - wxString desc() const { return wxsFormat(L"Ctrl: 0x%x", _u32); } + std::string desc() const { return StringUtil::StdStringFromFormat("Ctrl: 0x%x", _u32); } }; union tDMAC_STAT { @@ -362,7 +364,7 @@ union tDMAC_STAT { void set_flags(u32 flags) { _u32 |= flags; } void clear_flags(u32 flags) { _u32 &= ~flags; } void reset() { _u32 = 0; } - wxString desc() const { return wxsFormat(L"Stat: 0x%x", _u32); } + std::string desc() const { return StringUtil::StdStringFromFormat("Stat: 0x%x", _u32); } bool TestForInterrupt() const { @@ -386,7 +388,7 @@ union tDMAC_PCR { void set_flags(u32 flags) { _u32 |= flags; } void clear_flags(u32 flags) { _u32 &= ~flags; } void reset() { _u32 = 0; } - wxString desc() const { return wxsFormat(L"Pcr: 0x%x", _u32); } + std::string desc() const { return StringUtil::StdStringFromFormat("Pcr: 0x%x", _u32); } }; union tDMAC_SQWC { @@ -404,7 +406,7 @@ union tDMAC_SQWC { void set_flags(u32 flags) { _u32 |= flags; } void clear_flags(u32 flags) { _u32 &= ~flags; } void reset() { _u32 = 0; } - wxString desc() const { return wxsFormat(L"Sqwc: 0x%x", _u32); } + std::string desc() const { return StringUtil::StdStringFromFormat("Sqwc: 0x%x", _u32); } }; union tDMAC_RBSR { @@ -417,7 +419,7 @@ union tDMAC_RBSR { tDMAC_RBSR(u32 val) { _u32 = val; } void reset() { _u32 = 0; } - wxString desc() const { return wxsFormat(L"Rbsr: 0x%x", _u32); } + std::string desc() const { return StringUtil::StdStringFromFormat("Rbsr: 0x%x", _u32); } }; union tDMAC_RBOR { @@ -430,7 +432,7 @@ union tDMAC_RBOR { tDMAC_RBOR(u32 val) { _u32 = val; } void reset() { _u32 = 0; } - wxString desc() const { return wxsFormat(L"Rbor: 0x%x", _u32); } + std::string desc() const { return StringUtil::StdStringFromFormat("Rbor: 0x%x", _u32); } }; // -------------------------------------------------------------------------------------- @@ -465,14 +467,9 @@ union tDMAC_ADDR if (SPR) ADDR &= (Ps2MemSize::Scratch-1); } - wxString ToString(bool sprIsValid=true) const + std::string ToString(bool sprIsValid=true) const { - return pxsFmt((sprIsValid && SPR) ? L"0x%04X(SPR)" : L"0x%08X", ADDR); - } - - wxCharBuffer ToUTF8(bool sprIsValid=true) const - { - return FastFormatAscii().Write((sprIsValid && SPR) ? "0x%04X(SPR)" : "0x%08X", ADDR).c_str(); + return StringUtil::StdStringFromFormat((sprIsValid && SPR) ? "0x%04X(SPR)" : "0x%08X", ADDR); } }; @@ -509,7 +506,7 @@ union tINTC_STAT { void set_flags(u32 flags) { _u32 |= flags; } void clear_flags(u32 flags) { _u32 &= ~flags; } void reset() { _u32 = 0; } - wxString desc() const { return wxsFormat(L"Stat: 0x%x", _u32); } + std::string desc() const { return StringUtil::StdStringFromFormat("Stat: 0x%x", _u32); } }; union tINTC_MASK { @@ -525,7 +522,7 @@ union tINTC_MASK { void set_flags(u32 flags) { _u32 |= flags; } void clear_flags(u32 flags) { _u32 &= ~flags; } void reset() { _u32 = 0; } - wxString desc() const { return wxsFormat(L"Mask: 0x%x", _u32); } + std::string desc() const { return StringUtil::StdStringFromFormat("Mask: 0x%x", _u32); } }; struct INTCregisters diff --git a/pcsx2/Gif.h b/pcsx2/Gif.h index 855632c6aa..4873cdfdc6 100644 --- a/pcsx2/Gif.h +++ b/pcsx2/Gif.h @@ -15,6 +15,8 @@ #pragma once +#include "common/StringUtil.h" + #define COPY_GS_PACKET_TO_MTGS 0 #define PRINT_GIF_PACKET 0 @@ -107,7 +109,7 @@ union tGIF_CTRL void set_flags(u32 flags) { _u32 |= flags; } void clear_flags(u32 flags) { _u32 &= ~flags; } void reset() { _u32 = 0; } - wxString desc() { return wxsFormat(L"Ctrl: 0x%x", _u32); } + std::string desc() { return StringUtil::StdStringFromFormat("Ctrl: 0x%x", _u32); } }; union tGIF_MODE @@ -127,7 +129,7 @@ union tGIF_MODE void set_flags(u32 flags) { _u32 |= flags; } void clear_flags(u32 flags) { _u32 &= ~flags; } void reset() { _u32 = 0; } - wxString desc() { return wxsFormat(L"Mode: 0x%x", _u32); } + std::string desc() { return StringUtil::StdStringFromFormat("Mode: 0x%x", _u32); } }; union tGIF_STAT @@ -158,7 +160,7 @@ union tGIF_STAT void set_flags(u32 flags) { _u32 |= flags; } void clear_flags(u32 flags) { _u32 &= ~flags; } void reset() { _u32 = 0; } - wxString desc() { return wxsFormat(L"Stat: 0x%x", _u32); } + std::string desc() { return StringUtil::StdStringFromFormat("Stat: 0x%x", _u32); } }; union tGIF_TAG0 @@ -176,7 +178,7 @@ union tGIF_TAG0 void set_flags(u32 flags) { _u32 |= flags; } void clear_flags(u32 flags) { _u32 &= ~flags; } void reset() { _u32 = 0; } - wxString desc() { return wxsFormat(L"Tag0: 0x%x", _u32); } + std::string desc() { return StringUtil::StdStringFromFormat("Tag0: 0x%x", _u32); } }; union tGIF_TAG1 @@ -196,7 +198,7 @@ union tGIF_TAG1 void set_flags(u32 flags) { _u32 |= flags; } void clear_flags(u32 flags) { _u32 &= ~flags; } void reset() { _u32 = 0; } - wxString desc() { return wxsFormat(L"Tag1: 0x%x", _u32); } + std::string desc() { return StringUtil::StdStringFromFormat("Tag1: 0x%x", _u32); } }; union tGIF_CNT @@ -217,7 +219,7 @@ union tGIF_CNT void set_flags(u32 flags) { _u32 |= flags; } void clear_flags(u32 flags) { _u32 &= ~flags; } void reset() { _u32 = 0; } - wxString desc() { return wxsFormat(L"CNT: 0x%x", _u32); } + std::string desc() { return StringUtil::StdStringFromFormat("CNT: 0x%x", _u32); } }; union tGIF_P3CNT @@ -231,7 +233,7 @@ union tGIF_P3CNT tGIF_P3CNT(u32 val) { _u32 = val; } void reset() { _u32 = 0; } - wxString desc() { return wxsFormat(L"P3CNT: 0x%x", _u32); } + std::string desc() { return StringUtil::StdStringFromFormat("P3CNT: 0x%x", _u32); } }; union tGIF_P3TAG @@ -249,7 +251,7 @@ union tGIF_P3TAG void set_flags(u32 flags) { _u32 |= flags; } void clear_flags(u32 flags) { _u32 &= ~flags; } void reset() { _u32 = 0; } - wxString desc() { return wxsFormat(L"P3Tag: 0x%x", _u32); } + std::string desc() { return StringUtil::StdStringFromFormat("P3Tag: 0x%x", _u32); } }; struct GIFregisters diff --git a/pcsx2/IPU/IPU.h b/pcsx2/IPU/IPU.h index 0d5e33c4c1..626990d52c 100644 --- a/pcsx2/IPU/IPU.h +++ b/pcsx2/IPU/IPU.h @@ -140,9 +140,9 @@ struct alignas(16) tIPU_BP { return true; } - wxString desc() const + std::string desc() const { - return wxsFormat(L"Ipu BP: bp = 0x%x, IFC = 0x%x, FP = 0x%x.", BP, IFC, FP); + return StringUtil::StdStringFromFormat("Ipu BP: bp = 0x%x, IFC = 0x%x, FP = 0x%x.", BP, IFC, FP); } }; @@ -277,9 +277,9 @@ union tIPU_cmd u128 _u128[2]; void clear(); - wxString desc() const + std::string desc() const { - return pxsFmt(L"Ipu cmd: index = 0x%x, current = 0x%x, pos[0] = 0x%x, pos[1] = 0x%x", + return StringUtil::StdStringFromFormat("Ipu cmd: index = 0x%x, current = 0x%x, pos[0] = 0x%x, pos[1] = 0x%x", index, current, pos[0], pos[1]); } }; diff --git a/pcsx2/IPU/IPU_Fifo.cpp b/pcsx2/IPU/IPU_Fifo.cpp index e2f961515b..326ce3f5c6 100644 --- a/pcsx2/IPU/IPU_Fifo.cpp +++ b/pcsx2/IPU/IPU_Fifo.cpp @@ -61,14 +61,14 @@ void IPU_Fifo::clear() out.clear(); } -wxString IPU_Fifo_Input::desc() const +std::string IPU_Fifo_Input::desc() const { - return wxsFormat(L"IPU Fifo Input: readpos = 0x%x, writepos = 0x%x, data = 0x%x", readpos, writepos, data); + return StringUtil::StdStringFromFormat("IPU Fifo Input: readpos = 0x%x, writepos = 0x%x, data = 0x%x", readpos, writepos, data); } -wxString IPU_Fifo_Output::desc() const +std::string IPU_Fifo_Output::desc() const { - return wxsFormat(L"IPU Fifo Output: readpos = 0x%x, writepos = 0x%x, data = 0x%x", readpos, writepos, data); + return StringUtil::StdStringFromFormat("IPU Fifo Output: readpos = 0x%x, writepos = 0x%x, data = 0x%x", readpos, writepos, data); } int IPU_Fifo_Input::write(u32* pMem, int size) diff --git a/pcsx2/IPU/IPU_Fifo.h b/pcsx2/IPU/IPU_Fifo.h index 54b0dc019b..119a2f416b 100644 --- a/pcsx2/IPU/IPU_Fifo.h +++ b/pcsx2/IPU/IPU_Fifo.h @@ -13,8 +13,10 @@ * If not, see . */ -#ifndef IPU_FIFO_H_INCLUDED -#define IPU_FIFO_H_INCLUDED +#pragma once + +#include "common/Pcsx2Defs.h" +#include // Important! All FIFO containers in this header should be 'struct' type, not class type. // They are saved into the savestate as-is, and keeping them as struct ensures that the @@ -28,7 +30,7 @@ struct IPU_Fifo_Input int write(u32* pMem, int size); int read(void *value); void clear(); - wxString desc() const; + std::string desc() const; }; struct IPU_Fifo_Output @@ -40,7 +42,7 @@ struct IPU_Fifo_Output int write(const u32 * value, uint size); void read(void *value, uint size); void clear(); - wxString desc() const; + std::string desc() const; }; struct IPU_Fifo @@ -53,5 +55,3 @@ struct IPU_Fifo }; alignas(16) extern IPU_Fifo ipu_fifo; - -#endif // IPU_FIFO_H_INCLUDED diff --git a/pcsx2/IopHw.h b/pcsx2/IopHw.h index 58e83ad628..7b434fddab 100644 --- a/pcsx2/IopHw.h +++ b/pcsx2/IopHw.h @@ -17,6 +17,8 @@ #include "IopMem.h" +#include "common/StringUtil.h" + static const u32 HW_PS1_GPU_START = 0x1F8010A0, HW_PS1_GPU_END = 0x1F8010B0, @@ -208,7 +210,7 @@ struct dma_mbc { return (bcr >> 16); } - wxString desc() const { return wxsFormat(L"madr: 0x%x bcr: 0x%x chcr: 0x%x", madr, bcr, chcr); } + std::string desc() const { return StringUtil::StdStringFromFormat("madr: 0x%x bcr: 0x%x chcr: 0x%x", madr, bcr, chcr); } }; struct dma_mbct @@ -226,7 +228,7 @@ struct dma_mbct { return (bcr >> 16); } - wxString desc() const { return wxsFormat(L"madr: 0x%x bcr: 0x%x chcr: 0x%x tadr: 0x%x", madr, bcr, chcr, tadr); } + std::string desc() const { return StringUtil::StdStringFromFormat("madr: 0x%x bcr: 0x%x chcr: 0x%x tadr: 0x%x", madr, bcr, chcr, tadr); } }; static dma_mbc& hw_dma0 = (dma_mbc&) iopHw[0x1080]; diff --git a/pcsx2/Sif0.cpp b/pcsx2/Sif0.cpp index fc3f2c87ca..51915e5d94 100644 --- a/pcsx2/Sif0.cpp +++ b/pcsx2/Sif0.cpp @@ -355,7 +355,7 @@ __fi void EEsif0Interrupt() __fi void dmaSIF0() { - SIF_LOG(wxString(L"dmaSIF0" + sif0ch.cmqt_to_str()).To8BitData()); + SIF_LOG("dmaSIF0 %s", sif0ch.cmqt_to_str().c_str()); if (sif0.fifo.readPos != sif0.fifo.writePos) { diff --git a/pcsx2/Sif1.cpp b/pcsx2/Sif1.cpp index 02e258b241..b0cf750489 100644 --- a/pcsx2/Sif1.cpp +++ b/pcsx2/Sif1.cpp @@ -102,7 +102,7 @@ static __fi bool ProcessEETag() sif1.fifo.write((u32*)ptag + 2, 2); } - SIF_LOG(wxString(ptag->tag_to_str()).To8BitData()); + SIF_LOG("%s", ptag->tag_to_str().c_str()); sif1ch.madr = ptag[1]._u32; sif1.ee.end = hwDmacSrcChain(sif1ch, ptag->ID); @@ -331,7 +331,7 @@ __fi void EEsif1Interrupt() // Main difference is this checks for iop, where psxDma10 checks for ee. __fi void dmaSIF1() { - SIF_LOG(wxString(L"dmaSIF1" + sif1ch.cmqt_to_str()).To8BitData()); + SIF_LOG("dmaSIF1 %s", sif1ch.cmqt_to_str().c_str()); if (sif1.fifo.readPos != sif1.fifo.writePos) { diff --git a/pcsx2/System.h b/pcsx2/System.h index 0a32ebf402..293baa6691 100644 --- a/pcsx2/System.h +++ b/pcsx2/System.h @@ -187,6 +187,9 @@ extern SysMainMemory& GetVmMemory(); // responded to the prompt. // +#ifndef PCSX2_CORE +#include + namespace Msgbox { extern bool Alert( const wxString& text, const wxString& caption=_("PCSX2 Message"), int icon=wxICON_EXCLAMATION ); @@ -195,6 +198,7 @@ namespace Msgbox extern int Assertion( const wxString& text, const wxString& stacktrace ); } +#endif #ifdef _WIN32 extern void CheckIsUserOnHighPerfPowerPlan(); diff --git a/pcsx2/VUmicro.h b/pcsx2/VUmicro.h index b4246f5b00..b7e75c7bb1 100644 --- a/pcsx2/VUmicro.h +++ b/pcsx2/VUmicro.h @@ -72,7 +72,7 @@ public: } virtual const char* GetShortName() const=0; - virtual wxString GetLongName() const=0; + virtual const char* GetLongName() const=0; // returns the number of bytes committed to the working caches for this CPU // provider (typically this refers to recompiled code caches, but could also refer @@ -166,7 +166,7 @@ public: virtual ~InterpVU0() { Shutdown(); } const char* GetShortName() const { return "intVU0"; } - wxString GetLongName() const { return L"VU0 Interpreter"; } + const char* GetLongName() const { return "VU0 Interpreter"; } void Reserve() { } void Shutdown() noexcept { } @@ -188,7 +188,7 @@ public: virtual ~InterpVU1() { Shutdown(); } const char* GetShortName() const { return "intVU1"; } - wxString GetLongName() const { return L"VU1 Interpreter"; } + const char* GetLongName() const { return "VU1 Interpreter"; } void Reserve() { } void Shutdown() noexcept; @@ -214,7 +214,7 @@ public: virtual ~recMicroVU0() { Shutdown(); } const char* GetShortName() const { return "mVU0"; } - wxString GetLongName() const { return L"microVU0 Recompiler"; } + const char* GetLongName() const { return "microVU0 Recompiler"; } void Reserve(); void Shutdown() noexcept; @@ -236,7 +236,7 @@ public: virtual ~recMicroVU1() { Shutdown(); } const char* GetShortName() const { return "mVU1"; } - wxString GetLongName() const { return L"microVU1 Recompiler"; } + const char* GetLongName() const { return "microVU1 Recompiler"; } void Reserve(); void Shutdown() noexcept; diff --git a/pcsx2/Vif.h b/pcsx2/Vif.h index 28a38716b1..6a6ab0b18a 100644 --- a/pcsx2/Vif.h +++ b/pcsx2/Vif.h @@ -18,6 +18,8 @@ #include "MemoryTypes.h" #include "R5900.h" +#include "common/StringUtil.h" + enum vif0_stat_flags { VIF0_STAT_VPS_W = (1), @@ -118,7 +120,7 @@ union tVIF_STAT { void set_flags (u32 flags) { _u32 |= flags; } void clear_flags(u32 flags) { _u32 &= ~flags; } void reset() { _u32 = 0; } - wxString desc() const { return wxsFormat(L"Stat: 0x%x", _u32); } + std::string desc() const { return StringUtil::StdStringFromFormat("Stat: 0x%x", _u32); } }; #define VIF_STAT(value) ((tVIF_STAT)(value)) @@ -138,7 +140,7 @@ union tVIF_FBRST { void set_flags (u32 flags) { _u32 |= flags; } void clear_flags(u32 flags) { _u32 &= ~flags; } void reset() { _u32 = 0; } - wxString desc() const { return wxsFormat(L"Fbrst: 0x%x", _u32); } + std::string desc() const { return StringUtil::StdStringFromFormat("Fbrst: 0x%x", _u32); } }; #define FBRST(value) ((tVIF_FBRST)(value)) @@ -159,7 +161,7 @@ union tVIF_ERR { void set_flags (u32 flags) { _u32 |= flags; } void clear_flags(u32 flags) { _u32 &= ~flags; } void reset() { _u32 = 0; } - wxString desc() const { return wxsFormat(L"Err: 0x%x", _u32); } + std::string desc() const { return StringUtil::StdStringFromFormat("Err: 0x%x", _u32); } }; struct vifCycle diff --git a/pcsx2/ps2/LegacyDmac.cpp b/pcsx2/ps2/LegacyDmac.cpp index 3453cc9981..2f2f86f4bc 100644 --- a/pcsx2/ps2/LegacyDmac.cpp +++ b/pcsx2/ps2/LegacyDmac.cpp @@ -70,14 +70,14 @@ tDMA_TAG DMACh::dma_tag() return chcr.tag(); } -wxString DMACh::cmq_to_str() const +std::string DMACh::cmq_to_str() const { - return wxsFormat(L"chcr = %lx, madr = %lx, qwc = %lx", chcr._u32, madr, qwc); + return StringUtil::StdStringFromFormat("chcr = %lx, madr = %lx, qwc = %lx", chcr._u32, madr, qwc); } -wxString DMACh::cmqt_to_str() const +std::string DMACh::cmqt_to_str() const { - return wxsFormat(L"chcr = %lx, madr = %lx, qwc = %lx, tadr = %1x", chcr._u32, madr, qwc, tadr); + return StringUtil::StdStringFromFormat("chcr = %lx, madr = %lx, qwc = %lx, tadr = %1x", chcr._u32, madr, qwc, tadr); } __fi void throwBusError(const char *s) diff --git a/pcsx2/sif2.cpp b/pcsx2/sif2.cpp index 2d2fd1620c..1bfab1e2b5 100644 --- a/pcsx2/sif2.cpp +++ b/pcsx2/sif2.cpp @@ -372,7 +372,7 @@ __fi void EEsif2Interrupt() __fi void dmaSIF2() { DevCon.Warning("SIF2 EE CHCR %x", sif2dma.chcr._u32); - SIF_LOG(wxString(L"dmaSIF2" + sif2dma.cmqt_to_str()).To8BitData()); + SIF_LOG("dmaSIF2%s", sif2dma.cmqt_to_str().c_str()); if (sif2.fifo.readPos != sif2.fifo.writePos) {