1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-22 10:42:36 +01:00

log fixes (to wx_str())

This commit is contained in:
Nekotekina 2014-02-13 20:59:13 +04:00
parent a6faf04db4
commit 5a240c32a9
41 changed files with 215 additions and 183 deletions

View File

@ -42,7 +42,7 @@ wxString ARMv7Thread::RegsToString()
wxString result = "Registers:\n=========\n";
for(int i=0; i<15; ++i)
{
result += wxString::Format("%s\t= 0x%08x\n", g_arm_reg_name[i], GPR[i]);
result += wxString::Format("%s\t= 0x%08x\n", wxString(g_arm_reg_name[i]).wx_str(), GPR[i]);
}
result += wxString::Format("APSR\t= 0x%08x [N: %d, Z: %d, C: %d, V: %d, Q: %d]\n", APSR.APSR, APSR.N, APSR.Z, APSR.C, APSR.V, APSR.Q);

View File

@ -24,7 +24,7 @@ protected:
Memory.Read8(offset + dump_pc),
Memory.Read8(offset + dump_pc + 1),
Memory.Read8(offset + dump_pc + 2),
Memory.Read8(offset + dump_pc + 3), value.mb_str());
Memory.Read8(offset + dump_pc + 3), value.wx_str());
break;
case CPUDisAsm_InterpreterMode:
@ -32,7 +32,7 @@ protected:
Memory.Read8(offset + dump_pc),
Memory.Read8(offset + dump_pc + 1),
Memory.Read8(offset + dump_pc + 2),
Memory.Read8(offset + dump_pc + 3), value.mb_str());
Memory.Read8(offset + dump_pc + 3), value.wx_str());
break;
case CPUDisAsm_CompilerElfMode:

View File

@ -349,12 +349,12 @@ void CPUThread::Task()
}
catch(const char* e)
{
ConLog.Error("Exception: %s", e);
ConLog.Error("Exception: %s", wxString(e).wx_str());
}
catch(int exitcode)
{
ConLog.Success("Exit Code: %d", exitcode);
}
ConLog.Write("%s leave", CPUThread::GetFName());
ConLog.Write("%s leave", CPUThread::GetFName().wx_str());
}

View File

@ -93,7 +93,7 @@ public:
wxString::Format("%s[%d] Thread%s",
GetTypeString().wx_str(),
m_id,
wxString(GetName().empty() ? "" : std::string(" (" + GetName() + ")")).wx_str()
wxString(GetName().empty() ? "" : wxString::Format(" (%s)", + wxString(GetName()).wx_str())).wx_str()
);
}

View File

@ -47,7 +47,7 @@ protected:
}
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", FixOp(op).wx_str(), rc ? "." : "", cr0, f0, f1));
Write(wxString::Format("%s%s cr%d,f%d,f%d", FixOp(op).wx_str(), wxString(rc ? "." : "").wx_str(), cr0, f0, f1));
}
void DisAsm_CR1_F2(const wxString& op, u32 cr0, u32 f0, u32 f1)
{
@ -63,7 +63,7 @@ protected:
}
void DisAsm_INT1_R1_RC(const wxString& op, u32 i0, u32 r0, bool rc)
{
Write(wxString::Format("%s%s %d,r%d", FixOp(op).wx_str(), rc ? "." : "", i0, r0));
Write(wxString::Format("%s%s %d,r%d", FixOp(op).wx_str(), wxString(rc ? "." : "").wx_str(), i0, 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)
{
Write(wxString::Format("%s%s f%d,f%d,f%d,f%d", FixOp(op).wx_str(), rc ? "." : "", f0, f1, f2, f3));
Write(wxString::Format("%s%s f%d,f%d,f%d,f%d", FixOp(op).wx_str(), wxString(rc ? "." : "").wx_str(), f0, f1, f2, f3));
}
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", FixOp(op).wx_str(), rc ? "." : "", f0, f1, f2));
Write(wxString::Format("%s%s f%d,f%d,f%d", FixOp(op).wx_str(), wxString(rc ? "." : "").wx_str(), f0, f1, 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)
{
Write(wxString::Format("%s%s f%d,f%d", FixOp(op).wx_str(), rc ? "." : "", f0, f1));
Write(wxString::Format("%s%s f%d,f%d", FixOp(op).wx_str(), wxString(rc ? "." : "").wx_str(), f0, f1));
}
void DisAsm_F2(const wxString& op, u32 f0, u32 f1)
{
@ -103,11 +103,11 @@ protected:
{
if(m_mode == CPUDisAsm_CompilerElfMode)
{
Write(wxString::Format("%s%s f%d,r%d,%d #%x", FixOp(op).wx_str(), rc ? "." : "", f0, r0, imm0, imm0));
Write(wxString::Format("%s%s f%d,r%d,%d #%x", FixOp(op).wx_str(), wxString(rc ? "." : "").wx_str(), f0, r0, imm0, imm0));
return;
}
Write(wxString::Format("%s%s f%d,%d(r%d) #%x", FixOp(op).wx_str(), rc ? "." : "", f0, imm0, r0, imm0));
Write(wxString::Format("%s%s f%d,%d(r%d) #%x", FixOp(op).wx_str(), wxString(rc ? "." : "").wx_str(), f0, imm0, r0, imm0));
}
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)
{
Write(wxString::Format("%s%s f%d", FixOp(op).wx_str(), rc ? "." : "", f0));
Write(wxString::Format("%s%s f%d", FixOp(op).wx_str(), wxString(rc ? "." : "").wx_str(), f0));
}
void DisAsm_R1_RC(const wxString& op, u32 r0, bool rc)
{
Write(wxString::Format("%s%s r%d", FixOp(op).wx_str(), rc ? "." : "", r0));
Write(wxString::Format("%s%s r%d", FixOp(op).wx_str(), wxString(rc ? "." : "").wx_str(), 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)
{
Write(wxString::Format("%s%s%s r%d,r%d", FixOp(op).wx_str(), oe ? "o" : "", rc ? "." : "", r0, r1));
Write(wxString::Format("%s%s%s r%d,r%d", FixOp(op).wx_str(), wxString(oe ? "o" : "").wx_str(), wxString(rc ? "." : "").wx_str(), r0, r1));
}
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)
{
Write(wxString::Format("%s%s%s r%d,r%d,r%d", FixOp(op).wx_str(), oe ? "o" : "", rc ? "." : "", r0, r1, r2));
Write(wxString::Format("%s%s%s r%d,r%d,r%d", FixOp(op).wx_str(), wxString(oe ? "o" : "").wx_str(), wxString(rc ? "." : "").wx_str(), r0, r1, r2));
}
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", FixOp(op).wx_str(), rc ? "." : "", r0, r1, r2, i0, i1));
Write(wxString::Format("%s%s r%d,r%d,r%d,%d,%d", FixOp(op).wx_str(), wxString(rc ? "." : "").wx_str(), r0, r1, r2, i0, i1));
}
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)
{
Write(wxString::Format("%s%s r%d,r%d,%d,%d,%d", FixOp(op).wx_str(), rc ? "." : "", r0, r1, i0, i1, i2));
Write(wxString::Format("%s%s r%d,r%d,%d,%d,%d", FixOp(op).wx_str(), wxString(rc ? "." : "").wx_str(), r0, r1, i0, i1, 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)
{
Write(wxString::Format("%s%s r%d,r%d,%d,%d", FixOp(op).wx_str(), rc ? "." : "", r0, r1, i0, i1));
Write(wxString::Format("%s%s r%d,r%d,%d,%d", FixOp(op).wx_str(), wxString(rc ? "." : "").wx_str(), r0, r1, i0, 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)
{
Write(wxString::Format("%s%s r%d,r%d,%d", FixOp(op).wx_str(), rc ? "." : "", r0, r1, i0));
Write(wxString::Format("%s%s r%d,r%d,%d", FixOp(op).wx_str(), wxString(rc ? "." : "").wx_str(), r0, r1, i0));
}
void DisAsm_R2_INT1(const wxString& op, u32 r0, u32 r1, s32 i0)
{
@ -201,7 +201,7 @@ protected:
}
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", FixOp(op).wx_str(), rc ? "." : "", cr0, r0, r1));
Write(wxString::Format("%s%s cr%d,r%d,r%d", FixOp(op).wx_str(), wxString(rc ? "." : "").wx_str(), cr0, r0, r1));
}
void DisAsm_CR1_R2(const wxString& op, u32 cr0, u32 r0, u32 r1)
{

View File

@ -56,7 +56,7 @@ private:
}
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", FixOp(op).wx_str(), rc ? "." : "", cr0, f0, f1));
Write(wxString::Format("%s%s cr%d,f%d,f%d", FixOp(op).wx_str(), wxString(rc ? "." : "").wx_str(), cr0, f0, f1));
}
void DisAsm_CR1_F2(const wxString& op, u32 cr0, u32 f0, u32 f1)
{
@ -72,7 +72,7 @@ private:
}
void DisAsm_INT1_R1_RC(const wxString& op, u32 i0, u32 r0, bool rc)
{
Write(wxString::Format("%s%s %d,r%d", FixOp(op).wx_str(), rc ? "." : "", i0, r0));
Write(wxString::Format("%s%s %d,r%d", FixOp(op).wx_str(), wxString(rc ? "." : "").wx_str(), i0, 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)
{
Write(wxString::Format("%s%s f%d,f%d,f%d,f%d", FixOp(op).wx_str(), rc ? "." : "", f0, f1, f2, f3));
Write(wxString::Format("%s%s f%d,f%d,f%d,f%d", FixOp(op).wx_str(), wxString(rc ? "." : "").wx_str(), f0, f1, f2, f3));
}
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", FixOp(op).wx_str(), rc ? "." : "", f0, f1, f2));
Write(wxString::Format("%s%s f%d,f%d,f%d", FixOp(op).wx_str(), wxString(rc ? "." : "").wx_str(), f0, f1, 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)
{
Write(wxString::Format("%s%s f%d,f%d", FixOp(op).wx_str(), rc ? "." : "", f0, f1));
Write(wxString::Format("%s%s f%d,f%d", FixOp(op).wx_str(), wxString(rc ? "." : "").wx_str(), f0, f1));
}
void DisAsm_F2(const wxString& op, u32 f0, u32 f1)
{
@ -112,11 +112,11 @@ private:
{
if(m_mode == CPUDisAsm_CompilerElfMode)
{
Write(wxString::Format("%s%s f%d,r%d,%d #%x", FixOp(op).wx_str(), rc ? "." : "", f0, r0, imm0, imm0));
Write(wxString::Format("%s%s f%d,r%d,%d #%x", FixOp(op).wx_str(), wxString(rc ? "." : "").wx_str(), f0, r0, imm0, imm0));
return;
}
Write(wxString::Format("%s%s f%d,%d(r%d) #%x", FixOp(op).wx_str(), rc ? "." : "", f0, imm0, r0, imm0));
Write(wxString::Format("%s%s f%d,%d(r%d) #%x", FixOp(op).wx_str(), wxString(rc ? "." : "").wx_str(), f0, imm0, r0, imm0));
}
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)
{
Write(wxString::Format("%s%s f%d", FixOp(op).wx_str(), rc ? "." : "", f0));
Write(wxString::Format("%s%s f%d", FixOp(op).wx_str(), wxString(rc ? "." : "").wx_str(), f0));
}
void DisAsm_R1_RC(const wxString& op, u32 r0, bool rc)
{
Write(wxString::Format("%s%s r%d", FixOp(op).wx_str(), rc ? "." : "", r0));
Write(wxString::Format("%s%s r%d", FixOp(op).wx_str(), wxString(rc ? "." : "").wx_str(), 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)
{
Write(wxString::Format("%s%s%s r%d,r%d", FixOp(op).wx_str(), oe ? "o" : "", rc ? "." : "", r0, r1));
Write(wxString::Format("%s%s%s r%d,r%d", FixOp(op).wx_str(), wxString(oe ? "o" : "").wx_str(), wxString(rc ? "." : "").wx_str(), r0, r1));
}
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)
{
Write(wxString::Format("%s%s%s r%d,r%d,r%d", FixOp(op).wx_str(), oe ? "o" : "", rc ? "." : "", r0, r1, r2));
Write(wxString::Format("%s%s%s r%d,r%d,r%d", FixOp(op).wx_str(), wxString(oe ? "o" : "").wx_str(), wxString(rc ? "." : "").wx_str(), r0, r1, r2));
}
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", FixOp(op).wx_str(), rc ? "." : "", r0, r1, r2, i0, i1));
Write(wxString::Format("%s%s r%d,r%d,r%d,%d,%d", FixOp(op).wx_str(), wxString(rc ? "." : "").wx_str(), r0, r1, r2, i0, i1));
}
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)
{
Write(wxString::Format("%s%s r%d,r%d,%d,%d,%d", FixOp(op).wx_str(), rc ? "." : "", r0, r1, i0, i1, i2));
Write(wxString::Format("%s%s r%d,r%d,%d,%d,%d", FixOp(op).wx_str(), wxString(rc ? "." : "").wx_str(), r0, r1, i0, i1, 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)
{
Write(wxString::Format("%s%s r%d,r%d,%d,%d", FixOp(op).wx_str(), rc ? "." : "", r0, r1, i0, i1));
Write(wxString::Format("%s%s r%d,r%d,%d,%d", FixOp(op).wx_str(), wxString(rc ? "." : "").wx_str(), r0, r1, i0, 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)
{
Write(wxString::Format("%s%s r%d,r%d,%d", FixOp(op).wx_str(), rc ? "." : "", r0, r1, i0));
Write(wxString::Format("%s%s r%d,r%d,%d", FixOp(op).wx_str(), wxString(rc ? "." : "").wx_str(), r0, r1, i0));
}
void DisAsm_R2_INT1(const wxString& op, u32 r0, u32 r1, s32 i0)
{
@ -210,7 +210,7 @@ private:
}
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", FixOp(op).wx_str(), rc ? "." : "", cr0, r0, r1));
Write(wxString::Format("%s%s cr%d,r%d,r%d", FixOp(op).wx_str(), wxString(rc ? "." : "").wx_str(), cr0, r0, r1));
}
void DisAsm_CR1_R2(const wxString& op, u32 cr0, u32 r0, u32 r1)
{
@ -902,11 +902,11 @@ private:
}
void CMPLI(u32 crfd, u32 l, u32 ra, u32 uimm16)
{
DisAsm_CR1_R1_IMM(wxString::Format("cmpl%si", l ? "d" : "w"), crfd, ra, uimm16);
DisAsm_CR1_R1_IMM(wxString::Format("cmpl%si", wxString(l ? "d" : "w").wx_str()), crfd, ra, uimm16);
}
void CMPI(u32 crfd, u32 l, u32 ra, s32 simm16)
{
DisAsm_CR1_R1_IMM(wxString::Format("cmp%si", l ? "d" : "w"), crfd, ra, simm16);
DisAsm_CR1_R1_IMM(wxString::Format("cmp%si", wxString(l ? "d" : "w").wx_str()), crfd, ra, simm16);
}
void ADDIC(u32 rd, u32 ra, s32 simm16)
{
@ -1208,7 +1208,7 @@ private:
}
void CMP(u32 crfd, u32 l, u32 ra, u32 rb)
{
DisAsm_CR1_R2(wxString::Format("cmp%s", l ? "d" : "w"), crfd, ra, rb);
DisAsm_CR1_R2(wxString::Format("cmp%s", wxString(l ? "d" : "w").wx_str()), crfd, ra, rb);
}
void TW(u32 to, u32 ra, u32 rb)
{
@ -1279,7 +1279,7 @@ private:
}
void CMPL(u32 crfd, u32 l, u32 ra, u32 rb)
{
DisAsm_CR1_R2(wxString::Format("cmpl%s", l ? "d" : "w"), crfd, ra, rb);
DisAsm_CR1_R2(wxString::Format("cmpl%s", wxString(l ? "d" : "w").wx_str()), crfd, ra, rb);
}
void LVSR(u32 vd, u32 ra, u32 rb)
{

View File

@ -149,7 +149,7 @@ void CompilePPUProgram::WriteError(const wxString& error)
{
if(m_err_list)
{
m_err_list->WriteText(wxString::Format("line %lld: %s\n", m_line, static_cast<const char*>(error)));
m_err_list->WriteText(wxString::Format("line %lld: %s\n", m_line, error.wx_str()));
}
}
@ -569,7 +569,7 @@ bool CompilePPUProgram::SetNextArgType(u32 types, bool show_err)
if(show_err)
{
WriteError(wxString::Format("Bad arg '%s'", &arg.string[0]));
WriteError(wxString::Format("Bad arg '%s'", wxString(&arg.string[0]).wx_str()));
m_error = true;
}

View File

@ -331,7 +331,7 @@ void RawSPUThread::Task()
}
catch(const char* e)
{
ConLog.Error("Exception: %s", e);
ConLog.Error("Exception: %s", wxString(e).wx_str());
}
ConLog.Write("%s leave", PPCThread::GetFName().wx_str());

View File

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

View File

@ -514,11 +514,11 @@ public:
case MFC_PUT_CMD:
case MFC_GET_CMD:
{
/* if (enable_log) ConLog.Write("DMA %s%s%s: lsa = 0x%x, ea = 0x%llx, tag = 0x%x, size = 0x%x, cmd = 0x%x",
op & MFC_PUT_CMD ? "PUT" : "GET",
op & MFC_BARRIER_MASK ? "B" : "",
op & MFC_FENCE_MASK ? "F" : "",
lsa, ea, tag, size, cmd); */
if (enable_log) ConLog.Write("DMA %s%s%s: lsa = 0x%x, ea = 0x%llx, tag = 0x%x, size = 0x%x, cmd = 0x%x",
wxString(op & MFC_PUT_CMD ? "PUT" : "GET").wx_str(),
wxString(op & MFC_BARRIER_MASK ? "B" : "").wx_str(),
wxString(op & MFC_FENCE_MASK ? "F" : "").wx_str(),
lsa, ea, tag, size, cmd);
if (op & MFC_PUT_CMD)
{
SMutexLocker lock(reservation.mutex);
@ -542,7 +542,9 @@ public:
case MFC_PUTQLLUC_CMD:
{
if (enable_log) ConLog.Write("DMA %s: lsa=0x%x, ea = 0x%llx, (tag) = 0x%x, (size) = 0x%x, cmd = 0x%x",
op == MFC_GETLLAR_CMD ? "GETLLAR" : op == MFC_PUTLLC_CMD ? "PUTLLC" : op == MFC_PUTLLUC_CMD ? "PUTLLUC" : "PUTQLLUC",
wxString(op == MFC_GETLLAR_CMD ? "GETLLAR" :
op == MFC_PUTLLC_CMD ? "PUTLLC" :
op == MFC_PUTLLUC_CMD ? "PUTLLUC" : "PUTQLLUC").wx_str(),
lsa, ea, tag, size, cmd);
if (op == MFC_GETLLAR_CMD) // get reservation
@ -609,11 +611,11 @@ public:
case SPU_RdInMbox:
count = SPU.In_MBox.GetCount();
ConLog.Warning("GetChannelCount(%s) -> %d", spu_ch_name[ch], count);
ConLog.Warning("GetChannelCount(%s) -> %d", wxString(spu_ch_name[ch]).wx_str(), count);
return count;
case SPU_WrOutIntrMbox:
ConLog.Warning("GetChannelCount(%s) = 0", spu_ch_name[ch]);
ConLog.Warning("GetChannelCount(%s) = 0", wxString(spu_ch_name[ch]).wx_str());
return 0;//return SPU.OutIntr_Mbox.GetFreeCount();
case MFC_RdTagStat:
@ -629,7 +631,8 @@ public:
return Prxy.AtomicStat.GetCount();
default:
ConLog.Error("%s error: unknown/illegal channel (%d [%s]).", __FUNCTION__, ch, spu_ch_name[ch]);
ConLog.Error("%s error: unknown/illegal channel (%d [%s]).",
wxString(__FUNCTION__).wx_str(), ch, wxString(spu_ch_name[ch]).wx_str());
break;
}
@ -643,22 +646,22 @@ public:
switch(ch)
{
case SPU_WrOutIntrMbox:
ConLog.Warning("%s: %s = 0x%x", __FUNCTION__, spu_ch_name[ch], v);
ConLog.Warning("%s: %s = 0x%x", wxString(__FUNCTION__).wx_str(), wxString(spu_ch_name[ch]).wx_str(), v);
while (!SPU.OutIntr_Mbox.Push(v) && !Emu.IsStopped()) Sleep(1);
break;
case SPU_WrOutMbox:
ConLog.Warning("%s: %s = 0x%x", __FUNCTION__, spu_ch_name[ch], v);
ConLog.Warning("%s: %s = 0x%x", wxString(__FUNCTION__).wx_str(), wxString(spu_ch_name[ch]).wx_str(), v);
while (!SPU.Out_MBox.Push(v) && !Emu.IsStopped()) Sleep(1);
break;
case MFC_WrTagMask:
//ConLog.Warning("%s: %s = 0x%x", __FUNCTION__, spu_ch_name[ch], v);
//ConLog.Warning("%s: %s = 0x%x", wxString(__FUNCTION__).wx_str(), wxString(spu_ch_name[ch]).wx_str(), v);
Prxy.QueryMask.SetValue(v);
break;
case MFC_WrTagUpdate:
//ConLog.Warning("%s: %s = 0x%x", __FUNCTION__, spu_ch_name[ch], v);
//ConLog.Warning("%s: %s = 0x%x", wxString(__FUNCTION__).wx_str(), wxString(spu_ch_name[ch]).wx_str(), v);
Prxy.TagStatus.PushUncond(Prxy.QueryMask.GetValue());
break;
@ -688,11 +691,11 @@ public:
break;
default:
ConLog.Error("%s error: unknown/illegal channel (%d [%s]).", __FUNCTION__, ch, spu_ch_name[ch]);
ConLog.Error("%s error: unknown/illegal channel (%d [%s]).", wxString(__FUNCTION__).wx_str(), ch, wxString(spu_ch_name[ch]).wx_str());
break;
}
if (Emu.IsStopped()) ConLog.Warning("%s: %s writing aborted", __FUNCTION__, spu_ch_name[ch]);
if (Emu.IsStopped()) ConLog.Warning("%s(%s) aborted", wxString(__FUNCTION__).wx_str(), wxString(spu_ch_name[ch]).wx_str());
}
void ReadChannel(SPU_GPR_hdr& r, u32 ch)
@ -704,22 +707,22 @@ public:
{
case SPU_RdInMbox:
while (!SPU.In_MBox.Pop(v) && !Emu.IsStopped()) Sleep(1);
ConLog.Warning("%s: 0x%x = %s", __FUNCTION__, v, spu_ch_name[ch]);
ConLog.Warning("%s: 0x%x = %s", wxString(__FUNCTION__).wx_str(), v, wxString(spu_ch_name[ch]).wx_str());
break;
case MFC_RdTagStat:
while (!Prxy.TagStatus.Pop(v) && !Emu.IsStopped()) Sleep(1);
//ConLog.Warning("%s: 0x%x = %s", __FUNCTION__, v, spu_ch_name[ch]);
//ConLog.Warning("%s: 0x%x = %s", wxString(__FUNCTION__).wx_str(), v, wxString(spu_ch_name[ch]).wx_str());
break;
case SPU_RdSigNotify1:
while (!SPU.SNR[0].Pop(v) && !Emu.IsStopped()) Sleep(1);
//ConLog.Warning("%s: 0x%x = %s", __FUNCTION__, v, spu_ch_name[ch]);
//ConLog.Warning("%s: 0x%x = %s", wxString(__FUNCTION__).wx_str(), v, wxString(spu_ch_name[ch]).wx_str());
break;
case SPU_RdSigNotify2:
while (!SPU.SNR[1].Pop(v) && !Emu.IsStopped()) Sleep(1);
//ConLog.Warning("%s: 0x%x = %s", __FUNCTION__, v, spu_ch_name[ch]);
//ConLog.Warning("%s: 0x%x = %s", wxString(__FUNCTION__).wx_str(), v, wxString(spu_ch_name[ch]).wx_str());
break;
case MFC_RdAtomicStat:
@ -727,11 +730,11 @@ public:
break;
default:
ConLog.Error("%s error: unknown/illegal channel (%d [%s]).", __FUNCTION__, ch, spu_ch_name[ch]);
ConLog.Error("%s error: unknown/illegal channel (%d [%s]).", wxString(__FUNCTION__).wx_str(), ch, wxString(spu_ch_name[ch]).wx_str());
break;
}
if (Emu.IsStopped()) ConLog.Warning("%s: %s aborted", __FUNCTION__, spu_ch_name[ch]);
if (Emu.IsStopped()) ConLog.Warning("%s(%s) aborted", wxString(__FUNCTION__).wx_str(), wxString(spu_ch_name[ch]).wx_str());
}
bool IsGoodLSA(const u32 lsa) const { return Memory.IsGoodAddr(lsa + m_offset) && lsa < 0x40000; }

View File

@ -420,7 +420,7 @@ void GLShaderProgram::Compile()
GLsizei len;
memset(buf, 0, r+1);
glGetShaderInfoLog(id, r, &len, buf);
ConLog.Error("Failed to compile shader: %s", buf);
ConLog.Error("Failed to compile shader: %s", wxString(buf).wx_str());
delete[] buf;
}

View File

@ -20,7 +20,7 @@ void printGlError(GLenum err, const char* situation)
{
if(err != GL_NO_ERROR)
{
ConLog.Error("%s: opengl error 0x%04x", situation, err);
ConLog.Error("%s: opengl error 0x%04x", wxString(situation).wx_str(), err);
Emu.Pause();
}
}

View File

@ -51,7 +51,7 @@ void GLProgram::Create(const u32 vp, const u32 fp)
char* buf = new char[bufLength+1];
memset(buf, 0, bufLength+1);
glGetProgramInfoLog(id, bufLength, NULL, buf);
ConLog.Error("Could not link program: %s", buf);
ConLog.Error("Could not link program: %s", wxString(buf).wx_str());
delete[] buf;
}
}
@ -68,7 +68,7 @@ void GLProgram::Create(const u32 vp, const u32 fp)
char* buf = new char[bufLength];
memset(buf, 0, bufLength);
glGetProgramInfoLog(id, bufLength, NULL, buf);
ConLog.Error("Could not link program: %s", buf);
ConLog.Error("Could not link program: %s", wxString(buf).wx_str());
delete[] buf;
}
}

View File

@ -54,8 +54,8 @@ u32 GLProgramBuffer::GetProg(u32 fp, u32 vp) const
ConLog.Write("*** vp id = %d", m_buf[fp].vp_id);
ConLog.Write("*** fp id = %d", m_buf[fp].fp_id);
ConLog.Write("*** vp shader = \n%s", m_buf[fp].vp_shader);
ConLog.Write("*** fp shader = \n%s", m_buf[fp].fp_shader);
ConLog.Write("*** vp shader = \n%s", m_buf[fp].vp_shader.wx_str());
ConLog.Write("*** fp shader = \n%s", m_buf[fp].fp_shader.wx_str());
*/
return m_buf[fp].prog_id;
}
@ -72,8 +72,8 @@ u32 GLProgramBuffer::GetProg(u32 fp, u32 vp) const
ConLog.Write("*** vp id = %d", m_buf[i].vp_id);
ConLog.Write("*** fp id = %d", m_buf[i].fp_id);
ConLog.Write("*** vp shader = \n%s", m_buf[i].vp_shader);
ConLog.Write("*** fp shader = \n%s", m_buf[i].fp_shader);
ConLog.Write("*** vp shader = \n%s", m_buf[i].vp_shader.wx_str());
ConLog.Write("*** fp shader = \n%s", m_buf[i].fp_shader.wx_str());
*/
return m_buf[i].prog_id;
}

View File

@ -187,7 +187,7 @@ void GLVertexDecompilerThread::AddCode(bool is_sca, wxString code, bool src_mask
swizzle = swizzle == "xyzw" ? "" : "." + swizzle;
cond = wxString::Format("if(all(%s(rc%s, vec4(0.0)%s))) ", cond_string_table[d0.cond], wxString(swizzle).wx_str(), wxString(swizzle).wx_str());
cond = wxString::Format("if(all(%s(rc%s, vec4(0.0)%s))) ", wxString(cond_string_table[d0.cond]).wx_str(), wxString(swizzle).wx_str(), wxString(swizzle).wx_str());
}
wxString mask = GetMask(is_sca);

View File

@ -308,10 +308,11 @@ int cellFontOpenFontMemory(mem_ptr_t<CellFontLibrary> library, u32 fontAddr, u32
int cellFontOpenFontFile(mem_ptr_t<CellFontLibrary> library, mem8_ptr_t fontPath, u32 subNum, s32 uniqueId, mem_ptr_t<CellFont> font)
{
wxString fp = fontPath.GetString();
cellFont.Warning("cellFontOpenFontFile(library_addr=0x%x, fontPath=\"%s\", subNum=%d, uniqueId=%d, font_addr=0x%x)",
library.GetAddr(), fontPath.GetString(), subNum, uniqueId, font.GetAddr());
library.GetAddr(), fp.wx_str(), subNum, uniqueId, font.GetAddr());
vfsFile f(fontPath.GetString());
vfsFile f(fp);
if (!f.IsOpened())
return CELL_FONT_ERROR_FONT_OPEN_FAILED;

View File

@ -291,7 +291,8 @@ int cellGameContentErrorDialog(s32 type, s32 errNeedSizeKB, u32 dirName_addr)
default: return CELL_GAME_ERROR_PARAM;
}
std::string errorMsg = wxString::Format("%s\nSpace needed: %d KB\nDirectory name: %s", errorName.c_str(), errNeedSizeKB, dirName);
std::string errorMsg = wxString::Format("%s\nSpace needed: %d KB\nDirectory name: %s",
wxString(errorName).wx_str(), errNeedSizeKB, wxString(dirName).wx_str());
wxMessageBox(errorMsg, wxGetApp().GetAppName(), wxICON_ERROR | wxOK);
return CELL_OK;
}

View File

@ -158,7 +158,7 @@ int cellSysmoduleSetMemcontainer(u32 ct_id)
int cellSysmoduleLoadModule(u16 id)
{
cellSysmodule.Warning("cellSysmoduleLoadModule(%s)", getModuleName(id));
cellSysmodule.Warning("cellSysmoduleLoadModule(%s)", wxString(getModuleName(id)).wx_str());
Module* m = GetModuleById(id);
if(!m)
@ -177,7 +177,7 @@ int cellSysmoduleLoadModule(u16 id)
int cellSysmoduleUnloadModule(u16 id)
{
cellSysmodule.Warning("cellSysmoduleUnloadModule(%s)", getModuleName(id));
cellSysmodule.Warning("cellSysmoduleUnloadModule(%s)", wxString(getModuleName(id)).wx_str());
Module* m = GetModuleById(id);
if(!m)
@ -196,7 +196,7 @@ int cellSysmoduleUnloadModule(u16 id)
int cellSysmoduleIsLoaded(u16 id)
{
cellSysmodule.Warning("cellSysmoduleIsLoaded(%s)", getModuleName(id));
cellSysmodule.Warning("cellSysmoduleIsLoaded(%s)", wxString(getModuleName(id)).wx_str());
Module* m = GetModuleById(id);
if(!m)

View File

@ -204,13 +204,15 @@ int cellFsAioRead(mem_ptr_t<CellFsAio> aio, mem32_t aio_id, mem_func_ptr_t<void
int cellFsAioInit(mem8_ptr_t mount_point)
{
sys_fs.Warning("cellFsAioInit(mount_point_addr=0x%x (%s))", mount_point.GetAddr(), (char*)mount_point.GetPtr());
wxString mp = Memory.ReadString(mount_point.GetAddr());
sys_fs.Warning("cellFsAioInit(mount_point_addr=0x%x (%s))", mount_point.GetAddr(), mp.wx_str());
return CELL_OK;
}
int cellFsAioFinish(mem8_ptr_t mount_point)
{
sys_fs.Warning("cellFsAioFinish(mount_point_addr=0x%x (%s))", mount_point.GetAddr(), (char*)mount_point.GetPtr());
wxString mp = Memory.ReadString(mount_point.GetAddr());
sys_fs.Warning("cellFsAioFinish(mount_point_addr=0x%x (%s))", mount_point.GetAddr(), mp.wx_str());
return CELL_OK;
}

View File

@ -328,12 +328,12 @@ void default_syscall()
case 999:
dump_enable = !dump_enable;
Emu.Pause();
ConLog.Warning("Dump %s", dump_enable ? "enabled" : "disabled");
ConLog.Warning("Dump %s", wxString(dump_enable ? "enabled" : "disabled").wx_str());
return;
case 1000:
enable_log = !enable_log;
ConLog.Warning("Log %s", enable_log ? "enabled" : "disabled");
ConLog.Warning("Log %s", wxString(enable_log ? "enabled" : "disabled").wx_str());
return;
}

View File

@ -8,6 +8,7 @@
#include "lv2/SC_Lwmutex.h"
#include "lv2/SC_Lwcond.h"
#include "lv2/SC_Event_flag.h"
#include "lv2/SC_Condition.h"
#include "Emu/event.h"
//#define SYSCALLS_DEBUG
@ -172,11 +173,12 @@ extern int sys_lwmutex_trylock(mem_ptr_t<sys_lwmutex_t> lwmutex);
extern int sys_lwmutex_unlock(mem_ptr_t<sys_lwmutex_t> lwmutex);
//sys_cond
extern int sys_cond_create(u32 cond_addr, u32 mutex_id, u32 attr_addr);
extern int sys_cond_create(mem32_t cond_id, u32 mutex_id, mem_ptr_t<sys_cond_attribute> attr);
extern int sys_cond_destroy(u32 cond_id);
extern int sys_cond_wait(u32 cond_id, u64 timeout);
extern int sys_cond_signal(u32 cond_id);
extern int sys_cond_signal_all(u32 cond_id);
extern int sys_cond_signal_to(u32 cond_id, u32 thread_id);
//sys_mutex
extern int sys_mutex_create(u32 mutex_id_addr, u32 attr_addr);
@ -383,7 +385,7 @@ extern int sys_rsx_device_map(mem32_t a1, mem32_t a2, u32 a3);
extern int sys_rsx_device_unmap();
extern int sys_rsx_attribute();
#define UNIMPLEMENTED_FUNC(module) module.Error("Unimplemented function: %s", __FUNCTION__)
#define UNIMPLEMENTED_FUNC(module) module.Error("Unimplemented function: %s", wxString(__FUNCTION__).wx_str())
#define SC_ARG_0 CPU.GPR[3]
#define SC_ARG_1 CPU.GPR[4]

View File

@ -1,61 +1,52 @@
#include "stdafx.h"
#include "Emu/SysCalls/SysCalls.h"
#include "SC_Mutex.h"
#include "Emu/SysCalls/lv2/SC_Condition.h"
SysCallBase sys_cond("sys_cond");
extern SysCallBase sys_mtx;
struct condition_attr
int sys_cond_create(mem32_t cond_id, u32 mutex_id, mem_ptr_t<sys_cond_attribute> attr)
{
u32 pshared;
int flags;
u64 ipc_key;
char name[8];
};
sys_cond.Warning("sys_cond_create(cond_id_addr=0x%x, mutex_id=%d, attr_addr=%d)",
cond_id.GetAddr(), mutex_id, attr.GetAddr());
struct condition
{
wxCondition cond;
condition_attr attr;
condition(wxMutex& mtx, const condition_attr& attr)
: cond(mtx)
, attr(attr)
if (!cond_id.IsGood() || !attr.IsGood())
{
return CELL_EFAULT;
}
};
int sys_cond_create(u32 cond_addr, u32 mutex_id, u32 attr_addr)
{
sys_cond.Warning("sys_cond_create(cond_addr=0x%x, mutex_id=0x%x, attr_addr=%d)",
cond_addr, mutex_id, attr_addr);
if (attr->pshared.ToBE() != se32(0x200))
{
sys_cond.Error("Invalid pshared attribute(0x%x)", (u32)attr->pshared);
return CELL_EINVAL;
}
if(!Memory.IsGoodAddr(cond_addr) || !Memory.IsGoodAddr(attr_addr)) return CELL_EFAULT;
mutex* mtx_data;
if (!Emu.GetIdManager().GetIDData(mutex_id, mtx_data))
{
return CELL_ESRCH;
}
condition_attr attr = (condition_attr&)Memory[attr_addr];
attr.pshared = re(attr.pshared);
attr.ipc_key = re(attr.ipc_key);
attr.flags = re(attr.flags);
sys_cond.Log("*** pshared = %d", attr.pshared);
sys_cond.Log("*** ipc_key = 0x%llx", attr.ipc_key);
sys_cond.Log("*** flags = 0x%x", attr.flags);
sys_cond.Log("*** name = %s", attr.name);
mutex* mtx_data = nullptr;
if(!sys_mtx.CheckId(mutex_id, mtx_data)) return CELL_ESRCH;
Memory.Write32(cond_addr, sys_cond.GetNewId(new condition(mtx_data->mtx, attr)));
cond_id = sys_cond.GetNewId(new condition(mtx_data->mtx, attr->name_u64));
sys_cond.Warning("*** condition created [%s]: id = %d", wxString(attr->name, 8).wx_str(), cond_id.GetValue());
return CELL_OK;
}
int sys_cond_destroy(u32 cond_id)
{
sys_cond.Log("sys_cond_destroy(cond_id=0x%x)", cond_id);
sys_cond.Error("sys_cond_destroy(cond_id=%d)", cond_id);
if(!sys_cond.CheckId(cond_id)) return CELL_ESRCH;
condition* cond;
if (!Emu.GetIdManager().GetIDData(cond_id, cond))
{
return CELL_ESRCH;
}
if (true) // TODO
{
return CELL_EBUSY;
}
Emu.GetIdManager().RemoveID(cond_id);
return CELL_OK;
@ -63,7 +54,7 @@ int sys_cond_destroy(u32 cond_id)
int sys_cond_wait(u32 cond_id, u64 timeout)
{
sys_cond.Log("sys_cond_wait(cond_id=0x%x, timeout=0x%llx)", cond_id, timeout);
sys_cond.Warning("sys_cond_wait(cond_id=%d, timeout=%lld)", cond_id, timeout);
condition* cond_data = nullptr;
if(!sys_cond.CheckId(cond_id, cond_data)) return CELL_ESRCH;
@ -101,7 +92,7 @@ int sys_cond_wait(u32 cond_id, u64 timeout)
int sys_cond_signal(u32 cond_id)
{
sys_cond.Log("sys_cond_signal(cond_id=0x%x)", cond_id);
sys_cond.Warning("sys_cond_signal(cond_id=%d)", cond_id);
condition* cond_data = nullptr;
if(!sys_cond.CheckId(cond_id, cond_data)) return CELL_ESRCH;
@ -113,12 +104,19 @@ int sys_cond_signal(u32 cond_id)
int sys_cond_signal_all(u32 cond_id)
{
sys_cond.Log("sys_cond_signal_all(cond_id=0x%x)", cond_id);
sys_cond.Warning("sys_cond_signal_all(cond_id=%d)", cond_id);
condition* cond_data = nullptr;
if(!sys_cond.CheckId(cond_id, cond_data)) return CELL_ESRCH;
cond_data->cond.Broadcast();
return CELL_OK;
}
int sys_cond_signal_to(u32 cond_id, u32 thread_id)
{
sys_cond.Error("sys_cond_signal_to(cond_id=%d, thread_id=%d)", cond_id, thread_id);
return CELL_OK;
}

View File

@ -0,0 +1,25 @@
#pragma once
struct sys_cond_attribute
{
be_t<u32> pshared;
be_t<u64> ipc_key;
be_t<int> flags;
union
{
char name[8];
u64 name_u64;
};
};
struct condition
{
wxCondition cond;
u64 name_u64;
condition(wxMutex& mtx, u64 name)
: cond(mtx)
, name_u64(name)
{
}
};

View File

@ -52,7 +52,7 @@ int sys_event_queue_create(mem32_t equeue_id, mem_ptr_t<sys_event_queue_attr> at
equeue_id = sys_event.GetNewId(eq);
sys_event.Warning("*** event_queue created [%s] (protocol=0x%x, type=0x%x): id = %d",
attr->name, (u32)attr->protocol, (int)attr->type, equeue_id.GetValue());
wxString(attr->name, 8).wx_str(), (u32)attr->protocol, (int)attr->type, equeue_id.GetValue());
return CELL_OK;
}
@ -90,7 +90,7 @@ int sys_event_queue_destroy(u32 equeue_id, int mode)
Sleep(1);
if (Emu.IsStopped())
{
ConLog.Warning("sys_event_queue_destroy(equeue=%d, ...) aborted", equeue_id);
ConLog.Warning("sys_event_queue_destroy(equeue=%d) aborted", equeue_id);
break;
}
}
@ -210,7 +210,7 @@ int sys_event_queue_receive(u32 equeue_id, mem_ptr_t<sys_event_data> event, u64
Sleep(1);
if (counter++ > timeout || Emu.IsStopped())
{
if (Emu.IsStopped()) ConLog.Warning("sys_event_queue_receive(equeue=%d, ...) aborted", equeue_id);
if (Emu.IsStopped()) ConLog.Warning("sys_event_queue_receive(equeue=%d) aborted", equeue_id);
eq->invalidate(tid);
return CELL_ETIMEDOUT;
}

View File

@ -38,7 +38,7 @@ int sys_event_flag_create(mem32_t eflag_id, mem_ptr_t<sys_event_flag_attr> attr,
eflag_id = sys_event_flag.GetNewId(new event_flag(init, (u32)attr->protocol, (int)attr->type));
sys_event_flag.Warning("*** event_flag created [%s] (protocol=0x%x, type=0x%x): id = %d",
attr->name, (u32)attr->protocol, (int)attr->type, eflag_id.GetValue());
wxString(attr->name, 8).wx_str(), (u32)attr->protocol, (int)attr->type, eflag_id.GetValue());
return CELL_OK;
}

View File

@ -11,7 +11,7 @@ int cellFsOpen(u32 path_addr, int flags, mem32_t fd, mem32_t arg, u64 size)
path.wx_str(), flags, fd.GetAddr(), arg.GetAddr(), size);
const wxString& ppath = path;
//ConLog.Warning("path: %s [%s]", ppath, path);
//ConLog.Warning("path: %s [%s]", ppath.wx_str(), path.wx_str());
s32 _oflags = flags;
if(flags & CELL_O_CREAT)

View File

@ -16,7 +16,7 @@ int sys_lwcond_create(mem_ptr_t<sys_lwcond_t> lwcond, mem_ptr_t<sys_lwmutex_t> l
lwcond->lwcond_queue = sys_lwcond.GetNewId(new LWCond(attr->name_u64));
sys_lwcond.Warning("*** lwcond created [%s] (attr=0x%x, lwmutex.sq=0x%x): id = %d",
attr->name, (u32)lwmutex->attribute, (u32)lwmutex->sleep_queue, (u32)lwcond->lwcond_queue);
wxString(attr->name, 8).wx_str(), (u32)lwmutex->attribute, (u32)lwmutex->sleep_queue, (u32)lwcond->lwcond_queue);
return CELL_OK;
}

View File

@ -36,7 +36,7 @@ int sys_lwmutex_create(mem_ptr_t<sys_lwmutex_t> lwmutex, mem_ptr_t<sys_lwmutex_a
lwmutex->sleep_queue = sq_id;
sc_lwmutex.Log("*** lwmutex created [%s] (attribute=0x%x): sq_id = %d",
attr->name, (u32)lwmutex->attribute, sq_id);
wxString(attr->name, 8).wx_str(), (u32)lwmutex->attribute, sq_id);
return CELL_OK;
}
@ -254,7 +254,7 @@ int sys_lwmutex_t::lock(be_t<u32> tid, u64 timeout)
case SMR_TIMEOUT:
sq->invalidate(tid); return CELL_ETIMEDOUT;
case SMR_ABORT:
if (Emu.IsStopped()) ConLog.Warning("sys_lwmutex_t::lock(sq=%d, ...) aborted", (u32)sleep_queue);
if (Emu.IsStopped()) ConLog.Warning("sys_lwmutex_t::lock(sq=%d) aborted", (u32)sleep_queue);
default:
sq->invalidate(tid); return CELL_EINVAL;
}

View File

@ -28,7 +28,7 @@ int sys_rwlock_create(mem32_t rw_lock_id, mem_ptr_t<sys_rwlock_attribute_t> attr
rw_lock_id = sys_rwlock.GetNewId(new RWLock((u32)attr->attr_protocol, attr->name_u64));
sys_rwlock.Warning("*** rwlock created [%s] (protocol=0x%x): id = %d",
attr->name, (u32)attr->attr_protocol, rw_lock_id.GetValue());
wxString(attr->name, 8).wx_str(), (u32)attr->attr_protocol, rw_lock_id.GetValue());
return CELL_OK;
}

View File

@ -77,7 +77,7 @@ int sys_spu_image_open(mem_ptr_t<sys_spu_image> img, u32 path_addr)
vfsFile f(path);
if(!f.IsOpened())
{
sc_spu.Error("sys_spu_image_open error: '%s' not found!", path);
sc_spu.Error("sys_spu_image_open error: '%s' not found!", path.wx_str());
return CELL_ENOENT;
}

View File

@ -28,7 +28,7 @@ struct semaphore
int sys_semaphore_create(u32 sem_addr, u32 attr_addr, int initial_count, int max_count)
{
sys_sem.Log("sys_semaphore_create(sem_addr=0x%x, attr_addr=0x%x, initial_count=%d, max_count=%d)",
sys_sem.Warning("sys_semaphore_create(sem_addr=0x%x, attr_addr=0x%x, initial_count=%d, max_count=%d)",
sem_addr, attr_addr, initial_count, max_count);
if(!Memory.IsGoodAddr(sem_addr) || !Memory.IsGoodAddr(attr_addr)) return CELL_EFAULT;

View File

@ -40,7 +40,7 @@ void GameViewer::LoadGames()
m_games.Add(buf);
}
//ConLog.Write("path: %s", m_path.c_str());
//ConLog.Write("path: %s", m_path.wx_str());
//ConLog.Write("folders count: %d", m_games.GetCount());
}

View File

@ -776,7 +776,7 @@ void MainFrame::UpdateUI(wxCommandEvent& event)
//send_exit.Enable(false);
bool enable_commands = !is_stopped && Emu.GetCallbackManager().m_exit_callback.m_callbacks.GetCount();
send_open_menu.SetItemLabel(wxString::Format("Send %s system menu cmd", m_sys_menu_opened ? "close" : "open"));
send_open_menu.SetItemLabel(wxString::Format("Send %s system menu cmd", wxString(m_sys_menu_opened ? "close" : "open").wx_str()));
send_open_menu.Enable(enable_commands);
send_exit.Enable(enable_commands);

View File

@ -512,7 +512,7 @@ void RSXDebugger::GetSettings()
LIST_SETTINGS_ADD("Alpha func", !(render.m_set_alpha_func) ? "(none)" : wxString::Format("0x%x (%s)",
render.m_alpha_func,
ParseGCMEnum(render.m_alpha_func, CELL_GCM_ENUM)));
ParseGCMEnum(render.m_alpha_func, CELL_GCM_ENUM).wx_str()));
LIST_SETTINGS_ADD("Blend color", !(render.m_set_blend_color) ? "(none)" : wxString::Format("R:%d, G:%d, B:%d, A:%d",
render.m_blend_color_r,
render.m_blend_color_g,
@ -532,10 +532,10 @@ void RSXDebugger::GetSettings()
LIST_SETTINGS_ADD("Depth bounds", wxString::Format("Min:%f, Max:%f", render.m_depth_bounds_min, render.m_depth_bounds_max));
LIST_SETTINGS_ADD("Depth func", !(render.m_set_depth_func) ? "(none)" : wxString::Format("0x%x (%s)",
render.m_depth_func,
ParseGCMEnum(render.m_depth_func, CELL_GCM_ENUM)));
ParseGCMEnum(render.m_depth_func, CELL_GCM_ENUM).wx_str()));
LIST_SETTINGS_ADD("Draw mode", wxString::Format("%d (%s)",
render.m_draw_mode,
ParseGCMEnum(render.m_draw_mode, CELL_GCM_PRIMITIVE_ENUM)));
ParseGCMEnum(render.m_draw_mode, CELL_GCM_PRIMITIVE_ENUM).wx_str()));
LIST_SETTINGS_ADD("Scissor", wxString::Format("X:%d, Y:%d, W:%d, H:%d",
render.m_scissor_x,
render.m_scissor_y,
@ -543,7 +543,7 @@ void RSXDebugger::GetSettings()
render.m_scissor_h));
LIST_SETTINGS_ADD("Stencil func", !(render.m_set_stencil_func) ? "(none)" : wxString::Format("0x%x (%s)",
render.m_stencil_func,
ParseGCMEnum(render.m_stencil_func, CELL_GCM_ENUM)));
ParseGCMEnum(render.m_stencil_func, CELL_GCM_ENUM).wx_str()));
LIST_SETTINGS_ADD("Surface Pitch A", wxString::Format("0x%x", render.m_surface_pitch_a));
LIST_SETTINGS_ADD("Surface Pitch B", wxString::Format("0x%x", render.m_surface_pitch_b));
LIST_SETTINGS_ADD("Surface Pitch C", wxString::Format("0x%x", render.m_surface_pitch_c));
@ -733,7 +733,7 @@ wxString RSXDebugger::DisAsmCommand(u32 cmd, u32 count, u32 currentAddr, u32 ioA
default: DISASM("(Bad location!);"); break;
}
DISASM(" Cubemap:%s; Dimension:0x%x; Format:0x%x; Mipmap:0x%x",
((args[1] >> 2) & 0x1) ? "True" : "False",
wxString(((args[1] >> 2) & 0x1) ? "True" : "False").wx_str(),
((args[1] >> 4) & 0xf),
((args[1] >> 8) & 0xff),
((args[1] >> 16) & 0xffff));

View File

@ -225,13 +225,13 @@ bool ELF32Loader::LoadPhdrData(u64 _offset)
if(note.descsz == sizeof(note.desc))
{
ConLog.Warning("name = %s", note.name);
ConLog.Warning("name = %s", wxString(note.name, 8).wx_str());
ConLog.Warning("ls_size = %d", note.desc.ls_size);
ConLog.Warning("stack_size = %d", note.desc.stack_size);
}
else
{
ConLog.Warning("desc = '%s'", note.desc_text);
ConLog.Warning("desc = '%s'", wxString(note.desc_text, 32).wx_str());
}
}
#ifdef LOADER_DEBUG
@ -249,7 +249,7 @@ bool ELF32Loader::LoadShdrData(u64 offset)
Elf32_Shdr& shdr = shdr_arr[i];
#ifdef LOADER_DEBUG
if(i < shdr_name_arr.GetCount()) ConLog.Write("Name: %s", shdr_name_arr[i]);
if(i < shdr_name_arr.GetCount()) ConLog.Write("Name: %s", shdr_name_arr[i].wx_str());
shdr.Show();
ConLog.SkipLn();
#endif

View File

@ -27,13 +27,13 @@ struct Elf32_Ehdr
{
#ifdef LOADER_DEBUG
ConLog.Write("Magic: %08x", e_magic);
ConLog.Write("Class: %s", "ELF32");
ConLog.Write("Data: %s", Ehdr_DataToString(e_data));
ConLog.Write("Class: %s", wxString("ELF32").wx_str());
ConLog.Write("Data: %s", Ehdr_DataToString(e_data).wx_str());
ConLog.Write("Current Version: %d", e_curver);
ConLog.Write("OS/ABI: %s", Ehdr_OS_ABIToString(e_os_abi));
ConLog.Write("OS/ABI: %s", Ehdr_OS_ABIToString(e_os_abi).wx_str());
ConLog.Write("ABI version: %lld", e_abi_ver);
ConLog.Write("Type: %s", Ehdr_TypeToString(e_type));
ConLog.Write("Machine: %s", Ehdr_MachineToString(e_machine));
ConLog.Write("Type: %s", Ehdr_TypeToString(e_type).wx_str());
ConLog.Write("Machine: %s", Ehdr_MachineToString(e_machine).wx_str());
ConLog.Write("Version: %d", e_version);
ConLog.Write("Entry point address: 0x%x", e_entry);
ConLog.Write("Program headers offset: 0x%08x", e_phoff);
@ -268,13 +268,13 @@ struct Elf32_Phdr
void Show()
{
#ifdef LOADER_DEBUG
ConLog.Write("Type: %s", Phdr_TypeToString(p_type));
ConLog.Write("Type: %s", Phdr_TypeToString(p_type).wx_str());
ConLog.Write("Offset: 0x%08x", p_offset);
ConLog.Write("Virtual address: 0x%08x", p_vaddr);
ConLog.Write("Physical address: 0x%08x", p_paddr);
ConLog.Write("File size: 0x%08x", p_filesz);
ConLog.Write("Memory size: 0x%08x", p_memsz);
ConLog.Write("Flags: %s", Phdr_FlagsToString(p_flags));
ConLog.Write("Flags: %s", Phdr_FlagsToString(p_flags).wx_str());
ConLog.Write("Align: 0x%x", p_align);
#endif
}

View File

@ -419,7 +419,7 @@ bool ELF64Loader::LoadShdrData(u64 offset)
const wxString& name = shdr_name_arr[i];
#ifdef LOADER_DEBUG
ConLog.Write("Name: %s", shdr_name_arr[i]);
ConLog.Write("Name: %s", shdr_name_arr[i].wx_str());
#endif
}

View File

@ -50,13 +50,13 @@ struct Elf64_Ehdr
{
#ifdef LOADER_DEBUG
ConLog.Write("Magic: %08x", e_magic);
ConLog.Write("Class: %s", "ELF64");
ConLog.Write("Data: %s", Ehdr_DataToString(e_data));
ConLog.Write("Class: %s", wxString("ELF64").wx_str());
ConLog.Write("Data: %s", Ehdr_DataToString(e_data).wx_str());
ConLog.Write("Current Version: %d", e_curver);
ConLog.Write("OS/ABI: %s", Ehdr_OS_ABIToString(e_os_abi));
ConLog.Write("OS/ABI: %s", Ehdr_OS_ABIToString(e_os_abi).wx_str());
ConLog.Write("ABI version: %lld", e_abi_ver);
ConLog.Write("Type: %s", Ehdr_TypeToString(e_type));
ConLog.Write("Machine: %s", Ehdr_MachineToString(e_machine));
ConLog.Write("Type: %s", Ehdr_TypeToString(e_type).wx_str());
ConLog.Write("Machine: %s", Ehdr_MachineToString(e_machine).wx_str());
ConLog.Write("Version: %d", e_version);
ConLog.Write("Entry point address: 0x%08llx", e_entry);
ConLog.Write("Program headers offset: 0x%08llx", e_phoff);
@ -145,13 +145,13 @@ struct Elf64_Phdr
void Show()
{
#ifdef LOADER_DEBUG
ConLog.Write("Type: %s", Phdr_TypeToString(p_type));
ConLog.Write("Type: %s", Phdr_TypeToString(p_type).wx_str());
ConLog.Write("Offset: 0x%08llx", p_offset);
ConLog.Write("Virtual address: 0x%08llx", p_vaddr);
ConLog.Write("Physical address: 0x%08llx", p_paddr);
ConLog.Write("File size: 0x%08llx", p_filesz);
ConLog.Write("Memory size: 0x%08llx", p_memsz);
ConLog.Write("Flags: %s", Phdr_FlagsToString(p_flags));
ConLog.Write("Flags: %s", Phdr_FlagsToString(p_flags).wx_str());
ConLog.Write("Align: 0x%llx", p_align);
#endif
}

View File

@ -25,7 +25,7 @@ struct SceHeader
void Show()
{
ConLog.Write("Magic: %08x", se_magic);
ConLog.Write("Class: %s", "SELF");
ConLog.Write("Class: %s", wxString("SELF").wx_str());
ConLog.Write("hver: 0x%08x", se_hver);
ConLog.Write("flags: 0x%04x", se_flags);
ConLog.Write("type: 0x%04x", se_type);

View File

@ -1450,7 +1450,7 @@ bool frontend_decrypt(scetool::s8 *file_in, scetool::s8 *file_out)
if(ctxt->sceh->header_type == SCE_HEADER_TYPE_SELF)
{
if(self_write_to_elf(ctxt, file_out) == TRUE)
ConLog.Write("scetool: ELF written to %s", file_out);
ConLog.Write("scetool: ELF written to %s", wxString(file_out).wx_str());
else
ConLog.Error("scetool: Could not write ELF");
}
@ -1458,7 +1458,7 @@ bool frontend_decrypt(scetool::s8 *file_in, scetool::s8 *file_out)
{
if(_write_buffer(file_out, ctxt->scebuffer + ctxt->metash[0].data_offset,
ctxt->metash[0].data_size + ctxt->metash[1].data_size))
ConLog.Write("scetool: RVK written to %s", file_out);
ConLog.Write("scetool: RVK written to %s", wxString(file_out).wx_str());
else
ConLog.Error("scetool: Could not write RVK");
}
@ -1466,7 +1466,7 @@ bool frontend_decrypt(scetool::s8 *file_in, scetool::s8 *file_out)
{
/*if(_write_buffer(file_out, ctxt->scebuffer + ctxt->metash[0].data_offset,
ctxt->metash[0].data_size + ctxt->metash[1].data_size + ctxt->metash[2].data_size))
printf("[*] PKG written to %s.\n", file_out);
printf("[*] PKG written to %s.\n", wxString(file_out).wx_str());
else
printf("[*] Error: Could not write PKG.\n");*/
ConLog.Warning("scetool: Not yet supported");
@ -1475,7 +1475,7 @@ bool frontend_decrypt(scetool::s8 *file_in, scetool::s8 *file_out)
{
if(_write_buffer(file_out, ctxt->scebuffer + ctxt->metash[0].data_offset,
ctxt->metash[0].data_size + ctxt->metash[1].data_size))
ConLog.Write("scetool: SPP written to %s", file_out);
ConLog.Write("scetool: SPP written to %s", wxString(file_out).wx_str());
else
ConLog.Error("scetool: Could not write SPP");
}
@ -1488,11 +1488,11 @@ bool frontend_decrypt(scetool::s8 *file_in, scetool::s8 *file_out)
free(ctxt);
}
else
ConLog.Error("scetool: Could not process %s", file_in);
ConLog.Error("scetool: Could not process %s", wxString(file_in).wx_str());
free(buf);
}
else
ConLog.Error("scetool: Could not load %s", file_in);
ConLog.Error("scetool: Could not load %s", wxString(file_in).wx_str());
return true;
}

View File

@ -204,9 +204,9 @@ static void print_pkg_header(pkg_header *header)
ConLog.Write("Pkg size: %llu", ntohll(header->pkg_size));
ConLog.Write("Data offset: 0x%llx", ntohll(header->data_offset));
ConLog.Write("Data size: 0x%llu", ntohll(header->data_size));
ConLog.Write("TitleID: %s", header->title_id);
ConLog.Write("QA Digest: %s", qa);
ConLog.Write( "KLicensee: %s", kl);
ConLog.Write("TitleID: %s", wxString(header->title_id, 48).wx_str());
ConLog.Write("QA Digest: %s", wxString(qa, 33).wx_str());
ConLog.Write("KLicensee: %s", wxString(kl, 33).wx_str());
}
static void *pkg_info(const char *fname, pkg_header **h_ptr)
@ -418,7 +418,7 @@ bool pkg_unpack(const char *fname)
if (mkdir(titleID.c_str()) < 0)
{
ConLog.Error("UnPkg: Could not mkdir.");
ConLog.Error("UnPkg: Possibly, folder already exists in dev_hdd0\\game : %s", titleID.c_str());
ConLog.Error("UnPkg: Possibly, folder already exists in dev_hdd0\\game : %s", wxString(titleID).wx_str());
wxSetWorkingDirectory(mainDir);
free(header);
return false;