diff --git a/Utilities/Thread.cpp b/Utilities/Thread.cpp index 267fadd92e..54f032bdbd 100644 --- a/Utilities/Thread.cpp +++ b/Utilities/Thread.cpp @@ -564,6 +564,7 @@ bool get_x64_reg_value(x64_context* context, x64_reg_t reg, size_t d_size, size_ } else if (reg == X64_IMM8) { + // load the immediate value (assuming it's at the end of the instruction) const s8 imm_value = *(s8*)(RIP(context) + i_size - 1); switch (d_size) @@ -582,7 +583,6 @@ bool get_x64_reg_value(x64_context* context, x64_reg_t reg, size_t d_size, size_ } else if (reg == X64_IMM32) { - // load the immediate value (assuming it's at the end of the instruction) const s32 imm_value = *(s32*)(RIP(context) + i_size - 4); switch (d_size) @@ -591,18 +591,6 @@ bool get_x64_reg_value(x64_context* context, x64_reg_t reg, size_t d_size, size_ case 8: out_value = (u64)imm_value; return true; // sign-extended } } - else if (reg == X64_IMM16) - { - // load the immediate value (assuming it's at the end of the instruction) - out_value = *(s16*)(RIP(context) + i_size - 2); - return true; - } - else if (reg == X64_IMM8) - { - // load the immediate value (assuming it's at the end of the instruction) - out_value = *(s8*)(RIP(context) + i_size - 1); - return true; - } else if (reg == X64R_ECX) { out_value = (u32)RCX(context); diff --git a/rpcs3/Emu/ARMv7/ARMv7Context.h b/rpcs3/Emu/ARMv7/ARMv7Context.h index 9200cd5752..ba97ed2375 100644 --- a/rpcs3/Emu/ARMv7/ARMv7Context.h +++ b/rpcs3/Emu/ARMv7/ARMv7Context.h @@ -174,6 +174,12 @@ struct ARMv7Context return get_stack_arg(g_count++); } } + + template + __noinline void fmt_debug_str(const char* fmt, T... args) + { + debug_str = fmt::format(fmt, args...); + } }; template::value> diff --git a/rpcs3/Emu/ARMv7/ARMv7Interpreter.cpp b/rpcs3/Emu/ARMv7/ARMv7Interpreter.cpp index 452da44c12..c035596347 100644 --- a/rpcs3/Emu/ARMv7/ARMv7Interpreter.cpp +++ b/rpcs3/Emu/ARMv7/ARMv7Interpreter.cpp @@ -294,7 +294,7 @@ namespace ARMv7_instrs context.debug_str.insert(pos, 8 - pos, ' '); } - context.debug_str = fmt::format("0x%08x: %s", context.thread.PC, context.debug_str); + context.fmt_debug_str("0x%08x: %s", context.thread.PC, context.debug_str); LV2_LOCK(0); @@ -530,16 +530,16 @@ void ARMv7_instrs::HACK(ARMv7Context& context, const ARMv7Code code, const ARMv7 { if (func->func) { - context.debug_str = fmt::format("hack%s %s", fmt_cond(cond), func->name); + context.fmt_debug_str("hack%s %s", fmt_cond(cond), func->name); } else { - context.debug_str = fmt::format("hack%s UNIMPLEMENTED:0x%08X (%s)", fmt_cond(cond), func->nid, func->name); + context.fmt_debug_str("hack%s UNIMPLEMENTED:0x%08X (%s)", fmt_cond(cond), func->nid, func->name); } } else { - context.debug_str = fmt::format("hack%s %d", fmt_cond(cond), index); + context.fmt_debug_str("hack%s %d", fmt_cond(cond), index); } } if (process_debug(context)) return; @@ -575,9 +575,14 @@ void ARMv7_instrs::MRC_(ARMv7Context& context, const ARMv7Code code, const ARMv7 default: throw __FUNCTION__; } + auto disasm = [&]() + { + context.fmt_debug_str("mrc%s p%d,%d,r%d,c%d,c%d,%d", fmt_cond(cond), cp, opc1, t, cn, cm, opc2); + }; + if (context.debug) { - if (context.debug & DF_DISASM) context.debug_str = fmt::format("mrc%s p%d,%d,r%d,c%d,c%d,%d", fmt_cond(cond), cp, opc1, t, cn, cm, opc2); + if (context.debug & DF_DISASM) disasm(); if (process_debug(context)) return; } @@ -598,7 +603,7 @@ void ARMv7_instrs::MRC_(ARMv7Context& context, const ARMv7Code code, const ARMv7 return; } - throw fmt::format("Bad instruction: mrc%s p%d,%d,r%d,c%d,c%d,%d", fmt_cond(cond), cp, opc1, t, cn, cm, opc2); + Error(__FUNCTION__, code, type, (disasm(), context.debug_str.c_str()), "Bad instruction"); } } @@ -626,7 +631,7 @@ void ARMv7_instrs::ADC_IMM(ARMv7Context& context, const ARMv7Code code, const AR if (context.debug) { - if (context.debug & DF_DISASM) context.debug_str = fmt::format("adc%s%s %s,%s,#0x%X", set_flags ? "s" : "", fmt_cond(cond), fmt_reg(d), fmt_reg(n), imm32); + if (context.debug & DF_DISASM) context.fmt_debug_str("adc%s%s %s,%s,#0x%X", set_flags ? "s" : "", fmt_cond(cond), fmt_reg(d), fmt_reg(n), imm32); if (process_debug(context)) return; } @@ -680,7 +685,7 @@ void ARMv7_instrs::ADC_REG(ARMv7Context& context, const ARMv7Code code, const AR if (context.debug) { - if (context.debug & DF_DISASM) context.debug_str = fmt::format("adc%s%s %s,%s,%s%s", set_flags ? "s" : "", fmt_cond(cond), fmt_reg(d), fmt_reg(n), fmt_reg(m), fmt_shift(shift_t, shift_n)); + if (context.debug & DF_DISASM) context.fmt_debug_str("adc%s%s %s,%s,%s%s", set_flags ? "s" : "", fmt_cond(cond), fmt_reg(d), fmt_reg(n), fmt_reg(m), fmt_shift(shift_t, shift_n)); if (process_debug(context)) return; } @@ -765,7 +770,7 @@ void ARMv7_instrs::ADD_IMM(ARMv7Context& context, const ARMv7Code code, const AR if (context.debug) { - if (context.debug & DF_DISASM) context.debug_str = fmt::format("add%s%s %s,%s,#0x%X", set_flags ? "s" : "", fmt_cond(cond), fmt_reg(d), fmt_reg(n), imm32); + if (context.debug & DF_DISASM) context.fmt_debug_str("add%s%s %s,%s,#0x%X", set_flags ? "s" : "", fmt_cond(cond), fmt_reg(d), fmt_reg(n), imm32); if (process_debug(context)) return; } @@ -836,7 +841,7 @@ void ARMv7_instrs::ADD_REG(ARMv7Context& context, const ARMv7Code code, const AR if (context.debug) { - if (context.debug & DF_DISASM) context.debug_str = fmt::format("add%s%s %s,%s,%s%s", set_flags ? "s" : "", fmt_cond(cond), fmt_reg(d), fmt_reg(n), fmt_reg(m), fmt_shift(shift_t, shift_n)); + if (context.debug & DF_DISASM) context.fmt_debug_str("add%s%s %s,%s,%s%s", set_flags ? "s" : "", fmt_cond(cond), fmt_reg(d), fmt_reg(n), fmt_reg(m), fmt_shift(shift_t, shift_n)); if (process_debug(context)) return; } @@ -916,7 +921,7 @@ void ARMv7_instrs::ADD_SPI(ARMv7Context& context, const ARMv7Code code, const AR if (context.debug) { - if (context.debug & DF_DISASM) context.debug_str = fmt::format("add%s%s %s,sp,#0x%X", set_flags ? "s" : "", fmt_cond(cond), fmt_reg(d), imm32); + if (context.debug & DF_DISASM) context.fmt_debug_str("add%s%s %s,sp,#0x%X", set_flags ? "s" : "", fmt_cond(cond), fmt_reg(d), imm32); if (process_debug(context)) return; } @@ -982,7 +987,7 @@ void ARMv7_instrs::ADD_SPR(ARMv7Context& context, const ARMv7Code code, const AR if (context.debug) { - if (context.debug & DF_DISASM) context.debug_str = fmt::format("add%s%s %s,sp,%s%s", set_flags ? "s" : "", fmt_cond(cond), fmt_reg(d), fmt_reg(m), fmt_shift(shift_t, shift_n)); + if (context.debug & DF_DISASM) context.fmt_debug_str("add%s%s %s,sp,%s%s", set_flags ? "s" : "", fmt_cond(cond), fmt_reg(d), fmt_reg(m), fmt_shift(shift_t, shift_n)); if (process_debug(context)) return; } @@ -1048,7 +1053,7 @@ void ARMv7_instrs::ADR(ARMv7Context& context, const ARMv7Code code, const ARMv7_ if (context.debug) { - if (context.debug & DF_DISASM) context.debug_str = fmt::format("adr%s r%d, 0x%08X", fmt_cond(cond), d, result); + if (context.debug & DF_DISASM) context.fmt_debug_str("adr%s r%d, 0x%08X", fmt_cond(cond), d, result); if (process_debug(context)) return; } @@ -1084,7 +1089,7 @@ void ARMv7_instrs::AND_IMM(ARMv7Context& context, const ARMv7Code code, const AR if (context.debug) { - if (context.debug & DF_DISASM) context.debug_str = fmt::format("and%s%s %s,%s,#0x%X", set_flags ? "s" : "", fmt_cond(cond), fmt_reg(d), fmt_reg(n), imm32); + if (context.debug & DF_DISASM) context.fmt_debug_str("and%s%s %s,%s,#0x%X", set_flags ? "s" : "", fmt_cond(cond), fmt_reg(d), fmt_reg(n), imm32); if (process_debug(context)) return; } @@ -1137,7 +1142,7 @@ void ARMv7_instrs::AND_REG(ARMv7Context& context, const ARMv7Code code, const AR if (context.debug) { - if (context.debug & DF_DISASM) context.debug_str = fmt::format("and%s%s %s,%s,%s%s", set_flags ? "s" : "", fmt_cond(cond), fmt_reg(d), fmt_reg(n), fmt_reg(m), fmt_shift(shift_t, shift_n)); + if (context.debug & DF_DISASM) context.fmt_debug_str("and%s%s %s,%s,%s%s", set_flags ? "s" : "", fmt_cond(cond), fmt_reg(d), fmt_reg(n), fmt_reg(m), fmt_shift(shift_t, shift_n)); if (process_debug(context)) return; } @@ -1248,7 +1253,7 @@ void ARMv7_instrs::B(ARMv7Context& context, const ARMv7Code code, const ARMv7_en if (context.debug) { - if (context.debug & DF_DISASM) context.debug_str = fmt::format("b%s 0x%08X", fmt_cond(cond), context.read_pc() + imm32); + if (context.debug & DF_DISASM) context.fmt_debug_str("b%s 0x%08X", fmt_cond(cond), context.read_pc() + imm32); if (process_debug(context)) return; } @@ -1302,7 +1307,7 @@ void ARMv7_instrs::BIC_IMM(ARMv7Context& context, const ARMv7Code code, const AR if (context.debug) { - if (context.debug & DF_DISASM) context.debug_str = fmt::format("bic%s%s %s,%s,#0x%X", set_flags ? "s" : "", fmt_cond(cond), fmt_reg(d), fmt_reg(n), imm32); + if (context.debug & DF_DISASM) context.fmt_debug_str("bic%s%s %s,%s,#0x%X", set_flags ? "s" : "", fmt_cond(cond), fmt_reg(d), fmt_reg(n), imm32); if (process_debug(context)) return; } @@ -1354,7 +1359,7 @@ void ARMv7_instrs::BIC_REG(ARMv7Context& context, const ARMv7Code code, const AR if (context.debug) { - if (context.debug & DF_DISASM) context.debug_str = fmt::format("bic%s%s %s,%s,%s%s", set_flags ? "s" : "", fmt_cond(cond), fmt_reg(d), fmt_reg(n), fmt_reg(m), fmt_shift(shift_t, shift_n)); + if (context.debug & DF_DISASM) context.fmt_debug_str("bic%s%s %s,%s,%s%s", set_flags ? "s" : "", fmt_cond(cond), fmt_reg(d), fmt_reg(n), fmt_reg(m), fmt_shift(shift_t, shift_n)); if (process_debug(context)) return; } @@ -1427,7 +1432,7 @@ void ARMv7_instrs::BL(ARMv7Context& context, const ARMv7Code code, const ARMv7_e if (context.debug) { - if (context.debug & DF_DISASM) context.debug_str = fmt::format("bl%s 0x%08X", fmt_cond(cond), pc); + if (context.debug & DF_DISASM) context.fmt_debug_str("bl%s 0x%08X", fmt_cond(cond), pc); if (process_debug(context)) return; } @@ -1492,13 +1497,12 @@ void ARMv7_instrs::BLX(ARMv7Context& context, const ARMv7Code code, const ARMv7_ { if (context.debug & DF_DISASM) { - context.debug_str = fmt::format("blx%s ", fmt_cond(cond)); switch (type) { - case T1: context.debug_str += fmt_reg((code.data >> 3) & 0xf); break; - case T2: context.debug_str += fmt::format("0x%08X", target); break; - case A1: context.debug_str += fmt_reg(code.data & 0xf); break; - default: context.debug_str += "???"; + case T1: context.fmt_debug_str("blx%s %s", fmt_cond(cond), fmt_reg((code.data >> 3) & 0xf)); break; + case T2: context.fmt_debug_str("blx%s 0x%08X", fmt_cond(cond), target); break; + case A1: context.fmt_debug_str("blx%s %s", fmt_cond(cond), fmt_reg(code.data & 0xf)); break; + default: context.fmt_debug_str("blx%s ???", fmt_cond(cond)); } } if (process_debug(context)) return; @@ -1536,7 +1540,7 @@ void ARMv7_instrs::BX(ARMv7Context& context, const ARMv7Code code, const ARMv7_e if (context.debug) { - if (context.debug & DF_DISASM) context.debug_str = fmt::format("bx%s %s", fmt_cond(cond), fmt_reg(m)); + if (context.debug & DF_DISASM) context.fmt_debug_str("bx%s %s", fmt_cond(cond), fmt_reg(m)); if (process_debug(context)) return; } @@ -1568,7 +1572,7 @@ void ARMv7_instrs::CB_Z(ARMv7Context& context, const ARMv7Code code, const ARMv7 if (context.debug) { - if (context.debug & DF_DISASM) context.debug_str = fmt::format("cb%sz 0x%08X", nonzero ? "n" : "", context.read_pc() + imm32); + if (context.debug & DF_DISASM) context.fmt_debug_str("cb%sz 0x%08X", nonzero ? "n" : "", context.read_pc() + imm32); if (process_debug(context)) return; } @@ -1601,7 +1605,7 @@ void ARMv7_instrs::CLZ(ARMv7Context& context, const ARMv7Code code, const ARMv7_ if (context.debug) { - if (context.debug & DF_DISASM) context.debug_str = fmt::format("clz%s %s,%s", fmt_cond(cond), fmt_reg(d), fmt_reg(m)); + if (context.debug & DF_DISASM) context.fmt_debug_str("clz%s %s,%s", fmt_cond(cond), fmt_reg(d), fmt_reg(m)); if (process_debug(context)) return; } @@ -1668,7 +1672,7 @@ void ARMv7_instrs::CMP_IMM(ARMv7Context& context, const ARMv7Code code, const AR if (context.debug) { - if (context.debug & DF_DISASM) context.debug_str = fmt::format("cmp%s %s,#0x%X", fmt_cond(cond), fmt_reg(n), imm32); + if (context.debug & DF_DISASM) context.fmt_debug_str("cmp%s %s,#0x%X", fmt_cond(cond), fmt_reg(n), imm32); if (process_debug(context)) return; } @@ -1729,7 +1733,7 @@ void ARMv7_instrs::CMP_REG(ARMv7Context& context, const ARMv7Code code, const AR if (context.debug) { - if (context.debug & DF_DISASM) context.debug_str = fmt::format("cmp%s %s,%s%s", fmt_cond(cond), fmt_reg(n), fmt_reg(m), fmt_shift(shift_t, shift_n)); + if (context.debug & DF_DISASM) context.fmt_debug_str("cmp%s %s,%s%s", fmt_cond(cond), fmt_reg(n), fmt_reg(m), fmt_shift(shift_t, shift_n)); if (process_debug(context)) return; } @@ -1812,7 +1816,7 @@ void ARMv7_instrs::EOR_IMM(ARMv7Context& context, const ARMv7Code code, const AR if (context.debug) { - if (context.debug & DF_DISASM) context.debug_str = fmt::format("eor%s%s %s,%s,#0x%X", set_flags ? "s" : "", fmt_cond(cond), fmt_reg(d), fmt_reg(n), imm32); + if (context.debug & DF_DISASM) context.fmt_debug_str("eor%s%s %s,%s,#0x%X", set_flags ? "s" : "", fmt_cond(cond), fmt_reg(d), fmt_reg(n), imm32); if (process_debug(context)) return; } @@ -1865,7 +1869,7 @@ void ARMv7_instrs::EOR_REG(ARMv7Context& context, const ARMv7Code code, const AR if (context.debug) { - if (context.debug & DF_DISASM) context.debug_str = fmt::format("eor%s%s %s,%s,%s%s", set_flags ? "s" : "", fmt_cond(cond), fmt_reg(d), fmt_reg(n), fmt_reg(m), fmt_shift(shift_t, shift_n)); + if (context.debug & DF_DISASM) context.fmt_debug_str("eor%s%s %s,%s,%s%s", set_flags ? "s" : "", fmt_cond(cond), fmt_reg(d), fmt_reg(n), fmt_reg(m), fmt_shift(shift_t, shift_n)); if (process_debug(context)) return; } @@ -1917,7 +1921,7 @@ void ARMv7_instrs::IT(ARMv7Context& context, const ARMv7Code code, const ARMv7_e if (context.debug) { - if (context.debug & DF_DISASM) context.debug_str = fmt::format("IT%s %s", fmt_it(context.ITSTATE.shift_state), fmt_cond(context.ITSTATE.condition)); + if (context.debug & DF_DISASM) context.fmt_debug_str("IT%s %s", fmt_it(context.ITSTATE.shift_state), fmt_cond(context.ITSTATE.condition)); if (process_debug(context)) return; } } @@ -1959,7 +1963,7 @@ void ARMv7_instrs::LDM(ARMv7Context& context, const ARMv7Code code, const ARMv7_ if (context.debug) { - if (context.debug & DF_DISASM) context.debug_str = fmt::format("ldm%s %s%s,{%s}", fmt_cond(cond), fmt_reg(n), wback ? "!" : "", fmt_reg_list(reg_list)); + if (context.debug & DF_DISASM) context.fmt_debug_str("ldm%s %s%s,{%s}", fmt_cond(cond), fmt_reg(n), wback ? "!" : "", fmt_reg_list(reg_list)); if (process_debug(context)) return; } @@ -2076,7 +2080,7 @@ void ARMv7_instrs::LDR_IMM(ARMv7Context& context, const ARMv7Code code, const AR if (context.debug) { - if (context.debug & DF_DISASM) context.debug_str = fmt::format("ldr%s %s,%s", fmt_cond(cond), fmt_reg(t), fmt_mem_imm(n, imm32, index, add, wback)); + if (context.debug & DF_DISASM) context.fmt_debug_str("ldr%s %s,%s", fmt_cond(cond), fmt_reg(t), fmt_mem_imm(n, imm32, index, add, wback)); if (process_debug(context)) return; } @@ -2127,7 +2131,7 @@ void ARMv7_instrs::LDR_LIT(ARMv7Context& context, const ARMv7Code code, const AR if (context.debug) { - if (context.debug & DF_DISASM) context.debug_str = fmt::format("ldr%s %s,0x%08X", fmt_cond(cond), fmt_reg(t), addr); + if (context.debug & DF_DISASM) context.fmt_debug_str("ldr%s %s,0x%08X", fmt_cond(cond), fmt_reg(t), addr); if (process_debug(context)) return; } @@ -2181,7 +2185,7 @@ void ARMv7_instrs::LDR_REG(ARMv7Context& context, const ARMv7Code code, const AR if (context.debug) { - if (context.debug & DF_DISASM) context.debug_str = fmt::format("ldr%s %s,%s", fmt_cond(cond), fmt_reg(t), fmt_mem_reg(n, m, index, add, wback, shift_t, shift_n)); + if (context.debug & DF_DISASM) context.fmt_debug_str("ldr%s %s,%s", fmt_cond(cond), fmt_reg(t), fmt_mem_reg(n, m, index, add, wback, shift_t, shift_n)); if (process_debug(context)) return; } @@ -2256,7 +2260,7 @@ void ARMv7_instrs::LDRB_IMM(ARMv7Context& context, const ARMv7Code code, const A if (context.debug) { - if (context.debug & DF_DISASM) context.debug_str = fmt::format("ldrb%s %s,%s", fmt_cond(cond), fmt_reg(t), fmt_mem_imm(n, imm32, index, add, wback)); + if (context.debug & DF_DISASM) context.fmt_debug_str("ldrb%s %s,%s", fmt_cond(cond), fmt_reg(t), fmt_mem_imm(n, imm32, index, add, wback)); if (process_debug(context)) return; } @@ -2325,7 +2329,7 @@ void ARMv7_instrs::LDRB_REG(ARMv7Context& context, const ARMv7Code code, const A if (context.debug) { - if (context.debug & DF_DISASM) context.debug_str = fmt::format("ldrb%s %s,%s", fmt_cond(cond), fmt_reg(t), fmt_mem_reg(n, m, index, add, wback, shift_t, shift_n)); + if (context.debug & DF_DISASM) context.fmt_debug_str("ldrb%s %s,%s", fmt_cond(cond), fmt_reg(t), fmt_mem_reg(n, m, index, add, wback, shift_t, shift_n)); if (process_debug(context)) return; } @@ -2374,7 +2378,7 @@ void ARMv7_instrs::LDRD_IMM(ARMv7Context& context, const ARMv7Code code, const A if (context.debug) { - if (context.debug & DF_DISASM) context.debug_str = fmt::format("ldrd%s %s,%s,%s", fmt_cond(cond), fmt_reg(t), fmt_reg(t2), fmt_mem_imm(n, imm32, index, add, wback)); + if (context.debug & DF_DISASM) context.fmt_debug_str("ldrd%s %s,%s,%s", fmt_cond(cond), fmt_reg(t), fmt_reg(t2), fmt_mem_imm(n, imm32, index, add, wback)); if (process_debug(context)) return; } @@ -2421,7 +2425,7 @@ void ARMv7_instrs::LDRD_LIT(ARMv7Context& context, const ARMv7Code code, const A if (context.debug) { - if (context.debug & DF_DISASM) context.debug_str = fmt::format("ldrd%s %s,%s,0x%08X", fmt_cond(cond), fmt_reg(t), fmt_reg(t2), addr); + if (context.debug & DF_DISASM) context.fmt_debug_str("ldrd%s %s,%s,0x%08X", fmt_cond(cond), fmt_reg(t), fmt_reg(t2), addr); if (process_debug(context)) return; } @@ -2499,7 +2503,7 @@ void ARMv7_instrs::LDRH_IMM(ARMv7Context& context, const ARMv7Code code, const A if (context.debug) { - if (context.debug & DF_DISASM) context.debug_str = fmt::format("ldrh%s %s,%s", fmt_cond(cond), fmt_reg(t), fmt_mem_imm(n, imm32, index, add, wback)); + if (context.debug & DF_DISASM) context.fmt_debug_str("ldrh%s %s,%s", fmt_cond(cond), fmt_reg(t), fmt_mem_imm(n, imm32, index, add, wback)); if (process_debug(context)) return; } @@ -2580,7 +2584,7 @@ void ARMv7_instrs::LDRSB_IMM(ARMv7Context& context, const ARMv7Code code, const if (context.debug) { - if (context.debug & DF_DISASM) context.debug_str = fmt::format("ldrsb%s %s,%s", fmt_cond(cond), fmt_reg(t), fmt_mem_imm(n, imm32, index, add, wback)); + if (context.debug & DF_DISASM) context.fmt_debug_str("ldrsb%s %s,%s", fmt_cond(cond), fmt_reg(t), fmt_mem_imm(n, imm32, index, add, wback)); if (process_debug(context)) return; } @@ -2667,7 +2671,7 @@ void ARMv7_instrs::LDREX(ARMv7Context& context, const ARMv7Code code, const ARMv if (context.debug) { - if (context.debug & DF_DISASM) context.debug_str = fmt::format("ldrex%s %s,[%s,#0x%X]", fmt_cond(cond), fmt_reg(t), fmt_reg(n), imm32); + if (context.debug & DF_DISASM) context.fmt_debug_str("ldrex%s %s,[%s,#0x%X]", fmt_cond(cond), fmt_reg(t), fmt_reg(n), imm32); if (process_debug(context)) return; } @@ -2745,7 +2749,7 @@ void ARMv7_instrs::LSL_IMM(ARMv7Context& context, const ARMv7Code code, const AR if (context.debug) { - if (context.debug & DF_DISASM) context.debug_str = fmt::format("lsl%s%s %s,%s,#%d", set_flags ? "s" : "", fmt_cond(cond), fmt_reg(d), fmt_reg(m), shift_n); + if (context.debug & DF_DISASM) context.fmt_debug_str("lsl%s%s %s,%s,#%d", set_flags ? "s" : "", fmt_cond(cond), fmt_reg(d), fmt_reg(m), shift_n); if (process_debug(context)) return; } @@ -2795,7 +2799,7 @@ void ARMv7_instrs::LSL_REG(ARMv7Context& context, const ARMv7Code code, const AR if (context.debug) { - if (context.debug & DF_DISASM) context.debug_str = fmt::format("lsl%s%s %s,%s,%s", set_flags ? "s" : "", fmt_cond(cond), fmt_reg(d), fmt_reg(n), fmt_reg(m)); + if (context.debug & DF_DISASM) context.fmt_debug_str("lsl%s%s %s,%s,%s", set_flags ? "s" : "", fmt_cond(cond), fmt_reg(d), fmt_reg(n), fmt_reg(m)); if (process_debug(context)) return; } @@ -2847,7 +2851,7 @@ void ARMv7_instrs::LSR_IMM(ARMv7Context& context, const ARMv7Code code, const AR if (context.debug) { - if (context.debug & DF_DISASM) context.debug_str = fmt::format("lsr%s%s %s,%s,#%d", set_flags ? "s" : "", fmt_cond(cond), fmt_reg(d), fmt_reg(m), shift_n); + if (context.debug & DF_DISASM) context.fmt_debug_str("lsr%s%s %s,%s,#%d", set_flags ? "s" : "", fmt_cond(cond), fmt_reg(d), fmt_reg(m), shift_n); if (process_debug(context)) return; } @@ -2939,8 +2943,8 @@ void ARMv7_instrs::MOV_IMM(ARMv7Context& context, const ARMv7Code code, const AR { switch (type) { - case T3: case A2: context.debug_str = fmt::format("movw%s%s %s,#0x%04X", set_flags ? "s" : "", fmt_cond(cond), fmt_reg(d), imm32); break; - default: context.debug_str = fmt::format("mov%s%s %s,#0x%X", set_flags ? "s" : "", fmt_cond(cond), fmt_reg(d), imm32); + case T3: case A2: context.fmt_debug_str("movw%s%s %s,#0x%04X", set_flags ? "s" : "", fmt_cond(cond), fmt_reg(d), imm32); break; + default: context.fmt_debug_str("mov%s%s %s,#0x%X", set_flags ? "s" : "", fmt_cond(cond), fmt_reg(d), imm32); } } if (process_debug(context)) return; @@ -3004,7 +3008,7 @@ void ARMv7_instrs::MOV_REG(ARMv7Context& context, const ARMv7Code code, const AR if (context.debug) { - if (context.debug & DF_DISASM) context.debug_str = fmt::format("mov%s%s %s,%s", set_flags ? "s" : "", fmt_cond(cond), fmt_reg(d), fmt_reg(m)); + if (context.debug & DF_DISASM) context.fmt_debug_str("mov%s%s %s,%s", set_flags ? "s" : "", fmt_cond(cond), fmt_reg(d), fmt_reg(m)); if (process_debug(context)) return; } @@ -3043,7 +3047,7 @@ void ARMv7_instrs::MOVT(ARMv7Context& context, const ARMv7Code code, const ARMv7 if (context.debug) { - if (context.debug & DF_DISASM) context.debug_str = fmt::format("movt%s %s,#0x%04X", fmt_cond(cond), fmt_reg(d), imm16); + if (context.debug & DF_DISASM) context.fmt_debug_str("movt%s %s,#0x%04X", fmt_cond(cond), fmt_reg(d), imm16); if (process_debug(context)) return; } @@ -3115,7 +3119,7 @@ void ARMv7_instrs::MUL(ARMv7Context& context, const ARMv7Code code, const ARMv7_ if (context.debug) { - if (context.debug & DF_DISASM) context.debug_str = fmt::format("mul%s%s %s,%s,%s", set_flags ? "s" : "", fmt_cond(cond), fmt_reg(d), fmt_reg(n), fmt_reg(m)); + if (context.debug & DF_DISASM) context.fmt_debug_str("mul%s%s %s,%s,%s", set_flags ? "s" : "", fmt_cond(cond), fmt_reg(d), fmt_reg(n), fmt_reg(m)); if (process_debug(context)) return; } @@ -3158,7 +3162,7 @@ void ARMv7_instrs::MVN_IMM(ARMv7Context& context, const ARMv7Code code, const AR if (context.debug) { - if (context.debug & DF_DISASM) context.debug_str = fmt::format("mvn%s%s %s,#0x%X", set_flags ? "s" : "", fmt_cond(cond), fmt_reg(d), imm32); + if (context.debug & DF_DISASM) context.fmt_debug_str("mvn%s%s %s,#0x%X", set_flags ? "s" : "", fmt_cond(cond), fmt_reg(d), imm32); if (process_debug(context)) return; } @@ -3209,7 +3213,7 @@ void ARMv7_instrs::MVN_REG(ARMv7Context& context, const ARMv7Code code, const AR if (context.debug) { - if (context.debug & DF_DISASM) context.debug_str = fmt::format("mvn%s%s %s,%s%s", set_flags ? "s" : "", fmt_cond(cond), fmt_reg(d), fmt_reg(m), fmt_shift(shift_t, shift_n)); + if (context.debug & DF_DISASM) context.fmt_debug_str("mvn%s%s %s,%s%s", set_flags ? "s" : "", fmt_cond(cond), fmt_reg(d), fmt_reg(m), fmt_shift(shift_t, shift_n)); if (process_debug(context)) return; } @@ -3265,7 +3269,7 @@ void ARMv7_instrs::NOP(ARMv7Context& context, const ARMv7Code code, const ARMv7_ if (context.debug) { - if (context.debug & DF_DISASM) context.debug_str = fmt::format("nop%s", fmt_cond(cond)); + if (context.debug & DF_DISASM) context.fmt_debug_str("nop%s", fmt_cond(cond)); if (process_debug(context)) return; } @@ -3319,7 +3323,7 @@ void ARMv7_instrs::ORR_IMM(ARMv7Context& context, const ARMv7Code code, const AR if (context.debug) { - if (context.debug & DF_DISASM) context.debug_str = fmt::format("orr%s%s %s,%s,#0x%X", set_flags ? "s" : "", fmt_cond(cond), fmt_reg(d), fmt_reg(n), imm32); + if (context.debug & DF_DISASM) context.fmt_debug_str("orr%s%s %s,%s,#0x%X", set_flags ? "s" : "", fmt_cond(cond), fmt_reg(d), fmt_reg(n), imm32); if (process_debug(context)) return; } @@ -3372,7 +3376,7 @@ void ARMv7_instrs::ORR_REG(ARMv7Context& context, const ARMv7Code code, const AR if (context.debug) { - if (context.debug & DF_DISASM) context.debug_str = fmt::format("orr%s%s %s,%s,%s%s", set_flags ? "s" : "", fmt_cond(cond), fmt_reg(d), fmt_reg(n), fmt_reg(m), fmt_shift(shift_t, shift_n)); + if (context.debug & DF_DISASM) context.fmt_debug_str("orr%s%s %s,%s,%s%s", set_flags ? "s" : "", fmt_cond(cond), fmt_reg(d), fmt_reg(n), fmt_reg(m), fmt_shift(shift_t, shift_n)); if (process_debug(context)) return; } @@ -3465,7 +3469,7 @@ void ARMv7_instrs::POP(ARMv7Context& context, const ARMv7Code code, const ARMv7_ if (context.debug) { - if (context.debug & DF_DISASM) context.debug_str = fmt::format("pop%s {%s}", fmt_cond(cond), fmt_reg_list(reg_list)); + if (context.debug & DF_DISASM) context.fmt_debug_str("pop%s {%s}", fmt_cond(cond), fmt_reg_list(reg_list)); if (process_debug(context)) return; } @@ -3536,7 +3540,7 @@ void ARMv7_instrs::PUSH(ARMv7Context& context, const ARMv7Code code, const ARMv7 if (context.debug) { - if (context.debug & DF_DISASM) context.debug_str = fmt::format("push%s {%s}", fmt_cond(cond), fmt_reg_list(reg_list)); + if (context.debug & DF_DISASM) context.fmt_debug_str("push%s {%s}", fmt_cond(cond), fmt_reg_list(reg_list)); if (process_debug(context)) return; } @@ -3686,7 +3690,7 @@ void ARMv7_instrs::REV(ARMv7Context& context, const ARMv7Code code, const ARMv7_ if (context.debug) { - if (context.debug & DF_DISASM) context.debug_str = fmt::format("rev%s %s,%s", fmt_cond(cond), fmt_reg(d), fmt_reg(m)); + if (context.debug & DF_DISASM) context.fmt_debug_str("rev%s %s,%s", fmt_cond(cond), fmt_reg(d), fmt_reg(m)); if (process_debug(context)) return; } @@ -3740,7 +3744,7 @@ void ARMv7_instrs::ROR_IMM(ARMv7Context& context, const ARMv7Code code, const AR if (context.debug) { - if (context.debug & DF_DISASM) context.debug_str = fmt::format("ror%s%s %s,%s,#%d", set_flags ? "s" : "", fmt_cond(cond), fmt_reg(d), fmt_reg(m), shift_n); + if (context.debug & DF_DISASM) context.fmt_debug_str("ror%s%s %s,%s,#%d", set_flags ? "s" : "", fmt_cond(cond), fmt_reg(d), fmt_reg(m), shift_n); if (process_debug(context)) return; } @@ -3790,7 +3794,7 @@ void ARMv7_instrs::ROR_REG(ARMv7Context& context, const ARMv7Code code, const AR if (context.debug) { - if (context.debug & DF_DISASM) context.debug_str = fmt::format("ror%s%s %s,%s,%s", set_flags ? "s" : "", fmt_cond(cond), fmt_reg(d), fmt_reg(n), fmt_reg(m)); + if (context.debug & DF_DISASM) context.fmt_debug_str("ror%s%s %s,%s,%s", set_flags ? "s" : "", fmt_cond(cond), fmt_reg(d), fmt_reg(n), fmt_reg(m)); if (process_debug(context)) return; } @@ -3853,7 +3857,7 @@ void ARMv7_instrs::RSB_IMM(ARMv7Context& context, const ARMv7Code code, const AR if (context.debug) { - if (context.debug & DF_DISASM) context.debug_str = fmt::format("rsb%s%s %s,%s,#0x%X", set_flags ? "s" : "", fmt_cond(cond), fmt_reg(d), fmt_reg(n), imm32); + if (context.debug & DF_DISASM) context.fmt_debug_str("rsb%s%s %s,%s,#0x%X", set_flags ? "s" : "", fmt_cond(cond), fmt_reg(d), fmt_reg(n), imm32); if (process_debug(context)) return; } @@ -4286,7 +4290,7 @@ void ARMv7_instrs::STM(ARMv7Context& context, const ARMv7Code code, const ARMv7_ if (context.debug) { - if (context.debug & DF_DISASM) context.debug_str = fmt::format("stm%s %s%s,{%s}", fmt_cond(cond), fmt_reg(n), wback ? "!" : "", fmt_reg_list(reg_list)); + if (context.debug & DF_DISASM) context.fmt_debug_str("stm%s %s%s,{%s}", fmt_cond(cond), fmt_reg(n), wback ? "!" : "", fmt_reg_list(reg_list)); if (process_debug(context)) return; } @@ -4402,7 +4406,7 @@ void ARMv7_instrs::STR_IMM(ARMv7Context& context, const ARMv7Code code, const AR if (context.debug) { - if (context.debug & DF_DISASM) context.debug_str = fmt::format("str%s %s,%s", fmt_cond(cond), fmt_reg(t), fmt_mem_imm(n, imm32, index, add, wback)); + if (context.debug & DF_DISASM) context.fmt_debug_str("str%s %s,%s", fmt_cond(cond), fmt_reg(t), fmt_mem_imm(n, imm32, index, add, wback)); if (process_debug(context)) return; } @@ -4461,7 +4465,7 @@ void ARMv7_instrs::STR_REG(ARMv7Context& context, const ARMv7Code code, const AR if (context.debug) { - if (context.debug & DF_DISASM) context.debug_str = fmt::format("str%s %s,%s", fmt_cond(cond), fmt_reg(t), fmt_mem_reg(n, m, index, add, wback, shift_t, shift_n)); + if (context.debug & DF_DISASM) context.fmt_debug_str("str%s %s,%s", fmt_cond(cond), fmt_reg(t), fmt_mem_reg(n, m, index, add, wback, shift_t, shift_n)); if (process_debug(context)) return; } @@ -4533,7 +4537,7 @@ void ARMv7_instrs::STRB_IMM(ARMv7Context& context, const ARMv7Code code, const A if (context.debug) { - if (context.debug & DF_DISASM) context.debug_str = fmt::format("strb%s %s,%s", fmt_cond(cond), fmt_reg(t), fmt_mem_imm(n, imm32, index, add, wback)); + if (context.debug & DF_DISASM) context.fmt_debug_str("strb%s %s,%s", fmt_cond(cond), fmt_reg(t), fmt_mem_imm(n, imm32, index, add, wback)); if (process_debug(context)) return; } @@ -4592,7 +4596,7 @@ void ARMv7_instrs::STRB_REG(ARMv7Context& context, const ARMv7Code code, const A if (context.debug) { - if (context.debug & DF_DISASM) context.debug_str = fmt::format("strb%s %s,%s", fmt_cond(cond), fmt_reg(t), fmt_mem_reg(n, m, index, add, wback, shift_t, shift_n)); + if (context.debug & DF_DISASM) context.fmt_debug_str("strb%s %s,%s", fmt_cond(cond), fmt_reg(t), fmt_mem_reg(n, m, index, add, wback, shift_t, shift_n)); if (process_debug(context)) return; } @@ -4640,7 +4644,7 @@ void ARMv7_instrs::STRD_IMM(ARMv7Context& context, const ARMv7Code code, const A if (context.debug) { - if (context.debug & DF_DISASM) context.debug_str = fmt::format("strd%s %s,%s,%s", fmt_cond(cond), fmt_reg(t), fmt_reg(t2), fmt_mem_imm(n, imm32, index, add, wback)); + if (context.debug & DF_DISASM) context.fmt_debug_str("strd%s %s,%s,%s", fmt_cond(cond), fmt_reg(t), fmt_reg(t2), fmt_mem_imm(n, imm32, index, add, wback)); if (process_debug(context)) return; } @@ -4721,7 +4725,7 @@ void ARMv7_instrs::STRH_IMM(ARMv7Context& context, const ARMv7Code code, const A if (context.debug) { - if (context.debug & DF_DISASM) context.debug_str = fmt::format("strh%s %s,%s", fmt_cond(cond), fmt_reg(t), fmt_mem_imm(n, imm32, index, add, wback)); + if (context.debug & DF_DISASM) context.fmt_debug_str("strh%s %s,%s", fmt_cond(cond), fmt_reg(t), fmt_mem_imm(n, imm32, index, add, wback)); if (process_debug(context)) return; } @@ -4780,7 +4784,7 @@ void ARMv7_instrs::STRH_REG(ARMv7Context& context, const ARMv7Code code, const A if (context.debug) { - if (context.debug & DF_DISASM) context.debug_str = fmt::format("strh%s %s,%s", fmt_cond(cond), fmt_reg(t), fmt_mem_reg(n, m, index, add, wback, shift_t, shift_n)); + if (context.debug & DF_DISASM) context.fmt_debug_str("strh%s %s,%s", fmt_cond(cond), fmt_reg(t), fmt_mem_reg(n, m, index, add, wback, shift_t, shift_n)); if (process_debug(context)) return; } @@ -4823,7 +4827,7 @@ void ARMv7_instrs::STREX(ARMv7Context& context, const ARMv7Code code, const ARMv if (context.debug) { - if (context.debug & DF_DISASM) context.debug_str = fmt::format("strex%s %s,%s,[%s,#0x%x]", fmt_cond(cond), fmt_reg(d), fmt_reg(t), fmt_reg(n), imm32); + if (context.debug & DF_DISASM) context.fmt_debug_str("strex%s %s,%s,[%s,#0x%x]", fmt_cond(cond), fmt_reg(d), fmt_reg(t), fmt_reg(n), imm32); if (process_debug(context)) return; } @@ -4917,7 +4921,7 @@ void ARMv7_instrs::SUB_IMM(ARMv7Context& context, const ARMv7Code code, const AR if (context.debug) { - if (context.debug & DF_DISASM) context.debug_str = fmt::format("sub%s%s %s,%s,#0x%X", set_flags ? "s" : "", fmt_cond(cond), fmt_reg(d), fmt_reg(n), imm32); + if (context.debug & DF_DISASM) context.fmt_debug_str("sub%s%s %s,%s,#0x%X", set_flags ? "s" : "", fmt_cond(cond), fmt_reg(d), fmt_reg(n), imm32); if (process_debug(context)) return; } @@ -4974,7 +4978,7 @@ void ARMv7_instrs::SUB_REG(ARMv7Context& context, const ARMv7Code code, const AR if (context.debug) { - if (context.debug & DF_DISASM) context.debug_str = fmt::format("sub%s%s %s,%s,%s%s", set_flags ? "s" : "", fmt_cond(cond), fmt_reg(d), fmt_reg(n), fmt_reg(m), fmt_shift(shift_t, shift_n)); + if (context.debug & DF_DISASM) context.fmt_debug_str("sub%s%s %s,%s,%s%s", set_flags ? "s" : "", fmt_cond(cond), fmt_reg(d), fmt_reg(n), fmt_reg(m), fmt_shift(shift_t, shift_n)); if (process_debug(context)) return; } @@ -5046,7 +5050,7 @@ void ARMv7_instrs::SUB_SPI(ARMv7Context& context, const ARMv7Code code, const AR if (context.debug) { - if (context.debug & DF_DISASM) context.debug_str = fmt::format("sub%s%s %s,sp,#0x%X", set_flags ? "s" : "", fmt_cond(cond), fmt_reg(d), imm32); + if (context.debug & DF_DISASM) context.fmt_debug_str("sub%s%s %s,sp,#0x%X", set_flags ? "s" : "", fmt_cond(cond), fmt_reg(d), imm32); if (process_debug(context)) return; } @@ -5201,7 +5205,7 @@ void ARMv7_instrs::TST_IMM(ARMv7Context& context, const ARMv7Code code, const AR if (context.debug) { - if (context.debug & DF_DISASM) context.debug_str = fmt::format("tst%s %s,#0x%X", fmt_cond(cond), fmt_reg(n), imm32); + if (context.debug & DF_DISASM) context.fmt_debug_str("tst%s %s,#0x%X", fmt_cond(cond), fmt_reg(n), imm32); if (process_debug(context)) return; } @@ -5376,7 +5380,7 @@ void ARMv7_instrs::UMULL(ARMv7Context& context, const ARMv7Code code, const ARMv if (context.debug) { - if (context.debug & DF_DISASM) context.debug_str = fmt::format("umull%s%s %s,%s,%s,%s", set_flags ? "s" : "", fmt_cond(cond), fmt_reg(d0), fmt_reg(d1), fmt_reg(n), fmt_reg(m)); + if (context.debug & DF_DISASM) context.fmt_debug_str("umull%s%s %s,%s,%s,%s", set_flags ? "s" : "", fmt_cond(cond), fmt_reg(d0), fmt_reg(d1), fmt_reg(n), fmt_reg(m)); if (process_debug(context)) return; } @@ -5568,7 +5572,7 @@ void ARMv7_instrs::UXTB(ARMv7Context& context, const ARMv7Code code, const ARMv7 if (context.debug) { - if (context.debug & DF_DISASM) context.debug_str = fmt::format("uxtb%s %s,%s%s", fmt_cond(cond), fmt_reg(d), fmt_reg(m), fmt_shift(SRType_ROR, rot)); + if (context.debug & DF_DISASM) context.fmt_debug_str("uxtb%s %s,%s%s", fmt_cond(cond), fmt_reg(d), fmt_reg(m), fmt_shift(SRType_ROR, rot)); if (process_debug(context)) return; } diff --git a/rpcs3/Emu/ARMv7/Modules/sceAppMgr.cpp b/rpcs3/Emu/ARMv7/Modules/sceAppMgr.cpp index 5b39017a62..de8d2086af 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceAppMgr.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceAppMgr.cpp @@ -32,7 +32,7 @@ s32 sceAppMgrReleaseBgmPort() } -#define REG_FUNC(nid, name) reg_psv_func(nid, &sceAppMgr, #name, name) +#define REG_FUNC(nid, name) reg_psv_func(nid, &sceAppMgr, #name, name) psv_log_base sceAppMgr("SceAppMgr", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceAppUtil.cpp b/rpcs3/Emu/ARMv7/Modules/sceAppUtil.cpp index 815efa0461..596e5b47a3 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceAppUtil.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceAppUtil.cpp @@ -70,7 +70,7 @@ s32 sceAppUtilLoadSafeMemory(vm::psv::ptr buf, u32 bufSize, s64 offset) } -#define REG_FUNC(nid, name) reg_psv_func(nid, &sceAppUtil, #name, name) +#define REG_FUNC(nid, name) reg_psv_func(nid, &sceAppUtil, #name, name) psv_log_base sceAppUtil("SceAppUtil", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceAudio.cpp b/rpcs3/Emu/ARMv7/Modules/sceAudio.cpp index ad0ab8d9af..bb6d981706 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceAudio.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceAudio.cpp @@ -45,7 +45,7 @@ s32 sceAudioOutGetAdopt(s32 portType) } -#define REG_FUNC(nid, name) reg_psv_func(nid, &sceAudio, #name, name) +#define REG_FUNC(nid, name) reg_psv_func(nid, &sceAudio, #name, name) psv_log_base sceAudio("SceAudio", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceAudioIn.cpp b/rpcs3/Emu/ARMv7/Modules/sceAudioIn.cpp index 29c7378b33..0be874d320 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceAudioIn.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceAudioIn.cpp @@ -20,7 +20,7 @@ s32 sceAudioInInput(s32 port, vm::psv::ptr destPtr) } -#define REG_FUNC(nid, name) reg_psv_func(nid, &sceAudioIn, #name, name) +#define REG_FUNC(nid, name) reg_psv_func(nid, &sceAudioIn, #name, name) psv_log_base sceAudioIn("SceAudioIn", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceAudiodec.cpp b/rpcs3/Emu/ARMv7/Modules/sceAudiodec.cpp index bf0d1a6bf9..90e144697e 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceAudiodec.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceAudiodec.cpp @@ -120,7 +120,7 @@ s32 sceAudiodecGetInternalError(vm::psv::ptr pCtrl, vm::psv::pt } -#define REG_FUNC(nid, name) reg_psv_func(nid, &sceAudiodec, #name, name) +#define REG_FUNC(nid, name) reg_psv_func(nid, &sceAudiodec, #name, name) psv_log_base sceAudiodec("SceAudiodec", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceAudioenc.cpp b/rpcs3/Emu/ARMv7/Modules/sceAudioenc.cpp index d507170248..54baccfed0 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceAudioenc.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceAudioenc.cpp @@ -102,7 +102,7 @@ s32 sceAudioencGetInternalError(vm::psv::ptr pCtrl, vm::psv::pt } -#define REG_FUNC(nid, name) reg_psv_func(nid, &sceAudioenc, #name, name) +#define REG_FUNC(nid, name) reg_psv_func(nid, &sceAudioenc, #name, name) psv_log_base sceAudioenc("SceAudioenc", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceCamera.cpp b/rpcs3/Emu/ARMv7/Modules/sceCamera.cpp index e341d6d75f..f48be36603 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceCamera.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceCamera.cpp @@ -247,7 +247,7 @@ void sceCameraUseCacheMemoryForTrial(s32 isCache) } -#define REG_FUNC(nid, name) reg_psv_func(nid, &sceCamera, #name, name) +#define REG_FUNC(nid, name) reg_psv_func(nid, &sceCamera, #name, name) psv_log_base sceCamera("SceCamera", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceCodecEngine.cpp b/rpcs3/Emu/ARMv7/Modules/sceCodecEngine.cpp index cda018a995..0c4fd1c4e4 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceCodecEngine.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceCodecEngine.cpp @@ -31,7 +31,7 @@ s32 sceCodecEnginePmonReset() } -#define REG_FUNC(nid, name) reg_psv_func(nid, &sceCodecEngine, #name, name) +#define REG_FUNC(nid, name) reg_psv_func(nid, &sceCodecEngine, #name, name) psv_log_base sceCodecEngine("SceCodecEngine", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceCommonDialog.cpp b/rpcs3/Emu/ARMv7/Modules/sceCommonDialog.cpp index 3e7b998f63..c7eda0eda3 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceCommonDialog.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceCommonDialog.cpp @@ -505,7 +505,7 @@ s32 scePhotoReviewDialogAbort() } -#define REG_FUNC(nid, name) reg_psv_func(nid, &sceCommonDialog, #name, name) +#define REG_FUNC(nid, name) reg_psv_func(nid, &sceCommonDialog, #name, name) psv_log_base sceCommonDialog("SceCommonDialog", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceCtrl.cpp b/rpcs3/Emu/ARMv7/Modules/sceCtrl.cpp index b858e40972..d0fdfdfdee 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceCtrl.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceCtrl.cpp @@ -66,7 +66,7 @@ s32 sceCtrlClearRapidFire(s32 port, s32 idx) } -#define REG_FUNC(nid, name) reg_psv_func(nid, &sceCtrl, #name, name) +#define REG_FUNC(nid, name) reg_psv_func(nid, &sceCtrl, #name, name) psv_log_base sceCtrl("SceCtrl", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceDbg.cpp b/rpcs3/Emu/ARMv7/Modules/sceDbg.cpp index 6a2cc4c9a2..d3cf67fbb5 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceDbg.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceDbg.cpp @@ -31,7 +31,7 @@ s32 sceDbgLoggingHandler(vm::psv::ptr pFile, s32 line, s32 severity, } -#define REG_FUNC(nid, name) reg_psv_func(nid, &sceDbg, #name, name) +#define REG_FUNC(nid, name) reg_psv_func(nid, &sceDbg, #name, name) psv_log_base sceDbg("SceDbg", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceDeci4p.cpp b/rpcs3/Emu/ARMv7/Modules/sceDeci4p.cpp index f0cf7e3c8e..799d79ae43 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceDeci4p.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceDeci4p.cpp @@ -32,7 +32,7 @@ s32 sceKernelDeci4pRegisterCallback(s32 socketid, s32 cbid) } -#define REG_FUNC(nid, name) reg_psv_func(nid, &sceDeci4p, #name, name) +#define REG_FUNC(nid, name) reg_psv_func(nid, &sceDeci4p, #name, name) psv_log_base sceDeci4p("SceDeci4pUserp", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceDeflt.cpp b/rpcs3/Emu/ARMv7/Modules/sceDeflt.cpp index 8e31b95c72..7fb127de12 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceDeflt.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceDeflt.cpp @@ -70,7 +70,7 @@ s32 sceZipGetInfo(vm::psv::ptr pSrc, vm::psv::ptr(nid, &sceDeflt, #name, name) psv_log_base sceDeflt("SceDeflt", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceDisplay.cpp b/rpcs3/Emu/ARMv7/Modules/sceDisplay.cpp index c03dbe24dd..375a970f1a 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceDisplay.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceDisplay.cpp @@ -85,7 +85,7 @@ s32 sceDisplayUnregisterVblankStartCallback(s32 uid) } -#define REG_FUNC(nid, name) reg_psv_func(nid, &sceDisplay, #name, name) +#define REG_FUNC(nid, name) reg_psv_func(nid, &sceDisplay, #name, name) psv_log_base sceDisplay("SceDisplay", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceFiber.cpp b/rpcs3/Emu/ARMv7/Modules/sceFiber.cpp index ab35f7a9be..e2e2404d4b 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceFiber.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceFiber.cpp @@ -81,7 +81,7 @@ s32 sceFiberGetInfo(vm::psv::ptr fiber, vm::psv::ptr fib } -#define REG_FUNC(nid, name) reg_psv_func(nid, &sceFiber, #name, name) +#define REG_FUNC(nid, name) reg_psv_func(nid, &sceFiber, #name, name) psv_log_base sceFiber("SceFiber", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceFios.cpp b/rpcs3/Emu/ARMv7/Modules/sceFios.cpp index d542e97549..ea8e40c9d0 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceFios.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceFios.cpp @@ -802,7 +802,7 @@ void sceFiosIOFilterPsarcDearchiver() throw __FUNCTION__; } -#define REG_FUNC(nid, name) reg_psv_func(nid, &sceFios, #name, name) +#define REG_FUNC(nid, name) reg_psv_func(nid, &sceFios, #name, name) psv_log_base sceFios("SceFios2", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceFpu.cpp b/rpcs3/Emu/ARMv7/Modules/sceFpu.cpp index 2992c6fc58..fc2261b591 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceFpu.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceFpu.cpp @@ -4,7 +4,7 @@ extern psv_log_base sceFpu; -#define REG_FUNC(nid, name) reg_psv_func(nid, &sceFpu, #name, name) +#define REG_FUNC(nid, name) reg_psv_func(nid, &sceFpu, #name, name) psv_log_base sceFpu("SceFpu", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceGxm.cpp b/rpcs3/Emu/ARMv7/Modules/sceGxm.cpp index f65f49b349..de34d01bf5 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceGxm.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceGxm.cpp @@ -1067,7 +1067,7 @@ s32 sceGxmSetUniformDataF(vm::psv::ptr uniformBuffer, vm::psv::ptr(nid, &sceGxm, #name, name) psv_log_base sceGxm("SceGxm", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceHttp.cpp b/rpcs3/Emu/ARMv7/Modules/sceHttp.cpp index c98509fac4..6cf627b7af 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceHttp.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceHttp.cpp @@ -353,7 +353,7 @@ s32 sceHttpsFreeCaList(vm::psv::ptr caList) } -#define REG_FUNC(nid, name) reg_psv_func(nid, &sceHttp, #name, name) +#define REG_FUNC(nid, name) reg_psv_func(nid, &sceHttp, #name, name) psv_log_base sceHttp("SceHttp", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceIme.cpp b/rpcs3/Emu/ARMv7/Modules/sceIme.cpp index 797e282ace..ed5db75de7 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceIme.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceIme.cpp @@ -30,7 +30,7 @@ s32 sceImeClose() } -#define REG_FUNC(nid, name) reg_psv_func(nid, &sceIme, #name, name) +#define REG_FUNC(nid, name) reg_psv_func(nid, &sceIme, #name, name) psv_log_base sceIme("SceIme", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceJpeg.cpp b/rpcs3/Emu/ARMv7/Modules/sceJpeg.cpp index 06e8e0ec00..4bb75e2ad2 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceJpeg.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceJpeg.cpp @@ -106,7 +106,7 @@ s32 sceJpegSplitDecodeMJpeg(vm::psv::ptr pCtrl) } -#define REG_FUNC(nid, name) reg_psv_func(nid, &sceJpeg, #name, name) +#define REG_FUNC(nid, name) reg_psv_func(nid, &sceJpeg, #name, name) psv_log_base sceJpeg("SceJpeg", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceJpegEnc.cpp b/rpcs3/Emu/ARMv7/Modules/sceJpegEnc.cpp index 690afd9e04..5a23e8b9aa 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceJpegEnc.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceJpegEnc.cpp @@ -75,7 +75,7 @@ s32 sceJpegEncoderCsc( } -#define REG_FUNC(nid, name) reg_psv_func(nid, &sceJpegEnc, #name, name) +#define REG_FUNC(nid, name) reg_psv_func(nid, &sceJpegEnc, #name, name) psv_log_base sceJpegEnc("SceJpegEnc", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceLibKernel.cpp b/rpcs3/Emu/ARMv7/Modules/sceLibKernel.cpp index 016917d6de..22293ffced 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceLibKernel.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceLibKernel.cpp @@ -994,7 +994,7 @@ s32 sceIoGetstat(vm::psv::ptr name, vm::psv::ptr buf) } -#define REG_FUNC(nid, name) reg_psv_func(nid, &sceLibKernel, #name, &name) +#define REG_FUNC(nid, name) reg_psv_func(nid, &sceLibKernel, #name, &name) psv_log_base sceLibKernel("sceLibKernel", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceLibc.cpp b/rpcs3/Emu/ARMv7/Modules/sceLibc.cpp index 3e5b21c44e..cb7ed053eb 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceLibc.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceLibc.cpp @@ -246,7 +246,7 @@ namespace sce_libc_func } } -#define REG_FUNC(nid, name) reg_psv_func(nid, &sceLibc, #name, &sce_libc_func::name) +#define REG_FUNC(nid, name) reg_psv_func<&sce_libc_func::name>(nid, &sceLibc, #name, &sce_libc_func::name) psv_log_base sceLibc("SceLibc", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceLibm.cpp b/rpcs3/Emu/ARMv7/Modules/sceLibm.cpp index 1cbd5cd12e..d896a48a33 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceLibm.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceLibm.cpp @@ -9,7 +9,7 @@ namespace sce_libm_func } -#define REG_FUNC(nid, name) reg_psv_func(nid, &sceLibm, #name, &sce_libm_func::name) +#define REG_FUNC(nid, name) reg_psv_func(nid, &sceLibm, #name, &sce_libm_func::name) psv_log_base sceLibm("SceLibm", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceLibstdcxx.cpp b/rpcs3/Emu/ARMv7/Modules/sceLibstdcxx.cpp index 73260d9420..59d664032f 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceLibstdcxx.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceLibstdcxx.cpp @@ -23,7 +23,7 @@ namespace sce_libstdcxx_func } // Attention: find and set correct original mangled name in third parameter, for example: REG_FUNC(0xAE71DC3, operator_new_nothrow, "_ZnwjRKSt9nothrow_t"); -#define REG_FUNC(nid, name, orig_name) reg_psv_func(nid, &sceLibstdcxx, orig_name, &sce_libstdcxx_func::name) +#define REG_FUNC(nid, name, orig_name) reg_psv_func<&sce_libstdcxx_func::name>(nid, &sceLibstdcxx, orig_name, &sce_libstdcxx_func::name) psv_log_base sceLibstdcxx("SceLibstdcxx", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceLiveArea.cpp b/rpcs3/Emu/ARMv7/Modules/sceLiveArea.cpp index 62eea18429..5f8d0ca406 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceLiveArea.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceLiveArea.cpp @@ -14,7 +14,7 @@ s32 sceLiveAreaResourceGetStatus() throw __FUNCTION__; } -#define REG_FUNC(nid, name) reg_psv_func(nid, &sceLiveArea, #name, name) +#define REG_FUNC(nid, name) reg_psv_func(nid, &sceLiveArea, #name, name) psv_log_base sceLiveArea("SceLiveArea", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceLocation.cpp b/rpcs3/Emu/ARMv7/Modules/sceLocation.cpp index 8b61bca224..e3ac3eeb19 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceLocation.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceLocation.cpp @@ -172,7 +172,7 @@ s32 sceLocationSetGpsEmulationFile(vm::psv::ptr filename) } -#define REG_FUNC(nid, name) reg_psv_func(nid, &sceLocation, #name, name) +#define REG_FUNC(nid, name) reg_psv_func(nid, &sceLocation, #name, name) psv_log_base sceLocation("SceLibLocation", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceMd5.cpp b/rpcs3/Emu/ARMv7/Modules/sceMd5.cpp index d31e193e81..cea6c9dad5 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceMd5.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceMd5.cpp @@ -35,7 +35,7 @@ s32 sceMd5BlockResult(vm::psv::ptr pContext, vm::psv::ptr dig throw __FUNCTION__; } -#define REG_FUNC(nid, name) reg_psv_func(nid, &sceMd5, #name, name) +#define REG_FUNC(nid, name) reg_psv_func(nid, &sceMd5, #name, name) psv_log_base sceMd5("SceMd5", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceMotion.cpp b/rpcs3/Emu/ARMv7/Modules/sceMotion.cpp index 4128c78a65..38a96dcdc8 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceMotion.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceMotion.cpp @@ -111,7 +111,7 @@ s32 sceMotionStopSampling() throw __FUNCTION__; } -#define REG_FUNC(nid, name) reg_psv_func(nid, &sceMotion, #name, name) +#define REG_FUNC(nid, name) reg_psv_func(nid, &sceMotion, #name, name) psv_log_base sceMotion("SceMotion", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceMt19937.cpp b/rpcs3/Emu/ARMv7/Modules/sceMt19937.cpp index 6a125206ec..99907aa333 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceMt19937.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceMt19937.cpp @@ -21,7 +21,7 @@ u32 sceMt19937UInt(vm::psv::ptr pCtx) } -#define REG_FUNC(nid, name) reg_psv_func(nid, &sceMt19937, #name, name) +#define REG_FUNC(nid, name) reg_psv_func(nid, &sceMt19937, #name, name) psv_log_base sceMt19937("SceMt19937", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceNet.cpp b/rpcs3/Emu/ARMv7/Modules/sceNet.cpp index 347ba76df5..b2a1778bb2 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceNet.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceNet.cpp @@ -295,7 +295,7 @@ s32 sceNetGetStatisticsInfo(vm::psv::ptr info, s32 flags) } -#define REG_FUNC(nid, name) reg_psv_func(nid, &sceNet, #name, name) +#define REG_FUNC(nid, name) reg_psv_func(nid, &sceNet, #name, name) psv_log_base sceNet("SceNet", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceNetCtl.cpp b/rpcs3/Emu/ARMv7/Modules/sceNetCtl.cpp index 7f15d6bf1f..3e15ff5a9e 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceNetCtl.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceNetCtl.cpp @@ -128,7 +128,7 @@ s32 sceNetCtlAdhocGetInAddr(vm::psv::ptr inaddr) throw __FUNCTION__; } -#define REG_FUNC(nid, name) reg_psv_func(nid, &sceNetCtl, #name, name) +#define REG_FUNC(nid, name) reg_psv_func(nid, &sceNetCtl, #name, name) psv_log_base sceNetCtl("SceNetCtl", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceNgs.cpp b/rpcs3/Emu/ARMv7/Modules/sceNgs.cpp index f09993ba24..de367ff1fe 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceNgs.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceNgs.cpp @@ -429,7 +429,7 @@ s32 sceSulphaNgsTrace(vm::psv::ptr message) } -#define REG_FUNC(nid, name) reg_psv_func(nid, &sceNgs, #name, name) +#define REG_FUNC(nid, name) reg_psv_func(nid, &sceNgs, #name, name) psv_log_base sceNgs("SceNgs", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceNpBasic.cpp b/rpcs3/Emu/ARMv7/Modules/sceNpBasic.cpp index e798df5f48..bc0a3e2989 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceNpBasic.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceNpBasic.cpp @@ -208,7 +208,7 @@ s32 sceNpBasicGetPlaySessionLog(SceNpBasicPlaySessionLogType type, u32 index, vm throw __FUNCTION__; } -#define REG_FUNC(nid, name) reg_psv_func(nid, &sceNpBasic, #name, name) +#define REG_FUNC(nid, name) reg_psv_func(nid, &sceNpBasic, #name, name) psv_log_base sceNpBasic("SceNpBasic", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceNpCommon.cpp b/rpcs3/Emu/ARMv7/Modules/sceNpCommon.cpp index 095de28b17..334c800841 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceNpCommon.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceNpCommon.cpp @@ -59,7 +59,7 @@ s32 sceNpCmpNpIdInOrder(vm::psv::ptr npid1, vm::psv::ptr(nid, &sceNpCommon, #name, name) psv_log_base sceNpCommon("SceNpCommon", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceNpManager.cpp b/rpcs3/Emu/ARMv7/Modules/sceNpManager.cpp index 5fce1c946e..6f53f3c772 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceNpManager.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceNpManager.cpp @@ -63,7 +63,7 @@ s32 sceNpManagerGetChatRestrictionFlag(vm::psv::ptr isRestricted) throw __FUNCTION__; } -#define REG_FUNC(nid, name) reg_psv_func(nid, &sceNpManager, #name, name) +#define REG_FUNC(nid, name) reg_psv_func(nid, &sceNpManager, #name, name) psv_log_base sceNpManager("SceNpManager", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceNpMatching.cpp b/rpcs3/Emu/ARMv7/Modules/sceNpMatching.cpp index cdb9f5aa8e..bf2ec68eba 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceNpMatching.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceNpMatching.cpp @@ -1302,7 +1302,7 @@ s32 sceNpMatching2SignalingGetPeerNetInfoResult( throw __FUNCTION__; } -#define REG_FUNC(nid, name) reg_psv_func(nid, &sceNpMatching, #name, name) +#define REG_FUNC(nid, name) reg_psv_func(nid, &sceNpMatching, #name, name) psv_log_base sceNpMatching("SceNpMatching2", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceNpScore.cpp b/rpcs3/Emu/ARMv7/Modules/sceNpScore.cpp index f093ab8b31..99c144004e 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceNpScore.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceNpScore.cpp @@ -333,7 +333,7 @@ s32 sceNpScoreSanitizeCommentAsync(s32 reqId, vm::psv::ptr comment, throw __FUNCTION__; } -#define REG_FUNC(nid, name) reg_psv_func(nid, &sceNpScore, #name, name) +#define REG_FUNC(nid, name) reg_psv_func(nid, &sceNpScore, #name, name) psv_log_base sceNpScore("SceNpScore", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceNpUtility.cpp b/rpcs3/Emu/ARMv7/Modules/sceNpUtility.cpp index 1aab007361..aa3f1f10ca 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceNpUtility.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceNpUtility.cpp @@ -136,7 +136,7 @@ s32 sceNpBandwidthTestAbort() throw __FUNCTION__; } -#define REG_FUNC(nid, name) reg_psv_func(nid, &sceNpUtility, #name, name) +#define REG_FUNC(nid, name) reg_psv_func(nid, &sceNpUtility, #name, name) psv_log_base sceNpUtility("SceNpUtility", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/scePerf.cpp b/rpcs3/Emu/ARMv7/Modules/scePerf.cpp index fabf63691a..a7a19d8096 100644 --- a/rpcs3/Emu/ARMv7/Modules/scePerf.cpp +++ b/rpcs3/Emu/ARMv7/Modules/scePerf.cpp @@ -265,7 +265,7 @@ s32 sceRazorCpuSync() throw __FUNCTION__; } -#define REG_FUNC(nid, name) reg_psv_func(nid, &scePerf, #name, name) +#define REG_FUNC(nid, name) reg_psv_func(nid, &scePerf, #name, name) psv_log_base scePerf("ScePerf", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/scePgf.cpp b/rpcs3/Emu/ARMv7/Modules/scePgf.cpp index c4a1f21065..3463cd763c 100644 --- a/rpcs3/Emu/ARMv7/Modules/scePgf.cpp +++ b/rpcs3/Emu/ARMv7/Modules/scePgf.cpp @@ -4,7 +4,7 @@ extern psv_log_base scePgf; -#define REG_FUNC(nid, name) reg_psv_func(nid, &scePgf, #name, name) +#define REG_FUNC(nid, name) reg_psv_func(nid, &scePgf, #name, name) psv_log_base scePgf("ScePgf", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/scePhotoExport.cpp b/rpcs3/Emu/ARMv7/Modules/scePhotoExport.cpp index 2046dff9ca..58d2b8ec81 100644 --- a/rpcs3/Emu/ARMv7/Modules/scePhotoExport.cpp +++ b/rpcs3/Emu/ARMv7/Modules/scePhotoExport.cpp @@ -40,7 +40,7 @@ s32 scePhotoExportFromFile( throw __FUNCTION__; } -#define REG_FUNC(nid, name) reg_psv_func(nid, &scePhotoExport, #name, name) +#define REG_FUNC(nid, name) reg_psv_func(nid, &scePhotoExport, #name, name) psv_log_base scePhotoExport("ScePhotoExport", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceRazorCapture.cpp b/rpcs3/Emu/ARMv7/Modules/sceRazorCapture.cpp index c14fba50b6..eba197efe8 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceRazorCapture.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceRazorCapture.cpp @@ -19,7 +19,7 @@ bool sceRazorCaptureIsInProgress() throw __FUNCTION__; } -#define REG_FUNC(nid, name) reg_psv_func(nid, &sceRazorCapture, #name, name) +#define REG_FUNC(nid, name) reg_psv_func(nid, &sceRazorCapture, #name, name) psv_log_base sceRazorCapture("SceRazorCapture", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceRtc.cpp b/rpcs3/Emu/ARMv7/Modules/sceRtc.cpp index 9b81d86072..ad8b358f52 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceRtc.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceRtc.cpp @@ -190,7 +190,7 @@ s32 sceRtcParseRFC3339(vm::psv::ptr pUtc, vm::psv::ptr pszDateT } -#define REG_FUNC(nid, name) reg_psv_func(nid, &sceRtc, #name, name) +#define REG_FUNC(nid, name) reg_psv_func(nid, &sceRtc, #name, name) psv_log_base sceRtc("SceRtc", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceSas.cpp b/rpcs3/Emu/ARMv7/Modules/sceSas.cpp index 3d11ff98f1..b12625e443 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceSas.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceSas.cpp @@ -150,7 +150,7 @@ s32 sceSasSetEffectParam(u32 delayTime, u32 feedback) } -#define REG_FUNC(nid, name) reg_psv_func(nid, &sceSas, #name, name) +#define REG_FUNC(nid, name) reg_psv_func(nid, &sceSas, #name, name) psv_log_base sceSas("SceSas", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceScreenShot.cpp b/rpcs3/Emu/ARMv7/Modules/sceScreenShot.cpp index 07b3f0a467..37b31f35b4 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceScreenShot.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceScreenShot.cpp @@ -33,7 +33,7 @@ s32 sceScreenShotEnable() } -#define REG_FUNC(nid, name) reg_psv_func(nid, &sceScreenShot, #name, name) +#define REG_FUNC(nid, name) reg_psv_func(nid, &sceScreenShot, #name, name) psv_log_base sceScreenShot("SceScreenShot", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceSfmt.cpp b/rpcs3/Emu/ARMv7/Modules/sceSfmt.cpp index e6d2f2a4be..05eeaa3d21 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceSfmt.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceSfmt.cpp @@ -4,7 +4,7 @@ extern psv_log_base sceSfmt; -#define REG_FUNC(nid, name) reg_psv_func(nid, &sceSfmt, #name, name) +#define REG_FUNC(nid, name) reg_psv_func(nid, &sceSfmt, #name, name) psv_log_base sceSfmt("SceSfmt", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceSha.cpp b/rpcs3/Emu/ARMv7/Modules/sceSha.cpp index 5ec792b06d..4e8503ad01 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceSha.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceSha.cpp @@ -4,7 +4,7 @@ extern psv_log_base sceSha; -#define REG_FUNC(nid, name) reg_psv_func(nid, &sceSha, #name, name) +#define REG_FUNC(nid, name) reg_psv_func(nid, &sceSha, #name, name) psv_log_base sceSha("SceSha", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceSqlite.cpp b/rpcs3/Emu/ARMv7/Modules/sceSqlite.cpp index 19f560c963..ebab3a25e3 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceSqlite.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceSqlite.cpp @@ -4,7 +4,7 @@ extern psv_log_base sceSqlite; -#define REG_FUNC(nid, name) reg_psv_func(nid, &sceSqlite, #name, name) +#define REG_FUNC(nid, name) reg_psv_func(nid, &sceSqlite, #name, name) psv_log_base sceSqlite("SceSqlite", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceSsl.cpp b/rpcs3/Emu/ARMv7/Modules/sceSsl.cpp index 02a377996a..6090cf713c 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceSsl.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceSsl.cpp @@ -60,7 +60,7 @@ s32 sceSslFreeSslCertName(vm::psv::ptr certName) } -#define REG_FUNC(nid, name) reg_psv_func(nid, &sceSsl, #name, name) +#define REG_FUNC(nid, name) reg_psv_func(nid, &sceSsl, #name, name) psv_log_base sceSsl("SceSsl", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceSulpha.cpp b/rpcs3/Emu/ARMv7/Modules/sceSulpha.cpp index 3df26668a4..effe1df7f6 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceSulpha.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceSulpha.cpp @@ -82,7 +82,7 @@ s32 sceSulphaAgentsUnregister(vm::psv::ptr handles, u32 a } -#define REG_FUNC(nid, name) reg_psv_func(nid, &sceSulpha, #name, name) +#define REG_FUNC(nid, name) reg_psv_func(nid, &sceSulpha, #name, name) psv_log_base sceSulpha("SceSulpha", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceSysmodule.cpp b/rpcs3/Emu/ARMv7/Modules/sceSysmodule.cpp index 51158c0226..c39706077b 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceSysmodule.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceSysmodule.cpp @@ -25,7 +25,7 @@ s32 sceSysmoduleIsLoaded(u16 id) return SCE_OK; // module is loaded } -#define REG_FUNC(nid, name) reg_psv_func(nid, &sceSysmodule, #name, name) +#define REG_FUNC(nid, name) reg_psv_func(nid, &sceSysmodule, #name, name) psv_log_base sceSysmodule("SceSysmodule", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceSystemGesture.cpp b/rpcs3/Emu/ARMv7/Modules/sceSystemGesture.cpp index 0e894f79fb..ce3b0b3cfa 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceSystemGesture.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceSystemGesture.cpp @@ -246,7 +246,7 @@ s32 sceSystemGestureGetTouchEventByEventID(vm::psv::ptr(nid, &sceSystemGesture, #name, name) psv_log_base sceSystemGesture("SceSystemGesture", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceTouch.cpp b/rpcs3/Emu/ARMv7/Modules/sceTouch.cpp index b6ce6ccc77..39979caf12 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceTouch.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceTouch.cpp @@ -30,7 +30,7 @@ s32 sceTouchGetSamplingState(u32 port, vm::psv::ptr pState) } -#define REG_FUNC(nid, name) reg_psv_func(nid, &sceTouch, #name, name) +#define REG_FUNC(nid, name) reg_psv_func(nid, &sceTouch, #name, name) psv_log_base sceTouch("SceTouch", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceUlt.cpp b/rpcs3/Emu/ARMv7/Modules/sceUlt.cpp index 68216d7ddc..022be0bc33 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceUlt.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceUlt.cpp @@ -541,7 +541,7 @@ s32 sceUltUlthreadGetSelf(vm::psv::ptr> ulthread) throw __FUNCTION__; } -#define REG_FUNC(nid, name) reg_psv_func(nid, &sceUlt, #name, name) +#define REG_FUNC(nid, name) reg_psv_func(nid, &sceUlt, #name, name) psv_log_base sceUlt("SceUlt", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceVideodec.cpp b/rpcs3/Emu/ARMv7/Modules/sceVideodec.cpp index bec390ebe1..ec6552e07a 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceVideodec.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceVideodec.cpp @@ -176,7 +176,7 @@ s32 sceAvcdecDecodeFlush(vm::psv::ptr pCtrl) } -#define REG_FUNC(nid, name) reg_psv_func(nid, &sceVideodec, #name, name) +#define REG_FUNC(nid, name) reg_psv_func(nid, &sceVideodec, #name, name) psv_log_base sceVideodec("SceVideodec", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceVoice.cpp b/rpcs3/Emu/ARMv7/Modules/sceVoice.cpp index cddc5f43d2..1048b2f657 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceVoice.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceVoice.cpp @@ -250,7 +250,7 @@ s32 sceVoiceGetResourceInfo(vm::psv::ptr pInfo) } -#define REG_FUNC(nid, name) reg_psv_func(nid, &sceVoice, #name, name) +#define REG_FUNC(nid, name) reg_psv_func(nid, &sceVoice, #name, name) psv_log_base sceVoice("SceVoice", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceVoiceQoS.cpp b/rpcs3/Emu/ARMv7/Modules/sceVoiceQoS.cpp index 050570aaa9..dffbdac310 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceVoiceQoS.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceVoiceQoS.cpp @@ -112,7 +112,7 @@ s32 sceVoiceQoSReadPacket(SceVoiceQoSConnectionId connectionId, vm::psv::ptr(nid, &sceVoiceQoS, #name, name) psv_log_base sceVoiceQoS("SceVoiceQos", []() { diff --git a/rpcs3/Emu/ARMv7/Modules/sceXml.cpp b/rpcs3/Emu/ARMv7/Modules/sceXml.cpp index 525ce21565..55e03f1816 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceXml.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceXml.cpp @@ -4,7 +4,7 @@ extern psv_log_base sceXml; -#define REG_FUNC(nid, name) reg_psv_func(nid, &sceXml, #name, name) +#define REG_FUNC(nid, name) reg_psv_func(nid, &sceXml, #name, name) psv_log_base sceXml("SceXml", []() { diff --git a/rpcs3/Emu/ARMv7/PSVFuncList.cpp b/rpcs3/Emu/ARMv7/PSVFuncList.cpp index fdbad45cad..b892e143c7 100644 --- a/rpcs3/Emu/ARMv7/PSVFuncList.cpp +++ b/rpcs3/Emu/ARMv7/PSVFuncList.cpp @@ -223,10 +223,10 @@ void initialize_psv_modules() psv_func& hle_return = g_psv_func_list[SFI_HLE_RETURN]; hle_return.nid = 0; hle_return.name = "HLE_RETURN"; - hle_return.func.reset(new psv_func_detail::func_binder([](ARMv7Context& context) + hle_return.func = [](ARMv7Context& context) { context.thread.FastStop(); - })); + }; // load functions for (auto module : g_psv_modules) diff --git a/rpcs3/Emu/ARMv7/PSVFuncList.h b/rpcs3/Emu/ARMv7/PSVFuncList.h index ed2d9217a8..8411439c18 100644 --- a/rpcs3/Emu/ARMv7/PSVFuncList.h +++ b/rpcs3/Emu/ARMv7/PSVFuncList.h @@ -33,14 +33,6 @@ public: }; -// Abstract HLE function caller base class -class psv_func_caller -{ -public: - virtual void operator()(ARMv7Context& CPU) = 0; - virtual ~psv_func_caller(){}; -}; - // Utilities for binding ARMv7Context to C++ function arguments received by HLE functions or sent to callbacks namespace psv_func_detail { @@ -360,82 +352,50 @@ namespace psv_func_detail return put_func_args(context, args...) || (t == ARG_STACK); } - template - class func_binder; + template + struct func_binder; - template - class func_binder : public psv_func_caller + template + struct func_binder { typedef void(*func_t)(T...); - const func_t m_call; - public: - func_binder(func_t call) - : psv_func_caller() - , m_call(call) + static void do_call(ARMv7Context& context) { - } - - virtual void operator()(ARMv7Context& context) - { - call(m_call, get_func_args<0, 0, 0, T...>(context)); + call((func_t)func, get_func_args<0, 0, 0, T...>(context)); } }; - template - class func_binder : public psv_func_caller + template + struct func_binder { typedef void(*func_t)(ARMv7Context&, T...); - const func_t m_call; - public: - func_binder(func_t call) - : psv_func_caller() - , m_call(call) + static void do_call(ARMv7Context& context) { - } - - virtual void operator()(ARMv7Context& context) - { - call(m_call, std::tuple_cat(std::tuple(context), get_func_args<0, 0, 0, T...>(context))); + call((func_t)func, std::tuple_cat(std::tuple(context), get_func_args<0, 0, 0, T...>(context))); } }; - template - class func_binder : public psv_func_caller + template + struct func_binder { typedef RT(*func_t)(T...); - const func_t m_call; - public: - func_binder(func_t call) - : psv_func_caller() - , m_call(call) + static void do_call(ARMv7Context& context) { - } - - virtual void operator()(ARMv7Context& context) - { - bind_result::value>::put_result(context, call(m_call, get_func_args<0, 0, 0, T...>(context))); + bind_result::value>::put_result(context, call((func_t)func, get_func_args<0, 0, 0, T...>(context))); } }; - template - class func_binder : public psv_func_caller + template + struct func_binder { typedef RT(*func_t)(ARMv7Context&, T...); - const func_t m_call; - public: - func_binder(func_t call) - : psv_func_caller() - , m_call(call) + static void do_call(ARMv7Context& context) { - } - - virtual void operator()(ARMv7Context& context) - { - bind_result::value>::put_result(context, call(m_call, std::tuple_cat(std::tuple(context), get_func_args<0, 0, 0, T...>(context)))); + bind_result::value>::put_result(context, call((func_t)func, std::tuple_cat(std::tuple(context), get_func_args<0, 0, 0, T...>(context)))); } }; @@ -474,7 +434,7 @@ struct psv_func { u32 nid; // Unique function ID (should be generated individually for each elf loaded) const char* name; // Function name for information - std::shared_ptr func; // Function caller instance + void(*func)(ARMv7Context& context); // Function caller psv_log_base* module; // Module for information }; @@ -488,12 +448,12 @@ enum psv_special_function_index : u16 // Do not call directly u32 add_psv_func(psv_func data); // Do not call directly -template void reg_psv_func(u32 nid, psv_log_base* module, const char* name, RT(*func)(T...)) +template void reg_psv_func(u32 nid, psv_log_base* module, const char* name, RT(*_func)(T...)) { psv_func f; f.nid = nid; f.name = name; - f.func.reset(new psv_func_detail::func_binder(func)); + f.func = psv_func_detail::func_binder::do_call; f.module = module; add_psv_func(f); diff --git a/rpcs3/Emu/SysCalls/Modules.h b/rpcs3/Emu/SysCalls/Modules.h index e2ac304be6..053973045c 100644 --- a/rpcs3/Emu/SysCalls/Modules.h +++ b/rpcs3/Emu/SysCalls/Modules.h @@ -10,10 +10,10 @@ struct ModuleFunc { u32 id; Module* module; - std::shared_ptr func; + void(*func)(PPUThread&); vm::ptr lle_func; - ModuleFunc(u32 id, Module* module, func_caller* func, vm::ptr lle_func = vm::ptr::make(0)) + ModuleFunc(u32 id, Module* module, void(*func)(PPUThread&), vm::ptr lle_func = vm::ptr::make(0)) : id(id) , module(module) , func(func) @@ -111,9 +111,9 @@ public: bool RemoveId(u32 id); - template __forceinline void AddFunc(u32 id, T func); - template __forceinline void AddFunc(const char* name, T func); - template __forceinline void AddFuncSub(const char group[8], const u64 ops[], const char* name, T func); + template __forceinline u32 AddFunc(const u32 nid, T _func); + template __forceinline u32 AddFunc(const char* name, T _func); + template __forceinline u32 AddFuncSub(const char group[8], const u64 ops[], const char* name, T _func); }; u32 add_ps3_func(ModuleFunc func); @@ -123,25 +123,23 @@ void execute_ps3_func_by_index(PPUThread& CPU, u32 id); void clear_ps3_functions(); u32 get_function_id(const char* name); -template -__forceinline void Module::AddFunc(u32 id, T func) +template +__forceinline u32 Module::AddFunc(const u32 nid, T _func) { - add_ps3_func(ModuleFunc(id, this, bind_func(func))); + return add_ps3_func(ModuleFunc(nid, this, ppu_func_detail::_bind_func(_func))); } -template -__forceinline void Module::AddFunc(const char* name, T func) +template +__forceinline u32 Module::AddFunc(const char* name, T _func) { - AddFunc(get_function_id(name), func); + return AddFunc(get_function_id(name), _func); } -template -__forceinline void Module::AddFuncSub(const char group[8], const u64 ops[], const char* name, T func) +template +__forceinline u32 Module::AddFuncSub(const char group[8], const u64 ops[], const char* name, T _func) { - if (!ops[0]) return; - SFunc* sf = new SFunc; - sf->index = add_ps3_func(ModuleFunc(get_function_id(name), this, bind_func(func))); + sf->index = AddFunc(name, _func); sf->name = name; sf->group = *(u64*)group; sf->found = 0; @@ -157,13 +155,16 @@ __forceinline void Module::AddFuncSub(const char group[8], const u64 ops[], cons op.crc = re32(op.crc); sf->ops.push_back(op); } + PushNewFuncSub(sf); + + return sf->index; } #define REG_SUB(module, group, name, ...) \ static const u64 name ## _table[] = {__VA_ARGS__ , 0}; \ - module.AddFuncSub(group, name ## _table, #name, name) + if (name ## _table[0]) module.AddFuncSub(group, name ## _table, #name, name) -#define REG_FUNC(module, name) module.AddFunc(get_function_id(#name), name) +#define REG_FUNC(module, name) module.AddFunc(#name, name) #define UNIMPLEMENTED_FUNC(module) module.Error("%s", __FUNCTION__) diff --git a/rpcs3/Emu/SysCalls/Modules/cellAtrac.cpp b/rpcs3/Emu/SysCalls/Modules/cellAtrac.cpp index 0427de1bc3..464ac26224 100644 --- a/rpcs3/Emu/SysCalls/Modules/cellAtrac.cpp +++ b/rpcs3/Emu/SysCalls/Modules/cellAtrac.cpp @@ -212,34 +212,34 @@ s32 cellAtracGetInternalErrorInfo(vm::ptr pHandle, vm::ptr Module cellAtrac("cellAtrac", []() { - cellAtrac.AddFunc(0x66afc68e, cellAtracSetDataAndGetMemSize); + REG_FUNC(cellAtrac, cellAtracSetDataAndGetMemSize); - cellAtrac.AddFunc(0xfa293e88, cellAtracCreateDecoder); - cellAtrac.AddFunc(0x2642d4cc, cellAtracCreateDecoderExt); - cellAtrac.AddFunc(0x761cb9be, cellAtracDeleteDecoder); + REG_FUNC(cellAtrac, cellAtracCreateDecoder); + REG_FUNC(cellAtrac, cellAtracCreateDecoderExt); + REG_FUNC(cellAtrac, cellAtracDeleteDecoder); - cellAtrac.AddFunc(0x8eb0e65f, cellAtracDecode); + REG_FUNC(cellAtrac, cellAtracDecode); - cellAtrac.AddFunc(0x2bfff084, cellAtracGetStreamDataInfo); - cellAtrac.AddFunc(0x46cfc013, cellAtracAddStreamData); - cellAtrac.AddFunc(0xdfab73aa, cellAtracGetRemainFrame); - cellAtrac.AddFunc(0xc9a95fcb, cellAtracGetVacantSize); - cellAtrac.AddFunc(0x99efe171, cellAtracIsSecondBufferNeeded); - cellAtrac.AddFunc(0xbe07f05e, cellAtracGetSecondBufferInfo); - cellAtrac.AddFunc(0x06ddb53e, cellAtracSetSecondBuffer); + REG_FUNC(cellAtrac, cellAtracGetStreamDataInfo); + REG_FUNC(cellAtrac, cellAtracAddStreamData); + REG_FUNC(cellAtrac, cellAtracGetRemainFrame); + REG_FUNC(cellAtrac, cellAtracGetVacantSize); + REG_FUNC(cellAtrac, cellAtracIsSecondBufferNeeded); + REG_FUNC(cellAtrac, cellAtracGetSecondBufferInfo); + REG_FUNC(cellAtrac, cellAtracSetSecondBuffer); - cellAtrac.AddFunc(0x0f9667b6, cellAtracGetChannel); - cellAtrac.AddFunc(0x5f62d546, cellAtracGetMaxSample); - cellAtrac.AddFunc(0x4797d1ff, cellAtracGetNextSample); - cellAtrac.AddFunc(0xcf01d5d4, cellAtracGetSoundInfo); - cellAtrac.AddFunc(0x7b22e672, cellAtracGetNextDecodePosition); - cellAtrac.AddFunc(0x006016da, cellAtracGetBitrate); + REG_FUNC(cellAtrac, cellAtracGetChannel); + REG_FUNC(cellAtrac, cellAtracGetMaxSample); + REG_FUNC(cellAtrac, cellAtracGetNextSample); + REG_FUNC(cellAtrac, cellAtracGetSoundInfo); + REG_FUNC(cellAtrac, cellAtracGetNextDecodePosition); + REG_FUNC(cellAtrac, cellAtracGetBitrate); - cellAtrac.AddFunc(0xab6b6dbf, cellAtracGetLoopInfo); - cellAtrac.AddFunc(0x78ba5c41, cellAtracSetLoopNum); + REG_FUNC(cellAtrac, cellAtracGetLoopInfo); + REG_FUNC(cellAtrac, cellAtracSetLoopNum); - cellAtrac.AddFunc(0x99fb73d1, cellAtracGetBufferInfoForResetting); - cellAtrac.AddFunc(0x7772eb2b, cellAtracResetPlayPosition); + REG_FUNC(cellAtrac, cellAtracGetBufferInfoForResetting); + REG_FUNC(cellAtrac, cellAtracResetPlayPosition); - cellAtrac.AddFunc(0xb5c11938, cellAtracGetInternalErrorInfo); + REG_FUNC(cellAtrac, cellAtracGetInternalErrorInfo); }); diff --git a/rpcs3/Emu/SysCalls/Modules/cellBgdl.cpp b/rpcs3/Emu/SysCalls/Modules/cellBgdl.cpp index 15b7f773e0..e047c4ea06 100644 --- a/rpcs3/Emu/SysCalls/Modules/cellBgdl.cpp +++ b/rpcs3/Emu/SysCalls/Modules/cellBgdl.cpp @@ -41,9 +41,9 @@ int cellBGDLGetMode() void cellBgdl_init() { - cellBgdl.AddFunc(0x4e9bb95b, cellBGDLGetInfo); - cellBgdl.AddFunc(0x2ab0d183, cellBGDLGetInfo2); - cellBgdl.AddFunc(0x7e134a90, cellBGDLSetMode); - cellBgdl.AddFunc(0x74e57bdf, cellBGDLGetMode); + REG_FUNC(cellBgdl, cellBGDLGetInfo); + REG_FUNC(cellBgdl, cellBGDLGetInfo2); + REG_FUNC(cellBgdl, cellBGDLSetMode); + REG_FUNC(cellBgdl, cellBGDLGetMode); } #endif diff --git a/rpcs3/Emu/SysCalls/Modules/cellCamera.cpp b/rpcs3/Emu/SysCalls/Modules/cellCamera.cpp index 3dd0d99cc3..f6c8e292e9 100644 --- a/rpcs3/Emu/SysCalls/Modules/cellCamera.cpp +++ b/rpcs3/Emu/SysCalls/Modules/cellCamera.cpp @@ -569,38 +569,38 @@ void cellCamera_unload() Module cellCamera("cellCamera", []() { - cellCamera.AddFunc(0xbf47c5dd, cellCameraInit); - cellCamera.AddFunc(0x5ad46570, cellCameraEnd); - cellCamera.AddFunc(0x85e1b8da, cellCameraOpen); - cellCamera.AddFunc(0x5d25f866, cellCameraOpenEx); - cellCamera.AddFunc(0x379c5dd6, cellCameraClose); + REG_FUNC(cellCamera, cellCameraInit); + REG_FUNC(cellCamera, cellCameraEnd); + REG_FUNC(cellCamera, cellCameraOpen); + REG_FUNC(cellCamera, cellCameraOpenEx); + REG_FUNC(cellCamera, cellCameraClose); - cellCamera.AddFunc(0x602e2052, cellCameraGetDeviceGUID); - cellCamera.AddFunc(0x58bc5870, cellCameraGetType); - cellCamera.AddFunc(0x8ca53dde, cellCameraIsAvailable); - cellCamera.AddFunc(0x7e063bbc, cellCameraIsAttached); - cellCamera.AddFunc(0xfa160f24, cellCameraIsOpen); - cellCamera.AddFunc(0x5eebf24e, cellCameraIsStarted); - cellCamera.AddFunc(0x532b8aaa, cellCameraGetAttribute); - cellCamera.AddFunc(0x8cd56eee, cellCameraSetAttribute); - cellCamera.AddFunc(0x7dac520c, cellCameraGetBufferSize); - cellCamera.AddFunc(0x10697d7f, cellCameraGetBufferInfo); - cellCamera.AddFunc(0x0e63c444, cellCameraGetBufferInfoEx); + REG_FUNC(cellCamera, cellCameraGetDeviceGUID); + REG_FUNC(cellCamera, cellCameraGetType); + REG_FUNC(cellCamera, cellCameraIsAvailable); + REG_FUNC(cellCamera, cellCameraIsAttached); + REG_FUNC(cellCamera, cellCameraIsOpen); + REG_FUNC(cellCamera, cellCameraIsStarted); + REG_FUNC(cellCamera, cellCameraGetAttribute); + REG_FUNC(cellCamera, cellCameraSetAttribute); + REG_FUNC(cellCamera, cellCameraGetBufferSize); + REG_FUNC(cellCamera, cellCameraGetBufferInfo); + REG_FUNC(cellCamera, cellCameraGetBufferInfoEx); - cellCamera.AddFunc(0x61dfbe83, cellCameraPrepExtensionUnit); - cellCamera.AddFunc(0xeb6f95fb, cellCameraCtrlExtensionUnit); - cellCamera.AddFunc(0xb602e328, cellCameraGetExtensionUnit); - cellCamera.AddFunc(0x2dea3e9b, cellCameraSetExtensionUnit); + REG_FUNC(cellCamera, cellCameraPrepExtensionUnit); + REG_FUNC(cellCamera, cellCameraCtrlExtensionUnit); + REG_FUNC(cellCamera, cellCameraGetExtensionUnit); + REG_FUNC(cellCamera, cellCameraSetExtensionUnit); - cellCamera.AddFunc(0x81f83db9, cellCameraReset); - cellCamera.AddFunc(0x456dc4aa, cellCameraStart); - cellCamera.AddFunc(0x3845d39b, cellCameraRead); - cellCamera.AddFunc(0x21fc151f, cellCameraReadEx); - cellCamera.AddFunc(0xe28b206b, cellCameraReadComplete); - cellCamera.AddFunc(0x02f5ced0, cellCameraStop); + REG_FUNC(cellCamera, cellCameraReset); + REG_FUNC(cellCamera, cellCameraStart); + REG_FUNC(cellCamera, cellCameraRead); + REG_FUNC(cellCamera, cellCameraReadEx); + REG_FUNC(cellCamera, cellCameraReadComplete); + REG_FUNC(cellCamera, cellCameraStop); - cellCamera.AddFunc(0xb0647e5a, cellCameraSetNotifyEventQueue); - cellCamera.AddFunc(0x9b98d258, cellCameraRemoveNotifyEventQueue); - cellCamera.AddFunc(0xa7fd2f5b, cellCameraSetNotifyEventQueue2); - cellCamera.AddFunc(0x44673f07, cellCameraRemoveNotifyEventQueue2); + REG_FUNC(cellCamera, cellCameraSetNotifyEventQueue); + REG_FUNC(cellCamera, cellCameraRemoveNotifyEventQueue); + REG_FUNC(cellCamera, cellCameraSetNotifyEventQueue2); + REG_FUNC(cellCamera, cellCameraRemoveNotifyEventQueue2); }); diff --git a/rpcs3/Emu/SysCalls/Modules/cellCelp8Enc.cpp b/rpcs3/Emu/SysCalls/Modules/cellCelp8Enc.cpp index 83473a902c..e89fe43bce 100644 --- a/rpcs3/Emu/SysCalls/Modules/cellCelp8Enc.cpp +++ b/rpcs3/Emu/SysCalls/Modules/cellCelp8Enc.cpp @@ -71,14 +71,14 @@ int cellCelp8EncGetAu() void cellCelp8Enc_init() { - cellCelp8Enc.AddFunc(0x2d677e0c, cellCelp8EncQueryAttr); - cellCelp8Enc.AddFunc(0x2eb6efee, cellCelp8EncOpen); - cellCelp8Enc.AddFunc(0xcd48ad62, cellCelp8EncOpenEx); - cellCelp8Enc.AddFunc(0xfd2566b4, cellCelp8EncClose); - cellCelp8Enc.AddFunc(0x0f6ab57b, cellCelp8EncStart); - cellCelp8Enc.AddFunc(0xbbbc2c1c, cellCelp8EncEnd); - cellCelp8Enc.AddFunc(0x2099f86e, cellCelp8EncEncodeFrame); - cellCelp8Enc.AddFunc(0x29da1ea6, cellCelp8EncWaitForOutput); - cellCelp8Enc.AddFunc(0x48c5020d, cellCelp8EncGetAu); + REG_FUNC(cellCelp8Enc, cellCelp8EncQueryAttr); + REG_FUNC(cellCelp8Enc, cellCelp8EncOpen); + REG_FUNC(cellCelp8Enc, cellCelp8EncOpenEx); + REG_FUNC(cellCelp8Enc, cellCelp8EncClose); + REG_FUNC(cellCelp8Enc, cellCelp8EncStart); + REG_FUNC(cellCelp8Enc, cellCelp8EncEnd); + REG_FUNC(cellCelp8Enc, cellCelp8EncEncodeFrame); + REG_FUNC(cellCelp8Enc, cellCelp8EncWaitForOutput); + REG_FUNC(cellCelp8Enc, cellCelp8EncGetAu); } #endif diff --git a/rpcs3/Emu/SysCalls/Modules/cellCelpEnc.cpp b/rpcs3/Emu/SysCalls/Modules/cellCelpEnc.cpp index 03be6b4957..9ee9c60953 100644 --- a/rpcs3/Emu/SysCalls/Modules/cellCelpEnc.cpp +++ b/rpcs3/Emu/SysCalls/Modules/cellCelpEnc.cpp @@ -71,14 +71,14 @@ int cellCelpEncGetAu() void cellCelpEnc_init() { - cellCelpEnc.AddFunc(0x6b148570, cellCelpEncQueryAttr); - cellCelpEnc.AddFunc(0x77b3b29a, cellCelpEncOpen); - cellCelpEnc.AddFunc(0x9eb084db, cellCelpEncOpenEx); - cellCelpEnc.AddFunc(0x15ec0cca, cellCelpEncClose); - cellCelpEnc.AddFunc(0x55dc23de, cellCelpEncStart); - cellCelpEnc.AddFunc(0xf2b85dff, cellCelpEncEnd); - cellCelpEnc.AddFunc(0x81fe030c, cellCelpEncEncodeFrame); - cellCelpEnc.AddFunc(0x9b244272, cellCelpEncWaitForOutput); - cellCelpEnc.AddFunc(0x3773692f, cellCelpEncGetAu); + REG_FUNC(cellCelpEnc, cellCelpEncQueryAttr); + REG_FUNC(cellCelpEnc, cellCelpEncOpen); + REG_FUNC(cellCelpEnc, cellCelpEncOpenEx); + REG_FUNC(cellCelpEnc, cellCelpEncClose); + REG_FUNC(cellCelpEnc, cellCelpEncStart); + REG_FUNC(cellCelpEnc, cellCelpEncEnd); + REG_FUNC(cellCelpEnc, cellCelpEncEncodeFrame); + REG_FUNC(cellCelpEnc, cellCelpEncWaitForOutput); + REG_FUNC(cellCelpEnc, cellCelpEncGetAu); } #endif diff --git a/rpcs3/Emu/SysCalls/Modules/cellDmux.cpp b/rpcs3/Emu/SysCalls/Modules/cellDmux.cpp index 4e3e7e610a..5e5ebd4be6 100644 --- a/rpcs3/Emu/SysCalls/Modules/cellDmux.cpp +++ b/rpcs3/Emu/SysCalls/Modules/cellDmux.cpp @@ -1170,24 +1170,24 @@ int cellDmuxFlushEs(u32 esHandle) Module cellDmux("cellDmux", []() { - cellDmux.AddFunc(0xa2d4189b, cellDmuxQueryAttr); - cellDmux.AddFunc(0x3f76e3cd, cellDmuxQueryAttr2); - cellDmux.AddFunc(0x68492de9, cellDmuxOpen); - cellDmux.AddFunc(0xf6c23560, cellDmuxOpenEx); - cellDmux.AddFunc(0x11bc3a6c, cellDmuxOpen2); - cellDmux.AddFunc(0x8c692521, cellDmuxClose); - cellDmux.AddFunc(0x04e7499f, cellDmuxSetStream); - cellDmux.AddFunc(0x5d345de9, cellDmuxResetStream); - cellDmux.AddFunc(0xccff1284, cellDmuxResetStreamAndWaitDone); - cellDmux.AddFunc(0x02170d1a, cellDmuxQueryEsAttr); - cellDmux.AddFunc(0x52911bcf, cellDmuxQueryEsAttr2); - cellDmux.AddFunc(0x7b56dc3f, cellDmuxEnableEs); - cellDmux.AddFunc(0x05371c8d, cellDmuxDisableEs); - cellDmux.AddFunc(0x21d424f0, cellDmuxResetEs); - cellDmux.AddFunc(0x42c716b5, cellDmuxGetAu); - cellDmux.AddFunc(0x2750c5e0, cellDmuxPeekAu); - cellDmux.AddFunc(0x2c9a5857, cellDmuxGetAuEx); - cellDmux.AddFunc(0x002e8da2, cellDmuxPeekAuEx); - cellDmux.AddFunc(0x24ea6474, cellDmuxReleaseAu); - cellDmux.AddFunc(0xebb3b2bd, cellDmuxFlushEs); + REG_FUNC(cellDmux, cellDmuxQueryAttr); + REG_FUNC(cellDmux, cellDmuxQueryAttr2); + REG_FUNC(cellDmux, cellDmuxOpen); + REG_FUNC(cellDmux, cellDmuxOpenEx); + REG_FUNC(cellDmux, cellDmuxOpen2); + REG_FUNC(cellDmux, cellDmuxClose); + REG_FUNC(cellDmux, cellDmuxSetStream); + REG_FUNC(cellDmux, cellDmuxResetStream); + REG_FUNC(cellDmux, cellDmuxResetStreamAndWaitDone); + REG_FUNC(cellDmux, cellDmuxQueryEsAttr); + REG_FUNC(cellDmux, cellDmuxQueryEsAttr2); + REG_FUNC(cellDmux, cellDmuxEnableEs); + REG_FUNC(cellDmux, cellDmuxDisableEs); + REG_FUNC(cellDmux, cellDmuxResetEs); + REG_FUNC(cellDmux, cellDmuxGetAu); + REG_FUNC(cellDmux, cellDmuxPeekAu); + REG_FUNC(cellDmux, cellDmuxGetAuEx); + REG_FUNC(cellDmux, cellDmuxPeekAuEx); + REG_FUNC(cellDmux, cellDmuxReleaseAu); + REG_FUNC(cellDmux, cellDmuxFlushEs); }); diff --git a/rpcs3/Emu/SysCalls/Modules/cellFiber.cpp b/rpcs3/Emu/SysCalls/Modules/cellFiber.cpp index e2d6f2d0b2..632f4b56aa 100644 --- a/rpcs3/Emu/SysCalls/Modules/cellFiber.cpp +++ b/rpcs3/Emu/SysCalls/Modules/cellFiber.cpp @@ -293,57 +293,57 @@ int cellFiberPpuUtilWorkerControlInitializeWithAttribute() Module cellFiber("cellFiber", []() { - cellFiber.AddFunc(0x55870804, _cellFiberPpuInitialize); + REG_FUNC(cellFiber, _cellFiberPpuInitialize); - cellFiber.AddFunc(0x9e25c72d, _cellFiberPpuSchedulerAttributeInitialize); - cellFiber.AddFunc(0xee3b604d, cellFiberPpuInitializeScheduler); - cellFiber.AddFunc(0x8b6baa01, cellFiberPpuFinalizeScheduler); - cellFiber.AddFunc(0x12b1acf0, cellFiberPpuRunFibers); - cellFiber.AddFunc(0xf6c6900c, cellFiberPpuCheckFlags); - cellFiber.AddFunc(0xe492a675, cellFiberPpuHasRunnableFiber); + REG_FUNC(cellFiber, _cellFiberPpuSchedulerAttributeInitialize); + REG_FUNC(cellFiber, cellFiberPpuInitializeScheduler); + REG_FUNC(cellFiber, cellFiberPpuFinalizeScheduler); + REG_FUNC(cellFiber, cellFiberPpuRunFibers); + REG_FUNC(cellFiber, cellFiberPpuCheckFlags); + REG_FUNC(cellFiber, cellFiberPpuHasRunnableFiber); - cellFiber.AddFunc(0xc11f8056, _cellFiberPpuAttributeInitialize); - cellFiber.AddFunc(0x7c2f4034, cellFiberPpuCreateFiber); - cellFiber.AddFunc(0xfa8d5f95, cellFiberPpuExit); - cellFiber.AddFunc(0x0c44f441, cellFiberPpuYield); - cellFiber.AddFunc(0xa6004249, cellFiberPpuJoinFiber); - cellFiber.AddFunc(0x5d9a7034, cellFiberPpuSelf); - cellFiber.AddFunc(0x8afb8356, cellFiberPpuSendSignal); - cellFiber.AddFunc(0x6c164b3b, cellFiberPpuWaitSignal); - cellFiber.AddFunc(0xa4599cf3, cellFiberPpuWaitFlag); - cellFiber.AddFunc(0xb0594b2d, cellFiberPpuGetScheduler); - cellFiber.AddFunc(0xfbf5fe40, cellFiberPpuSetPriority); - cellFiber.AddFunc(0xf3e81219, cellFiberPpuCheckStackLimit); + REG_FUNC(cellFiber, _cellFiberPpuAttributeInitialize); + REG_FUNC(cellFiber, cellFiberPpuCreateFiber); + REG_FUNC(cellFiber, cellFiberPpuExit); + REG_FUNC(cellFiber, cellFiberPpuYield); + REG_FUNC(cellFiber, cellFiberPpuJoinFiber); + REG_FUNC(cellFiber, cellFiberPpuSelf); + REG_FUNC(cellFiber, cellFiberPpuSendSignal); + REG_FUNC(cellFiber, cellFiberPpuWaitSignal); + REG_FUNC(cellFiber, cellFiberPpuWaitFlag); + REG_FUNC(cellFiber, cellFiberPpuGetScheduler); + REG_FUNC(cellFiber, cellFiberPpuSetPriority); + REG_FUNC(cellFiber, cellFiberPpuCheckStackLimit); - cellFiber.AddFunc(0x31252ec3, _cellFiberPpuContextAttributeInitialize); - cellFiber.AddFunc(0x72086315, cellFiberPpuContextInitialize); - cellFiber.AddFunc(0xb3a48079, cellFiberPpuContextFinalize); - cellFiber.AddFunc(0xaba1c563, cellFiberPpuContextRun); - cellFiber.AddFunc(0xd0066b17, cellFiberPpuContextSwitch); - cellFiber.AddFunc(0x34a81091, cellFiberPpuContextSelf); - cellFiber.AddFunc(0x01036193, cellFiberPpuContextReturnToThread); - cellFiber.AddFunc(0xb90c871b, cellFiberPpuContextCheckStackLimit); + REG_FUNC(cellFiber, _cellFiberPpuContextAttributeInitialize); + REG_FUNC(cellFiber, cellFiberPpuContextInitialize); + REG_FUNC(cellFiber, cellFiberPpuContextFinalize); + REG_FUNC(cellFiber, cellFiberPpuContextRun); + REG_FUNC(cellFiber, cellFiberPpuContextSwitch); + REG_FUNC(cellFiber, cellFiberPpuContextSelf); + REG_FUNC(cellFiber, cellFiberPpuContextReturnToThread); + REG_FUNC(cellFiber, cellFiberPpuContextCheckStackLimit); - cellFiber.AddFunc(0x081c98be, cellFiberPpuContextRunScheduler); - cellFiber.AddFunc(0x0a25b6c8, cellFiberPpuContextEnterScheduler); + REG_FUNC(cellFiber, cellFiberPpuContextRunScheduler); + REG_FUNC(cellFiber, cellFiberPpuContextEnterScheduler); - cellFiber.AddFunc(0xbf9cd933, cellFiberPpuSchedulerTraceInitialize); - cellFiber.AddFunc(0x3860a12a, cellFiberPpuSchedulerTraceFinalize); - cellFiber.AddFunc(0xadedbebf, cellFiberPpuSchedulerTraceStart); - cellFiber.AddFunc(0xe665f9a9, cellFiberPpuSchedulerTraceStop); + REG_FUNC(cellFiber, cellFiberPpuSchedulerTraceInitialize); + REG_FUNC(cellFiber, cellFiberPpuSchedulerTraceFinalize); + REG_FUNC(cellFiber, cellFiberPpuSchedulerTraceStart); + REG_FUNC(cellFiber, cellFiberPpuSchedulerTraceStop); - cellFiber.AddFunc(0x68ba4568, _cellFiberPpuUtilWorkerControlAttributeInitialize); - cellFiber.AddFunc(0x1e7a247a, cellFiberPpuUtilWorkerControlRunFibers); - cellFiber.AddFunc(0x3204b146, cellFiberPpuUtilWorkerControlInitialize); - cellFiber.AddFunc(0x392c5aa5, cellFiberPpuUtilWorkerControlSetPollingMode); - cellFiber.AddFunc(0x3b417f82, cellFiberPpuUtilWorkerControlJoinFiber); - cellFiber.AddFunc(0x4fc86b2c, cellFiberPpuUtilWorkerControlDisconnectEventQueue); - cellFiber.AddFunc(0x5d3992dd, cellFiberPpuUtilWorkerControlSendSignal); - cellFiber.AddFunc(0x62a20f0d, cellFiberPpuUtilWorkerControlConnectEventQueueToSpurs); - cellFiber.AddFunc(0xa27c95ca, cellFiberPpuUtilWorkerControlFinalize); - cellFiber.AddFunc(0xbabf714b, cellFiberPpuUtilWorkerControlWakeup); - cellFiber.AddFunc(0xbfca88d3, cellFiberPpuUtilWorkerControlCreateFiber); - cellFiber.AddFunc(0xc04e2438, cellFiberPpuUtilWorkerControlShutdown); - cellFiber.AddFunc(0xea6dc1ad, cellFiberPpuUtilWorkerControlCheckFlags); - cellFiber.AddFunc(0xf2ccad4f, cellFiberPpuUtilWorkerControlInitializeWithAttribute); + REG_FUNC(cellFiber, _cellFiberPpuUtilWorkerControlAttributeInitialize); + REG_FUNC(cellFiber, cellFiberPpuUtilWorkerControlRunFibers); + REG_FUNC(cellFiber, cellFiberPpuUtilWorkerControlInitialize); + REG_FUNC(cellFiber, cellFiberPpuUtilWorkerControlSetPollingMode); + REG_FUNC(cellFiber, cellFiberPpuUtilWorkerControlJoinFiber); + REG_FUNC(cellFiber, cellFiberPpuUtilWorkerControlDisconnectEventQueue); + REG_FUNC(cellFiber, cellFiberPpuUtilWorkerControlSendSignal); + REG_FUNC(cellFiber, cellFiberPpuUtilWorkerControlConnectEventQueueToSpurs); + REG_FUNC(cellFiber, cellFiberPpuUtilWorkerControlFinalize); + REG_FUNC(cellFiber, cellFiberPpuUtilWorkerControlWakeup); + REG_FUNC(cellFiber, cellFiberPpuUtilWorkerControlCreateFiber); + REG_FUNC(cellFiber, cellFiberPpuUtilWorkerControlShutdown); + REG_FUNC(cellFiber, cellFiberPpuUtilWorkerControlCheckFlags); + REG_FUNC(cellFiber, cellFiberPpuUtilWorkerControlInitializeWithAttribute); }); diff --git a/rpcs3/Emu/SysCalls/Modules/cellFont.cpp b/rpcs3/Emu/SysCalls/Modules/cellFont.cpp index 7831a68fed..6e58293669 100644 --- a/rpcs3/Emu/SysCalls/Modules/cellFont.cpp +++ b/rpcs3/Emu/SysCalls/Modules/cellFont.cpp @@ -588,54 +588,54 @@ Module cellFont("cellFont", []() delete s_fontInternalInstance; }; - cellFont.AddFunc(0x25c107e6, cellFontInit); - cellFont.AddFunc(0x6bf6f832, cellFontSetFontsetOpenMode); - cellFont.AddFunc(0x6cfada83, cellFontSetFontOpenMode); - cellFont.AddFunc(0x042e74e3, cellFontCreateRenderer); - cellFont.AddFunc(0x1387c45c, cellFontGetHorizontalLayout); - cellFont.AddFunc(0x21ebb248, cellFontDestroyRenderer); - cellFont.AddFunc(0x227e1e3c, cellFontSetupRenderScalePixel); - cellFont.AddFunc(0x29329541, cellFontOpenFontInstance); - cellFont.AddFunc(0x297f0e93, cellFontSetScalePixel); - cellFont.AddFunc(0x2da9fd9d, cellFontGetRenderCharGlyphMetrics); - cellFont.AddFunc(0x40d40544, cellFontEndLibrary); - cellFont.AddFunc(0x66a23100, cellFontBindRenderer); - cellFont.AddFunc(0x7ab47f7e, cellFontEnd); - cellFont.AddFunc(0x8657c8f5, cellFontSetEffectSlant); - cellFont.AddFunc(0xe16e679a, cellFontGetEffectSlant); - cellFont.AddFunc(0x88be4799, cellFontRenderCharGlyphImage); - cellFont.AddFunc(0x90b9465e, cellFontRenderSurfaceInit); - cellFont.AddFunc(0x98ac5524, cellFontGetFontIdCode); - cellFont.AddFunc(0xa885cc9b, cellFontOpenFontset); - cellFont.AddFunc(0xb276f1f6, cellFontCloseFont); - cellFont.AddFunc(0xb422b005, cellFontRenderSurfaceSetScissor); - cellFont.AddFunc(0xd8eaee9f, cellFontGetCharGlyphMetrics); - cellFont.AddFunc(0xf03dcc29, cellFontInitializeWithRevision); - cellFont.AddFunc(0x061049ad, cellFontGraphicsSetFontRGBA); - cellFont.AddFunc(0x073fa321, cellFontOpenFontsetOnMemory); - cellFont.AddFunc(0x0a7306a4, cellFontOpenFontFile); - cellFont.AddFunc(0x16322df1, cellFontGraphicsSetScalePixel); - cellFont.AddFunc(0x2388186c, cellFontGraphicsGetScalePixel); - cellFont.AddFunc(0x25253fe4, cellFontSetEffectWeight); - cellFont.AddFunc(0x53f529fe, cellFontGlyphSetupVertexesGlyph); - cellFont.AddFunc(0x698897f8, cellFontGetVerticalLayout); - cellFont.AddFunc(0x700e6223, cellFontGetRenderCharGlyphMetricsVertical); - cellFont.AddFunc(0x70f3e728, cellFontSetScalePoint); - cellFont.AddFunc(0x78d05e08, cellFontSetupRenderEffectSlant); - cellFont.AddFunc(0x7c83bc15, cellFontGraphicsSetLineRGBA); - cellFont.AddFunc(0x87bd650f, cellFontGraphicsSetDrawType); - cellFont.AddFunc(0x8a35c887, cellFontEndGraphics); - cellFont.AddFunc(0x970d4c22, cellFontGraphicsSetupDrawContext); - cellFont.AddFunc(0x9e19072b, cellFontOpenFontMemory); - cellFont.AddFunc(0xa6dc25d1, cellFontSetupRenderEffectWeight); - cellFont.AddFunc(0xa8fae920, cellFontGlyphGetOutlineControlDistance); - cellFont.AddFunc(0xb4d112af, cellFontGlyphGetVertexesGlyphSize); - cellFont.AddFunc(0xc17259de, cellFontGenerateCharGlyph); - cellFont.AddFunc(0xd62f5d76, cellFontDeleteGlyph); - cellFont.AddFunc(0xdee0836c, cellFontExtend); - cellFont.AddFunc(0xe857a0ca, cellFontRenderCharGlyphImageVertical); - cellFont.AddFunc(0xfb3341ba, cellFontSetResolutionDpi); - cellFont.AddFunc(0xfe9a6dd7, cellFontGetCharGlyphMetricsVertical); - cellFont.AddFunc(0xf16379fa, cellFontUnbindRenderer); - cellFont.AddFunc(0xb015a84e, cellFontGetRevisionFlags); + REG_FUNC(cellFont, cellFontInit); + REG_FUNC(cellFont, cellFontSetFontsetOpenMode); + REG_FUNC(cellFont, cellFontSetFontOpenMode); + REG_FUNC(cellFont, cellFontCreateRenderer); + REG_FUNC(cellFont, cellFontGetHorizontalLayout); + REG_FUNC(cellFont, cellFontDestroyRenderer); + REG_FUNC(cellFont, cellFontSetupRenderScalePixel); + REG_FUNC(cellFont, cellFontOpenFontInstance); + REG_FUNC(cellFont, cellFontSetScalePixel); + REG_FUNC(cellFont, cellFontGetRenderCharGlyphMetrics); + REG_FUNC(cellFont, cellFontEndLibrary); + REG_FUNC(cellFont, cellFontBindRenderer); + REG_FUNC(cellFont, cellFontEnd); + REG_FUNC(cellFont, cellFontSetEffectSlant); + REG_FUNC(cellFont, cellFontGetEffectSlant); + REG_FUNC(cellFont, cellFontRenderCharGlyphImage); + REG_FUNC(cellFont, cellFontRenderSurfaceInit); + REG_FUNC(cellFont, cellFontGetFontIdCode); + REG_FUNC(cellFont, cellFontOpenFontset); + REG_FUNC(cellFont, cellFontCloseFont); + REG_FUNC(cellFont, cellFontRenderSurfaceSetScissor); + REG_FUNC(cellFont, cellFontGetCharGlyphMetrics); + REG_FUNC(cellFont, cellFontInitializeWithRevision); + REG_FUNC(cellFont, cellFontGraphicsSetFontRGBA); + REG_FUNC(cellFont, cellFontOpenFontsetOnMemory); + REG_FUNC(cellFont, cellFontOpenFontFile); + REG_FUNC(cellFont, cellFontGraphicsSetScalePixel); + REG_FUNC(cellFont, cellFontGraphicsGetScalePixel); + REG_FUNC(cellFont, cellFontSetEffectWeight); + REG_FUNC(cellFont, cellFontGlyphSetupVertexesGlyph); + REG_FUNC(cellFont, cellFontGetVerticalLayout); + REG_FUNC(cellFont, cellFontGetRenderCharGlyphMetricsVertical); + REG_FUNC(cellFont, cellFontSetScalePoint); + REG_FUNC(cellFont, cellFontSetupRenderEffectSlant); + REG_FUNC(cellFont, cellFontGraphicsSetLineRGBA); + REG_FUNC(cellFont, cellFontGraphicsSetDrawType); + REG_FUNC(cellFont, cellFontEndGraphics); + REG_FUNC(cellFont, cellFontGraphicsSetupDrawContext); + REG_FUNC(cellFont, cellFontOpenFontMemory); + REG_FUNC(cellFont, cellFontSetupRenderEffectWeight); + REG_FUNC(cellFont, cellFontGlyphGetOutlineControlDistance); + REG_FUNC(cellFont, cellFontGlyphGetVertexesGlyphSize); + REG_FUNC(cellFont, cellFontGenerateCharGlyph); + REG_FUNC(cellFont, cellFontDeleteGlyph); + REG_FUNC(cellFont, cellFontExtend); + REG_FUNC(cellFont, cellFontRenderCharGlyphImageVertical); + REG_FUNC(cellFont, cellFontSetResolutionDpi); + REG_FUNC(cellFont, cellFontGetCharGlyphMetricsVertical); + REG_FUNC(cellFont, cellFontUnbindRenderer); + REG_FUNC(cellFont, cellFontGetRevisionFlags); }); diff --git a/rpcs3/Emu/SysCalls/Modules/cellFontFT.cpp b/rpcs3/Emu/SysCalls/Modules/cellFontFT.cpp index 155b147e51..3234b40621 100644 --- a/rpcs3/Emu/SysCalls/Modules/cellFontFT.cpp +++ b/rpcs3/Emu/SysCalls/Modules/cellFontFT.cpp @@ -43,7 +43,7 @@ Module cellFontFT("cellFontFT", []() delete s_fontFtInternalInstance; }; - cellFontFT.AddFunc(0x7a0a83c4, cellFontInitLibraryFreeTypeWithRevision); - cellFontFT.AddFunc(0xec89a187, cellFontFTGetRevisionFlags); - cellFontFT.AddFunc(0xfa0c2de0, cellFontFTGetInitializedRevisionFlags); + REG_FUNC(cellFontFT, cellFontInitLibraryFreeTypeWithRevision); + REG_FUNC(cellFontFT, cellFontFTGetRevisionFlags); + REG_FUNC(cellFontFT, cellFontFTGetInitializedRevisionFlags); }); diff --git a/rpcs3/Emu/SysCalls/Modules/cellGame.cpp b/rpcs3/Emu/SysCalls/Modules/cellGame.cpp index 6edc187340..76531de0cc 100644 --- a/rpcs3/Emu/SysCalls/Modules/cellGame.cpp +++ b/rpcs3/Emu/SysCalls/Modules/cellGame.cpp @@ -495,25 +495,25 @@ Module cellGame("cellGame", []() // (TODO: Disc Exchange functions missing) - cellGame.AddFunc(0xf52639ea, cellGameBootCheck); - cellGame.AddFunc(0xce4374f6, cellGamePatchCheck); - cellGame.AddFunc(0xdb9819f3, cellGameDataCheck); - cellGame.AddFunc(0x70acec67, cellGameContentPermit); + REG_FUNC(cellGame, cellGameBootCheck); + REG_FUNC(cellGame, cellGamePatchCheck); + REG_FUNC(cellGame, cellGameDataCheck); + REG_FUNC(cellGame, cellGameContentPermit); - cellGame.AddFunc(0x42a2e133, cellGameCreateGameData); - cellGame.AddFunc(0xb367c6e3, cellGameDeleteGameData); + REG_FUNC(cellGame, cellGameCreateGameData); + REG_FUNC(cellGame, cellGameDeleteGameData); - cellGame.AddFunc(0xb7a45caf, cellGameGetParamInt); + REG_FUNC(cellGame, cellGameGetParamInt); //cellGame.AddFunc(, cellGameSetParamInt); - cellGame.AddFunc(0x3a5d726a, cellGameGetParamString); - cellGame.AddFunc(0xdaa5cd20, cellGameSetParamString); - cellGame.AddFunc(0xef9d42d5, cellGameGetSizeKB); - cellGame.AddFunc(0x2a8e6b92, cellGameGetDiscContentInfoUpdatePath); - cellGame.AddFunc(0xa80bf223, cellGameGetLocalWebContentPath); + REG_FUNC(cellGame, cellGameGetParamString); + REG_FUNC(cellGame, cellGameSetParamString); + REG_FUNC(cellGame, cellGameGetSizeKB); + REG_FUNC(cellGame, cellGameGetDiscContentInfoUpdatePath); + REG_FUNC(cellGame, cellGameGetLocalWebContentPath); - cellGame.AddFunc(0xb0a1f8c6, cellGameContentErrorDialog); + REG_FUNC(cellGame, cellGameContentErrorDialog); - cellGame.AddFunc(0xd24e3928, cellGameThemeInstall); - cellGame.AddFunc(0x87406734, cellGameThemeInstallFromBuffer); + REG_FUNC(cellGame, cellGameThemeInstall); + REG_FUNC(cellGame, cellGameThemeInstallFromBuffer); //cellGame.AddFunc(, CellGameThemeInstallCallback); }); diff --git a/rpcs3/Emu/SysCalls/Modules/cellGcmSys.cpp b/rpcs3/Emu/SysCalls/Modules/cellGcmSys.cpp index f9f9f3624a..530d8eee2a 100644 --- a/rpcs3/Emu/SysCalls/Modules/cellGcmSys.cpp +++ b/rpcs3/Emu/SysCalls/Modules/cellGcmSys.cpp @@ -1218,23 +1218,23 @@ Module cellGcmSys("cellGcmSys", []() local_addr = 0; // Data Retrieval - cellGcmSys.AddFunc(0xc8f3bd09, cellGcmGetCurrentField); - cellGcmSys.AddFunc(0xf80196c1, cellGcmGetLabelAddress); - cellGcmSys.AddFunc(0x21cee035, cellGcmGetNotifyDataAddress); - cellGcmSys.AddFunc(0x661fe266, _cellGcmFunc12); - cellGcmSys.AddFunc(0x99d397ac, cellGcmGetReport); - cellGcmSys.AddFunc(0x9a0159af, cellGcmGetReportDataAddress); - cellGcmSys.AddFunc(0x8572bce2, cellGcmGetReportDataAddressLocation); - cellGcmSys.AddFunc(0xa6b180ac, cellGcmGetReportDataLocation); - cellGcmSys.AddFunc(0x5a41c10f, cellGcmGetTimeStamp); - cellGcmSys.AddFunc(0x2ad4951b, cellGcmGetTimeStampLocation); + REG_FUNC(cellGcmSys, cellGcmGetCurrentField); + REG_FUNC(cellGcmSys, cellGcmGetLabelAddress); + REG_FUNC(cellGcmSys, cellGcmGetNotifyDataAddress); + REG_FUNC(cellGcmSys, _cellGcmFunc12); + REG_FUNC(cellGcmSys, cellGcmGetReport); + REG_FUNC(cellGcmSys, cellGcmGetReportDataAddress); + REG_FUNC(cellGcmSys, cellGcmGetReportDataAddressLocation); + REG_FUNC(cellGcmSys, cellGcmGetReportDataLocation); + REG_FUNC(cellGcmSys, cellGcmGetTimeStamp); + REG_FUNC(cellGcmSys, cellGcmGetTimeStampLocation); // Command Buffer Control - cellGcmSys.AddFunc(0xa547adde, cellGcmGetControlRegister); - cellGcmSys.AddFunc(0x5e2ee0f0, cellGcmGetDefaultCommandWordSize); - cellGcmSys.AddFunc(0x8cdf8c70, cellGcmGetDefaultSegmentWordSize); - cellGcmSys.AddFunc(0xcaabd992, cellGcmInitDefaultFifoMode); - cellGcmSys.AddFunc(0x9ba451e4, cellGcmSetDefaultFifoSize); + REG_FUNC(cellGcmSys, cellGcmGetControlRegister); + REG_FUNC(cellGcmSys, cellGcmGetDefaultCommandWordSize); + REG_FUNC(cellGcmSys, cellGcmGetDefaultSegmentWordSize); + REG_FUNC(cellGcmSys, cellGcmInitDefaultFifoMode); + REG_FUNC(cellGcmSys, cellGcmSetDefaultFifoSize); //cellGcmSys.AddFunc(, cellGcmReserveMethodSize); //cellGcmSys.AddFunc(, cellGcmResetDefaultCommandBuffer); //cellGcmSys.AddFunc(, cellGcmSetupContextData); @@ -1243,80 +1243,80 @@ Module cellGcmSys("cellGcmSys", []() //cellGcmSys.AddFunc(, cellGcmFlush); // Hardware Resource Management - cellGcmSys.AddFunc(0x4524cccd, cellGcmBindTile); - cellGcmSys.AddFunc(0x9dc04436, cellGcmBindZcull); - cellGcmSys.AddFunc(0x1f61b3ff, cellGcmDumpGraphicsError); - cellGcmSys.AddFunc(0xe315a0b2, cellGcmGetConfiguration); - cellGcmSys.AddFunc(0x371674cf, cellGcmGetDisplayBufferByFlipIndex); - cellGcmSys.AddFunc(0x72a577ce, cellGcmGetFlipStatus); - cellGcmSys.AddFunc(0x63387071, cellGcmGetLastFlipTime); - cellGcmSys.AddFunc(0x23ae55a3, cellGcmGetLastSecondVTime); - cellGcmSys.AddFunc(0x055bd74d, cellGcmGetTiledPitchSize); - cellGcmSys.AddFunc(0x723bbc7e, cellGcmGetVBlankCount); - cellGcmSys.AddFunc(0x5f909b17, _cellGcmFunc1); - cellGcmSys.AddFunc(0x3a33c1fd, _cellGcmFunc15); - cellGcmSys.AddFunc(0x15bae46b, _cellGcmInitBody); - cellGcmSys.AddFunc(0xfce9e764, cellGcmInitSystemMode); - cellGcmSys.AddFunc(0xb2e761d4, cellGcmResetFlipStatus); - cellGcmSys.AddFunc(0x51c9d62b, cellGcmSetDebugOutputLevel); - cellGcmSys.AddFunc(0xa53d12ae, cellGcmSetDisplayBuffer); - cellGcmSys.AddFunc(0xdc09357e, cellGcmSetFlip); - cellGcmSys.AddFunc(0xa41ef7e8, cellGcmSetFlipHandler); - cellGcmSys.AddFunc(0xacee8542, cellGcmSetFlipImmediate); - cellGcmSys.AddFunc(0x4ae8d215, cellGcmSetFlipMode); - cellGcmSys.AddFunc(0xa47c09ff, cellGcmSetFlipStatus); - cellGcmSys.AddFunc(0xd01b570d, cellGcmSetGraphicsHandler); - cellGcmSys.AddFunc(0x0b4b62d5, cellGcmSetPrepareFlip); - cellGcmSys.AddFunc(0x0a862772, cellGcmSetQueueHandler); - cellGcmSys.AddFunc(0x4d7ce993, cellGcmSetSecondVFrequency); - cellGcmSys.AddFunc(0xdc494430, cellGcmSetSecondVHandler); - cellGcmSys.AddFunc(0xbd100dbc, cellGcmSetTileInfo); - cellGcmSys.AddFunc(0x06edea9e, cellGcmSetUserHandler); - cellGcmSys.AddFunc(0xffe0160e, cellGcmSetVBlankFrequency); - cellGcmSys.AddFunc(0xa91b0402, cellGcmSetVBlankHandler); - cellGcmSys.AddFunc(0x983fb9aa, cellGcmSetWaitFlip); - cellGcmSys.AddFunc(0xd34a420d, cellGcmSetZcull); - cellGcmSys.AddFunc(0x25b40ab4, cellGcmSortRemapEaIoAddress); - cellGcmSys.AddFunc(0xd9b7653e, cellGcmUnbindTile); - cellGcmSys.AddFunc(0xa75640e8, cellGcmUnbindZcull); - cellGcmSys.AddFunc(0x657571f7, cellGcmGetTileInfo); - cellGcmSys.AddFunc(0xd9a0a879, cellGcmGetZcullInfo); - cellGcmSys.AddFunc(0x0e6b0dae, cellGcmGetDisplayInfo); - cellGcmSys.AddFunc(0x93806525, cellGcmGetCurrentDisplayBufferId); - cellGcmSys.AddFunc(0xbd6d60d9, cellGcmSetInvalidateTile); + REG_FUNC(cellGcmSys, cellGcmBindTile); + REG_FUNC(cellGcmSys, cellGcmBindZcull); + REG_FUNC(cellGcmSys, cellGcmDumpGraphicsError); + REG_FUNC(cellGcmSys, cellGcmGetConfiguration); + REG_FUNC(cellGcmSys, cellGcmGetDisplayBufferByFlipIndex); + REG_FUNC(cellGcmSys, cellGcmGetFlipStatus); + REG_FUNC(cellGcmSys, cellGcmGetLastFlipTime); + REG_FUNC(cellGcmSys, cellGcmGetLastSecondVTime); + REG_FUNC(cellGcmSys, cellGcmGetTiledPitchSize); + REG_FUNC(cellGcmSys, cellGcmGetVBlankCount); + REG_FUNC(cellGcmSys, _cellGcmFunc1); + REG_FUNC(cellGcmSys, _cellGcmFunc15); + REG_FUNC(cellGcmSys, _cellGcmInitBody); + REG_FUNC(cellGcmSys, cellGcmInitSystemMode); + REG_FUNC(cellGcmSys, cellGcmResetFlipStatus); + REG_FUNC(cellGcmSys, cellGcmSetDebugOutputLevel); + REG_FUNC(cellGcmSys, cellGcmSetDisplayBuffer); + REG_FUNC(cellGcmSys, cellGcmSetFlip); + REG_FUNC(cellGcmSys, cellGcmSetFlipHandler); + REG_FUNC(cellGcmSys, cellGcmSetFlipImmediate); + REG_FUNC(cellGcmSys, cellGcmSetFlipMode); + REG_FUNC(cellGcmSys, cellGcmSetFlipStatus); + REG_FUNC(cellGcmSys, cellGcmSetGraphicsHandler); + REG_FUNC(cellGcmSys, cellGcmSetPrepareFlip); + REG_FUNC(cellGcmSys, cellGcmSetQueueHandler); + REG_FUNC(cellGcmSys, cellGcmSetSecondVFrequency); + REG_FUNC(cellGcmSys, cellGcmSetSecondVHandler); + REG_FUNC(cellGcmSys, cellGcmSetTileInfo); + REG_FUNC(cellGcmSys, cellGcmSetUserHandler); + REG_FUNC(cellGcmSys, cellGcmSetVBlankFrequency); + REG_FUNC(cellGcmSys, cellGcmSetVBlankHandler); + REG_FUNC(cellGcmSys, cellGcmSetWaitFlip); + REG_FUNC(cellGcmSys, cellGcmSetZcull); + REG_FUNC(cellGcmSys, cellGcmSortRemapEaIoAddress); + REG_FUNC(cellGcmSys, cellGcmUnbindTile); + REG_FUNC(cellGcmSys, cellGcmUnbindZcull); + REG_FUNC(cellGcmSys, cellGcmGetTileInfo); + REG_FUNC(cellGcmSys, cellGcmGetZcullInfo); + REG_FUNC(cellGcmSys, cellGcmGetDisplayInfo); + REG_FUNC(cellGcmSys, cellGcmGetCurrentDisplayBufferId); + REG_FUNC(cellGcmSys, cellGcmSetInvalidateTile); //cellGcmSys.AddFunc(, cellGcmSetFlipWithWaitLabel); // Memory Mapping - cellGcmSys.AddFunc(0x21ac3697, cellGcmAddressToOffset); - cellGcmSys.AddFunc(0xfb81c03e, cellGcmGetMaxIoMapSize); - cellGcmSys.AddFunc(0x2922aed0, cellGcmGetOffsetTable); - cellGcmSys.AddFunc(0x2a6fba9c, cellGcmIoOffsetToAddress); - cellGcmSys.AddFunc(0x63441cb4, cellGcmMapEaIoAddress); - cellGcmSys.AddFunc(0x626e8518, cellGcmMapEaIoAddressWithFlags); - cellGcmSys.AddFunc(0xdb769b32, cellGcmMapLocalMemory); - cellGcmSys.AddFunc(0xa114ec67, cellGcmMapMainMemory); - cellGcmSys.AddFunc(0xa7ede268, cellGcmReserveIoMapSize); - cellGcmSys.AddFunc(0xefd00f54, cellGcmUnmapEaIoAddress); - cellGcmSys.AddFunc(0xdb23e867, cellGcmUnmapIoAddress); - cellGcmSys.AddFunc(0x3b9bd5bd, cellGcmUnreserveIoMapSize); + REG_FUNC(cellGcmSys, cellGcmAddressToOffset); + REG_FUNC(cellGcmSys, cellGcmGetMaxIoMapSize); + REG_FUNC(cellGcmSys, cellGcmGetOffsetTable); + REG_FUNC(cellGcmSys, cellGcmIoOffsetToAddress); + REG_FUNC(cellGcmSys, cellGcmMapEaIoAddress); + REG_FUNC(cellGcmSys, cellGcmMapEaIoAddressWithFlags); + REG_FUNC(cellGcmSys, cellGcmMapLocalMemory); + REG_FUNC(cellGcmSys, cellGcmMapMainMemory); + REG_FUNC(cellGcmSys, cellGcmReserveIoMapSize); + REG_FUNC(cellGcmSys, cellGcmUnmapEaIoAddress); + REG_FUNC(cellGcmSys, cellGcmUnmapIoAddress); + REG_FUNC(cellGcmSys, cellGcmUnreserveIoMapSize); // Cursor - cellGcmSys.AddFunc(0x107bf3a1, cellGcmInitCursor); - cellGcmSys.AddFunc(0xc47d0812, cellGcmSetCursorEnable); - cellGcmSys.AddFunc(0x69c6cc82, cellGcmSetCursorDisable); - cellGcmSys.AddFunc(0xf9bfdc72, cellGcmSetCursorImageOffset); - cellGcmSys.AddFunc(0x1a0de550, cellGcmSetCursorPosition); - cellGcmSys.AddFunc(0xbd2fa0a7, cellGcmUpdateCursor); + REG_FUNC(cellGcmSys, cellGcmInitCursor); + REG_FUNC(cellGcmSys, cellGcmSetCursorEnable); + REG_FUNC(cellGcmSys, cellGcmSetCursorDisable); + REG_FUNC(cellGcmSys, cellGcmSetCursorImageOffset); + REG_FUNC(cellGcmSys, cellGcmSetCursorPosition); + REG_FUNC(cellGcmSys, cellGcmUpdateCursor); // Functions for Maintaining Compatibility - cellGcmSys.AddFunc(0xbc982946, cellGcmSetDefaultCommandBuffer); + REG_FUNC(cellGcmSys, cellGcmSetDefaultCommandBuffer); //cellGcmSys.AddFunc(, cellGcmGetCurrentBuffer); //cellGcmSys.AddFunc(, cellGcmSetCurrentBuffer); //cellGcmSys.AddFunc(, cellGcmSetDefaultCommandBufferAndSegmentWordSize); //cellGcmSys.AddFunc(, cellGcmSetUserCallback); // Other - cellGcmSys.AddFunc(0x21397818, cellGcmSetFlipCommand); - cellGcmSys.AddFunc(0xd8f88e1a, cellGcmSetFlipCommandWithWaitLabel); - cellGcmSys.AddFunc(0xd0b1d189, cellGcmSetTile); + REG_FUNC(cellGcmSys, cellGcmSetFlipCommand); + REG_FUNC(cellGcmSys, cellGcmSetFlipCommandWithWaitLabel); + REG_FUNC(cellGcmSys, cellGcmSetTile); }); diff --git a/rpcs3/Emu/SysCalls/Modules/cellGem.cpp b/rpcs3/Emu/SysCalls/Modules/cellGem.cpp index f3245d54cf..22ce3c49c5 100644 --- a/rpcs3/Emu/SysCalls/Modules/cellGem.cpp +++ b/rpcs3/Emu/SysCalls/Modules/cellGem.cpp @@ -390,44 +390,44 @@ void cellGem_unload() Module cellGem("cellGem", []() { //cellGem.AddFunc(, cellGemAttributeInit); - cellGem.AddFunc(0xafa99ead, cellGemCalibrate); - cellGem.AddFunc(0x9b9714a4, cellGemClearStatusFlags); - cellGem.AddFunc(0x1a13d010, cellGemConvertVideoFinish); - cellGem.AddFunc(0x6dce048c, cellGemConvertVideoStart); - cellGem.AddFunc(0x4219de31, cellGemEnableCameraPitchAngleCorrection); - cellGem.AddFunc(0x1a2518a2, cellGemEnableMagnetometer); - cellGem.AddFunc(0xe1f85a80, cellGemEnd); - cellGem.AddFunc(0x6fc4c791, cellGemFilterState); - cellGem.AddFunc(0xce6d7791, cellGemForceRGB); - cellGem.AddFunc(0x6a5b7048, cellGemGetAccelerometerPositionInDevice); - cellGem.AddFunc(0x2d2c2764, cellGemGetAllTrackableHues); - cellGem.AddFunc(0x8befac67, cellGemGetCameraState); - cellGem.AddFunc(0x02eb41bb, cellGemGetEnvironmentLightingColor); - cellGem.AddFunc(0xb8ef56a6, cellGemGetHuePixels); - cellGem.AddFunc(0x92cc4b34, cellGemGetImageState); - cellGem.AddFunc(0xd37b127a, cellGemGetInertialState); - cellGem.AddFunc(0x9e1dff96, cellGemGetInfo); - cellGem.AddFunc(0x2e0a170d, cellGemGetMemorySize); - cellGem.AddFunc(0x1b30cc22, cellGemGetRGB); - cellGem.AddFunc(0x6db6b007, cellGemGetRumble); - cellGem.AddFunc(0x6441d38d, cellGemGetState); - cellGem.AddFunc(0xfee33481, cellGemGetStatusFlags); - cellGem.AddFunc(0x18ea899a, cellGemGetTrackerHue); + REG_FUNC(cellGem, cellGemCalibrate); + REG_FUNC(cellGem, cellGemClearStatusFlags); + REG_FUNC(cellGem, cellGemConvertVideoFinish); + REG_FUNC(cellGem, cellGemConvertVideoStart); + REG_FUNC(cellGem, cellGemEnableCameraPitchAngleCorrection); + REG_FUNC(cellGem, cellGemEnableMagnetometer); + REG_FUNC(cellGem, cellGemEnd); + REG_FUNC(cellGem, cellGemFilterState); + REG_FUNC(cellGem, cellGemForceRGB); + REG_FUNC(cellGem, cellGemGetAccelerometerPositionInDevice); + REG_FUNC(cellGem, cellGemGetAllTrackableHues); + REG_FUNC(cellGem, cellGemGetCameraState); + REG_FUNC(cellGem, cellGemGetEnvironmentLightingColor); + REG_FUNC(cellGem, cellGemGetHuePixels); + REG_FUNC(cellGem, cellGemGetImageState); + REG_FUNC(cellGem, cellGemGetInertialState); + REG_FUNC(cellGem, cellGemGetInfo); + REG_FUNC(cellGem, cellGemGetMemorySize); + REG_FUNC(cellGem, cellGemGetRGB); + REG_FUNC(cellGem, cellGemGetRumble); + REG_FUNC(cellGem, cellGemGetState); + REG_FUNC(cellGem, cellGemGetStatusFlags); + REG_FUNC(cellGem, cellGemGetTrackerHue); //cellGem.AddFunc(, cellGemGetVideoConvertSize); - cellGem.AddFunc(0xc7622586, cellGemHSVtoRGB); - cellGem.AddFunc(0x13ea7c64, cellGemInit); - cellGem.AddFunc(0xe3e4f0d6, cellGemInvalidateCalibration); - cellGem.AddFunc(0xfb5887f9, cellGemIsTrackableHue); - cellGem.AddFunc(0xa03ef587, cellGemPrepareCamera); - cellGem.AddFunc(0xc07896f9, cellGemPrepareVideoConvert); + REG_FUNC(cellGem, cellGemHSVtoRGB); + REG_FUNC(cellGem, cellGemInit); + REG_FUNC(cellGem, cellGemInvalidateCalibration); + REG_FUNC(cellGem, cellGemIsTrackableHue); + REG_FUNC(cellGem, cellGemPrepareCamera); + REG_FUNC(cellGem, cellGemPrepareVideoConvert); //cellGem.AddFunc(, cellGemReadExternalPortDeviceInfo); - cellGem.AddFunc(0xde54e2fc, cellGemReset); - cellGem.AddFunc(0x49609306, cellGemSetRumble); - cellGem.AddFunc(0x77e08704, cellGemSetYaw); - cellGem.AddFunc(0x928ac5f8, cellGemTrackHues); - cellGem.AddFunc(0x41ae9c31, cellGemUpdateFinish); - cellGem.AddFunc(0x0ecd2261, cellGemUpdateStart); + REG_FUNC(cellGem, cellGemReset); + REG_FUNC(cellGem, cellGemSetRumble); + REG_FUNC(cellGem, cellGemSetYaw); + REG_FUNC(cellGem, cellGemTrackHues); + REG_FUNC(cellGem, cellGemUpdateFinish); + REG_FUNC(cellGem, cellGemUpdateStart); //cellGem.AddFunc(, cellGemVideoConvertAttributeInit); //cellGem.AddFunc(, cellGemVideoConvertAttributeInitRgba); - cellGem.AddFunc(0x1f6328d8, cellGemWriteExternalPort); + REG_FUNC(cellGem, cellGemWriteExternalPort); }); diff --git a/rpcs3/Emu/SysCalls/Modules/cellGifDec.cpp b/rpcs3/Emu/SysCalls/Modules/cellGifDec.cpp index 6264c5e818..b78fe6e90c 100644 --- a/rpcs3/Emu/SysCalls/Modules/cellGifDec.cpp +++ b/rpcs3/Emu/SysCalls/Modules/cellGifDec.cpp @@ -277,17 +277,17 @@ int cellGifDecDestroy(u32 mainHandle) Module cellGifDec("cellGifDec", []() { - cellGifDec.AddFunc(0xb60d42a5, cellGifDecCreate); - cellGifDec.AddFunc(0x4711cb7f, cellGifDecExtCreate); - cellGifDec.AddFunc(0x75745079, cellGifDecOpen); - cellGifDec.AddFunc(0xf0da95de, cellGifDecReadHeader); - cellGifDec.AddFunc(0x41a90dc4, cellGifDecSetParameter); - cellGifDec.AddFunc(0x44b1bc61, cellGifDecDecodeData); - cellGifDec.AddFunc(0x116a7da9, cellGifDecClose); - cellGifDec.AddFunc(0xe74b2cb1, cellGifDecDestroy); + REG_FUNC(cellGifDec, cellGifDecCreate); + REG_FUNC(cellGifDec, cellGifDecExtCreate); + REG_FUNC(cellGifDec, cellGifDecOpen); + REG_FUNC(cellGifDec, cellGifDecReadHeader); + REG_FUNC(cellGifDec, cellGifDecSetParameter); + REG_FUNC(cellGifDec, cellGifDecDecodeData); + REG_FUNC(cellGifDec, cellGifDecClose); + REG_FUNC(cellGifDec, cellGifDecDestroy); - /*cellGifDec.AddFunc(0x17fb83c1, cellGifDecExtOpen); - cellGifDec.AddFunc(0xe53f91f2, cellGifDecExtReadHeader); - cellGifDec.AddFunc(0x95cae771, cellGifDecExtSetParameter); - cellGifDec.AddFunc(0x02e7e03e, cellGifDecExtDecodeData);*/ + /*REG_FUNC(cellGifDec, cellGifDecExtOpen); + REG_FUNC(cellGifDec, cellGifDecExtReadHeader); + REG_FUNC(cellGifDec, cellGifDecExtSetParameter); + REG_FUNC(cellGifDec, cellGifDecExtDecodeData);*/ }); diff --git a/rpcs3/Emu/SysCalls/Modules/cellHttpUtil.cpp b/rpcs3/Emu/SysCalls/Modules/cellHttpUtil.cpp index 0548c9bf16..7e116bed58 100644 --- a/rpcs3/Emu/SysCalls/Modules/cellHttpUtil.cpp +++ b/rpcs3/Emu/SysCalls/Modules/cellHttpUtil.cpp @@ -126,28 +126,28 @@ int cellHttpUtilBase64Decoder() void cellHttpUtil_init() { - cellHttpUtil.AddFunc(0x32faaf58, cellHttpUtilParseUri); - cellHttpUtil.AddFunc(0x8bb608e4, cellHttpUtilParseUriPath); - cellHttpUtil.AddFunc(0xa3457869, cellHttpUtilParseProxy); - cellHttpUtil.AddFunc(0x2bcbced4, cellHttpUtilParseStatusLine); - cellHttpUtil.AddFunc(0xe1fb0ebd, cellHttpUtilParseHeader); + REG_FUNC(cellHttpUtil, cellHttpUtilParseUri); + REG_FUNC(cellHttpUtil, cellHttpUtilParseUriPath); + REG_FUNC(cellHttpUtil, cellHttpUtilParseProxy); + REG_FUNC(cellHttpUtil, cellHttpUtilParseStatusLine); + REG_FUNC(cellHttpUtil, cellHttpUtilParseHeader); - cellHttpUtil.AddFunc(0x1c6e4dbb, cellHttpUtilBuildRequestLine); - cellHttpUtil.AddFunc(0x04accebf, cellHttpUtilBuildHeader); - cellHttpUtil.AddFunc(0x6f0f7667, cellHttpUtilBuildUri); + REG_FUNC(cellHttpUtil, cellHttpUtilBuildRequestLine); + REG_FUNC(cellHttpUtil, cellHttpUtilBuildHeader); + REG_FUNC(cellHttpUtil, cellHttpUtilBuildUri); - cellHttpUtil.AddFunc(0xf05df789, cellHttpUtilCopyUri); - cellHttpUtil.AddFunc(0x8ea23deb, cellHttpUtilMergeUriPath); - cellHttpUtil.AddFunc(0xaabeb869, cellHttpUtilSweepPath); - cellHttpUtil.AddFunc(0x50ea75bc, cellHttpUtilCopyStatusLine); - cellHttpUtil.AddFunc(0x97f9fbe5, cellHttpUtilCopyHeader); - cellHttpUtil.AddFunc(0x37bb53a2, cellHttpUtilAppendHeaderValue); + REG_FUNC(cellHttpUtil, cellHttpUtilCopyUri); + REG_FUNC(cellHttpUtil, cellHttpUtilMergeUriPath); + REG_FUNC(cellHttpUtil, cellHttpUtilSweepPath); + REG_FUNC(cellHttpUtil, cellHttpUtilCopyStatusLine); + REG_FUNC(cellHttpUtil, cellHttpUtilCopyHeader); + REG_FUNC(cellHttpUtil, cellHttpUtilAppendHeaderValue); - cellHttpUtil.AddFunc(0x9003b1f2, cellHttpUtilEscapeUri); - cellHttpUtil.AddFunc(0x2763fd66, cellHttpUtilUnescapeUri); - cellHttpUtil.AddFunc(0x44d756d6, cellHttpUtilFormUrlEncode); - cellHttpUtil.AddFunc(0x8e6c5bb9, cellHttpUtilFormUrlDecode); - cellHttpUtil.AddFunc(0x83faa354, cellHttpUtilBase64Encoder); - cellHttpUtil.AddFunc(0x8e52ee08, cellHttpUtilBase64Decoder); + REG_FUNC(cellHttpUtil, cellHttpUtilEscapeUri); + REG_FUNC(cellHttpUtil, cellHttpUtilUnescapeUri); + REG_FUNC(cellHttpUtil, cellHttpUtilFormUrlEncode); + REG_FUNC(cellHttpUtil, cellHttpUtilFormUrlDecode); + REG_FUNC(cellHttpUtil, cellHttpUtilBase64Encoder); + REG_FUNC(cellHttpUtil, cellHttpUtilBase64Decoder); } #endif diff --git a/rpcs3/Emu/SysCalls/Modules/cellImejp.cpp b/rpcs3/Emu/SysCalls/Modules/cellImejp.cpp index 3a8ba92062..f7e0966fd1 100644 --- a/rpcs3/Emu/SysCalls/Modules/cellImejp.cpp +++ b/rpcs3/Emu/SysCalls/Modules/cellImejp.cpp @@ -258,49 +258,49 @@ int cellImeJpConfirmPrediction() void cellImejp_init() { - cellImejp.AddFunc(0x44608862, cellImeJpOpen); - cellImejp.AddFunc(0x47b43dd4, cellImeJpOpen2); - cellImejp.AddFunc(0x1b119958, cellImeJpOpen3); - cellImejp.AddFunc(0x46d1234a, cellImeJpClose); + REG_FUNC(cellImejp, cellImeJpOpen); + REG_FUNC(cellImejp, cellImeJpOpen2); + REG_FUNC(cellImejp, cellImeJpOpen3); + REG_FUNC(cellImejp, cellImeJpClose); - cellImejp.AddFunc(0x24e9d8fc, cellImeJpSetKanaInputMode); - cellImejp.AddFunc(0xf5992ec8, cellImeJpSetInputCharType); - cellImejp.AddFunc(0xc1786c81, cellImeJpSetFixInputMode); + REG_FUNC(cellImejp, cellImeJpSetKanaInputMode); + REG_FUNC(cellImejp, cellImeJpSetInputCharType); + REG_FUNC(cellImejp, cellImeJpSetFixInputMode); //cellImejp.AddFunc(, cellImeJpAllowExtensionCharacters); - cellImejp.AddFunc(0x36d38701, cellImeJpReset); + REG_FUNC(cellImejp, cellImeJpReset); - cellImejp.AddFunc(0x66c6cc78, cellImeJpGetStatus); + REG_FUNC(cellImejp, cellImeJpGetStatus); - cellImejp.AddFunc(0x6ccbe3d6, cellImeJpEnterChar); - cellImejp.AddFunc(0x5b6ada55, cellImeJpEnterCharExt); - cellImejp.AddFunc(0x441a1c2b, cellImeJpEnterString); - cellImejp.AddFunc(0x6298b55a, cellImeJpEnterStringExt); - cellImejp.AddFunc(0xac6693d8, cellImeJpModeCaretRight); - cellImejp.AddFunc(0xe76c9700, cellImeJpModeCaretLeft); - cellImejp.AddFunc(0xaa1d1f57, cellImeJpBackspaceWord); - cellImejp.AddFunc(0x72257652, cellImeJpDeleteWord); - cellImejp.AddFunc(0x6319eda3, cellImeJpAllDeleteConvertString); - cellImejp.AddFunc(0x1e29103b, cellImeJpConvertForward); - cellImejp.AddFunc(0xc2bb48bc, cellImeJpConvertBackward); - cellImejp.AddFunc(0x7a18c2b9, cellImeJpCurrentPartConfirm); - cellImejp.AddFunc(0x7189430b, cellImeJpAllConfirm); - cellImejp.AddFunc(0xeae879dc, cellImeJpConvertCancel); - cellImejp.AddFunc(0xcbbc20b7, cellImeJpAllConvertCancel); - cellImejp.AddFunc(0x37961cc1, cellImeJpExtendConvertArea); - cellImejp.AddFunc(0xaa2a3287, cellImeJpShortenConvertArea); - cellImejp.AddFunc(0xbd679cc1, cellImeJpTemporalConfirm); - cellImejp.AddFunc(0x8bb41f47, cellImeJpPostConvert); - cellImejp.AddFunc(0x1e411261, cellImeJpMoveFocusClause); - cellImejp.AddFunc(0x0e363ae7, cellImeJpGetFocusTop); - cellImejp.AddFunc(0x5f5b3227, cellImeJpGetFocusLength); - cellImejp.AddFunc(0x89f8a567, cellImeJpGetConfirmYomiString); - cellImejp.AddFunc(0xd3fc3606, cellImeJpGetConfirmString); - cellImejp.AddFunc(0xea2d4881, cellImeJpGetConvertYomiString); - cellImejp.AddFunc(0xf91abda3, cellImeJpGetConvertString); - cellImejp.AddFunc(0xc4796a45, cellImeJpGetCandidateListSize); - cellImejp.AddFunc(0xe4cc15ba, cellImeJpGetCandidateList); - cellImejp.AddFunc(0x177bd218, cellImeJpGetCandidateSelect); - cellImejp.AddFunc(0x1986f2cd, cellImeJpGetPredictList); - cellImejp.AddFunc(0xeede898c, cellImeJpConfirmPrediction); + REG_FUNC(cellImejp, cellImeJpEnterChar); + REG_FUNC(cellImejp, cellImeJpEnterCharExt); + REG_FUNC(cellImejp, cellImeJpEnterString); + REG_FUNC(cellImejp, cellImeJpEnterStringExt); + REG_FUNC(cellImejp, cellImeJpModeCaretRight); + REG_FUNC(cellImejp, cellImeJpModeCaretLeft); + REG_FUNC(cellImejp, cellImeJpBackspaceWord); + REG_FUNC(cellImejp, cellImeJpDeleteWord); + REG_FUNC(cellImejp, cellImeJpAllDeleteConvertString); + REG_FUNC(cellImejp, cellImeJpConvertForward); + REG_FUNC(cellImejp, cellImeJpConvertBackward); + REG_FUNC(cellImejp, cellImeJpCurrentPartConfirm); + REG_FUNC(cellImejp, cellImeJpAllConfirm); + REG_FUNC(cellImejp, cellImeJpConvertCancel); + REG_FUNC(cellImejp, cellImeJpAllConvertCancel); + REG_FUNC(cellImejp, cellImeJpExtendConvertArea); + REG_FUNC(cellImejp, cellImeJpShortenConvertArea); + REG_FUNC(cellImejp, cellImeJpTemporalConfirm); + REG_FUNC(cellImejp, cellImeJpPostConvert); + REG_FUNC(cellImejp, cellImeJpMoveFocusClause); + REG_FUNC(cellImejp, cellImeJpGetFocusTop); + REG_FUNC(cellImejp, cellImeJpGetFocusLength); + REG_FUNC(cellImejp, cellImeJpGetConfirmYomiString); + REG_FUNC(cellImejp, cellImeJpGetConfirmString); + REG_FUNC(cellImejp, cellImeJpGetConvertYomiString); + REG_FUNC(cellImejp, cellImeJpGetConvertString); + REG_FUNC(cellImejp, cellImeJpGetCandidateListSize); + REG_FUNC(cellImejp, cellImeJpGetCandidateList); + REG_FUNC(cellImejp, cellImeJpGetCandidateSelect); + REG_FUNC(cellImejp, cellImeJpGetPredictList); + REG_FUNC(cellImejp, cellImeJpConfirmPrediction); } #endif diff --git a/rpcs3/Emu/SysCalls/Modules/cellJpgDec.cpp b/rpcs3/Emu/SysCalls/Modules/cellJpgDec.cpp index 7c2211ab50..ea49bf80cd 100644 --- a/rpcs3/Emu/SysCalls/Modules/cellJpgDec.cpp +++ b/rpcs3/Emu/SysCalls/Modules/cellJpgDec.cpp @@ -322,17 +322,17 @@ int cellJpgDecSetParameter(u32 mainHandle, u32 subHandle, vm::ptr config) void cellKb_init() { - sys_io.AddFunc(0x433f6ec0, cellKbInit); - sys_io.AddFunc(0xbfce3285, cellKbEnd); - sys_io.AddFunc(0x2073b7f6, cellKbClearBuf); - sys_io.AddFunc(0x4ab1fa77, cellKbCnvRawCode); - sys_io.AddFunc(0x2f1774d5, cellKbGetInfo); - sys_io.AddFunc(0xff0a21b7, cellKbRead); - sys_io.AddFunc(0xa5f85e4d, cellKbSetCodeType); - sys_io.AddFunc(0x3f72c56e, cellKbSetLEDStatus); - sys_io.AddFunc(0xdeefdfa7, cellKbSetReadMode); - sys_io.AddFunc(0x1f71ecbe, cellKbGetConfiguration); + REG_FUNC(sys_io, cellKbInit); + REG_FUNC(sys_io, cellKbEnd); + REG_FUNC(sys_io, cellKbClearBuf); + REG_FUNC(sys_io, cellKbCnvRawCode); + REG_FUNC(sys_io, cellKbGetInfo); + REG_FUNC(sys_io, cellKbRead); + REG_FUNC(sys_io, cellKbSetCodeType); + REG_FUNC(sys_io, cellKbSetLEDStatus); + REG_FUNC(sys_io, cellKbSetReadMode); + REG_FUNC(sys_io, cellKbGetConfiguration); } diff --git a/rpcs3/Emu/SysCalls/Modules/cellKey2char.cpp b/rpcs3/Emu/SysCalls/Modules/cellKey2char.cpp index 4b1e6d7a10..73e704b9a0 100644 --- a/rpcs3/Emu/SysCalls/Modules/cellKey2char.cpp +++ b/rpcs3/Emu/SysCalls/Modules/cellKey2char.cpp @@ -48,10 +48,10 @@ int cellKey2CharSetArrangement() void cellKey2char_init() { - cellKey2char.AddFunc(0xabf629c1, cellKey2CharOpen); - cellKey2char.AddFunc(0x14bf2dc1, cellKey2CharClose); - cellKey2char.AddFunc(0x56776c0d, cellKey2CharGetChar); - cellKey2char.AddFunc(0xbfc03768, cellKey2CharSetMode); - cellKey2char.AddFunc(0x0dfbadfa, cellKey2CharSetArrangement); + REG_FUNC(cellKey2char, cellKey2CharOpen); + REG_FUNC(cellKey2char, cellKey2CharClose); + REG_FUNC(cellKey2char, cellKey2CharGetChar); + REG_FUNC(cellKey2char, cellKey2CharSetMode); + REG_FUNC(cellKey2char, cellKey2CharSetArrangement); } #endif diff --git a/rpcs3/Emu/SysCalls/Modules/cellL10n.cpp b/rpcs3/Emu/SysCalls/Modules/cellL10n.cpp index 4fefb3b4c5..a29aec4262 100644 --- a/rpcs3/Emu/SysCalls/Modules/cellL10n.cpp +++ b/rpcs3/Emu/SysCalls/Modules/cellL10n.cpp @@ -339,169 +339,169 @@ Module cellL10n("cellL10n", []() { // NOTE: I think this module should be LLE'd instead of implementing all its functions - // cellL10n.AddFunc(0x005200e6, UCS2toEUCJP); - // cellL10n.AddFunc(0x01b0cbf4, l10n_convert); - // cellL10n.AddFunc(0x0356038c, UCS2toUTF32); - // cellL10n.AddFunc(0x05028763, jis2kuten); - // cellL10n.AddFunc(0x058addc8, UTF8toGB18030); - // cellL10n.AddFunc(0x060ee3b2, JISstoUTF8s); - // cellL10n.AddFunc(0x07168a83, SjisZen2Han); - // cellL10n.AddFunc(0x0bc386c8, ToSjisLower); - // cellL10n.AddFunc(0x0bedf77d, UCS2toGB18030); - // cellL10n.AddFunc(0x0bf867e2, HZstoUCS2s); - // cellL10n.AddFunc(0x0ce278fd, UCS2stoHZs); - // cellL10n.AddFunc(0x0d90a48d, UCS2stoSJISs); - // cellL10n.AddFunc(0x0f624540, kuten2eucjp); - // cellL10n.AddFunc(0x14ee3649, sjis2jis); - // cellL10n.AddFunc(0x14f504b8, EUCKRstoUCS2s); - // cellL10n.AddFunc(0x16eaf5f1, UHCstoEUCKRs); - // cellL10n.AddFunc(0x1758053c, jis2sjis); - // cellL10n.AddFunc(0x1906ce6b, jstrnchk); - // cellL10n.AddFunc(0x1ac0d23d, L10nConvert); - // cellL10n.AddFunc(0x1ae2acee, EUCCNstoUTF8s); - // cellL10n.AddFunc(0x1cb1138f, GBKstoUCS2s); - // cellL10n.AddFunc(0x1da42d70, eucjphan2zen); - // cellL10n.AddFunc(0x1ec712e0, ToSjisHira); - // cellL10n.AddFunc(0x1fb50183, GBKtoUCS2); - // cellL10n.AddFunc(0x21948c03, eucjp2jis); - // cellL10n.AddFunc(0x21aa3045, UTF32stoUTF8s); - // cellL10n.AddFunc(0x24fd32a9, sjishan2zen); - // cellL10n.AddFunc(0x256b6861, UCS2toSBCS); - // cellL10n.AddFunc(0x262a5ae2, UTF8stoGBKs); - // cellL10n.AddFunc(0x28724522, UTF8toUCS2); - // cellL10n.AddFunc(0x2ad091c6, UCS2stoUTF8s); - // cellL10n.AddFunc(0x2b84030c, EUCKRstoUTF8s); - // cellL10n.AddFunc(0x2efa7294, UTF16stoUTF32s); - // cellL10n.AddFunc(0x2f9eb543, UTF8toEUCKR); - // cellL10n.AddFunc(0x317ab7c2, UTF16toUTF8); - // cellL10n.AddFunc(0x32689828, ARIBstoUTF8s); - // cellL10n.AddFunc(0x33435818, SJISstoUTF8s); - // cellL10n.AddFunc(0x33f8b35c, sjiszen2han); - // cellL10n.AddFunc(0x3968f176, ToEucJpLower); - // cellL10n.AddFunc(0x398a3dee, MSJIStoUTF8); - // cellL10n.AddFunc(0x3a20bc34, UCS2stoMSJISs); - // cellL10n.AddFunc(0x3dabd5a7, EUCJPtoUTF8); - // cellL10n.AddFunc(0x3df65b64, eucjp2sjis); - // cellL10n.AddFunc(0x408a622b, ToEucJpHira); - // cellL10n.AddFunc(0x41b4a5ae, UHCstoUCS2s); - // cellL10n.AddFunc(0x41ccf033, ToEucJpKata); - // cellL10n.AddFunc(0x42838145, HZstoUTF8s); - // cellL10n.AddFunc(0x4931b44e, UTF8toMSJIS); - // cellL10n.AddFunc(0x4b3bbacb, BIG5toUTF8); - // cellL10n.AddFunc(0x511d386b, EUCJPstoSJISs); - // cellL10n.AddFunc(0x52b7883f, UTF8stoBIG5s); - // cellL10n.AddFunc(0x53558b6b, UTF16stoUCS2s); - // cellL10n.AddFunc(0x53764725, UCS2stoGB18030s); - // cellL10n.AddFunc(0x53c71ac2, EUCJPtoSJIS); - // cellL10n.AddFunc(0x54f59807, EUCJPtoUCS2); - // cellL10n.AddFunc(0x55f6921c, UCS2stoGBKs); - // cellL10n.AddFunc(0x58246762, EUCKRtoUHC); - // cellL10n.AddFunc(0x596df41c, UCS2toSJIS); - // cellL10n.AddFunc(0x5a4ab223, MSJISstoUTF8s); - // cellL10n.AddFunc(0x5ac783dc, EUCJPstoUTF8s); - // cellL10n.AddFunc(0x5b684dfb, UCS2toBIG5); - // cellL10n.AddFunc(0x5cd29270, UTF8stoEUCKRs); - // cellL10n.AddFunc(0x5e1d9330, UHCstoUTF8s); - // cellL10n.AddFunc(0x60ffa0ec, GB18030stoUCS2s); - // cellL10n.AddFunc(0x6122e000, SJIStoUTF8); - // cellL10n.AddFunc(0x6169f205, JISstoSJISs); - // cellL10n.AddFunc(0x61fb9442, UTF8toUTF16); - // cellL10n.AddFunc(0x62b36bcf, UTF8stoMSJISs); - // cellL10n.AddFunc(0x63219199, EUCKRtoUTF8); - // cellL10n.AddFunc(0x638c2fc1, SjisHan2Zen); - // cellL10n.AddFunc(0x64a10ec8, UCS2toUTF16); - // cellL10n.AddFunc(0x65444204, UCS2toMSJIS); - // cellL10n.AddFunc(0x6621a82c, sjis2kuten); - // cellL10n.AddFunc(0x6a6f25d1, UCS2toUHC); - // cellL10n.AddFunc(0x6c62d879, UTF32toUCS2); - // cellL10n.AddFunc(0x6de4b508, ToSjisUpper); - // cellL10n.AddFunc(0x6e0705c4, UTF8toEUCJP); - // cellL10n.AddFunc(0x6e5906fd, UCS2stoEUCJPs); - // cellL10n.AddFunc(0x6fc530b3, UTF16toUCS2); - // cellL10n.AddFunc(0x714a9b4a, UCS2stoUTF16s); - // cellL10n.AddFunc(0x71804d64, UCS2stoEUCCNs); - // cellL10n.AddFunc(0x72632e53, SBCSstoUTF8s); - // cellL10n.AddFunc(0x73f2cd21, SJISstoJISs); - // cellL10n.AddFunc(0x74496718, SBCStoUTF8); - // cellL10n.AddFunc(0x74871fe0, UTF8toUTF32); - cellL10n.AddFunc(0x750c363d, jstrchk); - // cellL10n.AddFunc(0x7c5bde1c, UHCtoEUCKR); - // cellL10n.AddFunc(0x7c912bda, kuten2jis); - // cellL10n.AddFunc(0x7d07a1c2, UTF8toEUCCN); - // cellL10n.AddFunc(0x8171c1cc, EUCCNtoUTF8); - // cellL10n.AddFunc(0x82d5ecdf, EucJpZen2Han); - // cellL10n.AddFunc(0x8555fe15, UTF32stoUTF16s); - // cellL10n.AddFunc(0x860fc741, GBKtoUTF8); - // cellL10n.AddFunc(0x867f7b8b, ToEucJpUpper); - // cellL10n.AddFunc(0x88f8340b, UCS2stoJISs); - // cellL10n.AddFunc(0x89236c86, UTF8stoGB18030s); - // cellL10n.AddFunc(0x8a56f148, EUCKRstoUHCs); - // cellL10n.AddFunc(0x8ccdba38, UTF8stoUTF32s); - // cellL10n.AddFunc(0x8f472054, UTF8stoEUCCNs); - // cellL10n.AddFunc(0x90e9b5d2, EUCJPstoUCS2s); - // cellL10n.AddFunc(0x91a99765, UHCtoUCS2); - cellL10n.AddFunc(0x931ff25a, L10nConvertStr); - // cellL10n.AddFunc(0x949bb14c, GBKstoUTF8s); - // cellL10n.AddFunc(0x9557ac9b, UTF8toUHC); - // cellL10n.AddFunc(0x9768b6d3, UTF32toUTF8); - // cellL10n.AddFunc(0x9874020d, sjis2eucjp); - // cellL10n.AddFunc(0x9a0e7d23, UCS2toEUCCN); - // cellL10n.AddFunc(0x9a13d6b8, UTF8stoUHCs); - // cellL10n.AddFunc(0x9a72059d, EUCKRtoUCS2); - // cellL10n.AddFunc(0x9b1210c6, UTF32toUTF16); - // cellL10n.AddFunc(0x9cd8135b, EUCCNstoUCS2s); - // cellL10n.AddFunc(0x9ce52809, SBCSstoUCS2s); - // cellL10n.AddFunc(0x9cf1ab77, UTF8stoJISs); - // cellL10n.AddFunc(0x9d14dc46, ToSjisKata); - // cellL10n.AddFunc(0x9dcde367, jis2eucjp); - // cellL10n.AddFunc(0x9ec52258, BIG5toUCS2); - // cellL10n.AddFunc(0xa0d463c0, UCS2toGBK); - // cellL10n.AddFunc(0xa19fb9de, UTF16toUTF32); - // cellL10n.AddFunc(0xa298cad2, l10n_convert_str); - // cellL10n.AddFunc(0xa34fa0eb, EUCJPstoJISs); - // cellL10n.AddFunc(0xa5146299, UTF8stoARIBs); - // cellL10n.AddFunc(0xa609f3e9, JISstoEUCJPs); - // cellL10n.AddFunc(0xa60ff5c9, EucJpHan2Zen); - // cellL10n.AddFunc(0xa963619c, isEucJpKigou); - // cellL10n.AddFunc(0xa9a76fb8, UCS2toUTF8); - // cellL10n.AddFunc(0xaf18d499, GB18030toUCS2); - // cellL10n.AddFunc(0xb3361be6, UHCtoUTF8); - // cellL10n.AddFunc(0xb6e45343, MSJIStoUCS2); - // cellL10n.AddFunc(0xb7cef4a6, UTF8toGBK); - // cellL10n.AddFunc(0xb7e08f7a, kuten2sjis); - // cellL10n.AddFunc(0xb9cf473d, UTF8toSBCS); - // cellL10n.AddFunc(0xbdd44ee3, SJIStoUCS2); - // cellL10n.AddFunc(0xbe42e661, eucjpzen2han); - // cellL10n.AddFunc(0xbe8d5485, UCS2stoARIBs); - // cellL10n.AddFunc(0xbefe3869, isSjisKigou); - // cellL10n.AddFunc(0xc62b758d, UTF8stoEUCJPs); - // cellL10n.AddFunc(0xc7bdcb4c, UCS2toEUCKR); - // cellL10n.AddFunc(0xc944fa56, SBCStoUCS2); - // cellL10n.AddFunc(0xc9b78f58, MSJISstoUCS2s); - // cellL10n.AddFunc(0xcc1633cc, l10n_get_converter); - // cellL10n.AddFunc(0xd02ef83d, GB18030stoUTF8s); - // cellL10n.AddFunc(0xd8721e2c, SJISstoEUCJPs); - // cellL10n.AddFunc(0xd8cb24cb, UTF32stoUCS2s); - // cellL10n.AddFunc(0xd990858b, BIG5stoUTF8s); - // cellL10n.AddFunc(0xd9fb1224, EUCCNtoUCS2); - // cellL10n.AddFunc(0xda67b37f, UTF8stoSBCSs); - // cellL10n.AddFunc(0xdc54886c, UCS2stoEUCKRs); - // cellL10n.AddFunc(0xdd5ebdeb, UTF8stoSJISs); - // cellL10n.AddFunc(0xdefa1c17, UTF8stoHZs); - // cellL10n.AddFunc(0xe2eabb32, eucjp2kuten); - // cellL10n.AddFunc(0xe6d9e234, UTF8toBIG5); - // cellL10n.AddFunc(0xe6f5711b, UTF16stoUTF8s); - // cellL10n.AddFunc(0xe956dc64, JISstoUCS2s); - // cellL10n.AddFunc(0xeabc3d00, GB18030toUTF8); - // cellL10n.AddFunc(0xeb3dc670, UTF8toSJIS); - // cellL10n.AddFunc(0xeb41cc68, ARIBstoUCS2s); - // cellL10n.AddFunc(0xeb685b83, UCS2stoUTF32s); - // cellL10n.AddFunc(0xebae29c0, UCS2stoSBCSs); - // cellL10n.AddFunc(0xee6c6a39, UCS2stoBIG5s); - // cellL10n.AddFunc(0xf1dcfa71, UCS2stoUHCs); - // cellL10n.AddFunc(0xf439728e, SJIStoEUCJP); - // cellL10n.AddFunc(0xf7681b9a, UTF8stoUTF16s); - // cellL10n.AddFunc(0xf9b1896d, SJISstoUCS2s); - // cellL10n.AddFunc(0xfa4a675a, BIG5stoUCS2s); - // cellL10n.AddFunc(0xfdbf6ac5, UTF8stoUCS2s); + // REG_FUNC(cellL10n, UCS2toEUCJP); + // REG_FUNC(cellL10n, l10n_convert); + // REG_FUNC(cellL10n, UCS2toUTF32); + // REG_FUNC(cellL10n, jis2kuten); + // REG_FUNC(cellL10n, UTF8toGB18030); + // REG_FUNC(cellL10n, JISstoUTF8s); + // REG_FUNC(cellL10n, SjisZen2Han); + // REG_FUNC(cellL10n, ToSjisLower); + // REG_FUNC(cellL10n, UCS2toGB18030); + // REG_FUNC(cellL10n, HZstoUCS2s); + // REG_FUNC(cellL10n, UCS2stoHZs); + // REG_FUNC(cellL10n, UCS2stoSJISs); + // REG_FUNC(cellL10n, kuten2eucjp); + // REG_FUNC(cellL10n, sjis2jis); + // REG_FUNC(cellL10n, EUCKRstoUCS2s); + // REG_FUNC(cellL10n, UHCstoEUCKRs); + // REG_FUNC(cellL10n, jis2sjis); + // REG_FUNC(cellL10n, jstrnchk); + // REG_FUNC(cellL10n, L10nConvert); + // REG_FUNC(cellL10n, EUCCNstoUTF8s); + // REG_FUNC(cellL10n, GBKstoUCS2s); + // REG_FUNC(cellL10n, eucjphan2zen); + // REG_FUNC(cellL10n, ToSjisHira); + // REG_FUNC(cellL10n, GBKtoUCS2); + // REG_FUNC(cellL10n, eucjp2jis); + // REG_FUNC(cellL10n, UTF32stoUTF8s); + // REG_FUNC(cellL10n, sjishan2zen); + // REG_FUNC(cellL10n, UCS2toSBCS); + // REG_FUNC(cellL10n, UTF8stoGBKs); + // REG_FUNC(cellL10n, UTF8toUCS2); + // REG_FUNC(cellL10n, UCS2stoUTF8s); + // REG_FUNC(cellL10n, EUCKRstoUTF8s); + // REG_FUNC(cellL10n, UTF16stoUTF32s); + // REG_FUNC(cellL10n, UTF8toEUCKR); + // REG_FUNC(cellL10n, UTF16toUTF8); + // REG_FUNC(cellL10n, ARIBstoUTF8s); + // REG_FUNC(cellL10n, SJISstoUTF8s); + // REG_FUNC(cellL10n, sjiszen2han); + // REG_FUNC(cellL10n, ToEucJpLower); + // REG_FUNC(cellL10n, MSJIStoUTF8); + // REG_FUNC(cellL10n, UCS2stoMSJISs); + // REG_FUNC(cellL10n, EUCJPtoUTF8); + // REG_FUNC(cellL10n, eucjp2sjis); + // REG_FUNC(cellL10n, ToEucJpHira); + // REG_FUNC(cellL10n, UHCstoUCS2s); + // REG_FUNC(cellL10n, ToEucJpKata); + // REG_FUNC(cellL10n, HZstoUTF8s); + // REG_FUNC(cellL10n, UTF8toMSJIS); + // REG_FUNC(cellL10n, BIG5toUTF8); + // REG_FUNC(cellL10n, EUCJPstoSJISs); + // REG_FUNC(cellL10n, UTF8stoBIG5s); + // REG_FUNC(cellL10n, UTF16stoUCS2s); + // REG_FUNC(cellL10n, UCS2stoGB18030s); + // REG_FUNC(cellL10n, EUCJPtoSJIS); + // REG_FUNC(cellL10n, EUCJPtoUCS2); + // REG_FUNC(cellL10n, UCS2stoGBKs); + // REG_FUNC(cellL10n, EUCKRtoUHC); + // REG_FUNC(cellL10n, UCS2toSJIS); + // REG_FUNC(cellL10n, MSJISstoUTF8s); + // REG_FUNC(cellL10n, EUCJPstoUTF8s); + // REG_FUNC(cellL10n, UCS2toBIG5); + // REG_FUNC(cellL10n, UTF8stoEUCKRs); + // REG_FUNC(cellL10n, UHCstoUTF8s); + // REG_FUNC(cellL10n, GB18030stoUCS2s); + // REG_FUNC(cellL10n, SJIStoUTF8); + // REG_FUNC(cellL10n, JISstoSJISs); + // REG_FUNC(cellL10n, UTF8toUTF16); + // REG_FUNC(cellL10n, UTF8stoMSJISs); + // REG_FUNC(cellL10n, EUCKRtoUTF8); + // REG_FUNC(cellL10n, SjisHan2Zen); + // REG_FUNC(cellL10n, UCS2toUTF16); + // REG_FUNC(cellL10n, UCS2toMSJIS); + // REG_FUNC(cellL10n, sjis2kuten); + // REG_FUNC(cellL10n, UCS2toUHC); + // REG_FUNC(cellL10n, UTF32toUCS2); + // REG_FUNC(cellL10n, ToSjisUpper); + // REG_FUNC(cellL10n, UTF8toEUCJP); + // REG_FUNC(cellL10n, UCS2stoEUCJPs); + // REG_FUNC(cellL10n, UTF16toUCS2); + // REG_FUNC(cellL10n, UCS2stoUTF16s); + // REG_FUNC(cellL10n, UCS2stoEUCCNs); + // REG_FUNC(cellL10n, SBCSstoUTF8s); + // REG_FUNC(cellL10n, SJISstoJISs); + // REG_FUNC(cellL10n, SBCStoUTF8); + // REG_FUNC(cellL10n, UTF8toUTF32); + REG_FUNC(cellL10n, jstrchk); + // REG_FUNC(cellL10n, UHCtoEUCKR); + // REG_FUNC(cellL10n, kuten2jis); + // REG_FUNC(cellL10n, UTF8toEUCCN); + // REG_FUNC(cellL10n, EUCCNtoUTF8); + // REG_FUNC(cellL10n, EucJpZen2Han); + // REG_FUNC(cellL10n, UTF32stoUTF16s); + // REG_FUNC(cellL10n, GBKtoUTF8); + // REG_FUNC(cellL10n, ToEucJpUpper); + // REG_FUNC(cellL10n, UCS2stoJISs); + // REG_FUNC(cellL10n, UTF8stoGB18030s); + // REG_FUNC(cellL10n, EUCKRstoUHCs); + // REG_FUNC(cellL10n, UTF8stoUTF32s); + // REG_FUNC(cellL10n, UTF8stoEUCCNs); + // REG_FUNC(cellL10n, EUCJPstoUCS2s); + // REG_FUNC(cellL10n, UHCtoUCS2); + REG_FUNC(cellL10n, L10nConvertStr); + // REG_FUNC(cellL10n, GBKstoUTF8s); + // REG_FUNC(cellL10n, UTF8toUHC); + // REG_FUNC(cellL10n, UTF32toUTF8); + // REG_FUNC(cellL10n, sjis2eucjp); + // REG_FUNC(cellL10n, UCS2toEUCCN); + // REG_FUNC(cellL10n, UTF8stoUHCs); + // REG_FUNC(cellL10n, EUCKRtoUCS2); + // REG_FUNC(cellL10n, UTF32toUTF16); + // REG_FUNC(cellL10n, EUCCNstoUCS2s); + // REG_FUNC(cellL10n, SBCSstoUCS2s); + // REG_FUNC(cellL10n, UTF8stoJISs); + // REG_FUNC(cellL10n, ToSjisKata); + // REG_FUNC(cellL10n, jis2eucjp); + // REG_FUNC(cellL10n, BIG5toUCS2); + // REG_FUNC(cellL10n, UCS2toGBK); + // REG_FUNC(cellL10n, UTF16toUTF32); + // REG_FUNC(cellL10n, l10n_convert_str); + // REG_FUNC(cellL10n, EUCJPstoJISs); + // REG_FUNC(cellL10n, UTF8stoARIBs); + // REG_FUNC(cellL10n, JISstoEUCJPs); + // REG_FUNC(cellL10n, EucJpHan2Zen); + // REG_FUNC(cellL10n, isEucJpKigou); + // REG_FUNC(cellL10n, UCS2toUTF8); + // REG_FUNC(cellL10n, GB18030toUCS2); + // REG_FUNC(cellL10n, UHCtoUTF8); + // REG_FUNC(cellL10n, MSJIStoUCS2); + // REG_FUNC(cellL10n, UTF8toGBK); + // REG_FUNC(cellL10n, kuten2sjis); + // REG_FUNC(cellL10n, UTF8toSBCS); + // REG_FUNC(cellL10n, SJIStoUCS2); + // REG_FUNC(cellL10n, eucjpzen2han); + // REG_FUNC(cellL10n, UCS2stoARIBs); + // REG_FUNC(cellL10n, isSjisKigou); + // REG_FUNC(cellL10n, UTF8stoEUCJPs); + // REG_FUNC(cellL10n, UCS2toEUCKR); + // REG_FUNC(cellL10n, SBCStoUCS2); + // REG_FUNC(cellL10n, MSJISstoUCS2s); + // REG_FUNC(cellL10n, l10n_get_converter); + // REG_FUNC(cellL10n, GB18030stoUTF8s); + // REG_FUNC(cellL10n, SJISstoEUCJPs); + // REG_FUNC(cellL10n, UTF32stoUCS2s); + // REG_FUNC(cellL10n, BIG5stoUTF8s); + // REG_FUNC(cellL10n, EUCCNtoUCS2); + // REG_FUNC(cellL10n, UTF8stoSBCSs); + // REG_FUNC(cellL10n, UCS2stoEUCKRs); + // REG_FUNC(cellL10n, UTF8stoSJISs); + // REG_FUNC(cellL10n, UTF8stoHZs); + // REG_FUNC(cellL10n, eucjp2kuten); + // REG_FUNC(cellL10n, UTF8toBIG5); + // REG_FUNC(cellL10n, UTF16stoUTF8s); + // REG_FUNC(cellL10n, JISstoUCS2s); + // REG_FUNC(cellL10n, GB18030toUTF8); + // REG_FUNC(cellL10n, UTF8toSJIS); + // REG_FUNC(cellL10n, ARIBstoUCS2s); + // REG_FUNC(cellL10n, UCS2stoUTF32s); + // REG_FUNC(cellL10n, UCS2stoSBCSs); + // REG_FUNC(cellL10n, UCS2stoBIG5s); + // REG_FUNC(cellL10n, UCS2stoUHCs); + // REG_FUNC(cellL10n, SJIStoEUCJP); + // REG_FUNC(cellL10n, UTF8stoUTF16s); + // REG_FUNC(cellL10n, SJISstoUCS2s); + // REG_FUNC(cellL10n, BIG5stoUCS2s); + // REG_FUNC(cellL10n, UTF8stoUCS2s); }); diff --git a/rpcs3/Emu/SysCalls/Modules/cellLv2dbg.cpp b/rpcs3/Emu/SysCalls/Modules/cellLv2dbg.cpp index 06bd8d77fa..eb05b6320d 100644 --- a/rpcs3/Emu/SysCalls/Modules/cellLv2dbg.cpp +++ b/rpcs3/Emu/SysCalls/Modules/cellLv2dbg.cpp @@ -223,47 +223,47 @@ int sys_dbg_get_coredump_params() void cellLv2dbg_init() { - cellLv2dbg.AddFunc(0xc21ee635, sys_dbg_read_spu_thread_context); - cellLv2dbg.AddFunc(0xc353353a, sys_dbg_initialize_ppu_exception_handler); - cellLv2dbg.AddFunc(0x22916f45, sys_dbg_register_ppu_exception_handler); - cellLv2dbg.AddFunc(0xc0eb9266, sys_dbg_finalize_ppu_exception_handler); - cellLv2dbg.AddFunc(0xc6d7ec13, sys_dbg_unregister_ppu_exception_handler); - cellLv2dbg.AddFunc(0x06a840f5, sys_dbg_set_stacksize_ppu_exception_handler); - cellLv2dbg.AddFunc(0x4ded9f6c, sys_dbg_signal_to_ppu_exception_handler); - cellLv2dbg.AddFunc(0x3147c6ca, sys_dbg_enable_floating_point_enabled_exception); - cellLv2dbg.AddFunc(0xf254768c, sys_dbg_disable_floating_point_enabled_exception); - cellLv2dbg.AddFunc(0xdb14b37b, sys_dbg_set_address_to_dabr); - cellLv2dbg.AddFunc(0xbb0ae221, sys_dbg_get_address_from_dabr); - cellLv2dbg.AddFunc(0xab475d53, sys_dbg_set_mask_to_ppu_exception_handler); + REG_FUNC(cellLv2dbg, sys_dbg_read_spu_thread_context); + REG_FUNC(cellLv2dbg, sys_dbg_initialize_ppu_exception_handler); + REG_FUNC(cellLv2dbg, sys_dbg_register_ppu_exception_handler); + REG_FUNC(cellLv2dbg, sys_dbg_finalize_ppu_exception_handler); + REG_FUNC(cellLv2dbg, sys_dbg_unregister_ppu_exception_handler); + REG_FUNC(cellLv2dbg, sys_dbg_set_stacksize_ppu_exception_handler); + REG_FUNC(cellLv2dbg, sys_dbg_signal_to_ppu_exception_handler); + REG_FUNC(cellLv2dbg, sys_dbg_enable_floating_point_enabled_exception); + REG_FUNC(cellLv2dbg, sys_dbg_disable_floating_point_enabled_exception); + REG_FUNC(cellLv2dbg, sys_dbg_set_address_to_dabr); + REG_FUNC(cellLv2dbg, sys_dbg_get_address_from_dabr); + REG_FUNC(cellLv2dbg, sys_dbg_set_mask_to_ppu_exception_handler); - cellLv2dbg.AddFunc(0xc5eef17f, sys_dbg_read_ppu_thread_context); - cellLv2dbg.AddFunc(0x266c2bd3, sys_dbg_read_spu_thread_context2); + REG_FUNC(cellLv2dbg, sys_dbg_read_ppu_thread_context); + REG_FUNC(cellLv2dbg, sys_dbg_read_spu_thread_context2); - cellLv2dbg.AddFunc(0x4b55f456, sys_dbg_get_ppu_thread_name); - cellLv2dbg.AddFunc(0x3e5eed36, sys_dbg_get_spu_thread_name); - cellLv2dbg.AddFunc(0xbd69e584, sys_dbg_get_spu_thread_group_name); - cellLv2dbg.AddFunc(0x6b413178, sys_dbg_get_ppu_thread_status); - cellLv2dbg.AddFunc(0x9ddb9dc3, sys_dbg_get_spu_thread_group_status); + REG_FUNC(cellLv2dbg, sys_dbg_get_ppu_thread_name); + REG_FUNC(cellLv2dbg, sys_dbg_get_spu_thread_name); + REG_FUNC(cellLv2dbg, sys_dbg_get_spu_thread_group_name); + REG_FUNC(cellLv2dbg, sys_dbg_get_ppu_thread_status); + REG_FUNC(cellLv2dbg, sys_dbg_get_spu_thread_group_status); - cellLv2dbg.AddFunc(0x113b0bea, sys_dbg_get_ppu_thread_ids); - cellLv2dbg.AddFunc(0x1860f909, sys_dbg_get_spu_thread_ids); - cellLv2dbg.AddFunc(0x08ef08a9, sys_dbg_get_spu_thread_group_ids); + REG_FUNC(cellLv2dbg, sys_dbg_get_ppu_thread_ids); + REG_FUNC(cellLv2dbg, sys_dbg_get_spu_thread_ids); + REG_FUNC(cellLv2dbg, sys_dbg_get_spu_thread_group_ids); - cellLv2dbg.AddFunc(0x50453aa8, sys_dbg_get_mutex_information); - cellLv2dbg.AddFunc(0xcb377e36, sys_dbg_get_lwmutex_information); - cellLv2dbg.AddFunc(0x9794bb53, sys_dbg_get_rwlock_information); - cellLv2dbg.AddFunc(0xa2d6cbd2, sys_dbg_get_semaphore_information); - cellLv2dbg.AddFunc(0x63bd413e, sys_dbg_get_cond_information); - cellLv2dbg.AddFunc(0x7bdadb01, sys_dbg_get_lwcond_information); - cellLv2dbg.AddFunc(0x381ae33e, sys_dbg_get_event_queue_information); - cellLv2dbg.AddFunc(0xdf856979, sys_dbg_get_event_flag_information); + REG_FUNC(cellLv2dbg, sys_dbg_get_mutex_information); + REG_FUNC(cellLv2dbg, sys_dbg_get_lwmutex_information); + REG_FUNC(cellLv2dbg, sys_dbg_get_rwlock_information); + REG_FUNC(cellLv2dbg, sys_dbg_get_semaphore_information); + REG_FUNC(cellLv2dbg, sys_dbg_get_cond_information); + REG_FUNC(cellLv2dbg, sys_dbg_get_lwcond_information); + REG_FUNC(cellLv2dbg, sys_dbg_get_event_queue_information); + REG_FUNC(cellLv2dbg, sys_dbg_get_event_flag_information); - cellLv2dbg.AddFunc(0x580f8203, sys_dbg_vm_get_page_information); + REG_FUNC(cellLv2dbg, sys_dbg_vm_get_page_information); - cellLv2dbg.AddFunc(0x24a3d413, sys_dbg_mat_set_condition); - cellLv2dbg.AddFunc(0x590a276e, sys_dbg_mat_get_condition); + REG_FUNC(cellLv2dbg, sys_dbg_mat_set_condition); + REG_FUNC(cellLv2dbg, sys_dbg_mat_get_condition); - cellLv2dbg.AddFunc(0xd830062a, sys_dbg_signal_to_coredump_handler); - cellLv2dbg.AddFunc(0xb9da87d3, sys_dbg_get_coredump_params); + REG_FUNC(cellLv2dbg, sys_dbg_signal_to_coredump_handler); + REG_FUNC(cellLv2dbg, sys_dbg_get_coredump_params); } #endif diff --git a/rpcs3/Emu/SysCalls/Modules/cellMic.cpp b/rpcs3/Emu/SysCalls/Modules/cellMic.cpp index 59d6803df8..28833558aa 100644 --- a/rpcs3/Emu/SysCalls/Modules/cellMic.cpp +++ b/rpcs3/Emu/SysCalls/Modules/cellMic.cpp @@ -290,51 +290,51 @@ void cellMic_unload() Module cellMic("cellMic", []() { - cellMic.AddFunc(0x8325e02d, cellMicInit); - cellMic.AddFunc(0xc6328caa, cellMicEnd); - cellMic.AddFunc(0xdd1b59f0, cellMicOpen); - cellMic.AddFunc(0x8d229f8e, cellMicClose); + REG_FUNC(cellMic, cellMicInit); + REG_FUNC(cellMic, cellMicEnd); + REG_FUNC(cellMic, cellMicOpen); + REG_FUNC(cellMic, cellMicClose); - cellMic.AddFunc(0x017024a8, cellMicGetDeviceGUID); - cellMic.AddFunc(0xa52d2ae4, cellMicGetType); - cellMic.AddFunc(0x1b42101b, cellMicIsAttached); - cellMic.AddFunc(0x186cb1fb, cellMicIsOpen); - cellMic.AddFunc(0x6a024aa0, cellMicGetDeviceAttr); - cellMic.AddFunc(0xb2c16321, cellMicSetDeviceAttr); - cellMic.AddFunc(0xac5ba03a, cellMicGetSignalAttr); - cellMic.AddFunc(0x323deb41, cellMicSetSignalAttr); - cellMic.AddFunc(0xb30780eb, cellMicGetSignalState); + REG_FUNC(cellMic, cellMicGetDeviceGUID); + REG_FUNC(cellMic, cellMicGetType); + REG_FUNC(cellMic, cellMicIsAttached); + REG_FUNC(cellMic, cellMicIsOpen); + REG_FUNC(cellMic, cellMicGetDeviceAttr); + REG_FUNC(cellMic, cellMicSetDeviceAttr); + REG_FUNC(cellMic, cellMicGetSignalAttr); + REG_FUNC(cellMic, cellMicSetSignalAttr); + REG_FUNC(cellMic, cellMicGetSignalState); - cellMic.AddFunc(0xdd724314, cellMicStart); - cellMic.AddFunc(0x07e1b12c, cellMicRead); - cellMic.AddFunc(0xfcfaf246, cellMicStop); - cellMic.AddFunc(0x6bc46aab, cellMicReset); + REG_FUNC(cellMic, cellMicStart); + REG_FUNC(cellMic, cellMicRead); + REG_FUNC(cellMic, cellMicStop); + REG_FUNC(cellMic, cellMicReset); - cellMic.AddFunc(0x7903400e, cellMicSetNotifyEventQueue); - cellMic.AddFunc(0x6cc7ae00, cellMicSetNotifyEventQueue2); - cellMic.AddFunc(0x65336418, cellMicRemoveNotifyEventQueue); + REG_FUNC(cellMic, cellMicSetNotifyEventQueue); + REG_FUNC(cellMic, cellMicSetNotifyEventQueue2); + REG_FUNC(cellMic, cellMicRemoveNotifyEventQueue); - cellMic.AddFunc(0x05709bbf, cellMicOpenEx); - cellMic.AddFunc(0xddd19a89, cellMicStartEx); - cellMic.AddFunc(0x4e0b69ee, cellMicGetFormatRaw); - cellMic.AddFunc(0xfda12276, cellMicGetFormatAux); - cellMic.AddFunc(0x87a08d29, cellMicGetFormatDsp); - cellMic.AddFunc(0xa42ac07a, cellMicOpenRaw); - cellMic.AddFunc(0x72165a7f, cellMicReadRaw); - cellMic.AddFunc(0x3acc118e, cellMicReadAux); - cellMic.AddFunc(0xc414faa5, cellMicReadDsp); + REG_FUNC(cellMic, cellMicOpenEx); + REG_FUNC(cellMic, cellMicStartEx); + REG_FUNC(cellMic, cellMicGetFormatRaw); + REG_FUNC(cellMic, cellMicGetFormatAux); + REG_FUNC(cellMic, cellMicGetFormatDsp); + REG_FUNC(cellMic, cellMicOpenRaw); + REG_FUNC(cellMic, cellMicReadRaw); + REG_FUNC(cellMic, cellMicReadAux); + REG_FUNC(cellMic, cellMicReadDsp); - cellMic.AddFunc(0x25c5723f, cellMicGetStatus); - cellMic.AddFunc(0xe839380f, cellMicStopEx); - cellMic.AddFunc(0x3ace58f3, cellMicSysShareClose); - cellMic.AddFunc(0x48108a23, cellMicGetFormat); - cellMic.AddFunc(0x891c6291, cellMicSetMultiMicNotifyEventQueue); - cellMic.AddFunc(0xad049ecf, cellMicGetFormatEx); - cellMic.AddFunc(0xbdfd51e2, cellMicSysShareStop); - cellMic.AddFunc(0xc3610dbd, cellMicSysShareOpen); - cellMic.AddFunc(0xc461563c, cellMicCommand); - cellMic.AddFunc(0xcac7e7d7, cellMicSysShareStart); - cellMic.AddFunc(0xd127cd3e, cellMicSysShareInit); - cellMic.AddFunc(0xf82bbf7c, cellMicSysShareEnd); - cellMic.AddFunc(0xfdbbe469, cellMicGetDeviceIdentifier); + REG_FUNC(cellMic, cellMicGetStatus); + REG_FUNC(cellMic, cellMicStopEx); + REG_FUNC(cellMic, cellMicSysShareClose); + REG_FUNC(cellMic, cellMicGetFormat); + REG_FUNC(cellMic, cellMicSetMultiMicNotifyEventQueue); + REG_FUNC(cellMic, cellMicGetFormatEx); + REG_FUNC(cellMic, cellMicSysShareStop); + REG_FUNC(cellMic, cellMicSysShareOpen); + REG_FUNC(cellMic, cellMicCommand); + REG_FUNC(cellMic, cellMicSysShareStart); + REG_FUNC(cellMic, cellMicSysShareInit); + REG_FUNC(cellMic, cellMicSysShareEnd); + REG_FUNC(cellMic, cellMicGetDeviceIdentifier); }); diff --git a/rpcs3/Emu/SysCalls/Modules/cellMouse.cpp b/rpcs3/Emu/SysCalls/Modules/cellMouse.cpp index 56945faf21..fc1cd1431f 100644 --- a/rpcs3/Emu/SysCalls/Modules/cellMouse.cpp +++ b/rpcs3/Emu/SysCalls/Modules/cellMouse.cpp @@ -131,14 +131,14 @@ int cellMouseGetRawData(u32 port_no, u32 data_addr) void cellMouse_init() { - sys_io.AddFunc(0xc9030138, cellMouseInit); - sys_io.AddFunc(0x3ef66b95, cellMouseClearBuf); - sys_io.AddFunc(0xe10183ce, cellMouseEnd); - sys_io.AddFunc(0x5baf30fb, cellMouseGetInfo); - sys_io.AddFunc(0x4d0b3b1f, cellMouseInfoTabletMode); - sys_io.AddFunc(0x3138e632, cellMouseGetData); - sys_io.AddFunc(0x6bd131f0, cellMouseGetDataList); - sys_io.AddFunc(0x2d16da4f, cellMouseSetTabletMode); - sys_io.AddFunc(0x21a62e9b, cellMouseGetTabletDataList); - sys_io.AddFunc(0xa328cc35, cellMouseGetRawData); + REG_FUNC(sys_io, cellMouseInit); + REG_FUNC(sys_io, cellMouseClearBuf); + REG_FUNC(sys_io, cellMouseEnd); + REG_FUNC(sys_io, cellMouseGetInfo); + REG_FUNC(sys_io, cellMouseInfoTabletMode); + REG_FUNC(sys_io, cellMouseGetData); + REG_FUNC(sys_io, cellMouseGetDataList); + REG_FUNC(sys_io, cellMouseSetTabletMode); + REG_FUNC(sys_io, cellMouseGetTabletDataList); + REG_FUNC(sys_io, cellMouseGetRawData); } diff --git a/rpcs3/Emu/SysCalls/Modules/cellMusicDecode.cpp b/rpcs3/Emu/SysCalls/Modules/cellMusicDecode.cpp index 82acd368b8..da47cfdcef 100644 --- a/rpcs3/Emu/SysCalls/Modules/cellMusicDecode.cpp +++ b/rpcs3/Emu/SysCalls/Modules/cellMusicDecode.cpp @@ -86,15 +86,15 @@ int cellMusicDecodeGetContentsId() void cellMusicDecode_init() { - cellMusicDecode.AddFunc(0xd55dbc11, cellMusicDecodeInitialize); - cellMusicDecode.AddFunc(0x84f154b2, cellMusicDecodeInitializeSystemWorkload); - cellMusicDecode.AddFunc(0xa8615dc8, cellMusicDecodeFinalize); - cellMusicDecode.AddFunc(0xf24cb963, cellMusicDecodeSelectContents); - cellMusicDecode.AddFunc(0x066bb1cf, cellMusicDecodeSetDecodeCommand); - cellMusicDecode.AddFunc(0x5af74c50, cellMusicDecodeGetDecodeStatus); - cellMusicDecode.AddFunc(0xa881b744, cellMusicDecodeRead); - cellMusicDecode.AddFunc(0xdbf70550, cellMusicDecodeGetSelectionContext); - cellMusicDecode.AddFunc(0xb84f5c81, cellMusicDecodeSetSelectionContext); - cellMusicDecode.AddFunc(0x58ab1999, cellMusicDecodeGetContentsId); + REG_FUNC(cellMusicDecode, cellMusicDecodeInitialize); + REG_FUNC(cellMusicDecode, cellMusicDecodeInitializeSystemWorkload); + REG_FUNC(cellMusicDecode, cellMusicDecodeFinalize); + REG_FUNC(cellMusicDecode, cellMusicDecodeSelectContents); + REG_FUNC(cellMusicDecode, cellMusicDecodeSetDecodeCommand); + REG_FUNC(cellMusicDecode, cellMusicDecodeGetDecodeStatus); + REG_FUNC(cellMusicDecode, cellMusicDecodeRead); + REG_FUNC(cellMusicDecode, cellMusicDecodeGetSelectionContext); + REG_FUNC(cellMusicDecode, cellMusicDecodeSetSelectionContext); + REG_FUNC(cellMusicDecode, cellMusicDecodeGetContentsId); } #endif diff --git a/rpcs3/Emu/SysCalls/Modules/cellMusicExport.cpp b/rpcs3/Emu/SysCalls/Modules/cellMusicExport.cpp index d8699348c6..0eccd57292 100644 --- a/rpcs3/Emu/SysCalls/Modules/cellMusicExport.cpp +++ b/rpcs3/Emu/SysCalls/Modules/cellMusicExport.cpp @@ -53,10 +53,10 @@ int cellMusicExportProgress() void cellMusicExport_init() { - cellMusicExport.AddFunc(0xb4c9b4f9, cellMusicExportInitialize); - cellMusicExport.AddFunc(0xe0443a44, cellMusicExportInitialize2); - cellMusicExport.AddFunc(0xe90effea, cellMusicExportFinalize); - cellMusicExport.AddFunc(0xb202f0e8, cellMusicExportFromFile); - cellMusicExport.AddFunc(0x92b50ebc, cellMusicExportProgress); + REG_FUNC(cellMusicExport, cellMusicExportInitialize); + REG_FUNC(cellMusicExport, cellMusicExportInitialize2); + REG_FUNC(cellMusicExport, cellMusicExportFinalize); + REG_FUNC(cellMusicExport, cellMusicExportFromFile); + REG_FUNC(cellMusicExport, cellMusicExportProgress); } #endif diff --git a/rpcs3/Emu/SysCalls/Modules/cellNetCtl.cpp b/rpcs3/Emu/SysCalls/Modules/cellNetCtl.cpp index ac6ba2ab74..5ea8f9c321 100644 --- a/rpcs3/Emu/SysCalls/Modules/cellNetCtl.cpp +++ b/rpcs3/Emu/SysCalls/Modules/cellNetCtl.cpp @@ -125,18 +125,18 @@ void cellNetCtl_unload() Module cellNetCtl("cellNetCtl", []() { - cellNetCtl.AddFunc(0xbd5a59fc, cellNetCtlInit); - cellNetCtl.AddFunc(0x105ee2cb, cellNetCtlTerm); + REG_FUNC(cellNetCtl, cellNetCtlInit); + REG_FUNC(cellNetCtl, cellNetCtlTerm); - cellNetCtl.AddFunc(0x8b3eba69, cellNetCtlGetState); - cellNetCtl.AddFunc(0x0ce13c6b, cellNetCtlAddHandler); - cellNetCtl.AddFunc(0x901815c3, cellNetCtlDelHandler); + REG_FUNC(cellNetCtl, cellNetCtlGetState); + REG_FUNC(cellNetCtl, cellNetCtlAddHandler); + REG_FUNC(cellNetCtl, cellNetCtlDelHandler); - cellNetCtl.AddFunc(0x1e585b5d, cellNetCtlGetInfo); + REG_FUNC(cellNetCtl, cellNetCtlGetInfo); - cellNetCtl.AddFunc(0x04459230, cellNetCtlNetStartDialogLoadAsync); - cellNetCtl.AddFunc(0x71d53210, cellNetCtlNetStartDialogAbortAsync); - cellNetCtl.AddFunc(0x0f1f13d3, cellNetCtlNetStartDialogUnloadAsync); + REG_FUNC(cellNetCtl, cellNetCtlNetStartDialogLoadAsync); + REG_FUNC(cellNetCtl, cellNetCtlNetStartDialogAbortAsync); + REG_FUNC(cellNetCtl, cellNetCtlNetStartDialogUnloadAsync); - cellNetCtl.AddFunc(0x3a12865f, cellNetCtlGetNatInfo); + REG_FUNC(cellNetCtl, cellNetCtlGetNatInfo); }); diff --git a/rpcs3/Emu/SysCalls/Modules/cellOvis.cpp b/rpcs3/Emu/SysCalls/Modules/cellOvis.cpp index 24b2e7162e..0c9c779f6a 100644 --- a/rpcs3/Emu/SysCalls/Modules/cellOvis.cpp +++ b/rpcs3/Emu/SysCalls/Modules/cellOvis.cpp @@ -38,8 +38,8 @@ int cellOvisInvalidateOverlappedSegments() Module cellOvis("cellOvis", []() { - cellOvis.AddFunc(0x82f294b2, cellOvisGetOverlayTableSize); - cellOvis.AddFunc(0xa876c911, cellOvisInitializeOverlayTable); - cellOvis.AddFunc(0xce6cb776, cellOvisFixSpuSegments); - cellOvis.AddFunc(0x629ba0c0, cellOvisInvalidateOverlappedSegments); + REG_FUNC(cellOvis, cellOvisGetOverlayTableSize); + REG_FUNC(cellOvis, cellOvisInitializeOverlayTable); + REG_FUNC(cellOvis, cellOvisFixSpuSegments); + REG_FUNC(cellOvis, cellOvisInvalidateOverlappedSegments); }); diff --git a/rpcs3/Emu/SysCalls/Modules/cellPad.cpp b/rpcs3/Emu/SysCalls/Modules/cellPad.cpp index 88b6b2505f..20b5c61a28 100644 --- a/rpcs3/Emu/SysCalls/Modules/cellPad.cpp +++ b/rpcs3/Emu/SysCalls/Modules/cellPad.cpp @@ -424,19 +424,19 @@ int cellPadSetSensorMode(u32 port_no, u32 mode) void cellPad_init() { - sys_io.AddFunc(0x1cf98800, cellPadInit); - sys_io.AddFunc(0x4d9b75d5, cellPadEnd); - sys_io.AddFunc(0x0d5f2c14, cellPadClearBuf); - sys_io.AddFunc(0x8b72cda1, cellPadGetData); - sys_io.AddFunc(0x6bc09c61, cellPadGetDataExtra); - sys_io.AddFunc(0xf65544ee, cellPadSetActDirect); - sys_io.AddFunc(0x3aaad464, cellPadGetInfo); - sys_io.AddFunc(0xa703a51d, cellPadGetInfo2); - sys_io.AddFunc(0x4cc9b68d, cellPadPeriphGetInfo); - sys_io.AddFunc(0x578e3c98, cellPadSetPortSetting); - sys_io.AddFunc(0x0e2dfaad, cellPadInfoPressMode); - sys_io.AddFunc(0x78200559, cellPadInfoSensorMode); - sys_io.AddFunc(0xf83f8182, cellPadSetPressMode); - sys_io.AddFunc(0xbe5be3ba, cellPadSetSensorMode); - sys_io.AddFunc(0xdbf4c59c, cellPadGetCapabilityInfo); + REG_FUNC(sys_io, cellPadInit); + REG_FUNC(sys_io, cellPadEnd); + REG_FUNC(sys_io, cellPadClearBuf); + REG_FUNC(sys_io, cellPadGetData); + REG_FUNC(sys_io, cellPadGetDataExtra); + REG_FUNC(sys_io, cellPadSetActDirect); + REG_FUNC(sys_io, cellPadGetInfo); + REG_FUNC(sys_io, cellPadGetInfo2); + REG_FUNC(sys_io, cellPadPeriphGetInfo); + REG_FUNC(sys_io, cellPadSetPortSetting); + REG_FUNC(sys_io, cellPadInfoPressMode); + REG_FUNC(sys_io, cellPadInfoSensorMode); + REG_FUNC(sys_io, cellPadSetPressMode); + REG_FUNC(sys_io, cellPadSetSensorMode); + REG_FUNC(sys_io, cellPadGetCapabilityInfo); } diff --git a/rpcs3/Emu/SysCalls/Modules/cellPamf.cpp b/rpcs3/Emu/SysCalls/Modules/cellPamf.cpp index d0c6d04863..22ad3eb8e8 100644 --- a/rpcs3/Emu/SysCalls/Modules/cellPamf.cpp +++ b/rpcs3/Emu/SysCalls/Modules/cellPamf.cpp @@ -736,27 +736,27 @@ s32 cellPamfEpIteratorMove(vm::ptr pIt, s32 steps, vm::ptr pTick0, vm::ptr pTick1) Module cellRtc("cellRtc", []() { - cellRtc.AddFunc(0x9dafc0d9, cellRtcGetCurrentTick); - cellRtc.AddFunc(0x32c941cf, cellRtcGetCurrentClock); - cellRtc.AddFunc(0x2cce9cf5, cellRtcGetCurrentClockLocalTime); + REG_FUNC(cellRtc, cellRtcGetCurrentTick); + REG_FUNC(cellRtc, cellRtcGetCurrentClock); + REG_FUNC(cellRtc, cellRtcGetCurrentClockLocalTime); - cellRtc.AddFunc(0x5491b9d5, cellRtcFormatRfc2822); - cellRtc.AddFunc(0xa07c3d2f, cellRtcFormatRfc2822LocalTime); - cellRtc.AddFunc(0xd9c0b463, cellRtcFormatRfc3339); - cellRtc.AddFunc(0x1324948a, cellRtcFormatRfc3339LocalTime); - cellRtc.AddFunc(0xc5bc0fac, cellRtcParseDateTime); - cellRtc.AddFunc(0xcf11c3d6, cellRtcParseRfc3339); + REG_FUNC(cellRtc, cellRtcFormatRfc2822); + REG_FUNC(cellRtc, cellRtcFormatRfc2822LocalTime); + REG_FUNC(cellRtc, cellRtcFormatRfc3339); + REG_FUNC(cellRtc, cellRtcFormatRfc3339LocalTime); + REG_FUNC(cellRtc, cellRtcParseDateTime); + REG_FUNC(cellRtc, cellRtcParseRfc3339); - cellRtc.AddFunc(0xc7bdb7eb, cellRtcGetTick); - cellRtc.AddFunc(0x99b13034, cellRtcSetTick); - cellRtc.AddFunc(0x269a1882, cellRtcTickAddTicks); - cellRtc.AddFunc(0xf8509925, cellRtcTickAddMicroseconds); - cellRtc.AddFunc(0xccce71bd, cellRtcTickAddSeconds); - cellRtc.AddFunc(0x2f010bfa, cellRtcTickAddMinutes); - cellRtc.AddFunc(0xd41d3bd2, cellRtcTickAddHours); - cellRtc.AddFunc(0x75744e2a, cellRtcTickAddDays); - cellRtc.AddFunc(0x64c63fd5, cellRtcTickAddWeeks); - cellRtc.AddFunc(0xe0ecbb45, cellRtcTickAddMonths); - cellRtc.AddFunc(0x332a74dd, cellRtcTickAddYears); - cellRtc.AddFunc(0xc48d5002, cellRtcConvertUtcToLocalTime); - cellRtc.AddFunc(0x46ca7fe0, cellRtcConvertLocalTimeToUtc); + REG_FUNC(cellRtc, cellRtcGetTick); + REG_FUNC(cellRtc, cellRtcSetTick); + REG_FUNC(cellRtc, cellRtcTickAddTicks); + REG_FUNC(cellRtc, cellRtcTickAddMicroseconds); + REG_FUNC(cellRtc, cellRtcTickAddSeconds); + REG_FUNC(cellRtc, cellRtcTickAddMinutes); + REG_FUNC(cellRtc, cellRtcTickAddHours); + REG_FUNC(cellRtc, cellRtcTickAddDays); + REG_FUNC(cellRtc, cellRtcTickAddWeeks); + REG_FUNC(cellRtc, cellRtcTickAddMonths); + REG_FUNC(cellRtc, cellRtcTickAddYears); + REG_FUNC(cellRtc, cellRtcConvertUtcToLocalTime); + REG_FUNC(cellRtc, cellRtcConvertLocalTimeToUtc); // (TODO: Time Information Manipulation Functions missing) - cellRtc.AddFunc(0xdfff32cf, cellRtcGetDosTime); - cellRtc.AddFunc(0xcb90c761, cellRtcGetTime_t); - cellRtc.AddFunc(0xe7086f05, cellRtcGetWin32FileTime); - cellRtc.AddFunc(0x9598d4b3, cellRtcSetDosTime); - cellRtc.AddFunc(0xbb543189, cellRtcSetTime_t); - cellRtc.AddFunc(0x5f68c268, cellRtcSetWin32FileTime); + REG_FUNC(cellRtc, cellRtcGetDosTime); + REG_FUNC(cellRtc, cellRtcGetTime_t); + REG_FUNC(cellRtc, cellRtcGetWin32FileTime); + REG_FUNC(cellRtc, cellRtcSetDosTime); + REG_FUNC(cellRtc, cellRtcSetTime_t); + REG_FUNC(cellRtc, cellRtcSetWin32FileTime); - cellRtc.AddFunc(0x5316b4a8, cellRtcIsLeapYear); - cellRtc.AddFunc(0x5b6a0a1d, cellRtcGetDaysInMonth); - cellRtc.AddFunc(0xc2d8cf95, cellRtcGetDayOfWeek); - cellRtc.AddFunc(0x7f1086e6, cellRtcCheckValid); + REG_FUNC(cellRtc, cellRtcIsLeapYear); + REG_FUNC(cellRtc, cellRtcGetDaysInMonth); + REG_FUNC(cellRtc, cellRtcGetDayOfWeek); + REG_FUNC(cellRtc, cellRtcCheckValid); - cellRtc.AddFunc(0xfb51fc61, cellRtcCompareTick); + REG_FUNC(cellRtc, cellRtcCompareTick); }); diff --git a/rpcs3/Emu/SysCalls/Modules/cellRudp.cpp b/rpcs3/Emu/SysCalls/Modules/cellRudp.cpp index c7b59517ed..1a3051f881 100644 --- a/rpcs3/Emu/SysCalls/Modules/cellRudp.cpp +++ b/rpcs3/Emu/SysCalls/Modules/cellRudp.cpp @@ -218,40 +218,40 @@ int cellRudpProcessEvents() void cellRudp_init() { - cellRudp.AddFunc(0x63f63545, cellRudpInit); - cellRudp.AddFunc(0xb6bcb4a1, cellRudpEnd); - cellRudp.AddFunc(0x6c0cff03, cellRudpEnableInternalIOThread); - cellRudp.AddFunc(0x7ed95e60, cellRudpSetEventHandler); - cellRudp.AddFunc(0x54f81789, cellRudpSetMaxSegmentSize); - cellRudp.AddFunc(0xfbf7e9e4, cellRudpGetMaxSegmentSize); + REG_FUNC(cellRudp, cellRudpInit); + REG_FUNC(cellRudp, cellRudpEnd); + REG_FUNC(cellRudp, cellRudpEnableInternalIOThread); + REG_FUNC(cellRudp, cellRudpSetEventHandler); + REG_FUNC(cellRudp, cellRudpSetMaxSegmentSize); + REG_FUNC(cellRudp, cellRudpGetMaxSegmentSize); - cellRudp.AddFunc(0x7dadc739, cellRudpCreateContext); - cellRudp.AddFunc(0x384ba777, cellRudpSetOption); - cellRudp.AddFunc(0xff9d259c, cellRudpGetOption); + REG_FUNC(cellRudp, cellRudpCreateContext); + REG_FUNC(cellRudp, cellRudpSetOption); + REG_FUNC(cellRudp, cellRudpGetOption); - cellRudp.AddFunc(0x74bfad12, cellRudpGetContextStatus); - cellRudp.AddFunc(0xcd1a3f23, cellRudpGetStatus); - cellRudp.AddFunc(0xd666931f, cellRudpGetLocalInfo); - cellRudp.AddFunc(0x576831ae, cellRudpGetRemoteInfo); + REG_FUNC(cellRudp, cellRudpGetContextStatus); + REG_FUNC(cellRudp, cellRudpGetStatus); + REG_FUNC(cellRudp, cellRudpGetLocalInfo); + REG_FUNC(cellRudp, cellRudpGetRemoteInfo); - cellRudp.AddFunc(0xee41e16a, cellRudpBind); - cellRudp.AddFunc(0xc407844f, cellRudpInitiate); - cellRudp.AddFunc(0xc1ad7ced, cellRudpActivate); - cellRudp.AddFunc(0x48d3eeac, cellRudpTerminate); + REG_FUNC(cellRudp, cellRudpBind); + REG_FUNC(cellRudp, cellRudpInitiate); + REG_FUNC(cellRudp, cellRudpActivate); + REG_FUNC(cellRudp, cellRudpTerminate); - cellRudp.AddFunc(0x92e4d899, cellRudpRead); - cellRudp.AddFunc(0x48c001b0, cellRudpWrite); - cellRudp.AddFunc(0x2cde989f, cellRudpGetSizeReadable); - cellRudp.AddFunc(0xa86b28e3, cellRudpGetSizeWritable); - cellRudp.AddFunc(0xa70737da, cellRudpFlush); + REG_FUNC(cellRudp, cellRudpRead); + REG_FUNC(cellRudp, cellRudpWrite); + REG_FUNC(cellRudp, cellRudpGetSizeReadable); + REG_FUNC(cellRudp, cellRudpGetSizeWritable); + REG_FUNC(cellRudp, cellRudpFlush); - cellRudp.AddFunc(0x6bc587e9, cellRudpPollCreate); - cellRudp.AddFunc(0x8ac398f1, cellRudpPollDestroy); - cellRudp.AddFunc(0xa3db855c, cellRudpPollControl); - cellRudp.AddFunc(0xd8310700, cellRudpPollWait); + REG_FUNC(cellRudp, cellRudpPollCreate); + REG_FUNC(cellRudp, cellRudpPollDestroy); + REG_FUNC(cellRudp, cellRudpPollControl); + REG_FUNC(cellRudp, cellRudpPollWait); //cellRudp.AddFunc(, cellRudpPollCancel); - cellRudp.AddFunc(0x6ee04954, cellRudpNetReceived); - cellRudp.AddFunc(0xfade48b2, cellRudpProcessEvents); + REG_FUNC(cellRudp, cellRudpNetReceived); + REG_FUNC(cellRudp, cellRudpProcessEvents); } #endif diff --git a/rpcs3/Emu/SysCalls/Modules/cellSail.cpp b/rpcs3/Emu/SysCalls/Modules/cellSail.cpp index 77c71102db..8132afd92e 100644 --- a/rpcs3/Emu/SysCalls/Modules/cellSail.cpp +++ b/rpcs3/Emu/SysCalls/Modules/cellSail.cpp @@ -880,141 +880,141 @@ int cellSailPlayerUnregisterSource() Module cellSail("cellSail", []() { - cellSail.AddFunc(0x346ebba3, cellSailMemAllocatorInitialize); + REG_FUNC(cellSail, cellSailMemAllocatorInitialize); - cellSail.AddFunc(0x4cc54f8e, cellSailFutureInitialize); - cellSail.AddFunc(0x9553af65, cellSailFutureFinalize); - cellSail.AddFunc(0x0c4cb439, cellSailFutureReset); - cellSail.AddFunc(0xa37fed15, cellSailFutureSet); - cellSail.AddFunc(0x3a2d806c, cellSailFutureGet); - cellSail.AddFunc(0x51ecf361, cellSailFutureIsDone); + REG_FUNC(cellSail, cellSailFutureInitialize); + REG_FUNC(cellSail, cellSailFutureFinalize); + REG_FUNC(cellSail, cellSailFutureReset); + REG_FUNC(cellSail, cellSailFutureSet); + REG_FUNC(cellSail, cellSailFutureGet); + REG_FUNC(cellSail, cellSailFutureIsDone); - cellSail.AddFunc(0xd5f9a15b, cellSailDescriptorGetStreamType); - cellSail.AddFunc(0x4c191088, cellSailDescriptorGetUri); - cellSail.AddFunc(0xbd1635f4, cellSailDescriptorGetMediaInfo); - cellSail.AddFunc(0x76b1a425, cellSailDescriptorSetAutoSelection); - cellSail.AddFunc(0x277adf21, cellSailDescriptorIsAutoSelection); - cellSail.AddFunc(0x0abb318b, cellSailDescriptorCreateDatabase); - cellSail.AddFunc(0x28336e89, cellSailDescriptorDestroyDatabase); - cellSail.AddFunc(0xc044fab1, cellSailDescriptorOpen); - cellSail.AddFunc(0x15fd6a2a, cellSailDescriptorClose); - cellSail.AddFunc(0x0d0c2f0c, cellSailDescriptorSetEs); - cellSail.AddFunc(0xdf5553ef, cellSailDescriptorClearEs); - cellSail.AddFunc(0xac9c3b1f, cellSailDescriptorGetCapabilities); - cellSail.AddFunc(0x92590d52, cellSailDescriptorInquireCapability); - cellSail.AddFunc(0xee94b99b, cellSailDescriptorSetParameter); + REG_FUNC(cellSail, cellSailDescriptorGetStreamType); + REG_FUNC(cellSail, cellSailDescriptorGetUri); + REG_FUNC(cellSail, cellSailDescriptorGetMediaInfo); + REG_FUNC(cellSail, cellSailDescriptorSetAutoSelection); + REG_FUNC(cellSail, cellSailDescriptorIsAutoSelection); + REG_FUNC(cellSail, cellSailDescriptorCreateDatabase); + REG_FUNC(cellSail, cellSailDescriptorDestroyDatabase); + REG_FUNC(cellSail, cellSailDescriptorOpen); + REG_FUNC(cellSail, cellSailDescriptorClose); + REG_FUNC(cellSail, cellSailDescriptorSetEs); + REG_FUNC(cellSail, cellSailDescriptorClearEs); + REG_FUNC(cellSail, cellSailDescriptorGetCapabilities); + REG_FUNC(cellSail, cellSailDescriptorInquireCapability); + REG_FUNC(cellSail, cellSailDescriptorSetParameter); - cellSail.AddFunc(0x3d0d3b72, cellSailSoundAdapterInitialize); - cellSail.AddFunc(0xd1462438, cellSailSoundAdapterFinalize); - cellSail.AddFunc(0x1c9d5e5a, cellSailSoundAdapterSetPreferredFormat); - cellSail.AddFunc(0x7eb8d6b5, cellSailSoundAdapterGetFrame); - cellSail.AddFunc(0xf25f197d, cellSailSoundAdapterGetFormat); - cellSail.AddFunc(0xeec22809, cellSailSoundAdapterUpdateAvSync); - cellSail.AddFunc(0x4ae979df, cellSailSoundAdapterPtsToTimePosition); + REG_FUNC(cellSail, cellSailSoundAdapterInitialize); + REG_FUNC(cellSail, cellSailSoundAdapterFinalize); + REG_FUNC(cellSail, cellSailSoundAdapterSetPreferredFormat); + REG_FUNC(cellSail, cellSailSoundAdapterGetFrame); + REG_FUNC(cellSail, cellSailSoundAdapterGetFormat); + REG_FUNC(cellSail, cellSailSoundAdapterUpdateAvSync); + REG_FUNC(cellSail, cellSailSoundAdapterPtsToTimePosition); - cellSail.AddFunc(0x1c983864, cellSailGraphicsAdapterInitialize); - cellSail.AddFunc(0x76488bb1, cellSailGraphicsAdapterFinalize); - cellSail.AddFunc(0x2e3ccb5e, cellSailGraphicsAdapterSetPreferredFormat); - cellSail.AddFunc(0x0247c69e, cellSailGraphicsAdapterGetFrame); - cellSail.AddFunc(0x018281a8, cellSailGraphicsAdapterGetFrame2); - cellSail.AddFunc(0xffd58aa4, cellSailGraphicsAdapterGetFormat); - cellSail.AddFunc(0x44a20e79, cellSailGraphicsAdapterUpdateAvSync); - cellSail.AddFunc(0x1872331b, cellSailGraphicsAdapterPtsToTimePosition); + REG_FUNC(cellSail, cellSailGraphicsAdapterInitialize); + REG_FUNC(cellSail, cellSailGraphicsAdapterFinalize); + REG_FUNC(cellSail, cellSailGraphicsAdapterSetPreferredFormat); + REG_FUNC(cellSail, cellSailGraphicsAdapterGetFrame); + REG_FUNC(cellSail, cellSailGraphicsAdapterGetFrame2); + REG_FUNC(cellSail, cellSailGraphicsAdapterGetFormat); + REG_FUNC(cellSail, cellSailGraphicsAdapterUpdateAvSync); + REG_FUNC(cellSail, cellSailGraphicsAdapterPtsToTimePosition); - cellSail.AddFunc(0x3dd9639a, cellSailAuReceiverInitialize); - cellSail.AddFunc(0xed58e3ec, cellSailAuReceiverFinalize); - cellSail.AddFunc(0x3a1132ed, cellSailAuReceiverGet); + REG_FUNC(cellSail, cellSailAuReceiverInitialize); + REG_FUNC(cellSail, cellSailAuReceiverFinalize); + REG_FUNC(cellSail, cellSailAuReceiverGet); - cellSail.AddFunc(0x67b4d01f, cellSailRendererAudioInitialize); - cellSail.AddFunc(0x06dd4174, cellSailRendererAudioFinalize); - cellSail.AddFunc(0xb7b4ecee, cellSailRendererAudioNotifyCallCompleted); - cellSail.AddFunc(0xf841a537, cellSailRendererAudioNotifyFrameDone); - cellSail.AddFunc(0x325039b9, cellSailRendererAudioNotifyOutputEos); + REG_FUNC(cellSail, cellSailRendererAudioInitialize); + REG_FUNC(cellSail, cellSailRendererAudioFinalize); + REG_FUNC(cellSail, cellSailRendererAudioNotifyCallCompleted); + REG_FUNC(cellSail, cellSailRendererAudioNotifyFrameDone); + REG_FUNC(cellSail, cellSailRendererAudioNotifyOutputEos); - cellSail.AddFunc(0x8d1ff475, cellSailRendererVideoInitialize); - cellSail.AddFunc(0x47055fea, cellSailRendererVideoFinalize); - cellSail.AddFunc(0x954f48f8, cellSailRendererVideoNotifyCallCompleted); - cellSail.AddFunc(0x5f77e8df, cellSailRendererVideoNotifyFrameDone); - cellSail.AddFunc(0xdff1cda2, cellSailRendererVideoNotifyOutputEos); + REG_FUNC(cellSail, cellSailRendererVideoInitialize); + REG_FUNC(cellSail, cellSailRendererVideoFinalize); + REG_FUNC(cellSail, cellSailRendererVideoNotifyCallCompleted); + REG_FUNC(cellSail, cellSailRendererVideoNotifyFrameDone); + REG_FUNC(cellSail, cellSailRendererVideoNotifyOutputEos); - cellSail.AddFunc(0x9d30bdce, cellSailSourceInitialize); - cellSail.AddFunc(0xee724c99, cellSailSourceFinalize); - cellSail.AddFunc(0x764ec2d2, cellSailSourceNotifyCallCompleted); - cellSail.AddFunc(0x54c53688, cellSailSourceNotifyInputEos); - cellSail.AddFunc(0x95ee1695, cellSailSourceNotifyStreamOut); - cellSail.AddFunc(0xf289f0cd, cellSailSourceNotifySessionError); - cellSail.AddFunc(0xf4009a94, cellSailSourceNotifyMediaStateChanged); + REG_FUNC(cellSail, cellSailSourceInitialize); + REG_FUNC(cellSail, cellSailSourceFinalize); + REG_FUNC(cellSail, cellSailSourceNotifyCallCompleted); + REG_FUNC(cellSail, cellSailSourceNotifyInputEos); + REG_FUNC(cellSail, cellSailSourceNotifyStreamOut); + REG_FUNC(cellSail, cellSailSourceNotifySessionError); + REG_FUNC(cellSail, cellSailSourceNotifyMediaStateChanged); //cellSail.AddFunc(, cellSailSourceCheck); - cellSail.AddFunc(0x3df98d41, cellSailSourceNotifyOpenCompleted); - cellSail.AddFunc(0x640c7278, cellSailSourceNotifyStartCompleted); - cellSail.AddFunc(0x7473970a, cellSailSourceNotifyStopCompleted); - cellSail.AddFunc(0x946ecca0, cellSailSourceNotifyReadCompleted); - cellSail.AddFunc(0xbdb2251a, cellSailSourceSetDiagHandler); - cellSail.AddFunc(0xc457b203, cellSailSourceNotifyCloseCompleted); + REG_FUNC(cellSail, cellSailSourceNotifyOpenCompleted); + REG_FUNC(cellSail, cellSailSourceNotifyStartCompleted); + REG_FUNC(cellSail, cellSailSourceNotifyStopCompleted); + REG_FUNC(cellSail, cellSailSourceNotifyReadCompleted); + REG_FUNC(cellSail, cellSailSourceSetDiagHandler); + REG_FUNC(cellSail, cellSailSourceNotifyCloseCompleted); - cellSail.AddFunc(0xb980b76e, cellSailMp4MovieGetBrand); - cellSail.AddFunc(0xd4049de0, cellSailMp4MovieIsCompatibleBrand); - cellSail.AddFunc(0x5783a454, cellSailMp4MovieGetMovieInfo); - cellSail.AddFunc(0x5faf802b, cellSailMp4MovieGetTrackByIndex); - cellSail.AddFunc(0x85b07126, cellSailMp4MovieGetTrackById); - cellSail.AddFunc(0xc2d90ec9, cellSailMp4MovieGetTrackByTypeAndIndex); - cellSail.AddFunc(0xa48be428, cellSailMp4TrackGetTrackInfo); - cellSail.AddFunc(0x72236ec1, cellSailMp4TrackGetTrackReferenceCount); - cellSail.AddFunc(0x5f44f64f, cellSailMp4TrackGetTrackReference); + REG_FUNC(cellSail, cellSailMp4MovieGetBrand); + REG_FUNC(cellSail, cellSailMp4MovieIsCompatibleBrand); + REG_FUNC(cellSail, cellSailMp4MovieGetMovieInfo); + REG_FUNC(cellSail, cellSailMp4MovieGetTrackByIndex); + REG_FUNC(cellSail, cellSailMp4MovieGetTrackById); + REG_FUNC(cellSail, cellSailMp4MovieGetTrackByTypeAndIndex); + REG_FUNC(cellSail, cellSailMp4TrackGetTrackInfo); + REG_FUNC(cellSail, cellSailMp4TrackGetTrackReferenceCount); + REG_FUNC(cellSail, cellSailMp4TrackGetTrackReference); //cellSail.AddFunc(, cellSailMp4ConvertTimeScale); - cellSail.AddFunc(0x6e83f5c0, cellSailAviMovieGetMovieInfo); - cellSail.AddFunc(0x3e908c56, cellSailAviMovieGetStreamByIndex); - cellSail.AddFunc(0xddebd2a5, cellSailAviMovieGetStreamByTypeAndIndex); - cellSail.AddFunc(0x10298371, cellSailAviMovieGetHeader); - cellSail.AddFunc(0xc09e2f23, cellSailAviStreamGetMediaType); - cellSail.AddFunc(0xcc3cca60, cellSailAviStreamGetHeader); + REG_FUNC(cellSail, cellSailAviMovieGetMovieInfo); + REG_FUNC(cellSail, cellSailAviMovieGetStreamByIndex); + REG_FUNC(cellSail, cellSailAviMovieGetStreamByTypeAndIndex); + REG_FUNC(cellSail, cellSailAviMovieGetHeader); + REG_FUNC(cellSail, cellSailAviStreamGetMediaType); + REG_FUNC(cellSail, cellSailAviStreamGetHeader); - cellSail.AddFunc(0x17932b26, cellSailPlayerInitialize); - cellSail.AddFunc(0x23654375, cellSailPlayerInitialize2); - cellSail.AddFunc(0x18b4629d, cellSailPlayerFinalize); - cellSail.AddFunc(0xbedccc74, cellSailPlayerRegisterSource); - cellSail.AddFunc(0x186b98d3, cellSailPlayerGetRegisteredProtocols); - cellSail.AddFunc(0x1139a206, cellSailPlayerSetSoundAdapter); - cellSail.AddFunc(0x18bcd21b, cellSailPlayerSetGraphicsAdapter); - cellSail.AddFunc(0xf5747e1f, cellSailPlayerSetAuReceiver); - cellSail.AddFunc(0x92eaf6ca, cellSailPlayerSetRendererAudio); - cellSail.AddFunc(0xecf56150, cellSailPlayerSetRendererVideo); - cellSail.AddFunc(0x5f7c7a6f, cellSailPlayerSetParameter); - cellSail.AddFunc(0x952269c9, cellSailPlayerGetParameter); - cellSail.AddFunc(0x6f0b1002, cellSailPlayerSubscribeEvent); - cellSail.AddFunc(0x69793952, cellSailPlayerUnsubscribeEvent); - cellSail.AddFunc(0x47632810, cellSailPlayerReplaceEventHandler); - cellSail.AddFunc(0xbdf21b0f, cellSailPlayerBoot); - cellSail.AddFunc(0xd7938b8d, cellSailPlayerCreateDescriptor); - cellSail.AddFunc(0xfc839bd4, cellSailPlayerDestroyDescriptor); - cellSail.AddFunc(0x7c8dff3b, cellSailPlayerAddDescriptor); - cellSail.AddFunc(0x9897fbd1, cellSailPlayerRemoveDescriptor); - cellSail.AddFunc(0x752f8585, cellSailPlayerGetDescriptorCount); - cellSail.AddFunc(0x75fca288, cellSailPlayerGetCurrentDescriptor); - cellSail.AddFunc(0x34ecc1b9, cellSailPlayerOpenStream); - cellSail.AddFunc(0x85beffcc, cellSailPlayerCloseStream); - cellSail.AddFunc(0x145f9b11, cellSailPlayerOpenEsAudio); - cellSail.AddFunc(0x477501f6, cellSailPlayerOpenEsVideo); - cellSail.AddFunc(0xa849d0a7, cellSailPlayerOpenEsUser); - cellSail.AddFunc(0x4fa5ad09, cellSailPlayerReopenEsAudio); - cellSail.AddFunc(0xf60a8a69, cellSailPlayerReopenEsVideo); - cellSail.AddFunc(0x7b6fa92e, cellSailPlayerReopenEsUser); - cellSail.AddFunc(0xbf9b8d72, cellSailPlayerCloseEsAudio); - cellSail.AddFunc(0x07924359, cellSailPlayerCloseEsVideo); - cellSail.AddFunc(0xaed9d6cd, cellSailPlayerCloseEsUser); - cellSail.AddFunc(0xe535b0d3, cellSailPlayerStart); - cellSail.AddFunc(0xeba8d4ec, cellSailPlayerStop); - cellSail.AddFunc(0x26563ddc, cellSailPlayerNext); - cellSail.AddFunc(0x950d53c1, cellSailPlayerCancel); - cellSail.AddFunc(0xd1d55a90, cellSailPlayerSetPaused); - cellSail.AddFunc(0xaafa17b8, cellSailPlayerIsPaused); - cellSail.AddFunc(0xfc5baf8a, cellSailPlayerSetRepeatMode); - cellSail.AddFunc(0x38144ecf, cellSailPlayerGetRepeatMode); - cellSail.AddFunc(0x91d287f6, cellSailPlayerSetEsAudioMuted); - cellSail.AddFunc(0xf1446a40, cellSailPlayerSetEsVideoMuted); - cellSail.AddFunc(0x09de25fd, cellSailPlayerIsEsAudioMuted); - cellSail.AddFunc(0xdbe32ed4, cellSailPlayerIsEsVideoMuted); - cellSail.AddFunc(0xcc987ba6, cellSailPlayerDumpImage); - cellSail.AddFunc(0x025b4974, cellSailPlayerUnregisterSource); + REG_FUNC(cellSail, cellSailPlayerInitialize); + REG_FUNC(cellSail, cellSailPlayerInitialize2); + REG_FUNC(cellSail, cellSailPlayerFinalize); + REG_FUNC(cellSail, cellSailPlayerRegisterSource); + REG_FUNC(cellSail, cellSailPlayerGetRegisteredProtocols); + REG_FUNC(cellSail, cellSailPlayerSetSoundAdapter); + REG_FUNC(cellSail, cellSailPlayerSetGraphicsAdapter); + REG_FUNC(cellSail, cellSailPlayerSetAuReceiver); + REG_FUNC(cellSail, cellSailPlayerSetRendererAudio); + REG_FUNC(cellSail, cellSailPlayerSetRendererVideo); + REG_FUNC(cellSail, cellSailPlayerSetParameter); + REG_FUNC(cellSail, cellSailPlayerGetParameter); + REG_FUNC(cellSail, cellSailPlayerSubscribeEvent); + REG_FUNC(cellSail, cellSailPlayerUnsubscribeEvent); + REG_FUNC(cellSail, cellSailPlayerReplaceEventHandler); + REG_FUNC(cellSail, cellSailPlayerBoot); + REG_FUNC(cellSail, cellSailPlayerCreateDescriptor); + REG_FUNC(cellSail, cellSailPlayerDestroyDescriptor); + REG_FUNC(cellSail, cellSailPlayerAddDescriptor); + REG_FUNC(cellSail, cellSailPlayerRemoveDescriptor); + REG_FUNC(cellSail, cellSailPlayerGetDescriptorCount); + REG_FUNC(cellSail, cellSailPlayerGetCurrentDescriptor); + REG_FUNC(cellSail, cellSailPlayerOpenStream); + REG_FUNC(cellSail, cellSailPlayerCloseStream); + REG_FUNC(cellSail, cellSailPlayerOpenEsAudio); + REG_FUNC(cellSail, cellSailPlayerOpenEsVideo); + REG_FUNC(cellSail, cellSailPlayerOpenEsUser); + REG_FUNC(cellSail, cellSailPlayerReopenEsAudio); + REG_FUNC(cellSail, cellSailPlayerReopenEsVideo); + REG_FUNC(cellSail, cellSailPlayerReopenEsUser); + REG_FUNC(cellSail, cellSailPlayerCloseEsAudio); + REG_FUNC(cellSail, cellSailPlayerCloseEsVideo); + REG_FUNC(cellSail, cellSailPlayerCloseEsUser); + REG_FUNC(cellSail, cellSailPlayerStart); + REG_FUNC(cellSail, cellSailPlayerStop); + REG_FUNC(cellSail, cellSailPlayerNext); + REG_FUNC(cellSail, cellSailPlayerCancel); + REG_FUNC(cellSail, cellSailPlayerSetPaused); + REG_FUNC(cellSail, cellSailPlayerIsPaused); + REG_FUNC(cellSail, cellSailPlayerSetRepeatMode); + REG_FUNC(cellSail, cellSailPlayerGetRepeatMode); + REG_FUNC(cellSail, cellSailPlayerSetEsAudioMuted); + REG_FUNC(cellSail, cellSailPlayerSetEsVideoMuted); + REG_FUNC(cellSail, cellSailPlayerIsEsAudioMuted); + REG_FUNC(cellSail, cellSailPlayerIsEsVideoMuted); + REG_FUNC(cellSail, cellSailPlayerDumpImage); + REG_FUNC(cellSail, cellSailPlayerUnregisterSource); }); diff --git a/rpcs3/Emu/SysCalls/Modules/cellSailRec.cpp b/rpcs3/Emu/SysCalls/Modules/cellSailRec.cpp index ba88dd083c..3a23954543 100644 --- a/rpcs3/Emu/SysCalls/Modules/cellSailRec.cpp +++ b/rpcs3/Emu/SysCalls/Modules/cellSailRec.cpp @@ -239,50 +239,50 @@ int cellSailRecorderDumpImage() void cellSailRec_init() { - cellSailRec.AddFunc(0xe14cae97, cellSailProfileSetEsAudioParameter); - cellSailRec.AddFunc(0x1422a425, cellSailProfileSetEsVideoParameter); - cellSailRec.AddFunc(0xe8d86c43, cellSailProfileSetStreamParameter); + REG_FUNC(cellSailRec, cellSailProfileSetEsAudioParameter); + REG_FUNC(cellSailRec, cellSailProfileSetEsVideoParameter); + REG_FUNC(cellSailRec, cellSailProfileSetStreamParameter); - cellSailRec.AddFunc(0xb3d30b0d, cellSailVideoConverterCanProcess); - cellSailRec.AddFunc(0x855da8c6, cellSailVideoConverterProcess); - cellSailRec.AddFunc(0xe16de678, cellSailVideoConverterCanGetResult); - cellSailRec.AddFunc(0xe15679fe, cellSailVideoConverterGetResult); + REG_FUNC(cellSailRec, cellSailVideoConverterCanProcess); + REG_FUNC(cellSailRec, cellSailVideoConverterProcess); + REG_FUNC(cellSailRec, cellSailVideoConverterCanGetResult); + REG_FUNC(cellSailRec, cellSailVideoConverterGetResult); //cellSailRec.AddFunc(, CellSailVideoConverterFuncProcessDone); - cellSailRec.AddFunc(0xbd591197, cellSailFeederAudioInitialize); - cellSailRec.AddFunc(0x899d1587, cellSailFeederAudioFinalize); - cellSailRec.AddFunc(0xc2e2f30d, cellSailFeederAudioNotifyCallCompleted); - cellSailRec.AddFunc(0x3c775cea, cellSailFeederAudioNotifyFrameOut); - cellSailRec.AddFunc(0x999c0dc5, cellSailFeederAudioNotifySessionEnd); - cellSailRec.AddFunc(0xaf310ae6, cellSailFeederAudioNotifySessionError); + REG_FUNC(cellSailRec, cellSailFeederAudioInitialize); + REG_FUNC(cellSailRec, cellSailFeederAudioFinalize); + REG_FUNC(cellSailRec, cellSailFeederAudioNotifyCallCompleted); + REG_FUNC(cellSailRec, cellSailFeederAudioNotifyFrameOut); + REG_FUNC(cellSailRec, cellSailFeederAudioNotifySessionEnd); + REG_FUNC(cellSailRec, cellSailFeederAudioNotifySessionError); - cellSailRec.AddFunc(0x57415dd3, cellSailFeederVideoInitialize); - cellSailRec.AddFunc(0x81bfeae8, cellSailFeederVideoFinalize); - cellSailRec.AddFunc(0xd84daeb9, cellSailFeederVideoNotifyCallCompleted); - cellSailRec.AddFunc(0xe5e0572a, cellSailFeederVideoNotifyFrameOut); - cellSailRec.AddFunc(0xbff6e8d3, cellSailFeederVideoNotifySessionEnd); - cellSailRec.AddFunc(0x86cae679, cellSailFeederVideoNotifySessionError); + REG_FUNC(cellSailRec, cellSailFeederVideoInitialize); + REG_FUNC(cellSailRec, cellSailFeederVideoFinalize); + REG_FUNC(cellSailRec, cellSailFeederVideoNotifyCallCompleted); + REG_FUNC(cellSailRec, cellSailFeederVideoNotifyFrameOut); + REG_FUNC(cellSailRec, cellSailFeederVideoNotifySessionEnd); + REG_FUNC(cellSailRec, cellSailFeederVideoNotifySessionError); - cellSailRec.AddFunc(0x7a52bf69, cellSailRecorderInitialize); - cellSailRec.AddFunc(0xf57d74e3, cellSailRecorderFinalize); - cellSailRec.AddFunc(0x3deae857, cellSailRecorderSetFeederAudio); - cellSailRec.AddFunc(0x4fec43a9, cellSailRecorderSetFeederVideo); - cellSailRec.AddFunc(0x0a3ea2a9, cellSailRecorderSetParameter); - cellSailRec.AddFunc(0xff20157b, cellSailRecorderGetParameter); + REG_FUNC(cellSailRec, cellSailRecorderInitialize); + REG_FUNC(cellSailRec, cellSailRecorderFinalize); + REG_FUNC(cellSailRec, cellSailRecorderSetFeederAudio); + REG_FUNC(cellSailRec, cellSailRecorderSetFeederVideo); + REG_FUNC(cellSailRec, cellSailRecorderSetParameter); + REG_FUNC(cellSailRec, cellSailRecorderGetParameter); //cellSailRec.AddFunc(, cellSailRecorderSubscribeEvent); //cellSailRec.AddFunc(, cellSailRecorderUnsubscribeEvent); //cellSailRec.AddFunc(, cellSailRecorderReplaceEventHandler); - cellSailRec.AddFunc(0xc4617ddc, cellSailRecorderBoot); - cellSailRec.AddFunc(0x50affdc1, cellSailRecorderCreateProfile); - cellSailRec.AddFunc(0x376c3926, cellSailRecorderDestroyProfile); - cellSailRec.AddFunc(0x49476a3d, cellSailRecorderCreateVideoConverter); - cellSailRec.AddFunc(0x455c4709, cellSailRecorderDestroyVideoConverter); - cellSailRec.AddFunc(0x10c81457, cellSailRecorderOpenStream); - cellSailRec.AddFunc(0xe3f56f62, cellSailRecorderCloseStream); - cellSailRec.AddFunc(0x4830faf8, cellSailRecorderStart); - cellSailRec.AddFunc(0x18ecc741, cellSailRecorderStop); - cellSailRec.AddFunc(0xd37fb694, cellSailRecorderCancel); + REG_FUNC(cellSailRec, cellSailRecorderBoot); + REG_FUNC(cellSailRec, cellSailRecorderCreateProfile); + REG_FUNC(cellSailRec, cellSailRecorderDestroyProfile); + REG_FUNC(cellSailRec, cellSailRecorderCreateVideoConverter); + REG_FUNC(cellSailRec, cellSailRecorderDestroyVideoConverter); + REG_FUNC(cellSailRec, cellSailRecorderOpenStream); + REG_FUNC(cellSailRec, cellSailRecorderCloseStream); + REG_FUNC(cellSailRec, cellSailRecorderStart); + REG_FUNC(cellSailRec, cellSailRecorderStop); + REG_FUNC(cellSailRec, cellSailRecorderCancel); - cellSailRec.AddFunc(0x37aad85f, cellSailRecorderDumpImage); + REG_FUNC(cellSailRec, cellSailRecorderDumpImage); } #endif diff --git a/rpcs3/Emu/SysCalls/Modules/cellScreenshot.cpp b/rpcs3/Emu/SysCalls/Modules/cellScreenshot.cpp index 14959e3d0b..3de06f9d20 100644 --- a/rpcs3/Emu/SysCalls/Modules/cellScreenshot.cpp +++ b/rpcs3/Emu/SysCalls/Modules/cellScreenshot.cpp @@ -50,9 +50,9 @@ int cellScreenShotDisable() void cellScreenshot_init() { - cellScreenshot.AddFunc(0xd3ad63e4, cellScreenShotSetParameter); - cellScreenshot.AddFunc(0x7a9c2243, cellScreenShotSetOverlayImage); - cellScreenshot.AddFunc(0x9e33ab8f, cellScreenShotEnable); - cellScreenshot.AddFunc(0xfc6f4e74, cellScreenShotDisable); + REG_FUNC(cellScreenshot, cellScreenShotSetParameter); + REG_FUNC(cellScreenshot, cellScreenShotSetOverlayImage); + REG_FUNC(cellScreenshot, cellScreenShotEnable); + REG_FUNC(cellScreenshot, cellScreenShotDisable); } #endif diff --git a/rpcs3/Emu/SysCalls/Modules/cellSearch.cpp b/rpcs3/Emu/SysCalls/Modules/cellSearch.cpp index d56f44ce2a..56cca5ec4f 100644 --- a/rpcs3/Emu/SysCalls/Modules/cellSearch.cpp +++ b/rpcs3/Emu/SysCalls/Modules/cellSearch.cpp @@ -152,25 +152,25 @@ int cellSearchEnd() void cellSearch_init() { - cellSearch.AddFunc(0xc81ccf8a, cellSearchInitialize); - cellSearch.AddFunc(0xbfab7616, cellSearchFinalize); - cellSearch.AddFunc(0x0a4c8295, cellSearchStartListSearch); - cellSearch.AddFunc(0x64fb0b76, cellSearchStartContentSearchInList); - cellSearch.AddFunc(0x0591826f, cellSearchStartContentSearch); - cellSearch.AddFunc(0xc0ed0522, cellSearchStartSceneSearchInVideo); - cellSearch.AddFunc(0x13524faa, cellSearchStartSceneSearch); - cellSearch.AddFunc(0x3b210319, cellSearchGetContentInfoByOffset); - cellSearch.AddFunc(0x9663a44b, cellSearchGetContentInfoByContentId); - cellSearch.AddFunc(0x540d9068, cellSearchGetOffsetByContentId); - cellSearch.AddFunc(0x94e21701, cellSearchGetContentIdByOffset); - cellSearch.AddFunc(0xd7a7a433, cellSearchGetContentInfoGameComment); - cellSearch.AddFunc(0x025ce169, cellSearchGetMusicSelectionContext); - cellSearch.AddFunc(0xed20e079, cellSearchGetMusicSelectionContextOfSingleTrack); - cellSearch.AddFunc(0xffb28491, cellSearchGetContentInfoPath); - cellSearch.AddFunc(0x37b5ba0c, cellSearchGetContentInfoPathMovieThumb); - cellSearch.AddFunc(0xe73cb0d2, cellSearchPrepareFile); - cellSearch.AddFunc(0x35cda406, cellSearchGetContentInfoDeveloperData); - cellSearch.AddFunc(0x8fe376a6, cellSearchCancel); - cellSearch.AddFunc(0x774033d6, cellSearchEnd); + REG_FUNC(cellSearch, cellSearchInitialize); + REG_FUNC(cellSearch, cellSearchFinalize); + REG_FUNC(cellSearch, cellSearchStartListSearch); + REG_FUNC(cellSearch, cellSearchStartContentSearchInList); + REG_FUNC(cellSearch, cellSearchStartContentSearch); + REG_FUNC(cellSearch, cellSearchStartSceneSearchInVideo); + REG_FUNC(cellSearch, cellSearchStartSceneSearch); + REG_FUNC(cellSearch, cellSearchGetContentInfoByOffset); + REG_FUNC(cellSearch, cellSearchGetContentInfoByContentId); + REG_FUNC(cellSearch, cellSearchGetOffsetByContentId); + REG_FUNC(cellSearch, cellSearchGetContentIdByOffset); + REG_FUNC(cellSearch, cellSearchGetContentInfoGameComment); + REG_FUNC(cellSearch, cellSearchGetMusicSelectionContext); + REG_FUNC(cellSearch, cellSearchGetMusicSelectionContextOfSingleTrack); + REG_FUNC(cellSearch, cellSearchGetContentInfoPath); + REG_FUNC(cellSearch, cellSearchGetContentInfoPathMovieThumb); + REG_FUNC(cellSearch, cellSearchPrepareFile); + REG_FUNC(cellSearch, cellSearchGetContentInfoDeveloperData); + REG_FUNC(cellSearch, cellSearchCancel); + REG_FUNC(cellSearch, cellSearchEnd); } #endif diff --git a/rpcs3/Emu/SysCalls/Modules/cellSheap.cpp b/rpcs3/Emu/SysCalls/Modules/cellSheap.cpp index c29c7e6781..5f6982b496 100644 --- a/rpcs3/Emu/SysCalls/Modules/cellSheap.cpp +++ b/rpcs3/Emu/SysCalls/Modules/cellSheap.cpp @@ -123,26 +123,26 @@ int cellKeySheapQueueDelete() void cellSheap_init() { - cellSheap.AddFunc(0xbbb47cd8, cellSheapInitialize); - cellSheap.AddFunc(0x4b1383fb, cellSheapAllocate); - cellSheap.AddFunc(0x5c5994bd, cellSheapFree); - cellSheap.AddFunc(0x37968718, cellSheapQueryMax); - cellSheap.AddFunc(0x7fa23275, cellSheapQueryFree); + REG_FUNC(cellSheap, cellSheapInitialize); + REG_FUNC(cellSheap, cellSheapAllocate); + REG_FUNC(cellSheap, cellSheapFree); + REG_FUNC(cellSheap, cellSheapQueryMax); + REG_FUNC(cellSheap, cellSheapQueryFree); // (TODO: Some cellKeySheap* functions are missing) - cellSheap.AddFunc(0xa1b25841, cellKeySheapInitialize); - cellSheap.AddFunc(0x4a5b9659, cellKeySheapBufferNew); - cellSheap.AddFunc(0xe6b37362, cellKeySheapBufferDelete); + REG_FUNC(cellSheap, cellKeySheapInitialize); + REG_FUNC(cellSheap, cellKeySheapBufferNew); + REG_FUNC(cellSheap, cellKeySheapBufferDelete); - cellSheap.AddFunc(0x3478e1e6, cellKeySheapMutexNew); - cellSheap.AddFunc(0x2452679f, cellKeySheapMutexDelete); - cellSheap.AddFunc(0xe897c835, cellKeySheapBarrierNew); - cellSheap.AddFunc(0xf6f5fbca, cellKeySheapBarrierDelete); - cellSheap.AddFunc(0x69a5861d, cellKeySheapSemaphoreNew); - cellSheap.AddFunc(0x73a45cf8, cellKeySheapSemaphoreDelete); - cellSheap.AddFunc(0xf01ac471, cellKeySheapRwmNew); - cellSheap.AddFunc(0xed136702, cellKeySheapRwmDelete); - cellSheap.AddFunc(0x987e260e, cellKeySheapQueueNew); - cellSheap.AddFunc(0x79a6abd0, cellKeySheapQueueDelete); + REG_FUNC(cellSheap, cellKeySheapMutexNew); + REG_FUNC(cellSheap, cellKeySheapMutexDelete); + REG_FUNC(cellSheap, cellKeySheapBarrierNew); + REG_FUNC(cellSheap, cellKeySheapBarrierDelete); + REG_FUNC(cellSheap, cellKeySheapSemaphoreNew); + REG_FUNC(cellSheap, cellKeySheapSemaphoreDelete); + REG_FUNC(cellSheap, cellKeySheapRwmNew); + REG_FUNC(cellSheap, cellKeySheapRwmDelete); + REG_FUNC(cellSheap, cellKeySheapQueueNew); + REG_FUNC(cellSheap, cellKeySheapQueueDelete); } #endif diff --git a/rpcs3/Emu/SysCalls/Modules/cellSsl.cpp b/rpcs3/Emu/SysCalls/Modules/cellSsl.cpp index cd6d3b7e45..3b53c3a142 100644 --- a/rpcs3/Emu/SysCalls/Modules/cellSsl.cpp +++ b/rpcs3/Emu/SysCalls/Modules/cellSsl.cpp @@ -90,21 +90,21 @@ int cellSslCertGetMd5Fingerprint() void cellSsl_init() { - cellSsl.AddFunc(0xfb02c9d2, cellSslInit); - cellSsl.AddFunc(0x1650aea4, cellSslEnd); + REG_FUNC(cellSsl, cellSslInit); + REG_FUNC(cellSsl, cellSslEnd); - cellSsl.AddFunc(0x571afaca, cellSslCertificateLoader); + REG_FUNC(cellSsl, cellSslCertificateLoader); - cellSsl.AddFunc(0x7b689ebc, cellSslCertGetSerialNumber); - cellSsl.AddFunc(0xf8206492, cellSslCertGetPublicKey); - cellSsl.AddFunc(0x8e505175, cellSslCertGetRsaPublicKeyModulus); - cellSsl.AddFunc(0x033c4905, cellSslCertGetRsaPublicKeyExponent); - cellSsl.AddFunc(0x31d9ba8d, cellSslCertGetNotBefore); - cellSsl.AddFunc(0x218b64da, cellSslCertGetNotAfter); - cellSsl.AddFunc(0x32c61bdf, cellSslCertGetSubjectName); - cellSsl.AddFunc(0xae6eb491, cellSslCertGetIssuerName); - cellSsl.AddFunc(0x766d3ca1, cellSslCertGetNameEntryCount); - cellSsl.AddFunc(0x006c4900, cellSslCertGetNameEntryInfo); - cellSsl.AddFunc(0x5e9253ca, cellSslCertGetMd5Fingerprint); + REG_FUNC(cellSsl, cellSslCertGetSerialNumber); + REG_FUNC(cellSsl, cellSslCertGetPublicKey); + REG_FUNC(cellSsl, cellSslCertGetRsaPublicKeyModulus); + REG_FUNC(cellSsl, cellSslCertGetRsaPublicKeyExponent); + REG_FUNC(cellSsl, cellSslCertGetNotBefore); + REG_FUNC(cellSsl, cellSslCertGetNotAfter); + REG_FUNC(cellSsl, cellSslCertGetSubjectName); + REG_FUNC(cellSsl, cellSslCertGetIssuerName); + REG_FUNC(cellSsl, cellSslCertGetNameEntryCount); + REG_FUNC(cellSsl, cellSslCertGetNameEntryInfo); + REG_FUNC(cellSsl, cellSslCertGetMd5Fingerprint); } #endif diff --git a/rpcs3/Emu/SysCalls/Modules/cellSubdisplay.cpp b/rpcs3/Emu/SysCalls/Modules/cellSubdisplay.cpp index b5d389ff32..5e642a01b5 100644 --- a/rpcs3/Emu/SysCalls/Modules/cellSubdisplay.cpp +++ b/rpcs3/Emu/SysCalls/Modules/cellSubdisplay.cpp @@ -76,16 +76,16 @@ int cellSubDisplayGetPeerList() Module cellSubdisplay("cellSubdisplay", []() { - cellSubdisplay.AddFunc(0xf9a7e8a5, cellSubDisplayInit); - cellSubdisplay.AddFunc(0x551d80a5, cellSubDisplayEnd); - cellSubdisplay.AddFunc(0x6595ce22, cellSubDisplayGetRequiredMemory); - cellSubdisplay.AddFunc(0xa5bccb47, cellSubDisplayStart); - cellSubdisplay.AddFunc(0x6d85ddb3, cellSubDisplayStop); + REG_FUNC(cellSubdisplay, cellSubDisplayInit); + REG_FUNC(cellSubdisplay, cellSubDisplayEnd); + REG_FUNC(cellSubdisplay, cellSubDisplayGetRequiredMemory); + REG_FUNC(cellSubdisplay, cellSubDisplayStart); + REG_FUNC(cellSubdisplay, cellSubDisplayStop); - cellSubdisplay.AddFunc(0x938ac642, cellSubDisplayGetVideoBuffer); - cellSubdisplay.AddFunc(0xaee1e0c2, cellSubDisplayAudioOutBlocking); - cellSubdisplay.AddFunc(0x5468d6b0, cellSubDisplayAudioOutNonBlocking); + REG_FUNC(cellSubdisplay, cellSubDisplayGetVideoBuffer); + REG_FUNC(cellSubdisplay, cellSubDisplayAudioOutBlocking); + REG_FUNC(cellSubdisplay, cellSubDisplayAudioOutNonBlocking); - cellSubdisplay.AddFunc(0x8a264d71, cellSubDisplayGetPeerNum); - cellSubdisplay.AddFunc(0xe2485f79, cellSubDisplayGetPeerList); + REG_FUNC(cellSubdisplay, cellSubDisplayGetPeerNum); + REG_FUNC(cellSubdisplay, cellSubDisplayGetPeerList); }); diff --git a/rpcs3/Emu/SysCalls/Modules/cellSync.cpp b/rpcs3/Emu/SysCalls/Modules/cellSync.cpp index 0894a4e53b..6e3f4af9dc 100644 --- a/rpcs3/Emu/SysCalls/Modules/cellSync.cpp +++ b/rpcs3/Emu/SysCalls/Modules/cellSync.cpp @@ -1858,50 +1858,50 @@ s32 _cellSyncLFQueueDetachLv2EventQueue(vm::ptr spus, u32 num, vm::ptr listNum, vm::ptr list Module cellUserInfo("cellUserInfo", []() { - cellUserInfo.AddFunc(0x2b761140, cellUserInfoGetStat); - cellUserInfo.AddFunc(0x3097cc1c, cellUserInfoSelectUser_ListType); - cellUserInfo.AddFunc(0x55123a25, cellUserInfoSelectUser_SetList); - cellUserInfo.AddFunc(0xb3516536, cellUserInfoEnableOverlay); - cellUserInfo.AddFunc(0xc55e338b, cellUserInfoGetList); + REG_FUNC(cellUserInfo, cellUserInfoGetStat); + REG_FUNC(cellUserInfo, cellUserInfoSelectUser_ListType); + REG_FUNC(cellUserInfo, cellUserInfoSelectUser_SetList); + REG_FUNC(cellUserInfo, cellUserInfoEnableOverlay); + REG_FUNC(cellUserInfo, cellUserInfoGetList); }); diff --git a/rpcs3/Emu/SysCalls/Modules/cellVdec.cpp b/rpcs3/Emu/SysCalls/Modules/cellVdec.cpp index 9bd76dacc0..b99cae0696 100644 --- a/rpcs3/Emu/SysCalls/Modules/cellVdec.cpp +++ b/rpcs3/Emu/SysCalls/Modules/cellVdec.cpp @@ -889,15 +889,15 @@ int cellVdecSetFrameRate(u32 handle, CellVdecFrameRate frc) Module cellVdec("cellVdec", []() { - cellVdec.AddFunc(0xff6f6ebe, cellVdecQueryAttr); - cellVdec.AddFunc(0xc982a84a, cellVdecQueryAttrEx); - cellVdec.AddFunc(0xb6bbcd5d, cellVdecOpen); - cellVdec.AddFunc(0x0053e2d8, cellVdecOpenEx); - cellVdec.AddFunc(0x16698e83, cellVdecClose); - cellVdec.AddFunc(0xc757c2aa, cellVdecStartSeq); - cellVdec.AddFunc(0x824433f0, cellVdecEndSeq); - cellVdec.AddFunc(0x2bf4ddd2, cellVdecDecodeAu); - cellVdec.AddFunc(0x807c861a, cellVdecGetPicture); - cellVdec.AddFunc(0x17c702b9, cellVdecGetPicItem); - cellVdec.AddFunc(0xe13ef6fc, cellVdecSetFrameRate); + REG_FUNC(cellVdec, cellVdecQueryAttr); + REG_FUNC(cellVdec, cellVdecQueryAttrEx); + REG_FUNC(cellVdec, cellVdecOpen); + REG_FUNC(cellVdec, cellVdecOpenEx); + REG_FUNC(cellVdec, cellVdecClose); + REG_FUNC(cellVdec, cellVdecStartSeq); + REG_FUNC(cellVdec, cellVdecEndSeq); + REG_FUNC(cellVdec, cellVdecDecodeAu); + REG_FUNC(cellVdec, cellVdecGetPicture); + REG_FUNC(cellVdec, cellVdecGetPicItem); + REG_FUNC(cellVdec, cellVdecSetFrameRate); }); diff --git a/rpcs3/Emu/SysCalls/Modules/cellVoice.cpp b/rpcs3/Emu/SysCalls/Modules/cellVoice.cpp index 1b568231fd..6268fc3357 100644 --- a/rpcs3/Emu/SysCalls/Modules/cellVoice.cpp +++ b/rpcs3/Emu/SysCalls/Modules/cellVoice.cpp @@ -233,39 +233,39 @@ int cellVoiceDebugTopology() void cellVoice_init() { - cellVoice.AddFunc(0xae6a21d5, cellVoiceConnectIPortToOPort); - cellVoice.AddFunc(0x2a01013e, cellVoiceCreateNotifyEventQueue); - cellVoice.AddFunc(0x2de54871, cellVoiceCreatePort); - cellVoice.AddFunc(0x9f70c475, cellVoiceDeletePort); - cellVoice.AddFunc(0x18d3df30, cellVoiceDisconnectIPortFromOPort); - cellVoice.AddFunc(0xe0e1ae12, cellVoiceEnd); - cellVoice.AddFunc(0xbef53a2b, cellVoiceGetBitRate); - cellVoice.AddFunc(0x474609e2, cellVoiceGetMuteFlag); - cellVoice.AddFunc(0xf629ed67, cellVoiceGetPortAttr); - cellVoice.AddFunc(0x54ac3519, cellVoiceGetPortInfo); - cellVoice.AddFunc(0xd6811aa7, cellVoiceGetSignalState); - cellVoice.AddFunc(0x762dc193, cellVoiceGetVolume); - cellVoice.AddFunc(0xc7cf1182, cellVoiceInit); - cellVoice.AddFunc(0xb1a2c38f, cellVoiceInitEx); - cellVoice.AddFunc(0x87c71b06, cellVoicePausePort); - cellVoice.AddFunc(0xd14e784d, cellVoicePausePortAll); - cellVoice.AddFunc(0xdd000886, cellVoiceRemoveNotifyEventQueue); - cellVoice.AddFunc(0xff0fa43a, cellVoiceResetPort); - cellVoice.AddFunc(0x7bf17b15, cellVoiceResumePort); - cellVoice.AddFunc(0x7f3963f7, cellVoiceResumePortAll); - cellVoice.AddFunc(0x7e60adc6, cellVoiceSetBitRate); - cellVoice.AddFunc(0xdde35a0c, cellVoiceSetMuteFlag); - cellVoice.AddFunc(0xd4d80ea5, cellVoiceSetMuteFlagAll); - cellVoice.AddFunc(0x35d84910, cellVoiceSetNotifyEventQueue); - cellVoice.AddFunc(0x9d0f4af1, cellVoiceSetPortAttr); - cellVoice.AddFunc(0xd5ae37d8, cellVoiceSetVolume); - cellVoice.AddFunc(0x0a563878, cellVoiceStart); - cellVoice.AddFunc(0x94d51f92, cellVoiceStartEx); - cellVoice.AddFunc(0xd3a84be1, cellVoiceStop); - cellVoice.AddFunc(0x2f24fea3, cellVoiceUpdatePort); - cellVoice.AddFunc(0x3dad26e7, cellVoiceWriteToIPort); - cellVoice.AddFunc(0x30f0b5ab, cellVoiceWriteToIPortEx); - cellVoice.AddFunc(0x36472c57, cellVoiceReadFromOPort); - cellVoice.AddFunc(0x20bafe31, cellVoiceDebugTopology); + REG_FUNC(cellVoice, cellVoiceConnectIPortToOPort); + REG_FUNC(cellVoice, cellVoiceCreateNotifyEventQueue); + REG_FUNC(cellVoice, cellVoiceCreatePort); + REG_FUNC(cellVoice, cellVoiceDeletePort); + REG_FUNC(cellVoice, cellVoiceDisconnectIPortFromOPort); + REG_FUNC(cellVoice, cellVoiceEnd); + REG_FUNC(cellVoice, cellVoiceGetBitRate); + REG_FUNC(cellVoice, cellVoiceGetMuteFlag); + REG_FUNC(cellVoice, cellVoiceGetPortAttr); + REG_FUNC(cellVoice, cellVoiceGetPortInfo); + REG_FUNC(cellVoice, cellVoiceGetSignalState); + REG_FUNC(cellVoice, cellVoiceGetVolume); + REG_FUNC(cellVoice, cellVoiceInit); + REG_FUNC(cellVoice, cellVoiceInitEx); + REG_FUNC(cellVoice, cellVoicePausePort); + REG_FUNC(cellVoice, cellVoicePausePortAll); + REG_FUNC(cellVoice, cellVoiceRemoveNotifyEventQueue); + REG_FUNC(cellVoice, cellVoiceResetPort); + REG_FUNC(cellVoice, cellVoiceResumePort); + REG_FUNC(cellVoice, cellVoiceResumePortAll); + REG_FUNC(cellVoice, cellVoiceSetBitRate); + REG_FUNC(cellVoice, cellVoiceSetMuteFlag); + REG_FUNC(cellVoice, cellVoiceSetMuteFlagAll); + REG_FUNC(cellVoice, cellVoiceSetNotifyEventQueue); + REG_FUNC(cellVoice, cellVoiceSetPortAttr); + REG_FUNC(cellVoice, cellVoiceSetVolume); + REG_FUNC(cellVoice, cellVoiceStart); + REG_FUNC(cellVoice, cellVoiceStartEx); + REG_FUNC(cellVoice, cellVoiceStop); + REG_FUNC(cellVoice, cellVoiceUpdatePort); + REG_FUNC(cellVoice, cellVoiceWriteToIPort); + REG_FUNC(cellVoice, cellVoiceWriteToIPortEx); + REG_FUNC(cellVoice, cellVoiceReadFromOPort); + REG_FUNC(cellVoice, cellVoiceDebugTopology); } #endif diff --git a/rpcs3/Emu/SysCalls/Modules/cellVpost.cpp b/rpcs3/Emu/SysCalls/Modules/cellVpost.cpp index eb0cad507e..bd681ef0bf 100644 --- a/rpcs3/Emu/SysCalls/Modules/cellVpost.cpp +++ b/rpcs3/Emu/SysCalls/Modules/cellVpost.cpp @@ -150,9 +150,9 @@ int cellVpostExec(u32 handle, vm::ptr inPicBuff, vm::ptr fmt, u32 g_count, u32 f_count, u32 v_count) +{ + std::string result; + + for (char c = *fmt++; c; c = *fmt++) + { + switch (c) + { + case '%': + { + const auto start = fmt - 1; + + // read flags + const bool plus_sign = *fmt == '+' ? fmt++, true : false; + const bool minus_sign = *fmt == '-' ? fmt++, true : false; + const bool space_sign = *fmt == ' ' ? fmt++, true : false; + const bool number_sign = *fmt == '#' ? fmt++, true : false; + const bool zero_padding = *fmt == '0' ? fmt++, true : false; + + // read width + const u32 width = [&]() -> u32 + { + u32 width = 0; + + if (*fmt == '*') + { + fmt++; + return context.get_next_gpr_arg(g_count, f_count, v_count); + } + + while (*fmt - '0' < 10) + { + width = width * 10 + (*fmt++ - '0'); + } + + return width; + }(); + + // read precision + const u32 prec = [&]() -> u32 + { + u32 prec = 0; + + if (*fmt != '.') + { + return 0; + } + + if (*++fmt == '*') + { + fmt++; + return context.get_next_gpr_arg(g_count, f_count, v_count); + } + + while (*fmt - '0' < 10) + { + prec = prec * 10 + (*fmt++ - '0'); + } + + return prec; + }(); + + switch (char cf = *fmt++) + { + case '%': + { + if (plus_sign || minus_sign || space_sign || number_sign || zero_padding || width || prec) break; + + result += '%'; + continue; + } + case 'd': + case 'i': + { + // signed decimal + const s64 value = context.get_next_gpr_arg(g_count, f_count, v_count); + + if (plus_sign || minus_sign || space_sign || number_sign || zero_padding || width || prec) break; + + result += fmt::to_sdec(value); + continue; + } + case 'x': + case 'X': + { + // hexadecimal + const u64 value = context.get_next_gpr_arg(g_count, f_count, v_count); + + if (plus_sign || minus_sign || space_sign || prec) break; + + if (number_sign && value) + { + result += cf == 'x' ? "0x" : "0X"; + } + + const std::string& hex = cf == 'x' ? fmt::to_hex(value) : fmt::toupper(fmt::to_hex(value)); + + if (hex.length() >= width) + { + result += hex; + } + else if (zero_padding) + { + result += std::string(width - hex.length(), '0') + hex; + } + else + { + result += hex + std::string(width - hex.length(), ' '); + } + continue; + } + case 's': + { + // string + auto string = vm::ptr::make(context.get_next_gpr_arg(g_count, f_count, v_count)); + + if (plus_sign || minus_sign || space_sign || number_sign || zero_padding || width || prec) break; + + result += string.get_ptr(); + continue; + } + } + + throw fmt::format("ps3_fmt(): unknown formatting: '%s'", start.get_ptr()); + } + } + + result += c; + } + + return result; +} + int _sys_heap_create_heap(const u32 heap_addr, const u32 align, const u32 size) { sysPrxForUser.Warning("_sys_heap_create_heap(heap_addr=0x%x, align=0x%x, size=0x%x)", heap_addr, align, size); @@ -393,12 +527,26 @@ s32 _sys_spu_printf_detach_thread(PPUThread& CPU, u32 thread) return spu_printf_dtcb(CPU, thread); } -s32 _sys_snprintf(vm::ptr dst, u32 count, vm::ptr fmt) // va_args... +s32 _sys_snprintf(PPUThread& CPU, vm::ptr dst, u32 count, vm::ptr fmt) // va_args... { - sysPrxForUser.Todo("_sys_snprintf(dst_addr=0x%x, count=%d, fmt_addr=0x%x['%s'], ...)", dst.addr(), count, fmt.addr(), fmt.get_ptr()); + sysPrxForUser.Warning("_sys_snprintf(dst=0x%x, count=%d, fmt=0x%x, ...)", dst, count, fmt); - Emu.Pause(); - return 0; + std::string result = ps3_fmt(CPU, fmt, 3, 0, 0); + + sysPrxForUser.Warning("*** '%s' -> '%s'", fmt.get_ptr(), result); + + if (!count) + { + return 0; // ??? + } + else + { + count = (u32)std::min(count - 1, result.size()); + + memcpy(dst.get_ptr(), result.c_str(), count); + dst[count] = 0; + return count; + } } s32 _sys_printf(vm::ptr fmt) // va_args... @@ -411,7 +559,7 @@ s32 _sys_printf(vm::ptr fmt) // va_args... return CELL_OK; } -s32 _unnamed_E75C40F2(u32 dest) +s32 _nid_E75C40F2(u32 dest) { sysPrxForUser.Todo("Unnamed function 0xE75C40F2 (dest=0x%x) -> CELL_ENOENT", dest); @@ -444,66 +592,66 @@ Module sysPrxForUser("sysPrxForUser", []() REG_FUNC(sysPrxForUser, sys_lwmutex_trylock); REG_FUNC(sysPrxForUser, sys_lwmutex_unlock); - sysPrxForUser.AddFunc(0x8461e528, sys_time_get_system_time); + REG_FUNC(sysPrxForUser, sys_time_get_system_time); - sysPrxForUser.AddFunc(0xe6f2c1e7, sys_process_exit); - sysPrxForUser.AddFunc(0x2c847572, _sys_process_atexitspawn); - sysPrxForUser.AddFunc(0x96328741, _sys_process_at_Exitspawn); - sysPrxForUser.AddFunc(0x4f7172c9, sys_process_is_stack); + REG_FUNC(sysPrxForUser, sys_process_exit); + REG_FUNC(sysPrxForUser, _sys_process_atexitspawn); + REG_FUNC(sysPrxForUser, _sys_process_at_Exitspawn); + REG_FUNC(sysPrxForUser, sys_process_is_stack); - sysPrxForUser.AddFunc(0x24a1ea07, sys_ppu_thread_create); - sysPrxForUser.AddFunc(0x350d454e, sys_ppu_thread_get_id); - sysPrxForUser.AddFunc(0xaff080a4, sys_ppu_thread_exit); - sysPrxForUser.AddFunc(0xa3e3be68, sys_ppu_thread_once); + REG_FUNC(sysPrxForUser, sys_ppu_thread_create); + REG_FUNC(sysPrxForUser, sys_ppu_thread_get_id); + REG_FUNC(sysPrxForUser, sys_ppu_thread_exit); + REG_FUNC(sysPrxForUser, sys_ppu_thread_once); - sysPrxForUser.AddFunc(0x26090058, sys_prx_load_module); - sysPrxForUser.AddFunc(0x9f18429d, sys_prx_start_module); - sysPrxForUser.AddFunc(0x80fb0c19, sys_prx_stop_module); - sysPrxForUser.AddFunc(0xf0aece0d, sys_prx_unload_module); - sysPrxForUser.AddFunc(0x42b23552, sys_prx_register_library); - sysPrxForUser.AddFunc(0xd0ea47a7, sys_prx_unregister_library); - sysPrxForUser.AddFunc(0xa5d06bf0, sys_prx_get_module_list); - sysPrxForUser.AddFunc(0x84bb6774, sys_prx_get_module_info); - sysPrxForUser.AddFunc(0xe0998dbf, sys_prx_get_module_id_by_name); - sysPrxForUser.AddFunc(0xaa6d9bff, sys_prx_load_module_on_memcontainer); - sysPrxForUser.AddFunc(0xa2c7ba64, sys_prx_exitspawn_with_level); + REG_FUNC(sysPrxForUser, sys_prx_load_module); + REG_FUNC(sysPrxForUser, sys_prx_start_module); + REG_FUNC(sysPrxForUser, sys_prx_stop_module); + REG_FUNC(sysPrxForUser, sys_prx_unload_module); + REG_FUNC(sysPrxForUser, sys_prx_register_library); + REG_FUNC(sysPrxForUser, sys_prx_unregister_library); + REG_FUNC(sysPrxForUser, sys_prx_get_module_list); + REG_FUNC(sysPrxForUser, sys_prx_get_module_info); + REG_FUNC(sysPrxForUser, sys_prx_get_module_id_by_name); + REG_FUNC(sysPrxForUser, sys_prx_load_module_on_memcontainer); + REG_FUNC(sysPrxForUser, sys_prx_exitspawn_with_level); - sysPrxForUser.AddFunc(0x35168520, _sys_heap_malloc); - //sysPrxForUser.AddFunc(0xaede4b03, _sys_heap_free); - //sysPrxForUser.AddFunc(0x8a561d92, _sys_heap_delete_heap); - sysPrxForUser.AddFunc(0xb2fcf2c8, _sys_heap_create_heap); - sysPrxForUser.AddFunc(0x44265c08, _sys_heap_memalign); + REG_FUNC(sysPrxForUser, _sys_heap_malloc); + //REG_FUNC(sysPrxForUser, _sys_heap_free); + //REG_FUNC(sysPrxForUser, _sys_heap_delete_heap); + REG_FUNC(sysPrxForUser, _sys_heap_create_heap); + REG_FUNC(sysPrxForUser, _sys_heap_memalign); - sysPrxForUser.AddFunc(0xb257540b, sys_mmapper_allocate_memory); - sysPrxForUser.AddFunc(0x70258515, sys_mmapper_allocate_memory_from_container); - sysPrxForUser.AddFunc(0xdc578057, sys_mmapper_map_memory); - sysPrxForUser.AddFunc(0x4643ba6e, sys_mmapper_unmap_memory); - sysPrxForUser.AddFunc(0x409ad939, sys_mmapper_free_memory); + REG_FUNC(sysPrxForUser, sys_mmapper_allocate_memory); + REG_FUNC(sysPrxForUser, sys_mmapper_allocate_memory_from_container); + REG_FUNC(sysPrxForUser, sys_mmapper_map_memory); + REG_FUNC(sysPrxForUser, sys_mmapper_unmap_memory); + REG_FUNC(sysPrxForUser, sys_mmapper_free_memory); - sysPrxForUser.AddFunc(0x1ed454ce, sys_spu_elf_get_information); - sysPrxForUser.AddFunc(0xdb6b3250, sys_spu_elf_get_segments); - sysPrxForUser.AddFunc(0xebe5f72f, sys_spu_image_import); - sysPrxForUser.AddFunc(0xe0da8efd, sys_spu_image_close); + REG_FUNC(sysPrxForUser, sys_spu_elf_get_information); + REG_FUNC(sysPrxForUser, sys_spu_elf_get_segments); + REG_FUNC(sysPrxForUser, sys_spu_image_import); + REG_FUNC(sysPrxForUser, sys_spu_image_close); - sysPrxForUser.AddFunc(0x893305fa, sys_raw_spu_load); - sysPrxForUser.AddFunc(0xb995662e, sys_raw_spu_image_load); + REG_FUNC(sysPrxForUser, sys_raw_spu_load); + REG_FUNC(sysPrxForUser, sys_raw_spu_image_load); - sysPrxForUser.AddFunc(0xda0eb71a, sys_lwcond_create); - sysPrxForUser.AddFunc(0x1c9a942c, sys_lwcond_destroy); - sysPrxForUser.AddFunc(0xef87a695, sys_lwcond_signal); - sysPrxForUser.AddFunc(0xe9a1bd84, sys_lwcond_signal_all); - sysPrxForUser.AddFunc(0x52aadadf, sys_lwcond_signal_to); - sysPrxForUser.AddFunc(0x2a6d9d51, sys_lwcond_wait); + REG_FUNC(sysPrxForUser, sys_lwcond_create); + REG_FUNC(sysPrxForUser, sys_lwcond_destroy); + REG_FUNC(sysPrxForUser, sys_lwcond_signal); + REG_FUNC(sysPrxForUser, sys_lwcond_signal_all); + REG_FUNC(sysPrxForUser, sys_lwcond_signal_to); + REG_FUNC(sysPrxForUser, sys_lwcond_wait); - sysPrxForUser.AddFunc(0x71a8472a, sys_get_random_number); + REG_FUNC(sysPrxForUser, sys_get_random_number); - sysPrxForUser.AddFunc(0x8c2bb498, sys_spinlock_initialize); - sysPrxForUser.AddFunc(0xa285139d, sys_spinlock_lock); - sysPrxForUser.AddFunc(0x722a0254, sys_spinlock_trylock); - sysPrxForUser.AddFunc(0x5267cb35, sys_spinlock_unlock); + REG_FUNC(sysPrxForUser, sys_spinlock_initialize); + REG_FUNC(sysPrxForUser, sys_spinlock_lock); + REG_FUNC(sysPrxForUser, sys_spinlock_trylock); + REG_FUNC(sysPrxForUser, sys_spinlock_unlock); - sysPrxForUser.AddFunc(0x67f9fedb, sys_game_process_exitspawn2); - sysPrxForUser.AddFunc(0xfc52a7a9, sys_game_process_exitspawn); + REG_FUNC(sysPrxForUser, sys_game_process_exitspawn2); + REG_FUNC(sysPrxForUser, sys_game_process_exitspawn); REG_FUNC(sysPrxForUser, _sys_memset); REG_FUNC(sysPrxForUser, _sys_memcpy); @@ -525,5 +673,6 @@ Module sysPrxForUser("sysPrxForUser", []() REG_FUNC(sysPrxForUser, _sys_snprintf); REG_FUNC(sysPrxForUser, _sys_printf); - sysPrxForUser.AddFunc(0xe75c40f2, _unnamed_E75C40F2); // real name is unknown -}); \ No newline at end of file + + sysPrxForUser.AddFunc<_nid_E75C40F2>(0xE75C40F2, _nid_E75C40F2); +}); diff --git a/rpcs3/Emu/SysCalls/Modules/sys_http.cpp b/rpcs3/Emu/SysCalls/Modules/sys_http.cpp index b96bbebafa..94aa8fb720 100644 --- a/rpcs3/Emu/SysCalls/Modules/sys_http.cpp +++ b/rpcs3/Emu/SysCalls/Modules/sys_http.cpp @@ -590,115 +590,115 @@ void sys_http_init() { // (TODO: Find addresses for cellHttpClientSetSendBufferSize and cellHttpClientGetSendBufferSize) - sys_http.AddFunc(0x250c386c, cellHttpInit); - sys_http.AddFunc(0xd276ff1f, cellHttpEnd); - sys_http.AddFunc(0x522180bc, cellHttpsInit); - sys_http.AddFunc(0xe6d4202f, cellHttpsEnd); - sys_http.AddFunc(0x0d896b97, cellHttpSetProxy); - sys_http.AddFunc(0x2a87603a, cellHttpGetProxy); + REG_FUNC(sys_http, cellHttpInit); + REG_FUNC(sys_http, cellHttpEnd); + REG_FUNC(sys_http, cellHttpsInit); + REG_FUNC(sys_http, cellHttpsEnd); + REG_FUNC(sys_http, cellHttpSetProxy); + REG_FUNC(sys_http, cellHttpGetProxy); - sys_http.AddFunc(0x9638f766, cellHttpInitCookie); - sys_http.AddFunc(0x61b2bade, cellHttpEndCookie); - sys_http.AddFunc(0x1b5bdcc6, cellHttpAddCookieWithClientId); - sys_http.AddFunc(0xad6a2e5b, cellHttpSessionCookieFlush); - sys_http.AddFunc(0xf972c733, cellHttpCookieExportWithClientId); - sys_http.AddFunc(0x0d846d63, cellHttpCookieImportWithClientId); - sys_http.AddFunc(0x4d915204, cellHttpClientSetCookieSendCallback); - sys_http.AddFunc(0x13fe767b, cellHttpClientSetCookieRecvCallback); + REG_FUNC(sys_http, cellHttpInitCookie); + REG_FUNC(sys_http, cellHttpEndCookie); + REG_FUNC(sys_http, cellHttpAddCookieWithClientId); + REG_FUNC(sys_http, cellHttpSessionCookieFlush); + REG_FUNC(sys_http, cellHttpCookieExportWithClientId); + REG_FUNC(sys_http, cellHttpCookieImportWithClientId); + REG_FUNC(sys_http, cellHttpClientSetCookieSendCallback); + REG_FUNC(sys_http, cellHttpClientSetCookieRecvCallback); - sys_http.AddFunc(0x4e4ee53a, cellHttpCreateClient); - sys_http.AddFunc(0x980855ac, cellHttpDestroyClient); - sys_http.AddFunc(0x660d42a9, cellHttpClientSetAuthenticationCallback); - sys_http.AddFunc(0xb6feb84b, cellHttpClientSetTransactionStateCallback); - sys_http.AddFunc(0x473cd9f1, cellHttpClientSetRedirectCallback); + REG_FUNC(sys_http, cellHttpCreateClient); + REG_FUNC(sys_http, cellHttpDestroyClient); + REG_FUNC(sys_http, cellHttpClientSetAuthenticationCallback); + REG_FUNC(sys_http, cellHttpClientSetTransactionStateCallback); + REG_FUNC(sys_http, cellHttpClientSetRedirectCallback); - sys_http.AddFunc(0xd7d3cd5d, cellHttpClientSetProxy); - sys_http.AddFunc(0x4d40cf98, cellHttpClientGetProxy); - sys_http.AddFunc(0x40547d8b, cellHttpClientSetVersion); - sys_http.AddFunc(0xdc405507, cellHttpClientGetVersion); - sys_http.AddFunc(0x296a46cf, cellHttpClientSetPipeline); - sys_http.AddFunc(0x2a1f28f6, cellHttpClientGetPipeline); - sys_http.AddFunc(0x5d473170, cellHttpClientSetKeepAlive); - sys_http.AddFunc(0x591c21a8, cellHttpClientGetKeepAlive); - sys_http.AddFunc(0x211d8ba3, cellHttpClientSetAutoRedirect); - sys_http.AddFunc(0x2960e309, cellHttpClientGetAutoRedirect); - sys_http.AddFunc(0x8eaf47a3, cellHttpClientSetAutoAuthentication); - sys_http.AddFunc(0x5980a293, cellHttpClientGetAutoAuthentication); - sys_http.AddFunc(0x6eed4999, cellHttpClientSetAuthenticationCacheStatus); - sys_http.AddFunc(0xfce39343, cellHttpClientGetAuthenticationCacheStatus); - sys_http.AddFunc(0x434419c8, cellHttpClientSetCookieStatus); - sys_http.AddFunc(0xeb9c1e5e, cellHttpClientGetCookieStatus); - sys_http.AddFunc(0xcac9fc34, cellHttpClientSetUserAgent); - sys_http.AddFunc(0xee05b0c1, cellHttpClientGetUserAgent); - sys_http.AddFunc(0xadd66b5c, cellHttpClientSetResponseBufferMax); - sys_http.AddFunc(0x6884cdb7, cellHttpClientGetResponseBufferMax); + REG_FUNC(sys_http, cellHttpClientSetProxy); + REG_FUNC(sys_http, cellHttpClientGetProxy); + REG_FUNC(sys_http, cellHttpClientSetVersion); + REG_FUNC(sys_http, cellHttpClientGetVersion); + REG_FUNC(sys_http, cellHttpClientSetPipeline); + REG_FUNC(sys_http, cellHttpClientGetPipeline); + REG_FUNC(sys_http, cellHttpClientSetKeepAlive); + REG_FUNC(sys_http, cellHttpClientGetKeepAlive); + REG_FUNC(sys_http, cellHttpClientSetAutoRedirect); + REG_FUNC(sys_http, cellHttpClientGetAutoRedirect); + REG_FUNC(sys_http, cellHttpClientSetAutoAuthentication); + REG_FUNC(sys_http, cellHttpClientGetAutoAuthentication); + REG_FUNC(sys_http, cellHttpClientSetAuthenticationCacheStatus); + REG_FUNC(sys_http, cellHttpClientGetAuthenticationCacheStatus); + REG_FUNC(sys_http, cellHttpClientSetCookieStatus); + REG_FUNC(sys_http, cellHttpClientGetCookieStatus); + REG_FUNC(sys_http, cellHttpClientSetUserAgent); + REG_FUNC(sys_http, cellHttpClientGetUserAgent); + REG_FUNC(sys_http, cellHttpClientSetResponseBufferMax); + REG_FUNC(sys_http, cellHttpClientGetResponseBufferMax); - sys_http.AddFunc(0x2033b878, cellHttpClientCloseAllConnections); - sys_http.AddFunc(0x27f86d70, cellHttpClientCloseConnections); - sys_http.AddFunc(0xadc0a4b2, cellHttpClientPollConnections); - sys_http.AddFunc(0x224e1610, cellHttpClientSetRecvTimeout); - sys_http.AddFunc(0xba78e51f, cellHttpClientGetRecvTimeout); - sys_http.AddFunc(0x71714cdc, cellHttpClientSetSendTimeout); - sys_http.AddFunc(0x271a0b06, cellHttpClientGetSendTimeout); - sys_http.AddFunc(0xd7471088, cellHttpClientSetConnTimeout); - sys_http.AddFunc(0x14bfc765, cellHttpClientGetConnTimeout); - sys_http.AddFunc(0x8aa5fcd3, cellHttpClientSetTotalPoolSize); - sys_http.AddFunc(0x070f1020, cellHttpClientGetTotalPoolSize); - sys_http.AddFunc(0xab1c55ab, cellHttpClientSetPerHostPoolSize); - sys_http.AddFunc(0xffc74003, cellHttpClientGetPerHostPoolSize); - sys_http.AddFunc(0x595adee9, cellHttpClientSetPerHostKeepAliveMax); - sys_http.AddFunc(0x46bcc9ff, cellHttpClientGetPerHostKeepAliveMax); - sys_http.AddFunc(0xdc7ed599, cellHttpClientSetPerPipelineMax); - sys_http.AddFunc(0xd06c90a4, cellHttpClientGetPerPipelineMax); - sys_http.AddFunc(0xbf6e3659, cellHttpClientSetRecvBufferSize); - sys_http.AddFunc(0x130150ea, cellHttpClientGetRecvBufferSize); + REG_FUNC(sys_http, cellHttpClientCloseAllConnections); + REG_FUNC(sys_http, cellHttpClientCloseConnections); + REG_FUNC(sys_http, cellHttpClientPollConnections); + REG_FUNC(sys_http, cellHttpClientSetRecvTimeout); + REG_FUNC(sys_http, cellHttpClientGetRecvTimeout); + REG_FUNC(sys_http, cellHttpClientSetSendTimeout); + REG_FUNC(sys_http, cellHttpClientGetSendTimeout); + REG_FUNC(sys_http, cellHttpClientSetConnTimeout); + REG_FUNC(sys_http, cellHttpClientGetConnTimeout); + REG_FUNC(sys_http, cellHttpClientSetTotalPoolSize); + REG_FUNC(sys_http, cellHttpClientGetTotalPoolSize); + REG_FUNC(sys_http, cellHttpClientSetPerHostPoolSize); + REG_FUNC(sys_http, cellHttpClientGetPerHostPoolSize); + REG_FUNC(sys_http, cellHttpClientSetPerHostKeepAliveMax); + REG_FUNC(sys_http, cellHttpClientGetPerHostKeepAliveMax); + REG_FUNC(sys_http, cellHttpClientSetPerPipelineMax); + REG_FUNC(sys_http, cellHttpClientGetPerPipelineMax); + REG_FUNC(sys_http, cellHttpClientSetRecvBufferSize); + REG_FUNC(sys_http, cellHttpClientGetRecvBufferSize); //sys_http.AddFunc(, cellHttpClientSetSendBufferSize); //sys_http.AddFunc(, cellHttpClientGetSendBufferSize); - sys_http.AddFunc(0x0d9c65be, cellHttpClientGetAllHeaders); - sys_http.AddFunc(0xa34c4b6f, cellHttpClientSetHeader); - sys_http.AddFunc(0xd1ec0b25, cellHttpClientGetHeader); - sys_http.AddFunc(0x4b33942a, cellHttpClientAddHeader); - sys_http.AddFunc(0x617eec02, cellHttpClientDeleteHeader); + REG_FUNC(sys_http, cellHttpClientGetAllHeaders); + REG_FUNC(sys_http, cellHttpClientSetHeader); + REG_FUNC(sys_http, cellHttpClientGetHeader); + REG_FUNC(sys_http, cellHttpClientAddHeader); + REG_FUNC(sys_http, cellHttpClientDeleteHeader); - sys_http.AddFunc(0x1395d8d1, cellHttpClientSetSslCallback); - sys_http.AddFunc(0xd8352a40, cellHttpClientSetSslClientCertificate); + REG_FUNC(sys_http, cellHttpClientSetSslCallback); + REG_FUNC(sys_http, cellHttpClientSetSslClientCertificate); - sys_http.AddFunc(0x052a80d9, cellHttpCreateTransaction); - sys_http.AddFunc(0x32f5cae2, cellHttpDestroyTransaction); - sys_http.AddFunc(0x0ef17399, cellHttpTransactionGetUri); - sys_http.AddFunc(0xa0d9223c, cellHttpTransactionCloseConnection); - sys_http.AddFunc(0xd47cc666, cellHttpTransactionReleaseConnection); - sys_http.AddFunc(0x2d52848b, cellHttpTransactionAbortConnection); + REG_FUNC(sys_http, cellHttpCreateTransaction); + REG_FUNC(sys_http, cellHttpDestroyTransaction); + REG_FUNC(sys_http, cellHttpTransactionGetUri); + REG_FUNC(sys_http, cellHttpTransactionCloseConnection); + REG_FUNC(sys_http, cellHttpTransactionReleaseConnection); + REG_FUNC(sys_http, cellHttpTransactionAbortConnection); - sys_http.AddFunc(0xa755b005, cellHttpSendRequest); - sys_http.AddFunc(0xaf73a64e, cellHttpRequestSetContentLength); - sys_http.AddFunc(0x958323cf, cellHttpRequestGetContentLength); - sys_http.AddFunc(0x8e3f7ee1, cellHttpRequestSetChunkedTransferStatus); - sys_http.AddFunc(0x4137a1f6, cellHttpRequestGetChunkedTransferStatus); - sys_http.AddFunc(0x42205fe0, cellHttpRequestGetAllHeaders); - sys_http.AddFunc(0x54f2a4de, cellHttpRequestSetHeader); - sys_http.AddFunc(0x0b9fea5f, cellHttpRequestGetHeader); - sys_http.AddFunc(0xed993147, cellHttpRequestAddHeader); - sys_http.AddFunc(0x16214411, cellHttpRequestDeleteHeader); + REG_FUNC(sys_http, cellHttpSendRequest); + REG_FUNC(sys_http, cellHttpRequestSetContentLength); + REG_FUNC(sys_http, cellHttpRequestGetContentLength); + REG_FUNC(sys_http, cellHttpRequestSetChunkedTransferStatus); + REG_FUNC(sys_http, cellHttpRequestGetChunkedTransferStatus); + REG_FUNC(sys_http, cellHttpRequestGetAllHeaders); + REG_FUNC(sys_http, cellHttpRequestSetHeader); + REG_FUNC(sys_http, cellHttpRequestGetHeader); + REG_FUNC(sys_http, cellHttpRequestAddHeader); + REG_FUNC(sys_http, cellHttpRequestDeleteHeader); - sys_http.AddFunc(0x61c90691, cellHttpRecvResponse); - sys_http.AddFunc(0xbea17389, cellHttpResponseGetAllHeaders); - sys_http.AddFunc(0x4f5d8d20, cellHttpResponseGetHeader); - sys_http.AddFunc(0x464ff889, cellHttpResponseGetContentLength); - sys_http.AddFunc(0x10d0d7fc, cellHttpResponseGetStatusCode); - sys_http.AddFunc(0x6a81b5e4, cellHttpResponseGetStatusLine); + REG_FUNC(sys_http, cellHttpRecvResponse); + REG_FUNC(sys_http, cellHttpResponseGetAllHeaders); + REG_FUNC(sys_http, cellHttpResponseGetHeader); + REG_FUNC(sys_http, cellHttpResponseGetContentLength); + REG_FUNC(sys_http, cellHttpResponseGetStatusCode); + REG_FUNC(sys_http, cellHttpResponseGetStatusLine); - sys_http.AddFunc(0x895c604c, cellHttpTransactionGetSslCipherName); - sys_http.AddFunc(0x34061e49, cellHttpTransactionGetSslCipherId); - sys_http.AddFunc(0x93e938e5, cellHttpTransactionGetSslCipherVersion); - sys_http.AddFunc(0x38954133, cellHttpTransactionGetSslCipherBits); - sys_http.AddFunc(0xe3c424b3, cellHttpTransactionGetSslCipherString); - sys_http.AddFunc(0xad1c6f02, cellHttpTransactionGetSslVersion); - sys_http.AddFunc(0x2a78ff04, cellHttpTransactionGetSslId); + REG_FUNC(sys_http, cellHttpTransactionGetSslCipherName); + REG_FUNC(sys_http, cellHttpTransactionGetSslCipherId); + REG_FUNC(sys_http, cellHttpTransactionGetSslCipherVersion); + REG_FUNC(sys_http, cellHttpTransactionGetSslCipherBits); + REG_FUNC(sys_http, cellHttpTransactionGetSslCipherString); + REG_FUNC(sys_http, cellHttpTransactionGetSslVersion); + REG_FUNC(sys_http, cellHttpTransactionGetSslId); - sys_http.AddFunc(0x65691795, cellHttpClientSetSslVersion); - sys_http.AddFunc(0xccf57336, cellHttpClientGetSslVersion); - sys_http.AddFunc(0x7313c78d, cellHttpClientSetSslIdDestroyCallback); + REG_FUNC(sys_http, cellHttpClientSetSslVersion); + REG_FUNC(sys_http, cellHttpClientGetSslVersion); + REG_FUNC(sys_http, cellHttpClientSetSslIdDestroyCallback); } #endif diff --git a/rpcs3/Emu/SysCalls/Modules/sys_net.cpp b/rpcs3/Emu/SysCalls/Modules/sys_net.cpp index be4a8701a8..2ce4a65fa2 100644 --- a/rpcs3/Emu/SysCalls/Modules/sys_net.cpp +++ b/rpcs3/Emu/SysCalls/Modules/sys_net.cpp @@ -502,62 +502,62 @@ int sys_net_free_thread_context() Module sys_net("sys_net", []() { // The names of the following functions are modified to avoid overloading problems - sys_net.AddFunc(0xc94f6939, sys_net_accept); - sys_net.AddFunc(0xb0a59804, sys_net_bind); - sys_net.AddFunc(0x64f66d35, sys_net_connect); - //sys_net.AddFunc(0xf7ac8941, sys_net_gethostbyaddr); - //sys_net.AddFunc(0x71f4c717, sys_net_gethostbyname); - //sys_net.AddFunc(0xf9ec2db6, sys_net_getpeername); - //sys_net.AddFunc(0x13efe7f5, sys_net_getsockname); - //sys_net.AddFunc(0x5a045bd1, sys_net_getsockopt); - sys_net.AddFunc(0xdabbc2c0, sys_net_inet_addr); - //sys_net.AddFunc(0xa9a079e0, sys_net_inet_aton); - //sys_net.AddFunc(0x566893ce, sys_net_inet_lnaof); - //sys_net.AddFunc(0xb4152c74, sys_net_inet_makeaddr); - //sys_net.AddFunc(0xe39a62a7, sys_net_inet_netof); - //sys_net.AddFunc(0x506ad863, sys_net_inet_network); - //sys_net.AddFunc(0x858a930b, sys_net_inet_ntoa); - //sys_net.AddFunc(0xc98a3146, sys_net_inet_ntop); - sys_net.AddFunc(0x8af3825e, sys_net_inet_pton); - sys_net.AddFunc(0x28e208bb, sys_net_listen); + REG_FUNC(sys_net, sys_net_accept); + REG_FUNC(sys_net, sys_net_bind); + REG_FUNC(sys_net, sys_net_connect); + //REG_FUNC(sys_net, sys_net_gethostbyaddr); + //REG_FUNC(sys_net, sys_net_gethostbyname); + //REG_FUNC(sys_net, sys_net_getpeername); + //REG_FUNC(sys_net, sys_net_getsockname); + //REG_FUNC(sys_net, sys_net_getsockopt); + REG_FUNC(sys_net, sys_net_inet_addr); + //REG_FUNC(sys_net, sys_net_inet_aton); + //REG_FUNC(sys_net, sys_net_inet_lnaof); + //REG_FUNC(sys_net, sys_net_inet_makeaddr); + //REG_FUNC(sys_net, sys_net_inet_netof); + //REG_FUNC(sys_net, sys_net_inet_network); + //REG_FUNC(sys_net, sys_net_inet_ntoa); + //REG_FUNC(sys_net, sys_net_inet_ntop); + REG_FUNC(sys_net, sys_net_inet_pton); + REG_FUNC(sys_net, sys_net_listen); //sys_net.AddFunc(, sys_net_ntohl); //sys_net.AddFunc(, sys_net_ntohs); - sys_net.AddFunc(0xfba04f37, sys_net_recv); - sys_net.AddFunc(0x1f953b9f, sys_net_recvfrom); - //sys_net.AddFunc(0xc9d09c34, sys_net_recvmsg); - sys_net.AddFunc(0xdc751b40, sys_net_send); - //sys_net.AddFunc(0xad09481b, sys_net_sendmsg); - sys_net.AddFunc(0x9647570b, sys_net_sendto); - sys_net.AddFunc(0x88f03575, sys_net_setsockopt); - sys_net.AddFunc(0xa50777c6, sys_net_shutdown); - sys_net.AddFunc(0x9c056962, sys_net_socket); - sys_net.AddFunc(0x6db6e8cd, sys_net_socketclose); - //sys_net.AddFunc(0x051ee3ee, sys_net_socketpoll); - //sys_net.AddFunc(0x3f09e20a, sys_net_socketselect); + REG_FUNC(sys_net, sys_net_recv); + REG_FUNC(sys_net, sys_net_recvfrom); + //REG_FUNC(sys_net, sys_net_recvmsg); + REG_FUNC(sys_net, sys_net_send); + //REG_FUNC(sys_net, sys_net_sendmsg); + REG_FUNC(sys_net, sys_net_sendto); + REG_FUNC(sys_net, sys_net_setsockopt); + REG_FUNC(sys_net, sys_net_shutdown); + REG_FUNC(sys_net, sys_net_socket); + REG_FUNC(sys_net, sys_net_socketclose); + //REG_FUNC(sys_net, sys_net_socketpoll); + //REG_FUNC(sys_net, sys_net_socketselect); - sys_net.AddFunc(0x139a9e9b, sys_net_initialize_network_ex); - sys_net.AddFunc(0x05bd4438, sys_net_get_udpp2p_test_param); - sys_net.AddFunc(0x10b81ed6, sys_net_set_udpp2p_test_param); - sys_net.AddFunc(0x1d14d6e4, sys_net_get_lib_name_server); - sys_net.AddFunc(0x27fb339d, sys_net_if_ctl); - sys_net.AddFunc(0x368823c0, sys_net_get_netemu_test_param); - sys_net.AddFunc(0x3b27c780, sys_net_get_sockinfo); - sys_net.AddFunc(0x44328aa2, sys_net_close_dump); - sys_net.AddFunc(0x4ab0b9b9, sys_net_set_test_param); - sys_net.AddFunc(0x5420e419, sys_net_show_nameserver); - sys_net.AddFunc(0x6005cde1, _sys_net_errno_loc); - sys_net.AddFunc(0x7687d48c, sys_net_set_resolver_configurations); - sys_net.AddFunc(0x79b61646, sys_net_show_route); - sys_net.AddFunc(0x89c9917c, sys_net_read_dump); - sys_net.AddFunc(0x8ccf05ed, sys_net_abort_resolver); - sys_net.AddFunc(0x8d1b77fb, sys_net_abort_socket); - sys_net.AddFunc(0x9a318259, sys_net_set_lib_name_server); - sys_net.AddFunc(0xa5a86557, sys_net_get_test_param); - sys_net.AddFunc(0xa765d029, sys_net_get_sockinfo_ex); - sys_net.AddFunc(0xab447704, sys_net_open_dump); - sys_net.AddFunc(0xb48636c4, sys_net_show_ifconfig); - sys_net.AddFunc(0xb68d5625, sys_net_finalize_network); - sys_net.AddFunc(0xc9157d30, _sys_net_h_errno_loc); - sys_net.AddFunc(0xe2434507, sys_net_set_netemu_test_param); - sys_net.AddFunc(0xfdb8f926, sys_net_free_thread_context); + REG_FUNC(sys_net, sys_net_initialize_network_ex); + REG_FUNC(sys_net, sys_net_get_udpp2p_test_param); + REG_FUNC(sys_net, sys_net_set_udpp2p_test_param); + REG_FUNC(sys_net, sys_net_get_lib_name_server); + REG_FUNC(sys_net, sys_net_if_ctl); + REG_FUNC(sys_net, sys_net_get_netemu_test_param); + REG_FUNC(sys_net, sys_net_get_sockinfo); + REG_FUNC(sys_net, sys_net_close_dump); + REG_FUNC(sys_net, sys_net_set_test_param); + REG_FUNC(sys_net, sys_net_show_nameserver); + REG_FUNC(sys_net, _sys_net_errno_loc); + REG_FUNC(sys_net, sys_net_set_resolver_configurations); + REG_FUNC(sys_net, sys_net_show_route); + REG_FUNC(sys_net, sys_net_read_dump); + REG_FUNC(sys_net, sys_net_abort_resolver); + REG_FUNC(sys_net, sys_net_abort_socket); + REG_FUNC(sys_net, sys_net_set_lib_name_server); + REG_FUNC(sys_net, sys_net_get_test_param); + REG_FUNC(sys_net, sys_net_get_sockinfo_ex); + REG_FUNC(sys_net, sys_net_open_dump); + REG_FUNC(sys_net, sys_net_show_ifconfig); + REG_FUNC(sys_net, sys_net_finalize_network); + REG_FUNC(sys_net, _sys_net_h_errno_loc); + REG_FUNC(sys_net, sys_net_set_netemu_test_param); + REG_FUNC(sys_net, sys_net_free_thread_context); }); diff --git a/rpcs3/Emu/SysCalls/SC_FUNC.h b/rpcs3/Emu/SysCalls/SC_FUNC.h index 1a025f2f63..27c993481c 100644 --- a/rpcs3/Emu/SysCalls/SC_FUNC.h +++ b/rpcs3/Emu/SysCalls/SC_FUNC.h @@ -1,13 +1,6 @@ #pragma once #include "Emu/Cell/PPUThread.h" -class func_caller -{ -public: - virtual void operator()(PPUThread& CPU) = 0; - virtual ~func_caller(){}; -}; - namespace ppu_func_detail { enum bind_arg_type @@ -163,88 +156,60 @@ namespace ppu_func_detail static const bind_arg_type value = is_float ? ARG_FLOAT : (is_vector ? ARG_VECTOR : ARG_GENERAL); }; - template - class func_binder; + template + struct func_binder; - template - class func_binder : public func_caller + template + struct func_binder { typedef void(*func_t)(T...); - const func_t m_call; - public: - func_binder(func_t call) - : func_caller() - , m_call(call) + static void do_call(PPUThread& CPU) { - } - - virtual void operator()(PPUThread& CPU) - { - call(m_call, iterate<0, 0, 0, T...>(CPU)); + call((func_t)func, iterate<0, 0, 0, T...>(CPU)); } }; - template - class func_binder : public func_caller + template + struct func_binder { typedef void(*func_t)(PPUThread&, T...); - const func_t m_call; - public: - func_binder(func_t call) - : func_caller() - , m_call(call) + static void do_call(PPUThread& CPU) { - } - - virtual void operator()(PPUThread& CPU) - { - call(m_call, std::tuple_cat(std::tuple(CPU), iterate<0, 0, 0, T...>(CPU))); + call((func_t)func, std::tuple_cat(std::tuple(CPU), iterate<0, 0, 0, T...>(CPU))); } }; - template - class func_binder : public func_caller + template + struct func_binder { typedef RT(*func_t)(T...); - const func_t m_call; - public: - func_binder(func_t call) - : func_caller() - , m_call(call) + static void do_call(PPUThread& CPU) { - } - - virtual void operator()(PPUThread& CPU) - { - bind_result::value>::func(CPU, call(m_call, iterate<0, 0, 0, T...>(CPU))); + bind_result::value>::func(CPU, call((func_t)func, iterate<0, 0, 0, T...>(CPU))); } }; - template - class func_binder : public func_caller + template + struct func_binder { typedef RT(*func_t)(PPUThread&, T...); - const func_t m_call; - public: - func_binder(func_t call) - : func_caller() - , m_call(call) + static void do_call(PPUThread& CPU) { - } - - virtual void operator()(PPUThread& CPU) - { - bind_result::value>::func(CPU, call(m_call, std::tuple_cat(std::tuple(CPU), iterate<0, 0, 0, T...>(CPU)))); + bind_result::value>::func(CPU, call((func_t)func, std::tuple_cat(std::tuple(CPU), iterate<0, 0, 0, T...>(CPU)))); } }; + + using bound_func_t = void(*)(PPUThread&); + + template + bound_func_t _bind_func(RT(*_func)(T...)) + { + return ppu_func_detail::func_binder::do_call; + } } -template -func_caller* bind_func(RT(*call)(T...)) -{ - return new ppu_func_detail::func_binder(call); -} +#define bind_func(func) (ppu_func_detail::_bind_func(func)) diff --git a/rpcs3/Emu/SysCalls/SysCalls.cpp b/rpcs3/Emu/SysCalls/SysCalls.cpp index 53612a418c..a40ffde7e7 100644 --- a/rpcs3/Emu/SysCalls/SysCalls.cpp +++ b/rpcs3/Emu/SysCalls/SysCalls.cpp @@ -42,17 +42,16 @@ namespace detail } } -void default_syscall(PPUThread& CPU); -static func_caller *null_func = bind_func(default_syscall); +void null_func(PPUThread& CPU); -static const int kSyscallTableLength = 1024; +const int kSyscallTableLength = 1024; // UNS = Unused // ROOT = Root // DBG = Debug // PM = Product Mode // AuthID = Authentication ID -static func_caller* sc_table[kSyscallTableLength] = +void(*const sc_table[1024])(PPUThread&) = { null_func, bind_func(sys_process_getpid), //1 (0x001) @@ -897,25 +896,7 @@ static func_caller* sc_table[kSyscallTableLength] = null_func, null_func, null_func, bind_func(cellGcmCallback), //1023 UNS }; -/** HACK: Used to delete func_caller objects that get allocated and stored in sc_table (above). -* The destructor of this static object gets called when the program shuts down. -*/ -struct SyscallTableCleaner_t -{ - SyscallTableCleaner_t() {} - ~SyscallTableCleaner_t() - { - for (int i = 0; i < kSyscallTableLength; ++i) - { - if (sc_table[i] != null_func) - delete sc_table[i]; - } - - delete null_func; - } -} SyscallTableCleaner_t; - -void default_syscall(PPUThread& CPU) +void null_func(PPUThread& CPU) { u32 code = (u32)CPU.GPR[11]; //TODO: remove this @@ -967,4 +948,4 @@ IdManager& SysCallBase::GetIdManager() const bool SysCallBase::RemoveId(u32 id) { return Emu.GetIdManager().RemoveID(id); -} \ No newline at end of file +} diff --git a/rpcs3/Emu/SysCalls/lv2/cellFs.cpp b/rpcs3/Emu/SysCalls/lv2/cellFs.cpp index ddf9448482..9768101a37 100644 --- a/rpcs3/Emu/SysCalls/lv2/cellFs.cpp +++ b/rpcs3/Emu/SysCalls/lv2/cellFs.cpp @@ -1035,45 +1035,45 @@ Module sys_fs("sys_fs", []() g_FsAioReadCur = 0; aio_init = false; - sys_fs.AddFunc(0x718bf5f8, cellFsOpen); - sys_fs.AddFunc(0xb1840b53, cellFsSdataOpen); - sys_fs.AddFunc(0x6d3bb15b, cellFsSdataOpenByFd); - sys_fs.AddFunc(0x4d5ff8e2, cellFsRead); - sys_fs.AddFunc(0xecdcf2ab, cellFsWrite); - sys_fs.AddFunc(0x2cb51f0d, cellFsClose); - sys_fs.AddFunc(0x3f61245c, cellFsOpendir); - sys_fs.AddFunc(0x5c74903d, cellFsReaddir); - sys_fs.AddFunc(0xff42dcc3, cellFsClosedir); - sys_fs.AddFunc(0x7de6dced, cellFsStat); - sys_fs.AddFunc(0xef3efa34, cellFsFstat); - sys_fs.AddFunc(0xba901fe6, cellFsMkdir); - sys_fs.AddFunc(0xf12eecc8, cellFsRename); - sys_fs.AddFunc(0x99406d0b, cellFsChmod); - sys_fs.AddFunc(0x967a162b, cellFsFsync); - sys_fs.AddFunc(0x2796fdf3, cellFsRmdir); - sys_fs.AddFunc(0x7f4677a8, cellFsUnlink); - sys_fs.AddFunc(0xa397d042, cellFsLseek); - sys_fs.AddFunc(0x0e2939e5, cellFsFtruncate); - sys_fs.AddFunc(0xc9dc3ac5, cellFsTruncate); - sys_fs.AddFunc(0xcb588dba, cellFsFGetBlockSize); - sys_fs.AddFunc(0xc1c507e7, cellFsAioRead); - sys_fs.AddFunc(0x4cef342e, cellFsAioWrite); - sys_fs.AddFunc(0xdb869f20, cellFsAioInit); - sys_fs.AddFunc(0x9f951810, cellFsAioFinish); - sys_fs.AddFunc(0x1a108ab7, cellFsGetBlockSize); - sys_fs.AddFunc(0xaa3b4bcd, cellFsGetFreeSize); - sys_fs.AddFunc(0x0d5b4a14, cellFsReadWithOffset); - sys_fs.AddFunc(0x9b882495, cellFsGetDirectoryEntries); - sys_fs.AddFunc(0x2664c8ae, cellFsStReadInit); - sys_fs.AddFunc(0xd73938df, cellFsStReadFinish); - sys_fs.AddFunc(0xb3afee8b, cellFsStReadGetRingBuf); - sys_fs.AddFunc(0xcf34969c, cellFsStReadGetStatus); - sys_fs.AddFunc(0xbd273a88, cellFsStReadGetRegid); - sys_fs.AddFunc(0x8df28ff9, cellFsStReadStart); - sys_fs.AddFunc(0xf8e5d9a0, cellFsStReadStop); - sys_fs.AddFunc(0x27800c6b, cellFsStRead); - sys_fs.AddFunc(0x190912f6, cellFsStReadGetCurrentAddr); - sys_fs.AddFunc(0x81f33783, cellFsStReadPutCurrentAddr); - sys_fs.AddFunc(0x8f71c5b2, cellFsStReadWait); - sys_fs.AddFunc(0x866f6aec, cellFsStReadWaitCallback); + REG_FUNC(sys_fs, cellFsOpen); + REG_FUNC(sys_fs, cellFsSdataOpen); + REG_FUNC(sys_fs, cellFsSdataOpenByFd); + REG_FUNC(sys_fs, cellFsRead); + REG_FUNC(sys_fs, cellFsWrite); + REG_FUNC(sys_fs, cellFsClose); + REG_FUNC(sys_fs, cellFsOpendir); + REG_FUNC(sys_fs, cellFsReaddir); + REG_FUNC(sys_fs, cellFsClosedir); + REG_FUNC(sys_fs, cellFsStat); + REG_FUNC(sys_fs, cellFsFstat); + REG_FUNC(sys_fs, cellFsMkdir); + REG_FUNC(sys_fs, cellFsRename); + REG_FUNC(sys_fs, cellFsChmod); + REG_FUNC(sys_fs, cellFsFsync); + REG_FUNC(sys_fs, cellFsRmdir); + REG_FUNC(sys_fs, cellFsUnlink); + REG_FUNC(sys_fs, cellFsLseek); + REG_FUNC(sys_fs, cellFsFtruncate); + REG_FUNC(sys_fs, cellFsTruncate); + REG_FUNC(sys_fs, cellFsFGetBlockSize); + REG_FUNC(sys_fs, cellFsAioRead); + REG_FUNC(sys_fs, cellFsAioWrite); + REG_FUNC(sys_fs, cellFsAioInit); + REG_FUNC(sys_fs, cellFsAioFinish); + REG_FUNC(sys_fs, cellFsGetBlockSize); + REG_FUNC(sys_fs, cellFsGetFreeSize); + REG_FUNC(sys_fs, cellFsReadWithOffset); + REG_FUNC(sys_fs, cellFsGetDirectoryEntries); + REG_FUNC(sys_fs, cellFsStReadInit); + REG_FUNC(sys_fs, cellFsStReadFinish); + REG_FUNC(sys_fs, cellFsStReadGetRingBuf); + REG_FUNC(sys_fs, cellFsStReadGetStatus); + REG_FUNC(sys_fs, cellFsStReadGetRegid); + REG_FUNC(sys_fs, cellFsStReadStart); + REG_FUNC(sys_fs, cellFsStReadStop); + REG_FUNC(sys_fs, cellFsStRead); + REG_FUNC(sys_fs, cellFsStReadGetCurrentAddr); + REG_FUNC(sys_fs, cellFsStReadPutCurrentAddr); + REG_FUNC(sys_fs, cellFsStReadWait); + REG_FUNC(sys_fs, cellFsStReadWaitCallback); });