diff --git a/Utilities/StrFmt.h b/Utilities/StrFmt.h index 4011878360..903d47dd13 100644 --- a/Utilities/StrFmt.h +++ b/Utilities/StrFmt.h @@ -257,12 +257,8 @@ namespace fmt be_t<> forced to .value() (fmt::unveil reverts byte order automatically) External specializations for fmt::unveil (can be found in another headers): - vm::ps3::ptr (fmt::unveil) (vm_ptr.h) (with appropriate address type, using .addr() can be avoided) - vm::ps3::bptr (fmt::unveil) (vm_ptr.h) - vm::psv::ptr (fmt::unveil) (vm_ptr.h) - vm::ps3::ref (fmt::unveil) (vm_ref.h) - vm::ps3::bref (fmt::unveil) (vm_ref.h) - vm::psv::ref (fmt::unveil) (vm_ref.h) + vm::ptr, vm::bptr, ... (fmt::unveil) (vm_ptr.h) (with appropriate address type, using .addr() can be avoided) + vm::ref, vm::bref, ... (fmt::unveil) (vm_ref.h) */ template force_inline safe_buffers std::string format(const char* fmt, Args... args) diff --git a/Utilities/Thread.cpp b/Utilities/Thread.cpp index 2d516f8704..9f7eb958bf 100644 --- a/Utilities/Thread.cpp +++ b/Utilities/Thread.cpp @@ -1373,7 +1373,7 @@ void thread_t::set_name(const std::string& name) thread_t::~thread_t() { - if (m_state.exchange(TS_NON_EXISTENT) == TS_JOINABLE) + if (m_state == TS_JOINABLE) { if (m_autojoin) { diff --git a/rpcs3/Emu/ARMv7/ARMv7Interpreter.cpp b/rpcs3/Emu/ARMv7/ARMv7Interpreter.cpp index 95ffb5a7e4..a064fc768f 100644 --- a/rpcs3/Emu/ARMv7/ARMv7Interpreter.cpp +++ b/rpcs3/Emu/ARMv7/ARMv7Interpreter.cpp @@ -1,5 +1,4 @@ #include "stdafx.h" -#include #include "Utilities/Log.h" #include "Emu/System.h" #include "Emu/Memory/Memory.h" @@ -1969,7 +1968,7 @@ void ARMv7_instrs::LDM(ARMv7Context& context, const ARMv7Code code, const ARMv7_ if (ConditionPassed(context, cond)) { - auto memory = vm::psv::ptr::make(context.read_gpr(n)); + auto memory = vm::ptr::make(context.read_gpr(n)); for (u32 i = 0; i < 16; i++) { @@ -2088,7 +2087,7 @@ void ARMv7_instrs::LDR_IMM(ARMv7Context& context, const ARMv7Code code, const AR { const u32 offset_addr = add ? context.read_gpr(n) + imm32 : context.read_gpr(n) - imm32; const u32 addr = index ? offset_addr : context.read_gpr(n); - context.write_gpr(t, vm::psv::read32(addr)); + context.write_gpr(t, vm::read32(addr)); if (wback) { @@ -2137,7 +2136,7 @@ void ARMv7_instrs::LDR_LIT(ARMv7Context& context, const ARMv7Code code, const AR if (ConditionPassed(context, cond)) { - const u32 data = vm::psv::read32(addr); + const u32 data = vm::read32(addr); context.write_gpr(t, data); } } @@ -2194,7 +2193,7 @@ void ARMv7_instrs::LDR_REG(ARMv7Context& context, const ARMv7Code code, const AR const u32 offset = Shift(context.read_gpr(m), shift_t, shift_n, context.APSR.C); const u32 offset_addr = add ? context.read_gpr(n) + offset : context.read_gpr(n) - offset; const u32 addr = index ? offset_addr : context.read_gpr(n); - context.write_gpr(t, vm::psv::read32(addr)); + context.write_gpr(t, vm::read32(addr)); if (wback) { @@ -2386,7 +2385,7 @@ void ARMv7_instrs::LDRD_IMM(ARMv7Context& context, const ARMv7Code code, const A { const u32 offset_addr = add ? context.read_gpr(n) + imm32 : context.read_gpr(n) - imm32; const u32 addr = index ? offset_addr : context.read_gpr(n); - const u64 value = vm::psv::read64(addr); + const u64 value = vm::read64(addr); context.write_gpr(t, (u32)(value)); context.write_gpr(t2, (u32)(value >> 32)); @@ -2431,7 +2430,7 @@ void ARMv7_instrs::LDRD_LIT(ARMv7Context& context, const ARMv7Code code, const A if (ConditionPassed(context, cond)) { - const u64 value = vm::psv::read64(addr); + const u64 value = vm::read64(addr); context.write_gpr(t, (u32)(value)); context.write_gpr(t2, (u32)(value >> 32)); } @@ -2511,7 +2510,7 @@ void ARMv7_instrs::LDRH_IMM(ARMv7Context& context, const ARMv7Code code, const A { const u32 offset_addr = add ? context.read_gpr(n) + imm32 : context.read_gpr(n) - imm32; const u32 addr = index ? offset_addr : context.read_gpr(n); - context.write_gpr(t, vm::psv::read16(addr)); + context.write_gpr(t, vm::read16(addr)); if (wback) { @@ -3475,7 +3474,7 @@ void ARMv7_instrs::POP(ARMv7Context& context, const ARMv7Code code, const ARMv7_ if (ConditionPassed(context, cond)) { - auto stack = vm::psv::ptr::make(context.SP); + auto stack = vm::ptr::make(context.SP); for (u32 i = 0; i < 16; i++) { @@ -3546,7 +3545,7 @@ void ARMv7_instrs::PUSH(ARMv7Context& context, const ARMv7Code code, const ARMv7 if (ConditionPassed(context, cond)) { - auto memory = vm::psv::ptr::make(context.SP); + auto memory = vm::ptr::make(context.SP); for (u32 i = 15; ~i; i--) { @@ -4296,7 +4295,7 @@ void ARMv7_instrs::STM(ARMv7Context& context, const ARMv7Code code, const ARMv7_ if (ConditionPassed(context, cond)) { - auto memory = vm::psv::ptr::make(context.read_gpr(n)); + auto memory = vm::ptr::make(context.read_gpr(n)); for (u32 i = 0; i < 16; i++) { @@ -4414,7 +4413,7 @@ void ARMv7_instrs::STR_IMM(ARMv7Context& context, const ARMv7Code code, const AR { const u32 offset_addr = add ? context.read_gpr(n) + imm32 : context.read_gpr(n) - imm32; const u32 addr = index ? offset_addr : context.read_gpr(n); - vm::psv::write32(addr, context.read_gpr(t)); + vm::write32(addr, context.read_gpr(t)); if (wback) { @@ -4474,7 +4473,7 @@ void ARMv7_instrs::STR_REG(ARMv7Context& context, const ARMv7Code code, const AR const u32 offset = Shift(context.read_gpr(m), shift_t, shift_n, context.APSR.C); const u32 offset_addr = add ? context.read_gpr(n) + offset : context.read_gpr(n) - offset; const u32 addr = index ? offset_addr : context.read_gpr(n); - vm::psv::write32(addr, context.read_gpr(t)); + vm::write32(addr, context.read_gpr(t)); if (wback) { @@ -4653,7 +4652,7 @@ void ARMv7_instrs::STRD_IMM(ARMv7Context& context, const ARMv7Code code, const A const u32 n_value = context.read_gpr(n); const u32 offset = add ? n_value + imm32 : n_value - imm32; const u32 addr = index ? offset : n_value; - vm::psv::write64(addr, (u64)context.read_gpr(t2) << 32 | (u64)context.read_gpr(t)); + vm::write64(addr, (u64)context.read_gpr(t2) << 32 | (u64)context.read_gpr(t)); if (wback) { @@ -4733,7 +4732,7 @@ void ARMv7_instrs::STRH_IMM(ARMv7Context& context, const ARMv7Code code, const A { const u32 offset_addr = add ? context.read_gpr(n) + imm32 : context.read_gpr(n) - imm32; const u32 addr = index ? offset_addr : context.read_gpr(n); - vm::psv::write16(addr, (u16)context.read_gpr(t)); + vm::write16(addr, (u16)context.read_gpr(t)); if (wback) { @@ -4793,7 +4792,7 @@ void ARMv7_instrs::STRH_REG(ARMv7Context& context, const ARMv7Code code, const A const u32 offset = Shift(context.read_gpr(m), shift_t, shift_n, context.APSR.C); const u32 offset_addr = add ? context.read_gpr(n) + offset : context.read_gpr(n) - offset; const u32 addr = index ? offset_addr : context.read_gpr(n); - vm::psv::write16(addr, (u16)context.read_gpr(t)); + vm::write16(addr, (u16)context.read_gpr(t)); if (wback) { diff --git a/rpcs3/Emu/ARMv7/Modules/sceAppMgr.cpp b/rpcs3/Emu/ARMv7/Modules/sceAppMgr.cpp index 5b39017a62..c110efee81 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceAppMgr.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceAppMgr.cpp @@ -2,21 +2,14 @@ #include "Emu/System.h" #include "Emu/ARMv7/PSVFuncList.h" -extern psv_log_base sceAppMgr; +#include "sceAppMgr.h" -struct SceAppMgrEvent -{ - s32 event; - s32 appId; - char param[56]; -}; - -s32 sceAppMgrReceiveEventNum(vm::psv::ptr eventNum) +s32 sceAppMgrReceiveEventNum(vm::ptr eventNum) { throw __FUNCTION__; } -s32 sceAppMgrReceiveEvent(vm::psv::ptr appEvent) +s32 sceAppMgrReceiveEvent(vm::ptr appEvent) { throw __FUNCTION__; } @@ -39,6 +32,7 @@ psv_log_base sceAppMgr("SceAppMgr", []() sceAppMgr.on_load = nullptr; sceAppMgr.on_unload = nullptr; sceAppMgr.on_stop = nullptr; + sceAppMgr.on_error = nullptr; REG_FUNC(0x47E5DD7D, sceAppMgrReceiveEventNum); REG_FUNC(0xCFAD5A3A, sceAppMgrReceiveEvent); diff --git a/rpcs3/Emu/ARMv7/Modules/sceAppMgr.h b/rpcs3/Emu/ARMv7/Modules/sceAppMgr.h new file mode 100644 index 0000000000..8329b62e14 --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/sceAppMgr.h @@ -0,0 +1,10 @@ +#pragma once + +struct SceAppMgrEvent +{ + le_t event; + le_t appId; + char param[56]; +}; + +extern psv_log_base sceAppMgr; diff --git a/rpcs3/Emu/ARMv7/Modules/sceAppUtil.cpp b/rpcs3/Emu/ARMv7/Modules/sceAppUtil.cpp index 815efa0461..20f8e22e53 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceAppUtil.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceAppUtil.cpp @@ -4,7 +4,7 @@ #include "sceAppUtil.h" -s32 sceAppUtilInit(vm::psv::ptr initParam, vm::psv::ptr bootParam) +s32 sceAppUtilInit(vm::ptr initParam, vm::ptr bootParam) { throw __FUNCTION__; } @@ -14,27 +14,27 @@ s32 sceAppUtilShutdown() throw __FUNCTION__; } -s32 sceAppUtilSaveDataSlotCreate(u32 slotId, vm::psv::ptr param, vm::psv::ptr mountPoint) +s32 sceAppUtilSaveDataSlotCreate(u32 slotId, vm::ptr param, vm::ptr mountPoint) { throw __FUNCTION__; } -s32 sceAppUtilSaveDataSlotDelete(u32 slotId, vm::psv::ptr mountPoint) +s32 sceAppUtilSaveDataSlotDelete(u32 slotId, vm::ptr mountPoint) { throw __FUNCTION__; } -s32 sceAppUtilSaveDataSlotSetParam(u32 slotId, vm::psv::ptr param, vm::psv::ptr mountPoint) +s32 sceAppUtilSaveDataSlotSetParam(u32 slotId, vm::ptr param, vm::ptr mountPoint) { throw __FUNCTION__; } -s32 sceAppUtilSaveDataSlotGetParam(u32 slotId, vm::psv::ptr param, vm::psv::ptr mountPoint) +s32 sceAppUtilSaveDataSlotGetParam(u32 slotId, vm::ptr param, vm::ptr mountPoint) { throw __FUNCTION__; } -s32 sceAppUtilSaveDataFileSave(vm::psv::ptr slot, vm::psv::ptr files, u32 fileNum, vm::psv::ptr mountPoint, vm::psv::ptr requiredSizeKB) +s32 sceAppUtilSaveDataFileSave(vm::ptr slot, vm::ptr files, u32 fileNum, vm::ptr mountPoint, vm::ptr requiredSizeKB) { throw __FUNCTION__; } @@ -49,22 +49,22 @@ s32 sceAppUtilPhotoUmount() throw __FUNCTION__; } -s32 sceAppUtilSystemParamGetInt(u32 paramId, vm::psv::ptr value) +s32 sceAppUtilSystemParamGetInt(u32 paramId, vm::ptr value) { throw __FUNCTION__; } -s32 sceAppUtilSystemParamGetString(u32 paramId, vm::psv::ptr buf, u32 bufSize) +s32 sceAppUtilSystemParamGetString(u32 paramId, vm::ptr buf, u32 bufSize) { throw __FUNCTION__; } -s32 sceAppUtilSaveSafeMemory(vm::psv::ptr buf, u32 bufSize, s64 offset) +s32 sceAppUtilSaveSafeMemory(vm::ptr buf, u32 bufSize, s64 offset) { throw __FUNCTION__; } -s32 sceAppUtilLoadSafeMemory(vm::psv::ptr buf, u32 bufSize, s64 offset) +s32 sceAppUtilLoadSafeMemory(vm::ptr buf, u32 bufSize, s64 offset) { throw __FUNCTION__; } @@ -77,6 +77,7 @@ psv_log_base sceAppUtil("SceAppUtil", []() sceAppUtil.on_load = nullptr; sceAppUtil.on_unload = nullptr; sceAppUtil.on_stop = nullptr; + sceAppUtil.on_error = nullptr; REG_FUNC(0xDAFFE671, sceAppUtilInit); REG_FUNC(0xB220B00B, sceAppUtilShutdown); diff --git a/rpcs3/Emu/ARMv7/Modules/sceAppUtil.h b/rpcs3/Emu/ARMv7/Modules/sceAppUtil.h index 2e489cab22..254684a166 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceAppUtil.h +++ b/rpcs3/Emu/ARMv7/Modules/sceAppUtil.h @@ -2,14 +2,14 @@ struct SceAppUtilInitParam { - u32 workBufSize; + le_t workBufSize; char reserved[60]; }; struct SceAppUtilBootParam { - u32 attr; - u32 appVersion; + le_t attr; + le_t appVersion; char reserved[32]; }; @@ -20,49 +20,49 @@ struct SceAppUtilSaveDataMountPoint struct SceAppUtilSaveDataSlotParam { - u32 status; + le_t status; char title[64]; char subTitle[128]; char detail[512]; char iconPath[64]; - s32 userParam; - u32 sizeKB; + le_t userParam; + le_t sizeKB; SceDateTime modifiedTime; char reserved[48]; }; struct SceAppUtilSaveDataSlotEmptyParam { - vm::psv::ptr title; - vm::psv::ptr iconPath; - vm::psv::ptr iconBuf; - u32 iconBufSize; + vm::lptr title; + vm::lptr iconPath; + vm::lptr iconBuf; + le_t iconBufSize; char reserved[32]; }; struct SceAppUtilSaveDataSlot { - u32 id; - u32 status; - s32 userParam; - vm::psv::ptr emptyParam; + le_t id; + le_t status; + le_t userParam; + vm::lptr emptyParam; }; struct SceAppUtilSaveDataFile { - vm::psv::ptr filePath; - vm::psv::ptr buf; - u32 bufSize; - s64 offset; - u32 mode; - u32 progDelta; + vm::lptr filePath; + vm::lptr buf; + le_t bufSize; + le_t offset; + le_t mode; + le_t progDelta; char reserved[32]; }; struct SceAppUtilSaveDataFileSlot { - u32 id; - vm::psv::ptr slotParam; + le_t id; + vm::lptr slotParam; char reserved[32]; }; diff --git a/rpcs3/Emu/ARMv7/Modules/sceAudio.cpp b/rpcs3/Emu/ARMv7/Modules/sceAudio.cpp index ad0ab8d9af..9851652437 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceAudio.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceAudio.cpp @@ -2,7 +2,7 @@ #include "Emu/System.h" #include "Emu/ARMv7/PSVFuncList.h" -extern psv_log_base sceAudio; +#include "sceAudio.h" s32 sceAudioOutOpenPort(s32 portType, s32 len, s32 freq, s32 param) { @@ -14,12 +14,12 @@ s32 sceAudioOutReleasePort(s32 port) throw __FUNCTION__; } -s32 sceAudioOutOutput(s32 port, vm::psv::ptr ptr) +s32 sceAudioOutOutput(s32 port, vm::ptr ptr) { throw __FUNCTION__; } -s32 sceAudioOutSetVolume(s32 port, s32 flag, vm::psv::ptr vol) +s32 sceAudioOutSetVolume(s32 port, s32 flag, vm::ptr vol) { throw __FUNCTION__; } @@ -52,6 +52,7 @@ psv_log_base sceAudio("SceAudio", []() sceAudio.on_load = nullptr; sceAudio.on_unload = nullptr; sceAudio.on_stop = nullptr; + sceAudio.on_error = nullptr; REG_FUNC(0x5BC341E4, sceAudioOutOpenPort); REG_FUNC(0x69E2E6B5, sceAudioOutReleasePort); diff --git a/rpcs3/Emu/ARMv7/Modules/sceAudio.h b/rpcs3/Emu/ARMv7/Modules/sceAudio.h new file mode 100644 index 0000000000..f6c654b5d0 --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/sceAudio.h @@ -0,0 +1,3 @@ +#pragma once + +extern psv_log_base sceAudio; diff --git a/rpcs3/Emu/ARMv7/Modules/sceAudioIn.cpp b/rpcs3/Emu/ARMv7/Modules/sceAudioIn.cpp index 29c7378b33..7c28021604 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceAudioIn.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceAudioIn.cpp @@ -2,7 +2,7 @@ #include "Emu/System.h" #include "Emu/ARMv7/PSVFuncList.h" -extern psv_log_base sceAudioIn; +#include "sceAudioIn.h" s32 sceAudioInOpenPort(s32 portType, s32 grain, s32 freq, s32 param) { @@ -14,7 +14,7 @@ s32 sceAudioInReleasePort(s32 port) throw __FUNCTION__; } -s32 sceAudioInInput(s32 port, vm::psv::ptr destPtr) +s32 sceAudioInInput(s32 port, vm::ptr destPtr) { throw __FUNCTION__; } @@ -27,6 +27,7 @@ psv_log_base sceAudioIn("SceAudioIn", []() sceAudioIn.on_load = nullptr; sceAudioIn.on_unload = nullptr; sceAudioIn.on_stop = nullptr; + sceAudioIn.on_error = nullptr; REG_FUNC(0x638ADD2D, sceAudioInInput); REG_FUNC(0x39B50DC1, sceAudioInOpenPort); diff --git a/rpcs3/Emu/ARMv7/Modules/sceAudioIn.h b/rpcs3/Emu/ARMv7/Modules/sceAudioIn.h new file mode 100644 index 0000000000..ff85239855 --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/sceAudioIn.h @@ -0,0 +1,3 @@ +#pragma once + +extern psv_log_base sceAudioIn; diff --git a/rpcs3/Emu/ARMv7/Modules/sceAudiodec.cpp b/rpcs3/Emu/ARMv7/Modules/sceAudiodec.cpp index bf0d1a6bf9..817501e768 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceAudiodec.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceAudiodec.cpp @@ -2,89 +2,9 @@ #include "Emu/System.h" #include "Emu/ARMv7/PSVFuncList.h" -extern psv_log_base sceAudiodec; +#include "sceAudiodec.h" -struct SceAudiodecInitStreamParam -{ - u32 size; - u32 totalStreams; -}; - -struct SceAudiodecInitChParam -{ - u32 size; - u32 totalCh; -}; - -union SceAudiodecInitParam -{ - u32 size; - SceAudiodecInitChParam at9; - SceAudiodecInitStreamParam mp3; - SceAudiodecInitStreamParam aac; - SceAudiodecInitStreamParam celp; -}; - -struct SceAudiodecInfoAt9 -{ - u32 size; - u8 configData[4]; - u32 ch; - u32 bitRate; - u32 samplingRate; - u32 superFrameSize; - u32 framesInSuperFrame; -}; - -struct SceAudiodecInfoMp3 -{ - u32 size; - u32 ch; - u32 version; -}; - -struct SceAudiodecInfoAac -{ - u32 size; - u32 isAdts; - u32 ch; - u32 samplingRate; - u32 isSbr; -}; - -struct SceAudiodecInfoCelp -{ - u32 size; - u32 excitationMode; - u32 samplingRate; - u32 bitRate; - u32 lostCount; -}; - -union SceAudiodecInfo -{ - u32 size; - SceAudiodecInfoAt9 at9; - SceAudiodecInfoMp3 mp3; - SceAudiodecInfoAac aac; - SceAudiodecInfoCelp celp; -}; - -struct SceAudiodecCtrl -{ - u32 size; - s32 handle; - vm::psv::ptr pEs; - u32 inputEsSize; - u32 maxEsSize; - vm::psv::ptr pPcm; - u32 outputPcmSize; - u32 maxPcmSize; - u32 wordLength; - vm::psv::ptr pInfo; -}; - -s32 sceAudiodecInitLibrary(u32 codecType, vm::psv::ptr pInitParam) +s32 sceAudiodecInitLibrary(u32 codecType, vm::ptr pInitParam) { throw __FUNCTION__; } @@ -94,27 +14,27 @@ s32 sceAudiodecTermLibrary(u32 codecType) throw __FUNCTION__; } -s32 sceAudiodecCreateDecoder(vm::psv::ptr pCtrl, u32 codecType) +s32 sceAudiodecCreateDecoder(vm::ptr pCtrl, u32 codecType) { throw __FUNCTION__; } -s32 sceAudiodecDeleteDecoder(vm::psv::ptr pCtrl) +s32 sceAudiodecDeleteDecoder(vm::ptr pCtrl) { throw __FUNCTION__; } -s32 sceAudiodecDecode(vm::psv::ptr pCtrl) +s32 sceAudiodecDecode(vm::ptr pCtrl) { throw __FUNCTION__; } -s32 sceAudiodecClearContext(vm::psv::ptr pCtrl) +s32 sceAudiodecClearContext(vm::ptr pCtrl) { throw __FUNCTION__; } -s32 sceAudiodecGetInternalError(vm::psv::ptr pCtrl, vm::psv::ptr pInternalError) +s32 sceAudiodecGetInternalError(vm::ptr pCtrl, vm::ptr pInternalError) { throw __FUNCTION__; } @@ -127,6 +47,7 @@ psv_log_base sceAudiodec("SceAudiodec", []() sceAudiodec.on_load = nullptr; sceAudiodec.on_unload = nullptr; sceAudiodec.on_stop = nullptr; + sceAudiodec.on_error = nullptr; REG_FUNC(0x445C2CEF, sceAudiodecInitLibrary); REG_FUNC(0x45719B9D, sceAudiodecTermLibrary); diff --git a/rpcs3/Emu/ARMv7/Modules/sceAudiodec.h b/rpcs3/Emu/ARMv7/Modules/sceAudiodec.h new file mode 100644 index 0000000000..cfa6c12b80 --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/sceAudiodec.h @@ -0,0 +1,83 @@ +#pragma once + +struct SceAudiodecInitStreamParam +{ + le_t size; + le_t totalStreams; +}; + +struct SceAudiodecInitChParam +{ + le_t size; + le_t totalCh; +}; + +union SceAudiodecInitParam +{ + le_t size; + SceAudiodecInitChParam at9; + SceAudiodecInitStreamParam mp3; + SceAudiodecInitStreamParam aac; + SceAudiodecInitStreamParam celp; +}; + +struct SceAudiodecInfoAt9 +{ + le_t size; + u8 configData[4]; + le_t ch; + le_t bitRate; + le_t samplingRate; + le_t superFrameSize; + le_t framesInSuperFrame; +}; + +struct SceAudiodecInfoMp3 +{ + le_t size; + le_t ch; + le_t version; +}; + +struct SceAudiodecInfoAac +{ + le_t size; + le_t isAdts; + le_t ch; + le_t samplingRate; + le_t isSbr; +}; + +struct SceAudiodecInfoCelp +{ + le_t size; + le_t excitationMode; + le_t samplingRate; + le_t bitRate; + le_t lostCount; +}; + +union SceAudiodecInfo +{ + le_t size; + SceAudiodecInfoAt9 at9; + SceAudiodecInfoMp3 mp3; + SceAudiodecInfoAac aac; + SceAudiodecInfoCelp celp; +}; + +struct SceAudiodecCtrl +{ + le_t size; + le_t handle; + vm::lptr pEs; + le_t inputEsSize; + le_t maxEsSize; + vm::lptr pPcm; + le_t outputPcmSize; + le_t maxPcmSize; + le_t wordLength; + vm::lptr pInfo; +}; + +extern psv_log_base sceAudiodec; diff --git a/rpcs3/Emu/ARMv7/Modules/sceAudioenc.cpp b/rpcs3/Emu/ARMv7/Modules/sceAudioenc.cpp index d507170248..eb586fb556 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceAudioenc.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceAudioenc.cpp @@ -2,66 +2,9 @@ #include "Emu/System.h" #include "Emu/ARMv7/PSVFuncList.h" -extern psv_log_base sceAudioenc; +#include "sceAudioenc.h" -struct SceAudioencInitStreamParam -{ - u32 size; - u32 totalStreams; -}; - -struct SceAudioencInfoCelp -{ - u32 size; - u32 excitationMode; - u32 samplingRate; - u32 bitRate; -}; - -struct SceAudioencOptInfoCelp -{ - u32 size; - u8 header[32]; - u32 headerSize; - u32 encoderVersion; -}; - - -union SceAudioencInitParam -{ - u32 size; - SceAudioencInitStreamParam celp; -}; - -union SceAudioencInfo -{ - u32 size; - SceAudioencInfoCelp celp; -}; - -union SceAudioencOptInfo -{ - u32 size; - SceAudioencOptInfoCelp celp; -}; - -struct SceAudioencCtrl -{ - u32 size; - s32 handle; - vm::psv::ptr pInputPcm; - u32 inputPcmSize; - u32 maxPcmSize; - vm::psv::ptr pOutputEs; - u32 outputEsSize; - u32 maxEsSize; - u32 wordLength; - vm::psv::ptr pInfo; - vm::psv::ptr pOptInfo; -}; - - -s32 sceAudioencInitLibrary(u32 codecType, vm::psv::ptr pInitParam) +s32 sceAudioencInitLibrary(u32 codecType, vm::ptr pInitParam) { throw __FUNCTION__; } @@ -71,32 +14,32 @@ s32 sceAudioencTermLibrary(u32 codecType) throw __FUNCTION__; } -s32 sceAudioencCreateEncoder(vm::psv::ptr pCtrl, u32 codecType) +s32 sceAudioencCreateEncoder(vm::ptr pCtrl, u32 codecType) { throw __FUNCTION__; } -s32 sceAudioencDeleteEncoder(vm::psv::ptr pCtrl) +s32 sceAudioencDeleteEncoder(vm::ptr pCtrl) { throw __FUNCTION__; } -s32 sceAudioencEncode(vm::psv::ptr pCtrl) +s32 sceAudioencEncode(vm::ptr pCtrl) { throw __FUNCTION__; } -s32 sceAudioencClearContext(vm::psv::ptr pCtrl) +s32 sceAudioencClearContext(vm::ptr pCtrl) { throw __FUNCTION__; } -s32 sceAudioencGetOptInfo(vm::psv::ptr pCtrl) +s32 sceAudioencGetOptInfo(vm::ptr pCtrl) { throw __FUNCTION__; } -s32 sceAudioencGetInternalError(vm::psv::ptr pCtrl, vm::psv::ptr pInternalError) +s32 sceAudioencGetInternalError(vm::ptr pCtrl, vm::ptr pInternalError) { throw __FUNCTION__; } @@ -109,6 +52,7 @@ psv_log_base sceAudioenc("SceAudioenc", []() sceAudioenc.on_load = nullptr; sceAudioenc.on_unload = nullptr; sceAudioenc.on_stop = nullptr; + sceAudioenc.on_error = nullptr; REG_FUNC(0x76EE4DC6, sceAudioencInitLibrary); REG_FUNC(0xAB32D022, sceAudioencTermLibrary); diff --git a/rpcs3/Emu/ARMv7/Modules/sceAudioenc.h b/rpcs3/Emu/ARMv7/Modules/sceAudioenc.h new file mode 100644 index 0000000000..9b361005e0 --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/sceAudioenc.h @@ -0,0 +1,59 @@ +#pragma once + +struct SceAudioencInitStreamParam +{ + le_t size; + le_t totalStreams; +}; + +struct SceAudioencInfoCelp +{ + le_t size; + le_t excitationMode; + le_t samplingRate; + le_t bitRate; +}; + +struct SceAudioencOptInfoCelp +{ + le_t size; + u8 header[32]; + le_t headerSize; + le_t encoderVersion; +}; + + +union SceAudioencInitParam +{ + le_t size; + SceAudioencInitStreamParam celp; +}; + +union SceAudioencInfo +{ + le_t size; + SceAudioencInfoCelp celp; +}; + +union SceAudioencOptInfo +{ + le_t size; + SceAudioencOptInfoCelp celp; +}; + +struct SceAudioencCtrl +{ + le_t size; + le_t handle; + vm::lptr pInputPcm; + le_t inputPcmSize; + le_t maxPcmSize; + vm::lptr pOutputEs; + le_t outputEsSize; + le_t maxEsSize; + le_t wordLength; + vm::lptr pInfo; + vm::lptr pOptInfo; +}; + +extern psv_log_base sceAudioenc; diff --git a/rpcs3/Emu/ARMv7/Modules/sceCamera.cpp b/rpcs3/Emu/ARMv7/Modules/sceCamera.cpp index e341d6d75f..bd4d5dbc04 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceCamera.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceCamera.cpp @@ -2,46 +2,9 @@ #include "Emu/System.h" #include "Emu/ARMv7/PSVFuncList.h" -extern psv_log_base sceCamera; +#include "sceCamera.h" -struct SceCameraInfo -{ - u32 sizeThis; - u32 wPriority; - u32 wFormat; - u32 wResolution; - u32 wFramerate; - u32 wWidth; - u32 wHeight; - u32 wRange; - u32 _padding_0; - u32 sizeIBase; - u32 sizeUBase; - u32 sizeVBase; - vm::psv::ptr pvIBase; - vm::psv::ptr pvUBase; - vm::psv::ptr pvVBase; - u32 wPitch; - u32 wBuffer; -}; - -struct SceCameraRead -{ - u32 sizeThis; - s32 dwMode; - s32 _padding_0; - s32 dwStatus; - u32 qwFrame; - u32 qwTimestamp; - u32 sizeIBase; - u32 sizeUBase; - u32 sizeVBase; - vm::psv::ptr pvIBase; - vm::psv::ptr pvUBase; - vm::psv::ptr pvVBase; -}; - -s32 sceCameraOpen(s32 devnum, vm::psv::ptr pInfo) +s32 sceCameraOpen(s32 devnum, vm::ptr pInfo) { throw __FUNCTION__; } @@ -61,7 +24,7 @@ s32 sceCameraStop(s32 devnum) throw __FUNCTION__; } -s32 sceCameraRead(s32 devnum, vm::psv::ptr pRead) +s32 sceCameraRead(s32 devnum, vm::ptr pRead) { throw __FUNCTION__; } @@ -71,7 +34,7 @@ s32 sceCameraIsActive(s32 devnum) throw __FUNCTION__; } -s32 sceCameraGetSaturation(s32 devnum, vm::psv::ptr pLevel) +s32 sceCameraGetSaturation(s32 devnum, vm::ptr pLevel) { throw __FUNCTION__; } @@ -81,7 +44,7 @@ s32 sceCameraSetSaturation(s32 devnum, s32 level) throw __FUNCTION__; } -s32 sceCameraGetBrightness(s32 devnum, vm::psv::ptr pLevel) +s32 sceCameraGetBrightness(s32 devnum, vm::ptr pLevel) { throw __FUNCTION__; } @@ -91,7 +54,7 @@ s32 sceCameraSetBrightness(s32 devnum, s32 level) throw __FUNCTION__; } -s32 sceCameraGetContrast(s32 devnum, vm::psv::ptr pLevel) +s32 sceCameraGetContrast(s32 devnum, vm::ptr pLevel) { throw __FUNCTION__; } @@ -101,7 +64,7 @@ s32 sceCameraSetContrast(s32 devnum, s32 level) throw __FUNCTION__; } -s32 sceCameraGetSharpness(s32 devnum, vm::psv::ptr pLevel) +s32 sceCameraGetSharpness(s32 devnum, vm::ptr pLevel) { throw __FUNCTION__; } @@ -111,7 +74,7 @@ s32 sceCameraSetSharpness(s32 devnum, s32 level) throw __FUNCTION__; } -s32 sceCameraGetReverse(s32 devnum, vm::psv::ptr pMode) +s32 sceCameraGetReverse(s32 devnum, vm::ptr pMode) { throw __FUNCTION__; } @@ -121,7 +84,7 @@ s32 sceCameraSetReverse(s32 devnum, s32 mode) throw __FUNCTION__; } -s32 sceCameraGetEffect(s32 devnum, vm::psv::ptr pMode) +s32 sceCameraGetEffect(s32 devnum, vm::ptr pMode) { throw __FUNCTION__; } @@ -131,7 +94,7 @@ s32 sceCameraSetEffect(s32 devnum, s32 mode) throw __FUNCTION__; } -s32 sceCameraGetEV(s32 devnum, vm::psv::ptr pLevel) +s32 sceCameraGetEV(s32 devnum, vm::ptr pLevel) { throw __FUNCTION__; } @@ -141,7 +104,7 @@ s32 sceCameraSetEV(s32 devnum, s32 level) throw __FUNCTION__; } -s32 sceCameraGetZoom(s32 devnum, vm::psv::ptr pLevel) +s32 sceCameraGetZoom(s32 devnum, vm::ptr pLevel) { throw __FUNCTION__; } @@ -151,7 +114,7 @@ s32 sceCameraSetZoom(s32 devnum, s32 level) throw __FUNCTION__; } -s32 sceCameraGetAntiFlicker(s32 devnum, vm::psv::ptr pMode) +s32 sceCameraGetAntiFlicker(s32 devnum, vm::ptr pMode) { throw __FUNCTION__; } @@ -161,7 +124,7 @@ s32 sceCameraSetAntiFlicker(s32 devnum, s32 mode) throw __FUNCTION__; } -s32 sceCameraGetISO(s32 devnum, vm::psv::ptr pMode) +s32 sceCameraGetISO(s32 devnum, vm::ptr pMode) { throw __FUNCTION__; } @@ -171,7 +134,7 @@ s32 sceCameraSetISO(s32 devnum, s32 mode) throw __FUNCTION__; } -s32 sceCameraGetGain(s32 devnum, vm::psv::ptr pMode) +s32 sceCameraGetGain(s32 devnum, vm::ptr pMode) { throw __FUNCTION__; } @@ -181,7 +144,7 @@ s32 sceCameraSetGain(s32 devnum, s32 mode) throw __FUNCTION__; } -s32 sceCameraGetWhiteBalance(s32 devnum, vm::psv::ptr pMode) +s32 sceCameraGetWhiteBalance(s32 devnum, vm::ptr pMode) { throw __FUNCTION__; } @@ -191,7 +154,7 @@ s32 sceCameraSetWhiteBalance(s32 devnum, s32 mode) throw __FUNCTION__; } -s32 sceCameraGetBacklight(s32 devnum, vm::psv::ptr pMode) +s32 sceCameraGetBacklight(s32 devnum, vm::ptr pMode) { throw __FUNCTION__; } @@ -201,7 +164,7 @@ s32 sceCameraSetBacklight(s32 devnum, s32 mode) throw __FUNCTION__; } -s32 sceCameraGetNightmode(s32 devnum, vm::psv::ptr pMode) +s32 sceCameraGetNightmode(s32 devnum, vm::ptr pMode) { throw __FUNCTION__; } @@ -221,7 +184,7 @@ s32 sceCameraLedBlink(s32 devnum, s32 iOnCount, s32 iOffCount, s32 iBlinkCount) throw __FUNCTION__; } -s32 sceCameraGetNoiseReductionForDebug(s32 devnum, vm::psv::ptr pLevel) +s32 sceCameraGetNoiseReductionForDebug(s32 devnum, vm::ptr pLevel) { throw __FUNCTION__; } @@ -231,7 +194,7 @@ s32 sceCameraSetNoiseReductionForDebug(s32 devnum, s32 level) throw __FUNCTION__; } -s32 sceCameraGetSharpnessOffForDebug(s32 devnum, vm::psv::ptr pLevel) +s32 sceCameraGetSharpnessOffForDebug(s32 devnum, vm::ptr pLevel) { throw __FUNCTION__; } @@ -254,6 +217,7 @@ psv_log_base sceCamera("SceCamera", []() sceCamera.on_load = nullptr; sceCamera.on_unload = nullptr; sceCamera.on_stop = nullptr; + sceCamera.on_error = nullptr; REG_FUNC(0xA462F801, sceCameraOpen); REG_FUNC(0xCD6E1CFC, sceCameraClose); diff --git a/rpcs3/Emu/ARMv7/Modules/sceCamera.h b/rpcs3/Emu/ARMv7/Modules/sceCamera.h new file mode 100644 index 0000000000..b0edcf3b77 --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/sceCamera.h @@ -0,0 +1,40 @@ +#pragma once + +struct SceCameraInfo +{ + le_t sizeThis; + le_t wPriority; + le_t wFormat; + le_t wResolution; + le_t wFramerate; + le_t wWidth; + le_t wHeight; + le_t wRange; + le_t _padding_0; + le_t sizeIBase; + le_t sizeUBase; + le_t sizeVBase; + vm::lptr pvIBase; + vm::lptr pvUBase; + vm::lptr pvVBase; + le_t wPitch; + le_t wBuffer; +}; + +struct SceCameraRead +{ + le_t sizeThis; + le_t dwMode; + le_t _padding_0; + le_t dwStatus; + le_t qwFrame; + le_t qwTimestamp; + le_t sizeIBase; + le_t sizeUBase; + le_t sizeVBase; + vm::lptr pvIBase; + vm::lptr pvUBase; + vm::lptr pvVBase; +}; + +extern psv_log_base sceCamera; diff --git a/rpcs3/Emu/ARMv7/Modules/sceCodecEngine.cpp b/rpcs3/Emu/ARMv7/Modules/sceCodecEngine.cpp index cda018a995..3d821148f3 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceCodecEngine.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceCodecEngine.cpp @@ -2,13 +2,7 @@ #include "Emu/System.h" #include "Emu/ARMv7/PSVFuncList.h" -extern psv_log_base sceCodecEngine; - -struct SceCodecEnginePmonProcessorLoad -{ - u32 size; - u32 average; -}; +#include "sceCodecEngine.h" s32 sceCodecEnginePmonStart() { @@ -20,7 +14,7 @@ s32 sceCodecEnginePmonStop() throw __FUNCTION__; } -s32 sceCodecEnginePmonGetProcessorLoad(vm::psv::ptr pProcessorLoad) +s32 sceCodecEnginePmonGetProcessorLoad(vm::ptr pProcessorLoad) { throw __FUNCTION__; } @@ -38,6 +32,7 @@ psv_log_base sceCodecEngine("SceCodecEngine", []() sceCodecEngine.on_load = nullptr; sceCodecEngine.on_unload = nullptr; sceCodecEngine.on_stop = nullptr; + sceCodecEngine.on_error = nullptr; REG_FUNC(0x3E718890, sceCodecEnginePmonStart); REG_FUNC(0x268B1EF5, sceCodecEnginePmonStop); diff --git a/rpcs3/Emu/ARMv7/Modules/sceCodecEngine.h b/rpcs3/Emu/ARMv7/Modules/sceCodecEngine.h new file mode 100644 index 0000000000..9cd72d5598 --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/sceCodecEngine.h @@ -0,0 +1,9 @@ +#pragma once + +struct SceCodecEnginePmonProcessorLoad +{ + le_t size; + le_t average; +}; + +extern psv_log_base sceCodecEngine; diff --git a/rpcs3/Emu/ARMv7/Modules/sceCommonDialog.cpp b/rpcs3/Emu/ARMv7/Modules/sceCommonDialog.cpp index 3e7b998f63..81ddcfc3d2 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceCommonDialog.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceCommonDialog.cpp @@ -2,314 +2,14 @@ #include "Emu/System.h" #include "Emu/ARMv7/PSVFuncList.h" -#include "sceGxm.h" -#include "sceAppUtil.h" -#include "sceIme.h" +#include "sceCommonDialog.h" -extern psv_log_base sceCommonDialog; - -enum SceCommonDialogStatus : s32 -{ - SCE_COMMON_DIALOG_STATUS_NONE = 0, - SCE_COMMON_DIALOG_STATUS_RUNNING = 1, - SCE_COMMON_DIALOG_STATUS_FINISHED = 2 -}; - -enum SceCommonDialogResult : s32 -{ - SCE_COMMON_DIALOG_RESULT_OK, - SCE_COMMON_DIALOG_RESULT_USER_CANCELED, - SCE_COMMON_DIALOG_RESULT_ABORTED -}; - -struct SceCommonDialogRenderTargetInfo -{ - vm::psv::ptr depthSurfaceData; - vm::psv::ptr colorSurfaceData; - SceGxmColorSurfaceType surfaceType; - SceGxmColorFormat colorFormat; - u32 width; - u32 height; - u32 strideInPixels; - u8 reserved[32]; -}; - -struct SceCommonDialogUpdateParam -{ - SceCommonDialogRenderTargetInfo renderTarget; - vm::psv::ptr displaySyncObject; - u8 reserved[32]; -}; - -struct SceMsgDialogUserMessageParam -{ - s32 buttonType; - vm::psv::ptr msg; - char reserved[32]; -}; - -struct SceMsgDialogSystemMessageParam -{ - s32 sysMsgType; - s32 value; - char reserved[32]; -}; - -struct SceMsgDialogErrorCodeParam -{ - s32 errorCode; - char reserved[32]; -}; - -struct SceMsgDialogProgressBarParam -{ - s32 barType; - SceMsgDialogSystemMessageParam sysMsgParam; - vm::psv::ptr msg; - char reserved[32]; -}; - -struct SceMsgDialogParam -{ - u32 sdkVersion; - s32 mode; - vm::psv::ptr userMsgParam; - vm::psv::ptr sysMsgParam; - vm::psv::ptr errorCodeParam; - vm::psv::ptr progBarParam; - u32 flag; - char reserved[32]; -}; - -struct SceMsgDialogResult -{ - s32 mode; - s32 result; - s32 buttonId; - u8 reserved[32]; -}; - - -struct SceNetCheckDialogParam -{ - u32 sdkVersion; - s32 mode; - u8 reserved[128]; -}; - -struct SceNetCheckDialogResult -{ - s32 result; - u8 reserved[128]; -}; - -struct SceSaveDataDialogFixedParam -{ - u32 targetSlot; - char reserved[32]; -}; - -struct SceSaveDataDialogListParam -{ - vm::psv::ptr slotList; - u32 slotListSize; - s32 focusPos; - u32 focusId; - vm::psv::ptr listTitle; - char reserved[32]; -}; - -struct SceSaveDataDialogUserMessageParam -{ - s32 buttonType; - vm::psv::ptr msg; - u32 targetSlot; - char reserved[32]; -}; - -struct SceSaveDataDialogSystemMessageParam -{ - s32 sysMsgType; - s32 value; - u32 targetSlot; - char reserved[32]; -}; - -struct SceSaveDataDialogErrorCodeParam -{ - s32 errorCode; - u32 targetSlot; - char reserved[32]; -}; - -struct SceSaveDataDialogProgressBarParam -{ - s32 barType; - SceSaveDataDialogSystemMessageParam sysMsgParam; - vm::psv::ptr msg; - u32 targetSlot; - char reserved[32]; -}; - -struct SceSaveDataDialogSlotConfigParam -{ - vm::psv::ptr mountPoint; - vm::psv::ptr appSubDir; - char reserved[32]; -}; - -struct SceSaveDataDialogParam -{ - u32 sdkVersion; - s32 mode; - s32 dispType; - vm::psv::ptr fixedParam; - vm::psv::ptr listParam; - vm::psv::ptr userMsgParam; - vm::psv::ptr sysMsgParam; - vm::psv::ptr errorCodeParam; - vm::psv::ptr progBarParam; - vm::psv::ptr slotConfParam; - u32 flag; - vm::psv::ptr userdata; - char reserved[32]; -}; - -struct SceSaveDataDialogFinishParam -{ - u32 flag; - char reserved[32]; -}; - -struct SceSaveDataDialogSlotInfo -{ - u32 isExist; - vm::psv::ptr slotParam; - u8 reserved[32]; -}; - -struct SceSaveDataDialogResult -{ - s32 mode; - s32 result; - s32 buttonId; - u32 slotId; - vm::psv::ptr slotInfo; - vm::psv::ptr userdata; - char reserved[32]; -}; - - -struct SceImeDialogParam -{ - u32 sdkVersion; - u32 inputMethod; - u64 supportedLanguages; - s32 languagesForced; - u32 type; - u32 option; - vm::psv::ptr filter; - u32 dialogMode; - u32 textBoxMode; - vm::psv::ptr title; - u32 maxTextLength; - vm::psv::ptr initialText; - vm::psv::ptr inputTextBuffer; - char reserved[32]; -}; - -struct SceImeDialogResult -{ - s32 result; - char reserved[32]; -}; - -enum ScePhotoImportDialogFormatType : s32 -{ - SCE_PHOTOIMPORT_DIALOG_FORMAT_TYPE_UNKNOWN = 0, - SCE_PHOTOIMPORT_DIALOG_FORMAT_TYPE_JPEG, - SCE_PHOTOIMPORT_DIALOG_FORMAT_TYPE_PNG, - SCE_PHOTOIMPORT_DIALOG_FORMAT_TYPE_GIF, - SCE_PHOTOIMPORT_DIALOG_FORMAT_TYPE_BMP, - SCE_PHOTOIMPORT_DIALOG_FORMAT_TYPE_TIFF -}; - -enum ScePhotoImportDialogOrientation : s32 -{ - SCE_PHOTOIMPORT_DIALOG_ORIENTATION_UNKNOWN = 0, - SCE_PHOTOIMPORT_DIALOG_ORIENTATION_TOP_LEFT, - SCE_PHOTOIMPORT_DIALOG_ORIENTATION_TOP_RIGHT, - SCE_PHOTOIMPORT_DIALOG_ORIENTATION_BOTTOM_RIGHT, - SCE_PHOTOIMPORT_DIALOG_ORIENTATION_BOTTOM_LEFT, - SCE_PHOTOIMPORT_DIALOG_ORIENTATION_LEFT_TOP, - SCE_PHOTOIMPORT_DIALOG_ORIENTATION_RIGHT_TOP, - SCE_PHOTOIMPORT_DIALOG_ORIENTATION_RIGHT_BOTTOM, - SCE_PHOTOIMPORT_DIALOG_ORIENTATION_LEFT_BOTTOM -}; - -struct ScePhotoImportDialogFileDataSub -{ - u32 width; - u32 height; - ScePhotoImportDialogFormatType format; - ScePhotoImportDialogOrientation orientation; - char reserved[32]; -}; - -struct ScePhotoImportDialogFileData -{ - char fileName[1024]; - char photoTitle[256]; - char reserved[32]; -}; - -struct ScePhotoImportDialogItemData -{ - ScePhotoImportDialogFileData fileData; - ScePhotoImportDialogFileDataSub dataSub; - char reserved[32]; -}; - -struct ScePhotoImportDialogResult -{ - s32 result; - u32 importedItemNum; - char reserved[32]; -}; - -struct ScePhotoImportDialogParam -{ - u32 sdkVersion; - s32 mode; - u32 visibleCategory; - u32 itemCount; - vm::psv::ptr itemData; - char reserved[32]; -}; - -struct ScePhotoReviewDialogParam -{ - u32 sdkVersion; - s32 mode; - char fileName[1024]; - vm::psv::ptr workMemory; - u32 workMemorySize; - char reserved[32]; -}; - -struct ScePhotoReviewDialogResult -{ - s32 result; - char reserved[32]; -}; - - -s32 sceCommonDialogUpdate(vm::psv::ptr updateParam) +s32 sceCommonDialogUpdate(vm::ptr updateParam) { throw __FUNCTION__; } -s32 sceMsgDialogInit(vm::psv::ptr param) +s32 sceMsgDialogInit(vm::ptr param) { throw __FUNCTION__; } @@ -324,7 +24,7 @@ s32 sceMsgDialogAbort() throw __FUNCTION__; } -s32 sceMsgDialogGetResult(vm::psv::ptr result) +s32 sceMsgDialogGetResult(vm::ptr result) { throw __FUNCTION__; } @@ -349,7 +49,7 @@ s32 sceMsgDialogProgressBarSetValue(s32 target, u32 rate) throw __FUNCTION__; } -s32 sceNetCheckDialogInit(vm::psv::ptr param) +s32 sceNetCheckDialogInit(vm::ptr param) { throw __FUNCTION__; } @@ -364,7 +64,7 @@ s32 sceNetCheckDialogAbort() throw __FUNCTION__; } -s32 sceNetCheckDialogGetResult(vm::psv::ptr result) +s32 sceNetCheckDialogGetResult(vm::ptr result) { throw __FUNCTION__; } @@ -374,7 +74,7 @@ s32 sceNetCheckDialogTerm() throw __FUNCTION__; } -s32 sceSaveDataDialogInit(vm::psv::ptr param) +s32 sceSaveDataDialogInit(vm::ptr param) { throw __FUNCTION__; } @@ -389,7 +89,7 @@ s32 sceSaveDataDialogAbort() throw __FUNCTION__; } -s32 sceSaveDataDialogGetResult(vm::psv::ptr result) +s32 sceSaveDataDialogGetResult(vm::ptr result) { throw __FUNCTION__; } @@ -409,12 +109,12 @@ s32 sceSaveDataDialogSubClose() throw __FUNCTION__; } -s32 sceSaveDataDialogContinue(vm::psv::ptr param) +s32 sceSaveDataDialogContinue(vm::ptr param) { throw __FUNCTION__; } -s32 sceSaveDataDialogFinish(vm::psv::ptr param) +s32 sceSaveDataDialogFinish(vm::ptr param) { throw __FUNCTION__; } @@ -429,7 +129,7 @@ s32 sceSaveDataDialogProgressBarSetValue(s32 target, u32 rate) throw __FUNCTION__; } -s32 sceImeDialogInit(vm::psv::ptr param) +s32 sceImeDialogInit(vm::ptr param) { throw __FUNCTION__; } @@ -444,7 +144,7 @@ s32 sceImeDialogAbort() throw __FUNCTION__; } -s32 sceImeDialogGetResult(vm::psv::ptr result) +s32 sceImeDialogGetResult(vm::ptr result) { throw __FUNCTION__; } @@ -454,7 +154,7 @@ s32 sceImeDialogTerm() throw __FUNCTION__; } -s32 scePhotoImportDialogInit(vm::psv::ptr param) +s32 scePhotoImportDialogInit(vm::ptr param) { throw __FUNCTION__; } @@ -464,7 +164,7 @@ SceCommonDialogStatus scePhotoImportDialogGetStatus() throw __FUNCTION__; } -s32 scePhotoImportDialogGetResult(vm::psv::ptr result) +s32 scePhotoImportDialogGetResult(vm::ptr result) { throw __FUNCTION__; } @@ -479,7 +179,7 @@ s32 scePhotoImportDialogAbort() throw __FUNCTION__; } -s32 scePhotoReviewDialogInit(vm::psv::ptr param) +s32 scePhotoReviewDialogInit(vm::ptr param) { throw __FUNCTION__; } @@ -489,7 +189,7 @@ SceCommonDialogStatus scePhotoReviewDialogGetStatus() throw __FUNCTION__; } -s32 scePhotoReviewDialogGetResult(vm::psv::ptr result) +s32 scePhotoReviewDialogGetResult(vm::ptr result) { throw __FUNCTION__; } @@ -512,6 +212,7 @@ psv_log_base sceCommonDialog("SceCommonDialog", []() sceCommonDialog.on_load = nullptr; sceCommonDialog.on_unload = nullptr; sceCommonDialog.on_stop = nullptr; + sceCommonDialog.on_error = nullptr; REG_FUNC(0x90530F2F, sceCommonDialogUpdate); REG_FUNC(0x755FF270, sceMsgDialogInit); diff --git a/rpcs3/Emu/ARMv7/Modules/sceCommonDialog.h b/rpcs3/Emu/ARMv7/Modules/sceCommonDialog.h new file mode 100644 index 0000000000..ff75ebf615 --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/sceCommonDialog.h @@ -0,0 +1,302 @@ +#pragma once + +#include "sceGxm.h" +#include "sceAppUtil.h" +#include "sceIme.h" + +enum SceCommonDialogStatus : s32 +{ + SCE_COMMON_DIALOG_STATUS_NONE = 0, + SCE_COMMON_DIALOG_STATUS_RUNNING = 1, + SCE_COMMON_DIALOG_STATUS_FINISHED = 2, +}; + +enum SceCommonDialogResult : s32 +{ + SCE_COMMON_DIALOG_RESULT_OK, + SCE_COMMON_DIALOG_RESULT_USER_CANCELED, + SCE_COMMON_DIALOG_RESULT_ABORTED, +}; + +struct SceCommonDialogRenderTargetInfo +{ + vm::lptr depthSurfaceData; + vm::lptr colorSurfaceData; + le_t surfaceType; // SceGxmColorSurfaceType + le_t colorFormat; // SceGxmColorFormat + le_t width; + le_t height; + le_t strideInPixels; + u8 reserved[32]; +}; + +struct SceCommonDialogUpdateParam +{ + SceCommonDialogRenderTargetInfo renderTarget; + vm::lptr displaySyncObject; + u8 reserved[32]; +}; + +struct SceMsgDialogUserMessageParam +{ + le_t buttonType; + vm::lptr msg; + char reserved[32]; +}; + +struct SceMsgDialogSystemMessageParam +{ + le_t sysMsgType; + le_t value; + char reserved[32]; +}; + +struct SceMsgDialogErrorCodeParam +{ + le_t errorCode; + char reserved[32]; +}; + +struct SceMsgDialogProgressBarParam +{ + le_t barType; + SceMsgDialogSystemMessageParam sysMsgParam; + vm::lptr msg; + char reserved[32]; +}; + +struct SceMsgDialogParam +{ + le_t sdkVersion; + le_t mode; + vm::lptr userMsgParam; + vm::lptr sysMsgParam; + vm::lptr errorCodeParam; + vm::lptr progBarParam; + le_t flag; + char reserved[32]; +}; + +struct SceMsgDialogResult +{ + le_t mode; + le_t result; + le_t buttonId; + u8 reserved[32]; +}; + + +struct SceNetCheckDialogParam +{ + le_t sdkVersion; + le_t mode; + u8 reserved[128]; +}; + +struct SceNetCheckDialogResult +{ + le_t result; + u8 reserved[128]; +}; + +struct SceSaveDataDialogFixedParam +{ + le_t targetSlot; + char reserved[32]; +}; + +struct SceSaveDataDialogListParam +{ + vm::lptr slotList; + le_t slotListSize; + le_t focusPos; + le_t focusId; + vm::lptr listTitle; + char reserved[32]; +}; + +struct SceSaveDataDialogUserMessageParam +{ + le_t buttonType; + vm::lptr msg; + le_t targetSlot; + char reserved[32]; +}; + +struct SceSaveDataDialogSystemMessageParam +{ + le_t sysMsgType; + le_t value; + le_t targetSlot; + char reserved[32]; +}; + +struct SceSaveDataDialogErrorCodeParam +{ + le_t errorCode; + le_t targetSlot; + char reserved[32]; +}; + +struct SceSaveDataDialogProgressBarParam +{ + le_t barType; + SceSaveDataDialogSystemMessageParam sysMsgParam; + vm::lptr msg; + le_t targetSlot; + char reserved[32]; +}; + +struct SceSaveDataDialogSlotConfigParam +{ + vm::lptr mountPoint; + vm::lptr appSubDir; + char reserved[32]; +}; + +struct SceSaveDataDialogParam +{ + le_t sdkVersion; + le_t mode; + le_t dispType; + vm::lptr fixedParam; + vm::lptr listParam; + vm::lptr userMsgParam; + vm::lptr sysMsgParam; + vm::lptr errorCodeParam; + vm::lptr progBarParam; + vm::lptr slotConfParam; + le_t flag; + vm::lptr userdata; + char reserved[32]; +}; + +struct SceSaveDataDialogFinishParam +{ + le_t flag; + char reserved[32]; +}; + +struct SceSaveDataDialogSlotInfo +{ + le_t isExist; + vm::lptr slotParam; + u8 reserved[32]; +}; + +struct SceSaveDataDialogResult +{ + le_t mode; + le_t result; + le_t buttonId; + le_t slotId; + vm::lptr slotInfo; + vm::lptr userdata; + char reserved[32]; +}; + + +struct SceImeDialogParam +{ + le_t sdkVersion; + le_t inputMethod; + le_t supportedLanguages; + le_t languagesForced; + le_t type; + le_t option; + vm::lptr filter; + le_t dialogMode; + le_t textBoxMode; + vm::lptr title; + le_t maxTextLength; + vm::lptr initialText; + vm::lptr inputTextBuffer; + char reserved[32]; +}; + +struct SceImeDialogResult +{ + le_t result; + char reserved[32]; +}; + +enum ScePhotoImportDialogFormatType : s32 +{ + SCE_PHOTOIMPORT_DIALOG_FORMAT_TYPE_UNKNOWN = 0, + SCE_PHOTOIMPORT_DIALOG_FORMAT_TYPE_JPEG, + SCE_PHOTOIMPORT_DIALOG_FORMAT_TYPE_PNG, + SCE_PHOTOIMPORT_DIALOG_FORMAT_TYPE_GIF, + SCE_PHOTOIMPORT_DIALOG_FORMAT_TYPE_BMP, + SCE_PHOTOIMPORT_DIALOG_FORMAT_TYPE_TIFF +}; + +enum ScePhotoImportDialogOrientation : s32 +{ + SCE_PHOTOIMPORT_DIALOG_ORIENTATION_UNKNOWN = 0, + SCE_PHOTOIMPORT_DIALOG_ORIENTATION_TOP_LEFT, + SCE_PHOTOIMPORT_DIALOG_ORIENTATION_TOP_RIGHT, + SCE_PHOTOIMPORT_DIALOG_ORIENTATION_BOTTOM_RIGHT, + SCE_PHOTOIMPORT_DIALOG_ORIENTATION_BOTTOM_LEFT, + SCE_PHOTOIMPORT_DIALOG_ORIENTATION_LEFT_TOP, + SCE_PHOTOIMPORT_DIALOG_ORIENTATION_RIGHT_TOP, + SCE_PHOTOIMPORT_DIALOG_ORIENTATION_RIGHT_BOTTOM, + SCE_PHOTOIMPORT_DIALOG_ORIENTATION_LEFT_BOTTOM, +}; + +struct ScePhotoImportDialogFileDataSub +{ + le_t width; + le_t height; + ScePhotoImportDialogFormatType format; + ScePhotoImportDialogOrientation orientation; + char reserved[32]; +}; + +struct ScePhotoImportDialogFileData +{ + char fileName[1024]; + char photoTitle[256]; + char reserved[32]; +}; + +struct ScePhotoImportDialogItemData +{ + ScePhotoImportDialogFileData fileData; + ScePhotoImportDialogFileDataSub dataSub; + char reserved[32]; +}; + +struct ScePhotoImportDialogResult +{ + le_t result; + le_t importedItemNum; + char reserved[32]; +}; + +struct ScePhotoImportDialogParam +{ + le_t sdkVersion; + le_t mode; + le_t visibleCategory; + le_t itemCount; + vm::lptr itemData; + char reserved[32]; +}; + +struct ScePhotoReviewDialogParam +{ + le_t sdkVersion; + le_t mode; + char fileName[1024]; + vm::lptr workMemory; + le_t workMemorySize; + char reserved[32]; +}; + +struct ScePhotoReviewDialogResult +{ + le_t result; + char reserved[32]; +}; + +extern psv_log_base sceCommonDialog; diff --git a/rpcs3/Emu/ARMv7/Modules/sceCtrl.cpp b/rpcs3/Emu/ARMv7/Modules/sceCtrl.cpp index b858e40972..64fdb24a1a 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceCtrl.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceCtrl.cpp @@ -2,60 +2,39 @@ #include "Emu/System.h" #include "Emu/ARMv7/PSVFuncList.h" -extern psv_log_base sceCtrl; - -struct SceCtrlData -{ - u64 timeStamp; - u32 buttons; - u8 lx; - u8 ly; - u8 rx; - u8 ry; - u8 rsrv[16]; -}; - -struct SceCtrlRapidFireRule -{ - u32 uiMask; - u32 uiTrigger; - u32 uiTarget; - u32 uiDelay; - u32 uiMake; - u32 uiBreak; -}; +#include "sceCtrl.h" s32 sceCtrlSetSamplingMode(u32 uiMode) { throw __FUNCTION__; } -s32 sceCtrlGetSamplingMode(vm::psv::ptr puiMode) +s32 sceCtrlGetSamplingMode(vm::ptr puiMode) { throw __FUNCTION__; } -s32 sceCtrlPeekBufferPositive(s32 port, vm::psv::ptr pData, s32 nBufs) +s32 sceCtrlPeekBufferPositive(s32 port, vm::ptr pData, s32 nBufs) { throw __FUNCTION__; } -s32 sceCtrlPeekBufferNegative(s32 port, vm::psv::ptr pData, s32 nBufs) +s32 sceCtrlPeekBufferNegative(s32 port, vm::ptr pData, s32 nBufs) { throw __FUNCTION__; } -s32 sceCtrlReadBufferPositive(s32 port, vm::psv::ptr pData, s32 nBufs) +s32 sceCtrlReadBufferPositive(s32 port, vm::ptr pData, s32 nBufs) { throw __FUNCTION__; } -s32 sceCtrlReadBufferNegative(s32 port, vm::psv::ptr pData, s32 nBufs) +s32 sceCtrlReadBufferNegative(s32 port, vm::ptr pData, s32 nBufs) { throw __FUNCTION__; } -s32 sceCtrlSetRapidFire(s32 port, s32 idx, vm::psv::ptr pRule) +s32 sceCtrlSetRapidFire(s32 port, s32 idx, vm::ptr pRule) { throw __FUNCTION__; } @@ -73,6 +52,7 @@ psv_log_base sceCtrl("SceCtrl", []() sceCtrl.on_load = nullptr; sceCtrl.on_unload = nullptr; sceCtrl.on_stop = nullptr; + sceCtrl.on_error = nullptr; REG_FUNC(0xA497B150, sceCtrlSetSamplingMode); REG_FUNC(0xEC752AAF, sceCtrlGetSamplingMode); diff --git a/rpcs3/Emu/ARMv7/Modules/sceCtrl.h b/rpcs3/Emu/ARMv7/Modules/sceCtrl.h new file mode 100644 index 0000000000..278e478b78 --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/sceCtrl.h @@ -0,0 +1,24 @@ +#pragma once + +struct SceCtrlData +{ + le_t timeStamp; + le_t buttons; + u8 lx; + u8 ly; + u8 rx; + u8 ry; + u8 reserved[16]; +}; + +struct SceCtrlRapidFireRule +{ + le_t uiMask; + le_t uiTrigger; + le_t uiTarget; + le_t uiDelay; + le_t uiMake; + le_t uiBreak; +}; + +extern psv_log_base sceCtrl; diff --git a/rpcs3/Emu/ARMv7/Modules/sceDbg.cpp b/rpcs3/Emu/ARMv7/Modules/sceDbg.cpp index 6a2cc4c9a2..1de7d91282 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceDbg.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceDbg.cpp @@ -2,13 +2,7 @@ #include "Emu/System.h" #include "Emu/ARMv7/PSVFuncList.h" -extern psv_log_base sceDbg; - -enum SceDbgBreakOnErrorState : s32 -{ - SCE_DBG_DISABLE_BREAK_ON_ERROR = 0, - SCE_DBG_ENABLE_BREAK_ON_ERROR -}; +#include "sceDbg.h" s32 sceDbgSetMinimumLogLevel(s32 minimumLogLevel) { @@ -20,12 +14,12 @@ s32 sceDbgSetBreakOnErrorState(SceDbgBreakOnErrorState state) throw __FUNCTION__; } -s32 sceDbgAssertionHandler(vm::psv::ptr pFile, s32 line, bool stop, vm::psv::ptr pComponent, vm::psv::ptr pMessage) // va_args... +s32 sceDbgAssertionHandler(vm::ptr pFile, s32 line, bool stop, vm::ptr pComponent, vm::ptr pMessage) // va_args... { throw __FUNCTION__; } -s32 sceDbgLoggingHandler(vm::psv::ptr pFile, s32 line, s32 severity, vm::psv::ptr pComponent, vm::psv::ptr pMessage) // va_args... +s32 sceDbgLoggingHandler(vm::ptr pFile, s32 line, s32 severity, vm::ptr pComponent, vm::ptr pMessage) // va_args... { throw __FUNCTION__; } @@ -38,6 +32,7 @@ psv_log_base sceDbg("SceDbg", []() sceDbg.on_load = nullptr; sceDbg.on_unload = nullptr; sceDbg.on_stop = nullptr; + sceDbg.on_error = nullptr; REG_FUNC(0x941622FA, sceDbgSetMinimumLogLevel); REG_FUNC(0x1AF3678B, sceDbgAssertionHandler); diff --git a/rpcs3/Emu/ARMv7/Modules/sceDbg.h b/rpcs3/Emu/ARMv7/Modules/sceDbg.h new file mode 100644 index 0000000000..c9136a4c0f --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/sceDbg.h @@ -0,0 +1,9 @@ +#pragma once + +enum SceDbgBreakOnErrorState : s32 +{ + SCE_DBG_DISABLE_BREAK_ON_ERROR = 0, + SCE_DBG_ENABLE_BREAK_ON_ERROR +}; + +extern psv_log_base sceDbg; diff --git a/rpcs3/Emu/ARMv7/Modules/sceDeci4p.cpp b/rpcs3/Emu/ARMv7/Modules/sceDeci4p.cpp index f0cf7e3c8e..a9d66bac53 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceDeci4p.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceDeci4p.cpp @@ -2,11 +2,9 @@ #include "Emu/System.h" #include "Emu/ARMv7/PSVFuncList.h" -extern psv_log_base sceDeci4p; +#include "sceDeci4p.h" -typedef vm::psv::ptr pCommon)> SceKernelDeci4pCallback; - -s32 sceKernelDeci4pOpen(vm::psv::ptr protoname, u32 protonum, u32 bufsize) +s32 sceKernelDeci4pOpen(vm::ptr protoname, u32 protonum, u32 bufsize) { throw __FUNCTION__; } @@ -16,12 +14,12 @@ s32 sceKernelDeci4pClose(s32 socketid) throw __FUNCTION__; } -s32 sceKernelDeci4pRead(s32 socketid, vm::psv::ptr buffer, u32 size, u32 reserved) +s32 sceKernelDeci4pRead(s32 socketid, vm::ptr buffer, u32 size, u32 reserved) { throw __FUNCTION__; } -s32 sceKernelDeci4pWrite(s32 socketid, vm::psv::ptr buffer, u32 size, u32 reserved) +s32 sceKernelDeci4pWrite(s32 socketid, vm::ptr buffer, u32 size, u32 reserved) { throw __FUNCTION__; } @@ -39,6 +37,7 @@ psv_log_base sceDeci4p("SceDeci4pUserp", []() sceDeci4p.on_load = nullptr; sceDeci4p.on_unload = nullptr; sceDeci4p.on_stop = nullptr; + sceDeci4p.on_error = nullptr; REG_FUNC(0x28578FE8, sceKernelDeci4pOpen); REG_FUNC(0x63B0C50F, sceKernelDeci4pClose); diff --git a/rpcs3/Emu/ARMv7/Modules/sceDeci4p.h b/rpcs3/Emu/ARMv7/Modules/sceDeci4p.h new file mode 100644 index 0000000000..8f5e20acfe --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/sceDeci4p.h @@ -0,0 +1,5 @@ +#pragma once + +using SceKernelDeci4pCallback = func_def pCommon)>; + +extern psv_log_base sceDeci4p; diff --git a/rpcs3/Emu/ARMv7/Modules/sceDeflt.cpp b/rpcs3/Emu/ARMv7/Modules/sceDeflt.cpp index f1ce171d65..7982dff124 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceDeflt.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceDeflt.cpp @@ -2,69 +2,69 @@ #include "Emu/System.h" #include "Emu/ARMv7/PSVFuncList.h" -extern psv_log_base sceDeflt; +#include "sceDeflt.h" -s32 sceGzipIsValid(vm::psv::ptr pSrcGzip) +s32 sceGzipIsValid(vm::ptr pSrcGzip) { throw __FUNCTION__; } -s32 sceGzipGetInfo(vm::psv::ptr pSrcGzip, vm::psv::pptr ppvExtra, vm::psv::pptr ppszName, vm::psv::pptr ppszComment, vm::psv::ptr pusCrc, vm::psv::pptr ppvData) +s32 sceGzipGetInfo(vm::ptr pSrcGzip, vm::pptr ppvExtra, vm::pptr ppszName, vm::pptr ppszComment, vm::ptr pusCrc, vm::pptr ppvData) { throw __FUNCTION__; } -vm::psv::ptr sceGzipGetName(vm::psv::ptr pSrcGzip) +vm::ptr sceGzipGetName(vm::ptr pSrcGzip) { throw __FUNCTION__; } -vm::psv::ptr sceGzipGetComment(vm::psv::ptr pSrcGzip) +vm::ptr sceGzipGetComment(vm::ptr pSrcGzip) { throw __FUNCTION__; } -vm::psv::ptr sceGzipGetCompressedData(vm::psv::ptr pSrcGzip) +vm::ptr sceGzipGetCompressedData(vm::ptr pSrcGzip) { throw __FUNCTION__; } -s32 sceGzipDecompress(vm::psv::ptr pDst, u32 uiBufSize, vm::psv::ptr pSrcGzip, vm::psv::ptr puiCrc32) +s32 sceGzipDecompress(vm::ptr pDst, u32 uiBufSize, vm::ptr pSrcGzip, vm::ptr puiCrc32) { throw __FUNCTION__; } -s32 sceZlibIsValid(vm::psv::ptr pSrcZlib) +s32 sceZlibIsValid(vm::ptr pSrcZlib) { throw __FUNCTION__; } -s32 sceZlibGetInfo(vm::psv::ptr pSrcZlib, vm::psv::ptr pbCmf, vm::psv::ptr pbFlg, vm::psv::ptr puiDictId, vm::psv::pptr ppvData) +s32 sceZlibGetInfo(vm::ptr pSrcZlib, vm::ptr pbCmf, vm::ptr pbFlg, vm::ptr puiDictId, vm::pptr ppvData) { throw __FUNCTION__; } -vm::psv::ptr sceZlibGetCompressedData(vm::psv::ptr pSrcZlib) +vm::ptr sceZlibGetCompressedData(vm::ptr pSrcZlib) { throw __FUNCTION__; } -s32 sceZlibDecompress(vm::psv::ptr pDst, u32 uiBufSize, vm::psv::ptr pSrcZlib, vm::psv::ptr puiAdler32) +s32 sceZlibDecompress(vm::ptr pDst, u32 uiBufSize, vm::ptr pSrcZlib, vm::ptr puiAdler32) { throw __FUNCTION__; } -u32 sceZlibAdler32(u32 uiAdler, vm::psv::ptr pSrc, u32 uiSize) +u32 sceZlibAdler32(u32 uiAdler, vm::ptr pSrc, u32 uiSize) { throw __FUNCTION__; } -s32 sceDeflateDecompress(vm::psv::ptr pDst, u32 uiBufSize, vm::psv::ptr pSrcDeflate, vm::psv::pptr ppNext) +s32 sceDeflateDecompress(vm::ptr pDst, u32 uiBufSize, vm::ptr pSrcDeflate, vm::pptr ppNext) { throw __FUNCTION__; } -s32 sceZipGetInfo(vm::psv::ptr pSrc, vm::psv::pptr ppvExtra, vm::psv::ptr puiCrc, vm::psv::pptr ppvData) +s32 sceZipGetInfo(vm::ptr pSrc, vm::pptr ppvExtra, vm::ptr puiCrc, vm::pptr ppvData) { throw __FUNCTION__; } @@ -77,6 +77,7 @@ psv_log_base sceDeflt("SceDeflt", []() sceDeflt.on_load = nullptr; sceDeflt.on_unload = nullptr; sceDeflt.on_stop = nullptr; + sceDeflt.on_error = nullptr; REG_FUNC(0xCD83A464, sceZlibAdler32); REG_FUNC(0x110D5050, sceDeflateDecompress); diff --git a/rpcs3/Emu/ARMv7/Modules/sceDeflt.h b/rpcs3/Emu/ARMv7/Modules/sceDeflt.h new file mode 100644 index 0000000000..1d61e9f7b1 --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/sceDeflt.h @@ -0,0 +1,3 @@ +#pragma once + +extern psv_log_base sceDeflt; diff --git a/rpcs3/Emu/ARMv7/Modules/sceDisplay.cpp b/rpcs3/Emu/ARMv7/Modules/sceDisplay.cpp index c03c7622e5..e06d0976c9 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceDisplay.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceDisplay.cpp @@ -2,29 +2,19 @@ #include "Emu/System.h" #include "Emu/ARMv7/PSVFuncList.h" -extern psv_log_base sceDisplay; +#include "sceDisplay.h" -struct SceDisplayFrameBuf -{ - u32 size; - vm::psv::ptr base; - u32 pitch; - u32 pixelformat; - u32 width; - u32 height; -}; - -s32 sceDisplayGetRefreshRate(vm::psv::ptr pFps) +s32 sceDisplayGetRefreshRate(vm::ptr pFps) { throw __FUNCTION__; } -s32 sceDisplaySetFrameBuf(vm::psv::ptr pFrameBuf, s32 iUpdateTimingMode) +s32 sceDisplaySetFrameBuf(vm::ptr pFrameBuf, s32 iUpdateTimingMode) { throw __FUNCTION__; } -s32 sceDisplayGetFrameBuf(vm::psv::ptr pFrameBuf, s32 iUpdateTimingMode) +s32 sceDisplayGetFrameBuf(vm::ptr pFrameBuf, s32 iUpdateTimingMode) { throw __FUNCTION__; } @@ -92,6 +82,7 @@ psv_log_base sceDisplay("SceDisplay", []() sceDisplay.on_load = nullptr; sceDisplay.on_unload = nullptr; sceDisplay.on_stop = nullptr; + sceDisplay.on_error = nullptr; // SceDisplayUser REG_FUNC(0x7A410B64, sceDisplaySetFrameBuf); diff --git a/rpcs3/Emu/ARMv7/Modules/sceDisplay.h b/rpcs3/Emu/ARMv7/Modules/sceDisplay.h new file mode 100644 index 0000000000..cce29c9e38 --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/sceDisplay.h @@ -0,0 +1,13 @@ +#pragma once + +struct SceDisplayFrameBuf +{ + le_t size; + vm::lptr base; + le_t pitch; + le_t pixelformat; + le_t width; + le_t height; +}; + +extern psv_log_base sceDisplay; diff --git a/rpcs3/Emu/ARMv7/Modules/sceFiber.cpp b/rpcs3/Emu/ARMv7/Modules/sceFiber.cpp index cd2155cd1d..4324f85557 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceFiber.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceFiber.cpp @@ -2,80 +2,44 @@ #include "Emu/System.h" #include "Emu/ARMv7/PSVFuncList.h" -extern psv_log_base sceFiber; +#include "sceFiber.h" -typedef vm::psv::ptr SceFiberEntry; - -struct SceFiber -{ - static const uint size = 128; - static const uint align = 8; - u64 padding[size / sizeof(u64)]; -}; - -struct SceFiberOptParam -{ - static const uint size = 128; - static const uint align = 8; - u64 padding[size / sizeof(u64)]; -}; - -struct SceFiberInfo -{ - static const uint size = 128; - static const uint align = 8; - - union - { - u64 padding[size / sizeof(u64)]; - - struct - { - SceFiberEntry entry; - u32 argOnInitialize; - vm::psv::ptr addrContext; - s32 sizeContext; - char name[32]; - }; - }; -}; - -s32 _sceFiberInitializeImpl(vm::psv::ptr fiber, vm::psv::ptr name, SceFiberEntry entry, u32 argOnInitialize, vm::psv::ptr addrContext, u32 sizeContext, vm::psv::ptr optParam, u32 buildVersion) +s32 _sceFiberInitializeImpl(vm::ptr fiber, vm::ptr name, vm::ptr entry, u32 argOnInitialize, vm::ptr addrContext, u32 sizeContext, vm::ptr optParam, u32 buildVersion) { throw __FUNCTION__; } -s32 sceFiberOptParamInitialize(vm::psv::ptr optParam) +s32 sceFiberOptParamInitialize(vm::ptr optParam) { throw __FUNCTION__; } -s32 sceFiberFinalize(vm::psv::ptr fiber) +s32 sceFiberFinalize(vm::ptr fiber) { throw __FUNCTION__; } -s32 sceFiberRun(vm::psv::ptr fiber, u32 argOnRunTo, vm::psv::ptr argOnReturn) +s32 sceFiberRun(vm::ptr fiber, u32 argOnRunTo, vm::ptr argOnReturn) { throw __FUNCTION__; } -s32 sceFiberSwitch(vm::psv::ptr fiber, u32 argOnRunTo, vm::psv::ptr argOnRun) +s32 sceFiberSwitch(vm::ptr fiber, u32 argOnRunTo, vm::ptr argOnRun) { throw __FUNCTION__; } -s32 sceFiberGetSelf(vm::psv::pptr fiber) +s32 sceFiberGetSelf(vm::pptr fiber) { throw __FUNCTION__; } -s32 sceFiberReturnToThread(u32 argOnReturn, vm::psv::ptr argOnRun) +s32 sceFiberReturnToThread(u32 argOnReturn, vm::ptr argOnRun) { throw __FUNCTION__; } -s32 sceFiberGetInfo(vm::psv::ptr fiber, vm::psv::ptr fiberInfo) +s32 sceFiberGetInfo(vm::ptr fiber, vm::ptr fiberInfo) { throw __FUNCTION__; } @@ -88,6 +52,7 @@ psv_log_base sceFiber("SceFiber", []() sceFiber.on_load = nullptr; sceFiber.on_unload = nullptr; sceFiber.on_stop = nullptr; + sceFiber.on_error = nullptr; REG_FUNC(0xF24A298C, _sceFiberInitializeImpl); //REG_FUNC(0xC6A3F9BB, _sceFiberInitializeWithInternalOptionImpl); diff --git a/rpcs3/Emu/ARMv7/Modules/sceFiber.h b/rpcs3/Emu/ARMv7/Modules/sceFiber.h new file mode 100644 index 0000000000..731ce843cd --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/sceFiber.h @@ -0,0 +1,38 @@ +#pragma once + +using SceFiberEntry = func_def; + +struct SceFiber +{ + le_t padding[16]; +}; + +CHECK_SIZE_ALIGN(SceFiber, 128, 8); + +struct SceFiberOptParam +{ + le_t padding[16]; +}; + +CHECK_SIZE_ALIGN(SceFiberOptParam, 128, 8); + +struct SceFiberInfo +{ + union + { + le_t padding[16]; + + struct + { + vm::lptr entry; + le_t argOnInitialize; + vm::lptr addrContext; + le_t sizeContext; + char name[32]; + }; + }; +}; + +CHECK_SIZE_ALIGN(SceFiberInfo, 128, 8); + +extern psv_log_base sceFiber; diff --git a/rpcs3/Emu/ARMv7/Modules/sceFios.cpp b/rpcs3/Emu/ARMv7/Modules/sceFios.cpp index 49831265e5..7994f1a8fe 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceFios.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceFios.cpp @@ -2,127 +2,9 @@ #include "Emu/System.h" #include "Emu/ARMv7/PSVFuncList.h" -extern psv_log_base sceFios; +#include "sceFios.h" -typedef s64 SceFiosOffset; -typedef s64 SceFiosSize; -typedef u8 SceFiosOpEvent; -typedef s32 SceFiosHandle; -typedef SceFiosHandle SceFiosOp; -typedef SceFiosHandle SceFiosFH; -typedef SceFiosHandle SceFiosDH; -typedef s64 SceFiosTime; -typedef s8 SceFiosPriority; -typedef SceFiosTime SceFiosTimeInterval; -typedef u64 SceFiosDate; -typedef s32 SceFiosOverlayID; - -typedef vm::psv::ptr pContext, SceFiosOp op, SceFiosOpEvent event, s32 err)> SceFiosOpCallback; -typedef vm::psv::ptr fmt, va_list ap)> SceFiosVprintfCallback; -typedef vm::psv::ptr(vm::psv::ptr dst, vm::psv::ptr src, u32 len)> SceFiosMemcpyCallback; - -enum SceFiosWhence : s32 -{ - SCE_FIOS_SEEK_SET = 0, - SCE_FIOS_SEEK_CUR = 1, - SCE_FIOS_SEEK_END = 2 -}; - -struct SceFiosBuffer -{ - vm::psv::ptr pPtr; - u32 length; -}; - -struct SceFiosOpAttr -{ - SceFiosTime deadline; - SceFiosOpCallback pCallback; - vm::psv::ptr pCallbackContext; - s32 priority : 8; - u32 opflags : 24; - u32 userTag; - vm::psv::ptr userPtr; - vm::psv::ptr pReserved; -}; - -struct SceFiosDirEntry -{ - SceFiosOffset fileSize; - u32 statFlags; - u16 nameLength; - u16 fullPathLength; - u16 offsetToName; - u16 reserved[3]; - char fullPath[1024]; -}; - -struct SceFiosStat -{ - SceFiosOffset fileSize; - SceFiosDate accessDate; - SceFiosDate modificationDate; - SceFiosDate creationDate; - u32 statFlags; - u32 reserved; - s64 uid; - s64 gid; - s64 dev; - s64 ino; - s64 mode; -}; - -struct SceFiosOpenParams -{ - u32 openFlags; - u32 reserved; - SceFiosBuffer buffer; -}; - -struct SceFiosTuple -{ - SceFiosOffset offset; - SceFiosSize size; - char path[1024]; -}; - -struct SceFiosParams -{ - u32 initialized : 1; - u32 paramsSize : 14; - u32 pathMax : 16; - u32 profiling; - SceFiosBuffer opStorage; - SceFiosBuffer fhStorage; - SceFiosBuffer dhStorage; - SceFiosBuffer chunkStorage; - SceFiosVprintfCallback pVprintf; - SceFiosMemcpyCallback pMemcpy; - s32 threadPriority[2]; - s32 threadAffinity[2]; -}; - -struct SceFiosOverlay -{ - u8 type; - u8 order; - u8 reserved[10]; - SceFiosOverlayID id; - char dst[292]; - char src[292]; -}; - -typedef vm::psv::ptr SceFiosIOFilterCallback; - -struct SceFiosPsarcDearchiverContext -{ - u32 sizeOfContext; - u32 workBufferSize; - vm::psv::ptr pWorkBuffer; - s32 reserved[4]; -}; - -s32 sceFiosInitialize(vm::psv::ptr pParameters) +s32 sceFiosInitialize(vm::ptr pParameters) { throw __FUNCTION__; } @@ -132,37 +14,37 @@ void sceFiosTerminate() throw __FUNCTION__; } -bool sceFiosIsInitialized(vm::psv::ptr pOutParameters) +bool sceFiosIsInitialized(vm::ptr pOutParameters) { throw __FUNCTION__; } -void sceFiosUpdateParameters(vm::psv::ptr pParameters) +void sceFiosUpdateParameters(vm::ptr pParameters) { throw __FUNCTION__; } -void sceFiosSetGlobalDefaultOpAttr(vm::psv::ptr pAttr) +void sceFiosSetGlobalDefaultOpAttr(vm::ptr pAttr) { throw __FUNCTION__; } -bool sceFiosGetGlobalDefaultOpAttr(vm::psv::ptr pOutAttr) +bool sceFiosGetGlobalDefaultOpAttr(vm::ptr pOutAttr) { throw __FUNCTION__; } -void sceFiosSetThreadDefaultOpAttr(vm::psv::ptr pAttr) +void sceFiosSetThreadDefaultOpAttr(vm::ptr pAttr) { throw __FUNCTION__; } -bool sceFiosGetThreadDefaultOpAttr(vm::psv::ptr pOutAttr) +bool sceFiosGetThreadDefaultOpAttr(vm::ptr pOutAttr) { throw __FUNCTION__; } -void sceFiosGetDefaultOpAttr(vm::psv::ptr pOutAttr) +void sceFiosGetDefaultOpAttr(vm::ptr pOutAttr) { throw __FUNCTION__; } @@ -207,587 +89,587 @@ bool sceFiosIsIdle() throw __FUNCTION__; } -u32 sceFiosGetAllFHs(vm::psv::ptr pOutArray, u32 arraySize) +u32 sceFiosGetAllFHs(vm::ptr pOutArray, u32 arraySize) { throw __FUNCTION__; } -u32 sceFiosGetAllDHs(vm::psv::ptr pOutArray, u32 arraySize) +u32 sceFiosGetAllDHs(vm::ptr pOutArray, u32 arraySize) { throw __FUNCTION__; } -u32 sceFiosGetAllOps(vm::psv::ptr pOutArray, u32 arraySize) +u32 sceFiosGetAllOps(vm::ptr pOutArray, u32 arraySize) { throw __FUNCTION__; } -bool sceFiosIsValidHandle(SceFiosHandle h) +bool sceFiosIsValidHandle(s32 h) { throw __FUNCTION__; } -s32 sceFiosPathcmp(vm::psv::ptr pA, vm::psv::ptr pB) +s32 sceFiosPathcmp(vm::ptr pA, vm::ptr pB) { throw __FUNCTION__; } -s32 sceFiosPathncmp(vm::psv::ptr pA, vm::psv::ptr pB, u32 n) +s32 sceFiosPathncmp(vm::ptr pA, vm::ptr pB, u32 n) { throw __FUNCTION__; } -s32 sceFiosPrintf(vm::psv::ptr pFormat) // va_args... +s32 sceFiosPrintf(vm::ptr pFormat) // va_args... { throw __FUNCTION__; } -s32 sceFiosVprintf(vm::psv::ptr pFormat) // va_list +s32 sceFiosVprintf(vm::ptr pFormat) // va_list { throw __FUNCTION__; } -SceFiosOp sceFiosFileExists(vm::psv::ptr pAttr, vm::psv::ptr pPath, vm::psv::ptr pOutExists) +s32 sceFiosFileExists(vm::ptr pAttr, vm::ptr pPath, vm::ptr pOutExists) { throw __FUNCTION__; } -bool sceFiosFileExistsSync(vm::psv::ptr pAttr, vm::psv::ptr pPath) +bool sceFiosFileExistsSync(vm::ptr pAttr, vm::ptr pPath) { throw __FUNCTION__; } -SceFiosOp sceFiosFileGetSize(vm::psv::ptr pAttr, vm::psv::ptr pPath, vm::psv::ptr pOutSize) +s32 sceFiosFileGetSize(vm::ptr pAttr, vm::ptr pPath, vm::ptr pOutSize) { throw __FUNCTION__; } -SceFiosSize sceFiosFileGetSizeSync(vm::psv::ptr pAttr, vm::psv::ptr pPath) +s64 sceFiosFileGetSizeSync(vm::ptr pAttr, vm::ptr pPath) { throw __FUNCTION__; } -SceFiosOp sceFiosFileDelete(vm::psv::ptr pAttr, vm::psv::ptr pPath) +s32 sceFiosFileDelete(vm::ptr pAttr, vm::ptr pPath) { throw __FUNCTION__; } -s32 sceFiosFileDeleteSync(vm::psv::ptr pAttr, vm::psv::ptr pPath) +s32 sceFiosFileDeleteSync(vm::ptr pAttr, vm::ptr pPath) { throw __FUNCTION__; } -SceFiosOp sceFiosDirectoryExists(vm::psv::ptr pAttr, vm::psv::ptr pPath, vm::psv::ptr pOutExists) +s32 sceFiosDirectoryExists(vm::ptr pAttr, vm::ptr pPath, vm::ptr pOutExists) { throw __FUNCTION__; } -bool sceFiosDirectoryExistsSync(vm::psv::ptr pAttr, vm::psv::ptr pPath) +bool sceFiosDirectoryExistsSync(vm::ptr pAttr, vm::ptr pPath) { throw __FUNCTION__; } -SceFiosOp sceFiosDirectoryCreate(vm::psv::ptr pAttr, vm::psv::ptr pPath) +s32 sceFiosDirectoryCreate(vm::ptr pAttr, vm::ptr pPath) { throw __FUNCTION__; } -s32 sceFiosDirectoryCreateSync(vm::psv::ptr pAttr, vm::psv::ptr pPath) +s32 sceFiosDirectoryCreateSync(vm::ptr pAttr, vm::ptr pPath) { throw __FUNCTION__; } -SceFiosOp sceFiosDirectoryDelete(vm::psv::ptr pAttr, vm::psv::ptr pPath) +s32 sceFiosDirectoryDelete(vm::ptr pAttr, vm::ptr pPath) { throw __FUNCTION__; } -s32 sceFiosDirectoryDeleteSync(vm::psv::ptr pAttr, vm::psv::ptr pPath) +s32 sceFiosDirectoryDeleteSync(vm::ptr pAttr, vm::ptr pPath) { throw __FUNCTION__; } -SceFiosOp sceFiosExists(vm::psv::ptr pAttr, vm::psv::ptr pPath, vm::psv::ptr pOutExists) +s32 sceFiosExists(vm::ptr pAttr, vm::ptr pPath, vm::ptr pOutExists) { throw __FUNCTION__; } -bool sceFiosExistsSync(vm::psv::ptr pAttr, vm::psv::ptr pPath) +bool sceFiosExistsSync(vm::ptr pAttr, vm::ptr pPath) { throw __FUNCTION__; } -SceFiosOp sceFiosStat(vm::psv::ptr pAttr, vm::psv::ptr pPath, vm::psv::ptr pOutStatus) +s32 sceFiosStat(vm::ptr pAttr, vm::ptr pPath, vm::ptr pOutStatus) { throw __FUNCTION__; } -s32 sceFiosStatSync(vm::psv::ptr pAttr, vm::psv::ptr pPath, vm::psv::ptr pOutStatus) +s32 sceFiosStatSync(vm::ptr pAttr, vm::ptr pPath, vm::ptr pOutStatus) { throw __FUNCTION__; } -SceFiosOp sceFiosDelete(vm::psv::ptr pAttr, vm::psv::ptr pPath) +s32 sceFiosDelete(vm::ptr pAttr, vm::ptr pPath) { throw __FUNCTION__; } -s32 sceFiosDeleteSync(vm::psv::ptr pAttr, vm::psv::ptr pPath) +s32 sceFiosDeleteSync(vm::ptr pAttr, vm::ptr pPath) { throw __FUNCTION__; } -SceFiosOp sceFiosResolve(vm::psv::ptr pAttr, vm::psv::ptr pInTuple, vm::psv::ptr pOutTuple) +s32 sceFiosResolve(vm::ptr pAttr, vm::ptr pInTuple, vm::ptr pOutTuple) { throw __FUNCTION__; } -s32 sceFiosResolveSync(vm::psv::ptr pAttr, vm::psv::ptr pInTuple, vm::psv::ptr pOutTuple) +s32 sceFiosResolveSync(vm::ptr pAttr, vm::ptr pInTuple, vm::ptr pOutTuple) { throw __FUNCTION__; } -SceFiosOp sceFiosRename(vm::psv::ptr pAttr, vm::psv::ptr pOldPath, vm::psv::ptr pNewPath) +s32 sceFiosRename(vm::ptr pAttr, vm::ptr pOldPath, vm::ptr pNewPath) { throw __FUNCTION__; } -s32 sceFiosRenameSync(vm::psv::ptr pAttr, vm::psv::ptr pOldPath, vm::psv::ptr pNewPath) +s32 sceFiosRenameSync(vm::ptr pAttr, vm::ptr pOldPath, vm::ptr pNewPath) { throw __FUNCTION__; } -SceFiosOp sceFiosFileRead(vm::psv::ptr pAttr, vm::psv::ptr pPath, vm::psv::ptr pBuf, SceFiosSize length, SceFiosOffset offset) +s32 sceFiosFileRead(vm::ptr pAttr, vm::ptr pPath, vm::ptr pBuf, s64 length, s64 offset) { throw __FUNCTION__; } -SceFiosSize sceFiosFileReadSync(vm::psv::ptr pAttr, vm::psv::ptr pPath, vm::psv::ptr pBuf, SceFiosSize length, SceFiosOffset offset) +s64 sceFiosFileReadSync(vm::ptr pAttr, vm::ptr pPath, vm::ptr pBuf, s64 length, s64 offset) { throw __FUNCTION__; } -SceFiosOp sceFiosFileWrite(vm::psv::ptr pAttr, vm::psv::ptr pPath, vm::psv::ptr pBuf, SceFiosSize length, SceFiosOffset offset) +s32 sceFiosFileWrite(vm::ptr pAttr, vm::ptr pPath, vm::ptr pBuf, s64 length, s64 offset) { throw __FUNCTION__; } -SceFiosSize sceFiosFileWriteSync(vm::psv::ptr pAttr, vm::psv::ptr pPath, vm::psv::ptr pBuf, SceFiosSize length, SceFiosOffset offset) +s64 sceFiosFileWriteSync(vm::ptr pAttr, vm::ptr pPath, vm::ptr pBuf, s64 length, s64 offset) { throw __FUNCTION__; } -SceFiosOp sceFiosFileTruncate(vm::psv::ptr pAttr, vm::psv::ptr pPath, SceFiosSize length) +s32 sceFiosFileTruncate(vm::ptr pAttr, vm::ptr pPath, s64 length) { throw __FUNCTION__; } -s32 sceFiosFileTruncateSync(vm::psv::ptr pAttr, vm::psv::ptr pPath, SceFiosSize length) +s32 sceFiosFileTruncateSync(vm::ptr pAttr, vm::ptr pPath, s64 length) { throw __FUNCTION__; } -SceFiosOp sceFiosFHOpen(vm::psv::ptr pAttr, vm::psv::ptr pOutFH, vm::psv::ptr pPath, vm::psv::ptr pOpenParams) +s32 sceFiosFHOpen(vm::ptr pAttr, vm::ptr pOutFH, vm::ptr pPath, vm::ptr pOpenParams) { throw __FUNCTION__; } -s32 sceFiosFHOpenSync(vm::psv::ptr pAttr, vm::psv::ptr pOutFH, vm::psv::ptr pPath, vm::psv::ptr pOpenParams) +s32 sceFiosFHOpenSync(vm::ptr pAttr, vm::ptr pOutFH, vm::ptr pPath, vm::ptr pOpenParams) { throw __FUNCTION__; } -SceFiosOp sceFiosFHStat(vm::psv::ptr pAttr, SceFiosFH fh, vm::psv::ptr pOutStatus) +s32 sceFiosFHStat(vm::ptr pAttr, s32 fh, vm::ptr pOutStatus) { throw __FUNCTION__; } -s32 sceFiosFHStatSync(vm::psv::ptr pAttr, SceFiosFH fh, vm::psv::ptr pOutStatus) +s32 sceFiosFHStatSync(vm::ptr pAttr, s32 fh, vm::ptr pOutStatus) { throw __FUNCTION__; } -SceFiosOp sceFiosFHTruncate(vm::psv::ptr pAttr, SceFiosFH fh, SceFiosSize length) +s32 sceFiosFHTruncate(vm::ptr pAttr, s32 fh, s64 length) { throw __FUNCTION__; } -s32 sceFiosFHTruncateSync(vm::psv::ptr pAttr, SceFiosFH fh, SceFiosSize length) +s32 sceFiosFHTruncateSync(vm::ptr pAttr, s32 fh, s64 length) { throw __FUNCTION__; } -SceFiosOp sceFiosFHSync(vm::psv::ptr pAttr, SceFiosFH fh) +s32 sceFiosFHSync(vm::ptr pAttr, s32 fh) { throw __FUNCTION__; } -s32 sceFiosFHSyncSync(vm::psv::ptr pAttr, SceFiosFH fh) +s32 sceFiosFHSyncSync(vm::ptr pAttr, s32 fh) { throw __FUNCTION__; } -SceFiosOp sceFiosFHRead(vm::psv::ptr pAttr, SceFiosFH fh, vm::psv::ptr pBuf, SceFiosSize length) +s32 sceFiosFHRead(vm::ptr pAttr, s32 fh, vm::ptr pBuf, s64 length) { throw __FUNCTION__; } -SceFiosSize sceFiosFHReadSync(vm::psv::ptr pAttr, SceFiosFH fh, vm::psv::ptr pBuf, SceFiosSize length) +s64 sceFiosFHReadSync(vm::ptr pAttr, s32 fh, vm::ptr pBuf, s64 length) { throw __FUNCTION__; } -SceFiosOp sceFiosFHWrite(vm::psv::ptr pAttr, SceFiosFH fh, vm::psv::ptr pBuf, SceFiosSize length) +s32 sceFiosFHWrite(vm::ptr pAttr, s32 fh, vm::ptr pBuf, s64 length) { throw __FUNCTION__; } -SceFiosSize sceFiosFHWriteSync(vm::psv::ptr pAttr, SceFiosFH fh, vm::psv::ptr pBuf, SceFiosSize length) +s64 sceFiosFHWriteSync(vm::ptr pAttr, s32 fh, vm::ptr pBuf, s64 length) { throw __FUNCTION__; } -SceFiosOp sceFiosFHReadv(vm::psv::ptr pAttr, SceFiosFH fh, vm::psv::ptr iov, s32 iovcnt) +s32 sceFiosFHReadv(vm::ptr pAttr, s32 fh, vm::ptr iov, s32 iovcnt) { throw __FUNCTION__; } -SceFiosSize sceFiosFHReadvSync(vm::psv::ptr pAttr, SceFiosFH fh, vm::psv::ptr iov, s32 iovcnt) +s64 sceFiosFHReadvSync(vm::ptr pAttr, s32 fh, vm::ptr iov, s32 iovcnt) { throw __FUNCTION__; } -SceFiosOp sceFiosFHWritev(vm::psv::ptr pAttr, SceFiosFH fh, vm::psv::ptr iov, s32 iovcnt) +s32 sceFiosFHWritev(vm::ptr pAttr, s32 fh, vm::ptr iov, s32 iovcnt) { throw __FUNCTION__; } -SceFiosSize sceFiosFHWritevSync(vm::psv::ptr pAttr, SceFiosFH fh, vm::psv::ptr iov, s32 iovcnt) +s64 sceFiosFHWritevSync(vm::ptr pAttr, s32 fh, vm::ptr iov, s32 iovcnt) { throw __FUNCTION__; } -SceFiosOp sceFiosFHPread(vm::psv::ptr pAttr, SceFiosFH fh, vm::psv::ptr pBuf, SceFiosSize length, SceFiosOffset offset) +s32 sceFiosFHPread(vm::ptr pAttr, s32 fh, vm::ptr pBuf, s64 length, s64 offset) { throw __FUNCTION__; } -SceFiosSize sceFiosFHPreadSync(vm::psv::ptr pAttr, SceFiosFH fh, vm::psv::ptr pBuf, SceFiosSize length, SceFiosOffset offset) +s64 sceFiosFHPreadSync(vm::ptr pAttr, s32 fh, vm::ptr pBuf, s64 length, s64 offset) { throw __FUNCTION__; } -SceFiosOp sceFiosFHPwrite(vm::psv::ptr pAttr, SceFiosFH fh, vm::psv::ptr pBuf, SceFiosSize length, SceFiosOffset offset) +s32 sceFiosFHPwrite(vm::ptr pAttr, s32 fh, vm::ptr pBuf, s64 length, s64 offset) { throw __FUNCTION__; } -SceFiosSize sceFiosFHPwriteSync(vm::psv::ptr pAttr, SceFiosFH fh, vm::psv::ptr pBuf, SceFiosSize length, SceFiosOffset offset) +s64 sceFiosFHPwriteSync(vm::ptr pAttr, s32 fh, vm::ptr pBuf, s64 length, s64 offset) { throw __FUNCTION__; } -SceFiosOp sceFiosFHPreadv(vm::psv::ptr pAttr, SceFiosFH fh, vm::psv::ptr iov, s32 iovcnt, SceFiosOffset offset) +s32 sceFiosFHPreadv(vm::ptr pAttr, s32 fh, vm::ptr iov, s32 iovcnt, s64 offset) { throw __FUNCTION__; } -SceFiosSize sceFiosFHPreadvSync(vm::psv::ptr pAttr, SceFiosFH fh, vm::psv::ptr iov, s32 iovcnt, SceFiosOffset offset) +s64 sceFiosFHPreadvSync(vm::ptr pAttr, s32 fh, vm::ptr iov, s32 iovcnt, s64 offset) { throw __FUNCTION__; } -SceFiosOp sceFiosFHPwritev(vm::psv::ptr pAttr, SceFiosFH fh, vm::psv::ptr iov, s32 iovcnt, SceFiosOffset offset) +s32 sceFiosFHPwritev(vm::ptr pAttr, s32 fh, vm::ptr iov, s32 iovcnt, s64 offset) { throw __FUNCTION__; } -SceFiosSize sceFiosFHPwritevSync(vm::psv::ptr pAttr, SceFiosFH fh, vm::psv::ptr iov, s32 iovcnt, SceFiosOffset offset) +s64 sceFiosFHPwritevSync(vm::ptr pAttr, s32 fh, vm::ptr iov, s32 iovcnt, s64 offset) { throw __FUNCTION__; } -SceFiosOp sceFiosFHClose(vm::psv::ptr pAttr, SceFiosFH fh) +s32 sceFiosFHClose(vm::ptr pAttr, s32 fh) { throw __FUNCTION__; } -s32 sceFiosFHCloseSync(vm::psv::ptr pAttr, SceFiosFH fh) +s32 sceFiosFHCloseSync(vm::ptr pAttr, s32 fh) { throw __FUNCTION__; } -SceFiosOffset sceFiosFHSeek(SceFiosFH fh, SceFiosOffset offset, SceFiosWhence whence) +s64 sceFiosFHSeek(s32 fh, s64 offset, SceFiosWhence whence) { throw __FUNCTION__; } -SceFiosOffset sceFiosFHTell(SceFiosFH fh) +s64 sceFiosFHTell(s32 fh) { throw __FUNCTION__; } -vm::psv::ptr sceFiosFHGetPath(SceFiosFH fh) +vm::ptr sceFiosFHGetPath(s32 fh) { throw __FUNCTION__; } -SceFiosSize sceFiosFHGetSize(SceFiosFH fh) +s64 sceFiosFHGetSize(s32 fh) { throw __FUNCTION__; } -vm::psv::ptr sceFiosFHGetOpenParams(SceFiosFH fh) +vm::ptr sceFiosFHGetOpenParams(s32 fh) { throw __FUNCTION__; } -//SceFiosOp sceFiosDHOpen(vm::psv::ptr pAttr, vm::psv::ptr pOutDH, vm::psv::ptr pPath, SceFiosBuffer buf) -//{ -// throw __FUNCTION__; -//} -// -//s32 sceFiosDHOpenSync(vm::psv::ptr pAttr, vm::psv::ptr pOutDH, vm::psv::ptr pPath, SceFiosBuffer buf) -//{ -// throw __FUNCTION__; -//} +s32 sceFiosDHOpen(vm::ptr pAttr, vm::ptr pOutDH, vm::ptr pPath, SceFiosBuffer buf) +{ + throw __FUNCTION__; +} + +s32 sceFiosDHOpenSync(vm::ptr pAttr, vm::ptr pOutDH, vm::ptr pPath, SceFiosBuffer buf) +{ + throw __FUNCTION__; +} -SceFiosOp sceFiosDHRead(vm::psv::ptr pAttr, SceFiosDH dh, vm::psv::ptr pOutEntry) +s32 sceFiosDHRead(vm::ptr pAttr, s32 dh, vm::ptr pOutEntry) { throw __FUNCTION__; } -s32 sceFiosDHReadSync(vm::psv::ptr pAttr, SceFiosDH dh, vm::psv::ptr pOutEntry) +s32 sceFiosDHReadSync(vm::ptr pAttr, s32 dh, vm::ptr pOutEntry) { throw __FUNCTION__; } -SceFiosOp sceFiosDHClose(vm::psv::ptr pAttr, SceFiosDH dh) +s32 sceFiosDHClose(vm::ptr pAttr, s32 dh) { throw __FUNCTION__; } -s32 sceFiosDHCloseSync(vm::psv::ptr pAttr, SceFiosDH dh) +s32 sceFiosDHCloseSync(vm::ptr pAttr, s32 dh) { throw __FUNCTION__; } -vm::psv::ptr sceFiosDHGetPath(SceFiosDH dh) +vm::ptr sceFiosDHGetPath(s32 dh) { throw __FUNCTION__; } -bool sceFiosOpIsDone(SceFiosOp op) +bool sceFiosOpIsDone(s32 op) { throw __FUNCTION__; } -s32 sceFiosOpWait(SceFiosOp op) +s32 sceFiosOpWait(s32 op) { throw __FUNCTION__; } -s32 sceFiosOpWaitUntil(SceFiosOp op, SceFiosTime deadline) +s32 sceFiosOpWaitUntil(s32 op, s64 deadline) { throw __FUNCTION__; } -void sceFiosOpDelete(SceFiosOp op) +void sceFiosOpDelete(s32 op) { throw __FUNCTION__; } -s32 sceFiosOpSyncWait(SceFiosOp op) +s32 sceFiosOpSyncWait(s32 op) { throw __FUNCTION__; } -SceFiosSize sceFiosOpSyncWaitForIO(SceFiosOp op) +s64 sceFiosOpSyncWaitForIO(s32 op) { throw __FUNCTION__; } -s32 sceFiosOpGetError(SceFiosOp op) +s32 sceFiosOpGetError(s32 op) { throw __FUNCTION__; } -void sceFiosOpCancel(SceFiosOp op) +void sceFiosOpCancel(s32 op) { throw __FUNCTION__; } -bool sceFiosOpIsCancelled(SceFiosOp op) +bool sceFiosOpIsCancelled(s32 op) { throw __FUNCTION__; } -vm::psv::ptr sceFiosOpGetAttr(SceFiosOp op) +vm::ptr sceFiosOpGetAttr(s32 op) { throw __FUNCTION__; } -vm::psv::ptr sceFiosOpGetPath(SceFiosOp op) +vm::ptr sceFiosOpGetPath(s32 op) { throw __FUNCTION__; } -vm::psv::ptr sceFiosOpGetBuffer(SceFiosOp op) +vm::ptr sceFiosOpGetBuffer(s32 op) { throw __FUNCTION__; } -SceFiosOffset sceFiosOpGetOffset(SceFiosOp op) +s64 sceFiosOpGetOffset(s32 op) { throw __FUNCTION__; } -SceFiosSize sceFiosOpGetRequestCount(SceFiosOp op) +s64 sceFiosOpGetRequestCount(s32 op) { throw __FUNCTION__; } -SceFiosSize sceFiosOpGetActualCount(SceFiosOp op) +s64 sceFiosOpGetActualCount(s32 op) { throw __FUNCTION__; } -void sceFiosOpReschedule(SceFiosOp op, SceFiosTime newDeadline) +void sceFiosOpReschedule(s32 op, s64 newDeadline) { throw __FUNCTION__; } -SceFiosTime sceFiosTimeGetCurrent() +s64 sceFiosTimeGetCurrent() { throw __FUNCTION__; } -s64 sceFiosTimeIntervalToNanoseconds(SceFiosTimeInterval interval) +s64 sceFiosTimeIntervalToNanoseconds(s64 interval) { throw __FUNCTION__; } -SceFiosTimeInterval sceFiosTimeIntervalFromNanoseconds(s64 ns) +s64 sceFiosTimeIntervalFromNanoseconds(s64 ns) { throw __FUNCTION__; } -SceFiosDate sceFiosDateGetCurrent() +u64 sceFiosDateGetCurrent() { throw __FUNCTION__; } -SceFiosDate sceFiosDateFromComponents(vm::psv::ptr pComponents) +u64 sceFiosDateFromComponents(vm::ptr pComponents) { throw __FUNCTION__; } -vm::psv::ptr sceFiosDateToComponents(SceFiosDate date, vm::psv::ptr pOutComponents) +vm::ptr sceFiosDateToComponents(u64 date, vm::ptr pOutComponents) { throw __FUNCTION__; } -SceFiosDate sceFiosDateFromSceDateTime(vm::psv::ptr pSceDateTime) +u64 sceFiosDateFromSceDateTime(vm::ptr pSceDateTime) { throw __FUNCTION__; } -vm::psv::ptr sceFiosDateToSceDateTime(SceFiosDate date, vm::psv::ptr pSceDateTime) +vm::ptr sceFiosDateToSceDateTime(u64 date, vm::ptr pSceDateTime) { throw __FUNCTION__; } -s32 sceFiosOverlayAdd(vm::psv::ptr pOverlay, vm::psv::ptr pOutID) +s32 sceFiosOverlayAdd(vm::ptr pOverlay, vm::ptr pOutID) { throw __FUNCTION__; } -s32 sceFiosOverlayRemove(SceFiosOverlayID id) +s32 sceFiosOverlayRemove(s32 id) { throw __FUNCTION__; } -s32 sceFiosOverlayGetInfo(SceFiosOverlayID id, vm::psv::ptr pOutOverlay) +s32 sceFiosOverlayGetInfo(s32 id, vm::ptr pOutOverlay) { throw __FUNCTION__; } -s32 sceFiosOverlayModify(SceFiosOverlayID id, vm::psv::ptr pNewValue) +s32 sceFiosOverlayModify(s32 id, vm::ptr pNewValue) { throw __FUNCTION__; } -s32 sceFiosOverlayGetList(vm::psv::ptr pOutIDs, u32 maxIDs, vm::psv::ptr pActualIDs) +s32 sceFiosOverlayGetList(vm::ptr pOutIDs, u32 maxIDs, vm::ptr pActualIDs) { throw __FUNCTION__; } -s32 sceFiosOverlayResolveSync(s32 resolveFlag, vm::psv::ptr pInPath, vm::psv::ptr pOutPath, u32 maxPath) +s32 sceFiosOverlayResolveSync(s32 resolveFlag, vm::ptr pInPath, vm::ptr pOutPath, u32 maxPath) { throw __FUNCTION__; } -SceFiosOp sceFiosArchiveGetMountBufferSize(vm::psv::ptr pAttr, vm::psv::ptr pArchivePath, vm::psv::ptr pOpenParams) +s32 sceFiosArchiveGetMountBufferSize(vm::ptr pAttr, vm::ptr pArchivePath, vm::ptr pOpenParams) { throw __FUNCTION__; } -SceFiosSize sceFiosArchiveGetMountBufferSizeSync(vm::psv::ptr pAttr, vm::psv::ptr pArchivePath, vm::psv::ptr pOpenParams) +s64 sceFiosArchiveGetMountBufferSizeSync(vm::ptr pAttr, vm::ptr pArchivePath, vm::ptr pOpenParams) { throw __FUNCTION__; } -//SceFiosOp sceFiosArchiveMount(vm::psv::ptr pAttr, vm::psv::ptr pOutFH, vm::psv::ptr pArchivePath, vm::psv::ptr pMountPoint, SceFiosBuffer mountBuffer, vm::psv::ptr pOpenParams) -//{ -// throw __FUNCTION__; -//} -// -//s32 sceFiosArchiveMountSync(vm::psv::ptr pAttr, vm::psv::ptr pOutFH, vm::psv::ptr pArchivePath, vm::psv::ptr pMountPoint, SceFiosBuffer mountBuffer, vm::psv::ptr pOpenParams) -//{ -// throw __FUNCTION__; -//} +s32 sceFiosArchiveMount(vm::ptr pAttr, vm::ptr pOutFH, vm::ptr pArchivePath, vm::ptr pMountPoint, SceFiosBuffer mountBuffer, vm::ptr pOpenParams) +{ + throw __FUNCTION__; +} + +s32 sceFiosArchiveMountSync(vm::ptr pAttr, vm::ptr pOutFH, vm::ptr pArchivePath, vm::ptr pMountPoint, SceFiosBuffer mountBuffer, vm::ptr pOpenParams) +{ + throw __FUNCTION__; +} -SceFiosOp sceFiosArchiveUnmount(vm::psv::ptr pAttr, SceFiosFH fh) +s32 sceFiosArchiveUnmount(vm::ptr pAttr, s32 fh) { throw __FUNCTION__; } -s32 sceFiosArchiveUnmountSync(vm::psv::ptr pAttr, SceFiosFH fh) +s32 sceFiosArchiveUnmountSync(vm::ptr pAttr, s32 fh) { throw __FUNCTION__; } -vm::psv::ptr sceFiosDebugDumpError(s32 err, vm::psv::ptr pBuffer, u32 bufferSize) +vm::ptr sceFiosDebugDumpError(s32 err, vm::ptr pBuffer, u32 bufferSize) { throw __FUNCTION__; } -vm::psv::ptr sceFiosDebugDumpOp(SceFiosOp op, vm::psv::ptr pBuffer, u32 bufferSize) +vm::ptr sceFiosDebugDumpOp(s32 op, vm::ptr pBuffer, u32 bufferSize) { throw __FUNCTION__; } -vm::psv::ptr sceFiosDebugDumpFH(SceFiosFH fh, vm::psv::ptr pBuffer, u32 bufferSize) +vm::ptr sceFiosDebugDumpFH(s32 fh, vm::ptr pBuffer, u32 bufferSize) { throw __FUNCTION__; } -vm::psv::ptr sceFiosDebugDumpDH(SceFiosDH dh, vm::psv::ptr pBuffer, u32 bufferSize) +vm::ptr sceFiosDebugDumpDH(s32 dh, vm::ptr pBuffer, u32 bufferSize) { throw __FUNCTION__; } -vm::psv::ptr sceFiosDebugDumpDate(SceFiosDate date, vm::psv::ptr pBuffer, u32 bufferSize) +vm::ptr sceFiosDebugDumpDate(u64 date, vm::ptr pBuffer, u32 bufferSize) { throw __FUNCTION__; } -s32 sceFiosIOFilterAdd(s32 index, SceFiosIOFilterCallback pFilterCallback, vm::psv::ptr pFilterContext) +s32 sceFiosIOFilterAdd(s32 index, vm::ptr pFilterCallback, vm::ptr pFilterContext) { throw __FUNCTION__; } -s32 sceFiosIOFilterGetInfo(s32 index, vm::psv::ptr pOutFilterCallback, vm::psv::pptr pOutFilterContext) +s32 sceFiosIOFilterGetInfo(s32 index, vm::pptr pOutFilterCallback, vm::pptr pOutFilterContext) { throw __FUNCTION__; } @@ -809,6 +691,7 @@ psv_log_base sceFios("SceFios2", []() sceFios.on_load = nullptr; sceFios.on_unload = nullptr; sceFios.on_stop = nullptr; + sceFios.on_error = nullptr; REG_FUNC(0x15857180, sceFiosArchiveGetMountBufferSize); REG_FUNC(0xDF3352FC, sceFiosArchiveGetMountBufferSizeSync); diff --git a/rpcs3/Emu/ARMv7/Modules/sceFios.h b/rpcs3/Emu/ARMv7/Modules/sceFios.h new file mode 100644 index 0000000000..68c14608fa --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/sceFios.h @@ -0,0 +1,113 @@ +#pragma once + +using SceFiosOpCallback = func_def pContext, s32 op, u8 event, s32 err)>; +using SceFiosVprintfCallback = func_def fmt, va_list ap)>; +using SceFiosMemcpyCallback = func_def(vm::ptr dst, vm::cptr src, u32 len)>; + +enum SceFiosWhence : s32 +{ + SCE_FIOS_SEEK_SET = 0, + SCE_FIOS_SEEK_CUR = 1, + SCE_FIOS_SEEK_END = 2, +}; + +struct SceFiosBuffer +{ + vm::lptr pPtr; + le_t length; +}; + +struct SceFiosOpAttr +{ + le_t deadline; + vm::lptr pCallback; + vm::lptr pCallbackContext; + + //le_t priority : 8; + //le_t opflags : 24; + le_t params; // priority, opflags + + le_t userTag; + vm::lptr userPtr; + vm::lptr pReserved; +}; + +struct SceFiosDirEntry +{ + le_t fileSize; + le_t statFlags; + le_t nameLength; + le_t fullPathLength; + le_t offsetToName; + le_t reserved[3]; + char fullPath[1024]; +}; + +struct SceFiosStat +{ + le_t fileSize; + le_t accessDate; + le_t modificationDate; + le_t creationDate; + le_t statFlags; + le_t reserved; + le_t uid; + le_t gid; + le_t dev; + le_t ino; + le_t mode; +}; + +struct SceFiosOpenParams +{ + le_t openFlags; + le_t reserved; + SceFiosBuffer buffer; +}; + +struct SceFiosTuple +{ + le_t offset; + le_t size; + char path[1024]; +}; + +struct SceFiosParams +{ + //le_t initialized : 1; + //le_t paramsSize : 14; + //le_t pathMax : 16; + le_t params; // initialized, paramsSize, pathMax + + le_t profiling; + SceFiosBuffer opStorage; + SceFiosBuffer fhStorage; + SceFiosBuffer dhStorage; + SceFiosBuffer chunkStorage; + vm::lptr pVprintf; + vm::lptr pMemcpy; + le_t threadPriority[2]; + le_t threadAffinity[2]; +}; + +struct SceFiosOverlay +{ + u8 type; + u8 order; + u8 reserved[10]; + le_t id; + char dst[292]; + char src[292]; +}; + +using SceFiosIOFilterCallback = func_def; + +struct SceFiosPsarcDearchiverContext +{ + le_t sizeOfContext; + le_t workBufferSize; + vm::lptr pWorkBuffer; + le_t reserved[4]; +}; + +extern psv_log_base sceFios; diff --git a/rpcs3/Emu/ARMv7/Modules/sceFpu.cpp b/rpcs3/Emu/ARMv7/Modules/sceFpu.cpp index 2992c6fc58..c853461a87 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceFpu.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceFpu.cpp @@ -2,7 +2,79 @@ #include "Emu/System.h" #include "Emu/ARMv7/PSVFuncList.h" -extern psv_log_base sceFpu; +#include "sceFpu.h" + +float sceFpuSinf(float x) +{ + throw __FUNCTION__; +} + +float sceFpuCosf(float x) +{ + throw __FUNCTION__; +} + +float sceFpuTanf(float x) +{ + throw __FUNCTION__; +} + +float sceFpuAtanf(float x) +{ + throw __FUNCTION__; +} + +float sceFpuAtan2f(float y, float x) +{ + throw __FUNCTION__; +} + +float sceFpuAsinf(float x) +{ + throw __FUNCTION__; +} + +float sceFpuAcosf(float x) +{ + throw __FUNCTION__; +} + + +float sceFpuLogf(float x) +{ + throw __FUNCTION__; +} + +float sceFpuLog2f(float fs) +{ + throw __FUNCTION__; +} + +float sceFpuLog10f(float fs) +{ + throw __FUNCTION__; +} + +float sceFpuExpf(float x) +{ + throw __FUNCTION__; +} + +float sceFpuExp2f(float x) +{ + throw __FUNCTION__; +} + +float sceFpuExp10f(float x) +{ + throw __FUNCTION__; +} + +float sceFpuPowf(float x, float y) +{ + throw __FUNCTION__; +} + #define REG_FUNC(nid, name) reg_psv_func(nid, &sceFpu, #name, name) @@ -11,6 +83,7 @@ psv_log_base sceFpu("SceFpu", []() sceFpu.on_load = nullptr; sceFpu.on_unload = nullptr; sceFpu.on_stop = nullptr; + sceFpu.on_error = nullptr; //REG_FUNC(0x33E1AC14, sceFpuSinf); //REG_FUNC(0xDB66BA89, sceFpuCosf); diff --git a/rpcs3/Emu/ARMv7/Modules/sceFpu.h b/rpcs3/Emu/ARMv7/Modules/sceFpu.h new file mode 100644 index 0000000000..2df62880d4 --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/sceFpu.h @@ -0,0 +1,3 @@ +#pragma once + +extern psv_log_base sceFpu; diff --git a/rpcs3/Emu/ARMv7/Modules/sceGxm.cpp b/rpcs3/Emu/ARMv7/Modules/sceGxm.cpp index 2ef54331e5..14a3358a64 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceGxm.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceGxm.cpp @@ -4,7 +4,7 @@ #include "sceGxm.h" -s32 sceGxmInitialize(vm::psv::ptr params) +s32 sceGxmInitialize(vm::ptr params) { throw __FUNCTION__; } @@ -14,47 +14,47 @@ s32 sceGxmTerminate() throw __FUNCTION__; } -vm::psv::ptr sceGxmGetNotificationRegion() +vm::ptr sceGxmGetNotificationRegion() { throw __FUNCTION__; } -s32 sceGxmNotificationWait(vm::psv::ptr notification) +s32 sceGxmNotificationWait(vm::ptr notification) { throw __FUNCTION__; } -s32 sceGxmMapMemory(vm::psv::ptr base, u32 size, SceGxmMemoryAttribFlags attr) +s32 sceGxmMapMemory(vm::ptr base, u32 size, SceGxmMemoryAttribFlags attr) { throw __FUNCTION__; } -s32 sceGxmUnmapMemory(vm::psv::ptr base) +s32 sceGxmUnmapMemory(vm::ptr base) { throw __FUNCTION__; } -s32 sceGxmMapVertexUsseMemory(vm::psv::ptr base, u32 size, vm::psv::ptr offset) +s32 sceGxmMapVertexUsseMemory(vm::ptr base, u32 size, vm::ptr offset) { throw __FUNCTION__; } -s32 sceGxmUnmapVertexUsseMemory(vm::psv::ptr base) +s32 sceGxmUnmapVertexUsseMemory(vm::ptr base) { throw __FUNCTION__; } -s32 sceGxmMapFragmentUsseMemory(vm::psv::ptr base, u32 size, vm::psv::ptr offset) +s32 sceGxmMapFragmentUsseMemory(vm::ptr base, u32 size, vm::ptr offset) { throw __FUNCTION__; } -s32 sceGxmUnmapFragmentUsseMemory(vm::psv::ptr base) +s32 sceGxmUnmapFragmentUsseMemory(vm::ptr base) { throw __FUNCTION__; } -s32 sceGxmDisplayQueueAddEntry(vm::psv::ptr oldBuffer, vm::psv::ptr newBuffer, vm::psv::ptr callbackData) +s32 sceGxmDisplayQueueAddEntry(vm::ptr oldBuffer, vm::ptr newBuffer, vm::ptr callbackData) { throw __FUNCTION__; } @@ -64,311 +64,311 @@ s32 sceGxmDisplayQueueFinish() throw __FUNCTION__; } -s32 sceGxmSyncObjectCreate(vm::psv::pptr syncObject) +s32 sceGxmSyncObjectCreate(vm::pptr syncObject) { throw __FUNCTION__; } -s32 sceGxmSyncObjectDestroy(vm::psv::ptr syncObject) +s32 sceGxmSyncObjectDestroy(vm::ptr syncObject) { throw __FUNCTION__; } -s32 sceGxmCreateContext(vm::psv::ptr params, vm::psv::pptr context) +s32 sceGxmCreateContext(vm::ptr params, vm::pptr context) { throw __FUNCTION__; } -s32 sceGxmDestroyContext(vm::psv::ptr context) +s32 sceGxmDestroyContext(vm::ptr context) { throw __FUNCTION__; } -void sceGxmSetValidationEnable(vm::psv::ptr context, bool enable) +void sceGxmSetValidationEnable(vm::ptr context, bool enable) { throw __FUNCTION__; } -void sceGxmSetVertexProgram(vm::psv::ptr context, vm::psv::ptr vertexProgram) +void sceGxmSetVertexProgram(vm::ptr context, vm::ptr vertexProgram) { throw __FUNCTION__; } -void sceGxmSetFragmentProgram(vm::psv::ptr context, vm::psv::ptr fragmentProgram) +void sceGxmSetFragmentProgram(vm::ptr context, vm::ptr fragmentProgram) { throw __FUNCTION__; } -s32 sceGxmReserveVertexDefaultUniformBuffer(vm::psv::ptr context, vm::psv::pptr uniformBuffer) +s32 sceGxmReserveVertexDefaultUniformBuffer(vm::ptr context, vm::pptr uniformBuffer) { throw __FUNCTION__; } -s32 sceGxmReserveFragmentDefaultUniformBuffer(vm::psv::ptr context, vm::psv::pptr uniformBuffer) +s32 sceGxmReserveFragmentDefaultUniformBuffer(vm::ptr context, vm::pptr uniformBuffer) { throw __FUNCTION__; } -s32 sceGxmSetVertexStream(vm::psv::ptr context, u32 streamIndex, vm::psv::ptr streamData) +s32 sceGxmSetVertexStream(vm::ptr context, u32 streamIndex, vm::ptr streamData) { throw __FUNCTION__; } -s32 sceGxmSetVertexTexture(vm::psv::ptr context, u32 textureIndex, vm::psv::ptr texture) +s32 sceGxmSetVertexTexture(vm::ptr context, u32 textureIndex, vm::ptr texture) { throw __FUNCTION__; } -s32 sceGxmSetFragmentTexture(vm::psv::ptr context, u32 textureIndex, vm::psv::ptr texture) +s32 sceGxmSetFragmentTexture(vm::ptr context, u32 textureIndex, vm::ptr texture) { throw __FUNCTION__; } -s32 sceGxmSetVertexUniformBuffer(vm::psv::ptr context, u32 bufferIndex, vm::psv::ptr bufferData) +s32 sceGxmSetVertexUniformBuffer(vm::ptr context, u32 bufferIndex, vm::ptr bufferData) { throw __FUNCTION__; } -s32 sceGxmSetFragmentUniformBuffer(vm::psv::ptr context, u32 bufferIndex, vm::psv::ptr bufferData) +s32 sceGxmSetFragmentUniformBuffer(vm::ptr context, u32 bufferIndex, vm::ptr bufferData) { throw __FUNCTION__; } -s32 sceGxmSetAuxiliarySurface(vm::psv::ptr context, u32 surfaceIndex, vm::psv::ptr surface) +s32 sceGxmSetAuxiliarySurface(vm::ptr context, u32 surfaceIndex, vm::ptr surface) { throw __FUNCTION__; } -void sceGxmSetPrecomputedFragmentState(vm::psv::ptr context, vm::psv::ptr precomputedState) +void sceGxmSetPrecomputedFragmentState(vm::ptr context, vm::ptr precomputedState) { throw __FUNCTION__; } -void sceGxmSetPrecomputedVertexState(vm::psv::ptr context, vm::psv::ptr precomputedState) +void sceGxmSetPrecomputedVertexState(vm::ptr context, vm::ptr precomputedState) { throw __FUNCTION__; } -s32 sceGxmDrawPrecomputed(vm::psv::ptr context, vm::psv::ptr precomputedDraw) +s32 sceGxmDrawPrecomputed(vm::ptr context, vm::ptr precomputedDraw) { throw __FUNCTION__; } -s32 sceGxmDraw(vm::psv::ptr context, SceGxmPrimitiveType primType, SceGxmIndexFormat indexType, vm::psv::ptr indexData, u32 indexCount) +s32 sceGxmDraw(vm::ptr context, SceGxmPrimitiveType primType, SceGxmIndexFormat indexType, vm::ptr indexData, u32 indexCount) { throw __FUNCTION__; } -s32 sceGxmDrawInstanced(vm::psv::ptr context, SceGxmPrimitiveType primType, SceGxmIndexFormat indexType, vm::psv::ptr indexData, u32 indexCount, u32 indexWrap) +s32 sceGxmDrawInstanced(vm::ptr context, SceGxmPrimitiveType primType, SceGxmIndexFormat indexType, vm::ptr indexData, u32 indexCount, u32 indexWrap) { throw __FUNCTION__; } -s32 sceGxmSetVisibilityBuffer(vm::psv::ptr context, vm::psv::ptr bufferBase, u32 stridePerCore) +s32 sceGxmSetVisibilityBuffer(vm::ptr context, vm::ptr bufferBase, u32 stridePerCore) { throw __FUNCTION__; } -s32 sceGxmBeginScene(vm::psv::ptr context, u32 flags, vm::psv::ptr renderTarget, vm::psv::ptr validRegion, vm::psv::ptr vertexSyncObject, vm::psv::ptr fragmentSyncObject, vm::psv::ptr colorSurface, vm::psv::ptr depthStencil) +s32 sceGxmBeginScene(vm::ptr context, u32 flags, vm::ptr renderTarget, vm::ptr validRegion, vm::ptr vertexSyncObject, vm::ptr fragmentSyncObject, vm::ptr colorSurface, vm::ptr depthStencil) { throw __FUNCTION__; } -s32 sceGxmMidSceneFlush(vm::psv::ptr context, u32 flags, vm::psv::ptr vertexSyncObject, vm::psv::ptr vertexNotification) +s32 sceGxmMidSceneFlush(vm::ptr context, u32 flags, vm::ptr vertexSyncObject, vm::ptr vertexNotification) { throw __FUNCTION__; } -s32 sceGxmEndScene(vm::psv::ptr context, vm::psv::ptr vertexNotification, vm::psv::ptr fragmentNotification) +s32 sceGxmEndScene(vm::ptr context, vm::ptr vertexNotification, vm::ptr fragmentNotification) { throw __FUNCTION__; } -void sceGxmSetFrontDepthFunc(vm::psv::ptr context, SceGxmDepthFunc depthFunc) +void sceGxmSetFrontDepthFunc(vm::ptr context, SceGxmDepthFunc depthFunc) { throw __FUNCTION__; } -void sceGxmSetBackDepthFunc(vm::psv::ptr context, SceGxmDepthFunc depthFunc) +void sceGxmSetBackDepthFunc(vm::ptr context, SceGxmDepthFunc depthFunc) { throw __FUNCTION__; } -void sceGxmSetFrontFragmentProgramEnable(vm::psv::ptr context, SceGxmFragmentProgramMode enable) +void sceGxmSetFrontFragmentProgramEnable(vm::ptr context, SceGxmFragmentProgramMode enable) { throw __FUNCTION__; } -void sceGxmSetBackFragmentProgramEnable(vm::psv::ptr context, SceGxmFragmentProgramMode enable) +void sceGxmSetBackFragmentProgramEnable(vm::ptr context, SceGxmFragmentProgramMode enable) { throw __FUNCTION__; } -void sceGxmSetFrontDepthWriteEnable(vm::psv::ptr context, SceGxmDepthWriteMode enable) +void sceGxmSetFrontDepthWriteEnable(vm::ptr context, SceGxmDepthWriteMode enable) { throw __FUNCTION__; } -void sceGxmSetBackDepthWriteEnable(vm::psv::ptr context, SceGxmDepthWriteMode enable) +void sceGxmSetBackDepthWriteEnable(vm::ptr context, SceGxmDepthWriteMode enable) { throw __FUNCTION__; } -void sceGxmSetFrontLineFillLastPixelEnable(vm::psv::ptr context, SceGxmLineFillLastPixelMode enable) +void sceGxmSetFrontLineFillLastPixelEnable(vm::ptr context, SceGxmLineFillLastPixelMode enable) { throw __FUNCTION__; } -void sceGxmSetBackLineFillLastPixelEnable(vm::psv::ptr context, SceGxmLineFillLastPixelMode enable) +void sceGxmSetBackLineFillLastPixelEnable(vm::ptr context, SceGxmLineFillLastPixelMode enable) { throw __FUNCTION__; } -void sceGxmSetFrontStencilRef(vm::psv::ptr context, u32 sref) +void sceGxmSetFrontStencilRef(vm::ptr context, u32 sref) { throw __FUNCTION__; } -void sceGxmSetBackStencilRef(vm::psv::ptr context, u32 sref) +void sceGxmSetBackStencilRef(vm::ptr context, u32 sref) { throw __FUNCTION__; } -void sceGxmSetFrontPointLineWidth(vm::psv::ptr context, u32 width) +void sceGxmSetFrontPointLineWidth(vm::ptr context, u32 width) { throw __FUNCTION__; } -void sceGxmSetBackPointLineWidth(vm::psv::ptr context, u32 width) +void sceGxmSetBackPointLineWidth(vm::ptr context, u32 width) { throw __FUNCTION__; } -void sceGxmSetFrontPolygonMode(vm::psv::ptr context, SceGxmPolygonMode mode) +void sceGxmSetFrontPolygonMode(vm::ptr context, SceGxmPolygonMode mode) { throw __FUNCTION__; } -void sceGxmSetBackPolygonMode(vm::psv::ptr context, SceGxmPolygonMode mode) +void sceGxmSetBackPolygonMode(vm::ptr context, SceGxmPolygonMode mode) { throw __FUNCTION__; } -void sceGxmSetFrontStencilFunc(vm::psv::ptr context, SceGxmStencilFunc func, SceGxmStencilOp stencilFail, SceGxmStencilOp depthFail, SceGxmStencilOp depthPass, u8 compareMask, u8 writeMask) +void sceGxmSetFrontStencilFunc(vm::ptr context, SceGxmStencilFunc func, SceGxmStencilOp stencilFail, SceGxmStencilOp depthFail, SceGxmStencilOp depthPass, u8 compareMask, u8 writeMask) { throw __FUNCTION__; } -void sceGxmSetBackStencilFunc(vm::psv::ptr context, SceGxmStencilFunc func, SceGxmStencilOp stencilFail, SceGxmStencilOp depthFail, SceGxmStencilOp depthPass, u8 compareMask, u8 writeMask) +void sceGxmSetBackStencilFunc(vm::ptr context, SceGxmStencilFunc func, SceGxmStencilOp stencilFail, SceGxmStencilOp depthFail, SceGxmStencilOp depthPass, u8 compareMask, u8 writeMask) { throw __FUNCTION__; } -void sceGxmSetFrontDepthBias(vm::psv::ptr context, s32 factor, s32 units) +void sceGxmSetFrontDepthBias(vm::ptr context, s32 factor, s32 units) { throw __FUNCTION__; } -void sceGxmSetBackDepthBias(vm::psv::ptr context, s32 factor, s32 units) +void sceGxmSetBackDepthBias(vm::ptr context, s32 factor, s32 units) { throw __FUNCTION__; } -void sceGxmSetTwoSidedEnable(vm::psv::ptr context, SceGxmTwoSidedMode enable) +void sceGxmSetTwoSidedEnable(vm::ptr context, SceGxmTwoSidedMode enable) { throw __FUNCTION__; } -//void sceGxmSetViewport(vm::psv::ptr context, float xOffset, float xScale, float yOffset, float yScale, float zOffset, float zScale) -//{ -// throw __FUNCTION__; -//} -// -//void sceGxmSetWClampValue(vm::psv::ptr context, float clampValue) -//{ -// throw __FUNCTION__; -//} - -void sceGxmSetWClampEnable(vm::psv::ptr context, SceGxmWClampMode enable) +void sceGxmSetViewport(vm::ptr context, float xOffset, float xScale, float yOffset, float yScale, float zOffset, float zScale) { throw __FUNCTION__; } -void sceGxmSetRegionClip(vm::psv::ptr context, SceGxmRegionClipMode mode, u32 xMin, u32 yMin, u32 xMax, u32 yMax) +void sceGxmSetWClampValue(vm::ptr context, float clampValue) { throw __FUNCTION__; } -void sceGxmSetCullMode(vm::psv::ptr context, SceGxmCullMode mode) +void sceGxmSetWClampEnable(vm::ptr context, SceGxmWClampMode enable) { throw __FUNCTION__; } -void sceGxmSetViewportEnable(vm::psv::ptr context, SceGxmViewportMode enable) +void sceGxmSetRegionClip(vm::ptr context, SceGxmRegionClipMode mode, u32 xMin, u32 yMin, u32 xMax, u32 yMax) { throw __FUNCTION__; } -void sceGxmSetWBufferEnable(vm::psv::ptr context, SceGxmWBufferMode enable) +void sceGxmSetCullMode(vm::ptr context, SceGxmCullMode mode) { throw __FUNCTION__; } -void sceGxmSetFrontVisibilityTestIndex(vm::psv::ptr context, u32 index) +void sceGxmSetViewportEnable(vm::ptr context, SceGxmViewportMode enable) { throw __FUNCTION__; } -void sceGxmSetBackVisibilityTestIndex(vm::psv::ptr context, u32 index) +void sceGxmSetWBufferEnable(vm::ptr context, SceGxmWBufferMode enable) { throw __FUNCTION__; } -void sceGxmSetFrontVisibilityTestOp(vm::psv::ptr context, SceGxmVisibilityTestOp op) +void sceGxmSetFrontVisibilityTestIndex(vm::ptr context, u32 index) { throw __FUNCTION__; } -void sceGxmSetBackVisibilityTestOp(vm::psv::ptr context, SceGxmVisibilityTestOp op) +void sceGxmSetBackVisibilityTestIndex(vm::ptr context, u32 index) { throw __FUNCTION__; } -void sceGxmSetFrontVisibilityTestEnable(vm::psv::ptr context, SceGxmVisibilityTestMode enable) +void sceGxmSetFrontVisibilityTestOp(vm::ptr context, SceGxmVisibilityTestOp op) { throw __FUNCTION__; } -void sceGxmSetBackVisibilityTestEnable(vm::psv::ptr context, SceGxmVisibilityTestMode enable) +void sceGxmSetBackVisibilityTestOp(vm::ptr context, SceGxmVisibilityTestOp op) { throw __FUNCTION__; } -void sceGxmFinish(vm::psv::ptr context) +void sceGxmSetFrontVisibilityTestEnable(vm::ptr context, SceGxmVisibilityTestMode enable) { throw __FUNCTION__; } -s32 sceGxmPushUserMarker(vm::psv::ptr context, vm::psv::ptr tag) +void sceGxmSetBackVisibilityTestEnable(vm::ptr context, SceGxmVisibilityTestMode enable) { throw __FUNCTION__; } -s32 sceGxmPopUserMarker(vm::psv::ptr context) +void sceGxmFinish(vm::ptr context) { throw __FUNCTION__; } -s32 sceGxmSetUserMarker(vm::psv::ptr context, vm::psv::ptr tag) +s32 sceGxmPushUserMarker(vm::ptr context, vm::ptr tag) { throw __FUNCTION__; } -s32 sceGxmPadHeartbeat(vm::psv::ptr displaySurface, vm::psv::ptr displaySyncObject) +s32 sceGxmPopUserMarker(vm::ptr context) +{ + throw __FUNCTION__; +} + +s32 sceGxmSetUserMarker(vm::ptr context, vm::ptr tag) +{ + throw __FUNCTION__; +} + +s32 sceGxmPadHeartbeat(vm::ptr displaySurface, vm::ptr displaySyncObject) { throw __FUNCTION__; } @@ -378,690 +378,690 @@ s32 sceGxmPadTriggerGpuPaTrace() throw __FUNCTION__; } -s32 sceGxmColorSurfaceInit(vm::psv::ptr surface, SceGxmColorFormat colorFormat, SceGxmColorSurfaceType surfaceType, SceGxmColorSurfaceScaleMode scaleMode, SceGxmOutputRegisterSize outputRegisterSize, u32 width, u32 height, u32 strideInPixels, vm::psv::ptr data) +s32 sceGxmColorSurfaceInit(vm::ptr surface, SceGxmColorFormat colorFormat, SceGxmColorSurfaceType surfaceType, SceGxmColorSurfaceScaleMode scaleMode, SceGxmOutputRegisterSize outputRegisterSize, u32 width, u32 height, u32 strideInPixels, vm::ptr data) { throw __FUNCTION__; } -s32 sceGxmColorSurfaceInitDisabled(vm::psv::ptr surface) +s32 sceGxmColorSurfaceInitDisabled(vm::ptr surface) { throw __FUNCTION__; } -bool sceGxmColorSurfaceIsEnabled(vm::psv::ptr surface) +bool sceGxmColorSurfaceIsEnabled(vm::ptr surface) { throw __FUNCTION__; } -void sceGxmColorSurfaceGetClip(vm::psv::ptr surface, vm::psv::ptr xMin, vm::psv::ptr yMin, vm::psv::ptr xMax, vm::psv::ptr yMax) +void sceGxmColorSurfaceGetClip(vm::ptr surface, vm::ptr xMin, vm::ptr yMin, vm::ptr xMax, vm::ptr yMax) { throw __FUNCTION__; } -void sceGxmColorSurfaceSetClip(vm::psv::ptr surface, u32 xMin, u32 yMin, u32 xMax, u32 yMax) +void sceGxmColorSurfaceSetClip(vm::ptr surface, u32 xMin, u32 yMin, u32 xMax, u32 yMax) { throw __FUNCTION__; } -SceGxmColorSurfaceScaleMode sceGxmColorSurfaceGetScaleMode(vm::psv::ptr surface) +SceGxmColorSurfaceScaleMode sceGxmColorSurfaceGetScaleMode(vm::ptr surface) { throw __FUNCTION__; } -void sceGxmColorSurfaceSetScaleMode(vm::psv::ptr surface, SceGxmColorSurfaceScaleMode scaleMode) +void sceGxmColorSurfaceSetScaleMode(vm::ptr surface, SceGxmColorSurfaceScaleMode scaleMode) { throw __FUNCTION__; } -vm::psv::ptr sceGxmColorSurfaceGetData(vm::psv::ptr surface) +vm::ptr sceGxmColorSurfaceGetData(vm::ptr surface) { throw __FUNCTION__; } -s32 sceGxmColorSurfaceSetData(vm::psv::ptr surface, vm::psv::ptr data) +s32 sceGxmColorSurfaceSetData(vm::ptr surface, vm::ptr data) { throw __FUNCTION__; } -SceGxmColorFormat sceGxmColorSurfaceGetFormat(vm::psv::ptr surface) +SceGxmColorFormat sceGxmColorSurfaceGetFormat(vm::ptr surface) { throw __FUNCTION__; } -s32 sceGxmColorSurfaceSetFormat(vm::psv::ptr surface, SceGxmColorFormat format) +s32 sceGxmColorSurfaceSetFormat(vm::ptr surface, SceGxmColorFormat format) { throw __FUNCTION__; } -SceGxmColorSurfaceType sceGxmColorSurfaceGetType(vm::psv::ptr surface) +SceGxmColorSurfaceType sceGxmColorSurfaceGetType(vm::ptr surface) { throw __FUNCTION__; } -u32 sceGxmColorSurfaceGetStrideInPixels(vm::psv::ptr surface) +u32 sceGxmColorSurfaceGetStrideInPixels(vm::ptr surface) { throw __FUNCTION__; } -s32 sceGxmDepthStencilSurfaceInit(vm::psv::ptr surface, SceGxmDepthStencilFormat depthStencilFormat, SceGxmDepthStencilSurfaceType surfaceType, u32 strideInSamples, vm::psv::ptr depthData, vm::psv::ptr stencilData) +s32 sceGxmDepthStencilSurfaceInit(vm::ptr surface, SceGxmDepthStencilFormat depthStencilFormat, SceGxmDepthStencilSurfaceType surfaceType, u32 strideInSamples, vm::ptr depthData, vm::ptr stencilData) { throw __FUNCTION__; } -s32 sceGxmDepthStencilSurfaceInitDisabled(vm::psv::ptr surface) +s32 sceGxmDepthStencilSurfaceInitDisabled(vm::ptr surface) { throw __FUNCTION__; } -//float sceGxmDepthStencilSurfaceGetBackgroundDepth(vm::psv::ptr surface) +//float sceGxmDepthStencilSurfaceGetBackgroundDepth(vm::ptr surface) //{ // throw __FUNCTION__; //} -//void sceGxmDepthStencilSurfaceSetBackgroundDepth(vm::psv::ptr surface, float backgroundDepth) +//void sceGxmDepthStencilSurfaceSetBackgroundDepth(vm::ptr surface, float backgroundDepth) //{ // throw __FUNCTION__; //} -u8 sceGxmDepthStencilSurfaceGetBackgroundStencil(vm::psv::ptr surface) +u8 sceGxmDepthStencilSurfaceGetBackgroundStencil(vm::ptr surface) { throw __FUNCTION__; } -void sceGxmDepthStencilSurfaceSetBackgroundStencil(vm::psv::ptr surface, u8 backgroundStencil) +void sceGxmDepthStencilSurfaceSetBackgroundStencil(vm::ptr surface, u8 backgroundStencil) { throw __FUNCTION__; } -bool sceGxmDepthStencilSurfaceIsEnabled(vm::psv::ptr surface) +bool sceGxmDepthStencilSurfaceIsEnabled(vm::ptr surface) { throw __FUNCTION__; } -void sceGxmDepthStencilSurfaceSetForceLoadMode(vm::psv::ptr surface, SceGxmDepthStencilForceLoadMode forceLoad) +void sceGxmDepthStencilSurfaceSetForceLoadMode(vm::ptr surface, SceGxmDepthStencilForceLoadMode forceLoad) { throw __FUNCTION__; } -SceGxmDepthStencilForceLoadMode sceGxmDepthStencilSurfaceGetForceLoadMode(vm::psv::ptr surface) +SceGxmDepthStencilForceLoadMode sceGxmDepthStencilSurfaceGetForceLoadMode(vm::ptr surface) { throw __FUNCTION__; } -void sceGxmDepthStencilSurfaceSetForceStoreMode(vm::psv::ptr surface, SceGxmDepthStencilForceStoreMode forceStore) +void sceGxmDepthStencilSurfaceSetForceStoreMode(vm::ptr surface, SceGxmDepthStencilForceStoreMode forceStore) { throw __FUNCTION__; } -SceGxmDepthStencilForceStoreMode sceGxmDepthStencilSurfaceGetForceStoreMode(vm::psv::ptr surface) +SceGxmDepthStencilForceStoreMode sceGxmDepthStencilSurfaceGetForceStoreMode(vm::ptr surface) { throw __FUNCTION__; } -SceGxmColorSurfaceGammaMode sceGxmColorSurfaceGetGammaMode(vm::psv::ptr surface) +SceGxmColorSurfaceGammaMode sceGxmColorSurfaceGetGammaMode(vm::ptr surface) { throw __FUNCTION__; } -s32 sceGxmColorSurfaceSetGammaMode(vm::psv::ptr surface, SceGxmColorSurfaceGammaMode gammaMode) +s32 sceGxmColorSurfaceSetGammaMode(vm::ptr surface, SceGxmColorSurfaceGammaMode gammaMode) { throw __FUNCTION__; } -SceGxmColorSurfaceDitherMode sceGxmColorSurfaceGetDitherMode(vm::psv::ptr surface) +SceGxmColorSurfaceDitherMode sceGxmColorSurfaceGetDitherMode(vm::ptr surface) { throw __FUNCTION__; } -s32 sceGxmColorSurfaceSetDitherMode(vm::psv::ptr surface, SceGxmColorSurfaceDitherMode ditherMode) +s32 sceGxmColorSurfaceSetDitherMode(vm::ptr surface, SceGxmColorSurfaceDitherMode ditherMode) { throw __FUNCTION__; } -SceGxmDepthStencilFormat sceGxmDepthStencilSurfaceGetFormat(vm::psv::ptr surface) +SceGxmDepthStencilFormat sceGxmDepthStencilSurfaceGetFormat(vm::ptr surface) { throw __FUNCTION__; } -u32 sceGxmDepthStencilSurfaceGetStrideInSamples(vm::psv::ptr surface) +u32 sceGxmDepthStencilSurfaceGetStrideInSamples(vm::ptr surface) { throw __FUNCTION__; } -s32 sceGxmProgramCheck(vm::psv::ptr program) +s32 sceGxmProgramCheck(vm::ptr program) { throw __FUNCTION__; } -u32 sceGxmProgramGetSize(vm::psv::ptr program) +u32 sceGxmProgramGetSize(vm::ptr program) { throw __FUNCTION__; } -SceGxmProgramType sceGxmProgramGetType(vm::psv::ptr program) +SceGxmProgramType sceGxmProgramGetType(vm::ptr program) { throw __FUNCTION__; } -bool sceGxmProgramIsDiscardUsed(vm::psv::ptr program) +bool sceGxmProgramIsDiscardUsed(vm::ptr program) { throw __FUNCTION__; } -bool sceGxmProgramIsDepthReplaceUsed(vm::psv::ptr program) +bool sceGxmProgramIsDepthReplaceUsed(vm::ptr program) { throw __FUNCTION__; } -bool sceGxmProgramIsSpriteCoordUsed(vm::psv::ptr program) +bool sceGxmProgramIsSpriteCoordUsed(vm::ptr program) { throw __FUNCTION__; } -u32 sceGxmProgramGetDefaultUniformBufferSize(vm::psv::ptr program) +u32 sceGxmProgramGetDefaultUniformBufferSize(vm::ptr program) { throw __FUNCTION__; } -u32 sceGxmProgramGetParameterCount(vm::psv::ptr program) +u32 sceGxmProgramGetParameterCount(vm::ptr program) { throw __FUNCTION__; } -vm::psv::ptr sceGxmProgramGetParameter(vm::psv::ptr program, u32 index) +vm::ptr sceGxmProgramGetParameter(vm::ptr program, u32 index) { throw __FUNCTION__; } -vm::psv::ptr sceGxmProgramFindParameterByName(vm::psv::ptr program, vm::psv::ptr name) +vm::ptr sceGxmProgramFindParameterByName(vm::ptr program, vm::ptr name) { throw __FUNCTION__; } -vm::psv::ptr sceGxmProgramFindParameterBySemantic(vm::psv::ptr program, SceGxmParameterSemantic semantic, u32 index) +vm::ptr sceGxmProgramFindParameterBySemantic(vm::ptr program, SceGxmParameterSemantic semantic, u32 index) { throw __FUNCTION__; } -u32 sceGxmProgramParameterGetIndex(vm::psv::ptr program, vm::psv::ptr parameter) +u32 sceGxmProgramParameterGetIndex(vm::ptr program, vm::ptr parameter) { throw __FUNCTION__; } -SceGxmParameterCategory sceGxmProgramParameterGetCategory(vm::psv::ptr parameter) +SceGxmParameterCategory sceGxmProgramParameterGetCategory(vm::ptr parameter) { throw __FUNCTION__; } -vm::psv::ptr sceGxmProgramParameterGetName(vm::psv::ptr parameter) +vm::ptr sceGxmProgramParameterGetName(vm::ptr parameter) { throw __FUNCTION__; } -SceGxmParameterSemantic sceGxmProgramParameterGetSemantic(vm::psv::ptr parameter) +SceGxmParameterSemantic sceGxmProgramParameterGetSemantic(vm::ptr parameter) { throw __FUNCTION__; } -u32 sceGxmProgramParameterGetSemanticIndex(vm::psv::ptr parameter) +u32 sceGxmProgramParameterGetSemanticIndex(vm::ptr parameter) { throw __FUNCTION__; } -SceGxmParameterType sceGxmProgramParameterGetType(vm::psv::ptr parameter) +SceGxmParameterType sceGxmProgramParameterGetType(vm::ptr parameter) { throw __FUNCTION__; } -u32 sceGxmProgramParameterGetComponentCount(vm::psv::ptr parameter) +u32 sceGxmProgramParameterGetComponentCount(vm::ptr parameter) { throw __FUNCTION__; } -u32 sceGxmProgramParameterGetArraySize(vm::psv::ptr parameter) +u32 sceGxmProgramParameterGetArraySize(vm::ptr parameter) { throw __FUNCTION__; } -u32 sceGxmProgramParameterGetResourceIndex(vm::psv::ptr parameter) +u32 sceGxmProgramParameterGetResourceIndex(vm::ptr parameter) { throw __FUNCTION__; } -u32 sceGxmProgramParameterGetContainerIndex(vm::psv::ptr parameter) +u32 sceGxmProgramParameterGetContainerIndex(vm::ptr parameter) { throw __FUNCTION__; } -bool sceGxmProgramParameterIsSamplerCube(vm::psv::ptr parameter) +bool sceGxmProgramParameterIsSamplerCube(vm::ptr parameter) { throw __FUNCTION__; } -vm::psv::ptr sceGxmFragmentProgramGetProgram(vm::psv::ptr fragmentProgram) +vm::ptr sceGxmFragmentProgramGetProgram(vm::ptr fragmentProgram) { throw __FUNCTION__; } -vm::psv::ptr sceGxmVertexProgramGetProgram(vm::psv::ptr vertexProgram) +vm::ptr sceGxmVertexProgramGetProgram(vm::ptr vertexProgram) { throw __FUNCTION__; } -s32 sceGxmShaderPatcherCreate(vm::psv::ptr params, vm::psv::pptr shaderPatcher) +s32 sceGxmShaderPatcherCreate(vm::ptr params, vm::pptr shaderPatcher) { throw __FUNCTION__; } -s32 sceGxmShaderPatcherSetUserData(vm::psv::ptr shaderPatcher, vm::psv::ptr userData) +s32 sceGxmShaderPatcherSetUserData(vm::ptr shaderPatcher, vm::ptr userData) { throw __FUNCTION__; } -vm::psv::ptr sceGxmShaderPatcherGetUserData(vm::psv::ptr shaderPatcher) +vm::ptr sceGxmShaderPatcherGetUserData(vm::ptr shaderPatcher) { throw __FUNCTION__; } -s32 sceGxmShaderPatcherDestroy(vm::psv::ptr shaderPatcher) +s32 sceGxmShaderPatcherDestroy(vm::ptr shaderPatcher) { throw __FUNCTION__; } -s32 sceGxmShaderPatcherRegisterProgram(vm::psv::ptr shaderPatcher, vm::psv::ptr programHeader, vm::psv::ptr programId) +s32 sceGxmShaderPatcherRegisterProgram(vm::ptr shaderPatcher, vm::ptr programHeader, vm::pptr programId) { throw __FUNCTION__; } -s32 sceGxmShaderPatcherUnregisterProgram(vm::psv::ptr shaderPatcher, SceGxmShaderPatcherId programId) +s32 sceGxmShaderPatcherUnregisterProgram(vm::ptr shaderPatcher, vm::ptr programId) { throw __FUNCTION__; } -vm::psv::ptr sceGxmShaderPatcherGetProgramFromId(SceGxmShaderPatcherId programId) +vm::ptr sceGxmShaderPatcherGetProgramFromId(vm::ptr programId) { throw __FUNCTION__; } -s32 sceGxmShaderPatcherSetAuxiliarySurface(vm::psv::ptr shaderPatcher, u32 auxSurfaceIndex, vm::psv::ptr auxSurface) +s32 sceGxmShaderPatcherSetAuxiliarySurface(vm::ptr shaderPatcher, u32 auxSurfaceIndex, vm::ptr auxSurface) { throw __FUNCTION__; } -s32 sceGxmShaderPatcherCreateVertexProgram(vm::psv::ptr shaderPatcher, SceGxmShaderPatcherId programId, vm::psv::ptr attributes, u32 attributeCount, vm::psv::ptr streams, u32 streamCount, vm::psv::pptr vertexProgram) +s32 sceGxmShaderPatcherCreateVertexProgram(vm::ptr shaderPatcher, vm::ptr programId, vm::ptr attributes, u32 attributeCount, vm::ptr streams, u32 streamCount, vm::pptr vertexProgram) { throw __FUNCTION__; } -s32 sceGxmShaderPatcherCreateFragmentProgram(vm::psv::ptr shaderPatcher, SceGxmShaderPatcherId programId, SceGxmOutputRegisterFormat outputFormat, SceGxmMultisampleMode multisampleMode, vm::psv::ptr blendInfo, vm::psv::ptr vertexProgram, vm::psv::pptr fragmentProgram) +s32 sceGxmShaderPatcherCreateFragmentProgram(vm::ptr shaderPatcher, vm::ptr programId, SceGxmOutputRegisterFormat outputFormat, SceGxmMultisampleMode multisampleMode, vm::ptr blendInfo, vm::ptr vertexProgram, vm::pptr fragmentProgram) { throw __FUNCTION__; } -s32 sceGxmShaderPatcherAddRefVertexProgram(vm::psv::ptr shaderPatcher, vm::psv::ptr vertexProgram) +s32 sceGxmShaderPatcherAddRefVertexProgram(vm::ptr shaderPatcher, vm::ptr vertexProgram) { throw __FUNCTION__; } -s32 sceGxmShaderPatcherAddRefFragmentProgram(vm::psv::ptr shaderPatcher, vm::psv::ptr fragmentProgram) +s32 sceGxmShaderPatcherAddRefFragmentProgram(vm::ptr shaderPatcher, vm::ptr fragmentProgram) { throw __FUNCTION__; } -s32 sceGxmShaderPatcherReleaseVertexProgram(vm::psv::ptr shaderPatcher, vm::psv::ptr vertexProgram) +s32 sceGxmShaderPatcherReleaseVertexProgram(vm::ptr shaderPatcher, vm::ptr vertexProgram) { throw __FUNCTION__; } -s32 sceGxmShaderPatcherReleaseFragmentProgram(vm::psv::ptr shaderPatcher, vm::psv::ptr fragmentProgram) +s32 sceGxmShaderPatcherReleaseFragmentProgram(vm::ptr shaderPatcher, vm::ptr fragmentProgram) { throw __FUNCTION__; } -u32 sceGxmShaderPatcherGetHostMemAllocated(vm::psv::ptr shaderPatcher) +u32 sceGxmShaderPatcherGetHostMemAllocated(vm::ptr shaderPatcher) { throw __FUNCTION__; } -u32 sceGxmShaderPatcherGetBufferMemAllocated(vm::psv::ptr shaderPatcher) +u32 sceGxmShaderPatcherGetBufferMemAllocated(vm::ptr shaderPatcher) { throw __FUNCTION__; } -u32 sceGxmShaderPatcherGetVertexUsseMemAllocated(vm::psv::ptr shaderPatcher) +u32 sceGxmShaderPatcherGetVertexUsseMemAllocated(vm::ptr shaderPatcher) { throw __FUNCTION__; } -u32 sceGxmShaderPatcherGetFragmentUsseMemAllocated(vm::psv::ptr shaderPatcher) +u32 sceGxmShaderPatcherGetFragmentUsseMemAllocated(vm::ptr shaderPatcher) { throw __FUNCTION__; } -s32 sceGxmTextureInitSwizzled(vm::psv::ptr texture, vm::psv::ptr data, SceGxmTextureFormat texFormat, u32 width, u32 height, u32 mipCount) +s32 sceGxmTextureInitSwizzled(vm::ptr texture, vm::ptr data, SceGxmTextureFormat texFormat, u32 width, u32 height, u32 mipCount) { throw __FUNCTION__; } -s32 sceGxmTextureInitLinear(vm::psv::ptr texture, vm::psv::ptr data, SceGxmTextureFormat texFormat, u32 width, u32 height, u32 mipCount) +s32 sceGxmTextureInitLinear(vm::ptr texture, vm::ptr data, SceGxmTextureFormat texFormat, u32 width, u32 height, u32 mipCount) { throw __FUNCTION__; } -s32 sceGxmTextureInitLinearStrided(vm::psv::ptr texture, vm::psv::ptr data, SceGxmTextureFormat texFormat, u32 width, u32 height, u32 byteStride) +s32 sceGxmTextureInitLinearStrided(vm::ptr texture, vm::ptr data, SceGxmTextureFormat texFormat, u32 width, u32 height, u32 byteStride) { throw __FUNCTION__; } -s32 sceGxmTextureInitTiled(vm::psv::ptr texture, vm::psv::ptr data, SceGxmTextureFormat texFormat, u32 width, u32 height, u32 mipCount) +s32 sceGxmTextureInitTiled(vm::ptr texture, vm::ptr data, SceGxmTextureFormat texFormat, u32 width, u32 height, u32 mipCount) { throw __FUNCTION__; } -s32 sceGxmTextureInitCube(vm::psv::ptr texture, vm::psv::ptr data, SceGxmTextureFormat texFormat, u32 width, u32 height, u32 mipCount) +s32 sceGxmTextureInitCube(vm::ptr texture, vm::ptr data, SceGxmTextureFormat texFormat, u32 width, u32 height, u32 mipCount) { throw __FUNCTION__; } -SceGxmTextureType sceGxmTextureGetType(vm::psv::ptr texture) +SceGxmTextureType sceGxmTextureGetType(vm::ptr texture) { throw __FUNCTION__; } -s32 sceGxmTextureSetMinFilter(vm::psv::ptr texture, SceGxmTextureFilter minFilter) +s32 sceGxmTextureSetMinFilter(vm::ptr texture, SceGxmTextureFilter minFilter) { throw __FUNCTION__; } -SceGxmTextureFilter sceGxmTextureGetMinFilter(vm::psv::ptr texture) +SceGxmTextureFilter sceGxmTextureGetMinFilter(vm::ptr texture) { throw __FUNCTION__; } -s32 sceGxmTextureSetMagFilter(vm::psv::ptr texture, SceGxmTextureFilter magFilter) +s32 sceGxmTextureSetMagFilter(vm::ptr texture, SceGxmTextureFilter magFilter) { throw __FUNCTION__; } -SceGxmTextureFilter sceGxmTextureGetMagFilter(vm::psv::ptr texture) +SceGxmTextureFilter sceGxmTextureGetMagFilter(vm::ptr texture) { throw __FUNCTION__; } -s32 sceGxmTextureSetMipFilter(vm::psv::ptr texture, SceGxmTextureMipFilter mipFilter) +s32 sceGxmTextureSetMipFilter(vm::ptr texture, SceGxmTextureMipFilter mipFilter) { throw __FUNCTION__; } -SceGxmTextureMipFilter sceGxmTextureGetMipFilter(vm::psv::ptr texture) +SceGxmTextureMipFilter sceGxmTextureGetMipFilter(vm::ptr texture) { throw __FUNCTION__; } -s32 sceGxmTextureSetAnisoMode(vm::psv::ptr texture, SceGxmTextureAnisoMode anisoMode) +s32 sceGxmTextureSetAnisoMode(vm::ptr texture, SceGxmTextureAnisoMode anisoMode) { throw __FUNCTION__; } -SceGxmTextureAnisoMode sceGxmTextureGetAnisoMode(vm::psv::ptr texture) +SceGxmTextureAnisoMode sceGxmTextureGetAnisoMode(vm::ptr texture) { throw __FUNCTION__; } -s32 sceGxmTextureSetUAddrMode(vm::psv::ptr texture, SceGxmTextureAddrMode addrMode) +s32 sceGxmTextureSetUAddrMode(vm::ptr texture, SceGxmTextureAddrMode addrMode) { throw __FUNCTION__; } -SceGxmTextureAddrMode sceGxmTextureGetUAddrMode(vm::psv::ptr texture) +SceGxmTextureAddrMode sceGxmTextureGetUAddrMode(vm::ptr texture) { throw __FUNCTION__; } -s32 sceGxmTextureSetVAddrMode(vm::psv::ptr texture, SceGxmTextureAddrMode addrMode) +s32 sceGxmTextureSetVAddrMode(vm::ptr texture, SceGxmTextureAddrMode addrMode) { throw __FUNCTION__; } -SceGxmTextureAddrMode sceGxmTextureGetVAddrMode(vm::psv::ptr texture) +SceGxmTextureAddrMode sceGxmTextureGetVAddrMode(vm::ptr texture) { throw __FUNCTION__; } -s32 sceGxmTextureSetFormat(vm::psv::ptr texture, SceGxmTextureFormat texFormat) +s32 sceGxmTextureSetFormat(vm::ptr texture, SceGxmTextureFormat texFormat) { throw __FUNCTION__; } -SceGxmTextureFormat sceGxmTextureGetFormat(vm::psv::ptr texture) +SceGxmTextureFormat sceGxmTextureGetFormat(vm::ptr texture) { throw __FUNCTION__; } -s32 sceGxmTextureSetLodBias(vm::psv::ptr texture, u32 bias) +s32 sceGxmTextureSetLodBias(vm::ptr texture, u32 bias) { throw __FUNCTION__; } -u32 sceGxmTextureGetLodBias(vm::psv::ptr texture) +u32 sceGxmTextureGetLodBias(vm::ptr texture) { throw __FUNCTION__; } -s32 sceGxmTextureSetStride(vm::psv::ptr texture, u32 byteStride) +s32 sceGxmTextureSetStride(vm::ptr texture, u32 byteStride) { throw __FUNCTION__; } -u32 sceGxmTextureGetStride(vm::psv::ptr texture) +u32 sceGxmTextureGetStride(vm::ptr texture) { throw __FUNCTION__; } -s32 sceGxmTextureSetWidth(vm::psv::ptr texture, u32 width) +s32 sceGxmTextureSetWidth(vm::ptr texture, u32 width) { throw __FUNCTION__; } -u32 sceGxmTextureGetWidth(vm::psv::ptr texture) +u32 sceGxmTextureGetWidth(vm::ptr texture) { throw __FUNCTION__; } -s32 sceGxmTextureSetHeight(vm::psv::ptr texture, u32 height) +s32 sceGxmTextureSetHeight(vm::ptr texture, u32 height) { throw __FUNCTION__; } -u32 sceGxmTextureGetHeight(vm::psv::ptr texture) +u32 sceGxmTextureGetHeight(vm::ptr texture) { throw __FUNCTION__; } -s32 sceGxmTextureSetData(vm::psv::ptr texture, vm::psv::ptr data) +s32 sceGxmTextureSetData(vm::ptr texture, vm::ptr data) { throw __FUNCTION__; } -vm::psv::ptr sceGxmTextureGetData(vm::psv::ptr texture) +vm::ptr sceGxmTextureGetData(vm::ptr texture) { throw __FUNCTION__; } -s32 sceGxmTextureSetMipmapCount(vm::psv::ptr texture, u32 mipCount) +s32 sceGxmTextureSetMipmapCount(vm::ptr texture, u32 mipCount) { throw __FUNCTION__; } -u32 sceGxmTextureGetMipmapCount(vm::psv::ptr texture) +u32 sceGxmTextureGetMipmapCount(vm::ptr texture) { throw __FUNCTION__; } -s32 sceGxmTextureSetPalette(vm::psv::ptr texture, vm::psv::ptr paletteData) +s32 sceGxmTextureSetPalette(vm::ptr texture, vm::ptr paletteData) { throw __FUNCTION__; } -vm::psv::ptr sceGxmTextureGetPalette(vm::psv::ptr texture) +vm::ptr sceGxmTextureGetPalette(vm::ptr texture) { throw __FUNCTION__; } -SceGxmTextureGammaMode sceGxmTextureGetGammaMode(vm::psv::ptr texture) +SceGxmTextureGammaMode sceGxmTextureGetGammaMode(vm::ptr texture) { throw __FUNCTION__; } -s32 sceGxmTextureSetGammaMode(vm::psv::ptr texture, SceGxmTextureGammaMode gammaMode) +s32 sceGxmTextureSetGammaMode(vm::ptr texture, SceGxmTextureGammaMode gammaMode) { throw __FUNCTION__; } -u32 sceGxmGetPrecomputedVertexStateSize(vm::psv::ptr vertexProgram) +u32 sceGxmGetPrecomputedVertexStateSize(vm::ptr vertexProgram) { throw __FUNCTION__; } -s32 sceGxmPrecomputedVertexStateInit(vm::psv::ptr precomputedState, vm::psv::ptr vertexProgram, vm::psv::ptr memBlock) +s32 sceGxmPrecomputedVertexStateInit(vm::ptr precomputedState, vm::ptr vertexProgram, vm::ptr memBlock) { throw __FUNCTION__; } -void sceGxmPrecomputedVertexStateSetDefaultUniformBuffer(vm::psv::ptr precomputedState, vm::psv::ptr defaultBuffer) +void sceGxmPrecomputedVertexStateSetDefaultUniformBuffer(vm::ptr precomputedState, vm::ptr defaultBuffer) { throw __FUNCTION__; } -vm::psv::ptr sceGxmPrecomputedVertexStateGetDefaultUniformBuffer(vm::psv::ptr precomputedState) +vm::ptr sceGxmPrecomputedVertexStateGetDefaultUniformBuffer(vm::ptr precomputedState) { throw __FUNCTION__; } -s32 sceGxmPrecomputedVertexStateSetAllTextures(vm::psv::ptr precomputedState, vm::psv::ptr textures) +s32 sceGxmPrecomputedVertexStateSetAllTextures(vm::ptr precomputedState, vm::ptr textures) { throw __FUNCTION__; } -s32 sceGxmPrecomputedVertexStateSetTexture(vm::psv::ptr precomputedState, u32 textureIndex, vm::psv::ptr texture) +s32 sceGxmPrecomputedVertexStateSetTexture(vm::ptr precomputedState, u32 textureIndex, vm::ptr texture) { throw __FUNCTION__; } -s32 sceGxmPrecomputedVertexStateSetAllUniformBuffers(vm::psv::ptr precomputedState, vm::psv::ptr> bufferDataArray) +s32 sceGxmPrecomputedVertexStateSetAllUniformBuffers(vm::ptr precomputedState, vm::ptr> bufferDataArray) { throw __FUNCTION__; } -s32 sceGxmPrecomputedVertexStateSetUniformBuffer(vm::psv::ptr precomputedState, u32 bufferIndex, vm::psv::ptr bufferData) +s32 sceGxmPrecomputedVertexStateSetUniformBuffer(vm::ptr precomputedState, u32 bufferIndex, vm::ptr bufferData) { throw __FUNCTION__; } -u32 sceGxmGetPrecomputedFragmentStateSize(vm::psv::ptr fragmentProgram) +u32 sceGxmGetPrecomputedFragmentStateSize(vm::ptr fragmentProgram) { throw __FUNCTION__; } -s32 sceGxmPrecomputedFragmentStateInit(vm::psv::ptr precomputedState, vm::psv::ptr fragmentProgram, vm::psv::ptr memBlock) +s32 sceGxmPrecomputedFragmentStateInit(vm::ptr precomputedState, vm::ptr fragmentProgram, vm::ptr memBlock) { throw __FUNCTION__; } -void sceGxmPrecomputedFragmentStateSetDefaultUniformBuffer(vm::psv::ptr precomputedState, vm::psv::ptr defaultBuffer) +void sceGxmPrecomputedFragmentStateSetDefaultUniformBuffer(vm::ptr precomputedState, vm::ptr defaultBuffer) { throw __FUNCTION__; } -vm::psv::ptr sceGxmPrecomputedFragmentStateGetDefaultUniformBuffer(vm::psv::ptr precomputedState) +vm::ptr sceGxmPrecomputedFragmentStateGetDefaultUniformBuffer(vm::ptr precomputedState) { throw __FUNCTION__; } -s32 sceGxmPrecomputedFragmentStateSetAllTextures(vm::psv::ptr precomputedState, vm::psv::ptr textureArray) +s32 sceGxmPrecomputedFragmentStateSetAllTextures(vm::ptr precomputedState, vm::ptr textureArray) { throw __FUNCTION__; } -s32 sceGxmPrecomputedFragmentStateSetTexture(vm::psv::ptr precomputedState, u32 textureIndex, vm::psv::ptr texture) +s32 sceGxmPrecomputedFragmentStateSetTexture(vm::ptr precomputedState, u32 textureIndex, vm::ptr texture) { throw __FUNCTION__; } -s32 sceGxmPrecomputedFragmentStateSetAllUniformBuffers(vm::psv::ptr precomputedState, vm::psv::ptr> bufferDataArray) +s32 sceGxmPrecomputedFragmentStateSetAllUniformBuffers(vm::ptr precomputedState, vm::ptr> bufferDataArray) { throw __FUNCTION__; } -s32 sceGxmPrecomputedFragmentStateSetUniformBuffer(vm::psv::ptr precomputedState, u32 bufferIndex, vm::psv::ptr bufferData) +s32 sceGxmPrecomputedFragmentStateSetUniformBuffer(vm::ptr precomputedState, u32 bufferIndex, vm::ptr bufferData) { throw __FUNCTION__; } -s32 sceGxmPrecomputedFragmentStateSetAllAuxiliarySurfaces(vm::psv::ptr precomputedState, vm::psv::ptr auxSurfaceArray) +s32 sceGxmPrecomputedFragmentStateSetAllAuxiliarySurfaces(vm::ptr precomputedState, vm::ptr auxSurfaceArray) { throw __FUNCTION__; } -u32 sceGxmGetPrecomputedDrawSize(vm::psv::ptr vertexProgram) +u32 sceGxmGetPrecomputedDrawSize(vm::ptr vertexProgram) { throw __FUNCTION__; } -s32 sceGxmPrecomputedDrawInit(vm::psv::ptr precomputedDraw, vm::psv::ptr vertexProgram, vm::psv::ptr memBlock) +s32 sceGxmPrecomputedDrawInit(vm::ptr precomputedDraw, vm::ptr vertexProgram, vm::ptr memBlock) { throw __FUNCTION__; } -s32 sceGxmPrecomputedDrawSetAllVertexStreams(vm::psv::ptr precomputedDraw, vm::psv::ptr> streamDataArray) +s32 sceGxmPrecomputedDrawSetAllVertexStreams(vm::ptr precomputedDraw, vm::ptr> streamDataArray) { throw __FUNCTION__; } -s32 sceGxmPrecomputedDrawSetVertexStream(vm::psv::ptr precomputedDraw, u32 streamIndex, vm::psv::ptr streamData) +s32 sceGxmPrecomputedDrawSetVertexStream(vm::ptr precomputedDraw, u32 streamIndex, vm::ptr streamData) { throw __FUNCTION__; } -void sceGxmPrecomputedDrawSetParams(vm::psv::ptr precomputedDraw, SceGxmPrimitiveType primType, SceGxmIndexFormat indexType, vm::psv::ptr indexData, u32 indexCount) +void sceGxmPrecomputedDrawSetParams(vm::ptr precomputedDraw, SceGxmPrimitiveType primType, SceGxmIndexFormat indexType, vm::ptr indexData, u32 indexCount) { throw __FUNCTION__; } -void sceGxmPrecomputedDrawSetParamsInstanced(vm::psv::ptr precomputedDraw, SceGxmPrimitiveType primType, SceGxmIndexFormat indexType, vm::psv::ptr indexData, u32 indexCount, u32 indexWrap) +void sceGxmPrecomputedDrawSetParamsInstanced(vm::ptr precomputedDraw, SceGxmPrimitiveType primType, SceGxmIndexFormat indexType, vm::ptr indexData, u32 indexCount, u32 indexWrap) { throw __FUNCTION__; } -s32 sceGxmGetRenderTargetMemSizes(vm::psv::ptr params, vm::psv::ptr hostMemSize, vm::psv::ptr driverMemSize) +s32 sceGxmGetRenderTargetMemSizes(vm::ptr params, vm::ptr hostMemSize, vm::ptr driverMemSize) { throw __FUNCTION__; } -s32 sceGxmCreateRenderTarget(vm::psv::ptr params, vm::psv::pptr renderTarget) +s32 sceGxmCreateRenderTarget(vm::ptr params, vm::pptr renderTarget) { throw __FUNCTION__; } -s32 sceGxmRenderTargetGetHostMem(vm::psv::ptr renderTarget, vm::psv::pptr hostMem) +s32 sceGxmRenderTargetGetHostMem(vm::ptr renderTarget, vm::pptr hostMem) { throw __FUNCTION__; } -s32 sceGxmRenderTargetGetDriverMemBlock(vm::psv::ptr renderTarget, vm::psv::ptr driverMemBlock) +s32 sceGxmRenderTargetGetDriverMemBlock(vm::ptr renderTarget, vm::ptr driverMemBlock) { throw __FUNCTION__; } -s32 sceGxmDestroyRenderTarget(vm::psv::ptr renderTarget) +s32 sceGxmDestroyRenderTarget(vm::ptr renderTarget) { throw __FUNCTION__; } -s32 sceGxmSetUniformDataF(vm::psv::ptr uniformBuffer, vm::psv::ptr parameter, u32 componentOffset, u32 componentCount, vm::psv::ptr sourceData) +s32 sceGxmSetUniformDataF(vm::ptr uniformBuffer, vm::ptr parameter, u32 componentOffset, u32 componentCount, vm::ptr sourceData) { throw __FUNCTION__; } @@ -1074,6 +1074,7 @@ psv_log_base sceGxm("SceGxm", []() sceGxm.on_load = nullptr; sceGxm.on_unload = nullptr; sceGxm.on_stop = nullptr; + sceGxm.on_error = nullptr; REG_FUNC(0xB0F1E4EC, sceGxmInitialize); REG_FUNC(0xB627DE66, sceGxmTerminate); diff --git a/rpcs3/Emu/ARMv7/Modules/sceGxm.h b/rpcs3/Emu/ARMv7/Modules/sceGxm.h index 390c7ed1e7..c6a37730d8 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceGxm.h +++ b/rpcs3/Emu/ARMv7/Modules/sceGxm.h @@ -29,15 +29,15 @@ enum SCE_GXM_ERROR_DRIVER = 0x805B0017, }; -typedef void(SceGxmDisplayQueueCallback)(vm::psv::ptr callbackData); +using SceGxmDisplayQueueCallback = func_def callbackData)>; struct SceGxmInitializeParams { - u32 flags; - u32 displayQueueMaxPendingCount; - vm::psv::ptr displayQueueCallback; - u32 displayQueueCallbackDataSize; - s32 parameterBufferSize; + le_t flags; + le_t displayQueueMaxPendingCount; + vm::lptr displayQueueCallback; + le_t displayQueueCallbackDataSize; + le_t parameterBufferSize; }; enum SceGxmMemoryAttribFlags : u32 @@ -1002,13 +1002,13 @@ enum SceGxmColorMask : u8 struct SceGxmBlendInfo { - SceGxmColorMask colorMask; - SceGxmBlendFunc colorFunc : 4; - SceGxmBlendFunc alphaFunc : 4; - SceGxmBlendFactor colorSrc : 4; - SceGxmBlendFactor colorDst : 4; - SceGxmBlendFactor alphaSrc : 4; - SceGxmBlendFactor alphaDst : 4; + u8 colorMask; // SceGxmColorMask + u8 colorFunc : 4; // SceGxmBlendFunc + u8 alphaFunc : 4; // SceGxmBlendFunc + u8 colorSrc : 4; // SceGxmBlendFactor + u8 colorDst : 4; // SceGxmBlendFactor + u8 alphaSrc : 4; // SceGxmBlendFactor + u8 alphaDst : 4; // SceGxmBlendFactor }; struct SceGxmRenderTarget; @@ -1017,63 +1017,63 @@ struct SceGxmSyncObject; struct SceGxmVertexAttribute { - u16 streamIndex; - u16 offset; - SceGxmAttributeFormat format; + le_t streamIndex; + le_t offset; + u8 format; // SceGxmAttributeFormat u8 componentCount; - u16 regIndex; + le_t regIndex; }; struct SceGxmVertexStream { - u16 stride; - u16 indexSource; + le_t stride; + le_t indexSource; }; struct SceGxmTexture { - u32 controlWords[4]; + le_t controlWords[4]; }; struct SceGxmColorSurface { - u32 pbeSidebandWord; - u32 pbeEmitWords[6]; - u32 outputRegisterSize; + le_t pbeSidebandWord; + le_t pbeEmitWords[6]; + le_t outputRegisterSize; SceGxmTexture backgroundTex; }; struct SceGxmDepthStencilSurface { - u32 zlsControl; - vm::psv::ptr depthData; - vm::psv::ptr stencilData; - float backgroundDepth; - u32 backgroundControl; + le_t zlsControl; + vm::lptr depthData; + vm::lptr stencilData; + le_t backgroundDepth; + le_t backgroundControl; }; struct SceGxmAuxiliarySurface { - SceGxmColorFormat colorFormat; - SceGxmColorSurfaceType type; - u32 width; - u32 height; - u32 stride; - vm::psv::ptr data; + le_t colorFormat; // SceGxmColorFormat + le_t type; // SceGxmColorSurfaceType + le_t width; + le_t height; + le_t stride; + vm::lptr data; }; struct SceGxmNotification { - vm::psv::ptr address; - u32 value; + vm::lptr address; + le_t value; }; struct SceGxmValidRegion { - u32 xMin; - u32 yMin; - u32 xMax; - u32 yMax; + le_t xMin; + le_t yMin; + le_t xMax; + le_t yMax; }; struct SceGxmContext; @@ -1089,17 +1089,17 @@ enum struct SceGxmContextParams { - vm::psv::ptr hostMem; - u32 hostMemSize; - vm::psv::ptr vdmRingBufferMem; - u32 vdmRingBufferMemSize; - vm::psv::ptr vertexRingBufferMem; - u32 vertexRingBufferMemSize; - vm::psv::ptr fragmentRingBufferMem; - u32 fragmentRingBufferMemSize; - vm::psv::ptr fragmentUsseRingBufferMem; - u32 fragmentUsseRingBufferMemSize; - u32 fragmentUsseRingBufferOffset; + vm::lptr hostMem; + le_t hostMemSize; + vm::lptr vdmRingBufferMem; + le_t vdmRingBufferMemSize; + vm::lptr vertexRingBufferMem; + le_t vertexRingBufferMemSize; + vm::lptr fragmentRingBufferMem; + le_t fragmentRingBufferMemSize; + vm::lptr fragmentUsseRingBufferMem; + le_t fragmentUsseRingBufferMemSize; + le_t fragmentUsseRingBufferOffset; }; struct SceGxmVertexProgram; @@ -1115,17 +1115,17 @@ enum struct SceGxmPrecomputedVertexState { - u32 data[SCE_GXM_PRECOMPUTED_VERTEX_STATE_WORD_COUNT]; + le_t data[SCE_GXM_PRECOMPUTED_VERTEX_STATE_WORD_COUNT]; }; struct SceGxmPrecomputedFragmentState { - u32 data[SCE_GXM_PRECOMPUTED_FRAGMENT_STATE_WORD_COUNT]; + le_t data[SCE_GXM_PRECOMPUTED_FRAGMENT_STATE_WORD_COUNT]; }; struct SceGxmPrecomputedDraw { - u32 data[SCE_GXM_PRECOMPUTED_DRAW_WORD_COUNT]; + le_t data[SCE_GXM_PRECOMPUTED_DRAW_WORD_COUNT]; }; enum : u32 @@ -1193,34 +1193,32 @@ struct SceGxmShaderPatcher; struct SceGxmRegisteredProgram; -typedef vm::psv::ptr SceGxmShaderPatcherId; - -typedef vm::psv::ptr(SceGxmShaderPatcherHostAllocCallback)(vm::psv::ptr userData, u32 size); -typedef void(SceGxmShaderPatcherHostFreeCallback)(vm::psv::ptr userData, vm::psv::ptr mem); -typedef vm::psv::ptr(SceGxmShaderPatcherBufferAllocCallback)(vm::psv::ptr userData, u32 size); -typedef void(SceGxmShaderPatcherBufferFreeCallback)(vm::psv::ptr userData, vm::psv::ptr mem); -typedef vm::psv::ptr(SceGxmShaderPatcherUsseAllocCallback)(vm::psv::ptr userData, u32 size, vm::psv::ptr usseOffset); -typedef void(SceGxmShaderPatcherUsseFreeCallback)(vm::psv::ptr userData, vm::psv::ptr mem); +using SceGxmShaderPatcherHostAllocCallback = func_def(vm::ptr userData, u32 size)>; +using SceGxmShaderPatcherHostFreeCallback = func_def userData, vm::ptr mem)>; +using SceGxmShaderPatcherBufferAllocCallback = func_def(vm::ptr userData, u32 size)>; +using SceGxmShaderPatcherBufferFreeCallback = func_def userData, vm::ptr mem)>; +using SceGxmShaderPatcherUsseAllocCallback = func_def(vm::ptr userData, u32 size, vm::ptr usseOffset)>; +using SceGxmShaderPatcherUsseFreeCallback = func_def userData, vm::ptr mem)>; struct SceGxmShaderPatcherParams { - vm::psv::ptr userData; - vm::psv::ptr hostAllocCallback; - vm::psv::ptr hostFreeCallback; - vm::psv::ptr bufferAllocCallback; - vm::psv::ptr bufferFreeCallback; - vm::psv::ptr bufferMem; - u32 bufferMemSize; - vm::psv::ptr vertexUsseAllocCallback; - vm::psv::ptr vertexUsseFreeCallback; - vm::psv::ptr vertexUsseMem; - u32 vertexUsseMemSize; - u32 vertexUsseOffset; - vm::psv::ptr fragmentUsseAllocCallback; - vm::psv::ptr fragmentUsseFreeCallback; - vm::psv::ptr fragmentUsseMem; - u32 fragmentUsseMemSize; - u32 fragmentUsseOffset; + vm::lptr userData; + vm::lptr hostAllocCallback; + vm::lptr hostFreeCallback; + vm::lptr bufferAllocCallback; + vm::lptr bufferFreeCallback; + vm::lptr bufferMem; + le_t bufferMemSize; + vm::lptr vertexUsseAllocCallback; + vm::lptr vertexUsseFreeCallback; + vm::lptr vertexUsseMem; + le_t vertexUsseMemSize; + le_t vertexUsseOffset; + vm::lptr fragmentUsseAllocCallback; + vm::lptr fragmentUsseFreeCallback; + vm::lptr fragmentUsseMem; + le_t fragmentUsseMemSize; + le_t fragmentUsseOffset; }; enum SceGxmRenderTargetFlags : u32 @@ -1230,15 +1228,15 @@ enum SceGxmRenderTargetFlags : u32 struct SceGxmRenderTargetParams { - SceGxmRenderTargetFlags flags; - u16 width; - u16 height; - u16 scenesPerFrame; - SceGxmMultisampleMode multisampleMode; - u32 multisampleLocations; - vm::psv::ptr hostMem; - u32 hostMemSize; - s32 driverMemBlock; + le_t flags; // SceGxmRenderTargetFlags + le_t width; + le_t height; + le_t scenesPerFrame; + le_t multisampleMode; // SceGxmMultisampleMode + le_t multisampleLocations; + vm::lptr hostMem; + le_t hostMemSize; + le_t driverMemBlock; }; extern psv_log_base sceGxm; diff --git a/rpcs3/Emu/ARMv7/Modules/sceHttp.cpp b/rpcs3/Emu/ARMv7/Modules/sceHttp.cpp index c261e0335d..bd349ea970 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceHttp.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceHttp.cpp @@ -2,80 +2,7 @@ #include "Emu/System.h" #include "Emu/ARMv7/PSVFuncList.h" -#include "sceSsl.h" - -extern psv_log_base sceHttp; - -enum SceHttpHttpVersion : s32 -{ - SCE_HTTP_VERSION_1_0 = 1, - SCE_HTTP_VERSION_1_1 -}; - -enum SceHttpProxyMode : s32 -{ - SCE_HTTP_PROXY_AUTO, - SCE_HTTP_PROXY_MANUAL -}; - -enum SceHttpAddHeaderMode : s32 -{ - SCE_HTTP_HEADER_OVERWRITE, - SCE_HTTP_HEADER_ADD -}; - -enum SceHttpAuthType : s32 -{ - SCE_HTTP_AUTH_BASIC, - SCE_HTTP_AUTH_DIGEST, - SCE_HTTP_AUTH_RESERVED0, - SCE_HTTP_AUTH_RESERVED1, - SCE_HTTP_AUTH_RESERVED2 -}; - -typedef vm::psv::ptr realm, vm::psv::ptr username, vm::psv::ptr password, s32 needEntity, vm::psv::pptr entityBody, vm::psv::ptr entitySize, vm::psv::ptr save, vm::psv::ptr userArg)> SceHttpAuthInfoCallback; - -typedef vm::psv::ptr method, vm::psv::ptr location, vm::psv::ptr userArg)> SceHttpRedirectCallback; - -struct SceHttpMemoryPoolStats -{ - u32 poolSize; - u32 maxInuseSize; - u32 currentInuseSize; - s32 reserved; -}; - -struct SceHttpUriElement -{ - s32 opaque; - vm::psv::ptr scheme; - vm::psv::ptr username; - vm::psv::ptr password; - vm::psv::ptr hostname; - vm::psv::ptr path; - vm::psv::ptr query; - vm::psv::ptr fragment; - u16 port; - u8 reserved[10]; -}; - -typedef vm::psv::ptr url, vm::psv::ptr cookieHeader, u32 headerLen, vm::psv::ptr userArg)> SceHttpCookieRecvCallback; - -typedef vm::psv::ptr url, vm::psv::ptr cookieHeader, vm::psv::ptr userArg)> SceHttpCookieSendCallback; - -struct SceHttpsData -{ - vm::psv::ptr ptr; - u32 size; -}; - -struct SceHttpsCaList -{ - vm::psv::lpptr caCerts; - s32 caNum; -}; - -typedef vm::psv::ptr> sslCert, s32 certNum, vm::psv::ptr userArg)> SceHttpsCallback; +#include "sceHttp.h" s32 sceHttpInit(u32 poolSize) { @@ -87,12 +14,12 @@ s32 sceHttpTerm() throw __FUNCTION__; } -s32 sceHttpGetMemoryPoolStats(vm::psv::ptr currentStat) +s32 sceHttpGetMemoryPoolStats(vm::ptr currentStat) { throw __FUNCTION__; } -s32 sceHttpCreateTemplate(vm::psv::ptr userAgent, s32 httpVer, s32 autoProxyConf) +s32 sceHttpCreateTemplate(vm::ptr userAgent, s32 httpVer, s32 autoProxyConf) { throw __FUNCTION__; } @@ -102,12 +29,12 @@ s32 sceHttpDeleteTemplate(s32 tmplId) throw __FUNCTION__; } -s32 sceHttpCreateConnection(s32 tmplId, vm::psv::ptr serverName, vm::psv::ptr scheme, u16 port, s32 enableKeepalive) +s32 sceHttpCreateConnection(s32 tmplId, vm::ptr serverName, vm::ptr scheme, u16 port, s32 enableKeepalive) { throw __FUNCTION__; } -s32 sceHttpCreateConnectionWithURL(s32 tmplId, vm::psv::ptr url, s32 enableKeepalive) +s32 sceHttpCreateConnectionWithURL(s32 tmplId, vm::ptr url, s32 enableKeepalive) { throw __FUNCTION__; } @@ -117,12 +44,12 @@ s32 sceHttpDeleteConnection(s32 connId) throw __FUNCTION__; } -s32 sceHttpCreateRequest(s32 connId, s32 method, vm::psv::ptr path, u64 contentLength) +s32 sceHttpCreateRequest(s32 connId, s32 method, vm::ptr path, u64 contentLength) { throw __FUNCTION__; } -s32 sceHttpCreateRequestWithURL(s32 connId, s32 method, vm::psv::ptr url, u64 contentLength) +s32 sceHttpCreateRequestWithURL(s32 connId, s32 method, vm::ptr url, u64 contentLength) { throw __FUNCTION__; } @@ -147,7 +74,7 @@ s32 sceHttpSetRequestContentLength(s32 id, u64 contentLength) throw __FUNCTION__; } -s32 sceHttpSendRequest(s32 reqId, vm::psv::ptr postData, u32 size) +s32 sceHttpSendRequest(s32 reqId, vm::ptr postData, u32 size) { throw __FUNCTION__; } @@ -157,47 +84,47 @@ s32 sceHttpAbortRequest(s32 reqId) throw __FUNCTION__; } -s32 sceHttpGetResponseContentLength(s32 reqId, vm::psv::ptr contentLength) +s32 sceHttpGetResponseContentLength(s32 reqId, vm::ptr contentLength) { throw __FUNCTION__; } -s32 sceHttpGetStatusCode(s32 reqId, vm::psv::ptr statusCode) +s32 sceHttpGetStatusCode(s32 reqId, vm::ptr statusCode) { throw __FUNCTION__; } -s32 sceHttpGetAllResponseHeaders(s32 reqId, vm::psv::pptr header, vm::psv::ptr headerSize) +s32 sceHttpGetAllResponseHeaders(s32 reqId, vm::pptr header, vm::ptr headerSize) { throw __FUNCTION__; } -s32 sceHttpReadData(s32 reqId, vm::psv::ptr data, u32 size) +s32 sceHttpReadData(s32 reqId, vm::ptr data, u32 size) { throw __FUNCTION__; } -s32 sceHttpAddRequestHeader(s32 id, vm::psv::ptr name, vm::psv::ptr value, u32 mode) +s32 sceHttpAddRequestHeader(s32 id, vm::ptr name, vm::ptr value, u32 mode) { throw __FUNCTION__; } -s32 sceHttpRemoveRequestHeader(s32 id, vm::psv::ptr name) +s32 sceHttpRemoveRequestHeader(s32 id, vm::ptr name) { throw __FUNCTION__; } -s32 sceHttpParseResponseHeader(vm::psv::ptr header, u32 headerLen, vm::psv::ptr fieldStr, vm::psv::pptr fieldValue, vm::psv::ptr valueLen) +s32 sceHttpParseResponseHeader(vm::ptr header, u32 headerLen, vm::ptr fieldStr, vm::pptr fieldValue, vm::ptr valueLen) { throw __FUNCTION__; } -s32 sceHttpParseStatusLine(vm::psv::ptr statusLine, u32 lineLen, vm::psv::ptr httpMajorVer, vm::psv::ptr httpMinorVer, vm::psv::ptr responseCode, vm::psv::pptr reasonPhrase, vm::psv::ptr phraseLen) +s32 sceHttpParseStatusLine(vm::ptr statusLine, u32 lineLen, vm::ptr httpMajorVer, vm::ptr httpMinorVer, vm::ptr responseCode, vm::pptr reasonPhrase, vm::ptr phraseLen) { throw __FUNCTION__; } -s32 sceHttpSetAuthInfoCallback(s32 id, SceHttpAuthInfoCallback cbfunc, vm::psv::ptr userArg) +s32 sceHttpSetAuthInfoCallback(s32 id, vm::ptr cbfunc, vm::ptr userArg) { throw __FUNCTION__; } @@ -207,12 +134,12 @@ s32 sceHttpSetAuthEnabled(s32 id, s32 enable) throw __FUNCTION__; } -s32 sceHttpGetAuthEnabled(s32 id, vm::psv::ptr enable) +s32 sceHttpGetAuthEnabled(s32 id, vm::ptr enable) { throw __FUNCTION__; } -s32 sceHttpSetRedirectCallback(s32 id, SceHttpRedirectCallback cbfunc, vm::psv::ptr userArg) +s32 sceHttpSetRedirectCallback(s32 id, vm::ptr cbfunc, vm::ptr userArg) { throw __FUNCTION__; } @@ -222,7 +149,7 @@ s32 sceHttpSetAutoRedirect(s32 id, s32 enable) throw __FUNCTION__; } -s32 sceHttpGetAutoRedirect(s32 id, vm::psv::ptr enable) +s32 sceHttpGetAutoRedirect(s32 id, vm::ptr enable) { throw __FUNCTION__; } @@ -252,32 +179,32 @@ s32 sceHttpSetRecvTimeOut(s32 id, u32 usec) throw __FUNCTION__; } -s32 sceHttpUriEscape(vm::psv::ptr out, vm::psv::ptr require, u32 prepare, vm::psv::ptr in) +s32 sceHttpUriEscape(vm::ptr out, vm::ptr require, u32 prepare, vm::ptr in) { throw __FUNCTION__; } -s32 sceHttpUriUnescape(vm::psv::ptr out, vm::psv::ptr require, u32 prepare, vm::psv::ptr in) +s32 sceHttpUriUnescape(vm::ptr out, vm::ptr require, u32 prepare, vm::ptr in) { throw __FUNCTION__; } -s32 sceHttpUriParse(vm::psv::ptr out, vm::psv::ptr srcUrl, vm::psv::ptr pool, vm::psv::ptr require, u32 prepare) +s32 sceHttpUriParse(vm::ptr out, vm::ptr srcUrl, vm::ptr pool, vm::ptr require, u32 prepare) { throw __FUNCTION__; } -s32 sceHttpUriBuild(vm::psv::ptr out, vm::psv::ptr require, u32 prepare, vm::psv::ptr srcElement, u32 option) +s32 sceHttpUriBuild(vm::ptr out, vm::ptr require, u32 prepare, vm::ptr srcElement, u32 option) { throw __FUNCTION__; } -s32 sceHttpUriMerge(vm::psv::ptr mergedUrl, vm::psv::ptr url, vm::psv::ptr relativeUrl, vm::psv::ptr require, u32 prepare, u32 option) +s32 sceHttpUriMerge(vm::ptr mergedUrl, vm::ptr url, vm::ptr relativeUrl, vm::ptr require, u32 prepare, u32 option) { throw __FUNCTION__; } -s32 sceHttpUriSweepPath(vm::psv::ptr dst, vm::psv::ptr src, u32 srcSize) +s32 sceHttpUriSweepPath(vm::ptr dst, vm::ptr src, u32 srcSize) { throw __FUNCTION__; } @@ -287,32 +214,32 @@ s32 sceHttpSetCookieEnabled(s32 id, s32 enable) throw __FUNCTION__; } -s32 sceHttpGetCookieEnabled(s32 id, vm::psv::ptr enable) +s32 sceHttpGetCookieEnabled(s32 id, vm::ptr enable) { throw __FUNCTION__; } -s32 sceHttpGetCookie(vm::psv::ptr url, vm::psv::ptr cookie, vm::psv::ptr cookieLength, u32 prepare, s32 secure) +s32 sceHttpGetCookie(vm::ptr url, vm::ptr cookie, vm::ptr cookieLength, u32 prepare, s32 secure) { throw __FUNCTION__; } -s32 sceHttpAddCookie(vm::psv::ptr url, vm::psv::ptr cookie, u32 cookieLength) +s32 sceHttpAddCookie(vm::ptr url, vm::ptr cookie, u32 cookieLength) { throw __FUNCTION__; } -s32 sceHttpSetCookieRecvCallback(s32 id, SceHttpCookieRecvCallback cbfunc, vm::psv::ptr userArg) +s32 sceHttpSetCookieRecvCallback(s32 id, vm::ptr cbfunc, vm::ptr userArg) { throw __FUNCTION__; } -s32 sceHttpSetCookieSendCallback(s32 id, SceHttpCookieSendCallback cbfunc, vm::psv::ptr userArg) +s32 sceHttpSetCookieSendCallback(s32 id, vm::ptr cbfunc, vm::ptr userArg) { throw __FUNCTION__; } -s32 sceHttpsLoadCert(s32 caCertNum, vm::psv::pptr caList, vm::psv::ptr cert, vm::psv::ptr privKey) +s32 sceHttpsLoadCert(s32 caCertNum, vm::pptr caList, vm::ptr cert, vm::ptr privKey) { throw __FUNCTION__; } @@ -332,22 +259,22 @@ s32 sceHttpsDisableOption(u32 sslFlags) throw __FUNCTION__; } -s32 sceHttpsGetSslError(s32 id, vm::psv::ptr errNum, vm::psv::ptr detail) +s32 sceHttpsGetSslError(s32 id, vm::ptr errNum, vm::ptr detail) { throw __FUNCTION__; } -s32 sceHttpsSetSslCallback(s32 id, SceHttpsCallback cbfunc, vm::psv::ptr userArg) +s32 sceHttpsSetSslCallback(s32 id, vm::ptr cbfunc, vm::ptr userArg) { throw __FUNCTION__; } -s32 sceHttpsGetCaList(vm::psv::ptr caList) +s32 sceHttpsGetCaList(vm::ptr caList) { throw __FUNCTION__; } -s32 sceHttpsFreeCaList(vm::psv::ptr caList) +s32 sceHttpsFreeCaList(vm::ptr caList) { throw __FUNCTION__; } @@ -360,6 +287,7 @@ psv_log_base sceHttp("SceHttp", []() sceHttp.on_load = nullptr; sceHttp.on_unload = nullptr; sceHttp.on_stop = nullptr; + sceHttp.on_error = nullptr; REG_FUNC(0x214926D9, sceHttpInit); REG_FUNC(0xC9076666, sceHttpTerm); diff --git a/rpcs3/Emu/ARMv7/Modules/sceHttp.h b/rpcs3/Emu/ARMv7/Modules/sceHttp.h new file mode 100644 index 0000000000..6b957307ef --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/sceHttp.h @@ -0,0 +1,74 @@ +#pragma once + +#include "sceSsl.h" + +enum SceHttpHttpVersion : s32 +{ + SCE_HTTP_VERSION_1_0 = 1, + SCE_HTTP_VERSION_1_1 +}; + +enum SceHttpProxyMode : s32 +{ + SCE_HTTP_PROXY_AUTO, + SCE_HTTP_PROXY_MANUAL +}; + +enum SceHttpAddHeaderMode : s32 +{ + SCE_HTTP_HEADER_OVERWRITE, + SCE_HTTP_HEADER_ADD +}; + +enum SceHttpAuthType : s32 +{ + SCE_HTTP_AUTH_BASIC, + SCE_HTTP_AUTH_DIGEST, + SCE_HTTP_AUTH_RESERVED0, + SCE_HTTP_AUTH_RESERVED1, + SCE_HTTP_AUTH_RESERVED2 +}; + +using SceHttpAuthInfoCallback = func_def realm, vm::ptr username, vm::ptr password, s32 needEntity, vm::pptr entityBody, vm::ptr entitySize, vm::ptr save, vm::ptr userArg)>; +using SceHttpRedirectCallback = func_def method, vm::cptr location, vm::ptr userArg)>; + +struct SceHttpMemoryPoolStats +{ + le_t poolSize; + le_t maxInuseSize; + le_t currentInuseSize; + le_t reserved; +}; + +struct SceHttpUriElement +{ + le_t opaque; + vm::lptr scheme; + vm::lptr username; + vm::lptr password; + vm::lptr hostname; + vm::lptr path; + vm::lptr query; + vm::lptr fragment; + le_t port; + u8 reserved[10]; +}; + +using SceHttpCookieRecvCallback = func_def url, vm::cptr cookieHeader, u32 headerLen, vm::ptr userArg)>; +using SceHttpCookieSendCallback = func_def url, vm::cptr cookieHeader, vm::ptr userArg)>; + +struct SceHttpsData +{ + vm::lptr ptr; + le_t size; +}; + +struct SceHttpsCaList +{ + vm::lpptr caCerts; + le_t caNum; +}; + +using SceHttpsCallback = func_def> sslCert, s32 certNum, vm::ptr userArg)>; + +extern psv_log_base sceHttp; diff --git a/rpcs3/Emu/ARMv7/Modules/sceIme.cpp b/rpcs3/Emu/ARMv7/Modules/sceIme.cpp index 797e282ace..ad8628a510 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceIme.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceIme.cpp @@ -4,7 +4,7 @@ #include "sceIme.h" -s32 sceImeOpen(vm::psv::ptr param) +s32 sceImeOpen(vm::ptr param) { throw __FUNCTION__; } @@ -14,12 +14,12 @@ s32 sceImeUpdate() throw __FUNCTION__; } -s32 sceImeSetCaret(vm::psv::ptr caret) +s32 sceImeSetCaret(vm::ptr caret) { throw __FUNCTION__; } -s32 sceImeSetPreeditGeometry(vm::psv::ptr preedit) +s32 sceImeSetPreeditGeometry(vm::ptr preedit) { throw __FUNCTION__; } @@ -37,6 +37,7 @@ psv_log_base sceIme("SceIme", []() sceIme.on_load = nullptr; sceIme.on_unload = nullptr; sceIme.on_stop = nullptr; + sceIme.on_error = nullptr; REG_FUNC(0x0E050613, sceImeOpen); REG_FUNC(0x71D6898A, sceImeUpdate); diff --git a/rpcs3/Emu/ARMv7/Modules/sceIme.h b/rpcs3/Emu/ARMv7/Modules/sceIme.h index 7e7fffb429..4e1fda1849 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceIme.h +++ b/rpcs3/Emu/ARMv7/Modules/sceIme.h @@ -1,70 +1,70 @@ #pragma once -typedef s32(SceImeCharFilter)(u16 ch); +using SceImeCharFilter = func_def; struct SceImeRect { - u32 x; - u32 y; - u32 width; - u32 height; + le_t x; + le_t y; + le_t width; + le_t height; }; struct SceImeEditText { - u32 preeditIndex; - u32 preeditLength; - u32 caretIndex; - vm::psv::ptr str; + le_t preeditIndex; + le_t preeditLength; + le_t caretIndex; + vm::lptr str; }; union SceImeEventParam { SceImeRect rect; SceImeEditText text; - u32 caretIndex; + le_t caretIndex; }; struct SceImeEvent { - u32 id; + le_t id; SceImeEventParam param; }; struct SceImeCaret { - u32 x; - u32 y; - u32 height; - u32 index; + le_t x; + le_t y; + le_t height; + le_t index; }; struct SceImePreeditGeometry { - u32 x; - u32 y; - u32 height; + le_t x; + le_t y; + le_t height; }; -typedef void(SceImeEventHandler)(vm::psv::ptr arg, vm::psv::ptr e); +using SceImeEventHandler = func_def arg, vm::cptr e)>; struct SceImeParam { - u32 size; - u32 inputMethod; - u64 supportedLanguages; - s32 languagesForced; - u32 type; - u32 option; - vm::psv::ptr work; - vm::psv::ptr arg; - vm::psv::ptr handler; - vm::psv::ptr filter; - vm::psv::ptr initialText; - u32 maxTextLength; - vm::psv::ptr inputTextBuffer; - u32 reserved0; - u32 reserved1; + le_t size; + le_t inputMethod; + le_t supportedLanguages; + le_t languagesForced; + le_t type; + le_t option; + vm::lptr work; + vm::lptr arg; + vm::lptr handler; + vm::lptr filter; + vm::lptr initialText; + le_t maxTextLength; + vm::lptr inputTextBuffer; + le_t reserved0; + le_t reserved1; }; extern psv_log_base sceIme; diff --git a/rpcs3/Emu/ARMv7/Modules/sceJpeg.cpp b/rpcs3/Emu/ARMv7/Modules/sceJpeg.cpp index 06e8e0ec00..4d960dde0f 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceJpeg.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceJpeg.cpp @@ -2,36 +2,7 @@ #include "Emu/System.h" #include "Emu/ARMv7/PSVFuncList.h" -extern psv_log_base sceJpeg; - -struct SceJpegOutputInfo -{ - s32 colorSpace; - u16 imageWidth; - u16 imageHeight; - u32 outputBufferSize; - u32 tempBufferSize; - u32 coefBufferSize; - - struct { u32 x, y; } pitch[4]; -}; - -struct SceJpegSplitDecodeCtrl -{ - vm::psv::ptr pStreamBuffer; - u32 streamBufferSize; - vm::psv::ptr pWriteBuffer; - u32 writeBufferSize; - s32 isEndOfStream; - s32 decodeMode; - - SceJpegOutputInfo outputInfo; - - vm::psv::ptr pOutputBuffer; - vm::psv::ptr pCoefBuffer; - - u32 internalData[3]; -}; +#include "sceJpeg.h" s32 sceJpegInitMJpeg(s32 maxSplitDecoder) { @@ -44,34 +15,34 @@ s32 sceJpegFinishMJpeg() } s32 sceJpegDecodeMJpeg( - vm::psv::ptr pJpeg, + vm::ptr pJpeg, u32 isize, - vm::psv::ptr pRGBA, + vm::ptr pRGBA, u32 osize, s32 decodeMode, - vm::psv::ptr pTempBuffer, + vm::ptr pTempBuffer, u32 tempBufferSize, - vm::psv::ptr pCoefBuffer, + vm::ptr pCoefBuffer, u32 coefBufferSize) { throw __FUNCTION__; } s32 sceJpegDecodeMJpegYCbCr( - vm::psv::ptr pJpeg, + vm::ptr pJpeg, u32 isize, - vm::psv::ptr pYCbCr, + vm::ptr pYCbCr, u32 osize, s32 decodeMode, - vm::psv::ptr pCoefBuffer, + vm::ptr pCoefBuffer, u32 coefBufferSize) { throw __FUNCTION__; } s32 sceJpegMJpegCsc( - vm::psv::ptr pRGBA, - vm::psv::ptr pYCbCr, + vm::ptr pRGBA, + vm::ptr pYCbCr, s32 xysize, s32 iFrameWidth, s32 colorOption, @@ -81,26 +52,26 @@ s32 sceJpegMJpegCsc( } s32 sceJpegGetOutputInfo( - vm::psv::ptr pJpeg, + vm::ptr pJpeg, u32 isize, s32 outputFormat, s32 decodeMode, - vm::psv::ptr pOutputInfo) + vm::ptr pOutputInfo) { throw __FUNCTION__; } -s32 sceJpegCreateSplitDecoder(vm::psv::ptr pCtrl) +s32 sceJpegCreateSplitDecoder(vm::ptr pCtrl) { throw __FUNCTION__; } -s32 sceJpegDeleteSplitDecoder(vm::psv::ptr pCtrl) +s32 sceJpegDeleteSplitDecoder(vm::ptr pCtrl) { throw __FUNCTION__; } -s32 sceJpegSplitDecodeMJpeg(vm::psv::ptr pCtrl) +s32 sceJpegSplitDecodeMJpeg(vm::ptr pCtrl) { throw __FUNCTION__; } @@ -113,6 +84,7 @@ psv_log_base sceJpeg("SceJpeg", []() sceJpeg.on_load = nullptr; sceJpeg.on_unload = nullptr; sceJpeg.on_stop = nullptr; + sceJpeg.on_error = nullptr; REG_FUNC(0xB030773B, sceJpegInitMJpeg); REG_FUNC(0x62842598, sceJpegFinishMJpeg); diff --git a/rpcs3/Emu/ARMv7/Modules/sceJpeg.h b/rpcs3/Emu/ARMv7/Modules/sceJpeg.h new file mode 100644 index 0000000000..9b24acff5b --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/sceJpeg.h @@ -0,0 +1,38 @@ +#pragma once + +struct SceJpegOutputInfo +{ + le_t colorSpace; + le_t imageWidth; + le_t imageHeight; + le_t outputBufferSize; + le_t tempBufferSize; + le_t coefBufferSize; + + struct _pitch_t + { + le_t x; + le_t y; + }; + + _pitch_t pitch[4]; +}; + +struct SceJpegSplitDecodeCtrl +{ + vm::lptr pStreamBuffer; + le_t streamBufferSize; + vm::lptr pWriteBuffer; + le_t writeBufferSize; + le_t isEndOfStream; + le_t decodeMode; + + SceJpegOutputInfo outputInfo; + + vm::lptr pOutputBuffer; + vm::lptr pCoefBuffer; + + le_t internalData[3]; +}; + +extern psv_log_base sceJpeg; diff --git a/rpcs3/Emu/ARMv7/Modules/sceJpegEnc.cpp b/rpcs3/Emu/ARMv7/Modules/sceJpegEnc.cpp index 690afd9e04..a66672fe69 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceJpegEnc.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceJpegEnc.cpp @@ -2,9 +2,7 @@ #include "Emu/System.h" #include "Emu/ARMv7/PSVFuncList.h" -extern psv_log_base sceJpegEnc; - -typedef vm::psv::ptr SceJpegEncoderContext; +#include "sceJpegEnc.h" s32 sceJpegEncoderGetContextSize() { @@ -16,7 +14,7 @@ s32 sceJpegEncoderInit( s32 iFrameWidth, s32 iFrameHeight, s32 pixelFormat, - vm::psv::ptr pJpeg, + vm::ptr pJpeg, u32 oJpegbufSize) { throw __FUNCTION__; @@ -24,7 +22,7 @@ s32 sceJpegEncoderInit( s32 sceJpegEncoderEncode( SceJpegEncoderContext context, - vm::psv::ptr pYCbCr) + vm::ptr pYCbCr) { throw __FUNCTION__; } @@ -58,7 +56,7 @@ s32 sceJpegEncoderSetHeaderMode( s32 sceJpegEncoderSetOutputAddr( SceJpegEncoderContext context, - vm::psv::ptr pJpeg, + vm::ptr pJpeg, u32 oJpegbufSize) { throw __FUNCTION__; @@ -66,8 +64,8 @@ s32 sceJpegEncoderSetOutputAddr( s32 sceJpegEncoderCsc( SceJpegEncoderContext context, - vm::psv::ptr pYCbCr, - vm::psv::ptr pRGBA, + vm::ptr pYCbCr, + vm::ptr pRGBA, s32 iFrameWidth, s32 inputPixelFormat) { @@ -82,6 +80,7 @@ psv_log_base sceJpegEnc("SceJpegEnc", []() sceJpegEnc.on_load = nullptr; sceJpegEnc.on_unload = nullptr; sceJpegEnc.on_stop = nullptr; + sceJpegEnc.on_error = nullptr; REG_FUNC(0x2B55844D, sceJpegEncoderGetContextSize); REG_FUNC(0x88DA92B4, sceJpegEncoderInit); diff --git a/rpcs3/Emu/ARMv7/Modules/sceJpegEnc.h b/rpcs3/Emu/ARMv7/Modules/sceJpegEnc.h new file mode 100644 index 0000000000..4a046f6f52 --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/sceJpegEnc.h @@ -0,0 +1,5 @@ +#pragma once + +using SceJpegEncoderContext = vm::ptr; + +extern psv_log_base sceJpegEnc; diff --git a/rpcs3/Emu/ARMv7/Modules/sceLibKernel.cpp b/rpcs3/Emu/ARMv7/Modules/sceLibKernel.cpp index 49f07e5509..3fccfec929 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceLibKernel.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceLibKernel.cpp @@ -13,8 +13,6 @@ #include "psv_mutex.h" #include "psv_cond.h" -#define RETURN_ERROR(code) { Emu.Pause(); sceLibKernel.Error("%s() failed: %s", __FUNCTION__, #code); return code; } - s32 sceKernelAllocMemBlock(vm::ptr name, s32 type, u32 vsize, vm::ptr pOpt) { throw __FUNCTION__; @@ -68,14 +66,14 @@ s32 sceKernelStartThread(s32 threadId, u32 argSize, vm::ptr pArgBloc if (!t) { - RETURN_ERROR(SCE_KERNEL_ERROR_INVALID_UID); + return SCE_KERNEL_ERROR_INVALID_UID; } // thread should be in DORMANT state, but it's not possible to check it correctly atm if (t->IsAlive()) { - RETURN_ERROR(SCE_KERNEL_ERROR_NOT_DORMANT); + return SCE_KERNEL_ERROR_NOT_DORMANT; } ARMv7Thread& thread = static_cast(*t); @@ -110,14 +108,14 @@ s32 sceKernelDeleteThread(s32 threadId) if (!t) { - RETURN_ERROR(SCE_KERNEL_ERROR_INVALID_UID); + return SCE_KERNEL_ERROR_INVALID_UID; } // thread should be in DORMANT state, but it's not possible to check it correctly atm if (t->IsAlive()) { - RETURN_ERROR(SCE_KERNEL_ERROR_NOT_DORMANT); + return SCE_KERNEL_ERROR_NOT_DORMANT; } Emu.GetCPU().RemoveThread(threadId); @@ -268,7 +266,7 @@ s32 sceKernelWaitThreadEnd(s32 threadId, vm::ptr pExitStatus, vm::ptr if (!t) { - RETURN_ERROR(SCE_KERNEL_ERROR_INVALID_UID); + return SCE_KERNEL_ERROR_INVALID_UID; } ARMv7Thread& thread = static_cast(*t); @@ -402,7 +400,7 @@ s32 sceKernelCreateEventFlag(vm::ptr pName, u32 attr, u32 initPatter return id; } - RETURN_ERROR(SCE_KERNEL_ERROR_ERROR); + return SCE_KERNEL_ERROR_ERROR; } s32 sceKernelDeleteEventFlag(s32 evfId) @@ -466,7 +464,7 @@ s32 sceKernelCreateSema(vm::ptr pName, u32 attr, s32 initCount, s32 return id; } - RETURN_ERROR(SCE_KERNEL_ERROR_ERROR); + return SCE_KERNEL_ERROR_ERROR; } s32 sceKernelDeleteSema(s32 semaId) @@ -477,12 +475,12 @@ s32 sceKernelDeleteSema(s32 semaId) if (!sema) { - RETURN_ERROR(SCE_KERNEL_ERROR_INVALID_UID); + return SCE_KERNEL_ERROR_INVALID_UID; } if (!g_psv_sema_list.remove(semaId)) { - RETURN_ERROR(SCE_KERNEL_ERROR_INVALID_UID); + return SCE_KERNEL_ERROR_INVALID_UID; } return SCE_OK; @@ -506,7 +504,7 @@ s32 sceKernelWaitSema(s32 semaId, s32 needCount, vm::ptr pTimeout) if (!sema) { - RETURN_ERROR(SCE_KERNEL_ERROR_INVALID_UID); + return SCE_KERNEL_ERROR_INVALID_UID; } sceLibKernel.Error("*** name = %s", sema->name); @@ -550,7 +548,7 @@ s32 sceKernelCreateMutex(vm::ptr pName, u32 attr, s32 initCount, vm: return id; } - RETURN_ERROR(SCE_KERNEL_ERROR_ERROR); + return SCE_KERNEL_ERROR_ERROR; } s32 sceKernelDeleteMutex(s32 mutexId) @@ -651,7 +649,7 @@ s32 sceKernelCreateCond(vm::ptr pName, u32 attr, s32 mutexId, vm::pt return id; } - RETURN_ERROR(SCE_KERNEL_ERROR_ERROR); + return SCE_KERNEL_ERROR_ERROR; } s32 sceKernelDeleteCond(s32 condId) @@ -1022,6 +1020,7 @@ psv_log_base sceLibKernel("sceLibKernel", []() sceLibKernel.on_load = nullptr; sceLibKernel.on_unload = nullptr; sceLibKernel.on_stop = nullptr; + //sceLibKernel.on_error = nullptr; // keep default error handler // REG_FUNC(???, sceKernelGetEventInfo); diff --git a/rpcs3/Emu/ARMv7/Modules/sceLibKernel.h b/rpcs3/Emu/ARMv7/Modules/sceLibKernel.h index 97cd650976..fba40f8964 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceLibKernel.h +++ b/rpcs3/Emu/ARMv7/Modules/sceLibKernel.h @@ -387,7 +387,7 @@ struct SceKernelCallbackInfo // Thread Manager definitions (events) -using SceKernelThreadEventHandler = func_def pCommon)>; +using SceKernelThreadEventHandler = func_def pCommon)>; struct SceKernelEventInfo { diff --git a/rpcs3/Emu/ARMv7/Modules/sceLibc.cpp b/rpcs3/Emu/ARMv7/Modules/sceLibc.cpp index d93e74af5f..a29f44dccf 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceLibc.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceLibc.cpp @@ -5,17 +5,15 @@ #include "Emu/ARMv7/ARMv7Thread.h" #include "Emu/ARMv7/ARMv7Callback.h" -extern psv_log_base sceLibc; +#include "sceLibc.h" -vm::psv::ptr g_dso; - -typedef void(atexit_func_t)(vm::psv::ptr); +vm::ptr g_dso; std::vector> g_atexit; std::mutex g_atexit_mutex; -std::string armv7_fmt(ARMv7Context& context, vm::psv::ptr fmt, u32 g_count, u32 f_count, u32 v_count) +std::string armv7_fmt(ARMv7Context& context, vm::cptr fmt, u32 g_count, u32 f_count, u32 v_count) { std::string result; @@ -130,7 +128,7 @@ std::string armv7_fmt(ARMv7Context& context, vm::psv::ptr fmt, u32 g case 's': { // string - auto string = vm::psv::ptr::make(context.get_next_gpr_arg(g_count, f_count, v_count)); + auto string = vm::cptr::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; @@ -151,7 +149,7 @@ std::string armv7_fmt(ARMv7Context& context, vm::psv::ptr fmt, u32 g namespace sce_libc_func { - void __cxa_atexit(vm::psv::ptr func, vm::psv::ptr arg, vm::psv::ptr dso) + void __cxa_atexit(vm::ptr func, vm::ptr arg, vm::ptr dso) { sceLibc.Warning("__cxa_atexit(func=*0x%x, arg=*0x%x, dso=*0x%x)", func, arg, dso); @@ -163,7 +161,7 @@ namespace sce_libc_func }); } - void __aeabi_atexit(vm::psv::ptr arg, vm::psv::ptr func, vm::psv::ptr dso) + void __aeabi_atexit(vm::ptr arg, vm::ptr func, vm::ptr dso) { sceLibc.Warning("__aeabi_atexit(arg=*0x%x, func=*0x%x, dso=*0x%x)", arg, func, dso); @@ -202,7 +200,7 @@ namespace sce_libc_func } } - void printf(ARMv7Context& context, vm::psv::ptr fmt) // va_args... + void printf(ARMv7Context& context, vm::cptr fmt) // va_args... { sceLibc.Warning("printf(fmt=*0x%x)", fmt); sceLibc.Log("*** *fmt = '%s'", fmt.get_ptr()); @@ -213,7 +211,7 @@ namespace sce_libc_func LOG_NOTICE(TTY, result); } - void sprintf(ARMv7Context& context, vm::psv::ptr str, vm::psv::ptr fmt) // va_args... + void sprintf(ARMv7Context& context, vm::ptr str, vm::cptr fmt) // va_args... { sceLibc.Warning("sprintf(str=*0x%x, fmt=*0x%x)", str, fmt); sceLibc.Log("*** *fmt = '%s'", fmt.get_ptr()); @@ -224,28 +222,28 @@ namespace sce_libc_func ::memcpy(str.get_ptr(), result.c_str(), result.size() + 1); } - void __cxa_set_dso_handle_main(vm::psv::ptr dso) + void __cxa_set_dso_handle_main(vm::ptr dso) { sceLibc.Warning("__cxa_set_dso_handle_main(dso=*0x%x)", dso); g_dso = dso; } - void memcpy(vm::psv::ptr dst, vm::psv::ptr src, u32 size) + void memcpy(vm::ptr dst, vm::cptr src, u32 size) { sceLibc.Warning("memcpy(dst=*0x%x, src=*0x%x, size=0x%x)", dst, src, size); ::memcpy(dst.get_ptr(), src.get_ptr(), size); } - void memset(vm::psv::ptr dst, s32 value, u32 size) + void memset(vm::ptr dst, s32 value, u32 size) { sceLibc.Warning("memset(dst=*0x%x, value=%d, size=0x%x)", dst, value, size); ::memset(dst.get_ptr(), value, size); } - void _Assert(ARMv7Context& context, vm::psv::ptr text, vm::psv::ptr func) + void _Assert(ARMv7Context& context, vm::cptr text, vm::cptr func) { sceLibc.Error("_Assert(text=*0x%x, func=*0x%x)", text, func); @@ -265,6 +263,7 @@ psv_log_base sceLibc("SceLibc", []() sceLibc.on_load = nullptr; sceLibc.on_unload = nullptr; sceLibc.on_stop = nullptr; + sceLibc.on_error = nullptr; REG_FUNC(0xE4531F85, _Assert); //REG_FUNC(0xE71C5CDE, _Stoul); diff --git a/rpcs3/Emu/ARMv7/Modules/sceLibc.h b/rpcs3/Emu/ARMv7/Modules/sceLibc.h new file mode 100644 index 0000000000..b09d575cf7 --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/sceLibc.h @@ -0,0 +1,5 @@ +#pragma once + +using atexit_func_t = func_def)>; + +extern psv_log_base sceLibc; diff --git a/rpcs3/Emu/ARMv7/Modules/sceLibm.cpp b/rpcs3/Emu/ARMv7/Modules/sceLibm.cpp index 0fc905e819..6bf914f617 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceLibm.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceLibm.cpp @@ -2,7 +2,7 @@ #include "Emu/System.h" #include "Emu/ARMv7/PSVFuncList.h" -extern psv_log_base sceLibm; +#include "sceLibm.h" namespace sce_libm_func { @@ -16,6 +16,7 @@ psv_log_base sceLibm("SceLibm", []() sceLibm.on_load = nullptr; sceLibm.on_unload = nullptr; sceLibm.on_stop = nullptr; + sceLibm.on_error = nullptr; //REG_FUNC(0xC73FE76D, _Exp); //REG_FUNC(0xFF4EAE04, _FExp); diff --git a/rpcs3/Emu/ARMv7/Modules/sceLibm.h b/rpcs3/Emu/ARMv7/Modules/sceLibm.h new file mode 100644 index 0000000000..1b0a58e4f6 --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/sceLibm.h @@ -0,0 +1,3 @@ +#pragma once + +extern psv_log_base sceLibm; diff --git a/rpcs3/Emu/ARMv7/Modules/sceLibstdcxx.cpp b/rpcs3/Emu/ARMv7/Modules/sceLibstdcxx.cpp index 263c0b3303..e7d26aa01c 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceLibstdcxx.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceLibstdcxx.cpp @@ -2,7 +2,7 @@ #include "Emu/System.h" #include "Emu/ARMv7/PSVFuncList.h" -extern psv_log_base sceLibstdcxx; +#include "sceLibstdcxx.h" namespace sce_libstdcxx_func { @@ -30,6 +30,7 @@ psv_log_base sceLibstdcxx("SceLibstdcxx", []() sceLibstdcxx.on_load = nullptr; sceLibstdcxx.on_unload = nullptr; sceLibstdcxx.on_stop = nullptr; + sceLibstdcxx.on_error = nullptr; //REG_FUNC(0x52B0C625, std::bad_typeid::what() const); //REG_FUNC(0x64D7D074, std::bad_typeid::_Doraise() const); diff --git a/rpcs3/Emu/ARMv7/Modules/sceLibstdcxx.h b/rpcs3/Emu/ARMv7/Modules/sceLibstdcxx.h new file mode 100644 index 0000000000..5ddc0e48f4 --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/sceLibstdcxx.h @@ -0,0 +1,3 @@ +#pragma once + +extern psv_log_base sceLibstdcxx; diff --git a/rpcs3/Emu/ARMv7/Modules/sceLiveArea.cpp b/rpcs3/Emu/ARMv7/Modules/sceLiveArea.cpp index 62eea18429..b43983de9c 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceLiveArea.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceLiveArea.cpp @@ -2,9 +2,9 @@ #include "Emu/System.h" #include "Emu/ARMv7/PSVFuncList.h" -extern psv_log_base sceLiveArea; +#include "sceLiveArea.h" -s32 sceLiveAreaResourceReplaceAll(vm::psv::ptr dirpath) +s32 sceLiveAreaResourceReplaceAll(vm::cptr dirpath) { throw __FUNCTION__; } @@ -21,6 +21,7 @@ psv_log_base sceLiveArea("SceLiveArea", []() sceLiveArea.on_load = nullptr; sceLiveArea.on_unload = nullptr; sceLiveArea.on_stop = nullptr; + sceLiveArea.on_error = nullptr; REG_FUNC(0xA4B506F9, sceLiveAreaResourceReplaceAll); REG_FUNC(0x54A395FB, sceLiveAreaResourceGetStatus); diff --git a/rpcs3/Emu/ARMv7/Modules/sceLiveArea.h b/rpcs3/Emu/ARMv7/Modules/sceLiveArea.h new file mode 100644 index 0000000000..fab4f795c2 --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/sceLiveArea.h @@ -0,0 +1,3 @@ +#pragma once + +extern psv_log_base sceLiveArea; diff --git a/rpcs3/Emu/ARMv7/Modules/sceLocation.cpp b/rpcs3/Emu/ARMv7/Modules/sceLocation.cpp index 8b61bca224..82c80b8b2d 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceLocation.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceLocation.cpp @@ -2,171 +2,89 @@ #include "Emu/System.h" #include "Emu/ARMv7/PSVFuncList.h" -extern psv_log_base sceLocation; +#include "sceLocation.h" -typedef u8 SceLocationHandle; - -enum SceLocationLocationMethod : s32 -{ - SCE_LOCATION_LMETHOD_NONE = 0, - SCE_LOCATION_LMETHOD_AGPS_AND_3G_AND_WIFI = 1, - SCE_LOCATION_LMETHOD_GPS_AND_WIFI = 2, - SCE_LOCATION_LMETHOD_WIFI = 3, - SCE_LOCATION_LMETHOD_3G = 4, - SCE_LOCATION_LMETHOD_GPS = 5 -}; - -enum SceLocationHeadingMethod : s32 -{ - SCE_LOCATION_HMETHOD_NONE = 0, - SCE_LOCATION_HMETHOD_AUTO = 1, - SCE_LOCATION_HMETHOD_VERTICAL = 2, - SCE_LOCATION_HMETHOD_HORIZONTAL = 3, - SCE_LOCATION_HMETHOD_CAMERA = 4 -}; - -enum SceLocationDialogStatus : s32 -{ - SCE_LOCATION_DIALOG_STATUS_IDLE = 0, - SCE_LOCATION_DIALOG_STATUS_RUNNING = 1, - SCE_LOCATION_DIALOG_STATUS_FINISHED = 2 -}; - -enum SceLocationDialogResult : s32 -{ - SCE_LOCATION_DIALOG_RESULT_NONE = 0, - SCE_LOCATION_DIALOG_RESULT_DISABLE = 1, - SCE_LOCATION_DIALOG_RESULT_ENABLE = 2 -}; - -enum SceLocationPermissionApplicationStatus : s32 -{ - SCE_LOCATION_PERMISSION_APPLICATION_NONE = 0, - SCE_LOCATION_PERMISSION_APPLICATION_INIT = 1, - SCE_LOCATION_PERMISSION_APPLICATION_DENY = 2, - SCE_LOCATION_PERMISSION_APPLICATION_ALLOW = 3 -}; - -enum SceLocationPermissionStatus : s32 -{ - SCE_LOCATION_PERMISSION_DENY = 0, - SCE_LOCATION_PERMISSION_ALLOW = 1 -}; - -struct SceLocationLocationInfo -{ - double latitude; - double longitude; - double altitude; - float accuracy; - float reserve; - float direction; - float speed; - u64 timestamp; -}; - -struct SceLocationHeadingInfo -{ - float trueHeading; - float headingVectorX; - float headingVectorY; - float headingVectorZ; - float reserve; - float reserve2; - u64 timestamp; -}; - -typedef vm::psv::ptr location, vm::psv::ptr userdata)> SceLocationLocationInfoCallback; -typedef vm::psv::ptr heading, vm::psv::ptr userdata)> SceLocationHeadingInfoCallback; - -struct SceLocationPermissionInfo -{ - SceLocationPermissionStatus parentalstatus; - SceLocationPermissionStatus mainstatus; - SceLocationPermissionApplicationStatus applicationstatus; -}; - -s32 sceLocationOpen(vm::psv::ptr handle, SceLocationLocationMethod lmethod, SceLocationHeadingMethod hmethod) +s32 sceLocationOpen(vm::ptr handle, SceLocationLocationMethod lmethod, SceLocationHeadingMethod hmethod) { throw __FUNCTION__; } -s32 sceLocationClose(SceLocationHandle handle) +s32 sceLocationClose(u8 handle) { throw __FUNCTION__; } -s32 sceLocationReopen(SceLocationHandle handle, SceLocationLocationMethod lmethod, SceLocationHeadingMethod hmethod) +s32 sceLocationReopen(u8 handle, SceLocationLocationMethod lmethod, SceLocationHeadingMethod hmethod) { throw __FUNCTION__; } -s32 sceLocationGetMethod(SceLocationHandle handle, vm::psv::ptr lmethod, vm::psv::ptr hmethod) +s32 sceLocationGetMethod(u8 handle, vm::ptr lmethod, vm::ptr hmethod) { throw __FUNCTION__; } -s32 sceLocationGetLocation(SceLocationHandle handle, vm::psv::ptr linfo) +s32 sceLocationGetLocation(u8 handle, vm::ptr linfo) { throw __FUNCTION__; } -s32 sceLocationCancelGetLocation(SceLocationHandle handle) +s32 sceLocationCancelGetLocation(u8 handle) { throw __FUNCTION__; } -s32 sceLocationStartLocationCallback(SceLocationHandle handle, u32 distance, SceLocationLocationInfoCallback callback, vm::psv::ptr userdata) +s32 sceLocationStartLocationCallback(u8 handle, u32 distance, vm::ptr callback, vm::ptr userdata) { throw __FUNCTION__; } -s32 sceLocationStopLocationCallback(SceLocationHandle handle) +s32 sceLocationStopLocationCallback(u8 handle) { throw __FUNCTION__; } -s32 sceLocationGetHeading(SceLocationHandle handle, vm::psv::ptr hinfo) +s32 sceLocationGetHeading(u8 handle, vm::ptr hinfo) { throw __FUNCTION__; } -s32 sceLocationStartHeadingCallback(SceLocationHandle handle, u32 difference, SceLocationHeadingInfoCallback callback, vm::psv::ptr userdata) +s32 sceLocationStartHeadingCallback(u8 handle, u32 difference, vm::ptr callback, vm::ptr userdata) { throw __FUNCTION__; } -s32 sceLocationStopHeadingCallback(SceLocationHandle handle) +s32 sceLocationStopHeadingCallback(u8 handle) { throw __FUNCTION__; } -s32 sceLocationConfirm(SceLocationHandle handle) +s32 sceLocationConfirm(u8 handle) { throw __FUNCTION__; } -s32 sceLocationConfirmGetStatus(SceLocationHandle handle, vm::psv::ptr status) +s32 sceLocationConfirmGetStatus(u8 handle, vm::ptr status) { throw __FUNCTION__; } -s32 sceLocationConfirmGetResult(SceLocationHandle handle, vm::psv::ptr result) +s32 sceLocationConfirmGetResult(u8 handle, vm::ptr result) { throw __FUNCTION__; } -s32 sceLocationConfirmAbort(SceLocationHandle handle) +s32 sceLocationConfirmAbort(u8 handle) { throw __FUNCTION__; } -s32 sceLocationGetPermission(SceLocationHandle handle, vm::psv::ptr info) +s32 sceLocationGetPermission(u8 handle, vm::ptr info) { throw __FUNCTION__; } -s32 sceLocationSetGpsEmulationFile(vm::psv::ptr filename) +s32 sceLocationSetGpsEmulationFile(vm::ptr filename) { throw __FUNCTION__; } @@ -179,6 +97,7 @@ psv_log_base sceLocation("SceLibLocation", []() sceLocation.on_load = nullptr; sceLocation.on_unload = nullptr; sceLocation.on_stop = nullptr; + sceLocation.on_error = nullptr; REG_FUNC(0xDD271661, sceLocationOpen); REG_FUNC(0x14FE76E8, sceLocationClose); diff --git a/rpcs3/Emu/ARMv7/Modules/sceLocation.h b/rpcs3/Emu/ARMv7/Modules/sceLocation.h new file mode 100644 index 0000000000..08253563bd --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/sceLocation.h @@ -0,0 +1,83 @@ +#pragma once + +enum SceLocationLocationMethod : s32 +{ + SCE_LOCATION_LMETHOD_NONE = 0, + SCE_LOCATION_LMETHOD_AGPS_AND_3G_AND_WIFI = 1, + SCE_LOCATION_LMETHOD_GPS_AND_WIFI = 2, + SCE_LOCATION_LMETHOD_WIFI = 3, + SCE_LOCATION_LMETHOD_3G = 4, + SCE_LOCATION_LMETHOD_GPS = 5 +}; + +enum SceLocationHeadingMethod : s32 +{ + SCE_LOCATION_HMETHOD_NONE = 0, + SCE_LOCATION_HMETHOD_AUTO = 1, + SCE_LOCATION_HMETHOD_VERTICAL = 2, + SCE_LOCATION_HMETHOD_HORIZONTAL = 3, + SCE_LOCATION_HMETHOD_CAMERA = 4 +}; + +enum SceLocationDialogStatus : s32 +{ + SCE_LOCATION_DIALOG_STATUS_IDLE = 0, + SCE_LOCATION_DIALOG_STATUS_RUNNING = 1, + SCE_LOCATION_DIALOG_STATUS_FINISHED = 2 +}; + +enum SceLocationDialogResult : s32 +{ + SCE_LOCATION_DIALOG_RESULT_NONE = 0, + SCE_LOCATION_DIALOG_RESULT_DISABLE = 1, + SCE_LOCATION_DIALOG_RESULT_ENABLE = 2 +}; + +enum SceLocationPermissionApplicationStatus : s32 +{ + SCE_LOCATION_PERMISSION_APPLICATION_NONE = 0, + SCE_LOCATION_PERMISSION_APPLICATION_INIT = 1, + SCE_LOCATION_PERMISSION_APPLICATION_DENY = 2, + SCE_LOCATION_PERMISSION_APPLICATION_ALLOW = 3 +}; + +enum SceLocationPermissionStatus : s32 +{ + SCE_LOCATION_PERMISSION_DENY = 0, + SCE_LOCATION_PERMISSION_ALLOW = 1 +}; + +struct SceLocationLocationInfo +{ + le_t latitude; + le_t longitude; + le_t altitude; + le_t accuracy; + le_t reserve; + le_t direction; + le_t speed; + le_t timestamp; +}; + +struct SceLocationHeadingInfo +{ + le_t trueHeading; + le_t headingVectorX; + le_t headingVectorY; + le_t headingVectorZ; + le_t reserve; + le_t reserve2; + le_t timestamp; +}; + +using SceLocationLocationInfoCallback = func_def location, vm::ptr userdata)>; +using SceLocationHeadingInfoCallback = func_def heading, vm::ptr userdata)>; + +struct SceLocationPermissionInfo +{ + SceLocationPermissionStatus parentalstatus; + SceLocationPermissionStatus mainstatus; + SceLocationPermissionApplicationStatus applicationstatus; +}; + +extern psv_log_base sceLocation; diff --git a/rpcs3/Emu/ARMv7/Modules/sceMd5.cpp b/rpcs3/Emu/ARMv7/Modules/sceMd5.cpp index d31e193e81..476ac2ec67 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceMd5.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceMd5.cpp @@ -2,35 +2,24 @@ #include "Emu/System.h" #include "Emu/ARMv7/PSVFuncList.h" -extern psv_log_base sceMd5; +#include "sceMd5.h" -struct SceMd5Context -{ - u32 h[4]; - u32 pad; - u16 usRemains; - u16 usComputed; - u64 ullTotalLen; - u8 buf[64]; - u8 result[64]; -}; - -s32 sceMd5Digest(vm::psv::ptr plain, u32 len, vm::psv::ptr digest) +s32 sceMd5Digest(vm::ptr plain, u32 len, vm::ptr digest) { throw __FUNCTION__; } -s32 sceMd5BlockInit(vm::psv::ptr pContext) +s32 sceMd5BlockInit(vm::ptr pContext) { throw __FUNCTION__; } -s32 sceMd5BlockUpdate(vm::psv::ptr pContext, vm::psv::ptr plain, u32 len) +s32 sceMd5BlockUpdate(vm::ptr pContext, vm::ptr plain, u32 len) { throw __FUNCTION__; } -s32 sceMd5BlockResult(vm::psv::ptr pContext, vm::psv::ptr digest) +s32 sceMd5BlockResult(vm::ptr pContext, vm::ptr digest) { throw __FUNCTION__; } @@ -42,6 +31,7 @@ psv_log_base sceMd5("SceMd5", []() sceMd5.on_load = nullptr; sceMd5.on_unload = nullptr; sceMd5.on_stop = nullptr; + sceMd5.on_error = nullptr; REG_FUNC(0xB845BCCB, sceMd5Digest); REG_FUNC(0x4D6436F9, sceMd5BlockInit); diff --git a/rpcs3/Emu/ARMv7/Modules/sceMd5.h b/rpcs3/Emu/ARMv7/Modules/sceMd5.h new file mode 100644 index 0000000000..27b1ba9879 --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/sceMd5.h @@ -0,0 +1,14 @@ +#pragma once + +struct SceMd5Context +{ + le_t h[4]; + le_t pad; + le_t usRemains; + le_t usComputed; + le_t ullTotalLen; + u8 buf[64]; + u8 result[64]; +}; + +extern psv_log_base sceMd5; diff --git a/rpcs3/Emu/ARMv7/Modules/sceMotion.cpp b/rpcs3/Emu/ARMv7/Modules/sceMotion.cpp index 4128c78a65..63da5aaeef 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceMotion.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceMotion.cpp @@ -2,54 +2,27 @@ #include "Emu/System.h" #include "Emu/ARMv7/PSVFuncList.h" -extern psv_log_base sceMotion; +#include "sceMotion.h" -struct SceMotionState -{ - u32 timestamp; - SceFVector3 acceleration; - SceFVector3 angularVelocity; - u8 reserve1[12]; - SceFQuaternion deviceQuat; - SceUMatrix4 rotationMatrix; - SceUMatrix4 nedMatrix; - u8 reserve2[4]; - SceFVector3 basicOrientation; - u64 hostTimestamp; - u8 reserve3[40]; -}; - -struct SceMotionSensorState -{ - SceFVector3 accelerometer; - SceFVector3 gyro; - u8 reserve1[12]; - u32 timestamp; - u32 counter; - u8 reserve2[4]; - u64 hostTimestamp; - u8 reserve3[8]; -}; - -s32 sceMotionGetState(vm::psv::ptr motionState) +s32 sceMotionGetState(vm::ptr motionState) { throw __FUNCTION__; } -s32 sceMotionGetSensorState(vm::psv::ptr sensorState, s32 numRecords) +s32 sceMotionGetSensorState(vm::ptr sensorState, s32 numRecords) { throw __FUNCTION__; } -s32 sceMotionGetBasicOrientation(vm::psv::ptr basicOrientation) +s32 sceMotionGetBasicOrientation(vm::ptr basicOrientation) { throw __FUNCTION__; } -//s32 sceMotionRotateYaw(const float radians) -//{ -// throw __FUNCTION__; -//} +s32 sceMotionRotateYaw(const float radians) +{ + throw __FUNCTION__; +} s32 sceMotionGetTiltCorrection() { @@ -71,15 +44,15 @@ s32 sceMotionSetDeadband(s32 setValue) throw __FUNCTION__; } -//s32 sceMotionSetAngleThreshold(const float angle) -//{ -// throw __FUNCTION__; -//} +s32 sceMotionSetAngleThreshold(const float angle) +{ + throw __FUNCTION__; +} -//float sceMotionGetAngleThreshold() -//{ -// throw __FUNCTION__; -//} +float sceMotionGetAngleThreshold() +{ + throw __FUNCTION__; +} s32 sceMotionReset() { @@ -118,6 +91,7 @@ psv_log_base sceMotion("SceMotion", []() sceMotion.on_load = nullptr; sceMotion.on_unload = nullptr; sceMotion.on_stop = nullptr; + sceMotion.on_error = nullptr; REG_FUNC(0xBDB32767, sceMotionGetState); REG_FUNC(0x47D679EA, sceMotionGetSensorState); diff --git a/rpcs3/Emu/ARMv7/Modules/sceMotion.h b/rpcs3/Emu/ARMv7/Modules/sceMotion.h new file mode 100644 index 0000000000..7f1b986758 --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/sceMotion.h @@ -0,0 +1,30 @@ +#pragma once + +struct SceMotionState +{ + le_t timestamp; + SceFVector3 acceleration; + SceFVector3 angularVelocity; + u8 reserve1[12]; + SceFQuaternion deviceQuat; + SceUMatrix4 rotationMatrix; + SceUMatrix4 nedMatrix; + u8 reserve2[4]; + SceFVector3 basicOrientation; + le_t hostTimestamp; + u8 reserve3[40]; +}; + +struct SceMotionSensorState +{ + SceFVector3 accelerometer; + SceFVector3 gyro; + u8 reserve1[12]; + le_t timestamp; + le_t counter; + u8 reserve2[4]; + le_t hostTimestamp; + u8 reserve3[8]; +}; + +extern psv_log_base sceMotion; diff --git a/rpcs3/Emu/ARMv7/Modules/sceMt19937.cpp b/rpcs3/Emu/ARMv7/Modules/sceMt19937.cpp index 6a125206ec..a7689c49db 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceMt19937.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceMt19937.cpp @@ -2,20 +2,14 @@ #include "Emu/System.h" #include "Emu/ARMv7/PSVFuncList.h" -extern psv_log_base sceMt19937; +#include "sceMt19937.h" -struct SceMt19937Context -{ - u32 count; - u32 state[624]; -}; - -s32 sceMt19937Init(vm::psv::ptr pCtx, u32 seed) +s32 sceMt19937Init(vm::ptr pCtx, u32 seed) { throw __FUNCTION__; } -u32 sceMt19937UInt(vm::psv::ptr pCtx) +u32 sceMt19937UInt(vm::ptr pCtx) { throw __FUNCTION__; } @@ -28,6 +22,7 @@ psv_log_base sceMt19937("SceMt19937", []() sceMt19937.on_load = nullptr; sceMt19937.on_unload = nullptr; sceMt19937.on_stop = nullptr; + sceMt19937.on_error = nullptr; REG_FUNC(0xEE5BA27C, sceMt19937Init); REG_FUNC(0x29E43BB5, sceMt19937UInt); diff --git a/rpcs3/Emu/ARMv7/Modules/sceMt19937.h b/rpcs3/Emu/ARMv7/Modules/sceMt19937.h new file mode 100644 index 0000000000..b647a670a8 --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/sceMt19937.h @@ -0,0 +1,9 @@ +#pragma once + +struct SceMt19937Context +{ + le_t count; + le_t state[624]; +}; + +extern psv_log_base sceMt19937; diff --git a/rpcs3/Emu/ARMv7/Modules/sceNet.cpp b/rpcs3/Emu/ARMv7/Modules/sceNet.cpp index 347ba76df5..619eb12eef 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceNet.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceNet.cpp @@ -4,7 +4,7 @@ #include "sceNet.h" -s32 sceNetSetDnsInfo(vm::psv::ptr info, s32 flags) +s32 sceNetSetDnsInfo(vm::ptr info, s32 flags) { throw __FUNCTION__; } @@ -14,12 +14,12 @@ s32 sceNetClearDnsCache(s32 flags) throw __FUNCTION__; } -s32 sceNetDumpCreate(vm::psv::ptr name, s32 len, s32 flags) +s32 sceNetDumpCreate(vm::ptr name, s32 len, s32 flags) { throw __FUNCTION__; } -s32 sceNetDumpRead(s32 id, vm::psv::ptr buf, s32 len, vm::psv::ptr pflags) +s32 sceNetDumpRead(s32 id, vm::ptr buf, s32 len, vm::ptr pflags) { throw __FUNCTION__; } @@ -34,22 +34,22 @@ s32 sceNetDumpAbort(s32 id, s32 flags) throw __FUNCTION__; } -s32 sceNetEpollCreate(vm::psv::ptr name, s32 flags) +s32 sceNetEpollCreate(vm::ptr name, s32 flags) { throw __FUNCTION__; } -s32 sceNetEpollControl(s32 eid, s32 op, s32 id, vm::psv::ptr event) +s32 sceNetEpollControl(s32 eid, s32 op, s32 id, vm::ptr event) { throw __FUNCTION__; } -s32 sceNetEpollWait(s32 eid, vm::psv::ptr events, s32 maxevents, s32 timeout) +s32 sceNetEpollWait(s32 eid, vm::ptr events, s32 maxevents, s32 timeout) { throw __FUNCTION__; } -s32 sceNetEpollWaitCB(s32 eid, vm::psv::ptr events, s32 maxevents, s32 timeout) +s32 sceNetEpollWaitCB(s32 eid, vm::ptr events, s32 maxevents, s32 timeout) { throw __FUNCTION__; } @@ -64,32 +64,32 @@ s32 sceNetEpollAbort(s32 eid, s32 flags) throw __FUNCTION__; } -vm::psv::ptr sceNetErrnoLoc() +vm::ptr sceNetErrnoLoc() { throw __FUNCTION__; } -s32 sceNetEtherStrton(vm::psv::ptr str, vm::psv::ptr n) +s32 sceNetEtherStrton(vm::ptr str, vm::ptr n) { throw __FUNCTION__; } -s32 sceNetEtherNtostr(vm::psv::ptr n, vm::psv::ptr str, u32 len) +s32 sceNetEtherNtostr(vm::ptr n, vm::ptr str, u32 len) { throw __FUNCTION__; } -s32 sceNetGetMacAddress(vm::psv::ptr addr, s32 flags) +s32 sceNetGetMacAddress(vm::ptr addr, s32 flags) { throw __FUNCTION__; } -vm::psv::ptr sceNetInetNtop(s32 af, vm::psv::ptr src, vm::psv::ptr dst, SceNetSocklen_t size) +vm::ptr sceNetInetNtop(s32 af, vm::ptr src, vm::ptr dst, SceNetSocklen_t size) { throw __FUNCTION__; } -s32 sceNetInetPton(s32 af, vm::psv::ptr src, vm::psv::ptr dst) +s32 sceNetInetPton(s32 af, vm::ptr src, vm::ptr dst) { throw __FUNCTION__; } @@ -124,7 +124,7 @@ u16 sceNetNtohs(u16 net16) throw __FUNCTION__; } -s32 sceNetInit(vm::psv::ptr param) +s32 sceNetInit(vm::ptr param) { throw __FUNCTION__; } @@ -149,32 +149,32 @@ s32 sceNetShowNetstat() throw __FUNCTION__; } -s32 sceNetEmulationSet(vm::psv::ptr param, s32 flags) +s32 sceNetEmulationSet(vm::ptr param, s32 flags) { throw __FUNCTION__; } -s32 sceNetEmulationGet(vm::psv::ptr param, s32 flags) +s32 sceNetEmulationGet(vm::ptr param, s32 flags) { throw __FUNCTION__; } -s32 sceNetResolverCreate(vm::psv::ptr name, vm::psv::ptr param, s32 flags) +s32 sceNetResolverCreate(vm::ptr name, vm::ptr param, s32 flags) { throw __FUNCTION__; } -s32 sceNetResolverStartNtoa(s32 rid, vm::psv::ptr hostname, vm::psv::ptr addr, s32 timeout, s32 retry, s32 flags) +s32 sceNetResolverStartNtoa(s32 rid, vm::ptr hostname, vm::ptr addr, s32 timeout, s32 retry, s32 flags) { throw __FUNCTION__; } -s32 sceNetResolverStartAton(s32 rid, vm::psv::ptr addr, vm::psv::ptr hostname, s32 len, s32 timeout, s32 retry, s32 flags) +s32 sceNetResolverStartAton(s32 rid, vm::ptr addr, vm::ptr hostname, s32 len, s32 timeout, s32 retry, s32 flags) { throw __FUNCTION__; } -s32 sceNetResolverGetError(s32 rid, vm::psv::ptr result) +s32 sceNetResolverGetError(s32 rid, vm::ptr result) { throw __FUNCTION__; } @@ -189,37 +189,37 @@ s32 sceNetResolverAbort(s32 rid, s32 flags) throw __FUNCTION__; } -s32 sceNetSocket(vm::psv::ptr name, s32 domain, s32 type, s32 protocol) +s32 sceNetSocket(vm::ptr name, s32 domain, s32 type, s32 protocol) { throw __FUNCTION__; } -s32 sceNetAccept(s32 s, vm::psv::ptr addr, vm::psv::ptr addrlen) +s32 sceNetAccept(s32 s, vm::ptr addr, vm::ptr addrlen) { throw __FUNCTION__; } -s32 sceNetBind(s32 s, vm::psv::ptr addr, SceNetSocklen_t addrlen) +s32 sceNetBind(s32 s, vm::ptr addr, SceNetSocklen_t addrlen) { throw __FUNCTION__; } -s32 sceNetConnect(s32 s, vm::psv::ptr name, SceNetSocklen_t namelen) +s32 sceNetConnect(s32 s, vm::ptr name, SceNetSocklen_t namelen) { throw __FUNCTION__; } -s32 sceNetGetpeername(s32 s, vm::psv::ptr name, vm::psv::ptr namelen) +s32 sceNetGetpeername(s32 s, vm::ptr name, vm::ptr namelen) { throw __FUNCTION__; } -s32 sceNetGetsockname(s32 s, vm::psv::ptr name, vm::psv::ptr namelen) +s32 sceNetGetsockname(s32 s, vm::ptr name, vm::ptr namelen) { throw __FUNCTION__; } -s32 sceNetGetsockopt(s32 s, s32 level, s32 optname, vm::psv::ptr optval, vm::psv::ptr optlen) +s32 sceNetGetsockopt(s32 s, s32 level, s32 optname, vm::ptr optval, vm::ptr optlen) { throw __FUNCTION__; } @@ -229,37 +229,37 @@ s32 sceNetListen(s32 s, s32 backlog) throw __FUNCTION__; } -s32 sceNetRecv(s32 s, vm::psv::ptr buf, u32 len, s32 flags) +s32 sceNetRecv(s32 s, vm::ptr buf, u32 len, s32 flags) { throw __FUNCTION__; } -s32 sceNetRecvfrom(s32 s, vm::psv::ptr buf, u32 len, s32 flags, vm::psv::ptr from, vm::psv::ptr fromlen) +s32 sceNetRecvfrom(s32 s, vm::ptr buf, u32 len, s32 flags, vm::ptr from, vm::ptr fromlen) { throw __FUNCTION__; } -s32 sceNetRecvmsg(s32 s, vm::psv::ptr msg, s32 flags) +s32 sceNetRecvmsg(s32 s, vm::ptr msg, s32 flags) { throw __FUNCTION__; } -s32 sceNetSend(s32 s, vm::psv::ptr msg, u32 len, s32 flags) +s32 sceNetSend(s32 s, vm::ptr msg, u32 len, s32 flags) { throw __FUNCTION__; } -s32 sceNetSendto(s32 s, vm::psv::ptr msg, u32 len, s32 flags, vm::psv::ptr to, SceNetSocklen_t tolen) +s32 sceNetSendto(s32 s, vm::ptr msg, u32 len, s32 flags, vm::ptr to, SceNetSocklen_t tolen) { throw __FUNCTION__; } -s32 sceNetSendmsg(s32 s, vm::psv::ptr msg, s32 flags) +s32 sceNetSendmsg(s32 s, vm::ptr msg, s32 flags) { throw __FUNCTION__; } -s32 sceNetSetsockopt(s32 s, s32 level, s32 optname, vm::psv::ptr optval, SceNetSocklen_t optlen) +s32 sceNetSetsockopt(s32 s, s32 level, s32 optname, vm::ptr optval, SceNetSocklen_t optlen) { throw __FUNCTION__; } @@ -279,17 +279,17 @@ s32 sceNetSocketAbort(s32 s, s32 flags) throw __FUNCTION__; } -s32 sceNetGetSockInfo(s32 s, vm::psv::ptr info, s32 n, s32 flags) +s32 sceNetGetSockInfo(s32 s, vm::ptr info, s32 n, s32 flags) { throw __FUNCTION__; } -s32 sceNetGetSockIdInfo(vm::psv::ptr fds, s32 sockinfoflags, s32 flags) +s32 sceNetGetSockIdInfo(vm::ptr fds, s32 sockinfoflags, s32 flags) { throw __FUNCTION__; } -s32 sceNetGetStatisticsInfo(vm::psv::ptr info, s32 flags) +s32 sceNetGetStatisticsInfo(vm::ptr info, s32 flags) { throw __FUNCTION__; } @@ -302,6 +302,7 @@ psv_log_base sceNet("SceNet", []() sceNet.on_load = nullptr; sceNet.on_unload = nullptr; sceNet.on_stop = nullptr; + sceNet.on_error = nullptr; REG_FUNC(0xD62EF218, sceNetSetDnsInfo); REG_FUNC(0xFEC1166D, sceNetClearDnsCache); diff --git a/rpcs3/Emu/ARMv7/Modules/sceNet.h b/rpcs3/Emu/ARMv7/Modules/sceNet.h index 6dc25e1ea9..37548dc287 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceNet.h +++ b/rpcs3/Emu/ARMv7/Modules/sceNet.h @@ -1,22 +1,19 @@ #pragma once -typedef u32 SceNetInAddr_t; -typedef u16 SceNetInPort_t; -typedef u8 SceNetSaFamily_t; typedef u32 SceNetSocklen_t; struct SceNetInAddr { - SceNetInAddr_t s_addr; + le_t s_addr; }; struct SceNetSockaddrIn { u8 sin_len; - SceNetSaFamily_t sin_family; - SceNetInPort_t sin_port; + u8 sin_family; + le_t sin_port; SceNetInAddr sin_addr; - SceNetInPort_t sin_vport; + le_t sin_vport; char sin_zero[6]; }; @@ -28,34 +25,34 @@ struct SceNetDnsInfo struct SceNetSockaddr { u8 sa_len; - SceNetSaFamily_t sa_family; + u8 sa_family; char sa_data[14]; }; struct SceNetEpollDataExt { - s32 id; - u32 data; + le_t id; + le_t data; }; union SceNetEpollData { - vm::psv::ptr ptr; - s32 fd; - u32 _u32; - u64 _u64; + vm::lptr ptr; + le_t fd; + le_t _u32; + le_t _u64; SceNetEpollDataExt ext; }; struct SceNetEpollSystemData { - u32 system[4]; + le_t system[4]; }; struct SceNetEpollEvent { - u32 events; - u32 reserved; + le_t events; + le_t reserved; SceNetEpollSystemData system; SceNetEpollData data; }; @@ -80,108 +77,106 @@ struct SceNetIpMreq struct SceNetInitParam { - vm::psv::ptr memory; - s32 size; - s32 flags; + vm::lptr memory; + le_t size; + le_t flags; }; struct SceNetEmulationData { - u16 drop_rate; - u16 drop_duration; - u16 pass_duration; - u16 delay_time; - u16 delay_jitter; - u16 order_rate; - u16 order_delay_time; - u16 duplication_rate; - u32 bps_limit; - u16 lower_size_limit; - u16 upper_size_limit; - u32 system_policy_pattern; - u32 game_policy_pattern; - u16 policy_flags[64]; + le_t drop_rate; + le_t drop_duration; + le_t pass_duration; + le_t delay_time; + le_t delay_jitter; + le_t order_rate; + le_t order_delay_time; + le_t duplication_rate; + le_t bps_limit; + le_t lower_size_limit; + le_t upper_size_limit; + le_t system_policy_pattern; + le_t game_policy_pattern; + le_t policy_flags[64]; u8 reserved[64]; }; struct SceNetEmulationParam { - u16 version; - u16 option_number; - u16 current_version; - u16 result; - u32 flags; - u32 reserved1; + le_t version; + le_t option_number; + le_t current_version; + le_t result; + le_t flags; + le_t reserved1; SceNetEmulationData send; SceNetEmulationData recv; - u32 seed; + le_t seed; u8 reserved[44]; }; -typedef vm::psv::ptr(u32 size, s32 rid, vm::psv::ptr name, vm::psv::ptr user)> SceNetResolverFunctionAllocate; - -typedef vm::psv::ptr ptr, s32 rid, vm::psv::ptr name, vm::psv::ptr user)> SceNetResolverFunctionFree; +using SceNetResolverFunctionAllocate = func_def(u32 size, s32 rid, vm::cptr name, vm::ptr user)>; +using SceNetResolverFunctionFree = func_def ptr, s32 rid, vm::cptr name, vm::ptr user)>; struct SceNetResolverParam { - SceNetResolverFunctionAllocate allocate; - SceNetResolverFunctionFree free; - vm::psv::ptr user; + vm::lptr allocate; + vm::lptr free; + vm::lptr user; }; struct SceNetLinger { - s32 l_onoff; - s32 l_linger; + le_t l_onoff; + le_t l_linger; }; struct SceNetIovec { - vm::psv::ptr iov_base; - u32 iov_len; + vm::lptr iov_base; + le_t iov_len; }; struct SceNetMsghdr { - vm::psv::ptr msg_name; - SceNetSocklen_t msg_namelen; - vm::psv::ptr msg_iov; - s32 msg_iovlen; - vm::psv::ptr msg_control; - SceNetSocklen_t msg_controllen; - s32 msg_flags; + vm::lptr msg_name; + le_t msg_namelen; + vm::lptr msg_iov; + le_t msg_iovlen; + vm::lptr msg_control; + le_t msg_controllen; + le_t msg_flags; }; struct SceNetSockInfo { char name[32]; - s32 pid; - s32 s; + le_t pid; + le_t s; s8 socket_type; s8 policy; - s16 reserved16; - s32 recv_queue_length; - s32 send_queue_length; + le_t reserved16; + le_t recv_queue_length; + le_t send_queue_length; SceNetInAddr local_adr; SceNetInAddr remote_adr; - SceNetInPort_t local_port; - SceNetInPort_t remote_port; - SceNetInPort_t local_vport; - SceNetInPort_t remote_vport; - s32 state; - s32 flags; - s32 reserved[8]; + le_t local_port; + le_t remote_port; + le_t local_vport; + le_t remote_vport; + le_t state; + le_t flags; + le_t reserved[8]; }; struct SceNetStatisticsInfo { - s32 kernel_mem_free_size; - s32 kernel_mem_free_min; - s32 packet_count; - s32 packet_qos_count; - s32 libnet_mem_free_size; - s32 libnet_mem_free_min; + le_t kernel_mem_free_size; + le_t kernel_mem_free_min; + le_t packet_count; + le_t packet_qos_count; + le_t libnet_mem_free_size; + le_t libnet_mem_free_min; }; - extern psv_log_base sceNet; diff --git a/rpcs3/Emu/ARMv7/Modules/sceNetCtl.cpp b/rpcs3/Emu/ARMv7/Modules/sceNetCtl.cpp index 7f15d6bf1f..800ffd0691 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceNetCtl.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceNetCtl.cpp @@ -2,51 +2,7 @@ #include "Emu/System.h" #include "Emu/ARMv7/PSVFuncList.h" -#include "sceNet.h" - -extern psv_log_base sceNetCtl; - -union SceNetCtlInfo -{ - char cnf_name[65]; - u32 device; - SceNetEtherAddr ether_addr; - u32 mtu; - u32 link; - SceNetEtherAddr bssid; - char ssid[33]; - u32 wifi_security; - u32 rssi_dbm; - u32 rssi_percentage; - u32 channel; - u32 ip_config; - char dhcp_hostname[256]; - char pppoe_auth_name[128]; - char ip_address[16]; - char netmask[16]; - char default_route[16]; - char primary_dns[16]; - char secondary_dns[16]; - u32 http_proxy_config; - char http_proxy_server[256]; - u32 http_proxy_port; -}; - -struct SceNetCtlNatInfo -{ - u32 size; - s32 stun_status; - s32 nat_type; - SceNetInAddr mapped_addr; -}; - -struct SceNetCtlAdhocPeerInfo -{ - vm::psv::ptr next; - SceNetInAddr inet_addr; -}; - -typedef vm::psv::ptr arg)> SceNetCtlCallback; +#include "sceNetCtl.h" s32 sceNetCtlInit() { @@ -63,32 +19,32 @@ s32 sceNetCtlCheckCallback() throw __FUNCTION__; } -s32 sceNetCtlInetGetResult(s32 eventType, vm::psv::ptr errorCode) +s32 sceNetCtlInetGetResult(s32 eventType, vm::ptr errorCode) { throw __FUNCTION__; } -s32 sceNetCtlAdhocGetResult(s32 eventType, vm::psv::ptr errorCode) +s32 sceNetCtlAdhocGetResult(s32 eventType, vm::ptr errorCode) { throw __FUNCTION__; } -s32 sceNetCtlInetGetInfo(s32 code, vm::psv::ptr info) +s32 sceNetCtlInetGetInfo(s32 code, vm::ptr info) { throw __FUNCTION__; } -s32 sceNetCtlInetGetState(vm::psv::ptr state) +s32 sceNetCtlInetGetState(vm::ptr state) { throw __FUNCTION__; } -s32 sceNetCtlGetNatInfo(vm::psv::ptr natinfo) +s32 sceNetCtlGetNatInfo(vm::ptr natinfo) { throw __FUNCTION__; } -s32 sceNetCtlInetRegisterCallback(SceNetCtlCallback func, vm::psv::ptr arg, vm::psv::ptr cid) +s32 sceNetCtlInetRegisterCallback(vm::ptr func, vm::ptr arg, vm::ptr cid) { throw __FUNCTION__; } @@ -98,7 +54,7 @@ s32 sceNetCtlInetUnregisterCallback(s32 cid) throw __FUNCTION__; } -s32 sceNetCtlAdhocRegisterCallback(SceNetCtlCallback func, vm::psv::ptr arg, vm::psv::ptr cid) +s32 sceNetCtlAdhocRegisterCallback(vm::ptr func, vm::ptr arg, vm::ptr cid) { throw __FUNCTION__; } @@ -108,7 +64,7 @@ s32 sceNetCtlAdhocUnregisterCallback(s32 cid) throw __FUNCTION__; } -s32 sceNetCtlAdhocGetState(vm::psv::ptr state) +s32 sceNetCtlAdhocGetState(vm::ptr state) { throw __FUNCTION__; } @@ -118,12 +74,12 @@ s32 sceNetCtlAdhocDisconnect() throw __FUNCTION__; } -s32 sceNetCtlAdhocGetPeerList(vm::psv::ptr buflen, vm::psv::ptr buf) +s32 sceNetCtlAdhocGetPeerList(vm::ptr buflen, vm::ptr buf) { throw __FUNCTION__; } -s32 sceNetCtlAdhocGetInAddr(vm::psv::ptr inaddr) +s32 sceNetCtlAdhocGetInAddr(vm::ptr inaddr) { throw __FUNCTION__; } @@ -135,6 +91,7 @@ psv_log_base sceNetCtl("SceNetCtl", []() sceNetCtl.on_load = nullptr; sceNetCtl.on_unload = nullptr; sceNetCtl.on_stop = nullptr; + sceNetCtl.on_error = nullptr; REG_FUNC(0x495CA1DB, sceNetCtlInit); REG_FUNC(0xCD188648, sceNetCtlTerm); diff --git a/rpcs3/Emu/ARMv7/Modules/sceNetCtl.h b/rpcs3/Emu/ARMv7/Modules/sceNetCtl.h new file mode 100644 index 0000000000..864194c30b --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/sceNetCtl.h @@ -0,0 +1,47 @@ +#pragma once + +#include "sceNet.h" + +union SceNetCtlInfo +{ + char cnf_name[65]; + le_t device; + SceNetEtherAddr ether_addr; + le_t mtu; + le_t link; + SceNetEtherAddr bssid; + char ssid[33]; + le_t wifi_security; + le_t rssi_dbm; + le_t rssi_percentage; + le_t channel; + le_t ip_config; + char dhcp_hostname[256]; + char pppoe_auth_name[128]; + char ip_address[16]; + char netmask[16]; + char default_route[16]; + char primary_dns[16]; + char secondary_dns[16]; + le_t http_proxy_config; + char http_proxy_server[256]; + le_t http_proxy_port; +}; + +struct SceNetCtlNatInfo +{ + le_t size; + le_t stun_status; + le_t nat_type; + SceNetInAddr mapped_addr; +}; + +struct SceNetCtlAdhocPeerInfo +{ + vm::lptr next; + SceNetInAddr inet_addr; +}; + +using SceNetCtlCallback = func_def arg)>; + +extern psv_log_base sceNetCtl; diff --git a/rpcs3/Emu/ARMv7/Modules/sceNgs.cpp b/rpcs3/Emu/ARMv7/Modules/sceNgs.cpp index f09993ba24..8abeacf645 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceNgs.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceNgs.cpp @@ -2,123 +2,14 @@ #include "Emu/System.h" #include "Emu/ARMv7/PSVFuncList.h" -extern psv_log_base sceNgs; +#include "sceNgs.h" -struct SceNgsVoiceDefinition; - -typedef u32 SceNgsModuleID; -typedef u32 SceNgsParamsID; -typedef vm::psv::ptr SceNgsHVoice; -typedef vm::psv::ptr SceNgsHPatch; -typedef vm::psv::ptr SceNgsHSynSystem; -typedef vm::psv::ptr SceNgsHRack; - -struct SceNgsModuleParamHeader -{ - s32 moduleId; - s32 chan; -}; - -struct SceNgsParamsDescriptor -{ - SceNgsParamsID id; - u32 size; -}; - -struct SceNgsBufferInfo -{ - vm::psv::ptr data; - u32 size; -}; - -struct SceNgsVoicePreset -{ - s32 nNameOffset; - u32 uNameLength; - s32 nPresetDataOffset; - u32 uSizePresetData; - s32 nBypassFlagsOffset; - u32 uNumBypassFlags; -}; - -struct SceNgsSystemInitParams -{ - s32 nMaxRacks; - s32 nMaxVoices; - s32 nGranularity; - s32 nSampleRate; - s32 nMaxModules; -}; - -struct SceNgsRackDescription -{ - vm::psv::ptr pVoiceDefn; - s32 nVoices; - s32 nChannelsPerVoice; - s32 nMaxPatchesPerInput; - s32 nPatchesPerOutput; - vm::psv::ptr pUserReleaseData; -}; - -struct SceNgsPatchSetupInfo -{ - SceNgsHVoice hVoiceSource; - s32 nSourceOutputIndex; - s32 nSourceOutputSubIndex; - SceNgsHVoice hVoiceDestination; - s32 nTargetInputIndex; -}; - -struct SceNgsVolumeMatrix -{ - float m[2][2]; -}; - -struct SceNgsPatchRouteInfo -{ - s32 nOutputChannels; - s32 nInputChannels; - SceNgsVolumeMatrix vols; -}; - -struct SceNgsVoiceInfo -{ - u32 uVoiceState; - u32 uNumModules; - u32 uNumInputs; - u32 uNumOutputs; - u32 uNumPatchesPerOutput; -}; - -struct SceNgsCallbackInfo -{ - SceNgsHVoice hVoiceHandle; - SceNgsHRack hRackHandle; - SceNgsModuleID uModuleID; - s32 nCallbackData; - s32 nCallbackData2; - vm::psv::ptr pCallbackPtr; - vm::psv::ptr pUserData; -}; - -typedef vm::psv::ptr pCallbackInfo)> SceNgsCallbackFunc; - -typedef SceNgsCallbackFunc SceNgsRackReleaseCallbackFunc; -typedef SceNgsCallbackFunc SceNgsModuleCallbackFunc; -typedef SceNgsCallbackFunc SceNgsParamsErrorCallbackFunc; - -struct SceSulphaNgsConfig -{ - u32 maxNamedObjects; - u32 maxTraceBufferBytes; -}; - -s32 sceNgsSystemGetRequiredMemorySize(vm::psv::ptr pSynthParams, vm::psv::ptr pnSize) +s32 sceNgsSystemGetRequiredMemorySize(vm::ptr pSynthParams, vm::ptr pnSize) { throw __FUNCTION__; } -s32 sceNgsSystemInit(vm::psv::ptr pSynthSysMemory, const u32 uMemSize, vm::psv::ptr pSynthParams, vm::psv::ptr pSystemHandle) +s32 sceNgsSystemInit(vm::ptr pSynthSysMemory, const u32 uMemSize, vm::ptr pSynthParams, vm::ptr pSystemHandle) { throw __FUNCTION__; } @@ -143,7 +34,7 @@ s32 sceNgsSystemUnlock(SceNgsHSynSystem hSystemHandle) throw __FUNCTION__; } -s32 sceNgsSystemSetParamErrorCallback(SceNgsHSynSystem hSystemHandle, const SceNgsParamsErrorCallbackFunc callbackFuncPtr) +s32 sceNgsSystemSetParamErrorCallback(SceNgsHSynSystem hSystemHandle, vm::ptr callbackFuncPtr) { throw __FUNCTION__; } @@ -153,32 +44,32 @@ s32 sceNgsSystemSetFlags(SceNgsHSynSystem hSystemHandle, const u32 uSystemFlags) throw __FUNCTION__; } -s32 sceNgsRackGetRequiredMemorySize(SceNgsHSynSystem hSystemHandle, vm::psv::ptr pRackDesc, vm::psv::ptr pnSize) +s32 sceNgsRackGetRequiredMemorySize(SceNgsHSynSystem hSystemHandle, vm::ptr pRackDesc, vm::ptr pnSize) { throw __FUNCTION__; } -s32 sceNgsRackInit(SceNgsHSynSystem hSystemHandle, vm::psv::ptr pRackBuffer, vm::psv::ptr pRackDesc, vm::psv::ptr pRackHandle) +s32 sceNgsRackInit(SceNgsHSynSystem hSystemHandle, vm::ptr pRackBuffer, vm::ptr pRackDesc, vm::ptr pRackHandle) { throw __FUNCTION__; } -s32 sceNgsRackGetVoiceHandle(SceNgsHRack hRackHandle, const u32 uIndex, vm::psv::ptr pVoiceHandle) +s32 sceNgsRackGetVoiceHandle(SceNgsHRack hRackHandle, const u32 uIndex, vm::ptr pVoiceHandle) { throw __FUNCTION__; } -s32 sceNgsRackRelease(SceNgsHRack hRackHandle, const SceNgsRackReleaseCallbackFunc callbackFuncPtr) +s32 sceNgsRackRelease(SceNgsHRack hRackHandle, vm::ptr callbackFuncPtr) { throw __FUNCTION__; } -s32 sceNgsRackSetParamErrorCallback(SceNgsHRack hRackHandle, const SceNgsParamsErrorCallbackFunc callbackFuncPtr) +s32 sceNgsRackSetParamErrorCallback(SceNgsHRack hRackHandle, vm::ptr callbackFuncPtr) { throw __FUNCTION__; } -s32 sceNgsVoiceInit(SceNgsHVoice hVoiceHandle, vm::psv::ptr pPreset, const u32 uInitFlags) +s32 sceNgsVoiceInit(SceNgsHVoice hVoiceHandle, vm::ptr pPreset, const u32 uInitFlags) { throw __FUNCTION__; } @@ -208,12 +99,12 @@ s32 sceNgsVoiceResume(SceNgsHVoice hVoiceHandle) throw __FUNCTION__; } -s32 sceNgsVoiceSetPreset(SceNgsHVoice hVoiceHandle, vm::psv::ptr pVoicePreset) +s32 sceNgsVoiceSetPreset(SceNgsHVoice hVoiceHandle, vm::ptr pVoicePreset) { throw __FUNCTION__; } -s32 sceNgsVoiceLockParams(SceNgsHVoice hVoiceHandle, const u32 uModule, const SceNgsParamsID uParamsInterfaceId, vm::psv::ptr pParamsBuffer) +s32 sceNgsVoiceLockParams(SceNgsHVoice hVoiceHandle, const u32 uModule, const u32 uParamsInterfaceId, vm::ptr pParamsBuffer) { throw __FUNCTION__; } @@ -223,7 +114,7 @@ s32 sceNgsVoiceUnlockParams(SceNgsHVoice hVoiceHandle, const u32 uModule) throw __FUNCTION__; } -s32 sceNgsVoiceSetParamsBlock(SceNgsHVoice hVoiceHandle, vm::psv::ptr pParamData, const u32 uSize, vm::psv::ptr pnErrorCount) +s32 sceNgsVoiceSetParamsBlock(SceNgsHVoice hVoiceHandle, vm::ptr pParamData, const u32 uSize, vm::ptr pnErrorCount) { throw __FUNCTION__; } @@ -233,52 +124,52 @@ s32 sceNgsVoiceBypassModule(SceNgsHVoice hVoiceHandle, const u32 uModule, const throw __FUNCTION__; } -s32 sceNgsVoiceSetModuleCallback(SceNgsHVoice hVoiceHandle, const u32 uModule, const SceNgsModuleCallbackFunc callbackFuncPtr, vm::psv::ptr pUserData) +s32 sceNgsVoiceSetModuleCallback(SceNgsHVoice hVoiceHandle, const u32 uModule, vm::ptr callbackFuncPtr, vm::ptr pUserData) { throw __FUNCTION__; } -s32 sceNgsVoiceSetFinishedCallback(SceNgsHVoice hVoiceHandle, const SceNgsCallbackFunc callbackFuncPtr, vm::psv::ptr pUserData) +s32 sceNgsVoiceSetFinishedCallback(SceNgsHVoice hVoiceHandle, vm::ptr callbackFuncPtr, vm::ptr pUserData) { throw __FUNCTION__; } -s32 sceNgsVoiceGetStateData(SceNgsHVoice hVoiceHandle, const u32 uModule, vm::psv::ptr pMem, const u32 uMemSize) +s32 sceNgsVoiceGetStateData(SceNgsHVoice hVoiceHandle, const u32 uModule, vm::ptr pMem, const u32 uMemSize) { throw __FUNCTION__; } -s32 sceNgsVoiceGetInfo(SceNgsHVoice hVoiceHandle, vm::psv::ptr pInfo) +s32 sceNgsVoiceGetInfo(SceNgsHVoice hVoiceHandle, vm::ptr pInfo) { throw __FUNCTION__; } -s32 sceNgsVoiceGetModuleType(SceNgsHVoice hVoiceHandle, const u32 uModule, vm::psv::ptr pModuleType) +s32 sceNgsVoiceGetModuleType(SceNgsHVoice hVoiceHandle, const u32 uModule, vm::ptr pModuleType) { throw __FUNCTION__; } -s32 sceNgsVoiceGetModuleBypass(SceNgsHVoice hVoiceHandle, const u32 uModule, vm::psv::ptr puBypassFlag) +s32 sceNgsVoiceGetModuleBypass(SceNgsHVoice hVoiceHandle, const u32 uModule, vm::ptr puBypassFlag) { throw __FUNCTION__; } -s32 sceNgsVoiceGetParamsOutOfRange(SceNgsHVoice hVoiceHandle, const u32 uModule, vm::psv::ptr pszMessageBuffer) +s32 sceNgsVoiceGetParamsOutOfRange(SceNgsHVoice hVoiceHandle, const u32 uModule, vm::ptr pszMessageBuffer) { throw __FUNCTION__; } -s32 sceNgsPatchCreateRouting(vm::psv::ptr pPatchInfo, vm::psv::ptr pPatchHandle) +s32 sceNgsPatchCreateRouting(vm::ptr pPatchInfo, vm::ptr pPatchHandle) { throw __FUNCTION__; } -s32 sceNgsPatchGetInfo(SceNgsHPatch hPatchHandle, vm::psv::ptr pRouteInfo, vm::psv::ptr pSetup) +s32 sceNgsPatchGetInfo(SceNgsHPatch hPatchHandle, vm::ptr pRouteInfo, vm::ptr pSetup) { throw __FUNCTION__; } -s32 sceNgsVoiceGetOutputPatch(SceNgsHVoice hVoiceHandle, const s32 nOutputIndex, const s32 nSubIndex, vm::psv::ptr pPatchHandle) +s32 sceNgsVoiceGetOutputPatch(SceNgsHVoice hVoiceHandle, const s32 nOutputIndex, const s32 nSubIndex, vm::ptr pPatchHandle) { throw __FUNCTION__; } @@ -288,112 +179,112 @@ s32 sceNgsPatchRemoveRouting(SceNgsHPatch hPatchHandle) throw __FUNCTION__; } -//s32 sceNgsVoicePatchSetVolume(SceNgsHPatch hPatchHandle, const s32 nOutputChannel, const s32 nInputChannel, const float fVol) -//{ -// throw __FUNCTION__; -//} - -s32 sceNgsVoicePatchSetVolumes(SceNgsHPatch hPatchHandle, const s32 nOutputChannel, vm::psv::ptr pVolumes, const s32 nVols) +s32 sceNgsVoicePatchSetVolume(SceNgsHPatch hPatchHandle, const s32 nOutputChannel, const s32 nInputChannel, const float fVol) { throw __FUNCTION__; } -s32 sceNgsVoicePatchSetVolumesMatrix(SceNgsHPatch hPatchHandle, vm::psv::ptr pMatrix) +s32 sceNgsVoicePatchSetVolumes(SceNgsHPatch hPatchHandle, const s32 nOutputChannel, vm::ptr pVolumes, const s32 nVols) { throw __FUNCTION__; } -s32 sceNgsModuleGetNumPresets(SceNgsHSynSystem hSystemHandle, const SceNgsModuleID uModuleID, vm::psv::ptr puNumPresets) +s32 sceNgsVoicePatchSetVolumesMatrix(SceNgsHPatch hPatchHandle, vm::ptr pMatrix) { throw __FUNCTION__; } -s32 sceNgsModuleGetPreset(SceNgsHSynSystem hSystemHandle, const SceNgsModuleID uModuleID, const u32 uPresetIndex, vm::psv::ptr pParamsBuffer) +s32 sceNgsModuleGetNumPresets(SceNgsHSynSystem hSystemHandle, const u32 uModuleID, vm::ptr puNumPresets) { throw __FUNCTION__; } -vm::psv::ptr sceNgsVoiceDefGetCompressorBuss() +s32 sceNgsModuleGetPreset(SceNgsHSynSystem hSystemHandle, const u32 uModuleID, const u32 uPresetIndex, vm::ptr pParamsBuffer) { throw __FUNCTION__; } -vm::psv::ptr sceNgsVoiceDefGetCompressorSideChainBuss() +vm::ptr sceNgsVoiceDefGetCompressorBuss() { throw __FUNCTION__; } -vm::psv::ptr sceNgsVoiceDefGetDelayBuss() +vm::ptr sceNgsVoiceDefGetCompressorSideChainBuss() { throw __FUNCTION__; } -vm::psv::ptr sceNgsVoiceDefGetDistortionBuss() +vm::ptr sceNgsVoiceDefGetDelayBuss() { throw __FUNCTION__; } -vm::psv::ptr sceNgsVoiceDefGetEnvelopeBuss() +vm::ptr sceNgsVoiceDefGetDistortionBuss() { throw __FUNCTION__; } -vm::psv::ptr sceNgsVoiceDefGetEqBuss() +vm::ptr sceNgsVoiceDefGetEnvelopeBuss() { throw __FUNCTION__; } -vm::psv::ptr sceNgsVoiceDefGetMasterBuss() +vm::ptr sceNgsVoiceDefGetEqBuss() { throw __FUNCTION__; } -vm::psv::ptr sceNgsVoiceDefGetMixerBuss() +vm::ptr sceNgsVoiceDefGetMasterBuss() { throw __FUNCTION__; } -vm::psv::ptr sceNgsVoiceDefGetPauserBuss() +vm::ptr sceNgsVoiceDefGetMixerBuss() { throw __FUNCTION__; } -vm::psv::ptr sceNgsVoiceDefGetReverbBuss() +vm::ptr sceNgsVoiceDefGetPauserBuss() { throw __FUNCTION__; } -vm::psv::ptr sceNgsVoiceDefGetSasEmuVoice() +vm::ptr sceNgsVoiceDefGetReverbBuss() { throw __FUNCTION__; } -vm::psv::ptr sceNgsVoiceDefGetSimpleVoice() +vm::ptr sceNgsVoiceDefGetSasEmuVoice() { throw __FUNCTION__; } -vm::psv::ptr sceNgsVoiceDefGetTemplate1() +vm::ptr sceNgsVoiceDefGetSimpleVoice() { throw __FUNCTION__; } -vm::psv::ptr sceNgsVoiceDefGetAtrac9Voice() +vm::ptr sceNgsVoiceDefGetTemplate1() { throw __FUNCTION__; } -s32 sceSulphaNgsGetDefaultConfig(vm::psv::ptr config) +vm::ptr sceNgsVoiceDefGetAtrac9Voice() { throw __FUNCTION__; } -s32 sceSulphaNgsGetNeededMemory(vm::psv::ptr config, vm::psv::ptr sizeInBytes) +s32 sceSulphaNgsGetDefaultConfig(vm::ptr config) { throw __FUNCTION__; } -s32 sceSulphaNgsInit(vm::psv::ptr config, vm::psv::ptr buffer, u32 sizeInBytes) +s32 sceSulphaNgsGetNeededMemory(vm::ptr config, vm::ptr sizeInBytes) +{ + throw __FUNCTION__; +} + +s32 sceSulphaNgsInit(vm::ptr config, vm::ptr buffer, u32 sizeInBytes) { throw __FUNCTION__; } @@ -403,27 +294,27 @@ s32 sceSulphaNgsShutdown() throw __FUNCTION__; } -s32 sceSulphaNgsSetSynthName(SceNgsHSynSystem synthHandle, vm::psv::ptr name) +s32 sceSulphaNgsSetSynthName(SceNgsHSynSystem synthHandle, vm::ptr name) { throw __FUNCTION__; } -s32 sceSulphaNgsSetRackName(SceNgsHRack rackHandle, vm::psv::ptr name) +s32 sceSulphaNgsSetRackName(SceNgsHRack rackHandle, vm::ptr name) { throw __FUNCTION__; } -s32 sceSulphaNgsSetVoiceName(SceNgsHVoice voiceHandle, vm::psv::ptr name) +s32 sceSulphaNgsSetVoiceName(SceNgsHVoice voiceHandle, vm::ptr name) { throw __FUNCTION__; } -s32 sceSulphaNgsSetSampleName(vm::psv::ptr location, u32 length, vm::psv::ptr name) +s32 sceSulphaNgsSetSampleName(vm::ptr location, u32 length, vm::ptr name) { throw __FUNCTION__; } -s32 sceSulphaNgsTrace(vm::psv::ptr message) +s32 sceSulphaNgsTrace(vm::ptr message) { throw __FUNCTION__; } @@ -436,6 +327,7 @@ psv_log_base sceNgs("SceNgs", []() sceNgs.on_load = nullptr; sceNgs.on_unload = nullptr; sceNgs.on_stop = nullptr; + sceNgs.on_error = nullptr; REG_FUNC(0x6CE8B36F, sceNgsSystemGetRequiredMemorySize); REG_FUNC(0xED14CF4A, sceNgsSystemInit); diff --git a/rpcs3/Emu/ARMv7/Modules/sceNgs.h b/rpcs3/Emu/ARMv7/Modules/sceNgs.h new file mode 100644 index 0000000000..720085cb46 --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/sceNgs.h @@ -0,0 +1,106 @@ +#pragma once + +struct SceNgsVoiceDefinition; + +using SceNgsHVoice = vm::ptr; +using SceNgsHPatch = vm::ptr; +using SceNgsHSynSystem = vm::ptr; +using SceNgsHRack = vm::ptr; + +struct SceNgsModuleParamHeader +{ + le_t moduleId; + le_t chan; +}; + +struct SceNgsParamsDescriptor +{ + le_t id; + le_t size; +}; + +struct SceNgsBufferInfo +{ + vm::lptr data; + le_t size; +}; + +struct SceNgsVoicePreset +{ + le_t nNameOffset; + le_t uNameLength; + le_t nPresetDataOffset; + le_t uSizePresetData; + le_t nBypassFlagsOffset; + le_t uNumBypassFlags; +}; + +struct SceNgsSystemInitParams +{ + le_t nMaxRacks; + le_t nMaxVoices; + le_t nGranularity; + le_t nSampleRate; + le_t nMaxModules; +}; + +struct SceNgsRackDescription +{ + vm::lptr pVoiceDefn; + le_t nVoices; + le_t nChannelsPerVoice; + le_t nMaxPatchesPerInput; + le_t nPatchesPerOutput; + vm::lptr pUserReleaseData; +}; + +struct SceNgsPatchSetupInfo +{ + SceNgsHVoice hVoiceSource; + le_t nSourceOutputIndex; + le_t nSourceOutputSubIndex; + SceNgsHVoice hVoiceDestination; + le_t nTargetInputIndex; +}; + +struct SceNgsVolumeMatrix +{ + le_t m[2][2]; +}; + +struct SceNgsPatchRouteInfo +{ + le_t nOutputChannels; + le_t nInputChannels; + SceNgsVolumeMatrix vols; +}; + +struct SceNgsVoiceInfo +{ + le_t uVoiceState; + le_t uNumModules; + le_t uNumInputs; + le_t uNumOutputs; + le_t uNumPatchesPerOutput; +}; + +struct SceNgsCallbackInfo +{ + SceNgsHVoice hVoiceHandle; + SceNgsHRack hRackHandle; + le_t uModuleID; + le_t nCallbackData; + le_t nCallbackData2; + vm::lptr pCallbackPtr; + vm::lptr pUserData; +}; + +using SceNgsCallbackFunc = func_def pCallbackInfo)>; + +struct SceSulphaNgsConfig +{ + le_t maxNamedObjects; + le_t maxTraceBufferBytes; +}; + +extern psv_log_base sceNgs; diff --git a/rpcs3/Emu/ARMv7/Modules/sceNpBasic.cpp b/rpcs3/Emu/ARMv7/Modules/sceNpBasic.cpp index e798df5f48..381a2e71f3 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceNpBasic.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceNpBasic.cpp @@ -2,123 +2,9 @@ #include "Emu/System.h" #include "Emu/ARMv7/PSVFuncList.h" -#include "sceNpCommon.h" +#include "sceNpBasic.h" -extern psv_log_base sceNpBasic; - -enum SceNpBasicFriendListEventType : s32 -{ - SCE_NP_BASIC_FRIEND_LIST_EVENT_TYPE_SYNC = 1, - SCE_NP_BASIC_FRIEND_LIST_EVENT_TYPE_SYNC_DONE = 2, - SCE_NP_BASIC_FRIEND_LIST_EVENT_TYPE_ADDED = 3, - SCE_NP_BASIC_FRIEND_LIST_EVENT_TYPE_DELETED = 4 -}; - -typedef vm::psv::ptr friendId, vm::psv::ptr userdata)> SceNpBasicFriendListEventHandler; - -enum SceNpBasicFriendOnlineStatusEventType : s32 -{ - SCE_NP_BASIC_FRIEND_ONLINE_STATUS_EVENT_TYPE_SYNC = 1, - SCE_NP_BASIC_FRIEND_ONLINE_STATUS_EVENT_TYPE_SYNC_DONE = 2, - SCE_NP_BASIC_FRIEND_ONLINE_STATUS_EVENT_TYPE_UPDATED = 3 -}; - -enum SceNpBasicFriendOnlineStatus : s32 -{ - SCE_NP_BASIC_FRIEND_ONLINE_STATUS_UNKNOWN = 0, - SCE_NP_BASIC_FRIEND_ONLINE_STATUS_OFFLINE = 1, - SCE_NP_BASIC_FRIEND_ONLINE_STATUS_STANDBY = 2, - SCE_NP_BASIC_FRIEND_ONLINE_STATUS_ONLINE_OUT_OF_CONTEXT = 3, - SCE_NP_BASIC_FRIEND_ONLINE_STATUS_ONLINE_IN_CONTEXT = 4 -}; - -typedef vm::psv::ptr friendId, SceNpBasicFriendOnlineStatus status, vm::psv::ptr userdata)> SceNpBasicFriendOnlineStatusEventHandler; - -enum SceNpBasicBlockListEventType : s32 -{ - SCE_NP_BASIC_BLOCK_LIST_EVENT_TYPE_SYNC = 1, - SCE_NP_BASIC_BLOCK_LIST_EVENT_TYPE_SYNC_DONE = 2, - SCE_NP_BASIC_BLOCK_LIST_EVENT_TYPE_ADDED = 3, - SCE_NP_BASIC_BLOCK_LIST_EVENT_TYPE_DELETED = 4 -}; - -typedef vm::psv::ptr playerId, vm::psv::ptr userdata)> SceNpBasicBlockListEventHandler; - -enum SceNpBasicFriendGamePresenceEventType : s32 -{ - SCE_NP_BASIC_FRIEND_GAME_PRESENCE_EVENT_TYPE_SYNC = 1, - SCE_NP_BASIC_FRIEND_GAME_PRESENCE_EVENT_TYPE_SYNC_DONE = 2, - SCE_NP_BASIC_FRIEND_GAME_PRESENCE_EVENT_TYPE_UPDATED = 3 -}; - -enum SceNpBasicInGamePresenceType -{ - SCE_NP_BASIC_IN_GAME_PRESENCE_TYPE_UNKNOWN = -1, - SCE_NP_BASIC_IN_GAME_PRESENCE_TYPE_NONE = 0, - SCE_NP_BASIC_IN_GAME_PRESENCE_TYPE_DEFAULT = 1, - SCE_NP_BASIC_IN_GAME_PRESENCE_TYPE_JOINABLE = 2, - SCE_NP_BASIC_IN_GAME_PRESENCE_TYPE_MAX = 3 -}; - -struct SceNpBasicInGamePresence -{ - u32 sdkVersion; - SceNpBasicInGamePresenceType type; - char status[192]; - u8 data[128]; - u32 dataSize; -}; - -struct SceNpBasicGamePresence -{ - u32 size; - char title[128]; - SceNpBasicInGamePresence inGamePresence; -}; - -typedef vm::psv::ptr friendId, vm::psv::ptr presence, vm::psv::ptr userdata)> SceNpBasicFriendGamePresenceEventHandler; - -struct SceNpBasicInGameDataMessage -{ - u8 data[128]; - u32 dataSize; -}; - -typedef vm::psv::ptr from, vm::psv::ptr message, vm::psv::ptr userdata)> SceNpBasicInGameDataMessageEventHandler; - -struct SceNpBasicEventHandlers -{ - u32 sdkVersion; - SceNpBasicFriendListEventHandler friendListEventHandler; - SceNpBasicFriendOnlineStatusEventHandler friendOnlineStatusEventHandler; - SceNpBasicBlockListEventHandler blockListEventHandler; - SceNpBasicFriendGamePresenceEventHandler friendGamePresenceEventHandler; - SceNpBasicInGameDataMessageEventHandler inGameDataMessageEventHandler; -}; - -struct SceNpBasicPlaySessionLogDescription -{ - char text[512]; -}; - -struct SceNpBasicPlaySessionLog -{ - u64 date; - SceNpId withWhom; - SceNpCommunicationId commId; - char title[128]; - SceNpBasicPlaySessionLogDescription description; -}; - -enum SceNpBasicPlaySessionLogType : s32 -{ - SCE_NP_BASIC_PLAY_SESSION_LOG_TYPE_INVALID = -1, - SCE_NP_BASIC_PLAY_SESSION_LOG_TYPE_ALL = 0, - SCE_NP_BASIC_PLAY_SESSION_LOG_TYPE_BY_NP_COMM_ID = 1, - SCE_NP_BASIC_PLAY_SESSION_LOG_TYPE_MAX = 2 -}; - -s32 sceNpBasicInit(vm::psv::ptr opt) +s32 sceNpBasicInit(vm::ptr opt) { throw __FUNCTION__; } @@ -128,7 +14,7 @@ s32 sceNpBasicTerm(ARMv7Context&) throw __FUNCTION__; } -s32 sceNpBasicRegisterHandler(vm::psv::ptr handlers, vm::psv::ptr context, vm::psv::ptr userdata) +s32 sceNpBasicRegisterHandler(vm::ptr handlers, vm::ptr context, vm::ptr userdata) { throw __FUNCTION__; } @@ -143,42 +29,42 @@ s32 sceNpBasicCheckCallback() throw __FUNCTION__; } -s32 sceNpBasicGetFriendOnlineStatus(vm::psv::ptr friendId, vm::psv::ptr status) +s32 sceNpBasicGetFriendOnlineStatus(vm::ptr friendId, vm::ptr status) { throw __FUNCTION__; } -s32 sceNpBasicGetGamePresenceOfFriend(vm::psv::ptr friendId, vm::psv::ptr presence) +s32 sceNpBasicGetGamePresenceOfFriend(vm::ptr friendId, vm::ptr presence) { throw __FUNCTION__; } -s32 sceNpBasicGetFriendListEntryCount(vm::psv::ptr count) +s32 sceNpBasicGetFriendListEntryCount(vm::ptr count) { throw __FUNCTION__; } -s32 sceNpBasicGetFriendListEntries(u32 startIndex, vm::psv::ptr entries, u32 numEntries, vm::psv::ptr retrieved) +s32 sceNpBasicGetFriendListEntries(u32 startIndex, vm::ptr entries, u32 numEntries, vm::ptr retrieved) { throw __FUNCTION__; } -s32 sceNpBasicGetBlockListEntryCount(vm::psv::ptr count) +s32 sceNpBasicGetBlockListEntryCount(vm::ptr count) { throw __FUNCTION__; } -s32 sceNpBasicGetBlockListEntries(u32 startIndex, vm::psv::ptr entries, u32 numEntries, vm::psv::ptr retrieved) +s32 sceNpBasicGetBlockListEntries(u32 startIndex, vm::ptr entries, u32 numEntries, vm::ptr retrieved) { throw __FUNCTION__; } -s32 sceNpBasicCheckIfPlayerIsBlocked(vm::psv::ptr player, vm::psv::ptr playerIsBlocked) +s32 sceNpBasicCheckIfPlayerIsBlocked(vm::ptr player, vm::ptr playerIsBlocked) { throw __FUNCTION__; } -s32 sceNpBasicSetInGamePresence(vm::psv::ptr presence) +s32 sceNpBasicSetInGamePresence(vm::ptr presence) { throw __FUNCTION__; } @@ -188,22 +74,22 @@ s32 sceNpBasicUnsetInGamePresence() throw __FUNCTION__; } -s32 sceNpBasicSendInGameDataMessage(vm::psv::ptr to, vm::psv::ptr message) +s32 sceNpBasicSendInGameDataMessage(vm::ptr to, vm::ptr message) { throw __FUNCTION__; } -s32 sceNpBasicRecordPlaySessionLog(vm::psv::ptr withWhom, vm::psv::ptr description) +s32 sceNpBasicRecordPlaySessionLog(vm::ptr withWhom, vm::ptr description) { throw __FUNCTION__; } -s32 sceNpBasicGetPlaySessionLogSize(SceNpBasicPlaySessionLogType type, vm::psv::ptr size) +s32 sceNpBasicGetPlaySessionLogSize(SceNpBasicPlaySessionLogType type, vm::ptr size) { throw __FUNCTION__; } -s32 sceNpBasicGetPlaySessionLog(SceNpBasicPlaySessionLogType type, u32 index, vm::psv::ptr log) +s32 sceNpBasicGetPlaySessionLog(SceNpBasicPlaySessionLogType type, u32 index, vm::ptr log) { throw __FUNCTION__; } @@ -215,6 +101,7 @@ psv_log_base sceNpBasic("SceNpBasic", []() sceNpBasic.on_load = nullptr; sceNpBasic.on_unload = nullptr; sceNpBasic.on_stop = nullptr; + sceNpBasic.on_error = nullptr; REG_FUNC(0xEFB91A99, sceNpBasicInit); REG_FUNC(0x389BCB3B, sceNpBasicTerm); diff --git a/rpcs3/Emu/ARMv7/Modules/sceNpBasic.h b/rpcs3/Emu/ARMv7/Modules/sceNpBasic.h new file mode 100644 index 0000000000..acf4b67438 --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/sceNpBasic.h @@ -0,0 +1,117 @@ +#pragma once + +#include "sceNpCommon.h" + +enum SceNpBasicFriendListEventType : s32 +{ + SCE_NP_BASIC_FRIEND_LIST_EVENT_TYPE_SYNC = 1, + SCE_NP_BASIC_FRIEND_LIST_EVENT_TYPE_SYNC_DONE = 2, + SCE_NP_BASIC_FRIEND_LIST_EVENT_TYPE_ADDED = 3, + SCE_NP_BASIC_FRIEND_LIST_EVENT_TYPE_DELETED = 4 +}; + +using SceNpBasicFriendListEventHandler = func_def friendId, vm::ptr userdata)>; + +enum SceNpBasicFriendOnlineStatusEventType : s32 +{ + SCE_NP_BASIC_FRIEND_ONLINE_STATUS_EVENT_TYPE_SYNC = 1, + SCE_NP_BASIC_FRIEND_ONLINE_STATUS_EVENT_TYPE_SYNC_DONE = 2, + SCE_NP_BASIC_FRIEND_ONLINE_STATUS_EVENT_TYPE_UPDATED = 3 +}; + +enum SceNpBasicFriendOnlineStatus : s32 +{ + SCE_NP_BASIC_FRIEND_ONLINE_STATUS_UNKNOWN = 0, + SCE_NP_BASIC_FRIEND_ONLINE_STATUS_OFFLINE = 1, + SCE_NP_BASIC_FRIEND_ONLINE_STATUS_STANDBY = 2, + SCE_NP_BASIC_FRIEND_ONLINE_STATUS_ONLINE_OUT_OF_CONTEXT = 3, + SCE_NP_BASIC_FRIEND_ONLINE_STATUS_ONLINE_IN_CONTEXT = 4 +}; + +using SceNpBasicFriendOnlineStatusEventHandler = func_def friendId, SceNpBasicFriendOnlineStatus status, vm::ptr userdata)>; + +enum SceNpBasicBlockListEventType : s32 +{ + SCE_NP_BASIC_BLOCK_LIST_EVENT_TYPE_SYNC = 1, + SCE_NP_BASIC_BLOCK_LIST_EVENT_TYPE_SYNC_DONE = 2, + SCE_NP_BASIC_BLOCK_LIST_EVENT_TYPE_ADDED = 3, + SCE_NP_BASIC_BLOCK_LIST_EVENT_TYPE_DELETED = 4 +}; + +using SceNpBasicBlockListEventHandler = func_def playerId, vm::ptr userdata)>; + +enum SceNpBasicFriendGamePresenceEventType : s32 +{ + SCE_NP_BASIC_FRIEND_GAME_PRESENCE_EVENT_TYPE_SYNC = 1, + SCE_NP_BASIC_FRIEND_GAME_PRESENCE_EVENT_TYPE_SYNC_DONE = 2, + SCE_NP_BASIC_FRIEND_GAME_PRESENCE_EVENT_TYPE_UPDATED = 3 +}; + +enum SceNpBasicInGamePresenceType : s32 +{ + SCE_NP_BASIC_IN_GAME_PRESENCE_TYPE_UNKNOWN = -1, + SCE_NP_BASIC_IN_GAME_PRESENCE_TYPE_NONE = 0, + SCE_NP_BASIC_IN_GAME_PRESENCE_TYPE_DEFAULT = 1, + SCE_NP_BASIC_IN_GAME_PRESENCE_TYPE_JOINABLE = 2, + SCE_NP_BASIC_IN_GAME_PRESENCE_TYPE_MAX = 3 +}; + +struct SceNpBasicInGamePresence +{ + le_t sdkVersion; + le_t type; // SceNpBasicInGamePresenceType + char status[192]; + u8 data[128]; + le_t dataSize; +}; + +struct SceNpBasicGamePresence +{ + le_t size; + char title[128]; + SceNpBasicInGamePresence inGamePresence; +}; + +using SceNpBasicFriendGamePresenceEventHandler = func_def friendId, vm::cptr presence, vm::ptr userdata)>; + +struct SceNpBasicInGameDataMessage +{ + u8 data[128]; + le_t dataSize; +}; + +using SceNpBasicInGameDataMessageEventHandler = func_def from, vm::cptr message, vm::ptr userdata)>; + +struct SceNpBasicEventHandlers +{ + le_t sdkVersion; + vm::lptr friendListEventHandler; + vm::lptr friendOnlineStatusEventHandler; + vm::lptr blockListEventHandler; + vm::lptr friendGamePresenceEventHandler; + vm::lptr inGameDataMessageEventHandler; +}; + +struct SceNpBasicPlaySessionLogDescription +{ + char text[512]; +}; + +struct SceNpBasicPlaySessionLog +{ + le_t date; + SceNpId withWhom; + SceNpCommunicationId commId; + char title[128]; + SceNpBasicPlaySessionLogDescription description; +}; + +enum SceNpBasicPlaySessionLogType : s32 +{ + SCE_NP_BASIC_PLAY_SESSION_LOG_TYPE_INVALID = -1, + SCE_NP_BASIC_PLAY_SESSION_LOG_TYPE_ALL = 0, + SCE_NP_BASIC_PLAY_SESSION_LOG_TYPE_BY_NP_COMM_ID = 1, + SCE_NP_BASIC_PLAY_SESSION_LOG_TYPE_MAX = 2 +}; + +extern psv_log_base sceNpBasic; diff --git a/rpcs3/Emu/ARMv7/Modules/sceNpCommon.cpp b/rpcs3/Emu/ARMv7/Modules/sceNpCommon.cpp index 095de28b17..cfae8ae437 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceNpCommon.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceNpCommon.cpp @@ -14,47 +14,47 @@ s32 sceNpAuthTerm() throw __FUNCTION__; } -s32 sceNpAuthCreateStartRequest(vm::psv::ptr param) +s32 sceNpAuthCreateStartRequest(vm::ptr param) { throw __FUNCTION__; } -s32 sceNpAuthDestroyRequest(SceNpAuthRequestId id) +s32 sceNpAuthDestroyRequest(s32 id) { throw __FUNCTION__; } -s32 sceNpAuthAbortRequest(SceNpAuthRequestId id) +s32 sceNpAuthAbortRequest(s32 id) { throw __FUNCTION__; } -s32 sceNpAuthGetTicket(SceNpAuthRequestId id, vm::psv::ptr buf, u32 len) +s32 sceNpAuthGetTicket(s32 id, vm::ptr buf, u32 len) { throw __FUNCTION__; } -s32 sceNpAuthGetTicketParam(vm::psv::ptr ticket, u32 ticketSize, s32 paramId, vm::psv::ptr param) +s32 sceNpAuthGetTicketParam(vm::ptr ticket, u32 ticketSize, s32 paramId, vm::ptr param) { throw __FUNCTION__; } -s32 sceNpAuthGetEntitlementIdList(vm::psv::ptr ticket, u32 ticketSize, vm::psv::ptr entIdList, u32 entIdListNum) +s32 sceNpAuthGetEntitlementIdList(vm::ptr ticket, u32 ticketSize, vm::ptr entIdList, u32 entIdListNum) { throw __FUNCTION__; } -s32 sceNpAuthGetEntitlementById(vm::psv::ptr ticket, u32 ticketSize, vm::psv::ptr entId, vm::psv::ptr ent) +s32 sceNpAuthGetEntitlementById(vm::ptr ticket, u32 ticketSize, vm::ptr entId, vm::ptr ent) { throw __FUNCTION__; } -s32 sceNpCmpNpId(vm::psv::ptr npid1, vm::psv::ptr npid2) +s32 sceNpCmpNpId(vm::ptr npid1, vm::ptr npid2) { throw __FUNCTION__; } -s32 sceNpCmpNpIdInOrder(vm::psv::ptr npid1, vm::psv::ptr npid2, vm::psv::ptr order) +s32 sceNpCmpNpIdInOrder(vm::ptr npid1, vm::ptr npid2, vm::ptr order) { throw __FUNCTION__; } @@ -66,6 +66,7 @@ psv_log_base sceNpCommon("SceNpCommon", []() sceNpCommon.on_load = nullptr; sceNpCommon.on_unload = nullptr; sceNpCommon.on_stop = nullptr; + sceNpCommon.on_error = nullptr; REG_FUNC(0x441D8B4E, sceNpAuthInit); REG_FUNC(0x6093B689, sceNpAuthTerm); diff --git a/rpcs3/Emu/ARMv7/Modules/sceNpCommon.h b/rpcs3/Emu/ARMv7/Modules/sceNpCommon.h index bd2b282301..ddc685a6d5 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceNpCommon.h +++ b/rpcs3/Emu/ARMv7/Modules/sceNpCommon.h @@ -28,9 +28,9 @@ struct SceNpCommunicationSignature struct SceNpCommunicationConfig { - vm::psv::ptr commId; - vm::psv::ptr commPassphrase; - vm::psv::ptr commSignature; + vm::lptr commId; + vm::lptr commPassphrase; + vm::lptr commSignature; }; struct SceNpCountryCode @@ -69,16 +69,16 @@ struct SceNpUserInformation struct SceNpMyLanguages { - s32 language1; - s32 language2; - s32 language3; + le_t language1; + le_t language2; + le_t language3; u8 padding[4]; }; struct SceNpAvatarImage { u8 data[200 * 1024]; - u32 size; + le_t size; u8 reserved[12]; }; @@ -94,45 +94,42 @@ struct SceNpAboutMe char data[64]; }; -typedef s32 SceNpAuthRequestId; -typedef u64 SceNpTime; - struct SceNpDate { - u16 year; + le_t year; u8 month; u8 day; }; union SceNpTicketParam { - s32 _s32; - s64 _s64; - u32 _u32; - u64 _u64; + le_t _s32; + le_t _s64; + le_t _u32; + le_t _u64; SceNpDate date; u8 data[256]; }; struct SceNpTicketVersion { - u16 major; - u16 minor; + le_t major; + le_t minor; }; -typedef vm::psv::ptr arg)> SceNpAuthCallback; +using SceNpAuthCallback = func_def arg)>; struct SceNpAuthRequestParameter { - u32 size; + le_t size; SceNpTicketVersion version; - vm::psv::ptr serviceId; - vm::psv::ptr cookie; - u32 cookieSize; - vm::psv::ptr entitlementId; - u32 consumedCount; - SceNpAuthCallback ticketCb; - vm::psv::ptr cbArg; + vm::lptr serviceId; + vm::lptr cookie; + le_t cookieSize; + vm::lptr entitlementId; + le_t consumedCount; + vm::lptr ticketCb; + vm::lptr cbArg; }; struct SceNpEntitlementId @@ -143,11 +140,11 @@ struct SceNpEntitlementId struct SceNpEntitlement { SceNpEntitlementId id; - SceNpTime createdDate; - SceNpTime expireDate; - u32 type; - s32 remainingCount; - u32 consumedCount; + le_t createdDate; + le_t expireDate; + le_t type; + le_t remainingCount; + le_t consumedCount; char padding[4]; }; diff --git a/rpcs3/Emu/ARMv7/Modules/sceNpManager.cpp b/rpcs3/Emu/ARMv7/Modules/sceNpManager.cpp index 5fce1c946e..04a30b894b 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceNpManager.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceNpManager.cpp @@ -2,18 +2,9 @@ #include "Emu/System.h" #include "Emu/ARMv7/PSVFuncList.h" -#include "sceNpCommon.h" +#include "sceNpManager.h" -extern psv_log_base sceNpManager; - -struct SceNpOptParam -{ - u32 optParamSize; -}; - -typedef vm::psv::ptr userdata)> SceNpServiceStateCallback; - -s32 sceNpInit(vm::psv::ptr commConf, vm::psv::ptr opt) +s32 sceNpInit(vm::ptr commConf, vm::ptr opt) { throw __FUNCTION__; } @@ -28,12 +19,12 @@ s32 sceNpCheckCallback() throw __FUNCTION__; } -s32 sceNpGetServiceState(vm::psv::ptr state) +s32 sceNpGetServiceState(vm::ptr state) { throw __FUNCTION__; } -s32 sceNpRegisterServiceStateCallback(SceNpServiceStateCallback callback, vm::psv::ptr userdata) +s32 sceNpRegisterServiceStateCallback(vm::ptr callback, vm::ptr userdata) { throw __FUNCTION__; } @@ -43,22 +34,22 @@ s32 sceNpUnregisterServiceStateCallback() throw __FUNCTION__; } -s32 sceNpManagerGetNpId(vm::psv::ptr npId) +s32 sceNpManagerGetNpId(vm::ptr npId) { throw __FUNCTION__; } -s32 sceNpManagerGetAccountRegion(vm::psv::ptr countryCode, vm::psv::ptr languageCode) +s32 sceNpManagerGetAccountRegion(vm::ptr countryCode, vm::ptr languageCode) { throw __FUNCTION__; } -s32 sceNpManagerGetContentRatingFlag(vm::psv::ptr isRestricted, vm::psv::ptr age) +s32 sceNpManagerGetContentRatingFlag(vm::ptr isRestricted, vm::ptr age) { throw __FUNCTION__; } -s32 sceNpManagerGetChatRestrictionFlag(vm::psv::ptr isRestricted) +s32 sceNpManagerGetChatRestrictionFlag(vm::ptr isRestricted) { throw __FUNCTION__; } @@ -70,6 +61,7 @@ psv_log_base sceNpManager("SceNpManager", []() sceNpManager.on_load = nullptr; sceNpManager.on_unload = nullptr; sceNpManager.on_stop = nullptr; + sceNpManager.on_error = nullptr; REG_FUNC(0x04D9F484, sceNpInit); REG_FUNC(0x19E40AE1, sceNpTerm); diff --git a/rpcs3/Emu/ARMv7/Modules/sceNpManager.h b/rpcs3/Emu/ARMv7/Modules/sceNpManager.h new file mode 100644 index 0000000000..3b07700d44 --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/sceNpManager.h @@ -0,0 +1,12 @@ +#pragma once + +#include "sceNpCommon.h" + +struct SceNpOptParam +{ + le_t optParamSize; +}; + +using SceNpServiceStateCallback = func_def userdata)>; + +extern psv_log_base sceNpManager; diff --git a/rpcs3/Emu/ARMv7/Modules/sceNpMatching.cpp b/rpcs3/Emu/ARMv7/Modules/sceNpMatching.cpp index 31c0d665f3..502a2b16ee 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceNpMatching.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceNpMatching.cpp @@ -2,1089 +2,11 @@ #include "Emu/System.h" #include "Emu/ARMv7/PSVFuncList.h" -#include "sceNet.h" -#include "sceNpCommon.h" - -extern psv_log_base sceNpMatching; - -struct SceNpMatching2MemoryInfo -{ - u32 totalMemSize; - u32 curMemUsage; - u32 maxMemUsage; - u8 reserved[12]; -}; - -typedef u16 SceNpMatching2ServerId; -typedef u32 SceNpMatching2WorldId; -typedef u16 SceNpMatching2WorldNumber; -typedef u64 SceNpMatching2LobbyId; -typedef u16 SceNpMatching2LobbyNumber; -typedef u64 SceNpMatching2RoomId; -typedef u16 SceNpMatching2RoomNumber; -typedef u16 SceNpMatching2ContextId; -typedef u32 SceNpMatching2RequestId; -typedef u32 SceNpMatching2SignalingRequestId; -typedef u8 SceNpMatching2NatType; -typedef u8 SceNpMatching2Operator; -typedef u8 SceNpMatching2CastType; - -struct SceNpMatching2SessionPassword -{ - u8 data[8]; -}; - -typedef u8 SceNpMatching2SessionType; -typedef u8 SceNpMatching2EventCause; - -struct SceNpMatching2PresenceOptionData -{ - u8 data[16]; - u32 len; -}; - -typedef u16 SceNpMatching2AttributeId; -typedef u32 SceNpMatching2FlagAttr; - -struct SceNpMatching2IntAttr -{ - SceNpMatching2AttributeId id; - u8 padding[2]; - u32 num; -}; - - -struct SceNpMatching2BinAttr -{ - SceNpMatching2AttributeId id; - u8 padding[2]; - vm::psv::ptr ptr; - u32 size; -}; - - -struct SceNpMatching2RangeFilter -{ - u32 startIndex; - u32 max; -}; - - -struct SceNpMatching2IntSearchFilter -{ - SceNpMatching2Operator searchOperator; - u8 padding[3]; - SceNpMatching2IntAttr attr; -}; - - -struct SceNpMatching2BinSearchFilter -{ - SceNpMatching2Operator searchOperator; - u8 padding[3]; - SceNpMatching2BinAttr attr; -}; - - -struct SceNpMatching2Range -{ - u32 startIndex; - u32 total; - u32 resultCount; -}; - - -struct SceNpMatching2JoinedSessionInfo -{ - SceNpMatching2SessionType sessionType; - u8 padding1[1]; - SceNpMatching2ServerId serverId; - SceNpMatching2WorldId worldId; - SceNpMatching2LobbyId lobbyId; - SceNpMatching2RoomId roomId; - u64 joinDate; -}; - - -struct SceNpMatching2UserInfo -{ - vm::psv::ptr next; - SceNpId npId; - vm::psv::ptr userBinAttr; - u32 userBinAttrNum; - vm::psv::ptr joinedSessionInfo; - u32 joinedSessionInfoNum; -}; - -typedef u8 SceNpMatching2ServerStatus; - -struct SceNpMatching2Server -{ - SceNpMatching2ServerId serverId; - SceNpMatching2ServerStatus status; - u8 padding[1]; -}; - - -struct SceNpMatching2World -{ - vm::psv::ptr next; - SceNpMatching2WorldId worldId; - u32 numOfLobby; - u32 maxNumOfTotalLobbyMember; - u32 curNumOfTotalLobbyMember; - u32 curNumOfRoom; - u32 curNumOfTotalRoomMember; - bool withEntitlementId; - SceNpEntitlementId entitlementId; - u8 padding[3]; -}; - -typedef u16 SceNpMatching2LobbyMemberId; - -struct SceNpMatching2LobbyMemberBinAttrInternal -{ - u64 updateDate; - SceNpMatching2BinAttr data; - u8 padding[4]; -}; - - -struct SceNpMatching2LobbyMemberDataInternal -{ - vm::psv::ptr next; - SceNpId npId; - - u64 joinDate; - SceNpMatching2LobbyMemberId memberId; - u8 padding[2]; - - SceNpMatching2FlagAttr flagAttr; - - vm::psv::ptr joinedSessionInfo; - u32 joinedSessionInfoNum; - vm::psv::ptr lobbyMemberBinAttrInternal; - u32 lobbyMemberBinAttrInternalNum; -}; - - -struct SceNpMatching2LobbyMemberIdList -{ - vm::psv::ptr memberId; - u32 memberIdNum; - SceNpMatching2LobbyMemberId me; - u8 padding[6]; -}; - - -struct SceNpMatching2LobbyBinAttrInternal -{ - u64 updateDate; - SceNpMatching2LobbyMemberId updateMemberId; - u8 padding[2]; - SceNpMatching2BinAttr data; -}; - - -struct SceNpMatching2LobbyDataExternal -{ - vm::psv::ptr next; - SceNpMatching2ServerId serverId; - u8 padding1[2]; - SceNpMatching2WorldId worldId; - u8 padding2[4]; - SceNpMatching2LobbyId lobbyId; - u32 maxSlot; - u32 curMemberNum; - SceNpMatching2FlagAttr flagAttr; - vm::psv::ptr lobbySearchableIntAttrExternal; - u32 lobbySearchableIntAttrExternalNum; - vm::psv::ptr lobbySearchableBinAttrExternal; - u32 lobbySearchableBinAttrExternalNum; - vm::psv::ptr lobbyBinAttrExternal; - u32 lobbyBinAttrExternalNum; - u8 padding3[4]; -}; - - -struct SceNpMatching2LobbyDataInternal -{ - SceNpMatching2ServerId serverId; - u8 padding1[2]; - SceNpMatching2WorldId worldId; - SceNpMatching2LobbyId lobbyId; - - u32 maxSlot; - SceNpMatching2LobbyMemberIdList memberIdList; - SceNpMatching2FlagAttr flagAttr; - vm::psv::ptr lobbyBinAttrInternal; - u32 lobbyBinAttrInternalNum; -}; - - -union SceNpMatching2LobbyMessageDestination -{ - SceNpMatching2LobbyMemberId unicastTarget; - struct - { - vm::psv::ptr memberId; - u32 memberIdNum; - - } multicastTarget; -}; - -typedef u8 SceNpMatching2RoomGroupId; -typedef u16 SceNpMatching2RoomMemberId; -typedef u8 SceNpMatching2TeamId; -typedef u8 SceNpMatching2Role; -typedef u8 SceNpMatching2BlockKickFlag; - -struct SceNpMatching2GroupLabel -{ - u8 data[8]; -}; - -typedef u64 SceNpMatching2RoomPasswordSlotMask; -typedef u64 SceNpMatching2RoomJoinedSlotMask; - -struct SceNpMatching2RoomGroupConfig -{ - u32 slotNum; - bool withLabel; - SceNpMatching2GroupLabel label; - bool withPassword; - u8 padding[2]; -}; - - -struct SceNpMatching2RoomGroupPasswordConfig -{ - SceNpMatching2RoomGroupId groupId; - bool withPassword; - u8 padding[1]; -}; - - -struct SceNpMatching2RoomMemberBinAttrInternal -{ - u64 updateDate; - SceNpMatching2BinAttr data; - u8 padding[4]; -}; - - -struct SceNpMatching2RoomGroup -{ - SceNpMatching2RoomGroupId groupId; - bool withPassword; - bool withLabel; - u8 padding[1]; - SceNpMatching2GroupLabel label; - u32 slotNum; - u32 curGroupMemberNum; -}; - - -struct SceNpMatching2RoomMemberDataExternal -{ - vm::psv::ptr next; - SceNpId npId; - u64 joinDate; - SceNpMatching2Role role; - u8 padding[7]; -}; - - -struct SceNpMatching2RoomMemberDataInternal -{ - vm::psv::ptr next; - SceNpId npId; - - u64 joinDate; - SceNpMatching2RoomMemberId memberId; - SceNpMatching2TeamId teamId; - u8 padding1[1]; - - vm::psv::ptr roomGroup; - - SceNpMatching2NatType natType; - u8 padding2[3]; - SceNpMatching2FlagAttr flagAttr; - vm::psv::ptr roomMemberBinAttrInternal; - u32 roomMemberBinAttrInternalNum; -}; - - -struct SceNpMatching2RoomMemberDataInternalList -{ - vm::psv::ptr members; - u32 membersNum; - vm::psv::ptr me; - vm::psv::ptr owner; -}; - - -struct SceNpMatching2RoomBinAttrInternal -{ - u64 updateDate; - SceNpMatching2RoomMemberId updateMemberId; - u8 padding[2]; - SceNpMatching2BinAttr data; -}; - - -struct SceNpMatching2RoomDataExternal -{ - vm::psv::ptr next; - - u16 maxSlot; - u16 curMemberNum; - - SceNpMatching2ServerId serverId; - u8 padding[2]; - SceNpMatching2WorldId worldId; - SceNpMatching2LobbyId lobbyId; - SceNpMatching2RoomId roomId; - - SceNpMatching2RoomPasswordSlotMask passwordSlotMask; - SceNpMatching2RoomJoinedSlotMask joinedSlotMask; - u16 publicSlotNum; - u16 privateSlotNum; - u16 openPublicSlotNum; - u16 openPrivateSlotNum; - - vm::psv::ptr owner; - SceNpMatching2FlagAttr flagAttr; - - vm::psv::ptr roomGroup; - u32 roomGroupNum; - vm::psv::ptr roomSearchableIntAttrExternal; - u32 roomSearchableIntAttrExternalNum; - vm::psv::ptr roomSearchableBinAttrExternal; - u32 roomSearchableBinAttrExternalNum; - vm::psv::ptr roomBinAttrExternal; - u32 roomBinAttrExternalNum; -}; - - -struct SceNpMatching2RoomDataInternal -{ - u16 maxSlot; - - SceNpMatching2ServerId serverId; - SceNpMatching2WorldId worldId; - SceNpMatching2LobbyId lobbyId; - SceNpMatching2RoomId roomId; - - SceNpMatching2RoomPasswordSlotMask passwordSlotMask; - SceNpMatching2RoomJoinedSlotMask joinedSlotMask; - u16 publicSlotNum; - u16 privateSlotNum; - u16 openPublicSlotNum; - u16 openPrivateSlotNum; - - SceNpMatching2RoomMemberDataInternalList memberList; - - vm::psv::ptr roomGroup; - u32 roomGroupNum; - - SceNpMatching2FlagAttr flagAttr; - u8 padding[4]; - vm::psv::ptr roomBinAttrInternal; - u32 roomBinAttrInternalNum; -}; - - -union SceNpMatching2RoomMessageDestination -{ - SceNpMatching2RoomMemberId unicastTarget; - struct - { - vm::psv::ptr memberId; - u32 memberIdNum; - - } multicastTarget; - SceNpMatching2TeamId multicastTargetTeamId; -}; - - -struct SceNpMatching2InvitationData -{ - vm::psv::ptr targetSession; - u32 targetSessionNum; - vm::psv::ptr optData; - u32 optDataLen; -}; - -typedef u16 SceNpMatching2Event; - -typedef vm::psv::ptr data, - vm::psv::ptr arg - )> SceNpMatching2RequestCallback; - -typedef vm::psv::ptr data, - vm::psv::ptr arg - )> SceNpMatching2LobbyEventCallback; - -typedef vm::psv::ptr data, - vm::psv::ptr arg - )> SceNpMatching2RoomEventCallback; - -typedef vm::psv::ptr data, - vm::psv::ptr arg - )> SceNpMatching2LobbyMessageCallback; - -typedef vm::psv::ptr data, - vm::psv::ptr arg - )> SceNpMatching2RoomMessageCallback; - -typedef vm::psv::ptr arg - )> SceNpMatching2SignalingCallback; - -typedef vm::psv::ptr arg - )> SceNpMatching2ContextCallback; - - -struct SceNpMatching2RequestOptParam -{ - SceNpMatching2RequestCallback cbFunc; - vm::psv::ptr cbFuncArg; - u32 timeout; - u16 appReqId; - u8 padding[2]; -}; - - -struct SceNpMatching2GetWorldInfoListRequest -{ - SceNpMatching2ServerId serverId; -}; - - - -struct SceNpMatching2GetWorldInfoListResponse -{ - vm::psv::ptr world; - u32 worldNum; -}; - -struct SceNpMatching2SetUserInfoRequest -{ - SceNpMatching2ServerId serverId; - u8 padding[2]; - vm::psv::ptr userBinAttr; - u32 userBinAttrNum; -}; - - -struct SceNpMatching2GetUserInfoListRequest -{ - SceNpMatching2ServerId serverId; - u8 padding[2]; - vm::psv::ptr npId; - u32 npIdNum; - vm::psv::ptr attrId; - u32 attrIdNum; - s32 option; -}; - - - -struct SceNpMatching2GetUserInfoListResponse -{ - vm::psv::ptr userInfo; - u32 userInfoNum; -}; - - -struct SceNpMatching2GetRoomMemberDataExternalListRequest -{ - SceNpMatching2RoomId roomId; -}; - - - -struct SceNpMatching2GetRoomMemberDataExternalListResponse -{ - vm::psv::ptr roomMemberDataExternal; - u32 roomMemberDataExternalNum; -}; - - -struct SceNpMatching2SetRoomDataExternalRequest -{ - SceNpMatching2RoomId roomId; - vm::psv::ptr roomSearchableIntAttrExternal; - u32 roomSearchableIntAttrExternalNum; - vm::psv::ptr roomSearchableBinAttrExternal; - u32 roomSearchableBinAttrExternalNum; - vm::psv::ptr roomBinAttrExternal; - u32 roomBinAttrExternalNum; -}; - - -struct SceNpMatching2GetRoomDataExternalListRequest -{ - vm::psv::ptr roomId; - u32 roomIdNum; - vm::psv::ptr attrId; - u32 attrIdNum; -}; - - - -struct SceNpMatching2GetRoomDataExternalListResponse -{ - vm::psv::ptr roomDataExternal; - u32 roomDataExternalNum; -}; - -typedef u8 SceNpMatching2SignalingType; -typedef u8 SceNpMatching2SignalingFlag; - -struct SceNpMatching2SignalingOptParam -{ - SceNpMatching2SignalingType type; - SceNpMatching2SignalingFlag flag; - SceNpMatching2RoomMemberId hubMemberId; - u8 reserved2[4]; -}; - - - -struct SceNpMatching2CreateJoinRoomRequest -{ - SceNpMatching2WorldId worldId; - u8 padding1[4]; - SceNpMatching2LobbyId lobbyId; - - u32 maxSlot; - SceNpMatching2FlagAttr flagAttr; - vm::psv::ptr roomBinAttrInternal; - u32 roomBinAttrInternalNum; - vm::psv::ptr roomSearchableIntAttrExternal; - u32 roomSearchableIntAttrExternalNum; - vm::psv::ptr roomSearchableBinAttrExternal; - u32 roomSearchableBinAttrExternalNum; - vm::psv::ptr roomBinAttrExternal; - u32 roomBinAttrExternalNum; - vm::psv::ptr roomPassword; - vm::psv::ptr groupConfig; - u32 groupConfigNum; - vm::psv::ptr passwordSlotMask; - vm::psv::ptr allowedUser; - u32 allowedUserNum; - vm::psv::ptr blockedUser; - u32 blockedUserNum; - - vm::psv::ptr joinRoomGroupLabel; - vm::psv::ptr roomMemberBinAttrInternal; - u32 roomMemberBinAttrInternalNum; - SceNpMatching2TeamId teamId; - u8 padding2[3]; - - vm::psv::ptr sigOptParam; - u8 padding3[4]; -}; - - - -struct SceNpMatching2CreateJoinRoomResponse -{ - vm::psv::ptr roomDataInternal; -}; - - -struct SceNpMatching2JoinRoomRequest -{ - SceNpMatching2RoomId roomId; - vm::psv::ptr roomPassword; - vm::psv::ptr joinRoomGroupLabel; - vm::psv::ptr roomMemberBinAttrInternal; - u32 roomMemberBinAttrInternalNum; - SceNpMatching2PresenceOptionData optData; - SceNpMatching2TeamId teamId; - u8 padding[3]; - vm::psv::ptr blockedUser; - u32 blockedUserNum; -}; - - - -struct SceNpMatching2JoinRoomResponse -{ - vm::psv::ptr roomDataInternal; -}; - - -struct SceNpMatching2LeaveRoomRequest -{ - SceNpMatching2RoomId roomId; - SceNpMatching2PresenceOptionData optData; - u8 padding[4]; -}; - - -struct SceNpMatching2GrantRoomOwnerRequest -{ - SceNpMatching2RoomId roomId; - SceNpMatching2RoomMemberId newOwner; - u8 padding[2]; - SceNpMatching2PresenceOptionData optData; -}; - - -struct SceNpMatching2KickoutRoomMemberRequest -{ - SceNpMatching2RoomId roomId; - SceNpMatching2RoomMemberId target; - SceNpMatching2BlockKickFlag blockKickFlag; - u8 padding[1]; - SceNpMatching2PresenceOptionData optData; -}; - - -struct SceNpMatching2SearchRoomRequest -{ - s32 option; - SceNpMatching2WorldId worldId; - SceNpMatching2LobbyId lobbyId; - SceNpMatching2RangeFilter rangeFilter; - SceNpMatching2FlagAttr flagFilter; - SceNpMatching2FlagAttr flagAttr; - vm::psv::ptr intFilter; - u32 intFilterNum; - vm::psv::ptr binFilter; - u32 binFilterNum; - vm::psv::ptr attrId; - u32 attrIdNum; -}; - - - -struct SceNpMatching2SearchRoomResponse -{ - SceNpMatching2Range range; - vm::psv::ptr roomDataExternal; -}; - - -struct SceNpMatching2SendRoomMessageRequest -{ - SceNpMatching2RoomId roomId; - SceNpMatching2CastType castType; - u8 padding[3]; - SceNpMatching2RoomMessageDestination dst; - vm::psv::ptr msg; - u32 msgLen; - s32 option; -}; - - -struct SceNpMatching2SendRoomChatMessageRequest -{ - SceNpMatching2RoomId roomId; - SceNpMatching2CastType castType; - u8 padding[3]; - SceNpMatching2RoomMessageDestination dst; - vm::psv::ptr msg; - u32 msgLen; - s32 option; -}; - - - -struct SceNpMatching2SendRoomChatMessageResponse -{ - bool filtered; -}; - - -struct SceNpMatching2SetRoomDataInternalRequest -{ - SceNpMatching2RoomId roomId; - SceNpMatching2FlagAttr flagFilter; - SceNpMatching2FlagAttr flagAttr; - vm::psv::ptr roomBinAttrInternal; - u32 roomBinAttrInternalNum; - vm::psv::ptr passwordConfig; - u32 passwordConfigNum; - vm::psv::ptr passwordSlotMask; - vm::psv::ptr ownerPrivilegeRank; - u32 ownerPrivilegeRankNum; - u8 padding[4]; -}; - - -struct SceNpMatching2GetRoomDataInternalRequest -{ - SceNpMatching2RoomId roomId; - vm::psv::ptr attrId; - u32 attrIdNum; -}; - - - -struct SceNpMatching2GetRoomDataInternalResponse -{ - vm::psv::ptr roomDataInternal; -}; - - -struct SceNpMatching2SetRoomMemberDataInternalRequest -{ - SceNpMatching2RoomId roomId; - SceNpMatching2RoomMemberId memberId; - SceNpMatching2TeamId teamId; - u8 padding[5]; - SceNpMatching2FlagAttr flagFilter; - SceNpMatching2FlagAttr flagAttr; - vm::psv::ptr roomMemberBinAttrInternal; - u32 roomMemberBinAttrInternalNum; -}; - - -struct SceNpMatching2GetRoomMemberDataInternalRequest -{ - SceNpMatching2RoomId roomId; - SceNpMatching2RoomMemberId memberId; - u8 padding[6]; - vm::psv::ptr attrId; - u32 attrIdNum; -}; - - - -struct SceNpMatching2GetRoomMemberDataInternalResponse -{ - vm::psv::ptr roomMemberDataInternal; -}; - - -struct SceNpMatching2SetSignalingOptParamRequest -{ - SceNpMatching2RoomId roomId; - SceNpMatching2SignalingOptParam sigOptParam; -}; - - -struct SceNpMatching2GetLobbyInfoListRequest -{ - SceNpMatching2WorldId worldId; - SceNpMatching2RangeFilter rangeFilter; - vm::psv::ptr attrId; - u32 attrIdNum; -}; - - - -struct SceNpMatching2GetLobbyInfoListResponse -{ - SceNpMatching2Range range; - vm::psv::ptr lobbyDataExternal; -}; - - -struct SceNpMatching2JoinLobbyRequest -{ - SceNpMatching2LobbyId lobbyId; - vm::psv::ptr joinedSessionInfo; - u32 joinedSessionInfoNum; - vm::psv::ptr lobbyMemberBinAttrInternal; - u32 lobbyMemberBinAttrInternalNum; - SceNpMatching2PresenceOptionData optData; - u8 padding[4]; -}; - - - -struct SceNpMatching2JoinLobbyResponse -{ - vm::psv::ptr lobbyDataInternal; -}; - - -struct SceNpMatching2LeaveLobbyRequest -{ - SceNpMatching2LobbyId lobbyId; - SceNpMatching2PresenceOptionData optData; - u8 padding[4]; -}; - - -struct SceNpMatching2SetLobbyMemberDataInternalRequest -{ - SceNpMatching2LobbyId lobbyId; - SceNpMatching2LobbyMemberId memberId; - u8 padding1[2]; - SceNpMatching2FlagAttr flagFilter; - SceNpMatching2FlagAttr flagAttr; - vm::psv::ptr joinedSessionInfo; - u32 joinedSessionInfoNum; - vm::psv::ptr lobbyMemberBinAttrInternal; - u32 lobbyMemberBinAttrInternalNum; - u8 padding2[4]; -}; - - -struct SceNpMatching2GetLobbyMemberDataInternalRequest -{ - SceNpMatching2LobbyId lobbyId; - SceNpMatching2LobbyMemberId memberId; - u8 padding[6]; - vm::psv::ptr attrId; - u32 attrIdNum; -}; - - - -struct SceNpMatching2GetLobbyMemberDataInternalResponse -{ - vm::psv::ptr lobbyMemberDataInternal; -}; - - - -struct SceNpMatching2GetLobbyMemberDataInternalListRequest -{ - SceNpMatching2LobbyId lobbyId; - vm::psv::ptr memberId; - u32 memberIdNum; - vm::psv::ptr attrId; - u32 attrIdNum; - bool extendedData; - u8 padding[7]; -}; - - - -struct SceNpMatching2GetLobbyMemberDataInternalListResponse -{ - vm::psv::ptr lobbyMemberDataInternal; - u32 lobbyMemberDataInternalNum; -}; - - -struct SceNpMatching2SendLobbyChatMessageRequest -{ - SceNpMatching2LobbyId lobbyId; - SceNpMatching2CastType castType; - u8 padding[3]; - SceNpMatching2LobbyMessageDestination dst; - vm::psv::ptr msg; - u32 msgLen; - s32 option; -}; - - - -struct SceNpMatching2SendLobbyChatMessageResponse -{ - bool filtered; -}; - - -struct SceNpMatching2SendLobbyInvitationRequest -{ - SceNpMatching2LobbyId lobbyId; - SceNpMatching2CastType castType; - u8 padding[3]; - SceNpMatching2LobbyMessageDestination dst; - SceNpMatching2InvitationData invitationData; - s32 option; -}; - - -struct SceNpMatching2RoomMemberUpdateInfo -{ - vm::psv::ptr roomMemberDataInternal; - SceNpMatching2EventCause eventCause; - u8 padding[3]; - SceNpMatching2PresenceOptionData optData; -}; - - -struct SceNpMatching2RoomOwnerUpdateInfo -{ - SceNpMatching2RoomMemberId prevOwner; - SceNpMatching2RoomMemberId newOwner; - SceNpMatching2EventCause eventCause; - u8 padding[3]; - vm::psv::ptr roomPassword; - SceNpMatching2PresenceOptionData optData; -}; - - -struct SceNpMatching2RoomUpdateInfo -{ - SceNpMatching2EventCause eventCause; - u8 padding[3]; - s32 errorCode; - SceNpMatching2PresenceOptionData optData; -}; - - -struct SceNpMatching2RoomDataInternalUpdateInfo -{ - vm::psv::ptr newRoomDataInternal; - vm::psv::ptr newFlagAttr; - vm::psv::ptr prevFlagAttr; - vm::psv::ptr newRoomPasswordSlotMask; - vm::psv::ptr prevRoomPasswordSlotMask; - vm::psv::ptr *newRoomGroup; - u32 newRoomGroupNum; - vm::psv::ptr *newRoomBinAttrInternal; - u32 newRoomBinAttrInternalNum; -}; - - -struct SceNpMatching2RoomMemberDataInternalUpdateInfo -{ - vm::psv::ptr newRoomMemberDataInternal; - vm::psv::ptr newFlagAttr; - vm::psv::ptr prevFlagAttr; - vm::psv::ptr newTeamId; - vm::psv::ptr *newRoomMemberBinAttrInternal; - u32 newRoomMemberBinAttrInternalNum; -}; - - -struct SceNpMatching2SignalingOptParamUpdateInfo -{ - SceNpMatching2SignalingOptParam newSignalingOptParam; -}; - - -struct SceNpMatching2RoomMessageInfo -{ - bool filtered; - SceNpMatching2CastType castType; - u8 padding[2]; - vm::psv::ptr dst; - vm::psv::ptr srcMember; - vm::psv::ptr msg; - u32 msgLen; -}; - - -struct SceNpMatching2LobbyMemberUpdateInfo -{ - vm::psv::ptr lobbyMemberDataInternal; - SceNpMatching2EventCause eventCause; - u8 padding[3]; - SceNpMatching2PresenceOptionData optData; -}; - - -struct SceNpMatching2LobbyUpdateInfo -{ - SceNpMatching2EventCause eventCause; - u8 padding[3]; - s32 errorCode; -}; - - -struct SceNpMatching2LobbyMemberDataInternalUpdateInfo -{ - SceNpMatching2LobbyMemberId memberId; - u8 padding[2]; - SceNpId npId; - SceNpMatching2FlagAttr flagFilter; - SceNpMatching2FlagAttr newFlagAttr; - vm::psv::ptr newJoinedSessionInfo; - u32 newJoinedSessionInfoNum; - vm::psv::ptr newLobbyMemberBinAttrInternal; - u32 newLobbyMemberBinAttrInternalNum; -}; - - -struct SceNpMatching2LobbyMessageInfo -{ - bool filtered; - SceNpMatching2CastType castType; - u8 padding[2]; - vm::psv::ptr dst; - vm::psv::ptr srcMember; - vm::psv::ptr msg; - u32 msgLen; -}; - - -struct SceNpMatching2LobbyInvitationInfo -{ - SceNpMatching2CastType castType; - u8 padding[3]; - vm::psv::ptr dst; - vm::psv::ptr srcMember; - SceNpMatching2InvitationData invitationData; -}; - -union SceNpMatching2SignalingConnectionInfo -{ - u32 rtt; - u32 bandwidth; - SceNpId npId; - struct - { - SceNetInAddr addr; - u16 port; - u8 padding[2]; - - } address; - u32 packetLoss; -}; - -struct SceNpMatching2SignalingNetInfo -{ - u32 size; - SceNetInAddr localAddr; - SceNetInAddr mappedAddr; - s32 natStatus; -}; +#include "sceNpMatching.h" // Functions -s32 sceNpMatching2Init( - const u32 poolSize, - const s32 threadPriority, - const s32 cpuAffinityMask, - const u32 threadStackSize) +s32 sceNpMatching2Init(u32 poolSize, s32 threadPriority, s32 cpuAffinityMask, u32 threadStackSize) { throw __FUNCTION__; } @@ -1095,209 +17,209 @@ s32 sceNpMatching2Term() } s32 sceNpMatching2CreateContext( - vm::psv::ptr npId, - vm::psv::ptr commId, - vm::psv::ptr passPhrase, - vm::psv::ptr ctxId) + vm::ptr npId, + vm::ptr commId, + vm::ptr passPhrase, + vm::ptr ctxId) { throw __FUNCTION__; } -s32 sceNpMatching2DestroyContext(const SceNpMatching2ContextId ctxId) +s32 sceNpMatching2DestroyContext(u16 ctxId) { throw __FUNCTION__; } -s32 sceNpMatching2ContextStart(const SceNpMatching2ContextId ctxId, const u64 timeout) +s32 sceNpMatching2ContextStart(u16 ctxId, u64 timeout) { throw __FUNCTION__; } -s32 sceNpMatching2AbortContextStart(const SceNpMatching2ContextId ctxId) +s32 sceNpMatching2AbortContextStart(u16 ctxId) { throw __FUNCTION__; } -s32 sceNpMatching2ContextStop(const SceNpMatching2ContextId ctxId) +s32 sceNpMatching2ContextStop(u16 ctxId) { throw __FUNCTION__; } -s32 sceNpMatching2SetDefaultRequestOptParam(const SceNpMatching2ContextId ctxId, vm::psv::ptr optParam) +s32 sceNpMatching2SetDefaultRequestOptParam(u16 ctxId, vm::ptr optParam) { throw __FUNCTION__; } -s32 sceNpMatching2RegisterRoomEventCallback(const SceNpMatching2ContextId ctxId, SceNpMatching2RoomEventCallback cbFunc, vm::psv::ptr cbFuncArg) +s32 sceNpMatching2RegisterRoomEventCallback(u16 ctxId, vm::ptr cbFunc, vm::ptr cbFuncArg) { throw __FUNCTION__; } -s32 sceNpMatching2RegisterRoomMessageCallback(const SceNpMatching2ContextId ctxId, SceNpMatching2RoomMessageCallback cbFunc, vm::psv::ptr cbFuncArg) +s32 sceNpMatching2RegisterRoomMessageCallback(u16 ctxId, vm::ptr cbFunc, vm::ptr cbFuncArg) { throw __FUNCTION__; } -s32 sceNpMatching2RegisterSignalingCallback(const SceNpMatching2ContextId ctxId, SceNpMatching2SignalingCallback cbFunc, vm::psv::ptr cbFuncArg) +s32 sceNpMatching2RegisterSignalingCallback(u16 ctxId, vm::ptr cbFunc, vm::ptr cbFuncArg) { throw __FUNCTION__; } -s32 sceNpMatching2RegisterContextCallback(SceNpMatching2ContextCallback cbFunc, vm::psv::ptr cbFuncArg) +s32 sceNpMatching2RegisterContextCallback(vm::ptr cbFunc, vm::ptr cbFuncArg) { throw __FUNCTION__; } -s32 sceNpMatching2AbortRequest(const SceNpMatching2ContextId ctxId, const SceNpMatching2RequestId reqId) +s32 sceNpMatching2AbortRequest(u16 ctxId, u32 reqId) { throw __FUNCTION__; } -s32 sceNpMatching2GetMemoryInfo(vm::psv::ptr memInfo) +s32 sceNpMatching2GetMemoryInfo(vm::ptr memInfo) { throw __FUNCTION__; } -s32 sceNpMatching2GetServerLocal(const SceNpMatching2ContextId ctxId, vm::psv::ptr server) +s32 sceNpMatching2GetServerLocal(u16 ctxId, vm::ptr server) { throw __FUNCTION__; } s32 sceNpMatching2GetWorldInfoList( - const SceNpMatching2ContextId ctxId, - vm::psv::ptr reqParam, - vm::psv::ptr optParam, - vm::psv::ptr assignedReqId) + u16 ctxId, + vm::ptr reqParam, + vm::ptr optParam, + vm::ptr assignedReqId) { throw __FUNCTION__; } s32 sceNpMatching2CreateJoinRoom( - const SceNpMatching2ContextId ctxId, - vm::psv::ptr reqParam, - vm::psv::ptr optParam, - vm::psv::ptr assignedReqId) + u16 ctxId, + vm::ptr reqParam, + vm::ptr optParam, + vm::ptr assignedReqId) { throw __FUNCTION__; } s32 sceNpMatching2SearchRoom( - const SceNpMatching2ContextId ctxId, - vm::psv::ptr reqParam, - vm::psv::ptr optParam, - vm::psv::ptr assignedReqId) + u16 ctxId, + vm::ptr reqParam, + vm::ptr optParam, + vm::ptr assignedReqId) { throw __FUNCTION__; } s32 sceNpMatching2JoinRoom( - const SceNpMatching2ContextId ctxId, - vm::psv::ptr reqParam, - vm::psv::ptr optParam, - vm::psv::ptr assignedReqId) + u16 ctxId, + vm::ptr reqParam, + vm::ptr optParam, + vm::ptr assignedReqId) { throw __FUNCTION__; } s32 sceNpMatching2LeaveRoom( - const SceNpMatching2ContextId ctxId, - vm::psv::ptr reqParam, - vm::psv::ptr optParam, - vm::psv::ptr assignedReqId) + u16 ctxId, + vm::ptr reqParam, + vm::ptr optParam, + vm::ptr assignedReqId) { throw __FUNCTION__; } s32 sceNpMatching2GetSignalingOptParamLocal( - const SceNpMatching2ContextId ctxId, - const SceNpMatching2RoomId roomId, - vm::psv::ptr signalingOptParam) + u16 ctxId, + u64 roomId, + vm::ptr signalingOptParam) { throw __FUNCTION__; } s32 sceNpMatching2SetRoomDataExternal( - const SceNpMatching2ContextId ctxId, - vm::psv::ptr reqParam, - vm::psv::ptr optParam, - vm::psv::ptr assignedReqId) + u16 ctxId, + vm::ptr reqParam, + vm::ptr optParam, + vm::ptr assignedReqId) { throw __FUNCTION__; } s32 sceNpMatching2KickoutRoomMember( - const SceNpMatching2ContextId ctxId, - vm::psv::ptr reqParam, - vm::psv::ptr optParam, - vm::psv::ptr assignedReqId) + u16 ctxId, + vm::ptr reqParam, + vm::ptr optParam, + vm::ptr assignedReqId) { throw __FUNCTION__; } s32 sceNpMatching2SendRoomChatMessage( - const SceNpMatching2ContextId ctxId, - vm::psv::ptr reqParam, - vm::psv::ptr optParam, - vm::psv::ptr assignedReqId) + u16 ctxId, + vm::ptr reqParam, + vm::ptr optParam, + vm::ptr assignedReqId) { throw __FUNCTION__; } s32 sceNpMatching2SendRoomMessage( - const SceNpMatching2ContextId ctxId, - vm::psv::ptr reqParam, - vm::psv::ptr optParam, - vm::psv::ptr assignedReqId) + u16 ctxId, + vm::ptr reqParam, + vm::ptr optParam, + vm::ptr assignedReqId) { throw __FUNCTION__; } s32 sceNpMatching2SignalingGetConnectionStatus( - SceNpMatching2ContextId ctxId, - SceNpMatching2RoomId roomId, - SceNpMatching2RoomMemberId memberId, - vm::psv::ptr connStatus, - vm::psv::ptr peerAddr, - vm::psv::ptr peerPort) + u16 ctxId, + u64 roomId, + u16 memberId, + vm::ptr connStatus, + vm::ptr peerAddr, + vm::ptr peerPort) { throw __FUNCTION__; } s32 sceNpMatching2SignalingGetConnectionInfo( - SceNpMatching2ContextId ctxId, - SceNpMatching2RoomId roomId, - SceNpMatching2RoomMemberId memberId, + u16 ctxId, + u64 roomId, + u16 memberId, s32 code, - vm::psv::ptr info) + vm::ptr info) { throw __FUNCTION__; } -s32 sceNpMatching2SignalingGetLocalNetInfo(vm::psv::ptr netinfo) +s32 sceNpMatching2SignalingGetLocalNetInfo(vm::ptr netinfo) { throw __FUNCTION__; } s32 sceNpMatching2SignalingGetPeerNetInfo( - SceNpMatching2ContextId ctxId, - SceNpMatching2RoomId roomId, - SceNpMatching2RoomMemberId memberId, - vm::psv::ptr reqId) + u16 ctxId, + u64 roomId, + u16 memberId, + vm::ptr reqId) { throw __FUNCTION__; } s32 sceNpMatching2SignalingCancelPeerNetInfo( - SceNpMatching2ContextId ctxId, - SceNpMatching2SignalingRequestId reqId) + u16 ctxId, + u32 reqId) { throw __FUNCTION__; } s32 sceNpMatching2SignalingGetPeerNetInfoResult( - SceNpMatching2ContextId ctxId, - SceNpMatching2SignalingRequestId reqId, - vm::psv::ptr netinfo) + u16 ctxId, + u32 reqId, + vm::ptr netinfo) { throw __FUNCTION__; } @@ -1309,6 +231,7 @@ psv_log_base sceNpMatching("SceNpMatching2", []() sceNpMatching.on_load = nullptr; sceNpMatching.on_unload = nullptr; sceNpMatching.on_stop = nullptr; + sceNpMatching.on_error = nullptr; REG_FUNC(0xEBB1FE74, sceNpMatching2Init); REG_FUNC(0x0124641C, sceNpMatching2Term); diff --git a/rpcs3/Emu/ARMv7/Modules/sceNpMatching.h b/rpcs3/Emu/ARMv7/Modules/sceNpMatching.h new file mode 100644 index 0000000000..a27b259903 --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/sceNpMatching.h @@ -0,0 +1,989 @@ +#pragma once + +#include "sceNet.h" +#include "sceNpCommon.h" + +struct SceNpMatching2MemoryInfo +{ + le_t totalMemSize; + le_t curMemUsage; + le_t maxMemUsage; + u8 reserved[12]; +}; + +struct SceNpMatching2SessionPassword +{ + u8 data[8]; +}; + +struct SceNpMatching2PresenceOptionData +{ + u8 data[16]; + le_t len; +}; + +struct SceNpMatching2IntAttr +{ + le_t id; + u8 padding[2]; + le_t num; +}; + + +struct SceNpMatching2BinAttr +{ + le_t id; + u8 padding[2]; + vm::lptr ptr; + le_t size; +}; + + +struct SceNpMatching2RangeFilter +{ + le_t startIndex; + le_t max; +}; + + +struct SceNpMatching2IntSearchFilter +{ + u8 searchOperator; + u8 padding[3]; + SceNpMatching2IntAttr attr; +}; + + +struct SceNpMatching2BinSearchFilter +{ + u8 searchOperator; + u8 padding[3]; + SceNpMatching2BinAttr attr; +}; + + +struct SceNpMatching2Range +{ + le_t startIndex; + le_t total; + le_t resultCount; +}; + + +struct SceNpMatching2JoinedSessionInfo +{ + u8 sessionType; + u8 padding1[1]; + le_t serverId; + le_t worldId; + le_t lobbyId; + le_t roomId; + le_t joinDate; +}; + + +struct SceNpMatching2UserInfo +{ + vm::lptr next; + SceNpId npId; + vm::lptr userBinAttr; + le_t userBinAttrNum; + vm::lptr joinedSessionInfo; + le_t joinedSessionInfoNum; +}; + +struct SceNpMatching2Server +{ + le_t serverId; + u8 status; + u8 padding[1]; +}; + + +struct SceNpMatching2World +{ + vm::lptr next; + le_t worldId; + le_t numOfLobby; + le_t maxNumOfTotalLobbyMember; + le_t curNumOfTotalLobbyMember; + le_t curNumOfRoom; + le_t curNumOfTotalRoomMember; + bool withEntitlementId; + SceNpEntitlementId entitlementId; + u8 padding[3]; +}; + +struct SceNpMatching2LobbyMemberBinAttrInternal +{ + le_t updateDate; + SceNpMatching2BinAttr data; + u8 padding[4]; +}; + + +struct SceNpMatching2LobbyMemberDataInternal +{ + vm::lptr next; + SceNpId npId; + + le_t joinDate; + le_t memberId; + u8 padding[2]; + + le_t flagAttr; + + vm::lptr joinedSessionInfo; + le_t joinedSessionInfoNum; + vm::lptr lobbyMemberBinAttrInternal; + le_t lobbyMemberBinAttrInternalNum; +}; + + +struct SceNpMatching2LobbyMemberIdList +{ + vm::lptr memberId; + le_t memberIdNum; + le_t me; + u8 padding[6]; +}; + + +struct SceNpMatching2LobbyBinAttrInternal +{ + le_t updateDate; + le_t updateMemberId; + u8 padding[2]; + SceNpMatching2BinAttr data; +}; + + +struct SceNpMatching2LobbyDataExternal +{ + vm::lptr next; + le_t serverId; + u8 padding1[2]; + le_t worldId; + u8 padding2[4]; + le_t lobbyId; + le_t maxSlot; + le_t curMemberNum; + le_t flagAttr; + vm::lptr lobbySearchableIntAttrExternal; + le_t lobbySearchableIntAttrExternalNum; + vm::lptr lobbySearchableBinAttrExternal; + le_t lobbySearchableBinAttrExternalNum; + vm::lptr lobbyBinAttrExternal; + le_t lobbyBinAttrExternalNum; + u8 padding3[4]; +}; + + +struct SceNpMatching2LobbyDataInternal +{ + le_t serverId; + u8 padding1[2]; + le_t worldId; + le_t lobbyId; + + le_t maxSlot; + SceNpMatching2LobbyMemberIdList memberIdList; + le_t flagAttr; + vm::lptr lobbyBinAttrInternal; + le_t lobbyBinAttrInternalNum; +}; + + +union SceNpMatching2LobbyMessageDestination +{ + le_t unicastTarget; + + struct + { + vm::lptr memberId; + le_t memberIdNum; + } + multicastTarget; +}; + +struct SceNpMatching2GroupLabel +{ + u8 data[8]; +}; + +struct SceNpMatching2RoomGroupConfig +{ + le_t slotNum; + bool withLabel; + SceNpMatching2GroupLabel label; + bool withPassword; + u8 padding[2]; +}; + + +struct SceNpMatching2RoomGroupPasswordConfig +{ + u8 groupId; + bool withPassword; + u8 padding[1]; +}; + + +struct SceNpMatching2RoomMemberBinAttrInternal +{ + le_t updateDate; + SceNpMatching2BinAttr data; + u8 padding[4]; +}; + + +struct SceNpMatching2RoomGroup +{ + u8 groupId; + bool withPassword; + bool withLabel; + u8 padding[1]; + SceNpMatching2GroupLabel label; + le_t slotNum; + le_t curGroupMemberNum; +}; + + +struct SceNpMatching2RoomMemberDataExternal +{ + vm::lptr next; + SceNpId npId; + le_t joinDate; + u8 role; + u8 padding[7]; +}; + + +struct SceNpMatching2RoomMemberDataInternal +{ + vm::lptr next; + SceNpId npId; + + le_t joinDate; + le_t memberId; + u8 teamId; + u8 padding1[1]; + + vm::lptr roomGroup; + + u8 natType; + u8 padding2[3]; + le_t flagAttr; + vm::lptr roomMemberBinAttrInternal; + le_t roomMemberBinAttrInternalNum; +}; + + +struct SceNpMatching2RoomMemberDataInternalList +{ + vm::lptr members; + le_t membersNum; + vm::lptr me; + vm::lptr owner; +}; + + +struct SceNpMatching2RoomBinAttrInternal +{ + le_t updateDate; + le_t updateMemberId; + u8 padding[2]; + SceNpMatching2BinAttr data; +}; + + +struct SceNpMatching2RoomDataExternal +{ + vm::lptr next; + + le_t maxSlot; + le_t curMemberNum; + + le_t serverId; + u8 padding[2]; + le_t worldId; + le_t lobbyId; + le_t roomId; + + le_t passwordSlotMask; + le_t joinedSlotMask; + le_t publicSlotNum; + le_t privateSlotNum; + le_t openPublicSlotNum; + le_t openPrivateSlotNum; + + vm::lptr owner; + le_t flagAttr; + + vm::lptr roomGroup; + le_t roomGroupNum; + vm::lptr roomSearchableIntAttrExternal; + le_t roomSearchableIntAttrExternalNum; + vm::lptr roomSearchableBinAttrExternal; + le_t roomSearchableBinAttrExternalNum; + vm::lptr roomBinAttrExternal; + le_t roomBinAttrExternalNum; +}; + + +struct SceNpMatching2RoomDataInternal +{ + le_t maxSlot; + + le_t serverId; + le_t worldId; + le_t lobbyId; + le_t roomId; + + le_t passwordSlotMask; + le_t joinedSlotMask; + le_t publicSlotNum; + le_t privateSlotNum; + le_t openPublicSlotNum; + le_t openPrivateSlotNum; + + SceNpMatching2RoomMemberDataInternalList memberList; + + vm::lptr roomGroup; + le_t roomGroupNum; + + le_t flagAttr; + u8 padding[4]; + vm::lptr roomBinAttrInternal; + le_t roomBinAttrInternalNum; +}; + + +union SceNpMatching2RoomMessageDestination +{ + le_t unicastTarget; + + struct + { + vm::lptr memberId; + le_t memberIdNum; + } + multicastTarget; + + u8 multicastTargetTeamId; +}; + + +struct SceNpMatching2InvitationData +{ + vm::lptr targetSession; + le_t targetSessionNum; + vm::lptr optData; + le_t optDataLen; +}; + +using SceNpMatching2RequestCallback = func_def data, vm::ptr arg)>; +using SceNpMatching2LobbyEventCallback = func_def data, vm::ptr arg)>; +using SceNpMatching2RoomEventCallback = func_def data, vm::ptr arg)>; +using SceNpMatching2LobbyMessageCallback = func_def data, vm::ptr arg)>; +using SceNpMatching2RoomMessageCallback = func_def data, vm::ptr arg)>; +using SceNpMatching2SignalingCallback = func_def arg)>; +using SceNpMatching2ContextCallback = func_def arg)>; + +struct SceNpMatching2RequestOptParam +{ + vm::lptr cbFunc; + vm::lptr cbFuncArg; + le_t timeout; + le_t appReqId; + u8 padding[2]; +}; + + +struct SceNpMatching2GetWorldInfoListRequest +{ + le_t serverId; +}; + + + +struct SceNpMatching2GetWorldInfoListResponse +{ + vm::lptr world; + le_t worldNum; +}; + +struct SceNpMatching2SetUserInfoRequest +{ + le_t serverId; + u8 padding[2]; + vm::lptr userBinAttr; + le_t userBinAttrNum; +}; + + +struct SceNpMatching2GetUserInfoListRequest +{ + le_t serverId; + u8 padding[2]; + vm::lptr npId; + le_t npIdNum; + vm::lptr attrId; + le_t attrIdNum; + le_t option; +}; + + + +struct SceNpMatching2GetUserInfoListResponse +{ + vm::lptr userInfo; + le_t userInfoNum; +}; + + +struct SceNpMatching2GetRoomMemberDataExternalListRequest +{ + le_t roomId; +}; + + + +struct SceNpMatching2GetRoomMemberDataExternalListResponse +{ + vm::lptr roomMemberDataExternal; + le_t roomMemberDataExternalNum; +}; + + +struct SceNpMatching2SetRoomDataExternalRequest +{ + le_t roomId; + vm::lptr roomSearchableIntAttrExternal; + le_t roomSearchableIntAttrExternalNum; + vm::lptr roomSearchableBinAttrExternal; + le_t roomSearchableBinAttrExternalNum; + vm::lptr roomBinAttrExternal; + le_t roomBinAttrExternalNum; +}; + + +struct SceNpMatching2GetRoomDataExternalListRequest +{ + vm::lptr roomId; + le_t roomIdNum; + vm::lptr attrId; + le_t attrIdNum; +}; + + + +struct SceNpMatching2GetRoomDataExternalListResponse +{ + vm::lptr roomDataExternal; + le_t roomDataExternalNum; +}; + +struct SceNpMatching2SignalingOptParam +{ + u8 type; + u8 flag; + le_t hubMemberId; + u8 reserved2[4]; +}; + + + +struct SceNpMatching2CreateJoinRoomRequest +{ + le_t worldId; + u8 padding1[4]; + le_t lobbyId; + + le_t maxSlot; + le_t flagAttr; + vm::lptr roomBinAttrInternal; + le_t roomBinAttrInternalNum; + vm::lptr roomSearchableIntAttrExternal; + le_t roomSearchableIntAttrExternalNum; + vm::lptr roomSearchableBinAttrExternal; + le_t roomSearchableBinAttrExternalNum; + vm::lptr roomBinAttrExternal; + le_t roomBinAttrExternalNum; + vm::lptr roomPassword; + vm::lptr groupConfig; + le_t groupConfigNum; + vm::lptr passwordSlotMask; + vm::lptr allowedUser; + le_t allowedUserNum; + vm::lptr blockedUser; + le_t blockedUserNum; + + vm::lptr joinRoomGroupLabel; + vm::lptr roomMemberBinAttrInternal; + le_t roomMemberBinAttrInternalNum; + u8 teamId; + u8 padding2[3]; + + vm::lptr sigOptParam; + u8 padding3[4]; +}; + + + +struct SceNpMatching2CreateJoinRoomResponse +{ + vm::lptr roomDataInternal; +}; + + +struct SceNpMatching2JoinRoomRequest +{ + le_t roomId; + vm::lptr roomPassword; + vm::lptr joinRoomGroupLabel; + vm::lptr roomMemberBinAttrInternal; + le_t roomMemberBinAttrInternalNum; + SceNpMatching2PresenceOptionData optData; + u8 teamId; + u8 padding[3]; + vm::lptr blockedUser; + le_t blockedUserNum; +}; + + + +struct SceNpMatching2JoinRoomResponse +{ + vm::lptr roomDataInternal; +}; + + +struct SceNpMatching2LeaveRoomRequest +{ + le_t roomId; + SceNpMatching2PresenceOptionData optData; + u8 padding[4]; +}; + + +struct SceNpMatching2GrantRoomOwnerRequest +{ + le_t roomId; + le_t newOwner; + u8 padding[2]; + SceNpMatching2PresenceOptionData optData; +}; + + +struct SceNpMatching2KickoutRoomMemberRequest +{ + le_t roomId; + le_t target; + u8 blockKickFlag; + u8 padding[1]; + SceNpMatching2PresenceOptionData optData; +}; + + +struct SceNpMatching2SearchRoomRequest +{ + le_t option; + le_t worldId; + le_t lobbyId; + SceNpMatching2RangeFilter rangeFilter; + le_t flagFilter; + le_t flagAttr; + vm::lptr intFilter; + le_t intFilterNum; + vm::lptr binFilter; + le_t binFilterNum; + vm::lptr attrId; + le_t attrIdNum; +}; + + + +struct SceNpMatching2SearchRoomResponse +{ + SceNpMatching2Range range; + vm::lptr roomDataExternal; +}; + + +struct SceNpMatching2SendRoomMessageRequest +{ + le_t roomId; + u8 castType; + u8 padding[3]; + SceNpMatching2RoomMessageDestination dst; + vm::lcptr msg; + le_t msgLen; + le_t option; +}; + + +struct SceNpMatching2SendRoomChatMessageRequest +{ + le_t roomId; + u8 castType; + u8 padding[3]; + SceNpMatching2RoomMessageDestination dst; + vm::lptr msg; + le_t msgLen; + le_t option; +}; + + + +struct SceNpMatching2SendRoomChatMessageResponse +{ + bool filtered; +}; + + +struct SceNpMatching2SetRoomDataInternalRequest +{ + le_t roomId; + le_t flagFilter; + le_t flagAttr; + vm::lptr roomBinAttrInternal; + le_t roomBinAttrInternalNum; + vm::lptr passwordConfig; + le_t passwordConfigNum; + vm::lptr passwordSlotMask; + vm::lptr ownerPrivilegeRank; + le_t ownerPrivilegeRankNum; + u8 padding[4]; +}; + + +struct SceNpMatching2GetRoomDataInternalRequest +{ + le_t roomId; + vm::lcptr attrId; + le_t attrIdNum; +}; + + + +struct SceNpMatching2GetRoomDataInternalResponse +{ + vm::lptr roomDataInternal; +}; + + +struct SceNpMatching2SetRoomMemberDataInternalRequest +{ + le_t roomId; + le_t memberId; + u8 teamId; + u8 padding[5]; + le_t flagFilter; + le_t flagAttr; + vm::lptr roomMemberBinAttrInternal; + le_t roomMemberBinAttrInternalNum; +}; + + +struct SceNpMatching2GetRoomMemberDataInternalRequest +{ + le_t roomId; + le_t memberId; + u8 padding[6]; + vm::lcptr attrId; + le_t attrIdNum; +}; + + + +struct SceNpMatching2GetRoomMemberDataInternalResponse +{ + vm::lptr roomMemberDataInternal; +}; + + +struct SceNpMatching2SetSignalingOptParamRequest +{ + le_t roomId; + SceNpMatching2SignalingOptParam sigOptParam; +}; + + +struct SceNpMatching2GetLobbyInfoListRequest +{ + le_t worldId; + SceNpMatching2RangeFilter rangeFilter; + vm::lptr attrId; + le_t attrIdNum; +}; + + + +struct SceNpMatching2GetLobbyInfoListResponse +{ + SceNpMatching2Range range; + vm::lptr lobbyDataExternal; +}; + + +struct SceNpMatching2JoinLobbyRequest +{ + le_t lobbyId; + vm::lptr joinedSessionInfo; + le_t joinedSessionInfoNum; + vm::lptr lobbyMemberBinAttrInternal; + le_t lobbyMemberBinAttrInternalNum; + SceNpMatching2PresenceOptionData optData; + u8 padding[4]; +}; + + + +struct SceNpMatching2JoinLobbyResponse +{ + vm::lptr lobbyDataInternal; +}; + + +struct SceNpMatching2LeaveLobbyRequest +{ + le_t lobbyId; + SceNpMatching2PresenceOptionData optData; + u8 padding[4]; +}; + + +struct SceNpMatching2SetLobbyMemberDataInternalRequest +{ + le_t lobbyId; + le_t memberId; + u8 padding1[2]; + le_t flagFilter; + le_t flagAttr; + vm::lptr joinedSessionInfo; + le_t joinedSessionInfoNum; + vm::lptr lobbyMemberBinAttrInternal; + le_t lobbyMemberBinAttrInternalNum; + u8 padding2[4]; +}; + + +struct SceNpMatching2GetLobbyMemberDataInternalRequest +{ + le_t lobbyId; + le_t memberId; + u8 padding[6]; + vm::lcptr attrId; + le_t attrIdNum; +}; + + + +struct SceNpMatching2GetLobbyMemberDataInternalResponse +{ + vm::lptr lobbyMemberDataInternal; +}; + + + +struct SceNpMatching2GetLobbyMemberDataInternalListRequest +{ + le_t lobbyId; + vm::lptr memberId; + le_t memberIdNum; + vm::lcptr attrId; + le_t attrIdNum; + bool extendedData; + u8 padding[7]; +}; + + + +struct SceNpMatching2GetLobbyMemberDataInternalListResponse +{ + vm::lptr lobbyMemberDataInternal; + le_t lobbyMemberDataInternalNum; +}; + + +struct SceNpMatching2SendLobbyChatMessageRequest +{ + le_t lobbyId; + u8 castType; + u8 padding[3]; + SceNpMatching2LobbyMessageDestination dst; + vm::lcptr msg; + le_t msgLen; + le_t option; +}; + + + +struct SceNpMatching2SendLobbyChatMessageResponse +{ + bool filtered; +}; + + +struct SceNpMatching2SendLobbyInvitationRequest +{ + le_t lobbyId; + u8 castType; + u8 padding[3]; + SceNpMatching2LobbyMessageDestination dst; + SceNpMatching2InvitationData invitationData; + le_t option; +}; + + +struct SceNpMatching2RoomMemberUpdateInfo +{ + vm::lptr roomMemberDataInternal; + u8 eventCause; + u8 padding[3]; + SceNpMatching2PresenceOptionData optData; +}; + + +struct SceNpMatching2RoomOwnerUpdateInfo +{ + le_t prevOwner; + le_t newOwner; + u8 eventCause; + u8 padding[3]; + vm::lptr roomPassword; + SceNpMatching2PresenceOptionData optData; +}; + + +struct SceNpMatching2RoomUpdateInfo +{ + u8 eventCause; + u8 padding[3]; + le_t errorCode; + SceNpMatching2PresenceOptionData optData; +}; + + +struct SceNpMatching2RoomDataInternalUpdateInfo +{ + vm::lptr newRoomDataInternal; + vm::lptr newFlagAttr; + vm::lptr prevFlagAttr; + vm::lptr newRoomPasswordSlotMask; + vm::lptr prevRoomPasswordSlotMask; + vm::lptr *newRoomGroup; + le_t newRoomGroupNum; + vm::lptr *newRoomBinAttrInternal; + le_t newRoomBinAttrInternalNum; +}; + + +struct SceNpMatching2RoomMemberDataInternalUpdateInfo +{ + vm::lptr newRoomMemberDataInternal; + vm::lptr newFlagAttr; + vm::lptr prevFlagAttr; + vm::lptr newTeamId; + vm::lptr *newRoomMemberBinAttrInternal; + le_t newRoomMemberBinAttrInternalNum; +}; + + +struct SceNpMatching2SignalingOptParamUpdateInfo +{ + SceNpMatching2SignalingOptParam newSignalingOptParam; +}; + + +struct SceNpMatching2RoomMessageInfo +{ + bool filtered; + u8 castType; + u8 padding[2]; + vm::lptr dst; + vm::lptr srcMember; + vm::lcptr msg; + le_t msgLen; +}; + + +struct SceNpMatching2LobbyMemberUpdateInfo +{ + vm::lptr lobbyMemberDataInternal; + u8 eventCause; + u8 padding[3]; + SceNpMatching2PresenceOptionData optData; +}; + + +struct SceNpMatching2LobbyUpdateInfo +{ + u8 eventCause; + u8 padding[3]; + le_t errorCode; +}; + + +struct SceNpMatching2LobbyMemberDataInternalUpdateInfo +{ + le_t memberId; + u8 padding[2]; + SceNpId npId; + le_t flagFilter; + le_t newFlagAttr; + vm::lptr newJoinedSessionInfo; + le_t newJoinedSessionInfoNum; + vm::lptr newLobbyMemberBinAttrInternal; + le_t newLobbyMemberBinAttrInternalNum; +}; + + +struct SceNpMatching2LobbyMessageInfo +{ + bool filtered; + u8 castType; + u8 padding[2]; + vm::lptr dst; + vm::lptr srcMember; + vm::lcptr msg; + le_t msgLen; +}; + + +struct SceNpMatching2LobbyInvitationInfo +{ + u8 castType; + u8 padding[3]; + vm::lptr dst; + vm::lptr srcMember; + SceNpMatching2InvitationData invitationData; +}; + +union SceNpMatching2SignalingConnectionInfo +{ + le_t rtt; + le_t bandwidth; + SceNpId npId; + + struct + { + SceNetInAddr addr; + le_t port; + u8 padding[2]; + } + address; + + le_t packetLoss; +}; + +struct SceNpMatching2SignalingNetInfo +{ + le_t size; + SceNetInAddr localAddr; + SceNetInAddr mappedAddr; + le_t natStatus; +}; + +extern psv_log_base sceNpMatching; diff --git a/rpcs3/Emu/ARMv7/Modules/sceNpScore.cpp b/rpcs3/Emu/ARMv7/Modules/sceNpScore.cpp index f093ab8b31..2154831edb 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceNpScore.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceNpScore.cpp @@ -2,66 +2,9 @@ #include "Emu/System.h" #include "Emu/ARMv7/PSVFuncList.h" -#include "sceNpCommon.h" +#include "sceNpScore.h" -extern psv_log_base sceNpScore; - -typedef u32 SceNpScoreBoardId; -typedef s64 SceNpScoreValue; -typedef u32 SceNpScoreRankNumber; -typedef s32 SceNpScorePcId; - -struct SceNpScoreGameInfo -{ - u32 infoSize; - u8 pad[4]; - u8 data[192]; -}; - -struct SceNpScoreComment -{ - char utf8Comment[64]; -}; - -struct SceNpScoreRankData -{ - SceNpId npId; - u8 reserved[49]; - u8 pad0[3]; - SceNpScorePcId pcId; - SceNpScoreRankNumber serialRank; - SceNpScoreRankNumber rank; - SceNpScoreRankNumber highestRank; - s32 hasGameData; - u8 pad1[4]; - SceNpScoreValue scoreValue; - u64 recordDate; -}; - -struct SceNpScorePlayerRankData -{ - s32 hasData; - u8 pad0[4]; - SceNpScoreRankData rankData; -}; - -struct SceNpScoreBoardInfo -{ - u32 rankLimit; - u32 updateMode; - u32 sortMode; - u32 uploadNumLimit; - u32 uploadSizeLimit; -}; - -struct SceNpScoreNpIdPcId -{ - SceNpId npId; - SceNpScorePcId pcId; - u8 pad[4]; -}; - -s32 sceNpScoreInit(s32 threadPriority, s32 cpuAffinityMask, vm::psv::ptr option) +s32 sceNpScoreInit(s32 threadPriority, s32 cpuAffinityMask, vm::ptr option) { throw __FUNCTION__; } @@ -71,7 +14,7 @@ s32 sceNpScoreTerm(ARMv7Context&) throw __FUNCTION__; } -s32 sceNpScoreCreateTitleCtx(vm::psv::ptr titleId, vm::psv::ptr passphrase, vm::psv::ptr selfNpId) +s32 sceNpScoreCreateTitleCtx(vm::ptr titleId, vm::ptr passphrase, vm::ptr selfNpId) { throw __FUNCTION__; } @@ -101,86 +44,86 @@ s32 sceNpScoreSetTimeout(s32 id, s32 resolveRetry, s32 resolveTimeout, s32 connT throw __FUNCTION__; } -s32 sceNpScoreSetPlayerCharacterId(s32 id, SceNpScorePcId pcId) +s32 sceNpScoreSetPlayerCharacterId(s32 id, s32 pcId) { throw __FUNCTION__; } -s32 sceNpScoreGetBoardInfo(s32 reqId, SceNpScoreBoardId boardId, vm::psv::ptr boardInfo, vm::psv::ptr option) +s32 sceNpScoreGetBoardInfo(s32 reqId, u32 boardId, vm::ptr boardInfo, vm::ptr option) { throw __FUNCTION__; } s32 sceNpScoreRecordScore( s32 reqId, - SceNpScoreBoardId boardId, - SceNpScoreValue score, - vm::psv::ptr scoreComment, - vm::psv::ptr gameInfo, - vm::psv::ptr tmpRank, - vm::psv::ptr compareDate, - vm::psv::ptr option) + u32 boardId, + s64 score, + vm::ptr scoreComment, + vm::ptr gameInfo, + vm::ptr tmpRank, + vm::ptr compareDate, + vm::ptr option) { throw __FUNCTION__; } s32 sceNpScoreRecordGameData( s32 reqId, - SceNpScoreBoardId boardId, - SceNpScoreValue score, + u32 boardId, + s64 score, u32 totalSize, u32 sendSize, - vm::psv::ptr data, - vm::psv::ptr option) + vm::ptr data, + vm::ptr option) { throw __FUNCTION__; } s32 sceNpScoreGetGameData( s32 reqId, - SceNpScoreBoardId boardId, - vm::psv::ptr npId, - vm::psv::ptr totalSize, + u32 boardId, + vm::ptr npId, + vm::ptr totalSize, u32 recvSize, - vm::psv::ptr data, - vm::psv::ptr option) + vm::ptr data, + vm::ptr option) { throw __FUNCTION__; } s32 sceNpScoreGetRankingByNpId( s32 reqId, - SceNpScoreBoardId boardId, - vm::psv::ptr npIdArray, + u32 boardId, + vm::ptr npIdArray, u32 npIdArraySize, - vm::psv::ptr rankArray, + vm::ptr rankArray, u32 rankArraySize, - vm::psv::ptr commentArray, + vm::ptr commentArray, u32 commentArraySize, - vm::psv::ptr infoArray, + vm::ptr infoArray, u32 infoArraySize, u32 arrayNum, - vm::psv::ptr lastSortDate, - vm::psv::ptr totalRecord, - vm::psv::ptr option) + vm::ptr lastSortDate, + vm::ptr totalRecord, + vm::ptr option) { throw __FUNCTION__; } s32 sceNpScoreGetRankingByRange( s32 reqId, - SceNpScoreBoardId boardId, - SceNpScoreRankNumber startSerialRank, - vm::psv::ptr rankArray, + u32 boardId, + u32 startSerialRank, + vm::ptr rankArray, u32 rankArraySize, - vm::psv::ptr commentArray, + vm::ptr commentArray, u32 commentArraySize, - vm::psv::ptr infoArray, + vm::ptr infoArray, u32 infoArraySize, u32 arrayNum, - vm::psv::ptr lastSortDate, - vm::psv::ptr totalRecord, - vm::psv::ptr option) + vm::ptr lastSortDate, + vm::ptr totalRecord, + vm::ptr option) { throw __FUNCTION__; } @@ -188,147 +131,147 @@ s32 sceNpScoreGetRankingByRange( s32 sceNpScoreGetRankingByNpIdPcId( s32 reqId, - SceNpScoreBoardId boardId, - vm::psv::ptr idArray, + u32 boardId, + vm::ptr idArray, u32 idArraySize, - vm::psv::ptr rankArray, + vm::ptr rankArray, u32 rankArraySize, - vm::psv::ptr commentArray, + vm::ptr commentArray, u32 commentArraySize, - vm::psv::ptr infoArray, + vm::ptr infoArray, u32 infoArraySize, u32 arrayNum, - vm::psv::ptr lastSortDate, - vm::psv::ptr totalRecord, - vm::psv::ptr option) + vm::ptr lastSortDate, + vm::ptr totalRecord, + vm::ptr option) { throw __FUNCTION__; } -s32 sceNpScoreCensorComment(s32 reqId, vm::psv::ptr comment, vm::psv::ptr option) +s32 sceNpScoreCensorComment(s32 reqId, vm::ptr comment, vm::ptr option) { throw __FUNCTION__; } -s32 sceNpScoreSanitizeComment(s32 reqId, vm::psv::ptr comment, vm::psv::ptr sanitizedComment, vm::psv::ptr option) +s32 sceNpScoreSanitizeComment(s32 reqId, vm::ptr comment, vm::ptr sanitizedComment, vm::ptr option) { throw __FUNCTION__; } -s32 sceNpScoreWaitAsync(s32 id, vm::psv::ptr result) +s32 sceNpScoreWaitAsync(s32 id, vm::ptr result) { throw __FUNCTION__; } -s32 sceNpScorePollAsync(s32 reqId, vm::psv::ptr result) +s32 sceNpScorePollAsync(s32 reqId, vm::ptr result) { throw __FUNCTION__; } -s32 sceNpScoreGetBoardInfoAsync(s32 reqId, SceNpScoreBoardId boardId, vm::psv::ptr boardInfo, vm::psv::ptr option) +s32 sceNpScoreGetBoardInfoAsync(s32 reqId, u32 boardId, vm::ptr boardInfo, vm::ptr option) { throw __FUNCTION__; } s32 sceNpScoreRecordScoreAsync( s32 reqId, - SceNpScoreBoardId boardId, - SceNpScoreValue score, - vm::psv::ptr scoreComment, - vm::psv::ptr gameInfo, - vm::psv::ptr tmpRank, - vm::psv::ptr compareDate, - vm::psv::ptr option) + u32 boardId, + s64 score, + vm::ptr scoreComment, + vm::ptr gameInfo, + vm::ptr tmpRank, + vm::ptr compareDate, + vm::ptr option) { throw __FUNCTION__; } s32 sceNpScoreRecordGameDataAsync( s32 reqId, - SceNpScoreBoardId boardId, - SceNpScoreValue score, + u32 boardId, + s64 score, u32 totalSize, u32 sendSize, - vm::psv::ptr data, - vm::psv::ptr option) + vm::ptr data, + vm::ptr option) { throw __FUNCTION__; } s32 sceNpScoreGetGameDataAsync( s32 reqId, - SceNpScoreBoardId boardId, - vm::psv::ptr npId, - vm::psv::ptr totalSize, + u32 boardId, + vm::ptr npId, + vm::ptr totalSize, u32 recvSize, - vm::psv::ptr data, - vm::psv::ptr option) + vm::ptr data, + vm::ptr option) { throw __FUNCTION__; } s32 sceNpScoreGetRankingByNpIdAsync( s32 reqId, - SceNpScoreBoardId boardId, - vm::psv::ptr npIdArray, + u32 boardId, + vm::ptr npIdArray, u32 npIdArraySize, - vm::psv::ptr rankArray, + vm::ptr rankArray, u32 rankArraySize, - vm::psv::ptr commentArray, + vm::ptr commentArray, u32 commentArraySize, - vm::psv::ptr infoArray, + vm::ptr infoArray, u32 infoArraySize, u32 arrayNum, - vm::psv::ptr lastSortDate, - vm::psv::ptr totalRecord, - vm::psv::ptr option) + vm::ptr lastSortDate, + vm::ptr totalRecord, + vm::ptr option) { throw __FUNCTION__; } s32 sceNpScoreGetRankingByRangeAsync( s32 reqId, - SceNpScoreBoardId boardId, - SceNpScoreRankNumber startSerialRank, - vm::psv::ptr rankArray, + u32 boardId, + u32 startSerialRank, + vm::ptr rankArray, u32 rankArraySize, - vm::psv::ptr commentArray, + vm::ptr commentArray, u32 commentArraySize, - vm::psv::ptr infoArray, + vm::ptr infoArray, u32 infoArraySize, u32 arrayNum, - vm::psv::ptr lastSortDate, - vm::psv::ptr totalRecord, - vm::psv::ptr option) + vm::ptr lastSortDate, + vm::ptr totalRecord, + vm::ptr option) { throw __FUNCTION__; } s32 sceNpScoreGetRankingByNpIdPcIdAsync( s32 reqId, - SceNpScoreBoardId boardId, - vm::psv::ptr idArray, + u32 boardId, + vm::ptr idArray, u32 idArraySize, - vm::psv::ptr rankArray, + vm::ptr rankArray, u32 rankArraySize, - vm::psv::ptr commentArray, + vm::ptr commentArray, u32 commentArraySize, - vm::psv::ptr infoArray, + vm::ptr infoArray, u32 infoArraySize, u32 arrayNum, - vm::psv::ptr lastSortDate, - vm::psv::ptr totalRecord, - vm::psv::ptr option) + vm::ptr lastSortDate, + vm::ptr totalRecord, + vm::ptr option) { throw __FUNCTION__; } -s32 sceNpScoreCensorCommentAsync(s32 reqId, vm::psv::ptr comment, vm::psv::ptr option) +s32 sceNpScoreCensorCommentAsync(s32 reqId, vm::ptr comment, vm::ptr option) { throw __FUNCTION__; } -s32 sceNpScoreSanitizeCommentAsync(s32 reqId, vm::psv::ptr comment, vm::psv::ptr sanitizedComment, vm::psv::ptr option) +s32 sceNpScoreSanitizeCommentAsync(s32 reqId, vm::ptr comment, vm::ptr sanitizedComment, vm::ptr option) { throw __FUNCTION__; } @@ -340,6 +283,7 @@ psv_log_base sceNpScore("SceNpScore", []() sceNpScore.on_load = nullptr; sceNpScore.on_unload = nullptr; sceNpScore.on_stop = nullptr; + sceNpScore.on_error = nullptr; REG_FUNC(0x0433069F, sceNpScoreInit); REG_FUNC(0x2050F98F, sceNpScoreTerm); diff --git a/rpcs3/Emu/ARMv7/Modules/sceNpScore.h b/rpcs3/Emu/ARMv7/Modules/sceNpScore.h new file mode 100644 index 0000000000..038ca153c0 --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/sceNpScore.h @@ -0,0 +1,55 @@ +#pragma once + +#include "sceNpCommon.h" + +struct SceNpScoreGameInfo +{ + le_t infoSize; + u8 pad[4]; + u8 data[192]; +}; + +struct SceNpScoreComment +{ + char utf8Comment[64]; +}; + +struct SceNpScoreRankData +{ + SceNpId npId; + u8 reserved[49]; + u8 pad0[3]; + le_t pcId; + le_t serialRank; + le_t rank; + le_t highestRank; + le_t hasGameData; + u8 pad1[4]; + le_t scoreValue; + le_t recordDate; +}; + +struct SceNpScorePlayerRankData +{ + le_t hasData; + u8 pad0[4]; + SceNpScoreRankData rankData; +}; + +struct SceNpScoreBoardInfo +{ + le_t rankLimit; + le_t updateMode; + le_t sortMode; + le_t uploadNumLimit; + le_t uploadSizeLimit; +}; + +struct SceNpScoreNpIdPcId +{ + SceNpId npId; + le_t pcId; + u8 pad[4]; +}; + +extern psv_log_base sceNpScore; diff --git a/rpcs3/Emu/ARMv7/Modules/sceNpUtility.cpp b/rpcs3/Emu/ARMv7/Modules/sceNpUtility.cpp index 1aab007361..a4ad08746a 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceNpUtility.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceNpUtility.cpp @@ -2,19 +2,9 @@ #include "Emu/System.h" #include "Emu/ARMv7/PSVFuncList.h" -#include "sceNpCommon.h" +#include "sceNpUtility.h" -extern psv_log_base sceNpUtility; - -struct SceNpBandwidthTestResult -{ - double uploadBps; - double downloadBps; - s32 result; - char padding[4]; -}; - -s32 sceNpLookupInit(s32 usesAsync, s32 threadPriority, s32 cpuAffinityMask, vm::psv::ptr option) +s32 sceNpLookupInit(s32 usesAsync, s32 threadPriority, s32 cpuAffinityMask, vm::ptr option) { throw __FUNCTION__; } @@ -24,7 +14,7 @@ s32 sceNpLookupTerm(ARMv7Context&) throw __FUNCTION__; } -s32 sceNpLookupCreateTitleCtx(vm::psv::ptr titleId, vm::psv::ptr selfNpId) +s32 sceNpLookupCreateTitleCtx(vm::ptr titleId, vm::ptr selfNpId) { throw __FUNCTION__; } @@ -54,22 +44,22 @@ s32 sceNpLookupSetTimeout(s32 id, s32 resolveRetry, u32 resolveTimeout, u32 conn throw __FUNCTION__; } -s32 sceNpLookupWaitAsync(s32 reqId, vm::psv::ptr result) +s32 sceNpLookupWaitAsync(s32 reqId, vm::ptr result) { throw __FUNCTION__; } -s32 sceNpLookupPollAsync(s32 reqId, vm::psv::ptr result) +s32 sceNpLookupPollAsync(s32 reqId, vm::ptr result) { throw __FUNCTION__; } -s32 sceNpLookupNpId(s32 reqId, vm::psv::ptr onlineId, vm::psv::ptr npId, vm::psv::ptr option) +s32 sceNpLookupNpId(s32 reqId, vm::ptr onlineId, vm::ptr npId, vm::ptr option) { throw __FUNCTION__; } -s32 sceNpLookupNpIdAsync(s32 reqId, vm::psv::ptr onlineId, vm::psv::ptr npId, vm::psv::ptr option) +s32 sceNpLookupNpIdAsync(s32 reqId, vm::ptr onlineId, vm::ptr npId, vm::ptr option) { throw __FUNCTION__; } @@ -77,15 +67,15 @@ s32 sceNpLookupNpIdAsync(s32 reqId, vm::psv::ptr onlineId, s32 sceNpLookupUserProfile( s32 reqId, s32 avatarSizeType, - vm::psv::ptr npId, - vm::psv::ptr userInfo, - vm::psv::ptr aboutMe, - vm::psv::ptr languages, - vm::psv::ptr countryCode, - vm::psv::ptr avatarImageData, + vm::ptr npId, + vm::ptr userInfo, + vm::ptr aboutMe, + vm::ptr languages, + vm::ptr countryCode, + vm::ptr avatarImageData, u32 avatarImageDataMaxSize, - vm::psv::ptr avatarImageDataSize, - vm::psv::ptr option) + vm::ptr avatarImageDataSize, + vm::ptr option) { throw __FUNCTION__; } @@ -93,25 +83,25 @@ s32 sceNpLookupUserProfile( s32 sceNpLookupUserProfileAsync( s32 reqId, s32 avatarSizeType, - vm::psv::ptr npId, - vm::psv::ptr userInfo, - vm::psv::ptr aboutMe, - vm::psv::ptr languages, - vm::psv::ptr countryCode, - vm::psv::ptr avatarImageData, + vm::ptr npId, + vm::ptr userInfo, + vm::ptr aboutMe, + vm::ptr languages, + vm::ptr countryCode, + vm::ptr avatarImageData, u32 avatarImageDataMaxSize, - vm::psv::ptr avatarImageDataSize, - vm::psv::ptr option) + vm::ptr avatarImageDataSize, + vm::ptr option) { throw __FUNCTION__; } -s32 sceNpLookupAvatarImage(s32 reqId, vm::psv::ptr avatarUrl, vm::psv::ptr avatarImage, vm::psv::ptr option) +s32 sceNpLookupAvatarImage(s32 reqId, vm::ptr avatarUrl, vm::ptr avatarImage, vm::ptr option) { throw __FUNCTION__; } -s32 sceNpLookupAvatarImageAsync(s32 reqId, vm::psv::ptr avatarUrl, vm::psv::ptr avatarImage, vm::psv::ptr option) +s32 sceNpLookupAvatarImageAsync(s32 reqId, vm::ptr avatarUrl, vm::ptr avatarImage, vm::ptr option) { throw __FUNCTION__; } @@ -126,7 +116,7 @@ s32 sceNpBandwidthTestGetStatus() throw __FUNCTION__; } -s32 sceNpBandwidthTestShutdown(vm::psv::ptr result) +s32 sceNpBandwidthTestShutdown(vm::ptr result) { throw __FUNCTION__; } @@ -143,6 +133,7 @@ psv_log_base sceNpUtility("SceNpUtility", []() sceNpUtility.on_load = nullptr; sceNpUtility.on_unload = nullptr; sceNpUtility.on_stop = nullptr; + sceNpUtility.on_error = nullptr; REG_FUNC(0x9246A673, sceNpLookupInit); REG_FUNC(0x0158B61B, sceNpLookupTerm); diff --git a/rpcs3/Emu/ARMv7/Modules/sceNpUtility.h b/rpcs3/Emu/ARMv7/Modules/sceNpUtility.h new file mode 100644 index 0000000000..dd2adec373 --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/sceNpUtility.h @@ -0,0 +1,13 @@ +#pragma once + +#include "sceNpCommon.h" + +struct SceNpBandwidthTestResult +{ + le_t uploadBps; + le_t downloadBps; + le_t result; + char padding[4]; +}; + +extern psv_log_base sceNpUtility; diff --git a/rpcs3/Emu/ARMv7/Modules/scePerf.cpp b/rpcs3/Emu/ARMv7/Modules/scePerf.cpp index 396fc5eac9..11de670fb4 100644 --- a/rpcs3/Emu/ARMv7/Modules/scePerf.cpp +++ b/rpcs3/Emu/ARMv7/Modules/scePerf.cpp @@ -2,102 +2,10 @@ #include "Emu/System.h" #include "Emu/ARMv7/PSVFuncList.h" +#include "scePerf.h" + extern u64 get_system_time(); -#define RETURN_ERROR(code) { Emu.Pause(); scePerf.Error("%s() failed: %s", __FUNCTION__, #code); return code; } - -extern psv_log_base scePerf; - -enum -{ - // Error Codes - SCE_PERF_ERROR_INVALID_ARGUMENT = 0x80580000, -}; - -enum : s32 -{ - // Thread IDs - SCE_PERF_ARM_PMON_THREAD_ID_ALL = -1, - SCE_PERF_ARM_PMON_THREAD_ID_SELF = 0, -}; - -enum : u32 -{ - // Counter Numbers - SCE_PERF_ARM_PMON_CYCLE_COUNTER = 31, - SCE_PERF_ARM_PMON_COUNTER_5 = 5, - SCE_PERF_ARM_PMON_COUNTER_4 = 4, - SCE_PERF_ARM_PMON_COUNTER_3 = 3, - SCE_PERF_ARM_PMON_COUNTER_2 = 2, - SCE_PERF_ARM_PMON_COUNTER_1 = 1, - SCE_PERF_ARM_PMON_COUNTER_0 = 0, - - // Counter Masks - SCE_PERF_ARM_PMON_COUNTER_MASK_5 = 0x20, - SCE_PERF_ARM_PMON_COUNTER_MASK_4 = 0x10, - SCE_PERF_ARM_PMON_COUNTER_MASK_3 = 0x08, - SCE_PERF_ARM_PMON_COUNTER_MASK_2 = 0x04, - SCE_PERF_ARM_PMON_COUNTER_MASK_1 = 0x02, - SCE_PERF_ARM_PMON_COUNTER_MASK_0 = 0x01, - SCE_PERF_ARM_PMON_COUNTER_MASK_ALL = 0x3f, -}; - -enum : u8 -{ - // Performance Counter Events - SCE_PERF_ARM_PMON_SOFT_INCREMENT = 0x00, - SCE_PERF_ARM_PMON_ICACHE_MISS = 0x01, - SCE_PERF_ARM_PMON_ITLB_MISS = 0x02, - SCE_PERF_ARM_PMON_DCACHE_MISS = 0x03, - SCE_PERF_ARM_PMON_DCACHE_ACCESS = 0x04, - SCE_PERF_ARM_PMON_DTLB_MISS = 0x05, - SCE_PERF_ARM_PMON_DATA_READ = 0x06, - SCE_PERF_ARM_PMON_DATA_WRITE = 0x07, - SCE_PERF_ARM_PMON_EXCEPTION_TAKEN = 0x09, - SCE_PERF_ARM_PMON_EXCEPTION_RETURN = 0x0A, - SCE_PERF_ARM_PMON_WRITE_CONTEXTID = 0x0B, - SCE_PERF_ARM_PMON_SOFT_CHANGEPC = 0x0C, - SCE_PERF_ARM_PMON_IMMEDIATE_BRANCH = 0x0D, - SCE_PERF_ARM_PMON_UNALIGNED = 0x0F, - SCE_PERF_ARM_PMON_BRANCH_MISPREDICT = 0x10, - SCE_PERF_ARM_PMON_PREDICT_BRANCH = 0x12, - SCE_PERF_ARM_PMON_COHERENT_LF_MISS = 0x50, - SCE_PERF_ARM_PMON_COHERENT_LF_HIT = 0x51, - SCE_PERF_ARM_PMON_ICACHE_STALL = 0x60, - SCE_PERF_ARM_PMON_DCACHE_STALL = 0x61, - SCE_PERF_ARM_PMON_MAINTLB_STALL = 0x62, - SCE_PERF_ARM_PMON_STREX_PASSED = 0x63, - SCE_PERF_ARM_PMON_STREX_FAILED = 0x64, - SCE_PERF_ARM_PMON_DATA_EVICTION = 0x65, - SCE_PERF_ARM_PMON_ISSUE_NO_DISPATCH = 0x66, - SCE_PERF_ARM_PMON_ISSUE_EMPTY = 0x67, - SCE_PERF_ARM_PMON_INST_RENAME = 0x68, - SCE_PERF_ARM_PMON_PREDICT_FUNC_RET = 0x6E, - SCE_PERF_ARM_PMON_MAIN_PIPE = 0x70, - SCE_PERF_ARM_PMON_SECOND_PIPE = 0x71, - SCE_PERF_ARM_PMON_LS_PIPE = 0x72, - SCE_PERF_ARM_PMON_FPU_RENAME = 0x73, - SCE_PERF_ARM_PMON_PLD_STALL = 0x80, - SCE_PERF_ARM_PMON_WRITE_STALL = 0x81, - SCE_PERF_ARM_PMON_INST_MAINTLB_STALL = 0x82, - SCE_PERF_ARM_PMON_DATA_MAINTLB_STALL = 0x83, - SCE_PERF_ARM_PMON_INST_UTLB_STALL = 0x84, - SCE_PERF_ARM_PMON_DATA_UTLB_STALL = 0x85, - SCE_PERF_ARM_PMON_DMB_STALL = 0x86, - SCE_PERF_ARM_PMON_INTEGER_CLOCK = 0x8A, - SCE_PERF_ARM_PMON_DATAENGINE_CLOCK = 0x8B, - SCE_PERF_ARM_PMON_ISB = 0x90, - SCE_PERF_ARM_PMON_DSB = 0x91, - SCE_PERF_ARM_PMON_DMB = 0x92, - SCE_PERF_ARM_PMON_EXT_INTERRUPT = 0x93, - SCE_PERF_ARM_PMON_PLE_LINE_REQ_COMPLETED = 0xA0, - SCE_PERF_ARM_PMON_PLE_CHANNEL_SKIPPED = 0xA1, - SCE_PERF_ARM_PMON_PLE_FIFO_FLUSH = 0xA2, - SCE_PERF_ARM_PMON_PLE_REQ_COMPLETED = 0xA3, - SCE_PERF_ARM_PMON_PLE_FIFO_OVERFLOW = 0xA4, - SCE_PERF_ARM_PMON_PLE_REQ_PROGRAMMED = 0xA5, -}; - s32 scePerfArmPmonReset(ARMv7Context& context, s32 threadId) { scePerf.Warning("scePerfArmPmonReset(threadId=0x%x)", threadId); @@ -123,7 +31,7 @@ s32 scePerfArmPmonSelectEvent(ARMv7Context& context, s32 threadId, u32 counter, if (counter >= 6) { - RETURN_ERROR(SCE_PERF_ERROR_INVALID_ARGUMENT); + return SCE_PERF_ERROR_INVALID_ARGUMENT; } u32 value = 0; // initial value @@ -185,7 +93,7 @@ s32 scePerfArmPmonStop(ARMv7Context& context, s32 threadId) return SCE_OK; } -s32 scePerfArmPmonGetCounterValue(ARMv7Context& context, s32 threadId, u32 counter, vm::psv::ptr pValue) +s32 scePerfArmPmonGetCounterValue(ARMv7Context& context, s32 threadId, u32 counter, vm::ptr pValue) { scePerf.Warning("scePerfArmPmonGetCounterValue(threadId=0x%x, counter=%d, pValue=*0x%x)", threadId, counter, pValue); @@ -196,7 +104,7 @@ s32 scePerfArmPmonGetCounterValue(ARMv7Context& context, s32 threadId, u32 count if (counter >= 6 && counter != SCE_PERF_ARM_PMON_CYCLE_COUNTER) { - RETURN_ERROR(SCE_PERF_ERROR_INVALID_ARGUMENT); + return SCE_PERF_ERROR_INVALID_ARGUMENT; } if (counter < 6) @@ -217,7 +125,7 @@ s32 scePerfArmPmonSoftwareIncrement(ARMv7Context& context, u32 mask) if (mask > SCE_PERF_ARM_PMON_COUNTER_MASK_ALL) { - RETURN_ERROR(SCE_PERF_ERROR_INVALID_ARGUMENT); + return SCE_PERF_ERROR_INVALID_ARGUMENT; } for (u32 i = 0; i < 6; i++, mask >>= 1) @@ -245,12 +153,12 @@ u32 scePerfGetTimebaseFrequency() return 1; } -s32 _sceRazorCpuInit(vm::psv::ptr pBufferBase, u32 bufferSize, u32 numPerfCounters, vm::psv::pptr psceRazorVars) +s32 _sceRazorCpuInit(vm::cptr pBufferBase, u32 bufferSize, u32 numPerfCounters, vm::pptr psceRazorVars) { throw __FUNCTION__; } -s32 sceRazorCpuPushMarker(vm::psv::ptr szLabel) +s32 sceRazorCpuPushMarker(vm::cptr szLabel) { throw __FUNCTION__; } @@ -272,6 +180,7 @@ psv_log_base scePerf("ScePerf", []() scePerf.on_load = nullptr; scePerf.on_unload = nullptr; scePerf.on_stop = nullptr; + //scePerf.on_error = nullptr; // keep default error handler REG_FUNC(0x35151735, scePerfArmPmonReset); REG_FUNC(0x63CBEA8B, scePerfArmPmonSelectEvent); diff --git a/rpcs3/Emu/ARMv7/Modules/scePerf.h b/rpcs3/Emu/ARMv7/Modules/scePerf.h new file mode 100644 index 0000000000..cf8b27c891 --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/scePerf.h @@ -0,0 +1,93 @@ +#pragma once + +enum +{ + // Error Codes + SCE_PERF_ERROR_INVALID_ARGUMENT = 0x80580000, +}; + +enum : s32 +{ + // Thread IDs + SCE_PERF_ARM_PMON_THREAD_ID_ALL = -1, + SCE_PERF_ARM_PMON_THREAD_ID_SELF = 0, +}; + +enum : u32 +{ + // Counter Numbers + SCE_PERF_ARM_PMON_CYCLE_COUNTER = 31, + SCE_PERF_ARM_PMON_COUNTER_5 = 5, + SCE_PERF_ARM_PMON_COUNTER_4 = 4, + SCE_PERF_ARM_PMON_COUNTER_3 = 3, + SCE_PERF_ARM_PMON_COUNTER_2 = 2, + SCE_PERF_ARM_PMON_COUNTER_1 = 1, + SCE_PERF_ARM_PMON_COUNTER_0 = 0, + + // Counter Masks + SCE_PERF_ARM_PMON_COUNTER_MASK_5 = 0x20, + SCE_PERF_ARM_PMON_COUNTER_MASK_4 = 0x10, + SCE_PERF_ARM_PMON_COUNTER_MASK_3 = 0x08, + SCE_PERF_ARM_PMON_COUNTER_MASK_2 = 0x04, + SCE_PERF_ARM_PMON_COUNTER_MASK_1 = 0x02, + SCE_PERF_ARM_PMON_COUNTER_MASK_0 = 0x01, + SCE_PERF_ARM_PMON_COUNTER_MASK_ALL = 0x3f, +}; + +enum : u8 +{ + // Performance Counter Events + SCE_PERF_ARM_PMON_SOFT_INCREMENT = 0x00, + SCE_PERF_ARM_PMON_ICACHE_MISS = 0x01, + SCE_PERF_ARM_PMON_ITLB_MISS = 0x02, + SCE_PERF_ARM_PMON_DCACHE_MISS = 0x03, + SCE_PERF_ARM_PMON_DCACHE_ACCESS = 0x04, + SCE_PERF_ARM_PMON_DTLB_MISS = 0x05, + SCE_PERF_ARM_PMON_DATA_READ = 0x06, + SCE_PERF_ARM_PMON_DATA_WRITE = 0x07, + SCE_PERF_ARM_PMON_EXCEPTION_TAKEN = 0x09, + SCE_PERF_ARM_PMON_EXCEPTION_RETURN = 0x0A, + SCE_PERF_ARM_PMON_WRITE_CONTEXTID = 0x0B, + SCE_PERF_ARM_PMON_SOFT_CHANGEPC = 0x0C, + SCE_PERF_ARM_PMON_IMMEDIATE_BRANCH = 0x0D, + SCE_PERF_ARM_PMON_UNALIGNED = 0x0F, + SCE_PERF_ARM_PMON_BRANCH_MISPREDICT = 0x10, + SCE_PERF_ARM_PMON_PREDICT_BRANCH = 0x12, + SCE_PERF_ARM_PMON_COHERENT_LF_MISS = 0x50, + SCE_PERF_ARM_PMON_COHERENT_LF_HIT = 0x51, + SCE_PERF_ARM_PMON_ICACHE_STALL = 0x60, + SCE_PERF_ARM_PMON_DCACHE_STALL = 0x61, + SCE_PERF_ARM_PMON_MAINTLB_STALL = 0x62, + SCE_PERF_ARM_PMON_STREX_PASSED = 0x63, + SCE_PERF_ARM_PMON_STREX_FAILED = 0x64, + SCE_PERF_ARM_PMON_DATA_EVICTION = 0x65, + SCE_PERF_ARM_PMON_ISSUE_NO_DISPATCH = 0x66, + SCE_PERF_ARM_PMON_ISSUE_EMPTY = 0x67, + SCE_PERF_ARM_PMON_INST_RENAME = 0x68, + SCE_PERF_ARM_PMON_PREDICT_FUNC_RET = 0x6E, + SCE_PERF_ARM_PMON_MAIN_PIPE = 0x70, + SCE_PERF_ARM_PMON_SECOND_PIPE = 0x71, + SCE_PERF_ARM_PMON_LS_PIPE = 0x72, + SCE_PERF_ARM_PMON_FPU_RENAME = 0x73, + SCE_PERF_ARM_PMON_PLD_STALL = 0x80, + SCE_PERF_ARM_PMON_WRITE_STALL = 0x81, + SCE_PERF_ARM_PMON_INST_MAINTLB_STALL = 0x82, + SCE_PERF_ARM_PMON_DATA_MAINTLB_STALL = 0x83, + SCE_PERF_ARM_PMON_INST_UTLB_STALL = 0x84, + SCE_PERF_ARM_PMON_DATA_UTLB_STALL = 0x85, + SCE_PERF_ARM_PMON_DMB_STALL = 0x86, + SCE_PERF_ARM_PMON_INTEGER_CLOCK = 0x8A, + SCE_PERF_ARM_PMON_DATAENGINE_CLOCK = 0x8B, + SCE_PERF_ARM_PMON_ISB = 0x90, + SCE_PERF_ARM_PMON_DSB = 0x91, + SCE_PERF_ARM_PMON_DMB = 0x92, + SCE_PERF_ARM_PMON_EXT_INTERRUPT = 0x93, + SCE_PERF_ARM_PMON_PLE_LINE_REQ_COMPLETED = 0xA0, + SCE_PERF_ARM_PMON_PLE_CHANNEL_SKIPPED = 0xA1, + SCE_PERF_ARM_PMON_PLE_FIFO_FLUSH = 0xA2, + SCE_PERF_ARM_PMON_PLE_REQ_COMPLETED = 0xA3, + SCE_PERF_ARM_PMON_PLE_FIFO_OVERFLOW = 0xA4, + SCE_PERF_ARM_PMON_PLE_REQ_PROGRAMMED = 0xA5, +}; + +extern psv_log_base scePerf; diff --git a/rpcs3/Emu/ARMv7/Modules/scePgf.cpp b/rpcs3/Emu/ARMv7/Modules/scePgf.cpp index c4a1f21065..ec4fb307bf 100644 --- a/rpcs3/Emu/ARMv7/Modules/scePgf.cpp +++ b/rpcs3/Emu/ARMv7/Modules/scePgf.cpp @@ -2,7 +2,7 @@ #include "Emu/System.h" #include "Emu/ARMv7/PSVFuncList.h" -extern psv_log_base scePgf; +#include "scePgf.h" #define REG_FUNC(nid, name) reg_psv_func(nid, &scePgf, #name, name) @@ -11,6 +11,7 @@ psv_log_base scePgf("ScePgf", []() scePgf.on_load = nullptr; scePgf.on_unload = nullptr; scePgf.on_stop = nullptr; + scePgf.on_error = nullptr; //REG_FUNC(0x1055ABA3, sceFontNewLib); //REG_FUNC(0x07EE1733, sceFontDoneLib); diff --git a/rpcs3/Emu/ARMv7/Modules/scePgf.h b/rpcs3/Emu/ARMv7/Modules/scePgf.h new file mode 100644 index 0000000000..0b299c6785 --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/scePgf.h @@ -0,0 +1,3 @@ +#pragma once + +extern psv_log_base scePgf; diff --git a/rpcs3/Emu/ARMv7/Modules/scePhotoExport.cpp b/rpcs3/Emu/ARMv7/Modules/scePhotoExport.cpp index 2046dff9ca..7c432a7101 100644 --- a/rpcs3/Emu/ARMv7/Modules/scePhotoExport.cpp +++ b/rpcs3/Emu/ARMv7/Modules/scePhotoExport.cpp @@ -2,39 +2,28 @@ #include "Emu/System.h" #include "Emu/ARMv7/PSVFuncList.h" -extern psv_log_base scePhotoExport; - -struct ScePhotoExportParam -{ - u32 version; - vm::psv::ptr photoTitle; - vm::psv::ptr gameTitle; - vm::psv::ptr gameComment; - char reserved[32]; -}; - -typedef vm::psv::ptr)> ScePhotoExportCancelFunc; +#include "scePhotoExport.h" s32 scePhotoExportFromData( - vm::psv::ptr photodata, + vm::ptr photodata, s32 photodataSize, - vm::psv::ptr param, - vm::psv::ptr workMemory, - ScePhotoExportCancelFunc cancelFunc, - vm::psv::ptr userdata, - vm::psv::ptr exportedPath, + vm::ptr param, + vm::ptr workMemory, + vm::ptr cancelFunc, + vm::ptr userdata, + vm::ptr exportedPath, s32 exportedPathLength) { throw __FUNCTION__; } s32 scePhotoExportFromFile( - vm::psv::ptr photodataPath, - vm::psv::ptr param, - vm::psv::ptr workMemory, - ScePhotoExportCancelFunc cancelFunc, - vm::psv::ptr userdata, - vm::psv::ptr exportedPath, + vm::ptr photodataPath, + vm::ptr param, + vm::ptr workMemory, + vm::ptr cancelFunc, + vm::ptr userdata, + vm::ptr exportedPath, s32 exportedPathLength) { throw __FUNCTION__; @@ -47,6 +36,7 @@ psv_log_base scePhotoExport("ScePhotoExport", []() scePhotoExport.on_load = nullptr; scePhotoExport.on_unload = nullptr; scePhotoExport.on_stop = nullptr; + scePhotoExport.on_error = nullptr; REG_FUNC(0x70512321, scePhotoExportFromData); REG_FUNC(0x84FD9FC5, scePhotoExportFromFile); diff --git a/rpcs3/Emu/ARMv7/Modules/scePhotoExport.h b/rpcs3/Emu/ARMv7/Modules/scePhotoExport.h new file mode 100644 index 0000000000..ca7bb6931b --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/scePhotoExport.h @@ -0,0 +1,14 @@ +#pragma once + +struct ScePhotoExportParam +{ + le_t version; + vm::lcptr photoTitle; + vm::lcptr gameTitle; + vm::lcptr gameComment; + char reserved[32]; +}; + +using ScePhotoExportCancelFunc = func_def)>; + +extern psv_log_base scePhotoExport; diff --git a/rpcs3/Emu/ARMv7/Modules/sceRazorCapture.cpp b/rpcs3/Emu/ARMv7/Modules/sceRazorCapture.cpp index c14fba50b6..1235065b71 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceRazorCapture.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceRazorCapture.cpp @@ -2,14 +2,14 @@ #include "Emu/System.h" #include "Emu/ARMv7/PSVFuncList.h" -extern psv_log_base sceRazorCapture; +#include "sceRazorCapture.h" -void sceRazorCaptureSetTrigger(u32 frameIndex, vm::psv::ptr captureFilename) +void sceRazorCaptureSetTrigger(u32 frameIndex, vm::ptr captureFilename) { throw __FUNCTION__; } -void sceRazorCaptureSetTriggerNextFrame(vm::psv::ptr captureFilename) +void sceRazorCaptureSetTriggerNextFrame(vm::ptr captureFilename) { throw __FUNCTION__; } @@ -26,6 +26,7 @@ psv_log_base sceRazorCapture("SceRazorCapture", []() sceRazorCapture.on_load = nullptr; sceRazorCapture.on_unload = nullptr; sceRazorCapture.on_stop = nullptr; + sceRazorCapture.on_error = nullptr; REG_FUNC(0x911E0AA0, sceRazorCaptureIsInProgress); REG_FUNC(0xE916B538, sceRazorCaptureSetTrigger); diff --git a/rpcs3/Emu/ARMv7/Modules/sceRazorCapture.h b/rpcs3/Emu/ARMv7/Modules/sceRazorCapture.h new file mode 100644 index 0000000000..25a64f6465 --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/sceRazorCapture.h @@ -0,0 +1,3 @@ +#pragma once + +extern psv_log_base sceRazorCapture; diff --git a/rpcs3/Emu/ARMv7/Modules/sceRtc.cpp b/rpcs3/Emu/ARMv7/Modules/sceRtc.cpp index 9b81d86072..8851e2573b 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceRtc.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceRtc.cpp @@ -2,39 +2,39 @@ #include "Emu/System.h" #include "Emu/ARMv7/PSVFuncList.h" -extern psv_log_base sceRtc; +#include "sceRtc.h" u32 sceRtcGetTickResolution() { throw __FUNCTION__; } -s32 sceRtcGetCurrentTick(vm::psv::ptr pTick) +s32 sceRtcGetCurrentTick(vm::ptr pTick) { throw __FUNCTION__; } -s32 sceRtcGetCurrentClock(vm::psv::ptr pTime, s32 iTimeZone) +s32 sceRtcGetCurrentClock(vm::ptr pTime, s32 iTimeZone) { throw __FUNCTION__; } -s32 sceRtcGetCurrentClockLocalTime(vm::psv::ptr pTime) +s32 sceRtcGetCurrentClockLocalTime(vm::ptr pTime) { throw __FUNCTION__; } -s32 sceRtcGetCurrentNetworkTick(vm::psv::ptr pTick) +s32 sceRtcGetCurrentNetworkTick(vm::ptr pTick) { throw __FUNCTION__; } -s32 sceRtcConvertUtcToLocalTime(vm::psv::ptr pUtc, vm::psv::ptr pLocalTime) +s32 sceRtcConvertUtcToLocalTime(vm::ptr pUtc, vm::ptr pLocalTime) { throw __FUNCTION__; } -s32 sceRtcConvertLocalTimeToUtc(vm::psv::ptr pLocalTime, vm::psv::ptr pUtc) +s32 sceRtcConvertLocalTimeToUtc(vm::ptr pLocalTime, vm::ptr pUtc) { throw __FUNCTION__; } @@ -54,137 +54,137 @@ s32 sceRtcGetDayOfWeek(s32 year, s32 month, s32 day) throw __FUNCTION__; } -s32 sceRtcCheckValid(vm::psv::ptr pTime) +s32 sceRtcCheckValid(vm::ptr pTime) { throw __FUNCTION__; } -s32 sceRtcSetTime_t(vm::psv::ptr pTime, u32 iTime) +s32 sceRtcSetTime_t(vm::ptr pTime, u32 iTime) { throw __FUNCTION__; } -s32 sceRtcSetTime64_t(vm::psv::ptr pTime, u64 ullTime) +s32 sceRtcSetTime64_t(vm::ptr pTime, u64 ullTime) { throw __FUNCTION__; } -s32 sceRtcGetTime_t(vm::psv::ptr pTime, vm::psv::ptr piTime) +s32 sceRtcGetTime_t(vm::ptr pTime, vm::ptr piTime) { throw __FUNCTION__; } -s32 sceRtcGetTime64_t(vm::psv::ptr pTime, vm::psv::ptr pullTime) +s32 sceRtcGetTime64_t(vm::ptr pTime, vm::ptr pullTime) { throw __FUNCTION__; } -s32 sceRtcSetDosTime(vm::psv::ptr pTime, u32 uiDosTime) +s32 sceRtcSetDosTime(vm::ptr pTime, u32 uiDosTime) { throw __FUNCTION__; } -s32 sceRtcGetDosTime(vm::psv::ptr pTime, vm::psv::ptr puiDosTime) +s32 sceRtcGetDosTime(vm::ptr pTime, vm::ptr puiDosTime) { throw __FUNCTION__; } -s32 sceRtcSetWin32FileTime(vm::psv::ptr pTime, u64 ulWin32Time) +s32 sceRtcSetWin32FileTime(vm::ptr pTime, u64 ulWin32Time) { throw __FUNCTION__; } -s32 sceRtcGetWin32FileTime(vm::psv::ptr pTime, vm::psv::ptr ulWin32Time) +s32 sceRtcGetWin32FileTime(vm::ptr pTime, vm::ptr ulWin32Time) { throw __FUNCTION__; } -s32 sceRtcSetTick(vm::psv::ptr pTime, vm::psv::ptr pTick) +s32 sceRtcSetTick(vm::ptr pTime, vm::ptr pTick) { throw __FUNCTION__; } -s32 sceRtcGetTick(vm::psv::ptr pTime, vm::psv::ptr pTick) +s32 sceRtcGetTick(vm::ptr pTime, vm::ptr pTick) { throw __FUNCTION__; } -s32 sceRtcCompareTick(vm::psv::ptr pTick1, vm::psv::ptr pTick2) +s32 sceRtcCompareTick(vm::ptr pTick1, vm::ptr pTick2) { throw __FUNCTION__; } -s32 sceRtcTickAddTicks(vm::psv::ptr pTick0, vm::psv::ptr pTick1, u64 lAdd) +s32 sceRtcTickAddTicks(vm::ptr pTick0, vm::ptr pTick1, u64 lAdd) { throw __FUNCTION__; } -s32 sceRtcTickAddMicroseconds(vm::psv::ptr pTick0, vm::psv::ptr pTick1, u64 lAdd) +s32 sceRtcTickAddMicroseconds(vm::ptr pTick0, vm::ptr pTick1, u64 lAdd) { throw __FUNCTION__; } -s32 sceRtcTickAddSeconds(vm::psv::ptr pTick0, vm::psv::ptr pTick1, u64 lAdd) +s32 sceRtcTickAddSeconds(vm::ptr pTick0, vm::ptr pTick1, u64 lAdd) { throw __FUNCTION__; } -s32 sceRtcTickAddMinutes(vm::psv::ptr pTick0, vm::psv::ptr pTick1, u64 lAdd) +s32 sceRtcTickAddMinutes(vm::ptr pTick0, vm::ptr pTick1, u64 lAdd) { throw __FUNCTION__; } -s32 sceRtcTickAddHours(vm::psv::ptr pTick0, vm::psv::ptr pTick1, s32 lAdd) +s32 sceRtcTickAddHours(vm::ptr pTick0, vm::ptr pTick1, s32 lAdd) { throw __FUNCTION__; } -s32 sceRtcTickAddDays(vm::psv::ptr pTick0, vm::psv::ptr pTick1, s32 lAdd) +s32 sceRtcTickAddDays(vm::ptr pTick0, vm::ptr pTick1, s32 lAdd) { throw __FUNCTION__; } -s32 sceRtcTickAddWeeks(vm::psv::ptr pTick0, vm::psv::ptr pTick1, s32 lAdd) +s32 sceRtcTickAddWeeks(vm::ptr pTick0, vm::ptr pTick1, s32 lAdd) { throw __FUNCTION__; } -s32 sceRtcTickAddMonths(vm::psv::ptr pTick0, vm::psv::ptr pTick1, s32 lAdd) +s32 sceRtcTickAddMonths(vm::ptr pTick0, vm::ptr pTick1, s32 lAdd) { throw __FUNCTION__; } -s32 sceRtcTickAddYears(vm::psv::ptr pTick0, vm::psv::ptr pTick1, s32 lAdd) +s32 sceRtcTickAddYears(vm::ptr pTick0, vm::ptr pTick1, s32 lAdd) { throw __FUNCTION__; } -s32 sceRtcFormatRFC2822(vm::psv::ptr pszDateTime, vm::psv::ptr pUtc, s32 iTimeZoneMinutes) +s32 sceRtcFormatRFC2822(vm::ptr pszDateTime, vm::ptr pUtc, s32 iTimeZoneMinutes) { throw __FUNCTION__; } -s32 sceRtcFormatRFC2822LocalTime(vm::psv::ptr pszDateTime, vm::psv::ptr pUtc) +s32 sceRtcFormatRFC2822LocalTime(vm::ptr pszDateTime, vm::ptr pUtc) { throw __FUNCTION__; } -s32 sceRtcFormatRFC3339(vm::psv::ptr pszDateTime, vm::psv::ptr pUtc, s32 iTimeZoneMinutes) +s32 sceRtcFormatRFC3339(vm::ptr pszDateTime, vm::ptr pUtc, s32 iTimeZoneMinutes) { throw __FUNCTION__; } -s32 sceRtcFormatRFC3339LocalTime(vm::psv::ptr pszDateTime, vm::psv::ptr pUtc) +s32 sceRtcFormatRFC3339LocalTime(vm::ptr pszDateTime, vm::ptr pUtc) { throw __FUNCTION__; } -s32 sceRtcParseDateTime(vm::psv::ptr pUtc, vm::psv::ptr pszDateTime) +s32 sceRtcParseDateTime(vm::ptr pUtc, vm::ptr pszDateTime) { throw __FUNCTION__; } -s32 sceRtcParseRFC3339(vm::psv::ptr pUtc, vm::psv::ptr pszDateTime) +s32 sceRtcParseRFC3339(vm::ptr pUtc, vm::ptr pszDateTime) { throw __FUNCTION__; } @@ -197,6 +197,7 @@ psv_log_base sceRtc("SceRtc", []() sceRtc.on_load = nullptr; sceRtc.on_unload = nullptr; sceRtc.on_stop = nullptr; + sceRtc.on_error = nullptr; REG_FUNC(0x23F79274, sceRtcGetCurrentTick); REG_FUNC(0xCDDD25FE, sceRtcGetCurrentNetworkTick); diff --git a/rpcs3/Emu/ARMv7/Modules/sceRtc.h b/rpcs3/Emu/ARMv7/Modules/sceRtc.h new file mode 100644 index 0000000000..2c60084b05 --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/sceRtc.h @@ -0,0 +1,3 @@ +#pragma once + +extern psv_log_base sceRtc; diff --git a/rpcs3/Emu/ARMv7/Modules/sceSas.cpp b/rpcs3/Emu/ARMv7/Modules/sceSas.cpp index b0961f2776..b0753f5aa5 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceSas.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceSas.cpp @@ -2,24 +2,24 @@ #include "Emu/System.h" #include "Emu/ARMv7/PSVFuncList.h" -extern psv_log_base sceSas; +#include "sceSas.h" -s32 sceSasGetNeededMemorySize(vm::psv::ptr config, vm::psv::ptr outSize) +s32 sceSasGetNeededMemorySize(vm::ptr config, vm::ptr outSize) { throw __FUNCTION__; } -s32 sceSasInit(vm::psv::ptr config, vm::psv::ptr buffer, u32 bufferSize) +s32 sceSasInit(vm::ptr config, vm::ptr buffer, u32 bufferSize) { throw __FUNCTION__; } -s32 sceSasInitWithGrain(vm::psv::ptr config, u32 grain, vm::psv::ptr buffer, u32 bufferSize) +s32 sceSasInitWithGrain(vm::ptr config, u32 grain, vm::ptr buffer, u32 bufferSize) { throw __FUNCTION__; } -s32 sceSasExit(vm::psv::pptr outBuffer, vm::psv::ptr outBufferSize) +s32 sceSasExit(vm::pptr outBuffer, vm::ptr outBufferSize) { throw __FUNCTION__; } @@ -44,22 +44,22 @@ s32 sceSasGetOutputmode() throw __FUNCTION__; } -s32 sceSasCore(vm::psv::ptr out) +s32 sceSasCore(vm::ptr out) { throw __FUNCTION__; } -s32 sceSasCoreWithMix(vm::psv::ptr inOut, s32 lvol, s32 rvol) +s32 sceSasCoreWithMix(vm::ptr inOut, s32 lvol, s32 rvol) { throw __FUNCTION__; } -s32 sceSasSetVoice(s32 iVoiceNum, vm::psv::ptr vagBuf, u32 size, u32 loopflag) +s32 sceSasSetVoice(s32 iVoiceNum, vm::ptr vagBuf, u32 size, u32 loopflag) { throw __FUNCTION__; } -s32 sceSasSetVoicePCM(s32 iVoiceNum, vm::psv::ptr pcmBuf, u32 size, s32 loopsize) +s32 sceSasSetVoicePCM(s32 iVoiceNum, vm::ptr pcmBuf, u32 size, s32 loopsize) { throw __FUNCTION__; } @@ -157,6 +157,7 @@ psv_log_base sceSas("SceSas", []() sceSas.on_load = nullptr; sceSas.on_unload = nullptr; sceSas.on_stop = nullptr; + sceSas.on_error = nullptr; //REG_FUNC(0xA2209C58, sceAsSetRegisterReportHandler); //REG_FUNC(0xBB635544, sceAsSetUnregisterReportHandler); diff --git a/rpcs3/Emu/ARMv7/Modules/sceSas.h b/rpcs3/Emu/ARMv7/Modules/sceSas.h new file mode 100644 index 0000000000..d60bd26155 --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/sceSas.h @@ -0,0 +1,3 @@ +#pragma once + +extern psv_log_base sceSas; diff --git a/rpcs3/Emu/ARMv7/Modules/sceScreenShot.cpp b/rpcs3/Emu/ARMv7/Modules/sceScreenShot.cpp index 07b3f0a467..c8e7009fd2 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceScreenShot.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceScreenShot.cpp @@ -2,22 +2,14 @@ #include "Emu/System.h" #include "Emu/ARMv7/PSVFuncList.h" -extern psv_log_base sceScreenShot; +#include "sceScreenShot.h" -struct SceScreenShotParam -{ - vm::psv::ptr photoTitle; - vm::psv::ptr gameTitle; - vm::psv::ptr gameComment; - vm::psv::ptr reserved; -}; - -s32 sceScreenShotSetParam(vm::psv::ptr param) +s32 sceScreenShotSetParam(vm::ptr param) { throw __FUNCTION__; } -s32 sceScreenShotSetOverlayImage(vm::psv::ptr filePath, s32 offsetX, s32 offsetY) +s32 sceScreenShotSetOverlayImage(vm::ptr filePath, s32 offsetX, s32 offsetY) { throw __FUNCTION__; } @@ -40,6 +32,7 @@ psv_log_base sceScreenShot("SceScreenShot", []() sceScreenShot.on_load = nullptr; sceScreenShot.on_unload = nullptr; sceScreenShot.on_stop = nullptr; + sceScreenShot.on_error = nullptr; REG_FUNC(0x05DB59C7, sceScreenShotSetParam); REG_FUNC(0x7061665B, sceScreenShotSetOverlayImage); diff --git a/rpcs3/Emu/ARMv7/Modules/sceScreenShot.h b/rpcs3/Emu/ARMv7/Modules/sceScreenShot.h new file mode 100644 index 0000000000..9aab6bef39 --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/sceScreenShot.h @@ -0,0 +1,11 @@ +#pragma once + +struct SceScreenShotParam +{ + vm::lcptr photoTitle; + vm::lcptr gameTitle; + vm::lcptr gameComment; + vm::lptr reserved; +}; + +extern psv_log_base sceScreenShot; diff --git a/rpcs3/Emu/ARMv7/Modules/sceSfmt.cpp b/rpcs3/Emu/ARMv7/Modules/sceSfmt.cpp index e6d2f2a4be..57931d32be 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceSfmt.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceSfmt.cpp @@ -11,6 +11,7 @@ psv_log_base sceSfmt("SceSfmt", []() sceSfmt.on_load = nullptr; sceSfmt.on_unload = nullptr; sceSfmt.on_stop = nullptr; + sceSfmt.on_error = nullptr; //REG_FUNC(0x8FF464C9, sceSfmt11213InitGenRand); //REG_FUNC(0xBAF5F058, sceSfmt11213InitByArray); diff --git a/rpcs3/Emu/ARMv7/Modules/sceSha.cpp b/rpcs3/Emu/ARMv7/Modules/sceSha.cpp index 5ec792b06d..2fb134841e 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceSha.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceSha.cpp @@ -11,6 +11,7 @@ psv_log_base sceSha("SceSha", []() sceSha.on_load = nullptr; sceSha.on_unload = nullptr; sceSha.on_stop = nullptr; + sceSha.on_error = nullptr; //REG_FUNC(0xD19A9AA8, sceSha0Digest); //REG_FUNC(0xBCF6DB3A, sceSha0BlockInit); diff --git a/rpcs3/Emu/ARMv7/Modules/sceSqlite.cpp b/rpcs3/Emu/ARMv7/Modules/sceSqlite.cpp index 19f560c963..2acaffae9d 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceSqlite.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceSqlite.cpp @@ -2,7 +2,7 @@ #include "Emu/System.h" #include "Emu/ARMv7/PSVFuncList.h" -extern psv_log_base sceSqlite; +#include "sceSqlite.h" #define REG_FUNC(nid, name) reg_psv_func(nid, &sceSqlite, #name, name) @@ -11,6 +11,7 @@ psv_log_base sceSqlite("SceSqlite", []() sceSqlite.on_load = nullptr; sceSqlite.on_unload = nullptr; sceSqlite.on_stop = nullptr; + sceSqlite.on_error = nullptr; //REG_FUNC(0x26E46324, sqlite3_libversion); //REG_FUNC(0x4CCB58A2, sqlite3_sourceid); diff --git a/rpcs3/Emu/ARMv7/Modules/sceSqlite.h b/rpcs3/Emu/ARMv7/Modules/sceSqlite.h new file mode 100644 index 0000000000..be4fc046b7 --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/sceSqlite.h @@ -0,0 +1,3 @@ +#pragma once + +extern psv_log_base sceSqlite; diff --git a/rpcs3/Emu/ARMv7/Modules/sceSsl.cpp b/rpcs3/Emu/ARMv7/Modules/sceSsl.cpp index bd32cda9dd..43d62b6e05 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceSsl.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceSsl.cpp @@ -14,47 +14,47 @@ s32 sceSslTerm() throw __FUNCTION__; } -s32 sceSslGetMemoryPoolStats(vm::psv::ptr currentStat) +s32 sceSslGetMemoryPoolStats(vm::ptr currentStat) { throw __FUNCTION__; } -s32 sceSslGetSerialNumber(vm::psv::ptr sslCert, vm::psv::pptr sboData, vm::psv::ptr sboLen) +s32 sceSslGetSerialNumber(vm::ptr sslCert, vm::pptr sboData, vm::ptr sboLen) { throw __FUNCTION__; } -vm::psv::ptr sceSslGetSubjectName(vm::psv::ptr sslCert) +vm::ptr sceSslGetSubjectName(vm::ptr sslCert) { throw __FUNCTION__; } -vm::psv::ptr sceSslGetIssuerName(vm::psv::ptr sslCert) +vm::ptr sceSslGetIssuerName(vm::ptr sslCert) { throw __FUNCTION__; } -s32 sceSslGetNotBefore(vm::psv::ptr sslCert, vm::psv::ptr begin) +s32 sceSslGetNotBefore(vm::ptr sslCert, vm::ptr begin) { throw __FUNCTION__; } -s32 sceSslGetNotAfter(vm::psv::ptr sslCert, vm::psv::ptr limit) +s32 sceSslGetNotAfter(vm::ptr sslCert, vm::ptr limit) { throw __FUNCTION__; } -s32 sceSslGetNameEntryCount(vm::psv::ptr certName) +s32 sceSslGetNameEntryCount(vm::ptr certName) { throw __FUNCTION__; } -s32 sceSslGetNameEntryInfo(vm::psv::ptr certName, s32 entryNum, vm::psv::ptr oidname, u32 maxOidnameLen, vm::psv::ptr value, u32 maxValueLen, vm::psv::ptr valueLen) +s32 sceSslGetNameEntryInfo(vm::ptr certName, s32 entryNum, vm::ptr oidname, u32 maxOidnameLen, vm::ptr value, u32 maxValueLen, vm::ptr valueLen) { throw __FUNCTION__; } -s32 sceSslFreeSslCertName(vm::psv::ptr certName) +s32 sceSslFreeSslCertName(vm::ptr certName) { throw __FUNCTION__; } @@ -67,6 +67,7 @@ psv_log_base sceSsl("SceSsl", []() sceSsl.on_load = nullptr; sceSsl.on_unload = nullptr; sceSsl.on_stop = nullptr; + sceSsl.on_error = nullptr; REG_FUNC(0x3C733316, sceSslInit); REG_FUNC(0x03CE6E3A, sceSslTerm); diff --git a/rpcs3/Emu/ARMv7/Modules/sceSsl.h b/rpcs3/Emu/ARMv7/Modules/sceSsl.h index 3d60ac45e5..4d9f7a9bb3 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceSsl.h +++ b/rpcs3/Emu/ARMv7/Modules/sceSsl.h @@ -1,14 +1,14 @@ #pragma once -typedef void SceSslCert; -typedef void SceSslCertName; +using SceSslCert = void; +using SceSslCertName = void; struct SceSslMemoryPoolStats { - u32 poolSize; - u32 maxInuseSize; - u32 currentInuseSize; - s32 reserved; + le_t poolSize; + le_t maxInuseSize; + le_t currentInuseSize; + le_t reserved; }; extern psv_log_base sceSsl; diff --git a/rpcs3/Emu/ARMv7/Modules/sceSulpha.cpp b/rpcs3/Emu/ARMv7/Modules/sceSulpha.cpp index 3df26668a4..3cc3e43bb3 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceSulpha.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceSulpha.cpp @@ -2,19 +2,7 @@ #include "Emu/System.h" #include "Emu/ARMv7/PSVFuncList.h" -extern psv_log_base sceSulpha; - -typedef vm::psv::ptr arg)> SceSulphaCallback; - -struct SceSulphaConfig -{ - SceSulphaCallback notifyCallback; - u32 port; - u32 bookmarkCount; -}; - -struct SceSulphaAgentsRegister; -typedef void SceSulphaHandle; +#include "sceSulpha.h" s32 sceSulphaNetworkInit() { @@ -26,17 +14,17 @@ s32 sceSulphaNetworkShutdown() throw __FUNCTION__; } -s32 sceSulphaGetDefaultConfig(vm::psv::ptr config) +s32 sceSulphaGetDefaultConfig(vm::ptr config) { throw __FUNCTION__; } -s32 sceSulphaGetNeededMemory(vm::psv::ptr config, vm::psv::ptr sizeInBytes) +s32 sceSulphaGetNeededMemory(vm::ptr config, vm::ptr sizeInBytes) { throw __FUNCTION__; } -s32 sceSulphaInit(vm::psv::ptr config, vm::psv::ptr buffer, u32 sizeInBytes) +s32 sceSulphaInit(vm::ptr config, vm::ptr buffer, u32 sizeInBytes) { throw __FUNCTION__; } @@ -51,7 +39,7 @@ s32 sceSulphaUpdate() throw __FUNCTION__; } -s32 sceSulphaFileConnect(vm::psv::ptr filename) +s32 sceSulphaFileConnect(vm::ptr filename) { throw __FUNCTION__; } @@ -61,22 +49,22 @@ s32 sceSulphaFileDisconnect() throw __FUNCTION__; } -s32 sceSulphaSetBookmark(vm::psv::ptr name, s32 id) +s32 sceSulphaSetBookmark(vm::ptr name, s32 id) { throw __FUNCTION__; } -s32 sceSulphaAgentsGetNeededMemory(vm::psv::ptr config, vm::psv::ptr sizeInBytes) +s32 sceSulphaAgentsGetNeededMemory(vm::ptr config, vm::ptr sizeInBytes) { throw __FUNCTION__; } -s32 sceSulphaAgentsRegister(vm::psv::ptr config, vm::psv::ptr buffer, u32 sizeInBytes, vm::psv::ptr handles) +s32 sceSulphaAgentsRegister(vm::ptr config, vm::ptr buffer, u32 sizeInBytes, vm::ptr handles) { throw __FUNCTION__; } -s32 sceSulphaAgentsUnregister(vm::psv::ptr handles, u32 agentCount) +s32 sceSulphaAgentsUnregister(vm::ptr handles, u32 agentCount) { throw __FUNCTION__; } @@ -89,6 +77,7 @@ psv_log_base sceSulpha("SceSulpha", []() sceSulpha.on_load = nullptr; sceSulpha.on_unload = nullptr; sceSulpha.on_stop = nullptr; + sceSulpha.on_error = nullptr; REG_FUNC(0xB4668AEA, sceSulphaNetworkInit); REG_FUNC(0x0FC71B72, sceSulphaNetworkShutdown); diff --git a/rpcs3/Emu/ARMv7/Modules/sceSulpha.h b/rpcs3/Emu/ARMv7/Modules/sceSulpha.h new file mode 100644 index 0000000000..646d73e2f1 --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/sceSulpha.h @@ -0,0 +1,16 @@ +#pragma once + +using SceSulphaCallback = func_def arg)>; + +struct SceSulphaConfig +{ + vm::lptr notifyCallback; + le_t port; + le_t bookmarkCount; +}; + +struct SceSulphaAgentsRegister; + +using SceSulphaHandle = void; + +extern psv_log_base sceSulpha; diff --git a/rpcs3/Emu/ARMv7/Modules/sceSysmodule.cpp b/rpcs3/Emu/ARMv7/Modules/sceSysmodule.cpp index 51158c0226..194128abe7 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceSysmodule.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceSysmodule.cpp @@ -2,7 +2,7 @@ #include "Emu/System.h" #include "Emu/ARMv7/PSVFuncList.h" -extern psv_log_base sceSysmodule; +#include "sceSysmodule.h" s32 sceSysmoduleLoadModule(u16 id) { @@ -32,6 +32,7 @@ psv_log_base sceSysmodule("SceSysmodule", []() sceSysmodule.on_load = nullptr; sceSysmodule.on_unload = nullptr; sceSysmodule.on_stop = nullptr; + sceSysmodule.on_error = nullptr; REG_FUNC(0x79A0160A, sceSysmoduleLoadModule); REG_FUNC(0x31D87805, sceSysmoduleUnloadModule); diff --git a/rpcs3/Emu/ARMv7/Modules/sceSysmodule.h b/rpcs3/Emu/ARMv7/Modules/sceSysmodule.h new file mode 100644 index 0000000000..0153c8725d --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/sceSysmodule.h @@ -0,0 +1,3 @@ +#pragma once + +extern psv_log_base sceSysmodule; diff --git a/rpcs3/Emu/ARMv7/Modules/sceSystemGesture.cpp b/rpcs3/Emu/ARMv7/Modules/sceSystemGesture.cpp index 0e894f79fb..b52ff4506c 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceSystemGesture.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceSystemGesture.cpp @@ -2,165 +2,9 @@ #include "Emu/System.h" #include "Emu/ARMv7/PSVFuncList.h" -#include "sceTouch.h" +#include "sceSystemGesture.h" -extern psv_log_base sceSystemGesture; - -enum SceSystemGestureTouchState : s32 -{ - SCE_SYSTEM_GESTURE_TOUCH_STATE_INACTIVE = 0, - SCE_SYSTEM_GESTURE_TOUCH_STATE_BEGIN = 1, - SCE_SYSTEM_GESTURE_TOUCH_STATE_ACTIVE = 2, - SCE_SYSTEM_GESTURE_TOUCH_STATE_END = 3 -}; - -enum SceSystemGestureType : s32 -{ - SCE_SYSTEM_GESTURE_TYPE_TAP = 1, - SCE_SYSTEM_GESTURE_TYPE_DRAG = 2, - SCE_SYSTEM_GESTURE_TYPE_TAP_AND_HOLD = 4, - SCE_SYSTEM_GESTURE_TYPE_PINCH_OUT_IN = 8 -}; - -struct SceSystemGestureVector2 -{ - s16 x; - s16 y; -}; - -struct SceSystemGestureRectangle -{ - s16 x; - s16 y; - s16 width; - s16 height; -}; - -struct SceSystemGesturePrimitiveTouchEvent -{ - SceSystemGestureTouchState eventState; - u16 primitiveID; - SceSystemGestureVector2 pressedPosition; - s16 pressedForce; - SceSystemGestureVector2 currentPosition; - s16 currentForce; - SceSystemGestureVector2 deltaVector; - s16 deltaForce; - u64 deltaTime; - u64 elapsedTime; - u8 reserved[56]; -}; - -struct SceSystemGesturePrimitiveTouchRecognizerParameter -{ - u8 reserved[64]; -}; - -struct SceSystemGestureTouchRecognizer -{ - u64 reserved[307]; -}; - -struct SceSystemGestureTouchRecognizerInformation -{ - SceSystemGestureType gestureType; - u32 touchPanelPortID; - SceSystemGestureRectangle rectangle; - u64 updatedTime; - u8 reserved[256]; -}; - -struct SceSystemGestureTapRecognizerParameter -{ - u8 maxTapCount; - u8 reserved[63]; -}; - -struct SceSystemGestureDragRecognizerParameter -{ - u8 reserved[64]; -}; - -struct SceSystemGestureTapAndHoldRecognizerParameter -{ - u64 timeToInvokeEvent; - u8 reserved[56]; -}; - -struct SceSystemGesturePinchOutInRecognizerParameter -{ - u8 reserved[64]; -}; - -union SceSystemGestureTouchRecognizerParameter -{ - u8 parameterBuf[64]; - SceSystemGestureTapRecognizerParameter tap; - SceSystemGestureDragRecognizerParameter drag; - SceSystemGestureTapAndHoldRecognizerParameter tapAndHold; - SceSystemGesturePinchOutInRecognizerParameter pinchOutIn; -}; - -struct SceSystemGestureTapEventProperty -{ - u16 primitiveID; - SceSystemGestureVector2 position; - u8 tappedCount; - u8 reserved[57]; -}; - -struct SceSystemGestureDragEventProperty -{ - u16 primitiveID; - SceSystemGestureVector2 deltaVector; - SceSystemGestureVector2 currentPosition; - SceSystemGestureVector2 pressedPosition; - u8 reserved[50]; -}; - -struct SceSystemGestureTapAndHoldEventProperty -{ - u16 primitiveID; - SceSystemGestureVector2 pressedPosition; - u8 reserved[58]; -}; - -struct SceSystemGesturePinchOutInEventProperty -{ - float scale; - - struct - { - u16 primitiveID; - SceSystemGestureVector2 currentPosition; - SceSystemGestureVector2 deltaVector; - SceSystemGestureVector2 pairedPosition; - } primitive[2]; - - u8 reserved[32]; -}; - -struct SceSystemGestureTouchEvent -{ - u32 eventID; - SceSystemGestureTouchState eventState; - SceSystemGestureType gestureType; - u8 padding[4]; - u64 updatedTime; - - union - { - u8 propertyBuf[64]; - SceSystemGestureTapEventProperty tap; - SceSystemGestureDragEventProperty drag; - SceSystemGestureTapAndHoldEventProperty tapAndHold; - SceSystemGesturePinchOutInEventProperty pinchOutIn; - } property; - - u8 reserved[56]; -}; - -s32 sceSystemGestureInitializePrimitiveTouchRecognizer(vm::psv::ptr parameter) +s32 sceSystemGestureInitializePrimitiveTouchRecognizer(vm::ptr parameter) { throw __FUNCTION__; } @@ -175,12 +19,12 @@ s32 sceSystemGestureResetPrimitiveTouchRecognizer() throw __FUNCTION__; } -s32 sceSystemGestureUpdatePrimitiveTouchRecognizer(vm::psv::ptr pFrontData, vm::psv::ptr pBackData) +s32 sceSystemGestureUpdatePrimitiveTouchRecognizer(vm::ptr pFrontData, vm::ptr pBackData) { throw __FUNCTION__; } -s32 sceSystemGestureGetPrimitiveTouchEvents(vm::psv::ptr primitiveEventBuffer, const u32 capacityOfBuffer, vm::psv::ptr numberOfEvent) +s32 sceSystemGestureGetPrimitiveTouchEvents(vm::ptr primitiveEventBuffer, const u32 capacityOfBuffer, vm::ptr numberOfEvent) { throw __FUNCTION__; } @@ -190,57 +34,57 @@ s32 sceSystemGestureGetPrimitiveTouchEventsCount() throw __FUNCTION__; } -s32 sceSystemGestureGetPrimitiveTouchEventByIndex(const u32 index, vm::psv::ptr primitiveTouchEvent) +s32 sceSystemGestureGetPrimitiveTouchEventByIndex(const u32 index, vm::ptr primitiveTouchEvent) { throw __FUNCTION__; } -s32 sceSystemGestureGetPrimitiveTouchEventByPrimitiveID(const u16 primitiveID, vm::psv::ptr primitiveTouchEvent) +s32 sceSystemGestureGetPrimitiveTouchEventByPrimitiveID(const u16 primitiveID, vm::ptr primitiveTouchEvent) { throw __FUNCTION__; } -s32 sceSystemGestureCreateTouchRecognizer(vm::psv::ptr touchRecognizer, const SceSystemGestureType gestureType, const u8 touchPanelPortID, vm::psv::ptr rectangle, vm::psv::ptr touchRecognizerParameter) +s32 sceSystemGestureCreateTouchRecognizer(vm::ptr touchRecognizer, const SceSystemGestureType gestureType, const u8 touchPanelPortID, vm::ptr rectangle, vm::ptr touchRecognizerParameter) { throw __FUNCTION__; } -s32 sceSystemGestureGetTouchRecognizerInformation(vm::psv::ptr touchRecognizer, vm::psv::ptr information) +s32 sceSystemGestureGetTouchRecognizerInformation(vm::ptr touchRecognizer, vm::ptr information) { throw __FUNCTION__; } -s32 sceSystemGestureResetTouchRecognizer(vm::psv::ptr touchRecognizer) +s32 sceSystemGestureResetTouchRecognizer(vm::ptr touchRecognizer) { throw __FUNCTION__; } -s32 sceSystemGestureUpdateTouchRecognizer(vm::psv::ptr touchRecognizer) +s32 sceSystemGestureUpdateTouchRecognizer(vm::ptr touchRecognizer) { throw __FUNCTION__; } -s32 sceSystemGestureUpdateTouchRecognizerRectangle(vm::psv::ptr touchRecognizer, vm::psv::ptr rectangle) +s32 sceSystemGestureUpdateTouchRecognizerRectangle(vm::ptr touchRecognizer, vm::ptr rectangle) { throw __FUNCTION__; } -s32 sceSystemGestureGetTouchEvents(vm::psv::ptr touchRecognizer, vm::psv::ptr eventBuffer, const u32 capacityOfBuffer, vm::psv::ptr numberOfEvent) +s32 sceSystemGestureGetTouchEvents(vm::ptr touchRecognizer, vm::ptr eventBuffer, const u32 capacityOfBuffer, vm::ptr numberOfEvent) { throw __FUNCTION__; } -s32 sceSystemGestureGetTouchEventsCount(vm::psv::ptr touchRecognizer) +s32 sceSystemGestureGetTouchEventsCount(vm::ptr touchRecognizer) { throw __FUNCTION__; } -s32 sceSystemGestureGetTouchEventByIndex(vm::psv::ptr touchRecognizer, const u32 index, vm::psv::ptr touchEvent) +s32 sceSystemGestureGetTouchEventByIndex(vm::ptr touchRecognizer, const u32 index, vm::ptr touchEvent) { throw __FUNCTION__; } -s32 sceSystemGestureGetTouchEventByEventID(vm::psv::ptr touchRecognizer, const u32 eventID, vm::psv::ptr touchEvent) +s32 sceSystemGestureGetTouchEventByEventID(vm::ptr touchRecognizer, const u32 eventID, vm::ptr touchEvent) { throw __FUNCTION__; } @@ -253,6 +97,7 @@ psv_log_base sceSystemGesture("SceSystemGesture", []() sceSystemGesture.on_load = nullptr; sceSystemGesture.on_unload = nullptr; sceSystemGesture.on_stop = nullptr; + sceSystemGesture.on_error = nullptr; REG_FUNC(0x6078A08B, sceSystemGestureInitializePrimitiveTouchRecognizer); REG_FUNC(0xFD5A6504, sceSystemGestureResetPrimitiveTouchRecognizer); diff --git a/rpcs3/Emu/ARMv7/Modules/sceSystemGesture.h b/rpcs3/Emu/ARMv7/Modules/sceSystemGesture.h new file mode 100644 index 0000000000..4f3a85f66a --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/sceSystemGesture.h @@ -0,0 +1,161 @@ +#pragma once + +#include "sceTouch.h" + +enum SceSystemGestureTouchState : s32 +{ + SCE_SYSTEM_GESTURE_TOUCH_STATE_INACTIVE = 0, + SCE_SYSTEM_GESTURE_TOUCH_STATE_BEGIN = 1, + SCE_SYSTEM_GESTURE_TOUCH_STATE_ACTIVE = 2, + SCE_SYSTEM_GESTURE_TOUCH_STATE_END = 3 +}; + +enum SceSystemGestureType : s32 +{ + SCE_SYSTEM_GESTURE_TYPE_TAP = 1, + SCE_SYSTEM_GESTURE_TYPE_DRAG = 2, + SCE_SYSTEM_GESTURE_TYPE_TAP_AND_HOLD = 4, + SCE_SYSTEM_GESTURE_TYPE_PINCH_OUT_IN = 8 +}; + +struct SceSystemGestureVector2 +{ + le_t x; + le_t y; +}; + +struct SceSystemGestureRectangle +{ + le_t x; + le_t y; + le_t width; + le_t height; +}; + +struct SceSystemGesturePrimitiveTouchEvent +{ + le_t eventState; // SceSystemGestureTouchState + le_t primitiveID; + SceSystemGestureVector2 pressedPosition; + le_t pressedForce; + SceSystemGestureVector2 currentPosition; + le_t currentForce; + SceSystemGestureVector2 deltaVector; + le_t deltaForce; + le_t deltaTime; + le_t elapsedTime; + u8 reserved[56]; +}; + +struct SceSystemGesturePrimitiveTouchRecognizerParameter +{ + u8 reserved[64]; +}; + +struct SceSystemGestureTouchRecognizer +{ + le_t reserved[307]; +}; + +struct SceSystemGestureTouchRecognizerInformation +{ + le_t gestureType; // SceSystemGestureType + le_t touchPanelPortID; + SceSystemGestureRectangle rectangle; + le_t updatedTime; + u8 reserved[256]; +}; + +struct SceSystemGestureTapRecognizerParameter +{ + u8 maxTapCount; + u8 reserved[63]; +}; + +struct SceSystemGestureDragRecognizerParameter +{ + u8 reserved[64]; +}; + +struct SceSystemGestureTapAndHoldRecognizerParameter +{ + le_t timeToInvokeEvent; + u8 reserved[56]; +}; + +struct SceSystemGesturePinchOutInRecognizerParameter +{ + u8 reserved[64]; +}; + +union SceSystemGestureTouchRecognizerParameter +{ + u8 parameterBuf[64]; + SceSystemGestureTapRecognizerParameter tap; + SceSystemGestureDragRecognizerParameter drag; + SceSystemGestureTapAndHoldRecognizerParameter tapAndHold; + SceSystemGesturePinchOutInRecognizerParameter pinchOutIn; +}; + +struct SceSystemGestureTapEventProperty +{ + le_t primitiveID; + SceSystemGestureVector2 position; + u8 tappedCount; + u8 reserved[57]; +}; + +struct SceSystemGestureDragEventProperty +{ + le_t primitiveID; + SceSystemGestureVector2 deltaVector; + SceSystemGestureVector2 currentPosition; + SceSystemGestureVector2 pressedPosition; + u8 reserved[50]; +}; + +struct SceSystemGestureTapAndHoldEventProperty +{ + le_t primitiveID; + SceSystemGestureVector2 pressedPosition; + u8 reserved[58]; +}; + +struct SceSystemGesturePinchOutInEventProperty +{ + le_t scale; + + struct _primitive_t + { + le_t primitiveID; + SceSystemGestureVector2 currentPosition; + SceSystemGestureVector2 deltaVector; + SceSystemGestureVector2 pairedPosition; + }; + + _primitive_t primitive[2]; + u8 reserved[32]; +}; + +struct SceSystemGestureTouchEvent +{ + le_t eventID; + le_t eventState; // SceSystemGestureTouchState + le_t gestureType; // SceSystemGestureType + u8 padding[4]; + le_t updatedTime; + + union _property_t + { + u8 propertyBuf[64]; + SceSystemGestureTapEventProperty tap; + SceSystemGestureDragEventProperty drag; + SceSystemGestureTapAndHoldEventProperty tapAndHold; + SceSystemGesturePinchOutInEventProperty pinchOutIn; + }; + + _property_t property; + u8 reserved[56]; +}; + +extern psv_log_base sceSystemGesture; diff --git a/rpcs3/Emu/ARMv7/Modules/sceTouch.cpp b/rpcs3/Emu/ARMv7/Modules/sceTouch.cpp index b6ce6ccc77..0836a407c1 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceTouch.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceTouch.cpp @@ -4,17 +4,17 @@ #include "sceTouch.h" -s32 sceTouchGetPanelInfo(u32 port, vm::psv::ptr pPanelInfo) +s32 sceTouchGetPanelInfo(u32 port, vm::ptr pPanelInfo) { throw __FUNCTION__; } -s32 sceTouchRead(u32 port, vm::psv::ptr pData, u32 nBufs) +s32 sceTouchRead(u32 port, vm::ptr pData, u32 nBufs) { throw __FUNCTION__; } -s32 sceTouchPeek(u32 port, vm::psv::ptr pData, u32 nBufs) +s32 sceTouchPeek(u32 port, vm::ptr pData, u32 nBufs) { throw __FUNCTION__; } @@ -24,7 +24,7 @@ s32 sceTouchSetSamplingState(u32 port, u32 state) throw __FUNCTION__; } -s32 sceTouchGetSamplingState(u32 port, vm::psv::ptr pState) +s32 sceTouchGetSamplingState(u32 port, vm::ptr pState) { throw __FUNCTION__; } @@ -37,6 +37,7 @@ psv_log_base sceTouch("SceTouch", []() sceTouch.on_load = nullptr; sceTouch.on_unload = nullptr; sceTouch.on_stop = nullptr; + sceTouch.on_error = nullptr; REG_FUNC(0x169A1D58, sceTouchRead); REG_FUNC(0xFF082DF0, sceTouchPeek); diff --git a/rpcs3/Emu/ARMv7/Modules/sceTouch.h b/rpcs3/Emu/ARMv7/Modules/sceTouch.h index a71f6003c2..021f6a86c6 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceTouch.h +++ b/rpcs3/Emu/ARMv7/Modules/sceTouch.h @@ -2,14 +2,14 @@ struct SceTouchPanelInfo { - s16 minAaX; - s16 minAaY; - s16 maxAaX; - s16 maxAaY; - s16 minDispX; - s16 minDispY; - s16 maxDispX; - s16 maxDispY; + le_t minAaX; + le_t minAaY; + le_t maxAaX; + le_t maxAaY; + le_t minDispX; + le_t minDispY; + le_t maxDispX; + le_t maxDispY; u8 minForce; u8 maxForce; u8 rsv[30]; @@ -19,17 +19,17 @@ struct SceTouchReport { u8 id; u8 force; - s16 x; - s16 y; + le_t x; + le_t y; s8 rsv[8]; - u16 info; + le_t info; }; struct SceTouchData { - u64 timeStamp; - u32 status; - u32 reportNum; + le_t timeStamp; + le_t status; + le_t reportNum; SceTouchReport report[8]; }; diff --git a/rpcs3/Emu/ARMv7/Modules/sceUlt.cpp b/rpcs3/Emu/ARMv7/Modules/sceUlt.cpp index 5777638f92..5a5e76362a 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceUlt.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceUlt.cpp @@ -2,168 +2,11 @@ #include "Emu/System.h" #include "Emu/ARMv7/PSVFuncList.h" -#include "sceLibKernel.h" - -extern psv_log_base sceUlt; - -#define CHECK_SIZE(type, size) static_assert(sizeof(type) == size, "Invalid " #type " size") - -struct _SceUltOptParamHeader -{ - s64 reserved[2]; -}; - -struct SceUltWaitingQueueResourcePoolOptParam -{ - _SceUltOptParamHeader header; - u64 reserved[14]; -}; - -CHECK_SIZE(SceUltWaitingQueueResourcePoolOptParam, 128); - -struct SceUltWaitingQueueResourcePool -{ - u64 reserved[32]; -}; - -CHECK_SIZE(SceUltWaitingQueueResourcePool, 256); - -struct SceUltQueueDataResourcePoolOptParam -{ - _SceUltOptParamHeader header; - u64 reserved[14]; -}; - -CHECK_SIZE(SceUltQueueDataResourcePoolOptParam, 128); - -struct SceUltQueueDataResourcePool -{ - u64 reserved[32]; -}; - -CHECK_SIZE(SceUltQueueDataResourcePool, 256); - -struct SceUltMutexOptParam -{ - _SceUltOptParamHeader header; - u32 attribute; - u32 reserved_0; - u64 reserved[13]; -}; - -CHECK_SIZE(SceUltMutexOptParam, 128); - -struct SceUltMutex -{ - u64 reserved[32]; -}; - -CHECK_SIZE(SceUltMutex, 256); - -struct SceUltConditionVariableOptParam -{ - _SceUltOptParamHeader header; - u64 reserved[14]; -}; - -CHECK_SIZE(SceUltConditionVariableOptParam, 128); - -struct SceUltConditionVariable -{ - u64 reserved[32]; -}; - -CHECK_SIZE(SceUltConditionVariable, 256); - -struct SceUltQueueOptParam -{ - _SceUltOptParamHeader header; - u64 reserved[14]; -}; - -CHECK_SIZE(SceUltQueueOptParam, 128); - -struct SceUltQueue -{ - u64 reserved[32]; -}; - -CHECK_SIZE(SceUltQueue, 256); - -struct SceUltReaderWriterLockOptParam -{ - _SceUltOptParamHeader header; - u64 reserved[14]; -}; - -CHECK_SIZE(SceUltReaderWriterLockOptParam, 128); - -struct SceUltReaderWriterLock -{ - u64 reserved[32]; -}; - -CHECK_SIZE(SceUltReaderWriterLock, 256); - -struct SceUltSemaphoreOptParam -{ - _SceUltOptParamHeader header; - u64 reserved[14]; -}; - -CHECK_SIZE(SceUltSemaphoreOptParam, 128); - -struct SceUltSemaphore -{ - u64 reserved[32]; -}; - -CHECK_SIZE(SceUltSemaphore, 256); - -struct SceUltUlthreadRuntimeOptParam -{ - _SceUltOptParamHeader header; - - u32 oneShotThreadStackSize; - s32 workerThreadPriority; - u32 workerThreadCpuAffinityMask; - u32 workerThreadAttr; - vm::psv::ptr workerThreadOptParam; - - u64 reserved[11]; -}; - -CHECK_SIZE(SceUltUlthreadRuntimeOptParam, 128); - -struct SceUltUlthreadRuntime -{ - u64 reserved[128]; -}; - -CHECK_SIZE(SceUltUlthreadRuntime, 1024); - -struct SceUltUlthreadOptParam -{ - _SceUltOptParamHeader header; - u32 attribute; - u32 reserved_0; - u64 reserved[13]; -}; - -CHECK_SIZE(SceUltUlthreadOptParam, 128); - -struct SceUltUlthread -{ - u64 reserved[32]; -}; - -CHECK_SIZE(SceUltUlthread, 256); - -typedef vm::psv::ptr SceUltUlthreadEntry; +#include "sceUlt.h" // Functions -s32 _sceUltWaitingQueueResourcePoolOptParamInitialize(vm::psv::ptr optParam, u32 buildVersion) +s32 _sceUltWaitingQueueResourcePoolOptParamInitialize(vm::ptr optParam, u32 buildVersion) { throw __FUNCTION__; } @@ -174,23 +17,23 @@ u32 sceUltWaitingQueueResourcePoolGetWorkAreaSize(u32 numThreads, u32 numSyncObj } s32 _sceUltWaitingQueueResourcePoolCreate( - vm::psv::ptr pool, - vm::psv::ptr name, + vm::ptr pool, + vm::ptr name, u32 numThreads, u32 numSyncObjects, - vm::psv::ptr workArea, - vm::psv::ptr optParam, + vm::ptr workArea, + vm::ptr optParam, u32 buildVersion) { throw __FUNCTION__; } -s32 sceUltWaitingQueueResourcePoolDestroy(vm::psv::ptr pool) +s32 sceUltWaitingQueueResourcePoolDestroy(vm::ptr pool) { throw __FUNCTION__; } -s32 _sceUltQueueDataResourcePoolOptParamInitialize(vm::psv::ptr optParam, u32 buildVersion) +s32 _sceUltQueueDataResourcePoolOptParamInitialize(vm::ptr optParam, u32 buildVersion) { throw __FUNCTION__; } @@ -201,20 +44,20 @@ u32 sceUltQueueDataResourcePoolGetWorkAreaSize(u32 numData, u32 dataSize, u32 nu } s32 _sceUltQueueDataResourcePoolCreate( - vm::psv::ptr pool, - vm::psv::ptr name, + vm::ptr pool, + vm::ptr name, u32 numData, u32 dataSize, u32 numQueueObject, - vm::psv::ptr waitingQueueResourcePool, - vm::psv::ptr workArea, - vm::psv::ptr optParam, + vm::ptr waitingQueueResourcePool, + vm::ptr workArea, + vm::ptr optParam, u32 buildVersion) { throw __FUNCTION__; } -s32 sceUltQueueDataResourcePoolDestroy(vm::psv::ptr pool) +s32 sceUltQueueDataResourcePoolDestroy(vm::ptr pool) { throw __FUNCTION__; } @@ -224,89 +67,89 @@ u32 sceUltMutexGetStandaloneWorkAreaSize(u32 waitingQueueDepth, u32 numCondition throw __FUNCTION__; } -s32 _sceUltMutexOptParamInitialize(vm::psv::ptr optParam, u32 buildVersion) +s32 _sceUltMutexOptParamInitialize(vm::ptr optParam, u32 buildVersion) { throw __FUNCTION__; } s32 _sceUltMutexCreate( - vm::psv::ptr mutex, - vm::psv::ptr name, - vm::psv::ptr waitingQueueResourcePool, - vm::psv::ptr optParam, + vm::ptr mutex, + vm::ptr name, + vm::ptr waitingQueueResourcePool, + vm::ptr optParam, u32 buildVersion) { throw __FUNCTION__; } s32 _sceUltMutexCreateStandalone( - vm::psv::ptr mutex, - vm::psv::ptr name, + vm::ptr mutex, + vm::ptr name, u32 numConditionVariable, u32 maxNumThreads, - vm::psv::ptr workArea, - vm::psv::ptr optParam, + vm::ptr workArea, + vm::ptr optParam, u32 buildVersion) { throw __FUNCTION__; } -s32 sceUltMutexLock(vm::psv::ptr mutex) +s32 sceUltMutexLock(vm::ptr mutex) { throw __FUNCTION__; } -s32 sceUltMutexTryLock(vm::psv::ptr mutex) +s32 sceUltMutexTryLock(vm::ptr mutex) { throw __FUNCTION__; } -s32 sceUltMutexUnlock(vm::psv::ptr mutex) +s32 sceUltMutexUnlock(vm::ptr mutex) { throw __FUNCTION__; } -s32 sceUltMutexDestroy(vm::psv::ptr mutex) +s32 sceUltMutexDestroy(vm::ptr mutex) { throw __FUNCTION__; } -s32 _sceUltConditionVariableOptParamInitialize(vm::psv::ptr optParam, u32 buildVersion) +s32 _sceUltConditionVariableOptParamInitialize(vm::ptr optParam, u32 buildVersion) { throw __FUNCTION__; } s32 _sceUltConditionVariableCreate( - vm::psv::ptr conditionVariable, - vm::psv::ptr name, - vm::psv::ptr mutex, - vm::psv::ptr optParam, + vm::ptr conditionVariable, + vm::ptr name, + vm::ptr mutex, + vm::ptr optParam, u32 buildVersion) { throw __FUNCTION__; } -s32 sceUltConditionVariableSignal(vm::psv::ptr conditionVariable) +s32 sceUltConditionVariableSignal(vm::ptr conditionVariable) { throw __FUNCTION__; } -s32 sceUltConditionVariableSignalAll(vm::psv::ptr conditionVariable) +s32 sceUltConditionVariableSignalAll(vm::ptr conditionVariable) { throw __FUNCTION__; } -s32 sceUltConditionVariableWait(vm::psv::ptr conditionVariable) +s32 sceUltConditionVariableWait(vm::ptr conditionVariable) { throw __FUNCTION__; } -s32 sceUltConditionVariableDestroy(vm::psv::ptr conditionVariable) +s32 sceUltConditionVariableDestroy(vm::ptr conditionVariable) { throw __FUNCTION__; } -s32 _sceUltQueueOptParamInitialize(vm::psv::ptr optParam, u32 buildVersion) +s32 _sceUltQueueOptParamInitialize(vm::ptr optParam, u32 buildVersion) { throw __FUNCTION__; } @@ -319,76 +162,76 @@ u32 sceUltQueueGetStandaloneWorkAreaSize(u32 queueDepth, } s32 _sceUltQueueCreate( - vm::psv::ptr queue, - vm::psv::ptr _name, + vm::ptr queue, + vm::ptr _name, u32 dataSize, - vm::psv::ptr resourcePool, - vm::psv::ptr queueResourcePool, - vm::psv::ptr optParam, + vm::ptr resourcePool, + vm::ptr queueResourcePool, + vm::ptr optParam, u32 buildVersion) { throw __FUNCTION__; } s32 _sceUltQueueCreateStandalone( - vm::psv::ptr queue, - vm::psv::ptr name, + vm::ptr queue, + vm::ptr name, u32 queueDepth, u32 dataSize, u32 waitingQueueLength, - vm::psv::ptr workArea, - vm::psv::ptr optParam, + vm::ptr workArea, + vm::ptr optParam, u32 buildVersion) { throw __FUNCTION__; } -s32 sceUltQueuePush(vm::psv::ptr queue, vm::psv::ptr data) +s32 sceUltQueuePush(vm::ptr queue, vm::ptr data) { throw __FUNCTION__; } -s32 sceUltQueueTryPush(vm::psv::ptr queue, vm::psv::ptr data) +s32 sceUltQueueTryPush(vm::ptr queue, vm::ptr data) { throw __FUNCTION__; } -s32 sceUltQueuePop(vm::psv::ptr queue, vm::psv::ptr data) +s32 sceUltQueuePop(vm::ptr queue, vm::ptr data) { throw __FUNCTION__; } -s32 sceUltQueueTryPop(vm::psv::ptr queue, vm::psv::ptr data) +s32 sceUltQueueTryPop(vm::ptr queue, vm::ptr data) { throw __FUNCTION__; } -s32 sceUltQueueDestroy(vm::psv::ptr queue) +s32 sceUltQueueDestroy(vm::ptr queue) { throw __FUNCTION__; } -s32 _sceUltReaderWriterLockOptParamInitialize(vm::psv::ptr optParam, u32 buildVersion) +s32 _sceUltReaderWriterLockOptParamInitialize(vm::ptr optParam, u32 buildVersion) { throw __FUNCTION__; } s32 _sceUltReaderWriterLockCreate( - vm::psv::ptr rwlock, - vm::psv::ptr name, - vm::psv::ptr waitingQueueResourcePool, - vm::psv::ptr optParam, + vm::ptr rwlock, + vm::ptr name, + vm::ptr waitingQueueResourcePool, + vm::ptr optParam, u32 buildVersion) { throw __FUNCTION__; } s32 _sceUltReaderWriterLockCreateStandalone( - vm::psv::ptr rwlock, - vm::psv::ptr name, + vm::ptr rwlock, + vm::ptr name, u32 waitingQueueDepth, - vm::psv::ptr workArea, - vm::psv::ptr optParam, + vm::ptr workArea, + vm::ptr optParam, u32 buildVersion) { throw __FUNCTION__; @@ -399,78 +242,78 @@ u32 sceUltReaderWriterLockGetStandaloneWorkAreaSize(u32 waitingQueueDepth) throw __FUNCTION__; } -s32 sceUltReaderWriterLockLockRead(vm::psv::ptr rwlock) +s32 sceUltReaderWriterLockLockRead(vm::ptr rwlock) { throw __FUNCTION__; } -s32 sceUltReaderWriterLockTryLockRead(vm::psv::ptr rwlock) +s32 sceUltReaderWriterLockTryLockRead(vm::ptr rwlock) { throw __FUNCTION__; } -s32 sceUltReaderWriterLockUnlockRead(vm::psv::ptr rwlock) +s32 sceUltReaderWriterLockUnlockRead(vm::ptr rwlock) { throw __FUNCTION__; } -s32 sceUltReaderWriterLockLockWrite(vm::psv::ptr rwlock) +s32 sceUltReaderWriterLockLockWrite(vm::ptr rwlock) { throw __FUNCTION__; } -s32 sceUltReaderWriterLockTryLockWrite(vm::psv::ptr rwlock) +s32 sceUltReaderWriterLockTryLockWrite(vm::ptr rwlock) { throw __FUNCTION__; } -s32 sceUltReaderWriterLockUnlockWrite(vm::psv::ptr rwlock) +s32 sceUltReaderWriterLockUnlockWrite(vm::ptr rwlock) { throw __FUNCTION__; } -s32 sceUltReaderWriterLockDestroy(vm::psv::ptr rwlock) +s32 sceUltReaderWriterLockDestroy(vm::ptr rwlock) { throw __FUNCTION__; } -s32 _sceUltSemaphoreOptParamInitialize(vm::psv::ptr optParam, u32 buildVersion) +s32 _sceUltSemaphoreOptParamInitialize(vm::ptr optParam, u32 buildVersion) { throw __FUNCTION__; } s32 _sceUltSemaphoreCreate( - vm::psv::ptr semaphore, - vm::psv::ptr name, + vm::ptr semaphore, + vm::ptr name, s32 numInitialResource, - vm::psv::ptr waitingQueueResourcePool, - vm::psv::ptr optParam, + vm::ptr waitingQueueResourcePool, + vm::ptr optParam, u32 buildVersion) { throw __FUNCTION__; } -s32 sceUltSemaphoreAcquire(vm::psv::ptr semaphore, s32 numResource) +s32 sceUltSemaphoreAcquire(vm::ptr semaphore, s32 numResource) { throw __FUNCTION__; } -s32 sceUltSemaphoreTryAcquire(vm::psv::ptr semaphore, s32 numResource) +s32 sceUltSemaphoreTryAcquire(vm::ptr semaphore, s32 numResource) { throw __FUNCTION__; } -s32 sceUltSemaphoreRelease(vm::psv::ptr semaphore, s32 numResource) +s32 sceUltSemaphoreRelease(vm::ptr semaphore, s32 numResource) { throw __FUNCTION__; } -s32 sceUltSemaphoreDestroy(vm::psv::ptr semaphore) +s32 sceUltSemaphoreDestroy(vm::ptr semaphore) { throw __FUNCTION__; } -s32 _sceUltUlthreadRuntimeOptParamInitialize(vm::psv::ptr optParam, u32 buildVersion) +s32 _sceUltUlthreadRuntimeOptParamInitialize(vm::ptr optParam, u32 buildVersion) { throw __FUNCTION__; } @@ -481,36 +324,36 @@ u32 sceUltUlthreadRuntimeGetWorkAreaSize(u32 numMaxUlthread, u32 numWorkerThread } s32 _sceUltUlthreadRuntimeCreate( - vm::psv::ptr runtime, - vm::psv::ptr name, + vm::ptr runtime, + vm::ptr name, u32 numMaxUlthread, u32 numWorkerThread, - vm::psv::ptr workArea, - vm::psv::ptr optParam, + vm::ptr workArea, + vm::ptr optParam, u32 buildVersion) { throw __FUNCTION__; } -s32 sceUltUlthreadRuntimeDestroy(vm::psv::ptr runtime) +s32 sceUltUlthreadRuntimeDestroy(vm::ptr runtime) { throw __FUNCTION__; } -s32 _sceUltUlthreadOptParamInitialize(vm::psv::ptr optParam, u32 buildVersion) +s32 _sceUltUlthreadOptParamInitialize(vm::ptr optParam, u32 buildVersion) { throw __FUNCTION__; } s32 _sceUltUlthreadCreate( - vm::psv::ptr ulthread, - vm::psv::ptr name, - SceUltUlthreadEntry entry, + vm::ptr ulthread, + vm::ptr name, + vm::ptr entry, u32 arg, - vm::psv::ptr context, + vm::ptr context, u32 sizeContext, - vm::psv::ptr runtime, - vm::psv::ptr optParam, + vm::ptr runtime, + vm::ptr optParam, u32 buildVersion) { throw __FUNCTION__; @@ -526,17 +369,17 @@ s32 sceUltUlthreadExit(s32 status) throw __FUNCTION__; } -s32 sceUltUlthreadJoin(vm::psv::ptr ulthread, vm::psv::ptr status) +s32 sceUltUlthreadJoin(vm::ptr ulthread, vm::ptr status) { throw __FUNCTION__; } -s32 sceUltUlthreadTryJoin(vm::psv::ptr ulthread, vm::psv::ptr status) +s32 sceUltUlthreadTryJoin(vm::ptr ulthread, vm::ptr status) { throw __FUNCTION__; } -s32 sceUltUlthreadGetSelf(vm::psv::pptr ulthread) +s32 sceUltUlthreadGetSelf(vm::pptr ulthread) { throw __FUNCTION__; } @@ -548,6 +391,7 @@ psv_log_base sceUlt("SceUlt", []() sceUlt.on_load = nullptr; sceUlt.on_unload = nullptr; sceUlt.on_stop = nullptr; + sceUlt.on_error = nullptr; REG_FUNC(0xEF094E35, _sceUltWaitingQueueResourcePoolOptParamInitialize); REG_FUNC(0x644DA029, sceUltWaitingQueueResourcePoolGetWorkAreaSize); diff --git a/rpcs3/Emu/ARMv7/Modules/sceUlt.h b/rpcs3/Emu/ARMv7/Modules/sceUlt.h new file mode 100644 index 0000000000..f26f4d303f --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/sceUlt.h @@ -0,0 +1,158 @@ +#pragma once + +#include "sceLibKernel.h" + +struct _SceUltOptParamHeader +{ + le_t reserved[2]; +}; + +struct SceUltWaitingQueueResourcePoolOptParam +{ + _SceUltOptParamHeader header; + le_t reserved[14]; +}; + +CHECK_SIZE(SceUltWaitingQueueResourcePoolOptParam, 128); + +struct SceUltWaitingQueueResourcePool +{ + le_t reserved[32]; +}; + +CHECK_SIZE(SceUltWaitingQueueResourcePool, 256); + +struct SceUltQueueDataResourcePoolOptParam +{ + _SceUltOptParamHeader header; + le_t reserved[14]; +}; + +CHECK_SIZE(SceUltQueueDataResourcePoolOptParam, 128); + +struct SceUltQueueDataResourcePool +{ + le_t reserved[32]; +}; + +CHECK_SIZE(SceUltQueueDataResourcePool, 256); + +struct SceUltMutexOptParam +{ + _SceUltOptParamHeader header; + le_t attribute; + le_t reserved_0; + le_t reserved[13]; +}; + +CHECK_SIZE(SceUltMutexOptParam, 128); + +struct SceUltMutex +{ + le_t reserved[32]; +}; + +CHECK_SIZE(SceUltMutex, 256); + +struct SceUltConditionVariableOptParam +{ + _SceUltOptParamHeader header; + le_t reserved[14]; +}; + +CHECK_SIZE(SceUltConditionVariableOptParam, 128); + +struct SceUltConditionVariable +{ + le_t reserved[32]; +}; + +CHECK_SIZE(SceUltConditionVariable, 256); + +struct SceUltQueueOptParam +{ + _SceUltOptParamHeader header; + le_t reserved[14]; +}; + +CHECK_SIZE(SceUltQueueOptParam, 128); + +struct SceUltQueue +{ + le_t reserved[32]; +}; + +CHECK_SIZE(SceUltQueue, 256); + +struct SceUltReaderWriterLockOptParam +{ + _SceUltOptParamHeader header; + le_t reserved[14]; +}; + +CHECK_SIZE(SceUltReaderWriterLockOptParam, 128); + +struct SceUltReaderWriterLock +{ + le_t reserved[32]; +}; + +CHECK_SIZE(SceUltReaderWriterLock, 256); + +struct SceUltSemaphoreOptParam +{ + _SceUltOptParamHeader header; + le_t reserved[14]; +}; + +CHECK_SIZE(SceUltSemaphoreOptParam, 128); + +struct SceUltSemaphore +{ + le_t reserved[32]; +}; + +CHECK_SIZE(SceUltSemaphore, 256); + +struct SceUltUlthreadRuntimeOptParam +{ + _SceUltOptParamHeader header; + + le_t oneShotThreadStackSize; + le_t workerThreadPriority; + le_t workerThreadCpuAffinityMask; + le_t workerThreadAttr; + vm::lcptr workerThreadOptParam; + + le_t reserved[11]; +}; + +CHECK_SIZE(SceUltUlthreadRuntimeOptParam, 128); + +struct SceUltUlthreadRuntime +{ + le_t reserved[128]; +}; + +CHECK_SIZE(SceUltUlthreadRuntime, 1024); + +struct SceUltUlthreadOptParam +{ + _SceUltOptParamHeader header; + le_t attribute; + le_t reserved_0; + le_t reserved[13]; +}; + +CHECK_SIZE(SceUltUlthreadOptParam, 128); + +struct SceUltUlthread +{ + le_t reserved[32]; +}; + +CHECK_SIZE(SceUltUlthread, 256); + +using SceUltUlthreadEntry = func_def; + +extern psv_log_base sceUlt; diff --git a/rpcs3/Emu/ARMv7/Modules/sceVideodec.cpp b/rpcs3/Emu/ARMv7/Modules/sceVideodec.cpp index 7899777f97..99290af045 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceVideodec.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceVideodec.cpp @@ -2,135 +2,9 @@ #include "Emu/System.h" #include "Emu/ARMv7/PSVFuncList.h" -extern psv_log_base sceVideodec; +#include "sceVideodec.h" -struct SceVideodecQueryInitInfoHwAvcdec -{ - u32 size; - u32 horizontal; - u32 vertical; - u32 numOfRefFrames; - u32 numOfStreams; -}; - -union SceVideodecQueryInitInfo -{ - u8 reserved[32]; - SceVideodecQueryInitInfoHwAvcdec hwAvc; -}; - -struct SceVideodecTimeStamp -{ - u32 upper; - u32 lower; -}; - -struct SceAvcdecQueryDecoderInfo -{ - u32 horizontal; - u32 vertical; - u32 numOfRefFrames; - -}; - -struct SceAvcdecDecoderInfo -{ - u32 frameMemSize; - -}; - -struct SceAvcdecBuf -{ - vm::psv::ptr pBuf; - u32 size; -}; - -struct SceAvcdecCtrl -{ - u32 handle; - SceAvcdecBuf frameBuf; -}; - -struct SceAvcdecAu -{ - SceVideodecTimeStamp pts; - SceVideodecTimeStamp dts; - SceAvcdecBuf es; -}; - -struct SceAvcdecInfo -{ - u32 numUnitsInTick; - u32 timeScale; - u8 fixedFrameRateFlag; - - u8 aspectRatioIdc; - u16 sarWidth; - u16 sarHeight; - - u8 colourPrimaries; - u8 transferCharacteristics; - u8 matrixCoefficients; - - u8 videoFullRangeFlag; - - u8 picStruct[2]; - u8 ctType; - - u8 padding[3]; -}; - -struct SceAvcdecFrameOptionRGBA -{ - u8 alpha; - u8 cscCoefficient; - u8 reserved[14]; -}; - -union SceAvcdecFrameOption -{ - u8 reserved[16]; - SceAvcdecFrameOptionRGBA rgba; -}; - - -struct SceAvcdecFrame -{ - u32 pixelType; - u32 framePitch; - u32 frameWidth; - u32 frameHeight; - - u32 horizontalSize; - u32 verticalSize; - - u32 frameCropLeftOffset; - u32 frameCropRightOffset; - u32 frameCropTopOffset; - u32 frameCropBottomOffset; - - SceAvcdecFrameOption opt; - - vm::psv::ptr pPicture[2]; -}; - - -struct SceAvcdecPicture -{ - u32 size; - SceAvcdecFrame frame; - SceAvcdecInfo info; -}; - -struct SceAvcdecArrayPicture -{ - u32 numOfOutput; - u32 numOfElm; - vm::psv::lpptr pPicture; -}; - - -s32 sceVideodecInitLibrary(u32 codecType, vm::psv::ptr pInitInfo) +s32 sceVideodecInitLibrary(u32 codecType, vm::ptr pInitInfo) { throw __FUNCTION__; } @@ -140,37 +14,37 @@ s32 sceVideodecTermLibrary(u32 codecType) throw __FUNCTION__; } -s32 sceAvcdecQueryDecoderMemSize(u32 codecType, vm::psv::ptr pDecoderInfo, vm::psv::ptr pMemInfo) +s32 sceAvcdecQueryDecoderMemSize(u32 codecType, vm::ptr pDecoderInfo, vm::ptr pMemInfo) { throw __FUNCTION__; } -s32 sceAvcdecCreateDecoder(u32 codecType, vm::psv::ptr pCtrl, vm::psv::ptr pDecoderInfo) +s32 sceAvcdecCreateDecoder(u32 codecType, vm::ptr pCtrl, vm::ptr pDecoderInfo) { throw __FUNCTION__; } -s32 sceAvcdecDeleteDecoder(vm::psv::ptr pCtrl) +s32 sceAvcdecDeleteDecoder(vm::ptr pCtrl) { throw __FUNCTION__; } -s32 sceAvcdecDecodeAvailableSize(vm::psv::ptr pCtrl) +s32 sceAvcdecDecodeAvailableSize(vm::ptr pCtrl) { throw __FUNCTION__; } -s32 sceAvcdecDecode(vm::psv::ptr pCtrl, vm::psv::ptr pAu, vm::psv::ptr pArrayPicture) +s32 sceAvcdecDecode(vm::ptr pCtrl, vm::ptr pAu, vm::ptr pArrayPicture) { throw __FUNCTION__; } -s32 sceAvcdecDecodeStop(vm::psv::ptr pCtrl, vm::psv::ptr pArrayPicture) +s32 sceAvcdecDecodeStop(vm::ptr pCtrl, vm::ptr pArrayPicture) { throw __FUNCTION__; } -s32 sceAvcdecDecodeFlush(vm::psv::ptr pCtrl) +s32 sceAvcdecDecodeFlush(vm::ptr pCtrl) { throw __FUNCTION__; } @@ -183,6 +57,7 @@ psv_log_base sceVideodec("SceVideodec", []() sceVideodec.on_load = nullptr; sceVideodec.on_unload = nullptr; sceVideodec.on_stop = nullptr; + sceVideodec.on_error = nullptr; REG_FUNC(0xF1AF65A3, sceVideodecInitLibrary); REG_FUNC(0x3A5F4924, sceVideodecTermLibrary); diff --git a/rpcs3/Emu/ARMv7/Modules/sceVideodec.h b/rpcs3/Emu/ARMv7/Modules/sceVideodec.h new file mode 100644 index 0000000000..825d4fc1b3 --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/sceVideodec.h @@ -0,0 +1,126 @@ +#pragma once + +struct SceVideodecQueryInitInfoHwAvcdec +{ + le_t size; + le_t horizontal; + le_t vertical; + le_t numOfRefFrames; + le_t numOfStreams; +}; + +union SceVideodecQueryInitInfo +{ + u8 reserved[32]; + SceVideodecQueryInitInfoHwAvcdec hwAvc; +}; + +struct SceVideodecTimeStamp +{ + le_t upper; + le_t lower; +}; + +struct SceAvcdecQueryDecoderInfo +{ + le_t horizontal; + le_t vertical; + le_t numOfRefFrames; +}; + +struct SceAvcdecDecoderInfo +{ + le_t frameMemSize; +}; + +struct SceAvcdecBuf +{ + vm::lptr pBuf; + le_t size; +}; + +struct SceAvcdecCtrl +{ + le_t handle; + SceAvcdecBuf frameBuf; +}; + +struct SceAvcdecAu +{ + SceVideodecTimeStamp pts; + SceVideodecTimeStamp dts; + SceAvcdecBuf es; +}; + +struct SceAvcdecInfo +{ + le_t numUnitsInTick; + le_t timeScale; + u8 fixedFrameRateFlag; + + u8 aspectRatioIdc; + le_t sarWidth; + le_t sarHeight; + + u8 colourPrimaries; + u8 transferCharacteristics; + u8 matrixCoefficients; + + u8 videoFullRangeFlag; + + u8 picStruct[2]; + u8 ctType; + + u8 padding[3]; +}; + +struct SceAvcdecFrameOptionRGBA +{ + u8 alpha; + u8 cscCoefficient; + u8 reserved[14]; +}; + +union SceAvcdecFrameOption +{ + u8 reserved[16]; + SceAvcdecFrameOptionRGBA rgba; +}; + + +struct SceAvcdecFrame +{ + le_t pixelType; + le_t framePitch; + le_t frameWidth; + le_t frameHeight; + + le_t horizontalSize; + le_t verticalSize; + + le_t frameCropLeftOffset; + le_t frameCropRightOffset; + le_t frameCropTopOffset; + le_t frameCropBottomOffset; + + SceAvcdecFrameOption opt; + + vm::lptr pPicture[2]; +}; + + +struct SceAvcdecPicture +{ + le_t size; + SceAvcdecFrame frame; + SceAvcdecInfo info; +}; + +struct SceAvcdecArrayPicture +{ + le_t numOfOutput; + le_t numOfElm; + vm::lpptr pPicture; +}; + +extern psv_log_base sceVideodec; diff --git a/rpcs3/Emu/ARMv7/Modules/sceVoice.cpp b/rpcs3/Emu/ARMv7/Modules/sceVoice.cpp index cddc5f43d2..7fc1dbf90b 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceVoice.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceVoice.cpp @@ -2,129 +2,9 @@ #include "Emu/System.h" #include "Emu/ARMv7/PSVFuncList.h" -extern psv_log_base sceVoice; +#include "sceVoice.h" -enum SceVoicePortType : s32 -{ - SCEVOICE_PORTTYPE_NULL = -1, - SCEVOICE_PORTTYPE_IN_DEVICE = 0, - SCEVOICE_PORTTYPE_IN_PCMAUDIO = 1, - SCEVOICE_PORTTYPE_IN_VOICE = 2, - SCEVOICE_PORTTYPE_OUT_PCMAUDIO = 3, - SCEVOICE_PORTTYPE_OUT_VOICE = 4, - SCEVOICE_PORTTYPE_OUT_DEVICE = 5 -}; - -enum SceVoicePortState : s32 -{ - SCEVOICE_PORTSTATE_NULL = -1, - SCEVOICE_PORTSTATE_IDLE = 0, - SCEVOICE_PORTSTATE_READY = 1, - SCEVOICE_PORTSTATE_BUFFERING = 2, - SCEVOICE_PORTSTATE_RUNNING = 3 -}; - -enum SceVoiceBitRate : s32 -{ - SCEVOICE_BITRATE_NULL = -1, - SCEVOICE_BITRATE_3850 = 3850, - SCEVOICE_BITRATE_4650 = 4650, - SCEVOICE_BITRATE_5700 = 5700, - SCEVOICE_BITRATE_7300 = 7300 -}; - -enum SceVoiceSamplingRate : s32 -{ - SCEVOICE_SAMPLINGRATE_NULL = -1, - SCEVOICE_SAMPLINGRATE_16000 = 16000 -}; - -enum SceVoicePcmDataType : s32 -{ - SCEVOICE_PCM_NULL = -1, - SCEVOICE_PCM_SHORT_LITTLE_ENDIAN = 0 -}; - -enum SceVoiceVersion : s32 -{ - SCEVOICE_VERSION_100 = 100 -}; - -enum SceVoiceAppType : s32 -{ - SCEVOICE_APPTYPE_GAME = 1 << 29 -}; - -struct SceVoicePCMFormat -{ - SceVoicePcmDataType dataType; - SceVoiceSamplingRate sampleRate; -}; - -struct SceVoiceResourceInfo -{ - u16 maxInVoicePort; - u16 maxOutVoicePort; - u16 maxInDevicePort; - u16 maxOutDevicePort; - u16 maxTotalPort; -}; - -struct SceVoiceBasePortInfo -{ - SceVoicePortType portType; - SceVoicePortState state; - vm::psv::ptr pEdge; - u32 numByte; - u32 frameSize; - u16 numEdge; - u16 reserved; -}; - -struct SceVoicePortParam -{ - SceVoicePortType portType; - u16 threshold; - u16 bMute; - float volume; - - union - { - struct - { - SceVoiceBitRate bitrate; - } voice; - - struct - { - u32 bufSize; - SceVoicePCMFormat format; - } pcmaudio; - - - struct - { - u32 playerId; - } device; - }; -}; - -typedef vm::psv::ptr event)> SceVoiceEventCallback; - -struct SceVoiceInitParam -{ - s32 appType; - SceVoiceEventCallback onEvent; - u8 reserved[24]; -}; - -struct SceVoiceStartParam -{ - s32 container; - u8 reserved[28]; -}; - -s32 sceVoiceInit(vm::psv::ptr pArg, SceVoiceVersion version) +s32 sceVoiceInit(vm::ptr pArg, SceVoiceVersion version) { throw __FUNCTION__; } @@ -134,7 +14,7 @@ s32 sceVoiceEnd() throw __FUNCTION__; } -s32 sceVoiceStart(vm::psv::ptr pArg) +s32 sceVoiceStart(vm::ptr pArg) { throw __FUNCTION__; } @@ -149,12 +29,12 @@ s32 sceVoiceResetPort(u32 portId) throw __FUNCTION__; } -s32 sceVoiceCreatePort(vm::psv::ptr portId, vm::psv::ptr pArg) +s32 sceVoiceCreatePort(vm::ptr portId, vm::ptr pArg) { throw __FUNCTION__; } -s32 sceVoiceUpdatePort(u32 portId, vm::psv::ptr pArg) +s32 sceVoiceUpdatePort(u32 portId, vm::ptr pArg) { throw __FUNCTION__; } @@ -174,12 +54,12 @@ s32 sceVoiceDeletePort(u32 portId) throw __FUNCTION__; } -s32 sceVoiceWriteToIPort(u32 ips, vm::psv::ptr data, vm::psv::ptr size, s16 frameGaps) +s32 sceVoiceWriteToIPort(u32 ips, vm::ptr data, vm::ptr size, s16 frameGaps) { throw __FUNCTION__; } -s32 sceVoiceReadFromOPort(u32 ops, vm::psv::ptr data, vm::psv::ptr size) +s32 sceVoiceReadFromOPort(u32 ops, vm::ptr data, vm::ptr size) { throw __FUNCTION__; } @@ -194,7 +74,7 @@ s32 sceVoiceSetMuteFlag(u32 portId, u16 bMuted) throw __FUNCTION__; } -s32 sceVoiceGetMuteFlag(u32 portId, vm::psv::ptr bMuted) +s32 sceVoiceGetMuteFlag(u32 portId, vm::ptr bMuted) { throw __FUNCTION__; } @@ -204,7 +84,7 @@ s32 sceVoiceGetMuteFlag(u32 portId, vm::psv::ptr bMuted) // throw __FUNCTION__; //} -s32 sceVoiceGetVolume(u32 portId, vm::psv::ptr volume) +s32 sceVoiceGetVolume(u32 portId, vm::ptr volume) { throw __FUNCTION__; } @@ -214,12 +94,12 @@ s32 sceVoiceSetBitRate(u32 portId, SceVoiceBitRate bitrate) throw __FUNCTION__; } -s32 sceVoiceGetBitRate(u32 portId, vm::psv::ptr bitrate) +s32 sceVoiceGetBitRate(u32 portId, vm::ptr bitrate) { throw __FUNCTION__; } -s32 sceVoiceGetPortInfo(u32 portId, vm::psv::ptr pInfo) +s32 sceVoiceGetPortInfo(u32 portId, vm::ptr pInfo) { throw __FUNCTION__; } @@ -244,7 +124,7 @@ s32 sceVoiceResumePortAll() throw __FUNCTION__; } -s32 sceVoiceGetResourceInfo(vm::psv::ptr pInfo) +s32 sceVoiceGetResourceInfo(vm::ptr pInfo) { throw __FUNCTION__; } @@ -257,6 +137,7 @@ psv_log_base sceVoice("SceVoice", []() sceVoice.on_load = nullptr; sceVoice.on_unload = nullptr; sceVoice.on_stop = nullptr; + sceVoice.on_error = nullptr; REG_FUNC(0xD02C00B4, sceVoiceGetBitRate); REG_FUNC(0xC913F7E9, sceVoiceGetMuteFlag); diff --git a/rpcs3/Emu/ARMv7/Modules/sceVoice.h b/rpcs3/Emu/ARMv7/Modules/sceVoice.h new file mode 100644 index 0000000000..227cef8615 --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/sceVoice.h @@ -0,0 +1,130 @@ +#pragma once + +enum SceVoicePortType : s32 +{ + SCEVOICE_PORTTYPE_NULL = -1, + SCEVOICE_PORTTYPE_IN_DEVICE = 0, + SCEVOICE_PORTTYPE_IN_PCMAUDIO = 1, + SCEVOICE_PORTTYPE_IN_VOICE = 2, + SCEVOICE_PORTTYPE_OUT_PCMAUDIO = 3, + SCEVOICE_PORTTYPE_OUT_VOICE = 4, + SCEVOICE_PORTTYPE_OUT_DEVICE = 5 +}; + +enum SceVoicePortState : s32 +{ + SCEVOICE_PORTSTATE_NULL = -1, + SCEVOICE_PORTSTATE_IDLE = 0, + SCEVOICE_PORTSTATE_READY = 1, + SCEVOICE_PORTSTATE_BUFFERING = 2, + SCEVOICE_PORTSTATE_RUNNING = 3 +}; + +enum SceVoiceBitRate : s32 +{ + SCEVOICE_BITRATE_NULL = -1, + SCEVOICE_BITRATE_3850 = 3850, + SCEVOICE_BITRATE_4650 = 4650, + SCEVOICE_BITRATE_5700 = 5700, + SCEVOICE_BITRATE_7300 = 7300 +}; + +enum SceVoiceSamplingRate : s32 +{ + SCEVOICE_SAMPLINGRATE_NULL = -1, + SCEVOICE_SAMPLINGRATE_16000 = 16000 +}; + +enum SceVoicePcmDataType : s32 +{ + SCEVOICE_PCM_NULL = -1, + SCEVOICE_PCM_SHORT_LITTLE_ENDIAN = 0 +}; + +enum SceVoiceVersion : s32 +{ + SCEVOICE_VERSION_100 = 100 +}; + +enum SceVoiceAppType : s32 +{ + SCEVOICE_APPTYPE_GAME = 1 << 29 +}; + +struct SceVoicePCMFormat +{ + le_t dataType; // SceVoicePcmDataType + le_t sampleRate; // SceVoiceSamplingRate +}; + +struct SceVoiceResourceInfo +{ + le_t maxInVoicePort; + le_t maxOutVoicePort; + le_t maxInDevicePort; + le_t maxOutDevicePort; + le_t maxTotalPort; +}; + +struct SceVoiceBasePortInfo +{ + le_t portType; // SceVoicePortType + le_t state; // SceVoicePortState + vm::lptr pEdge; + le_t numByte; + le_t frameSize; + le_t numEdge; + le_t reserved; +}; + +struct SceVoicePortParam +{ + le_t portType; // SceVoicePortType + le_t threshold; + le_t bMute; + le_t volume; + + union + { + struct _voice_t + { + le_t bitrate; // SceVoiceBitRate + }; + + _voice_t voice; + + struct _pcmaudio_t + { + using _format_t = SceVoicePCMFormat; + + le_t bufSize; + _format_t format; + }; + + _pcmaudio_t pcmaudio; + + struct _device_t + { + le_t playerId; + }; + + _device_t device; + }; +}; + +using SceVoiceEventCallback = func_def event)>; + +struct SceVoiceInitParam +{ + le_t appType; + vm::lptr onEvent; + u8 reserved[24]; +}; + +struct SceVoiceStartParam +{ + le_t container; + u8 reserved[28]; +}; + +extern psv_log_base sceVoice; diff --git a/rpcs3/Emu/ARMv7/Modules/sceVoiceQoS.cpp b/rpcs3/Emu/ARMv7/Modules/sceVoiceQoS.cpp index 050570aaa9..166bcb6344 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceVoiceQoS.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceVoiceQoS.cpp @@ -2,29 +2,7 @@ #include "Emu/System.h" #include "Emu/ARMv7/PSVFuncList.h" -extern psv_log_base sceVoiceQoS; - -typedef s32 SceVoiceQoSLocalId; -typedef s32 SceVoiceQoSRemoteId; -typedef s32 SceVoiceQoSConnectionId; - -enum SceVoiceQoSAttributeId : s32 -{ - SCE_VOICE_QOS_ATTR_MIC_VOLUME, - SCE_VOICE_QOS_ATTR_MIC_MUTE, - SCE_VOICE_QOS_ATTR_SPEAKER_VOLUME, - SCE_VOICE_QOS_ATTR_SPEAKER_MUTE, - SCE_VOICE_QOS_ATTR_DESIRED_OUT_BIT_RATE -}; - -enum SceVoiceQoSStatusId : s32 -{ - SCE_VOICE_QOS_IN_BITRATE, - SCE_VOICE_QOS_OUT_BITRATE, - SCE_VOICE_QOS_OUT_READ_BITRATE, - SCE_VOICE_QOS_IN_FRAME_RECEIVED_RATIO, - SCE_VOICE_QOS_HEARTBEAT_FLAG -}; +#include "sceVoiceQoS.h" s32 sceVoiceQoSInit() { @@ -36,77 +14,77 @@ s32 sceVoiceQoSEnd() throw __FUNCTION__; } -s32 sceVoiceQoSCreateLocalEndpoint(vm::psv::ptr pLocalId) +s32 sceVoiceQoSCreateLocalEndpoint(vm::ptr pLocalId) { throw __FUNCTION__; } -s32 sceVoiceQoSDeleteLocalEndpoint(SceVoiceQoSLocalId localId) +s32 sceVoiceQoSDeleteLocalEndpoint(s32 localId) { throw __FUNCTION__; } -s32 sceVoiceQoSCreateRemoteEndpoint(vm::psv::ptr pRemoteId) +s32 sceVoiceQoSCreateRemoteEndpoint(vm::ptr pRemoteId) { throw __FUNCTION__; } -s32 sceVoiceQoSDeleteRemoteEndpoint(SceVoiceQoSRemoteId remoteId) +s32 sceVoiceQoSDeleteRemoteEndpoint(s32 remoteId) { throw __FUNCTION__; } -s32 sceVoiceQoSConnect(vm::psv::ptr pConnectionId, SceVoiceQoSLocalId localId, SceVoiceQoSRemoteId remoteId) +s32 sceVoiceQoSConnect(vm::ptr pConnectionId, s32 localId, s32 remoteId) { throw __FUNCTION__; } -s32 sceVoiceQoSDisconnect(SceVoiceQoSConnectionId connectionId) +s32 sceVoiceQoSDisconnect(s32 connectionId) { throw __FUNCTION__; } -s32 sceVoiceQoSGetLocalEndpoint(SceVoiceQoSConnectionId connectionId, vm::psv::ptr pLocalId) +s32 sceVoiceQoSGetLocalEndpoint(s32 connectionId, vm::ptr pLocalId) { throw __FUNCTION__; } -s32 sceVoiceQoSGetRemoteEndpoint(SceVoiceQoSConnectionId connectionId, vm::psv::ptr pRemoteId) +s32 sceVoiceQoSGetRemoteEndpoint(s32 connectionId, vm::ptr pRemoteId) { throw __FUNCTION__; } -s32 sceVoiceQoSSetLocalEndpointAttribute(SceVoiceQoSLocalId localId, SceVoiceQoSAttributeId attributeId, vm::psv::ptr pAttributeValue, s32 attributeSize) +s32 sceVoiceQoSSetLocalEndpointAttribute(s32 localId, SceVoiceQoSAttributeId attributeId, vm::ptr pAttributeValue, s32 attributeSize) { throw __FUNCTION__; } -s32 sceVoiceQoSGetLocalEndpointAttribute(SceVoiceQoSLocalId localId, SceVoiceQoSAttributeId attributeId, vm::psv::ptr pAttributeValue, s32 attributeSize) +s32 sceVoiceQoSGetLocalEndpointAttribute(s32 localId, SceVoiceQoSAttributeId attributeId, vm::ptr pAttributeValue, s32 attributeSize) { throw __FUNCTION__; } -s32 sceVoiceQoSSetConnectionAttribute(SceVoiceQoSConnectionId connectionId, SceVoiceQoSAttributeId attributeId, vm::psv::ptr pAttributeValue, s32 attributeSize) +s32 sceVoiceQoSSetConnectionAttribute(s32 connectionId, SceVoiceQoSAttributeId attributeId, vm::ptr pAttributeValue, s32 attributeSize) { throw __FUNCTION__; } -s32 sceVoiceQoSGetConnectionAttribute(SceVoiceQoSConnectionId connectionId, SceVoiceQoSAttributeId attributeId, vm::psv::ptr pAttributeValue, s32 attributeSize) +s32 sceVoiceQoSGetConnectionAttribute(s32 connectionId, SceVoiceQoSAttributeId attributeId, vm::ptr pAttributeValue, s32 attributeSize) { throw __FUNCTION__; } -s32 sceVoiceQoSGetStatus(SceVoiceQoSConnectionId connectionId, SceVoiceQoSStatusId statusId, vm::psv::ptr pStatusValue, s32 statusSize) +s32 sceVoiceQoSGetStatus(s32 connectionId, SceVoiceQoSStatusId statusId, vm::ptr pStatusValue, s32 statusSize) { throw __FUNCTION__; } -s32 sceVoiceQoSWritePacket(SceVoiceQoSConnectionId connectionId, vm::psv::ptr pData, vm::psv::ptr pSize) +s32 sceVoiceQoSWritePacket(s32 connectionId, vm::ptr pData, vm::ptr pSize) { throw __FUNCTION__; } -s32 sceVoiceQoSReadPacket(SceVoiceQoSConnectionId connectionId, vm::psv::ptr pData, vm::psv::ptr pSize) +s32 sceVoiceQoSReadPacket(s32 connectionId, vm::ptr pData, vm::ptr pSize) { throw __FUNCTION__; } @@ -119,6 +97,7 @@ psv_log_base sceVoiceQoS("SceVoiceQos", []() sceVoiceQoS.on_load = nullptr; sceVoiceQoS.on_unload = nullptr; sceVoiceQoS.on_stop = nullptr; + sceVoiceQoS.on_error = nullptr; REG_FUNC(0x4B5FFF1C, sceVoiceQoSInit); REG_FUNC(0xFB0B747B, sceVoiceQoSEnd); diff --git a/rpcs3/Emu/ARMv7/Modules/sceVoiceQoS.h b/rpcs3/Emu/ARMv7/Modules/sceVoiceQoS.h new file mode 100644 index 0000000000..c66b56b366 --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/sceVoiceQoS.h @@ -0,0 +1,21 @@ +#pragma once + +enum SceVoiceQoSAttributeId : s32 +{ + SCE_VOICE_QOS_ATTR_MIC_VOLUME, + SCE_VOICE_QOS_ATTR_MIC_MUTE, + SCE_VOICE_QOS_ATTR_SPEAKER_VOLUME, + SCE_VOICE_QOS_ATTR_SPEAKER_MUTE, + SCE_VOICE_QOS_ATTR_DESIRED_OUT_BIT_RATE +}; + +enum SceVoiceQoSStatusId : s32 +{ + SCE_VOICE_QOS_IN_BITRATE, + SCE_VOICE_QOS_OUT_BITRATE, + SCE_VOICE_QOS_OUT_READ_BITRATE, + SCE_VOICE_QOS_IN_FRAME_RECEIVED_RATIO, + SCE_VOICE_QOS_HEARTBEAT_FLAG +}; + +extern psv_log_base sceVoiceQoS; diff --git a/rpcs3/Emu/ARMv7/Modules/sceXml.cpp b/rpcs3/Emu/ARMv7/Modules/sceXml.cpp index 525ce21565..f07d94665b 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceXml.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceXml.cpp @@ -2,7 +2,7 @@ #include "Emu/System.h" #include "Emu/ARMv7/PSVFuncList.h" -extern psv_log_base sceXml; +#include "sceXml.h" #define REG_FUNC(nid, name) reg_psv_func(nid, &sceXml, #name, name) @@ -11,6 +11,7 @@ psv_log_base sceXml("SceXml", []() sceXml.on_load = nullptr; sceXml.on_unload = nullptr; sceXml.on_stop = nullptr; + sceXml.on_error = nullptr; //REG_FUNC(0x57400A1A, _ZN3sce3Xml10SimpleDataC1EPKcj); //REG_FUNC(0x7E582075, _ZN3sce3Xml10SimpleDataC1Ev); diff --git a/rpcs3/Emu/ARMv7/Modules/sceXml.h b/rpcs3/Emu/ARMv7/Modules/sceXml.h new file mode 100644 index 0000000000..ea5d63ed71 --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/sceXml.h @@ -0,0 +1,3 @@ +#pragma once + +extern psv_log_base sceXml; diff --git a/rpcs3/Emu/ARMv7/PSVFuncList.cpp b/rpcs3/Emu/ARMv7/PSVFuncList.cpp index 220ca2c21d..de2b1d9c62 100644 --- a/rpcs3/Emu/ARMv7/PSVFuncList.cpp +++ b/rpcs3/Emu/ARMv7/PSVFuncList.cpp @@ -1,7 +1,22 @@ #include "stdafx.h" +#include "Emu/System.h" #include "ARMv7Thread.h" #include "PSVFuncList.h" +psv_log_base::psv_log_base(const std::string& name, init_func_t init) + : m_name(name) + , m_init(init) +{ + on_error = [this](s32 code, psv_func* func) + { + if (code < 0) + { + Error("%s() failed: 0x%08X", func->name, code); + Emu.Pause(); + } + }; +} + std::vector g_psv_func_list; std::vector g_psv_modules; @@ -67,6 +82,12 @@ void execute_psv_func_by_index(ARMv7Context& context, u32 index) throw "Unimplemented function"; } + // rough error code processing + if (context.GPR[0] && func->module && func->module->on_error) + { + func->module->on_error(context.GPR[0], func); + } + context.thread.m_last_syscall = old_last_syscall; } else diff --git a/rpcs3/Emu/ARMv7/PSVFuncList.h b/rpcs3/Emu/ARMv7/PSVFuncList.h index 34d2a82f4d..970c1548cd 100644 --- a/rpcs3/Emu/ARMv7/PSVFuncList.h +++ b/rpcs3/Emu/ARMv7/PSVFuncList.h @@ -18,13 +18,10 @@ public: std::function on_load; std::function on_unload; std::function on_stop; + std::function on_error; public: - psv_log_base(const std::string& name, init_func_t init) - : m_name(name) - , m_init(init) - { - } + psv_log_base(const std::string& name, init_func_t init); void Init() { diff --git a/rpcs3/Emu/Memory/vm.h b/rpcs3/Emu/Memory/vm.h index e5fb349241..a95c8f53b7 100644 --- a/rpcs3/Emu/Memory/vm.h +++ b/rpcs3/Emu/Memory/vm.h @@ -136,6 +136,15 @@ namespace vm } }; + template + struct cast_ptr> + { + force_inline static u32 cast(const le_t& addr, const char* func) + { + return cast_ptr::cast(addr.value(), func); + } + }; + template force_inline static u32 cast(const T& addr, const char* func = "vm::cast") { @@ -156,57 +165,62 @@ namespace vm { void init(); - static u16 read16(u32 addr) + inline const be_t& read16(u32 addr) { - return get_ref>(addr); + return get_ref>(addr); } - static void write16(u32 addr, be_t value) + inline void write16(u32 addr, be_t value) { get_ref>(addr) = value; } - static u32 read32(u32 addr) + inline void write16(u32 addr, u16 value) { - return get_ref>(addr); + get_ref>(addr) = value; } - static void write32(u32 addr, be_t value) + inline const be_t& read32(u32 addr) + { + return get_ref>(addr); + } + + inline void write32(u32 addr, be_t value) { get_ref>(addr) = value; } - static u64 read64(u32 addr) + inline void write32(u32 addr, u32 value) { - return get_ref>(addr); + get_ref>(addr) = value; } - static void write64(u32 addr, be_t value) + inline const be_t& read64(u32 addr) + { + return get_ref>(addr); + } + + inline void write64(u32 addr, be_t value) { get_ref>(addr) = value; } - static void write16(u32 addr, u16 value) + inline void write64(u32 addr, u64 value) { - write16(addr, be_t::make(value)); + get_ref>(addr) = value; } - static void write32(u32 addr, u32 value) + inline const be_t& read128(u32 addr) { - write32(addr, be_t::make(value)); + return get_ref>(addr); } - static void write64(u32 addr, u64 value) + inline void write128(u32 addr, be_t value) { - write64(addr, be_t::make(value)); + get_ref>(addr) = value; } - static u128 read128(u32 addr) - { - return get_ref>(addr); - } - - static void write128(u32 addr, u128 value) + inline void write128(u32 addr, u128 value) { get_ref>(addr) = value; } @@ -216,44 +230,64 @@ namespace vm { void init(); - static u16 read16(u32 addr) + inline const le_t& read16(u32 addr) { - return get_ref(addr); + return get_ref>(addr); } - static void write16(u32 addr, u16 value) + inline void write16(u32 addr, le_t value) { - get_ref(addr) = value; + get_ref>(addr) = value; } - static u32 read32(u32 addr) + inline void write16(u32 addr, u16 value) { - return get_ref(addr); + get_ref>(addr) = value; } - static void write32(u32 addr, u32 value) + inline const le_t& read32(u32 addr) { - get_ref(addr) = value; + return get_ref>(addr); } - static u64 read64(u32 addr) + inline void write32(u32 addr, le_t value) { - return get_ref(addr); + get_ref>(addr) = value; } - static void write64(u32 addr, u64 value) + inline void write32(u32 addr, u32 value) { - get_ref(addr) = value; + get_ref>(addr) = value; } - static u128 read128(u32 addr) + inline const le_t& read64(u32 addr) { - return get_ref(addr); + return get_ref>(addr); } - static void write128(u32 addr, u128 value) + inline void write64(u32 addr, le_t value) { - get_ref(addr) = value; + get_ref>(addr) = value; + } + + inline void write64(u32 addr, u64 value) + { + get_ref>(addr) = value; + } + + inline const le_t& read128(u32 addr) + { + return get_ref>(addr); + } + + inline void write128(u32 addr, le_t value) + { + get_ref>(addr) = value; + } + + inline void write128(u32 addr, u128 value) + { + get_ref>(addr) = value; } } diff --git a/rpcs3/Gui/InstructionEditor.h b/rpcs3/Gui/InstructionEditor.h index 5fdf69e76f..8edbe9a45d 100644 --- a/rpcs3/Gui/InstructionEditor.h +++ b/rpcs3/Gui/InstructionEditor.h @@ -73,7 +73,7 @@ InstructionEditorDialog::InstructionEditorDialog(wxPanel *parent, u64 _pc, CPUTh s_panel_margin_x->AddSpacer(12); this->Connect(wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler(InstructionEditorDialog::updatePreview)); - t2_instr->SetValue(wxString::Format("%08x", vm::ps3::read32(CPU->offset + pc))); + t2_instr->SetValue(wxString::Format("%08x", vm::ps3::read32(CPU->offset + pc).value())); this->SetSizerAndFit(s_panel_margin_x); diff --git a/rpcs3/Loader/ELF32.cpp b/rpcs3/Loader/ELF32.cpp index 6ef662b641..cb52e8ea8a 100644 --- a/rpcs3/Loader/ELF32.cpp +++ b/rpcs3/Loader/ELF32.cpp @@ -99,16 +99,16 @@ namespace loader u32 size; // 0x0000001c u32 unk1; // 0x00000000 - vm::psv::ptr sceLibcHeapSize; - vm::psv::ptr sceLibcHeapSizeDefault; - vm::psv::ptr sceLibcHeapExtendedAlloc; - vm::psv::ptr sceLibcHeapDelayedAlloc; + vm::lptr sceLibcHeapSize; + vm::lptr sceLibcHeapSizeDefault; + vm::lptr sceLibcHeapExtendedAlloc; + vm::lptr sceLibcHeapDelayedAlloc; u32 unk2; u32 unk3; - vm::psv::ptr __sce_libcmallocreplace; - vm::psv::ptr __sce_libcnewreplace; + vm::lptr __sce_libcmallocreplace; + vm::lptr __sce_libcnewreplace; }; struct psv_process_param_t @@ -118,20 +118,20 @@ namespace loader u32 unk2; // 0x00000005 u32 unk3; - vm::psv::ptr sceUserMainThreadName; - vm::psv::ptr sceUserMainThreadPriority; - vm::psv::ptr sceUserMainThreadStackSize; - vm::psv::ptr sceUserMainThreadAttribute; - vm::psv::ptr sceProcessName; - vm::psv::ptr sce_process_preload_disabled; - vm::psv::ptr sceUserMainThreadCpuAffinityMask; + vm::lcptr sceUserMainThreadName; + vm::lptr sceUserMainThreadPriority; + vm::lptr sceUserMainThreadStackSize; + vm::lptr sceUserMainThreadAttribute; + vm::lcptr sceProcessName; + vm::lptr sce_process_preload_disabled; + vm::lptr sceUserMainThreadCpuAffinityMask; - vm::psv::ptr __sce_libcparam; + vm::lptr __sce_libcparam; }; initialize_psv_modules(); - auto armv7_thr_stop_data = vm::psv::ptr::make(Memory.PSV.RAM.AllocAlign(3 * 4)); + auto armv7_thr_stop_data = vm::ptr::make(Memory.PSV.RAM.AllocAlign(3 * 4)); armv7_thr_stop_data[0] = 0xf870; // HACK instruction (Thumb) armv7_thr_stop_data[1] = SFI_HLE_RETURN; Emu.SetCPUThreadStop(armv7_thr_stop_data.addr()); @@ -143,12 +143,12 @@ namespace loader u32 vnid_addr = 0; std::unordered_map vnid_list; - vm::psv::ptr proc_param = vm::null; + vm::ptr proc_param = vm::null; for (auto& shdr : m_shdrs) { // get secton name - //auto name = vm::psv::ptr::make(sname_base + shdr.data_le.sh_name); + //auto name = vm::cptr::make(sname_base + shdr.data_le.sh_name); m_stream->Seek(handler::get_stream_offset() + m_shdrs[m_ehdr.data_le.e_shstrndx].data_le.sh_offset + shdr.data_le.sh_name); std::string name; @@ -169,8 +169,8 @@ namespace loader { LOG_NOTICE(LOADER, ".sceExport.rodata analysis..."); - auto enid = vm::psv::ptr::make(shdr.data_le.sh_addr); - auto edata = vm::psv::ptr::make(enid.addr() + shdr.data_le.sh_size / 2); + auto enid = vm::cptr::make(shdr.data_le.sh_addr); + auto edata = vm::cptr::make(enid.addr() + shdr.data_le.sh_size / 2); for (u32 j = 0; j < shdr.data_le.sh_size / 8; j++) { @@ -217,8 +217,8 @@ namespace loader continue; } - auto fnid = vm::psv::ptr::make(fnid_addr); - auto fstub = vm::psv::ptr::make(shdr.data_le.sh_addr); + auto fnid = vm::cptr::make(fnid_addr); + auto fstub = vm::cptr::make(shdr.data_le.sh_addr); for (u32 j = 0; j < shdr.data_le.sh_size / 4; j++) { @@ -270,8 +270,8 @@ namespace loader continue; } - auto vnid = vm::psv::ptr::make(vnid_addr); - auto vstub = vm::psv::ptr::make(shdr.data_le.sh_addr); + auto vnid = vm::cptr::make(vnid_addr); + auto vstub = vm::cptr::make(shdr.data_le.sh_addr); for (u32 j = 0; j < shdr.data_le.sh_size / 4; j++) { @@ -299,7 +299,7 @@ namespace loader u32 data = 0; - for (auto code = vm::psv::ptr::make(shdr.data_le.sh_addr); code.addr() < shdr.data_le.sh_addr + shdr.data_le.sh_size; code++) + for (auto code = vm::ptr::make(shdr.data_le.sh_addr); code.addr() < shdr.data_le.sh_addr + shdr.data_le.sh_size; code++) { switch (*code) { diff --git a/rpcs3/emucore.vcxproj b/rpcs3/emucore.vcxproj index 1826d79f2a..85853f26c1 100644 --- a/rpcs3/emucore.vcxproj +++ b/rpcs3/emucore.vcxproj @@ -341,14 +341,64 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/rpcs3/emucore.vcxproj.filters b/rpcs3/emucore.vcxproj.filters index b6a768876b..6ebf57599b 100644 --- a/rpcs3/emucore.vcxproj.filters +++ b/rpcs3/emucore.vcxproj.filters @@ -1567,5 +1567,155 @@ Emu\SysCalls\Modules + + Emu\CPU\ARMv7\Modules + + + Emu\CPU\ARMv7\Modules + + + Emu\CPU\ARMv7\Modules + + + Emu\CPU\ARMv7\Modules + + + Emu\CPU\ARMv7\Modules + + + Emu\CPU\ARMv7\Modules + + + Emu\CPU\ARMv7\Modules + + + Emu\CPU\ARMv7\Modules + + + Emu\CPU\ARMv7\Modules + + + Emu\CPU\ARMv7\Modules + + + Emu\CPU\ARMv7\Modules + + + Emu\CPU\ARMv7\Modules + + + Emu\CPU\ARMv7\Modules + + + Emu\CPU\ARMv7\Modules + + + Emu\CPU\ARMv7\Modules + + + Emu\CPU\ARMv7\Modules + + + Emu\CPU\ARMv7\Modules + + + Emu\CPU\ARMv7\Modules + + + Emu\CPU\ARMv7\Modules + + + Emu\CPU\ARMv7\Modules + + + Emu\CPU\ARMv7\Modules + + + Emu\CPU\ARMv7\Modules + + + Emu\CPU\ARMv7\Modules + + + Emu\CPU\ARMv7\Modules + + + Emu\CPU\ARMv7\Modules + + + Emu\CPU\ARMv7\Modules + + + Emu\CPU\ARMv7\Modules + + + Emu\CPU\ARMv7\Modules + + + Emu\CPU\ARMv7\Modules + + + Emu\CPU\ARMv7\Modules + + + Emu\CPU\ARMv7\Modules + + + Emu\CPU\ARMv7\Modules + + + Emu\CPU\ARMv7\Modules + + + Emu\CPU\ARMv7\Modules + + + Emu\CPU\ARMv7\Modules + + + Emu\CPU\ARMv7\Modules + + + Emu\CPU\ARMv7\Modules + + + Emu\CPU\ARMv7\Modules + + + Emu\CPU\ARMv7\Modules + + + Emu\CPU\ARMv7\Modules + + + Emu\CPU\ARMv7\Modules + + + Emu\CPU\ARMv7\Modules + + + Emu\CPU\ARMv7\Modules + + + Emu\CPU\ARMv7\Modules + + + Emu\CPU\ARMv7\Modules + + + Emu\CPU\ARMv7\Modules + + + Emu\CPU\ARMv7\Modules + + + Emu\CPU\ARMv7\Modules + + + Emu\CPU\ARMv7\Modules + + + Emu\CPU\ARMv7\Modules + \ No newline at end of file diff --git a/rpcs3/stdafx.h b/rpcs3/stdafx.h index c7ac7dac43..ef87727c8e 100644 --- a/rpcs3/stdafx.h +++ b/rpcs3/stdafx.h @@ -41,32 +41,35 @@ #include "Utilities/GNU.h" -typedef unsigned int uint; +using uint = unsigned int; -typedef uint8_t u8; -typedef uint16_t u16; -typedef uint32_t u32; -typedef uint64_t u64; +using u8 = std::uint8_t; +using u16 = std::uint16_t; +using u32 = std::uint32_t; +using u64 = std::uint64_t; -typedef int8_t s8; -typedef int16_t s16; -typedef int32_t s32; -typedef int64_t s64; +using s8 = std::int8_t; +using s16 = std::int16_t; +using s32 = std::int32_t; +using s64 = std::int64_t; -template force_inline T align(const T addr, int align) +using f32 = float; +using f64 = double; + +template::value>> inline T align(const T& value, u64 align) { - return (addr + (align - 1)) & ~(align - 1); + return static_cast((value + (align - 1)) & ~(align - 1)); } -template struct sizeof32_t -{ - static const u32 value = static_cast(sizeof(T)); - - static_assert(value == sizeof(T), "sizeof32() error: sizeof() is too big"); -}; - // return 32 bit sizeof() to avoid widening/narrowing conversions with size_t -#define sizeof32(type) sizeof32_t::value +#define sizeof32(type) sizeof32_t::value + +template struct sizeof32_t +{ + static_assert(Size <= UINT32_MAX, "sizeof32() error: sizeof() is too big"); + + static const u32 value = static_cast(Size); +}; template using func_def = T; // workaround for MSVC bug: `using X = func_def;` instead of `using X = void();` @@ -79,5 +82,10 @@ template struct ID_type; #define REG_ID_TYPE(t, id) template<> struct ID_type { static const u32 type = id; } +#define CHECK_SIZE(type, size) static_assert(sizeof(type) == size, "Invalid " #type " type size") +#define CHECK_ALIGN(type, align) static_assert(__alignof(type) == align, "Invalid " #type " type alignment") +#define CHECK_MAX_SIZE(type, size) static_assert(sizeof(type) <= size, #type " type size is too big") +#define CHECK_SIZE_ALIGN(type, size, align) CHECK_SIZE(type, size); CHECK_ALIGN(type, align) + #define _PRGNAME_ "RPCS3" #define _PRGVER_ "0.0.0.5"