mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-22 10:42:36 +01:00
Fixed conflicts
(merge branch)
This commit is contained in:
commit
ab2bc35b18
@ -1291,7 +1291,7 @@ private:
|
||||
}
|
||||
void SUBF(u32 rd, u32 ra, u32 rb, u32 oe, bool rc)
|
||||
{
|
||||
DisAsm_R3_OE_RC("subf", rd, ra, rb, oe, rc);
|
||||
DisAsm_R3_OE_RC("subf", rd, ra, rb, oe, rc);
|
||||
}
|
||||
void LDUX(u32 rd, u32 ra, u32 rb)
|
||||
{
|
||||
@ -1301,6 +1301,10 @@ private:
|
||||
{
|
||||
DisAsm_R2("dcbst", ra, rb);
|
||||
}
|
||||
void LWZUX(u32 rd, u32 ra, u32 rb)
|
||||
{
|
||||
DisAsm_R3("lwzux", rd, ra, rb);
|
||||
}
|
||||
void CNTLZD(u32 ra, u32 rs, bool rc)
|
||||
{
|
||||
DisAsm_R2_RC("cntlzd", ra, rs, rc);
|
||||
@ -1399,9 +1403,9 @@ private:
|
||||
{
|
||||
DisAsm_R3("stdux", rs, ra, rb);
|
||||
}
|
||||
void STBUX(u32 rs, u32 ra, u32 rb)
|
||||
void STWUX(u32 rs, u32 ra, u32 rb)
|
||||
{
|
||||
DisAsm_R3("stbux", rs, ra, rb);
|
||||
DisAsm_R3("stwux", rs, ra, rb);
|
||||
}
|
||||
void STVEWX(u32 vs, u32 ra, u32 rb)
|
||||
{
|
||||
@ -1439,6 +1443,10 @@ private:
|
||||
{
|
||||
DisAsm_R3("dcbtst", th, ra, rb);
|
||||
}
|
||||
void STBUX(u32 rs, u32 ra, u32 rb)
|
||||
{
|
||||
DisAsm_R3("stbux", rs, ra, rb);
|
||||
}
|
||||
void ADD(u32 rd, u32 ra, u32 rb, u32 oe, bool rc)
|
||||
{
|
||||
DisAsm_R3_OE_RC("add", rd, ra, rb, oe, rc);
|
||||
@ -1478,6 +1486,10 @@ private:
|
||||
default: DisAsm_R1_IMM("mfspr", rd, spr); break;
|
||||
}
|
||||
}
|
||||
void LWAX(u32 rd, u32 ra, u32 rb)
|
||||
{
|
||||
DisAsm_R3("lwax", rd, ra, rb);
|
||||
}
|
||||
void DST(u32 ra, u32 rb, u32 strm, u32 t)
|
||||
{
|
||||
if(t)
|
||||
@ -1507,6 +1519,10 @@ private:
|
||||
default: DisAsm_R1_IMM("mftb", rd, spr); break;
|
||||
}
|
||||
}
|
||||
void LWAUX(u32 rd, u32 ra, u32 rb)
|
||||
{
|
||||
DisAsm_R3("lwaux", rd, ra, rb);
|
||||
}
|
||||
void DSTST(u32 ra, u32 rb, u32 strm, u32 t)
|
||||
{
|
||||
if(t)
|
||||
@ -1534,6 +1550,10 @@ private:
|
||||
{
|
||||
DisAsm_R3("ecowx", rs, ra, rb);
|
||||
}
|
||||
void STHUX(u32 rs, u32 ra, u32 rb)
|
||||
{
|
||||
DisAsm_R3("sthux", rs, ra, rb);
|
||||
}
|
||||
void OR(u32 ra, u32 rs, u32 rb, bool rc)
|
||||
{
|
||||
if(rs==rb)
|
||||
@ -1622,9 +1642,13 @@ private:
|
||||
{
|
||||
DisAsm_F1_R2("lfdux", frd, ra, rb);
|
||||
}
|
||||
void STVLX(u32 sd, u32 ra, u32 rb)
|
||||
void STVLX(u32 vs, u32 ra, u32 rb)
|
||||
{
|
||||
DisAsm_V1_R2("stvlx", sd, ra, rb);
|
||||
DisAsm_V1_R2("stvlx", vs, ra, rb);
|
||||
}
|
||||
void STWBRX(u32 rs, u32 ra, u32 rb)
|
||||
{
|
||||
DisAsm_R3("stwbrx", rs, ra, rb);
|
||||
}
|
||||
void STFSX(u32 frs, u32 ra, u32 rb)
|
||||
{
|
||||
@ -1685,9 +1709,13 @@ private:
|
||||
{
|
||||
Write("eieio");
|
||||
}
|
||||
void STVLXL(u32 sd, u32 ra, u32 rb)
|
||||
void STVLXL(u32 vs, u32 ra, u32 rb)
|
||||
{
|
||||
DisAsm_V1_R2("stvlxl", sd, ra, rb);
|
||||
DisAsm_V1_R2("stvlxl", vs, ra, rb);
|
||||
}
|
||||
void STHBRX(u32 rs, u32 ra, u32 rb)
|
||||
{
|
||||
DisAsm_R3("sthbrx", rs, ra, rb);
|
||||
}
|
||||
void EXTSH(u32 ra, u32 rs, bool rc)
|
||||
{
|
||||
@ -1754,6 +1782,14 @@ private:
|
||||
{
|
||||
DisAsm_R2_IMM("lhzu", rs, ra, d);
|
||||
}
|
||||
void LHA(u32 rs, u32 ra, s32 d)
|
||||
{
|
||||
DisAsm_R2_IMM("lha", rs, ra, d);
|
||||
}
|
||||
void LHAU(u32 rs, u32 ra, s32 d)
|
||||
{
|
||||
DisAsm_R2_IMM("lhau", rs, ra, d);
|
||||
}
|
||||
void STH(u32 rs, u32 ra, s32 d)
|
||||
{
|
||||
DisAsm_R2_IMM("sth", rs, ra, d);
|
||||
@ -1810,6 +1846,10 @@ private:
|
||||
{
|
||||
DisAsm_R2_IMM("ldu", rd, ra, ds);
|
||||
}
|
||||
void LWA(u32 rd, u32 ra, s32 ds)
|
||||
{
|
||||
DisAsm_R2_IMM("lwa", rd, ra, ds);
|
||||
}
|
||||
void FDIVS(u32 frd, u32 fra, u32 frb, bool rc)
|
||||
{
|
||||
DisAsm_F3_RC("fdivs", frd, fra, frb, rc);
|
||||
|
@ -250,6 +250,8 @@ namespace PPU_instr
|
||||
bind_instr(main_list, STBU, RS, RA, D);
|
||||
bind_instr(main_list, LHZ, RD, RA, D);
|
||||
bind_instr(main_list, LHZU, RD, RA, D);
|
||||
bind_instr(main_list, LHA, RD, RA, D);
|
||||
bind_instr(main_list, LHAU, RD, RA, D);
|
||||
bind_instr(main_list, STH, RS, RA, D);
|
||||
bind_instr(main_list, STHU, RS, RA, D);
|
||||
bind_instr(main_list, LMW, RD, RA, D);
|
||||
@ -460,7 +462,9 @@ namespace PPU_instr
|
||||
/*0x026*/bind_instr(g1f_list, LVSR, VD, RA, RB);
|
||||
/*0x027*/bind_instr(g1f_list, LVEHX, VD, RA, RB);
|
||||
/*0x028*/bind_instr(g1f_list, SUBF, RD, RA, RB, OE, RC);
|
||||
/*0x035*/bind_instr(g1f_list, LDUX, RD, RA, RB);
|
||||
/*0x036*/bind_instr(g1f_list, DCBST, RA, RB);
|
||||
/*0x037*/bind_instr(g1f_list, LWZUX, RD, RA, RB);
|
||||
/*0x03a*/bind_instr(g1f_list, CNTLZD, RA, RS, RC);
|
||||
/*0x03c*/bind_instr(g1f_list, ANDC, RA, RS, RB, RC);
|
||||
/*0x047*/bind_instr(g1f_list, LVEWX, VD, RA, RB);
|
||||
@ -482,7 +486,7 @@ namespace PPU_instr
|
||||
/*0x097*/bind_instr(g1f_list, STWX, RS, RA, RB);
|
||||
/*0x0a7*/bind_instr(g1f_list, STVEHX, VS, RA, RB);
|
||||
/*0x0b5*/bind_instr(g1f_list, STDUX, RS, RA, RB);
|
||||
/*0x0f7*/bind_instr(g1f_list, STBUX, RS, RA, RB);
|
||||
/*0x0b7*/bind_instr(g1f_list, STWUX, RS, RA, RB);
|
||||
/*0x0c7*/bind_instr(g1f_list, STVEWX, VS, RA, RB);
|
||||
/*0x0ca*/bind_instr(g1f_list, ADDZE, RD, RA, OE, RC);
|
||||
/*0x0d6*/bind_instr(g1f_list, STDCX_, RS, RA, RB);
|
||||
@ -492,6 +496,7 @@ namespace PPU_instr
|
||||
/*0x0ea*/bind_instr(g1f_list, ADDME, RD, RA, OE, RC);
|
||||
/*0x0eb*/bind_instr(g1f_list, MULLW, RD, RA, RB, OE, RC);
|
||||
/*0x0f6*/bind_instr(g1f_list, DCBTST, TH, RA, RB);
|
||||
/*0x0f7*/bind_instr(g1f_list, STBUX, RS, RA, RB);
|
||||
/*0x10a*/bind_instr(g1f_list, ADD, RD, RA, RB, OE, RC);
|
||||
/*0x116*/bind_instr(g1f_list, DCBT, RA, RB, TH);
|
||||
/*0x117*/bind_instr(g1f_list, LHZX, RD, RA, RB);
|
||||
@ -500,15 +505,18 @@ namespace PPU_instr
|
||||
/*0x137*/bind_instr(g1f_list, LHZUX, RD, RA, RB);
|
||||
/*0x13c*/bind_instr(g1f_list, XOR, RA, RS, RB, RC);
|
||||
/*0x153*/bind_instr(g1f_list, MFSPR, RD, SPR);
|
||||
/*0x155*/bind_instr(g1f_list, LWAX, RD, RA, RB);
|
||||
/*0x156*/bind_instr(g1f_list, DST, RA, RB, STRM, L_6);
|
||||
/*0x157*/bind_instr(g1f_list, LHAX, RD, RA, RB);
|
||||
/*0x167*/bind_instr(g1f_list, LVXL, VD, RA, RB);
|
||||
/*0x173*/bind_instr(g1f_list, MFTB, RD, SPR);
|
||||
/*0x175*/bind_instr(g1f_list, LWAUX, RD, RA, RB);
|
||||
/*0x176*/bind_instr(g1f_list, DSTST, RA, RB, STRM, L_6);
|
||||
/*0x177*/bind_instr(g1f_list, LHAUX, RD, RA, RB);
|
||||
/*0x197*/bind_instr(g1f_list, STHX, RS, RA, RB);
|
||||
/*0x19c*/bind_instr(g1f_list, ORC, RA, RS, RB, RC);
|
||||
/*0x1b6*/bind_instr(g1f_list, ECOWX, RS, RA, RB);
|
||||
/*0x1b7*/bind_instr(g1f_list, STHUX, RS, RA, RB);
|
||||
/*0x1bc*/bind_instr(g1f_list, OR, RA, RS, RB, RC);
|
||||
/*0x1c9*/bind_instr(g1f_list, DIVDU, RD, RA, RB, OE, RC);
|
||||
/*0x1cb*/bind_instr(g1f_list, DIVWU, RD, RA, RB, OE, RC);
|
||||
@ -529,6 +537,7 @@ namespace PPU_instr
|
||||
/*0x257*/bind_instr(g1f_list, LFDX, FRD, RA, RB);
|
||||
/*0x277*/bind_instr(g1f_list, LFDUX, FRD, RA, RB);
|
||||
/*0x287*/bind_instr(g1f_list, STVLX, VS, RA, RB);
|
||||
/*0x296*/bind_instr(g1f_list, STWBRX, RS, RA, RB);
|
||||
/*0x297*/bind_instr(g1f_list, STFSX, FRS, RA, RB);
|
||||
/*0x2a7*/bind_instr(g1f_list, STVRX, VS, RA, RB);
|
||||
/*0x2d7*/bind_instr(g1f_list, STFDX, FRS, RA, RB);
|
||||
@ -543,6 +552,7 @@ namespace PPU_instr
|
||||
/*0x33b*/bind_instr(g1f_list, SRADI2, RA, RS, sh, RC);
|
||||
/*0x356*/bind_instr(g1f_list, EIEIO);
|
||||
/*0x387*/bind_instr(g1f_list, STVLXL, VS, RA, RB);
|
||||
/*0x396*/bind_instr(g1f_list, STHBRX, RS, RA, RB);
|
||||
/*0x39a*/bind_instr(g1f_list, EXTSH, RA, RS, RC);
|
||||
/*0x387*/bind_instr(g1f_list, STVRXL, VS, RA, RB);
|
||||
/*0x3ba*/bind_instr(g1f_list, EXTSB, RA, RS, RC);
|
||||
@ -553,6 +563,7 @@ namespace PPU_instr
|
||||
|
||||
bind_instr(g3a_list, LD, RD, RA, DS);
|
||||
bind_instr(g3a_list, LDU, RD, RA, DS);
|
||||
bind_instr(g3a_list, LWA, RD, RA, DS);
|
||||
|
||||
bind_instr(g3b_list, FDIVS, FRD, FRA, FRB, RC);
|
||||
bind_instr(g3b_list, FSUBS, FRD, FRA, FRB, RC);
|
||||
|
@ -92,8 +92,8 @@ private:
|
||||
|
||||
const int fpc = _fpclass(v);
|
||||
#ifdef __GNUG__
|
||||
if(fpc == FP_SUBNORMAL)
|
||||
return signbit(v) ? -0.0f : 0.0f;
|
||||
if(fpc == FP_SUBNORMAL)
|
||||
return signbit(v) ? -0.0f : 0.0f;
|
||||
#else
|
||||
if(fpc & _FPCLASS_ND) return -0.0f;
|
||||
if(fpc & _FPCLASS_PD) return 0.0f;
|
||||
@ -2452,6 +2452,12 @@ private:
|
||||
{
|
||||
//UNK("dcbst", false);
|
||||
}
|
||||
void LWZUX(u32 rd, u32 ra, u32 rb)
|
||||
{
|
||||
const u64 addr = CPU.GPR[ra] + CPU.GPR[rb];
|
||||
CPU.GPR[rd] = Memory.Read32(addr);
|
||||
CPU.GPR[ra] = addr;
|
||||
}
|
||||
void CNTLZD(u32 ra, u32 rs, bool rc)
|
||||
{
|
||||
u32 i;
|
||||
@ -2650,10 +2656,10 @@ private:
|
||||
Memory.Write64(addr, CPU.GPR[rs]);
|
||||
CPU.GPR[ra] = addr;
|
||||
}
|
||||
void STBUX(u32 rs, u32 ra, u32 rb)
|
||||
void STWUX(u32 rs, u32 ra, u32 rb)
|
||||
{
|
||||
const u64 addr = CPU.GPR[ra] + CPU.GPR[rb];
|
||||
Memory.Write8(addr, CPU.GPR[rs]);
|
||||
Memory.Write32(addr, CPU.GPR[rs]);
|
||||
CPU.GPR[ra] = addr;
|
||||
}
|
||||
void STVEWX(u32 vs, u32 ra, u32 rb)
|
||||
@ -2725,6 +2731,12 @@ private:
|
||||
{
|
||||
//UNK("dcbtst", false);
|
||||
}
|
||||
void STBUX(u32 rs, u32 ra, u32 rb)
|
||||
{
|
||||
const u64 addr = CPU.GPR[ra] + CPU.GPR[rb];
|
||||
Memory.Write8(addr, CPU.GPR[rs]);
|
||||
CPU.GPR[ra] = addr;
|
||||
}
|
||||
void ADD(u32 rd, u32 ra, u32 rb, u32 oe, bool rc)
|
||||
{
|
||||
const u64 RA = CPU.GPR[ra];
|
||||
@ -2767,6 +2779,10 @@ private:
|
||||
{
|
||||
CPU.GPR[rd] = GetRegBySPR(spr);
|
||||
}
|
||||
void LWAX(u32 rd, u32 ra, u32 rb)
|
||||
{
|
||||
CPU.GPR[rd] = (s64)(s32)Memory.Read32(ra ? CPU.GPR[ra] + CPU.GPR[rb] : CPU.GPR[rb]);
|
||||
}
|
||||
void DST(u32 ra, u32 rb, u32 strm, u32 t)
|
||||
{
|
||||
}
|
||||
@ -2789,6 +2805,12 @@ private:
|
||||
default: UNK(wxString::Format("mftb r%d, %d", rd, spr)); break;
|
||||
}
|
||||
}
|
||||
void LWAUX(u32 rd, u32 ra, u32 rb)
|
||||
{
|
||||
const u64 addr = ra ? CPU.GPR[ra] + CPU.GPR[rb] : CPU.GPR[rb];
|
||||
CPU.GPR[rd] = (s64)(s32)Memory.Read32(addr);
|
||||
CPU.GPR[ra] = addr;
|
||||
}
|
||||
void DSTST(u32 ra, u32 rb, u32 strm, u32 t)
|
||||
{
|
||||
}
|
||||
@ -2813,6 +2835,12 @@ private:
|
||||
//HACK!
|
||||
Memory.Write32((ra ? CPU.GPR[ra] + CPU.GPR[rb] : CPU.GPR[rb]), CPU.GPR[rs]);
|
||||
}
|
||||
void STHUX(u32 rs, u32 ra, u32 rb)
|
||||
{
|
||||
const u64 addr = CPU.GPR[ra] + CPU.GPR[rb];
|
||||
Memory.Write16(addr, CPU.GPR[rs]);
|
||||
CPU.GPR[ra] = addr;
|
||||
}
|
||||
void OR(u32 ra, u32 rs, u32 rb, bool rc)
|
||||
{
|
||||
CPU.GPR[ra] = CPU.GPR[rs] | CPU.GPR[rb];
|
||||
@ -2969,6 +2997,10 @@ private:
|
||||
|
||||
Memory.WriteLeft(addr, 16 - eb, CPU.VPR[vs]._u8 + eb);
|
||||
}
|
||||
void STWBRX(u32 rs, u32 ra, u32 rb)
|
||||
{
|
||||
(u32&)Memory[ra ? CPU.GPR[ra] + CPU.GPR[rb] : CPU.GPR[rb]] = CPU.GPR[rs];
|
||||
}
|
||||
void STFSX(u32 frs, u32 ra, u32 rb)
|
||||
{
|
||||
Memory.Write32((ra ? CPU.GPR[ra] + CPU.GPR[rb] : CPU.GPR[rb]), CPU.FPR[frs].To32());
|
||||
@ -3053,6 +3085,10 @@ private:
|
||||
|
||||
Memory.WriteLeft(addr, 16 - eb, CPU.VPR[vs]._u8 + eb);
|
||||
}
|
||||
void STHBRX(u32 rs, u32 ra, u32 rb)
|
||||
{
|
||||
(u16&)Memory[ra ? CPU.GPR[ra] + CPU.GPR[rb] : CPU.GPR[rb]] = CPU.GPR[rs];
|
||||
}
|
||||
void EXTSH(u32 ra, u32 rs, bool rc)
|
||||
{
|
||||
CPU.GPR[ra] = (s64)(s16)CPU.GPR[rs];
|
||||
@ -3134,6 +3170,16 @@ private:
|
||||
CPU.GPR[rd] = Memory.Read16(addr);
|
||||
CPU.GPR[ra] = addr;
|
||||
}
|
||||
void LHA(u32 rd, u32 ra, s32 d)
|
||||
{
|
||||
CPU.GPR[rd] = (s64)(s16)Memory.Read16(ra ? CPU.GPR[ra] + d : d);
|
||||
}
|
||||
void LHAU(u32 rd, u32 ra, s32 d)
|
||||
{
|
||||
const u64 addr = CPU.GPR[ra] + d;
|
||||
CPU.GPR[rd] = (s64)(s16)Memory.Read16(addr);
|
||||
CPU.GPR[ra] = addr;
|
||||
}
|
||||
void STH(u32 rs, u32 ra, s32 d)
|
||||
{
|
||||
Memory.Write16(ra ? CPU.GPR[ra] + d : d, CPU.GPR[rs]);
|
||||
@ -3213,6 +3259,10 @@ private:
|
||||
CPU.GPR[rd] = Memory.Read64(addr);
|
||||
CPU.GPR[ra] = addr;
|
||||
}
|
||||
void LWA(u32 rd, u32 ra, s32 ds)
|
||||
{
|
||||
CPU.GPR[rd] = (s64)(s32)Memory.Read32(ra ? CPU.GPR[ra] + ds : ds);
|
||||
}
|
||||
void FDIVS(u32 frd, u32 fra, u32 frb, bool rc)
|
||||
{
|
||||
if(FPRdouble::IsNaN(CPU.FPR[fra]))
|
||||
|
@ -256,7 +256,7 @@ namespace PPU_opcodes
|
||||
{
|
||||
CMP = 0x000,
|
||||
TW = 0x004,
|
||||
LVSL = 0x006, //Load Vector for Shift Left
|
||||
LVSL = 0x006, //Load Vector for Shift Left
|
||||
LVEBX = 0x007, //Load Vector Element Byte Indexed
|
||||
SUBFC = 0x008, //Subtract from Carrying
|
||||
MULHDU = 0x009,
|
||||
@ -276,6 +276,7 @@ namespace PPU_opcodes
|
||||
SUBF = 0x028,
|
||||
LDUX = 0x035, //Load Doubleword with Update Indexed
|
||||
DCBST = 0x036,
|
||||
LWZUX = 0x037,
|
||||
CNTLZD = 0x03a,
|
||||
ANDC = 0x03c,
|
||||
LVEWX = 0x047, //Load Vector Element Word Indexed
|
||||
@ -297,7 +298,7 @@ namespace PPU_opcodes
|
||||
STWX = 0x097,
|
||||
STVEHX = 0x0a7, //Store Vector Element Halfword Indexed
|
||||
STDUX = 0x0b5,
|
||||
STBUX = 0x0f7,
|
||||
STWUX = 0x0b7,
|
||||
STVEWX = 0x0c7, //Store Vector Element Word Indexed
|
||||
ADDZE = 0x0ca,
|
||||
STDCX_ = 0x0d6,
|
||||
@ -307,6 +308,7 @@ namespace PPU_opcodes
|
||||
ADDME = 0x0ea,
|
||||
MULLW = 0x0eb,
|
||||
DCBTST = 0x0f6,
|
||||
STBUX = 0x0f7,
|
||||
DOZ = 0x108,
|
||||
ADD = 0x10a,
|
||||
DCBT = 0x116,
|
||||
@ -316,15 +318,18 @@ namespace PPU_opcodes
|
||||
LHZUX = 0x137,
|
||||
XOR = 0x13c,
|
||||
MFSPR = 0x153,
|
||||
LWAX = 0x155,
|
||||
DST = 0x156, //Data Stream Touch
|
||||
LHAX = 0x157,
|
||||
LVXL = 0x167, //Load Vector Indexed Last
|
||||
MFTB = 0x173,
|
||||
LWAUX = 0x175,
|
||||
DSTST = 0x176, //Data Stream Touch for Store
|
||||
LHAUX = 0x177,
|
||||
STHX = 0x197, //Store Halfword Indexed
|
||||
ORC = 0x19c, //OR with Complement
|
||||
ECOWX = 0x1b6,
|
||||
STHUX = 0x1b7,
|
||||
OR = 0x1bc,
|
||||
DIVDU = 0x1c9,
|
||||
DIVWU = 0x1cb,
|
||||
@ -345,6 +350,7 @@ namespace PPU_opcodes
|
||||
LFDX = 0x257,
|
||||
LFDUX = 0x277,
|
||||
STVLX = 0x287, //Store Vector Left Indexed
|
||||
STWBRX = 0x296,
|
||||
STFSX = 0x297,
|
||||
STVRX = 0x2a7, //Store Vector Right Indexed
|
||||
STFDX = 0x2d7, //Store Floating-Point Double Indexed
|
||||
@ -359,6 +365,7 @@ namespace PPU_opcodes
|
||||
SRADI2 = 0x33b, //sh_5 != 0
|
||||
EIEIO = 0x356,
|
||||
STVLXL = 0x387, //Store Vector Left Indexed Last
|
||||
STHBRX = 0x396,
|
||||
EXTSH = 0x39a,
|
||||
STVRXL = 0x3a7, //Store Vector Right Indexed Last
|
||||
EXTSB = 0x3ba,
|
||||
@ -372,6 +379,7 @@ namespace PPU_opcodes
|
||||
{
|
||||
LD = 0x0,
|
||||
LDU = 0x1,
|
||||
LWA = 0x2,
|
||||
};
|
||||
|
||||
enum G_3bOpcodes //Field 26 - 30
|
||||
@ -658,6 +666,7 @@ public:
|
||||
virtual void SUBF(u32 rd, u32 ra, u32 rb, u32 oe, bool rc) = 0;
|
||||
virtual void LDUX(u32 rd, u32 ra, u32 rb) = 0;
|
||||
virtual void DCBST(u32 ra, u32 rb) = 0;
|
||||
virtual void LWZUX(u32 rd, u32 ra, u32 rb) = 0;
|
||||
virtual void CNTLZD(u32 ra, u32 rs, bool rc) = 0;
|
||||
virtual void ANDC(u32 ra, u32 rs, u32 rb, bool rc) = 0;
|
||||
virtual void LVEWX(u32 vd, u32 ra, u32 rb) = 0;
|
||||
@ -679,7 +688,7 @@ public:
|
||||
virtual void STWX(u32 rs, u32 ra, u32 rb) = 0;
|
||||
virtual void STVEHX(u32 vs, u32 ra, u32 rb) = 0;
|
||||
virtual void STDUX(u32 rs, u32 ra, u32 rb) = 0;
|
||||
virtual void STBUX(u32 rs, u32 ra, u32 rb) = 0;
|
||||
virtual void STWUX(u32 rs, u32 ra, u32 rb) = 0;
|
||||
virtual void STVEWX(u32 vs, u32 ra, u32 rb) = 0;
|
||||
virtual void ADDZE(u32 rd, u32 ra, u32 oe, bool rc) = 0;
|
||||
virtual void STDCX_(u32 rs, u32 ra, u32 rb) = 0;
|
||||
@ -689,6 +698,7 @@ public:
|
||||
virtual void ADDME(u32 rd, u32 ra, u32 oe, bool rc) = 0;
|
||||
virtual void MULLW(u32 rd, u32 ra, u32 rb, u32 oe, bool rc) = 0;
|
||||
virtual void DCBTST(u32 th, u32 ra, u32 rb) = 0;
|
||||
virtual void STBUX(u32 rs, u32 ra, u32 rb) = 0;
|
||||
virtual void ADD(u32 rd, u32 ra, u32 rb, u32 oe, bool rc) = 0;
|
||||
virtual void DCBT(u32 ra, u32 rb, u32 th) = 0;
|
||||
virtual void LHZX(u32 rd, u32 ra, u32 rb) = 0;
|
||||
@ -697,15 +707,18 @@ public:
|
||||
virtual void LHZUX(u32 rd, u32 ra, u32 rb) = 0;
|
||||
virtual void XOR(u32 rs, u32 ra, u32 rb, bool rc) = 0;
|
||||
virtual void MFSPR(u32 rd, u32 spr) = 0;
|
||||
virtual void LWAX(u32 rd, u32 ra, u32 rb) = 0;
|
||||
virtual void DST(u32 ra, u32 rb, u32 strm, u32 t) = 0;
|
||||
virtual void LHAX(u32 rd, u32 ra, u32 rb) = 0;
|
||||
virtual void LVXL(u32 vd, u32 ra, u32 rb) = 0;
|
||||
virtual void MFTB(u32 rd, u32 spr) = 0;
|
||||
virtual void LWAUX(u32 rd, u32 ra, u32 rb) = 0;
|
||||
virtual void DSTST(u32 ra, u32 rb, u32 strm, u32 t) = 0;
|
||||
virtual void LHAUX(u32 rd, u32 ra, u32 rb) = 0;
|
||||
virtual void STHX(u32 rs, u32 ra, u32 rb) = 0;
|
||||
virtual void ORC(u32 rs, u32 ra, u32 rb, bool rc) = 0;
|
||||
virtual void ECOWX(u32 rs, u32 ra, u32 rb) = 0;
|
||||
virtual void STHUX(u32 rs, u32 ra, u32 rb) = 0;
|
||||
virtual void OR(u32 ra, u32 rs, u32 rb, bool rc) = 0;
|
||||
virtual void DIVDU(u32 rd, u32 ra, u32 rb, u32 oe, bool rc) = 0;
|
||||
virtual void DIVWU(u32 rd, u32 ra, u32 rb, u32 oe, bool rc) = 0;
|
||||
@ -726,6 +739,7 @@ public:
|
||||
virtual void LFDX(u32 frd, u32 ra, u32 rb) = 0;
|
||||
virtual void LFDUX(u32 frd, u32 ra, u32 rb) = 0;
|
||||
virtual void STVLX(u32 vs, u32 ra, u32 rb) = 0;
|
||||
virtual void STWBRX(u32 rs, u32 ra, u32 rb) = 0;
|
||||
virtual void STFSX(u32 frs, u32 ra, u32 rb) = 0;
|
||||
virtual void STVRX(u32 vs, u32 ra, u32 rb) = 0;
|
||||
virtual void STFDX(u32 frs, u32 ra, u32 rb) = 0;
|
||||
@ -740,6 +754,7 @@ public:
|
||||
virtual void SRADI2(u32 ra, u32 rs, u32 sh, bool rc) = 0;
|
||||
virtual void EIEIO() = 0;
|
||||
virtual void STVLXL(u32 vs, u32 ra, u32 rb) = 0;
|
||||
virtual void STHBRX(u32 rs, u32 ra, u32 rb) = 0;
|
||||
virtual void EXTSH(u32 ra, u32 rs, bool rc) = 0;
|
||||
virtual void STVRXL(u32 sd, u32 ra, u32 rb) = 0;
|
||||
virtual void EXTSB(u32 ra, u32 rs, bool rc) = 0;
|
||||
@ -757,6 +772,8 @@ public:
|
||||
virtual void STBU(u32 rs, u32 ra, s32 d) = 0;
|
||||
virtual void LHZ(u32 rd, u32 ra, s32 d) = 0;
|
||||
virtual void LHZU(u32 rd, u32 ra, s32 d) = 0;
|
||||
virtual void LHA(u32 rs, u32 ra, s32 d) = 0;
|
||||
virtual void LHAU(u32 rs, u32 ra, s32 d) = 0;
|
||||
virtual void STH(u32 rs, u32 ra, s32 d) = 0;
|
||||
virtual void STHU(u32 rs, u32 ra, s32 d) = 0;
|
||||
virtual void LMW(u32 rd, u32 ra, s32 d) = 0;
|
||||
@ -771,6 +788,7 @@ public:
|
||||
virtual void STFDU(u32 frs, u32 ra, s32 d) = 0;
|
||||
virtual void LD(u32 rd, u32 ra, s32 ds) = 0;
|
||||
virtual void LDU(u32 rd, u32 ra, s32 ds) = 0;
|
||||
virtual void LWA(u32 rd, u32 ra, s32 ds) = 0;
|
||||
virtual void FDIVS(u32 frd, u32 fra, u32 frb, bool rc) = 0;
|
||||
virtual void FSUBS(u32 frd, u32 fra, u32 frb, bool rc) = 0;
|
||||
virtual void FADDS(u32 frd, u32 fra, u32 frb, bool rc) = 0;
|
||||
|
@ -8,74 +8,74 @@ Module cellAudio(0x0011, cellAudio_init);
|
||||
enum
|
||||
{
|
||||
//libaudio Error Codes
|
||||
CELL_AUDIO_ERROR_ALREADY_INIT = 0x80310701,
|
||||
CELL_AUDIO_ERROR_AUDIOSYSTEM = 0x80310702,
|
||||
CELL_AUDIO_ERROR_NOT_INIT = 0x80310703,
|
||||
CELL_AUDIO_ERROR_PARAM = 0x80310704,
|
||||
CELL_AUDIO_ERROR_PORT_FULL = 0x80310705,
|
||||
CELL_AUDIO_ERROR_PORT_ALREADY_RUN = 0x80310706,
|
||||
CELL_AUDIO_ERROR_PORT_NOT_OPEN = 0x80310707,
|
||||
CELL_AUDIO_ERROR_PORT_NOT_RUN = 0x80310708,
|
||||
CELL_AUDIO_ERROR_TRANS_EVENT = 0x80310709,
|
||||
CELL_AUDIO_ERROR_PORT_OPEN = 0x8031070a,
|
||||
CELL_AUDIO_ERROR_SHAREDMEMORY = 0x8031070b,
|
||||
CELL_AUDIO_ERROR_MUTEX = 0x8031070c,
|
||||
CELL_AUDIO_ERROR_EVENT_QUEUE = 0x8031070d,
|
||||
CELL_AUDIO_ERROR_AUDIOSYSTEM_NOT_FOUND = 0x8031070e,
|
||||
CELL_AUDIO_ERROR_ALREADY_INIT = 0x80310701,
|
||||
CELL_AUDIO_ERROR_AUDIOSYSTEM = 0x80310702,
|
||||
CELL_AUDIO_ERROR_NOT_INIT = 0x80310703,
|
||||
CELL_AUDIO_ERROR_PARAM = 0x80310704,
|
||||
CELL_AUDIO_ERROR_PORT_FULL = 0x80310705,
|
||||
CELL_AUDIO_ERROR_PORT_ALREADY_RUN = 0x80310706,
|
||||
CELL_AUDIO_ERROR_PORT_NOT_OPEN = 0x80310707,
|
||||
CELL_AUDIO_ERROR_PORT_NOT_RUN = 0x80310708,
|
||||
CELL_AUDIO_ERROR_TRANS_EVENT = 0x80310709,
|
||||
CELL_AUDIO_ERROR_PORT_OPEN = 0x8031070a,
|
||||
CELL_AUDIO_ERROR_SHAREDMEMORY = 0x8031070b,
|
||||
CELL_AUDIO_ERROR_MUTEX = 0x8031070c,
|
||||
CELL_AUDIO_ERROR_EVENT_QUEUE = 0x8031070d,
|
||||
CELL_AUDIO_ERROR_AUDIOSYSTEM_NOT_FOUND = 0x8031070e,
|
||||
CELL_AUDIO_ERROR_TAG_NOT_FOUND = 0x8031070f,
|
||||
|
||||
//libmixer Error Codes
|
||||
CELL_LIBMIXER_ERROR_NOT_INITIALIZED = 0x80310002,
|
||||
CELL_LIBMIXER_ERROR_INVALID_PARAMATER = 0x80310003,
|
||||
CELL_LIBMIXER_ERROR_NOT_INITIALIZED = 0x80310002,
|
||||
CELL_LIBMIXER_ERROR_INVALID_PARAMATER = 0x80310003,
|
||||
CELL_LIBMIXER_ERROR_NO_MEMORY = 0x80310005,
|
||||
CELL_LIBMIXER_ERROR_ALREADY_EXIST = 0x80310006,
|
||||
CELL_LIBMIXER_ERROR_ALREADY_EXIST = 0x80310006,
|
||||
CELL_LIBMIXER_ERROR_FULL = 0x80310007,
|
||||
CELL_LIBMIXER_ERROR_NOT_EXIST = 0x80310008,
|
||||
CELL_LIBMIXER_ERROR_TYPE_MISMATCH = 0x80310009,
|
||||
CELL_LIBMIXER_ERROR_NOT_FOUND = 0x8031000a,
|
||||
CELL_LIBMIXER_ERROR_NOT_EXIST = 0x80310008,
|
||||
CELL_LIBMIXER_ERROR_TYPE_MISMATCH = 0x80310009,
|
||||
CELL_LIBMIXER_ERROR_NOT_FOUND = 0x8031000a,
|
||||
|
||||
//libsnd3 Error Codes
|
||||
CELL_SND3_ERROR_PARAM = 0x80310301,
|
||||
CELL_SND3_ERROR_CREATE_MUTEX = 0x80310302,
|
||||
CELL_SND3_ERROR_SYNTH = 0x80310303,
|
||||
CELL_SND3_ERROR_ALREADY = 0x80310304,
|
||||
CELL_SND3_ERROR_PARAM = 0x80310301,
|
||||
CELL_SND3_ERROR_CREATE_MUTEX = 0x80310302,
|
||||
CELL_SND3_ERROR_SYNTH = 0x80310303,
|
||||
CELL_SND3_ERROR_ALREADY = 0x80310304,
|
||||
CELL_SND3_ERROR_NOTINIT = 0x80310305,
|
||||
CELL_SND3_ERROR_SMFFULL = 0x80310306,
|
||||
CELL_SND3_ERROR_HD3ID = 0x80310307,
|
||||
CELL_SND3_ERROR_SMF = 0x80310308,
|
||||
CELL_SND3_ERROR_SMFCTX = 0x80310309,
|
||||
CELL_SND3_ERROR_FORMAT = 0x8031030a,
|
||||
CELL_SND3_ERROR_SMFID = 0x8031030b,
|
||||
CELL_SND3_ERROR_SMFFULL = 0x80310306,
|
||||
CELL_SND3_ERROR_HD3ID = 0x80310307,
|
||||
CELL_SND3_ERROR_SMF = 0x80310308,
|
||||
CELL_SND3_ERROR_SMFCTX = 0x80310309,
|
||||
CELL_SND3_ERROR_FORMAT = 0x8031030a,
|
||||
CELL_SND3_ERROR_SMFID = 0x8031030b,
|
||||
CELL_SND3_ERROR_SOUNDDATAFULL = 0x8031030c,
|
||||
CELL_SND3_ERROR_VOICENUM = 0x8031030d,
|
||||
CELL_SND3_ERROR_RESERVEDVOICE = 0x8031030e,
|
||||
CELL_SND3_ERROR_REQUESTQUEFULL = 0x8031030f,
|
||||
CELL_SND3_ERROR_OUTPUTMODE = 0x80310310,
|
||||
CELL_SND3_ERROR_VOICENUM = 0x8031030d,
|
||||
CELL_SND3_ERROR_RESERVEDVOICE = 0x8031030e,
|
||||
CELL_SND3_ERROR_REQUESTQUEFULL = 0x8031030f,
|
||||
CELL_SND3_ERROR_OUTPUTMODE = 0x80310310,
|
||||
|
||||
//libsynt2 Error Codes
|
||||
CELL_SOUND_SYNTH2_ERROR_FATAL = 0x80310201,
|
||||
CELL_SOUND_SYNTH2_ERROR_INVALID_PARAMETER = 0x80310202,
|
||||
CELL_SOUND_SYNTH2_ERROR_ALREADY_INITIALIZED = 0x80310203,
|
||||
CELL_SOUND_SYNTH2_ERROR_FATAL = 0x80310201,
|
||||
CELL_SOUND_SYNTH2_ERROR_INVALID_PARAMETER = 0x80310202,
|
||||
CELL_SOUND_SYNTH2_ERROR_ALREADY_INITIALIZED = 0x80310203,
|
||||
};
|
||||
|
||||
|
||||
//libaudio datatypes
|
||||
struct CellAudioPortParam
|
||||
{
|
||||
u64 nChannel;
|
||||
u64 nBlock;
|
||||
u64 attr;
|
||||
float level;
|
||||
be_t<u64> nChannel;
|
||||
be_t<u64> nBlock;
|
||||
be_t<u64> attr;
|
||||
be_t<float> level;
|
||||
};
|
||||
|
||||
struct CellAudioPortConfig
|
||||
{
|
||||
u32 readIndexAddr;
|
||||
u32 status;
|
||||
u64 nChannel;
|
||||
u64 nBlock;
|
||||
u32 portSize;
|
||||
u32 portAddr;
|
||||
be_t<u32> readIndexAddr;
|
||||
be_t<u32> status;
|
||||
be_t<u64> nChannel;
|
||||
be_t<u64> nBlock;
|
||||
be_t<u32> portSize;
|
||||
be_t<u32> portAddr;
|
||||
};
|
||||
|
||||
CellAudioPortParam current_AudioPortParam;
|
||||
@ -84,57 +84,57 @@ CellAudioPortConfig current_AudioPortConfig;
|
||||
//libmixer datatypes
|
||||
typedef void * CellAANHandle;
|
||||
|
||||
struct CellSSPlayerConfig
|
||||
struct CellSSPlayerConfig
|
||||
{
|
||||
u32 channels;
|
||||
u32 outputMode;
|
||||
u32 channels;
|
||||
u32 outputMode;
|
||||
};
|
||||
|
||||
struct CellSSPlayerWaveParam
|
||||
{
|
||||
void *addr;
|
||||
int format;
|
||||
u32 samples;
|
||||
u32 loopStartOffset;
|
||||
u32 startOffset;
|
||||
int format;
|
||||
u32 samples;
|
||||
u32 loopStartOffset;
|
||||
u32 startOffset;
|
||||
};
|
||||
|
||||
struct CellSSPlayerCommonParam
|
||||
{
|
||||
u32 loopMode;
|
||||
u32 attackMode;
|
||||
u32 loopMode;
|
||||
u32 attackMode;
|
||||
};
|
||||
|
||||
struct CellSurMixerPosition
|
||||
{
|
||||
float x;
|
||||
float y;
|
||||
float x;
|
||||
float y;
|
||||
float z;
|
||||
};
|
||||
|
||||
struct CellSSPlayerRuntimeInfo
|
||||
{
|
||||
float level;
|
||||
float speed;
|
||||
float level;
|
||||
float speed;
|
||||
CellSurMixerPosition position;
|
||||
};
|
||||
|
||||
struct CellSurMixerConfig
|
||||
{
|
||||
s32 priority;
|
||||
u32 chStrips1;
|
||||
u32 chStrips2;
|
||||
u32 chStrips6;
|
||||
u32 chStrips8;
|
||||
s32 priority;
|
||||
u32 chStrips1;
|
||||
u32 chStrips2;
|
||||
u32 chStrips6;
|
||||
u32 chStrips8;
|
||||
};
|
||||
|
||||
struct CellSurMixerChStripParam
|
||||
{
|
||||
u32 param;
|
||||
void *attribute;
|
||||
int dBSwitch;
|
||||
float floatVal;
|
||||
int intVal;
|
||||
u32 param;
|
||||
void *attribute;
|
||||
int dBSwitch;
|
||||
float floatVal;
|
||||
int intVal;
|
||||
};
|
||||
|
||||
CellSSPlayerWaveParam current_SSPlayerWaveParam;
|
||||
@ -152,10 +152,10 @@ struct CellSnd3SmfCtx
|
||||
|
||||
struct CellSnd3KeyOnParam
|
||||
{
|
||||
u8 vel;
|
||||
u8 pan;
|
||||
u8 panEx;
|
||||
s32 addPitch;
|
||||
u8 vel;
|
||||
u8 pan;
|
||||
u8 panEx;
|
||||
s32 addPitch;
|
||||
};
|
||||
|
||||
struct CellSnd3VoiceBitCtx
|
||||
@ -165,21 +165,21 @@ struct CellSnd3VoiceBitCtx
|
||||
|
||||
struct CellSnd3RequestQueueCtx
|
||||
{
|
||||
void *frontQueue;
|
||||
u32 frontQueueSize;
|
||||
void *rearQueue;
|
||||
u32 rearQueueSize;
|
||||
void *frontQueue;
|
||||
u32 frontQueueSize;
|
||||
void *rearQueue;
|
||||
u32 rearQueueSize;
|
||||
};
|
||||
|
||||
//libsynt2 datatypes
|
||||
struct CellSoundSynth2EffectAttr
|
||||
struct CellSoundSynth2EffectAttr
|
||||
{
|
||||
u16 core;
|
||||
u16 mode;
|
||||
s16 depth_L;
|
||||
s16 depth_R;
|
||||
u16 delay;
|
||||
u16 feedback;
|
||||
u16 core;
|
||||
u16 mode;
|
||||
s16 depth_L;
|
||||
s16 depth_R;
|
||||
u16 delay;
|
||||
u16 feedback;
|
||||
};
|
||||
|
||||
// libaudio Functions
|
||||
@ -205,7 +205,7 @@ int cellAudioQuit()
|
||||
bool g_is_audio_port_open = false;
|
||||
bool g_is_audio_port_start = false;
|
||||
|
||||
int cellAudioPortOpen() //CellAudioPortParam *audioParam, u32 *portNum
|
||||
int cellAudioPortOpen(mem_ptr_t<CellAudioPortParam> audioParam, mem32_t portNum)
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellAudio);
|
||||
if(g_is_audio_port_open) return CELL_AUDIO_ERROR_PORT_OPEN;
|
||||
@ -243,9 +243,18 @@ int cellAudioGetPortTimestamp() //u32 portNum, u64 tag, u64 *stamp
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int cellAudioGetPortConfig() //u32 portNum, CellAudioPortConfig *portConfig
|
||||
int cellAudioGetPortConfig(mem32_t portNum, mem_ptr_t<CellAudioPortConfig> portConfig)
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellAudio);
|
||||
//TODO
|
||||
portConfig->nBlock = 8;
|
||||
portConfig->nChannel = 2;
|
||||
portConfig->portSize = 256 * portConfig->nBlock * portConfig->nChannel;
|
||||
portConfig->portAddr = Memory.Alloc(portConfig->portSize, 4); //WARNING: Memory leak.
|
||||
portConfig->readIndexAddr = Memory.Alloc(8, 4); //WARNING: Memory leak.
|
||||
portConfig->status = 2;
|
||||
Memory.Write64(portConfig->readIndexAddr, 1);
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
|
@ -125,6 +125,8 @@ int cellPngDecDestroy(u32 mainHandle)
|
||||
|
||||
int cellPngDecOpen(u32 mainHandle, mem32_t subHandle, u32 src_addr, u32 openInfo)
|
||||
{
|
||||
cellPngDec.Warning("cellPngDecOpen(mainHandle=0x%x,subHandle=0x%x,src_addr=0x%x,openInfo=0x%x)", mainHandle, subHandle.GetAddr(), src_addr, openInfo);
|
||||
|
||||
CellPngDecSrc* src;
|
||||
|
||||
src = (CellPngDecSrc*)Memory.GetMemFromAddr(src_addr);
|
||||
@ -134,12 +136,13 @@ int cellPngDecOpen(u32 mainHandle, mem32_t subHandle, u32 src_addr, u32 openInfo
|
||||
current_subHandle->fd = NULL;
|
||||
current_subHandle->src = *src;
|
||||
|
||||
switch(src->srcSelect.ToLE())
|
||||
switch(src->srcSelect.ToBE())
|
||||
{
|
||||
case CELL_PNGDEC_BUFFER:
|
||||
case const_se_t<u32, CELL_PNGDEC_BUFFER>::value:
|
||||
current_subHandle->fileSize = src->streamSize.ToLE();
|
||||
break;
|
||||
case CELL_PNGDEC_FILE:
|
||||
|
||||
case const_se_t<u32, CELL_PNGDEC_FILE>::value:
|
||||
// Get file descriptor
|
||||
MemoryAllocator<be_t<u32>> fd;
|
||||
int ret = cellFsOpen(src->fileName, 0, fd, NULL, 0);
|
||||
@ -162,6 +165,8 @@ int cellPngDecOpen(u32 mainHandle, mem32_t subHandle, u32 src_addr, u32 openInfo
|
||||
|
||||
int cellPngDecClose(u32 mainHandle, u32 subHandle)
|
||||
{
|
||||
cellPngDec.Warning("cellPngDecClose(mainHandle=0x%x,subHandle=0x%x)", mainHandle, subHandle);
|
||||
|
||||
ID sub_handle_id_data;
|
||||
if(!cellPngDec.CheckId(subHandle, sub_handle_id_data))
|
||||
return CELL_PNGDEC_ERROR_FATAL;
|
||||
@ -176,7 +181,7 @@ int cellPngDecClose(u32 mainHandle, u32 subHandle)
|
||||
|
||||
int cellPngDecReadHeader(u32 mainHandle, u32 subHandle, mem_ptr_t<CellPngDecInfo> info)
|
||||
{
|
||||
cellPngDec.Log("cellPngDecReadHeader(mainHandle=0x%x, subHandle=0x%x, info_addr=0x%llx)", mainHandle, subHandle, info.GetAddr());
|
||||
cellPngDec.Warning("cellPngDecReadHeader(mainHandle=0x%x, subHandle=0x%x, info_addr=0x%llx)", mainHandle, subHandle, info.GetAddr());
|
||||
ID sub_handle_id_data;
|
||||
if(!cellPngDec.CheckId(subHandle, sub_handle_id_data))
|
||||
return CELL_PNGDEC_ERROR_FATAL;
|
||||
|
@ -476,7 +476,7 @@ int cellSysutilUnregisterCallback(int slot)
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int cellMsgDialogOpen2(u32 type, u32 msgString_addr, u32 callback_addr, u32 userData, u32 extParam)
|
||||
int cellMsgDialogOpen2(u32 type, char* msgString, u32 callback_addr, u32 userData, u32 extParam)
|
||||
{
|
||||
long style = 0;
|
||||
|
||||
@ -498,7 +498,7 @@ int cellMsgDialogOpen2(u32 type, u32 msgString_addr, u32 callback_addr, u32 user
|
||||
style |= wxOK;
|
||||
}
|
||||
|
||||
int res = wxMessageBox(Memory.ReadString(msgString_addr), wxGetApp().GetAppName(), style);
|
||||
int res = wxMessageBox(wxString(msgString, wxConvUTF8), wxGetApp().GetAppName(), style);
|
||||
|
||||
u64 status;
|
||||
|
||||
|
@ -6,7 +6,7 @@ extern Module sys_fs;
|
||||
|
||||
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 = wxString(Memory.ReadString(path_addr), wxConvUTF8);
|
||||
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);
|
||||
|
||||
|
@ -171,7 +171,7 @@ int cellPadGetInfo(u32 info_addr)
|
||||
{
|
||||
if(i >= pads.GetCount()) break;
|
||||
|
||||
info.status[i] = re(pads[i].m_port_status);
|
||||
re(info.status[i], pads[i].m_port_status);
|
||||
info.product_id[i] = const_se_t<u16, 0x0268>::value;
|
||||
info.vendor_id[i] = const_se_t<u16, 0x054C>::value;
|
||||
}
|
||||
|
@ -201,7 +201,8 @@ void Emulator::Load()
|
||||
elf_path += "\\" + wxFileName(m_path).GetName() + ".elf";
|
||||
}
|
||||
|
||||
DecryptSelf(elf_path, self_path);
|
||||
if(!DecryptSelf(elf_path, self_path))
|
||||
return;
|
||||
|
||||
m_path = elf_path;
|
||||
}
|
||||
@ -312,7 +313,7 @@ void Emulator::Load()
|
||||
thread.SetEntry(l.GetEntry());
|
||||
Memory.StackMem.Alloc(0x1000);
|
||||
thread.InitStack();
|
||||
thread.AddArgv(m_path);
|
||||
thread.AddArgv(m_elf_path);
|
||||
//thread.AddArgv("-emu");
|
||||
|
||||
m_rsx_callback = Memory.MainMem.Alloc(4 * 4) + 4;
|
||||
|
@ -218,7 +218,6 @@ void MainFrame::BootGame(wxCommandEvent& WXUNUSED(event))
|
||||
|
||||
void MainFrame::InstallPkg(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
//TODO: progress bar
|
||||
bool stopped = false;
|
||||
|
||||
if(Emu.IsRunning())
|
||||
@ -227,7 +226,7 @@ void MainFrame::InstallPkg(wxCommandEvent& WXUNUSED(event))
|
||||
stopped = true;
|
||||
}
|
||||
|
||||
wxFileDialog ctrl (this, L"Select PKG", wxEmptyString, wxEmptyString, "*.pkg",
|
||||
wxFileDialog ctrl (this, L"Select PKG", wxEmptyString, wxEmptyString, "PKG files (*.pkg)|*.pkg|All files (*.*)|*.*",
|
||||
wxFD_OPEN | wxFD_FILE_MUST_EXIST);
|
||||
|
||||
if(ctrl.ShowModal() == wxID_CANCEL)
|
||||
@ -241,7 +240,11 @@ void MainFrame::InstallPkg(wxCommandEvent& WXUNUSED(event))
|
||||
Emu.Stop();
|
||||
|
||||
wxString fileName = ctrl.GetPath();
|
||||
pkg_unpack((const char *)fileName.mb_str());
|
||||
|
||||
{
|
||||
wxProgressDialog pdlg("Please wait", "Installing PKG...", 0, this, wxPD_APP_MODAL);
|
||||
pkg_unpack((const char *)fileName.mb_str());
|
||||
}
|
||||
|
||||
if (!wxRemoveFile(ctrl.GetPath()+".dec"))
|
||||
ConLog.Warning("Could not delete the decoded DEC file");
|
||||
@ -290,7 +293,13 @@ void MainFrame::BootElf(wxCommandEvent& WXUNUSED(event))
|
||||
stopped = true;
|
||||
}
|
||||
|
||||
wxFileDialog ctrl(this, L"Select (S)ELF", wxEmptyString, wxEmptyString, "*.*",
|
||||
wxFileDialog ctrl(this, L"Select (S)ELF", wxEmptyString, wxEmptyString,
|
||||
"(S)ELF files (*BOOT.BIN;*.elf;*.self)|*BOOT.BIN;*.elf;*.self"
|
||||
"|ELF files (BOOT.BIN;*.elf)|BOOT.BIN;*.elf"
|
||||
"|SELF files (EBOOT.BIN;*.self)|EBOOT.BIN;*.self"
|
||||
"|BOOT files (*BOOT.BIN)|*BOOT.BIN"
|
||||
"|BIN files (*.bin)|*.bin"
|
||||
"|All files (*.*)|*.*",
|
||||
wxFD_OPEN | wxFD_FILE_MUST_EXIST);
|
||||
|
||||
if(ctrl.ShowModal() == wxID_CANCEL)
|
||||
|
@ -436,7 +436,7 @@ bool ELF64Loader::LoadShdrData(u64 offset)
|
||||
|
||||
if(size == 0 || !Memory.IsGoodAddr(offset + addr, size)) continue;
|
||||
|
||||
if(shdr.sh_addr < min_addr)
|
||||
if(shdr.sh_addr && shdr.sh_addr < min_addr)
|
||||
{
|
||||
min_addr = shdr.sh_addr;
|
||||
}
|
||||
@ -455,18 +455,13 @@ bool ELF64Loader::LoadShdrData(u64 offset)
|
||||
switch(shdr.sh_type)
|
||||
{
|
||||
case SHT_NOBITS:
|
||||
memset(&Memory[offset + addr], 0, size);
|
||||
//ConLog.Warning("SHT_NOBITS: addr=0x%llx, size=0x%llx", offset + addr, size);
|
||||
//memset(&Memory[offset + addr], 0, size);
|
||||
break;
|
||||
|
||||
case SHT_PROGBITS:
|
||||
/*
|
||||
elf64_f.Seek(shdr.sh_offset);
|
||||
elf64_f.Read(&Memory[addr], shdr.sh_size);
|
||||
*/
|
||||
break;
|
||||
|
||||
case SHT_RELA:
|
||||
ConLog.Warning("ELF64: RELA");
|
||||
//elf64_f.Seek(shdr.sh_offset);
|
||||
//elf64_f.Read(&Memory[offset + addr], shdr.sh_size);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user