mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-02-23 06:40:49 +00:00
sys_libc.cpp with memcpy
This commit is contained in:
parent
88476fe698
commit
ae21783680
@ -667,8 +667,17 @@ namespace PPU_instr
|
||||
static auto BCTRL = std::bind(BCCTR, 0x10 | 0x04, 0, 0, 1);
|
||||
static auto MTCTR = std::bind(MTSPR, (0x1 << 5) | 0x8, std::placeholders::_1);
|
||||
|
||||
static inline u32 BNE(s32 imm) { return BC(4, 30, imm, 0, 0); }
|
||||
static inline u32 BEQ(s32 imm) { return BC(12, 30, imm, 0, 0); }
|
||||
enum
|
||||
{
|
||||
cr0, cr1, cr2, cr3, cr4, cr5, cr6, cr7
|
||||
};
|
||||
|
||||
inline u32 BNE(u32 cr, s32 imm) { return BC(4, 2 | cr << 2, imm, 0, 0); }
|
||||
inline u32 BEQ(u32 cr, s32 imm) { return BC(12, 2 | cr << 2, imm, 0, 0); }
|
||||
|
||||
inline u32 BNE(s32 imm) { return BNE(0, imm); }
|
||||
inline u32 BEQ(s32 imm) { return BEQ(0, imm); }
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -53,6 +53,7 @@ extern Module sys_fs;
|
||||
extern Module sys_io;
|
||||
extern Module sys_net;
|
||||
extern Module sysPrxForUser;
|
||||
extern Module sys_libc;
|
||||
|
||||
struct ModuleInfo
|
||||
{
|
||||
@ -166,6 +167,7 @@ static const g_module_list[] =
|
||||
{ -1, "cellSysmodule", &cellSysmodule },
|
||||
{ -1, "libmixer", &libmixer },
|
||||
{ -1, "sysPrxForUser", &sysPrxForUser },
|
||||
{ -1, "sys_libc", &sys_libc },
|
||||
};
|
||||
|
||||
void ModuleManager::Init()
|
||||
|
@ -159,9 +159,9 @@ void hook_ppu_funcs(vm::ptr<u32> base, u32 size);
|
||||
|
||||
#define REG_UNNAMED(module, nid) add_ppu_func(ModuleFunc(0x##nid, 0, &module, bind_func(_nid_##nid)))
|
||||
|
||||
#define REG_SUB(module, group, name, ...) \
|
||||
#define REG_SUB(module, group, ns, name, ...) \
|
||||
const SearchPatternEntry name##_table[] = {__VA_ARGS__}; \
|
||||
add_ppu_func_sub(group, name##_table, sizeof(name##_table) / sizeof(SearchPatternEntry), #name, &module, bind_func(name))
|
||||
add_ppu_func_sub(group, name##_table, sizeof(name##_table) / sizeof(SearchPatternEntry), #name, &module, bind_func(ns##name))
|
||||
|
||||
#define se_op(op) []() { SearchPatternEntry res = { SPET_MASKED_OPCODE }; s32 XXX = 0; res.data = (op); XXX = -1; res.mask = (op) ^ ~res.data; return res; }()
|
||||
#define se_opt(op) []() { SearchPatternEntry res = { SPET_OPTIONAL_MASKED_OPCODE }; s32 XXX = 0; res.data = (op); XXX = -1; res.mask = (op) ^ ~res.data; return res; }()
|
||||
|
@ -642,7 +642,7 @@ Module libmixer("libmixer", []()
|
||||
|
||||
using namespace PPU_instr;
|
||||
|
||||
REG_SUB(libmixer, "surmxAAN", cellAANAddData,
|
||||
REG_SUB(libmixer, "surmxAAN", ::, cellAANAddData,
|
||||
{ SPET_MASKED_OPCODE, 0x7c691b78, 0xffffffff },
|
||||
{ SPET_MASKED_OPCODE, 0x7c0802a6, 0xffffffff },
|
||||
{ SPET_MASKED_OPCODE, 0xf821ff91, 0xffffffff },
|
||||
@ -668,7 +668,7 @@ Module libmixer("libmixer", []()
|
||||
{ SPET_MASKED_OPCODE, 0x4e800020, 0xffffffff },
|
||||
);
|
||||
|
||||
REG_SUB(libmixer, "surmxAAN", cellAANConnect,
|
||||
REG_SUB(libmixer, "surmxAAN", ::, cellAANConnect,
|
||||
{ SPET_MASKED_OPCODE, 0xf821ff71, 0xffffffff },
|
||||
{ SPET_MASKED_OPCODE, 0x7c0802a6, 0xffffffff },
|
||||
{ SPET_MASKED_OPCODE, 0x2f830000, 0xffffffff },
|
||||
@ -677,7 +677,7 @@ Module libmixer("libmixer", []()
|
||||
{ SPET_MASKED_OPCODE, 0x7c691b78, 0xffffffff },
|
||||
{ SPET_MASKED_OPCODE, 0x7c8a2378, 0xffffffff },
|
||||
{ SPET_MASKED_OPCODE, 0x60000003, 0xffffffff },
|
||||
se_lbr(BNE(XXX), 0x24),
|
||||
se_lbr(BNE(cr7, XXX), 0x24),
|
||||
se_label(0x24),
|
||||
{ SPET_MASKED_OPCODE, 0x7c0307b4, 0xffffffff },
|
||||
{ SPET_MASKED_OPCODE, 0xe80100a0, 0xffffffff },
|
||||
@ -688,7 +688,7 @@ Module libmixer("libmixer", []()
|
||||
{ SPET_MASKED_OPCODE, 0x2f850000, 0xffffffff },
|
||||
{ SPET_MASKED_OPCODE, 0x78630020, 0xffffffff },
|
||||
{ SPET_MASKED_OPCODE, 0x38810070, 0xffffffff },
|
||||
se_lbr(BEQ(XXX), 0x38),
|
||||
se_lbr(BEQ(cr7, XXX), 0x38),
|
||||
{ SPET_MASKED_OPCODE, 0x81690000, 0xffffffff },
|
||||
{ SPET_MASKED_OPCODE, 0x38000001, 0xffffffff },
|
||||
{ SPET_MASKED_OPCODE, 0x91210074, 0xffffffff },
|
||||
@ -711,7 +711,7 @@ Module libmixer("libmixer", []()
|
||||
{ SPET_MASKED_OPCODE, 0x4e800020, 0xffffffff },
|
||||
);
|
||||
|
||||
REG_SUB(libmixer, "surmxAAN", cellAANDisconnect,
|
||||
REG_SUB(libmixer, "surmxAAN", ::, cellAANDisconnect,
|
||||
{ SPET_MASKED_OPCODE, 0xf821ff71, 0xffffffff },
|
||||
{ SPET_MASKED_OPCODE, 0x7c0802a6, 0xffffffff },
|
||||
{ SPET_MASKED_OPCODE, 0x2f830000, 0xffffffff },
|
||||
@ -720,7 +720,7 @@ Module libmixer("libmixer", []()
|
||||
{ SPET_MASKED_OPCODE, 0x7c691b78, 0xffffffff },
|
||||
{ SPET_MASKED_OPCODE, 0x7c8a2378, 0xffffffff },
|
||||
{ SPET_MASKED_OPCODE, 0x60000003, 0xffffffff },
|
||||
se_lbr(BNE(XXX), 0x24),
|
||||
se_lbr(BNE(cr7, XXX), 0x24),
|
||||
se_label(0x24),
|
||||
{ SPET_MASKED_OPCODE, 0x7c0307b4, 0xffffffff },
|
||||
{ SPET_MASKED_OPCODE, 0xe80100a0, 0xffffffff },
|
||||
@ -731,7 +731,7 @@ Module libmixer("libmixer", []()
|
||||
{ SPET_MASKED_OPCODE, 0x2f850000, 0xffffffff },
|
||||
{ SPET_MASKED_OPCODE, 0x78630020, 0xffffffff },
|
||||
{ SPET_MASKED_OPCODE, 0x38810070, 0xffffffff },
|
||||
se_lbr(BEQ(XXX), 0x38),
|
||||
se_lbr(BEQ(cr7, XXX), 0x38),
|
||||
{ SPET_MASKED_OPCODE, 0x81690000, 0xffffffff },
|
||||
{ SPET_MASKED_OPCODE, 0x38000001, 0xffffffff },
|
||||
{ SPET_MASKED_OPCODE, 0x91210074, 0xffffffff },
|
||||
@ -751,10 +751,10 @@ Module libmixer("libmixer", []()
|
||||
{ SPET_MASKED_OPCODE, 0xe80100a0, 0xffffffff },
|
||||
{ SPET_MASKED_OPCODE, 0x38210090, 0xffffffff },
|
||||
{ SPET_MASKED_OPCODE, 0x7c0803a6, 0xffffffff },
|
||||
{ SPET_MASKED_OPCODE, 0x4e800020, 0xffffffff }
|
||||
{ SPET_MASKED_OPCODE, 0x4e800020, 0xffffffff },
|
||||
);
|
||||
|
||||
REG_SUB(libmixer, "surmixer", cellSurMixerCreate,
|
||||
REG_SUB(libmixer, "surmixer", ::, cellSurMixerCreate,
|
||||
{ SPET_MASKED_OPCODE, 0x2f830000, 0xffffffff },
|
||||
{ SPET_MASKED_OPCODE, 0x7c0802a6, 0xffffffff },
|
||||
{ SPET_MASKED_OPCODE, 0xf821ff51, 0xffffffff },
|
||||
@ -767,7 +767,7 @@ Module libmixer("libmixer", []()
|
||||
{ SPET_MASKED_OPCODE, 0xfbe100a8, 0xffffffff },
|
||||
{ SPET_MASKED_OPCODE, 0xf80100c0, 0xffffffff },
|
||||
{ SPET_MASKED_OPCODE, 0x7c7e1b78, 0xffffffff },
|
||||
{ SPET_MASKED_OPCODE, 0x40000000, 0xf0000000 }, // bne
|
||||
se_lbr(BNE(cr7, XXX), 0x6c),
|
||||
{ SPET_MASKED_OPCODE, 0x3fe08031, 0xffffffff },
|
||||
{ SPET_MASKED_OPCODE, 0x63ff0003, 0xffffffff },
|
||||
{ SPET_MASKED_OPCODE, 0xe80100c0, 0xffffffff },
|
||||
@ -780,10 +780,12 @@ Module libmixer("libmixer", []()
|
||||
{ SPET_MASKED_OPCODE, 0xeba10098, 0xffffffff },
|
||||
{ SPET_MASKED_OPCODE, 0xebc100a0, 0xffffffff },
|
||||
{ SPET_MASKED_OPCODE, 0xebe100a8, 0xffffffff },
|
||||
{ SPET_MASKED_OPCODE, 0x382100b0, 0xffffffff }
|
||||
{ SPET_MASKED_OPCODE, 0x382100b0, 0xffffffff },
|
||||
{ SPET_MASKED_OPCODE, 0x4e800020, 0xffffffff },
|
||||
se_label(0x6c),
|
||||
);
|
||||
|
||||
REG_SUB(libmixer, "surmixer", cellSurMixerGetAANHandle,
|
||||
REG_SUB(libmixer, "surmixer", ::, cellSurMixerGetAANHandle,
|
||||
se_op(LWZ(r10, r2, XXX)),
|
||||
{ SPET_MASKED_OPCODE, 0x3d607fce, 0xffffffff },
|
||||
{ SPET_MASKED_OPCODE, 0x616bfffe, 0xffffffff },
|
||||
@ -797,10 +799,10 @@ Module libmixer("libmixer", []()
|
||||
{ SPET_MASKED_OPCODE, 0x3c638031, 0xffffffff },
|
||||
{ SPET_MASKED_OPCODE, 0x38630002, 0xffffffff },
|
||||
{ SPET_MASKED_OPCODE, 0x7c6307b4, 0xffffffff },
|
||||
{ SPET_MASKED_OPCODE, 0x4e800020, 0xffffffff }
|
||||
{ SPET_MASKED_OPCODE, 0x4e800020, 0xffffffff },
|
||||
);
|
||||
|
||||
REG_SUB(libmixer, "surmixer", cellSurMixerChStripGetAANPortNo,
|
||||
REG_SUB(libmixer, "surmixer", ::, cellSurMixerChStripGetAANPortNo,
|
||||
se_op(LWZ(r9, r2, XXX)),
|
||||
{ SPET_MASKED_OPCODE, 0x7c661b78, 0xffffffff },
|
||||
{ SPET_MASKED_OPCODE, 0x3c608031, 0xffffffff },
|
||||
@ -812,10 +814,10 @@ Module libmixer("libmixer", []()
|
||||
{ SPET_MASKED_OPCODE, 0x2f800000, 0xffffffff },
|
||||
{ SPET_MASKED_OPCODE, 0x4d9e0020, 0xffffffff },
|
||||
{ SPET_MASKED_OPCODE, 0x78030020, 0xffffffff },
|
||||
{ SPET_MASKED_OPCODE, 0x40000000, 0xf0000000 } // b
|
||||
se_op(B(XXX, 0, 0)),
|
||||
);
|
||||
|
||||
REG_SUB(libmixer, "surmixer", cellSurMixerSetNotifyCallback,
|
||||
REG_SUB(libmixer, "surmixer", ::, cellSurMixerSetNotifyCallback,
|
||||
se_op(LWZ(r10, r2, XXX)),
|
||||
{ SPET_MASKED_OPCODE, 0x7c0802a6, 0xffffffff },
|
||||
{ SPET_MASKED_OPCODE, 0xf821ff81, 0xffffffff },
|
||||
@ -843,7 +845,7 @@ Module libmixer("libmixer", []()
|
||||
{ SPET_MASKED_OPCODE, 0x7d234b78, 0xffffffff }
|
||||
);
|
||||
|
||||
REG_SUB(libmixer, "surmixer", cellSurMixerRemoveNotifyCallback,
|
||||
REG_SUB(libmixer, "surmixer", ::, cellSurMixerRemoveNotifyCallback,
|
||||
se_op(LWZ(r11, r2, XXX)),
|
||||
{ SPET_MASKED_OPCODE, 0x7c0802a6, 0xffffffff },
|
||||
{ SPET_MASKED_OPCODE, 0xf821ff81, 0xffffffff },
|
||||
@ -861,7 +863,7 @@ Module libmixer("libmixer", []()
|
||||
{ SPET_MASKED_OPCODE, 0x4e800020, 0xffffffff }
|
||||
);
|
||||
|
||||
REG_SUB(libmixer, "surmixer", cellSurMixerStart,
|
||||
REG_SUB(libmixer, "surmixer", ::, cellSurMixerStart,
|
||||
{ SPET_MASKED_OPCODE, 0xf821ff71, 0xffffffff },
|
||||
{ SPET_MASKED_OPCODE, 0x7c0802a6, 0xffffffff },
|
||||
{ SPET_MASKED_OPCODE, 0xfbc10080, 0xffffffff },
|
||||
@ -884,7 +886,7 @@ Module libmixer("libmixer", []()
|
||||
{ SPET_MASKED_OPCODE, 0x4e800020, 0xffffffff }
|
||||
);
|
||||
|
||||
REG_SUB(libmixer, "surmixer", cellSurMixerSetParameter,
|
||||
REG_SUB(libmixer, "surmixer", ::, cellSurMixerSetParameter,
|
||||
{ SPET_MASKED_OPCODE, 0xf821ff81, 0xffffffff },
|
||||
{ SPET_MASKED_OPCODE, 0x7c0802a6, 0xffffffff },
|
||||
{ SPET_MASKED_OPCODE, 0xfbc10070, 0xffffffff },
|
||||
@ -914,7 +916,7 @@ Module libmixer("libmixer", []()
|
||||
{ SPET_MASKED_OPCODE, 0x409d0000, 0xffff0000 }, // ble
|
||||
);
|
||||
|
||||
REG_SUB(libmixer, "surmixer", cellSurMixerFinalize,
|
||||
REG_SUB(libmixer, "surmixer", ::, cellSurMixerFinalize,
|
||||
{ SPET_MASKED_OPCODE, 0xf821ff91, 0xffffffff },
|
||||
{ SPET_MASKED_OPCODE, 0x7c0802a6, 0xffffffff },
|
||||
{ SPET_MASKED_OPCODE, 0xf8010080, 0xffffffff },
|
||||
@ -940,7 +942,7 @@ Module libmixer("libmixer", []()
|
||||
{ SPET_MASKED_OPCODE, 0x4e800421, 0xffffffff }
|
||||
);
|
||||
|
||||
REG_SUB(libmixer, "surmixer", cellSurMixerSurBusAddData,
|
||||
REG_SUB(libmixer, "surmixer", ::, cellSurMixerSurBusAddData,
|
||||
se_op(LWZ(r10, r2, XXX)),
|
||||
{ SPET_MASKED_OPCODE, 0x7c0802a6, 0xffffffff },
|
||||
{ SPET_MASKED_OPCODE, 0xf821ff91, 0xffffffff },
|
||||
@ -969,7 +971,7 @@ Module libmixer("libmixer", []()
|
||||
{ SPET_MASKED_OPCODE, 0x419c0000, 0xffff0000 } // blt
|
||||
);
|
||||
|
||||
REG_SUB(libmixer, "surmixer", cellSurMixerChStripSetParameter,
|
||||
REG_SUB(libmixer, "surmixer", ::, cellSurMixerChStripSetParameter,
|
||||
se_op(LWZ(r8, r2, XXX)),
|
||||
{ SPET_MASKED_OPCODE, 0x7c6b1b78, 0xffffffff },
|
||||
{ SPET_MASKED_OPCODE, 0x3c608031, 0xffffffff },
|
||||
@ -989,7 +991,7 @@ Module libmixer("libmixer", []()
|
||||
{ SPET_MASKED_OPCODE, 0x40000000, 0xf0000000 } // b
|
||||
);
|
||||
|
||||
REG_SUB(libmixer, "surmixer", cellSurMixerPause,
|
||||
REG_SUB(libmixer, "surmixer", ::, cellSurMixerPause,
|
||||
se_op(LWZ(r10, r2, XXX)),
|
||||
{ SPET_MASKED_OPCODE, 0x7c0802a6, 0xffffffff },
|
||||
{ SPET_MASKED_OPCODE, 0xf821ff81, 0xffffffff },
|
||||
@ -1014,7 +1016,7 @@ Module libmixer("libmixer", []()
|
||||
{ SPET_MASKED_OPCODE, 0x2f800000, 0xffffffff }
|
||||
);
|
||||
|
||||
REG_SUB(libmixer, "surmixer", cellSurMixerGetCurrentBlockTag,
|
||||
REG_SUB(libmixer, "surmixer", ::, cellSurMixerGetCurrentBlockTag,
|
||||
se_op(LWZ(r11, r2, XXX)),
|
||||
{ SPET_MASKED_OPCODE, 0x3d208031, 0xffffffff },
|
||||
{ SPET_MASKED_OPCODE, 0x61290002, 0xffffffff },
|
||||
@ -1028,7 +1030,7 @@ Module libmixer("libmixer", []()
|
||||
{ SPET_MASKED_OPCODE, 0x4e800020, 0xffffffff }
|
||||
);
|
||||
|
||||
REG_SUB(libmixer, "surmixer", cellSurMixerGetTimestamp,
|
||||
REG_SUB(libmixer, "surmixer", ::, cellSurMixerGetTimestamp,
|
||||
se_op(LWZ(r11, r2, XXX)),
|
||||
{ SPET_MASKED_OPCODE, 0x7c0802a6, 0xffffffff },
|
||||
{ SPET_MASKED_OPCODE, 0xf821ff91, 0xffffffff },
|
||||
@ -1050,7 +1052,7 @@ Module libmixer("libmixer", []()
|
||||
{ SPET_MASKED_OPCODE, 0x40000000, 0xf0000000 } // bl
|
||||
);
|
||||
|
||||
REG_SUB(libmixer, "surmixer", cellSurMixerBeep,
|
||||
REG_SUB(libmixer, "surmixer", ::, cellSurMixerBeep,
|
||||
se_op(LWZ(r9, r2, XXX)),
|
||||
{ SPET_MASKED_OPCODE, 0x7c641b78, 0xffffffff },
|
||||
{ SPET_MASKED_OPCODE, 0x80690018, 0xffffffff },
|
||||
@ -1064,7 +1066,7 @@ Module libmixer("libmixer", []()
|
||||
{ SPET_MASKED_OPCODE, 0x40000000, 0xf0000000 } // b
|
||||
);
|
||||
|
||||
REG_SUB(libmixer, "surmxSSP", cellSSPlayerCreate,
|
||||
REG_SUB(libmixer, "surmxSSP", ::, cellSSPlayerCreate,
|
||||
{ SPET_MASKED_OPCODE, 0xf821ff51, 0xffffffff },
|
||||
{ SPET_MASKED_OPCODE, 0x7c0802a6, 0xffffffff },
|
||||
{ SPET_MASKED_OPCODE, 0x2f840000, 0xffffffff },
|
||||
@ -1098,7 +1100,7 @@ Module libmixer("libmixer", []()
|
||||
{ SPET_MASKED_OPCODE, 0x40000000, 0xf0000000 } // bl
|
||||
);
|
||||
|
||||
REG_SUB(libmixer, "surmxSSP", cellSSPlayerRemove,
|
||||
REG_SUB(libmixer, "surmxSSP", ::, cellSSPlayerRemove,
|
||||
{ SPET_MASKED_OPCODE, 0x7c641b78, 0xffffffff },
|
||||
{ SPET_MASKED_OPCODE, 0x7c0802a6, 0xffffffff },
|
||||
{ SPET_MASKED_OPCODE, 0x3c608031, 0xffffffff },
|
||||
@ -1128,7 +1130,7 @@ Module libmixer("libmixer", []()
|
||||
{ SPET_MASKED_OPCODE, 0x4e800421, 0xffffffff }
|
||||
);
|
||||
|
||||
REG_SUB(libmixer, "surmxSSP", cellSSPlayerSetWave,
|
||||
REG_SUB(libmixer, "surmxSSP", ::, cellSSPlayerSetWave,
|
||||
{ SPET_MASKED_OPCODE, 0x7c601b78, 0xffffffff },
|
||||
{ SPET_MASKED_OPCODE, 0x78840020, 0xffffffff },
|
||||
{ SPET_MASKED_OPCODE, 0x2f800000, 0xffffffff },
|
||||
@ -1141,7 +1143,7 @@ Module libmixer("libmixer", []()
|
||||
{ SPET_MASKED_OPCODE, 0x4e800020, 0xffffffff }
|
||||
);
|
||||
|
||||
REG_SUB(libmixer, "surmxSSP", cellSSPlayerPlay,
|
||||
REG_SUB(libmixer, "surmxSSP", ::, cellSSPlayerPlay,
|
||||
{ SPET_MASKED_OPCODE, 0x7c601b78, 0xffffffff },
|
||||
{ SPET_MASKED_OPCODE, 0x3c608031, 0xffffffff },
|
||||
{ SPET_MASKED_OPCODE, 0x2f800000, 0xffffffff },
|
||||
@ -1160,7 +1162,7 @@ Module libmixer("libmixer", []()
|
||||
{ SPET_MASKED_OPCODE, 0x38630010, 0xffffffff }
|
||||
);
|
||||
|
||||
REG_SUB(libmixer, "surmxSSP", cellSSPlayerStop,
|
||||
REG_SUB(libmixer, "surmxSSP", ::, cellSSPlayerStop,
|
||||
{ SPET_MASKED_OPCODE, 0xf821ff91, 0xffffffff },
|
||||
{ SPET_MASKED_OPCODE, 0x7c0802a6, 0xffffffff },
|
||||
{ SPET_MASKED_OPCODE, 0x2f830000, 0xffffffff },
|
||||
@ -1179,7 +1181,7 @@ Module libmixer("libmixer", []()
|
||||
{ SPET_MASKED_OPCODE, 0x4e800020, 0xffffffff }
|
||||
);
|
||||
|
||||
REG_SUB(libmixer, "surmxSSP", cellSSPlayerSetParam,
|
||||
REG_SUB(libmixer, "surmxSSP", ::, cellSSPlayerSetParam,
|
||||
{ SPET_MASKED_OPCODE, 0x7c601b78, 0xffffffff },
|
||||
{ SPET_MASKED_OPCODE, 0x3c608031, 0xffffffff },
|
||||
{ SPET_MASKED_OPCODE, 0x2f800000, 0xffffffff },
|
||||
@ -1198,7 +1200,7 @@ Module libmixer("libmixer", []()
|
||||
{ SPET_MASKED_OPCODE, 0x2f800000, 0xffffffff }
|
||||
);
|
||||
|
||||
REG_SUB(libmixer, "surmxSSP", cellSSPlayerGetState,
|
||||
REG_SUB(libmixer, "surmxSSP", ::, cellSSPlayerGetState,
|
||||
{ SPET_MASKED_OPCODE, 0x7c601b78, 0xffffffff },
|
||||
{ SPET_MASKED_OPCODE, 0x3c608031, 0xffffffff },
|
||||
{ SPET_MASKED_OPCODE, 0x2f800000, 0xffffffff },
|
||||
|
57
rpcs3/Emu/SysCalls/Modules/sys_libc.cpp
Normal file
57
rpcs3/Emu/SysCalls/Modules/sys_libc.cpp
Normal file
@ -0,0 +1,57 @@
|
||||
#include "stdafx.h"
|
||||
#include "Emu/Memory/Memory.h"
|
||||
#include "Emu/System.h"
|
||||
#include "Emu/SysCalls/Modules.h"
|
||||
#include "Emu/Cell/PPUInstrTable.h"
|
||||
|
||||
extern Module sys_libc;
|
||||
|
||||
namespace sys_libc_func
|
||||
{
|
||||
void memcpy(vm::ptr<void> dst, vm::ptr<const void> src, u32 size)
|
||||
{
|
||||
sys_libc.Warning("memcpy(dst=0x%x, src=0x%x, size=0x%x)", dst, src, size);
|
||||
|
||||
::memcpy(dst.get_ptr(), src.get_ptr(), size);
|
||||
}
|
||||
}
|
||||
|
||||
Module sys_libc("sys_libc", []()
|
||||
{
|
||||
using namespace PPU_instr;
|
||||
|
||||
REG_SUB(sys_libc, "", sys_libc_func::, memcpy,
|
||||
{ SPET_MASKED_OPCODE, 0x2ba50007, 0xffffffff },
|
||||
{ SPET_MASKED_OPCODE, 0x78630020, 0xffffffff },
|
||||
{ SPET_MASKED_OPCODE, 0x78840020, 0xffffffff },
|
||||
{ SPET_MASKED_OPCODE, 0x7c6b1b78, 0xffffffff },
|
||||
{ SPET_MASKED_OPCODE, 0x419d0070, 0xffffffff },
|
||||
{ SPET_MASKED_OPCODE, 0x2c250000, 0xffffffff },
|
||||
{ SPET_MASKED_OPCODE, 0x4d820020, 0xffffffff },
|
||||
{ SPET_MASKED_OPCODE, 0x28a5000f, 0xffffffff },
|
||||
{ SPET_MASKED_OPCODE, 0x40850024, 0xffffffff },
|
||||
{ SPET_MASKED_OPCODE, 0x78ace8c2, 0xffffffff },
|
||||
{ SPET_MASKED_OPCODE, 0x7d8903a6, 0xffffffff },
|
||||
{ SPET_MASKED_OPCODE, 0xe8e40000, 0xffffffff },
|
||||
{ SPET_MASKED_OPCODE, 0x38a5fff8, 0xffffffff },
|
||||
{ SPET_MASKED_OPCODE, 0x38840008, 0xffffffff },
|
||||
{ SPET_MASKED_OPCODE, 0xf8eb0000, 0xffffffff },
|
||||
{ SPET_MASKED_OPCODE, 0x396b0008, 0xffffffff },
|
||||
{ SPET_MASKED_OPCODE, 0x4200ffec, 0xffffffff },
|
||||
{ SPET_MASKED_OPCODE, 0x2c250000, 0xffffffff },
|
||||
{ SPET_MASKED_OPCODE, 0x4d820020, 0xffffffff },
|
||||
{ SPET_MASKED_OPCODE, 0x7ca903a6, 0xffffffff },
|
||||
{ SPET_MASKED_OPCODE, 0x88040000, 0xffffffff },
|
||||
{ SPET_MASKED_OPCODE, 0x38840001, 0xffffffff },
|
||||
{ SPET_MASKED_OPCODE, 0x980b0000, 0xffffffff },
|
||||
{ SPET_MASKED_OPCODE, 0x396b0001, 0xffffffff },
|
||||
{ SPET_MASKED_OPCODE, 0x4200fff0, 0xffffffff },
|
||||
{ SPET_MASKED_OPCODE, 0x4e800020, 0xffffffff },
|
||||
{ SPET_MASKED_OPCODE, 0x7ce903a6, 0xffffffff },
|
||||
{ SPET_MASKED_OPCODE, 0x8d04ffff, 0xffffffff },
|
||||
{ SPET_MASKED_OPCODE, 0x38a5ffff, 0xffffffff },
|
||||
{ SPET_MASKED_OPCODE, 0x9d0bffff, 0xffffffff },
|
||||
{ SPET_MASKED_OPCODE, 0x4200fff4, 0xffffffff },
|
||||
{ SPET_MASKED_OPCODE, 0x48000034, 0xffffffff },
|
||||
);
|
||||
});
|
@ -278,6 +278,7 @@
|
||||
<ClCompile Include="Emu\SysCalls\Modules\sysPrxForUser.cpp" />
|
||||
<ClCompile Include="Emu\SysCalls\Modules\sys_http.cpp" />
|
||||
<ClCompile Include="Emu\SysCalls\Modules\sys_io.cpp" />
|
||||
<ClCompile Include="Emu\SysCalls\Modules\sys_libc.cpp" />
|
||||
<ClCompile Include="Emu\SysCalls\Modules\sys_net.cpp" />
|
||||
<ClCompile Include="Emu\SysCalls\SyncPrimitivesManager.cpp" />
|
||||
<ClCompile Include="Emu\SysCalls\SysCalls.cpp" />
|
||||
|
@ -857,6 +857,9 @@
|
||||
<ClCompile Include="Emu\RSX\CgBinaryVertexProgram.cpp">
|
||||
<Filter>Emu\GPU\RSX</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Emu\SysCalls\Modules\sys_libc.cpp">
|
||||
<Filter>Emu\SysCalls\Modules</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="Crypto\aes.h">
|
||||
|
Loading…
x
Reference in New Issue
Block a user