use .wx_str() instead of .mb_str(), Dbg console is still broken

This commit is contained in:
Peter Tissen 2014-02-10 13:53:09 +01:00
parent fdcdd7769f
commit b9c3dc352d
32 changed files with 216 additions and 211 deletions

View file

@ -1,5 +1,7 @@
Microsoft Visual Studio Solution File, Format Version 12.00 Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012 # Visual Studio 2013
VisualStudioVersion = 12.0.30110.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rpcs3", "rpcs3\rpcs3.vcxproj", "{70CD65B0-91D6-4FAE-9A7B-4AF55D0D1B12}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rpcs3", "rpcs3\rpcs3.vcxproj", "{70CD65B0-91D6-4FAE-9A7B-4AF55D0D1B12}"
ProjectSection(ProjectDependencies) = postProject ProjectSection(ProjectDependencies) = postProject
{3111D679-7796-23C4-BA0C-271F1145DA24} = {3111D679-7796-23C4-BA0C-271F1145DA24} {3111D679-7796-23C4-BA0C-271F1145DA24} = {3111D679-7796-23C4-BA0C-271F1145DA24}

View file

@ -142,7 +142,7 @@ void CPUThread::SetBranch(const u64 pc, bool record_branch)
{ {
if(!Memory.IsGoodAddr(m_offset + pc)) if(!Memory.IsGoodAddr(m_offset + pc))
{ {
ConLog.Error("%s branch error: bad address 0x%llx #pc: 0x%llx", GetFName().mb_str(), m_offset + pc, m_offset + PC); ConLog.Error("%s branch error: bad address 0x%llx #pc: 0x%llx", GetFName().wx_str(), m_offset + pc, m_offset + PC);
Emu.Pause(); Emu.Pause();
} }
@ -345,7 +345,7 @@ void CPUThread::Task()
} }
catch(const wxString& e) catch(const wxString& e)
{ {
ConLog.Error("Exception: %s", e.mb_str()); ConLog.Error("Exception: %s", e.wx_str());
} }
catch(const char* e) catch(const char* e)
{ {

View file

@ -36,7 +36,7 @@ CPUThread& CPUThreadManager::AddThread(CPUThreadType type)
default: assert(0); default: assert(0);
} }
new_thread->SetId(Emu.GetIdManager().GetNewID((const char*)wxString::Format("%s Thread", (const char*)new_thread->GetTypeString().mb_str()).mb_str(), new_thread)); new_thread->SetId(Emu.GetIdManager().GetNewID(wxString::Format("%s Thread", new_thread->GetTypeString().wx_str()).ToStdString(), new_thread));
m_threads.Add(new_thread); m_threads.Add(new_thread);
#ifndef QT_UI #ifndef QT_UI

View file

@ -15,39 +15,39 @@ protected:
void DisAsm_V4(const wxString& op, u32 v0, u32 v1, u32 v2, u32 v3) void DisAsm_V4(const wxString& op, u32 v0, u32 v1, u32 v2, u32 v3)
{ {
Write(wxString::Format("%s v%d,v%d,v%d,v%d", (const char*)FixOp(op).mb_str(), v0, v1, v2, v3)); Write(wxString::Format("%s v%d,v%d,v%d,v%d", FixOp(op).wx_str(), v0, v1, v2, v3));
} }
void DisAsm_V3_UIMM(const wxString& op, u32 v0, u32 v1, u32 v2, u32 uimm) void DisAsm_V3_UIMM(const wxString& op, u32 v0, u32 v1, u32 v2, u32 uimm)
{ {
Write(wxString::Format("%s v%d,v%d,v%d,%u #%x", (const char*)FixOp(op).mb_str(), v0, v1, v2, uimm, uimm)); Write(wxString::Format("%s v%d,v%d,v%d,%u #%x", FixOp(op).wx_str(), v0, v1, v2, uimm, uimm));
} }
void DisAsm_V3(const wxString& op, u32 v0, u32 v1, u32 v2) void DisAsm_V3(const wxString& op, u32 v0, u32 v1, u32 v2)
{ {
Write(wxString::Format("%s v%d,v%d,v%d", (const char*)FixOp(op).mb_str(), v0, v1, v2)); Write(wxString::Format("%s v%d,v%d,v%d", FixOp(op).wx_str(), v0, v1, v2));
} }
void DisAsm_V2_UIMM(const wxString& op, u32 v0, u32 v1, u32 uimm) void DisAsm_V2_UIMM(const wxString& op, u32 v0, u32 v1, u32 uimm)
{ {
Write(wxString::Format("%s v%d,v%d,%u #%x", (const char*)FixOp(op).mb_str(), v0, v1, uimm, uimm)); Write(wxString::Format("%s v%d,v%d,%u #%x", FixOp(op).wx_str(), v0, v1, uimm, uimm));
} }
void DisAsm_V2(const wxString& op, u32 v0, u32 v1) void DisAsm_V2(const wxString& op, u32 v0, u32 v1)
{ {
Write(wxString::Format("%s v%d,v%d", (const char*)FixOp(op).mb_str(), v0, v1)); Write(wxString::Format("%s v%d,v%d", FixOp(op).wx_str(), v0, v1));
} }
void DisAsm_V1_SIMM(const wxString& op, u32 v0, s32 simm) void DisAsm_V1_SIMM(const wxString& op, u32 v0, s32 simm)
{ {
Write(wxString::Format("%s v%d,%d #%x", (const char*)FixOp(op).mb_str(), v0, simm, simm)); Write(wxString::Format("%s v%d,%d #%x", FixOp(op).wx_str(), v0, simm, simm));
} }
void DisAsm_V1(const wxString& op, u32 v0) void DisAsm_V1(const wxString& op, u32 v0)
{ {
Write(wxString::Format("%s v%d", (const char*)FixOp(op).mb_str(), v0)); Write(wxString::Format("%s v%d", FixOp(op).wx_str(), v0));
} }
void DisAsm_V1_R2(const wxString& op, u32 v0, u32 r1, u32 r2) void DisAsm_V1_R2(const wxString& op, u32 v0, u32 r1, u32 r2)
{ {
Write(wxString::Format("%s v%d,r%d,r%d", (const char*)FixOp(op).mb_str(), v0, r1, r2)); Write(wxString::Format("%s v%d,r%d,r%d", FixOp(op).wx_str(), v0, r1, r2));
} }
void DisAsm_CR1_F2_RC(const wxString& op, u32 cr0, u32 f0, u32 f1, bool rc) void DisAsm_CR1_F2_RC(const wxString& op, u32 cr0, u32 f0, u32 f1, bool rc)
{ {
Write(wxString::Format("%s%s cr%d,f%d,f%d", (const char*)FixOp(op).mb_str(), rc ? "." : "", cr0, f0, f1)); Write(wxString::Format("%s%s cr%d,f%d,f%d", FixOp(op).wx_str(), rc ? "." : "", cr0, f0, f1));
} }
void DisAsm_CR1_F2(const wxString& op, u32 cr0, u32 f0, u32 f1) void DisAsm_CR1_F2(const wxString& op, u32 cr0, u32 f0, u32 f1)
{ {
@ -55,15 +55,15 @@ protected:
} }
void DisAsm_INT1_R2(const wxString& op, u32 i0, u32 r0, u32 r1) void DisAsm_INT1_R2(const wxString& op, u32 i0, u32 r0, u32 r1)
{ {
Write(wxString::Format("%s %d,r%d,r%d", (const char*)FixOp(op).mb_str(), i0, r0, r1)); Write(wxString::Format("%s %d,r%d,r%d", FixOp(op).wx_str(), i0, r0, r1));
} }
void DisAsm_INT1_R1_IMM(const wxString& op, u32 i0, u32 r0, s32 imm0) void DisAsm_INT1_R1_IMM(const wxString& op, u32 i0, u32 r0, s32 imm0)
{ {
Write(wxString::Format("%s %d,r%d,%d #%x", (const char*)FixOp(op).mb_str(), i0, r0, imm0, imm0)); Write(wxString::Format("%s %d,r%d,%d #%x", FixOp(op).wx_str(), i0, r0, imm0, imm0));
} }
void DisAsm_INT1_R1_RC(const wxString& op, u32 i0, u32 r0, bool rc) void DisAsm_INT1_R1_RC(const wxString& op, u32 i0, u32 r0, bool rc)
{ {
Write(wxString::Format("%s%s %d,r%d", (const char*)FixOp(op).mb_str(), rc ? "." : "", i0, r0)); Write(wxString::Format("%s%s %d,r%d", FixOp(op).wx_str(), rc ? "." : "", i0, r0));
} }
void DisAsm_INT1_R1(const wxString& op, u32 i0, u32 r0) void DisAsm_INT1_R1(const wxString& op, u32 i0, u32 r0)
{ {
@ -71,11 +71,11 @@ protected:
} }
void DisAsm_F4_RC(const wxString& op, u32 f0, u32 f1, u32 f2, u32 f3, bool rc) void DisAsm_F4_RC(const wxString& op, u32 f0, u32 f1, u32 f2, u32 f3, bool rc)
{ {
Write(wxString::Format("%s%s f%d,f%d,f%d,f%d", (const char*)FixOp(op).mb_str(), rc ? "." : "", f0, f1, f2, f3)); Write(wxString::Format("%s%s f%d,f%d,f%d,f%d", FixOp(op).wx_str(), rc ? "." : "", f0, f1, f2, f3));
} }
void DisAsm_F3_RC(const wxString& op, u32 f0, u32 f1, u32 f2, bool rc) void DisAsm_F3_RC(const wxString& op, u32 f0, u32 f1, u32 f2, bool rc)
{ {
Write(wxString::Format("%s%s f%d,f%d,f%d", (const char*)FixOp(op).mb_str(), rc ? "." : "", f0, f1, f2)); Write(wxString::Format("%s%s f%d,f%d,f%d", FixOp(op).wx_str(), rc ? "." : "", f0, f1, f2));
} }
void DisAsm_F3(const wxString& op, u32 f0, u32 f1, u32 f2) void DisAsm_F3(const wxString& op, u32 f0, u32 f1, u32 f2)
{ {
@ -83,7 +83,7 @@ protected:
} }
void DisAsm_F2_RC(const wxString& op, u32 f0, u32 f1, bool rc) void DisAsm_F2_RC(const wxString& op, u32 f0, u32 f1, bool rc)
{ {
Write(wxString::Format("%s%s f%d,f%d", (const char*)FixOp(op).mb_str(), rc ? "." : "", f0, f1)); Write(wxString::Format("%s%s f%d,f%d", FixOp(op).wx_str(), rc ? "." : "", f0, f1));
} }
void DisAsm_F2(const wxString& op, u32 f0, u32 f1) void DisAsm_F2(const wxString& op, u32 f0, u32 f1)
{ {
@ -93,21 +93,21 @@ protected:
{ {
if(m_mode == CPUDisAsm_CompilerElfMode) if(m_mode == CPUDisAsm_CompilerElfMode)
{ {
Write(wxString::Format("%s f%d,r%d,r%d", (const char*)FixOp(op).mb_str(), f0, r0, r1)); Write(wxString::Format("%s f%d,r%d,r%d", FixOp(op).wx_str(), f0, r0, r1));
return; return;
} }
Write(wxString::Format("%s f%d,r%d(r%d)", (const char*)FixOp(op).mb_str(), f0, r0, r1)); Write(wxString::Format("%s f%d,r%d(r%d)", FixOp(op).wx_str(), f0, r0, r1));
} }
void DisAsm_F1_IMM_R1_RC(const wxString& op, u32 f0, s32 imm0, u32 r0, bool rc) void DisAsm_F1_IMM_R1_RC(const wxString& op, u32 f0, s32 imm0, u32 r0, bool rc)
{ {
if(m_mode == CPUDisAsm_CompilerElfMode) if(m_mode == CPUDisAsm_CompilerElfMode)
{ {
Write(wxString::Format("%s%s f%d,r%d,%d #%x", (const char*)FixOp(op).mb_str(), rc ? "." : "", f0, r0, imm0, imm0)); Write(wxString::Format("%s%s f%d,r%d,%d #%x", FixOp(op).wx_str(), rc ? "." : "", f0, r0, imm0, imm0));
return; return;
} }
Write(wxString::Format("%s%s f%d,%d(r%d) #%x", (const char*)FixOp(op).mb_str(), rc ? "." : "", f0, imm0, r0, imm0)); Write(wxString::Format("%s%s f%d,%d(r%d) #%x", FixOp(op).wx_str(), rc ? "." : "", f0, imm0, r0, imm0));
} }
void DisAsm_F1_IMM_R1(const wxString& op, u32 f0, s32 imm0, u32 r0) void DisAsm_F1_IMM_R1(const wxString& op, u32 f0, s32 imm0, u32 r0)
{ {
@ -115,11 +115,11 @@ protected:
} }
void DisAsm_F1_RC(const wxString& op, u32 f0, bool rc) void DisAsm_F1_RC(const wxString& op, u32 f0, bool rc)
{ {
Write(wxString::Format("%s%s f%d", (const char*)FixOp(op).mb_str(), rc ? "." : "", f0)); Write(wxString::Format("%s%s f%d", FixOp(op).wx_str(), rc ? "." : "", f0));
} }
void DisAsm_R1_RC(const wxString& op, u32 r0, bool rc) void DisAsm_R1_RC(const wxString& op, u32 r0, bool rc)
{ {
Write(wxString::Format("%s%s r%d", (const char*)FixOp(op).mb_str(), rc ? "." : "", r0)); Write(wxString::Format("%s%s r%d", FixOp(op).wx_str(), rc ? "." : "", r0));
} }
void DisAsm_R1(const wxString& op, u32 r0) void DisAsm_R1(const wxString& op, u32 r0)
{ {
@ -127,7 +127,7 @@ protected:
} }
void DisAsm_R2_OE_RC(const wxString& op, u32 r0, u32 r1, u32 oe, bool rc) void DisAsm_R2_OE_RC(const wxString& op, u32 r0, u32 r1, u32 oe, bool rc)
{ {
Write(wxString::Format("%s%s%s r%d,r%d", (const char*)FixOp(op).mb_str(), oe ? "o" : "", rc ? "." : "", r0, r1)); Write(wxString::Format("%s%s%s r%d,r%d", FixOp(op).wx_str(), oe ? "o" : "", rc ? "." : "", r0, r1));
} }
void DisAsm_R2_RC(const wxString& op, u32 r0, u32 r1, bool rc) void DisAsm_R2_RC(const wxString& op, u32 r0, u32 r1, bool rc)
{ {
@ -139,11 +139,11 @@ protected:
} }
void DisAsm_R3_OE_RC(const wxString& op, u32 r0, u32 r1, u32 r2, u32 oe, bool rc) void DisAsm_R3_OE_RC(const wxString& op, u32 r0, u32 r1, u32 r2, u32 oe, bool rc)
{ {
Write(wxString::Format("%s%s%s r%d,r%d,r%d", (const char*)FixOp(op).mb_str(), oe ? "o" : "", rc ? "." : "", r0, r1, r2)); Write(wxString::Format("%s%s%s r%d,r%d,r%d", FixOp(op).wx_str(), oe ? "o" : "", rc ? "." : "", r0, r1, r2));
} }
void DisAsm_R3_INT2_RC(const wxString& op, u32 r0, u32 r1, u32 r2, s32 i0, s32 i1, bool rc) void DisAsm_R3_INT2_RC(const wxString& op, u32 r0, u32 r1, u32 r2, s32 i0, s32 i1, bool rc)
{ {
Write(wxString::Format("%s%s r%d,r%d,r%d,%d,%d", (const char*)FixOp(op).mb_str(), rc ? "." : "", r0, r1, r2, i0, i1)); Write(wxString::Format("%s%s r%d,r%d,r%d,%d,%d", FixOp(op).wx_str(), rc ? "." : "", r0, r1, r2, i0, i1));
} }
void DisAsm_R3_RC(const wxString& op, u32 r0, u32 r1, u32 r2, bool rc) void DisAsm_R3_RC(const wxString& op, u32 r0, u32 r1, u32 r2, bool rc)
{ {
@ -155,7 +155,7 @@ protected:
} }
void DisAsm_R2_INT3_RC(const wxString& op, u32 r0, u32 r1, s32 i0, s32 i1, s32 i2, bool rc) void DisAsm_R2_INT3_RC(const wxString& op, u32 r0, u32 r1, s32 i0, s32 i1, s32 i2, bool rc)
{ {
Write(wxString::Format("%s%s r%d,r%d,%d,%d,%d", (const char*)FixOp(op).mb_str(), rc ? "." : "", r0, r1, i0, i1, i2)); Write(wxString::Format("%s%s r%d,r%d,%d,%d,%d", FixOp(op).wx_str(), rc ? "." : "", r0, r1, i0, i1, i2));
} }
void DisAsm_R2_INT3(const wxString& op, u32 r0, u32 r1, s32 i0, s32 i1, s32 i2) void DisAsm_R2_INT3(const wxString& op, u32 r0, u32 r1, s32 i0, s32 i1, s32 i2)
{ {
@ -163,7 +163,7 @@ protected:
} }
void DisAsm_R2_INT2_RC(const wxString& op, u32 r0, u32 r1, s32 i0, s32 i1, bool rc) void DisAsm_R2_INT2_RC(const wxString& op, u32 r0, u32 r1, s32 i0, s32 i1, bool rc)
{ {
Write(wxString::Format("%s%s r%d,r%d,%d,%d", (const char*)FixOp(op).mb_str(), rc ? "." : "", r0, r1, i0, i1)); Write(wxString::Format("%s%s r%d,r%d,%d,%d", FixOp(op).wx_str(), rc ? "." : "", r0, r1, i0, i1));
} }
void DisAsm_R2_INT2(const wxString& op, u32 r0, u32 r1, s32 i0, s32 i1) void DisAsm_R2_INT2(const wxString& op, u32 r0, u32 r1, s32 i0, s32 i1)
{ {
@ -171,7 +171,7 @@ protected:
} }
void DisAsm_R2_INT1_RC(const wxString& op, u32 r0, u32 r1, s32 i0, bool rc) void DisAsm_R2_INT1_RC(const wxString& op, u32 r0, u32 r1, s32 i0, bool rc)
{ {
Write(wxString::Format("%s%s r%d,r%d,%d", (const char*)FixOp(op).mb_str(), rc ? "." : "", r0, r1, i0)); Write(wxString::Format("%s%s r%d,r%d,%d", FixOp(op).wx_str(), rc ? "." : "", r0, r1, i0));
} }
void DisAsm_R2_INT1(const wxString& op, u32 r0, u32 r1, s32 i0) void DisAsm_R2_INT1(const wxString& op, u32 r0, u32 r1, s32 i0)
{ {
@ -181,27 +181,27 @@ protected:
{ {
if(m_mode == CPUDisAsm_CompilerElfMode) if(m_mode == CPUDisAsm_CompilerElfMode)
{ {
Write(wxString::Format("%s r%d,r%d,%d #%x", (const char*)FixOp(op).mb_str(), r0, r1, imm0, imm0)); Write(wxString::Format("%s r%d,r%d,%d #%x", FixOp(op).wx_str(), r0, r1, imm0, imm0));
return; return;
} }
Write(wxString::Format("%s r%d,%d(r%d) #%x", (const char*)FixOp(op).mb_str(), r0, imm0, r1, imm0)); Write(wxString::Format("%s r%d,%d(r%d) #%x", FixOp(op).wx_str(), r0, imm0, r1, imm0));
} }
void DisAsm_R1_IMM(const wxString& op, u32 r0, s32 imm0) void DisAsm_R1_IMM(const wxString& op, u32 r0, s32 imm0)
{ {
Write(wxString::Format("%s r%d,%d #%x", (const char*)FixOp(op).mb_str(), r0, imm0, imm0)); Write(wxString::Format("%s r%d,%d #%x", FixOp(op).wx_str(), r0, imm0, imm0));
} }
void DisAsm_IMM_R1(const wxString& op, s32 imm0, u32 r0) void DisAsm_IMM_R1(const wxString& op, s32 imm0, u32 r0)
{ {
Write(wxString::Format("%s %d,r%d #%x", (const char*)FixOp(op).mb_str(), imm0, r0, imm0)); Write(wxString::Format("%s %d,r%d #%x", FixOp(op).wx_str(), imm0, r0, imm0));
} }
void DisAsm_CR1_R1_IMM(const wxString& op, u32 cr0, u32 r0, s32 imm0) void DisAsm_CR1_R1_IMM(const wxString& op, u32 cr0, u32 r0, s32 imm0)
{ {
Write(wxString::Format("%s cr%d,r%d,%d #%x", (const char*)FixOp(op).mb_str(), cr0, r0, imm0, imm0)); Write(wxString::Format("%s cr%d,r%d,%d #%x", FixOp(op).wx_str(), cr0, r0, imm0, imm0));
} }
void DisAsm_CR1_R2_RC(const wxString& op, u32 cr0, u32 r0, u32 r1, bool rc) void DisAsm_CR1_R2_RC(const wxString& op, u32 cr0, u32 r0, u32 r1, bool rc)
{ {
Write(wxString::Format("%s%s cr%d,r%d,r%d", (const char*)FixOp(op).mb_str(), rc ? "." : "", cr0, r0, r1)); Write(wxString::Format("%s%s cr%d,r%d,r%d", FixOp(op).wx_str(), rc ? "." : "", cr0, r0, r1));
} }
void DisAsm_CR1_R2(const wxString& op, u32 cr0, u32 r0, u32 r1) void DisAsm_CR1_R2(const wxString& op, u32 cr0, u32 r0, u32 r1)
{ {
@ -209,30 +209,30 @@ protected:
} }
void DisAsm_CR2(const wxString& op, u32 cr0, u32 cr1) void DisAsm_CR2(const wxString& op, u32 cr0, u32 cr1)
{ {
Write(wxString::Format("%s cr%d,cr%d", (const char*)FixOp(op).mb_str(), cr0, cr1)); Write(wxString::Format("%s cr%d,cr%d", FixOp(op).wx_str(), cr0, cr1));
} }
void DisAsm_INT3(const wxString& op, const int i0, const int i1, const int i2) void DisAsm_INT3(const wxString& op, const int i0, const int i1, const int i2)
{ {
Write(wxString::Format("%s %d,%d,%d", (const char*)FixOp(op).mb_str(), i0, i1, i2)); Write(wxString::Format("%s %d,%d,%d", FixOp(op).wx_str(), i0, i1, i2));
} }
void DisAsm_INT1(const wxString& op, const int i0) void DisAsm_INT1(const wxString& op, const int i0)
{ {
Write(wxString::Format("%s %d", (const char*)FixOp(op).mb_str(), i0)); Write(wxString::Format("%s %d", FixOp(op).wx_str(), i0));
} }
void DisAsm_BRANCH(const wxString& op, const int pc) void DisAsm_BRANCH(const wxString& op, const int pc)
{ {
Write(wxString::Format("%s 0x%x", (const char*)FixOp(op).mb_str(), DisAsmBranchTarget(pc))); Write(wxString::Format("%s 0x%x", FixOp(op).wx_str(), DisAsmBranchTarget(pc)));
} }
void DisAsm_BRANCH_A(const wxString& op, const int pc) void DisAsm_BRANCH_A(const wxString& op, const int pc)
{ {
Write(wxString::Format("%s 0x%x", (const char*)FixOp(op).mb_str(), pc)); Write(wxString::Format("%s 0x%x", FixOp(op).wx_str(), pc));
} }
void DisAsm_B2_BRANCH(const wxString& op, u32 b0, u32 b1, const int pc) void DisAsm_B2_BRANCH(const wxString& op, u32 b0, u32 b1, const int pc)
{ {
Write(wxString::Format("%s %d,%d,0x%x ", (const char*)FixOp(op).mb_str(), b0, b1, DisAsmBranchTarget(pc))); Write(wxString::Format("%s %d,%d,0x%x ", FixOp(op).wx_str(), b0, b1, DisAsmBranchTarget(pc)));
} }
void DisAsm_CR_BRANCH(const wxString& op, u32 cr, const int pc) void DisAsm_CR_BRANCH(const wxString& op, u32 cr, const int pc)
{ {
Write(wxString::Format("%s cr%d,0x%x ", (const char*)FixOp(op).mb_str(), cr, DisAsmBranchTarget(pc))); Write(wxString::Format("%s cr%d,0x%x ", FixOp(op).wx_str(), cr, DisAsmBranchTarget(pc)));
} }
}; };

View file

@ -17,7 +17,7 @@ public:
virtual std::string GetThreadName() const virtual std::string GetThreadName() const
{ {
return std::string((GetFName() + wxString::Format("[0x%08llx]", PC)).mb_str()); return (GetFName() + wxString::Format("[0x%08llx]", PC)).ToStdString();
} }
protected: protected:

View file

@ -24,39 +24,39 @@ private:
private: private:
void DisAsm_V4(const wxString& op, u32 v0, u32 v1, u32 v2, u32 v3) void DisAsm_V4(const wxString& op, u32 v0, u32 v1, u32 v2, u32 v3)
{ {
Write(wxString::Format("%s v%d,v%d,v%d,v%d", (const char*)FixOp(op).mb_str(), v0, v1, v2, v3)); Write(wxString::Format("%s v%d,v%d,v%d,v%d", FixOp(op).wx_str(), v0, v1, v2, v3));
} }
void DisAsm_V3_UIMM(const wxString& op, u32 v0, u32 v1, u32 v2, u32 uimm) void DisAsm_V3_UIMM(const wxString& op, u32 v0, u32 v1, u32 v2, u32 uimm)
{ {
Write(wxString::Format("%s v%d,v%d,v%d,%u #%x", (const char*)FixOp(op).mb_str(), v0, v1, v2, uimm, uimm)); Write(wxString::Format("%s v%d,v%d,v%d,%u #%x", FixOp(op).wx_str(), v0, v1, v2, uimm, uimm));
} }
void DisAsm_V3(const wxString& op, u32 v0, u32 v1, u32 v2) void DisAsm_V3(const wxString& op, u32 v0, u32 v1, u32 v2)
{ {
Write(wxString::Format("%s v%d,v%d,v%d", (const char*)FixOp(op).mb_str(), v0, v1, v2)); Write(wxString::Format("%s v%d,v%d,v%d", FixOp(op).wx_str(), v0, v1, v2));
} }
void DisAsm_V2_UIMM(const wxString& op, u32 v0, u32 v1, u32 uimm) void DisAsm_V2_UIMM(const wxString& op, u32 v0, u32 v1, u32 uimm)
{ {
Write(wxString::Format("%s v%d,v%d,%u #%x", (const char*)FixOp(op).mb_str(), v0, v1, uimm, uimm)); Write(wxString::Format("%s v%d,v%d,%u #%x", FixOp(op).wx_str(), v0, v1, uimm, uimm));
} }
void DisAsm_V2(const wxString& op, u32 v0, u32 v1) void DisAsm_V2(const wxString& op, u32 v0, u32 v1)
{ {
Write(wxString::Format("%s v%d,v%d", (const char*)FixOp(op).mb_str(), v0, v1)); Write(wxString::Format("%s v%d,v%d", FixOp(op).wx_str(), v0, v1));
} }
void DisAsm_V1_SIMM(const wxString& op, u32 v0, s32 simm) void DisAsm_V1_SIMM(const wxString& op, u32 v0, s32 simm)
{ {
Write(wxString::Format("%s v%d,%d #%x", (const char*)FixOp(op).mb_str(), v0, simm, simm)); Write(wxString::Format("%s v%d,%d #%x", FixOp(op).wx_str(), v0, simm, simm));
} }
void DisAsm_V1(const wxString& op, u32 v0) void DisAsm_V1(const wxString& op, u32 v0)
{ {
Write(wxString::Format("%s v%d", (const char*)FixOp(op).mb_str(), v0)); Write(wxString::Format("%s v%d", FixOp(op).wx_str(), v0));
} }
void DisAsm_V1_R2(const wxString& op, u32 v0, u32 r1, u32 r2) void DisAsm_V1_R2(const wxString& op, u32 v0, u32 r1, u32 r2)
{ {
Write(wxString::Format("%s v%d,r%d,r%d", (const char*)FixOp(op).mb_str(), v0, r1, r2)); Write(wxString::Format("%s v%d,r%d,r%d", FixOp(op).wx_str(), v0, r1, r2));
} }
void DisAsm_CR1_F2_RC(const wxString& op, u32 cr0, u32 f0, u32 f1, bool rc) void DisAsm_CR1_F2_RC(const wxString& op, u32 cr0, u32 f0, u32 f1, bool rc)
{ {
Write(wxString::Format("%s%s cr%d,f%d,f%d", (const char*)FixOp(op).mb_str(), rc ? "." : "", cr0, f0, f1)); Write(wxString::Format("%s%s cr%d,f%d,f%d", FixOp(op).wx_str(), rc ? "." : "", cr0, f0, f1));
} }
void DisAsm_CR1_F2(const wxString& op, u32 cr0, u32 f0, u32 f1) void DisAsm_CR1_F2(const wxString& op, u32 cr0, u32 f0, u32 f1)
{ {
@ -64,15 +64,15 @@ private:
} }
void DisAsm_INT1_R2(const wxString& op, u32 i0, u32 r0, u32 r1) void DisAsm_INT1_R2(const wxString& op, u32 i0, u32 r0, u32 r1)
{ {
Write(wxString::Format("%s %d,r%d,r%d", (const char*)FixOp(op).mb_str(), i0, r0, r1)); Write(wxString::Format("%s %d,r%d,r%d", FixOp(op).wx_str(), i0, r0, r1));
} }
void DisAsm_INT1_R1_IMM(const wxString& op, u32 i0, u32 r0, s32 imm0) void DisAsm_INT1_R1_IMM(const wxString& op, u32 i0, u32 r0, s32 imm0)
{ {
Write(wxString::Format("%s %d,r%d,%d #%x", (const char*)FixOp(op).mb_str(), i0, r0, imm0, imm0)); Write(wxString::Format("%s %d,r%d,%d #%x", FixOp(op).wx_str(), i0, r0, imm0, imm0));
} }
void DisAsm_INT1_R1_RC(const wxString& op, u32 i0, u32 r0, bool rc) void DisAsm_INT1_R1_RC(const wxString& op, u32 i0, u32 r0, bool rc)
{ {
Write(wxString::Format("%s%s %d,r%d", (const char*)FixOp(op).mb_str(), rc ? "." : "", i0, r0)); Write(wxString::Format("%s%s %d,r%d", FixOp(op).wx_str(), rc ? "." : "", i0, r0));
} }
void DisAsm_INT1_R1(const wxString& op, u32 i0, u32 r0) void DisAsm_INT1_R1(const wxString& op, u32 i0, u32 r0)
{ {
@ -80,11 +80,11 @@ private:
} }
void DisAsm_F4_RC(const wxString& op, u32 f0, u32 f1, u32 f2, u32 f3, bool rc) void DisAsm_F4_RC(const wxString& op, u32 f0, u32 f1, u32 f2, u32 f3, bool rc)
{ {
Write(wxString::Format("%s%s f%d,f%d,f%d,f%d", (const char*)FixOp(op).mb_str(), rc ? "." : "", f0, f1, f2, f3)); Write(wxString::Format("%s%s f%d,f%d,f%d,f%d", FixOp(op).wx_str(), rc ? "." : "", f0, f1, f2, f3));
} }
void DisAsm_F3_RC(const wxString& op, u32 f0, u32 f1, u32 f2, bool rc) void DisAsm_F3_RC(const wxString& op, u32 f0, u32 f1, u32 f2, bool rc)
{ {
Write(wxString::Format("%s%s f%d,f%d,f%d", (const char*)FixOp(op).mb_str(), rc ? "." : "", f0, f1, f2)); Write(wxString::Format("%s%s f%d,f%d,f%d", FixOp(op).wx_str(), rc ? "." : "", f0, f1, f2));
} }
void DisAsm_F3(const wxString& op, u32 f0, u32 f1, u32 f2) void DisAsm_F3(const wxString& op, u32 f0, u32 f1, u32 f2)
{ {
@ -92,7 +92,7 @@ private:
} }
void DisAsm_F2_RC(const wxString& op, u32 f0, u32 f1, bool rc) void DisAsm_F2_RC(const wxString& op, u32 f0, u32 f1, bool rc)
{ {
Write(wxString::Format("%s%s f%d,f%d", (const char*)FixOp(op).mb_str(), rc ? "." : "", f0, f1)); Write(wxString::Format("%s%s f%d,f%d", FixOp(op).wx_str(), rc ? "." : "", f0, f1));
} }
void DisAsm_F2(const wxString& op, u32 f0, u32 f1) void DisAsm_F2(const wxString& op, u32 f0, u32 f1)
{ {
@ -102,21 +102,21 @@ private:
{ {
if(m_mode == CPUDisAsm_CompilerElfMode) if(m_mode == CPUDisAsm_CompilerElfMode)
{ {
Write(wxString::Format("%s f%d,r%d,r%d", (const char*)FixOp(op).mb_str(), f0, r0, r1)); Write(wxString::Format("%s f%d,r%d,r%d", FixOp(op).wx_str(), f0, r0, r1));
return; return;
} }
Write(wxString::Format("%s f%d,r%d(r%d)", (const char*)FixOp(op).mb_str(), f0, r0, r1)); Write(wxString::Format("%s f%d,r%d(r%d)", FixOp(op).wx_str(), f0, r0, r1));
} }
void DisAsm_F1_IMM_R1_RC(const wxString& op, u32 f0, s32 imm0, u32 r0, bool rc) void DisAsm_F1_IMM_R1_RC(const wxString& op, u32 f0, s32 imm0, u32 r0, bool rc)
{ {
if(m_mode == CPUDisAsm_CompilerElfMode) if(m_mode == CPUDisAsm_CompilerElfMode)
{ {
Write(wxString::Format("%s%s f%d,r%d,%d #%x", (const char*)FixOp(op).mb_str(), rc ? "." : "", f0, r0, imm0, imm0)); Write(wxString::Format("%s%s f%d,r%d,%d #%x", FixOp(op).wx_str(), rc ? "." : "", f0, r0, imm0, imm0));
return; return;
} }
Write(wxString::Format("%s%s f%d,%d(r%d) #%x", (const char*)FixOp(op).mb_str(), rc ? "." : "", f0, imm0, r0, imm0)); Write(wxString::Format("%s%s f%d,%d(r%d) #%x", FixOp(op).wx_str(), rc ? "." : "", f0, imm0, r0, imm0));
} }
void DisAsm_F1_IMM_R1(const wxString& op, u32 f0, s32 imm0, u32 r0) void DisAsm_F1_IMM_R1(const wxString& op, u32 f0, s32 imm0, u32 r0)
{ {
@ -124,11 +124,11 @@ private:
} }
void DisAsm_F1_RC(const wxString& op, u32 f0, bool rc) void DisAsm_F1_RC(const wxString& op, u32 f0, bool rc)
{ {
Write(wxString::Format("%s%s f%d", (const char*)FixOp(op).mb_str(), rc ? "." : "", f0)); Write(wxString::Format("%s%s f%d", FixOp(op).wx_str(), rc ? "." : "", f0));
} }
void DisAsm_R1_RC(const wxString& op, u32 r0, bool rc) void DisAsm_R1_RC(const wxString& op, u32 r0, bool rc)
{ {
Write(wxString::Format("%s%s r%d", (const char*)FixOp(op).mb_str(), rc ? "." : "", r0)); Write(wxString::Format("%s%s r%d", FixOp(op).wx_str(), rc ? "." : "", r0));
} }
void DisAsm_R1(const wxString& op, u32 r0) void DisAsm_R1(const wxString& op, u32 r0)
{ {
@ -136,7 +136,7 @@ private:
} }
void DisAsm_R2_OE_RC(const wxString& op, u32 r0, u32 r1, u32 oe, bool rc) void DisAsm_R2_OE_RC(const wxString& op, u32 r0, u32 r1, u32 oe, bool rc)
{ {
Write(wxString::Format("%s%s%s r%d,r%d", (const char*)FixOp(op).mb_str(), oe ? "o" : "", rc ? "." : "", r0, r1)); Write(wxString::Format("%s%s%s r%d,r%d", FixOp(op).wx_str(), oe ? "o" : "", rc ? "." : "", r0, r1));
} }
void DisAsm_R2_RC(const wxString& op, u32 r0, u32 r1, bool rc) void DisAsm_R2_RC(const wxString& op, u32 r0, u32 r1, bool rc)
{ {
@ -148,11 +148,11 @@ private:
} }
void DisAsm_R3_OE_RC(const wxString& op, u32 r0, u32 r1, u32 r2, u32 oe, bool rc) void DisAsm_R3_OE_RC(const wxString& op, u32 r0, u32 r1, u32 r2, u32 oe, bool rc)
{ {
Write(wxString::Format("%s%s%s r%d,r%d,r%d", (const char*)FixOp(op).mb_str(), oe ? "o" : "", rc ? "." : "", r0, r1, r2)); Write(wxString::Format("%s%s%s r%d,r%d,r%d", FixOp(op).wx_str(), oe ? "o" : "", rc ? "." : "", r0, r1, r2));
} }
void DisAsm_R3_INT2_RC(const wxString& op, u32 r0, u32 r1, u32 r2, s32 i0, s32 i1, bool rc) void DisAsm_R3_INT2_RC(const wxString& op, u32 r0, u32 r1, u32 r2, s32 i0, s32 i1, bool rc)
{ {
Write(wxString::Format("%s%s r%d,r%d,r%d,%d,%d", (const char*)FixOp(op).mb_str(), rc ? "." : "", r0, r1, r2, i0, i1)); Write(wxString::Format("%s%s r%d,r%d,r%d,%d,%d", FixOp(op).wx_str(), rc ? "." : "", r0, r1, r2, i0, i1));
} }
void DisAsm_R3_RC(const wxString& op, u32 r0, u32 r1, u32 r2, bool rc) void DisAsm_R3_RC(const wxString& op, u32 r0, u32 r1, u32 r2, bool rc)
{ {
@ -164,7 +164,7 @@ private:
} }
void DisAsm_R2_INT3_RC(const wxString& op, u32 r0, u32 r1, s32 i0, s32 i1, s32 i2, bool rc) void DisAsm_R2_INT3_RC(const wxString& op, u32 r0, u32 r1, s32 i0, s32 i1, s32 i2, bool rc)
{ {
Write(wxString::Format("%s%s r%d,r%d,%d,%d,%d", (const char*)FixOp(op).mb_str(), rc ? "." : "", r0, r1, i0, i1, i2)); Write(wxString::Format("%s%s r%d,r%d,%d,%d,%d", FixOp(op).wx_str(), rc ? "." : "", r0, r1, i0, i1, i2));
} }
void DisAsm_R2_INT3(const wxString& op, u32 r0, u32 r1, s32 i0, s32 i1, s32 i2) void DisAsm_R2_INT3(const wxString& op, u32 r0, u32 r1, s32 i0, s32 i1, s32 i2)
{ {
@ -172,7 +172,7 @@ private:
} }
void DisAsm_R2_INT2_RC(const wxString& op, u32 r0, u32 r1, s32 i0, s32 i1, bool rc) void DisAsm_R2_INT2_RC(const wxString& op, u32 r0, u32 r1, s32 i0, s32 i1, bool rc)
{ {
Write(wxString::Format("%s%s r%d,r%d,%d,%d", (const char*)FixOp(op).mb_str(), rc ? "." : "", r0, r1, i0, i1)); Write(wxString::Format("%s%s r%d,r%d,%d,%d", FixOp(op).wx_str(), rc ? "." : "", r0, r1, i0, i1));
} }
void DisAsm_R2_INT2(const wxString& op, u32 r0, u32 r1, s32 i0, s32 i1) void DisAsm_R2_INT2(const wxString& op, u32 r0, u32 r1, s32 i0, s32 i1)
{ {
@ -180,7 +180,7 @@ private:
} }
void DisAsm_R2_INT1_RC(const wxString& op, u32 r0, u32 r1, s32 i0, bool rc) void DisAsm_R2_INT1_RC(const wxString& op, u32 r0, u32 r1, s32 i0, bool rc)
{ {
Write(wxString::Format("%s%s r%d,r%d,%d", (const char*)FixOp(op).mb_str(), rc ? "." : "", r0, r1, i0)); Write(wxString::Format("%s%s r%d,r%d,%d", FixOp(op).wx_str(), rc ? "." : "", r0, r1, i0));
} }
void DisAsm_R2_INT1(const wxString& op, u32 r0, u32 r1, s32 i0) void DisAsm_R2_INT1(const wxString& op, u32 r0, u32 r1, s32 i0)
{ {
@ -190,27 +190,27 @@ private:
{ {
if(m_mode == CPUDisAsm_CompilerElfMode) if(m_mode == CPUDisAsm_CompilerElfMode)
{ {
Write(wxString::Format("%s r%d,r%d,%d #%x", (const char*)FixOp(op).mb_str(), r0, r1, imm0, imm0)); Write(wxString::Format("%s r%d,r%d,%d #%x", FixOp(op).wx_str(), r0, r1, imm0, imm0));
return; return;
} }
Write(wxString::Format("%s r%d,%d(r%d) #%x", (const char*)FixOp(op).mb_str(), r0, imm0, r1, imm0)); Write(wxString::Format("%s r%d,%d(r%d) #%x", FixOp(op).wx_str(), r0, imm0, r1, imm0));
} }
void DisAsm_R1_IMM(const wxString& op, u32 r0, s32 imm0) void DisAsm_R1_IMM(const wxString& op, u32 r0, s32 imm0)
{ {
Write(wxString::Format("%s r%d,%d #%x", (const char*)FixOp(op).mb_str(), r0, imm0, imm0)); Write(wxString::Format("%s r%d,%d #%x", FixOp(op).wx_str(), r0, imm0, imm0));
} }
void DisAsm_IMM_R1(const wxString& op, s32 imm0, u32 r0) void DisAsm_IMM_R1(const wxString& op, s32 imm0, u32 r0)
{ {
Write(wxString::Format("%s %d,r%d #%x", (const char*)FixOp(op).mb_str(), imm0, r0, imm0)); Write(wxString::Format("%s %d,r%d #%x", FixOp(op).wx_str(), imm0, r0, imm0));
} }
void DisAsm_CR1_R1_IMM(const wxString& op, u32 cr0, u32 r0, s32 imm0) void DisAsm_CR1_R1_IMM(const wxString& op, u32 cr0, u32 r0, s32 imm0)
{ {
Write(wxString::Format("%s cr%d,r%d,%d #%x", (const char*)FixOp(op).mb_str(), cr0, r0, imm0, imm0)); Write(wxString::Format("%s cr%d,r%d,%d #%x", FixOp(op).wx_str(), cr0, r0, imm0, imm0));
} }
void DisAsm_CR1_R2_RC(const wxString& op, u32 cr0, u32 r0, u32 r1, bool rc) void DisAsm_CR1_R2_RC(const wxString& op, u32 cr0, u32 r0, u32 r1, bool rc)
{ {
Write(wxString::Format("%s%s cr%d,r%d,r%d", (const char*)FixOp(op).mb_str(), rc ? "." : "", cr0, r0, r1)); Write(wxString::Format("%s%s cr%d,r%d,r%d", FixOp(op).wx_str(), rc ? "." : "", cr0, r0, r1));
} }
void DisAsm_CR1_R2(const wxString& op, u32 cr0, u32 r0, u32 r1) void DisAsm_CR1_R2(const wxString& op, u32 cr0, u32 r0, u32 r1)
{ {
@ -218,31 +218,31 @@ private:
} }
void DisAsm_CR2(const wxString& op, u32 cr0, u32 cr1) void DisAsm_CR2(const wxString& op, u32 cr0, u32 cr1)
{ {
Write(wxString::Format("%s cr%d,cr%d", (const char*)FixOp(op).mb_str(), cr0, cr1)); Write(wxString::Format("%s cr%d,cr%d", FixOp(op).wx_str(), cr0, cr1));
} }
void DisAsm_INT3(const wxString& op, const int i0, const int i1, const int i2) void DisAsm_INT3(const wxString& op, const int i0, const int i1, const int i2)
{ {
Write(wxString::Format("%s %d,%d,%d", (const char*)FixOp(op).mb_str(), i0, i1, i2)); Write(wxString::Format("%s %d,%d,%d", FixOp(op).wx_str(), i0, i1, i2));
} }
void DisAsm_INT1(const wxString& op, const int i0) void DisAsm_INT1(const wxString& op, const int i0)
{ {
Write(wxString::Format("%s %d", (const char*)FixOp(op).mb_str(), i0)); Write(wxString::Format("%s %d", FixOp(op).wx_str(), i0));
} }
void DisAsm_BRANCH(const wxString& op, const int pc) void DisAsm_BRANCH(const wxString& op, const int pc)
{ {
Write(wxString::Format("%s 0x%x", (const char*)FixOp(op).mb_str(), DisAsmBranchTarget(pc))); Write(wxString::Format("%s 0x%x", FixOp(op).wx_str(), DisAsmBranchTarget(pc)));
} }
void DisAsm_BRANCH_A(const wxString& op, const int pc) void DisAsm_BRANCH_A(const wxString& op, const int pc)
{ {
Write(wxString::Format("%s 0x%x", (const char*)FixOp(op).mb_str(), pc)); Write(wxString::Format("%s 0x%x", FixOp(op).wx_str(), pc));
} }
void DisAsm_B2_BRANCH(const wxString& op, u32 b0, u32 b1, const int pc) void DisAsm_B2_BRANCH(const wxString& op, u32 b0, u32 b1, const int pc)
{ {
Write(wxString::Format("%s %d,%d,0x%x ", (const char*)FixOp(op).mb_str(), b0, b1, DisAsmBranchTarget(pc))); Write(wxString::Format("%s %d,%d,0x%x ", FixOp(op).wx_str(), b0, b1, DisAsmBranchTarget(pc)));
} }
void DisAsm_CR_BRANCH(const wxString& op, u32 cr, const int pc) void DisAsm_CR_BRANCH(const wxString& op, u32 cr, const int pc)
{ {
Write(wxString::Format("%s cr%d,0x%x ", (const char*)FixOp(op).mb_str(), cr, DisAsmBranchTarget(pc))); Write(wxString::Format("%s cr%d,0x%x ", FixOp(op).wx_str(), cr, DisAsmBranchTarget(pc)));
} }
private: private:

View file

@ -3950,7 +3950,7 @@ private:
for(uint i=0; i<32; ++i) ConLog.Write("r%d = 0x%llx", i, CPU.GPR[i]); for(uint i=0; i<32; ++i) ConLog.Write("r%d = 0x%llx", i, CPU.GPR[i]);
for(uint i=0; i<32; ++i) ConLog.Write("f%d = %llf", i, CPU.FPR[i]); for(uint i=0; i<32; ++i) ConLog.Write("f%d = %llf", i, CPU.FPR[i]);
for(uint i=0; i<32; ++i) ConLog.Write("v%d = 0x%s [%s]", i, CPU.VPR[i].ToString(true).mb_str(), CPU.VPR[i].ToString().mb_str()); for(uint i=0; i<32; ++i) ConLog.Write("v%d = 0x%s [%s]", i, CPU.VPR[i].ToString(true).wx_str(), CPU.VPR[i].ToString().wx_str());
ConLog.Write("CR = 0x%08x", CPU.CR); ConLog.Write("CR = 0x%08x", CPU.CR);
ConLog.Write("LR = 0x%llx", CPU.LR); ConLog.Write("LR = 0x%llx", CPU.LR);
ConLog.Write("CTR = 0x%llx", CPU.CTR); ConLog.Write("CTR = 0x%llx", CPU.CTR);

View file

@ -149,7 +149,7 @@ void CompilePPUProgram::WriteError(const wxString& error)
{ {
if(m_err_list) if(m_err_list)
{ {
m_err_list->WriteText(wxString::Format("line %lld: %s\n", m_line, (const char*)error.mb_str())); m_err_list->WriteText(wxString::Format("line %lld: %s\n", m_line, static_cast<const char*>(error)));
} }
} }
@ -373,7 +373,7 @@ void CompilePPUProgram::DetectArgInfo(Arg& arg)
{ {
for(u32 i=0; i<m_branches.GetCount(); ++i) for(u32 i=0; i<m_branches.GetCount(); ++i)
{ {
if(str.mb_str() != m_branches[i].m_name) if(str.ToStdString() != m_branches[i].m_name)
continue; continue;
arg.type = ARG_BRANCH; arg.type = ARG_BRANCH;
@ -534,7 +534,7 @@ u32 CompilePPUProgram::GetBranchValue(const wxString& branch)
{ {
for(u32 i=0; i<m_branches.GetCount(); ++i) for(u32 i=0; i<m_branches.GetCount(); ++i)
{ {
if(branch.mb_str() != m_branches[i].m_name) if(branch.ToStdString() != m_branches[i].m_name)
continue; continue;
if(m_branches[i].m_pos >= 0) return m_text_addr + m_branches[i].m_pos * 4; if(m_branches[i].m_pos >= 0) return m_text_addr + m_branches[i].m_pos * 4;
@ -667,7 +667,7 @@ CompilePPUProgram::Branch& CompilePPUProgram::GetBranch(const wxString& name)
{ {
for(u32 i=0; i<m_branches.GetCount(); ++i) for(u32 i=0; i<m_branches.GetCount(); ++i)
{ {
if(name.mb_str() != m_branches[i].m_name) continue; if(name.ToStdString() != m_branches[i].m_name) continue;
return m_branches[i]; return m_branches[i];
} }
@ -687,7 +687,7 @@ void CompilePPUProgram::SetSp(const wxString& name, u32 addr, bool create)
for(u32 i=0; i<m_branches.GetCount(); ++i) for(u32 i=0; i<m_branches.GetCount(); ++i)
{ {
if(name.mb_str() != m_branches[i].m_name) if(name.ToStdString() != m_branches[i].m_name)
continue; continue;
m_branches[i].m_addr = addr; m_branches[i].m_addr = addr;
} }
@ -701,7 +701,7 @@ void CompilePPUProgram::LoadSp(const wxString& op, Elf64_Shdr& s_opd)
if(!GetArg(test) || test[0] != '[') if(!GetArg(test) || test[0] != '[')
{ {
if(m_analyze) WriteHex("error\n"); if(m_analyze) WriteHex("error\n");
WriteError(wxString::Format("data not found. style: %s", (const char*)GetSpStyle(sp).mb_str())); WriteError(wxString::Format("data not found. style: %s", GetSpStyle(sp).wx_str()));
m_error = true; m_error = true;
NextLn(); NextLn();
return; return;
@ -714,7 +714,7 @@ void CompilePPUProgram::LoadSp(const wxString& op, Elf64_Shdr& s_opd)
if(!GetArg(dst)) if(!GetArg(dst))
{ {
if(m_analyze) WriteHex("error\n"); if(m_analyze) WriteHex("error\n");
WriteError(wxString::Format("dst not found. style: %s", (const char*)GetSpStyle(sp).mb_str())); WriteError(wxString::Format("dst not found. style: %s", GetSpStyle(sp).wx_str()));
m_error = true; m_error = true;
NextLn(); NextLn();
return; return;
@ -745,7 +745,7 @@ void CompilePPUProgram::LoadSp(const wxString& op, Elf64_Shdr& s_opd)
if(!dst_branch) if(!dst_branch)
{ {
if(m_analyze) WriteHex("error\n"); if(m_analyze) WriteHex("error\n");
WriteError(wxString::Format("bad dst type. style: %s", (const char*)GetSpStyle(sp).mb_str())); WriteError(wxString::Format("bad dst type. style: %s", GetSpStyle(sp).wx_str()));
m_error = true; m_error = true;
NextLn(); NextLn();
return; return;
@ -763,7 +763,7 @@ void CompilePPUProgram::LoadSp(const wxString& op, Elf64_Shdr& s_opd)
if(!GetArg(src1, true)) if(!GetArg(src1, true))
{ {
if(m_analyze) WriteHex("error\n"); if(m_analyze) WriteHex("error\n");
WriteError(wxString::Format("src not found. style: %s", (const char*)GetSpStyle(sp).mb_str())); WriteError(wxString::Format("src not found. style: %s", GetSpStyle(sp).wx_str()));
m_error = true; m_error = true;
NextLn(); NextLn();
return; return;
@ -779,7 +779,7 @@ void CompilePPUProgram::LoadSp(const wxString& op, Elf64_Shdr& s_opd)
: ~(ARG_IMM | ARG_BRANCH) & a_src1.type) : ~(ARG_IMM | ARG_BRANCH) & a_src1.type)
{ {
if(m_analyze) WriteHex("error\n"); if(m_analyze) WriteHex("error\n");
WriteError(wxString::Format("bad src type. style: %s", (const char*)GetSpStyle(sp).mb_str())); WriteError(wxString::Format("bad src type. style: %s", GetSpStyle(sp).wx_str()));
m_error = true; m_error = true;
NextLn(); NextLn();
return; return;
@ -788,7 +788,7 @@ void CompilePPUProgram::LoadSp(const wxString& op, Elf64_Shdr& s_opd)
if(m_asm[(size_t)p - 1] != ']') if(m_asm[(size_t)p - 1] != ']')
{ {
if(m_analyze) WriteHex("error\n"); if(m_analyze) WriteHex("error\n");
WriteError(wxString::Format("']' not found. style: %s", (const char*)GetSpStyle(sp).mb_str())); WriteError(wxString::Format("']' not found. style: %s", GetSpStyle(sp).wx_str()));
m_error = true; m_error = true;
NextLn(); NextLn();
return; return;
@ -807,7 +807,7 @@ void CompilePPUProgram::LoadSp(const wxString& op, Elf64_Shdr& s_opd)
for(u32 i=0; i<m_sp_string.GetCount(); ++i) for(u32 i=0; i<m_sp_string.GetCount(); ++i)
{ {
if(src1.mb_str() != m_sp_string[i].m_data) continue; if(src1.ToStdString() != m_sp_string[i].m_data) continue;
*dst_branch = Branch(dst, -1, m_sp_string[i].m_addr); *dst_branch = Branch(dst, -1, m_sp_string[i].m_addr);
founded = true; founded = true;
} }
@ -869,7 +869,7 @@ void CompilePPUProgram::LoadSp(const wxString& op, Elf64_Shdr& s_opd)
if(!GetArg(src1)) if(!GetArg(src1))
{ {
if(m_analyze) WriteHex("error\n"); if(m_analyze) WriteHex("error\n");
WriteError(wxString::Format("src1 not found. style: %s", (const char*)GetSpStyle(sp).mb_str())); WriteError(wxString::Format("src1 not found. style: %s", GetSpStyle(sp).wx_str()));
m_error = true; m_error = true;
NextLn(); NextLn();
return; return;
@ -881,7 +881,7 @@ void CompilePPUProgram::LoadSp(const wxString& op, Elf64_Shdr& s_opd)
if(~(ARG_IMM | ARG_BRANCH) & a_src1.type) if(~(ARG_IMM | ARG_BRANCH) & a_src1.type)
{ {
if(m_analyze) WriteHex("error\n"); if(m_analyze) WriteHex("error\n");
WriteError(wxString::Format("bad src1 type. style: %s", (const char*)GetSpStyle(sp).mb_str())); WriteError(wxString::Format("bad src1 type. style: %s", GetSpStyle(sp).wx_str()));
m_error = true; m_error = true;
NextLn(); NextLn();
return; return;
@ -891,7 +891,7 @@ void CompilePPUProgram::LoadSp(const wxString& op, Elf64_Shdr& s_opd)
if(!GetArg(src2, true)) if(!GetArg(src2, true))
{ {
if(m_analyze) WriteHex("error\n"); if(m_analyze) WriteHex("error\n");
WriteError(wxString::Format("src2 not found. style: %s", (const char*)GetSpStyle(sp).mb_str())); WriteError(wxString::Format("src2 not found. style: %s", GetSpStyle(sp).wx_str()));
m_error = true; m_error = true;
return; return;
} }
@ -902,7 +902,7 @@ void CompilePPUProgram::LoadSp(const wxString& op, Elf64_Shdr& s_opd)
if(~(ARG_IMM | ARG_BRANCH) & a_src2.type) if(~(ARG_IMM | ARG_BRANCH) & a_src2.type)
{ {
if(m_analyze) WriteHex("error\n"); if(m_analyze) WriteHex("error\n");
WriteError(wxString::Format("bad src2 type. style: %s", (const char*)GetSpStyle(sp).mb_str())); WriteError(wxString::Format("bad src2 type. style: %s", GetSpStyle(sp).wx_str()));
m_error = true; m_error = true;
NextLn(); NextLn();
return; return;
@ -911,7 +911,7 @@ void CompilePPUProgram::LoadSp(const wxString& op, Elf64_Shdr& s_opd)
if(m_asm[(size_t)p - 1] != ']') if(m_asm[(size_t)p - 1] != ']')
{ {
if(m_analyze) WriteHex("error\n"); if(m_analyze) WriteHex("error\n");
WriteError(wxString::Format("']' not found. style: %s", (const char*)GetSpStyle(sp).mb_str())); WriteError(wxString::Format("']' not found. style: %s", GetSpStyle(sp).wx_str()));
m_error = true; m_error = true;
NextLn(); NextLn();
return; return;
@ -1339,8 +1339,8 @@ void CompilePPUProgram::Compile()
for(u32 i=0; i<m_branches.GetCount(); ++i) for(u32 i=0; i<m_branches.GetCount(); ++i)
{ {
if(name.mb_str() != m_branches[i].m_name) continue; if(name.ToStdString() != m_branches[i].m_name) continue;
WriteError(wxString::Format("'%s' already declared", (const char*)name.mb_str())); WriteError(wxString::Format("'%s' already declared", name.wx_str()));
m_error = true; m_error = true;
break; break;
} }
@ -1350,7 +1350,7 @@ void CompilePPUProgram::Compile()
if(a_name.type != ARG_ERR) if(a_name.type != ARG_ERR)
{ {
WriteError(wxString::Format("bad name '%s'", (const char*)name.mb_str())); WriteError(wxString::Format("bad name '%s'", name.wx_str()));
m_error = true; m_error = true;
} }
@ -1430,7 +1430,7 @@ void CompilePPUProgram::Compile()
} }
else else
{ {
WriteError(wxString::Format("unknown instruction '%s'", (const char*)op.mb_str())); WriteError(wxString::Format("unknown instruction '%s'", op.wx_str()));
EndLn(); EndLn();
m_error = true; m_error = true;
} }

View file

@ -737,7 +737,7 @@ public:
for(uint i=0; i<32; ++i) ret += wxString::Format("GPR[%d] = 0x%llx\n", i, GPR[i]); for(uint i=0; i<32; ++i) ret += wxString::Format("GPR[%d] = 0x%llx\n", i, GPR[i]);
for(uint i=0; i<32; ++i) ret += wxString::Format("FPR[%d] = %.6G\n", i, (double)FPR[i]); for(uint i=0; i<32; ++i) ret += wxString::Format("FPR[%d] = %.6G\n", i, (double)FPR[i]);
for(uint i=0; i<32; ++i) ret += wxString::Format("VPR[%d] = 0x%s [%s]\n", i, (const char*)VPR[i].ToString(true).mb_str(), (const char*)VPR[i].ToString().mb_str()); for(uint i=0; i<32; ++i) ret += wxString::Format("VPR[%d] = 0x%s [%s]\n", i, (const char*)VPR[i].ToString(true).wx_str(), (const char*)VPR[i].ToString().wx_str());
ret += wxString::Format("CR = 0x%08x\n", CR.CR); ret += wxString::Format("CR = 0x%08x\n", CR.CR);
ret += wxString::Format("LR = 0x%llx\n", LR); ret += wxString::Format("LR = 0x%llx\n", LR);
ret += wxString::Format("CTR = 0x%llx\n", CTR); ret += wxString::Format("CTR = 0x%llx\n", CTR);

View file

@ -251,7 +251,7 @@ u32 RawSPUThread::GetIndex() const
void RawSPUThread::Task() void RawSPUThread::Task()
{ {
ConLog.Write("%s enter", PPCThread::GetFName().mb_str()); ConLog.Write("%s enter", PPCThread::GetFName().wx_str());
const Array<u64>& bp = Emu.GetBreakPoints(); const Array<u64>& bp = Emu.GetBreakPoints();
@ -327,12 +327,12 @@ void RawSPUThread::Task()
} }
catch(const wxString& e) catch(const wxString& e)
{ {
ConLog.Error("Exception: %s", e.mb_str()); ConLog.Error("Exception: %s", e.wx_str());
} }
catch(const char* e) catch(const char* e)
{ {
ConLog.Error("Exception: %s", e); ConLog.Error("Exception: %s", e);
} }
ConLog.Write("%s leave", PPCThread::GetFName().mb_str()); ConLog.Write("%s leave", PPCThread::GetFName().wx_str());
} }

View file

@ -37,43 +37,43 @@ private:
} }
void DisAsm(wxString op, u32 a1) void DisAsm(wxString op, u32 a1)
{ {
Write(wxString::Format("%s 0x%x", (const char*)FixOp(op).mb_str(), a1)); Write(wxString::Format("%s 0x%x", FixOp(op).wx_str(), a1));
} }
void DisAsm(wxString op, const char* a1) void DisAsm(wxString op, const char* a1)
{ {
Write(wxString::Format("%s %s", (const char*)FixOp(op).mb_str(), a1)); Write(wxString::Format("%s %s", FixOp(op).wx_str(), a1));
} }
void DisAsm(wxString op, const char* a1, const char* a2) void DisAsm(wxString op, const char* a1, const char* a2)
{ {
Write(wxString::Format("%s %s,%s", (const char*)FixOp(op).mb_str(), a1, a2)); Write(wxString::Format("%s %s,%s", FixOp(op).wx_str(), a1, a2));
} }
void DisAsm(wxString op, int a1, const char* a2) void DisAsm(wxString op, int a1, const char* a2)
{ {
Write(wxString::Format("%s 0x%x,%s", (const char*)FixOp(op).mb_str(), a1, a2)); Write(wxString::Format("%s 0x%x,%s", FixOp(op).wx_str(), a1, a2));
} }
void DisAsm(wxString op, const char* a1, int a2) void DisAsm(wxString op, const char* a1, int a2)
{ {
Write(wxString::Format("%s %s,0x%x", (const char*)FixOp(op).mb_str(), a1, a2)); Write(wxString::Format("%s %s,0x%x", FixOp(op).wx_str(), a1, a2));
} }
void DisAsm(wxString op, int a1, int a2) void DisAsm(wxString op, int a1, int a2)
{ {
Write(wxString::Format("%s 0x%x,0x%x", (const char*)FixOp(op).mb_str(), a1, a2)); Write(wxString::Format("%s 0x%x,0x%x", FixOp(op).wx_str(), a1, a2));
} }
void DisAsm(wxString op, const char* a1, const char* a2, const char* a3) void DisAsm(wxString op, const char* a1, const char* a2, const char* a3)
{ {
Write(wxString::Format("%s %s,%s,%s", (const char*)FixOp(op).mb_str(), a1, a2, a3)); Write(wxString::Format("%s %s,%s,%s", FixOp(op).wx_str(), a1, a2, a3));
} }
void DisAsm(wxString op, const char* a1, int a2, const char* a3) void DisAsm(wxString op, const char* a1, int a2, const char* a3)
{ {
Write(wxString::Format("%s %s,0x%x(%s)", (const char*)FixOp(op).mb_str(), a1, a2, a3)); Write(wxString::Format("%s %s,0x%x(%s)", FixOp(op).wx_str(), a1, a2, a3));
} }
void DisAsm(wxString op, const char* a1, const char* a2, int a3) void DisAsm(wxString op, const char* a1, const char* a2, int a3)
{ {
Write(wxString::Format("%s %s,%s,0x%x", (const char*)FixOp(op).mb_str(), a1, a2, a3)); Write(wxString::Format("%s %s,%s,0x%x", FixOp(op).wx_str(), a1, a2, a3));
} }
void DisAsm(wxString op, const char* a1, const char* a2, const char* a3, const char* a4) void DisAsm(wxString op, const char* a1, const char* a2, const char* a3, const char* a4)
{ {
Write(wxString::Format("%s %s,%s,%s,%s", (const char*)FixOp(op).mb_str(), a1, a2, a3, a4)); Write(wxString::Format("%s %s,%s,%s,%s", FixOp(op).wx_str(), a1, a2, a3, a4));
} }
//0 - 10 //0 - 10
void STOP(u32 code) void STOP(u32 code)

View file

@ -1426,6 +1426,6 @@ private:
{ {
ConLog.Error(err + wxString::Format(" #pc: 0x%x", CPU.PC)); ConLog.Error(err + wxString::Format(" #pc: 0x%x", CPU.PC));
Emu.Pause(); Emu.Pause();
for(uint i=0; i<128; ++i) ConLog.Write("r%d = 0x%s", i, (const char*)CPU.GPR[i].ToString().mb_str()); for(uint i=0; i<128; ++i) ConLog.Write("r%d = 0x%s", i, CPU.GPR[i].ToString().wx_str());
} }
}; };

View file

@ -748,7 +748,7 @@ public:
{ {
wxString ret = "Registers:\n=========\n"; wxString ret = "Registers:\n=========\n";
for(uint i=0; i<128; ++i) ret += wxString::Format("GPR[%d] = 0x%s\n", i, (const char*)GPR[i].ToString().mb_str()); for(uint i=0; i<128; ++i) ret += wxString::Format("GPR[%d] = 0x%s\n", i, GPR[i].ToString().wx_str());
return ret; return ret;
} }

View file

@ -20,7 +20,7 @@ int GLProgram::GetLocation(const wxString& name)
m_locations[pos].name = name; m_locations[pos].name = name;
m_locations[pos].loc = glGetUniformLocation(id, name); m_locations[pos].loc = glGetUniformLocation(id, name);
checkForGlError(wxString::Format("glGetUniformLocation(0x%x, %s)", id, (const char*)name.mb_str())); checkForGlError(wxString::Format("glGetUniformLocation(0x%x, %s)", id, name.wx_str()));
return m_locations[pos].loc; return m_locations[pos].loc;
} }

View file

@ -314,16 +314,16 @@ wxString GLVertexDecompilerThread::BuildCode()
for(int i=m_funcs.GetCount() - 1; i>0; --i) for(int i=m_funcs.GetCount() - 1; i>0; --i)
{ {
fp += wxString::Format("void %s();\n", (const char*)m_funcs[i].name.mb_str()); fp += wxString::Format("void %s();\n", m_funcs[i].name.wx_str());
} }
wxString f = wxEmptyString; wxString f = wxEmptyString;
f += wxString::Format("void %s()\n{\n\tgl_Position = vec4(0.0f, 0.0f, 0.0f, 1.0f);\n%s}\n", (const char*)m_funcs[0].name.mb_str(), (const char*)BuildFuncBody(m_funcs[0]).mb_str()); f += wxString::Format("void %s()\n{\n\tgl_Position = vec4(0.0f, 0.0f, 0.0f, 1.0f);\n%s}\n", m_funcs[0].name.wx_str(), BuildFuncBody(m_funcs[0]).wx_str());
for(uint i=1; i<m_funcs.GetCount(); ++i) for(uint i=1; i<m_funcs.GetCount(); ++i)
{ {
f += wxString::Format("\nvoid %s()\n{\n%s}\n", (const char*)m_funcs[i].name.mb_str(), (const char*)BuildFuncBody(m_funcs[i]).mb_str()); f += wxString::Format("\nvoid %s()\n{\n%s}\n", m_funcs[i].name.wx_str(), BuildFuncBody(m_funcs[i]).wx_str());
} }
static const wxString& prot = static const wxString& prot =
@ -333,7 +333,7 @@ wxString GLVertexDecompilerThread::BuildCode()
"%s\n" "%s\n"
"%s"; "%s";
return wxString::Format(prot, (const char*)p.mb_str(), (const char*)fp.mb_str(), (const char*)f.mb_str()); return wxString::Format(prot, p.wx_str(), fp.wx_str(), f.wx_str());
} }
void GLVertexDecompilerThread::Task() void GLVertexDecompilerThread::Task()

View file

@ -412,7 +412,7 @@ void Module::Log(const u32 id, wxString fmt, ...)
{ {
va_list list; va_list list;
va_start(list, fmt); va_start(list, fmt);
ConLog.Write(GetName() + wxString::Format("[%d]: ", id).mb_str() + wxString::FormatV(fmt, list).mb_str()); ConLog.Write(GetName() + wxString::Format("[%d]: ", id).wx_str() + wxString::FormatV(fmt, list).wx_str());
va_end(list); va_end(list);
} }
} }
@ -423,7 +423,7 @@ void Module::Log(wxString fmt, ...)
{ {
va_list list; va_list list;
va_start(list, fmt); va_start(list, fmt);
ConLog.Write(GetName() + ": " + wxString::FormatV(fmt, list).mb_str()); ConLog.Write(GetName() + ": " + wxString::FormatV(fmt, list).wx_str());
va_end(list); va_end(list);
} }
} }
@ -432,7 +432,7 @@ void Module::Warning(const u32 id, wxString fmt, ...)
{ {
va_list list; va_list list;
va_start(list, fmt); va_start(list, fmt);
ConLog.Warning(GetName() + wxString::Format("[%d] warning: ", id).mb_str() + wxString::FormatV(fmt, list).mb_str()); ConLog.Warning(GetName() + wxString::Format("[%d] warning: ", id).wx_str() + wxString::FormatV(fmt, list).wx_str());
va_end(list); va_end(list);
} }
@ -440,7 +440,7 @@ void Module::Warning(wxString fmt, ...)
{ {
va_list list; va_list list;
va_start(list, fmt); va_start(list, fmt);
ConLog.Warning(GetName() + " warning: " + wxString::FormatV(fmt, list).mb_str()); ConLog.Warning(GetName() + " warning: " + wxString::FormatV(fmt, list).wx_str());
va_end(list); va_end(list);
} }
@ -448,7 +448,7 @@ void Module::Error(const u32 id, wxString fmt, ...)
{ {
va_list list; va_list list;
va_start(list, fmt); va_start(list, fmt);
ConLog.Error(GetName() + wxString::Format("[%d] error: ", id).mb_str() + wxString::FormatV(fmt, list).mb_str()); ConLog.Error(GetName() + wxString::Format("[%d] error: ", id).wx_str() + wxString::FormatV(fmt, list).wx_str());
va_end(list); va_end(list);
} }
@ -456,7 +456,7 @@ void Module::Error(wxString fmt, ...)
{ {
va_list list; va_list list;
va_start(list, fmt); va_start(list, fmt);
ConLog.Error(GetName() + " error: " + wxString::FormatV(fmt, list).mb_str()); ConLog.Error(GetName() + " error: " + wxString::FormatV(fmt, list).wx_str());
va_end(list); va_end(list);
} }

View file

@ -55,7 +55,7 @@ s64 sys_prx_exitspawn_with_level()
s64 sys_strlen(u32 addr) s64 sys_strlen(u32 addr)
{ {
const wxString& str = Memory.ReadString(addr); const wxString& str = Memory.ReadString(addr);
sysPrxForUser.Log("sys_strlen(0x%x - \"%s\")", addr, str.mb_str()); sysPrxForUser.Log("sys_strlen(0x%x - \"%s\")", addr, str.wx_str());
return str.Len(); return str.Len();
} }
@ -100,7 +100,7 @@ int sys_spu_image_close(mem_ptr_t<sys_spu_image> img)
int sys_raw_spu_load(int id, u32 path_addr, mem32_t entry) int sys_raw_spu_load(int id, u32 path_addr, mem32_t entry)
{ {
const wxString path = Memory.ReadString(path_addr).mb_str(); const wxString path = Memory.ReadString(path_addr).wx_str();
sysPrxForUser.Warning("sys_raw_spu_load(id=0x%x, path=0x%x [%s], entry_addr=0x%x)", sysPrxForUser.Warning("sys_raw_spu_load(id=0x%x, path=0x%x [%s], entry_addr=0x%x)",
id, path_addr, path.c_str(), entry.GetAddr()); id, path_addr, path.c_str(), entry.GetAddr());

View file

@ -40,14 +40,14 @@ int sdata_unpack(wxString packed_file, wxString unpacked_file)
if(!packed_stream || !packed_stream->IsOpened()) if(!packed_stream || !packed_stream->IsOpened())
{ {
sys_fs.Error("'%s' not found! flags: 0x%08x", packed_file.mb_str(), vfsRead); sys_fs.Error("'%s' not found! flags: 0x%08x", packed_file.wx_str(), vfsRead);
delete packed_stream; delete packed_stream;
return CELL_ENOENT; return CELL_ENOENT;
} }
if(!unpacked_stream || !unpacked_stream->IsOpened()) if(!unpacked_stream || !unpacked_stream->IsOpened())
{ {
sys_fs.Error("'%s' couldn't be created! flags: 0x%08x", unpacked_file.mb_str(), vfsWrite); sys_fs.Error("'%s' couldn't be created! flags: 0x%08x", unpacked_file.wx_str(), vfsWrite);
delete unpacked_stream; delete unpacked_stream;
return CELL_ENOENT; return CELL_ENOENT;
} }
@ -116,7 +116,7 @@ int cellFsSdataOpen(u32 path_addr, int flags, mem32_t fd, mem32_t arg, u64 size)
{ {
const wxString& path = Memory.ReadString(path_addr); const wxString& path = Memory.ReadString(path_addr);
sys_fs.Warning("cellFsSdataOpen(path: %s, flags: 0x%x, fd_addr: 0x%x, arg_addr: 0x%x, size: 0x%llx)", sys_fs.Warning("cellFsSdataOpen(path: %s, flags: 0x%x, fd_addr: 0x%x, arg_addr: 0x%x, size: 0x%llx)",
path.mb_str(), flags, fd.GetAddr(), arg.GetAddr(), size); path.wx_str(), flags, fd.GetAddr(), arg.GetAddr(), size);
if (!fd.IsGood() || (!arg.IsGood() && size)) if (!fd.IsGood() || (!arg.IsGood() && size))
return CELL_EFAULT; return CELL_EFAULT;

View file

@ -36,7 +36,7 @@ public:
{ {
va_list list; va_list list;
va_start(list, fmt); va_start(list, fmt);
ConLog.Write(GetName() + wxString::Format("[%d]: ", id).mb_str() + wxString::FormatV(fmt, list).mb_str()); ConLog.Write(GetName() + wxString::Format("[%d]: ", id).wx_str() + wxString::FormatV(fmt, list).wx_str());
va_end(list); va_end(list);
} }
} }
@ -47,7 +47,7 @@ public:
{ {
va_list list; va_list list;
va_start(list, fmt); va_start(list, fmt);
ConLog.Write(GetName() + ": " + wxString::FormatV(fmt, list).mb_str()); ConLog.Write(GetName() + ": " + wxString::FormatV(fmt, list).wx_str());
va_end(list); va_end(list);
} }
} }
@ -57,7 +57,7 @@ public:
//#ifdef SYSCALLS_DEBUG //#ifdef SYSCALLS_DEBUG
va_list list; va_list list;
va_start(list, fmt); va_start(list, fmt);
ConLog.Warning(GetName() + wxString::Format("[%d] warning: ", id).mb_str() + wxString::FormatV(fmt, list).mb_str()); ConLog.Warning(GetName() + wxString::Format("[%d] warning: ", id).wx_str() + wxString::FormatV(fmt, list).wx_str());
va_end(list); va_end(list);
//#endif //#endif
} }
@ -67,7 +67,7 @@ public:
//#ifdef SYSCALLS_DEBUG //#ifdef SYSCALLS_DEBUG
va_list list; va_list list;
va_start(list, fmt); va_start(list, fmt);
ConLog.Warning(GetName() + " warning: " + wxString::FormatV(fmt, list).mb_str()); ConLog.Warning(GetName() + " warning: " + wxString::FormatV(fmt, list).wx_str());
va_end(list); va_end(list);
//#endif //#endif
} }
@ -76,7 +76,7 @@ public:
{ {
va_list list; va_list list;
va_start(list, fmt); va_start(list, fmt);
ConLog.Error(GetName() + wxString::Format("[%d] error: ", id).mb_str() + wxString::FormatV(fmt, list).mb_str()); ConLog.Error(GetName() + wxString::Format("[%d] error: ", id).wx_str() + wxString::FormatV(fmt, list).wx_str());
va_end(list); va_end(list);
} }
@ -84,7 +84,7 @@ public:
{ {
va_list list; va_list list;
va_start(list, fmt); va_start(list, fmt);
ConLog.Error(GetName() + " error: " + wxString::FormatV(fmt, list).mb_str()); ConLog.Error(GetName() + " error: " + wxString::FormatV(fmt, list).wx_str());
va_end(list); va_end(list);
} }

View file

@ -8,7 +8,7 @@ int cellFsOpen(u32 path_addr, int flags, mem32_t fd, mem32_t arg, u64 size)
{ {
const wxString& path = Memory.ReadString(path_addr); const wxString& path = Memory.ReadString(path_addr);
sys_fs.Log("cellFsOpen(path: %s, flags: 0x%x, fd_addr: 0x%x, arg_addr: 0x%x, size: 0x%llx)", sys_fs.Log("cellFsOpen(path: %s, flags: 0x%x, fd_addr: 0x%x, arg_addr: 0x%x, size: 0x%llx)",
path.mb_str(), flags, fd.GetAddr(), arg.GetAddr(), size); path.wx_str(), flags, fd.GetAddr(), arg.GetAddr(), size);
const wxString& ppath = path; const wxString& ppath = path;
//ConLog.Warning("path: %s [%s]", ppath, path); //ConLog.Warning("path: %s [%s]", ppath, path);
@ -57,7 +57,7 @@ int cellFsOpen(u32 path_addr, int flags, mem32_t fd, mem32_t arg, u64 size)
if(_oflags != 0) if(_oflags != 0)
{ {
sys_fs.Error("'%s' has unknown flags! flags: 0x%08x", ppath.mb_str(), flags); sys_fs.Error("'%s' has unknown flags! flags: 0x%08x", ppath.wx_str(), flags);
return CELL_EINVAL; return CELL_EINVAL;
} }
@ -65,14 +65,14 @@ int cellFsOpen(u32 path_addr, int flags, mem32_t fd, mem32_t arg, u64 size)
if(!stream || !stream->IsOpened()) if(!stream || !stream->IsOpened())
{ {
sys_fs.Error("'%s' not found! flags: 0x%08x", ppath.mb_str(), flags); sys_fs.Error("'%s' not found! flags: 0x%08x", ppath.wx_str(), flags);
delete stream; delete stream;
return CELL_ENOENT; return CELL_ENOENT;
} }
fd = sys_fs.GetNewId(stream, flags); fd = sys_fs.GetNewId(stream, flags);
ConLog.Warning("*** cellFsOpen(path: %s): fd=%d", path.mb_str(), fd.GetValue()); ConLog.Warning("*** cellFsOpen(path: %s): fd=%d", path.wx_str(), fd.GetValue());
return CELL_OK; return CELL_OK;
} }
@ -132,7 +132,7 @@ int cellFsClose(u32 fd)
int cellFsOpendir(u32 path_addr, mem32_t fd) int cellFsOpendir(u32 path_addr, mem32_t fd)
{ {
const wxString& path = Memory.ReadString(path_addr); const wxString& path = Memory.ReadString(path_addr);
sys_fs.Warning("cellFsOpendir(path=\"%s\", fd_addr=0x%x)", path.mb_str(), fd.GetAddr()); sys_fs.Warning("cellFsOpendir(path=\"%s\", fd_addr=0x%x)", path.wx_str(), fd.GetAddr());
if(!Memory.IsGoodAddr(path_addr) || !fd.IsGood()) if(!Memory.IsGoodAddr(path_addr) || !fd.IsGood())
return CELL_EFAULT; return CELL_EFAULT;
@ -161,7 +161,7 @@ int cellFsReaddir(u32 fd, mem_ptr_t<CellFsDirent> dir, mem64_t nread)
if(info) if(info)
{ {
nread = 1; nread = 1;
Memory.WriteString(dir.GetAddr()+2, info->name.mb_str()); Memory.WriteString(dir.GetAddr()+2, info->name.wx_str());
dir->d_namlen = info->name.Length(); dir->d_namlen = info->name.Length();
dir->d_type = (info->flags & 0x1) ? CELL_FS_TYPE_REGULAR : CELL_FS_TYPE_DIRECTORY; dir->d_type = (info->flags & 0x1) ? CELL_FS_TYPE_REGULAR : CELL_FS_TYPE_DIRECTORY;
} }
@ -186,7 +186,7 @@ int cellFsClosedir(u32 fd)
int cellFsStat(const u32 path_addr, mem_ptr_t<CellFsStat> sb) int cellFsStat(const u32 path_addr, mem_ptr_t<CellFsStat> sb)
{ {
const wxString& path = Memory.ReadString(path_addr); const wxString& path = Memory.ReadString(path_addr);
sys_fs.Log("cellFsStat(path: %s, sb_addr: 0x%x)", path.mb_str(), sb.GetAddr()); sys_fs.Log("cellFsStat(path: %s, sb_addr: 0x%x)", path.wx_str(), sb.GetAddr());
sb->st_mode = sb->st_mode =
CELL_FS_S_IRUSR | CELL_FS_S_IWUSR | CELL_FS_S_IXUSR | CELL_FS_S_IRUSR | CELL_FS_S_IWUSR | CELL_FS_S_IXUSR |
@ -205,7 +205,7 @@ int cellFsStat(const u32 path_addr, mem_ptr_t<CellFsStat> sb)
{ {
if(path.CmpNoCase(Emu.GetVFS().m_devices[i].GetPs3Path().RemoveLast(1)) == 0) if(path.CmpNoCase(Emu.GetVFS().m_devices[i].GetPs3Path().RemoveLast(1)) == 0)
{ {
sys_fs.Log("cellFsStat: '%s' is a mount point.", path.mb_str()); sys_fs.Log("cellFsStat: '%s' is a mount point.", path.wx_str());
sb->st_mode |= CELL_FS_S_IFDIR; sb->st_mode |= CELL_FS_S_IFDIR;
return CELL_OK; return CELL_OK;
} }
@ -230,7 +230,7 @@ int cellFsStat(const u32 path_addr, mem_ptr_t<CellFsStat> sb)
} }
else else
{ {
sys_fs.Warning("cellFsStat: '%s' not found.", path.mb_str()); sys_fs.Warning("cellFsStat: '%s' not found.", path.wx_str());
return CELL_ENOENT; return CELL_ENOENT;
} }
@ -264,7 +264,7 @@ int cellFsFstat(u32 fd, mem_ptr_t<CellFsStat> sb)
int cellFsMkdir(u32 path_addr, u32 mode) int cellFsMkdir(u32 path_addr, u32 mode)
{ {
const wxString& ps3_path = Memory.ReadString(path_addr); const wxString& ps3_path = Memory.ReadString(path_addr);
sys_fs.Log("cellFsMkdir(path=\"%s\", mode=0x%x)", ps3_path.mb_str(), mode); sys_fs.Log("cellFsMkdir(path=\"%s\", mode=0x%x)", ps3_path.wx_str(), mode);
wxString localPath; wxString localPath;
Emu.GetVFS().GetDevice(ps3_path, localPath); Emu.GetVFS().GetDevice(ps3_path, localPath);
@ -282,7 +282,7 @@ int cellFsRename(u32 from_addr, u32 to_addr)
Emu.GetVFS().GetDevice(ps3_from, from); Emu.GetVFS().GetDevice(ps3_from, from);
Emu.GetVFS().GetDevice(ps3_to, to); Emu.GetVFS().GetDevice(ps3_to, to);
sys_fs.Log("cellFsRename(from=\"%s\", to=\"%s\")", ps3_from.mb_str(), ps3_to.mb_str()); sys_fs.Log("cellFsRename(from=\"%s\", to=\"%s\")", ps3_from.wx_str(), ps3_to.wx_str());
if(!wxFileExists(from)) return CELL_ENOENT; if(!wxFileExists(from)) return CELL_ENOENT;
if(wxFileExists(to)) return CELL_EEXIST; if(wxFileExists(to)) return CELL_EEXIST;
if(!wxRenameFile(from, to)) return CELL_EBUSY; // (TODO: RenameFile(a,b) = CopyFile(a,b) + RemoveFile(a), therefore file "a" will not be removed if it is opened) if(!wxRenameFile(from, to)) return CELL_EBUSY; // (TODO: RenameFile(a,b) = CopyFile(a,b) + RemoveFile(a), therefore file "a" will not be removed if it is opened)
@ -292,7 +292,7 @@ int cellFsRename(u32 from_addr, u32 to_addr)
int cellFsRmdir(u32 path_addr) int cellFsRmdir(u32 path_addr)
{ {
const wxString& ps3_path = Memory.ReadString(path_addr); const wxString& ps3_path = Memory.ReadString(path_addr);
sys_fs.Log("cellFsRmdir(path=\"%s\")", ps3_path.mb_str()); sys_fs.Log("cellFsRmdir(path=\"%s\")", ps3_path.wx_str());
wxString localPath; wxString localPath;
Emu.GetVFS().GetDevice(ps3_path, localPath); Emu.GetVFS().GetDevice(ps3_path, localPath);
@ -304,7 +304,7 @@ int cellFsRmdir(u32 path_addr)
int cellFsUnlink(u32 path_addr) int cellFsUnlink(u32 path_addr)
{ {
const wxString& ps3_path = Memory.ReadString(path_addr); const wxString& ps3_path = Memory.ReadString(path_addr);
sys_fs.Warning("cellFsUnlink(path=\"%s\")", ps3_path.mb_str()); sys_fs.Warning("cellFsUnlink(path=\"%s\")", ps3_path.wx_str());
wxString localPath; wxString localPath;
Emu.GetVFS().GetDevice(ps3_path, localPath); Emu.GetVFS().GetDevice(ps3_path, localPath);
@ -360,12 +360,12 @@ int cellFsFtruncate(u32 fd, u64 size)
int cellFsTruncate(u32 path_addr, u64 size) int cellFsTruncate(u32 path_addr, u64 size)
{ {
const wxString& path = Memory.ReadString(path_addr); const wxString& path = Memory.ReadString(path_addr);
sys_fs.Log("cellFsTruncate(path: %s, size: %lld)", path.mb_str(), size); sys_fs.Log("cellFsTruncate(path: %s, size: %lld)", path.wx_str(), size);
vfsFile f(path, vfsReadWrite); vfsFile f(path, vfsReadWrite);
if(!f.IsOpened()) if(!f.IsOpened())
{ {
sys_fs.Warning("cellFsTruncate: '%s' not found.", path.mb_str()); sys_fs.Warning("cellFsTruncate: '%s' not found.", path.wx_str());
return CELL_ENOENT; return CELL_ENOENT;
} }
u64 initialSize = f.GetSize(); u64 initialSize = f.GetSize();

View file

@ -134,7 +134,7 @@ int sys_ppu_thread_restart(u32 thread_id)
int sys_ppu_thread_create(u32 thread_id_addr, u32 entry, u64 arg, int prio, u32 stacksize, u64 flags, u32 threadname_addr) int sys_ppu_thread_create(u32 thread_id_addr, u32 entry, u64 arg, int prio, u32 stacksize, u64 flags, u32 threadname_addr)
{ {
sysPrxForUser.Log("sys_ppu_thread_create(thread_id_addr=0x%x, entry=0x%x, arg=0x%x, prio=%d, stacksize=0x%x, flags=0x%llx, threadname_addr=0x%x('%s'))", sysPrxForUser.Log("sys_ppu_thread_create(thread_id_addr=0x%x, entry=0x%x, arg=0x%x, prio=%d, stacksize=0x%x, flags=0x%llx, threadname_addr=0x%x('%s'))",
thread_id_addr, entry, arg, prio, stacksize, flags, threadname_addr, Memory.ReadString(threadname_addr).mb_str()); thread_id_addr, entry, arg, prio, stacksize, flags, threadname_addr, Memory.ReadString(threadname_addr).wx_str());
if(!Memory.IsGoodAddr(entry) || !Memory.IsGoodAddr(thread_id_addr) || !Memory.IsGoodAddr(threadname_addr)) if(!Memory.IsGoodAddr(entry) || !Memory.IsGoodAddr(thread_id_addr) || !Memory.IsGoodAddr(threadname_addr))
{ {
@ -149,7 +149,7 @@ int sys_ppu_thread_create(u32 thread_id_addr, u32 entry, u64 arg, int prio, u32
new_thread.SetPrio(prio); new_thread.SetPrio(prio);
new_thread.SetStackSize(stacksize); new_thread.SetStackSize(stacksize);
//new_thread.flags = flags; //new_thread.flags = flags;
new_thread.SetName((const char*)Memory.ReadString(threadname_addr).mb_str()); new_thread.SetName(Memory.ReadString(threadname_addr).ToStdString());
new_thread.Run(); new_thread.Run();
new_thread.Exec(); new_thread.Exec();

View file

@ -49,7 +49,7 @@ int sys_game_process_exitspawn( u32 path_addr, u32 argv_addr, u32 envp_addr,
u32 data, u32 data_size, int prio, u64 flags ) u32 data, u32 data_size, int prio, u64 flags )
{ {
sc_p.Log("sys_game_process_exitspawn: "); sc_p.Log("sys_game_process_exitspawn: ");
sc_p.Log("path: %s", Memory.ReadString(path_addr).mb_str()); sc_p.Log("path: %s", Memory.ReadString(path_addr).wx_str());
sc_p.Log("argv: 0x%x", Memory.Read32(argv_addr)); sc_p.Log("argv: 0x%x", Memory.Read32(argv_addr));
sc_p.Log("envp: 0x%x", Memory.Read32(envp_addr)); sc_p.Log("envp: 0x%x", Memory.Read32(envp_addr));
sc_p.Log("data: 0x%x", data); sc_p.Log("data: 0x%x", data);

View file

@ -66,7 +66,7 @@ u32 LoadSpuImage(vfsStream& stream)
//156 //156
int sys_spu_image_open(mem_ptr_t<sys_spu_image> img, u32 path_addr) int sys_spu_image_open(mem_ptr_t<sys_spu_image> img, u32 path_addr)
{ {
const wxString path = Memory.ReadString(path_addr).mb_str(); const wxString path = Memory.ReadString(path_addr).wx_str();
sc_spu.Warning("sys_spu_image_open(img_addr=0x%x, path_addr=0x%x [%s])", img.GetAddr(), path_addr, path.c_str()); sc_spu.Warning("sys_spu_image_open(img_addr=0x%x, path_addr=0x%x [%s])", img.GetAddr(), path_addr, path.c_str());
if(!img.IsGood() || !Memory.IsGoodAddr(path_addr)) if(!img.IsGood() || !Memory.IsGoodAddr(path_addr))
@ -125,7 +125,7 @@ int sys_spu_thread_initialize(mem32_t thread, u32 group, u32 spu_num, mem_ptr_t<
} }
u32 spu_ep = (u32)img->entry_point; u32 spu_ep = (u32)img->entry_point;
std::string name = Memory.ReadString(attr->name_addr, attr->name_len).mb_str(); std::string name = Memory.ReadString(attr->name_addr, attr->name_len).ToStdString();
u64 a1 = arg->arg1; u64 a1 = arg->arg1;
u64 a2 = arg->arg2; u64 a2 = arg->arg2;
u64 a3 = arg->arg3; u64 a3 = arg->arg3;

View file

@ -188,7 +188,7 @@ void Emulator::Load()
{ {
if(!wxFileExists(m_path)) return; if(!wxFileExists(m_path)) return;
if(IsSelf((const char *)m_path.mb_str())) if(IsSelf(m_path.ToStdString()))
{ {
std::string self_path = m_path; std::string self_path = m_path;
std::string elf_path = wxFileName(m_path).GetPath().c_str(); std::string elf_path = wxFileName(m_path).GetPath().c_str();
@ -208,7 +208,7 @@ void Emulator::Load()
m_path = elf_path; m_path = elf_path;
} }
ConLog.Write("Loading '%s'...", m_path.mb_str()); ConLog.Write("Loading '%s'...", m_path.wx_str());
GetInfo().Reset(); GetInfo().Reset();
m_vfs.Init(m_path); m_vfs.Init(m_path);
@ -216,7 +216,7 @@ void Emulator::Load()
ConLog.Write("Mount info:"); ConLog.Write("Mount info:");
for(uint i=0; i<m_vfs.m_devices.GetCount(); ++i) for(uint i=0; i<m_vfs.m_devices.GetCount(); ++i)
{ {
ConLog.Write("%s -> %s", m_vfs.m_devices[i].GetPs3Path().mb_str(), m_vfs.m_devices[i].GetLocalPath().mb_str()); ConLog.Write("%s -> %s", m_vfs.m_devices[i].GetPs3Path().wx_str(), m_vfs.m_devices[i].GetLocalPath().wx_str());
} }
ConLog.SkipLn(); ConLog.SkipLn();
@ -229,7 +229,7 @@ void Emulator::Load()
if(!f.IsOpened()) if(!f.IsOpened())
{ {
ConLog.Error("Elf not found! (%s - %s)", m_path.mb_str(), m_elf_path.mb_str()); ConLog.Error("Elf not found! (%s - %s)", m_path.wx_str(), m_elf_path.wx_str());
return; return;
} }

View file

@ -148,22 +148,22 @@ void LogWriter::WriteToLog(std::string prefix, std::string value, std::string co
LogBuffer.Push(LogPacket(prefix, value, colour)); LogBuffer.Push(LogPacket(prefix, value, colour));
} }
wxString FormatV(const wxString fmt, va_list args) //wxString FormatV(const wxString fmt, va_list args)
{ //{
int length = 256; // int length = 256;
wxString str; // wxString str;
//
for(;;) // for(;;)
{ // {
str.Clear(); // str.Clear();
wxStringBuffer buf(str, length+1); // wxStringBuffer buf(str, length+1);
memset(buf, 0, length+1); // memset(buf, 0, length+1);
if(vsnprintf((char *)((wxStringCharType *)buf), length, fmt, args) != -1) break; // if(vsnprintf((char *)((wxStringCharType *)buf), length, fmt, args) != -1) break;
length *= 2; // length *= 2;
} // }
//
return str; // return str;
} //}
void LogWriter::Write(const wxString fmt, ...) void LogWriter::Write(const wxString fmt, ...)
{ {
@ -175,7 +175,7 @@ void LogWriter::Write(const wxString fmt, ...)
va_end(list); va_end(list);
WriteToLog("!", (const char *)frmt.mb_str(), "White"); WriteToLog("!", static_cast<const char *>(frmt), "White");
} }
void LogWriter::Error(const wxString fmt, ...) void LogWriter::Error(const wxString fmt, ...)
@ -183,11 +183,12 @@ void LogWriter::Error(const wxString fmt, ...)
va_list list; va_list list;
va_start(list, fmt); va_start(list, fmt);
const wxString& frmt = FormatV(fmt, list); wxString frmt;
frmt.PrintfV(fmt, list);
va_end(list); va_end(list);
WriteToLog("E", (const char *)frmt.mb_str(), "Red"); WriteToLog("E", static_cast<const char *>(frmt), "Red");
} }
void LogWriter::Warning(const wxString fmt, ...) void LogWriter::Warning(const wxString fmt, ...)
@ -195,11 +196,12 @@ void LogWriter::Warning(const wxString fmt, ...)
va_list list; va_list list;
va_start(list, fmt); va_start(list, fmt);
const wxString& frmt = FormatV(fmt, list); wxString frmt;
frmt.PrintfV(fmt, list);
va_end(list); va_end(list);
WriteToLog("W", (const char *)frmt.mb_str(), "Yellow"); WriteToLog("W", static_cast<const char *>(frmt), "Yellow");
} }
void LogWriter::Success(const wxString fmt, ...) void LogWriter::Success(const wxString fmt, ...)
@ -207,11 +209,12 @@ void LogWriter::Success(const wxString fmt, ...)
va_list list; va_list list;
va_start(list, fmt); va_start(list, fmt);
const wxString& frmt = FormatV(fmt, list); wxString frmt;
frmt.PrintfV(fmt, list);
va_end(list); va_end(list);
WriteToLog("S", (const char *)frmt.mb_str(), "Green"); WriteToLog("S", static_cast<const char *>(frmt), "Green");
} }
void LogWriter::SkipLn() void LogWriter::SkipLn()

View file

@ -295,7 +295,7 @@ void DisAsmFrame::Dump(wxCommandEvent& WXUNUSED(event))
if(ctrl.ShowModal() == wxID_CANCEL) return; if(ctrl.ShowModal() == wxID_CANCEL) return;
vfsStream& f_elf = *new vfsLocalFile(Emu.m_path); vfsStream& f_elf = *new vfsLocalFile(Emu.m_path);
ConLog.Write("path: %s", Emu.m_path.mb_str()); ConLog.Write("path: %s", Emu.m_path.wx_str());
Elf_Ehdr ehdr; Elf_Ehdr ehdr;
ehdr.Load(f_elf); ehdr.Load(f_elf);
@ -384,8 +384,8 @@ void DisAsmFrame::Dump(wxCommandEvent& WXUNUSED(event))
const wxString name = sh < name_arr.GetCount() ? name_arr[sh] : "Unknown"; const wxString name = sh < name_arr.GetCount() ? name_arr[sh] : "Unknown";
fd.Write(wxString::Format("Start of section header %s[%d] (instructions count: %d)\n", (const char*)name.mb_str(), sh, sh_size)); fd.Write(wxString::Format("Start of section header %s[%d] (instructions count: %d)\n", name.wx_str(), sh, sh_size));
prog_dial.Update(0, vsize, wxString::Format("Disasm %s section", (const char*)name.mb_str())); prog_dial.Update(0, vsize, wxString::Format("Disasm %s section", name.wx_str()));
if(Memory.IsGoodAddr(sh_addr)) if(Memory.IsGoodAddr(sh_addr))
{ {
@ -397,7 +397,7 @@ void DisAsmFrame::Dump(wxCommandEvent& WXUNUSED(event))
fd.Write(disasm->last_opcode); fd.Write(disasm->last_opcode);
} }
} }
fd.Write(wxString::Format("End of section header %s[%d]\n\n", (const char*)name.mb_str(), sh)); fd.Write(wxString::Format("End of section header %s[%d]\n\n", name.wx_str(), sh));
} }
prog_dial.Close(); prog_dial.Close();

View file

@ -91,9 +91,9 @@ void GameViewer::DClick(wxListEvent& event)
const wxString& path = m_path + m_game_data[i].root; const wxString& path = m_path + m_game_data[i].root;
Emu.Stop(); Emu.Stop();
if(!Emu.BootGame((const char *)path.mb_str())) if(!Emu.BootGame(path.ToStdString()))
{ {
ConLog.Error("Boot error: elf not found! [%s]", path.mb_str()); ConLog.Error("Boot error: elf not found! [%s]", path.wx_str());
return; return;
} }
Emu.Run(); Emu.Run();

View file

@ -192,13 +192,13 @@ void MainFrame::BootGame(wxCommandEvent& WXUNUSED(event))
Emu.Stop(); Emu.Stop();
if(Emu.BootGame((const char *)ctrl.GetPath().mb_str())) if(Emu.BootGame(ctrl.GetPath().ToStdString()))
{ {
ConLog.Success("Game: boot done."); ConLog.Success("Game: boot done.");
} }
else else
{ {
ConLog.Error("Ps3 executable not found in selected folder (%s)", ctrl.GetPath().mb_str()); ConLog.Error("Ps3 executable not found in selected folder (%s)", ctrl.GetPath().wx_str());
} }
} }
@ -226,7 +226,7 @@ void MainFrame::InstallPkg(wxCommandEvent& WXUNUSED(event))
Emu.Stop(); Emu.Stop();
wxString fileName = ctrl.GetPath(); wxString fileName = ctrl.GetPath();
if (!pkg_unpack((const char *)fileName.mb_str())) if (!pkg_unpack(static_cast<const char*>(fileName)))
ConLog.Error("Could not unpack PKG!"); ConLog.Error("Could not unpack PKG!");
else ConLog.Success("PKG: extract done."); else ConLog.Success("PKG: extract done.");
@ -234,7 +234,7 @@ void MainFrame::InstallPkg(wxCommandEvent& WXUNUSED(event))
ConLog.Warning("Could not delete the decoded DEC file"); ConLog.Warning("Could not delete the decoded DEC file");
pkg_header *header; pkg_header *header;
pkg_info((const char *)fileName.mb_str(), &header); pkg_info(static_cast<const char*>(fileName), &header);
wxString titleID_full (header->title_id); wxString titleID_full (header->title_id);
wxString titleID = titleID_full.SubString(7, 15); wxString titleID = titleID_full.SubString(7, 15);
@ -250,7 +250,7 @@ void MainFrame::InstallPkg(wxCommandEvent& WXUNUSED(event))
//Refresh game list //Refresh game list
m_game_viewer->Refresh(); m_game_viewer->Refresh();
if(Emu.BootGame((const char*)pkgDir.mb_str())) if(Emu.BootGame(pkgDir.ToStdString()))
{ {
ConLog.Success("Game: boot done."); ConLog.Success("Game: boot done.");
} }

View file

@ -141,7 +141,7 @@ void VHDDExplorer::Export(const wxString& path, const wxString& to)
{ {
if(!m_hdd->Open(path)) if(!m_hdd->Open(path))
{ {
wxMessageBox(wxString::Format("EXPORT ERROR: file open error. (%s)", (const char*)path.mb_str())); wxMessageBox(wxString::Format("EXPORT ERROR: file open error. (%s)", path.wx_str()));
return; return;
} }
@ -188,7 +188,7 @@ void VHDDExplorer::OnDropFiles(wxDropFilesEvent& event)
for(int i=0; i<count; ++i) for(int i=0; i<count; ++i)
{ {
ConLog.Write("Importing '%s'", dropped[i].mb_str()); ConLog.Write("Importing '%s'", dropped[i].wx_str());
Import(dropped[i], wxFileName(dropped[i]).GetFullName()); Import(dropped[i], wxFileName(dropped[i]).GetFullName());
} }

View file

@ -336,14 +336,14 @@ bool ELF64Loader::LoadPhdrData(u64 offset)
stub.s_text = re(stub.s_text); stub.s_text = re(stub.s_text);
const wxString& module_name = Memory.ReadString(stub.s_modulename); const wxString& module_name = Memory.ReadString(stub.s_modulename);
Module* module = GetModuleByName((const char*)module_name.mb_str()); Module* module = GetModuleByName(module_name.ToStdString());
if(module) if(module)
{ {
//module->SetLoaded(); //module->SetLoaded();
} }
else else
{ {
ConLog.Warning("Unknown module '%s'", module_name.mb_str()); ConLog.Warning("Unknown module '%s'", module_name.wx_str());
} }
#ifdef LOADER_DEBUG #ifdef LOADER_DEBUG
@ -353,7 +353,7 @@ bool ELF64Loader::LoadPhdrData(u64 offset)
ConLog.Write("*** unk0: 0x%x", stub.s_unk0); ConLog.Write("*** unk0: 0x%x", stub.s_unk0);
ConLog.Write("*** unk1: 0x%x", stub.s_unk1); ConLog.Write("*** unk1: 0x%x", stub.s_unk1);
ConLog.Write("*** imports: %d", stub.s_imports); ConLog.Write("*** imports: %d", stub.s_imports);
ConLog.Write("*** module name: %s [0x%x]", module_name.mb_str(), stub.s_modulename); ConLog.Write("*** module name: %s [0x%x]", module_name.wx_str(), stub.s_modulename);
ConLog.Write("*** nid: 0x%x", stub.s_nid); ConLog.Write("*** nid: 0x%x", stub.s_nid);
ConLog.Write("*** text: 0x%x", stub.s_text); ConLog.Write("*** text: 0x%x", stub.s_text);
#endif #endif
@ -370,7 +370,7 @@ bool ELF64Loader::LoadPhdrData(u64 offset)
{ {
if(!module->Load(nid)) if(!module->Load(nid))
{ {
ConLog.Warning("Unknown function 0x%08x in '%s' module", nid, module_name.mb_str()); ConLog.Warning("Unknown function 0x%08x in '%s' module", nid, module_name.wx_str());
SysCalls::DoFunc(nid); SysCalls::DoFunc(nid);
} }
} }

View file

@ -72,7 +72,7 @@ const wxString Phdr_FlagsToString(u32 flags)
flags &= ~spu << 0x14; flags &= ~spu << 0x14;
flags &= ~rsx << 0x18; flags &= ~rsx << 0x18;
if(flags != 0) return wxString::Format("Unknown %s PPU[%x] SPU[%x] RSX[%x]", (const char*)ret.mb_str(), ppu, spu, rsx); if(flags != 0) return wxString::Format("Unknown %s PPU[%x] SPU[%x] RSX[%x]", ret.wx_str(), ppu, spu, rsx);
ret += "PPU[" + FLAGS_TO_STRING(ppu) + "] "; ret += "PPU[" + FLAGS_TO_STRING(ppu) + "] ";
ret += "SPU[" + FLAGS_TO_STRING(spu) + "] "; ret += "SPU[" + FLAGS_TO_STRING(spu) + "] ";

View file

@ -37,7 +37,7 @@ struct PsfEntry
return FormatString(); return FormatString();
case 0x0404: case 0x0404:
return wxString::Format("0x%x", FormatInteger()).mb_str(); return wxString::Format("0x%x", FormatInteger()).ToStdString();
} }
} }