From 62c8f2ac342527d75c64c123ead8186e2fafbe1a Mon Sep 17 00:00:00 2001 From: Nekotekina Date: Thu, 29 Jan 2015 18:48:05 +0300 Subject: [PATCH 01/11] ARMv7: stubs for other modules, loader improved --- rpcs3/Emu/ARMv7/ARMv7Decoder.cpp | 2 - rpcs3/Emu/ARMv7/ARMv7Interpreter.cpp | 5 - rpcs3/Emu/ARMv7/ARMv7Interpreter.h | 3 - rpcs3/Emu/ARMv7/Modules/sceAppMgr.cpp | 20 ++ rpcs3/Emu/ARMv7/Modules/sceAppUtil.cpp | 28 +++ rpcs3/Emu/ARMv7/Modules/sceAudio.cpp | 24 +++ rpcs3/Emu/ARMv7/Modules/sceAudioIn.cpp | 19 ++ rpcs3/Emu/ARMv7/Modules/sceAudiodec.cpp | 22 ++ rpcs3/Emu/ARMv7/Modules/sceAudioenc.cpp | 23 +++ rpcs3/Emu/ARMv7/Modules/sceCamera.cpp | 56 ++++++ rpcs3/Emu/ARMv7/Modules/sceCodecEngine.cpp | 19 ++ rpcs3/Emu/ARMv7/Modules/sceCommonDialog.cpp | 55 +++++ rpcs3/Emu/ARMv7/Modules/sceDbg.cpp | 19 ++ rpcs3/Emu/ARMv7/Modules/sceDeci4p.cpp | 2 +- rpcs3/Emu/ARMv7/Modules/sceDeflt.cpp | 27 +++ rpcs3/Emu/ARMv7/Modules/sceFiber.cpp | 26 +++ rpcs3/Emu/ARMv7/Modules/sceFios.cpp | 147 ++++++++++++++ rpcs3/Emu/ARMv7/Modules/sceFpu.cpp | 29 +++ rpcs3/Emu/ARMv7/Modules/sceHttp.cpp | 82 ++++++++ rpcs3/Emu/ARMv7/Modules/sceIme.cpp | 20 ++ rpcs3/Emu/ARMv7/Modules/sceJpeg.cpp | 24 +++ rpcs3/Emu/ARMv7/Modules/sceJpegEnc.cpp | 24 +++ rpcs3/Emu/ARMv7/Modules/sceLibc.cpp | 2 +- rpcs3/Emu/ARMv7/Modules/sceLiveArea.cpp | 17 ++ rpcs3/Emu/ARMv7/Modules/sceLocation.cpp | 34 ++++ rpcs3/Emu/ARMv7/Modules/sceMd5.cpp | 19 ++ rpcs3/Emu/ARMv7/Modules/sceMotion.cpp | 31 +++ rpcs3/Emu/ARMv7/Modules/sceMt19937.cpp | 17 ++ rpcs3/Emu/ARMv7/Modules/sceNet.cpp | 73 +++++++ rpcs3/Emu/ARMv7/Modules/sceNetCtl.cpp | 31 +++ rpcs3/Emu/ARMv7/Modules/sceNgs.cpp | 78 +++++++ rpcs3/Emu/ARMv7/Modules/sceNpBasic.cpp | 33 +++ rpcs3/Emu/ARMv7/Modules/sceNpCommon.cpp | 26 +++ rpcs3/Emu/ARMv7/Modules/sceNpManager.cpp | 25 +++ rpcs3/Emu/ARMv7/Modules/sceNpMatching.cpp | 46 +++++ rpcs3/Emu/ARMv7/Modules/sceNpScore.cpp | 44 ++++ rpcs3/Emu/ARMv7/Modules/sceNpUtility.cpp | 35 ++++ rpcs3/Emu/ARMv7/Modules/scePgf.cpp | 38 ++++ rpcs3/Emu/ARMv7/Modules/scePhotoExport.cpp | 17 ++ rpcs3/Emu/ARMv7/Modules/sceRazorCapture.cpp | 18 ++ rpcs3/Emu/ARMv7/Modules/sceRtc.cpp | 52 +++++ rpcs3/Emu/ARMv7/Modules/sceSas.cpp | 64 ++++++ rpcs3/Emu/ARMv7/Modules/sceScreenShot.cpp | 19 ++ rpcs3/Emu/ARMv7/Modules/sceSfmt.cpp | 84 ++++++++ rpcs3/Emu/ARMv7/Modules/sceSha.cpp | 44 ++++ rpcs3/Emu/ARMv7/Modules/sceSqlite.cpp | 187 +++++++++++++++++ rpcs3/Emu/ARMv7/Modules/sceSsl.cpp | 26 +++ rpcs3/Emu/ARMv7/Modules/sceSulpha.cpp | 38 ++++ rpcs3/Emu/ARMv7/Modules/sceSystemGesture.cpp | 32 +++ rpcs3/Emu/ARMv7/Modules/sceTouch.cpp | 20 ++ rpcs3/Emu/ARMv7/Modules/sceUlt.cpp | 68 +++++++ rpcs3/Emu/ARMv7/Modules/sceVideodec.cpp | 34 ++++ rpcs3/Emu/ARMv7/Modules/sceVoice.cpp | 40 ++++ rpcs3/Emu/ARMv7/Modules/sceVoiceQoS.cpp | 32 +++ rpcs3/Emu/ARMv7/Modules/sceXml.cpp | 201 +++++++++++++++++++ rpcs3/Emu/ARMv7/PSVFuncList.cpp | 124 ++++++++++-- rpcs3/Emu/FS/vfsDirBase.h | 11 +- rpcs3/Emu/Memory/Memory.cpp | 9 +- rpcs3/Emu/Memory/Memory.h | 2 - rpcs3/Emu/Memory/vm.cpp | 5 + rpcs3/Emu/Memory/vm.h | 4 +- rpcs3/Emu/SysCalls/Modules/cellSysutil.h | 4 +- rpcs3/Loader/ELF32.cpp | 114 +++++++++-- rpcs3/Loader/ELF64.cpp | 1 + rpcs3/emucore.vcxproj | 50 +++++ rpcs3/emucore.vcxproj.filters | 150 ++++++++++++++ 66 files changed, 2616 insertions(+), 59 deletions(-) create mode 100644 rpcs3/Emu/ARMv7/Modules/sceAppMgr.cpp create mode 100644 rpcs3/Emu/ARMv7/Modules/sceAppUtil.cpp create mode 100644 rpcs3/Emu/ARMv7/Modules/sceAudio.cpp create mode 100644 rpcs3/Emu/ARMv7/Modules/sceAudioIn.cpp create mode 100644 rpcs3/Emu/ARMv7/Modules/sceAudiodec.cpp create mode 100644 rpcs3/Emu/ARMv7/Modules/sceAudioenc.cpp create mode 100644 rpcs3/Emu/ARMv7/Modules/sceCamera.cpp create mode 100644 rpcs3/Emu/ARMv7/Modules/sceCodecEngine.cpp create mode 100644 rpcs3/Emu/ARMv7/Modules/sceCommonDialog.cpp create mode 100644 rpcs3/Emu/ARMv7/Modules/sceDbg.cpp create mode 100644 rpcs3/Emu/ARMv7/Modules/sceDeflt.cpp create mode 100644 rpcs3/Emu/ARMv7/Modules/sceFiber.cpp create mode 100644 rpcs3/Emu/ARMv7/Modules/sceFios.cpp create mode 100644 rpcs3/Emu/ARMv7/Modules/sceFpu.cpp create mode 100644 rpcs3/Emu/ARMv7/Modules/sceHttp.cpp create mode 100644 rpcs3/Emu/ARMv7/Modules/sceIme.cpp create mode 100644 rpcs3/Emu/ARMv7/Modules/sceJpeg.cpp create mode 100644 rpcs3/Emu/ARMv7/Modules/sceJpegEnc.cpp create mode 100644 rpcs3/Emu/ARMv7/Modules/sceLiveArea.cpp create mode 100644 rpcs3/Emu/ARMv7/Modules/sceLocation.cpp create mode 100644 rpcs3/Emu/ARMv7/Modules/sceMd5.cpp create mode 100644 rpcs3/Emu/ARMv7/Modules/sceMotion.cpp create mode 100644 rpcs3/Emu/ARMv7/Modules/sceMt19937.cpp create mode 100644 rpcs3/Emu/ARMv7/Modules/sceNet.cpp create mode 100644 rpcs3/Emu/ARMv7/Modules/sceNetCtl.cpp create mode 100644 rpcs3/Emu/ARMv7/Modules/sceNgs.cpp create mode 100644 rpcs3/Emu/ARMv7/Modules/sceNpBasic.cpp create mode 100644 rpcs3/Emu/ARMv7/Modules/sceNpCommon.cpp create mode 100644 rpcs3/Emu/ARMv7/Modules/sceNpManager.cpp create mode 100644 rpcs3/Emu/ARMv7/Modules/sceNpMatching.cpp create mode 100644 rpcs3/Emu/ARMv7/Modules/sceNpScore.cpp create mode 100644 rpcs3/Emu/ARMv7/Modules/sceNpUtility.cpp create mode 100644 rpcs3/Emu/ARMv7/Modules/scePgf.cpp create mode 100644 rpcs3/Emu/ARMv7/Modules/scePhotoExport.cpp create mode 100644 rpcs3/Emu/ARMv7/Modules/sceRazorCapture.cpp create mode 100644 rpcs3/Emu/ARMv7/Modules/sceRtc.cpp create mode 100644 rpcs3/Emu/ARMv7/Modules/sceSas.cpp create mode 100644 rpcs3/Emu/ARMv7/Modules/sceScreenShot.cpp create mode 100644 rpcs3/Emu/ARMv7/Modules/sceSfmt.cpp create mode 100644 rpcs3/Emu/ARMv7/Modules/sceSha.cpp create mode 100644 rpcs3/Emu/ARMv7/Modules/sceSqlite.cpp create mode 100644 rpcs3/Emu/ARMv7/Modules/sceSsl.cpp create mode 100644 rpcs3/Emu/ARMv7/Modules/sceSulpha.cpp create mode 100644 rpcs3/Emu/ARMv7/Modules/sceSystemGesture.cpp create mode 100644 rpcs3/Emu/ARMv7/Modules/sceTouch.cpp create mode 100644 rpcs3/Emu/ARMv7/Modules/sceUlt.cpp create mode 100644 rpcs3/Emu/ARMv7/Modules/sceVideodec.cpp create mode 100644 rpcs3/Emu/ARMv7/Modules/sceVoice.cpp create mode 100644 rpcs3/Emu/ARMv7/Modules/sceVoiceQoS.cpp create mode 100644 rpcs3/Emu/ARMv7/Modules/sceXml.cpp diff --git a/rpcs3/Emu/ARMv7/ARMv7Decoder.cpp b/rpcs3/Emu/ARMv7/ARMv7Decoder.cpp index e5a7b4b87f..fac6873a33 100644 --- a/rpcs3/Emu/ARMv7/ARMv7Decoder.cpp +++ b/rpcs3/Emu/ARMv7/ARMv7Decoder.cpp @@ -29,8 +29,6 @@ struct ARMv7_opcode_t const ARMv7_opcode_t ARMv7_opcode_table[] = { - ARMv7_OP2(0xffff, 0x0000, T1, NULL_OP), // ??? - ARMv7_OP4(0xffff, 0x0000, 0xf870, 0x0000, T1, HACK), // "Undefined" Thumb opcode used ARMv7_OP4(0x0ff0, 0x00f0, 0x0070, 0x0090, A1, HACK), // "Undefined" ARM opcode used diff --git a/rpcs3/Emu/ARMv7/ARMv7Interpreter.cpp b/rpcs3/Emu/ARMv7/ARMv7Interpreter.cpp index 954e07dfcc..ea01bcecc9 100644 --- a/rpcs3/Emu/ARMv7/ARMv7Interpreter.cpp +++ b/rpcs3/Emu/ARMv7/ARMv7Interpreter.cpp @@ -283,11 +283,6 @@ void ARMv7_instrs::UNK(ARMv7Context& context, const ARMv7Code code) throw fmt::format("Unknown/illegal opcode: 0x%04x 0x%04x", code.code1, code.code0); } -void ARMv7_instrs::NULL_OP(ARMv7Context& context, const ARMv7Code code, const ARMv7_encoding type) -{ - throw fmt::format("Null opcode found: 0x%04x 0x%04x", code.code1, code.code0); -} - void ARMv7_instrs::HACK(ARMv7Context& context, const ARMv7Code code, const ARMv7_encoding type) { u32 cond, func; diff --git a/rpcs3/Emu/ARMv7/ARMv7Interpreter.h b/rpcs3/Emu/ARMv7/ARMv7Interpreter.h index 4e4b8b6dc1..2a18646d42 100644 --- a/rpcs3/Emu/ARMv7/ARMv7Interpreter.h +++ b/rpcs3/Emu/ARMv7/ARMv7Interpreter.h @@ -30,10 +30,7 @@ namespace ARMv7_instrs { void UNK(ARMv7Context& context, const ARMv7Code code); - void NULL_OP(ARMv7Context& context, const ARMv7Code code, const ARMv7_encoding type); - void HACK(ARMv7Context& context, const ARMv7Code code, const ARMv7_encoding type); - void MRC_(ARMv7Context& context, const ARMv7Code code, const ARMv7_encoding type); void ADC_IMM(ARMv7Context& context, const ARMv7Code code, const ARMv7_encoding type); diff --git a/rpcs3/Emu/ARMv7/Modules/sceAppMgr.cpp b/rpcs3/Emu/ARMv7/Modules/sceAppMgr.cpp new file mode 100644 index 0000000000..0d9aa8a072 --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/sceAppMgr.cpp @@ -0,0 +1,20 @@ +#include "stdafx.h" +#include "Emu/System.h" +#include "Emu/ARMv7/PSVFuncList.h" + +extern psv_log_base sceAppMgr; + +#define REG_FUNC(nid, name) reg_psv_func(nid, &sceAppMgr, #name, name) + +psv_log_base sceAppMgr("SceAppMgr", []() +{ + sceAppMgr.on_load = nullptr; + sceAppMgr.on_unload = nullptr; + sceAppMgr.on_stop = nullptr; + + //REG_FUNC(0x47E5DD7D, sceAppMgrReceiveEventNum); + //REG_FUNC(0xCFAD5A3A, sceAppMgrReceiveEvent); + //REG_FUNC(0xF3D65520, sceAppMgrAcquireBgmPort); + //REG_FUNC(0x96CBE713, sceAppMgrReleaseBgmPort); + //REG_FUNC(0x49255C91, sceAppMgrGetRunStatus); +}); diff --git a/rpcs3/Emu/ARMv7/Modules/sceAppUtil.cpp b/rpcs3/Emu/ARMv7/Modules/sceAppUtil.cpp new file mode 100644 index 0000000000..567f6c4f3e --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/sceAppUtil.cpp @@ -0,0 +1,28 @@ +#include "stdafx.h" +#include "Emu/System.h" +#include "Emu/ARMv7/PSVFuncList.h" + +extern psv_log_base sceAppUtil; + +#define REG_FUNC(nid, name) reg_psv_func(nid, &sceAppUtil, #name, name) + +psv_log_base sceAppUtil("SceAppUtil", []() +{ + sceAppUtil.on_load = nullptr; + sceAppUtil.on_unload = nullptr; + sceAppUtil.on_stop = nullptr; + + //REG_FUNC(0xDAFFE671, sceAppUtilInit); + //REG_FUNC(0xB220B00B, sceAppUtilShutdown); + //REG_FUNC(0x7E8FE96A, sceAppUtilSaveDataSlotCreate); + //REG_FUNC(0x266A7646, sceAppUtilSaveDataSlotDelete); + //REG_FUNC(0x98630136, sceAppUtilSaveDataSlotSetParam); + //REG_FUNC(0x93F0D89F, sceAppUtilSaveDataSlotGetParam); + //REG_FUNC(0x1E2A6158, sceAppUtilSaveDataFileSave); + //REG_FUNC(0xEE85804D, sceAppUtilPhotoMount); + //REG_FUNC(0x9651B941, sceAppUtilPhotoUmount); + //REG_FUNC(0x5DFB9CA0, sceAppUtilSystemParamGetInt); + //REG_FUNC(0x6E6AA267, sceAppUtilSystemParamGetString); + //REG_FUNC(0x9D8AC677, sceAppUtilSaveSafeMemory); + //REG_FUNC(0x3424D772, sceAppUtilLoadSafeMemory); +}); diff --git a/rpcs3/Emu/ARMv7/Modules/sceAudio.cpp b/rpcs3/Emu/ARMv7/Modules/sceAudio.cpp new file mode 100644 index 0000000000..36920a8e59 --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/sceAudio.cpp @@ -0,0 +1,24 @@ +#include "stdafx.h" +#include "Emu/System.h" +#include "Emu/ARMv7/PSVFuncList.h" + +extern psv_log_base sceAudio; + +#define REG_FUNC(nid, name) reg_psv_func(nid, &sceAudio, #name, name) + +psv_log_base sceAudio("SceAudio", []() +{ + sceAudio.on_load = nullptr; + sceAudio.on_unload = nullptr; + sceAudio.on_stop = nullptr; + + //REG_FUNC(0x5BC341E4, sceAudioOutOpenPort); + //REG_FUNC(0x69E2E6B5, sceAudioOutReleasePort); + //REG_FUNC(0x02DB3F5F, sceAudioOutOutput); + //REG_FUNC(0x64167F11, sceAudioOutSetVolume); + //REG_FUNC(0xB8BA0D07, sceAudioOutSetConfig); + //REG_FUNC(0x9C8EDAEA, sceAudioOutGetConfig); + //REG_FUNC(0x9A5370C4, sceAudioOutGetRestSample); + //REG_FUNC(0x12FB1767, sceAudioOutGetAdopt); + //REG_FUNC(0xC6D8D775, sceAudioInRaw); +}); diff --git a/rpcs3/Emu/ARMv7/Modules/sceAudioIn.cpp b/rpcs3/Emu/ARMv7/Modules/sceAudioIn.cpp new file mode 100644 index 0000000000..0ae64a168d --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/sceAudioIn.cpp @@ -0,0 +1,19 @@ +#include "stdafx.h" +#include "Emu/System.h" +#include "Emu/ARMv7/PSVFuncList.h" + +extern psv_log_base sceAudioIn; + +#define REG_FUNC(nid, name) reg_psv_func(nid, &sceAudioIn, #name, name) + +psv_log_base sceAudioIn("SceAudioIn", []() +{ + sceAudioIn.on_load = nullptr; + sceAudioIn.on_unload = nullptr; + sceAudioIn.on_stop = nullptr; + + //REG_FUNC(0x638ADD2D, sceAudioInInput); + //REG_FUNC(0x39B50DC1, sceAudioInOpenPort); + //REG_FUNC(0x3A61B8C4, sceAudioInReleasePort); + //REG_FUNC(0x566AC433, sceAudioInGetAdopt); +}); diff --git a/rpcs3/Emu/ARMv7/Modules/sceAudiodec.cpp b/rpcs3/Emu/ARMv7/Modules/sceAudiodec.cpp new file mode 100644 index 0000000000..f8e3952dec --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/sceAudiodec.cpp @@ -0,0 +1,22 @@ +#include "stdafx.h" +#include "Emu/System.h" +#include "Emu/ARMv7/PSVFuncList.h" + +extern psv_log_base sceAudiodec; + +#define REG_FUNC(nid, name) reg_psv_func(nid, &sceAudiodec, #name, name) + +psv_log_base sceAudiodec("SceAudiodec", []() +{ + sceAudiodec.on_load = nullptr; + sceAudiodec.on_unload = nullptr; + sceAudiodec.on_stop = nullptr; + + //REG_FUNC(0x445C2CEF, sceAudiodecInitLibrary); + //REG_FUNC(0x45719B9D, sceAudiodecTermLibrary); + //REG_FUNC(0x4DFD3AAA, sceAudiodecCreateDecoder); + //REG_FUNC(0xE7A24E16, sceAudiodecDeleteDecoder); + //REG_FUNC(0xCCDABA04, sceAudiodecDecode); + //REG_FUNC(0xF72F9B64, sceAudiodecClearContext); + //REG_FUNC(0x883B0CF5, sceAudiodecGetInternalError); +}); diff --git a/rpcs3/Emu/ARMv7/Modules/sceAudioenc.cpp b/rpcs3/Emu/ARMv7/Modules/sceAudioenc.cpp new file mode 100644 index 0000000000..a3bf58617c --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/sceAudioenc.cpp @@ -0,0 +1,23 @@ +#include "stdafx.h" +#include "Emu/System.h" +#include "Emu/ARMv7/PSVFuncList.h" + +extern psv_log_base sceAudioenc; + +#define REG_FUNC(nid, name) reg_psv_func(nid, &sceAudioenc, #name, name) + +psv_log_base sceAudioenc("SceAudioenc", []() +{ + sceAudioenc.on_load = nullptr; + sceAudioenc.on_unload = nullptr; + sceAudioenc.on_stop = nullptr; + + //REG_FUNC(0x76EE4DC6, sceAudioencInitLibrary); + //REG_FUNC(0xAB32D022, sceAudioencTermLibrary); + //REG_FUNC(0x64C04AE8, sceAudioencCreateEncoder); + //REG_FUNC(0xC6BA5EE6, sceAudioencDeleteEncoder); + //REG_FUNC(0xD85DB29C, sceAudioencEncode); + //REG_FUNC(0x9386F42D, sceAudioencClearContext); + //REG_FUNC(0xD01C63A3, sceAudioencGetOptInfo); + //REG_FUNC(0x452246D0, sceAudioencGetInternalError); +}); diff --git a/rpcs3/Emu/ARMv7/Modules/sceCamera.cpp b/rpcs3/Emu/ARMv7/Modules/sceCamera.cpp new file mode 100644 index 0000000000..79c219443c --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/sceCamera.cpp @@ -0,0 +1,56 @@ +#include "stdafx.h" +#include "Emu/System.h" +#include "Emu/ARMv7/PSVFuncList.h" + +extern psv_log_base sceCamera; + +#define REG_FUNC(nid, name) reg_psv_func(nid, &sceCamera, #name, name) + +psv_log_base sceCamera("SceCamera", []() +{ + sceCamera.on_load = nullptr; + sceCamera.on_unload = nullptr; + sceCamera.on_stop = nullptr; + + //REG_FUNC(0xA462F801, sceCameraOpen); + //REG_FUNC(0xCD6E1CFC, sceCameraClose); + //REG_FUNC(0xA8FEAE35, sceCameraStart); + //REG_FUNC(0x1DD9C9CE, sceCameraStop); + //REG_FUNC(0x79B5C2DE, sceCameraRead); + //REG_FUNC(0x103A75B8, sceCameraIsActive); + //REG_FUNC(0x624F7653, sceCameraGetSaturation); + //REG_FUNC(0xF9F7CA3D, sceCameraSetSaturation); + //REG_FUNC(0x85D5951D, sceCameraGetBrightness); + //REG_FUNC(0x98D71588, sceCameraSetBrightness); + //REG_FUNC(0x8FBE84BE, sceCameraGetContrast); + //REG_FUNC(0x06FB2900, sceCameraSetContrast); + //REG_FUNC(0xAA72C3DC, sceCameraGetSharpness); + //REG_FUNC(0xD1A5BB0B, sceCameraSetSharpness); + //REG_FUNC(0x44F6043F, sceCameraGetReverse); + //REG_FUNC(0x1175F477, sceCameraSetReverse); + //REG_FUNC(0x7E8EF3B2, sceCameraGetEffect); + //REG_FUNC(0xE9D2CFB1, sceCameraSetEffect); + //REG_FUNC(0x8B5E6147, sceCameraGetEV); + //REG_FUNC(0x62AFF0B8, sceCameraSetEV); + //REG_FUNC(0x06D3816C, sceCameraGetZoom); + //REG_FUNC(0xF7464216, sceCameraSetZoom); + //REG_FUNC(0x9FDACB99, sceCameraGetAntiFlicker); + //REG_FUNC(0xE312958A, sceCameraSetAntiFlicker); + //REG_FUNC(0x4EBD5C68, sceCameraGetISO); + //REG_FUNC(0x3CF630A1, sceCameraSetISO); + //REG_FUNC(0x2C36D6F3, sceCameraGetGain); + //REG_FUNC(0xE65CFE86, sceCameraSetGain); + //REG_FUNC(0xDBFFA1DA, sceCameraGetWhiteBalance); + //REG_FUNC(0x4D4514AC, sceCameraSetWhiteBalance); + //REG_FUNC(0x8DD1292B, sceCameraGetBacklight); + //REG_FUNC(0xAE071044, sceCameraSetBacklight); + //REG_FUNC(0x12B6FF26, sceCameraGetNightmode); + //REG_FUNC(0x3F26233E, sceCameraSetNightmode); + //REG_FUNC(0xD02CFA5C, sceCameraLedSwitch); + //REG_FUNC(0x89B16030, sceCameraLedBlink); + //REG_FUNC(0x7670474C, sceCameraUseCacheMemoryForTrial); + //REG_FUNC(0x27BB0528, sceCameraGetNoiseReductionForDebug); + //REG_FUNC(0x233C9E27, sceCameraSetNoiseReductionForDebug); + //REG_FUNC(0xC387F4DC, sceCameraGetSharpnessOffForDebug); + //REG_FUNC(0xE22C2375, sceCameraSetSharpnessOffForDebug); +}); diff --git a/rpcs3/Emu/ARMv7/Modules/sceCodecEngine.cpp b/rpcs3/Emu/ARMv7/Modules/sceCodecEngine.cpp new file mode 100644 index 0000000000..013f4ff52b --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/sceCodecEngine.cpp @@ -0,0 +1,19 @@ +#include "stdafx.h" +#include "Emu/System.h" +#include "Emu/ARMv7/PSVFuncList.h" + +extern psv_log_base sceCodecEngine; + +#define REG_FUNC(nid, name) reg_psv_func(nid, &sceCodecEngine, #name, name) + +psv_log_base sceCodecEngine("SceCodecEngine", []() +{ + sceCodecEngine.on_load = nullptr; + sceCodecEngine.on_unload = nullptr; + sceCodecEngine.on_stop = nullptr; + + //REG_FUNC(0x3E718890, sceCodecEnginePmonStart); + //REG_FUNC(0x268B1EF5, sceCodecEnginePmonStop); + //REG_FUNC(0x859E4A68, sceCodecEnginePmonGetProcessorLoad); + //REG_FUNC(0xA097E4C8, sceCodecEnginePmonReset); +}); diff --git a/rpcs3/Emu/ARMv7/Modules/sceCommonDialog.cpp b/rpcs3/Emu/ARMv7/Modules/sceCommonDialog.cpp new file mode 100644 index 0000000000..1f5a4863a3 --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/sceCommonDialog.cpp @@ -0,0 +1,55 @@ +#include "stdafx.h" +#include "Emu/System.h" +#include "Emu/ARMv7/PSVFuncList.h" + +extern psv_log_base sceCommonDialog; + +#define REG_FUNC(nid, name) reg_psv_func(nid, &sceCommonDialog, #name, name) + +psv_log_base sceCommonDialog("SceCommonDialog", []() +{ + sceCommonDialog.on_load = nullptr; + sceCommonDialog.on_unload = nullptr; + sceCommonDialog.on_stop = nullptr; + + //REG_FUNC(0x90530F2F, sceCommonDialogUpdate); + //REG_FUNC(0x755FF270, sceMsgDialogInit); + //REG_FUNC(0x4107019E, sceMsgDialogGetStatus); + //REG_FUNC(0xC296D396, sceMsgDialogClose); + //REG_FUNC(0x0CC66115, sceMsgDialogAbort); + //REG_FUNC(0xBB3BFC89, sceMsgDialogGetResult); + //REG_FUNC(0x81ACF695, sceMsgDialogTerm); + //REG_FUNC(0x7BE0E08B, sceMsgDialogProgressBarInc); + //REG_FUNC(0x9CDA5E0D, sceMsgDialogProgressBarSetValue); + //REG_FUNC(0xA38A4A0D, sceNetCheckDialogInit); + //REG_FUNC(0x8027292A, sceNetCheckDialogGetStatus); + //REG_FUNC(0x2D8EDF09, sceNetCheckDialogAbort); + //REG_FUNC(0xB05FCE9E, sceNetCheckDialogGetResult); + //REG_FUNC(0x8BE51C15, sceNetCheckDialogTerm); + //REG_FUNC(0xBF5248FA, sceSaveDataDialogInit); + //REG_FUNC(0x6E258046, sceSaveDataDialogGetStatus); + //REG_FUNC(0x013E7F74, sceSaveDataDialogAbort); + //REG_FUNC(0xB2FF576E, sceSaveDataDialogGetResult); + //REG_FUNC(0x2192A10A, sceSaveDataDialogTerm); + //REG_FUNC(0x19192C8B, sceSaveDataDialogContinue); + //REG_FUNC(0xBA0542CA, sceSaveDataDialogGetSubStatus); + //REG_FUNC(0x415D6068, sceSaveDataDialogSubClose); + //REG_FUNC(0x6C49924B, sceSaveDataDialogFinish); + //REG_FUNC(0xBDE00A83, sceSaveDataDialogProgressBarInc); + //REG_FUNC(0x5C322D1E, sceSaveDataDialogProgressBarSetValue); + //REG_FUNC(0x1E7043BF, sceImeDialogInit); + //REG_FUNC(0xCF0431FD, sceImeDialogGetStatus); + //REG_FUNC(0x594A220E, sceImeDialogAbort); + //REG_FUNC(0x2EB3D046, sceImeDialogGetResult); + //REG_FUNC(0x838A3AF4, sceImeDialogTerm); + //REG_FUNC(0x73EE7C9C, scePhotoImportDialogInit); + //REG_FUNC(0x032206D8, scePhotoImportDialogGetStatus); + //REG_FUNC(0xD855414C, scePhotoImportDialogGetResult); + //REG_FUNC(0x7FE5BD77, scePhotoImportDialogTerm); + //REG_FUNC(0x4B125581, scePhotoImportDialogAbort); + //REG_FUNC(0xCD990375, scePhotoReviewDialogInit); + //REG_FUNC(0xF4F600CA, scePhotoReviewDialogGetStatus); + //REG_FUNC(0xFFA35858, scePhotoReviewDialogGetResult); + //REG_FUNC(0xC700B2DF, scePhotoReviewDialogTerm); + //REG_FUNC(0x74FF2A8B, scePhotoReviewDialogAbort); +}); diff --git a/rpcs3/Emu/ARMv7/Modules/sceDbg.cpp b/rpcs3/Emu/ARMv7/Modules/sceDbg.cpp new file mode 100644 index 0000000000..6fe3856b9c --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/sceDbg.cpp @@ -0,0 +1,19 @@ +#include "stdafx.h" +#include "Emu/System.h" +#include "Emu/ARMv7/PSVFuncList.h" + +extern psv_log_base sceDbg; + +#define REG_FUNC(nid, name) reg_psv_func(nid, &sceDbg, #name, name) + +psv_log_base sceDbg("SceDbg", []() +{ + sceDbg.on_load = nullptr; + sceDbg.on_unload = nullptr; + sceDbg.on_stop = nullptr; + + //REG_FUNC(0x941622FA, sceDbgSetMinimumLogLevel); + //REG_FUNC(0x1AF3678B, sceDbgAssertionHandler); + //REG_FUNC(0x6605AB19, sceDbgLoggingHandler); + //REG_FUNC(0xED4A00BA, sceDbgSetBreakOnErrorState); +}); diff --git a/rpcs3/Emu/ARMv7/Modules/sceDeci4p.cpp b/rpcs3/Emu/ARMv7/Modules/sceDeci4p.cpp index bdd5e58e5d..d90fcca74f 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceDeci4p.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceDeci4p.cpp @@ -45,4 +45,4 @@ psv_log_base sceDeci4p("SceDeci4pUserp", []() REG_FUNC(0x971E1C66, sceKernelDeci4pRead); REG_FUNC(0xCDA3AAAC, sceKernelDeci4pWrite); REG_FUNC(0x73371F35, sceKernelDeci4pRegisterCallback); -}); \ No newline at end of file +}); diff --git a/rpcs3/Emu/ARMv7/Modules/sceDeflt.cpp b/rpcs3/Emu/ARMv7/Modules/sceDeflt.cpp new file mode 100644 index 0000000000..6d7e440c2f --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/sceDeflt.cpp @@ -0,0 +1,27 @@ +#include "stdafx.h" +#include "Emu/System.h" +#include "Emu/ARMv7/PSVFuncList.h" + +extern psv_log_base sceDeflt; + +#define REG_FUNC(nid, name) reg_psv_func(nid, &sceDeflt, #name, name) + +psv_log_base sceDeflt("SceDeflt", []() +{ + sceDeflt.on_load = nullptr; + sceDeflt.on_unload = nullptr; + sceDeflt.on_stop = nullptr; + + //REG_FUNC(0xCD83A464, sceZlibAdler32); + //REG_FUNC(0x110D5050, sceDeflateDecompress); + //REG_FUNC(0xE3CB51A3, sceGzipDecompress); + //REG_FUNC(0xBABCF5CF, sceGzipGetComment); + //REG_FUNC(0xE1844802, sceGzipGetCompressedData); + //REG_FUNC(0x1B8E5862, sceGzipGetInfo); + //REG_FUNC(0xAEBAABE6, sceGzipGetName); + //REG_FUNC(0xDEDADC31, sceGzipIsValid); + //REG_FUNC(0xE38F754D, sceZlibDecompress); + //REG_FUNC(0xE680A65A, sceZlibGetCompressedData); + //REG_FUNC(0x4C0A685D, sceZlibGetInfo); + //REG_FUNC(0x14A0698D, sceZlibIsValid); +}); diff --git a/rpcs3/Emu/ARMv7/Modules/sceFiber.cpp b/rpcs3/Emu/ARMv7/Modules/sceFiber.cpp new file mode 100644 index 0000000000..73678a396c --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/sceFiber.cpp @@ -0,0 +1,26 @@ +#include "stdafx.h" +#include "Emu/System.h" +#include "Emu/ARMv7/PSVFuncList.h" + +extern psv_log_base sceFiber; + +#define REG_FUNC(nid, name) reg_psv_func(nid, &sceFiber, #name, name) + +psv_log_base sceFiber("SceFiber", []() +{ + sceFiber.on_load = nullptr; + sceFiber.on_unload = nullptr; + sceFiber.on_stop = nullptr; + + //REG_FUNC(0xF24A298C, _sceFiberInitializeImpl); + //REG_FUNC(0xC6A3F9BB, _sceFiberInitializeWithInternalOptionImpl); + //REG_FUNC(0x7D0C7DDB, _sceFiberAttachContextAndRun); + //REG_FUNC(0xE00B9AFE, _sceFiberAttachContextAndSwitch); + //REG_FUNC(0x801AB334, sceFiberOptParamInitialize); + //REG_FUNC(0xE160F844, sceFiberFinalize); + //REG_FUNC(0x7DF23243, sceFiberRun); + //REG_FUNC(0xE4283144, sceFiberSwitch); + //REG_FUNC(0x414D8CA5, sceFiberGetSelf); + //REG_FUNC(0x3B42921F, sceFiberReturnToThread); + //REG_FUNC(0x189599B4, sceFiberGetInfo); +}); diff --git a/rpcs3/Emu/ARMv7/Modules/sceFios.cpp b/rpcs3/Emu/ARMv7/Modules/sceFios.cpp new file mode 100644 index 0000000000..d04af5b3cd --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/sceFios.cpp @@ -0,0 +1,147 @@ +#include "stdafx.h" +#include "Emu/System.h" +#include "Emu/ARMv7/PSVFuncList.h" + +extern psv_log_base sceFios; + +#define REG_FUNC(nid, name) reg_psv_func(nid, &sceFios, #name, name) + +psv_log_base sceFios("SceFios2", []() +{ + sceFios.on_load = nullptr; + sceFios.on_unload = nullptr; + sceFios.on_stop = nullptr; + + //REG_FUNC(0x15857180, sceFiosArchiveGetMountBufferSize); + //REG_FUNC(0xDF3352FC, sceFiosArchiveGetMountBufferSizeSync); + //REG_FUNC(0x92E76BBD, sceFiosArchiveMount); + //REG_FUNC(0xC4822276, sceFiosArchiveMountSync); + //REG_FUNC(0xFE1E1D28, sceFiosArchiveUnmount); + //REG_FUNC(0xB26DC24D, sceFiosArchiveUnmountSync); + //REG_FUNC(0x1E920B1D, sceFiosCancelAllOps); + //REG_FUNC(0xF85C208B, sceFiosCloseAllFiles); + //REG_FUNC(0xF6CACFC7, sceFiosDHClose); + //REG_FUNC(0x1F3CC428, sceFiosDHCloseSync); + //REG_FUNC(0x2B406DEB, sceFiosDHGetPath); + //REG_FUNC(0xEA9855BA, sceFiosDHOpen); + //REG_FUNC(0x34BC3713, sceFiosDHOpenSync); + //REG_FUNC(0x72A0A851, sceFiosDHRead); + //REG_FUNC(0xB7E79CAD, sceFiosDHReadSync); + //REG_FUNC(0x280D284A, sceFiosDateFromComponents); + //REG_FUNC(0x5C593C1E, sceFiosDateGetCurrent); + //REG_FUNC(0x5CFF6EA0, sceFiosDateToComponents); + //REG_FUNC(0x44B9F8EB, sceFiosDebugDumpDH); + //REG_FUNC(0x159B1FA8, sceFiosDebugDumpDate); + //REG_FUNC(0x51E677DF, sceFiosDebugDumpError); + //REG_FUNC(0x5506ACAB, sceFiosDebugDumpFH); + //REG_FUNC(0xE438D4F0, sceFiosDebugDumpOp); + //REG_FUNC(0x764DFA7A, sceFiosDelete); + //REG_FUNC(0xAAC54B44, sceFiosDeleteSync); + //REG_FUNC(0x9198ED8B, sceFiosDirectoryCreate); + //REG_FUNC(0xE037B076, sceFiosDirectoryCreateSync); + //REG_FUNC(0xDA93677C, sceFiosDirectoryDelete); + //REG_FUNC(0xB9573146, sceFiosDirectoryDeleteSync); + //REG_FUNC(0x48D50D97, sceFiosDirectoryExists); + //REG_FUNC(0x726E01BE, sceFiosDirectoryExistsSync); + //REG_FUNC(0x6F12D8A5, sceFiosExists); + //REG_FUNC(0x125EFD34, sceFiosExistsSync); + //REG_FUNC(0xA88EDCA8, sceFiosFHClose); + //REG_FUNC(0x45182328, sceFiosFHCloseSync); + //REG_FUNC(0xC55DB73B, sceFiosFHGetOpenParams); + //REG_FUNC(0x37143AE3, sceFiosFHGetPath); + //REG_FUNC(0xC5C26581, sceFiosFHGetSize); + //REG_FUNC(0xBF699BD4, sceFiosFHOpen); + //REG_FUNC(0xC3E7C3DB, sceFiosFHOpenSync); + //REG_FUNC(0x6A51E688, sceFiosFHPread); + //REG_FUNC(0xE2805059, sceFiosFHPreadSync); + //REG_FUNC(0x7C4E0C42, sceFiosFHPreadv); + //REG_FUNC(0x4D42F95C, sceFiosFHPreadvSync); + //REG_FUNC(0xCF1FAA6F, sceFiosFHPwrite); + //REG_FUNC(0x1E962F57, sceFiosFHPwriteSync); + //REG_FUNC(0xBBC9AFD5, sceFiosFHPwritev); + //REG_FUNC(0x742ADDC4, sceFiosFHPwritevSync); + //REG_FUNC(0xB09AFBDF, sceFiosFHRead); + //REG_FUNC(0x76945919, sceFiosFHReadSync); + //REG_FUNC(0x7DB0AFAF, sceFiosFHReadv); + //REG_FUNC(0x1BC977FA, sceFiosFHReadvSync); + //REG_FUNC(0xA75F3C4A, sceFiosFHSeek); + //REG_FUNC(0xD97C4DF7, sceFiosFHStat); + //REG_FUNC(0xF8BEAC88, sceFiosFHStatSync); + //REG_FUNC(0xE485F35E, sceFiosFHSync); + //REG_FUNC(0xA909CCE3, sceFiosFHSyncSync); + //REG_FUNC(0xD7F33130, sceFiosFHTell); + //REG_FUNC(0x2B39453B, sceFiosFHTruncate); + //REG_FUNC(0xFEF940B7, sceFiosFHTruncateSync); + //REG_FUNC(0xE663138E, sceFiosFHWrite); + //REG_FUNC(0x984024E5, sceFiosFHWriteSync); + //REG_FUNC(0x988DD7FF, sceFiosFHWritev); + //REG_FUNC(0x267E6CE3, sceFiosFHWritevSync); + //REG_FUNC(0xB647278B, sceFiosFileDelete); + //REG_FUNC(0xB5302E30, sceFiosFileDeleteSync); + //REG_FUNC(0x8758E62F, sceFiosFileExists); + //REG_FUNC(0x233B070C, sceFiosFileExistsSync); + //REG_FUNC(0x79D9BB50, sceFiosFileGetSize); + //REG_FUNC(0x789215C3, sceFiosFileGetSizeSync); + //REG_FUNC(0x84080161, sceFiosFileRead); + //REG_FUNC(0x1C488B32, sceFiosFileReadSync); + //REG_FUNC(0xC5513E13, sceFiosFileTruncate); + //REG_FUNC(0x6E1252B8, sceFiosFileTruncateSync); + //REG_FUNC(0x42C278E5, sceFiosFileWrite); + //REG_FUNC(0x132B6DE6, sceFiosFileWriteSync); + //REG_FUNC(0x681184A2, sceFiosGetAllDHs); + //REG_FUNC(0x90AB9195, sceFiosGetAllFHs); + //REG_FUNC(0x8F62832C, sceFiosGetAllOps); + //REG_FUNC(0xC897F6A7, sceFiosGetDefaultOpAttr); + //REG_FUNC(0x30583FCB, sceFiosGetGlobalDefaultOpAttr); + //REG_FUNC(0x156EAFDC, sceFiosGetSuspendCount); + //REG_FUNC(0xD55B8555, sceFiosIOFilterAdd); + //REG_FUNC(0x7C9B14EB, sceFiosIOFilterGetInfo); + //REG_FUNC(0x057252F2, sceFiosIOFilterPsarcDearchiver); + //REG_FUNC(0x22E35018, sceFiosIOFilterRemove); + //REG_FUNC(0x774C2C05, sceFiosInitialize); + //REG_FUNC(0x29104BF3, sceFiosIsIdle); + //REG_FUNC(0xF4F54E09, sceFiosIsInitialized); + //REG_FUNC(0xD2466EA5, sceFiosIsSuspended); + //REG_FUNC(0xB309E327, sceFiosIsValidHandle); + //REG_FUNC(0x3904F205, sceFiosOpCancel); + //REG_FUNC(0xE4EA92FA, sceFiosOpDelete); + //REG_FUNC(0x218A43EE, sceFiosOpGetActualCount); + //REG_FUNC(0xABFEE706, sceFiosOpGetAttr); + //REG_FUNC(0x68C436E4, sceFiosOpGetBuffer); + //REG_FUNC(0xBF099E16, sceFiosOpGetError); + //REG_FUNC(0xF21213B9, sceFiosOpGetOffset); + //REG_FUNC(0x157515CB, sceFiosOpGetPath); + //REG_FUNC(0x9C1084C5, sceFiosOpGetRequestCount); + //REG_FUNC(0x0C81D80E, sceFiosOpIsCancelled); + //REG_FUNC(0x1B9A575E, sceFiosOpIsDone); + //REG_FUNC(0x968CADBD, sceFiosOpReschedule); + //REG_FUNC(0xE6A66C70, sceFiosOpSyncWait); + //REG_FUNC(0x202079F9, sceFiosOpSyncWaitForIO); + //REG_FUNC(0x2AC79DFC, sceFiosOpWait); + //REG_FUNC(0xCC823B47, sceFiosOpWaitUntil); + //REG_FUNC(0x27AE468B, sceFiosOverlayAdd); + //REG_FUNC(0xF4C6B72A, sceFiosOverlayGetInfo); + //REG_FUNC(0x1C0BCAD5, sceFiosOverlayGetList); + //REG_FUNC(0x30F56704, sceFiosOverlayModify); + //REG_FUNC(0xF3C84D0F, sceFiosOverlayRemove); + //REG_FUNC(0x8A243E74, sceFiosOverlayResolveSync); + //REG_FUNC(0x5E75937A, sceFiosPathcmp); + //REG_FUNC(0xCC21C849, sceFiosPathncmp); + //REG_FUNC(0xAF7FAADF, sceFiosPrintf); + //REG_FUNC(0x25E399E5, sceFiosRename); + //REG_FUNC(0x030306F4, sceFiosRenameSync); + //REG_FUNC(0xD0B19C9F, sceFiosResolve); + //REG_FUNC(0x7FF33797, sceFiosResolveSync); + //REG_FUNC(0xBF2D3CC1, sceFiosResume); + //REG_FUNC(0x4E2FD311, sceFiosSetGlobalDefaultOpAttr); + //REG_FUNC(0x5B8D48C4, sceFiosShutdownAndCancelOps); + //REG_FUNC(0xFF04AF72, sceFiosStat); + //REG_FUNC(0xACBAF3E0, sceFiosStatSync); + //REG_FUNC(0x510953DC, sceFiosSuspend); + //REG_FUNC(0x2904B539, sceFiosTerminate); + //REG_FUNC(0xE76C8EC3, sceFiosTimeGetCurrent); + //REG_FUNC(0x35A82737, sceFiosTimeIntervalFromNanoseconds); + //REG_FUNC(0x397BF626, sceFiosTimeIntervalToNanoseconds); + //REG_FUNC(0x1915052A, sceFiosUpdateParameters); + //REG_FUNC(0x5BA4BD6D, sceFiosVprintf); +}); diff --git a/rpcs3/Emu/ARMv7/Modules/sceFpu.cpp b/rpcs3/Emu/ARMv7/Modules/sceFpu.cpp new file mode 100644 index 0000000000..2992c6fc58 --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/sceFpu.cpp @@ -0,0 +1,29 @@ +#include "stdafx.h" +#include "Emu/System.h" +#include "Emu/ARMv7/PSVFuncList.h" + +extern psv_log_base sceFpu; + +#define REG_FUNC(nid, name) reg_psv_func(nid, &sceFpu, #name, name) + +psv_log_base sceFpu("SceFpu", []() +{ + sceFpu.on_load = nullptr; + sceFpu.on_unload = nullptr; + sceFpu.on_stop = nullptr; + + //REG_FUNC(0x33E1AC14, sceFpuSinf); + //REG_FUNC(0xDB66BA89, sceFpuCosf); + //REG_FUNC(0x6FBDA1C9, sceFpuTanf); + //REG_FUNC(0x53FF26AF, sceFpuAtanf); + //REG_FUNC(0xC8A4989B, sceFpuAtan2f); + //REG_FUNC(0x4D1AE0F1, sceFpuAsinf); + //REG_FUNC(0x64A8F9FE, sceFpuAcosf); + //REG_FUNC(0x936F0D27, sceFpuLogf); + //REG_FUNC(0x19881EC8, sceFpuLog2f); + //REG_FUNC(0xABBB6168, sceFpuLog10f); + //REG_FUNC(0xEFA16C6E, sceFpuExpf); + //REG_FUNC(0xA3A88AD0, sceFpuExp2f); + //REG_FUNC(0x35652326, sceFpuExp10f); + //REG_FUNC(0xDF622E56, sceFpuPowf); +}); diff --git a/rpcs3/Emu/ARMv7/Modules/sceHttp.cpp b/rpcs3/Emu/ARMv7/Modules/sceHttp.cpp new file mode 100644 index 0000000000..4f23c935cd --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/sceHttp.cpp @@ -0,0 +1,82 @@ +#include "stdafx.h" +#include "Emu/System.h" +#include "Emu/ARMv7/PSVFuncList.h" + +extern psv_log_base sceHttp; + +#define REG_FUNC(nid, name) reg_psv_func(nid, &sceHttp, #name, name) + +psv_log_base sceHttp("SceHttp", []() +{ + sceHttp.on_load = nullptr; + sceHttp.on_unload = nullptr; + sceHttp.on_stop = nullptr; + + //REG_FUNC(0x214926D9, sceHttpInit); + //REG_FUNC(0xC9076666, sceHttpTerm); + //REG_FUNC(0xF98CDFA9, sceHttpGetMemoryPoolStats); + //REG_FUNC(0x62241DAB, sceHttpCreateTemplate); + //REG_FUNC(0xEC85ECFB, sceHttpDeleteTemplate); + //REG_FUNC(0xC616C200, sceHttpCreateConnectionWithURL); + //REG_FUNC(0xAEB3307E, sceHttpCreateConnection); + //REG_FUNC(0xF0F65C15, sceHttpDeleteConnection); + //REG_FUNC(0xBD5DA1D0, sceHttpCreateRequestWithURL); + //REG_FUNC(0xB0284270, sceHttpCreateRequest); + //REG_FUNC(0x3D3D29AD, sceHttpDeleteRequest); + //REG_FUNC(0x9CA58B99, sceHttpSendRequest); + //REG_FUNC(0x7EDE3979, sceHttpReadData); + //REG_FUNC(0xF580D304, sceHttpGetResponseContentLength); + //REG_FUNC(0x27071691, sceHttpGetStatusCode); + //REG_FUNC(0xEA61662F, sceHttpAbortRequest); + //REG_FUNC(0x7B51B122, sceHttpAddRequestHeader); + //REG_FUNC(0x5EB5F548, sceHttpRemoveRequestHeader); + //REG_FUNC(0x11F6C27F, sceHttpGetAllResponseHeaders); + //REG_FUNC(0x03A6C89E, sceHttpParseResponseHeader); + //REG_FUNC(0x179C56DB, sceHttpParseStatusLine); + //REG_FUNC(0x1DA2A673, sceHttpUriEscape); + //REG_FUNC(0x1274D318, sceHttpUriUnescape); + //REG_FUNC(0x1D45F24E, sceHttpUriParse); + //REG_FUNC(0x47664424, sceHttpUriBuild); + //REG_FUNC(0x75027D1D, sceHttpUriMerge); + //REG_FUNC(0x50737A3F, sceHttpUriSweepPath); + //REG_FUNC(0x37C30C90, sceHttpSetRequestContentLength); + //REG_FUNC(0x11EC42D0, sceHttpSetAuthEnabled); + //REG_FUNC(0x6727874C, sceHttpGetAuthEnabled); + //REG_FUNC(0x34891C3F, sceHttpSetAutoRedirect); + //REG_FUNC(0x6EAD73EB, sceHttpGetAutoRedirect); + //REG_FUNC(0xE0A3A88D, sceHttpSetAuthInfoCallback); + //REG_FUNC(0x4E08167D, sceHttpSetRedirectCallback); + //REG_FUNC(0x8455B5B3, sceHttpSetResolveTimeOut); + //REG_FUNC(0x9AB56EA7, sceHttpSetResolveRetry); + //REG_FUNC(0x237CA86E, sceHttpSetConnectTimeOut); + //REG_FUNC(0x8AE3F008, sceHttpSetSendTimeOut); + //REG_FUNC(0x94BF196E, sceHttpSetRecvTimeOut); + //REG_FUNC(0x27A98BDA, sceHttpSetNonblock); + //REG_FUNC(0xD65746BC, sceHttpGetNonblock); + //REG_FUNC(0x5CEB6554, sceHttpSetEpollId); + //REG_FUNC(0x9E031D7C, sceHttpGetEpollId); + //REG_FUNC(0x94F7256A, sceHttpWaitRequest); + //REG_FUNC(0x7C99AF67, sceHttpCreateEpoll); + //REG_FUNC(0x0F1FD1B3, sceHttpSetEpoll); + //REG_FUNC(0xCFB1DA4B, sceHttpUnsetEpoll); + //REG_FUNC(0x65FE983F, sceHttpGetEpoll); + //REG_FUNC(0x07D9F8BB, sceHttpDestroyEpoll); + //REG_FUNC(0xAEE573A3, sceHttpSetCookieEnabled); + //REG_FUNC(0x1B6EF66E, sceHttpGetCookieEnabled); + //REG_FUNC(0x70220BFA, sceHttpGetCookie); + //REG_FUNC(0xBEDB988D, sceHttpAddCookie); + //REG_FUNC(0x4259FB9E, sceHttpCookieExport); + //REG_FUNC(0x9DF48282, sceHttpCookieImport); + //REG_FUNC(0xD4F32A23, sceHttpSetCookieRecvCallback); + //REG_FUNC(0x11C03867, sceHttpSetCookieSendCallback); + //REG_FUNC(0xAE8D7C33, sceHttpsLoadCert); + //REG_FUNC(0x8577833F, sceHttpsUnloadCert); + //REG_FUNC(0x9FBE2869, sceHttpsEnableOption); + //REG_FUNC(0xC6D60403, sceHttpsDisableOption); + //REG_FUNC(0x72CB0741, sceHttpsEnableOptionPrivate); + //REG_FUNC(0x00659635, sceHttpsDisableOptionPrivate); + //REG_FUNC(0x2B79BDE0, sceHttpsGetSslError); + //REG_FUNC(0xA0926037, sceHttpsSetSslCallback); + //REG_FUNC(0xF71AA58D, sceHttpsGetCaList); + //REG_FUNC(0x56C95D94, sceHttpsFreeCaList); +}); diff --git a/rpcs3/Emu/ARMv7/Modules/sceIme.cpp b/rpcs3/Emu/ARMv7/Modules/sceIme.cpp new file mode 100644 index 0000000000..d0e90298d9 --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/sceIme.cpp @@ -0,0 +1,20 @@ +#include "stdafx.h" +#include "Emu/System.h" +#include "Emu/ARMv7/PSVFuncList.h" + +extern psv_log_base sceIme; + +#define REG_FUNC(nid, name) reg_psv_func(nid, &sceIme, #name, name) + +psv_log_base sceIme("SceIme", []() +{ + sceIme.on_load = nullptr; + sceIme.on_unload = nullptr; + sceIme.on_stop = nullptr; + + //REG_FUNC(0x0E050613, sceImeOpen); + //REG_FUNC(0x71D6898A, sceImeUpdate); + //REG_FUNC(0x889A8421, sceImeClose); + //REG_FUNC(0xD8342D2A, sceImeSetCaret); + //REG_FUNC(0x7B1EFAA5, sceImeSetPreeditGeometry); +}); diff --git a/rpcs3/Emu/ARMv7/Modules/sceJpeg.cpp b/rpcs3/Emu/ARMv7/Modules/sceJpeg.cpp new file mode 100644 index 0000000000..5ec6f79614 --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/sceJpeg.cpp @@ -0,0 +1,24 @@ +#include "stdafx.h" +#include "Emu/System.h" +#include "Emu/ARMv7/PSVFuncList.h" + +extern psv_log_base sceJpeg; + +#define REG_FUNC(nid, name) reg_psv_func(nid, &sceJpeg, #name, name) + +psv_log_base sceJpeg("SceJpeg", []() +{ + sceJpeg.on_load = nullptr; + sceJpeg.on_unload = nullptr; + sceJpeg.on_stop = nullptr; + + //REG_FUNC(0xB030773B, sceJpegInitMJpeg); + //REG_FUNC(0x62842598, sceJpegFinishMJpeg); + //REG_FUNC(0x6215B095, sceJpegDecodeMJpeg); + //REG_FUNC(0x2A769BD8, sceJpegDecodeMJpegYCbCr); + //REG_FUNC(0xC2380E3A, sceJpegMJpegCsc); + //REG_FUNC(0x353BA9B0, sceJpegGetOutputInfo); + //REG_FUNC(0x123B4734, sceJpegCreateSplitDecoder); + //REG_FUNC(0xDE8D5FA1, sceJpegDeleteSplitDecoder); + //REG_FUNC(0x4598EC9C, sceJpegSplitDecodeMJpeg); +}); diff --git a/rpcs3/Emu/ARMv7/Modules/sceJpegEnc.cpp b/rpcs3/Emu/ARMv7/Modules/sceJpegEnc.cpp new file mode 100644 index 0000000000..1567f5487d --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/sceJpegEnc.cpp @@ -0,0 +1,24 @@ +#include "stdafx.h" +#include "Emu/System.h" +#include "Emu/ARMv7/PSVFuncList.h" + +extern psv_log_base sceJpegEnc; + +#define REG_FUNC(nid, name) reg_psv_func(nid, &sceJpegEnc, #name, name) + +psv_log_base sceJpegEnc("SceJpegEnc", []() +{ + sceJpegEnc.on_load = nullptr; + sceJpegEnc.on_unload = nullptr; + sceJpegEnc.on_stop = nullptr; + + //REG_FUNC(0x2B55844D, sceJpegEncoderGetContextSize); + //REG_FUNC(0x88DA92B4, sceJpegEncoderInit); + //REG_FUNC(0xC60DE94C, sceJpegEncoderEncode); + //REG_FUNC(0xC87AA849, sceJpegEncoderEnd); + //REG_FUNC(0x9511F3BC, sceJpegEncoderSetValidRegion); + //REG_FUNC(0xB2B828EC, sceJpegEncoderSetCompressionRatio); + //REG_FUNC(0x2F58B12C, sceJpegEncoderSetHeaderMode); + //REG_FUNC(0x25D52D97, sceJpegEncoderSetOutputAddr); + //REG_FUNC(0x824A7D4F, sceJpegEncoderCsc); +}); diff --git a/rpcs3/Emu/ARMv7/Modules/sceLibc.cpp b/rpcs3/Emu/ARMv7/Modules/sceLibc.cpp index 611be74629..abb831ae32 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceLibc.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceLibc.cpp @@ -156,7 +156,7 @@ namespace sce_libc_func { sceLibc.Error("_Assert(text=0x%x, func=0x%x)", text, func); - LOG_ERROR(TTY, "%s : %s", func.get_ptr(), text.get_ptr()); + LOG_ERROR(TTY, "%s : %s\n", func.get_ptr(), text.get_ptr()); Emu.Pause(); } } diff --git a/rpcs3/Emu/ARMv7/Modules/sceLiveArea.cpp b/rpcs3/Emu/ARMv7/Modules/sceLiveArea.cpp new file mode 100644 index 0000000000..4511ca2ae7 --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/sceLiveArea.cpp @@ -0,0 +1,17 @@ +#include "stdafx.h" +#include "Emu/System.h" +#include "Emu/ARMv7/PSVFuncList.h" + +extern psv_log_base sceLiveArea; + +#define REG_FUNC(nid, name) reg_psv_func(nid, &sceLiveArea, #name, name) + +psv_log_base sceLiveArea("SceLiveArea", []() +{ + sceLiveArea.on_load = nullptr; + sceLiveArea.on_unload = nullptr; + sceLiveArea.on_stop = nullptr; + + //REG_FUNC(0xA4B506F9, sceLiveAreaResourceReplaceAll); + //REG_FUNC(0x54A395FB, sceLiveAreaResourceGetStatus); +}); diff --git a/rpcs3/Emu/ARMv7/Modules/sceLocation.cpp b/rpcs3/Emu/ARMv7/Modules/sceLocation.cpp new file mode 100644 index 0000000000..734f7f62e1 --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/sceLocation.cpp @@ -0,0 +1,34 @@ +#include "stdafx.h" +#include "Emu/System.h" +#include "Emu/ARMv7/PSVFuncList.h" + +extern psv_log_base sceLocation; + +#define REG_FUNC(nid, name) reg_psv_func(nid, &sceLocation, #name, name) + +psv_log_base sceLocation("SceLibLocation", []() +{ + sceLocation.on_load = nullptr; + sceLocation.on_unload = nullptr; + sceLocation.on_stop = nullptr; + + //REG_FUNC(0xDD271661, sceLocationOpen); + //REG_FUNC(0x14FE76E8, sceLocationClose); + //REG_FUNC(0xB1F55065, sceLocationReopen); + //REG_FUNC(0x188CE004, sceLocationGetMethod); + //REG_FUNC(0x15BC27C8, sceLocationGetLocation); + //REG_FUNC(0x71503251, sceLocationCancelGetLocation); + //REG_FUNC(0x12D1F0EA, sceLocationStartLocationCallback); + //REG_FUNC(0xED378700, sceLocationStopLocationCallback); + //REG_FUNC(0x4E9E5ED9, sceLocationGetHeading); + //REG_FUNC(0x07D4DFE0, sceLocationStartHeadingCallback); + //REG_FUNC(0x92E53F94, sceLocationStopHeadingCallback); + //REG_FUNC(0xE055BCF5, sceLocationSetHeapAllocator); + //REG_FUNC(0xC895E567, sceLocationConfirm); + //REG_FUNC(0x730FF842, sceLocationConfirmGetStatus); + //REG_FUNC(0xFF016C13, sceLocationConfirmGetResult); + //REG_FUNC(0xE3CBF875, sceLocationConfirmAbort); + //REG_FUNC(0x482622C6, sceLocationGetPermission); + //REG_FUNC(0xDE0A9EA4, sceLocationSetGpsEmulationFile); + //REG_FUNC(0x760D08FF, sceLocationConfirmSetMessage); +}); diff --git a/rpcs3/Emu/ARMv7/Modules/sceMd5.cpp b/rpcs3/Emu/ARMv7/Modules/sceMd5.cpp new file mode 100644 index 0000000000..aed0422ed4 --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/sceMd5.cpp @@ -0,0 +1,19 @@ +#include "stdafx.h" +#include "Emu/System.h" +#include "Emu/ARMv7/PSVFuncList.h" + +extern psv_log_base sceMd5; + +#define REG_FUNC(nid, name) reg_psv_func(nid, &sceMd5, #name, name) + +psv_log_base sceMd5("SceMd5", []() +{ + sceMd5.on_load = nullptr; + sceMd5.on_unload = nullptr; + sceMd5.on_stop = nullptr; + + //REG_FUNC(0xB845BCCB, sceMd5Digest); + //REG_FUNC(0x4D6436F9, sceMd5BlockInit); + //REG_FUNC(0x094A4902, sceMd5BlockUpdate); + //REG_FUNC(0xB94ABF83, sceMd5BlockResult); +}); diff --git a/rpcs3/Emu/ARMv7/Modules/sceMotion.cpp b/rpcs3/Emu/ARMv7/Modules/sceMotion.cpp new file mode 100644 index 0000000000..bc86726bb2 --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/sceMotion.cpp @@ -0,0 +1,31 @@ +#include "stdafx.h" +#include "Emu/System.h" +#include "Emu/ARMv7/PSVFuncList.h" + +extern psv_log_base sceMotion; + +#define REG_FUNC(nid, name) reg_psv_func(nid, &sceMotion, #name, name) + +psv_log_base sceMotion("SceMotion", []() +{ + sceMotion.on_load = nullptr; + sceMotion.on_unload = nullptr; + sceMotion.on_stop = nullptr; + + //REG_FUNC(0xBDB32767, sceMotionGetState); + //REG_FUNC(0x47D679EA, sceMotionGetSensorState); + //REG_FUNC(0xC1652201, sceMotionGetTiltCorrection); + //REG_FUNC(0xAF09FCDB, sceMotionSetTiltCorrection); + //REG_FUNC(0x112E0EAE, sceMotionGetDeadband); + //REG_FUNC(0x917EA390, sceMotionSetDeadband); + //REG_FUNC(0x20F00078, sceMotionRotateYaw); + //REG_FUNC(0x0FD2CDA2, sceMotionReset); + //REG_FUNC(0x28034AC9, sceMotionStartSampling); + //REG_FUNC(0xAF32CB1D, sceMotionStopSampling); + //REG_FUNC(0xDACB2A41, sceMotionSetAngleThreshold); + //REG_FUNC(0x499B6C87, sceMotionGetAngleThreshold); + //REG_FUNC(0x4F28BFE0, sceMotionGetBasicOrientation); + //REG_FUNC(0x122A79F8, sceMotionMagnetometerOn); + //REG_FUNC(0xC1A7395A, sceMotionMagnetometerOff); + //REG_FUNC(0x3D4813AE, sceMotionGetMagnetometerState); +}); diff --git a/rpcs3/Emu/ARMv7/Modules/sceMt19937.cpp b/rpcs3/Emu/ARMv7/Modules/sceMt19937.cpp new file mode 100644 index 0000000000..3893d344bf --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/sceMt19937.cpp @@ -0,0 +1,17 @@ +#include "stdafx.h" +#include "Emu/System.h" +#include "Emu/ARMv7/PSVFuncList.h" + +extern psv_log_base sceMt19937; + +#define REG_FUNC(nid, name) reg_psv_func(nid, &sceMt19937, #name, name) + +psv_log_base sceMt19937("SceMt19937", []() +{ + sceMt19937.on_load = nullptr; + sceMt19937.on_unload = nullptr; + sceMt19937.on_stop = nullptr; + + //REG_FUNC(0xEE5BA27C, sceMt19937Init); + //REG_FUNC(0x29E43BB5, sceMt19937UInt); +}); diff --git a/rpcs3/Emu/ARMv7/Modules/sceNet.cpp b/rpcs3/Emu/ARMv7/Modules/sceNet.cpp new file mode 100644 index 0000000000..f68a283618 --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/sceNet.cpp @@ -0,0 +1,73 @@ +#include "stdafx.h" +#include "Emu/System.h" +#include "Emu/ARMv7/PSVFuncList.h" + +extern psv_log_base sceNet; + +#define REG_FUNC(nid, name) reg_psv_func(nid, &sceNet, #name, name) + +psv_log_base sceNet("SceNet", []() +{ + sceNet.on_load = nullptr; + sceNet.on_unload = nullptr; + sceNet.on_stop = nullptr; + + //REG_FUNC(0xD62EF218, sceNetSetDnsInfo); + //REG_FUNC(0xFEC1166D, sceNetClearDnsCache); + //REG_FUNC(0xAFF9FA4D, sceNetDumpCreate); + //REG_FUNC(0x04042925, sceNetDumpRead); + //REG_FUNC(0x82DDCF63, sceNetDumpDestroy); + //REG_FUNC(0x3B24E75F, sceNetDumpAbort); + //REG_FUNC(0xF9D102AE, sceNetEpollCreate); + //REG_FUNC(0x4C8764AC, sceNetEpollControl); + //REG_FUNC(0x45CE337D, sceNetEpollWait); + //REG_FUNC(0x92D3E767, sceNetEpollWaitCB); + //REG_FUNC(0x7915CAF3, sceNetEpollDestroy); + //REG_FUNC(0x93FCC4E8, sceNetEpollAbort); + //REG_FUNC(0xE37F34AA, sceNetErrnoLoc); + //REG_FUNC(0xEEC6D75F, sceNetEtherStrton); + //REG_FUNC(0x84334EB2, sceNetEtherNtostr); + //REG_FUNC(0x06C05518, sceNetGetMacAddress); + //REG_FUNC(0x98839B74, sceNetInetNtop); + //REG_FUNC(0xD5EEB048, sceNetInetPton); + //REG_FUNC(0x12C19209, sceNetHtonll); + //REG_FUNC(0x4C30B03C, sceNetHtonl); + //REG_FUNC(0x9FA3207B, sceNetHtons); + //REG_FUNC(0xFB3336A6, sceNetNtohll); + //REG_FUNC(0xD2EAA645, sceNetNtohl); + //REG_FUNC(0x07845128, sceNetNtohs); + //REG_FUNC(0xEB03E265, sceNetInit); + //REG_FUNC(0xEA3CC286, sceNetTerm); + //REG_FUNC(0x658B903B, sceNetShowIfconfig); + //REG_FUNC(0x6AB3B74B, sceNetShowRoute); + //REG_FUNC(0x338EDC2E, sceNetShowNetstat); + //REG_FUNC(0x561DFD03, sceNetEmulationSet); + //REG_FUNC(0xAE3F4AC6, sceNetEmulationGet); + //REG_FUNC(0x6DA29319, sceNetResolverCreate); + //REG_FUNC(0x1EB11857, sceNetResolverStartNtoa); + //REG_FUNC(0x0424AE26, sceNetResolverStartAton); + //REG_FUNC(0x874EF500, sceNetResolverGetError); + //REG_FUNC(0x3559F098, sceNetResolverDestroy); + //REG_FUNC(0x38EBBD57, sceNetResolverAbort); + //REG_FUNC(0xF084FCE3, sceNetSocket); + //REG_FUNC(0x1ADF9BB1, sceNetAccept); + //REG_FUNC(0x1296A94B, sceNetBind); + //REG_FUNC(0x11E5B6F6, sceNetConnect); + //REG_FUNC(0x2348D353, sceNetGetpeername); + //REG_FUNC(0x1C66A6DB, sceNetGetsockname); + //REG_FUNC(0xBA652062, sceNetGetsockopt); + //REG_FUNC(0x7A8DA094, sceNetListen); + //REG_FUNC(0x023643B7, sceNetRecv); + //REG_FUNC(0xB226138B, sceNetRecvfrom); + //REG_FUNC(0xDE94C6FE, sceNetRecvmsg); + //REG_FUNC(0xE3DD8CD9, sceNetSend); + //REG_FUNC(0x52DB31D5, sceNetSendto); + //REG_FUNC(0x99C579AE, sceNetSendmsg); + //REG_FUNC(0x065505CA, sceNetSetsockopt); + //REG_FUNC(0x69E50BB5, sceNetShutdown); + //REG_FUNC(0x29822B4D, sceNetSocketClose); + //REG_FUNC(0x891C1B9B, sceNetSocketAbort); + //REG_FUNC(0xB1AF6840, sceNetGetSockInfo); + //REG_FUNC(0x138CF1D6, sceNetGetSockIdInfo); + //REG_FUNC(0xA86F8FE5, sceNetGetStatisticsInfo); +}); diff --git a/rpcs3/Emu/ARMv7/Modules/sceNetCtl.cpp b/rpcs3/Emu/ARMv7/Modules/sceNetCtl.cpp new file mode 100644 index 0000000000..cde7d28916 --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/sceNetCtl.cpp @@ -0,0 +1,31 @@ +#include "stdafx.h" +#include "Emu/System.h" +#include "Emu/ARMv7/PSVFuncList.h" + +extern psv_log_base sceNetCtl; + +#define REG_FUNC(nid, name) reg_psv_func(nid, &sceNetCtl, #name, name) + +psv_log_base sceNetCtl("SceNetCtl", []() +{ + sceNetCtl.on_load = nullptr; + sceNetCtl.on_unload = nullptr; + sceNetCtl.on_stop = nullptr; + + //REG_FUNC(0x495CA1DB, sceNetCtlInit); + //REG_FUNC(0xCD188648, sceNetCtlTerm); + //REG_FUNC(0xDFFC3ED4, sceNetCtlCheckCallback); + //REG_FUNC(0x6B20EC02, sceNetCtlInetGetResult); + //REG_FUNC(0x7AE0ED19, sceNetCtlAdhocGetResult); + //REG_FUNC(0xB26D07F3, sceNetCtlInetGetInfo); + //REG_FUNC(0x6D26AC68, sceNetCtlInetGetState); + //REG_FUNC(0xEAEE6185, sceNetCtlInetRegisterCallback); + //REG_FUNC(0xD0C3BF3F, sceNetCtlInetUnregisterCallback); + //REG_FUNC(0x4DDD6149, sceNetCtlGetNatInfo); + //REG_FUNC(0x0961A561, sceNetCtlAdhocGetState); + //REG_FUNC(0xFFA9D594, sceNetCtlAdhocRegisterCallback); + //REG_FUNC(0xA4471E10, sceNetCtlAdhocUnregisterCallback); + //REG_FUNC(0xED43B79A, sceNetCtlAdhocDisconnect); + //REG_FUNC(0x77586C59, sceNetCtlAdhocGetPeerList); + //REG_FUNC(0x7118C99D, sceNetCtlAdhocGetInAddr); +}); diff --git a/rpcs3/Emu/ARMv7/Modules/sceNgs.cpp b/rpcs3/Emu/ARMv7/Modules/sceNgs.cpp new file mode 100644 index 0000000000..5798792b12 --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/sceNgs.cpp @@ -0,0 +1,78 @@ +#include "stdafx.h" +#include "Emu/System.h" +#include "Emu/ARMv7/PSVFuncList.h" + +extern psv_log_base sceNgs; + +#define REG_FUNC(nid, name) reg_psv_func(nid, &sceNgs, #name, name) + +psv_log_base sceNgs("SceNgs", []() +{ + sceNgs.on_load = nullptr; + sceNgs.on_unload = nullptr; + sceNgs.on_stop = nullptr; + + //REG_FUNC(0x6CE8B36F, sceNgsSystemGetRequiredMemorySize); + //REG_FUNC(0xED14CF4A, sceNgsSystemInit); + //REG_FUNC(0x684F080C, sceNgsSystemUpdate); + //REG_FUNC(0x4A25BEBC, sceNgsSystemRelease); + //REG_FUNC(0xB9D971F2, sceNgsSystemLock); + //REG_FUNC(0x0A93EA96, sceNgsSystemUnlock); + //REG_FUNC(0x5ADD22DC, sceNgsSystemSetParamErrorCallback); + //REG_FUNC(0x64D80013, sceNgsSystemSetFlags); + //REG_FUNC(0x477318C0, sceNgsRackGetRequiredMemorySize); + //REG_FUNC(0x0A92E4EC, sceNgsRackInit); + //REG_FUNC(0xFE1A98E9, sceNgsRackGetVoiceHandle); + //REG_FUNC(0xDD5CA10B, sceNgsRackRelease); + //REG_FUNC(0x534B6E3F, sceNgsRackSetParamErrorCallback); + //REG_FUNC(0x1DDBEBEB, sceNgsVoiceInit); + //REG_FUNC(0xFA0A0F34, sceNgsVoicePlay); + //REG_FUNC(0xBB13373D, sceNgsVoiceKeyOff); + //REG_FUNC(0x0E291AAD, sceNgsVoiceKill); + //REG_FUNC(0xD7786E99, sceNgsVoicePause); + //REG_FUNC(0x54CFB981, sceNgsVoiceResume); + //REG_FUNC(0x8A88E665, sceNgsVoiceSetPreset); + //REG_FUNC(0xAB6BEF8F, sceNgsVoiceLockParams); + //REG_FUNC(0x3D46D8A7, sceNgsVoiceUnlockParams); + //REG_FUNC(0xFB8174B1, sceNgsVoiceSetParamsBlock); + //REG_FUNC(0x9AB87E71, sceNgsVoiceBypassModule); + //REG_FUNC(0x24E909A8, sceNgsVoiceSetModuleCallback); + //REG_FUNC(0x17A6F564, sceNgsVoiceSetFinishedCallback); + //REG_FUNC(0xC9B8C0B4, sceNgsVoiceGetStateData); + //REG_FUNC(0x5551410D, sceNgsVoiceGetInfo); + //REG_FUNC(0xB307185E, sceNgsVoiceGetModuleType); + //REG_FUNC(0x431BF3AB, sceNgsVoiceGetModuleBypass); + //REG_FUNC(0xD668B49C, sceNgsPatchCreateRouting); + //REG_FUNC(0x98703DBC, sceNgsPatchGetInfo); + //REG_FUNC(0x01A52E3A, sceNgsVoiceGetOutputPatch); + //REG_FUNC(0xD0C9AE5A, sceNgsPatchRemoveRouting); + //REG_FUNC(0xA3C807BC, sceNgsVoicePatchSetVolume); + //REG_FUNC(0xBD6F57F0, sceNgsVoicePatchSetVolumes); + //REG_FUNC(0xA0F5402D, sceNgsVoicePatchSetVolumesMatrix); + //REG_FUNC(0xF6B68C31, sceNgsVoiceDefGetEnvelopeBuss); + //REG_FUNC(0x9DCF50F5, sceNgsVoiceDefGetReverbBuss); + //REG_FUNC(0x214485D6, sceNgsVoiceDefGetPauserBuss); + //REG_FUNC(0xE0AC8776, sceNgsVoiceDefGetMixerBuss); + //REG_FUNC(0x79A121D1, sceNgsVoiceDefGetMasterBuss); + //REG_FUNC(0x0E0ACB68, sceNgsVoiceDefGetCompressorBuss); + //REG_FUNC(0x1AF83512, sceNgsVoiceDefGetCompressorSideChainBuss); + //REG_FUNC(0xAAD90DEB, sceNgsVoiceDefGetDistortionBuss); + //REG_FUNC(0xF964120E, sceNgsVoiceDefGetEqBuss); + //REG_FUNC(0xE9B572B7, sceNgsVoiceDefGetTemplate1); + //REG_FUNC(0x0D5399CF, sceNgsVoiceDefGetSimpleVoice); + //REG_FUNC(0x1F51C2BA, sceNgsVoiceDefGetSasEmuVoice); + //REG_FUNC(0x4CBE08F3, sceNgsVoiceGetParamsOutOfRange); + //REG_FUNC(0x14EF65A0, sceNgsVoiceDefGetAtrac9Voice); + //REG_FUNC(0x4D705E3E, sceNgsVoiceDefGetDelayBuss); + //REG_FUNC(0x5FD8AEDB, sceSulphaNgsGetDefaultConfig); + //REG_FUNC(0x793E3E8C, sceSulphaNgsGetNeededMemory); + //REG_FUNC(0xAFCD824F, sceSulphaNgsInit); + //REG_FUNC(0xD124BFB1, sceSulphaNgsShutdown); + //REG_FUNC(0x2F3F7515, sceSulphaNgsSetSynthName); + //REG_FUNC(0x251AF6A9, sceSulphaNgsSetRackName); + //REG_FUNC(0x508975BD, sceSulphaNgsSetVoiceName); + //REG_FUNC(0x54EC5B8D, sceSulphaNgsSetSampleName); + //REG_FUNC(0xDC7C0F05, sceSulphaNgsTrace); + //REG_FUNC(0x5C71FE09, sceNgsModuleGetNumPresets); + //REG_FUNC(0xC58298A7, sceNgsModuleGetPreset); +}); diff --git a/rpcs3/Emu/ARMv7/Modules/sceNpBasic.cpp b/rpcs3/Emu/ARMv7/Modules/sceNpBasic.cpp new file mode 100644 index 0000000000..1afa85a9cc --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/sceNpBasic.cpp @@ -0,0 +1,33 @@ +#include "stdafx.h" +#include "Emu/System.h" +#include "Emu/ARMv7/PSVFuncList.h" + +extern psv_log_base sceNpBasic; + +#define REG_FUNC(nid, name) reg_psv_func(nid, &sceNpBasic, #name, name) + +psv_log_base sceNpBasic("SceNpBasic", []() +{ + sceNpBasic.on_load = nullptr; + sceNpBasic.on_unload = nullptr; + sceNpBasic.on_stop = nullptr; + + //REG_FUNC(0xEFB91A99, sceNpBasicInit); + //REG_FUNC(0x389BCB3B, sceNpBasicTerm); + //REG_FUNC(0x26E6E048, sceNpBasicRegisterHandler); + //REG_FUNC(0x050AE072, sceNpBasicUnregisterHandler); + //REG_FUNC(0x20146AEC, sceNpBasicCheckCallback); + //REG_FUNC(0x5183A4B5, sceNpBasicGetFriendOnlineStatus); + //REG_FUNC(0xEF8A91BC, sceNpBasicGetGamePresenceOfFriend); + //REG_FUNC(0xDF41F308, sceNpBasicGetFriendListEntryCount); + //REG_FUNC(0xFF07E787, sceNpBasicGetFriendListEntries); + //REG_FUNC(0x407E1E6F, sceNpBasicGetBlockListEntryCount); + //REG_FUNC(0x1211AE8E, sceNpBasicGetBlockListEntries); + //REG_FUNC(0xF51545D8, sceNpBasicCheckIfPlayerIsBlocked); + //REG_FUNC(0x51D75562, sceNpBasicSetInGamePresence); + //REG_FUNC(0xD20C2370, sceNpBasicUnsetInGamePresence); + //REG_FUNC(0x7A5020A5, sceNpBasicSendInGameDataMessage); + //REG_FUNC(0x3B0A7F47, sceNpBasicRecordPlaySessionLog); + //REG_FUNC(0xFB0F7FDF, sceNpBasicGetPlaySessionLogSize); + //REG_FUNC(0x364531A8, sceNpBasicGetPlaySessionLog); +}); diff --git a/rpcs3/Emu/ARMv7/Modules/sceNpCommon.cpp b/rpcs3/Emu/ARMv7/Modules/sceNpCommon.cpp new file mode 100644 index 0000000000..4422bee950 --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/sceNpCommon.cpp @@ -0,0 +1,26 @@ +#include "stdafx.h" +#include "Emu/System.h" +#include "Emu/ARMv7/PSVFuncList.h" + +extern psv_log_base sceNpCommon; + +#define REG_FUNC(nid, name) reg_psv_func(nid, &sceNpCommon, #name, name) + +psv_log_base sceNpCommon("SceNpCommon", []() +{ + sceNpCommon.on_load = nullptr; + sceNpCommon.on_unload = nullptr; + sceNpCommon.on_stop = nullptr; + + //REG_FUNC(0x441D8B4E, sceNpAuthInit); + //REG_FUNC(0x6093B689, sceNpAuthTerm); + //REG_FUNC(0xED42079F, sceNpAuthCreateStartRequest); + //REG_FUNC(0x14FC18AF, sceNpAuthDestroyRequest); + //REG_FUNC(0xE2582575, sceNpAuthAbortRequest); + //REG_FUNC(0x59608D1C, sceNpAuthGetTicket); + //REG_FUNC(0xC1E23E01, sceNpAuthGetTicketParam); + //REG_FUNC(0x3377CD37, sceNpAuthGetEntitlementIdList); + //REG_FUNC(0xF93842F0, sceNpAuthGetEntitlementById); + //REG_FUNC(0xFB8D82E5, sceNpCmpNpId); + //REG_FUNC(0x6BC8150A, sceNpCmpNpIdInOrder); +}); diff --git a/rpcs3/Emu/ARMv7/Modules/sceNpManager.cpp b/rpcs3/Emu/ARMv7/Modules/sceNpManager.cpp new file mode 100644 index 0000000000..4771107b92 --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/sceNpManager.cpp @@ -0,0 +1,25 @@ +#include "stdafx.h" +#include "Emu/System.h" +#include "Emu/ARMv7/PSVFuncList.h" + +extern psv_log_base sceNpManager; + +#define REG_FUNC(nid, name) reg_psv_func(nid, &sceNpManager, #name, name) + +psv_log_base sceNpManager("SceNpManager", []() +{ + sceNpManager.on_load = nullptr; + sceNpManager.on_unload = nullptr; + sceNpManager.on_stop = nullptr; + + //REG_FUNC(0x04D9F484, sceNpInit); + //REG_FUNC(0x19E40AE1, sceNpTerm); + //REG_FUNC(0x3C94B4B4, sceNpManagerGetNpId); + //REG_FUNC(0x54060DF6, sceNpGetServiceState); + //REG_FUNC(0x44239C35, sceNpRegisterServiceStateCallback); + //REG_FUNC(0xD9E6E56C, sceNpUnregisterServiceStateCallback); + //REG_FUNC(0x3B0AE9A9, sceNpCheckCallback); + //REG_FUNC(0xFE835967, sceNpManagerGetAccountRegion); + //REG_FUNC(0xAF0073B2, sceNpManagerGetContentRatingFlag); + //REG_FUNC(0x60C575B1, sceNpManagerGetChatRestrictionFlag); +}); diff --git a/rpcs3/Emu/ARMv7/Modules/sceNpMatching.cpp b/rpcs3/Emu/ARMv7/Modules/sceNpMatching.cpp new file mode 100644 index 0000000000..ffc7d962a7 --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/sceNpMatching.cpp @@ -0,0 +1,46 @@ +#include "stdafx.h" +#include "Emu/System.h" +#include "Emu/ARMv7/PSVFuncList.h" + +extern psv_log_base sceNpMatching; + +#define REG_FUNC(nid, name) reg_psv_func(nid, &sceNpMatching, #name, name) + +psv_log_base sceNpMatching("SceNpMatching2", []() +{ + sceNpMatching.on_load = nullptr; + sceNpMatching.on_unload = nullptr; + sceNpMatching.on_stop = nullptr; + + //REG_FUNC(0xEBB1FE74, sceNpMatching2Init); + //REG_FUNC(0x0124641C, sceNpMatching2Term); + //REG_FUNC(0xADF578E1, sceNpMatching2CreateContext); + //REG_FUNC(0x368AA759, sceNpMatching2DestroyContext); + //REG_FUNC(0xBB2E7559, sceNpMatching2ContextStart); + //REG_FUNC(0xF2847E3B, sceNpMatching2AbortContextStart); + //REG_FUNC(0x506454DE, sceNpMatching2ContextStop); + //REG_FUNC(0xF3A43C50, sceNpMatching2SetDefaultRequestOptParam); + //REG_FUNC(0xF486991B, sceNpMatching2RegisterRoomEventCallback); + //REG_FUNC(0xFA51949B, sceNpMatching2RegisterRoomMessageCallback); + //REG_FUNC(0xF9E35566, sceNpMatching2RegisterContextCallback); + //REG_FUNC(0x74EB6CE9, sceNpMatching2AbortRequest); + //REG_FUNC(0x7BD39E50, sceNpMatching2GetMemoryInfo); + //REG_FUNC(0x65C0FEED, sceNpMatching2GetServerLocal); + //REG_FUNC(0xC086B560, sceNpMatching2GetWorldInfoList); + //REG_FUNC(0x818A9499, sceNpMatching2CreateJoinRoom); + //REG_FUNC(0xD48BAF13, sceNpMatching2SearchRoom); + //REG_FUNC(0x33F7D5AE, sceNpMatching2JoinRoom); + //REG_FUNC(0xC8B0C9EE, sceNpMatching2LeaveRoom); + //REG_FUNC(0x495D2B46, sceNpMatching2GetSignalingOptParamLocal); + //REG_FUNC(0xE0BE0510, sceNpMatching2SendRoomChatMessage); + //REG_FUNC(0x7B908D99, sceNpMatching2SendRoomMessage); + //REG_FUNC(0x4E4C55BD, sceNpMatching2SignalingGetConnectionStatus); + //REG_FUNC(0x20598618, sceNpMatching2SignalingGetConnectionInfo); + //REG_FUNC(0x79310806, sceNpMatching2SignalingGetLocalNetInfo); + //REG_FUNC(0xF0CB1DD3, sceNpMatching2SignalingGetPeerNetInfo); + //REG_FUNC(0xADCD102C, sceNpMatching2SignalingCancelPeerNetInfo); + //REG_FUNC(0xFDC7B2C9, sceNpMatching2SignalingGetPeerNetInfoResult); + //REG_FUNC(0x1C60BC5B, sceNpMatching2RegisterSignalingCallback); + //REG_FUNC(0x8F88AC7E, sceNpMatching2SetRoomDataExternal); + //REG_FUNC(0xA8021394, sceNpMatching2KickoutRoomMember); +}); diff --git a/rpcs3/Emu/ARMv7/Modules/sceNpScore.cpp b/rpcs3/Emu/ARMv7/Modules/sceNpScore.cpp new file mode 100644 index 0000000000..612114af70 --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/sceNpScore.cpp @@ -0,0 +1,44 @@ +#include "stdafx.h" +#include "Emu/System.h" +#include "Emu/ARMv7/PSVFuncList.h" + +extern psv_log_base sceNpScore; + +#define REG_FUNC(nid, name) reg_psv_func(nid, &sceNpScore, #name, name) + +psv_log_base sceNpScore("SceNpScore", []() +{ + sceNpScore.on_load = nullptr; + sceNpScore.on_unload = nullptr; + sceNpScore.on_stop = nullptr; + + //REG_FUNC(0x0433069F, sceNpScoreInit); + //REG_FUNC(0x2050F98F, sceNpScoreTerm); + //REG_FUNC(0x5685F225, sceNpScoreCreateTitleCtx); + //REG_FUNC(0xD30D1993, sceNpScoreCreateRequest); + //REG_FUNC(0xF52EA88A, sceNpScoreDeleteTitleCtx); + //REG_FUNC(0xFFF24BB1, sceNpScoreDeleteRequest); + //REG_FUNC(0x320C0277, sceNpScoreRecordScore); + //REG_FUNC(0x24B09634, sceNpScoreRecordScoreAsync); + //REG_FUNC(0xC2862B67, sceNpScoreRecordGameData); + //REG_FUNC(0x40573917, sceNpScoreRecordGameDataAsync); + //REG_FUNC(0xDFAD64D3, sceNpScoreGetGameData); + //REG_FUNC(0xCE416993, sceNpScoreGetGameDataAsync); + //REG_FUNC(0x427D3412, sceNpScoreGetRankingByRange); + //REG_FUNC(0xC45E3FCD, sceNpScoreGetRankingByRangeAsync); + //REG_FUNC(0xBAE55B34, sceNpScoreGetRankingByNpId); + //REG_FUNC(0x45CD1D00, sceNpScoreGetRankingByNpIdAsync); + //REG_FUNC(0x871F28AA, sceNpScoreGetRankingByNpIdPcId); + //REG_FUNC(0xCE3A9544, sceNpScoreGetRankingByNpIdPcIdAsync); + //REG_FUNC(0xA7E93CE1, sceNpScoreAbortRequest); + //REG_FUNC(0x31733BF3, sceNpScoreWaitAsync); + //REG_FUNC(0x9F2A7AC9, sceNpScorePollAsync); + //REG_FUNC(0x00F90E7B, sceNpScoreGetBoardInfo); + //REG_FUNC(0x3CD9974E, sceNpScoreGetBoardInfoAsync); + //REG_FUNC(0xA0C94D46, sceNpScoreCensorComment); + //REG_FUNC(0xAA0BBF8E, sceNpScoreCensorCommentAsync); + //REG_FUNC(0x6FD2041A, sceNpScoreSanitizeComment); + //REG_FUNC(0x15981858, sceNpScoreSanitizeCommentAsync); + //REG_FUNC(0x5EF44841, sceNpScoreSetTimeout); + //REG_FUNC(0x53D77883, sceNpScoreSetPlayerCharacterId); +}); diff --git a/rpcs3/Emu/ARMv7/Modules/sceNpUtility.cpp b/rpcs3/Emu/ARMv7/Modules/sceNpUtility.cpp new file mode 100644 index 0000000000..5ce2ca80ad --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/sceNpUtility.cpp @@ -0,0 +1,35 @@ +#include "stdafx.h" +#include "Emu/System.h" +#include "Emu/ARMv7/PSVFuncList.h" + +extern psv_log_base sceNpUtility; + +#define REG_FUNC(nid, name) reg_psv_func(nid, &sceNpUtility, #name, name) + +psv_log_base sceNpUtility("SceNpUtility", []() +{ + sceNpUtility.on_load = nullptr; + sceNpUtility.on_unload = nullptr; + sceNpUtility.on_stop = nullptr; + + //REG_FUNC(0x9246A673, sceNpLookupInit); + //REG_FUNC(0x0158B61B, sceNpLookupTerm); + //REG_FUNC(0x5110E17E, sceNpLookupCreateTitleCtx); + //REG_FUNC(0x33B64699, sceNpLookupDeleteTitleCtx); + //REG_FUNC(0x9E42E922, sceNpLookupCreateRequest); + //REG_FUNC(0x8B608BF6, sceNpLookupDeleteRequest); + //REG_FUNC(0x027587C4, sceNpLookupAbortRequest); + //REG_FUNC(0xB0C9DC45, sceNpLookupSetTimeout); + //REG_FUNC(0xCF956F23, sceNpLookupWaitAsync); + //REG_FUNC(0xFCDBA234, sceNpLookupPollAsync); + //REG_FUNC(0xB1A14879, sceNpLookupNpId); + //REG_FUNC(0x5387BABB, sceNpLookupNpIdAsync); + //REG_FUNC(0x6A1BF429, sceNpLookupUserProfile); + //REG_FUNC(0xE5285E0F, sceNpLookupUserProfileAsync); + //REG_FUNC(0xFDB0AE47, sceNpLookupAvatarImage); + //REG_FUNC(0x282BD43C, sceNpLookupAvatarImageAsync); + //REG_FUNC(0x081FA13C, sceNpBandwidthTestInitStart); + //REG_FUNC(0xE0EBFBF6, sceNpBandwidthTestGetStatus); + //REG_FUNC(0x58D92EFD, sceNpBandwidthTestShutdown); + //REG_FUNC(0x32B068C4, sceNpBandwidthTestAbort); +}); diff --git a/rpcs3/Emu/ARMv7/Modules/scePgf.cpp b/rpcs3/Emu/ARMv7/Modules/scePgf.cpp new file mode 100644 index 0000000000..c4a1f21065 --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/scePgf.cpp @@ -0,0 +1,38 @@ +#include "stdafx.h" +#include "Emu/System.h" +#include "Emu/ARMv7/PSVFuncList.h" + +extern psv_log_base scePgf; + +#define REG_FUNC(nid, name) reg_psv_func(nid, &scePgf, #name, name) + +psv_log_base scePgf("ScePgf", []() +{ + scePgf.on_load = nullptr; + scePgf.on_unload = nullptr; + scePgf.on_stop = nullptr; + + //REG_FUNC(0x1055ABA3, sceFontNewLib); + //REG_FUNC(0x07EE1733, sceFontDoneLib); + //REG_FUNC(0xDE47674C, sceFontSetResolution); + //REG_FUNC(0x9F842307, sceFontGetNumFontList); + //REG_FUNC(0xD56DCCEA, sceFontGetFontList); + //REG_FUNC(0x8DFBAE1B, sceFontFindOptimumFont); + //REG_FUNC(0x51061D87, sceFontFindFont); + //REG_FUNC(0xAB034738, sceFontGetFontInfoByIndexNumber); + //REG_FUNC(0xBD2DFCFF, sceFontOpen); + //REG_FUNC(0xE260E740, sceFontOpenUserFile); + //REG_FUNC(0xB23ED47C, sceFontOpenUserMemory); + //REG_FUNC(0x4A7293E9, sceFontClose); + //REG_FUNC(0xF9414FA2, sceFontGetFontInfo); + //REG_FUNC(0x6FD1BA65, sceFontGetCharInfo); + //REG_FUNC(0x70C86B3E, sceFontGetCharImageRect); + //REG_FUNC(0xAB45AAD3, sceFontGetCharGlyphImage); + //REG_FUNC(0xEB589530, sceFontGetCharGlyphImage_Clip); + //REG_FUNC(0x9E38F4D6, sceFontPixelToPointH); + //REG_FUNC(0x7B45E2D1, sceFontPixelToPointV); + //REG_FUNC(0x39B9AEFF, sceFontPointToPixelH); + //REG_FUNC(0x03F10EC8, sceFontPointToPixelV); + //REG_FUNC(0x8D5B44DF, sceFontSetAltCharacterCode); + //REG_FUNC(0x7D8CB13B, sceFontFlush); +}); diff --git a/rpcs3/Emu/ARMv7/Modules/scePhotoExport.cpp b/rpcs3/Emu/ARMv7/Modules/scePhotoExport.cpp new file mode 100644 index 0000000000..2fab7c29d4 --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/scePhotoExport.cpp @@ -0,0 +1,17 @@ +#include "stdafx.h" +#include "Emu/System.h" +#include "Emu/ARMv7/PSVFuncList.h" + +extern psv_log_base scePhotoExport; + +#define REG_FUNC(nid, name) reg_psv_func(nid, &scePhotoExport, #name, name) + +psv_log_base scePhotoExport("ScePhotoExport", []() +{ + scePhotoExport.on_load = nullptr; + scePhotoExport.on_unload = nullptr; + scePhotoExport.on_stop = nullptr; + + //REG_FUNC(0x70512321, scePhotoExportFromData); + //REG_FUNC(0x84FD9FC5, scePhotoExportFromFile); +}); diff --git a/rpcs3/Emu/ARMv7/Modules/sceRazorCapture.cpp b/rpcs3/Emu/ARMv7/Modules/sceRazorCapture.cpp new file mode 100644 index 0000000000..4eaeb11070 --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/sceRazorCapture.cpp @@ -0,0 +1,18 @@ +#include "stdafx.h" +#include "Emu/System.h" +#include "Emu/ARMv7/PSVFuncList.h" + +extern psv_log_base sceRazorCapture; + +#define REG_FUNC(nid, name) reg_psv_func(nid, &sceRazorCapture, #name, name) + +psv_log_base sceRazorCapture("SceRazorCapture", []() +{ + sceRazorCapture.on_load = nullptr; + sceRazorCapture.on_unload = nullptr; + sceRazorCapture.on_stop = nullptr; + + //REG_FUNC(0x911E0AA0, sceRazorCaptureIsInProgress); + //REG_FUNC(0xE916B538, sceRazorCaptureSetTrigger); + //REG_FUNC(0x3D4B7E68, sceRazorCaptureSetTriggerNextFrame); +}); diff --git a/rpcs3/Emu/ARMv7/Modules/sceRtc.cpp b/rpcs3/Emu/ARMv7/Modules/sceRtc.cpp new file mode 100644 index 0000000000..72d81d8e15 --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/sceRtc.cpp @@ -0,0 +1,52 @@ +#include "stdafx.h" +#include "Emu/System.h" +#include "Emu/ARMv7/PSVFuncList.h" + +extern psv_log_base sceRtc; + +#define REG_FUNC(nid, name) reg_psv_func(nid, &sceRtc, #name, name) + +psv_log_base sceRtc("SceRtc", []() +{ + sceRtc.on_load = nullptr; + sceRtc.on_unload = nullptr; + sceRtc.on_stop = nullptr; + + //REG_FUNC(0x23F79274, sceRtcGetCurrentTick); + //REG_FUNC(0xCDDD25FE, sceRtcGetCurrentNetworkTick); + //REG_FUNC(0x70FDE8F1, sceRtcGetCurrentClock); + //REG_FUNC(0x0572EDDC, sceRtcGetCurrentClockLocalTime); + //REG_FUNC(0x1282C436, sceRtcConvertUtcToLocalTime); + //REG_FUNC(0x0A05E201, sceRtcConvertLocalTimeToUtc); + //REG_FUNC(0x42CA8EB5, sceRtcFormatRFC2822LocalTime); + //REG_FUNC(0x147F2138, sceRtcFormatRFC2822); + //REG_FUNC(0x742250A9, sceRtcFormatRFC3339LocalTime); + //REG_FUNC(0xCCEA2B54, sceRtcFormatRFC3339); + //REG_FUNC(0xF17FD8B5, sceRtcIsLeapYear); + //REG_FUNC(0x49EB4556, sceRtcGetDaysInMonth); + //REG_FUNC(0x2F3531EB, sceRtcGetDayOfWeek); + //REG_FUNC(0xD7622935, sceRtcCheckValid); + //REG_FUNC(0x3A332F81, sceRtcSetTime_t); + //REG_FUNC(0xA6C36B6A, sceRtcSetTime64_t); + //REG_FUNC(0x8DE6FEB7, sceRtcGetTime_t); + //REG_FUNC(0xC995DE02, sceRtcGetTime64_t); + //REG_FUNC(0xF8B22B07, sceRtcSetDosTime); + //REG_FUNC(0x92ABEBAF, sceRtcGetDosTime); + //REG_FUNC(0xA79A8846, sceRtcSetWin32FileTime); + //REG_FUNC(0x8A95E119, sceRtcGetWin32FileTime); + //REG_FUNC(0x811313B3, sceRtcGetTickResolution); + //REG_FUNC(0xCD89F464, sceRtcSetTick); + //REG_FUNC(0xF2B238E2, sceRtcGetTick); + //REG_FUNC(0xC7385158, sceRtcCompareTick); + //REG_FUNC(0x4559E2DB, sceRtcTickAddTicks); + //REG_FUNC(0xAE26D920, sceRtcTickAddMicroseconds); + //REG_FUNC(0x979AFD79, sceRtcTickAddSeconds); + //REG_FUNC(0x4C358871, sceRtcTickAddMinutes); + //REG_FUNC(0x6F193F55, sceRtcTickAddHours); + //REG_FUNC(0x58DE3C70, sceRtcTickAddDays); + //REG_FUNC(0xE713C640, sceRtcTickAddWeeks); + //REG_FUNC(0x6321B4AA, sceRtcTickAddMonths); + //REG_FUNC(0xDF6C3E1B, sceRtcTickAddYears); + //REG_FUNC(0x2347CE12, sceRtcParseDateTime); + //REG_FUNC(0x2D18AEEC, sceRtcParseRFC3339); +}); diff --git a/rpcs3/Emu/ARMv7/Modules/sceSas.cpp b/rpcs3/Emu/ARMv7/Modules/sceSas.cpp new file mode 100644 index 0000000000..0db6b65e16 --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/sceSas.cpp @@ -0,0 +1,64 @@ +#include "stdafx.h" +#include "Emu/System.h" +#include "Emu/ARMv7/PSVFuncList.h" + +extern psv_log_base sceSas; + +#define REG_FUNC(nid, name) reg_psv_func(nid, &sceSas, #name, name) + +psv_log_base sceSas("SceSas", []() +{ + sceSas.on_load = nullptr; + sceSas.on_unload = nullptr; + sceSas.on_stop = nullptr; + + //REG_FUNC(0xA2209C58, sceAsSetRegisterReportHandler); + //REG_FUNC(0xBB635544, sceAsSetUnregisterReportHandler); + //REG_FUNC(0xF578F0EF, sceAsGetSystemNeededMemory); + //REG_FUNC(0xAA8D4541, sceAsCreateSystem); + //REG_FUNC(0x139D29C0, sceAsDestroySystem); + //REG_FUNC(0xBE843EEC, sceAsLockParam); + //REG_FUNC(0xFF2380C4, sceAsUnlockParam); + //REG_FUNC(0x2549F436, sceAsSetEvent); + //REG_FUNC(0xDC26B9F2, sceAsGetState); + //REG_FUNC(0xB6220E73, sceAsSetBuss); + //REG_FUNC(0x1E608068, sceAsSetRacks); + //REG_FUNC(0x5835B473, sceAsSetGranularity); + //REG_FUNC(0xDFE6502F, sceAsGetGranularity); + //REG_FUNC(0xC72F1EEF, sceAsRender); + //REG_FUNC(0xCE23F057, sceAsLockUpdate); + //REG_FUNC(0x8BEF3C92, sceAsUnlockUpdate); + //REG_FUNC(0x180C6824, sceSasGetNeededMemorySize); + //REG_FUNC(0x449B5974, sceSasInit); + //REG_FUNC(0x820D5F82, sceSasInitWithGrain); + //REG_FUNC(0xBB7D6790, sceSasExit); + //REG_FUNC(0x2B4A207C, sceSasSetGrain); + //REG_FUNC(0x2BEA45BC, sceSasGetGrain); + //REG_FUNC(0x44DDB3C4, sceSasSetOutputmode); + //REG_FUNC(0x2C36E150, sceSasGetOutputmode); + //REG_FUNC(0x7A4672B2, sceSasCore); + //REG_FUNC(0xBD496983, sceSasCoreWithMix); + //REG_FUNC(0x2B75F9BC, sceSasSetVoice); + //REG_FUNC(0xB1756EFC, sceSasSetVoicePCM); + //REG_FUNC(0xF1C63CB9, sceSasSetNoise); + //REG_FUNC(0x0BE8204D, sceSasSetVolume); + //REG_FUNC(0x011788BE, sceSasSetDistortion); + //REG_FUNC(0x2C48A08C, sceSasSetPitch); + //REG_FUNC(0x18A5EFA2, sceSasSetADSR); + //REG_FUNC(0x5207F9D2, sceSasSetADSRmode); + //REG_FUNC(0xDE6227B8, sceSasSetSL); + //REG_FUNC(0xECCE0DB8, sceSasSetSimpleADSR); + //REG_FUNC(0xC838DB6F, sceSasSetKeyOn); + //REG_FUNC(0x5E42ADAB, sceSasSetKeyOff); + //REG_FUNC(0x59C7A9DF, sceSasSetPause); + //REG_FUNC(0x007E63E6, sceSasGetEndState); + //REG_FUNC(0xFD1A0CBF, sceSasGetPauseState); + //REG_FUNC(0x296A9910, sceSasGetEnvelope); + //REG_FUNC(0xB0444E69, sceSasSetEffect); + //REG_FUNC(0xCDF2DDD5, sceSasSetEffectType); + //REG_FUNC(0x55EDDBFA, sceSasSetEffectVolume); + //REG_FUNC(0xBAD546A0, sceSasSetEffectParam); + //REG_FUNC(0xB6642276, sceSasGetDryPeak); + //REG_FUNC(0x4314F0E9, sceSasGetWetPeak); + //REG_FUNC(0x1568017A, sceSasGetPreMasterPeak); +}); diff --git a/rpcs3/Emu/ARMv7/Modules/sceScreenShot.cpp b/rpcs3/Emu/ARMv7/Modules/sceScreenShot.cpp new file mode 100644 index 0000000000..47ab0d614c --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/sceScreenShot.cpp @@ -0,0 +1,19 @@ +#include "stdafx.h" +#include "Emu/System.h" +#include "Emu/ARMv7/PSVFuncList.h" + +extern psv_log_base sceScreenShot; + +#define REG_FUNC(nid, name) reg_psv_func(nid, &sceScreenShot, #name, name) + +psv_log_base sceScreenShot("SceScreenShot", []() +{ + sceScreenShot.on_load = nullptr; + sceScreenShot.on_unload = nullptr; + sceScreenShot.on_stop = nullptr; + + //REG_FUNC(0x05DB59C7, sceScreenShotSetParam); + //REG_FUNC(0x7061665B, sceScreenShotSetOverlayImage); + //REG_FUNC(0x50AE9FF9, sceScreenShotDisable); + //REG_FUNC(0x76E674D1, sceScreenShotEnable); +}); diff --git a/rpcs3/Emu/ARMv7/Modules/sceSfmt.cpp b/rpcs3/Emu/ARMv7/Modules/sceSfmt.cpp new file mode 100644 index 0000000000..e6d2f2a4be --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/sceSfmt.cpp @@ -0,0 +1,84 @@ +#include "stdafx.h" +#include "Emu/System.h" +#include "Emu/ARMv7/PSVFuncList.h" + +extern psv_log_base sceSfmt; + +#define REG_FUNC(nid, name) reg_psv_func(nid, &sceSfmt, #name, name) + +psv_log_base sceSfmt("SceSfmt", []() +{ + sceSfmt.on_load = nullptr; + sceSfmt.on_unload = nullptr; + sceSfmt.on_stop = nullptr; + + //REG_FUNC(0x8FF464C9, sceSfmt11213InitGenRand); + //REG_FUNC(0xBAF5F058, sceSfmt11213InitByArray); + //REG_FUNC(0xFB281CD7, sceSfmt11213GenRand32); + //REG_FUNC(0xAFEDD6E1, sceSfmt11213GenRand64); + //REG_FUNC(0xFD696585, sceSfmt11213FillArray32); + //REG_FUNC(0x7A412A29, sceSfmt11213FillArray64); + + //REG_FUNC(0x02E8D906, sceSfmt1279InitGenRand); + //REG_FUNC(0xC25D9ACE, sceSfmt1279InitByArray); + //REG_FUNC(0x9B4A48DF, sceSfmt1279GenRand32); + //REG_FUNC(0xA2C5EE14, sceSfmt1279GenRand64); + //REG_FUNC(0xE7F63838, sceSfmt1279FillArray32); + //REG_FUNC(0xDB3832EB, sceSfmt1279FillArray64); + + //REG_FUNC(0xDC6B23B0, sceSfmt132049InitGenRand); + //REG_FUNC(0xDC69294A, sceSfmt132049InitByArray); + //REG_FUNC(0x795F9644, sceSfmt132049GenRand32); + //REG_FUNC(0xBBD80AC4, sceSfmt132049GenRand64); + //REG_FUNC(0xD891A99F, sceSfmt132049FillArray32); + //REG_FUNC(0x68AD7866, sceSfmt132049FillArray64); + + //REG_FUNC(0x2AFACB0B, sceSfmt19937InitGenRand); + //REG_FUNC(0xAC496C8C, sceSfmt19937InitByArray); + //REG_FUNC(0xF0557157, sceSfmt19937GenRand32); + //REG_FUNC(0xE66F2502, sceSfmt19937GenRand64); + //REG_FUNC(0xA1C654D8, sceSfmt19937FillArray32); + //REG_FUNC(0xE74BA81C, sceSfmt19937FillArray64); + + //REG_FUNC(0x86DDE4A7, sceSfmt216091InitGenRand); + //REG_FUNC(0xA9CF6616, sceSfmt216091InitByArray); + //REG_FUNC(0x4A972DCD, sceSfmt216091GenRand32); + //REG_FUNC(0x23369ABF, sceSfmt216091GenRand64); + //REG_FUNC(0xDD4256F0, sceSfmt216091FillArray32); + //REG_FUNC(0xA1CE5628, sceSfmt216091FillArray64); + + //REG_FUNC(0xB8E5A0BB, sceSfmt2281InitGenRand); + //REG_FUNC(0xAB3AD459, sceSfmt2281InitByArray); + //REG_FUNC(0x84BB4ADB, sceSfmt2281GenRand32); + //REG_FUNC(0x3CC47146, sceSfmt2281GenRand64); + //REG_FUNC(0xBB89D8F0, sceSfmt2281FillArray32); + //REG_FUNC(0x17C10E2D, sceSfmt2281FillArray64); + + //REG_FUNC(0xE9F8CB9A, sceSfmt4253InitGenRand); + //REG_FUNC(0xC4D7AA2D, sceSfmt4253InitByArray); + //REG_FUNC(0x8791E2EF, sceSfmt4253GenRand32); + //REG_FUNC(0x6C0E5E3C, sceSfmt4253GenRand64); + //REG_FUNC(0x59A1B9FC, sceSfmt4253FillArray32); + //REG_FUNC(0x01683CDD, sceSfmt4253FillArray64); + + //REG_FUNC(0xCF1C8C38, sceSfmt44497InitGenRand); + //REG_FUNC(0x16D8AA5E, sceSfmt44497InitByArray); + //REG_FUNC(0xF869DFDC, sceSfmt44497GenRand32); + //REG_FUNC(0xD411A9A6, sceSfmt44497GenRand64); + //REG_FUNC(0x1C38322A, sceSfmt44497FillArray32); + //REG_FUNC(0x908F1122, sceSfmt44497FillArray64); + + //REG_FUNC(0x76A5D8CA, sceSfmt607InitGenRand); + //REG_FUNC(0xCC6DABA0, sceSfmt607InitByArray); + //REG_FUNC(0x8A0BF859, sceSfmt607GenRand32); + //REG_FUNC(0x5E880862, sceSfmt607GenRand64); + //REG_FUNC(0xA288ADB9, sceSfmt607FillArray32); + //REG_FUNC(0x1520D408, sceSfmt607FillArray64); + + //REG_FUNC(0x2FF42588, sceSfmt86243InitGenRand); + //REG_FUNC(0x81B67AB5, sceSfmt86243InitByArray); + //REG_FUNC(0x569BF903, sceSfmt86243GenRand32); + //REG_FUNC(0x8E25CBA8, sceSfmt86243GenRand64); + //REG_FUNC(0xC297E6B1, sceSfmt86243FillArray32); + //REG_FUNC(0xF7FFE87C, sceSfmt86243FillArray64); +}); diff --git a/rpcs3/Emu/ARMv7/Modules/sceSha.cpp b/rpcs3/Emu/ARMv7/Modules/sceSha.cpp new file mode 100644 index 0000000000..5ec792b06d --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/sceSha.cpp @@ -0,0 +1,44 @@ +#include "stdafx.h" +#include "Emu/System.h" +#include "Emu/ARMv7/PSVFuncList.h" + +extern psv_log_base sceSha; + +#define REG_FUNC(nid, name) reg_psv_func(nid, &sceSha, #name, name) + +psv_log_base sceSha("SceSha", []() +{ + sceSha.on_load = nullptr; + sceSha.on_unload = nullptr; + sceSha.on_stop = nullptr; + + //REG_FUNC(0xD19A9AA8, sceSha0Digest); + //REG_FUNC(0xBCF6DB3A, sceSha0BlockInit); + //REG_FUNC(0x37EF2AFC, sceSha0BlockUpdate); + //REG_FUNC(0xBF0158C4, sceSha0BlockResult); + + //REG_FUNC(0xE1215C9D, sceSha1Digest); + //REG_FUNC(0xB13D65AA, sceSha1BlockInit); + //REG_FUNC(0x9007205E, sceSha1BlockUpdate); + //REG_FUNC(0x0195DADF, sceSha1BlockResult); + + //REG_FUNC(0x1346D270, sceSha224Digest); + //REG_FUNC(0x538F04CE, sceSha224BlockInit); + //REG_FUNC(0xB5FD0160, sceSha224BlockUpdate); + //REG_FUNC(0xA36ECF65, sceSha224BlockResult); + + //REG_FUNC(0xA337079C, sceSha256Digest); + //REG_FUNC(0xE281374F, sceSha256BlockInit); + //REG_FUNC(0xDAECA1F8, sceSha256BlockUpdate); + //REG_FUNC(0x9B5BB4BA, sceSha256BlockResult); + + //REG_FUNC(0xA602C694, sceSha384Digest); + //REG_FUNC(0x037AABE7, sceSha384BlockInit); + //REG_FUNC(0x4B99DBB8, sceSha384BlockUpdate); + //REG_FUNC(0x30D5C919, sceSha384BlockResult); + + //REG_FUNC(0x5DC0B916, sceSha512Digest); + //REG_FUNC(0xE017A9CD, sceSha512BlockInit); + //REG_FUNC(0x669281E8, sceSha512BlockUpdate); + //REG_FUNC(0x26146A16, sceSha512BlockResult); +}); diff --git a/rpcs3/Emu/ARMv7/Modules/sceSqlite.cpp b/rpcs3/Emu/ARMv7/Modules/sceSqlite.cpp new file mode 100644 index 0000000000..19f560c963 --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/sceSqlite.cpp @@ -0,0 +1,187 @@ +#include "stdafx.h" +#include "Emu/System.h" +#include "Emu/ARMv7/PSVFuncList.h" + +extern psv_log_base sceSqlite; + +#define REG_FUNC(nid, name) reg_psv_func(nid, &sceSqlite, #name, name) + +psv_log_base sceSqlite("SceSqlite", []() +{ + sceSqlite.on_load = nullptr; + sceSqlite.on_unload = nullptr; + sceSqlite.on_stop = nullptr; + + //REG_FUNC(0x26E46324, sqlite3_libversion); + //REG_FUNC(0x4CCB58A2, sqlite3_sourceid); + //REG_FUNC(0x5982F404, sqlite3_libversion_number); + //REG_FUNC(0xA3B818DA, sqlite3_threadsafe); + //REG_FUNC(0x7DF94B79, sqlite3_close); + //REG_FUNC(0x2371E86A, sqlite3_exec); + //REG_FUNC(0xC22AF627, sqlite3_initialize); + //REG_FUNC(0x99B5A4A3, sqlite3_shutdown); + //REG_FUNC(0xBD304836, sqlite3_os_init); + //REG_FUNC(0x9CE7C4C3, sqlite3_os_end); + //REG_FUNC(0x96C5D388, sqlite3_config); + //REG_FUNC(0xADFB25C0, sqlite3_db_config); + //REG_FUNC(0x3892C4B8, sqlite3_extended_result_codes); + //REG_FUNC(0x301851A1, sqlite3_last_insert_rowid); + //REG_FUNC(0xF206FBA1, sqlite3_changes); + //REG_FUNC(0x02ADA92D, sqlite3_total_changes); + //REG_FUNC(0x3CB771AC, sqlite3_interrupt); + //REG_FUNC(0x2E28B2A7, sqlite3_complete); + //REG_FUNC(0x4EAB317B, sqlite3_complete16); + //REG_FUNC(0xB5B5D287, sqlite3_busy_handler); + //REG_FUNC(0xAE8E3630, sqlite3_busy_timeout); + //REG_FUNC(0xF2AB9C89, sqlite3_get_table); + //REG_FUNC(0x1FEC6959, sqlite3_free_table); + //REG_FUNC(0xE630216C, sqlite3_mprintf); + //REG_FUNC(0xC6372184, sqlite3_vmprintf); + //REG_FUNC(0xCC189941, sqlite3_snprintf); + //REG_FUNC(0xF01DEB95, sqlite3_malloc); + //REG_FUNC(0xD1CF5631, sqlite3_realloc); + //REG_FUNC(0xCBF0CA8A, sqlite3_free); + //REG_FUNC(0x8E4F6ED5, sqlite3_memory_used); + //REG_FUNC(0x2F33DAD6, sqlite3_memory_highwater); + //REG_FUNC(0x5A2590BF, sqlite3_randomness); + //REG_FUNC(0x77FB3458, sqlite3_set_authorizer); + //REG_FUNC(0xFC127A83, sqlite3_trace); + //REG_FUNC(0x48B789A1, sqlite3_profile); + //REG_FUNC(0x19165D04, sqlite3_progress_handler); + //REG_FUNC(0x8E506859, sqlite3_open); + //REG_FUNC(0x881EEDD8, sqlite3_open16); + //REG_FUNC(0xA1E98A41, sqlite3_open_v2); + //REG_FUNC(0xA7AAE2E7, sqlite3_errcode); + //REG_FUNC(0x91187282, sqlite3_extended_errcode); + //REG_FUNC(0xABFB8B6E, sqlite3_errmsg); + //REG_FUNC(0xF0DE1A97, sqlite3_errmsg16); + //REG_FUNC(0xDED2D517, sqlite3_limit); + //REG_FUNC(0x0C1B5509, sqlite3_prepare); + //REG_FUNC(0xBC4BDCF4, sqlite3_prepare_v2); + //REG_FUNC(0xC657CFB8, sqlite3_prepare16); + //REG_FUNC(0x426D81D2, sqlite3_prepare16_v2); + //REG_FUNC(0x082C36D4, sqlite3_sql); + //REG_FUNC(0x3F225D62, sqlite3_bind_blob); + //REG_FUNC(0xDE007F1B, sqlite3_bind_double); + //REG_FUNC(0x14ABCBCC, sqlite3_bind_int); + //REG_FUNC(0x43D967EF, sqlite3_bind_int64); + //REG_FUNC(0xFF8A9974, sqlite3_bind_null); + //REG_FUNC(0x613AB709, sqlite3_bind_text); + //REG_FUNC(0x9D0FEAEF, sqlite3_bind_text16); + //REG_FUNC(0x8A667D2A, sqlite3_bind_value); + //REG_FUNC(0x78FBA2D0, sqlite3_bind_zeroblob); + //REG_FUNC(0x17D4F00B, sqlite3_bind_parameter_count); + //REG_FUNC(0x96D3B5F9, sqlite3_bind_parameter_name); + //REG_FUNC(0xD4D2A5D8, sqlite3_bind_parameter_index); + //REG_FUNC(0x690947E2, sqlite3_clear_bindings); + //REG_FUNC(0x8567A8DE, sqlite3_column_count); + //REG_FUNC(0xBC422DF6, sqlite3_column_name); + //REG_FUNC(0x6EF9A642, sqlite3_column_name16); + //REG_FUNC(0x5AE92D67, sqlite3_column_decltype); + //REG_FUNC(0xE058DE60, sqlite3_column_decltype16); + //REG_FUNC(0xCA8755B7, sqlite3_step); + //REG_FUNC(0x61911935, sqlite3_data_count); + //REG_FUNC(0xFE237ED7, sqlite3_column_blob); + //REG_FUNC(0x36013FE4, sqlite3_column_bytes); + //REG_FUNC(0x439F160B, sqlite3_column_bytes16); + //REG_FUNC(0xC4866097, sqlite3_column_double); + //REG_FUNC(0xE5B6BA01, sqlite3_column_int); + //REG_FUNC(0x90BA0B88, sqlite3_column_int64); + //REG_FUNC(0x8E68D270, sqlite3_column_text); + //REG_FUNC(0xD7BD6B76, sqlite3_column_text16); + //REG_FUNC(0xDBB25C43, sqlite3_column_type); + //REG_FUNC(0x2227F21D, sqlite3_column_value); + //REG_FUNC(0xB656B7E2, sqlite3_finalize); + //REG_FUNC(0xA6ECC214, sqlite3_reset); + //REG_FUNC(0xB0543897, sqlite3_create_function); + //REG_FUNC(0x7655FA45, sqlite3_create_function16); + //REG_FUNC(0x6AB02532, sqlite3_aggregate_count); + //REG_FUNC(0xF8AA518B, sqlite3_expired); + //REG_FUNC(0x6EC012E5, sqlite3_transfer_bindings); + //REG_FUNC(0xF48E021B, sqlite3_global_recover); + //REG_FUNC(0x173C9C0B, sqlite3_thread_cleanup); + //REG_FUNC(0x56EDF517, sqlite3_memory_alarm); + //REG_FUNC(0xC9962B31, sqlite3_value_blob); + //REG_FUNC(0x5368EF1F, sqlite3_value_bytes); + //REG_FUNC(0x4D10900D, sqlite3_value_bytes16); + //REG_FUNC(0xF1F2C9BE, sqlite3_value_double); + //REG_FUNC(0x4809A520, sqlite3_value_int); + //REG_FUNC(0xA6581C04, sqlite3_value_int64); + //REG_FUNC(0x7EB97356, sqlite3_value_text); + //REG_FUNC(0x5BBE38C2, sqlite3_value_text16); + //REG_FUNC(0x014863A6, sqlite3_value_text16le); + //REG_FUNC(0x3B89AA8D, sqlite3_value_text16be); + //REG_FUNC(0xC5EEBB5D, sqlite3_value_type); + //REG_FUNC(0x81B7D43D, sqlite3_value_numeric_type); + //REG_FUNC(0xAA8BE477, sqlite3_aggregate_context); + //REG_FUNC(0x78FF81FB, sqlite3_user_data); + //REG_FUNC(0x74259C09, sqlite3_context_db_handle); + //REG_FUNC(0x394FC1CB, sqlite3_get_auxdata); + //REG_FUNC(0x129E01C9, sqlite3_set_auxdata); + //REG_FUNC(0x90CDF8C1, sqlite3_result_blob); + //REG_FUNC(0xC2A5C2F8, sqlite3_result_double); + //REG_FUNC(0x063BFACA, sqlite3_result_error); + //REG_FUNC(0xAB2AEB4A, sqlite3_result_error16); + //REG_FUNC(0xAB9EFF96, sqlite3_result_error_toobig); + //REG_FUNC(0x944E747A, sqlite3_result_error_nomem); + //REG_FUNC(0x1165223C, sqlite3_result_error_code); + //REG_FUNC(0x5C9CD9D4, sqlite3_result_int); + //REG_FUNC(0x0EF1AA07, sqlite3_result_int64); + //REG_FUNC(0x6DE09482, sqlite3_result_null); + //REG_FUNC(0x696B5E6A, sqlite3_result_text); + //REG_FUNC(0x3AF5D206, sqlite3_result_text16); + //REG_FUNC(0x845B4FC2, sqlite3_result_text16le); + //REG_FUNC(0xEE3E906A, sqlite3_result_text16be); + //REG_FUNC(0x09664492, sqlite3_result_value); + //REG_FUNC(0x3D463CF7, sqlite3_result_zeroblob); + //REG_FUNC(0xC61B63FB, sqlite3_create_collation); + //REG_FUNC(0x4B110AF2, sqlite3_create_collation_v2); + //REG_FUNC(0xF7FE99C8, sqlite3_create_collation16); + //REG_FUNC(0x836C99A3, sqlite3_collation_needed); + //REG_FUNC(0x537066CE, sqlite3_collation_needed16); + //REG_FUNC(0x6B88D1D4, sqlite3_sleep); + //REG_FUNC(0x0910C3CB, sqlite3_get_autocommit); + //REG_FUNC(0x2C62429E, sqlite3_db_handle); + //REG_FUNC(0xD257592A, sqlite3_next_stmt); + //REG_FUNC(0x4BAE6E3B, sqlite3_commit_hook); + //REG_FUNC(0x67F53D6B, sqlite3_rollback_hook); + //REG_FUNC(0xEB05FE87, sqlite3_update_hook); + //REG_FUNC(0xF0094BED, sqlite3_enable_shared_cache); + //REG_FUNC(0x8F99FBE5, sqlite3_release_memory); + //REG_FUNC(0xD1458BA7, sqlite3_soft_heap_limit); + //REG_FUNC(0xC9EA8E1F, sqlite3_load_extension); + //REG_FUNC(0x9BFC6F07, sqlite3_enable_load_extension); + //REG_FUNC(0x24738263, sqlite3_auto_extension); + //REG_FUNC(0xC4296FFD, sqlite3_reset_auto_extension); + //REG_FUNC(0x8970C45F, sqlite3_create_module); + //REG_FUNC(0x1AA3BC1A, sqlite3_create_module_v2); + //REG_FUNC(0x7E2A5E8F, sqlite3_declare_vtab); + //REG_FUNC(0xAF680D40, sqlite3_overload_function); + //REG_FUNC(0xD35B3E55, sqlite3_blob_open); + //REG_FUNC(0xC085A15D, sqlite3_blob_close); + //REG_FUNC(0xA07AEEE3, sqlite3_blob_bytes); + //REG_FUNC(0x71393AA4, sqlite3_blob_read); + //REG_FUNC(0xBDB46BCF, sqlite3_blob_write); + //REG_FUNC(0x0C6DD8C3, sqlite3_vfs_find); + //REG_FUNC(0x65F53B9C, sqlite3_vfs_register); + //REG_FUNC(0x69CF4171, sqlite3_vfs_unregister); + //REG_FUNC(0xEEB7839F, sqlite3_mutex_alloc); + //REG_FUNC(0x38E933E2, sqlite3_mutex_free); + //REG_FUNC(0x60DB89C0, sqlite3_mutex_enter); + //REG_FUNC(0x218D700E, sqlite3_mutex_try); + //REG_FUNC(0x545ABDDB, sqlite3_mutex_leave); + //REG_FUNC(0xA8E53D26, sqlite3_db_mutex); + //REG_FUNC(0xBB096FBD, sqlite3_file_control); + //REG_FUNC(0x324D4EFD, sqlite3_test_control); + //REG_FUNC(0xD8C435AA, sqlite3_status); + //REG_FUNC(0xB5DFAF6A, sqlite3_db_status); + //REG_FUNC(0xF7ABF5FA, sqlite3_stmt_status); + //REG_FUNC(0x91DDB12A, sqlite3_backup_init); + //REG_FUNC(0x2A15E081, sqlite3_backup_step); + //REG_FUNC(0x93A6B7EF, sqlite3_backup_finish); + //REG_FUNC(0x9962540B, sqlite3_backup_remaining); + //REG_FUNC(0x20D054CF, sqlite3_backup_pagecount); + //REG_FUNC(0x12E2FC18, sqlite3_strnicmp); + //REG_FUNC(0xB80D43C7, sqlite3_version); + //REG_FUNC(0x1AEC1F74, sqlite3_temp_directory); +}); diff --git a/rpcs3/Emu/ARMv7/Modules/sceSsl.cpp b/rpcs3/Emu/ARMv7/Modules/sceSsl.cpp new file mode 100644 index 0000000000..51032ab5fd --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/sceSsl.cpp @@ -0,0 +1,26 @@ +#include "stdafx.h" +#include "Emu/System.h" +#include "Emu/ARMv7/PSVFuncList.h" + +extern psv_log_base sceSsl; + +#define REG_FUNC(nid, name) reg_psv_func(nid, &sceSsl, #name, name) + +psv_log_base sceSsl("SceSsl", []() +{ + sceSsl.on_load = nullptr; + sceSsl.on_unload = nullptr; + sceSsl.on_stop = nullptr; + + //REG_FUNC(0x3C733316, sceSslInit); + //REG_FUNC(0x03CE6E3A, sceSslTerm); + //REG_FUNC(0xBD203262, sceSslGetMemoryPoolStats); + //REG_FUNC(0x901C5C15, sceSslGetSerialNumber); + //REG_FUNC(0x9B2F1BC1, sceSslGetSubjectName); + //REG_FUNC(0x412711E5, sceSslGetIssuerName); + //REG_FUNC(0x70DEA174, sceSslGetNotBefore); + //REG_FUNC(0xF5ED7B68, sceSslGetNotAfter); + //REG_FUNC(0x95E14CA6, sceSslGetNameEntryCount); + //REG_FUNC(0x2A857867, sceSslGetNameEntryInfo); + //REG_FUNC(0xC73687E4, sceSslFreeSslCertName); +}); diff --git a/rpcs3/Emu/ARMv7/Modules/sceSulpha.cpp b/rpcs3/Emu/ARMv7/Modules/sceSulpha.cpp new file mode 100644 index 0000000000..09c50ce4e9 --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/sceSulpha.cpp @@ -0,0 +1,38 @@ +#include "stdafx.h" +#include "Emu/System.h" +#include "Emu/ARMv7/PSVFuncList.h" + +extern psv_log_base sceSulpha; + +#define REG_FUNC(nid, name) reg_psv_func(nid, &sceSulpha, #name, name) + +psv_log_base sceSulpha("SceSulpha", []() +{ + sceSulpha.on_load = nullptr; + sceSulpha.on_unload = nullptr; + sceSulpha.on_stop = nullptr; + + //REG_FUNC(0xB4668AEA, sceSulphaNetworkInit); + //REG_FUNC(0x0FC71B72, sceSulphaNetworkShutdown); + //REG_FUNC(0xA6A05C50, sceSulphaGetDefaultConfig); + //REG_FUNC(0xD52E5A5A, sceSulphaGetNeededMemory); + //REG_FUNC(0x324F158F, sceSulphaInit); + //REG_FUNC(0x10770BA7, sceSulphaShutdown); + //REG_FUNC(0x920EC7BF, sceSulphaUpdate); + //REG_FUNC(0x7968A138, sceSulphaFileConnect); + //REG_FUNC(0xB16E7B88, sceSulphaFileDisconnect); + //REG_FUNC(0x5E15E164, sceSulphaSetBookmark); + //REG_FUNC(0xC5752B6B, sceSulphaAgentsGetNeededMemory); + //REG_FUNC(0x7ADB454D, sceSulphaAgentsRegister); + //REG_FUNC(0x2A8B74D7, sceSulphaAgentsUnregister); + //REG_FUNC(0xDE7E2911, sceSulphaGetAgent); + //REG_FUNC(0xA41B7402, sceSulphaNodeNew); + //REG_FUNC(0xD44C9F86, sceSulphaNodeDelete); + //REG_FUNC(0xBF61F3B8, sceSulphaEventNew); + //REG_FUNC(0xD5D995A9, sceSulphaEventDelete); + //REG_FUNC(0xB0C2B9CE, sceSulphaEventAdd); + //REG_FUNC(0xBC6A2833, sceSulphaEventReport); + //REG_FUNC(0x29F0DA12, sceSulphaGetTimestamp); + //REG_FUNC(0x951D159D, sceSulphaLogSetLevel); + //REG_FUNC(0x5C6815C6, sceSulphaLogHandler); +}); diff --git a/rpcs3/Emu/ARMv7/Modules/sceSystemGesture.cpp b/rpcs3/Emu/ARMv7/Modules/sceSystemGesture.cpp new file mode 100644 index 0000000000..b70a5a27c4 --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/sceSystemGesture.cpp @@ -0,0 +1,32 @@ +#include "stdafx.h" +#include "Emu/System.h" +#include "Emu/ARMv7/PSVFuncList.h" + +extern psv_log_base sceSystemGesture; + +#define REG_FUNC(nid, name) reg_psv_func(nid, &sceSystemGesture, #name, name) + +psv_log_base sceSystemGesture("SceSystemGesture", []() +{ + sceSystemGesture.on_load = nullptr; + sceSystemGesture.on_unload = nullptr; + sceSystemGesture.on_stop = nullptr; + + //REG_FUNC(0x6078A08B, sceSystemGestureInitializePrimitiveTouchRecognizer); + //REG_FUNC(0xFD5A6504, sceSystemGestureResetPrimitiveTouchRecognizer); + //REG_FUNC(0xB3875104, sceSystemGestureFinalizePrimitiveTouchRecognizer); + //REG_FUNC(0xDF4C665A, sceSystemGestureUpdatePrimitiveTouchRecognizer); + //REG_FUNC(0xC750D3DA, sceSystemGestureGetPrimitiveTouchEvents); + //REG_FUNC(0xBAB8ECCB, sceSystemGestureGetPrimitiveTouchEventsCount); + //REG_FUNC(0xE0577765, sceSystemGestureGetPrimitiveTouchEventByIndex); + //REG_FUNC(0x480564C9, sceSystemGestureGetPrimitiveTouchEventByPrimitiveID); + //REG_FUNC(0xC3367370, sceSystemGestureCreateTouchRecognizer); + //REG_FUNC(0xF0DB1AE5, sceSystemGestureGetTouchRecognizerInformation); + //REG_FUNC(0x0D941B90, sceSystemGestureResetTouchRecognizer); + //REG_FUNC(0x851FB144, sceSystemGestureUpdateTouchRecognizer); + //REG_FUNC(0xA9DB29F6, sceSystemGestureUpdateTouchRecognizerRectangle); + //REG_FUNC(0x789D867C, sceSystemGestureGetTouchEvents); + //REG_FUNC(0x13AD2218, sceSystemGestureGetTouchEventsCount); + //REG_FUNC(0x74724147, sceSystemGestureGetTouchEventByIndex); + //REG_FUNC(0x5570B83E, sceSystemGestureGetTouchEventByEventID); +}); diff --git a/rpcs3/Emu/ARMv7/Modules/sceTouch.cpp b/rpcs3/Emu/ARMv7/Modules/sceTouch.cpp new file mode 100644 index 0000000000..6636644e0d --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/sceTouch.cpp @@ -0,0 +1,20 @@ +#include "stdafx.h" +#include "Emu/System.h" +#include "Emu/ARMv7/PSVFuncList.h" + +extern psv_log_base sceTouch; + +#define REG_FUNC(nid, name) reg_psv_func(nid, &sceTouch, #name, name) + +psv_log_base sceTouch("SceTouch", []() +{ + sceTouch.on_load = nullptr; + sceTouch.on_unload = nullptr; + sceTouch.on_stop = nullptr; + + //REG_FUNC(0x169A1D58, sceTouchRead); + //REG_FUNC(0xFF082DF0, sceTouchPeek); + //REG_FUNC(0x1B9C5D14, sceTouchSetSamplingState); + //REG_FUNC(0x26531526, sceTouchGetSamplingState); + //REG_FUNC(0x10A2CA25, sceTouchGetPanelInfo); +}); diff --git a/rpcs3/Emu/ARMv7/Modules/sceUlt.cpp b/rpcs3/Emu/ARMv7/Modules/sceUlt.cpp new file mode 100644 index 0000000000..6fb390fbd8 --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/sceUlt.cpp @@ -0,0 +1,68 @@ +#include "stdafx.h" +#include "Emu/System.h" +#include "Emu/ARMv7/PSVFuncList.h" + +extern psv_log_base sceUlt; + +#define REG_FUNC(nid, name) reg_psv_func(nid, &sceUlt, #name, name) + +psv_log_base sceUlt("SceUlt", []() +{ + sceUlt.on_load = nullptr; + sceUlt.on_unload = nullptr; + sceUlt.on_stop = nullptr; + + //REG_FUNC(0xEF094E35, _sceUltWaitingQueueResourcePoolOptParamInitialize); + //REG_FUNC(0x644DA029, sceUltWaitingQueueResourcePoolGetWorkAreaSize); + //REG_FUNC(0x62F9493E, _sceUltWaitingQueueResourcePoolCreate); + //REG_FUNC(0xC9E96714, sceUltWaitingQueueResourcePoolDestroy); + //REG_FUNC(0x8A4F88A2, _sceUltQueueDataResourcePoolOptParamInitialize); + //REG_FUNC(0xECDA7FEE, sceUltQueueDataResourcePoolGetWorkAreaSize); + //REG_FUNC(0x40856827, _sceUltQueueDataResourcePoolCreate); + //REG_FUNC(0x2B8D33F1, sceUltQueueDataResourcePoolDestroy); + //REG_FUNC(0x24D87E05, _sceUltMutexOptParamInitialize); + //REG_FUNC(0x5AFEC7A1, _sceUltMutexCreate); + //REG_FUNC(0x001EAC8A, sceUltMutexLock); + //REG_FUNC(0xE5936A69, sceUltMutexTryLock); + //REG_FUNC(0x897C9097, sceUltMutexUnlock); + //REG_FUNC(0xEEBD9052, sceUltMutexDestroy); + //REG_FUNC(0x0603FCC1, _sceUltConditionVariableOptParamInitialize); + //REG_FUNC(0xD76A156C, _sceUltConditionVariableCreate); + //REG_FUNC(0x9FE7CB9F, sceUltConditionVariableSignal); + //REG_FUNC(0xEBB6FC1E, sceUltConditionVariableSignalAll); + //REG_FUNC(0x2CD0F57C, sceUltConditionVariableWait); + //REG_FUNC(0x53420ED2, sceUltConditionVariableDestroy); + //REG_FUNC(0xF7A83023, _sceUltQueueOptParamInitialize); + //REG_FUNC(0x14DA1BB4, _sceUltQueueCreate); + //REG_FUNC(0xA7E78FF9, sceUltQueuePush); + //REG_FUNC(0x6D356B29, sceUltQueueTryPush); + //REG_FUNC(0x1AD58A53, sceUltQueuePop); + //REG_FUNC(0x2A1A8EA6, sceUltQueueTryPop); + //REG_FUNC(0xF37862DE, sceUltQueueDestroy); + //REG_FUNC(0xD8334A1F, _sceUltReaderWriterLockOptParamInitialize); + //REG_FUNC(0x2FB0EB32, _sceUltReaderWriterLockCreate); + //REG_FUNC(0x9AD07630, sceUltReaderWriterLockLockRead); + //REG_FUNC(0x2629C055, sceUltReaderWriterLockTryLockRead); + //REG_FUNC(0x218D4743, sceUltReaderWriterLockUnlockRead); + //REG_FUNC(0xF5F63E2C, sceUltReaderWriterLockLockWrite); + //REG_FUNC(0x944FB222, sceUltReaderWriterLockTryLockWrite); + //REG_FUNC(0x2A5741F5, sceUltReaderWriterLockUnlockWrite); + //REG_FUNC(0xB1FEB79B, sceUltReaderWriterLockDestroy); + //REG_FUNC(0x8E31B9FE, _sceUltSemaphoreOptParamInitialize); + //REG_FUNC(0xDD59562C, _sceUltSemaphoreCreate); + //REG_FUNC(0xF220D3AE, sceUltSemaphoreAcquire); + //REG_FUNC(0xAF15606D, sceUltSemaphoreTryAcquire); + //REG_FUNC(0x65376E2D, sceUltSemaphoreRelease); + //REG_FUNC(0x8EC57420, sceUltSemaphoreDestroy); + //REG_FUNC(0x8486DDE6, _sceUltUlthreadRuntimeOptParamInitialize); + //REG_FUNC(0x5435C586, sceUltUlthreadRuntimeGetWorkAreaSize); + //REG_FUNC(0x86DDA3AE, _sceUltUlthreadRuntimeCreate); + //REG_FUNC(0x4E9A745C, sceUltUlthreadRuntimeDestroy); + //REG_FUNC(0x7F373376, _sceUltUlthreadOptParamInitialize); + //REG_FUNC(0xB1290375, _sceUltUlthreadCreate); + //REG_FUNC(0xCAD57BAD, sceUltUlthreadYield); + //REG_FUNC(0x1E401DF8, sceUltUlthreadExit); + //REG_FUNC(0x63483381, sceUltUlthreadJoin); + //REG_FUNC(0xB4CF88AC, sceUltUlthreadTryJoin); + //REG_FUNC(0xA798C5D7, sceUltUlthreadGetSelf); +}); diff --git a/rpcs3/Emu/ARMv7/Modules/sceVideodec.cpp b/rpcs3/Emu/ARMv7/Modules/sceVideodec.cpp new file mode 100644 index 0000000000..472c7bbfb3 --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/sceVideodec.cpp @@ -0,0 +1,34 @@ +#include "stdafx.h" +#include "Emu/System.h" +#include "Emu/ARMv7/PSVFuncList.h" + +extern psv_log_base sceVideodec; + +#define REG_FUNC(nid, name) reg_psv_func(nid, &sceVideodec, #name, name) + +psv_log_base sceVideodec("SceVideodec", []() +{ + sceVideodec.on_load = nullptr; + sceVideodec.on_unload = nullptr; + sceVideodec.on_stop = nullptr; + + //REG_FUNC(0xF1AF65A3, sceVideodecInitLibrary); + //REG_FUNC(0x3A5F4924, sceVideodecTermLibrary); + //REG_FUNC(0x97E95EDB, sceAvcdecQueryDecoderMemSize); + //REG_FUNC(0xE82BB69B, sceAvcdecCreateDecoder); + //REG_FUNC(0x8A0E359E, sceAvcdecDeleteDecoder); + //REG_FUNC(0x441673E3, sceAvcdecDecodeAvailableSize); + //REG_FUNC(0xD6190A06, sceAvcdecDecode); + //REG_FUNC(0x9648D853, sceAvcdecDecodeStop); + //REG_FUNC(0x25F31020, sceAvcdecDecodeFlush); + //REG_FUNC(0xB2A428DB, sceAvcdecCsc); + //REG_FUNC(0x6C68A38F, sceAvcdecDecodeNalAu); + //REG_FUNC(0xC67C1A80, sceM4vdecQueryDecoderMemSize); + //REG_FUNC(0x17C6AC9E, sceM4vdecCreateDecoder); + //REG_FUNC(0x0EB2E4E7, sceM4vdecDeleteDecoder); + //REG_FUNC(0xA8CF1942, sceM4vdecDecodeAvailableSize); + //REG_FUNC(0x624664DB, sceM4vdecDecode); + //REG_FUNC(0x87CFD23B, sceM4vdecDecodeStop); + //REG_FUNC(0x7C460D75, sceM4vdecDecodeFlush); + //REG_FUNC(0xB4BC325B, sceM4vdecCsc); +}); diff --git a/rpcs3/Emu/ARMv7/Modules/sceVoice.cpp b/rpcs3/Emu/ARMv7/Modules/sceVoice.cpp new file mode 100644 index 0000000000..072f3d3303 --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/sceVoice.cpp @@ -0,0 +1,40 @@ +#include "stdafx.h" +#include "Emu/System.h" +#include "Emu/ARMv7/PSVFuncList.h" + +extern psv_log_base sceVoice; + +#define REG_FUNC(nid, name) reg_psv_func(nid, &sceVoice, #name, name) + +psv_log_base sceVoice("SceVoice", []() +{ + sceVoice.on_load = nullptr; + sceVoice.on_unload = nullptr; + sceVoice.on_stop = nullptr; + + //REG_FUNC(0xD02C00B4, sceVoiceGetBitRate); + //REG_FUNC(0xC913F7E9, sceVoiceGetMuteFlag); + //REG_FUNC(0x875CC80D, sceVoiceGetVolume); + //REG_FUNC(0x02F58D6F, sceVoiceSetBitRate); + //REG_FUNC(0x0B9E4AE2, sceVoiceSetMuteFlag); + //REG_FUNC(0xDB90EAC4, sceVoiceSetMuteFlagAll); + //REG_FUNC(0xD93769E6, sceVoiceSetVolume); + //REG_FUNC(0x6E46950E, sceVoiceGetResourceInfo); + //REG_FUNC(0xAC98853E, sceVoiceEnd); + //REG_FUNC(0x805CC20F, sceVoiceInit); + //REG_FUNC(0xB2ED725B, sceVoiceStart); + //REG_FUNC(0xC3868DF6, sceVoiceStop); + //REG_FUNC(0x698BDAAE, sceVoiceConnectIPortToOPort); + //REG_FUNC(0xFA4E57B1, sceVoiceCreatePort); + //REG_FUNC(0xAE46564D, sceVoiceDeletePort); + //REG_FUNC(0x5F0260F4, sceVoiceDisconnectIPortFromOPort); + //REG_FUNC(0x5933CCFB, sceVoiceGetPortInfo); + //REG_FUNC(0x23C6B16B, sceVoicePausePort); + //REG_FUNC(0x39AA3884, sceVoicePausePortAll); + //REG_FUNC(0x09E4D18C, sceVoiceReadFromOPort); + //REG_FUNC(0x5E1CE910, sceVoiceResetPort); + //REG_FUNC(0x2DE35411, sceVoiceResumePort); + //REG_FUNC(0x1F93FC0C, sceVoiceResumePortAll); + //REG_FUNC(0xCE855C50, sceVoiceUpdatePort); + //REG_FUNC(0x0A22EC0E, sceVoiceWriteToIPort); +}); diff --git a/rpcs3/Emu/ARMv7/Modules/sceVoiceQoS.cpp b/rpcs3/Emu/ARMv7/Modules/sceVoiceQoS.cpp new file mode 100644 index 0000000000..bc5fb062a3 --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/sceVoiceQoS.cpp @@ -0,0 +1,32 @@ +#include "stdafx.h" +#include "Emu/System.h" +#include "Emu/ARMv7/PSVFuncList.h" + +extern psv_log_base sceVoiceQoS; + +#define REG_FUNC(nid, name) reg_psv_func(nid, &sceVoiceQoS, #name, name) + +psv_log_base sceVoiceQoS("SceVoiceQos", []() +{ + sceVoiceQoS.on_load = nullptr; + sceVoiceQoS.on_unload = nullptr; + sceVoiceQoS.on_stop = nullptr; + + //REG_FUNC(0x4B5FFF1C, sceVoiceQoSInit); + //REG_FUNC(0xFB0B747B, sceVoiceQoSEnd); + //REG_FUNC(0xAAB54BE4, sceVoiceQoSCreateLocalEndpoint); + //REG_FUNC(0x68FABF6F, sceVoiceQoSDeleteLocalEndpoint); + //REG_FUNC(0xBAB98727, sceVoiceQoSCreateRemoteEndpoint); + //REG_FUNC(0xC2F2C771, sceVoiceQoSDeleteRemoteEndpoint); + //REG_FUNC(0xE0C5CEEE, sceVoiceQoSConnect); + //REG_FUNC(0x3C7A08B0, sceVoiceQoSDisconnect); + //REG_FUNC(0xE5B4527D, sceVoiceQoSGetLocalEndpoint); + //REG_FUNC(0x876A9B9C, sceVoiceQoSGetRemoteEndpoint); + //REG_FUNC(0x540CEBA5, sceVoiceQoSSetLocalEndpointAttribute); + //REG_FUNC(0xC981AB3B, sceVoiceQoSGetLocalEndpointAttribute); + //REG_FUNC(0xE757806F, sceVoiceQoSSetConnectionAttribute); + //REG_FUNC(0xE81B8D44, sceVoiceQoSGetConnectionAttribute); + //REG_FUNC(0xC9DC1425, sceVoiceQoSGetStatus); + //REG_FUNC(0x2FE1F28F, sceVoiceQoSWritePacket); + //REG_FUNC(0x2D613549, sceVoiceQoSReadPacket); +}); diff --git a/rpcs3/Emu/ARMv7/Modules/sceXml.cpp b/rpcs3/Emu/ARMv7/Modules/sceXml.cpp new file mode 100644 index 0000000000..525ce21565 --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/sceXml.cpp @@ -0,0 +1,201 @@ +#include "stdafx.h" +#include "Emu/System.h" +#include "Emu/ARMv7/PSVFuncList.h" + +extern psv_log_base sceXml; + +#define REG_FUNC(nid, name) reg_psv_func(nid, &sceXml, #name, name) + +psv_log_base sceXml("SceXml", []() +{ + sceXml.on_load = nullptr; + sceXml.on_unload = nullptr; + sceXml.on_stop = nullptr; + + //REG_FUNC(0x57400A1A, _ZN3sce3Xml10SimpleDataC1EPKcj); + //REG_FUNC(0x7E582075, _ZN3sce3Xml10SimpleDataC1Ev); + //REG_FUNC(0x4CF0656B, _ZN3sce3Xml10SimpleDataC2EPKcj); + //REG_FUNC(0x95077028, _ZN3sce3Xml10SimpleDataC2Ev); + //REG_FUNC(0xECFA6A2A, _ZN3sce3Xml11Initializer10initializeEPKNS0_13InitParameterE); + //REG_FUNC(0x29824CD5, _ZN3sce3Xml11Initializer9terminateEv); + //REG_FUNC(0xBF13FDE6, _ZN3sce3Xml11InitializerC1Ev); + //REG_FUNC(0x94AAA71D, _ZN3sce3Xml11InitializerC2Ev); + //REG_FUNC(0xB4547C88, _ZN3sce3Xml11InitializerD1Ev); + //REG_FUNC(0xAAA08FA8, _ZN3sce3Xml11InitializerD2Ev); + //REG_FUNC(0x8D387E01, _ZN3sce3Xml12MemAllocatorC1Ev); + //REG_FUNC(0xE982E681, _ZN3sce3Xml12MemAllocatorC2Ev); + //REG_FUNC(0x90B82579, _ZN3sce3Xml12MemAllocatorD0Ev); + //REG_FUNC(0x56002B9D, _ZN3sce3Xml12MemAllocatorD1Ev); + //REG_FUNC(0x1BE022EA, _ZN3sce3Xml12MemAllocatorD2Ev); + //REG_FUNC(0x89AA847E, _ZN3sce3Xml13AttributeList10initializeEPKNS0_11InitializerE); + //REG_FUNC(0xD08EE434, _ZN3sce3Xml13AttributeList12addAttributeEPKNS0_6StringES4_); + //REG_FUNC(0xCCEE4E7C, _ZN3sce3Xml13AttributeList5clearEv); + //REG_FUNC(0x11FE5A65, _ZN3sce3Xml13AttributeList9terminateEv); + //REG_FUNC(0x9CBD82D4, _ZN3sce3Xml13AttributeListC1ERKS1_); + //REG_FUNC(0x542076D8, _ZN3sce3Xml13AttributeListC1Ev); + //REG_FUNC(0x87C89447, _ZN3sce3Xml13AttributeListC2ERKS1_); + //REG_FUNC(0x5D49542A, _ZN3sce3Xml13AttributeListC2Ev); + //REG_FUNC(0x38861841, _ZN3sce3Xml13AttributeListD1Ev); + //REG_FUNC(0x1B0B3976, _ZN3sce3Xml13AttributeListD2Ev); + //REG_FUNC(0x30520B78, _ZN3sce3Xml14VarAllocBuffer4copyEPKhjb); + //REG_FUNC(0x7D5A0041, _ZN3sce3Xml14VarAllocBuffer5clearEv); + //REG_FUNC(0xD95D3824, _ZN3sce3Xml14VarAllocBuffer7copyStrEPKcj); + //REG_FUNC(0xFE99676E, _ZN3sce3Xml14VarAllocBuffer7copyStrERKNS0_6StringE); + //REG_FUNC(0x82747F92, _ZN3sce3Xml14VarAllocBuffer7reserveEj); + //REG_FUNC(0xE93EACFC, _ZN3sce3Xml14VarAllocBuffer9terminateEv); + //REG_FUNC(0x8045D9C2, _ZN3sce3Xml14VarAllocBufferC1EPKNS0_11InitializerE); + //REG_FUNC(0xEF4FA027, _ZN3sce3Xml14VarAllocBufferC2EPKNS0_11InitializerE); + //REG_FUNC(0xD61CAAFC, _ZN3sce3Xml14VarAllocBufferD0Ev); + //REG_FUNC(0xD9217FC8, _ZN3sce3Xml14VarAllocBufferD1Ev); + //REG_FUNC(0x8A4B9379, _ZN3sce3Xml14VarAllocBufferD2Ev); + //REG_FUNC(0xB7770E5E, _ZN3sce3Xml18SerializeParameterC1Ev); + //REG_FUNC(0xF65270FC, _ZN3sce3Xml18SerializeParameterC2Ev); + //REG_FUNC(0x2CB61A7C, _ZN3sce3Xml20bXResultToResultTypeEi); + //REG_FUNC(0x59C5E9B2, _ZN3sce3Xml23getMemManagerDebugLevelEv); + //REG_FUNC(0xBA8B7374, _ZN3sce3Xml23setMemManagerDebugLevelEi); + //REG_FUNC(0xBBACFE87, _ZN3sce3Xml3Dom15DocumentBuilder10initializeEPKNS0_11InitializerE); + //REG_FUNC(0x1A29526B, _ZN3sce3Xml3Dom15DocumentBuilder11getDocumentEv); + //REG_FUNC(0xA2431C2B, _ZN3sce3Xml3Dom15DocumentBuilder16setResolveEntityEb); + //REG_FUNC(0xB8C4D13C, _ZN3sce3Xml3Dom15DocumentBuilder20setSkipIgnorableTextEb); + //REG_FUNC(0xF351D753, _ZN3sce3Xml3Dom15DocumentBuilder26setSkipIgnorableWhiteSpaceEb); + //REG_FUNC(0x7744DD14, _ZN3sce3Xml3Dom15DocumentBuilder5parseEPKNS0_6StringEb); + //REG_FUNC(0x42D59053, _ZN3sce3Xml3Dom15DocumentBuilder9terminateEv); + //REG_FUNC(0x702492EA, _ZN3sce3Xml3Dom15DocumentBuilderC1Ev); + //REG_FUNC(0x36F6BDF2, _ZN3sce3Xml3Dom15DocumentBuilderC2Ev); + //REG_FUNC(0x79C9322E, _ZN3sce3Xml3Dom15DocumentBuilderD0Ev); + //REG_FUNC(0x19D0E024, _ZN3sce3Xml3Dom15DocumentBuilderD1Ev); + //REG_FUNC(0x99C58389, _ZN3sce3Xml3Dom15DocumentBuilderD2Ev); + //REG_FUNC(0x3CA958D3, _ZN3sce3Xml3Dom4Node11removeChildEy); + //REG_FUNC(0x1B98BDBE, _ZN3sce3Xml3Dom4Node12insertBeforeEyy); + //REG_FUNC(0x26BA1E6E, _ZNK3sce3Xml3Dom4Node13hasAttributesEv); + //REG_FUNC(0xC6F4F6A8, _ZN3sce3Xml3Dom4Node13hasChildNodesEv); + //REG_FUNC(0x088C100E, _ZN3sce3Xml3Dom4NodeC1Ey); + //REG_FUNC(0x44CAF9E1, _ZN3sce3Xml3Dom4NodeC2Ey); + //REG_FUNC(0x8F2EB967, _ZN3sce3Xml3Dom4NodeD1Ev); + //REG_FUNC(0x241EFC0E, _ZN3sce3Xml3Dom4NodeD2Ev); + //REG_FUNC(0x6A16C2FF, _ZN3sce3Xml3Dom8Document10importNodeEyyPKS2_y); + //REG_FUNC(0xB4A33B78, _ZN3sce3Xml3Dom8Document10initializeEPKNS0_11InitializerE); + //REG_FUNC(0x18686B94, _ZN3sce3Xml3Dom8Document10insertNodeEyyy); + //REG_FUNC(0x49263CE5, _ZN3sce3Xml3Dom8Document11removeChildEyy); + //REG_FUNC(0xD945184A, _ZN3sce3Xml3Dom8Document11resetStatusEv); + //REG_FUNC(0x7B0A8F6C, _ZN3sce3Xml3Dom8Document11setWritableEv); + //REG_FUNC(0x0CBC1C3F, _ZN3sce3Xml3Dom8Document12importParentEPKS2_y); + //REG_FUNC(0x016A9ADB, _ZN3sce3Xml3Dom8Document12setAttrValueEyPKNS0_6StringES5_); + //REG_FUNC(0xEA19C7CF, _ZN3sce3Xml3Dom8Document12setAttributeEyPKNS0_6StringES5_); + //REG_FUNC(0x35C50B8B, _ZN3sce3Xml3Dom8Document13createElementEPKNS0_6StringEPKNS0_13AttributeListES5_); + //REG_FUNC(0xBCA5E62A, _ZN3sce3Xml3Dom8Document13recurseDeleteEy); + //REG_FUNC(0x8D19723F, _ZN3sce3Xml3Dom8Document14createTextNodeEPKNS0_6StringE); + //REG_FUNC(0x6220E98B, _ZN3sce3Xml3Dom8Document15addElementChildEyPKNS0_6StringEPKNS0_13AttributeListES5_); + //REG_FUNC(0xF1DB18B1, _ZN3sce3Xml3Dom8Document15removeAttributeEyPKNS0_6StringE); + //REG_FUNC(0x779036AB, _ZN3sce3Xml3Dom8Document16removeAttributesEy); + //REG_FUNC(0x0667B08D, _ZN3sce3Xml3Dom8Document16setAttributeListEyPKNS0_13AttributeListE); + //REG_FUNC(0xD2BFBC47, _ZNK3sce3Xml3Dom8Document20getElementsByTagNameEyPKNS0_6StringEPNS1_8NodeListE); + //REG_FUNC(0xDEFEAFD2, _ZN3sce3Xml3Dom8Document7setTextEyPKNS0_6StringE); + //REG_FUNC(0x87F8B4DA, _ZN3sce3Xml3Dom8Document9serializeEPKNS0_18SerializeParameterEPNS0_6StringE); + //REG_FUNC(0x4B7321FB, _ZN3sce3Xml3Dom8Document9terminateEv); + //REG_FUNC(0x1DD41C7A, _ZN3sce3Xml3Dom8DocumentC1ERKS2_); + //REG_FUNC(0x7B7107AD, _ZN3sce3Xml3Dom8DocumentC1Ev); + //REG_FUNC(0xF399F763, _ZN3sce3Xml3Dom8DocumentC2ERKS2_); + //REG_FUNC(0xE6BA9C73, _ZN3sce3Xml3Dom8DocumentC2Ev); + //REG_FUNC(0xFB207925, _ZN3sce3Xml3Dom8DocumentD1Ev); + //REG_FUNC(0x11A5F0A3, _ZN3sce3Xml3Dom8DocumentD2Ev); + //REG_FUNC(0xD622A7FE, _ZN3sce3Xml3Dom8DocumentaSERKS2_); + //REG_FUNC(0x860CC706, _ZN3sce3Xml3Dom8NodeList10initializeEPKNS0_11InitializerE); + //REG_FUNC(0x7A889374, _ZN3sce3Xml3Dom8NodeList10insertLastEy); + //REG_FUNC(0xE9995F58, _ZN3sce3Xml3Dom8NodeList10removeItemEy); + //REG_FUNC(0xFA921C6E, _ZN3sce3Xml3Dom8NodeList11insertFirstEy); + //REG_FUNC(0xCDD1D418, _ZNK3sce3Xml3Dom8NodeList4itemEj); + //REG_FUNC(0x508E9150, _ZN3sce3Xml3Dom8NodeList5clearEv); + //REG_FUNC(0xA41ED241, _ZNK3sce3Xml3Dom8NodeList8findItemEPKNS0_6StringE); + //REG_FUNC(0xE1AB441D, _ZNK3sce3Xml3Dom8NodeList8findItemEy); + //REG_FUNC(0xFB9EDBF9, _ZNK3sce3Xml3Dom8NodeList9getLengthEv); + //REG_FUNC(0x32B396AD, _ZN3sce3Xml3Dom8NodeList9terminateEv); + //REG_FUNC(0xB1CA0E34, _ZN3sce3Xml3Dom8NodeListC1ERKS2_); + //REG_FUNC(0x0580C02E, _ZN3sce3Xml3Dom8NodeListC1Ev); + //REG_FUNC(0xB97BF737, _ZN3sce3Xml3Dom8NodeListC2ERKS2_); + //REG_FUNC(0x684E57B9, _ZN3sce3Xml3Dom8NodeListC2Ev); + //REG_FUNC(0x92EBC9F8, _ZN3sce3Xml3Dom8NodeListD1Ev); + //REG_FUNC(0x2DF80037, _ZN3sce3Xml3Dom8NodeListD2Ev); + //REG_FUNC(0xBAD4AAFA, _ZNK3sce3Xml3Dom8NodeListixEj); + //REG_FUNC(0x874C8331, _ZN3sce3Xml3Sax6Parser10initializeEPKNS0_11InitializerE); + //REG_FUNC(0x4DB998E6, _ZN3sce3Xml3Sax6Parser11setUserDataEPv); + //REG_FUNC(0xB77BF8A0, _ZN3sce3Xml3Sax6Parser16setResolveEntityEb); + //REG_FUNC(0x1B2442A0, _ZN3sce3Xml3Sax6Parser18setDocumentHandlerEPNS1_15DocumentHandlerE); + //REG_FUNC(0xCE1DAE23, _ZN3sce3Xml3Sax6Parser26setSkipIgnorableWhiteSpaceEb); + //REG_FUNC(0x70D9FC8E, _ZN3sce3Xml3Sax6Parser5parseEPKNS0_6StringEb); + //REG_FUNC(0xA2B40FA7, _ZN3sce3Xml3Sax6Parser5resetEv); + //REG_FUNC(0xF2C8950D, _ZN3sce3Xml3Sax6Parser9terminateEv); + //REG_FUNC(0x60BF9988, _ZN3sce3Xml3Sax6ParserC1Ev); + //REG_FUNC(0x56390CA0, _ZN3sce3Xml3Sax6ParserC2Ev); + //REG_FUNC(0xA11C2AED, _ZN3sce3Xml3Sax6ParserD1Ev); + //REG_FUNC(0x02E8F7FA, _ZN3sce3Xml3Sax6ParserD2Ev); + //REG_FUNC(0xE5314387, _ZN3sce3Xml4Attr10initializeEPKNS0_11InitializerE); + //REG_FUNC(0x66D1B605, _ZN3sce3Xml4Attr7setNameEPKNS0_6StringE); + //REG_FUNC(0x7DD3059D, _ZN3sce3Xml4Attr8setValueEPKNS0_6StringE); + //REG_FUNC(0x67E0DF2B, _ZN3sce3Xml4Attr9terminateEv); + //REG_FUNC(0xC09ABF87, _ZN3sce3Xml4AttrC1ERKS1_); + //REG_FUNC(0xD016F1BC, _ZN3sce3Xml4AttrC1Ev); + //REG_FUNC(0xB4851BEC, _ZN3sce3Xml4AttrC2ERKS1_); + //REG_FUNC(0x0B3AE81B, _ZN3sce3Xml4AttrC2Ev); + //REG_FUNC(0x58E349A5, _ZN3sce3Xml4AttrD1Ev); + //REG_FUNC(0xB9E6F81A, _ZN3sce3Xml4AttrD2Ev); + //REG_FUNC(0xA5B902D4, _ZN3sce3Xml4AttraSERKS1_); + //REG_FUNC(0xA7E983E2, _ZN3sce3Xml4Util9strResultEi); + //REG_FUNC(0x035F013B, _ZN3sce3Xml6StringC1EPKc); + //REG_FUNC(0x0B5461E0, _ZN3sce3Xml6StringC1EPKcj); + //REG_FUNC(0x67191CC6, _ZN3sce3Xml6StringC1ERKS1_); + //REG_FUNC(0xA17502C1, _ZN3sce3Xml6StringC1Ev); + //REG_FUNC(0xECC1F1A4, _ZN3sce3Xml6StringC2EPKc); + //REG_FUNC(0x457CCE55, _ZN3sce3Xml6StringC2EPKcj); + //REG_FUNC(0xD785BA85, _ZN3sce3Xml6StringC2ERKS1_); + //REG_FUNC(0x8816F7EF, _ZN3sce3Xml6StringC2Ev); + //REG_FUNC(0x18758863, _ZN3sce3Xml6StringaSERKS1_); + //REG_FUNC(0x4F30F0CC, _ZNK3sce3Xml13AttributeList12getAttributeEPKNS0_6StringE); + //REG_FUNC(0x5ED0B2F9, _ZNK3sce3Xml13AttributeList12getAttributeEj); + //REG_FUNC(0x38AEB52E, _ZNK3sce3Xml13AttributeList9getLengthEv); + //REG_FUNC(0xEC96BFC6, _ZNK3sce3Xml3Dom13DocumentDebug13getStructSizeEv); + //REG_FUNC(0xE1100FC0, _ZNK3sce3Xml3Dom13DocumentDebug16getAttrTableSizeEv); + //REG_FUNC(0x6E1F1FFB, _ZNK3sce3Xml3Dom13DocumentDebug16getCharTableSizeEv); + //REG_FUNC(0x8F9CEE10, _ZNK3sce3Xml3Dom13DocumentDebug19getElementTableSizeEv); + //REG_FUNC(0xE1269956, _ZNK3sce3Xml3Dom4Node11getNodeNameEv); + //REG_FUNC(0xCED5E0FF, _ZNK3sce3Xml3Dom4Node11getNodeTypeEv); + //REG_FUNC(0x4F2D5541, _ZNK3sce3Xml3Dom4Node12getNodeValueEv); + //REG_FUNC(0xB405A149, _ZNK3sce3Xml3Dom4Node13getAttributesEv); + //REG_FUNC(0x117BEA8A, _ZNK3sce3Xml3Dom4Node13getChildNodesEv); + //REG_FUNC(0x639D219C, _ZNK3sce3Xml3Dom4Node13getFirstChildEv); + //REG_FUNC(0x3FD63FB8, _ZNK3sce3Xml3Dom4Node12getLastChildEv); + //REG_FUNC(0x1A46C0E1, _ZNK3sce3Xml3Dom4Node14getNextSiblingEv); + //REG_FUNC(0xD9757BC8, _ZNK3sce3Xml3Dom4Node14getParenetNodeEv); + //REG_FUNC(0x3E8122AB, _ZNK3sce3Xml3Dom4Node16getOwnerDocumentEv); + //REG_FUNC(0x22DBB221, _ZNK3sce3Xml3Dom8Document10getDocRootEv); + //REG_FUNC(0xE3D0A78A, _ZNK3sce3Xml3Dom8Document10getSiblingEy); + //REG_FUNC(0x2D370226, _ZNK3sce3Xml3Dom8Document10getXmlMetaEv); + //REG_FUNC(0xA4D99D40, _ZNK3sce3Xml3Dom8Document10isReadOnlyEv); + //REG_FUNC(0xCD65B91F, _ZNK3sce3Xml3Dom8Document11getAttrNameEy); + //REG_FUNC(0x883E1BFC, _ZNK3sce3Xml3Dom8Document11getNextAttrEy); + //REG_FUNC(0x471A22E8, _ZNK3sce3Xml3Dom8Document11getNodeNameEy); + //REG_FUNC(0x62D3CB44, _ZNK3sce3Xml3Dom8Document11getNodeTypeEy); + //REG_FUNC(0x28FD79E3, _ZNK3sce3Xml3Dom8Document11isAvailableEv); + //REG_FUNC(0x7C6A03FD, _ZNK3sce3Xml3Dom8Document12getAttrValueEy); + //REG_FUNC(0x9531C3CD, _ZNK3sce3Xml3Dom8Document12getAttributeEyPKNS0_6StringE); + //REG_FUNC(0xEC856072, _ZNK3sce3Xml3Dom8Document12getFirstAttrEy); + //REG_FUNC(0xFBCF0D3E, _ZNK3sce3Xml3Dom8Document12getLastChildEy); + //REG_FUNC(0xCDEC3F43, _ZNK3sce3Xml3Dom8Document13getAttributesEyPNS1_8NodeListE); + //REG_FUNC(0xFC61FDF1, _ZNK3sce3Xml3Dom8Document13getChildNodesEyPNS1_8NodeListE); + //REG_FUNC(0xDAC75E49, _ZNK3sce3Xml3Dom8Document13getEntityTypeEy); + //REG_FUNC(0xEA805296, _ZNK3sce3Xml3Dom8Document13hasAttributesEy); + //REG_FUNC(0xC5E7431A, _ZNK3sce3Xml3Dom8Document13hasChildNodesEy); + //REG_FUNC(0x0C1DDEC5, _ZNK3sce3Xml3Dom8Document14getSkippedTextEy); + //REG_FUNC(0xB34D9672, _ZNK3sce3Xml3Dom8Document7getRootEv); + //REG_FUNC(0x36ACFF5E, _ZNK3sce3Xml3Dom8Document7getTextEy); + //REG_FUNC(0x3028E05D, _ZNK3sce3Xml3Dom8Document13getFirstChildEy); + //REG_FUNC(0x161BA85E, _ZNK3sce3Xml3Dom8Document9getEntityEy); + //REG_FUNC(0xA98B5758, _ZNK3sce3Xml3Dom8Document9getParentEy); + //REG_FUNC(0xD428753A, _ZNK3sce3Xml3Dom8Document9getStatusEv); + //REG_FUNC(0x10530611, _ZNK3sce3Xml3Dom8NodeList11isAvailableEv); + //REG_FUNC(0x35134B85, _ZNK3sce3Xml4Attr7getNameEv); + //REG_FUNC(0x7834A2F7, _ZNK3sce3Xml4Attr8getValueEv); + //REG_FUNC(0x0D119AB3, _ZNK3sce3Xml3Dom4Node11isAvailableEv); + //REG_FUNC(0x1633846D, _ZNK3sce3Xml4Attr11isAvailableEv); + //REG_FUNC(0x58854322, _ZNK3sce3Xml13AttributeList11isAvailableEv); +}); diff --git a/rpcs3/Emu/ARMv7/PSVFuncList.cpp b/rpcs3/Emu/ARMv7/PSVFuncList.cpp index 4ca94b42a6..29990a3208 100644 --- a/rpcs3/Emu/ARMv7/PSVFuncList.cpp +++ b/rpcs3/Emu/ARMv7/PSVFuncList.cpp @@ -44,32 +44,132 @@ void execute_psv_func_by_index(ARMv7Context& context, u32 index) context.thread.m_last_syscall = old_last_syscall; } +extern psv_log_base sceAppMgr; +extern psv_log_base sceAppUtil; +extern psv_log_base sceAudio; +extern psv_log_base sceAudiodec; +extern psv_log_base sceAudioenc; +extern psv_log_base sceAudioIn; +extern psv_log_base sceCamera; +extern psv_log_base sceCodecEngine; +extern psv_log_base sceCommonDialog; +extern psv_log_base sceCtrl; +extern psv_log_base sceDbg; +extern psv_log_base sceDeci4p; +extern psv_log_base sceDeflt; +extern psv_log_base sceDisplay; +extern psv_log_base sceFiber; +extern psv_log_base sceFios; +extern psv_log_base sceFpu; +extern psv_log_base sceGxm; +extern psv_log_base sceHttp; +extern psv_log_base sceIme; +extern psv_log_base sceJpeg; +extern psv_log_base sceJpegEnc; extern psv_log_base sceLibc; +extern psv_log_base sceLibKernel; extern psv_log_base sceLibm; extern psv_log_base sceLibstdcxx; -extern psv_log_base sceLibKernel; -extern psv_log_base sceSysmodule; +extern psv_log_base sceLiveArea; +extern psv_log_base sceLocation; +extern psv_log_base sceMd5; +extern psv_log_base sceMotion; +extern psv_log_base sceMt19937; +extern psv_log_base sceNet; +extern psv_log_base sceNetCtl; +extern psv_log_base sceNgs; +extern psv_log_base sceNpBasic; +extern psv_log_base sceNpCommon; +extern psv_log_base sceNpManager; +extern psv_log_base sceNpMatching; +extern psv_log_base sceNpScore; +extern psv_log_base sceNpUtility; extern psv_log_base scePerf; -extern psv_log_base sceCtrl; -extern psv_log_base sceDeci4p; -extern psv_log_base sceDisplay; -extern psv_log_base sceGxm; +extern psv_log_base scePgf; +extern psv_log_base scePhotoExport; +extern psv_log_base sceRazorCapture; +extern psv_log_base sceRtc; +extern psv_log_base sceSas; +extern psv_log_base sceScreenShot; +extern psv_log_base sceSfmt; +extern psv_log_base sceSha; +extern psv_log_base sceSqlite; +extern psv_log_base sceSsl; +extern psv_log_base sceSulpha; +extern psv_log_base sceSysmodule; +extern psv_log_base sceSystemGesture; +extern psv_log_base sceTouch; +extern psv_log_base sceUlt; +extern psv_log_base sceVideodec; +extern psv_log_base sceVoice; +extern psv_log_base sceVoiceQoS; +extern psv_log_base sceXml; void initialize_psv_modules() { assert(!g_psv_func_list.size() && !g_psv_modules.size()); // fill module list + g_psv_modules.push_back(&sceAppMgr); + g_psv_modules.push_back(&sceAppUtil); + g_psv_modules.push_back(&sceAudio); + g_psv_modules.push_back(&sceAudiodec); + g_psv_modules.push_back(&sceAudioenc); + g_psv_modules.push_back(&sceAudioIn); + g_psv_modules.push_back(&sceCamera); + g_psv_modules.push_back(&sceCodecEngine); + g_psv_modules.push_back(&sceCommonDialog); + g_psv_modules.push_back(&sceCtrl); + g_psv_modules.push_back(&sceDbg); + g_psv_modules.push_back(&sceDeci4p); + g_psv_modules.push_back(&sceDeflt); + g_psv_modules.push_back(&sceDisplay); + g_psv_modules.push_back(&sceFiber); + g_psv_modules.push_back(&sceFios); + g_psv_modules.push_back(&sceFpu); + g_psv_modules.push_back(&sceGxm); + g_psv_modules.push_back(&sceHttp); + g_psv_modules.push_back(&sceIme); + g_psv_modules.push_back(&sceJpeg); + g_psv_modules.push_back(&sceJpegEnc); g_psv_modules.push_back(&sceLibc); + g_psv_modules.push_back(&sceLibKernel); g_psv_modules.push_back(&sceLibm); g_psv_modules.push_back(&sceLibstdcxx); - g_psv_modules.push_back(&sceLibKernel); - g_psv_modules.push_back(&sceSysmodule); + g_psv_modules.push_back(&sceLiveArea); + g_psv_modules.push_back(&sceLocation); + g_psv_modules.push_back(&sceMd5); + g_psv_modules.push_back(&sceMotion); + g_psv_modules.push_back(&sceMt19937); + g_psv_modules.push_back(&sceNet); + g_psv_modules.push_back(&sceNetCtl); + g_psv_modules.push_back(&sceNgs); + g_psv_modules.push_back(&sceNpBasic); + g_psv_modules.push_back(&sceNpCommon); + g_psv_modules.push_back(&sceNpManager); + g_psv_modules.push_back(&sceNpMatching); + g_psv_modules.push_back(&sceNpScore); + g_psv_modules.push_back(&sceNpUtility); g_psv_modules.push_back(&scePerf); - g_psv_modules.push_back(&sceCtrl); - g_psv_modules.push_back(&sceDeci4p); - g_psv_modules.push_back(&sceDisplay); - g_psv_modules.push_back(&sceGxm); + g_psv_modules.push_back(&scePgf); + g_psv_modules.push_back(&scePhotoExport); + g_psv_modules.push_back(&sceRazorCapture); + g_psv_modules.push_back(&sceRtc); + g_psv_modules.push_back(&sceSas); + g_psv_modules.push_back(&sceScreenShot); + g_psv_modules.push_back(&sceSfmt); + g_psv_modules.push_back(&sceSha); + g_psv_modules.push_back(&sceSqlite); + g_psv_modules.push_back(&sceSsl); + g_psv_modules.push_back(&sceSulpha); + g_psv_modules.push_back(&sceSysmodule); + g_psv_modules.push_back(&sceSystemGesture); + g_psv_modules.push_back(&sceTouch); + g_psv_modules.push_back(&sceUlt); + g_psv_modules.push_back(&sceVideodec); + g_psv_modules.push_back(&sceVoice); + g_psv_modules.push_back(&sceVoiceQoS); + g_psv_modules.push_back(&sceXml); // setup special functions (without NIDs) psv_func unimplemented; diff --git a/rpcs3/Emu/FS/vfsDirBase.h b/rpcs3/Emu/FS/vfsDirBase.h index c4d515899c..654cc72d01 100644 --- a/rpcs3/Emu/FS/vfsDirBase.h +++ b/rpcs3/Emu/FS/vfsDirBase.h @@ -67,8 +67,9 @@ public: { } - iterator(const DirEntryInfo* data) - : data(data) + iterator(vfsDirBase* parent, const DirEntryInfo* data) + : parent(parent) + , data(data) { } @@ -82,7 +83,7 @@ public: { const DirEntryInfo* olddata = data; data = parent->Read(); - return iterator(olddata); + return iterator(parent, olddata); } const DirEntryInfo* operator *() @@ -90,7 +91,7 @@ public: return data; } - bool operator!=(iterator other) const + bool operator !=(iterator other) const { return data != other.data; } @@ -103,6 +104,6 @@ public: iterator end() { - return iterator((const DirEntryInfo*)nullptr); + return iterator(this, nullptr); } }; diff --git a/rpcs3/Emu/Memory/Memory.cpp b/rpcs3/Emu/Memory/Memory.cpp index 6c5d405eab..84f75c6fff 100644 --- a/rpcs3/Emu/Memory/Memory.cpp +++ b/rpcs3/Emu/Memory/Memory.cpp @@ -17,11 +17,6 @@ MemoryBase Memory; -void MemoryBase::InvalidAddress(const char* func, const u64 addr) -{ - LOG_ERROR(MEMORY, "%s(): invalid address (0x%llx)", func, addr); -} - void MemoryBase::RegisterPages(u64 addr, u32 size) { LV2_LOCK(0); @@ -31,7 +26,7 @@ void MemoryBase::RegisterPages(u64 addr, u32 size) { if (i >= sizeof(m_pages) / sizeof(m_pages[0])) { - InvalidAddress(__FUNCTION__, i * 4096); + LOG_ERROR(MEMORY, "%s(): invalid address 0x%llx", __FUNCTION__, i * 4096); break; } if (m_pages[i]) @@ -52,7 +47,7 @@ void MemoryBase::UnregisterPages(u64 addr, u32 size) { if (i >= sizeof(m_pages) / sizeof(m_pages[0])) { - InvalidAddress(__FUNCTION__, i * 4096); + LOG_ERROR(MEMORY, "%s(): invalid address 0x%llx", __FUNCTION__, i * 4096); break; } if (!m_pages[i]) diff --git a/rpcs3/Emu/Memory/Memory.h b/rpcs3/Emu/Memory/Memory.h index 5ba0e1dd7b..3f9a981041 100644 --- a/rpcs3/Emu/Memory/Memory.h +++ b/rpcs3/Emu/Memory/Memory.h @@ -77,8 +77,6 @@ public: return vm::g_base_addr; } - __noinline void InvalidAddress(const char* func, const u64 addr); - void RegisterPages(u64 addr, u32 size); void UnregisterPages(u64 addr, u32 size); diff --git a/rpcs3/Emu/Memory/vm.cpp b/rpcs3/Emu/Memory/vm.cpp index 25a4d8c0e7..2c23ecdb66 100644 --- a/rpcs3/Emu/Memory/vm.cpp +++ b/rpcs3/Emu/Memory/vm.cpp @@ -66,6 +66,11 @@ namespace vm return 0; } + void error(const u64 addr, const char* func) + { + throw fmt::format("%s(): invalid address 0x%llx", func, addr); + } + namespace ps3 { u32 main_alloc(u32 size) diff --git a/rpcs3/Emu/Memory/vm.h b/rpcs3/Emu/Memory/vm.h index 38735da8ba..7cc958c3ba 100644 --- a/rpcs3/Emu/Memory/vm.h +++ b/rpcs3/Emu/Memory/vm.h @@ -42,6 +42,8 @@ namespace vm u32 get_addr(const void* real_pointer); + __noinline void error(const u64 addr, const char* func); + template struct cast_ptr { @@ -70,7 +72,7 @@ namespace vm const u32 res = static_cast(addr); if (res != addr) { - throw fmt::format("%s(): invalid address 0x%llx", func, addr); + vm::error(addr, func); } return res; diff --git a/rpcs3/Emu/SysCalls/Modules/cellSysutil.h b/rpcs3/Emu/SysCalls/Modules/cellSysutil.h index 7554b95bf1..1e919b12f9 100644 --- a/rpcs3/Emu/SysCalls/Modules/cellSysutil.h +++ b/rpcs3/Emu/SysCalls/Modules/cellSysutil.h @@ -251,8 +251,8 @@ typedef void(CellWebBrowserUsrdata)(vm::ptr usrdata); struct CellWebBrowserMimeSet { - vm::bptr const type; - vm::bptr const directory; + const vm::bptr type; + const vm::bptr directory; }; struct CellWebBrowserPos diff --git a/rpcs3/Loader/ELF32.cpp b/rpcs3/Loader/ELF32.cpp index 80cac220ad..6a4884798b 100644 --- a/rpcs3/Loader/ELF32.cpp +++ b/rpcs3/Loader/ELF32.cpp @@ -1,4 +1,5 @@ #include "stdafx.h" +#include "Ini.h" #include "Utilities/Log.h" #include "Utilities/rFile.h" #include "Emu/FS/vfsStream.h" @@ -102,6 +103,9 @@ namespace loader u32 code_start = 0; u32 code_end = 0; + u32 vnid_addr = 0; + std::unordered_map vnid_list; + for (auto& shdr : m_shdrs) { // get secton name @@ -165,15 +169,19 @@ namespace loader for (u32 j = 0; j < shdr.data_le.sh_size / 4; j++) { - u32 nid = fnid[j]; - u32 addr = fstub[j]; + const u32 nid = fnid[j]; + const u32 addr = fstub[j]; if (auto func = get_psv_func_by_nid(nid)) { if (func->module) + { func->module->Notice("Imported function %s (nid=0x%08x, addr=0x%x)", func->name, nid, addr); + } else + { LOG_NOTICE(LOADER, "Imported function %s (nid=0x%08x, addr=0x%x)", func->name, nid, addr); + } // writing Thumb code (temporarily, because it should be ARM) vm::psv::write16(addr + 0, 0xf870); // HACK instruction (Thumb) @@ -183,7 +191,7 @@ namespace loader } else { - LOG_ERROR(LOADER, "Unimplemented function 0x%08x (addr=0x%x)", nid, addr); + LOG_ERROR(LOADER, "Unknown function 0x%08x (addr=0x%x)", nid, addr); vm::psv::write16(addr + 0, 0xf870); // HACK instruction (Thumb) vm::psv::write16(addr + 2, 0); // index 0 (unimplemented stub) @@ -193,6 +201,44 @@ namespace loader code_end = std::min(addr, code_end); } } + else if (!strcmp(name.c_str(), ".sceVNID.rodata")) + { + LOG_NOTICE(LOADER, ".sceVNID.rodata analysis..."); + + vnid_addr = shdr.data_le.sh_addr; + } + else if (!strcmp(name.c_str(), ".sceVStub.rodata")) + { + LOG_NOTICE(LOADER, ".sceVStub.rodata analysis..."); + + if (!vnid_addr) + { + if (shdr.data_le.sh_size) + { + LOG_ERROR(LOADER, ".sceVNID.rodata address not found, unable to process imports"); + } + continue; + } + + auto vnid = vm::psv::ptr::make(vnid_addr); + auto vstub = vm::psv::ptr::make(shdr.data_le.sh_addr); + + for (u32 j = 0; j < shdr.data_le.sh_size / 4; j++) + { + const u32 nid = vnid[j]; + const u32 addr = vstub[j]; + + LOG_ERROR(LOADER, "Unknown object 0x%08x (ref_addr=0x%x)", nid, addr); + + // TODO: find imported object (vtable, typeinfo or something), assign it to vnid_list[addr] + } + } + else if (!strcmp(name.c_str(), ".tbss")) + { + LOG_NOTICE(LOADER, ".tbss analysis"); + + LOG_ERROR(LOADER, "TLS: size=0x%08x", shdr.data_le.sh_size); + } else if (!strcmp(name.c_str(), ".sceRefs.rodata")) { LOG_NOTICE(LOADER, ".sceRefs.rodata analysis..."); @@ -203,39 +249,71 @@ namespace loader { switch (*code) { - case 0x000000ff: + case 0x000000ff: // save address for future use { - // save address for future use data = *++code; break; } - case 0x0000002f: + case 0x0000002f: // movw r*,# instruction is replaced { - // movw r12,# instruction will be replaced const u32 addr = *++code; - vm::psv::write16(addr + 0, 0xf240 | (data & 0x800) >> 1 | (data & 0xf000) >> 12); // MOVW - vm::psv::write16(addr + 2, 0x0c00 | (data & 0x700) << 4 | (data & 0xff)); - //LOG_NOTICE(LOADER, "sceRefs: movw written at 0x%x (data=0x%x)", addr, data); + + if (!data) + { + auto found = vnid_list.find(code.addr()); + if (found != vnid_list.end()) + { + data = found->second; + } + } + + if (!data) + { + LOG_ERROR(LOADER, ".sceRefs: movw writing failed (code=0x%x, addr=0x%x)", code, addr); + break; + } + + vm::psv::write16(addr + 0, vm::psv::read16(addr + 0) | (data & 0x800) >> 1 | (data & 0xf000) >> 12); + vm::psv::write16(addr + 2, vm::psv::read16(addr + 2) | (data & 0x700) << 4 | (data & 0xff)); + + //if (Ini.HLELogging.GetValue()) + { + LOG_NOTICE(LOADER, ".sceRefs: movw written at 0x%x (data=0x%x)", addr, data); + } break; } - case 0x00000030: + case 0x00000030: // movt r*,# instruction is replaced { - // movt r12,# instruction will be replaced const u32 addr = *++code; - vm::psv::write16(addr + 0, 0xf2c0 | (data & 0x8000000) >> 17 | (data & 0xf0000000) >> 28); // MOVT - vm::psv::write16(addr + 2, 0x0c00 | (data & 0x7000000) >> 12 | (data & 0xff0000) >> 16); - //LOG_NOTICE(LOADER, "sceRefs: movt written at 0x%x (data=0x%x)", addr, data); + + if (!data) + { + LOG_ERROR(LOADER, ".sceRefs: movt writing failed (code=0x%x, addr=0x%x)", code, addr); + break; + } + + vm::psv::write16(addr + 0, vm::psv::read16(addr + 0) | (data & 0x8000000) >> 17 | (data & 0xf0000000) >> 28); + vm::psv::write16(addr + 2, vm::psv::read16(addr + 2) | (data & 0x7000000) >> 12 | (data & 0xff0000) >> 16); + + //if (Ini.HLELogging.GetValue()) + { + LOG_NOTICE(LOADER, ".sceRefs: movt written at 0x%x (data=0x%x)", addr, data); + } break; } case 0x00000000: { - // probably, no operation - //LOG_NOTICE(LOADER, "sceRefs: zero code"); + data = 0; + + if (Ini.HLELogging.GetValue()) + { + LOG_NOTICE(LOADER, ".sceRefs: zero code found"); + } break; } default: { - LOG_ERROR(LOADER, "sceRefs: unknown code found (0x%08x)", *code); + LOG_ERROR(LOADER, "Unknown code in .sceRefs section (0x%08x)", *code); } } } diff --git a/rpcs3/Loader/ELF64.cpp b/rpcs3/Loader/ELF64.cpp index b5d9850335..c71e8cb5f7 100644 --- a/rpcs3/Loader/ELF64.cpp +++ b/rpcs3/Loader/ELF64.cpp @@ -423,6 +423,7 @@ namespace loader case 0x00000007: //TLS Emu.SetTLSData(phdr.p_vaddr.addr(), phdr.p_filesz.value(), phdr.p_memsz.value()); + LOG_ERROR(LOADER, "TLS: addr=0x%x, filesz=0x%x, memsz=0x%x", Emu.GetTLSAddr(), Emu.GetTLSFilesz(), Emu.GetTLSMemsz()); break; case 0x60000001: //LOOS+1 diff --git a/rpcs3/emucore.vcxproj b/rpcs3/emucore.vcxproj index 9b3c761dde..ca94bcbcc5 100644 --- a/rpcs3/emucore.vcxproj +++ b/rpcs3/emucore.vcxproj @@ -58,16 +58,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/rpcs3/emucore.vcxproj.filters b/rpcs3/emucore.vcxproj.filters index 9b46ecec23..ba692d9a05 100644 --- a/rpcs3/emucore.vcxproj.filters +++ b/rpcs3/emucore.vcxproj.filters @@ -695,6 +695,156 @@ 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 + + + Emu\CPU\ARMv7\Modules + From 6c40dc0631e83ce819eef6c3305b9221fd8ffae6 Mon Sep 17 00:00:00 2001 From: Nekotekina Date: Thu, 29 Jan 2015 20:42:51 +0300 Subject: [PATCH 02/11] Some functions added --- rpcs3/Emu/ARMv7/Modules/sceAppMgr.cpp | 36 +++++- rpcs3/Emu/ARMv7/Modules/sceAppUtil.cpp | 158 ++++++++++++++++++++++-- rpcs3/Emu/ARMv7/Modules/sceAudio.cpp | 57 +++++++-- rpcs3/Emu/ARMv7/Modules/sceAudioIn.cpp | 22 +++- rpcs3/Emu/ARMv7/Modules/sceAudiodec.cpp | 130 +++++++++++++++++-- rpcs3/Emu/ARMv7/Modules/sceAudioenc.cpp | 114 +++++++++++++++-- 6 files changed, 474 insertions(+), 43 deletions(-) diff --git a/rpcs3/Emu/ARMv7/Modules/sceAppMgr.cpp b/rpcs3/Emu/ARMv7/Modules/sceAppMgr.cpp index 0d9aa8a072..5b39017a62 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceAppMgr.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceAppMgr.cpp @@ -4,6 +4,34 @@ extern psv_log_base sceAppMgr; +struct SceAppMgrEvent +{ + s32 event; + s32 appId; + char param[56]; +}; + +s32 sceAppMgrReceiveEventNum(vm::psv::ptr eventNum) +{ + throw __FUNCTION__; +} + +s32 sceAppMgrReceiveEvent(vm::psv::ptr appEvent) +{ + throw __FUNCTION__; +} + +s32 sceAppMgrAcquireBgmPort() +{ + throw __FUNCTION__; +} + +s32 sceAppMgrReleaseBgmPort() +{ + throw __FUNCTION__; +} + + #define REG_FUNC(nid, name) reg_psv_func(nid, &sceAppMgr, #name, name) psv_log_base sceAppMgr("SceAppMgr", []() @@ -12,9 +40,9 @@ psv_log_base sceAppMgr("SceAppMgr", []() sceAppMgr.on_unload = nullptr; sceAppMgr.on_stop = nullptr; - //REG_FUNC(0x47E5DD7D, sceAppMgrReceiveEventNum); - //REG_FUNC(0xCFAD5A3A, sceAppMgrReceiveEvent); - //REG_FUNC(0xF3D65520, sceAppMgrAcquireBgmPort); - //REG_FUNC(0x96CBE713, sceAppMgrReleaseBgmPort); + REG_FUNC(0x47E5DD7D, sceAppMgrReceiveEventNum); + REG_FUNC(0xCFAD5A3A, sceAppMgrReceiveEvent); + REG_FUNC(0xF3D65520, sceAppMgrAcquireBgmPort); + REG_FUNC(0x96CBE713, sceAppMgrReleaseBgmPort); //REG_FUNC(0x49255C91, sceAppMgrGetRunStatus); }); diff --git a/rpcs3/Emu/ARMv7/Modules/sceAppUtil.cpp b/rpcs3/Emu/ARMv7/Modules/sceAppUtil.cpp index 567f6c4f3e..6d1739d789 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceAppUtil.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceAppUtil.cpp @@ -4,6 +4,138 @@ extern psv_log_base sceAppUtil; +struct SceAppUtilInitParam +{ + u32 workBufSize; + char reserved[60]; +}; + +struct SceAppUtilBootParam +{ + u32 attr; + u32 appVersion; + char reserved[32]; +}; + +struct SceAppUtilSaveDataMountPoint +{ + char data[16]; +}; + +struct SceAppUtilSaveDataSlotParam +{ + u32 status; + char title[64]; + char subTitle[128]; + char detail[512]; + char iconPath[64]; + s32 userParam; + u32 sizeKB; + SceDateTime modifiedTime; + char reserved[48]; +}; + +struct SceAppUtilSaveDataSlotEmptyParam +{ + vm::psv::ptr title; + vm::psv::ptr iconPath; + vm::psv::ptr iconBuf; + u32 iconBufSize; + char reserved[32]; +}; + +struct SceAppUtilSaveDataSlot +{ + u32 id; + u32 status; + s32 userParam; + vm::psv::ptr emptyParam; +}; + +struct SceAppUtilSaveDataFile +{ + vm::psv::ptr filePath; + vm::psv::ptr buf; + u32 bufSize; + s64 offset; + u32 mode; + u32 progDelta; + char reserved[32]; +}; + +struct SceAppUtilSaveDataFileSlot +{ + u32 id; + vm::psv::ptr slotParam; + char reserved[32]; +}; + +s32 sceAppUtilInit(vm::psv::ptr initParam, vm::psv::ptr bootParam) +{ + throw __FUNCTION__; +} + +s32 sceAppUtilShutdown() +{ + throw __FUNCTION__; +} + +s32 sceAppUtilSaveDataSlotCreate(u32 slotId, vm::psv::ptr param, vm::psv::ptr mountPoint) +{ + throw __FUNCTION__; +} + +s32 sceAppUtilSaveDataSlotDelete(u32 slotId, vm::psv::ptr mountPoint) +{ + throw __FUNCTION__; +} + +s32 sceAppUtilSaveDataSlotSetParam(u32 slotId, vm::psv::ptr param, vm::psv::ptr mountPoint) +{ + throw __FUNCTION__; +} + +s32 sceAppUtilSaveDataSlotGetParam(u32 slotId, vm::psv::ptr param, vm::psv::ptr mountPoint) +{ + throw __FUNCTION__; +} + +s32 sceAppUtilSaveDataFileSave(vm::psv::ptr slot, vm::psv::ptr files, u32 fileNum, vm::psv::ptr mountPoint, vm::psv::ptr requiredSizeKB) +{ + throw __FUNCTION__; +} + +s32 sceAppUtilPhotoMount() +{ + throw __FUNCTION__; +} + +s32 sceAppUtilPhotoUmount() +{ + throw __FUNCTION__; +} + +s32 sceAppUtilSystemParamGetInt(u32 paramId, vm::psv::ptr value) +{ + throw __FUNCTION__; +} + +s32 sceAppUtilSystemParamGetString(u32 paramId, vm::psv::ptr buf, u32 bufSize) +{ + throw __FUNCTION__; +} + +s32 sceAppUtilSaveSafeMemory(vm::psv::ptr buf, u32 bufSize, s64 offset) +{ + throw __FUNCTION__; +} + +s32 sceAppUtilLoadSafeMemory(vm::psv::ptr buf, u32 bufSize, s64 offset) +{ + throw __FUNCTION__; +} + + #define REG_FUNC(nid, name) reg_psv_func(nid, &sceAppUtil, #name, name) psv_log_base sceAppUtil("SceAppUtil", []() @@ -12,17 +144,17 @@ psv_log_base sceAppUtil("SceAppUtil", []() sceAppUtil.on_unload = nullptr; sceAppUtil.on_stop = nullptr; - //REG_FUNC(0xDAFFE671, sceAppUtilInit); - //REG_FUNC(0xB220B00B, sceAppUtilShutdown); - //REG_FUNC(0x7E8FE96A, sceAppUtilSaveDataSlotCreate); - //REG_FUNC(0x266A7646, sceAppUtilSaveDataSlotDelete); - //REG_FUNC(0x98630136, sceAppUtilSaveDataSlotSetParam); - //REG_FUNC(0x93F0D89F, sceAppUtilSaveDataSlotGetParam); - //REG_FUNC(0x1E2A6158, sceAppUtilSaveDataFileSave); - //REG_FUNC(0xEE85804D, sceAppUtilPhotoMount); - //REG_FUNC(0x9651B941, sceAppUtilPhotoUmount); - //REG_FUNC(0x5DFB9CA0, sceAppUtilSystemParamGetInt); - //REG_FUNC(0x6E6AA267, sceAppUtilSystemParamGetString); - //REG_FUNC(0x9D8AC677, sceAppUtilSaveSafeMemory); - //REG_FUNC(0x3424D772, sceAppUtilLoadSafeMemory); + REG_FUNC(0xDAFFE671, sceAppUtilInit); + REG_FUNC(0xB220B00B, sceAppUtilShutdown); + REG_FUNC(0x7E8FE96A, sceAppUtilSaveDataSlotCreate); + REG_FUNC(0x266A7646, sceAppUtilSaveDataSlotDelete); + REG_FUNC(0x98630136, sceAppUtilSaveDataSlotSetParam); + REG_FUNC(0x93F0D89F, sceAppUtilSaveDataSlotGetParam); + REG_FUNC(0x1E2A6158, sceAppUtilSaveDataFileSave); + REG_FUNC(0xEE85804D, sceAppUtilPhotoMount); + REG_FUNC(0x9651B941, sceAppUtilPhotoUmount); + REG_FUNC(0x5DFB9CA0, sceAppUtilSystemParamGetInt); + REG_FUNC(0x6E6AA267, sceAppUtilSystemParamGetString); + REG_FUNC(0x9D8AC677, sceAppUtilSaveSafeMemory); + REG_FUNC(0x3424D772, sceAppUtilLoadSafeMemory); }); diff --git a/rpcs3/Emu/ARMv7/Modules/sceAudio.cpp b/rpcs3/Emu/ARMv7/Modules/sceAudio.cpp index 36920a8e59..ad0ab8d9af 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceAudio.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceAudio.cpp @@ -4,6 +4,47 @@ extern psv_log_base sceAudio; +s32 sceAudioOutOpenPort(s32 portType, s32 len, s32 freq, s32 param) +{ + throw __FUNCTION__; +} + +s32 sceAudioOutReleasePort(s32 port) +{ + throw __FUNCTION__; +} + +s32 sceAudioOutOutput(s32 port, vm::psv::ptr ptr) +{ + throw __FUNCTION__; +} + +s32 sceAudioOutSetVolume(s32 port, s32 flag, vm::psv::ptr vol) +{ + throw __FUNCTION__; +} + +s32 sceAudioOutSetConfig(s32 port, s32 len, s32 freq, s32 param) +{ + throw __FUNCTION__; +} + +s32 sceAudioOutGetConfig(s32 port, s32 configType) +{ + throw __FUNCTION__; +} + +s32 sceAudioOutGetRestSample(s32 port) +{ + throw __FUNCTION__; +} + +s32 sceAudioOutGetAdopt(s32 portType) +{ + throw __FUNCTION__; +} + + #define REG_FUNC(nid, name) reg_psv_func(nid, &sceAudio, #name, name) psv_log_base sceAudio("SceAudio", []() @@ -12,13 +53,13 @@ psv_log_base sceAudio("SceAudio", []() sceAudio.on_unload = nullptr; sceAudio.on_stop = nullptr; - //REG_FUNC(0x5BC341E4, sceAudioOutOpenPort); - //REG_FUNC(0x69E2E6B5, sceAudioOutReleasePort); - //REG_FUNC(0x02DB3F5F, sceAudioOutOutput); - //REG_FUNC(0x64167F11, sceAudioOutSetVolume); - //REG_FUNC(0xB8BA0D07, sceAudioOutSetConfig); - //REG_FUNC(0x9C8EDAEA, sceAudioOutGetConfig); - //REG_FUNC(0x9A5370C4, sceAudioOutGetRestSample); - //REG_FUNC(0x12FB1767, sceAudioOutGetAdopt); + REG_FUNC(0x5BC341E4, sceAudioOutOpenPort); + REG_FUNC(0x69E2E6B5, sceAudioOutReleasePort); + REG_FUNC(0x02DB3F5F, sceAudioOutOutput); + REG_FUNC(0x64167F11, sceAudioOutSetVolume); + REG_FUNC(0xB8BA0D07, sceAudioOutSetConfig); + REG_FUNC(0x9C8EDAEA, sceAudioOutGetConfig); + REG_FUNC(0x9A5370C4, sceAudioOutGetRestSample); + REG_FUNC(0x12FB1767, sceAudioOutGetAdopt); //REG_FUNC(0xC6D8D775, sceAudioInRaw); }); diff --git a/rpcs3/Emu/ARMv7/Modules/sceAudioIn.cpp b/rpcs3/Emu/ARMv7/Modules/sceAudioIn.cpp index 0ae64a168d..29c7378b33 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceAudioIn.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceAudioIn.cpp @@ -4,6 +4,22 @@ extern psv_log_base sceAudioIn; +s32 sceAudioInOpenPort(s32 portType, s32 grain, s32 freq, s32 param) +{ + throw __FUNCTION__; +} + +s32 sceAudioInReleasePort(s32 port) +{ + throw __FUNCTION__; +} + +s32 sceAudioInInput(s32 port, vm::psv::ptr destPtr) +{ + throw __FUNCTION__; +} + + #define REG_FUNC(nid, name) reg_psv_func(nid, &sceAudioIn, #name, name) psv_log_base sceAudioIn("SceAudioIn", []() @@ -12,8 +28,8 @@ psv_log_base sceAudioIn("SceAudioIn", []() sceAudioIn.on_unload = nullptr; sceAudioIn.on_stop = nullptr; - //REG_FUNC(0x638ADD2D, sceAudioInInput); - //REG_FUNC(0x39B50DC1, sceAudioInOpenPort); - //REG_FUNC(0x3A61B8C4, sceAudioInReleasePort); + REG_FUNC(0x638ADD2D, sceAudioInInput); + REG_FUNC(0x39B50DC1, sceAudioInOpenPort); + REG_FUNC(0x3A61B8C4, sceAudioInReleasePort); //REG_FUNC(0x566AC433, sceAudioInGetAdopt); }); diff --git a/rpcs3/Emu/ARMv7/Modules/sceAudiodec.cpp b/rpcs3/Emu/ARMv7/Modules/sceAudiodec.cpp index f8e3952dec..bf0d1a6bf9 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceAudiodec.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceAudiodec.cpp @@ -4,6 +4,122 @@ extern psv_log_base sceAudiodec; +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) +{ + throw __FUNCTION__; +} + +s32 sceAudiodecTermLibrary(u32 codecType) +{ + throw __FUNCTION__; +} + +s32 sceAudiodecCreateDecoder(vm::psv::ptr pCtrl, u32 codecType) +{ + throw __FUNCTION__; +} + +s32 sceAudiodecDeleteDecoder(vm::psv::ptr pCtrl) +{ + throw __FUNCTION__; +} + +s32 sceAudiodecDecode(vm::psv::ptr pCtrl) +{ + throw __FUNCTION__; +} + +s32 sceAudiodecClearContext(vm::psv::ptr pCtrl) +{ + throw __FUNCTION__; +} + +s32 sceAudiodecGetInternalError(vm::psv::ptr pCtrl, vm::psv::ptr pInternalError) +{ + throw __FUNCTION__; +} + + #define REG_FUNC(nid, name) reg_psv_func(nid, &sceAudiodec, #name, name) psv_log_base sceAudiodec("SceAudiodec", []() @@ -12,11 +128,11 @@ psv_log_base sceAudiodec("SceAudiodec", []() sceAudiodec.on_unload = nullptr; sceAudiodec.on_stop = nullptr; - //REG_FUNC(0x445C2CEF, sceAudiodecInitLibrary); - //REG_FUNC(0x45719B9D, sceAudiodecTermLibrary); - //REG_FUNC(0x4DFD3AAA, sceAudiodecCreateDecoder); - //REG_FUNC(0xE7A24E16, sceAudiodecDeleteDecoder); - //REG_FUNC(0xCCDABA04, sceAudiodecDecode); - //REG_FUNC(0xF72F9B64, sceAudiodecClearContext); - //REG_FUNC(0x883B0CF5, sceAudiodecGetInternalError); + REG_FUNC(0x445C2CEF, sceAudiodecInitLibrary); + REG_FUNC(0x45719B9D, sceAudiodecTermLibrary); + REG_FUNC(0x4DFD3AAA, sceAudiodecCreateDecoder); + REG_FUNC(0xE7A24E16, sceAudiodecDeleteDecoder); + REG_FUNC(0xCCDABA04, sceAudiodecDecode); + REG_FUNC(0xF72F9B64, sceAudiodecClearContext); + REG_FUNC(0x883B0CF5, sceAudiodecGetInternalError); }); diff --git a/rpcs3/Emu/ARMv7/Modules/sceAudioenc.cpp b/rpcs3/Emu/ARMv7/Modules/sceAudioenc.cpp index a3bf58617c..d507170248 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceAudioenc.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceAudioenc.cpp @@ -4,6 +4,104 @@ extern psv_log_base sceAudioenc; +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) +{ + throw __FUNCTION__; +} + +s32 sceAudioencTermLibrary(u32 codecType) +{ + throw __FUNCTION__; +} + +s32 sceAudioencCreateEncoder(vm::psv::ptr pCtrl, u32 codecType) +{ + throw __FUNCTION__; +} + +s32 sceAudioencDeleteEncoder(vm::psv::ptr pCtrl) +{ + throw __FUNCTION__; +} + +s32 sceAudioencEncode(vm::psv::ptr pCtrl) +{ + throw __FUNCTION__; +} + +s32 sceAudioencClearContext(vm::psv::ptr pCtrl) +{ + throw __FUNCTION__; +} + +s32 sceAudioencGetOptInfo(vm::psv::ptr pCtrl) +{ + throw __FUNCTION__; +} + +s32 sceAudioencGetInternalError(vm::psv::ptr pCtrl, vm::psv::ptr pInternalError) +{ + throw __FUNCTION__; +} + + #define REG_FUNC(nid, name) reg_psv_func(nid, &sceAudioenc, #name, name) psv_log_base sceAudioenc("SceAudioenc", []() @@ -12,12 +110,12 @@ psv_log_base sceAudioenc("SceAudioenc", []() sceAudioenc.on_unload = nullptr; sceAudioenc.on_stop = nullptr; - //REG_FUNC(0x76EE4DC6, sceAudioencInitLibrary); - //REG_FUNC(0xAB32D022, sceAudioencTermLibrary); - //REG_FUNC(0x64C04AE8, sceAudioencCreateEncoder); - //REG_FUNC(0xC6BA5EE6, sceAudioencDeleteEncoder); - //REG_FUNC(0xD85DB29C, sceAudioencEncode); - //REG_FUNC(0x9386F42D, sceAudioencClearContext); - //REG_FUNC(0xD01C63A3, sceAudioencGetOptInfo); - //REG_FUNC(0x452246D0, sceAudioencGetInternalError); + REG_FUNC(0x76EE4DC6, sceAudioencInitLibrary); + REG_FUNC(0xAB32D022, sceAudioencTermLibrary); + REG_FUNC(0x64C04AE8, sceAudioencCreateEncoder); + REG_FUNC(0xC6BA5EE6, sceAudioencDeleteEncoder); + REG_FUNC(0xD85DB29C, sceAudioencEncode); + REG_FUNC(0x9386F42D, sceAudioencClearContext); + REG_FUNC(0xD01C63A3, sceAudioencGetOptInfo); + REG_FUNC(0x452246D0, sceAudioencGetInternalError); }); From 74b6d5c2eda6255ce346debb3cdedd54aa65287b Mon Sep 17 00:00:00 2001 From: Nekotekina Date: Fri, 30 Jan 2015 00:42:53 +0300 Subject: [PATCH 03/11] Some functions added --- rpcs3/Emu/ARMv7/Modules/sceAppUtil.cpp | 68 +- rpcs3/Emu/ARMv7/Modules/sceAppUtil.h | 69 ++ rpcs3/Emu/ARMv7/Modules/sceCamera.cpp | 325 +++++- rpcs3/Emu/ARMv7/Modules/sceCodecEngine.cpp | 35 +- rpcs3/Emu/ARMv7/Modules/sceCommonDialog.cpp | 581 +++++++++- rpcs3/Emu/ARMv7/Modules/sceDbg.cpp | 35 +- rpcs3/Emu/ARMv7/Modules/sceDeci4p.cpp | 2 +- rpcs3/Emu/ARMv7/Modules/sceDeflt.cpp | 90 +- rpcs3/Emu/ARMv7/Modules/sceFiber.cpp | 89 +- rpcs3/Emu/ARMv7/Modules/sceFios.cpp | 1054 ++++++++++++++++--- rpcs3/Emu/ARMv7/Modules/sceIme.cpp | 38 +- rpcs3/Emu/ARMv7/Modules/sceIme.h | 70 ++ rpcs3/Loader/ELF32.cpp | 34 +- rpcs3/emucore.vcxproj | 2 + rpcs3/emucore.vcxproj.filters | 6 + 15 files changed, 2167 insertions(+), 331 deletions(-) create mode 100644 rpcs3/Emu/ARMv7/Modules/sceAppUtil.h create mode 100644 rpcs3/Emu/ARMv7/Modules/sceIme.h diff --git a/rpcs3/Emu/ARMv7/Modules/sceAppUtil.cpp b/rpcs3/Emu/ARMv7/Modules/sceAppUtil.cpp index 6d1739d789..815efa0461 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceAppUtil.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceAppUtil.cpp @@ -2,73 +2,7 @@ #include "Emu/System.h" #include "Emu/ARMv7/PSVFuncList.h" -extern psv_log_base sceAppUtil; - -struct SceAppUtilInitParam -{ - u32 workBufSize; - char reserved[60]; -}; - -struct SceAppUtilBootParam -{ - u32 attr; - u32 appVersion; - char reserved[32]; -}; - -struct SceAppUtilSaveDataMountPoint -{ - char data[16]; -}; - -struct SceAppUtilSaveDataSlotParam -{ - u32 status; - char title[64]; - char subTitle[128]; - char detail[512]; - char iconPath[64]; - s32 userParam; - u32 sizeKB; - SceDateTime modifiedTime; - char reserved[48]; -}; - -struct SceAppUtilSaveDataSlotEmptyParam -{ - vm::psv::ptr title; - vm::psv::ptr iconPath; - vm::psv::ptr iconBuf; - u32 iconBufSize; - char reserved[32]; -}; - -struct SceAppUtilSaveDataSlot -{ - u32 id; - u32 status; - s32 userParam; - vm::psv::ptr emptyParam; -}; - -struct SceAppUtilSaveDataFile -{ - vm::psv::ptr filePath; - vm::psv::ptr buf; - u32 bufSize; - s64 offset; - u32 mode; - u32 progDelta; - char reserved[32]; -}; - -struct SceAppUtilSaveDataFileSlot -{ - u32 id; - vm::psv::ptr slotParam; - char reserved[32]; -}; +#include "sceAppUtil.h" s32 sceAppUtilInit(vm::psv::ptr initParam, vm::psv::ptr bootParam) { diff --git a/rpcs3/Emu/ARMv7/Modules/sceAppUtil.h b/rpcs3/Emu/ARMv7/Modules/sceAppUtil.h new file mode 100644 index 0000000000..2e489cab22 --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/sceAppUtil.h @@ -0,0 +1,69 @@ +#pragma once + +struct SceAppUtilInitParam +{ + u32 workBufSize; + char reserved[60]; +}; + +struct SceAppUtilBootParam +{ + u32 attr; + u32 appVersion; + char reserved[32]; +}; + +struct SceAppUtilSaveDataMountPoint +{ + char data[16]; +}; + +struct SceAppUtilSaveDataSlotParam +{ + u32 status; + char title[64]; + char subTitle[128]; + char detail[512]; + char iconPath[64]; + s32 userParam; + u32 sizeKB; + SceDateTime modifiedTime; + char reserved[48]; +}; + +struct SceAppUtilSaveDataSlotEmptyParam +{ + vm::psv::ptr title; + vm::psv::ptr iconPath; + vm::psv::ptr iconBuf; + u32 iconBufSize; + char reserved[32]; +}; + +struct SceAppUtilSaveDataSlot +{ + u32 id; + u32 status; + s32 userParam; + vm::psv::ptr emptyParam; +}; + +struct SceAppUtilSaveDataFile +{ + vm::psv::ptr filePath; + vm::psv::ptr buf; + u32 bufSize; + s64 offset; + u32 mode; + u32 progDelta; + char reserved[32]; +}; + +struct SceAppUtilSaveDataFileSlot +{ + u32 id; + vm::psv::ptr slotParam; + char reserved[32]; +}; + +extern psv_log_base sceAppUtil; diff --git a/rpcs3/Emu/ARMv7/Modules/sceCamera.cpp b/rpcs3/Emu/ARMv7/Modules/sceCamera.cpp index 79c219443c..e341d6d75f 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceCamera.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceCamera.cpp @@ -4,6 +4,249 @@ extern psv_log_base sceCamera; +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) +{ + throw __FUNCTION__; +} + +s32 sceCameraClose(s32 devnum) +{ + throw __FUNCTION__; +} + +s32 sceCameraStart(s32 devnum) +{ + throw __FUNCTION__; +} + +s32 sceCameraStop(s32 devnum) +{ + throw __FUNCTION__; +} + +s32 sceCameraRead(s32 devnum, vm::psv::ptr pRead) +{ + throw __FUNCTION__; +} + +s32 sceCameraIsActive(s32 devnum) +{ + throw __FUNCTION__; +} + +s32 sceCameraGetSaturation(s32 devnum, vm::psv::ptr pLevel) +{ + throw __FUNCTION__; +} + +s32 sceCameraSetSaturation(s32 devnum, s32 level) +{ + throw __FUNCTION__; +} + +s32 sceCameraGetBrightness(s32 devnum, vm::psv::ptr pLevel) +{ + throw __FUNCTION__; +} + +s32 sceCameraSetBrightness(s32 devnum, s32 level) +{ + throw __FUNCTION__; +} + +s32 sceCameraGetContrast(s32 devnum, vm::psv::ptr pLevel) +{ + throw __FUNCTION__; +} + +s32 sceCameraSetContrast(s32 devnum, s32 level) +{ + throw __FUNCTION__; +} + +s32 sceCameraGetSharpness(s32 devnum, vm::psv::ptr pLevel) +{ + throw __FUNCTION__; +} + +s32 sceCameraSetSharpness(s32 devnum, s32 level) +{ + throw __FUNCTION__; +} + +s32 sceCameraGetReverse(s32 devnum, vm::psv::ptr pMode) +{ + throw __FUNCTION__; +} + +s32 sceCameraSetReverse(s32 devnum, s32 mode) +{ + throw __FUNCTION__; +} + +s32 sceCameraGetEffect(s32 devnum, vm::psv::ptr pMode) +{ + throw __FUNCTION__; +} + +s32 sceCameraSetEffect(s32 devnum, s32 mode) +{ + throw __FUNCTION__; +} + +s32 sceCameraGetEV(s32 devnum, vm::psv::ptr pLevel) +{ + throw __FUNCTION__; +} + +s32 sceCameraSetEV(s32 devnum, s32 level) +{ + throw __FUNCTION__; +} + +s32 sceCameraGetZoom(s32 devnum, vm::psv::ptr pLevel) +{ + throw __FUNCTION__; +} + +s32 sceCameraSetZoom(s32 devnum, s32 level) +{ + throw __FUNCTION__; +} + +s32 sceCameraGetAntiFlicker(s32 devnum, vm::psv::ptr pMode) +{ + throw __FUNCTION__; +} + +s32 sceCameraSetAntiFlicker(s32 devnum, s32 mode) +{ + throw __FUNCTION__; +} + +s32 sceCameraGetISO(s32 devnum, vm::psv::ptr pMode) +{ + throw __FUNCTION__; +} + +s32 sceCameraSetISO(s32 devnum, s32 mode) +{ + throw __FUNCTION__; +} + +s32 sceCameraGetGain(s32 devnum, vm::psv::ptr pMode) +{ + throw __FUNCTION__; +} + +s32 sceCameraSetGain(s32 devnum, s32 mode) +{ + throw __FUNCTION__; +} + +s32 sceCameraGetWhiteBalance(s32 devnum, vm::psv::ptr pMode) +{ + throw __FUNCTION__; +} + +s32 sceCameraSetWhiteBalance(s32 devnum, s32 mode) +{ + throw __FUNCTION__; +} + +s32 sceCameraGetBacklight(s32 devnum, vm::psv::ptr pMode) +{ + throw __FUNCTION__; +} + +s32 sceCameraSetBacklight(s32 devnum, s32 mode) +{ + throw __FUNCTION__; +} + +s32 sceCameraGetNightmode(s32 devnum, vm::psv::ptr pMode) +{ + throw __FUNCTION__; +} + +s32 sceCameraSetNightmode(s32 devnum, s32 mode) +{ + throw __FUNCTION__; +} + +s32 sceCameraLedSwitch(s32 devnum, s32 iSwitch) +{ + throw __FUNCTION__; +} + +s32 sceCameraLedBlink(s32 devnum, s32 iOnCount, s32 iOffCount, s32 iBlinkCount) +{ + throw __FUNCTION__; +} + +s32 sceCameraGetNoiseReductionForDebug(s32 devnum, vm::psv::ptr pLevel) +{ + throw __FUNCTION__; +} + +s32 sceCameraSetNoiseReductionForDebug(s32 devnum, s32 level) +{ + throw __FUNCTION__; +} + +s32 sceCameraGetSharpnessOffForDebug(s32 devnum, vm::psv::ptr pLevel) +{ + throw __FUNCTION__; +} + +s32 sceCameraSetSharpnessOffForDebug(s32 devnum, s32 level) +{ + throw __FUNCTION__; +} + +void sceCameraUseCacheMemoryForTrial(s32 isCache) +{ + throw __FUNCTION__; +} + + #define REG_FUNC(nid, name) reg_psv_func(nid, &sceCamera, #name, name) psv_log_base sceCamera("SceCamera", []() @@ -12,45 +255,45 @@ psv_log_base sceCamera("SceCamera", []() sceCamera.on_unload = nullptr; sceCamera.on_stop = nullptr; - //REG_FUNC(0xA462F801, sceCameraOpen); - //REG_FUNC(0xCD6E1CFC, sceCameraClose); - //REG_FUNC(0xA8FEAE35, sceCameraStart); - //REG_FUNC(0x1DD9C9CE, sceCameraStop); - //REG_FUNC(0x79B5C2DE, sceCameraRead); - //REG_FUNC(0x103A75B8, sceCameraIsActive); - //REG_FUNC(0x624F7653, sceCameraGetSaturation); - //REG_FUNC(0xF9F7CA3D, sceCameraSetSaturation); - //REG_FUNC(0x85D5951D, sceCameraGetBrightness); - //REG_FUNC(0x98D71588, sceCameraSetBrightness); - //REG_FUNC(0x8FBE84BE, sceCameraGetContrast); - //REG_FUNC(0x06FB2900, sceCameraSetContrast); - //REG_FUNC(0xAA72C3DC, sceCameraGetSharpness); - //REG_FUNC(0xD1A5BB0B, sceCameraSetSharpness); - //REG_FUNC(0x44F6043F, sceCameraGetReverse); - //REG_FUNC(0x1175F477, sceCameraSetReverse); - //REG_FUNC(0x7E8EF3B2, sceCameraGetEffect); - //REG_FUNC(0xE9D2CFB1, sceCameraSetEffect); - //REG_FUNC(0x8B5E6147, sceCameraGetEV); - //REG_FUNC(0x62AFF0B8, sceCameraSetEV); - //REG_FUNC(0x06D3816C, sceCameraGetZoom); - //REG_FUNC(0xF7464216, sceCameraSetZoom); - //REG_FUNC(0x9FDACB99, sceCameraGetAntiFlicker); - //REG_FUNC(0xE312958A, sceCameraSetAntiFlicker); - //REG_FUNC(0x4EBD5C68, sceCameraGetISO); - //REG_FUNC(0x3CF630A1, sceCameraSetISO); - //REG_FUNC(0x2C36D6F3, sceCameraGetGain); - //REG_FUNC(0xE65CFE86, sceCameraSetGain); - //REG_FUNC(0xDBFFA1DA, sceCameraGetWhiteBalance); - //REG_FUNC(0x4D4514AC, sceCameraSetWhiteBalance); - //REG_FUNC(0x8DD1292B, sceCameraGetBacklight); - //REG_FUNC(0xAE071044, sceCameraSetBacklight); - //REG_FUNC(0x12B6FF26, sceCameraGetNightmode); - //REG_FUNC(0x3F26233E, sceCameraSetNightmode); - //REG_FUNC(0xD02CFA5C, sceCameraLedSwitch); - //REG_FUNC(0x89B16030, sceCameraLedBlink); - //REG_FUNC(0x7670474C, sceCameraUseCacheMemoryForTrial); - //REG_FUNC(0x27BB0528, sceCameraGetNoiseReductionForDebug); - //REG_FUNC(0x233C9E27, sceCameraSetNoiseReductionForDebug); - //REG_FUNC(0xC387F4DC, sceCameraGetSharpnessOffForDebug); - //REG_FUNC(0xE22C2375, sceCameraSetSharpnessOffForDebug); + REG_FUNC(0xA462F801, sceCameraOpen); + REG_FUNC(0xCD6E1CFC, sceCameraClose); + REG_FUNC(0xA8FEAE35, sceCameraStart); + REG_FUNC(0x1DD9C9CE, sceCameraStop); + REG_FUNC(0x79B5C2DE, sceCameraRead); + REG_FUNC(0x103A75B8, sceCameraIsActive); + REG_FUNC(0x624F7653, sceCameraGetSaturation); + REG_FUNC(0xF9F7CA3D, sceCameraSetSaturation); + REG_FUNC(0x85D5951D, sceCameraGetBrightness); + REG_FUNC(0x98D71588, sceCameraSetBrightness); + REG_FUNC(0x8FBE84BE, sceCameraGetContrast); + REG_FUNC(0x06FB2900, sceCameraSetContrast); + REG_FUNC(0xAA72C3DC, sceCameraGetSharpness); + REG_FUNC(0xD1A5BB0B, sceCameraSetSharpness); + REG_FUNC(0x44F6043F, sceCameraGetReverse); + REG_FUNC(0x1175F477, sceCameraSetReverse); + REG_FUNC(0x7E8EF3B2, sceCameraGetEffect); + REG_FUNC(0xE9D2CFB1, sceCameraSetEffect); + REG_FUNC(0x8B5E6147, sceCameraGetEV); + REG_FUNC(0x62AFF0B8, sceCameraSetEV); + REG_FUNC(0x06D3816C, sceCameraGetZoom); + REG_FUNC(0xF7464216, sceCameraSetZoom); + REG_FUNC(0x9FDACB99, sceCameraGetAntiFlicker); + REG_FUNC(0xE312958A, sceCameraSetAntiFlicker); + REG_FUNC(0x4EBD5C68, sceCameraGetISO); + REG_FUNC(0x3CF630A1, sceCameraSetISO); + REG_FUNC(0x2C36D6F3, sceCameraGetGain); + REG_FUNC(0xE65CFE86, sceCameraSetGain); + REG_FUNC(0xDBFFA1DA, sceCameraGetWhiteBalance); + REG_FUNC(0x4D4514AC, sceCameraSetWhiteBalance); + REG_FUNC(0x8DD1292B, sceCameraGetBacklight); + REG_FUNC(0xAE071044, sceCameraSetBacklight); + REG_FUNC(0x12B6FF26, sceCameraGetNightmode); + REG_FUNC(0x3F26233E, sceCameraSetNightmode); + REG_FUNC(0xD02CFA5C, sceCameraLedSwitch); + REG_FUNC(0x89B16030, sceCameraLedBlink); + REG_FUNC(0x7670474C, sceCameraUseCacheMemoryForTrial); + REG_FUNC(0x27BB0528, sceCameraGetNoiseReductionForDebug); + REG_FUNC(0x233C9E27, sceCameraSetNoiseReductionForDebug); + REG_FUNC(0xC387F4DC, sceCameraGetSharpnessOffForDebug); + REG_FUNC(0xE22C2375, sceCameraSetSharpnessOffForDebug); }); diff --git a/rpcs3/Emu/ARMv7/Modules/sceCodecEngine.cpp b/rpcs3/Emu/ARMv7/Modules/sceCodecEngine.cpp index 013f4ff52b..cda018a995 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceCodecEngine.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceCodecEngine.cpp @@ -4,6 +4,33 @@ extern psv_log_base sceCodecEngine; +struct SceCodecEnginePmonProcessorLoad +{ + u32 size; + u32 average; +}; + +s32 sceCodecEnginePmonStart() +{ + throw __FUNCTION__; +} + +s32 sceCodecEnginePmonStop() +{ + throw __FUNCTION__; +} + +s32 sceCodecEnginePmonGetProcessorLoad(vm::psv::ptr pProcessorLoad) +{ + throw __FUNCTION__; +} + +s32 sceCodecEnginePmonReset() +{ + throw __FUNCTION__; +} + + #define REG_FUNC(nid, name) reg_psv_func(nid, &sceCodecEngine, #name, name) psv_log_base sceCodecEngine("SceCodecEngine", []() @@ -12,8 +39,8 @@ psv_log_base sceCodecEngine("SceCodecEngine", []() sceCodecEngine.on_unload = nullptr; sceCodecEngine.on_stop = nullptr; - //REG_FUNC(0x3E718890, sceCodecEnginePmonStart); - //REG_FUNC(0x268B1EF5, sceCodecEnginePmonStop); - //REG_FUNC(0x859E4A68, sceCodecEnginePmonGetProcessorLoad); - //REG_FUNC(0xA097E4C8, sceCodecEnginePmonReset); + REG_FUNC(0x3E718890, sceCodecEnginePmonStart); + REG_FUNC(0x268B1EF5, sceCodecEnginePmonStop); + REG_FUNC(0x859E4A68, sceCodecEnginePmonGetProcessorLoad); + REG_FUNC(0xA097E4C8, sceCodecEnginePmonReset); }); diff --git a/rpcs3/Emu/ARMv7/Modules/sceCommonDialog.cpp b/rpcs3/Emu/ARMv7/Modules/sceCommonDialog.cpp index 1f5a4863a3..3e7b998f63 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceCommonDialog.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceCommonDialog.cpp @@ -2,8 +2,509 @@ #include "Emu/System.h" #include "Emu/ARMv7/PSVFuncList.h" +#include "sceGxm.h" +#include "sceAppUtil.h" +#include "sceIme.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) +{ + throw __FUNCTION__; +} + +s32 sceMsgDialogInit(vm::psv::ptr param) +{ + throw __FUNCTION__; +} + +SceCommonDialogStatus sceMsgDialogGetStatus() +{ + throw __FUNCTION__; +} + +s32 sceMsgDialogAbort() +{ + throw __FUNCTION__; +} + +s32 sceMsgDialogGetResult(vm::psv::ptr result) +{ + throw __FUNCTION__; +} + +s32 sceMsgDialogTerm() +{ + throw __FUNCTION__; +} + +s32 sceMsgDialogClose() +{ + throw __FUNCTION__; +} + +s32 sceMsgDialogProgressBarInc(s32 target, u32 delta) +{ + throw __FUNCTION__; +} + +s32 sceMsgDialogProgressBarSetValue(s32 target, u32 rate) +{ + throw __FUNCTION__; +} + +s32 sceNetCheckDialogInit(vm::psv::ptr param) +{ + throw __FUNCTION__; +} + +SceCommonDialogStatus sceNetCheckDialogGetStatus() +{ + throw __FUNCTION__; +} + +s32 sceNetCheckDialogAbort() +{ + throw __FUNCTION__; +} + +s32 sceNetCheckDialogGetResult(vm::psv::ptr result) +{ + throw __FUNCTION__; +} + +s32 sceNetCheckDialogTerm() +{ + throw __FUNCTION__; +} + +s32 sceSaveDataDialogInit(vm::psv::ptr param) +{ + throw __FUNCTION__; +} + +SceCommonDialogStatus sceSaveDataDialogGetStatus() +{ + throw __FUNCTION__; +} + +s32 sceSaveDataDialogAbort() +{ + throw __FUNCTION__; +} + +s32 sceSaveDataDialogGetResult(vm::psv::ptr result) +{ + throw __FUNCTION__; +} + +s32 sceSaveDataDialogTerm() +{ + throw __FUNCTION__; +} + +SceCommonDialogStatus sceSaveDataDialogGetSubStatus() +{ + throw __FUNCTION__; +} + +s32 sceSaveDataDialogSubClose() +{ + throw __FUNCTION__; +} + +s32 sceSaveDataDialogContinue(vm::psv::ptr param) +{ + throw __FUNCTION__; +} + +s32 sceSaveDataDialogFinish(vm::psv::ptr param) +{ + throw __FUNCTION__; +} + +s32 sceSaveDataDialogProgressBarInc(s32 target, u32 delta) +{ + throw __FUNCTION__; +} + +s32 sceSaveDataDialogProgressBarSetValue(s32 target, u32 rate) +{ + throw __FUNCTION__; +} + +s32 sceImeDialogInit(vm::psv::ptr param) +{ + throw __FUNCTION__; +} + +SceCommonDialogStatus sceImeDialogGetStatus() +{ + throw __FUNCTION__; +} + +s32 sceImeDialogAbort() +{ + throw __FUNCTION__; +} + +s32 sceImeDialogGetResult(vm::psv::ptr result) +{ + throw __FUNCTION__; +} + +s32 sceImeDialogTerm() +{ + throw __FUNCTION__; +} + +s32 scePhotoImportDialogInit(vm::psv::ptr param) +{ + throw __FUNCTION__; +} + +SceCommonDialogStatus scePhotoImportDialogGetStatus() +{ + throw __FUNCTION__; +} + +s32 scePhotoImportDialogGetResult(vm::psv::ptr result) +{ + throw __FUNCTION__; +} + +s32 scePhotoImportDialogTerm() +{ + throw __FUNCTION__; +} + +s32 scePhotoImportDialogAbort() +{ + throw __FUNCTION__; +} + +s32 scePhotoReviewDialogInit(vm::psv::ptr param) +{ + throw __FUNCTION__; +} + +SceCommonDialogStatus scePhotoReviewDialogGetStatus() +{ + throw __FUNCTION__; +} + +s32 scePhotoReviewDialogGetResult(vm::psv::ptr result) +{ + throw __FUNCTION__; +} + +s32 scePhotoReviewDialogTerm() +{ + throw __FUNCTION__; +} + +s32 scePhotoReviewDialogAbort() +{ + throw __FUNCTION__; +} + + #define REG_FUNC(nid, name) reg_psv_func(nid, &sceCommonDialog, #name, name) psv_log_base sceCommonDialog("SceCommonDialog", []() @@ -12,44 +513,44 @@ psv_log_base sceCommonDialog("SceCommonDialog", []() sceCommonDialog.on_unload = nullptr; sceCommonDialog.on_stop = nullptr; - //REG_FUNC(0x90530F2F, sceCommonDialogUpdate); - //REG_FUNC(0x755FF270, sceMsgDialogInit); - //REG_FUNC(0x4107019E, sceMsgDialogGetStatus); - //REG_FUNC(0xC296D396, sceMsgDialogClose); - //REG_FUNC(0x0CC66115, sceMsgDialogAbort); - //REG_FUNC(0xBB3BFC89, sceMsgDialogGetResult); - //REG_FUNC(0x81ACF695, sceMsgDialogTerm); - //REG_FUNC(0x7BE0E08B, sceMsgDialogProgressBarInc); - //REG_FUNC(0x9CDA5E0D, sceMsgDialogProgressBarSetValue); - //REG_FUNC(0xA38A4A0D, sceNetCheckDialogInit); - //REG_FUNC(0x8027292A, sceNetCheckDialogGetStatus); - //REG_FUNC(0x2D8EDF09, sceNetCheckDialogAbort); - //REG_FUNC(0xB05FCE9E, sceNetCheckDialogGetResult); - //REG_FUNC(0x8BE51C15, sceNetCheckDialogTerm); - //REG_FUNC(0xBF5248FA, sceSaveDataDialogInit); - //REG_FUNC(0x6E258046, sceSaveDataDialogGetStatus); - //REG_FUNC(0x013E7F74, sceSaveDataDialogAbort); - //REG_FUNC(0xB2FF576E, sceSaveDataDialogGetResult); - //REG_FUNC(0x2192A10A, sceSaveDataDialogTerm); - //REG_FUNC(0x19192C8B, sceSaveDataDialogContinue); - //REG_FUNC(0xBA0542CA, sceSaveDataDialogGetSubStatus); - //REG_FUNC(0x415D6068, sceSaveDataDialogSubClose); - //REG_FUNC(0x6C49924B, sceSaveDataDialogFinish); - //REG_FUNC(0xBDE00A83, sceSaveDataDialogProgressBarInc); - //REG_FUNC(0x5C322D1E, sceSaveDataDialogProgressBarSetValue); - //REG_FUNC(0x1E7043BF, sceImeDialogInit); - //REG_FUNC(0xCF0431FD, sceImeDialogGetStatus); - //REG_FUNC(0x594A220E, sceImeDialogAbort); - //REG_FUNC(0x2EB3D046, sceImeDialogGetResult); - //REG_FUNC(0x838A3AF4, sceImeDialogTerm); - //REG_FUNC(0x73EE7C9C, scePhotoImportDialogInit); - //REG_FUNC(0x032206D8, scePhotoImportDialogGetStatus); - //REG_FUNC(0xD855414C, scePhotoImportDialogGetResult); - //REG_FUNC(0x7FE5BD77, scePhotoImportDialogTerm); - //REG_FUNC(0x4B125581, scePhotoImportDialogAbort); - //REG_FUNC(0xCD990375, scePhotoReviewDialogInit); - //REG_FUNC(0xF4F600CA, scePhotoReviewDialogGetStatus); - //REG_FUNC(0xFFA35858, scePhotoReviewDialogGetResult); - //REG_FUNC(0xC700B2DF, scePhotoReviewDialogTerm); - //REG_FUNC(0x74FF2A8B, scePhotoReviewDialogAbort); + REG_FUNC(0x90530F2F, sceCommonDialogUpdate); + REG_FUNC(0x755FF270, sceMsgDialogInit); + REG_FUNC(0x4107019E, sceMsgDialogGetStatus); + REG_FUNC(0xC296D396, sceMsgDialogClose); + REG_FUNC(0x0CC66115, sceMsgDialogAbort); + REG_FUNC(0xBB3BFC89, sceMsgDialogGetResult); + REG_FUNC(0x81ACF695, sceMsgDialogTerm); + REG_FUNC(0x7BE0E08B, sceMsgDialogProgressBarInc); + REG_FUNC(0x9CDA5E0D, sceMsgDialogProgressBarSetValue); + REG_FUNC(0xA38A4A0D, sceNetCheckDialogInit); + REG_FUNC(0x8027292A, sceNetCheckDialogGetStatus); + REG_FUNC(0x2D8EDF09, sceNetCheckDialogAbort); + REG_FUNC(0xB05FCE9E, sceNetCheckDialogGetResult); + REG_FUNC(0x8BE51C15, sceNetCheckDialogTerm); + REG_FUNC(0xBF5248FA, sceSaveDataDialogInit); + REG_FUNC(0x6E258046, sceSaveDataDialogGetStatus); + REG_FUNC(0x013E7F74, sceSaveDataDialogAbort); + REG_FUNC(0xB2FF576E, sceSaveDataDialogGetResult); + REG_FUNC(0x2192A10A, sceSaveDataDialogTerm); + REG_FUNC(0x19192C8B, sceSaveDataDialogContinue); + REG_FUNC(0xBA0542CA, sceSaveDataDialogGetSubStatus); + REG_FUNC(0x415D6068, sceSaveDataDialogSubClose); + REG_FUNC(0x6C49924B, sceSaveDataDialogFinish); + REG_FUNC(0xBDE00A83, sceSaveDataDialogProgressBarInc); + REG_FUNC(0x5C322D1E, sceSaveDataDialogProgressBarSetValue); + REG_FUNC(0x1E7043BF, sceImeDialogInit); + REG_FUNC(0xCF0431FD, sceImeDialogGetStatus); + REG_FUNC(0x594A220E, sceImeDialogAbort); + REG_FUNC(0x2EB3D046, sceImeDialogGetResult); + REG_FUNC(0x838A3AF4, sceImeDialogTerm); + REG_FUNC(0x73EE7C9C, scePhotoImportDialogInit); + REG_FUNC(0x032206D8, scePhotoImportDialogGetStatus); + REG_FUNC(0xD855414C, scePhotoImportDialogGetResult); + REG_FUNC(0x7FE5BD77, scePhotoImportDialogTerm); + REG_FUNC(0x4B125581, scePhotoImportDialogAbort); + REG_FUNC(0xCD990375, scePhotoReviewDialogInit); + REG_FUNC(0xF4F600CA, scePhotoReviewDialogGetStatus); + REG_FUNC(0xFFA35858, scePhotoReviewDialogGetResult); + REG_FUNC(0xC700B2DF, scePhotoReviewDialogTerm); + REG_FUNC(0x74FF2A8B, scePhotoReviewDialogAbort); }); diff --git a/rpcs3/Emu/ARMv7/Modules/sceDbg.cpp b/rpcs3/Emu/ARMv7/Modules/sceDbg.cpp index 6fe3856b9c..6a2cc4c9a2 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceDbg.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceDbg.cpp @@ -4,6 +4,33 @@ extern psv_log_base sceDbg; +enum SceDbgBreakOnErrorState : s32 +{ + SCE_DBG_DISABLE_BREAK_ON_ERROR = 0, + SCE_DBG_ENABLE_BREAK_ON_ERROR +}; + +s32 sceDbgSetMinimumLogLevel(s32 minimumLogLevel) +{ + throw __FUNCTION__; +} + +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... +{ + throw __FUNCTION__; +} + +s32 sceDbgLoggingHandler(vm::psv::ptr pFile, s32 line, s32 severity, vm::psv::ptr pComponent, vm::psv::ptr pMessage) // va_args... +{ + throw __FUNCTION__; +} + + #define REG_FUNC(nid, name) reg_psv_func(nid, &sceDbg, #name, name) psv_log_base sceDbg("SceDbg", []() @@ -12,8 +39,8 @@ psv_log_base sceDbg("SceDbg", []() sceDbg.on_unload = nullptr; sceDbg.on_stop = nullptr; - //REG_FUNC(0x941622FA, sceDbgSetMinimumLogLevel); - //REG_FUNC(0x1AF3678B, sceDbgAssertionHandler); - //REG_FUNC(0x6605AB19, sceDbgLoggingHandler); - //REG_FUNC(0xED4A00BA, sceDbgSetBreakOnErrorState); + REG_FUNC(0x941622FA, sceDbgSetMinimumLogLevel); + REG_FUNC(0x1AF3678B, sceDbgAssertionHandler); + REG_FUNC(0x6605AB19, sceDbgLoggingHandler); + REG_FUNC(0xED4A00BA, sceDbgSetBreakOnErrorState); }); diff --git a/rpcs3/Emu/ARMv7/Modules/sceDeci4p.cpp b/rpcs3/Emu/ARMv7/Modules/sceDeci4p.cpp index d90fcca74f..f0cf7e3c8e 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceDeci4p.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceDeci4p.cpp @@ -4,7 +4,7 @@ extern psv_log_base sceDeci4p; -typedef s32(*SceKernelDeci4pCallback)(s32 notifyId, s32 notifyCount, s32 notifyArg, vm::psv::ptr pCommon); +typedef vm::psv::ptr pCommon)> SceKernelDeci4pCallback; s32 sceKernelDeci4pOpen(vm::psv::ptr protoname, u32 protonum, u32 bufsize) { diff --git a/rpcs3/Emu/ARMv7/Modules/sceDeflt.cpp b/rpcs3/Emu/ARMv7/Modules/sceDeflt.cpp index 6d7e440c2f..8e31b95c72 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceDeflt.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceDeflt.cpp @@ -4,6 +4,72 @@ extern psv_log_base sceDeflt; +s32 sceGzipIsValid(vm::psv::ptr pSrcGzip) +{ + throw __FUNCTION__; +} + +s32 sceGzipGetInfo(vm::psv::ptr pSrcGzip, vm::psv::ptr> ppvExtra, vm::psv::ptr> ppszName, vm::psv::ptr> ppszComment, vm::psv::ptr pusCrc, vm::psv::ptr> ppvData) +{ + throw __FUNCTION__; +} + +vm::psv::ptr sceGzipGetName(vm::psv::ptr pSrcGzip) +{ + throw __FUNCTION__; +} + +vm::psv::ptr sceGzipGetComment(vm::psv::ptr pSrcGzip) +{ + throw __FUNCTION__; +} + +vm::psv::ptr sceGzipGetCompressedData(vm::psv::ptr pSrcGzip) +{ + throw __FUNCTION__; +} + +s32 sceGzipDecompress(vm::psv::ptr pDst, u32 uiBufSize, vm::psv::ptr pSrcGzip, vm::psv::ptr puiCrc32) +{ + throw __FUNCTION__; +} + +s32 sceZlibIsValid(vm::psv::ptr pSrcZlib) +{ + throw __FUNCTION__; +} + +s32 sceZlibGetInfo(vm::psv::ptr pSrcZlib, vm::psv::ptr pbCmf, vm::psv::ptr pbFlg, vm::psv::ptr puiDictId, vm::psv::ptr> ppvData) +{ + throw __FUNCTION__; +} + +vm::psv::ptr sceZlibGetCompressedData(vm::psv::ptr pSrcZlib) +{ + throw __FUNCTION__; +} + +s32 sceZlibDecompress(vm::psv::ptr pDst, u32 uiBufSize, vm::psv::ptr pSrcZlib, vm::psv::ptr puiAdler32) +{ + throw __FUNCTION__; +} + +u32 sceZlibAdler32(u32 uiAdler, vm::psv::ptr pSrc, u32 uiSize) +{ + throw __FUNCTION__; +} + +s32 sceDeflateDecompress(vm::psv::ptr pDst, u32 uiBufSize, vm::psv::ptr pSrcDeflate, vm::psv::ptr> ppNext) +{ + throw __FUNCTION__; +} + +s32 sceZipGetInfo(vm::psv::ptr pSrc, vm::psv::ptr> ppvExtra, vm::psv::ptr puiCrc, vm::psv::ptr> ppvData) +{ + throw __FUNCTION__; +} + + #define REG_FUNC(nid, name) reg_psv_func(nid, &sceDeflt, #name, name) psv_log_base sceDeflt("SceDeflt", []() @@ -12,16 +78,16 @@ psv_log_base sceDeflt("SceDeflt", []() sceDeflt.on_unload = nullptr; sceDeflt.on_stop = nullptr; - //REG_FUNC(0xCD83A464, sceZlibAdler32); - //REG_FUNC(0x110D5050, sceDeflateDecompress); - //REG_FUNC(0xE3CB51A3, sceGzipDecompress); - //REG_FUNC(0xBABCF5CF, sceGzipGetComment); - //REG_FUNC(0xE1844802, sceGzipGetCompressedData); - //REG_FUNC(0x1B8E5862, sceGzipGetInfo); - //REG_FUNC(0xAEBAABE6, sceGzipGetName); - //REG_FUNC(0xDEDADC31, sceGzipIsValid); - //REG_FUNC(0xE38F754D, sceZlibDecompress); - //REG_FUNC(0xE680A65A, sceZlibGetCompressedData); - //REG_FUNC(0x4C0A685D, sceZlibGetInfo); - //REG_FUNC(0x14A0698D, sceZlibIsValid); + REG_FUNC(0xCD83A464, sceZlibAdler32); + REG_FUNC(0x110D5050, sceDeflateDecompress); + REG_FUNC(0xE3CB51A3, sceGzipDecompress); + REG_FUNC(0xBABCF5CF, sceGzipGetComment); + REG_FUNC(0xE1844802, sceGzipGetCompressedData); + REG_FUNC(0x1B8E5862, sceGzipGetInfo); + REG_FUNC(0xAEBAABE6, sceGzipGetName); + REG_FUNC(0xDEDADC31, sceGzipIsValid); + REG_FUNC(0xE38F754D, sceZlibDecompress); + REG_FUNC(0xE680A65A, sceZlibGetCompressedData); + REG_FUNC(0x4C0A685D, sceZlibGetInfo); + REG_FUNC(0x14A0698D, sceZlibIsValid); }); diff --git a/rpcs3/Emu/ARMv7/Modules/sceFiber.cpp b/rpcs3/Emu/ARMv7/Modules/sceFiber.cpp index 73678a396c..8d21dc8f66 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceFiber.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceFiber.cpp @@ -4,6 +4,79 @@ extern psv_log_base sceFiber; +typedef vm::psv::ptr SceFiberEntry; + +union SceFiber +{ + static const uint size = 128; + static const uint align = 8; + u64 padding[size / sizeof(u64)]; +}; + +union SceFiberOptParam +{ + static const uint size = 128; + static const uint align = 8; + u64 padding[size / sizeof(u64)]; +}; + +union SceFiberInfo +{ + static const uint size = 128; + static const uint align = 8; + 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) +{ + throw __FUNCTION__; +} + +s32 sceFiberOptParamInitialize(vm::psv::ptr optParam) +{ + throw __FUNCTION__; +} + +s32 sceFiberFinalize(vm::psv::ptr fiber) +{ + throw __FUNCTION__; +} + +s32 sceFiberRun(vm::psv::ptr fiber, u32 argOnRunTo, vm::psv::ptr argOnReturn) +{ + throw __FUNCTION__; +} + +s32 sceFiberSwitch(vm::psv::ptr fiber, u32 argOnRunTo, vm::psv::ptr argOnRun) +{ + throw __FUNCTION__; +} + +s32 sceFiberGetSelf(vm::psv::ptr> fiber) +{ + throw __FUNCTION__; +} + +s32 sceFiberReturnToThread(u32 argOnReturn, vm::psv::ptr argOnRun) +{ + throw __FUNCTION__; +} + +s32 sceFiberGetInfo(vm::psv::ptr fiber, vm::psv::ptr fiberInfo) +{ + throw __FUNCTION__; +} + + #define REG_FUNC(nid, name) reg_psv_func(nid, &sceFiber, #name, name) psv_log_base sceFiber("SceFiber", []() @@ -12,15 +85,15 @@ psv_log_base sceFiber("SceFiber", []() sceFiber.on_unload = nullptr; sceFiber.on_stop = nullptr; - //REG_FUNC(0xF24A298C, _sceFiberInitializeImpl); + REG_FUNC(0xF24A298C, _sceFiberInitializeImpl); //REG_FUNC(0xC6A3F9BB, _sceFiberInitializeWithInternalOptionImpl); //REG_FUNC(0x7D0C7DDB, _sceFiberAttachContextAndRun); //REG_FUNC(0xE00B9AFE, _sceFiberAttachContextAndSwitch); - //REG_FUNC(0x801AB334, sceFiberOptParamInitialize); - //REG_FUNC(0xE160F844, sceFiberFinalize); - //REG_FUNC(0x7DF23243, sceFiberRun); - //REG_FUNC(0xE4283144, sceFiberSwitch); - //REG_FUNC(0x414D8CA5, sceFiberGetSelf); - //REG_FUNC(0x3B42921F, sceFiberReturnToThread); - //REG_FUNC(0x189599B4, sceFiberGetInfo); + REG_FUNC(0x801AB334, sceFiberOptParamInitialize); + REG_FUNC(0xE160F844, sceFiberFinalize); + REG_FUNC(0x7DF23243, sceFiberRun); + REG_FUNC(0xE4283144, sceFiberSwitch); + REG_FUNC(0x414D8CA5, sceFiberGetSelf); + REG_FUNC(0x3B42921F, sceFiberReturnToThread); + REG_FUNC(0x189599B4, sceFiberGetInfo); }); diff --git a/rpcs3/Emu/ARMv7/Modules/sceFios.cpp b/rpcs3/Emu/ARMv7/Modules/sceFios.cpp index d04af5b3cd..d542e97549 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceFios.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceFios.cpp @@ -4,6 +4,804 @@ extern psv_log_base sceFios; +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) +{ + throw __FUNCTION__; +} + +void sceFiosTerminate() +{ + throw __FUNCTION__; +} + +bool sceFiosIsInitialized(vm::psv::ptr pOutParameters) +{ + throw __FUNCTION__; +} + +void sceFiosUpdateParameters(vm::psv::ptr pParameters) +{ + throw __FUNCTION__; +} + +void sceFiosSetGlobalDefaultOpAttr(vm::psv::ptr pAttr) +{ + throw __FUNCTION__; +} + +bool sceFiosGetGlobalDefaultOpAttr(vm::psv::ptr pOutAttr) +{ + throw __FUNCTION__; +} + +void sceFiosSetThreadDefaultOpAttr(vm::psv::ptr pAttr) +{ + throw __FUNCTION__; +} + +bool sceFiosGetThreadDefaultOpAttr(vm::psv::ptr pOutAttr) +{ + throw __FUNCTION__; +} + +void sceFiosGetDefaultOpAttr(vm::psv::ptr pOutAttr) +{ + throw __FUNCTION__; +} + +void sceFiosSuspend() +{ + throw __FUNCTION__; +} + +u32 sceFiosGetSuspendCount() +{ + throw __FUNCTION__; +} + +bool sceFiosIsSuspended() +{ + throw __FUNCTION__; +} + +void sceFiosResume() +{ + throw __FUNCTION__; +} + +void sceFiosShutdownAndCancelOps() +{ + throw __FUNCTION__; +} + +void sceFiosCancelAllOps() +{ + throw __FUNCTION__; +} + +void sceFiosCloseAllFiles() +{ + throw __FUNCTION__; +} + +bool sceFiosIsIdle() +{ + throw __FUNCTION__; +} + +u32 sceFiosGetAllFHs(vm::psv::ptr pOutArray, u32 arraySize) +{ + throw __FUNCTION__; +} + +u32 sceFiosGetAllDHs(vm::psv::ptr pOutArray, u32 arraySize) +{ + throw __FUNCTION__; +} + +u32 sceFiosGetAllOps(vm::psv::ptr pOutArray, u32 arraySize) +{ + throw __FUNCTION__; +} + +bool sceFiosIsValidHandle(SceFiosHandle h) +{ + throw __FUNCTION__; +} + +s32 sceFiosPathcmp(vm::psv::ptr pA, vm::psv::ptr pB) +{ + throw __FUNCTION__; +} + +s32 sceFiosPathncmp(vm::psv::ptr pA, vm::psv::ptr pB, u32 n) +{ + throw __FUNCTION__; +} + +s32 sceFiosPrintf(vm::psv::ptr pFormat) // va_args... +{ + throw __FUNCTION__; +} + +s32 sceFiosVprintf(vm::psv::ptr pFormat) // va_list +{ + throw __FUNCTION__; +} + +SceFiosOp sceFiosFileExists(vm::psv::ptr pAttr, vm::psv::ptr pPath, vm::psv::ptr pOutExists) +{ + throw __FUNCTION__; +} + +bool sceFiosFileExistsSync(vm::psv::ptr pAttr, vm::psv::ptr pPath) +{ + throw __FUNCTION__; +} + +SceFiosOp sceFiosFileGetSize(vm::psv::ptr pAttr, vm::psv::ptr pPath, vm::psv::ptr pOutSize) +{ + throw __FUNCTION__; +} + +SceFiosSize sceFiosFileGetSizeSync(vm::psv::ptr pAttr, vm::psv::ptr pPath) +{ + throw __FUNCTION__; +} + +SceFiosOp sceFiosFileDelete(vm::psv::ptr pAttr, vm::psv::ptr pPath) +{ + throw __FUNCTION__; +} + +s32 sceFiosFileDeleteSync(vm::psv::ptr pAttr, vm::psv::ptr pPath) +{ + throw __FUNCTION__; +} + +SceFiosOp sceFiosDirectoryExists(vm::psv::ptr pAttr, vm::psv::ptr pPath, vm::psv::ptr pOutExists) +{ + throw __FUNCTION__; +} + +bool sceFiosDirectoryExistsSync(vm::psv::ptr pAttr, vm::psv::ptr pPath) +{ + throw __FUNCTION__; +} + +SceFiosOp sceFiosDirectoryCreate(vm::psv::ptr pAttr, vm::psv::ptr pPath) +{ + throw __FUNCTION__; +} + +s32 sceFiosDirectoryCreateSync(vm::psv::ptr pAttr, vm::psv::ptr pPath) +{ + throw __FUNCTION__; +} + +SceFiosOp sceFiosDirectoryDelete(vm::psv::ptr pAttr, vm::psv::ptr pPath) +{ + throw __FUNCTION__; +} + +s32 sceFiosDirectoryDeleteSync(vm::psv::ptr pAttr, vm::psv::ptr pPath) +{ + throw __FUNCTION__; +} + +SceFiosOp sceFiosExists(vm::psv::ptr pAttr, vm::psv::ptr pPath, vm::psv::ptr pOutExists) +{ + throw __FUNCTION__; +} + +bool sceFiosExistsSync(vm::psv::ptr pAttr, vm::psv::ptr pPath) +{ + throw __FUNCTION__; +} + +SceFiosOp sceFiosStat(vm::psv::ptr pAttr, vm::psv::ptr pPath, vm::psv::ptr pOutStatus) +{ + throw __FUNCTION__; +} + +s32 sceFiosStatSync(vm::psv::ptr pAttr, vm::psv::ptr pPath, vm::psv::ptr pOutStatus) +{ + throw __FUNCTION__; +} + +SceFiosOp sceFiosDelete(vm::psv::ptr pAttr, vm::psv::ptr pPath) +{ + throw __FUNCTION__; +} + +s32 sceFiosDeleteSync(vm::psv::ptr pAttr, vm::psv::ptr pPath) +{ + throw __FUNCTION__; +} + +SceFiosOp sceFiosResolve(vm::psv::ptr pAttr, vm::psv::ptr pInTuple, vm::psv::ptr pOutTuple) +{ + throw __FUNCTION__; +} + +s32 sceFiosResolveSync(vm::psv::ptr pAttr, vm::psv::ptr pInTuple, vm::psv::ptr pOutTuple) +{ + throw __FUNCTION__; +} + +SceFiosOp sceFiosRename(vm::psv::ptr pAttr, vm::psv::ptr pOldPath, vm::psv::ptr pNewPath) +{ + throw __FUNCTION__; +} + +s32 sceFiosRenameSync(vm::psv::ptr pAttr, vm::psv::ptr pOldPath, vm::psv::ptr pNewPath) +{ + throw __FUNCTION__; +} + +SceFiosOp sceFiosFileRead(vm::psv::ptr pAttr, vm::psv::ptr pPath, vm::psv::ptr pBuf, SceFiosSize length, SceFiosOffset offset) +{ + throw __FUNCTION__; +} + +SceFiosSize sceFiosFileReadSync(vm::psv::ptr pAttr, vm::psv::ptr pPath, vm::psv::ptr pBuf, SceFiosSize length, SceFiosOffset offset) +{ + throw __FUNCTION__; +} + +SceFiosOp sceFiosFileWrite(vm::psv::ptr pAttr, vm::psv::ptr pPath, vm::psv::ptr pBuf, SceFiosSize length, SceFiosOffset offset) +{ + throw __FUNCTION__; +} + +SceFiosSize sceFiosFileWriteSync(vm::psv::ptr pAttr, vm::psv::ptr pPath, vm::psv::ptr pBuf, SceFiosSize length, SceFiosOffset offset) +{ + throw __FUNCTION__; +} + +SceFiosOp sceFiosFileTruncate(vm::psv::ptr pAttr, vm::psv::ptr pPath, SceFiosSize length) +{ + throw __FUNCTION__; +} + +s32 sceFiosFileTruncateSync(vm::psv::ptr pAttr, vm::psv::ptr pPath, SceFiosSize length) +{ + throw __FUNCTION__; +} + +SceFiosOp sceFiosFHOpen(vm::psv::ptr pAttr, vm::psv::ptr pOutFH, vm::psv::ptr pPath, vm::psv::ptr pOpenParams) +{ + throw __FUNCTION__; +} + +s32 sceFiosFHOpenSync(vm::psv::ptr pAttr, vm::psv::ptr pOutFH, vm::psv::ptr pPath, vm::psv::ptr pOpenParams) +{ + throw __FUNCTION__; +} + +SceFiosOp sceFiosFHStat(vm::psv::ptr pAttr, SceFiosFH fh, vm::psv::ptr pOutStatus) +{ + throw __FUNCTION__; +} + +s32 sceFiosFHStatSync(vm::psv::ptr pAttr, SceFiosFH fh, vm::psv::ptr pOutStatus) +{ + throw __FUNCTION__; +} + +SceFiosOp sceFiosFHTruncate(vm::psv::ptr pAttr, SceFiosFH fh, SceFiosSize length) +{ + throw __FUNCTION__; +} + +s32 sceFiosFHTruncateSync(vm::psv::ptr pAttr, SceFiosFH fh, SceFiosSize length) +{ + throw __FUNCTION__; +} + +SceFiosOp sceFiosFHSync(vm::psv::ptr pAttr, SceFiosFH fh) +{ + throw __FUNCTION__; +} + +s32 sceFiosFHSyncSync(vm::psv::ptr pAttr, SceFiosFH fh) +{ + throw __FUNCTION__; +} + +SceFiosOp sceFiosFHRead(vm::psv::ptr pAttr, SceFiosFH fh, vm::psv::ptr pBuf, SceFiosSize length) +{ + throw __FUNCTION__; +} + +SceFiosSize sceFiosFHReadSync(vm::psv::ptr pAttr, SceFiosFH fh, vm::psv::ptr pBuf, SceFiosSize length) +{ + throw __FUNCTION__; +} + +SceFiosOp sceFiosFHWrite(vm::psv::ptr pAttr, SceFiosFH fh, vm::psv::ptr pBuf, SceFiosSize length) +{ + throw __FUNCTION__; +} + +SceFiosSize sceFiosFHWriteSync(vm::psv::ptr pAttr, SceFiosFH fh, vm::psv::ptr pBuf, SceFiosSize length) +{ + throw __FUNCTION__; +} + +SceFiosOp sceFiosFHReadv(vm::psv::ptr pAttr, SceFiosFH fh, vm::psv::ptr iov, s32 iovcnt) +{ + throw __FUNCTION__; +} + +SceFiosSize sceFiosFHReadvSync(vm::psv::ptr pAttr, SceFiosFH fh, vm::psv::ptr iov, s32 iovcnt) +{ + throw __FUNCTION__; +} + +SceFiosOp sceFiosFHWritev(vm::psv::ptr pAttr, SceFiosFH fh, vm::psv::ptr iov, s32 iovcnt) +{ + throw __FUNCTION__; +} + +SceFiosSize sceFiosFHWritevSync(vm::psv::ptr pAttr, SceFiosFH fh, vm::psv::ptr iov, s32 iovcnt) +{ + throw __FUNCTION__; +} + +SceFiosOp sceFiosFHPread(vm::psv::ptr pAttr, SceFiosFH fh, vm::psv::ptr pBuf, SceFiosSize length, SceFiosOffset offset) +{ + throw __FUNCTION__; +} + +SceFiosSize sceFiosFHPreadSync(vm::psv::ptr pAttr, SceFiosFH fh, vm::psv::ptr pBuf, SceFiosSize length, SceFiosOffset offset) +{ + throw __FUNCTION__; +} + +SceFiosOp sceFiosFHPwrite(vm::psv::ptr pAttr, SceFiosFH fh, vm::psv::ptr pBuf, SceFiosSize length, SceFiosOffset offset) +{ + throw __FUNCTION__; +} + +SceFiosSize sceFiosFHPwriteSync(vm::psv::ptr pAttr, SceFiosFH fh, vm::psv::ptr pBuf, SceFiosSize length, SceFiosOffset offset) +{ + throw __FUNCTION__; +} + +SceFiosOp sceFiosFHPreadv(vm::psv::ptr pAttr, SceFiosFH fh, vm::psv::ptr iov, s32 iovcnt, SceFiosOffset offset) +{ + throw __FUNCTION__; +} + +SceFiosSize sceFiosFHPreadvSync(vm::psv::ptr pAttr, SceFiosFH fh, vm::psv::ptr iov, s32 iovcnt, SceFiosOffset offset) +{ + throw __FUNCTION__; +} + +SceFiosOp sceFiosFHPwritev(vm::psv::ptr pAttr, SceFiosFH fh, vm::psv::ptr iov, s32 iovcnt, SceFiosOffset offset) +{ + throw __FUNCTION__; +} + +SceFiosSize sceFiosFHPwritevSync(vm::psv::ptr pAttr, SceFiosFH fh, vm::psv::ptr iov, s32 iovcnt, SceFiosOffset offset) +{ + throw __FUNCTION__; +} + +SceFiosOp sceFiosFHClose(vm::psv::ptr pAttr, SceFiosFH fh) +{ + throw __FUNCTION__; +} + +s32 sceFiosFHCloseSync(vm::psv::ptr pAttr, SceFiosFH fh) +{ + throw __FUNCTION__; +} + +SceFiosOffset sceFiosFHSeek(SceFiosFH fh, SceFiosOffset offset, SceFiosWhence whence) +{ + throw __FUNCTION__; +} + +SceFiosOffset sceFiosFHTell(SceFiosFH fh) +{ + throw __FUNCTION__; +} + +vm::psv::ptr sceFiosFHGetPath(SceFiosFH fh) +{ + throw __FUNCTION__; +} + +SceFiosSize sceFiosFHGetSize(SceFiosFH fh) +{ + throw __FUNCTION__; +} + +vm::psv::ptr sceFiosFHGetOpenParams(SceFiosFH 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__; +//} + +SceFiosOp sceFiosDHRead(vm::psv::ptr pAttr, SceFiosDH dh, vm::psv::ptr pOutEntry) +{ + throw __FUNCTION__; +} + +s32 sceFiosDHReadSync(vm::psv::ptr pAttr, SceFiosDH dh, vm::psv::ptr pOutEntry) +{ + throw __FUNCTION__; +} + +SceFiosOp sceFiosDHClose(vm::psv::ptr pAttr, SceFiosDH dh) +{ + throw __FUNCTION__; +} + +s32 sceFiosDHCloseSync(vm::psv::ptr pAttr, SceFiosDH dh) +{ + throw __FUNCTION__; +} + +vm::psv::ptr sceFiosDHGetPath(SceFiosDH dh) +{ + throw __FUNCTION__; +} + +bool sceFiosOpIsDone(SceFiosOp op) +{ + throw __FUNCTION__; +} + +s32 sceFiosOpWait(SceFiosOp op) +{ + throw __FUNCTION__; +} + +s32 sceFiosOpWaitUntil(SceFiosOp op, SceFiosTime deadline) +{ + throw __FUNCTION__; +} + +void sceFiosOpDelete(SceFiosOp op) +{ + throw __FUNCTION__; +} + +s32 sceFiosOpSyncWait(SceFiosOp op) +{ + throw __FUNCTION__; +} + +SceFiosSize sceFiosOpSyncWaitForIO(SceFiosOp op) +{ + throw __FUNCTION__; +} + +s32 sceFiosOpGetError(SceFiosOp op) +{ + throw __FUNCTION__; +} + +void sceFiosOpCancel(SceFiosOp op) +{ + throw __FUNCTION__; +} + +bool sceFiosOpIsCancelled(SceFiosOp op) +{ + throw __FUNCTION__; +} + +vm::psv::ptr sceFiosOpGetAttr(SceFiosOp op) +{ + throw __FUNCTION__; +} + +vm::psv::ptr sceFiosOpGetPath(SceFiosOp op) +{ + throw __FUNCTION__; +} + +vm::psv::ptr sceFiosOpGetBuffer(SceFiosOp op) +{ + throw __FUNCTION__; +} + +SceFiosOffset sceFiosOpGetOffset(SceFiosOp op) +{ + throw __FUNCTION__; +} + +SceFiosSize sceFiosOpGetRequestCount(SceFiosOp op) +{ + throw __FUNCTION__; +} + +SceFiosSize sceFiosOpGetActualCount(SceFiosOp op) +{ + throw __FUNCTION__; +} + +void sceFiosOpReschedule(SceFiosOp op, SceFiosTime newDeadline) +{ + throw __FUNCTION__; +} + +SceFiosTime sceFiosTimeGetCurrent() +{ + throw __FUNCTION__; +} + +s64 sceFiosTimeIntervalToNanoseconds(SceFiosTimeInterval interval) +{ + throw __FUNCTION__; +} + +SceFiosTimeInterval sceFiosTimeIntervalFromNanoseconds(s64 ns) +{ + throw __FUNCTION__; +} + +SceFiosDate sceFiosDateGetCurrent() +{ + throw __FUNCTION__; +} + +SceFiosDate sceFiosDateFromComponents(const struct vm::psv::ptr pComponents) +{ + throw __FUNCTION__; +} + +struct vm::psv::ptr sceFiosDateToComponents(SceFiosDate date, struct vm::psv::ptr pOutComponents) +{ + throw __FUNCTION__; +} + +SceFiosDate sceFiosDateFromSceDateTime(vm::psv::ptr pSceDateTime) +{ + throw __FUNCTION__; +} + +vm::psv::ptr sceFiosDateToSceDateTime(SceFiosDate date, vm::psv::ptr pSceDateTime) +{ + throw __FUNCTION__; +} + +s32 sceFiosOverlayAdd(vm::psv::ptr pOverlay, vm::psv::ptr pOutID) +{ + throw __FUNCTION__; +} + +s32 sceFiosOverlayRemove(SceFiosOverlayID id) +{ + throw __FUNCTION__; +} + +s32 sceFiosOverlayGetInfo(SceFiosOverlayID id, vm::psv::ptr pOutOverlay) +{ + throw __FUNCTION__; +} + +s32 sceFiosOverlayModify(SceFiosOverlayID id, vm::psv::ptr pNewValue) +{ + throw __FUNCTION__; +} + +s32 sceFiosOverlayGetList(vm::psv::ptr pOutIDs, u32 maxIDs, vm::psv::ptr pActualIDs) +{ + throw __FUNCTION__; +} + +s32 sceFiosOverlayResolveSync(s32 resolveFlag, vm::psv::ptr pInPath, vm::psv::ptr pOutPath, u32 maxPath) +{ + throw __FUNCTION__; +} + +SceFiosOp sceFiosArchiveGetMountBufferSize(vm::psv::ptr pAttr, vm::psv::ptr pArchivePath, vm::psv::ptr pOpenParams) +{ + throw __FUNCTION__; +} + +SceFiosSize sceFiosArchiveGetMountBufferSizeSync(vm::psv::ptr pAttr, vm::psv::ptr pArchivePath, vm::psv::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__; +//} + +SceFiosOp sceFiosArchiveUnmount(vm::psv::ptr pAttr, SceFiosFH fh) +{ + throw __FUNCTION__; +} + +s32 sceFiosArchiveUnmountSync(vm::psv::ptr pAttr, SceFiosFH fh) +{ + throw __FUNCTION__; +} + +vm::psv::ptr sceFiosDebugDumpError(s32 err, vm::psv::ptr pBuffer, u32 bufferSize) +{ + throw __FUNCTION__; +} + +vm::psv::ptr sceFiosDebugDumpOp(SceFiosOp op, vm::psv::ptr pBuffer, u32 bufferSize) +{ + throw __FUNCTION__; +} + +vm::psv::ptr sceFiosDebugDumpFH(SceFiosFH fh, vm::psv::ptr pBuffer, u32 bufferSize) +{ + throw __FUNCTION__; +} + +vm::psv::ptr sceFiosDebugDumpDH(SceFiosDH dh, vm::psv::ptr pBuffer, u32 bufferSize) +{ + throw __FUNCTION__; +} + +vm::psv::ptr sceFiosDebugDumpDate(SceFiosDate date, vm::psv::ptr pBuffer, u32 bufferSize) +{ + throw __FUNCTION__; +} + +s32 sceFiosIOFilterAdd(s32 index, SceFiosIOFilterCallback pFilterCallback, vm::psv::ptr pFilterContext) +{ + throw __FUNCTION__; +} + +s32 sceFiosIOFilterGetInfo(s32 index, vm::psv::ptr pOutFilterCallback, vm::psv::ptr> pOutFilterContext) +{ + throw __FUNCTION__; +} + +s32 sceFiosIOFilterRemove(s32 index) +{ + throw __FUNCTION__; +} + +void sceFiosIOFilterPsarcDearchiver() +{ + throw __FUNCTION__; +} + #define REG_FUNC(nid, name) reg_psv_func(nid, &sceFios, #name, name) psv_log_base sceFios("SceFios2", []() @@ -12,136 +810,136 @@ psv_log_base sceFios("SceFios2", []() sceFios.on_unload = nullptr; sceFios.on_stop = nullptr; - //REG_FUNC(0x15857180, sceFiosArchiveGetMountBufferSize); - //REG_FUNC(0xDF3352FC, sceFiosArchiveGetMountBufferSizeSync); + REG_FUNC(0x15857180, sceFiosArchiveGetMountBufferSize); + REG_FUNC(0xDF3352FC, sceFiosArchiveGetMountBufferSizeSync); //REG_FUNC(0x92E76BBD, sceFiosArchiveMount); //REG_FUNC(0xC4822276, sceFiosArchiveMountSync); - //REG_FUNC(0xFE1E1D28, sceFiosArchiveUnmount); - //REG_FUNC(0xB26DC24D, sceFiosArchiveUnmountSync); - //REG_FUNC(0x1E920B1D, sceFiosCancelAllOps); - //REG_FUNC(0xF85C208B, sceFiosCloseAllFiles); - //REG_FUNC(0xF6CACFC7, sceFiosDHClose); - //REG_FUNC(0x1F3CC428, sceFiosDHCloseSync); - //REG_FUNC(0x2B406DEB, sceFiosDHGetPath); + REG_FUNC(0xFE1E1D28, sceFiosArchiveUnmount); + REG_FUNC(0xB26DC24D, sceFiosArchiveUnmountSync); + REG_FUNC(0x1E920B1D, sceFiosCancelAllOps); + REG_FUNC(0xF85C208B, sceFiosCloseAllFiles); + REG_FUNC(0xF6CACFC7, sceFiosDHClose); + REG_FUNC(0x1F3CC428, sceFiosDHCloseSync); + REG_FUNC(0x2B406DEB, sceFiosDHGetPath); //REG_FUNC(0xEA9855BA, sceFiosDHOpen); //REG_FUNC(0x34BC3713, sceFiosDHOpenSync); - //REG_FUNC(0x72A0A851, sceFiosDHRead); - //REG_FUNC(0xB7E79CAD, sceFiosDHReadSync); - //REG_FUNC(0x280D284A, sceFiosDateFromComponents); - //REG_FUNC(0x5C593C1E, sceFiosDateGetCurrent); - //REG_FUNC(0x5CFF6EA0, sceFiosDateToComponents); - //REG_FUNC(0x44B9F8EB, sceFiosDebugDumpDH); - //REG_FUNC(0x159B1FA8, sceFiosDebugDumpDate); - //REG_FUNC(0x51E677DF, sceFiosDebugDumpError); - //REG_FUNC(0x5506ACAB, sceFiosDebugDumpFH); - //REG_FUNC(0xE438D4F0, sceFiosDebugDumpOp); - //REG_FUNC(0x764DFA7A, sceFiosDelete); - //REG_FUNC(0xAAC54B44, sceFiosDeleteSync); - //REG_FUNC(0x9198ED8B, sceFiosDirectoryCreate); - //REG_FUNC(0xE037B076, sceFiosDirectoryCreateSync); - //REG_FUNC(0xDA93677C, sceFiosDirectoryDelete); - //REG_FUNC(0xB9573146, sceFiosDirectoryDeleteSync); - //REG_FUNC(0x48D50D97, sceFiosDirectoryExists); - //REG_FUNC(0x726E01BE, sceFiosDirectoryExistsSync); - //REG_FUNC(0x6F12D8A5, sceFiosExists); - //REG_FUNC(0x125EFD34, sceFiosExistsSync); - //REG_FUNC(0xA88EDCA8, sceFiosFHClose); - //REG_FUNC(0x45182328, sceFiosFHCloseSync); - //REG_FUNC(0xC55DB73B, sceFiosFHGetOpenParams); - //REG_FUNC(0x37143AE3, sceFiosFHGetPath); - //REG_FUNC(0xC5C26581, sceFiosFHGetSize); - //REG_FUNC(0xBF699BD4, sceFiosFHOpen); - //REG_FUNC(0xC3E7C3DB, sceFiosFHOpenSync); - //REG_FUNC(0x6A51E688, sceFiosFHPread); - //REG_FUNC(0xE2805059, sceFiosFHPreadSync); - //REG_FUNC(0x7C4E0C42, sceFiosFHPreadv); - //REG_FUNC(0x4D42F95C, sceFiosFHPreadvSync); - //REG_FUNC(0xCF1FAA6F, sceFiosFHPwrite); - //REG_FUNC(0x1E962F57, sceFiosFHPwriteSync); - //REG_FUNC(0xBBC9AFD5, sceFiosFHPwritev); - //REG_FUNC(0x742ADDC4, sceFiosFHPwritevSync); - //REG_FUNC(0xB09AFBDF, sceFiosFHRead); - //REG_FUNC(0x76945919, sceFiosFHReadSync); - //REG_FUNC(0x7DB0AFAF, sceFiosFHReadv); - //REG_FUNC(0x1BC977FA, sceFiosFHReadvSync); - //REG_FUNC(0xA75F3C4A, sceFiosFHSeek); - //REG_FUNC(0xD97C4DF7, sceFiosFHStat); - //REG_FUNC(0xF8BEAC88, sceFiosFHStatSync); - //REG_FUNC(0xE485F35E, sceFiosFHSync); - //REG_FUNC(0xA909CCE3, sceFiosFHSyncSync); - //REG_FUNC(0xD7F33130, sceFiosFHTell); - //REG_FUNC(0x2B39453B, sceFiosFHTruncate); - //REG_FUNC(0xFEF940B7, sceFiosFHTruncateSync); - //REG_FUNC(0xE663138E, sceFiosFHWrite); - //REG_FUNC(0x984024E5, sceFiosFHWriteSync); - //REG_FUNC(0x988DD7FF, sceFiosFHWritev); - //REG_FUNC(0x267E6CE3, sceFiosFHWritevSync); - //REG_FUNC(0xB647278B, sceFiosFileDelete); - //REG_FUNC(0xB5302E30, sceFiosFileDeleteSync); - //REG_FUNC(0x8758E62F, sceFiosFileExists); - //REG_FUNC(0x233B070C, sceFiosFileExistsSync); - //REG_FUNC(0x79D9BB50, sceFiosFileGetSize); - //REG_FUNC(0x789215C3, sceFiosFileGetSizeSync); - //REG_FUNC(0x84080161, sceFiosFileRead); - //REG_FUNC(0x1C488B32, sceFiosFileReadSync); - //REG_FUNC(0xC5513E13, sceFiosFileTruncate); - //REG_FUNC(0x6E1252B8, sceFiosFileTruncateSync); - //REG_FUNC(0x42C278E5, sceFiosFileWrite); - //REG_FUNC(0x132B6DE6, sceFiosFileWriteSync); - //REG_FUNC(0x681184A2, sceFiosGetAllDHs); - //REG_FUNC(0x90AB9195, sceFiosGetAllFHs); - //REG_FUNC(0x8F62832C, sceFiosGetAllOps); - //REG_FUNC(0xC897F6A7, sceFiosGetDefaultOpAttr); - //REG_FUNC(0x30583FCB, sceFiosGetGlobalDefaultOpAttr); - //REG_FUNC(0x156EAFDC, sceFiosGetSuspendCount); - //REG_FUNC(0xD55B8555, sceFiosIOFilterAdd); - //REG_FUNC(0x7C9B14EB, sceFiosIOFilterGetInfo); - //REG_FUNC(0x057252F2, sceFiosIOFilterPsarcDearchiver); - //REG_FUNC(0x22E35018, sceFiosIOFilterRemove); - //REG_FUNC(0x774C2C05, sceFiosInitialize); - //REG_FUNC(0x29104BF3, sceFiosIsIdle); - //REG_FUNC(0xF4F54E09, sceFiosIsInitialized); - //REG_FUNC(0xD2466EA5, sceFiosIsSuspended); - //REG_FUNC(0xB309E327, sceFiosIsValidHandle); - //REG_FUNC(0x3904F205, sceFiosOpCancel); - //REG_FUNC(0xE4EA92FA, sceFiosOpDelete); - //REG_FUNC(0x218A43EE, sceFiosOpGetActualCount); - //REG_FUNC(0xABFEE706, sceFiosOpGetAttr); - //REG_FUNC(0x68C436E4, sceFiosOpGetBuffer); - //REG_FUNC(0xBF099E16, sceFiosOpGetError); - //REG_FUNC(0xF21213B9, sceFiosOpGetOffset); - //REG_FUNC(0x157515CB, sceFiosOpGetPath); - //REG_FUNC(0x9C1084C5, sceFiosOpGetRequestCount); - //REG_FUNC(0x0C81D80E, sceFiosOpIsCancelled); - //REG_FUNC(0x1B9A575E, sceFiosOpIsDone); - //REG_FUNC(0x968CADBD, sceFiosOpReschedule); - //REG_FUNC(0xE6A66C70, sceFiosOpSyncWait); - //REG_FUNC(0x202079F9, sceFiosOpSyncWaitForIO); - //REG_FUNC(0x2AC79DFC, sceFiosOpWait); - //REG_FUNC(0xCC823B47, sceFiosOpWaitUntil); - //REG_FUNC(0x27AE468B, sceFiosOverlayAdd); - //REG_FUNC(0xF4C6B72A, sceFiosOverlayGetInfo); - //REG_FUNC(0x1C0BCAD5, sceFiosOverlayGetList); - //REG_FUNC(0x30F56704, sceFiosOverlayModify); - //REG_FUNC(0xF3C84D0F, sceFiosOverlayRemove); - //REG_FUNC(0x8A243E74, sceFiosOverlayResolveSync); - //REG_FUNC(0x5E75937A, sceFiosPathcmp); - //REG_FUNC(0xCC21C849, sceFiosPathncmp); - //REG_FUNC(0xAF7FAADF, sceFiosPrintf); - //REG_FUNC(0x25E399E5, sceFiosRename); - //REG_FUNC(0x030306F4, sceFiosRenameSync); - //REG_FUNC(0xD0B19C9F, sceFiosResolve); - //REG_FUNC(0x7FF33797, sceFiosResolveSync); - //REG_FUNC(0xBF2D3CC1, sceFiosResume); - //REG_FUNC(0x4E2FD311, sceFiosSetGlobalDefaultOpAttr); - //REG_FUNC(0x5B8D48C4, sceFiosShutdownAndCancelOps); - //REG_FUNC(0xFF04AF72, sceFiosStat); - //REG_FUNC(0xACBAF3E0, sceFiosStatSync); - //REG_FUNC(0x510953DC, sceFiosSuspend); - //REG_FUNC(0x2904B539, sceFiosTerminate); - //REG_FUNC(0xE76C8EC3, sceFiosTimeGetCurrent); - //REG_FUNC(0x35A82737, sceFiosTimeIntervalFromNanoseconds); - //REG_FUNC(0x397BF626, sceFiosTimeIntervalToNanoseconds); - //REG_FUNC(0x1915052A, sceFiosUpdateParameters); - //REG_FUNC(0x5BA4BD6D, sceFiosVprintf); + REG_FUNC(0x72A0A851, sceFiosDHRead); + REG_FUNC(0xB7E79CAD, sceFiosDHReadSync); + REG_FUNC(0x280D284A, sceFiosDateFromComponents); + REG_FUNC(0x5C593C1E, sceFiosDateGetCurrent); + REG_FUNC(0x5CFF6EA0, sceFiosDateToComponents); + REG_FUNC(0x44B9F8EB, sceFiosDebugDumpDH); + REG_FUNC(0x159B1FA8, sceFiosDebugDumpDate); + REG_FUNC(0x51E677DF, sceFiosDebugDumpError); + REG_FUNC(0x5506ACAB, sceFiosDebugDumpFH); + REG_FUNC(0xE438D4F0, sceFiosDebugDumpOp); + REG_FUNC(0x764DFA7A, sceFiosDelete); + REG_FUNC(0xAAC54B44, sceFiosDeleteSync); + REG_FUNC(0x9198ED8B, sceFiosDirectoryCreate); + REG_FUNC(0xE037B076, sceFiosDirectoryCreateSync); + REG_FUNC(0xDA93677C, sceFiosDirectoryDelete); + REG_FUNC(0xB9573146, sceFiosDirectoryDeleteSync); + REG_FUNC(0x48D50D97, sceFiosDirectoryExists); + REG_FUNC(0x726E01BE, sceFiosDirectoryExistsSync); + REG_FUNC(0x6F12D8A5, sceFiosExists); + REG_FUNC(0x125EFD34, sceFiosExistsSync); + REG_FUNC(0xA88EDCA8, sceFiosFHClose); + REG_FUNC(0x45182328, sceFiosFHCloseSync); + REG_FUNC(0xC55DB73B, sceFiosFHGetOpenParams); + REG_FUNC(0x37143AE3, sceFiosFHGetPath); + REG_FUNC(0xC5C26581, sceFiosFHGetSize); + REG_FUNC(0xBF699BD4, sceFiosFHOpen); + REG_FUNC(0xC3E7C3DB, sceFiosFHOpenSync); + REG_FUNC(0x6A51E688, sceFiosFHPread); + REG_FUNC(0xE2805059, sceFiosFHPreadSync); + REG_FUNC(0x7C4E0C42, sceFiosFHPreadv); + REG_FUNC(0x4D42F95C, sceFiosFHPreadvSync); + REG_FUNC(0xCF1FAA6F, sceFiosFHPwrite); + REG_FUNC(0x1E962F57, sceFiosFHPwriteSync); + REG_FUNC(0xBBC9AFD5, sceFiosFHPwritev); + REG_FUNC(0x742ADDC4, sceFiosFHPwritevSync); + REG_FUNC(0xB09AFBDF, sceFiosFHRead); + REG_FUNC(0x76945919, sceFiosFHReadSync); + REG_FUNC(0x7DB0AFAF, sceFiosFHReadv); + REG_FUNC(0x1BC977FA, sceFiosFHReadvSync); + REG_FUNC(0xA75F3C4A, sceFiosFHSeek); + REG_FUNC(0xD97C4DF7, sceFiosFHStat); + REG_FUNC(0xF8BEAC88, sceFiosFHStatSync); + REG_FUNC(0xE485F35E, sceFiosFHSync); + REG_FUNC(0xA909CCE3, sceFiosFHSyncSync); + REG_FUNC(0xD7F33130, sceFiosFHTell); + REG_FUNC(0x2B39453B, sceFiosFHTruncate); + REG_FUNC(0xFEF940B7, sceFiosFHTruncateSync); + REG_FUNC(0xE663138E, sceFiosFHWrite); + REG_FUNC(0x984024E5, sceFiosFHWriteSync); + REG_FUNC(0x988DD7FF, sceFiosFHWritev); + REG_FUNC(0x267E6CE3, sceFiosFHWritevSync); + REG_FUNC(0xB647278B, sceFiosFileDelete); + REG_FUNC(0xB5302E30, sceFiosFileDeleteSync); + REG_FUNC(0x8758E62F, sceFiosFileExists); + REG_FUNC(0x233B070C, sceFiosFileExistsSync); + REG_FUNC(0x79D9BB50, sceFiosFileGetSize); + REG_FUNC(0x789215C3, sceFiosFileGetSizeSync); + REG_FUNC(0x84080161, sceFiosFileRead); + REG_FUNC(0x1C488B32, sceFiosFileReadSync); + REG_FUNC(0xC5513E13, sceFiosFileTruncate); + REG_FUNC(0x6E1252B8, sceFiosFileTruncateSync); + REG_FUNC(0x42C278E5, sceFiosFileWrite); + REG_FUNC(0x132B6DE6, sceFiosFileWriteSync); + REG_FUNC(0x681184A2, sceFiosGetAllDHs); + REG_FUNC(0x90AB9195, sceFiosGetAllFHs); + REG_FUNC(0x8F62832C, sceFiosGetAllOps); + REG_FUNC(0xC897F6A7, sceFiosGetDefaultOpAttr); + REG_FUNC(0x30583FCB, sceFiosGetGlobalDefaultOpAttr); + REG_FUNC(0x156EAFDC, sceFiosGetSuspendCount); + REG_FUNC(0xD55B8555, sceFiosIOFilterAdd); + REG_FUNC(0x7C9B14EB, sceFiosIOFilterGetInfo); + REG_FUNC(0x057252F2, sceFiosIOFilterPsarcDearchiver); + REG_FUNC(0x22E35018, sceFiosIOFilterRemove); + REG_FUNC(0x774C2C05, sceFiosInitialize); + REG_FUNC(0x29104BF3, sceFiosIsIdle); + REG_FUNC(0xF4F54E09, sceFiosIsInitialized); + REG_FUNC(0xD2466EA5, sceFiosIsSuspended); + REG_FUNC(0xB309E327, sceFiosIsValidHandle); + REG_FUNC(0x3904F205, sceFiosOpCancel); + REG_FUNC(0xE4EA92FA, sceFiosOpDelete); + REG_FUNC(0x218A43EE, sceFiosOpGetActualCount); + REG_FUNC(0xABFEE706, sceFiosOpGetAttr); + REG_FUNC(0x68C436E4, sceFiosOpGetBuffer); + REG_FUNC(0xBF099E16, sceFiosOpGetError); + REG_FUNC(0xF21213B9, sceFiosOpGetOffset); + REG_FUNC(0x157515CB, sceFiosOpGetPath); + REG_FUNC(0x9C1084C5, sceFiosOpGetRequestCount); + REG_FUNC(0x0C81D80E, sceFiosOpIsCancelled); + REG_FUNC(0x1B9A575E, sceFiosOpIsDone); + REG_FUNC(0x968CADBD, sceFiosOpReschedule); + REG_FUNC(0xE6A66C70, sceFiosOpSyncWait); + REG_FUNC(0x202079F9, sceFiosOpSyncWaitForIO); + REG_FUNC(0x2AC79DFC, sceFiosOpWait); + REG_FUNC(0xCC823B47, sceFiosOpWaitUntil); + REG_FUNC(0x27AE468B, sceFiosOverlayAdd); + REG_FUNC(0xF4C6B72A, sceFiosOverlayGetInfo); + REG_FUNC(0x1C0BCAD5, sceFiosOverlayGetList); + REG_FUNC(0x30F56704, sceFiosOverlayModify); + REG_FUNC(0xF3C84D0F, sceFiosOverlayRemove); + REG_FUNC(0x8A243E74, sceFiosOverlayResolveSync); + REG_FUNC(0x5E75937A, sceFiosPathcmp); + REG_FUNC(0xCC21C849, sceFiosPathncmp); + REG_FUNC(0xAF7FAADF, sceFiosPrintf); + REG_FUNC(0x25E399E5, sceFiosRename); + REG_FUNC(0x030306F4, sceFiosRenameSync); + REG_FUNC(0xD0B19C9F, sceFiosResolve); + REG_FUNC(0x7FF33797, sceFiosResolveSync); + REG_FUNC(0xBF2D3CC1, sceFiosResume); + REG_FUNC(0x4E2FD311, sceFiosSetGlobalDefaultOpAttr); + REG_FUNC(0x5B8D48C4, sceFiosShutdownAndCancelOps); + REG_FUNC(0xFF04AF72, sceFiosStat); + REG_FUNC(0xACBAF3E0, sceFiosStatSync); + REG_FUNC(0x510953DC, sceFiosSuspend); + REG_FUNC(0x2904B539, sceFiosTerminate); + REG_FUNC(0xE76C8EC3, sceFiosTimeGetCurrent); + REG_FUNC(0x35A82737, sceFiosTimeIntervalFromNanoseconds); + REG_FUNC(0x397BF626, sceFiosTimeIntervalToNanoseconds); + REG_FUNC(0x1915052A, sceFiosUpdateParameters); + REG_FUNC(0x5BA4BD6D, sceFiosVprintf); }); diff --git a/rpcs3/Emu/ARMv7/Modules/sceIme.cpp b/rpcs3/Emu/ARMv7/Modules/sceIme.cpp index d0e90298d9..797e282ace 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceIme.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceIme.cpp @@ -2,7 +2,33 @@ #include "Emu/System.h" #include "Emu/ARMv7/PSVFuncList.h" -extern psv_log_base sceIme; +#include "sceIme.h" + +s32 sceImeOpen(vm::psv::ptr param) +{ + throw __FUNCTION__; +} + +s32 sceImeUpdate() +{ + throw __FUNCTION__; +} + +s32 sceImeSetCaret(vm::psv::ptr caret) +{ + throw __FUNCTION__; +} + +s32 sceImeSetPreeditGeometry(vm::psv::ptr preedit) +{ + throw __FUNCTION__; +} + +s32 sceImeClose() +{ + throw __FUNCTION__; +} + #define REG_FUNC(nid, name) reg_psv_func(nid, &sceIme, #name, name) @@ -12,9 +38,9 @@ psv_log_base sceIme("SceIme", []() sceIme.on_unload = nullptr; sceIme.on_stop = nullptr; - //REG_FUNC(0x0E050613, sceImeOpen); - //REG_FUNC(0x71D6898A, sceImeUpdate); - //REG_FUNC(0x889A8421, sceImeClose); - //REG_FUNC(0xD8342D2A, sceImeSetCaret); - //REG_FUNC(0x7B1EFAA5, sceImeSetPreeditGeometry); + REG_FUNC(0x0E050613, sceImeOpen); + REG_FUNC(0x71D6898A, sceImeUpdate); + REG_FUNC(0x889A8421, sceImeClose); + REG_FUNC(0xD8342D2A, sceImeSetCaret); + REG_FUNC(0x7B1EFAA5, sceImeSetPreeditGeometry); }); diff --git a/rpcs3/Emu/ARMv7/Modules/sceIme.h b/rpcs3/Emu/ARMv7/Modules/sceIme.h new file mode 100644 index 0000000000..7e7fffb429 --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/sceIme.h @@ -0,0 +1,70 @@ +#pragma once + +typedef s32(SceImeCharFilter)(u16 ch); + +struct SceImeRect +{ + u32 x; + u32 y; + u32 width; + u32 height; +}; + +struct SceImeEditText +{ + u32 preeditIndex; + u32 preeditLength; + u32 caretIndex; + vm::psv::ptr str; +}; + +union SceImeEventParam +{ + SceImeRect rect; + SceImeEditText text; + u32 caretIndex; +}; + +struct SceImeEvent +{ + u32 id; + SceImeEventParam param; +}; + +struct SceImeCaret +{ + u32 x; + u32 y; + u32 height; + u32 index; +}; + +struct SceImePreeditGeometry +{ + u32 x; + u32 y; + u32 height; +}; + +typedef void(SceImeEventHandler)(vm::psv::ptr arg, vm::psv::ptr 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; +}; + +extern psv_log_base sceIme; diff --git a/rpcs3/Loader/ELF32.cpp b/rpcs3/Loader/ELF32.cpp index 6a4884798b..01232eb579 100644 --- a/rpcs3/Loader/ELF32.cpp +++ b/rpcs3/Loader/ELF32.cpp @@ -256,9 +256,7 @@ namespace loader } case 0x0000002f: // movw r*,# instruction is replaced { - const u32 addr = *++code; - - if (!data) + if (!data) // probably, imported object { auto found = vnid_list.find(code.addr()); if (found != vnid_list.end()) @@ -269,36 +267,32 @@ namespace loader if (!data) { - LOG_ERROR(LOADER, ".sceRefs: movw writing failed (code=0x%x, addr=0x%x)", code, addr); - break; + LOG_ERROR(LOADER, ".sceRefs: movw writing failed (ref_addr=0x%x, addr=0x%x)", code, code[1]); + } + else //if (Ini.HLELogging.GetValue()) + { + LOG_NOTICE(LOADER, ".sceRefs: movw written at 0x%x (ref_addr=0x%x, data=0x%x)", code[1], code, data); } + const u32 addr = *++code; vm::psv::write16(addr + 0, vm::psv::read16(addr + 0) | (data & 0x800) >> 1 | (data & 0xf000) >> 12); vm::psv::write16(addr + 2, vm::psv::read16(addr + 2) | (data & 0x700) << 4 | (data & 0xff)); - - //if (Ini.HLELogging.GetValue()) - { - LOG_NOTICE(LOADER, ".sceRefs: movw written at 0x%x (data=0x%x)", addr, data); - } break; } case 0x00000030: // movt r*,# instruction is replaced { - const u32 addr = *++code; - if (!data) { - LOG_ERROR(LOADER, ".sceRefs: movt writing failed (code=0x%x, addr=0x%x)", code, addr); - break; + LOG_ERROR(LOADER, ".sceRefs: movt writing failed (ref_addr=0x%x, addr=0x%x)", code, code[1]); } - + else //if (Ini.HLELogging.GetValue()) + { + LOG_NOTICE(LOADER, ".sceRefs: movt written at 0x%x (ref_addr=0x%x, data=0x%x)", code[1], code, data); + } + + const u32 addr = *++code; vm::psv::write16(addr + 0, vm::psv::read16(addr + 0) | (data & 0x8000000) >> 17 | (data & 0xf0000000) >> 28); vm::psv::write16(addr + 2, vm::psv::read16(addr + 2) | (data & 0x7000000) >> 12 | (data & 0xff0000) >> 16); - - //if (Ini.HLELogging.GetValue()) - { - LOG_NOTICE(LOADER, ".sceRefs: movt written at 0x%x (data=0x%x)", addr, data); - } break; } case 0x00000000: diff --git a/rpcs3/emucore.vcxproj b/rpcs3/emucore.vcxproj index ca94bcbcc5..fb672d63a6 100644 --- a/rpcs3/emucore.vcxproj +++ b/rpcs3/emucore.vcxproj @@ -335,7 +335,9 @@ + + diff --git a/rpcs3/emucore.vcxproj.filters b/rpcs3/emucore.vcxproj.filters index ba692d9a05..6e45634fea 100644 --- a/rpcs3/emucore.vcxproj.filters +++ b/rpcs3/emucore.vcxproj.filters @@ -1486,5 +1486,11 @@ Emu\CPU\ARMv7\Modules + + Emu\CPU\ARMv7\Modules + + + Emu\CPU\ARMv7\Modules + \ No newline at end of file From 35898a6cdf3d4afcff106342d31876eb305a3264 Mon Sep 17 00:00:00 2001 From: Nekotekina Date: Fri, 30 Jan 2015 02:58:53 +0300 Subject: [PATCH 04/11] Some functions added --- rpcs3/Emu/ARMv7/Modules/sceFiber.cpp | 24 +- rpcs3/Emu/ARMv7/Modules/sceGxm.h | 6 +- rpcs3/Emu/ARMv7/Modules/sceHttp.cpp | 455 +++++++++++++++++++++--- rpcs3/Emu/ARMv7/Modules/sceJpeg.cpp | 120 ++++++- rpcs3/Emu/ARMv7/Modules/sceJpegEnc.cpp | 89 ++++- rpcs3/Emu/ARMv7/Modules/sceLiveArea.cpp | 14 +- rpcs3/Emu/ARMv7/Modules/sceLocation.cpp | 202 ++++++++++- rpcs3/Emu/ARMv7/Modules/sceMd5.cpp | 39 +- rpcs3/Emu/ARMv7/Modules/sceMotion.cpp | 133 ++++++- rpcs3/Emu/ARMv7/Modules/sceMt19937.cpp | 21 +- rpcs3/Emu/ARMv7/PSVFuncList.h | 16 + 11 files changed, 997 insertions(+), 122 deletions(-) diff --git a/rpcs3/Emu/ARMv7/Modules/sceFiber.cpp b/rpcs3/Emu/ARMv7/Modules/sceFiber.cpp index 8d21dc8f66..ab35f7a9be 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceFiber.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceFiber.cpp @@ -6,33 +6,37 @@ extern psv_log_base sceFiber; typedef vm::psv::ptr SceFiberEntry; -union SceFiber +struct SceFiber { static const uint size = 128; static const uint align = 8; u64 padding[size / sizeof(u64)]; }; -union SceFiberOptParam +struct SceFiberOptParam { static const uint size = 128; static const uint align = 8; u64 padding[size / sizeof(u64)]; }; -union SceFiberInfo +struct SceFiberInfo { static const uint size = 128; static const uint align = 8; - u64 padding[size / sizeof(u64)]; - struct + union { - SceFiberEntry entry; - u32 argOnInitialize; - vm::psv::ptr addrContext; - s32 sizeContext; - char name[32]; + u64 padding[size / sizeof(u64)]; + + struct + { + SceFiberEntry entry; + u32 argOnInitialize; + vm::psv::ptr addrContext; + s32 sizeContext; + char name[32]; + }; }; }; diff --git a/rpcs3/Emu/ARMv7/Modules/sceGxm.h b/rpcs3/Emu/ARMv7/Modules/sceGxm.h index 28cdac4daf..390c7ed1e7 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceGxm.h +++ b/rpcs3/Emu/ARMv7/Modules/sceGxm.h @@ -1002,9 +1002,9 @@ enum SceGxmColorMask : u8 struct SceGxmBlendInfo { - SceGxmColorMask colorMask; - SceGxmBlendFunc colorFunc : 4; - SceGxmBlendFunc alphaFunc : 4; + SceGxmColorMask colorMask; + SceGxmBlendFunc colorFunc : 4; + SceGxmBlendFunc alphaFunc : 4; SceGxmBlendFactor colorSrc : 4; SceGxmBlendFactor colorDst : 4; SceGxmBlendFactor alphaSrc : 4; diff --git a/rpcs3/Emu/ARMv7/Modules/sceHttp.cpp b/rpcs3/Emu/ARMv7/Modules/sceHttp.cpp index 4f23c935cd..814159303e 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceHttp.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceHttp.cpp @@ -4,6 +4,355 @@ 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::ptr> 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 SceSslCert; + +struct SceHttpsData +{ + vm::psv::ptr ptr; + u32 size; +}; + +struct SceHttpsCaList +{ + vm::psv::ptr> caCerts; + s32 caNum; +}; + +typedef vm::psv::ptr> sslCert, s32 certNum, vm::psv::ptr userArg)> SceHttpsCallback; + +s32 sceHttpInit(u32 poolSize) +{ + throw __FUNCTION__; +} + +s32 sceHttpTerm() +{ + throw __FUNCTION__; +} + +s32 sceHttpGetMemoryPoolStats(vm::psv::ptr currentStat) +{ + throw __FUNCTION__; +} + +s32 sceHttpCreateTemplate(vm::psv::ptr userAgent, s32 httpVer, s32 autoProxyConf) +{ + throw __FUNCTION__; +} + +s32 sceHttpDeleteTemplate(s32 tmplId) +{ + throw __FUNCTION__; +} + +s32 sceHttpCreateConnection(s32 tmplId, vm::psv::ptr serverName, vm::psv::ptr scheme, u16 port, s32 enableKeepalive) +{ + throw __FUNCTION__; +} + +s32 sceHttpCreateConnectionWithURL(s32 tmplId, vm::psv::ptr url, s32 enableKeepalive) +{ + throw __FUNCTION__; +} + +s32 sceHttpDeleteConnection(s32 connId) +{ + throw __FUNCTION__; +} + +s32 sceHttpCreateRequest(s32 connId, s32 method, vm::psv::ptr path, u64 contentLength) +{ + throw __FUNCTION__; +} + +s32 sceHttpCreateRequestWithURL(s32 connId, s32 method, vm::psv::ptr url, u64 contentLength) +{ + throw __FUNCTION__; +} + +s32 sceHttpDeleteRequest(s32 reqId) +{ + throw __FUNCTION__; +} + +s32 sceHttpSetResponseHeaderMaxSize(s32 id, u32 headerSize) +{ + throw __FUNCTION__; +} + +s32 sceHttpSetRecvBlockSize(s32 id, u32 blockSize) +{ + throw __FUNCTION__; +} + +s32 sceHttpSetRequestContentLength(s32 id, u64 contentLength) +{ + throw __FUNCTION__; +} + +s32 sceHttpSendRequest(s32 reqId, vm::psv::ptr postData, u32 size) +{ + throw __FUNCTION__; +} + +s32 sceHttpAbortRequest(s32 reqId) +{ + throw __FUNCTION__; +} + +s32 sceHttpGetResponseContentLength(s32 reqId, vm::psv::ptr contentLength) +{ + throw __FUNCTION__; +} + +s32 sceHttpGetStatusCode(s32 reqId, vm::psv::ptr statusCode) +{ + throw __FUNCTION__; +} + +s32 sceHttpGetAllResponseHeaders(s32 reqId, vm::psv::ptr> header, vm::psv::ptr headerSize) +{ + throw __FUNCTION__; +} + +s32 sceHttpReadData(s32 reqId, vm::psv::ptr data, u32 size) +{ + throw __FUNCTION__; +} + +s32 sceHttpAddRequestHeader(s32 id, vm::psv::ptr name, vm::psv::ptr value, u32 mode) +{ + throw __FUNCTION__; +} + +s32 sceHttpRemoveRequestHeader(s32 id, vm::psv::ptr name) +{ + throw __FUNCTION__; +} + +s32 sceHttpParseResponseHeader(vm::psv::ptr header, u32 headerLen, vm::psv::ptr fieldStr, vm::psv::ptr> fieldValue, vm::psv::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::ptr> reasonPhrase, vm::psv::ptr phraseLen) +{ + throw __FUNCTION__; +} + +s32 sceHttpSetAuthInfoCallback(s32 id, SceHttpAuthInfoCallback cbfunc, vm::psv::ptr userArg) +{ + throw __FUNCTION__; +} + +s32 sceHttpSetAuthEnabled(s32 id, s32 enable) +{ + throw __FUNCTION__; +} + +s32 sceHttpGetAuthEnabled(s32 id, vm::psv::ptr enable) +{ + throw __FUNCTION__; +} + +s32 sceHttpSetRedirectCallback(s32 id, SceHttpRedirectCallback cbfunc, vm::psv::ptr userArg) +{ + throw __FUNCTION__; +} + +s32 sceHttpSetAutoRedirect(s32 id, s32 enable) +{ + throw __FUNCTION__; +} + +s32 sceHttpGetAutoRedirect(s32 id, vm::psv::ptr enable) +{ + throw __FUNCTION__; +} + +s32 sceHttpSetResolveTimeOut(s32 id, u32 usec) +{ + throw __FUNCTION__; +} + +s32 sceHttpSetResolveRetry(s32 id, s32 retry) +{ + throw __FUNCTION__; +} + +s32 sceHttpSetConnectTimeOut(s32 id, u32 usec) +{ + throw __FUNCTION__; +} + +s32 sceHttpSetSendTimeOut(s32 id, u32 usec) +{ + throw __FUNCTION__; +} + +s32 sceHttpSetRecvTimeOut(s32 id, u32 usec) +{ + throw __FUNCTION__; +} + +s32 sceHttpUriEscape(vm::psv::ptr out, vm::psv::ptr require, u32 prepare, vm::psv::ptr in) +{ + throw __FUNCTION__; +} + +s32 sceHttpUriUnescape(vm::psv::ptr out, vm::psv::ptr require, u32 prepare, vm::psv::ptr in) +{ + throw __FUNCTION__; +} + +s32 sceHttpUriParse(vm::psv::ptr out, vm::psv::ptr srcUrl, vm::psv::ptr pool, vm::psv::ptr require, u32 prepare) +{ + throw __FUNCTION__; +} + +s32 sceHttpUriBuild(vm::psv::ptr out, vm::psv::ptr require, u32 prepare, vm::psv::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) +{ + throw __FUNCTION__; +} + +s32 sceHttpUriSweepPath(vm::psv::ptr dst, vm::psv::ptr src, u32 srcSize) +{ + throw __FUNCTION__; +} + +s32 sceHttpSetCookieEnabled(s32 id, s32 enable) +{ + throw __FUNCTION__; +} + +s32 sceHttpGetCookieEnabled(s32 id, vm::psv::ptr enable) +{ + throw __FUNCTION__; +} + +s32 sceHttpGetCookie(vm::psv::ptr url, vm::psv::ptr cookie, vm::psv::ptr cookieLength, u32 prepare, s32 secure) +{ + throw __FUNCTION__; +} + +s32 sceHttpAddCookie(vm::psv::ptr url, vm::psv::ptr cookie, u32 cookieLength) +{ + throw __FUNCTION__; +} + +s32 sceHttpSetCookieRecvCallback(s32 id, SceHttpCookieRecvCallback cbfunc, vm::psv::ptr userArg) +{ + throw __FUNCTION__; +} + +s32 sceHttpSetCookieSendCallback(s32 id, SceHttpCookieSendCallback cbfunc, vm::psv::ptr userArg) +{ + throw __FUNCTION__; +} + +s32 sceHttpsLoadCert(s32 caCertNum, vm::psv::ptr> caList, vm::psv::ptr cert, vm::psv::ptr privKey) +{ + throw __FUNCTION__; +} + +s32 sceHttpsUnloadCert() +{ + throw __FUNCTION__; +} + +s32 sceHttpsEnableOption(u32 sslFlags) +{ + throw __FUNCTION__; +} + +s32 sceHttpsDisableOption(u32 sslFlags) +{ + throw __FUNCTION__; +} + +s32 sceHttpsGetSslError(s32 id, vm::psv::ptr errNum, vm::psv::ptr detail) +{ + throw __FUNCTION__; +} + +s32 sceHttpsSetSslCallback(s32 id, SceHttpsCallback cbfunc, vm::psv::ptr userArg) +{ + throw __FUNCTION__; +} + +s32 sceHttpsGetCaList(vm::psv::ptr caList) +{ + throw __FUNCTION__; +} + +s32 sceHttpsFreeCaList(vm::psv::ptr caList) +{ + throw __FUNCTION__; +} + + #define REG_FUNC(nid, name) reg_psv_func(nid, &sceHttp, #name, name) psv_log_base sceHttp("SceHttp", []() @@ -12,45 +361,45 @@ psv_log_base sceHttp("SceHttp", []() sceHttp.on_unload = nullptr; sceHttp.on_stop = nullptr; - //REG_FUNC(0x214926D9, sceHttpInit); - //REG_FUNC(0xC9076666, sceHttpTerm); - //REG_FUNC(0xF98CDFA9, sceHttpGetMemoryPoolStats); - //REG_FUNC(0x62241DAB, sceHttpCreateTemplate); - //REG_FUNC(0xEC85ECFB, sceHttpDeleteTemplate); - //REG_FUNC(0xC616C200, sceHttpCreateConnectionWithURL); - //REG_FUNC(0xAEB3307E, sceHttpCreateConnection); - //REG_FUNC(0xF0F65C15, sceHttpDeleteConnection); - //REG_FUNC(0xBD5DA1D0, sceHttpCreateRequestWithURL); - //REG_FUNC(0xB0284270, sceHttpCreateRequest); - //REG_FUNC(0x3D3D29AD, sceHttpDeleteRequest); - //REG_FUNC(0x9CA58B99, sceHttpSendRequest); - //REG_FUNC(0x7EDE3979, sceHttpReadData); - //REG_FUNC(0xF580D304, sceHttpGetResponseContentLength); - //REG_FUNC(0x27071691, sceHttpGetStatusCode); - //REG_FUNC(0xEA61662F, sceHttpAbortRequest); - //REG_FUNC(0x7B51B122, sceHttpAddRequestHeader); - //REG_FUNC(0x5EB5F548, sceHttpRemoveRequestHeader); - //REG_FUNC(0x11F6C27F, sceHttpGetAllResponseHeaders); - //REG_FUNC(0x03A6C89E, sceHttpParseResponseHeader); - //REG_FUNC(0x179C56DB, sceHttpParseStatusLine); - //REG_FUNC(0x1DA2A673, sceHttpUriEscape); - //REG_FUNC(0x1274D318, sceHttpUriUnescape); - //REG_FUNC(0x1D45F24E, sceHttpUriParse); - //REG_FUNC(0x47664424, sceHttpUriBuild); - //REG_FUNC(0x75027D1D, sceHttpUriMerge); - //REG_FUNC(0x50737A3F, sceHttpUriSweepPath); - //REG_FUNC(0x37C30C90, sceHttpSetRequestContentLength); - //REG_FUNC(0x11EC42D0, sceHttpSetAuthEnabled); - //REG_FUNC(0x6727874C, sceHttpGetAuthEnabled); - //REG_FUNC(0x34891C3F, sceHttpSetAutoRedirect); - //REG_FUNC(0x6EAD73EB, sceHttpGetAutoRedirect); - //REG_FUNC(0xE0A3A88D, sceHttpSetAuthInfoCallback); - //REG_FUNC(0x4E08167D, sceHttpSetRedirectCallback); - //REG_FUNC(0x8455B5B3, sceHttpSetResolveTimeOut); - //REG_FUNC(0x9AB56EA7, sceHttpSetResolveRetry); - //REG_FUNC(0x237CA86E, sceHttpSetConnectTimeOut); - //REG_FUNC(0x8AE3F008, sceHttpSetSendTimeOut); - //REG_FUNC(0x94BF196E, sceHttpSetRecvTimeOut); + REG_FUNC(0x214926D9, sceHttpInit); + REG_FUNC(0xC9076666, sceHttpTerm); + REG_FUNC(0xF98CDFA9, sceHttpGetMemoryPoolStats); + REG_FUNC(0x62241DAB, sceHttpCreateTemplate); + REG_FUNC(0xEC85ECFB, sceHttpDeleteTemplate); + REG_FUNC(0xC616C200, sceHttpCreateConnectionWithURL); + REG_FUNC(0xAEB3307E, sceHttpCreateConnection); + REG_FUNC(0xF0F65C15, sceHttpDeleteConnection); + REG_FUNC(0xBD5DA1D0, sceHttpCreateRequestWithURL); + REG_FUNC(0xB0284270, sceHttpCreateRequest); + REG_FUNC(0x3D3D29AD, sceHttpDeleteRequest); + REG_FUNC(0x9CA58B99, sceHttpSendRequest); + REG_FUNC(0x7EDE3979, sceHttpReadData); + REG_FUNC(0xF580D304, sceHttpGetResponseContentLength); + REG_FUNC(0x27071691, sceHttpGetStatusCode); + REG_FUNC(0xEA61662F, sceHttpAbortRequest); + REG_FUNC(0x7B51B122, sceHttpAddRequestHeader); + REG_FUNC(0x5EB5F548, sceHttpRemoveRequestHeader); + REG_FUNC(0x11F6C27F, sceHttpGetAllResponseHeaders); + REG_FUNC(0x03A6C89E, sceHttpParseResponseHeader); + REG_FUNC(0x179C56DB, sceHttpParseStatusLine); + REG_FUNC(0x1DA2A673, sceHttpUriEscape); + REG_FUNC(0x1274D318, sceHttpUriUnescape); + REG_FUNC(0x1D45F24E, sceHttpUriParse); + REG_FUNC(0x47664424, sceHttpUriBuild); + REG_FUNC(0x75027D1D, sceHttpUriMerge); + REG_FUNC(0x50737A3F, sceHttpUriSweepPath); + REG_FUNC(0x37C30C90, sceHttpSetRequestContentLength); + REG_FUNC(0x11EC42D0, sceHttpSetAuthEnabled); + REG_FUNC(0x6727874C, sceHttpGetAuthEnabled); + REG_FUNC(0x34891C3F, sceHttpSetAutoRedirect); + REG_FUNC(0x6EAD73EB, sceHttpGetAutoRedirect); + REG_FUNC(0xE0A3A88D, sceHttpSetAuthInfoCallback); + REG_FUNC(0x4E08167D, sceHttpSetRedirectCallback); + REG_FUNC(0x8455B5B3, sceHttpSetResolveTimeOut); + REG_FUNC(0x9AB56EA7, sceHttpSetResolveRetry); + REG_FUNC(0x237CA86E, sceHttpSetConnectTimeOut); + REG_FUNC(0x8AE3F008, sceHttpSetSendTimeOut); + REG_FUNC(0x94BF196E, sceHttpSetRecvTimeOut); //REG_FUNC(0x27A98BDA, sceHttpSetNonblock); //REG_FUNC(0xD65746BC, sceHttpGetNonblock); //REG_FUNC(0x5CEB6554, sceHttpSetEpollId); @@ -61,22 +410,22 @@ psv_log_base sceHttp("SceHttp", []() //REG_FUNC(0xCFB1DA4B, sceHttpUnsetEpoll); //REG_FUNC(0x65FE983F, sceHttpGetEpoll); //REG_FUNC(0x07D9F8BB, sceHttpDestroyEpoll); - //REG_FUNC(0xAEE573A3, sceHttpSetCookieEnabled); - //REG_FUNC(0x1B6EF66E, sceHttpGetCookieEnabled); - //REG_FUNC(0x70220BFA, sceHttpGetCookie); - //REG_FUNC(0xBEDB988D, sceHttpAddCookie); + REG_FUNC(0xAEE573A3, sceHttpSetCookieEnabled); + REG_FUNC(0x1B6EF66E, sceHttpGetCookieEnabled); + REG_FUNC(0x70220BFA, sceHttpGetCookie); + REG_FUNC(0xBEDB988D, sceHttpAddCookie); //REG_FUNC(0x4259FB9E, sceHttpCookieExport); //REG_FUNC(0x9DF48282, sceHttpCookieImport); - //REG_FUNC(0xD4F32A23, sceHttpSetCookieRecvCallback); - //REG_FUNC(0x11C03867, sceHttpSetCookieSendCallback); - //REG_FUNC(0xAE8D7C33, sceHttpsLoadCert); - //REG_FUNC(0x8577833F, sceHttpsUnloadCert); - //REG_FUNC(0x9FBE2869, sceHttpsEnableOption); - //REG_FUNC(0xC6D60403, sceHttpsDisableOption); + REG_FUNC(0xD4F32A23, sceHttpSetCookieRecvCallback); + REG_FUNC(0x11C03867, sceHttpSetCookieSendCallback); + REG_FUNC(0xAE8D7C33, sceHttpsLoadCert); + REG_FUNC(0x8577833F, sceHttpsUnloadCert); + REG_FUNC(0x9FBE2869, sceHttpsEnableOption); + REG_FUNC(0xC6D60403, sceHttpsDisableOption); //REG_FUNC(0x72CB0741, sceHttpsEnableOptionPrivate); //REG_FUNC(0x00659635, sceHttpsDisableOptionPrivate); - //REG_FUNC(0x2B79BDE0, sceHttpsGetSslError); - //REG_FUNC(0xA0926037, sceHttpsSetSslCallback); - //REG_FUNC(0xF71AA58D, sceHttpsGetCaList); - //REG_FUNC(0x56C95D94, sceHttpsFreeCaList); + REG_FUNC(0x2B79BDE0, sceHttpsGetSslError); + REG_FUNC(0xA0926037, sceHttpsSetSslCallback); + REG_FUNC(0xF71AA58D, sceHttpsGetCaList); + REG_FUNC(0x56C95D94, sceHttpsFreeCaList); }); diff --git a/rpcs3/Emu/ARMv7/Modules/sceJpeg.cpp b/rpcs3/Emu/ARMv7/Modules/sceJpeg.cpp index 5ec6f79614..06e8e0ec00 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceJpeg.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceJpeg.cpp @@ -4,6 +4,108 @@ 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]; +}; + +s32 sceJpegInitMJpeg(s32 maxSplitDecoder) +{ + throw __FUNCTION__; +} + +s32 sceJpegFinishMJpeg() +{ + throw __FUNCTION__; +} + +s32 sceJpegDecodeMJpeg( + vm::psv::ptr pJpeg, + u32 isize, + vm::psv::ptr pRGBA, + u32 osize, + s32 decodeMode, + vm::psv::ptr pTempBuffer, + u32 tempBufferSize, + vm::psv::ptr pCoefBuffer, + u32 coefBufferSize) +{ + throw __FUNCTION__; +} + +s32 sceJpegDecodeMJpegYCbCr( + vm::psv::ptr pJpeg, + u32 isize, + vm::psv::ptr pYCbCr, + u32 osize, + s32 decodeMode, + vm::psv::ptr pCoefBuffer, + u32 coefBufferSize) +{ + throw __FUNCTION__; +} + +s32 sceJpegMJpegCsc( + vm::psv::ptr pRGBA, + vm::psv::ptr pYCbCr, + s32 xysize, + s32 iFrameWidth, + s32 colorOption, + s32 sampling) +{ + throw __FUNCTION__; +} + +s32 sceJpegGetOutputInfo( + vm::psv::ptr pJpeg, + u32 isize, + s32 outputFormat, + s32 decodeMode, + vm::psv::ptr pOutputInfo) +{ + throw __FUNCTION__; +} + +s32 sceJpegCreateSplitDecoder(vm::psv::ptr pCtrl) +{ + throw __FUNCTION__; +} + +s32 sceJpegDeleteSplitDecoder(vm::psv::ptr pCtrl) +{ + throw __FUNCTION__; +} + +s32 sceJpegSplitDecodeMJpeg(vm::psv::ptr pCtrl) +{ + throw __FUNCTION__; +} + + #define REG_FUNC(nid, name) reg_psv_func(nid, &sceJpeg, #name, name) psv_log_base sceJpeg("SceJpeg", []() @@ -12,13 +114,13 @@ psv_log_base sceJpeg("SceJpeg", []() sceJpeg.on_unload = nullptr; sceJpeg.on_stop = nullptr; - //REG_FUNC(0xB030773B, sceJpegInitMJpeg); - //REG_FUNC(0x62842598, sceJpegFinishMJpeg); - //REG_FUNC(0x6215B095, sceJpegDecodeMJpeg); - //REG_FUNC(0x2A769BD8, sceJpegDecodeMJpegYCbCr); - //REG_FUNC(0xC2380E3A, sceJpegMJpegCsc); - //REG_FUNC(0x353BA9B0, sceJpegGetOutputInfo); - //REG_FUNC(0x123B4734, sceJpegCreateSplitDecoder); - //REG_FUNC(0xDE8D5FA1, sceJpegDeleteSplitDecoder); - //REG_FUNC(0x4598EC9C, sceJpegSplitDecodeMJpeg); + REG_FUNC(0xB030773B, sceJpegInitMJpeg); + REG_FUNC(0x62842598, sceJpegFinishMJpeg); + REG_FUNC(0x6215B095, sceJpegDecodeMJpeg); + REG_FUNC(0x2A769BD8, sceJpegDecodeMJpegYCbCr); + REG_FUNC(0xC2380E3A, sceJpegMJpegCsc); + REG_FUNC(0x353BA9B0, sceJpegGetOutputInfo); + REG_FUNC(0x123B4734, sceJpegCreateSplitDecoder); + REG_FUNC(0xDE8D5FA1, sceJpegDeleteSplitDecoder); + REG_FUNC(0x4598EC9C, sceJpegSplitDecodeMJpeg); }); diff --git a/rpcs3/Emu/ARMv7/Modules/sceJpegEnc.cpp b/rpcs3/Emu/ARMv7/Modules/sceJpegEnc.cpp index 1567f5487d..690afd9e04 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceJpegEnc.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceJpegEnc.cpp @@ -4,6 +4,77 @@ extern psv_log_base sceJpegEnc; +typedef vm::psv::ptr SceJpegEncoderContext; + +s32 sceJpegEncoderGetContextSize() +{ + throw __FUNCTION__; +} + +s32 sceJpegEncoderInit( + SceJpegEncoderContext context, + s32 iFrameWidth, + s32 iFrameHeight, + s32 pixelFormat, + vm::psv::ptr pJpeg, + u32 oJpegbufSize) +{ + throw __FUNCTION__; +} + +s32 sceJpegEncoderEncode( + SceJpegEncoderContext context, + vm::psv::ptr pYCbCr) +{ + throw __FUNCTION__; +} + +s32 sceJpegEncoderEnd(SceJpegEncoderContext context) +{ + throw __FUNCTION__; +} + +s32 sceJpegEncoderSetValidRegion( + SceJpegEncoderContext context, + s32 iFrameWidth, + s32 iFrameHeight) +{ + throw __FUNCTION__; +} + +s32 sceJpegEncoderSetCompressionRatio( + SceJpegEncoderContext context, + s32 compratio) +{ + throw __FUNCTION__; +} + +s32 sceJpegEncoderSetHeaderMode( + SceJpegEncoderContext context, + s32 headerMode) +{ + throw __FUNCTION__; +} + +s32 sceJpegEncoderSetOutputAddr( + SceJpegEncoderContext context, + vm::psv::ptr pJpeg, + u32 oJpegbufSize) +{ + throw __FUNCTION__; +} + +s32 sceJpegEncoderCsc( + SceJpegEncoderContext context, + vm::psv::ptr pYCbCr, + vm::psv::ptr pRGBA, + s32 iFrameWidth, + s32 inputPixelFormat) +{ + throw __FUNCTION__; +} + + #define REG_FUNC(nid, name) reg_psv_func(nid, &sceJpegEnc, #name, name) psv_log_base sceJpegEnc("SceJpegEnc", []() @@ -12,13 +83,13 @@ psv_log_base sceJpegEnc("SceJpegEnc", []() sceJpegEnc.on_unload = nullptr; sceJpegEnc.on_stop = nullptr; - //REG_FUNC(0x2B55844D, sceJpegEncoderGetContextSize); - //REG_FUNC(0x88DA92B4, sceJpegEncoderInit); - //REG_FUNC(0xC60DE94C, sceJpegEncoderEncode); - //REG_FUNC(0xC87AA849, sceJpegEncoderEnd); - //REG_FUNC(0x9511F3BC, sceJpegEncoderSetValidRegion); - //REG_FUNC(0xB2B828EC, sceJpegEncoderSetCompressionRatio); - //REG_FUNC(0x2F58B12C, sceJpegEncoderSetHeaderMode); - //REG_FUNC(0x25D52D97, sceJpegEncoderSetOutputAddr); - //REG_FUNC(0x824A7D4F, sceJpegEncoderCsc); + REG_FUNC(0x2B55844D, sceJpegEncoderGetContextSize); + REG_FUNC(0x88DA92B4, sceJpegEncoderInit); + REG_FUNC(0xC60DE94C, sceJpegEncoderEncode); + REG_FUNC(0xC87AA849, sceJpegEncoderEnd); + REG_FUNC(0x9511F3BC, sceJpegEncoderSetValidRegion); + REG_FUNC(0xB2B828EC, sceJpegEncoderSetCompressionRatio); + REG_FUNC(0x2F58B12C, sceJpegEncoderSetHeaderMode); + REG_FUNC(0x25D52D97, sceJpegEncoderSetOutputAddr); + REG_FUNC(0x824A7D4F, sceJpegEncoderCsc); }); diff --git a/rpcs3/Emu/ARMv7/Modules/sceLiveArea.cpp b/rpcs3/Emu/ARMv7/Modules/sceLiveArea.cpp index 4511ca2ae7..62eea18429 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceLiveArea.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceLiveArea.cpp @@ -4,6 +4,16 @@ extern psv_log_base sceLiveArea; +s32 sceLiveAreaResourceReplaceAll(vm::psv::ptr dirpath) +{ + throw __FUNCTION__; +} + +s32 sceLiveAreaResourceGetStatus() +{ + throw __FUNCTION__; +} + #define REG_FUNC(nid, name) reg_psv_func(nid, &sceLiveArea, #name, name) psv_log_base sceLiveArea("SceLiveArea", []() @@ -12,6 +22,6 @@ psv_log_base sceLiveArea("SceLiveArea", []() sceLiveArea.on_unload = nullptr; sceLiveArea.on_stop = nullptr; - //REG_FUNC(0xA4B506F9, sceLiveAreaResourceReplaceAll); - //REG_FUNC(0x54A395FB, sceLiveAreaResourceGetStatus); + REG_FUNC(0xA4B506F9, sceLiveAreaResourceReplaceAll); + REG_FUNC(0x54A395FB, sceLiveAreaResourceGetStatus); }); diff --git a/rpcs3/Emu/ARMv7/Modules/sceLocation.cpp b/rpcs3/Emu/ARMv7/Modules/sceLocation.cpp index 734f7f62e1..8b61bca224 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceLocation.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceLocation.cpp @@ -4,6 +4,174 @@ extern psv_log_base sceLocation; +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) +{ + throw __FUNCTION__; +} + +s32 sceLocationClose(SceLocationHandle handle) +{ + throw __FUNCTION__; +} + +s32 sceLocationReopen(SceLocationHandle handle, SceLocationLocationMethod lmethod, SceLocationHeadingMethod hmethod) +{ + throw __FUNCTION__; +} + +s32 sceLocationGetMethod(SceLocationHandle handle, vm::psv::ptr lmethod, vm::psv::ptr hmethod) +{ + throw __FUNCTION__; +} + +s32 sceLocationGetLocation(SceLocationHandle handle, vm::psv::ptr linfo) +{ + throw __FUNCTION__; +} + +s32 sceLocationCancelGetLocation(SceLocationHandle handle) +{ + throw __FUNCTION__; +} + +s32 sceLocationStartLocationCallback(SceLocationHandle handle, u32 distance, SceLocationLocationInfoCallback callback, vm::psv::ptr userdata) +{ + throw __FUNCTION__; +} + +s32 sceLocationStopLocationCallback(SceLocationHandle handle) +{ + throw __FUNCTION__; +} + +s32 sceLocationGetHeading(SceLocationHandle handle, vm::psv::ptr hinfo) +{ + throw __FUNCTION__; +} + +s32 sceLocationStartHeadingCallback(SceLocationHandle handle, u32 difference, SceLocationHeadingInfoCallback callback, vm::psv::ptr userdata) +{ + throw __FUNCTION__; +} + +s32 sceLocationStopHeadingCallback(SceLocationHandle handle) +{ + throw __FUNCTION__; +} + +s32 sceLocationConfirm(SceLocationHandle handle) +{ + throw __FUNCTION__; +} + +s32 sceLocationConfirmGetStatus(SceLocationHandle handle, vm::psv::ptr status) +{ + throw __FUNCTION__; +} + +s32 sceLocationConfirmGetResult(SceLocationHandle handle, vm::psv::ptr result) +{ + throw __FUNCTION__; +} + +s32 sceLocationConfirmAbort(SceLocationHandle handle) +{ + throw __FUNCTION__; +} + +s32 sceLocationGetPermission(SceLocationHandle handle, vm::psv::ptr info) +{ + throw __FUNCTION__; +} + +s32 sceLocationSetGpsEmulationFile(vm::psv::ptr filename) +{ + throw __FUNCTION__; +} + + #define REG_FUNC(nid, name) reg_psv_func(nid, &sceLocation, #name, name) psv_log_base sceLocation("SceLibLocation", []() @@ -12,23 +180,23 @@ psv_log_base sceLocation("SceLibLocation", []() sceLocation.on_unload = nullptr; sceLocation.on_stop = nullptr; - //REG_FUNC(0xDD271661, sceLocationOpen); - //REG_FUNC(0x14FE76E8, sceLocationClose); - //REG_FUNC(0xB1F55065, sceLocationReopen); - //REG_FUNC(0x188CE004, sceLocationGetMethod); - //REG_FUNC(0x15BC27C8, sceLocationGetLocation); - //REG_FUNC(0x71503251, sceLocationCancelGetLocation); - //REG_FUNC(0x12D1F0EA, sceLocationStartLocationCallback); - //REG_FUNC(0xED378700, sceLocationStopLocationCallback); - //REG_FUNC(0x4E9E5ED9, sceLocationGetHeading); - //REG_FUNC(0x07D4DFE0, sceLocationStartHeadingCallback); - //REG_FUNC(0x92E53F94, sceLocationStopHeadingCallback); + REG_FUNC(0xDD271661, sceLocationOpen); + REG_FUNC(0x14FE76E8, sceLocationClose); + REG_FUNC(0xB1F55065, sceLocationReopen); + REG_FUNC(0x188CE004, sceLocationGetMethod); + REG_FUNC(0x15BC27C8, sceLocationGetLocation); + REG_FUNC(0x71503251, sceLocationCancelGetLocation); + REG_FUNC(0x12D1F0EA, sceLocationStartLocationCallback); + REG_FUNC(0xED378700, sceLocationStopLocationCallback); + REG_FUNC(0x4E9E5ED9, sceLocationGetHeading); + REG_FUNC(0x07D4DFE0, sceLocationStartHeadingCallback); + REG_FUNC(0x92E53F94, sceLocationStopHeadingCallback); //REG_FUNC(0xE055BCF5, sceLocationSetHeapAllocator); - //REG_FUNC(0xC895E567, sceLocationConfirm); - //REG_FUNC(0x730FF842, sceLocationConfirmGetStatus); - //REG_FUNC(0xFF016C13, sceLocationConfirmGetResult); - //REG_FUNC(0xE3CBF875, sceLocationConfirmAbort); - //REG_FUNC(0x482622C6, sceLocationGetPermission); - //REG_FUNC(0xDE0A9EA4, sceLocationSetGpsEmulationFile); + REG_FUNC(0xC895E567, sceLocationConfirm); + REG_FUNC(0x730FF842, sceLocationConfirmGetStatus); + REG_FUNC(0xFF016C13, sceLocationConfirmGetResult); + REG_FUNC(0xE3CBF875, sceLocationConfirmAbort); + REG_FUNC(0x482622C6, sceLocationGetPermission); + REG_FUNC(0xDE0A9EA4, sceLocationSetGpsEmulationFile); //REG_FUNC(0x760D08FF, sceLocationConfirmSetMessage); }); diff --git a/rpcs3/Emu/ARMv7/Modules/sceMd5.cpp b/rpcs3/Emu/ARMv7/Modules/sceMd5.cpp index aed0422ed4..d31e193e81 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceMd5.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceMd5.cpp @@ -4,6 +4,37 @@ extern psv_log_base sceMd5; +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) +{ + throw __FUNCTION__; +} + +s32 sceMd5BlockInit(vm::psv::ptr pContext) +{ + throw __FUNCTION__; +} + +s32 sceMd5BlockUpdate(vm::psv::ptr pContext, vm::psv::ptr plain, u32 len) +{ + throw __FUNCTION__; +} + +s32 sceMd5BlockResult(vm::psv::ptr pContext, vm::psv::ptr digest) +{ + throw __FUNCTION__; +} + #define REG_FUNC(nid, name) reg_psv_func(nid, &sceMd5, #name, name) psv_log_base sceMd5("SceMd5", []() @@ -12,8 +43,8 @@ psv_log_base sceMd5("SceMd5", []() sceMd5.on_unload = nullptr; sceMd5.on_stop = nullptr; - //REG_FUNC(0xB845BCCB, sceMd5Digest); - //REG_FUNC(0x4D6436F9, sceMd5BlockInit); - //REG_FUNC(0x094A4902, sceMd5BlockUpdate); - //REG_FUNC(0xB94ABF83, sceMd5BlockResult); + REG_FUNC(0xB845BCCB, sceMd5Digest); + REG_FUNC(0x4D6436F9, sceMd5BlockInit); + REG_FUNC(0x094A4902, sceMd5BlockUpdate); + REG_FUNC(0xB94ABF83, sceMd5BlockResult); }); diff --git a/rpcs3/Emu/ARMv7/Modules/sceMotion.cpp b/rpcs3/Emu/ARMv7/Modules/sceMotion.cpp index bc86726bb2..4128c78a65 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceMotion.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceMotion.cpp @@ -4,6 +4,113 @@ extern psv_log_base sceMotion; +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) +{ + throw __FUNCTION__; +} + +s32 sceMotionGetSensorState(vm::psv::ptr sensorState, s32 numRecords) +{ + throw __FUNCTION__; +} + +s32 sceMotionGetBasicOrientation(vm::psv::ptr basicOrientation) +{ + throw __FUNCTION__; +} + +//s32 sceMotionRotateYaw(const float radians) +//{ +// throw __FUNCTION__; +//} + +s32 sceMotionGetTiltCorrection() +{ + throw __FUNCTION__; +} + +s32 sceMotionSetTiltCorrection(s32 setValue) +{ + throw __FUNCTION__; +} + +s32 sceMotionGetDeadband() +{ + throw __FUNCTION__; +} + +s32 sceMotionSetDeadband(s32 setValue) +{ + throw __FUNCTION__; +} + +//s32 sceMotionSetAngleThreshold(const float angle) +//{ +// throw __FUNCTION__; +//} + +//float sceMotionGetAngleThreshold() +//{ +// throw __FUNCTION__; +//} + +s32 sceMotionReset() +{ + throw __FUNCTION__; +} + +s32 sceMotionMagnetometerOn() +{ + throw __FUNCTION__; +} + +s32 sceMotionMagnetometerOff() +{ + throw __FUNCTION__; +} + +s32 sceMotionGetMagnetometerState() +{ + throw __FUNCTION__; +} + +s32 sceMotionStartSampling() +{ + throw __FUNCTION__; +} + +s32 sceMotionStopSampling() +{ + throw __FUNCTION__; +} + #define REG_FUNC(nid, name) reg_psv_func(nid, &sceMotion, #name, name) psv_log_base sceMotion("SceMotion", []() @@ -12,20 +119,20 @@ psv_log_base sceMotion("SceMotion", []() sceMotion.on_unload = nullptr; sceMotion.on_stop = nullptr; - //REG_FUNC(0xBDB32767, sceMotionGetState); - //REG_FUNC(0x47D679EA, sceMotionGetSensorState); - //REG_FUNC(0xC1652201, sceMotionGetTiltCorrection); - //REG_FUNC(0xAF09FCDB, sceMotionSetTiltCorrection); - //REG_FUNC(0x112E0EAE, sceMotionGetDeadband); - //REG_FUNC(0x917EA390, sceMotionSetDeadband); + REG_FUNC(0xBDB32767, sceMotionGetState); + REG_FUNC(0x47D679EA, sceMotionGetSensorState); + REG_FUNC(0xC1652201, sceMotionGetTiltCorrection); + REG_FUNC(0xAF09FCDB, sceMotionSetTiltCorrection); + REG_FUNC(0x112E0EAE, sceMotionGetDeadband); + REG_FUNC(0x917EA390, sceMotionSetDeadband); //REG_FUNC(0x20F00078, sceMotionRotateYaw); - //REG_FUNC(0x0FD2CDA2, sceMotionReset); - //REG_FUNC(0x28034AC9, sceMotionStartSampling); - //REG_FUNC(0xAF32CB1D, sceMotionStopSampling); + REG_FUNC(0x0FD2CDA2, sceMotionReset); + REG_FUNC(0x28034AC9, sceMotionStartSampling); + REG_FUNC(0xAF32CB1D, sceMotionStopSampling); //REG_FUNC(0xDACB2A41, sceMotionSetAngleThreshold); //REG_FUNC(0x499B6C87, sceMotionGetAngleThreshold); - //REG_FUNC(0x4F28BFE0, sceMotionGetBasicOrientation); - //REG_FUNC(0x122A79F8, sceMotionMagnetometerOn); - //REG_FUNC(0xC1A7395A, sceMotionMagnetometerOff); - //REG_FUNC(0x3D4813AE, sceMotionGetMagnetometerState); + REG_FUNC(0x4F28BFE0, sceMotionGetBasicOrientation); + REG_FUNC(0x122A79F8, sceMotionMagnetometerOn); + REG_FUNC(0xC1A7395A, sceMotionMagnetometerOff); + REG_FUNC(0x3D4813AE, sceMotionGetMagnetometerState); }); diff --git a/rpcs3/Emu/ARMv7/Modules/sceMt19937.cpp b/rpcs3/Emu/ARMv7/Modules/sceMt19937.cpp index 3893d344bf..6a125206ec 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceMt19937.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceMt19937.cpp @@ -4,6 +4,23 @@ extern psv_log_base sceMt19937; +struct SceMt19937Context +{ + u32 count; + u32 state[624]; +}; + +s32 sceMt19937Init(vm::psv::ptr pCtx, u32 seed) +{ + throw __FUNCTION__; +} + +u32 sceMt19937UInt(vm::psv::ptr pCtx) +{ + throw __FUNCTION__; +} + + #define REG_FUNC(nid, name) reg_psv_func(nid, &sceMt19937, #name, name) psv_log_base sceMt19937("SceMt19937", []() @@ -12,6 +29,6 @@ psv_log_base sceMt19937("SceMt19937", []() sceMt19937.on_unload = nullptr; sceMt19937.on_stop = nullptr; - //REG_FUNC(0xEE5BA27C, sceMt19937Init); - //REG_FUNC(0x29E43BB5, sceMt19937UInt); + REG_FUNC(0xEE5BA27C, sceMt19937Init); + REG_FUNC(0x29E43BB5, sceMt19937UInt); }); diff --git a/rpcs3/Emu/ARMv7/PSVFuncList.h b/rpcs3/Emu/ARMv7/PSVFuncList.h index 0326208f9f..a1948dcbec 100644 --- a/rpcs3/Emu/ARMv7/PSVFuncList.h +++ b/rpcs3/Emu/ARMv7/PSVFuncList.h @@ -647,3 +647,19 @@ struct SceDateTime u16 second; u32 microsecond; }; + +struct SceFVector3 +{ + float x, y, z; +}; + +struct SceFQuaternion +{ + float x, y, z, w; +}; + +union SceUMatrix4 +{ + float f[4][4]; + s32 i[4][4]; +}; From cd6f95c90d6e09d9ddbd7740f2234d5e3ce92a34 Mon Sep 17 00:00:00 2001 From: Nekotekina Date: Fri, 30 Jan 2015 13:48:12 +0300 Subject: [PATCH 05/11] Some functions added --- rpcs3/Emu/ARMv7/Modules/sceHttp.cpp | 4 +- rpcs3/Emu/ARMv7/Modules/sceNet.cpp | 409 +++++++++++++++++--- rpcs3/Emu/ARMv7/Modules/sceNet.h | 187 +++++++++ rpcs3/Emu/ARMv7/Modules/sceNetCtl.cpp | 156 +++++++- rpcs3/Emu/ARMv7/Modules/scePhotoExport.cpp | 40 +- rpcs3/Emu/ARMv7/Modules/sceRazorCapture.cpp | 21 +- rpcs3/Emu/ARMv7/Modules/sceScreenShot.cpp | 37 +- rpcs3/Emu/ARMv7/Modules/sceSsl.cpp | 80 +++- rpcs3/Emu/ARMv7/Modules/sceSsl.h | 14 + rpcs3/Emu/ARMv7/Modules/sceSulpha.cpp | 104 ++++- rpcs3/Emu/ARMv7/Modules/sceTouch.cpp | 69 +++- rpcs3/Emu/ARMv7/Modules/sceVideodec.cpp | 190 ++++++++- rpcs3/Emu/ARMv7/Modules/sceVoice.cpp | 294 ++++++++++++-- rpcs3/Emu/ARMv7/Modules/sceVoiceQoS.cpp | 142 ++++++- rpcs3/emucore.vcxproj | 2 + rpcs3/emucore.vcxproj.filters | 6 + 16 files changed, 1589 insertions(+), 166 deletions(-) create mode 100644 rpcs3/Emu/ARMv7/Modules/sceNet.h create mode 100644 rpcs3/Emu/ARMv7/Modules/sceSsl.h diff --git a/rpcs3/Emu/ARMv7/Modules/sceHttp.cpp b/rpcs3/Emu/ARMv7/Modules/sceHttp.cpp index 814159303e..c98509fac4 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceHttp.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceHttp.cpp @@ -2,6 +2,8 @@ #include "Emu/System.h" #include "Emu/ARMv7/PSVFuncList.h" +#include "sceSsl.h" + extern psv_log_base sceHttp; enum SceHttpHttpVersion : s32 @@ -61,8 +63,6 @@ typedef vm::psv::ptr url, vm::psv::ptr typedef vm::psv::ptr url, vm::psv::ptr cookieHeader, vm::psv::ptr userArg)> SceHttpCookieSendCallback; -struct SceSslCert; - struct SceHttpsData { vm::psv::ptr ptr; diff --git a/rpcs3/Emu/ARMv7/Modules/sceNet.cpp b/rpcs3/Emu/ARMv7/Modules/sceNet.cpp index f68a283618..347ba76df5 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceNet.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceNet.cpp @@ -2,7 +2,298 @@ #include "Emu/System.h" #include "Emu/ARMv7/PSVFuncList.h" -extern psv_log_base sceNet; +#include "sceNet.h" + +s32 sceNetSetDnsInfo(vm::psv::ptr info, s32 flags) +{ + throw __FUNCTION__; +} + +s32 sceNetClearDnsCache(s32 flags) +{ + throw __FUNCTION__; +} + +s32 sceNetDumpCreate(vm::psv::ptr name, s32 len, s32 flags) +{ + throw __FUNCTION__; +} + +s32 sceNetDumpRead(s32 id, vm::psv::ptr buf, s32 len, vm::psv::ptr pflags) +{ + throw __FUNCTION__; +} + +s32 sceNetDumpDestroy(s32 id) +{ + throw __FUNCTION__; +} + +s32 sceNetDumpAbort(s32 id, s32 flags) +{ + throw __FUNCTION__; +} + +s32 sceNetEpollCreate(vm::psv::ptr name, s32 flags) +{ + throw __FUNCTION__; +} + +s32 sceNetEpollControl(s32 eid, s32 op, s32 id, vm::psv::ptr event) +{ + throw __FUNCTION__; +} + +s32 sceNetEpollWait(s32 eid, vm::psv::ptr events, s32 maxevents, s32 timeout) +{ + throw __FUNCTION__; +} + +s32 sceNetEpollWaitCB(s32 eid, vm::psv::ptr events, s32 maxevents, s32 timeout) +{ + throw __FUNCTION__; +} + +s32 sceNetEpollDestroy(s32 eid) +{ + throw __FUNCTION__; +} + +s32 sceNetEpollAbort(s32 eid, s32 flags) +{ + throw __FUNCTION__; +} + +vm::psv::ptr sceNetErrnoLoc() +{ + throw __FUNCTION__; +} + +s32 sceNetEtherStrton(vm::psv::ptr str, vm::psv::ptr n) +{ + throw __FUNCTION__; +} + +s32 sceNetEtherNtostr(vm::psv::ptr n, vm::psv::ptr str, u32 len) +{ + throw __FUNCTION__; +} + +s32 sceNetGetMacAddress(vm::psv::ptr addr, s32 flags) +{ + throw __FUNCTION__; +} + +vm::psv::ptr sceNetInetNtop(s32 af, vm::psv::ptr src, vm::psv::ptr dst, SceNetSocklen_t size) +{ + throw __FUNCTION__; +} + +s32 sceNetInetPton(s32 af, vm::psv::ptr src, vm::psv::ptr dst) +{ + throw __FUNCTION__; +} + +u64 sceNetHtonll(u64 host64) +{ + throw __FUNCTION__; +} + +u32 sceNetHtonl(u32 host32) +{ + throw __FUNCTION__; +} + +u16 sceNetHtons(u16 host16) +{ + throw __FUNCTION__; +} + +u64 sceNetNtohll(u64 net64) +{ + throw __FUNCTION__; +} + +u32 sceNetNtohl(u32 net32) +{ + throw __FUNCTION__; +} + +u16 sceNetNtohs(u16 net16) +{ + throw __FUNCTION__; +} + +s32 sceNetInit(vm::psv::ptr param) +{ + throw __FUNCTION__; +} + +s32 sceNetTerm() +{ + throw __FUNCTION__; +} + +s32 sceNetShowIfconfig() +{ + throw __FUNCTION__; +} + +s32 sceNetShowRoute() +{ + throw __FUNCTION__; +} + +s32 sceNetShowNetstat() +{ + throw __FUNCTION__; +} + +s32 sceNetEmulationSet(vm::psv::ptr param, s32 flags) +{ + throw __FUNCTION__; +} + +s32 sceNetEmulationGet(vm::psv::ptr param, s32 flags) +{ + throw __FUNCTION__; +} + +s32 sceNetResolverCreate(vm::psv::ptr name, vm::psv::ptr param, s32 flags) +{ + throw __FUNCTION__; +} + +s32 sceNetResolverStartNtoa(s32 rid, vm::psv::ptr hostname, vm::psv::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) +{ + throw __FUNCTION__; +} + +s32 sceNetResolverGetError(s32 rid, vm::psv::ptr result) +{ + throw __FUNCTION__; +} + +s32 sceNetResolverDestroy(s32 rid) +{ + throw __FUNCTION__; +} + +s32 sceNetResolverAbort(s32 rid, s32 flags) +{ + throw __FUNCTION__; +} + +s32 sceNetSocket(vm::psv::ptr name, s32 domain, s32 type, s32 protocol) +{ + throw __FUNCTION__; +} + +s32 sceNetAccept(s32 s, vm::psv::ptr addr, vm::psv::ptr addrlen) +{ + throw __FUNCTION__; +} + +s32 sceNetBind(s32 s, vm::psv::ptr addr, SceNetSocklen_t addrlen) +{ + throw __FUNCTION__; +} + +s32 sceNetConnect(s32 s, vm::psv::ptr name, SceNetSocklen_t namelen) +{ + throw __FUNCTION__; +} + +s32 sceNetGetpeername(s32 s, vm::psv::ptr name, vm::psv::ptr namelen) +{ + throw __FUNCTION__; +} + +s32 sceNetGetsockname(s32 s, vm::psv::ptr name, vm::psv::ptr namelen) +{ + throw __FUNCTION__; +} + +s32 sceNetGetsockopt(s32 s, s32 level, s32 optname, vm::psv::ptr optval, vm::psv::ptr optlen) +{ + throw __FUNCTION__; +} + +s32 sceNetListen(s32 s, s32 backlog) +{ + throw __FUNCTION__; +} + +s32 sceNetRecv(s32 s, vm::psv::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) +{ + throw __FUNCTION__; +} + +s32 sceNetRecvmsg(s32 s, vm::psv::ptr msg, s32 flags) +{ + throw __FUNCTION__; +} + +s32 sceNetSend(s32 s, vm::psv::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) +{ + throw __FUNCTION__; +} + +s32 sceNetSendmsg(s32 s, vm::psv::ptr msg, s32 flags) +{ + throw __FUNCTION__; +} + +s32 sceNetSetsockopt(s32 s, s32 level, s32 optname, vm::psv::ptr optval, SceNetSocklen_t optlen) +{ + throw __FUNCTION__; +} + +s32 sceNetShutdown(s32 s, s32 how) +{ + throw __FUNCTION__; +} + +s32 sceNetSocketClose(s32 s) +{ + throw __FUNCTION__; +} + +s32 sceNetSocketAbort(s32 s, s32 flags) +{ + throw __FUNCTION__; +} + +s32 sceNetGetSockInfo(s32 s, vm::psv::ptr info, s32 n, s32 flags) +{ + throw __FUNCTION__; +} + +s32 sceNetGetSockIdInfo(vm::psv::ptr fds, s32 sockinfoflags, s32 flags) +{ + throw __FUNCTION__; +} + +s32 sceNetGetStatisticsInfo(vm::psv::ptr info, s32 flags) +{ + throw __FUNCTION__; +} + #define REG_FUNC(nid, name) reg_psv_func(nid, &sceNet, #name, name) @@ -12,62 +303,62 @@ psv_log_base sceNet("SceNet", []() sceNet.on_unload = nullptr; sceNet.on_stop = nullptr; - //REG_FUNC(0xD62EF218, sceNetSetDnsInfo); - //REG_FUNC(0xFEC1166D, sceNetClearDnsCache); - //REG_FUNC(0xAFF9FA4D, sceNetDumpCreate); - //REG_FUNC(0x04042925, sceNetDumpRead); - //REG_FUNC(0x82DDCF63, sceNetDumpDestroy); - //REG_FUNC(0x3B24E75F, sceNetDumpAbort); - //REG_FUNC(0xF9D102AE, sceNetEpollCreate); - //REG_FUNC(0x4C8764AC, sceNetEpollControl); - //REG_FUNC(0x45CE337D, sceNetEpollWait); - //REG_FUNC(0x92D3E767, sceNetEpollWaitCB); - //REG_FUNC(0x7915CAF3, sceNetEpollDestroy); - //REG_FUNC(0x93FCC4E8, sceNetEpollAbort); - //REG_FUNC(0xE37F34AA, sceNetErrnoLoc); - //REG_FUNC(0xEEC6D75F, sceNetEtherStrton); - //REG_FUNC(0x84334EB2, sceNetEtherNtostr); - //REG_FUNC(0x06C05518, sceNetGetMacAddress); - //REG_FUNC(0x98839B74, sceNetInetNtop); - //REG_FUNC(0xD5EEB048, sceNetInetPton); - //REG_FUNC(0x12C19209, sceNetHtonll); - //REG_FUNC(0x4C30B03C, sceNetHtonl); - //REG_FUNC(0x9FA3207B, sceNetHtons); - //REG_FUNC(0xFB3336A6, sceNetNtohll); - //REG_FUNC(0xD2EAA645, sceNetNtohl); - //REG_FUNC(0x07845128, sceNetNtohs); - //REG_FUNC(0xEB03E265, sceNetInit); - //REG_FUNC(0xEA3CC286, sceNetTerm); - //REG_FUNC(0x658B903B, sceNetShowIfconfig); - //REG_FUNC(0x6AB3B74B, sceNetShowRoute); - //REG_FUNC(0x338EDC2E, sceNetShowNetstat); - //REG_FUNC(0x561DFD03, sceNetEmulationSet); - //REG_FUNC(0xAE3F4AC6, sceNetEmulationGet); - //REG_FUNC(0x6DA29319, sceNetResolverCreate); - //REG_FUNC(0x1EB11857, sceNetResolverStartNtoa); - //REG_FUNC(0x0424AE26, sceNetResolverStartAton); - //REG_FUNC(0x874EF500, sceNetResolverGetError); - //REG_FUNC(0x3559F098, sceNetResolverDestroy); - //REG_FUNC(0x38EBBD57, sceNetResolverAbort); - //REG_FUNC(0xF084FCE3, sceNetSocket); - //REG_FUNC(0x1ADF9BB1, sceNetAccept); - //REG_FUNC(0x1296A94B, sceNetBind); - //REG_FUNC(0x11E5B6F6, sceNetConnect); - //REG_FUNC(0x2348D353, sceNetGetpeername); - //REG_FUNC(0x1C66A6DB, sceNetGetsockname); - //REG_FUNC(0xBA652062, sceNetGetsockopt); - //REG_FUNC(0x7A8DA094, sceNetListen); - //REG_FUNC(0x023643B7, sceNetRecv); - //REG_FUNC(0xB226138B, sceNetRecvfrom); - //REG_FUNC(0xDE94C6FE, sceNetRecvmsg); - //REG_FUNC(0xE3DD8CD9, sceNetSend); - //REG_FUNC(0x52DB31D5, sceNetSendto); - //REG_FUNC(0x99C579AE, sceNetSendmsg); - //REG_FUNC(0x065505CA, sceNetSetsockopt); - //REG_FUNC(0x69E50BB5, sceNetShutdown); - //REG_FUNC(0x29822B4D, sceNetSocketClose); - //REG_FUNC(0x891C1B9B, sceNetSocketAbort); - //REG_FUNC(0xB1AF6840, sceNetGetSockInfo); - //REG_FUNC(0x138CF1D6, sceNetGetSockIdInfo); - //REG_FUNC(0xA86F8FE5, sceNetGetStatisticsInfo); + REG_FUNC(0xD62EF218, sceNetSetDnsInfo); + REG_FUNC(0xFEC1166D, sceNetClearDnsCache); + REG_FUNC(0xAFF9FA4D, sceNetDumpCreate); + REG_FUNC(0x04042925, sceNetDumpRead); + REG_FUNC(0x82DDCF63, sceNetDumpDestroy); + REG_FUNC(0x3B24E75F, sceNetDumpAbort); + REG_FUNC(0xF9D102AE, sceNetEpollCreate); + REG_FUNC(0x4C8764AC, sceNetEpollControl); + REG_FUNC(0x45CE337D, sceNetEpollWait); + REG_FUNC(0x92D3E767, sceNetEpollWaitCB); + REG_FUNC(0x7915CAF3, sceNetEpollDestroy); + REG_FUNC(0x93FCC4E8, sceNetEpollAbort); + REG_FUNC(0xE37F34AA, sceNetErrnoLoc); + REG_FUNC(0xEEC6D75F, sceNetEtherStrton); + REG_FUNC(0x84334EB2, sceNetEtherNtostr); + REG_FUNC(0x06C05518, sceNetGetMacAddress); + REG_FUNC(0x98839B74, sceNetInetNtop); + REG_FUNC(0xD5EEB048, sceNetInetPton); + REG_FUNC(0x12C19209, sceNetHtonll); + REG_FUNC(0x4C30B03C, sceNetHtonl); + REG_FUNC(0x9FA3207B, sceNetHtons); + REG_FUNC(0xFB3336A6, sceNetNtohll); + REG_FUNC(0xD2EAA645, sceNetNtohl); + REG_FUNC(0x07845128, sceNetNtohs); + REG_FUNC(0xEB03E265, sceNetInit); + REG_FUNC(0xEA3CC286, sceNetTerm); + REG_FUNC(0x658B903B, sceNetShowIfconfig); + REG_FUNC(0x6AB3B74B, sceNetShowRoute); + REG_FUNC(0x338EDC2E, sceNetShowNetstat); + REG_FUNC(0x561DFD03, sceNetEmulationSet); + REG_FUNC(0xAE3F4AC6, sceNetEmulationGet); + REG_FUNC(0x6DA29319, sceNetResolverCreate); + REG_FUNC(0x1EB11857, sceNetResolverStartNtoa); + REG_FUNC(0x0424AE26, sceNetResolverStartAton); + REG_FUNC(0x874EF500, sceNetResolverGetError); + REG_FUNC(0x3559F098, sceNetResolverDestroy); + REG_FUNC(0x38EBBD57, sceNetResolverAbort); + REG_FUNC(0xF084FCE3, sceNetSocket); + REG_FUNC(0x1ADF9BB1, sceNetAccept); + REG_FUNC(0x1296A94B, sceNetBind); + REG_FUNC(0x11E5B6F6, sceNetConnect); + REG_FUNC(0x2348D353, sceNetGetpeername); + REG_FUNC(0x1C66A6DB, sceNetGetsockname); + REG_FUNC(0xBA652062, sceNetGetsockopt); + REG_FUNC(0x7A8DA094, sceNetListen); + REG_FUNC(0x023643B7, sceNetRecv); + REG_FUNC(0xB226138B, sceNetRecvfrom); + REG_FUNC(0xDE94C6FE, sceNetRecvmsg); + REG_FUNC(0xE3DD8CD9, sceNetSend); + REG_FUNC(0x52DB31D5, sceNetSendto); + REG_FUNC(0x99C579AE, sceNetSendmsg); + REG_FUNC(0x065505CA, sceNetSetsockopt); + REG_FUNC(0x69E50BB5, sceNetShutdown); + REG_FUNC(0x29822B4D, sceNetSocketClose); + REG_FUNC(0x891C1B9B, sceNetSocketAbort); + REG_FUNC(0xB1AF6840, sceNetGetSockInfo); + REG_FUNC(0x138CF1D6, sceNetGetSockIdInfo); + REG_FUNC(0xA86F8FE5, sceNetGetStatisticsInfo); }); diff --git a/rpcs3/Emu/ARMv7/Modules/sceNet.h b/rpcs3/Emu/ARMv7/Modules/sceNet.h new file mode 100644 index 0000000000..1d30bdfdd0 --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/sceNet.h @@ -0,0 +1,187 @@ +#pragma once + +typedef u32 SceNetInAddr_t; +typedef u16 SceNetInPort_t; +typedef u8 SceNetSaFamily_t; +typedef u32 SceNetSocklen_t; + +struct SceNetInAddr +{ + SceNetInAddr_t s_addr; +}; + +struct SceNetSockaddrIn +{ + u8 sin_len; + SceNetSaFamily_t sin_family; + SceNetInPort_t sin_port; + SceNetInAddr sin_addr; + SceNetInPort_t sin_vport; + char sin_zero[6]; +}; + +struct SceNetDnsInfo +{ + SceNetInAddr dns_addr[2]; +}; + +struct SceNetSockaddr +{ + u8 sa_len; + SceNetSaFamily_t sa_family; + char sa_data[14]; +}; + +struct SceNetEpollDataExt +{ + s32 id; + u32 u32; +}; + +union SceNetEpollData +{ + vm::psv::ptr ptr; + s32 fd; + u32 u32; + u64 u64; + SceNetEpollDataExt ext; +}; + +struct SceNetEpollSystemData +{ + u32 system[4]; +}; + +struct SceNetEpollEvent +{ + u32 events; + u32 reserved; + SceNetEpollSystemData system; + SceNetEpollData data; +}; + +struct SceNetEtherAddr +{ + u8 data[6]; +}; + +typedef u32 SceNetIdMask; + +struct SceNetFdSet +{ + SceNetIdMask bits[32]; +}; + +struct SceNetIpMreq +{ + SceNetInAddr imr_multiaddr; + SceNetInAddr imr_interface; +}; + +struct SceNetInitParam +{ + vm::psv::ptr memory; + s32 size; + s32 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]; + u8 reserved[64]; +}; + +struct SceNetEmulationParam +{ + u16 version; + u16 option_number; + u16 current_version; + u16 result; + u32 flags; + u32 reserved1; + SceNetEmulationData send; + SceNetEmulationData recv; + u32 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; + +struct SceNetResolverParam +{ + SceNetResolverFunctionAllocate allocate; + SceNetResolverFunctionFree free; + vm::psv::ptr user; +}; + +struct SceNetLinger +{ + s32 l_onoff; + s32 l_linger; +}; + +struct SceNetIovec +{ + vm::psv::ptr iov_base; + u32 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; +}; + +struct SceNetSockInfo +{ + char name[32]; + s32 pid; + s32 s; + s8 socket_type; + s8 policy; + s16 reserved16; + s32 recv_queue_length; + s32 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]; +}; + +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; +}; + + +extern psv_log_base sceNet; diff --git a/rpcs3/Emu/ARMv7/Modules/sceNetCtl.cpp b/rpcs3/Emu/ARMv7/Modules/sceNetCtl.cpp index cde7d28916..7f15d6bf1f 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceNetCtl.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceNetCtl.cpp @@ -2,8 +2,132 @@ #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; + +s32 sceNetCtlInit() +{ + throw __FUNCTION__; +} + +void sceNetCtlTerm() +{ + throw __FUNCTION__; +} + +s32 sceNetCtlCheckCallback() +{ + throw __FUNCTION__; +} + +s32 sceNetCtlInetGetResult(s32 eventType, vm::psv::ptr errorCode) +{ + throw __FUNCTION__; +} + +s32 sceNetCtlAdhocGetResult(s32 eventType, vm::psv::ptr errorCode) +{ + throw __FUNCTION__; +} + +s32 sceNetCtlInetGetInfo(s32 code, vm::psv::ptr info) +{ + throw __FUNCTION__; +} + +s32 sceNetCtlInetGetState(vm::psv::ptr state) +{ + throw __FUNCTION__; +} + +s32 sceNetCtlGetNatInfo(vm::psv::ptr natinfo) +{ + throw __FUNCTION__; +} + +s32 sceNetCtlInetRegisterCallback(SceNetCtlCallback func, vm::psv::ptr arg, vm::psv::ptr cid) +{ + throw __FUNCTION__; +} + +s32 sceNetCtlInetUnregisterCallback(s32 cid) +{ + throw __FUNCTION__; +} + +s32 sceNetCtlAdhocRegisterCallback(SceNetCtlCallback func, vm::psv::ptr arg, vm::psv::ptr cid) +{ + throw __FUNCTION__; +} + +s32 sceNetCtlAdhocUnregisterCallback(s32 cid) +{ + throw __FUNCTION__; +} + +s32 sceNetCtlAdhocGetState(vm::psv::ptr state) +{ + throw __FUNCTION__; +} + +s32 sceNetCtlAdhocDisconnect() +{ + throw __FUNCTION__; +} + +s32 sceNetCtlAdhocGetPeerList(vm::psv::ptr buflen, vm::psv::ptr buf) +{ + throw __FUNCTION__; +} + +s32 sceNetCtlAdhocGetInAddr(vm::psv::ptr inaddr) +{ + throw __FUNCTION__; +} + #define REG_FUNC(nid, name) reg_psv_func(nid, &sceNetCtl, #name, name) psv_log_base sceNetCtl("SceNetCtl", []() @@ -12,20 +136,20 @@ psv_log_base sceNetCtl("SceNetCtl", []() sceNetCtl.on_unload = nullptr; sceNetCtl.on_stop = nullptr; - //REG_FUNC(0x495CA1DB, sceNetCtlInit); - //REG_FUNC(0xCD188648, sceNetCtlTerm); - //REG_FUNC(0xDFFC3ED4, sceNetCtlCheckCallback); - //REG_FUNC(0x6B20EC02, sceNetCtlInetGetResult); - //REG_FUNC(0x7AE0ED19, sceNetCtlAdhocGetResult); - //REG_FUNC(0xB26D07F3, sceNetCtlInetGetInfo); - //REG_FUNC(0x6D26AC68, sceNetCtlInetGetState); - //REG_FUNC(0xEAEE6185, sceNetCtlInetRegisterCallback); - //REG_FUNC(0xD0C3BF3F, sceNetCtlInetUnregisterCallback); - //REG_FUNC(0x4DDD6149, sceNetCtlGetNatInfo); - //REG_FUNC(0x0961A561, sceNetCtlAdhocGetState); - //REG_FUNC(0xFFA9D594, sceNetCtlAdhocRegisterCallback); - //REG_FUNC(0xA4471E10, sceNetCtlAdhocUnregisterCallback); - //REG_FUNC(0xED43B79A, sceNetCtlAdhocDisconnect); - //REG_FUNC(0x77586C59, sceNetCtlAdhocGetPeerList); - //REG_FUNC(0x7118C99D, sceNetCtlAdhocGetInAddr); + REG_FUNC(0x495CA1DB, sceNetCtlInit); + REG_FUNC(0xCD188648, sceNetCtlTerm); + REG_FUNC(0xDFFC3ED4, sceNetCtlCheckCallback); + REG_FUNC(0x6B20EC02, sceNetCtlInetGetResult); + REG_FUNC(0x7AE0ED19, sceNetCtlAdhocGetResult); + REG_FUNC(0xB26D07F3, sceNetCtlInetGetInfo); + REG_FUNC(0x6D26AC68, sceNetCtlInetGetState); + REG_FUNC(0xEAEE6185, sceNetCtlInetRegisterCallback); + REG_FUNC(0xD0C3BF3F, sceNetCtlInetUnregisterCallback); + REG_FUNC(0x4DDD6149, sceNetCtlGetNatInfo); + REG_FUNC(0x0961A561, sceNetCtlAdhocGetState); + REG_FUNC(0xFFA9D594, sceNetCtlAdhocRegisterCallback); + REG_FUNC(0xA4471E10, sceNetCtlAdhocUnregisterCallback); + REG_FUNC(0xED43B79A, sceNetCtlAdhocDisconnect); + REG_FUNC(0x77586C59, sceNetCtlAdhocGetPeerList); + REG_FUNC(0x7118C99D, sceNetCtlAdhocGetInAddr); }); diff --git a/rpcs3/Emu/ARMv7/Modules/scePhotoExport.cpp b/rpcs3/Emu/ARMv7/Modules/scePhotoExport.cpp index 2fab7c29d4..2046dff9ca 100644 --- a/rpcs3/Emu/ARMv7/Modules/scePhotoExport.cpp +++ b/rpcs3/Emu/ARMv7/Modules/scePhotoExport.cpp @@ -4,6 +4,42 @@ 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; + +s32 scePhotoExportFromData( + vm::psv::ptr photodata, + s32 photodataSize, + vm::psv::ptr param, + vm::psv::ptr workMemory, + ScePhotoExportCancelFunc cancelFunc, + vm::psv::ptr userdata, + vm::psv::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, + s32 exportedPathLength) +{ + throw __FUNCTION__; +} + #define REG_FUNC(nid, name) reg_psv_func(nid, &scePhotoExport, #name, name) psv_log_base scePhotoExport("ScePhotoExport", []() @@ -12,6 +48,6 @@ psv_log_base scePhotoExport("ScePhotoExport", []() scePhotoExport.on_unload = nullptr; scePhotoExport.on_stop = nullptr; - //REG_FUNC(0x70512321, scePhotoExportFromData); - //REG_FUNC(0x84FD9FC5, scePhotoExportFromFile); + REG_FUNC(0x70512321, scePhotoExportFromData); + REG_FUNC(0x84FD9FC5, scePhotoExportFromFile); }); diff --git a/rpcs3/Emu/ARMv7/Modules/sceRazorCapture.cpp b/rpcs3/Emu/ARMv7/Modules/sceRazorCapture.cpp index 4eaeb11070..c14fba50b6 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceRazorCapture.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceRazorCapture.cpp @@ -4,6 +4,21 @@ extern psv_log_base sceRazorCapture; +void sceRazorCaptureSetTrigger(u32 frameIndex, vm::psv::ptr captureFilename) +{ + throw __FUNCTION__; +} + +void sceRazorCaptureSetTriggerNextFrame(vm::psv::ptr captureFilename) +{ + throw __FUNCTION__; +} + +bool sceRazorCaptureIsInProgress() +{ + throw __FUNCTION__; +} + #define REG_FUNC(nid, name) reg_psv_func(nid, &sceRazorCapture, #name, name) psv_log_base sceRazorCapture("SceRazorCapture", []() @@ -12,7 +27,7 @@ psv_log_base sceRazorCapture("SceRazorCapture", []() sceRazorCapture.on_unload = nullptr; sceRazorCapture.on_stop = nullptr; - //REG_FUNC(0x911E0AA0, sceRazorCaptureIsInProgress); - //REG_FUNC(0xE916B538, sceRazorCaptureSetTrigger); - //REG_FUNC(0x3D4B7E68, sceRazorCaptureSetTriggerNextFrame); + REG_FUNC(0x911E0AA0, sceRazorCaptureIsInProgress); + REG_FUNC(0xE916B538, sceRazorCaptureSetTrigger); + REG_FUNC(0x3D4B7E68, sceRazorCaptureSetTriggerNextFrame); }); diff --git a/rpcs3/Emu/ARMv7/Modules/sceScreenShot.cpp b/rpcs3/Emu/ARMv7/Modules/sceScreenShot.cpp index 47ab0d614c..07b3f0a467 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceScreenShot.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceScreenShot.cpp @@ -4,6 +4,35 @@ extern psv_log_base sceScreenShot; +struct SceScreenShotParam +{ + vm::psv::ptr photoTitle; + vm::psv::ptr gameTitle; + vm::psv::ptr gameComment; + vm::psv::ptr reserved; +}; + +s32 sceScreenShotSetParam(vm::psv::ptr param) +{ + throw __FUNCTION__; +} + +s32 sceScreenShotSetOverlayImage(vm::psv::ptr filePath, s32 offsetX, s32 offsetY) +{ + throw __FUNCTION__; +} + +s32 sceScreenShotDisable() +{ + throw __FUNCTION__; +} + +s32 sceScreenShotEnable() +{ + throw __FUNCTION__; +} + + #define REG_FUNC(nid, name) reg_psv_func(nid, &sceScreenShot, #name, name) psv_log_base sceScreenShot("SceScreenShot", []() @@ -12,8 +41,8 @@ psv_log_base sceScreenShot("SceScreenShot", []() sceScreenShot.on_unload = nullptr; sceScreenShot.on_stop = nullptr; - //REG_FUNC(0x05DB59C7, sceScreenShotSetParam); - //REG_FUNC(0x7061665B, sceScreenShotSetOverlayImage); - //REG_FUNC(0x50AE9FF9, sceScreenShotDisable); - //REG_FUNC(0x76E674D1, sceScreenShotEnable); + REG_FUNC(0x05DB59C7, sceScreenShotSetParam); + REG_FUNC(0x7061665B, sceScreenShotSetOverlayImage); + REG_FUNC(0x50AE9FF9, sceScreenShotDisable); + REG_FUNC(0x76E674D1, sceScreenShotEnable); }); diff --git a/rpcs3/Emu/ARMv7/Modules/sceSsl.cpp b/rpcs3/Emu/ARMv7/Modules/sceSsl.cpp index 51032ab5fd..02a377996a 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceSsl.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceSsl.cpp @@ -2,7 +2,63 @@ #include "Emu/System.h" #include "Emu/ARMv7/PSVFuncList.h" -extern psv_log_base sceSsl; +#include "sceSsl.h" + +s32 sceSslInit(u32 poolSize) +{ + throw __FUNCTION__; +} + +s32 sceSslTerm() +{ + throw __FUNCTION__; +} + +s32 sceSslGetMemoryPoolStats(vm::psv::ptr currentStat) +{ + throw __FUNCTION__; +} + +s32 sceSslGetSerialNumber(vm::psv::ptr sslCert, vm::psv::ptr> sboData, vm::psv::ptr sboLen) +{ + throw __FUNCTION__; +} + +vm::psv::ptr sceSslGetSubjectName(vm::psv::ptr sslCert) +{ + throw __FUNCTION__; +} + +vm::psv::ptr sceSslGetIssuerName(vm::psv::ptr sslCert) +{ + throw __FUNCTION__; +} + +s32 sceSslGetNotBefore(vm::psv::ptr sslCert, vm::psv::ptr begin) +{ + throw __FUNCTION__; +} + +s32 sceSslGetNotAfter(vm::psv::ptr sslCert, vm::psv::ptr limit) +{ + throw __FUNCTION__; +} + +s32 sceSslGetNameEntryCount(vm::psv::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) +{ + throw __FUNCTION__; +} + +s32 sceSslFreeSslCertName(vm::psv::ptr certName) +{ + throw __FUNCTION__; +} + #define REG_FUNC(nid, name) reg_psv_func(nid, &sceSsl, #name, name) @@ -12,15 +68,15 @@ psv_log_base sceSsl("SceSsl", []() sceSsl.on_unload = nullptr; sceSsl.on_stop = nullptr; - //REG_FUNC(0x3C733316, sceSslInit); - //REG_FUNC(0x03CE6E3A, sceSslTerm); - //REG_FUNC(0xBD203262, sceSslGetMemoryPoolStats); - //REG_FUNC(0x901C5C15, sceSslGetSerialNumber); - //REG_FUNC(0x9B2F1BC1, sceSslGetSubjectName); - //REG_FUNC(0x412711E5, sceSslGetIssuerName); - //REG_FUNC(0x70DEA174, sceSslGetNotBefore); - //REG_FUNC(0xF5ED7B68, sceSslGetNotAfter); - //REG_FUNC(0x95E14CA6, sceSslGetNameEntryCount); - //REG_FUNC(0x2A857867, sceSslGetNameEntryInfo); - //REG_FUNC(0xC73687E4, sceSslFreeSslCertName); + REG_FUNC(0x3C733316, sceSslInit); + REG_FUNC(0x03CE6E3A, sceSslTerm); + REG_FUNC(0xBD203262, sceSslGetMemoryPoolStats); + REG_FUNC(0x901C5C15, sceSslGetSerialNumber); + REG_FUNC(0x9B2F1BC1, sceSslGetSubjectName); + REG_FUNC(0x412711E5, sceSslGetIssuerName); + REG_FUNC(0x70DEA174, sceSslGetNotBefore); + REG_FUNC(0xF5ED7B68, sceSslGetNotAfter); + REG_FUNC(0x95E14CA6, sceSslGetNameEntryCount); + REG_FUNC(0x2A857867, sceSslGetNameEntryInfo); + REG_FUNC(0xC73687E4, sceSslFreeSslCertName); }); diff --git a/rpcs3/Emu/ARMv7/Modules/sceSsl.h b/rpcs3/Emu/ARMv7/Modules/sceSsl.h new file mode 100644 index 0000000000..3d60ac45e5 --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/sceSsl.h @@ -0,0 +1,14 @@ +#pragma once + +typedef void SceSslCert; +typedef void SceSslCertName; + +struct SceSslMemoryPoolStats +{ + u32 poolSize; + u32 maxInuseSize; + u32 currentInuseSize; + s32 reserved; +}; + +extern psv_log_base sceSsl; diff --git a/rpcs3/Emu/ARMv7/Modules/sceSulpha.cpp b/rpcs3/Emu/ARMv7/Modules/sceSulpha.cpp index 09c50ce4e9..3df26668a4 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceSulpha.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceSulpha.cpp @@ -4,6 +4,84 @@ extern psv_log_base sceSulpha; +typedef vm::psv::ptr arg)> SceSulphaCallback; + +struct SceSulphaConfig +{ + SceSulphaCallback notifyCallback; + u32 port; + u32 bookmarkCount; +}; + +struct SceSulphaAgentsRegister; +typedef void SceSulphaHandle; + +s32 sceSulphaNetworkInit() +{ + throw __FUNCTION__; +} + +s32 sceSulphaNetworkShutdown() +{ + throw __FUNCTION__; +} + +s32 sceSulphaGetDefaultConfig(vm::psv::ptr config) +{ + throw __FUNCTION__; +} + +s32 sceSulphaGetNeededMemory(vm::psv::ptr config, vm::psv::ptr sizeInBytes) +{ + throw __FUNCTION__; +} + +s32 sceSulphaInit(vm::psv::ptr config, vm::psv::ptr buffer, u32 sizeInBytes) +{ + throw __FUNCTION__; +} + +s32 sceSulphaShutdown() +{ + throw __FUNCTION__; +} + +s32 sceSulphaUpdate() +{ + throw __FUNCTION__; +} + +s32 sceSulphaFileConnect(vm::psv::ptr filename) +{ + throw __FUNCTION__; +} + +s32 sceSulphaFileDisconnect() +{ + throw __FUNCTION__; +} + +s32 sceSulphaSetBookmark(vm::psv::ptr name, s32 id) +{ + throw __FUNCTION__; +} + +s32 sceSulphaAgentsGetNeededMemory(vm::psv::ptr config, vm::psv::ptr sizeInBytes) +{ + throw __FUNCTION__; +} + +s32 sceSulphaAgentsRegister(vm::psv::ptr config, vm::psv::ptr buffer, u32 sizeInBytes, vm::psv::ptr handles) +{ + throw __FUNCTION__; +} + +s32 sceSulphaAgentsUnregister(vm::psv::ptr handles, u32 agentCount) +{ + throw __FUNCTION__; +} + + #define REG_FUNC(nid, name) reg_psv_func(nid, &sceSulpha, #name, name) psv_log_base sceSulpha("SceSulpha", []() @@ -12,19 +90,19 @@ psv_log_base sceSulpha("SceSulpha", []() sceSulpha.on_unload = nullptr; sceSulpha.on_stop = nullptr; - //REG_FUNC(0xB4668AEA, sceSulphaNetworkInit); - //REG_FUNC(0x0FC71B72, sceSulphaNetworkShutdown); - //REG_FUNC(0xA6A05C50, sceSulphaGetDefaultConfig); - //REG_FUNC(0xD52E5A5A, sceSulphaGetNeededMemory); - //REG_FUNC(0x324F158F, sceSulphaInit); - //REG_FUNC(0x10770BA7, sceSulphaShutdown); - //REG_FUNC(0x920EC7BF, sceSulphaUpdate); - //REG_FUNC(0x7968A138, sceSulphaFileConnect); - //REG_FUNC(0xB16E7B88, sceSulphaFileDisconnect); - //REG_FUNC(0x5E15E164, sceSulphaSetBookmark); - //REG_FUNC(0xC5752B6B, sceSulphaAgentsGetNeededMemory); - //REG_FUNC(0x7ADB454D, sceSulphaAgentsRegister); - //REG_FUNC(0x2A8B74D7, sceSulphaAgentsUnregister); + REG_FUNC(0xB4668AEA, sceSulphaNetworkInit); + REG_FUNC(0x0FC71B72, sceSulphaNetworkShutdown); + REG_FUNC(0xA6A05C50, sceSulphaGetDefaultConfig); + REG_FUNC(0xD52E5A5A, sceSulphaGetNeededMemory); + REG_FUNC(0x324F158F, sceSulphaInit); + REG_FUNC(0x10770BA7, sceSulphaShutdown); + REG_FUNC(0x920EC7BF, sceSulphaUpdate); + REG_FUNC(0x7968A138, sceSulphaFileConnect); + REG_FUNC(0xB16E7B88, sceSulphaFileDisconnect); + REG_FUNC(0x5E15E164, sceSulphaSetBookmark); + REG_FUNC(0xC5752B6B, sceSulphaAgentsGetNeededMemory); + REG_FUNC(0x7ADB454D, sceSulphaAgentsRegister); + REG_FUNC(0x2A8B74D7, sceSulphaAgentsUnregister); //REG_FUNC(0xDE7E2911, sceSulphaGetAgent); //REG_FUNC(0xA41B7402, sceSulphaNodeNew); //REG_FUNC(0xD44C9F86, sceSulphaNodeDelete); diff --git a/rpcs3/Emu/ARMv7/Modules/sceTouch.cpp b/rpcs3/Emu/ARMv7/Modules/sceTouch.cpp index 6636644e0d..ee13162e61 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceTouch.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceTouch.cpp @@ -4,6 +4,65 @@ extern psv_log_base sceTouch; +struct SceTouchPanelInfo +{ + s16 minAaX; + s16 minAaY; + s16 maxAaX; + s16 maxAaY; + s16 minDispX; + s16 minDispY; + s16 maxDispX; + s16 maxDispY; + u8 minForce; + u8 maxForce; + u8 rsv[30]; +}; + +struct SceTouchReport +{ + u8 id; + u8 force; + s16 x; + s16 y; + s8 rsv[8]; + u16 info; +}; + +struct SceTouchData +{ + u64 timeStamp; + u32 status; + u32 reportNum; + SceTouchReport report[8]; +}; + +s32 sceTouchGetPanelInfo(u32 port, vm::psv::ptr pPanelInfo) +{ + throw __FUNCTION__; +} + +s32 sceTouchRead(u32 port, vm::psv::ptr pData, u32 nBufs) +{ + throw __FUNCTION__; +} + +s32 sceTouchPeek(u32 port, vm::psv::ptr pData, u32 nBufs) +{ + throw __FUNCTION__; +} + +s32 sceTouchSetSamplingState(u32 port, u32 state) +{ + throw __FUNCTION__; +} + +s32 sceTouchGetSamplingState(u32 port, vm::psv::ptr pState) +{ + throw __FUNCTION__; +} + + #define REG_FUNC(nid, name) reg_psv_func(nid, &sceTouch, #name, name) psv_log_base sceTouch("SceTouch", []() @@ -12,9 +71,9 @@ psv_log_base sceTouch("SceTouch", []() sceTouch.on_unload = nullptr; sceTouch.on_stop = nullptr; - //REG_FUNC(0x169A1D58, sceTouchRead); - //REG_FUNC(0xFF082DF0, sceTouchPeek); - //REG_FUNC(0x1B9C5D14, sceTouchSetSamplingState); - //REG_FUNC(0x26531526, sceTouchGetSamplingState); - //REG_FUNC(0x10A2CA25, sceTouchGetPanelInfo); + REG_FUNC(0x169A1D58, sceTouchRead); + REG_FUNC(0xFF082DF0, sceTouchPeek); + REG_FUNC(0x1B9C5D14, sceTouchSetSamplingState); + REG_FUNC(0x26531526, sceTouchGetSamplingState); + REG_FUNC(0x10A2CA25, sceTouchGetPanelInfo); }); diff --git a/rpcs3/Emu/ARMv7/Modules/sceVideodec.cpp b/rpcs3/Emu/ARMv7/Modules/sceVideodec.cpp index 472c7bbfb3..bec390ebe1 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceVideodec.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceVideodec.cpp @@ -4,6 +4,178 @@ extern psv_log_base sceVideodec; +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::ptr> pPicture; +}; + + +s32 sceVideodecInitLibrary(u32 codecType, vm::psv::ptr pInitInfo) +{ + throw __FUNCTION__; +} + +s32 sceVideodecTermLibrary(u32 codecType) +{ + throw __FUNCTION__; +} + +s32 sceAvcdecQueryDecoderMemSize(u32 codecType, vm::psv::ptr pDecoderInfo, vm::psv::ptr pMemInfo) +{ + throw __FUNCTION__; +} + +s32 sceAvcdecCreateDecoder(u32 codecType, vm::psv::ptr pCtrl, vm::psv::ptr pDecoderInfo) +{ + throw __FUNCTION__; +} + +s32 sceAvcdecDeleteDecoder(vm::psv::ptr pCtrl) +{ + throw __FUNCTION__; +} + +s32 sceAvcdecDecodeAvailableSize(vm::psv::ptr pCtrl) +{ + throw __FUNCTION__; +} + +s32 sceAvcdecDecode(vm::psv::ptr pCtrl, vm::psv::ptr pAu, vm::psv::ptr pArrayPicture) +{ + throw __FUNCTION__; +} + +s32 sceAvcdecDecodeStop(vm::psv::ptr pCtrl, vm::psv::ptr pArrayPicture) +{ + throw __FUNCTION__; +} + +s32 sceAvcdecDecodeFlush(vm::psv::ptr pCtrl) +{ + throw __FUNCTION__; +} + + #define REG_FUNC(nid, name) reg_psv_func(nid, &sceVideodec, #name, name) psv_log_base sceVideodec("SceVideodec", []() @@ -12,15 +184,15 @@ psv_log_base sceVideodec("SceVideodec", []() sceVideodec.on_unload = nullptr; sceVideodec.on_stop = nullptr; - //REG_FUNC(0xF1AF65A3, sceVideodecInitLibrary); - //REG_FUNC(0x3A5F4924, sceVideodecTermLibrary); - //REG_FUNC(0x97E95EDB, sceAvcdecQueryDecoderMemSize); - //REG_FUNC(0xE82BB69B, sceAvcdecCreateDecoder); - //REG_FUNC(0x8A0E359E, sceAvcdecDeleteDecoder); - //REG_FUNC(0x441673E3, sceAvcdecDecodeAvailableSize); - //REG_FUNC(0xD6190A06, sceAvcdecDecode); - //REG_FUNC(0x9648D853, sceAvcdecDecodeStop); - //REG_FUNC(0x25F31020, sceAvcdecDecodeFlush); + REG_FUNC(0xF1AF65A3, sceVideodecInitLibrary); + REG_FUNC(0x3A5F4924, sceVideodecTermLibrary); + REG_FUNC(0x97E95EDB, sceAvcdecQueryDecoderMemSize); + REG_FUNC(0xE82BB69B, sceAvcdecCreateDecoder); + REG_FUNC(0x8A0E359E, sceAvcdecDeleteDecoder); + REG_FUNC(0x441673E3, sceAvcdecDecodeAvailableSize); + REG_FUNC(0xD6190A06, sceAvcdecDecode); + REG_FUNC(0x9648D853, sceAvcdecDecodeStop); + REG_FUNC(0x25F31020, sceAvcdecDecodeFlush); //REG_FUNC(0xB2A428DB, sceAvcdecCsc); //REG_FUNC(0x6C68A38F, sceAvcdecDecodeNalAu); //REG_FUNC(0xC67C1A80, sceM4vdecQueryDecoderMemSize); diff --git a/rpcs3/Emu/ARMv7/Modules/sceVoice.cpp b/rpcs3/Emu/ARMv7/Modules/sceVoice.cpp index 072f3d3303..cb0cfc8f53 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceVoice.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceVoice.cpp @@ -4,6 +4,252 @@ extern psv_log_base sceVoice; +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) +{ + throw __FUNCTION__; +} + +s32 sceVoiceEnd() +{ + throw __FUNCTION__; +} + +s32 sceVoiceStart(vm::psv::ptr pArg) +{ + throw __FUNCTION__; +} + +s32 sceVoiceStop() +{ + throw __FUNCTION__; +} + +s32 sceVoiceResetPort(u32 portId) +{ + throw __FUNCTION__; +} + +s32 sceVoiceCreatePort(vm::psv::ptr portId, vm::psv::ptr pArg) +{ + throw __FUNCTION__; +} + +s32 sceVoiceUpdatePort(u32 portId, vm::psv::ptr pArg) +{ + throw __FUNCTION__; +} + +s32 sceVoiceConnectIPortToOPort(u32 ips, u32 ops) +{ + throw __FUNCTION__; +} + +s32 sceVoiceDisconnectIPortFromOPort(u32 ips, u32 ops) +{ + throw __FUNCTION__; +} + +s32 sceVoiceDeletePort(u32 portId) +{ + throw __FUNCTION__; +} + +s32 sceVoiceWriteToIPort(u32 ips, vm::psv::ptr data, vm::psv::ptr size, int16_t frameGaps) +{ + throw __FUNCTION__; +} + +s32 sceVoiceReadFromOPort(u32 ops, vm::psv::ptr data, vm::psv::ptr size) +{ + throw __FUNCTION__; +} + +s32 sceVoiceSetMuteFlagAll(u16 bMuted) +{ + throw __FUNCTION__; +} + +s32 sceVoiceSetMuteFlag(u32 portId, u16 bMuted) +{ + throw __FUNCTION__; +} + +s32 sceVoiceGetMuteFlag(u32 portId, vm::psv::ptr bMuted) +{ + throw __FUNCTION__; +} + +//s32 sceVoiceSetVolume(u32 portId, float volume) +//{ +// throw __FUNCTION__; +//} + +s32 sceVoiceGetVolume(u32 portId, vm::psv::ptr volume) +{ + throw __FUNCTION__; +} + +s32 sceVoiceSetBitRate(u32 portId, SceVoiceBitRate bitrate) +{ + throw __FUNCTION__; +} + +s32 sceVoiceGetBitRate(u32 portId, vm::psv::ptr bitrate) +{ + throw __FUNCTION__; +} + +s32 sceVoiceGetPortInfo(u32 portId, vm::psv::ptr pInfo) +{ + throw __FUNCTION__; +} + +s32 sceVoicePausePort(u32 portId) +{ + throw __FUNCTION__; +} + +s32 sceVoiceResumePort(u32 portId) +{ + throw __FUNCTION__; +} + +s32 sceVoicePausePortAll() +{ + throw __FUNCTION__; +} + +s32 sceVoiceResumePortAll() +{ + throw __FUNCTION__; +} + +s32 sceVoiceGetResourceInfo(vm::psv::ptr pInfo) +{ + throw __FUNCTION__; +} + + #define REG_FUNC(nid, name) reg_psv_func(nid, &sceVoice, #name, name) psv_log_base sceVoice("SceVoice", []() @@ -12,29 +258,29 @@ psv_log_base sceVoice("SceVoice", []() sceVoice.on_unload = nullptr; sceVoice.on_stop = nullptr; - //REG_FUNC(0xD02C00B4, sceVoiceGetBitRate); - //REG_FUNC(0xC913F7E9, sceVoiceGetMuteFlag); - //REG_FUNC(0x875CC80D, sceVoiceGetVolume); - //REG_FUNC(0x02F58D6F, sceVoiceSetBitRate); - //REG_FUNC(0x0B9E4AE2, sceVoiceSetMuteFlag); - //REG_FUNC(0xDB90EAC4, sceVoiceSetMuteFlagAll); + REG_FUNC(0xD02C00B4, sceVoiceGetBitRate); + REG_FUNC(0xC913F7E9, sceVoiceGetMuteFlag); + REG_FUNC(0x875CC80D, sceVoiceGetVolume); + REG_FUNC(0x02F58D6F, sceVoiceSetBitRate); + REG_FUNC(0x0B9E4AE2, sceVoiceSetMuteFlag); + REG_FUNC(0xDB90EAC4, sceVoiceSetMuteFlagAll); //REG_FUNC(0xD93769E6, sceVoiceSetVolume); - //REG_FUNC(0x6E46950E, sceVoiceGetResourceInfo); - //REG_FUNC(0xAC98853E, sceVoiceEnd); - //REG_FUNC(0x805CC20F, sceVoiceInit); - //REG_FUNC(0xB2ED725B, sceVoiceStart); - //REG_FUNC(0xC3868DF6, sceVoiceStop); - //REG_FUNC(0x698BDAAE, sceVoiceConnectIPortToOPort); - //REG_FUNC(0xFA4E57B1, sceVoiceCreatePort); - //REG_FUNC(0xAE46564D, sceVoiceDeletePort); - //REG_FUNC(0x5F0260F4, sceVoiceDisconnectIPortFromOPort); - //REG_FUNC(0x5933CCFB, sceVoiceGetPortInfo); - //REG_FUNC(0x23C6B16B, sceVoicePausePort); - //REG_FUNC(0x39AA3884, sceVoicePausePortAll); - //REG_FUNC(0x09E4D18C, sceVoiceReadFromOPort); - //REG_FUNC(0x5E1CE910, sceVoiceResetPort); - //REG_FUNC(0x2DE35411, sceVoiceResumePort); - //REG_FUNC(0x1F93FC0C, sceVoiceResumePortAll); - //REG_FUNC(0xCE855C50, sceVoiceUpdatePort); - //REG_FUNC(0x0A22EC0E, sceVoiceWriteToIPort); + REG_FUNC(0x6E46950E, sceVoiceGetResourceInfo); + REG_FUNC(0xAC98853E, sceVoiceEnd); + REG_FUNC(0x805CC20F, sceVoiceInit); + REG_FUNC(0xB2ED725B, sceVoiceStart); + REG_FUNC(0xC3868DF6, sceVoiceStop); + REG_FUNC(0x698BDAAE, sceVoiceConnectIPortToOPort); + REG_FUNC(0xFA4E57B1, sceVoiceCreatePort); + REG_FUNC(0xAE46564D, sceVoiceDeletePort); + REG_FUNC(0x5F0260F4, sceVoiceDisconnectIPortFromOPort); + REG_FUNC(0x5933CCFB, sceVoiceGetPortInfo); + REG_FUNC(0x23C6B16B, sceVoicePausePort); + REG_FUNC(0x39AA3884, sceVoicePausePortAll); + REG_FUNC(0x09E4D18C, sceVoiceReadFromOPort); + REG_FUNC(0x5E1CE910, sceVoiceResetPort); + REG_FUNC(0x2DE35411, sceVoiceResumePort); + REG_FUNC(0x1F93FC0C, sceVoiceResumePortAll); + REG_FUNC(0xCE855C50, sceVoiceUpdatePort); + REG_FUNC(0x0A22EC0E, sceVoiceWriteToIPort); }); diff --git a/rpcs3/Emu/ARMv7/Modules/sceVoiceQoS.cpp b/rpcs3/Emu/ARMv7/Modules/sceVoiceQoS.cpp index bc5fb062a3..050570aaa9 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceVoiceQoS.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceVoiceQoS.cpp @@ -4,6 +4,114 @@ 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 +}; + +s32 sceVoiceQoSInit() +{ + throw __FUNCTION__; +} + +s32 sceVoiceQoSEnd() +{ + throw __FUNCTION__; +} + +s32 sceVoiceQoSCreateLocalEndpoint(vm::psv::ptr pLocalId) +{ + throw __FUNCTION__; +} + +s32 sceVoiceQoSDeleteLocalEndpoint(SceVoiceQoSLocalId localId) +{ + throw __FUNCTION__; +} + +s32 sceVoiceQoSCreateRemoteEndpoint(vm::psv::ptr pRemoteId) +{ + throw __FUNCTION__; +} + +s32 sceVoiceQoSDeleteRemoteEndpoint(SceVoiceQoSRemoteId remoteId) +{ + throw __FUNCTION__; +} + +s32 sceVoiceQoSConnect(vm::psv::ptr pConnectionId, SceVoiceQoSLocalId localId, SceVoiceQoSRemoteId remoteId) +{ + throw __FUNCTION__; +} + +s32 sceVoiceQoSDisconnect(SceVoiceQoSConnectionId connectionId) +{ + throw __FUNCTION__; +} + +s32 sceVoiceQoSGetLocalEndpoint(SceVoiceQoSConnectionId connectionId, vm::psv::ptr pLocalId) +{ + throw __FUNCTION__; +} + +s32 sceVoiceQoSGetRemoteEndpoint(SceVoiceQoSConnectionId connectionId, vm::psv::ptr pRemoteId) +{ + throw __FUNCTION__; +} + +s32 sceVoiceQoSSetLocalEndpointAttribute(SceVoiceQoSLocalId localId, SceVoiceQoSAttributeId attributeId, vm::psv::ptr pAttributeValue, s32 attributeSize) +{ + throw __FUNCTION__; +} + +s32 sceVoiceQoSGetLocalEndpointAttribute(SceVoiceQoSLocalId localId, SceVoiceQoSAttributeId attributeId, vm::psv::ptr pAttributeValue, s32 attributeSize) +{ + throw __FUNCTION__; +} + +s32 sceVoiceQoSSetConnectionAttribute(SceVoiceQoSConnectionId connectionId, SceVoiceQoSAttributeId attributeId, vm::psv::ptr pAttributeValue, s32 attributeSize) +{ + throw __FUNCTION__; +} + +s32 sceVoiceQoSGetConnectionAttribute(SceVoiceQoSConnectionId connectionId, SceVoiceQoSAttributeId attributeId, vm::psv::ptr pAttributeValue, s32 attributeSize) +{ + throw __FUNCTION__; +} + +s32 sceVoiceQoSGetStatus(SceVoiceQoSConnectionId connectionId, SceVoiceQoSStatusId statusId, vm::psv::ptr pStatusValue, s32 statusSize) +{ + throw __FUNCTION__; +} + +s32 sceVoiceQoSWritePacket(SceVoiceQoSConnectionId connectionId, vm::psv::ptr pData, vm::psv::ptr pSize) +{ + throw __FUNCTION__; +} + +s32 sceVoiceQoSReadPacket(SceVoiceQoSConnectionId connectionId, vm::psv::ptr pData, vm::psv::ptr pSize) +{ + throw __FUNCTION__; +} + + #define REG_FUNC(nid, name) reg_psv_func(nid, &sceVoiceQoS, #name, name) psv_log_base sceVoiceQoS("SceVoiceQos", []() @@ -12,21 +120,21 @@ psv_log_base sceVoiceQoS("SceVoiceQos", []() sceVoiceQoS.on_unload = nullptr; sceVoiceQoS.on_stop = nullptr; - //REG_FUNC(0x4B5FFF1C, sceVoiceQoSInit); - //REG_FUNC(0xFB0B747B, sceVoiceQoSEnd); - //REG_FUNC(0xAAB54BE4, sceVoiceQoSCreateLocalEndpoint); - //REG_FUNC(0x68FABF6F, sceVoiceQoSDeleteLocalEndpoint); - //REG_FUNC(0xBAB98727, sceVoiceQoSCreateRemoteEndpoint); - //REG_FUNC(0xC2F2C771, sceVoiceQoSDeleteRemoteEndpoint); - //REG_FUNC(0xE0C5CEEE, sceVoiceQoSConnect); - //REG_FUNC(0x3C7A08B0, sceVoiceQoSDisconnect); - //REG_FUNC(0xE5B4527D, sceVoiceQoSGetLocalEndpoint); - //REG_FUNC(0x876A9B9C, sceVoiceQoSGetRemoteEndpoint); - //REG_FUNC(0x540CEBA5, sceVoiceQoSSetLocalEndpointAttribute); - //REG_FUNC(0xC981AB3B, sceVoiceQoSGetLocalEndpointAttribute); - //REG_FUNC(0xE757806F, sceVoiceQoSSetConnectionAttribute); - //REG_FUNC(0xE81B8D44, sceVoiceQoSGetConnectionAttribute); - //REG_FUNC(0xC9DC1425, sceVoiceQoSGetStatus); - //REG_FUNC(0x2FE1F28F, sceVoiceQoSWritePacket); - //REG_FUNC(0x2D613549, sceVoiceQoSReadPacket); + REG_FUNC(0x4B5FFF1C, sceVoiceQoSInit); + REG_FUNC(0xFB0B747B, sceVoiceQoSEnd); + REG_FUNC(0xAAB54BE4, sceVoiceQoSCreateLocalEndpoint); + REG_FUNC(0x68FABF6F, sceVoiceQoSDeleteLocalEndpoint); + REG_FUNC(0xBAB98727, sceVoiceQoSCreateRemoteEndpoint); + REG_FUNC(0xC2F2C771, sceVoiceQoSDeleteRemoteEndpoint); + REG_FUNC(0xE0C5CEEE, sceVoiceQoSConnect); + REG_FUNC(0x3C7A08B0, sceVoiceQoSDisconnect); + REG_FUNC(0xE5B4527D, sceVoiceQoSGetLocalEndpoint); + REG_FUNC(0x876A9B9C, sceVoiceQoSGetRemoteEndpoint); + REG_FUNC(0x540CEBA5, sceVoiceQoSSetLocalEndpointAttribute); + REG_FUNC(0xC981AB3B, sceVoiceQoSGetLocalEndpointAttribute); + REG_FUNC(0xE757806F, sceVoiceQoSSetConnectionAttribute); + REG_FUNC(0xE81B8D44, sceVoiceQoSGetConnectionAttribute); + REG_FUNC(0xC9DC1425, sceVoiceQoSGetStatus); + REG_FUNC(0x2FE1F28F, sceVoiceQoSWritePacket); + REG_FUNC(0x2D613549, sceVoiceQoSReadPacket); }); diff --git a/rpcs3/emucore.vcxproj b/rpcs3/emucore.vcxproj index fb672d63a6..69cbaaf944 100644 --- a/rpcs3/emucore.vcxproj +++ b/rpcs3/emucore.vcxproj @@ -339,6 +339,8 @@ + + diff --git a/rpcs3/emucore.vcxproj.filters b/rpcs3/emucore.vcxproj.filters index 6e45634fea..7935e1ddc6 100644 --- a/rpcs3/emucore.vcxproj.filters +++ b/rpcs3/emucore.vcxproj.filters @@ -1492,5 +1492,11 @@ Emu\CPU\ARMv7\Modules + + Emu\CPU\ARMv7\Modules + + + Emu\CPU\ARMv7\Modules + \ No newline at end of file From 6cab4d7100abdd7c7bd41dcb18355cf2c8fb49d1 Mon Sep 17 00:00:00 2001 From: Nekotekina Date: Fri, 30 Jan 2015 15:19:01 +0300 Subject: [PATCH 06/11] Some functions added --- rpcs3/Emu/ARMv7/Modules/sceGxm.cpp | 12 +- rpcs3/Emu/ARMv7/Modules/sceNet.h | 6 +- rpcs3/Emu/ARMv7/Modules/sceNgs.cpp | 549 ++++++++++++++++--- rpcs3/Emu/ARMv7/Modules/sceRtc.cpp | 260 +++++++-- rpcs3/Emu/ARMv7/Modules/sceSas.cpp | 204 ++++++- rpcs3/Emu/ARMv7/Modules/sceSystemGesture.cpp | 276 +++++++++- rpcs3/Emu/ARMv7/Modules/sceTouch.cpp | 35 +- rpcs3/Emu/ARMv7/Modules/sceTouch.h | 36 ++ rpcs3/Emu/ARMv7/Modules/sceVoice.cpp | 2 +- rpcs3/Emu/Memory/vm_ptr.h | 2 + rpcs3/Emu/SysCalls/Modules/sceNp.h | 2 +- rpcs3/Emu/SysCalls/Modules/sceNpClans.h | 2 +- rpcs3/emucore.vcxproj | 1 + rpcs3/emucore.vcxproj.filters | 3 + 14 files changed, 1199 insertions(+), 191 deletions(-) create mode 100644 rpcs3/Emu/ARMv7/Modules/sceTouch.h diff --git a/rpcs3/Emu/ARMv7/Modules/sceGxm.cpp b/rpcs3/Emu/ARMv7/Modules/sceGxm.cpp index 3614803537..f65f49b349 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceGxm.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceGxm.cpp @@ -257,23 +257,23 @@ void sceGxmSetBackPolygonMode(vm::psv::ptr context, SceGxmPolygon throw __FUNCTION__; } -void sceGxmSetFrontStencilFunc(vm::psv::ptr context, SceGxmStencilFunc func, SceGxmStencilOp stencilFail, SceGxmStencilOp depthFail, SceGxmStencilOp depthPass, uint8_t compareMask, uint8_t writeMask) +void sceGxmSetFrontStencilFunc(vm::psv::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, uint8_t compareMask, uint8_t writeMask) +void sceGxmSetBackStencilFunc(vm::psv::ptr context, SceGxmStencilFunc func, SceGxmStencilOp stencilFail, SceGxmStencilOp depthFail, SceGxmStencilOp depthPass, u8 compareMask, u8 writeMask) { throw __FUNCTION__; } -void sceGxmSetFrontDepthBias(vm::psv::ptr context, int32_t factor, int32_t units) +void sceGxmSetFrontDepthBias(vm::psv::ptr context, s32 factor, s32 units) { throw __FUNCTION__; } -void sceGxmSetBackDepthBias(vm::psv::ptr context, int32_t factor, int32_t units) +void sceGxmSetBackDepthBias(vm::psv::ptr context, s32 factor, s32 units) { throw __FUNCTION__; } @@ -463,12 +463,12 @@ s32 sceGxmDepthStencilSurfaceInitDisabled(vm::psv::ptr surface) +u8 sceGxmDepthStencilSurfaceGetBackgroundStencil(vm::psv::ptr surface) { throw __FUNCTION__; } -void sceGxmDepthStencilSurfaceSetBackgroundStencil(vm::psv::ptr surface, uint8_t backgroundStencil) +void sceGxmDepthStencilSurfaceSetBackgroundStencil(vm::psv::ptr surface, u8 backgroundStencil) { throw __FUNCTION__; } diff --git a/rpcs3/Emu/ARMv7/Modules/sceNet.h b/rpcs3/Emu/ARMv7/Modules/sceNet.h index 1d30bdfdd0..6dc25e1ea9 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceNet.h +++ b/rpcs3/Emu/ARMv7/Modules/sceNet.h @@ -35,15 +35,15 @@ struct SceNetSockaddr struct SceNetEpollDataExt { s32 id; - u32 u32; + u32 data; }; union SceNetEpollData { vm::psv::ptr ptr; s32 fd; - u32 u32; - u64 u64; + u32 _u32; + u64 _u64; SceNetEpollDataExt ext; }; diff --git a/rpcs3/Emu/ARMv7/Modules/sceNgs.cpp b/rpcs3/Emu/ARMv7/Modules/sceNgs.cpp index 5798792b12..f09993ba24 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceNgs.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceNgs.cpp @@ -4,6 +4,431 @@ extern psv_log_base sceNgs; +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) +{ + throw __FUNCTION__; +} + +s32 sceNgsSystemInit(vm::psv::ptr pSynthSysMemory, const u32 uMemSize, vm::psv::ptr pSynthParams, vm::psv::ptr pSystemHandle) +{ + throw __FUNCTION__; +} + +s32 sceNgsSystemUpdate(SceNgsHSynSystem hSystemHandle) +{ + throw __FUNCTION__; +} + +s32 sceNgsSystemRelease(SceNgsHSynSystem hSystemHandle) +{ + throw __FUNCTION__; +} + +s32 sceNgsSystemLock(SceNgsHSynSystem hSystemHandle) +{ + throw __FUNCTION__; +} + +s32 sceNgsSystemUnlock(SceNgsHSynSystem hSystemHandle) +{ + throw __FUNCTION__; +} + +s32 sceNgsSystemSetParamErrorCallback(SceNgsHSynSystem hSystemHandle, const SceNgsParamsErrorCallbackFunc callbackFuncPtr) +{ + throw __FUNCTION__; +} + +s32 sceNgsSystemSetFlags(SceNgsHSynSystem hSystemHandle, const u32 uSystemFlags) +{ + throw __FUNCTION__; +} + +s32 sceNgsRackGetRequiredMemorySize(SceNgsHSynSystem hSystemHandle, vm::psv::ptr pRackDesc, vm::psv::ptr pnSize) +{ + throw __FUNCTION__; +} + +s32 sceNgsRackInit(SceNgsHSynSystem hSystemHandle, vm::psv::ptr pRackBuffer, vm::psv::ptr pRackDesc, vm::psv::ptr pRackHandle) +{ + throw __FUNCTION__; +} + +s32 sceNgsRackGetVoiceHandle(SceNgsHRack hRackHandle, const u32 uIndex, vm::psv::ptr pVoiceHandle) +{ + throw __FUNCTION__; +} + +s32 sceNgsRackRelease(SceNgsHRack hRackHandle, const SceNgsRackReleaseCallbackFunc callbackFuncPtr) +{ + throw __FUNCTION__; +} + +s32 sceNgsRackSetParamErrorCallback(SceNgsHRack hRackHandle, const SceNgsParamsErrorCallbackFunc callbackFuncPtr) +{ + throw __FUNCTION__; +} + +s32 sceNgsVoiceInit(SceNgsHVoice hVoiceHandle, vm::psv::ptr pPreset, const u32 uInitFlags) +{ + throw __FUNCTION__; +} + +s32 sceNgsVoicePlay(SceNgsHVoice hVoiceHandle) +{ + throw __FUNCTION__; +} + +s32 sceNgsVoiceKeyOff(SceNgsHVoice hVoiceHandle) +{ + throw __FUNCTION__; +} + +s32 sceNgsVoiceKill(SceNgsHVoice hVoiceHandle) +{ + throw __FUNCTION__; +} + +s32 sceNgsVoicePause(SceNgsHVoice hVoiceHandle) +{ + throw __FUNCTION__; +} + +s32 sceNgsVoiceResume(SceNgsHVoice hVoiceHandle) +{ + throw __FUNCTION__; +} + +s32 sceNgsVoiceSetPreset(SceNgsHVoice hVoiceHandle, vm::psv::ptr pVoicePreset) +{ + throw __FUNCTION__; +} + +s32 sceNgsVoiceLockParams(SceNgsHVoice hVoiceHandle, const u32 uModule, const SceNgsParamsID uParamsInterfaceId, vm::psv::ptr pParamsBuffer) +{ + throw __FUNCTION__; +} + +s32 sceNgsVoiceUnlockParams(SceNgsHVoice hVoiceHandle, const u32 uModule) +{ + throw __FUNCTION__; +} + +s32 sceNgsVoiceSetParamsBlock(SceNgsHVoice hVoiceHandle, vm::psv::ptr pParamData, const u32 uSize, vm::psv::ptr pnErrorCount) +{ + throw __FUNCTION__; +} + +s32 sceNgsVoiceBypassModule(SceNgsHVoice hVoiceHandle, const u32 uModule, const u32 uBypassFlag) +{ + throw __FUNCTION__; +} + +s32 sceNgsVoiceSetModuleCallback(SceNgsHVoice hVoiceHandle, const u32 uModule, const SceNgsModuleCallbackFunc callbackFuncPtr, vm::psv::ptr pUserData) +{ + throw __FUNCTION__; +} + +s32 sceNgsVoiceSetFinishedCallback(SceNgsHVoice hVoiceHandle, const SceNgsCallbackFunc callbackFuncPtr, vm::psv::ptr pUserData) +{ + throw __FUNCTION__; +} + +s32 sceNgsVoiceGetStateData(SceNgsHVoice hVoiceHandle, const u32 uModule, vm::psv::ptr pMem, const u32 uMemSize) +{ + throw __FUNCTION__; +} + +s32 sceNgsVoiceGetInfo(SceNgsHVoice hVoiceHandle, vm::psv::ptr pInfo) +{ + throw __FUNCTION__; +} + +s32 sceNgsVoiceGetModuleType(SceNgsHVoice hVoiceHandle, const u32 uModule, vm::psv::ptr pModuleType) +{ + throw __FUNCTION__; +} + +s32 sceNgsVoiceGetModuleBypass(SceNgsHVoice hVoiceHandle, const u32 uModule, vm::psv::ptr puBypassFlag) +{ + throw __FUNCTION__; +} + +s32 sceNgsVoiceGetParamsOutOfRange(SceNgsHVoice hVoiceHandle, const u32 uModule, vm::psv::ptr pszMessageBuffer) +{ + throw __FUNCTION__; +} + +s32 sceNgsPatchCreateRouting(vm::psv::ptr pPatchInfo, vm::psv::ptr pPatchHandle) +{ + throw __FUNCTION__; +} + +s32 sceNgsPatchGetInfo(SceNgsHPatch hPatchHandle, vm::psv::ptr pRouteInfo, vm::psv::ptr pSetup) +{ + throw __FUNCTION__; +} + +s32 sceNgsVoiceGetOutputPatch(SceNgsHVoice hVoiceHandle, const s32 nOutputIndex, const s32 nSubIndex, vm::psv::ptr pPatchHandle) +{ + throw __FUNCTION__; +} + +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) +{ + throw __FUNCTION__; +} + +s32 sceNgsVoicePatchSetVolumesMatrix(SceNgsHPatch hPatchHandle, vm::psv::ptr pMatrix) +{ + throw __FUNCTION__; +} + +s32 sceNgsModuleGetNumPresets(SceNgsHSynSystem hSystemHandle, const SceNgsModuleID uModuleID, vm::psv::ptr puNumPresets) +{ + throw __FUNCTION__; +} + +s32 sceNgsModuleGetPreset(SceNgsHSynSystem hSystemHandle, const SceNgsModuleID uModuleID, const u32 uPresetIndex, vm::psv::ptr pParamsBuffer) +{ + throw __FUNCTION__; +} + +vm::psv::ptr sceNgsVoiceDefGetCompressorBuss() +{ + throw __FUNCTION__; +} + +vm::psv::ptr sceNgsVoiceDefGetCompressorSideChainBuss() +{ + throw __FUNCTION__; +} + +vm::psv::ptr sceNgsVoiceDefGetDelayBuss() +{ + throw __FUNCTION__; +} + +vm::psv::ptr sceNgsVoiceDefGetDistortionBuss() +{ + throw __FUNCTION__; +} + +vm::psv::ptr sceNgsVoiceDefGetEnvelopeBuss() +{ + throw __FUNCTION__; +} + +vm::psv::ptr sceNgsVoiceDefGetEqBuss() +{ + throw __FUNCTION__; +} + +vm::psv::ptr sceNgsVoiceDefGetMasterBuss() +{ + throw __FUNCTION__; +} + +vm::psv::ptr sceNgsVoiceDefGetMixerBuss() +{ + throw __FUNCTION__; +} + +vm::psv::ptr sceNgsVoiceDefGetPauserBuss() +{ + throw __FUNCTION__; +} + +vm::psv::ptr sceNgsVoiceDefGetReverbBuss() +{ + throw __FUNCTION__; +} + +vm::psv::ptr sceNgsVoiceDefGetSasEmuVoice() +{ + throw __FUNCTION__; +} + +vm::psv::ptr sceNgsVoiceDefGetSimpleVoice() +{ + throw __FUNCTION__; +} + +vm::psv::ptr sceNgsVoiceDefGetTemplate1() +{ + throw __FUNCTION__; +} + +vm::psv::ptr sceNgsVoiceDefGetAtrac9Voice() +{ + throw __FUNCTION__; +} + +s32 sceSulphaNgsGetDefaultConfig(vm::psv::ptr config) +{ + throw __FUNCTION__; +} + +s32 sceSulphaNgsGetNeededMemory(vm::psv::ptr config, vm::psv::ptr sizeInBytes) +{ + throw __FUNCTION__; +} + +s32 sceSulphaNgsInit(vm::psv::ptr config, vm::psv::ptr buffer, u32 sizeInBytes) +{ + throw __FUNCTION__; +} + +s32 sceSulphaNgsShutdown() +{ + throw __FUNCTION__; +} + +s32 sceSulphaNgsSetSynthName(SceNgsHSynSystem synthHandle, vm::psv::ptr name) +{ + throw __FUNCTION__; +} + +s32 sceSulphaNgsSetRackName(SceNgsHRack rackHandle, vm::psv::ptr name) +{ + throw __FUNCTION__; +} + +s32 sceSulphaNgsSetVoiceName(SceNgsHVoice voiceHandle, vm::psv::ptr name) +{ + throw __FUNCTION__; +} + +s32 sceSulphaNgsSetSampleName(vm::psv::ptr location, u32 length, vm::psv::ptr name) +{ + throw __FUNCTION__; +} + +s32 sceSulphaNgsTrace(vm::psv::ptr message) +{ + throw __FUNCTION__; +} + + #define REG_FUNC(nid, name) reg_psv_func(nid, &sceNgs, #name, name) psv_log_base sceNgs("SceNgs", []() @@ -12,67 +437,67 @@ psv_log_base sceNgs("SceNgs", []() sceNgs.on_unload = nullptr; sceNgs.on_stop = nullptr; - //REG_FUNC(0x6CE8B36F, sceNgsSystemGetRequiredMemorySize); - //REG_FUNC(0xED14CF4A, sceNgsSystemInit); - //REG_FUNC(0x684F080C, sceNgsSystemUpdate); - //REG_FUNC(0x4A25BEBC, sceNgsSystemRelease); - //REG_FUNC(0xB9D971F2, sceNgsSystemLock); - //REG_FUNC(0x0A93EA96, sceNgsSystemUnlock); - //REG_FUNC(0x5ADD22DC, sceNgsSystemSetParamErrorCallback); - //REG_FUNC(0x64D80013, sceNgsSystemSetFlags); - //REG_FUNC(0x477318C0, sceNgsRackGetRequiredMemorySize); - //REG_FUNC(0x0A92E4EC, sceNgsRackInit); - //REG_FUNC(0xFE1A98E9, sceNgsRackGetVoiceHandle); - //REG_FUNC(0xDD5CA10B, sceNgsRackRelease); - //REG_FUNC(0x534B6E3F, sceNgsRackSetParamErrorCallback); - //REG_FUNC(0x1DDBEBEB, sceNgsVoiceInit); - //REG_FUNC(0xFA0A0F34, sceNgsVoicePlay); - //REG_FUNC(0xBB13373D, sceNgsVoiceKeyOff); - //REG_FUNC(0x0E291AAD, sceNgsVoiceKill); - //REG_FUNC(0xD7786E99, sceNgsVoicePause); - //REG_FUNC(0x54CFB981, sceNgsVoiceResume); - //REG_FUNC(0x8A88E665, sceNgsVoiceSetPreset); - //REG_FUNC(0xAB6BEF8F, sceNgsVoiceLockParams); - //REG_FUNC(0x3D46D8A7, sceNgsVoiceUnlockParams); - //REG_FUNC(0xFB8174B1, sceNgsVoiceSetParamsBlock); - //REG_FUNC(0x9AB87E71, sceNgsVoiceBypassModule); - //REG_FUNC(0x24E909A8, sceNgsVoiceSetModuleCallback); - //REG_FUNC(0x17A6F564, sceNgsVoiceSetFinishedCallback); - //REG_FUNC(0xC9B8C0B4, sceNgsVoiceGetStateData); - //REG_FUNC(0x5551410D, sceNgsVoiceGetInfo); - //REG_FUNC(0xB307185E, sceNgsVoiceGetModuleType); - //REG_FUNC(0x431BF3AB, sceNgsVoiceGetModuleBypass); - //REG_FUNC(0xD668B49C, sceNgsPatchCreateRouting); - //REG_FUNC(0x98703DBC, sceNgsPatchGetInfo); - //REG_FUNC(0x01A52E3A, sceNgsVoiceGetOutputPatch); - //REG_FUNC(0xD0C9AE5A, sceNgsPatchRemoveRouting); + REG_FUNC(0x6CE8B36F, sceNgsSystemGetRequiredMemorySize); + REG_FUNC(0xED14CF4A, sceNgsSystemInit); + REG_FUNC(0x684F080C, sceNgsSystemUpdate); + REG_FUNC(0x4A25BEBC, sceNgsSystemRelease); + REG_FUNC(0xB9D971F2, sceNgsSystemLock); + REG_FUNC(0x0A93EA96, sceNgsSystemUnlock); + REG_FUNC(0x5ADD22DC, sceNgsSystemSetParamErrorCallback); + REG_FUNC(0x64D80013, sceNgsSystemSetFlags); + REG_FUNC(0x477318C0, sceNgsRackGetRequiredMemorySize); + REG_FUNC(0x0A92E4EC, sceNgsRackInit); + REG_FUNC(0xFE1A98E9, sceNgsRackGetVoiceHandle); + REG_FUNC(0xDD5CA10B, sceNgsRackRelease); + REG_FUNC(0x534B6E3F, sceNgsRackSetParamErrorCallback); + REG_FUNC(0x1DDBEBEB, sceNgsVoiceInit); + REG_FUNC(0xFA0A0F34, sceNgsVoicePlay); + REG_FUNC(0xBB13373D, sceNgsVoiceKeyOff); + REG_FUNC(0x0E291AAD, sceNgsVoiceKill); + REG_FUNC(0xD7786E99, sceNgsVoicePause); + REG_FUNC(0x54CFB981, sceNgsVoiceResume); + REG_FUNC(0x8A88E665, sceNgsVoiceSetPreset); + REG_FUNC(0xAB6BEF8F, sceNgsVoiceLockParams); + REG_FUNC(0x3D46D8A7, sceNgsVoiceUnlockParams); + REG_FUNC(0xFB8174B1, sceNgsVoiceSetParamsBlock); + REG_FUNC(0x9AB87E71, sceNgsVoiceBypassModule); + REG_FUNC(0x24E909A8, sceNgsVoiceSetModuleCallback); + REG_FUNC(0x17A6F564, sceNgsVoiceSetFinishedCallback); + REG_FUNC(0xC9B8C0B4, sceNgsVoiceGetStateData); + REG_FUNC(0x5551410D, sceNgsVoiceGetInfo); + REG_FUNC(0xB307185E, sceNgsVoiceGetModuleType); + REG_FUNC(0x431BF3AB, sceNgsVoiceGetModuleBypass); + REG_FUNC(0xD668B49C, sceNgsPatchCreateRouting); + REG_FUNC(0x98703DBC, sceNgsPatchGetInfo); + REG_FUNC(0x01A52E3A, sceNgsVoiceGetOutputPatch); + REG_FUNC(0xD0C9AE5A, sceNgsPatchRemoveRouting); //REG_FUNC(0xA3C807BC, sceNgsVoicePatchSetVolume); - //REG_FUNC(0xBD6F57F0, sceNgsVoicePatchSetVolumes); - //REG_FUNC(0xA0F5402D, sceNgsVoicePatchSetVolumesMatrix); - //REG_FUNC(0xF6B68C31, sceNgsVoiceDefGetEnvelopeBuss); - //REG_FUNC(0x9DCF50F5, sceNgsVoiceDefGetReverbBuss); - //REG_FUNC(0x214485D6, sceNgsVoiceDefGetPauserBuss); - //REG_FUNC(0xE0AC8776, sceNgsVoiceDefGetMixerBuss); - //REG_FUNC(0x79A121D1, sceNgsVoiceDefGetMasterBuss); - //REG_FUNC(0x0E0ACB68, sceNgsVoiceDefGetCompressorBuss); - //REG_FUNC(0x1AF83512, sceNgsVoiceDefGetCompressorSideChainBuss); - //REG_FUNC(0xAAD90DEB, sceNgsVoiceDefGetDistortionBuss); - //REG_FUNC(0xF964120E, sceNgsVoiceDefGetEqBuss); - //REG_FUNC(0xE9B572B7, sceNgsVoiceDefGetTemplate1); - //REG_FUNC(0x0D5399CF, sceNgsVoiceDefGetSimpleVoice); - //REG_FUNC(0x1F51C2BA, sceNgsVoiceDefGetSasEmuVoice); - //REG_FUNC(0x4CBE08F3, sceNgsVoiceGetParamsOutOfRange); - //REG_FUNC(0x14EF65A0, sceNgsVoiceDefGetAtrac9Voice); - //REG_FUNC(0x4D705E3E, sceNgsVoiceDefGetDelayBuss); - //REG_FUNC(0x5FD8AEDB, sceSulphaNgsGetDefaultConfig); - //REG_FUNC(0x793E3E8C, sceSulphaNgsGetNeededMemory); - //REG_FUNC(0xAFCD824F, sceSulphaNgsInit); - //REG_FUNC(0xD124BFB1, sceSulphaNgsShutdown); - //REG_FUNC(0x2F3F7515, sceSulphaNgsSetSynthName); - //REG_FUNC(0x251AF6A9, sceSulphaNgsSetRackName); - //REG_FUNC(0x508975BD, sceSulphaNgsSetVoiceName); - //REG_FUNC(0x54EC5B8D, sceSulphaNgsSetSampleName); - //REG_FUNC(0xDC7C0F05, sceSulphaNgsTrace); - //REG_FUNC(0x5C71FE09, sceNgsModuleGetNumPresets); - //REG_FUNC(0xC58298A7, sceNgsModuleGetPreset); + REG_FUNC(0xBD6F57F0, sceNgsVoicePatchSetVolumes); + REG_FUNC(0xA0F5402D, sceNgsVoicePatchSetVolumesMatrix); + REG_FUNC(0xF6B68C31, sceNgsVoiceDefGetEnvelopeBuss); + REG_FUNC(0x9DCF50F5, sceNgsVoiceDefGetReverbBuss); + REG_FUNC(0x214485D6, sceNgsVoiceDefGetPauserBuss); + REG_FUNC(0xE0AC8776, sceNgsVoiceDefGetMixerBuss); + REG_FUNC(0x79A121D1, sceNgsVoiceDefGetMasterBuss); + REG_FUNC(0x0E0ACB68, sceNgsVoiceDefGetCompressorBuss); + REG_FUNC(0x1AF83512, sceNgsVoiceDefGetCompressorSideChainBuss); + REG_FUNC(0xAAD90DEB, sceNgsVoiceDefGetDistortionBuss); + REG_FUNC(0xF964120E, sceNgsVoiceDefGetEqBuss); + REG_FUNC(0xE9B572B7, sceNgsVoiceDefGetTemplate1); + REG_FUNC(0x0D5399CF, sceNgsVoiceDefGetSimpleVoice); + REG_FUNC(0x1F51C2BA, sceNgsVoiceDefGetSasEmuVoice); + REG_FUNC(0x4CBE08F3, sceNgsVoiceGetParamsOutOfRange); + REG_FUNC(0x14EF65A0, sceNgsVoiceDefGetAtrac9Voice); + REG_FUNC(0x4D705E3E, sceNgsVoiceDefGetDelayBuss); + REG_FUNC(0x5FD8AEDB, sceSulphaNgsGetDefaultConfig); + REG_FUNC(0x793E3E8C, sceSulphaNgsGetNeededMemory); + REG_FUNC(0xAFCD824F, sceSulphaNgsInit); + REG_FUNC(0xD124BFB1, sceSulphaNgsShutdown); + REG_FUNC(0x2F3F7515, sceSulphaNgsSetSynthName); + REG_FUNC(0x251AF6A9, sceSulphaNgsSetRackName); + REG_FUNC(0x508975BD, sceSulphaNgsSetVoiceName); + REG_FUNC(0x54EC5B8D, sceSulphaNgsSetSampleName); + REG_FUNC(0xDC7C0F05, sceSulphaNgsTrace); + REG_FUNC(0x5C71FE09, sceNgsModuleGetNumPresets); + REG_FUNC(0xC58298A7, sceNgsModuleGetPreset); }); diff --git a/rpcs3/Emu/ARMv7/Modules/sceRtc.cpp b/rpcs3/Emu/ARMv7/Modules/sceRtc.cpp index 72d81d8e15..96d44a3686 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceRtc.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceRtc.cpp @@ -4,6 +4,192 @@ extern psv_log_base sceRtc; +u32 sceRtcGetTickResolution() +{ + throw __FUNCTION__; +} + +s32 sceRtcGetCurrentTick(vm::psv::ptr pTick) +{ + throw __FUNCTION__; +} + +s32 sceRtcGetCurrentClock(vm::psv::ptr pTime, s32 iTimeZone) +{ + throw __FUNCTION__; +} + +s32 sceRtcGetCurrentClockLocalTime(vm::psv::ptr pTime) +{ + throw __FUNCTION__; +} + +s32 sceRtcGetCurrentNetworkTick(vm::psv::ptr pTick) +{ + throw __FUNCTION__; +} + +s32 sceRtcConvertUtcToLocalTime(vm::psv::ptr pUtc, vm::psv::ptr pLocalTime) +{ + throw __FUNCTION__; +} + +s32 sceRtcConvertLocalTimeToUtc(vm::psv::ptr pLocalTime, vm::psv::ptr pUtc) +{ + throw __FUNCTION__; +} + +s32 sceRtcIsLeapYear(s32 year) +{ + throw __FUNCTION__; +} + +s32 sceRtcGetDaysInMonth(s32 year, s32 month) +{ + throw __FUNCTION__; +} + +s32 sceRtcGetDayOfWeek(s32 year, s32 month, s32 day) +{ + throw __FUNCTION__; +} + +s32 sceRtcCheckValid(vm::psv::ptr pTime) +{ + throw __FUNCTION__; +} + +s32 sceRtcSetTime_t(vm::psv::ptr pTime, time_t iTime) +{ + throw __FUNCTION__; +} + +s32 sceRtcSetTime64_t(vm::psv::ptr pTime, u64 ullTime) +{ + throw __FUNCTION__; +} + +s32 sceRtcGetTime_t(vm::psv::ptr pTime, vm::psv::ptr piTime) +{ + throw __FUNCTION__; +} + +s32 sceRtcGetTime64_t(vm::psv::ptr pTime, vm::psv::ptr pullTime) +{ + throw __FUNCTION__; +} + +s32 sceRtcSetDosTime(vm::psv::ptr pTime, u32 uiDosTime) +{ + throw __FUNCTION__; +} + +s32 sceRtcGetDosTime(vm::psv::ptr pTime, vm::psv::ptr puiDosTime) +{ + throw __FUNCTION__; +} + +s32 sceRtcSetWin32FileTime(vm::psv::ptr pTime, u64 ulWin32Time) +{ + throw __FUNCTION__; +} + +s32 sceRtcGetWin32FileTime(vm::psv::ptr pTime, vm::psv::ptr ulWin32Time) +{ + throw __FUNCTION__; +} + +s32 sceRtcSetTick(vm::psv::ptr pTime, vm::psv::ptr pTick) +{ + throw __FUNCTION__; +} + +s32 sceRtcGetTick(vm::psv::ptr pTime, vm::psv::ptr pTick) +{ + throw __FUNCTION__; +} + +s32 sceRtcCompareTick(vm::psv::ptr pTick1, vm::psv::ptr pTick2) +{ + throw __FUNCTION__; +} + +s32 sceRtcTickAddTicks(vm::psv::ptr pTick0, vm::psv::ptr pTick1, u64 lAdd) +{ + throw __FUNCTION__; +} + +s32 sceRtcTickAddMicroseconds(vm::psv::ptr pTick0, vm::psv::ptr pTick1, u64 lAdd) +{ + throw __FUNCTION__; +} + +s32 sceRtcTickAddSeconds(vm::psv::ptr pTick0, vm::psv::ptr pTick1, u64 lAdd) +{ + throw __FUNCTION__; +} + +s32 sceRtcTickAddMinutes(vm::psv::ptr pTick0, vm::psv::ptr pTick1, u64 lAdd) +{ + throw __FUNCTION__; +} + +s32 sceRtcTickAddHours(vm::psv::ptr pTick0, vm::psv::ptr pTick1, s32 lAdd) +{ + throw __FUNCTION__; +} + +s32 sceRtcTickAddDays(vm::psv::ptr pTick0, vm::psv::ptr pTick1, s32 lAdd) +{ + throw __FUNCTION__; +} + +s32 sceRtcTickAddWeeks(vm::psv::ptr pTick0, vm::psv::ptr pTick1, s32 lAdd) +{ + throw __FUNCTION__; +} + +s32 sceRtcTickAddMonths(vm::psv::ptr pTick0, vm::psv::ptr pTick1, s32 lAdd) +{ + throw __FUNCTION__; +} + +s32 sceRtcTickAddYears(vm::psv::ptr pTick0, vm::psv::ptr pTick1, s32 lAdd) +{ + throw __FUNCTION__; +} + +s32 sceRtcFormatRFC2822(vm::psv::ptr pszDateTime, vm::psv::ptr pUtc, s32 iTimeZoneMinutes) +{ + throw __FUNCTION__; +} + +s32 sceRtcFormatRFC2822LocalTime(vm::psv::ptr pszDateTime, vm::psv::ptr pUtc) +{ + throw __FUNCTION__; +} + +s32 sceRtcFormatRFC3339(vm::psv::ptr pszDateTime, vm::psv::ptr pUtc, s32 iTimeZoneMinutes) +{ + throw __FUNCTION__; +} + +s32 sceRtcFormatRFC3339LocalTime(vm::psv::ptr pszDateTime, vm::psv::ptr pUtc) +{ + throw __FUNCTION__; +} + +s32 sceRtcParseDateTime(vm::psv::ptr pUtc, vm::psv::ptr pszDateTime) +{ + throw __FUNCTION__; +} + +s32 sceRtcParseRFC3339(vm::psv::ptr pUtc, vm::psv::ptr pszDateTime) +{ + throw __FUNCTION__; +} + + #define REG_FUNC(nid, name) reg_psv_func(nid, &sceRtc, #name, name) psv_log_base sceRtc("SceRtc", []() @@ -12,41 +198,41 @@ psv_log_base sceRtc("SceRtc", []() sceRtc.on_unload = nullptr; sceRtc.on_stop = nullptr; - //REG_FUNC(0x23F79274, sceRtcGetCurrentTick); - //REG_FUNC(0xCDDD25FE, sceRtcGetCurrentNetworkTick); - //REG_FUNC(0x70FDE8F1, sceRtcGetCurrentClock); - //REG_FUNC(0x0572EDDC, sceRtcGetCurrentClockLocalTime); - //REG_FUNC(0x1282C436, sceRtcConvertUtcToLocalTime); - //REG_FUNC(0x0A05E201, sceRtcConvertLocalTimeToUtc); - //REG_FUNC(0x42CA8EB5, sceRtcFormatRFC2822LocalTime); - //REG_FUNC(0x147F2138, sceRtcFormatRFC2822); - //REG_FUNC(0x742250A9, sceRtcFormatRFC3339LocalTime); - //REG_FUNC(0xCCEA2B54, sceRtcFormatRFC3339); - //REG_FUNC(0xF17FD8B5, sceRtcIsLeapYear); - //REG_FUNC(0x49EB4556, sceRtcGetDaysInMonth); - //REG_FUNC(0x2F3531EB, sceRtcGetDayOfWeek); - //REG_FUNC(0xD7622935, sceRtcCheckValid); - //REG_FUNC(0x3A332F81, sceRtcSetTime_t); - //REG_FUNC(0xA6C36B6A, sceRtcSetTime64_t); - //REG_FUNC(0x8DE6FEB7, sceRtcGetTime_t); - //REG_FUNC(0xC995DE02, sceRtcGetTime64_t); - //REG_FUNC(0xF8B22B07, sceRtcSetDosTime); - //REG_FUNC(0x92ABEBAF, sceRtcGetDosTime); - //REG_FUNC(0xA79A8846, sceRtcSetWin32FileTime); - //REG_FUNC(0x8A95E119, sceRtcGetWin32FileTime); - //REG_FUNC(0x811313B3, sceRtcGetTickResolution); - //REG_FUNC(0xCD89F464, sceRtcSetTick); - //REG_FUNC(0xF2B238E2, sceRtcGetTick); - //REG_FUNC(0xC7385158, sceRtcCompareTick); - //REG_FUNC(0x4559E2DB, sceRtcTickAddTicks); - //REG_FUNC(0xAE26D920, sceRtcTickAddMicroseconds); - //REG_FUNC(0x979AFD79, sceRtcTickAddSeconds); - //REG_FUNC(0x4C358871, sceRtcTickAddMinutes); - //REG_FUNC(0x6F193F55, sceRtcTickAddHours); - //REG_FUNC(0x58DE3C70, sceRtcTickAddDays); - //REG_FUNC(0xE713C640, sceRtcTickAddWeeks); - //REG_FUNC(0x6321B4AA, sceRtcTickAddMonths); - //REG_FUNC(0xDF6C3E1B, sceRtcTickAddYears); - //REG_FUNC(0x2347CE12, sceRtcParseDateTime); - //REG_FUNC(0x2D18AEEC, sceRtcParseRFC3339); + REG_FUNC(0x23F79274, sceRtcGetCurrentTick); + REG_FUNC(0xCDDD25FE, sceRtcGetCurrentNetworkTick); + REG_FUNC(0x70FDE8F1, sceRtcGetCurrentClock); + REG_FUNC(0x0572EDDC, sceRtcGetCurrentClockLocalTime); + REG_FUNC(0x1282C436, sceRtcConvertUtcToLocalTime); + REG_FUNC(0x0A05E201, sceRtcConvertLocalTimeToUtc); + REG_FUNC(0x42CA8EB5, sceRtcFormatRFC2822LocalTime); + REG_FUNC(0x147F2138, sceRtcFormatRFC2822); + REG_FUNC(0x742250A9, sceRtcFormatRFC3339LocalTime); + REG_FUNC(0xCCEA2B54, sceRtcFormatRFC3339); + REG_FUNC(0xF17FD8B5, sceRtcIsLeapYear); + REG_FUNC(0x49EB4556, sceRtcGetDaysInMonth); + REG_FUNC(0x2F3531EB, sceRtcGetDayOfWeek); + REG_FUNC(0xD7622935, sceRtcCheckValid); + REG_FUNC(0x3A332F81, sceRtcSetTime_t); + REG_FUNC(0xA6C36B6A, sceRtcSetTime64_t); + REG_FUNC(0x8DE6FEB7, sceRtcGetTime_t); + REG_FUNC(0xC995DE02, sceRtcGetTime64_t); + REG_FUNC(0xF8B22B07, sceRtcSetDosTime); + REG_FUNC(0x92ABEBAF, sceRtcGetDosTime); + REG_FUNC(0xA79A8846, sceRtcSetWin32FileTime); + REG_FUNC(0x8A95E119, sceRtcGetWin32FileTime); + REG_FUNC(0x811313B3, sceRtcGetTickResolution); + REG_FUNC(0xCD89F464, sceRtcSetTick); + REG_FUNC(0xF2B238E2, sceRtcGetTick); + REG_FUNC(0xC7385158, sceRtcCompareTick); + REG_FUNC(0x4559E2DB, sceRtcTickAddTicks); + REG_FUNC(0xAE26D920, sceRtcTickAddMicroseconds); + REG_FUNC(0x979AFD79, sceRtcTickAddSeconds); + REG_FUNC(0x4C358871, sceRtcTickAddMinutes); + REG_FUNC(0x6F193F55, sceRtcTickAddHours); + REG_FUNC(0x58DE3C70, sceRtcTickAddDays); + REG_FUNC(0xE713C640, sceRtcTickAddWeeks); + REG_FUNC(0x6321B4AA, sceRtcTickAddMonths); + REG_FUNC(0xDF6C3E1B, sceRtcTickAddYears); + REG_FUNC(0x2347CE12, sceRtcParseDateTime); + REG_FUNC(0x2D18AEEC, sceRtcParseRFC3339); }); diff --git a/rpcs3/Emu/ARMv7/Modules/sceSas.cpp b/rpcs3/Emu/ARMv7/Modules/sceSas.cpp index 0db6b65e16..3d11ff98f1 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceSas.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceSas.cpp @@ -4,6 +4,152 @@ extern psv_log_base sceSas; +s32 sceSasGetNeededMemorySize(vm::psv::ptr config, vm::psv::ptr outSize) +{ + throw __FUNCTION__; +} + +s32 sceSasInit(vm::psv::ptr config, vm::psv::ptr buffer, u32 bufferSize) +{ + throw __FUNCTION__; +} + +s32 sceSasInitWithGrain(vm::psv::ptr config, u32 grain, vm::psv::ptr buffer, u32 bufferSize) +{ + throw __FUNCTION__; +} + +s32 sceSasExit(vm::psv::ptr> outBuffer, vm::psv::ptr outBufferSize) +{ + throw __FUNCTION__; +} + +s32 sceSasSetGrain(u32 grain) +{ + throw __FUNCTION__; +} + +s32 sceSasGetGrain() +{ + throw __FUNCTION__; +} + +s32 sceSasSetOutputmode(u32 outputmode) +{ + throw __FUNCTION__; +} + +s32 sceSasGetOutputmode() +{ + throw __FUNCTION__; +} + +s32 sceSasCore(vm::psv::ptr out) +{ + throw __FUNCTION__; +} + +s32 sceSasCoreWithMix(vm::psv::ptr inOut, s32 lvol, s32 rvol) +{ + throw __FUNCTION__; +} + +s32 sceSasSetVoice(s32 iVoiceNum, vm::psv::ptr vagBuf, u32 size, u32 loopflag) +{ + throw __FUNCTION__; +} + +s32 sceSasSetVoicePCM(s32 iVoiceNum, vm::psv::ptr pcmBuf, u32 size, s32 loopsize) +{ + throw __FUNCTION__; +} + +s32 sceSasSetNoise(s32 iVoiceNum, u32 uClk) +{ + throw __FUNCTION__; +} + +s32 sceSasSetVolume(s32 iVoiceNum, s32 l, s32 r, s32 wl, s32 wr) +{ + throw __FUNCTION__; +} + +s32 sceSasSetPitch(s32 iVoiceNum, s32 pitch) +{ + throw __FUNCTION__; +} + +s32 sceSasSetADSR(s32 iVoiceNum, u32 flag, u32 ar, u32 dr, u32 sr, u32 rr) +{ + throw __FUNCTION__; +} + +s32 sceSasSetADSRmode(s32 iVoiceNum, u32 flag, u32 am, u32 dm, u32 sm, u32 rm) +{ + throw __FUNCTION__; +} + +s32 sceSasSetSL(s32 iVoiceNum, u32 sl) +{ + throw __FUNCTION__; +} + +s32 sceSasSetSimpleADSR(s32 iVoiceNum, u16 adsr1, u16 adsr2) +{ + throw __FUNCTION__; +} + +s32 sceSasSetKeyOn(s32 iVoiceNum) +{ + throw __FUNCTION__; +} + +s32 sceSasSetKeyOff(s32 iVoiceNum) +{ + throw __FUNCTION__; +} + +s32 sceSasSetPause(s32 iVoiceNum, u32 pauseFlag) +{ + throw __FUNCTION__; +} + +s32 sceSasGetPauseState(s32 iVoiceNum) +{ + throw __FUNCTION__; +} + +s32 sceSasGetEndState(s32 iVoiceNum) +{ + throw __FUNCTION__; +} + +s32 sceSasGetEnvelope(s32 iVoiceNum) +{ + throw __FUNCTION__; +} + +s32 sceSasSetEffect(s32 drySwitch, s32 wetSwitch) +{ + throw __FUNCTION__; +} + +s32 sceSasSetEffectType(s32 type) +{ + throw __FUNCTION__; +} + +s32 sceSasSetEffectVolume(s32 valL, s32 valR) +{ + throw __FUNCTION__; +} + +s32 sceSasSetEffectParam(u32 delayTime, u32 feedback) +{ + throw __FUNCTION__; +} + + #define REG_FUNC(nid, name) reg_psv_func(nid, &sceSas, #name, name) psv_log_base sceSas("SceSas", []() @@ -28,36 +174,36 @@ psv_log_base sceSas("SceSas", []() //REG_FUNC(0xC72F1EEF, sceAsRender); //REG_FUNC(0xCE23F057, sceAsLockUpdate); //REG_FUNC(0x8BEF3C92, sceAsUnlockUpdate); - //REG_FUNC(0x180C6824, sceSasGetNeededMemorySize); - //REG_FUNC(0x449B5974, sceSasInit); - //REG_FUNC(0x820D5F82, sceSasInitWithGrain); - //REG_FUNC(0xBB7D6790, sceSasExit); - //REG_FUNC(0x2B4A207C, sceSasSetGrain); - //REG_FUNC(0x2BEA45BC, sceSasGetGrain); - //REG_FUNC(0x44DDB3C4, sceSasSetOutputmode); - //REG_FUNC(0x2C36E150, sceSasGetOutputmode); - //REG_FUNC(0x7A4672B2, sceSasCore); - //REG_FUNC(0xBD496983, sceSasCoreWithMix); - //REG_FUNC(0x2B75F9BC, sceSasSetVoice); - //REG_FUNC(0xB1756EFC, sceSasSetVoicePCM); - //REG_FUNC(0xF1C63CB9, sceSasSetNoise); - //REG_FUNC(0x0BE8204D, sceSasSetVolume); + REG_FUNC(0x180C6824, sceSasGetNeededMemorySize); + REG_FUNC(0x449B5974, sceSasInit); + REG_FUNC(0x820D5F82, sceSasInitWithGrain); + REG_FUNC(0xBB7D6790, sceSasExit); + REG_FUNC(0x2B4A207C, sceSasSetGrain); + REG_FUNC(0x2BEA45BC, sceSasGetGrain); + REG_FUNC(0x44DDB3C4, sceSasSetOutputmode); + REG_FUNC(0x2C36E150, sceSasGetOutputmode); + REG_FUNC(0x7A4672B2, sceSasCore); + REG_FUNC(0xBD496983, sceSasCoreWithMix); + REG_FUNC(0x2B75F9BC, sceSasSetVoice); + REG_FUNC(0xB1756EFC, sceSasSetVoicePCM); + REG_FUNC(0xF1C63CB9, sceSasSetNoise); + REG_FUNC(0x0BE8204D, sceSasSetVolume); //REG_FUNC(0x011788BE, sceSasSetDistortion); - //REG_FUNC(0x2C48A08C, sceSasSetPitch); - //REG_FUNC(0x18A5EFA2, sceSasSetADSR); - //REG_FUNC(0x5207F9D2, sceSasSetADSRmode); - //REG_FUNC(0xDE6227B8, sceSasSetSL); - //REG_FUNC(0xECCE0DB8, sceSasSetSimpleADSR); - //REG_FUNC(0xC838DB6F, sceSasSetKeyOn); - //REG_FUNC(0x5E42ADAB, sceSasSetKeyOff); - //REG_FUNC(0x59C7A9DF, sceSasSetPause); - //REG_FUNC(0x007E63E6, sceSasGetEndState); - //REG_FUNC(0xFD1A0CBF, sceSasGetPauseState); - //REG_FUNC(0x296A9910, sceSasGetEnvelope); - //REG_FUNC(0xB0444E69, sceSasSetEffect); - //REG_FUNC(0xCDF2DDD5, sceSasSetEffectType); - //REG_FUNC(0x55EDDBFA, sceSasSetEffectVolume); - //REG_FUNC(0xBAD546A0, sceSasSetEffectParam); + REG_FUNC(0x2C48A08C, sceSasSetPitch); + REG_FUNC(0x18A5EFA2, sceSasSetADSR); + REG_FUNC(0x5207F9D2, sceSasSetADSRmode); + REG_FUNC(0xDE6227B8, sceSasSetSL); + REG_FUNC(0xECCE0DB8, sceSasSetSimpleADSR); + REG_FUNC(0xC838DB6F, sceSasSetKeyOn); + REG_FUNC(0x5E42ADAB, sceSasSetKeyOff); + REG_FUNC(0x59C7A9DF, sceSasSetPause); + REG_FUNC(0x007E63E6, sceSasGetEndState); + REG_FUNC(0xFD1A0CBF, sceSasGetPauseState); + REG_FUNC(0x296A9910, sceSasGetEnvelope); + REG_FUNC(0xB0444E69, sceSasSetEffect); + REG_FUNC(0xCDF2DDD5, sceSasSetEffectType); + REG_FUNC(0x55EDDBFA, sceSasSetEffectVolume); + REG_FUNC(0xBAD546A0, sceSasSetEffectParam); //REG_FUNC(0xB6642276, sceSasGetDryPeak); //REG_FUNC(0x4314F0E9, sceSasGetWetPeak); //REG_FUNC(0x1568017A, sceSasGetPreMasterPeak); diff --git a/rpcs3/Emu/ARMv7/Modules/sceSystemGesture.cpp b/rpcs3/Emu/ARMv7/Modules/sceSystemGesture.cpp index b70a5a27c4..0e894f79fb 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceSystemGesture.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceSystemGesture.cpp @@ -2,8 +2,250 @@ #include "Emu/System.h" #include "Emu/ARMv7/PSVFuncList.h" +#include "sceTouch.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) +{ + throw __FUNCTION__; +} + +s32 sceSystemGestureFinalizePrimitiveTouchRecognizer() +{ + throw __FUNCTION__; +} + +s32 sceSystemGestureResetPrimitiveTouchRecognizer() +{ + throw __FUNCTION__; +} + +s32 sceSystemGestureUpdatePrimitiveTouchRecognizer(vm::psv::ptr pFrontData, vm::psv::ptr pBackData) +{ + throw __FUNCTION__; +} + +s32 sceSystemGestureGetPrimitiveTouchEvents(vm::psv::ptr primitiveEventBuffer, const u32 capacityOfBuffer, vm::psv::ptr numberOfEvent) +{ + throw __FUNCTION__; +} + +s32 sceSystemGestureGetPrimitiveTouchEventsCount() +{ + throw __FUNCTION__; +} + +s32 sceSystemGestureGetPrimitiveTouchEventByIndex(const u32 index, vm::psv::ptr primitiveTouchEvent) +{ + throw __FUNCTION__; +} + +s32 sceSystemGestureGetPrimitiveTouchEventByPrimitiveID(const u16 primitiveID, vm::psv::ptr primitiveTouchEvent) +{ + throw __FUNCTION__; +} + +s32 sceSystemGestureCreateTouchRecognizer(vm::psv::ptr touchRecognizer, const SceSystemGestureType gestureType, const u8 touchPanelPortID, vm::psv::ptr rectangle, vm::psv::ptr touchRecognizerParameter) +{ + throw __FUNCTION__; +} + +s32 sceSystemGestureGetTouchRecognizerInformation(vm::psv::ptr touchRecognizer, vm::psv::ptr information) +{ + throw __FUNCTION__; +} + +s32 sceSystemGestureResetTouchRecognizer(vm::psv::ptr touchRecognizer) +{ + throw __FUNCTION__; +} + +s32 sceSystemGestureUpdateTouchRecognizer(vm::psv::ptr touchRecognizer) +{ + throw __FUNCTION__; +} + +s32 sceSystemGestureUpdateTouchRecognizerRectangle(vm::psv::ptr touchRecognizer, vm::psv::ptr rectangle) +{ + throw __FUNCTION__; +} + +s32 sceSystemGestureGetTouchEvents(vm::psv::ptr touchRecognizer, vm::psv::ptr eventBuffer, const u32 capacityOfBuffer, vm::psv::ptr numberOfEvent) +{ + throw __FUNCTION__; +} + +s32 sceSystemGestureGetTouchEventsCount(vm::psv::ptr touchRecognizer) +{ + throw __FUNCTION__; +} + +s32 sceSystemGestureGetTouchEventByIndex(vm::psv::ptr touchRecognizer, const u32 index, vm::psv::ptr touchEvent) +{ + throw __FUNCTION__; +} + +s32 sceSystemGestureGetTouchEventByEventID(vm::psv::ptr touchRecognizer, const u32 eventID, vm::psv::ptr touchEvent) +{ + throw __FUNCTION__; +} + + #define REG_FUNC(nid, name) reg_psv_func(nid, &sceSystemGesture, #name, name) psv_log_base sceSystemGesture("SceSystemGesture", []() @@ -12,21 +254,21 @@ psv_log_base sceSystemGesture("SceSystemGesture", []() sceSystemGesture.on_unload = nullptr; sceSystemGesture.on_stop = nullptr; - //REG_FUNC(0x6078A08B, sceSystemGestureInitializePrimitiveTouchRecognizer); - //REG_FUNC(0xFD5A6504, sceSystemGestureResetPrimitiveTouchRecognizer); - //REG_FUNC(0xB3875104, sceSystemGestureFinalizePrimitiveTouchRecognizer); - //REG_FUNC(0xDF4C665A, sceSystemGestureUpdatePrimitiveTouchRecognizer); - //REG_FUNC(0xC750D3DA, sceSystemGestureGetPrimitiveTouchEvents); - //REG_FUNC(0xBAB8ECCB, sceSystemGestureGetPrimitiveTouchEventsCount); - //REG_FUNC(0xE0577765, sceSystemGestureGetPrimitiveTouchEventByIndex); - //REG_FUNC(0x480564C9, sceSystemGestureGetPrimitiveTouchEventByPrimitiveID); - //REG_FUNC(0xC3367370, sceSystemGestureCreateTouchRecognizer); - //REG_FUNC(0xF0DB1AE5, sceSystemGestureGetTouchRecognizerInformation); - //REG_FUNC(0x0D941B90, sceSystemGestureResetTouchRecognizer); - //REG_FUNC(0x851FB144, sceSystemGestureUpdateTouchRecognizer); - //REG_FUNC(0xA9DB29F6, sceSystemGestureUpdateTouchRecognizerRectangle); - //REG_FUNC(0x789D867C, sceSystemGestureGetTouchEvents); - //REG_FUNC(0x13AD2218, sceSystemGestureGetTouchEventsCount); - //REG_FUNC(0x74724147, sceSystemGestureGetTouchEventByIndex); - //REG_FUNC(0x5570B83E, sceSystemGestureGetTouchEventByEventID); + REG_FUNC(0x6078A08B, sceSystemGestureInitializePrimitiveTouchRecognizer); + REG_FUNC(0xFD5A6504, sceSystemGestureResetPrimitiveTouchRecognizer); + REG_FUNC(0xB3875104, sceSystemGestureFinalizePrimitiveTouchRecognizer); + REG_FUNC(0xDF4C665A, sceSystemGestureUpdatePrimitiveTouchRecognizer); + REG_FUNC(0xC750D3DA, sceSystemGestureGetPrimitiveTouchEvents); + REG_FUNC(0xBAB8ECCB, sceSystemGestureGetPrimitiveTouchEventsCount); + REG_FUNC(0xE0577765, sceSystemGestureGetPrimitiveTouchEventByIndex); + REG_FUNC(0x480564C9, sceSystemGestureGetPrimitiveTouchEventByPrimitiveID); + REG_FUNC(0xC3367370, sceSystemGestureCreateTouchRecognizer); + REG_FUNC(0xF0DB1AE5, sceSystemGestureGetTouchRecognizerInformation); + REG_FUNC(0x0D941B90, sceSystemGestureResetTouchRecognizer); + REG_FUNC(0x851FB144, sceSystemGestureUpdateTouchRecognizer); + REG_FUNC(0xA9DB29F6, sceSystemGestureUpdateTouchRecognizerRectangle); + REG_FUNC(0x789D867C, sceSystemGestureGetTouchEvents); + REG_FUNC(0x13AD2218, sceSystemGestureGetTouchEventsCount); + REG_FUNC(0x74724147, sceSystemGestureGetTouchEventByIndex); + REG_FUNC(0x5570B83E, sceSystemGestureGetTouchEventByEventID); }); diff --git a/rpcs3/Emu/ARMv7/Modules/sceTouch.cpp b/rpcs3/Emu/ARMv7/Modules/sceTouch.cpp index ee13162e61..b6ce6ccc77 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceTouch.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceTouch.cpp @@ -2,40 +2,7 @@ #include "Emu/System.h" #include "Emu/ARMv7/PSVFuncList.h" -extern psv_log_base sceTouch; - -struct SceTouchPanelInfo -{ - s16 minAaX; - s16 minAaY; - s16 maxAaX; - s16 maxAaY; - s16 minDispX; - s16 minDispY; - s16 maxDispX; - s16 maxDispY; - u8 minForce; - u8 maxForce; - u8 rsv[30]; -}; - -struct SceTouchReport -{ - u8 id; - u8 force; - s16 x; - s16 y; - s8 rsv[8]; - u16 info; -}; - -struct SceTouchData -{ - u64 timeStamp; - u32 status; - u32 reportNum; - SceTouchReport report[8]; -}; +#include "sceTouch.h" s32 sceTouchGetPanelInfo(u32 port, vm::psv::ptr pPanelInfo) { diff --git a/rpcs3/Emu/ARMv7/Modules/sceTouch.h b/rpcs3/Emu/ARMv7/Modules/sceTouch.h new file mode 100644 index 0000000000..a71f6003c2 --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/sceTouch.h @@ -0,0 +1,36 @@ +#pragma once + +struct SceTouchPanelInfo +{ + s16 minAaX; + s16 minAaY; + s16 maxAaX; + s16 maxAaY; + s16 minDispX; + s16 minDispY; + s16 maxDispX; + s16 maxDispY; + u8 minForce; + u8 maxForce; + u8 rsv[30]; +}; + +struct SceTouchReport +{ + u8 id; + u8 force; + s16 x; + s16 y; + s8 rsv[8]; + u16 info; +}; + +struct SceTouchData +{ + u64 timeStamp; + u32 status; + u32 reportNum; + SceTouchReport report[8]; +}; + +extern psv_log_base sceTouch; diff --git a/rpcs3/Emu/ARMv7/Modules/sceVoice.cpp b/rpcs3/Emu/ARMv7/Modules/sceVoice.cpp index cb0cfc8f53..cddc5f43d2 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceVoice.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceVoice.cpp @@ -174,7 +174,7 @@ s32 sceVoiceDeletePort(u32 portId) throw __FUNCTION__; } -s32 sceVoiceWriteToIPort(u32 ips, vm::psv::ptr data, vm::psv::ptr size, int16_t frameGaps) +s32 sceVoiceWriteToIPort(u32 ips, vm::psv::ptr data, vm::psv::ptr size, s16 frameGaps) { throw __FUNCTION__; } diff --git a/rpcs3/Emu/Memory/vm_ptr.h b/rpcs3/Emu/Memory/vm_ptr.h index ead6e577a0..0c588cd7ee 100644 --- a/rpcs3/Emu/Memory/vm_ptr.h +++ b/rpcs3/Emu/Memory/vm_ptr.h @@ -108,6 +108,8 @@ namespace vm AT m_addr; public: + static_assert(!std::is_pointer::value, "vm::_ptr_base<> error: invalid type (pointer)"); + static_assert(!std::is_reference::value, "vm::_ptr_base<> error: invalid type (reference)"); typedef typename std::remove_cv::type type; __forceinline static const u32 data_size() diff --git a/rpcs3/Emu/SysCalls/Modules/sceNp.h b/rpcs3/Emu/SysCalls/Modules/sceNp.h index ddce57f3dd..35be94177a 100644 --- a/rpcs3/Emu/SysCalls/Modules/sceNp.h +++ b/rpcs3/Emu/SysCalls/Modules/sceNp.h @@ -1957,7 +1957,7 @@ struct SceNpScoreClanRankData CellRtcTick recordDate; SceNpId npId; SceNpOnlineName onlineName; - uint8_t reserved[32]; + u8 reserved[32]; }; // Clan ranking information to be obtained for a specified clan ID diff --git a/rpcs3/Emu/SysCalls/Modules/sceNpClans.h b/rpcs3/Emu/SysCalls/Modules/sceNpClans.h index faf47e3062..d870d5bd07 100644 --- a/rpcs3/Emu/SysCalls/Modules/sceNpClans.h +++ b/rpcs3/Emu/SysCalls/Modules/sceNpClans.h @@ -109,7 +109,7 @@ enum // Request handle for clan API struct SceNpClansRequest; -typedef SceNpClansRequest* SceNpClansRequestHandle; +typedef vm::ptr SceNpClansRequestHandle; // Paging request structure struct SceNpClansPagingRequest diff --git a/rpcs3/emucore.vcxproj b/rpcs3/emucore.vcxproj index 69cbaaf944..1e6d47a50e 100644 --- a/rpcs3/emucore.vcxproj +++ b/rpcs3/emucore.vcxproj @@ -341,6 +341,7 @@ + diff --git a/rpcs3/emucore.vcxproj.filters b/rpcs3/emucore.vcxproj.filters index 7935e1ddc6..ac1531ee30 100644 --- a/rpcs3/emucore.vcxproj.filters +++ b/rpcs3/emucore.vcxproj.filters @@ -1498,5 +1498,8 @@ Emu\CPU\ARMv7\Modules + + Emu\CPU\ARMv7\Modules + \ No newline at end of file From bdd458d2ae1bbd029eca9a116eb3de5618f2ad99 Mon Sep 17 00:00:00 2001 From: Nekotekina Date: Fri, 30 Jan 2015 20:19:11 +0300 Subject: [PATCH 07/11] Some functions added --- rpcs3/Emu/ARMv7/Modules/sceNpBasic.cpp | 242 +++- rpcs3/Emu/ARMv7/Modules/sceNpCommon.cpp | 79 +- rpcs3/Emu/ARMv7/Modules/sceNpCommon.h | 154 +++ rpcs3/Emu/ARMv7/Modules/sceNpManager.cpp | 79 +- rpcs3/Emu/ARMv7/Modules/sceNpMatching.cpp | 1360 ++++++++++++++++++++- rpcs3/Emu/ARMv7/Modules/sceNpScore.cpp | 387 +++++- rpcs3/Emu/ARMv7/Modules/sceNpUtility.cpp | 172 ++- rpcs3/Emu/ARMv7/Modules/sceUlt.cpp | 643 +++++++++- rpcs3/emucore.vcxproj | 1 + rpcs3/emucore.vcxproj.filters | 3 + 10 files changed, 2946 insertions(+), 174 deletions(-) create mode 100644 rpcs3/Emu/ARMv7/Modules/sceNpCommon.h diff --git a/rpcs3/Emu/ARMv7/Modules/sceNpBasic.cpp b/rpcs3/Emu/ARMv7/Modules/sceNpBasic.cpp index 1afa85a9cc..e798df5f48 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceNpBasic.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceNpBasic.cpp @@ -1,9 +1,213 @@ -#include "stdafx.h" +#include "stdafx.h" #include "Emu/System.h" #include "Emu/ARMv7/PSVFuncList.h" +#include "sceNpCommon.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) +{ + throw __FUNCTION__; +} + +s32 sceNpBasicTerm(ARMv7Context&) +{ + throw __FUNCTION__; +} + +s32 sceNpBasicRegisterHandler(vm::psv::ptr handlers, vm::psv::ptr context, vm::psv::ptr userdata) +{ + throw __FUNCTION__; +} + +s32 sceNpBasicUnregisterHandler(ARMv7Context&) +{ + throw __FUNCTION__; +} + +s32 sceNpBasicCheckCallback() +{ + throw __FUNCTION__; +} + +s32 sceNpBasicGetFriendOnlineStatus(vm::psv::ptr friendId, vm::psv::ptr status) +{ + throw __FUNCTION__; +} + +s32 sceNpBasicGetGamePresenceOfFriend(vm::psv::ptr friendId, vm::psv::ptr presence) +{ + throw __FUNCTION__; +} + +s32 sceNpBasicGetFriendListEntryCount(vm::psv::ptr count) +{ + throw __FUNCTION__; +} + +s32 sceNpBasicGetFriendListEntries(u32 startIndex, vm::psv::ptr entries, u32 numEntries, vm::psv::ptr retrieved) +{ + throw __FUNCTION__; +} + +s32 sceNpBasicGetBlockListEntryCount(vm::psv::ptr count) +{ + throw __FUNCTION__; +} + +s32 sceNpBasicGetBlockListEntries(u32 startIndex, vm::psv::ptr entries, u32 numEntries, vm::psv::ptr retrieved) +{ + throw __FUNCTION__; +} + +s32 sceNpBasicCheckIfPlayerIsBlocked(vm::psv::ptr player, vm::psv::ptr playerIsBlocked) +{ + throw __FUNCTION__; +} + +s32 sceNpBasicSetInGamePresence(vm::psv::ptr presence) +{ + throw __FUNCTION__; +} + +s32 sceNpBasicUnsetInGamePresence() +{ + throw __FUNCTION__; +} + +s32 sceNpBasicSendInGameDataMessage(vm::psv::ptr to, vm::psv::ptr message) +{ + throw __FUNCTION__; +} + +s32 sceNpBasicRecordPlaySessionLog(vm::psv::ptr withWhom, vm::psv::ptr description) +{ + throw __FUNCTION__; +} + +s32 sceNpBasicGetPlaySessionLogSize(SceNpBasicPlaySessionLogType type, vm::psv::ptr size) +{ + throw __FUNCTION__; +} + +s32 sceNpBasicGetPlaySessionLog(SceNpBasicPlaySessionLogType type, u32 index, vm::psv::ptr log) +{ + throw __FUNCTION__; +} + #define REG_FUNC(nid, name) reg_psv_func(nid, &sceNpBasic, #name, name) psv_log_base sceNpBasic("SceNpBasic", []() @@ -12,22 +216,22 @@ psv_log_base sceNpBasic("SceNpBasic", []() sceNpBasic.on_unload = nullptr; sceNpBasic.on_stop = nullptr; - //REG_FUNC(0xEFB91A99, sceNpBasicInit); - //REG_FUNC(0x389BCB3B, sceNpBasicTerm); - //REG_FUNC(0x26E6E048, sceNpBasicRegisterHandler); - //REG_FUNC(0x050AE072, sceNpBasicUnregisterHandler); - //REG_FUNC(0x20146AEC, sceNpBasicCheckCallback); - //REG_FUNC(0x5183A4B5, sceNpBasicGetFriendOnlineStatus); - //REG_FUNC(0xEF8A91BC, sceNpBasicGetGamePresenceOfFriend); - //REG_FUNC(0xDF41F308, sceNpBasicGetFriendListEntryCount); - //REG_FUNC(0xFF07E787, sceNpBasicGetFriendListEntries); - //REG_FUNC(0x407E1E6F, sceNpBasicGetBlockListEntryCount); - //REG_FUNC(0x1211AE8E, sceNpBasicGetBlockListEntries); - //REG_FUNC(0xF51545D8, sceNpBasicCheckIfPlayerIsBlocked); - //REG_FUNC(0x51D75562, sceNpBasicSetInGamePresence); - //REG_FUNC(0xD20C2370, sceNpBasicUnsetInGamePresence); - //REG_FUNC(0x7A5020A5, sceNpBasicSendInGameDataMessage); - //REG_FUNC(0x3B0A7F47, sceNpBasicRecordPlaySessionLog); - //REG_FUNC(0xFB0F7FDF, sceNpBasicGetPlaySessionLogSize); - //REG_FUNC(0x364531A8, sceNpBasicGetPlaySessionLog); + REG_FUNC(0xEFB91A99, sceNpBasicInit); + REG_FUNC(0x389BCB3B, sceNpBasicTerm); + REG_FUNC(0x26E6E048, sceNpBasicRegisterHandler); + REG_FUNC(0x050AE072, sceNpBasicUnregisterHandler); + REG_FUNC(0x20146AEC, sceNpBasicCheckCallback); + REG_FUNC(0x5183A4B5, sceNpBasicGetFriendOnlineStatus); + REG_FUNC(0xEF8A91BC, sceNpBasicGetGamePresenceOfFriend); + REG_FUNC(0xDF41F308, sceNpBasicGetFriendListEntryCount); + REG_FUNC(0xFF07E787, sceNpBasicGetFriendListEntries); + REG_FUNC(0x407E1E6F, sceNpBasicGetBlockListEntryCount); + REG_FUNC(0x1211AE8E, sceNpBasicGetBlockListEntries); + REG_FUNC(0xF51545D8, sceNpBasicCheckIfPlayerIsBlocked); + REG_FUNC(0x51D75562, sceNpBasicSetInGamePresence); + REG_FUNC(0xD20C2370, sceNpBasicUnsetInGamePresence); + REG_FUNC(0x7A5020A5, sceNpBasicSendInGameDataMessage); + REG_FUNC(0x3B0A7F47, sceNpBasicRecordPlaySessionLog); + REG_FUNC(0xFB0F7FDF, sceNpBasicGetPlaySessionLogSize); + REG_FUNC(0x364531A8, sceNpBasicGetPlaySessionLog); }); diff --git a/rpcs3/Emu/ARMv7/Modules/sceNpCommon.cpp b/rpcs3/Emu/ARMv7/Modules/sceNpCommon.cpp index 4422bee950..095de28b17 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceNpCommon.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceNpCommon.cpp @@ -2,7 +2,62 @@ #include "Emu/System.h" #include "Emu/ARMv7/PSVFuncList.h" -extern psv_log_base sceNpCommon; +#include "sceNpCommon.h" + +s32 sceNpAuthInit() +{ + throw __FUNCTION__; +} + +s32 sceNpAuthTerm() +{ + throw __FUNCTION__; +} + +s32 sceNpAuthCreateStartRequest(vm::psv::ptr param) +{ + throw __FUNCTION__; +} + +s32 sceNpAuthDestroyRequest(SceNpAuthRequestId id) +{ + throw __FUNCTION__; +} + +s32 sceNpAuthAbortRequest(SceNpAuthRequestId id) +{ + throw __FUNCTION__; +} + +s32 sceNpAuthGetTicket(SceNpAuthRequestId id, vm::psv::ptr buf, u32 len) +{ + throw __FUNCTION__; +} + +s32 sceNpAuthGetTicketParam(vm::psv::ptr ticket, u32 ticketSize, s32 paramId, vm::psv::ptr param) +{ + throw __FUNCTION__; +} + +s32 sceNpAuthGetEntitlementIdList(vm::psv::ptr ticket, u32 ticketSize, vm::psv::ptr entIdList, u32 entIdListNum) +{ + throw __FUNCTION__; +} + +s32 sceNpAuthGetEntitlementById(vm::psv::ptr ticket, u32 ticketSize, vm::psv::ptr entId, vm::psv::ptr ent) +{ + throw __FUNCTION__; +} + +s32 sceNpCmpNpId(vm::psv::ptr npid1, vm::psv::ptr npid2) +{ + throw __FUNCTION__; +} + +s32 sceNpCmpNpIdInOrder(vm::psv::ptr npid1, vm::psv::ptr npid2, vm::psv::ptr order) +{ + throw __FUNCTION__; +} #define REG_FUNC(nid, name) reg_psv_func(nid, &sceNpCommon, #name, name) @@ -12,15 +67,15 @@ psv_log_base sceNpCommon("SceNpCommon", []() sceNpCommon.on_unload = nullptr; sceNpCommon.on_stop = nullptr; - //REG_FUNC(0x441D8B4E, sceNpAuthInit); - //REG_FUNC(0x6093B689, sceNpAuthTerm); - //REG_FUNC(0xED42079F, sceNpAuthCreateStartRequest); - //REG_FUNC(0x14FC18AF, sceNpAuthDestroyRequest); - //REG_FUNC(0xE2582575, sceNpAuthAbortRequest); - //REG_FUNC(0x59608D1C, sceNpAuthGetTicket); - //REG_FUNC(0xC1E23E01, sceNpAuthGetTicketParam); - //REG_FUNC(0x3377CD37, sceNpAuthGetEntitlementIdList); - //REG_FUNC(0xF93842F0, sceNpAuthGetEntitlementById); - //REG_FUNC(0xFB8D82E5, sceNpCmpNpId); - //REG_FUNC(0x6BC8150A, sceNpCmpNpIdInOrder); + REG_FUNC(0x441D8B4E, sceNpAuthInit); + REG_FUNC(0x6093B689, sceNpAuthTerm); + REG_FUNC(0xED42079F, sceNpAuthCreateStartRequest); + REG_FUNC(0x14FC18AF, sceNpAuthDestroyRequest); + REG_FUNC(0xE2582575, sceNpAuthAbortRequest); + REG_FUNC(0x59608D1C, sceNpAuthGetTicket); + REG_FUNC(0xC1E23E01, sceNpAuthGetTicketParam); + REG_FUNC(0x3377CD37, sceNpAuthGetEntitlementIdList); + REG_FUNC(0xF93842F0, sceNpAuthGetEntitlementById); + REG_FUNC(0xFB8D82E5, sceNpCmpNpId); + REG_FUNC(0x6BC8150A, sceNpCmpNpIdInOrder); }); diff --git a/rpcs3/Emu/ARMv7/Modules/sceNpCommon.h b/rpcs3/Emu/ARMv7/Modules/sceNpCommon.h new file mode 100644 index 0000000000..2a40b7aee3 --- /dev/null +++ b/rpcs3/Emu/ARMv7/Modules/sceNpCommon.h @@ -0,0 +1,154 @@ +#pragma once + +enum SceNpServiceState : s32 +{ + SCE_NP_SERVICE_STATE_UNKNOWN = 0, + SCE_NP_SERVICE_STATE_SIGNED_OUT, + SCE_NP_SERVICE_STATE_SIGNED_IN, + SCE_NP_SERVICE_STATE_ONLINE +}; + +struct SceNpCommunicationId +{ + char data[9]; + char term; + u8 num; + char dummy; +}; + +struct SceNpCommunicationPassphrase +{ + u8 data[128]; +}; + +struct SceNpCommunicationSignature +{ + u8 data[160]; +}; + +struct SceNpCommunicationConfig +{ + vm::psv::ptr commId; + vm::psv::ptr commPassphrase; + vm::psv::ptr commSignature; +}; + +struct SceNpCountryCode +{ + char data[2]; + char term; + char padding[1]; +}; + +struct SceNpOnlineId +{ + char data[16]; + char term; + char dummy[3]; +}; + +struct SceNpId +{ + SceNpOnlineId handle; + u8 opt[8]; + u8 reserved[8]; +}; + +struct SceNpAvatarUrl +{ + char data[127]; + char term; +}; + +struct SceNpUserInformation +{ + SceNpId userId; + SceNpAvatarUrl icon; + u8 reserved[52]; +}; + +struct SceNpMyLanguages +{ + s32 language1; + s32 language2; + s32 language3; + u8 padding[4]; +}; + +struct SceNpAvatarImage +{ + u8 data[200 * 1024]; + u32 size; + u8 reserved[12]; +}; + +enum SceNpAvatarSizeType : s32 +{ + SCE_NP_AVATAR_SIZE_LARGE, + SCE_NP_AVATAR_SIZE_MIDDLE, + SCE_NP_AVATAR_SIZE_SMALL +}; + +struct SceNpAboutMe +{ + char data[64]; +}; + +typedef s32 SceNpAuthRequestId; +typedef u64 SceNpTime; + +struct SceNpDate +{ + u16 year; + u8 month; + u8 day; +}; + +union SceNpTicketParam +{ + s32 i32; + s64 i64; + u32 u32; + u64 u64; + SceNpDate date; + u8 data[256]; +}; + +struct SceNpTicketVersion +{ + u16 major; + u16 minor; +}; + +typedef vm::psv::ptr arg)> SceNpAuthCallback; + +struct SceNpAuthRequestParameter +{ + u32 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; +}; + +struct SceNpEntitlementId +{ + u8 data[32]; +}; + +struct SceNpEntitlement +{ + SceNpEntitlementId id; + SceNpTime createdDate; + SceNpTime expireDate; + u32 type; + s32 remainingCount; + u32 consumedCount; + char padding[4]; +}; + +extern psv_log_base sceNpCommon; diff --git a/rpcs3/Emu/ARMv7/Modules/sceNpManager.cpp b/rpcs3/Emu/ARMv7/Modules/sceNpManager.cpp index 4771107b92..5fce1c946e 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceNpManager.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceNpManager.cpp @@ -2,8 +2,67 @@ #include "Emu/System.h" #include "Emu/ARMv7/PSVFuncList.h" +#include "sceNpCommon.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) +{ + throw __FUNCTION__; +} + +s32 sceNpTerm(ARMv7Context&) +{ + throw __FUNCTION__; +} + +s32 sceNpCheckCallback() +{ + throw __FUNCTION__; +} + +s32 sceNpGetServiceState(vm::psv::ptr state) +{ + throw __FUNCTION__; +} + +s32 sceNpRegisterServiceStateCallback(SceNpServiceStateCallback callback, vm::psv::ptr userdata) +{ + throw __FUNCTION__; +} + +s32 sceNpUnregisterServiceStateCallback() +{ + throw __FUNCTION__; +} + +s32 sceNpManagerGetNpId(vm::psv::ptr npId) +{ + throw __FUNCTION__; +} + +s32 sceNpManagerGetAccountRegion(vm::psv::ptr countryCode, vm::psv::ptr languageCode) +{ + throw __FUNCTION__; +} + +s32 sceNpManagerGetContentRatingFlag(vm::psv::ptr isRestricted, vm::psv::ptr age) +{ + throw __FUNCTION__; +} + +s32 sceNpManagerGetChatRestrictionFlag(vm::psv::ptr isRestricted) +{ + throw __FUNCTION__; +} + #define REG_FUNC(nid, name) reg_psv_func(nid, &sceNpManager, #name, name) psv_log_base sceNpManager("SceNpManager", []() @@ -12,14 +71,14 @@ psv_log_base sceNpManager("SceNpManager", []() sceNpManager.on_unload = nullptr; sceNpManager.on_stop = nullptr; - //REG_FUNC(0x04D9F484, sceNpInit); - //REG_FUNC(0x19E40AE1, sceNpTerm); - //REG_FUNC(0x3C94B4B4, sceNpManagerGetNpId); - //REG_FUNC(0x54060DF6, sceNpGetServiceState); - //REG_FUNC(0x44239C35, sceNpRegisterServiceStateCallback); - //REG_FUNC(0xD9E6E56C, sceNpUnregisterServiceStateCallback); - //REG_FUNC(0x3B0AE9A9, sceNpCheckCallback); - //REG_FUNC(0xFE835967, sceNpManagerGetAccountRegion); - //REG_FUNC(0xAF0073B2, sceNpManagerGetContentRatingFlag); - //REG_FUNC(0x60C575B1, sceNpManagerGetChatRestrictionFlag); + REG_FUNC(0x04D9F484, sceNpInit); + REG_FUNC(0x19E40AE1, sceNpTerm); + REG_FUNC(0x3C94B4B4, sceNpManagerGetNpId); + REG_FUNC(0x54060DF6, sceNpGetServiceState); + REG_FUNC(0x44239C35, sceNpRegisterServiceStateCallback); + REG_FUNC(0xD9E6E56C, sceNpUnregisterServiceStateCallback); + REG_FUNC(0x3B0AE9A9, sceNpCheckCallback); + REG_FUNC(0xFE835967, sceNpManagerGetAccountRegion); + REG_FUNC(0xAF0073B2, sceNpManagerGetContentRatingFlag); + REG_FUNC(0x60C575B1, sceNpManagerGetChatRestrictionFlag); }); diff --git a/rpcs3/Emu/ARMv7/Modules/sceNpMatching.cpp b/rpcs3/Emu/ARMv7/Modules/sceNpMatching.cpp index ffc7d962a7..cdb9f5aa8e 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceNpMatching.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceNpMatching.cpp @@ -2,8 +2,1306 @@ #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 +{ + struct vm::psv::ptr next; + SceNpId npId; + u64 joinDate; + SceNpMatching2Role role; + u8 padding[7]; +}; + + +struct SceNpMatching2RoomMemberDataInternal +{ + struct 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; +}; + +// Functions + +s32 sceNpMatching2Init( + const u32 poolSize, + const s32 threadPriority, + const s32 cpuAffinityMask, + const u32 threadStackSize) +{ + throw __FUNCTION__; +} + +s32 sceNpMatching2Term() +{ + throw __FUNCTION__; +} + +s32 sceNpMatching2CreateContext( + vm::psv::ptr npId, + vm::psv::ptr commId, + vm::psv::ptr passPhrase, + vm::psv::ptr ctxId) +{ + throw __FUNCTION__; +} + +s32 sceNpMatching2DestroyContext(const SceNpMatching2ContextId ctxId) +{ + throw __FUNCTION__; +} + +s32 sceNpMatching2ContextStart(const SceNpMatching2ContextId ctxId, const u64 timeout) +{ + throw __FUNCTION__; +} + +s32 sceNpMatching2AbortContextStart(const SceNpMatching2ContextId ctxId) +{ + throw __FUNCTION__; +} + +s32 sceNpMatching2ContextStop(const SceNpMatching2ContextId ctxId) +{ + throw __FUNCTION__; +} + +s32 sceNpMatching2SetDefaultRequestOptParam(const SceNpMatching2ContextId ctxId, vm::psv::ptr optParam) +{ + throw __FUNCTION__; +} + +s32 sceNpMatching2RegisterRoomEventCallback(const SceNpMatching2ContextId ctxId, SceNpMatching2RoomEventCallback cbFunc, vm::psv::ptr cbFuncArg) +{ + throw __FUNCTION__; +} + +s32 sceNpMatching2RegisterRoomMessageCallback(const SceNpMatching2ContextId ctxId, SceNpMatching2RoomMessageCallback cbFunc, vm::psv::ptr cbFuncArg) +{ + throw __FUNCTION__; +} + +s32 sceNpMatching2RegisterSignalingCallback(const SceNpMatching2ContextId ctxId, SceNpMatching2SignalingCallback cbFunc, vm::psv::ptr cbFuncArg) +{ + throw __FUNCTION__; +} + +s32 sceNpMatching2RegisterContextCallback(SceNpMatching2ContextCallback cbFunc, vm::psv::ptr cbFuncArg) +{ + throw __FUNCTION__; +} + +s32 sceNpMatching2AbortRequest(const SceNpMatching2ContextId ctxId, const SceNpMatching2RequestId reqId) +{ + throw __FUNCTION__; +} + +s32 sceNpMatching2GetMemoryInfo(vm::psv::ptr memInfo) +{ + throw __FUNCTION__; +} + +s32 sceNpMatching2GetServerLocal(const SceNpMatching2ContextId ctxId, vm::psv::ptr server) +{ + throw __FUNCTION__; +} + +s32 sceNpMatching2GetWorldInfoList( + const SceNpMatching2ContextId ctxId, + vm::psv::ptr reqParam, + vm::psv::ptr optParam, + vm::psv::ptr assignedReqId) +{ + throw __FUNCTION__; +} + +s32 sceNpMatching2CreateJoinRoom( + const SceNpMatching2ContextId ctxId, + vm::psv::ptr reqParam, + vm::psv::ptr optParam, + vm::psv::ptr assignedReqId) +{ + throw __FUNCTION__; +} + +s32 sceNpMatching2SearchRoom( + const SceNpMatching2ContextId ctxId, + vm::psv::ptr reqParam, + vm::psv::ptr optParam, + vm::psv::ptr assignedReqId) +{ + throw __FUNCTION__; +} + +s32 sceNpMatching2JoinRoom( + const SceNpMatching2ContextId ctxId, + vm::psv::ptr reqParam, + vm::psv::ptr optParam, + vm::psv::ptr assignedReqId) +{ + throw __FUNCTION__; +} + +s32 sceNpMatching2LeaveRoom( + const SceNpMatching2ContextId ctxId, + vm::psv::ptr reqParam, + vm::psv::ptr optParam, + vm::psv::ptr assignedReqId) +{ + throw __FUNCTION__; +} + +s32 sceNpMatching2GetSignalingOptParamLocal( + const SceNpMatching2ContextId ctxId, + const SceNpMatching2RoomId roomId, + vm::psv::ptr signalingOptParam) +{ + throw __FUNCTION__; +} + +s32 sceNpMatching2SetRoomDataExternal( + const SceNpMatching2ContextId ctxId, + vm::psv::ptr reqParam, + vm::psv::ptr optParam, + vm::psv::ptr assignedReqId) +{ + throw __FUNCTION__; +} + +s32 sceNpMatching2KickoutRoomMember( + const SceNpMatching2ContextId ctxId, + vm::psv::ptr reqParam, + vm::psv::ptr optParam, + vm::psv::ptr assignedReqId) +{ + throw __FUNCTION__; +} + +s32 sceNpMatching2SendRoomChatMessage( + const SceNpMatching2ContextId ctxId, + vm::psv::ptr reqParam, + vm::psv::ptr optParam, + vm::psv::ptr assignedReqId) +{ + throw __FUNCTION__; +} + +s32 sceNpMatching2SendRoomMessage( + const SceNpMatching2ContextId ctxId, + vm::psv::ptr reqParam, + vm::psv::ptr optParam, + vm::psv::ptr assignedReqId) +{ + throw __FUNCTION__; +} + +s32 sceNpMatching2SignalingGetConnectionStatus( + SceNpMatching2ContextId ctxId, + SceNpMatching2RoomId roomId, + SceNpMatching2RoomMemberId memberId, + vm::psv::ptr connStatus, + vm::psv::ptr peerAddr, + vm::psv::ptr peerPort) +{ + throw __FUNCTION__; +} + +s32 sceNpMatching2SignalingGetConnectionInfo( + SceNpMatching2ContextId ctxId, + SceNpMatching2RoomId roomId, + SceNpMatching2RoomMemberId memberId, + s32 code, + vm::psv::ptr info) +{ + throw __FUNCTION__; +} + +s32 sceNpMatching2SignalingGetLocalNetInfo(vm::psv::ptr netinfo) +{ + throw __FUNCTION__; +} + +s32 sceNpMatching2SignalingGetPeerNetInfo( + SceNpMatching2ContextId ctxId, + SceNpMatching2RoomId roomId, + SceNpMatching2RoomMemberId memberId, + vm::psv::ptr reqId) +{ + throw __FUNCTION__; +} + +s32 sceNpMatching2SignalingCancelPeerNetInfo( + SceNpMatching2ContextId ctxId, + SceNpMatching2SignalingRequestId reqId) +{ + throw __FUNCTION__; +} + +s32 sceNpMatching2SignalingGetPeerNetInfoResult( + SceNpMatching2ContextId ctxId, + SceNpMatching2SignalingRequestId reqId, + vm::psv::ptr netinfo) +{ + throw __FUNCTION__; +} + #define REG_FUNC(nid, name) reg_psv_func(nid, &sceNpMatching, #name, name) psv_log_base sceNpMatching("SceNpMatching2", []() @@ -12,35 +1310,35 @@ psv_log_base sceNpMatching("SceNpMatching2", []() sceNpMatching.on_unload = nullptr; sceNpMatching.on_stop = nullptr; - //REG_FUNC(0xEBB1FE74, sceNpMatching2Init); - //REG_FUNC(0x0124641C, sceNpMatching2Term); - //REG_FUNC(0xADF578E1, sceNpMatching2CreateContext); - //REG_FUNC(0x368AA759, sceNpMatching2DestroyContext); - //REG_FUNC(0xBB2E7559, sceNpMatching2ContextStart); - //REG_FUNC(0xF2847E3B, sceNpMatching2AbortContextStart); - //REG_FUNC(0x506454DE, sceNpMatching2ContextStop); - //REG_FUNC(0xF3A43C50, sceNpMatching2SetDefaultRequestOptParam); - //REG_FUNC(0xF486991B, sceNpMatching2RegisterRoomEventCallback); - //REG_FUNC(0xFA51949B, sceNpMatching2RegisterRoomMessageCallback); - //REG_FUNC(0xF9E35566, sceNpMatching2RegisterContextCallback); - //REG_FUNC(0x74EB6CE9, sceNpMatching2AbortRequest); - //REG_FUNC(0x7BD39E50, sceNpMatching2GetMemoryInfo); - //REG_FUNC(0x65C0FEED, sceNpMatching2GetServerLocal); - //REG_FUNC(0xC086B560, sceNpMatching2GetWorldInfoList); - //REG_FUNC(0x818A9499, sceNpMatching2CreateJoinRoom); - //REG_FUNC(0xD48BAF13, sceNpMatching2SearchRoom); - //REG_FUNC(0x33F7D5AE, sceNpMatching2JoinRoom); - //REG_FUNC(0xC8B0C9EE, sceNpMatching2LeaveRoom); - //REG_FUNC(0x495D2B46, sceNpMatching2GetSignalingOptParamLocal); - //REG_FUNC(0xE0BE0510, sceNpMatching2SendRoomChatMessage); - //REG_FUNC(0x7B908D99, sceNpMatching2SendRoomMessage); - //REG_FUNC(0x4E4C55BD, sceNpMatching2SignalingGetConnectionStatus); - //REG_FUNC(0x20598618, sceNpMatching2SignalingGetConnectionInfo); - //REG_FUNC(0x79310806, sceNpMatching2SignalingGetLocalNetInfo); - //REG_FUNC(0xF0CB1DD3, sceNpMatching2SignalingGetPeerNetInfo); - //REG_FUNC(0xADCD102C, sceNpMatching2SignalingCancelPeerNetInfo); - //REG_FUNC(0xFDC7B2C9, sceNpMatching2SignalingGetPeerNetInfoResult); - //REG_FUNC(0x1C60BC5B, sceNpMatching2RegisterSignalingCallback); - //REG_FUNC(0x8F88AC7E, sceNpMatching2SetRoomDataExternal); - //REG_FUNC(0xA8021394, sceNpMatching2KickoutRoomMember); + REG_FUNC(0xEBB1FE74, sceNpMatching2Init); + REG_FUNC(0x0124641C, sceNpMatching2Term); + REG_FUNC(0xADF578E1, sceNpMatching2CreateContext); + REG_FUNC(0x368AA759, sceNpMatching2DestroyContext); + REG_FUNC(0xBB2E7559, sceNpMatching2ContextStart); + REG_FUNC(0xF2847E3B, sceNpMatching2AbortContextStart); + REG_FUNC(0x506454DE, sceNpMatching2ContextStop); + REG_FUNC(0xF3A43C50, sceNpMatching2SetDefaultRequestOptParam); + REG_FUNC(0xF486991B, sceNpMatching2RegisterRoomEventCallback); + REG_FUNC(0xFA51949B, sceNpMatching2RegisterRoomMessageCallback); + REG_FUNC(0xF9E35566, sceNpMatching2RegisterContextCallback); + REG_FUNC(0x74EB6CE9, sceNpMatching2AbortRequest); + REG_FUNC(0x7BD39E50, sceNpMatching2GetMemoryInfo); + REG_FUNC(0x65C0FEED, sceNpMatching2GetServerLocal); + REG_FUNC(0xC086B560, sceNpMatching2GetWorldInfoList); + REG_FUNC(0x818A9499, sceNpMatching2CreateJoinRoom); + REG_FUNC(0xD48BAF13, sceNpMatching2SearchRoom); + REG_FUNC(0x33F7D5AE, sceNpMatching2JoinRoom); + REG_FUNC(0xC8B0C9EE, sceNpMatching2LeaveRoom); + REG_FUNC(0x495D2B46, sceNpMatching2GetSignalingOptParamLocal); + REG_FUNC(0xE0BE0510, sceNpMatching2SendRoomChatMessage); + REG_FUNC(0x7B908D99, sceNpMatching2SendRoomMessage); + REG_FUNC(0x4E4C55BD, sceNpMatching2SignalingGetConnectionStatus); + REG_FUNC(0x20598618, sceNpMatching2SignalingGetConnectionInfo); + REG_FUNC(0x79310806, sceNpMatching2SignalingGetLocalNetInfo); + REG_FUNC(0xF0CB1DD3, sceNpMatching2SignalingGetPeerNetInfo); + REG_FUNC(0xADCD102C, sceNpMatching2SignalingCancelPeerNetInfo); + REG_FUNC(0xFDC7B2C9, sceNpMatching2SignalingGetPeerNetInfoResult); + REG_FUNC(0x1C60BC5B, sceNpMatching2RegisterSignalingCallback); + REG_FUNC(0x8F88AC7E, sceNpMatching2SetRoomDataExternal); + REG_FUNC(0xA8021394, sceNpMatching2KickoutRoomMember); }); diff --git a/rpcs3/Emu/ARMv7/Modules/sceNpScore.cpp b/rpcs3/Emu/ARMv7/Modules/sceNpScore.cpp index 612114af70..f093ab8b31 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceNpScore.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceNpScore.cpp @@ -2,8 +2,337 @@ #include "Emu/System.h" #include "Emu/ARMv7/PSVFuncList.h" +#include "sceNpCommon.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) +{ + throw __FUNCTION__; +} + +s32 sceNpScoreTerm(ARMv7Context&) +{ + throw __FUNCTION__; +} + +s32 sceNpScoreCreateTitleCtx(vm::psv::ptr titleId, vm::psv::ptr passphrase, vm::psv::ptr selfNpId) +{ + throw __FUNCTION__; +} + +s32 sceNpScoreDeleteTitleCtx(s32 titleCtxId) +{ + throw __FUNCTION__; +} + +s32 sceNpScoreCreateRequest(s32 titleCtxId) +{ + throw __FUNCTION__; +} + +s32 sceNpScoreDeleteRequest(s32 reqId) +{ + throw __FUNCTION__; +} + +s32 sceNpScoreAbortRequest(s32 reqId) +{ + throw __FUNCTION__; +} + +s32 sceNpScoreSetTimeout(s32 id, s32 resolveRetry, s32 resolveTimeout, s32 connTimeout, s32 sendTimeout, s32 recvTimeout) +{ + throw __FUNCTION__; +} + +s32 sceNpScoreSetPlayerCharacterId(s32 id, SceNpScorePcId pcId) +{ + throw __FUNCTION__; +} + +s32 sceNpScoreGetBoardInfo(s32 reqId, SceNpScoreBoardId boardId, vm::psv::ptr boardInfo, vm::psv::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) +{ + throw __FUNCTION__; +} + +s32 sceNpScoreRecordGameData( + s32 reqId, + SceNpScoreBoardId boardId, + SceNpScoreValue score, + u32 totalSize, + u32 sendSize, + vm::psv::ptr data, + vm::psv::ptr option) +{ + throw __FUNCTION__; +} + +s32 sceNpScoreGetGameData( + s32 reqId, + SceNpScoreBoardId boardId, + vm::psv::ptr npId, + vm::psv::ptr totalSize, + u32 recvSize, + vm::psv::ptr data, + vm::psv::ptr option) +{ + throw __FUNCTION__; +} + +s32 sceNpScoreGetRankingByNpId( + s32 reqId, + SceNpScoreBoardId boardId, + vm::psv::ptr npIdArray, + u32 npIdArraySize, + vm::psv::ptr rankArray, + u32 rankArraySize, + vm::psv::ptr commentArray, + u32 commentArraySize, + vm::psv::ptr infoArray, + u32 infoArraySize, + u32 arrayNum, + vm::psv::ptr lastSortDate, + vm::psv::ptr totalRecord, + vm::psv::ptr option) +{ + throw __FUNCTION__; +} + +s32 sceNpScoreGetRankingByRange( + s32 reqId, + SceNpScoreBoardId boardId, + SceNpScoreRankNumber startSerialRank, + vm::psv::ptr rankArray, + u32 rankArraySize, + vm::psv::ptr commentArray, + u32 commentArraySize, + vm::psv::ptr infoArray, + u32 infoArraySize, + u32 arrayNum, + vm::psv::ptr lastSortDate, + vm::psv::ptr totalRecord, + vm::psv::ptr option) +{ + throw __FUNCTION__; +} + + +s32 sceNpScoreGetRankingByNpIdPcId( + s32 reqId, + SceNpScoreBoardId boardId, + vm::psv::ptr idArray, + u32 idArraySize, + vm::psv::ptr rankArray, + u32 rankArraySize, + vm::psv::ptr commentArray, + u32 commentArraySize, + vm::psv::ptr infoArray, + u32 infoArraySize, + u32 arrayNum, + vm::psv::ptr lastSortDate, + vm::psv::ptr totalRecord, + vm::psv::ptr option) +{ + throw __FUNCTION__; +} + +s32 sceNpScoreCensorComment(s32 reqId, vm::psv::ptr comment, vm::psv::ptr option) +{ + throw __FUNCTION__; +} + +s32 sceNpScoreSanitizeComment(s32 reqId, vm::psv::ptr comment, vm::psv::ptr sanitizedComment, vm::psv::ptr option) +{ + throw __FUNCTION__; +} + +s32 sceNpScoreWaitAsync(s32 id, vm::psv::ptr result) +{ + throw __FUNCTION__; +} + +s32 sceNpScorePollAsync(s32 reqId, vm::psv::ptr result) +{ + throw __FUNCTION__; +} + +s32 sceNpScoreGetBoardInfoAsync(s32 reqId, SceNpScoreBoardId boardId, vm::psv::ptr boardInfo, vm::psv::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) +{ + throw __FUNCTION__; +} + +s32 sceNpScoreRecordGameDataAsync( + s32 reqId, + SceNpScoreBoardId boardId, + SceNpScoreValue score, + u32 totalSize, + u32 sendSize, + vm::psv::ptr data, + vm::psv::ptr option) +{ + throw __FUNCTION__; +} + +s32 sceNpScoreGetGameDataAsync( + s32 reqId, + SceNpScoreBoardId boardId, + vm::psv::ptr npId, + vm::psv::ptr totalSize, + u32 recvSize, + vm::psv::ptr data, + vm::psv::ptr option) +{ + throw __FUNCTION__; +} + +s32 sceNpScoreGetRankingByNpIdAsync( + s32 reqId, + SceNpScoreBoardId boardId, + vm::psv::ptr npIdArray, + u32 npIdArraySize, + vm::psv::ptr rankArray, + u32 rankArraySize, + vm::psv::ptr commentArray, + u32 commentArraySize, + vm::psv::ptr infoArray, + u32 infoArraySize, + u32 arrayNum, + vm::psv::ptr lastSortDate, + vm::psv::ptr totalRecord, + vm::psv::ptr option) +{ + throw __FUNCTION__; +} + +s32 sceNpScoreGetRankingByRangeAsync( + s32 reqId, + SceNpScoreBoardId boardId, + SceNpScoreRankNumber startSerialRank, + vm::psv::ptr rankArray, + u32 rankArraySize, + vm::psv::ptr commentArray, + u32 commentArraySize, + vm::psv::ptr infoArray, + u32 infoArraySize, + u32 arrayNum, + vm::psv::ptr lastSortDate, + vm::psv::ptr totalRecord, + vm::psv::ptr option) +{ + throw __FUNCTION__; +} + +s32 sceNpScoreGetRankingByNpIdPcIdAsync( + s32 reqId, + SceNpScoreBoardId boardId, + vm::psv::ptr idArray, + u32 idArraySize, + vm::psv::ptr rankArray, + u32 rankArraySize, + vm::psv::ptr commentArray, + u32 commentArraySize, + vm::psv::ptr infoArray, + u32 infoArraySize, + u32 arrayNum, + vm::psv::ptr lastSortDate, + vm::psv::ptr totalRecord, + vm::psv::ptr option) +{ + throw __FUNCTION__; +} + +s32 sceNpScoreCensorCommentAsync(s32 reqId, vm::psv::ptr comment, vm::psv::ptr option) +{ + throw __FUNCTION__; +} + +s32 sceNpScoreSanitizeCommentAsync(s32 reqId, vm::psv::ptr comment, vm::psv::ptr sanitizedComment, vm::psv::ptr option) +{ + throw __FUNCTION__; +} + #define REG_FUNC(nid, name) reg_psv_func(nid, &sceNpScore, #name, name) psv_log_base sceNpScore("SceNpScore", []() @@ -12,33 +341,33 @@ psv_log_base sceNpScore("SceNpScore", []() sceNpScore.on_unload = nullptr; sceNpScore.on_stop = nullptr; - //REG_FUNC(0x0433069F, sceNpScoreInit); - //REG_FUNC(0x2050F98F, sceNpScoreTerm); - //REG_FUNC(0x5685F225, sceNpScoreCreateTitleCtx); - //REG_FUNC(0xD30D1993, sceNpScoreCreateRequest); - //REG_FUNC(0xF52EA88A, sceNpScoreDeleteTitleCtx); - //REG_FUNC(0xFFF24BB1, sceNpScoreDeleteRequest); - //REG_FUNC(0x320C0277, sceNpScoreRecordScore); - //REG_FUNC(0x24B09634, sceNpScoreRecordScoreAsync); - //REG_FUNC(0xC2862B67, sceNpScoreRecordGameData); - //REG_FUNC(0x40573917, sceNpScoreRecordGameDataAsync); - //REG_FUNC(0xDFAD64D3, sceNpScoreGetGameData); - //REG_FUNC(0xCE416993, sceNpScoreGetGameDataAsync); - //REG_FUNC(0x427D3412, sceNpScoreGetRankingByRange); - //REG_FUNC(0xC45E3FCD, sceNpScoreGetRankingByRangeAsync); - //REG_FUNC(0xBAE55B34, sceNpScoreGetRankingByNpId); - //REG_FUNC(0x45CD1D00, sceNpScoreGetRankingByNpIdAsync); - //REG_FUNC(0x871F28AA, sceNpScoreGetRankingByNpIdPcId); - //REG_FUNC(0xCE3A9544, sceNpScoreGetRankingByNpIdPcIdAsync); - //REG_FUNC(0xA7E93CE1, sceNpScoreAbortRequest); - //REG_FUNC(0x31733BF3, sceNpScoreWaitAsync); - //REG_FUNC(0x9F2A7AC9, sceNpScorePollAsync); - //REG_FUNC(0x00F90E7B, sceNpScoreGetBoardInfo); - //REG_FUNC(0x3CD9974E, sceNpScoreGetBoardInfoAsync); - //REG_FUNC(0xA0C94D46, sceNpScoreCensorComment); - //REG_FUNC(0xAA0BBF8E, sceNpScoreCensorCommentAsync); - //REG_FUNC(0x6FD2041A, sceNpScoreSanitizeComment); - //REG_FUNC(0x15981858, sceNpScoreSanitizeCommentAsync); - //REG_FUNC(0x5EF44841, sceNpScoreSetTimeout); - //REG_FUNC(0x53D77883, sceNpScoreSetPlayerCharacterId); + REG_FUNC(0x0433069F, sceNpScoreInit); + REG_FUNC(0x2050F98F, sceNpScoreTerm); + REG_FUNC(0x5685F225, sceNpScoreCreateTitleCtx); + REG_FUNC(0xD30D1993, sceNpScoreCreateRequest); + REG_FUNC(0xF52EA88A, sceNpScoreDeleteTitleCtx); + REG_FUNC(0xFFF24BB1, sceNpScoreDeleteRequest); + REG_FUNC(0x320C0277, sceNpScoreRecordScore); + REG_FUNC(0x24B09634, sceNpScoreRecordScoreAsync); + REG_FUNC(0xC2862B67, sceNpScoreRecordGameData); + REG_FUNC(0x40573917, sceNpScoreRecordGameDataAsync); + REG_FUNC(0xDFAD64D3, sceNpScoreGetGameData); + REG_FUNC(0xCE416993, sceNpScoreGetGameDataAsync); + REG_FUNC(0x427D3412, sceNpScoreGetRankingByRange); + REG_FUNC(0xC45E3FCD, sceNpScoreGetRankingByRangeAsync); + REG_FUNC(0xBAE55B34, sceNpScoreGetRankingByNpId); + REG_FUNC(0x45CD1D00, sceNpScoreGetRankingByNpIdAsync); + REG_FUNC(0x871F28AA, sceNpScoreGetRankingByNpIdPcId); + REG_FUNC(0xCE3A9544, sceNpScoreGetRankingByNpIdPcIdAsync); + REG_FUNC(0xA7E93CE1, sceNpScoreAbortRequest); + REG_FUNC(0x31733BF3, sceNpScoreWaitAsync); + REG_FUNC(0x9F2A7AC9, sceNpScorePollAsync); + REG_FUNC(0x00F90E7B, sceNpScoreGetBoardInfo); + REG_FUNC(0x3CD9974E, sceNpScoreGetBoardInfoAsync); + REG_FUNC(0xA0C94D46, sceNpScoreCensorComment); + REG_FUNC(0xAA0BBF8E, sceNpScoreCensorCommentAsync); + REG_FUNC(0x6FD2041A, sceNpScoreSanitizeComment); + REG_FUNC(0x15981858, sceNpScoreSanitizeCommentAsync); + REG_FUNC(0x5EF44841, sceNpScoreSetTimeout); + REG_FUNC(0x53D77883, sceNpScoreSetPlayerCharacterId); }); diff --git a/rpcs3/Emu/ARMv7/Modules/sceNpUtility.cpp b/rpcs3/Emu/ARMv7/Modules/sceNpUtility.cpp index 5ce2ca80ad..1aab007361 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceNpUtility.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceNpUtility.cpp @@ -2,8 +2,140 @@ #include "Emu/System.h" #include "Emu/ARMv7/PSVFuncList.h" +#include "sceNpCommon.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) +{ + throw __FUNCTION__; +} + +s32 sceNpLookupTerm(ARMv7Context&) +{ + throw __FUNCTION__; +} + +s32 sceNpLookupCreateTitleCtx(vm::psv::ptr titleId, vm::psv::ptr selfNpId) +{ + throw __FUNCTION__; +} + +s32 sceNpLookupDeleteTitleCtx(s32 titleCtxId) +{ + throw __FUNCTION__; +} + +s32 sceNpLookupCreateRequest(s32 titleCtxId) +{ + throw __FUNCTION__; +} + +s32 sceNpLookupDeleteRequest(s32 reqId) +{ + throw __FUNCTION__; +} + +s32 sceNpLookupAbortRequest(s32 reqId) +{ + throw __FUNCTION__; +} + +s32 sceNpLookupSetTimeout(s32 id, s32 resolveRetry, u32 resolveTimeout, u32 connTimeout, u32 sendTimeout, u32 recvTimeout) +{ + throw __FUNCTION__; +} + +s32 sceNpLookupWaitAsync(s32 reqId, vm::psv::ptr result) +{ + throw __FUNCTION__; +} + +s32 sceNpLookupPollAsync(s32 reqId, vm::psv::ptr result) +{ + throw __FUNCTION__; +} + +s32 sceNpLookupNpId(s32 reqId, vm::psv::ptr onlineId, vm::psv::ptr npId, vm::psv::ptr option) +{ + throw __FUNCTION__; +} + +s32 sceNpLookupNpIdAsync(s32 reqId, vm::psv::ptr onlineId, vm::psv::ptr npId, vm::psv::ptr option) +{ + throw __FUNCTION__; +} + +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, + u32 avatarImageDataMaxSize, + vm::psv::ptr avatarImageDataSize, + vm::psv::ptr option) +{ + throw __FUNCTION__; +} + +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, + u32 avatarImageDataMaxSize, + vm::psv::ptr avatarImageDataSize, + vm::psv::ptr option) +{ + throw __FUNCTION__; +} + +s32 sceNpLookupAvatarImage(s32 reqId, vm::psv::ptr avatarUrl, vm::psv::ptr avatarImage, vm::psv::ptr option) +{ + throw __FUNCTION__; +} + +s32 sceNpLookupAvatarImageAsync(s32 reqId, vm::psv::ptr avatarUrl, vm::psv::ptr avatarImage, vm::psv::ptr option) +{ + throw __FUNCTION__; +} + +s32 sceNpBandwidthTestInitStart(s32 initPriority, s32 cpuAffinityMask) +{ + throw __FUNCTION__; +} + +s32 sceNpBandwidthTestGetStatus() +{ + throw __FUNCTION__; +} + +s32 sceNpBandwidthTestShutdown(vm::psv::ptr result) +{ + throw __FUNCTION__; +} + +s32 sceNpBandwidthTestAbort() +{ + throw __FUNCTION__; +} + #define REG_FUNC(nid, name) reg_psv_func(nid, &sceNpUtility, #name, name) psv_log_base sceNpUtility("SceNpUtility", []() @@ -12,24 +144,24 @@ psv_log_base sceNpUtility("SceNpUtility", []() sceNpUtility.on_unload = nullptr; sceNpUtility.on_stop = nullptr; - //REG_FUNC(0x9246A673, sceNpLookupInit); - //REG_FUNC(0x0158B61B, sceNpLookupTerm); - //REG_FUNC(0x5110E17E, sceNpLookupCreateTitleCtx); - //REG_FUNC(0x33B64699, sceNpLookupDeleteTitleCtx); - //REG_FUNC(0x9E42E922, sceNpLookupCreateRequest); - //REG_FUNC(0x8B608BF6, sceNpLookupDeleteRequest); - //REG_FUNC(0x027587C4, sceNpLookupAbortRequest); - //REG_FUNC(0xB0C9DC45, sceNpLookupSetTimeout); - //REG_FUNC(0xCF956F23, sceNpLookupWaitAsync); - //REG_FUNC(0xFCDBA234, sceNpLookupPollAsync); - //REG_FUNC(0xB1A14879, sceNpLookupNpId); - //REG_FUNC(0x5387BABB, sceNpLookupNpIdAsync); - //REG_FUNC(0x6A1BF429, sceNpLookupUserProfile); - //REG_FUNC(0xE5285E0F, sceNpLookupUserProfileAsync); - //REG_FUNC(0xFDB0AE47, sceNpLookupAvatarImage); - //REG_FUNC(0x282BD43C, sceNpLookupAvatarImageAsync); - //REG_FUNC(0x081FA13C, sceNpBandwidthTestInitStart); - //REG_FUNC(0xE0EBFBF6, sceNpBandwidthTestGetStatus); - //REG_FUNC(0x58D92EFD, sceNpBandwidthTestShutdown); - //REG_FUNC(0x32B068C4, sceNpBandwidthTestAbort); + REG_FUNC(0x9246A673, sceNpLookupInit); + REG_FUNC(0x0158B61B, sceNpLookupTerm); + REG_FUNC(0x5110E17E, sceNpLookupCreateTitleCtx); + REG_FUNC(0x33B64699, sceNpLookupDeleteTitleCtx); + REG_FUNC(0x9E42E922, sceNpLookupCreateRequest); + REG_FUNC(0x8B608BF6, sceNpLookupDeleteRequest); + REG_FUNC(0x027587C4, sceNpLookupAbortRequest); + REG_FUNC(0xB0C9DC45, sceNpLookupSetTimeout); + REG_FUNC(0xCF956F23, sceNpLookupWaitAsync); + REG_FUNC(0xFCDBA234, sceNpLookupPollAsync); + REG_FUNC(0xB1A14879, sceNpLookupNpId); + REG_FUNC(0x5387BABB, sceNpLookupNpIdAsync); + REG_FUNC(0x6A1BF429, sceNpLookupUserProfile); + REG_FUNC(0xE5285E0F, sceNpLookupUserProfileAsync); + REG_FUNC(0xFDB0AE47, sceNpLookupAvatarImage); + REG_FUNC(0x282BD43C, sceNpLookupAvatarImageAsync); + REG_FUNC(0x081FA13C, sceNpBandwidthTestInitStart); + REG_FUNC(0xE0EBFBF6, sceNpBandwidthTestGetStatus); + REG_FUNC(0x58D92EFD, sceNpBandwidthTestShutdown); + REG_FUNC(0x32B068C4, sceNpBandwidthTestAbort); }); diff --git a/rpcs3/Emu/ARMv7/Modules/sceUlt.cpp b/rpcs3/Emu/ARMv7/Modules/sceUlt.cpp index 6fb390fbd8..68216d7ddc 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceUlt.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceUlt.cpp @@ -2,8 +2,545 @@ #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; + +// Functions + +s32 _sceUltWaitingQueueResourcePoolOptParamInitialize(vm::psv::ptr optParam, u32 buildVersion) +{ + throw __FUNCTION__; +} + +u32 sceUltWaitingQueueResourcePoolGetWorkAreaSize(u32 numThreads, u32 numSyncObjects) +{ + throw __FUNCTION__; +} + +s32 _sceUltWaitingQueueResourcePoolCreate( + vm::psv::ptr pool, + vm::psv::ptr name, + u32 numThreads, + u32 numSyncObjects, + vm::psv::ptr workArea, + vm::psv::ptr optParam, + u32 buildVersion) +{ + throw __FUNCTION__; +} + +s32 sceUltWaitingQueueResourcePoolDestroy(vm::psv::ptr pool) +{ + throw __FUNCTION__; +} + +s32 _sceUltQueueDataResourcePoolOptParamInitialize(vm::psv::ptr optParam, u32 buildVersion) +{ + throw __FUNCTION__; +} + +u32 sceUltQueueDataResourcePoolGetWorkAreaSize(u32 numData, u32 dataSize, u32 numQueueObject) +{ + throw __FUNCTION__; +} + +s32 _sceUltQueueDataResourcePoolCreate( + vm::psv::ptr pool, + vm::psv::ptr name, + u32 numData, + u32 dataSize, + u32 numQueueObject, + vm::psv::ptr waitingQueueResourcePool, + vm::psv::ptr workArea, + vm::psv::ptr optParam, + u32 buildVersion) +{ + throw __FUNCTION__; +} + +s32 sceUltQueueDataResourcePoolDestroy(vm::psv::ptr pool) +{ + throw __FUNCTION__; +} + +u32 sceUltMutexGetStandaloneWorkAreaSize(u32 waitingQueueDepth, u32 numConditionVariable) +{ + throw __FUNCTION__; +} + +s32 _sceUltMutexOptParamInitialize(vm::psv::ptr optParam, u32 buildVersion) +{ + throw __FUNCTION__; +} + +s32 _sceUltMutexCreate( + vm::psv::ptr mutex, + vm::psv::ptr name, + vm::psv::ptr waitingQueueResourcePool, + vm::psv::ptr optParam, + u32 buildVersion) +{ + throw __FUNCTION__; +} + +s32 _sceUltMutexCreateStandalone( + vm::psv::ptr mutex, + vm::psv::ptr name, + u32 numConditionVariable, + u32 maxNumThreads, + vm::psv::ptr workArea, + vm::psv::ptr optParam, + u32 buildVersion) +{ + throw __FUNCTION__; +} + +s32 sceUltMutexLock(vm::psv::ptr mutex) +{ + throw __FUNCTION__; +} + +s32 sceUltMutexTryLock(vm::psv::ptr mutex) +{ + throw __FUNCTION__; +} + +s32 sceUltMutexUnlock(vm::psv::ptr mutex) +{ + throw __FUNCTION__; +} + +s32 sceUltMutexDestroy(vm::psv::ptr mutex) +{ + throw __FUNCTION__; +} + +s32 _sceUltConditionVariableOptParamInitialize(vm::psv::ptr optParam, u32 buildVersion) +{ + throw __FUNCTION__; +} + +s32 _sceUltConditionVariableCreate( + vm::psv::ptr conditionVariable, + vm::psv::ptr name, + vm::psv::ptr mutex, + vm::psv::ptr optParam, + u32 buildVersion) +{ + throw __FUNCTION__; +} + +s32 sceUltConditionVariableSignal(vm::psv::ptr conditionVariable) +{ + throw __FUNCTION__; +} + +s32 sceUltConditionVariableSignalAll(vm::psv::ptr conditionVariable) +{ + throw __FUNCTION__; +} + +s32 sceUltConditionVariableWait(vm::psv::ptr conditionVariable) +{ + throw __FUNCTION__; +} + +s32 sceUltConditionVariableDestroy(vm::psv::ptr conditionVariable) +{ + throw __FUNCTION__; +} + +s32 _sceUltQueueOptParamInitialize(vm::psv::ptr optParam, u32 buildVersion) +{ + throw __FUNCTION__; +} + +u32 sceUltQueueGetStandaloneWorkAreaSize(u32 queueDepth, + u32 dataSize, + u32 waitingQueueLength) +{ + throw __FUNCTION__; +} + +s32 _sceUltQueueCreate( + vm::psv::ptr queue, + vm::psv::ptr _name, + u32 dataSize, + vm::psv::ptr resourcePool, + vm::psv::ptr queueResourcePool, + vm::psv::ptr optParam, + u32 buildVersion) +{ + throw __FUNCTION__; +} + +s32 _sceUltQueueCreateStandalone( + vm::psv::ptr queue, + vm::psv::ptr name, + u32 queueDepth, + u32 dataSize, + u32 waitingQueueLength, + vm::psv::ptr workArea, + vm::psv::ptr optParam, + u32 buildVersion) +{ + throw __FUNCTION__; +} + +s32 sceUltQueuePush(vm::psv::ptr queue, vm::psv::ptr data) +{ + throw __FUNCTION__; +} + +s32 sceUltQueueTryPush(vm::psv::ptr queue, vm::psv::ptr data) +{ + throw __FUNCTION__; +} + +s32 sceUltQueuePop(vm::psv::ptr queue, vm::psv::ptr data) +{ + throw __FUNCTION__; +} + +s32 sceUltQueueTryPop(vm::psv::ptr queue, vm::psv::ptr data) +{ + throw __FUNCTION__; +} + +s32 sceUltQueueDestroy(vm::psv::ptr queue) +{ + throw __FUNCTION__; +} + +s32 _sceUltReaderWriterLockOptParamInitialize(vm::psv::ptr optParam, u32 buildVersion) +{ + throw __FUNCTION__; +} + +s32 _sceUltReaderWriterLockCreate( + vm::psv::ptr rwlock, + vm::psv::ptr name, + vm::psv::ptr waitingQueueResourcePool, + vm::psv::ptr optParam, + u32 buildVersion) +{ + throw __FUNCTION__; +} + +s32 _sceUltReaderWriterLockCreateStandalone( + vm::psv::ptr rwlock, + vm::psv::ptr name, + u32 waitingQueueDepth, + vm::psv::ptr workArea, + vm::psv::ptr optParam, + u32 buildVersion) +{ + throw __FUNCTION__; +} + +u32 sceUltReaderWriterLockGetStandaloneWorkAreaSize(u32 waitingQueueDepth) +{ + throw __FUNCTION__; +} + +s32 sceUltReaderWriterLockLockRead(vm::psv::ptr rwlock) +{ + throw __FUNCTION__; +} + +s32 sceUltReaderWriterLockTryLockRead(vm::psv::ptr rwlock) +{ + throw __FUNCTION__; +} + +s32 sceUltReaderWriterLockUnlockRead(vm::psv::ptr rwlock) +{ + throw __FUNCTION__; +} + +s32 sceUltReaderWriterLockLockWrite(vm::psv::ptr rwlock) +{ + throw __FUNCTION__; +} + +s32 sceUltReaderWriterLockTryLockWrite(vm::psv::ptr rwlock) +{ + throw __FUNCTION__; +} + +s32 sceUltReaderWriterLockUnlockWrite(vm::psv::ptr rwlock) +{ + throw __FUNCTION__; +} + +s32 sceUltReaderWriterLockDestroy(vm::psv::ptr rwlock) +{ + throw __FUNCTION__; +} + +s32 _sceUltSemaphoreOptParamInitialize(vm::psv::ptr optParam, u32 buildVersion) +{ + throw __FUNCTION__; +} + +s32 _sceUltSemaphoreCreate( + vm::psv::ptr semaphore, + vm::psv::ptr name, + s32 numInitialResource, + vm::psv::ptr waitingQueueResourcePool, + vm::psv::ptr optParam, + u32 buildVersion) +{ + throw __FUNCTION__; +} + +s32 sceUltSemaphoreAcquire(vm::psv::ptr semaphore, s32 numResource) +{ + throw __FUNCTION__; +} + +s32 sceUltSemaphoreTryAcquire(vm::psv::ptr semaphore, s32 numResource) +{ + throw __FUNCTION__; +} + +s32 sceUltSemaphoreRelease(vm::psv::ptr semaphore, s32 numResource) +{ + throw __FUNCTION__; +} + +s32 sceUltSemaphoreDestroy(vm::psv::ptr semaphore) +{ + throw __FUNCTION__; +} + +s32 _sceUltUlthreadRuntimeOptParamInitialize(vm::psv::ptr optParam, u32 buildVersion) +{ + throw __FUNCTION__; +} + +u32 sceUltUlthreadRuntimeGetWorkAreaSize(u32 numMaxUlthread, u32 numWorkerThread) +{ + throw __FUNCTION__; +} + +s32 _sceUltUlthreadRuntimeCreate( + vm::psv::ptr runtime, + vm::psv::ptr name, + u32 numMaxUlthread, + u32 numWorkerThread, + vm::psv::ptr workArea, + vm::psv::ptr optParam, + u32 buildVersion) +{ + throw __FUNCTION__; +} + +s32 sceUltUlthreadRuntimeDestroy(vm::psv::ptr runtime) +{ + throw __FUNCTION__; +} + +s32 _sceUltUlthreadOptParamInitialize(vm::psv::ptr optParam, u32 buildVersion) +{ + throw __FUNCTION__; +} + +s32 _sceUltUlthreadCreate( + vm::psv::ptr ulthread, + vm::psv::ptr name, + SceUltUlthreadEntry entry, + u32 arg, + vm::psv::ptr context, + u32 sizeContext, + vm::psv::ptr runtime, + vm::psv::ptr optParam, + u32 buildVersion) +{ + throw __FUNCTION__; +} + +s32 sceUltUlthreadYield() +{ + throw __FUNCTION__; +} + +s32 sceUltUlthreadExit(s32 status) +{ + throw __FUNCTION__; +} + +s32 sceUltUlthreadJoin(vm::psv::ptr ulthread, vm::psv::ptr status) +{ + throw __FUNCTION__; +} + +s32 sceUltUlthreadTryJoin(vm::psv::ptr ulthread, vm::psv::ptr status) +{ + throw __FUNCTION__; +} + +s32 sceUltUlthreadGetSelf(vm::psv::ptr> ulthread) +{ + throw __FUNCTION__; +} + #define REG_FUNC(nid, name) reg_psv_func(nid, &sceUlt, #name, name) psv_log_base sceUlt("SceUlt", []() @@ -12,57 +549,57 @@ psv_log_base sceUlt("SceUlt", []() sceUlt.on_unload = nullptr; sceUlt.on_stop = nullptr; - //REG_FUNC(0xEF094E35, _sceUltWaitingQueueResourcePoolOptParamInitialize); - //REG_FUNC(0x644DA029, sceUltWaitingQueueResourcePoolGetWorkAreaSize); - //REG_FUNC(0x62F9493E, _sceUltWaitingQueueResourcePoolCreate); - //REG_FUNC(0xC9E96714, sceUltWaitingQueueResourcePoolDestroy); - //REG_FUNC(0x8A4F88A2, _sceUltQueueDataResourcePoolOptParamInitialize); - //REG_FUNC(0xECDA7FEE, sceUltQueueDataResourcePoolGetWorkAreaSize); - //REG_FUNC(0x40856827, _sceUltQueueDataResourcePoolCreate); - //REG_FUNC(0x2B8D33F1, sceUltQueueDataResourcePoolDestroy); - //REG_FUNC(0x24D87E05, _sceUltMutexOptParamInitialize); - //REG_FUNC(0x5AFEC7A1, _sceUltMutexCreate); - //REG_FUNC(0x001EAC8A, sceUltMutexLock); - //REG_FUNC(0xE5936A69, sceUltMutexTryLock); - //REG_FUNC(0x897C9097, sceUltMutexUnlock); - //REG_FUNC(0xEEBD9052, sceUltMutexDestroy); - //REG_FUNC(0x0603FCC1, _sceUltConditionVariableOptParamInitialize); - //REG_FUNC(0xD76A156C, _sceUltConditionVariableCreate); - //REG_FUNC(0x9FE7CB9F, sceUltConditionVariableSignal); - //REG_FUNC(0xEBB6FC1E, sceUltConditionVariableSignalAll); - //REG_FUNC(0x2CD0F57C, sceUltConditionVariableWait); - //REG_FUNC(0x53420ED2, sceUltConditionVariableDestroy); - //REG_FUNC(0xF7A83023, _sceUltQueueOptParamInitialize); - //REG_FUNC(0x14DA1BB4, _sceUltQueueCreate); - //REG_FUNC(0xA7E78FF9, sceUltQueuePush); - //REG_FUNC(0x6D356B29, sceUltQueueTryPush); - //REG_FUNC(0x1AD58A53, sceUltQueuePop); - //REG_FUNC(0x2A1A8EA6, sceUltQueueTryPop); - //REG_FUNC(0xF37862DE, sceUltQueueDestroy); - //REG_FUNC(0xD8334A1F, _sceUltReaderWriterLockOptParamInitialize); - //REG_FUNC(0x2FB0EB32, _sceUltReaderWriterLockCreate); - //REG_FUNC(0x9AD07630, sceUltReaderWriterLockLockRead); - //REG_FUNC(0x2629C055, sceUltReaderWriterLockTryLockRead); - //REG_FUNC(0x218D4743, sceUltReaderWriterLockUnlockRead); - //REG_FUNC(0xF5F63E2C, sceUltReaderWriterLockLockWrite); - //REG_FUNC(0x944FB222, sceUltReaderWriterLockTryLockWrite); - //REG_FUNC(0x2A5741F5, sceUltReaderWriterLockUnlockWrite); - //REG_FUNC(0xB1FEB79B, sceUltReaderWriterLockDestroy); - //REG_FUNC(0x8E31B9FE, _sceUltSemaphoreOptParamInitialize); - //REG_FUNC(0xDD59562C, _sceUltSemaphoreCreate); - //REG_FUNC(0xF220D3AE, sceUltSemaphoreAcquire); - //REG_FUNC(0xAF15606D, sceUltSemaphoreTryAcquire); - //REG_FUNC(0x65376E2D, sceUltSemaphoreRelease); - //REG_FUNC(0x8EC57420, sceUltSemaphoreDestroy); - //REG_FUNC(0x8486DDE6, _sceUltUlthreadRuntimeOptParamInitialize); - //REG_FUNC(0x5435C586, sceUltUlthreadRuntimeGetWorkAreaSize); - //REG_FUNC(0x86DDA3AE, _sceUltUlthreadRuntimeCreate); - //REG_FUNC(0x4E9A745C, sceUltUlthreadRuntimeDestroy); - //REG_FUNC(0x7F373376, _sceUltUlthreadOptParamInitialize); - //REG_FUNC(0xB1290375, _sceUltUlthreadCreate); - //REG_FUNC(0xCAD57BAD, sceUltUlthreadYield); - //REG_FUNC(0x1E401DF8, sceUltUlthreadExit); - //REG_FUNC(0x63483381, sceUltUlthreadJoin); - //REG_FUNC(0xB4CF88AC, sceUltUlthreadTryJoin); - //REG_FUNC(0xA798C5D7, sceUltUlthreadGetSelf); + REG_FUNC(0xEF094E35, _sceUltWaitingQueueResourcePoolOptParamInitialize); + REG_FUNC(0x644DA029, sceUltWaitingQueueResourcePoolGetWorkAreaSize); + REG_FUNC(0x62F9493E, _sceUltWaitingQueueResourcePoolCreate); + REG_FUNC(0xC9E96714, sceUltWaitingQueueResourcePoolDestroy); + REG_FUNC(0x8A4F88A2, _sceUltQueueDataResourcePoolOptParamInitialize); + REG_FUNC(0xECDA7FEE, sceUltQueueDataResourcePoolGetWorkAreaSize); + REG_FUNC(0x40856827, _sceUltQueueDataResourcePoolCreate); + REG_FUNC(0x2B8D33F1, sceUltQueueDataResourcePoolDestroy); + REG_FUNC(0x24D87E05, _sceUltMutexOptParamInitialize); + REG_FUNC(0x5AFEC7A1, _sceUltMutexCreate); + REG_FUNC(0x001EAC8A, sceUltMutexLock); + REG_FUNC(0xE5936A69, sceUltMutexTryLock); + REG_FUNC(0x897C9097, sceUltMutexUnlock); + REG_FUNC(0xEEBD9052, sceUltMutexDestroy); + REG_FUNC(0x0603FCC1, _sceUltConditionVariableOptParamInitialize); + REG_FUNC(0xD76A156C, _sceUltConditionVariableCreate); + REG_FUNC(0x9FE7CB9F, sceUltConditionVariableSignal); + REG_FUNC(0xEBB6FC1E, sceUltConditionVariableSignalAll); + REG_FUNC(0x2CD0F57C, sceUltConditionVariableWait); + REG_FUNC(0x53420ED2, sceUltConditionVariableDestroy); + REG_FUNC(0xF7A83023, _sceUltQueueOptParamInitialize); + REG_FUNC(0x14DA1BB4, _sceUltQueueCreate); + REG_FUNC(0xA7E78FF9, sceUltQueuePush); + REG_FUNC(0x6D356B29, sceUltQueueTryPush); + REG_FUNC(0x1AD58A53, sceUltQueuePop); + REG_FUNC(0x2A1A8EA6, sceUltQueueTryPop); + REG_FUNC(0xF37862DE, sceUltQueueDestroy); + REG_FUNC(0xD8334A1F, _sceUltReaderWriterLockOptParamInitialize); + REG_FUNC(0x2FB0EB32, _sceUltReaderWriterLockCreate); + REG_FUNC(0x9AD07630, sceUltReaderWriterLockLockRead); + REG_FUNC(0x2629C055, sceUltReaderWriterLockTryLockRead); + REG_FUNC(0x218D4743, sceUltReaderWriterLockUnlockRead); + REG_FUNC(0xF5F63E2C, sceUltReaderWriterLockLockWrite); + REG_FUNC(0x944FB222, sceUltReaderWriterLockTryLockWrite); + REG_FUNC(0x2A5741F5, sceUltReaderWriterLockUnlockWrite); + REG_FUNC(0xB1FEB79B, sceUltReaderWriterLockDestroy); + REG_FUNC(0x8E31B9FE, _sceUltSemaphoreOptParamInitialize); + REG_FUNC(0xDD59562C, _sceUltSemaphoreCreate); + REG_FUNC(0xF220D3AE, sceUltSemaphoreAcquire); + REG_FUNC(0xAF15606D, sceUltSemaphoreTryAcquire); + REG_FUNC(0x65376E2D, sceUltSemaphoreRelease); + REG_FUNC(0x8EC57420, sceUltSemaphoreDestroy); + REG_FUNC(0x8486DDE6, _sceUltUlthreadRuntimeOptParamInitialize); + REG_FUNC(0x5435C586, sceUltUlthreadRuntimeGetWorkAreaSize); + REG_FUNC(0x86DDA3AE, _sceUltUlthreadRuntimeCreate); + REG_FUNC(0x4E9A745C, sceUltUlthreadRuntimeDestroy); + REG_FUNC(0x7F373376, _sceUltUlthreadOptParamInitialize); + REG_FUNC(0xB1290375, _sceUltUlthreadCreate); + REG_FUNC(0xCAD57BAD, sceUltUlthreadYield); + REG_FUNC(0x1E401DF8, sceUltUlthreadExit); + REG_FUNC(0x63483381, sceUltUlthreadJoin); + REG_FUNC(0xB4CF88AC, sceUltUlthreadTryJoin); + REG_FUNC(0xA798C5D7, sceUltUlthreadGetSelf); }); diff --git a/rpcs3/emucore.vcxproj b/rpcs3/emucore.vcxproj index 1e6d47a50e..8864e59975 100644 --- a/rpcs3/emucore.vcxproj +++ b/rpcs3/emucore.vcxproj @@ -340,6 +340,7 @@ + diff --git a/rpcs3/emucore.vcxproj.filters b/rpcs3/emucore.vcxproj.filters index ac1531ee30..b45c4de188 100644 --- a/rpcs3/emucore.vcxproj.filters +++ b/rpcs3/emucore.vcxproj.filters @@ -1501,5 +1501,8 @@ Emu\CPU\ARMv7\Modules + + Emu\CPU\ARMv7\Modules + \ No newline at end of file From 2be045593a62f99d029f400033d04f7e88c18c36 Mon Sep 17 00:00:00 2001 From: Nekotekina Date: Fri, 30 Jan 2015 20:41:17 +0300 Subject: [PATCH 08/11] Compilation fix --- rpcs3/Emu/ARMv7/Modules/sceNpCommon.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rpcs3/Emu/ARMv7/Modules/sceNpCommon.h b/rpcs3/Emu/ARMv7/Modules/sceNpCommon.h index 2a40b7aee3..bd2b282301 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceNpCommon.h +++ b/rpcs3/Emu/ARMv7/Modules/sceNpCommon.h @@ -106,10 +106,10 @@ struct SceNpDate union SceNpTicketParam { - s32 i32; - s64 i64; - u32 u32; - u64 u64; + s32 _s32; + s64 _s64; + u32 _u32; + u64 _u64; SceNpDate date; u8 data[256]; }; From 4ea1b8cffc8a0f9e4c54cb0dcb18f90986d461ff Mon Sep 17 00:00:00 2001 From: Nekotekina Date: Fri, 30 Jan 2015 23:01:13 +0300 Subject: [PATCH 09/11] Fixed TLS for PPU threads --- rpcs3/Emu/ARMv7/Modules/sceLibc.cpp | 6 ++ rpcs3/Emu/Cell/PPUThread.cpp | 6 +- rpcs3/Emu/SysCalls/Modules/sysPrxForUser.cpp | 60 ++++++++++++++++++++ rpcs3/Loader/ELF64.cpp | 3 +- 4 files changed, 72 insertions(+), 3 deletions(-) diff --git a/rpcs3/Emu/ARMv7/Modules/sceLibc.cpp b/rpcs3/Emu/ARMv7/Modules/sceLibc.cpp index abb831ae32..b833a38c5f 100644 --- a/rpcs3/Emu/ARMv7/Modules/sceLibc.cpp +++ b/rpcs3/Emu/ARMv7/Modules/sceLibc.cpp @@ -18,6 +18,8 @@ namespace sce_libc_func { sceLibc.Error("__cxa_atexit(func=0x%x, arg=0x%x, dso=0x%x)", func, arg, dso); + LV2_LOCK(0); + g_atexit.insert(g_atexit.begin(), [func, arg, dso](ARMv7Context& context) { func(context, arg); @@ -28,6 +30,8 @@ namespace sce_libc_func { sceLibc.Error("__aeabi_atexit(arg=0x%x, func=0x%x, dso=0x%x)", arg, func, dso); + LV2_LOCK(0); + g_atexit.insert(g_atexit.begin(), [func, arg, dso](ARMv7Context& context) { func(context, arg); @@ -38,6 +42,8 @@ namespace sce_libc_func { sceLibc.Error("exit()"); + LV2_LOCK(0); + for (auto func : g_atexit) { func(context); diff --git a/rpcs3/Emu/Cell/PPUThread.cpp b/rpcs3/Emu/Cell/PPUThread.cpp index 9e5588276a..9a221b00c6 100644 --- a/rpcs3/Emu/Cell/PPUThread.cpp +++ b/rpcs3/Emu/Cell/PPUThread.cpp @@ -15,6 +15,9 @@ u64 rotate_mask[64][64]; +extern u32 ppu_get_tls(u32 thread); +extern void ppu_free_tls(u32 thread); + PPUThread& GetCurrentPPUThread() { PPCThread* thread = GetCurrentPPCThread(); @@ -32,6 +35,7 @@ PPUThread::PPUThread() : PPCThread(CPU_THREAD_PPU) PPUThread::~PPUThread() { + ppu_free_tls(GetId()); } void PPUThread::DoReset() @@ -92,7 +96,7 @@ void PPUThread::InitRegs() GPR[2] = rtoc; //GPR[11] = entry; //GPR[12] = Emu.GetMallocPageSize(); - GPR[13] = Memory.PRXMem.GetStartAddr() + 0x7060; + GPR[13] = ppu_get_tls(GetId()) + 0x7000; // 0x7000 is usually subtracted from r13 to access first TLS element (details are not clear) LR = Emu.GetCPUThreadExit(); CTR = PC; diff --git a/rpcs3/Emu/SysCalls/Modules/sysPrxForUser.cpp b/rpcs3/Emu/SysCalls/Modules/sysPrxForUser.cpp index 1629d3fb05..c523ca64f1 100644 --- a/rpcs3/Emu/SysCalls/Modules/sysPrxForUser.cpp +++ b/rpcs3/Emu/SysCalls/Modules/sysPrxForUser.cpp @@ -23,11 +23,62 @@ Module *sysPrxForUser = nullptr; +u32 g_tls_size; // size of every thread's storage +u32 g_tls_start; // start of TLS memory area +u32 g_tls_image_addr; // address of TLS initialization area +u32 g_tls_image_size; // size of TLS initialization area + +const u32 TLS_MAX = 256; +std::array, TLS_MAX> g_tls_owners; + void sys_initialize_tls() { sysPrxForUser->Log("sys_initialize_tls()"); } +u32 ppu_get_tls(u32 thread) +{ + if (!g_tls_start) + { + g_tls_size = vm::cast(Emu.GetTLSMemsz(), "Emu.GetTLSMemsz"); // (not an address for vm::cast, but fine) + g_tls_start = vm::cast(Memory.Alloc(g_tls_size * TLS_MAX, 4096)); // memory for up to TLS_MAX threads + g_tls_image_addr = vm::cast(Emu.GetTLSAddr(), "Emu.GetTLSAddr"); + g_tls_image_size = vm::cast(Emu.GetTLSFilesz(), "Emu.GetTLSFilesz"); + + sysPrxForUser->Warning("TLS initialized (g_tls_size=0x%x, g_tls_start=0x%x, g_tls_image_addr=0x%x, g_tls_image_size=0x%x)", g_tls_size, g_tls_start, g_tls_image_addr, g_tls_image_size); + } + + for (auto& v : g_tls_owners) + { + u32 old = 0; + if (v.compare_exchange_strong(old, thread)) + { + const u32 addr = g_tls_start + (&v - g_tls_owners.data()) * g_tls_size; // get TLS address + memset(vm::get_ptr(addr), 0, g_tls_size); // fill TLS area with zeros + memcpy(vm::get_ptr(addr), vm::get_ptr(g_tls_image_addr), g_tls_image_size); // initialize from TLS image + return addr; + } + else if (old == thread) + { + return g_tls_start + (&v - g_tls_owners.data()) * g_tls_size; // if already initialized, return TLS address again + } + } + + throw "Out of TLS memory"; +} + +void ppu_free_tls(u32 thread) +{ + for (auto& v : g_tls_owners) + { + u32 old = thread; + if (v.compare_exchange_strong(old, 0)) + { + return; + } + } +} + int _sys_heap_create_heap(const u32 heap_addr, const u32 align, const u32 size) { sysPrxForUser->Warning("_sys_heap_create_heap(heap_addr=0x%x, align=0x%x, size=0x%x)", heap_addr, align, size); @@ -365,6 +416,15 @@ void sysPrxForUser_init(Module *pxThis) { sysPrxForUser = pxThis; + g_tls_size = 0; + g_tls_start = 0; + g_tls_image_addr = 0; + g_tls_image_size = 0; + for (auto& v : g_tls_owners) + { + v.store(0, std::memory_order_relaxed); + } + // Setup random number generator srand(time(NULL)); diff --git a/rpcs3/Loader/ELF64.cpp b/rpcs3/Loader/ELF64.cpp index c71e8cb5f7..de2a78c0a6 100644 --- a/rpcs3/Loader/ELF64.cpp +++ b/rpcs3/Loader/ELF64.cpp @@ -356,7 +356,7 @@ namespace loader ppu_thr_stop_data[1] = BLR(); Emu.SetCPUThreadStop(ppu_thr_stop_data.addr()); - vm::write64(Memory.PRXMem.AllocAlign(0x10000), 0xDEADBEEFABADCAFE); + //vm::write64(Memory.PRXMem.AllocAlign(0x10000), 0xDEADBEEFABADCAFE); /* //TODO static const int branch_size = 6 * 4; @@ -423,7 +423,6 @@ namespace loader case 0x00000007: //TLS Emu.SetTLSData(phdr.p_vaddr.addr(), phdr.p_filesz.value(), phdr.p_memsz.value()); - LOG_ERROR(LOADER, "TLS: addr=0x%x, filesz=0x%x, memsz=0x%x", Emu.GetTLSAddr(), Emu.GetTLSFilesz(), Emu.GetTLSMemsz()); break; case 0x60000001: //LOOS+1 From 140a42fbcb16f13a3f27fd7ff1ba4ecb1edd5255 Mon Sep 17 00:00:00 2001 From: Nekotekina Date: Sat, 31 Jan 2015 00:30:46 +0300 Subject: [PATCH 10/11] Bugfix --- rpcs3/Emu/SysCalls/Modules/sysPrxForUser.cpp | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/rpcs3/Emu/SysCalls/Modules/sysPrxForUser.cpp b/rpcs3/Emu/SysCalls/Modules/sysPrxForUser.cpp index c523ca64f1..063655cc72 100644 --- a/rpcs3/Emu/SysCalls/Modules/sysPrxForUser.cpp +++ b/rpcs3/Emu/SysCalls/Modules/sysPrxForUser.cpp @@ -48,20 +48,24 @@ u32 ppu_get_tls(u32 thread) sysPrxForUser->Warning("TLS initialized (g_tls_size=0x%x, g_tls_start=0x%x, g_tls_image_addr=0x%x, g_tls_image_size=0x%x)", g_tls_size, g_tls_start, g_tls_image_addr, g_tls_image_size); } - for (auto& v : g_tls_owners) + for (u32 i = 0; i < TLS_MAX; i++) + { + if (g_tls_owners[i] == thread) + { + return g_tls_start + i * g_tls_size; // if already initialized, return TLS address + } + } + + for (u32 i = 0; i < TLS_MAX; i++) { u32 old = 0; - if (v.compare_exchange_strong(old, thread)) + if (g_tls_owners[i].compare_exchange_strong(old, thread)) { - const u32 addr = g_tls_start + (&v - g_tls_owners.data()) * g_tls_size; // get TLS address - memset(vm::get_ptr(addr), 0, g_tls_size); // fill TLS area with zeros + const u32 addr = g_tls_start + i * g_tls_size; // get TLS address + memset(vm::get_ptr(addr), 0, g_tls_size); // fill TLS area with zeros memcpy(vm::get_ptr(addr), vm::get_ptr(g_tls_image_addr), g_tls_image_size); // initialize from TLS image return addr; } - else if (old == thread) - { - return g_tls_start + (&v - g_tls_owners.data()) * g_tls_size; // if already initialized, return TLS address again - } } throw "Out of TLS memory"; From 384cb5e4153d79896fac17d1ec4a6082227c042e Mon Sep 17 00:00:00 2001 From: Nekotekina Date: Sat, 31 Jan 2015 16:01:34 +0300 Subject: [PATCH 11/11] RSX "refactoring" reverted --- rpcs3/Emu/RSX/GL/GLGSRender.cpp | 1077 ++++++++++++++++------------- rpcs3/Emu/RSX/GL/GLGSRender.h | 41 +- rpcs3/Emu/RSX/Null/NullGSRender.h | 84 ++- rpcs3/Emu/RSX/RSXThread.cpp | 969 +++++++++++++------------- rpcs3/Emu/RSX/RSXThread.h | 46 +- 5 files changed, 1104 insertions(+), 1113 deletions(-) diff --git a/rpcs3/Emu/RSX/GL/GLGSRender.cpp b/rpcs3/Emu/RSX/GL/GLGSRender.cpp index 35ec0a7dc5..1b3df4a0bd 100644 --- a/rpcs3/Emu/RSX/GL/GLGSRender.cpp +++ b/rpcs3/Emu/RSX/GL/GLGSRender.cpp @@ -18,9 +18,9 @@ void SetGetGSFrameCallback(GetGSFrameCb value) #define DUMP_VERTEX_DATA 0 #if CMD_DEBUG - #define CMD_LOG(...) LOG_NOTICE(RSX, __VA_ARGS__) +#define CMD_LOG(...) LOG_NOTICE(RSX, __VA_ARGS__) #else - #define CMD_LOG(...) +#define CMD_LOG(...) #endif GLuint g_flip_tex, g_depth_tex, g_pbo[6]; @@ -41,7 +41,7 @@ void printGlError(GLenum err, const std::string& situation) } #if 0 - #define checkForGlError(x) /*x*/ +#define checkForGlError(x) /*x*/ #endif void GLTexture::Create() @@ -110,9 +110,9 @@ void GLTexture::Init(RSXTexture& tex) LOG_ERROR(RSX, "Bad texture address=0x%x", texaddr); return; } - //lOG_WARNING(RSX, "texture addr = 0x%x, width = %d, height = %d, max_aniso=%d, mipmap=%d, remap=0x%x, zfunc=0x%x, wraps=0x%x, wrapt=0x%x, wrapr=0x%x, minlod=0x%x, maxlod=0x%x", + //LOG_WARNING(RSX, "texture addr = 0x%x, width = %d, height = %d, max_aniso=%d, mipmap=%d, remap=0x%x, zfunc=0x%x, wraps=0x%x, wrapt=0x%x, wrapr=0x%x, minlod=0x%x, maxlod=0x%x", // m_offset, m_width, m_height, m_maxaniso, m_mipmap, m_remap, m_zfunc, m_wraps, m_wrapt, m_wrapr, m_minlod, m_maxlod); - + //TODO: safe init checkForGlError("GLTexture::Init() -> glBindTexture"); @@ -134,10 +134,11 @@ void GLTexture::Init(RSXTexture& tex) static const GLint swizzleMaskB8[] = { GL_BLUE, GL_BLUE, GL_BLUE, GL_BLUE }; glRemap = swizzleMaskB8; + break; } - break; case CELL_GCM_TEXTURE_A1R5G5B5: + { glPixelStorei(GL_UNPACK_SWAP_BYTES, GL_TRUE); checkForGlError("GLTexture::Init() -> glPixelStorei"); @@ -147,7 +148,8 @@ void GLTexture::Init(RSXTexture& tex) glPixelStorei(GL_UNPACK_SWAP_BYTES, GL_FALSE); checkForGlError("GLTexture::Init() -> glPixelStorei(CELL_GCM_TEXTURE_A1R5G5B5)"); - break; + break; + } case CELL_GCM_TEXTURE_A4R4G4B4: { @@ -157,8 +159,8 @@ void GLTexture::Init(RSXTexture& tex) // We read it in as R4G4B4A4, so we need to remap each component. static const GLint swizzleMaskA4R4G4B4[] = { GL_BLUE, GL_ALPHA, GL_RED, GL_GREEN }; glRemap = swizzleMaskA4R4G4B4; + break; } - break; case CELL_GCM_TEXTURE_R5G6B5: { @@ -170,8 +172,8 @@ void GLTexture::Init(RSXTexture& tex) glPixelStorei(GL_UNPACK_SWAP_BYTES, GL_FALSE); checkForGlError("GLTexture::Init() -> glPixelStorei(CELL_GCM_TEXTURE_R5G6B5)"); + break; } - break; case CELL_GCM_TEXTURE_A8R8G8B8: { @@ -195,11 +197,11 @@ void GLTexture::Init(RSXTexture& tex) } } } - + glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, tex.GetWidth(), tex.GetHeight(), 0, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8, is_swizzled ? unswizzledPixels : pixels); checkForGlError("GLTexture::Init() -> glTexImage2D(CELL_GCM_TEXTURE_A8R8G8B8)"); + break; } - break; case CELL_GCM_TEXTURE_COMPRESSED_DXT1: // Compressed 4x4 pixels into 8 bytes { @@ -207,8 +209,8 @@ void GLTexture::Init(RSXTexture& tex) glCompressedTexImage2D(GL_TEXTURE_2D, 0, GL_COMPRESSED_RGBA_S3TC_DXT1_EXT, tex.GetWidth(), tex.GetHeight(), 0, size, pixels); checkForGlError("GLTexture::Init() -> glCompressedTexImage2D(CELL_GCM_TEXTURE_COMPRESSED_DXT1)"); + break; } - break; case CELL_GCM_TEXTURE_COMPRESSED_DXT23: // Compressed 4x4 pixels into 16 bytes { @@ -217,7 +219,7 @@ void GLTexture::Init(RSXTexture& tex) glCompressedTexImage2D(GL_TEXTURE_2D, 0, GL_COMPRESSED_RGBA_S3TC_DXT3_EXT, tex.GetWidth(), tex.GetHeight(), 0, size, pixels); checkForGlError("GLTexture::Init() -> glCompressedTexImage2D(CELL_GCM_TEXTURE_COMPRESSED_DXT23)"); } - break; + break; case CELL_GCM_TEXTURE_COMPRESSED_DXT45: // Compressed 4x4 pixels into 16 bytes { @@ -225,8 +227,8 @@ void GLTexture::Init(RSXTexture& tex) glCompressedTexImage2D(GL_TEXTURE_2D, 0, GL_COMPRESSED_RGBA_S3TC_DXT5_EXT, tex.GetWidth(), tex.GetHeight(), 0, size, pixels); checkForGlError("GLTexture::Init() -> glCompressedTexImage2D(CELL_GCM_TEXTURE_COMPRESSED_DXT45)"); + break; } - break; case CELL_GCM_TEXTURE_G8B8: { @@ -235,8 +237,8 @@ void GLTexture::Init(RSXTexture& tex) static const GLint swizzleMaskG8B8[] = { GL_RED, GL_GREEN, GL_RED, GL_GREEN }; glRemap = swizzleMaskG8B8; + break; } - break; case CELL_GCM_TEXTURE_R6G5B5: { @@ -256,36 +258,36 @@ void GLTexture::Init(RSXTexture& tex) checkForGlError("GLTexture::Init() -> glTexImage2D(CELL_GCM_TEXTURE_R6G5B5)"); free(unswizzledPixels); + break; } - break; case CELL_GCM_TEXTURE_DEPTH24_D8: // 24-bit unsigned fixed-point number and 8 bits of garbage { glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT24, tex.GetWidth(), tex.GetHeight(), 0, GL_DEPTH_COMPONENT, GL_UNSIGNED_BYTE, pixels); checkForGlError("GLTexture::Init() -> glTexImage2D(CELL_GCM_TEXTURE_DEPTH24_D8)"); + break; } - break; case CELL_GCM_TEXTURE_DEPTH24_D8_FLOAT: // 24-bit unsigned float and 8 bits of garbage { glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT24, tex.GetWidth(), tex.GetHeight(), 0, GL_DEPTH_COMPONENT, GL_FLOAT, pixels); checkForGlError("GLTexture::Init() -> glTexImage2D(CELL_GCM_TEXTURE_DEPTH24_D8_FLOAT)"); + break; } - break; case CELL_GCM_TEXTURE_DEPTH16: // 16-bit unsigned fixed-point number { glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT16, tex.GetWidth(), tex.GetHeight(), 0, GL_DEPTH_COMPONENT, GL_SHORT, pixels); checkForGlError("GLTexture::Init() -> glTexImage2D(CELL_GCM_TEXTURE_DEPTH16)"); + break; } - break; case CELL_GCM_TEXTURE_DEPTH16_FLOAT: // 16-bit unsigned float { glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT16, tex.GetWidth(), tex.GetHeight(), 0, GL_DEPTH_COMPONENT, GL_FLOAT, pixels); checkForGlError("GLTexture::Init() -> glTexImage2D(CELL_GCM_TEXTURE_DEPTH16_FLOAT)"); + break; } - break; case CELL_GCM_TEXTURE_X16: // A 16-bit fixed-point number { @@ -300,8 +302,8 @@ void GLTexture::Init(RSXTexture& tex) static const GLint swizzleMaskX16[] = { GL_RED, GL_ONE, GL_RED, GL_ONE }; glRemap = swizzleMaskX16; + break; } - break; case CELL_GCM_TEXTURE_Y16_X16: // Two 16-bit fixed-point numbers { @@ -316,8 +318,8 @@ void GLTexture::Init(RSXTexture& tex) static const GLint swizzleMaskX32_Y16_X16[] = { GL_GREEN, GL_RED, GL_GREEN, GL_RED }; glRemap = swizzleMaskX32_Y16_X16; + break; } - break; case CELL_GCM_TEXTURE_R5G5B5A1: { @@ -329,8 +331,8 @@ void GLTexture::Init(RSXTexture& tex) glPixelStorei(GL_UNPACK_SWAP_BYTES, GL_FALSE); checkForGlError("GLTexture::Init() -> glPixelStorei(CELL_GCM_TEXTURE_R5G5B5A1)"); + break; } - break; case CELL_GCM_TEXTURE_W16_Z16_Y16_X16_FLOAT: // Four fp16 values { @@ -342,15 +344,15 @@ void GLTexture::Init(RSXTexture& tex) glPixelStorei(GL_UNPACK_SWAP_BYTES, GL_FALSE); checkForGlError("GLTexture::Init() -> glPixelStorei(CELL_GCM_TEXTURE_W16_Z16_Y16_X16_FLOAT)"); + break; } - break; case CELL_GCM_TEXTURE_W32_Z32_Y32_X32_FLOAT: // Four fp32 values { glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, tex.GetWidth(), tex.GetHeight(), 0, GL_BGRA, GL_FLOAT, pixels); checkForGlError("GLTexture::Init() -> glTexImage2D(CELL_GCM_TEXTURE_W32_Z32_Y32_X32_FLOAT)"); + break; } - break; case CELL_GCM_TEXTURE_X32_FLOAT: // One 32-bit floating-point number { @@ -359,8 +361,8 @@ void GLTexture::Init(RSXTexture& tex) static const GLint swizzleMaskX32_FLOAT[] = { GL_RED, GL_ONE, GL_ONE, GL_ONE }; glRemap = swizzleMaskX32_FLOAT; + break; } - break; case CELL_GCM_TEXTURE_D1R5G5B5: { @@ -376,8 +378,8 @@ void GLTexture::Init(RSXTexture& tex) glPixelStorei(GL_UNPACK_SWAP_BYTES, GL_FALSE); checkForGlError("GLTexture::Init() -> glPixelStorei(CELL_GCM_TEXTURE_D1R5G5B5)"); + break; } - break; case CELL_GCM_TEXTURE_D8R8G8B8: // 8 bits of garbage and three unsigned 8-bit fixed-point numbers { @@ -386,8 +388,9 @@ void GLTexture::Init(RSXTexture& tex) static const GLint swizzleMaskX32_D8R8G8B8[] = { GL_ONE, GL_RED, GL_GREEN, GL_BLUE }; glRemap = swizzleMaskX32_D8R8G8B8; + break; } - break; + case CELL_GCM_TEXTURE_Y16_X16_FLOAT: // Two fp16 values { @@ -402,15 +405,16 @@ void GLTexture::Init(RSXTexture& tex) static const GLint swizzleMaskX32_Y16_X16_FLOAT[] = { GL_RED, GL_GREEN, GL_RED, GL_GREEN }; glRemap = swizzleMaskX32_Y16_X16_FLOAT; + break; } - break; - case CELL_GCM_TEXTURE_COMPRESSED_B8R8_G8R8 & ~(CELL_GCM_TEXTURE_LN | CELL_GCM_TEXTURE_UN): + case ~(CELL_GCM_TEXTURE_LN | CELL_GCM_TEXTURE_UN) & CELL_GCM_TEXTURE_COMPRESSED_B8R8_G8R8: { const u32 numPixels = tex.GetWidth() * tex.GetHeight(); unswizzledPixels = (u8 *)malloc(numPixels * 4); // TODO: Speed. - for (u32 i = 0; i < numPixels; i += 2) { + for (u32 i = 0; i < numPixels; i += 2) + { unswizzledPixels[i * 4 + 0 + 0] = pixels[i * 2 + 3]; unswizzledPixels[i * 4 + 0 + 1] = pixels[i * 2 + 2]; unswizzledPixels[i * 4 + 0 + 2] = pixels[i * 2 + 0]; @@ -427,15 +431,16 @@ void GLTexture::Init(RSXTexture& tex) checkForGlError("GLTexture::Init() -> glTexImage2D(CELL_GCM_TEXTURE_COMPRESSED_B8R8_G8R8 & ~(CELL_GCM_TEXTURE_LN | CELL_GCM_TEXTURE_UN)"); free(unswizzledPixels); + break; } - break; - case CELL_GCM_TEXTURE_COMPRESSED_R8B8_R8G8 & ~(CELL_GCM_TEXTURE_LN | CELL_GCM_TEXTURE_UN): + case ~(CELL_GCM_TEXTURE_LN | CELL_GCM_TEXTURE_UN) & CELL_GCM_TEXTURE_COMPRESSED_R8B8_R8G8: { const u32 numPixels = tex.GetWidth() * tex.GetHeight(); unswizzledPixels = (u8 *)malloc(numPixels * 4); // TODO: Speed. - for (u32 i = 0; i < numPixels; i += 2) { + for (u32 i = 0; i < numPixels; i += 2) + { unswizzledPixels[i * 4 + 0 + 0] = pixels[i * 2 + 2]; unswizzledPixels[i * 4 + 0 + 1] = pixels[i * 2 + 3]; unswizzledPixels[i * 4 + 0 + 2] = pixels[i * 2 + 1]; @@ -452,13 +457,16 @@ void GLTexture::Init(RSXTexture& tex) checkForGlError("GLTexture::Init() -> glTexImage2D(CELL_GCM_TEXTURE_COMPRESSED_R8B8_R8G8 & ~(CELL_GCM_TEXTURE_LN | CELL_GCM_TEXTURE_UN)"); free(unswizzledPixels); - } - break; - - default: LOG_ERROR(RSX, "Init tex error: Bad tex format (0x%x | %s | 0x%x)", format, (is_swizzled ? "swizzled" : "linear"), tex.GetFormat() & 0x40); break; } + default: + { + LOG_ERROR(RSX, "Init tex error: Bad tex format (0x%x | %s | 0x%x)", format, (is_swizzled ? "swizzled" : "linear"), tex.GetFormat() & 0x40); + break; + } + } + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, tex.GetMipmap() - 1); glTexParameteri(GL_TEXTURE_2D, GL_GENERATE_MIPMAP, tex.GetMipmap() > 1); @@ -746,7 +754,7 @@ void DrawCursorObj::InitializeShaders() " gl_Position = in_pos;\n" "}\n"; - m_fp.shader = + m_fp.shader = "#version 420\n" "\n" "in vec2 tc;\n" @@ -797,6 +805,18 @@ GLGSRender::~GLGSRender() m_frame->DeleteContext(m_context); } +void GLGSRender::Enable(bool enable, const u32 cap) +{ + if (enable) + { + glEnable(cap); + } + else + { + glDisable(cap); + } +} + extern CellGcmContextData current_context; void GLGSRender::Close() @@ -887,58 +907,58 @@ void GLGSRender::EnableVertexData(bool indexed_draw) switch (m_vertex_data[i].type) { case CELL_GCM_VERTEX_S1: - for (u32 j = 0; j < m_vertex_data[i].data.size(); j+=2) + for (u32 j = 0; j < m_vertex_data[i].data.size(); j += 2) { dump.Write(wxString::Format("%d\n", *(u16*)&m_vertex_data[i].data[j])); - if (!(((j+2) / 2) % m_vertex_data[i].size)) dump.Write("\n"); + if (!(((j + 2) / 2) % m_vertex_data[i].size)) dump.Write("\n"); } - break; + break; case CELL_GCM_VERTEX_F: - for (u32 j = 0; j < m_vertex_data[i].data.size(); j+=4) + for (u32 j = 0; j < m_vertex_data[i].data.size(); j += 4) { dump.Write(wxString::Format("%.01f\n", *(float*)&m_vertex_data[i].data[j])); - if (!(((j+4) / 4) % m_vertex_data[i].size)) dump.Write("\n"); + if (!(((j + 4) / 4) % m_vertex_data[i].size)) dump.Write("\n"); } - break; + break; case CELL_GCM_VERTEX_SF: - for (u32 j = 0; j < m_vertex_data[i].data.size(); j+=2) + for (u32 j = 0; j < m_vertex_data[i].data.size(); j += 2) { dump.Write(wxString::Format("%.01f\n", *(float*)&m_vertex_data[i].data[j])); - if (!(((j+2) / 2) % m_vertex_data[i].size)) dump.Write("\n"); + if (!(((j + 2) / 2) % m_vertex_data[i].size)) dump.Write("\n"); } - break; + break; case CELL_GCM_VERTEX_UB: for (u32 j = 0; j < m_vertex_data[i].data.size(); ++j) { dump.Write(wxString::Format("%d\n", m_vertex_data[i].data[j])); - if (!((j+1) % m_vertex_data[i].size)) dump.Write("\n"); + if (!((j + 1) % m_vertex_data[i].size)) dump.Write("\n"); } - break; + break; case CELL_GCM_VERTEX_S32K: - for (u32 j = 0; j < m_vertex_data[i].data.size(); j+=2) + for (u32 j = 0; j < m_vertex_data[i].data.size(); j += 2) { dump.Write(wxString::Format("%d\n", *(u16*)&m_vertex_data[i].data[j])); - if (!(((j+2) / 2) % m_vertex_data[i].size)) dump.Write("\n"); + if (!(((j + 2) / 2) % m_vertex_data[i].size)) dump.Write("\n"); } - break; - - // case CELL_GCM_VERTEX_CMP: - + break; + + // case CELL_GCM_VERTEX_CMP: + case CELL_GCM_VERTEX_UB256: for (u32 j = 0; j < m_vertex_data[i].data.size(); ++j) { dump.Write(wxString::Format("%d\n", m_vertex_data[i].data[j])); - if (!((j+1) % m_vertex_data[i].size)) dump.Write("\n"); + if (!((j + 1) % m_vertex_data[i].size)) dump.Write("\n"); } - break; + break; default: LOG_ERROR(HLE, "Bad cv type! %d", m_vertex_data[i].type); - return; + return; } dump.Write("\n"); @@ -966,7 +986,7 @@ void GLGSRender::EnableVertexData(bool indexed_draw) GL_FALSE, }; - if (m_vertex_data[i].type < 1 || m_vertex_data[i].type > 7) + if (m_vertex_data[i].type < 1 || m_vertex_data[i].type > 7) { LOG_ERROR(RSX, "GLGSRender::EnableVertexData: Bad vertex data type (%d)!", m_vertex_data[i].type); } @@ -984,7 +1004,7 @@ void GLGSRender::EnableVertexData(bool indexed_draw) case 3: glVertexAttrib3sv(i, (GLshort*)&m_vertex_data[i].data[0]); break; case 4: glVertexAttrib4sv(i, (GLshort*)&m_vertex_data[i].data[0]); break; } - break; + break; case CELL_GCM_VERTEX_F: switch (m_vertex_data[i].size) @@ -994,12 +1014,12 @@ void GLGSRender::EnableVertexData(bool indexed_draw) case 3: glVertexAttrib3fv(i, (GLfloat*)&m_vertex_data[i].data[0]); break; case 4: glVertexAttrib4fv(i, (GLfloat*)&m_vertex_data[i].data[0]); break; } - break; + break; case CELL_GCM_VERTEX_CMP: case CELL_GCM_VERTEX_UB: glVertexAttrib4ubv(i, (GLubyte*)&m_vertex_data[i].data[0]); - break; + break; } checkForGlError("glVertexAttrib"); @@ -1034,9 +1054,9 @@ void GLGSRender::InitVertexData() int l; GLfloat scaleOffsetMat[16] = { - 1.0f, 0.0f, 0.0f, 0.0f, - 0.0f, 1.0f, 0.0f, 0.0f, - 0.0f, 0.0f, 1.0f, 0.0f, + 1.0f, 0.0f, 0.0f, 0.0f, + 0.0f, 1.0f, 0.0f, 0.0f, + 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f }; @@ -1076,7 +1096,7 @@ void GLGSRender::InitFragmentData() return; } - for (const RSXTransformConstant& c : m_fragment_constants) + for (const RSXTransformConstant& c : m_fragment_constants) { u32 id = c.id - m_cur_fragment_prog->offset; @@ -1101,15 +1121,15 @@ bool GLGSRender::LoadProgram() LOG_WARNING(RSX, "LoadProgram: m_cur_shader_prog == NULL"); return false; } - + m_cur_fragment_prog->ctrl = m_shader_ctrl; - + if (!m_cur_vertex_prog) { LOG_WARNING(RSX, "LoadProgram: m_cur_vertex_prog == NULL"); return false; } - + m_fp_buf_num = m_prog_buffer.SearchFp(*m_cur_fragment_prog, m_fragment_prog); m_vp_buf_num = m_prog_buffer.SearchVp(*m_cur_vertex_prog, m_vertex_prog); @@ -1391,14 +1411,14 @@ void GLGSRender::WriteColorBuffers() glBufferData(GL_PIXEL_PACK_BUFFER, RSXThread::m_width * RSXThread::m_height * 4, 0, GL_STREAM_READ); glBindBuffer(GL_PIXEL_PACK_BUFFER, 0); WriteColorBufferA(); - break; + break; case CELL_GCM_SURFACE_TARGET_1: glBindBuffer(GL_PIXEL_PACK_BUFFER, g_pbo[1]); glBufferData(GL_PIXEL_PACK_BUFFER, RSXThread::m_width * RSXThread::m_height * 4, 0, GL_STREAM_READ); glBindBuffer(GL_PIXEL_PACK_BUFFER, 0); WriteColorBufferB(); - break; + break; case CELL_GCM_SURFACE_TARGET_MRT1: for (int i = 0; i < 2; i++) @@ -1409,7 +1429,7 @@ void GLGSRender::WriteColorBuffers() glBindBuffer(GL_PIXEL_PACK_BUFFER, 0); WriteColorBufferA(); WriteColorBufferB(); - break; + break; case CELL_GCM_SURFACE_TARGET_MRT2: for (int i = 0; i < 3; i++) @@ -1421,7 +1441,7 @@ void GLGSRender::WriteColorBuffers() WriteColorBufferA(); WriteColorBufferB(); WriteColorBufferC(); - break; + break; case CELL_GCM_SURFACE_TARGET_MRT3: for (int i = 0; i < 4; i++) @@ -1434,7 +1454,7 @@ void GLGSRender::WriteColorBuffers() WriteColorBufferB(); WriteColorBufferC(); WriteColorBufferD(); - break; + break; } } @@ -1480,7 +1500,7 @@ void GLGSRender::OnExitThread() glDeleteTextures(1, &g_flip_tex); glDeleteTextures(1, &g_depth_tex); glDeleteBuffers(6, g_pbo); - + glDisable(GL_TEXTURE_2D); glDisable(GL_VERTEX_PROGRAM_POINT_SIZE); @@ -1530,15 +1550,31 @@ void GLGSRender::InitDrawBuffers() m_rbo.Bind(4); - if (m_surface_depth_format == CELL_GCM_SURFACE_Z16) + switch (m_surface_depth_format) + { + case 0: + { + // case 0 found in BLJM60410-[Suzukaze no Melt - Days in the Sanctuary] + // [E : RSXThread]: Bad depth format! (0) + // [E : RSXThread]: glEnable: opengl error 0x0506 + // [E : RSXThread]: glDrawArrays: opengl error 0x0506 + m_rbo.Storage(GL_DEPTH_COMPONENT, RSXThread::m_width, RSXThread::m_height); + checkForGlError("m_rbo.Storage(GL_DEPTH_COMPONENT)"); + break; + } + + case CELL_GCM_SURFACE_Z16: { m_rbo.Storage(GL_DEPTH_COMPONENT16, RSXThread::m_width, RSXThread::m_height); checkForGlError("m_rbo.Storage(GL_DEPTH_COMPONENT16)"); m_fbo.Renderbuffer(GL_DEPTH_ATTACHMENT, m_rbo.GetId(4)); checkForGlError("m_fbo.Renderbuffer(GL_DEPTH_ATTACHMENT)"); + break; } - else if (m_surface_depth_format == CELL_GCM_SURFACE_Z24S8) + + + case CELL_GCM_SURFACE_Z24S8: { m_rbo.Storage(GL_DEPTH24_STENCIL8, RSXThread::m_width, RSXThread::m_height); checkForGlError("m_rbo.Storage(GL_DEPTH24_STENCIL8)"); @@ -1548,6 +1584,18 @@ void GLGSRender::InitDrawBuffers() m_fbo.Renderbuffer(GL_STENCIL_ATTACHMENT, m_rbo.GetId(4)); checkForGlError("m_fbo.Renderbuffer(GL_STENCIL_ATTACHMENT)"); + + break; + + } + + + default: + { + LOG_ERROR(RSX, "Bad depth format! (%d)", m_surface_depth_format); + assert(0); + break; + } } for (int i = 0; i < 4; ++i) @@ -1555,6 +1603,15 @@ void GLGSRender::InitDrawBuffers() m_fbo.Renderbuffer(GL_COLOR_ATTACHMENT0 + i, m_rbo.GetId(i)); checkForGlError(fmt::Format("m_fbo.Renderbuffer(GL_COLOR_ATTACHMENT%d)", i)); } + + //m_fbo.Renderbuffer(GL_DEPTH_ATTACHMENT, m_rbo.GetId(4)); + //checkForGlError("m_fbo.Renderbuffer(GL_DEPTH_ATTACHMENT)"); + + //if (m_surface_depth_format == 2) + //{ + // m_fbo.Renderbuffer(GL_STENCIL_ATTACHMENT, m_rbo.GetId(4)); + // checkForGlError("m_fbo.Renderbuffer(GL_STENCIL_ATTACHMENT)"); + //} } if (!m_set_surface_clip_horizontal) @@ -1568,41 +1625,56 @@ void GLGSRender::InitDrawBuffers() m_surface_clip_y = 0; m_surface_clip_h = RSXThread::m_height; } - + m_fbo.Bind(); static const GLenum draw_buffers[] = { GL_COLOR_ATTACHMENT0, GL_COLOR_ATTACHMENT1, GL_COLOR_ATTACHMENT2, GL_COLOR_ATTACHMENT3 }; switch (m_surface_color_target) { - case CELL_GCM_SURFACE_TARGET_NONE: - break; + case CELL_GCM_SURFACE_TARGET_NONE: break; case CELL_GCM_SURFACE_TARGET_0: + { glDrawBuffer(draw_buffers[0]); - break; - + checkForGlError("glDrawBuffer(0)"); + break; + } + case CELL_GCM_SURFACE_TARGET_1: + { glDrawBuffer(draw_buffers[1]); - break; - + checkForGlError("glDrawBuffer(1)"); + break; + } + case CELL_GCM_SURFACE_TARGET_MRT1: + { glDrawBuffers(2, draw_buffers); - break; - + checkForGlError("glDrawBuffers(2)"); + break; + } + case CELL_GCM_SURFACE_TARGET_MRT2: + { glDrawBuffers(3, draw_buffers); - break; + checkForGlError("glDrawBuffers(3)"); + break; + } case CELL_GCM_SURFACE_TARGET_MRT3: + { glDrawBuffers(4, draw_buffers); - break; - - checkForGlError("glDrawBuffers"); + checkForGlError("glDrawBuffers(4)"); + break; + } default: + { LOG_ERROR(RSX, "Bad surface color target: %d", m_surface_color_target); - break; + break; + } + } if (m_read_buffer) @@ -1621,326 +1693,63 @@ void GLGSRender::InitDrawBuffers() } } -void GLGSRender::Enable(u32 cmd, u32 enable) +void GLGSRender::ExecCMD(u32 cmd) { - switch (cmd) - { - case NV4097_SET_DITHER_ENABLE: - enable ? glEnable(GL_DITHER) : glDisable(GL_DITHER); - break; + assert(cmd == NV4097_CLEAR_SURFACE); - case NV4097_SET_ALPHA_TEST_ENABLE: - enable ? glEnable(GL_ALPHA_TEST) : glDisable(GL_ALPHA_TEST); - break; - - case NV4097_SET_STENCIL_TEST_ENABLE: - enable ? glEnable(GL_STENCIL_TEST) : glDisable(GL_STENCIL_TEST); - break; - - case NV4097_SET_DEPTH_TEST_ENABLE: - enable ? glEnable(GL_DEPTH_TEST) : glDisable(GL_DEPTH_TEST); - break; - - case NV4097_SET_CULL_FACE_ENABLE: - enable ? glEnable(GL_CULL_FACE) : glDisable(GL_CULL_FACE); - break; - - case NV4097_SET_BLEND_ENABLE: - enable ? glEnable(GL_BLEND) : glDisable(GL_BLEND); - break; - - case NV4097_SET_POLY_OFFSET_FILL_ENABLE: - enable ? glEnable(GL_POLYGON_OFFSET_FILL) : glDisable(GL_POLYGON_OFFSET_FILL); - break; - - case NV4097_SET_POLY_OFFSET_LINE_ENABLE: - enable ? glEnable(GL_POLYGON_OFFSET_LINE) : glDisable(GL_POLYGON_OFFSET_LINE); - break; - - case NV4097_SET_POLY_OFFSET_POINT_ENABLE: - enable ? glEnable(GL_POLYGON_OFFSET_POINT) : glDisable(GL_POLYGON_OFFSET_POINT); - break; - - case NV4097_SET_LOGIC_OP_ENABLE: - enable ? glEnable(GL_LOGIC_OP) : glDisable(GL_LOGIC_OP); - break; - - case NV4097_SET_SPECULAR_ENABLE: - enable ? glEnable(GL_LIGHTING) : glDisable(GL_LIGHTING); - break; - - case NV4097_SET_LINE_SMOOTH_ENABLE: - enable ? glEnable(GL_LINE_SMOOTH) : glDisable(GL_LINE_SMOOTH); - break; - - case NV4097_SET_POLY_SMOOTH_ENABLE: - enable ? glEnable(GL_POLYGON_SMOOTH) : glDisable(GL_POLYGON_SMOOTH); - break; - - case NV4097_SET_RESTART_INDEX_ENABLE: - enable ? glEnable(GL_PRIMITIVE_RESTART) : glDisable(GL_PRIMITIVE_RESTART); - break; - - case NV4097_SET_POINT_SPRITE_CONTROL: - enable ? glEnable(GL_POINT_SPRITE) : glDisable(GL_POINT_SPRITE); - break; - - case NV4097_SET_LINE_STIPPLE: - enable ? glEnable(GL_LINE_STIPPLE) : glDisable(GL_LINE_STIPPLE); - break; - - case NV4097_SET_POLYGON_STIPPLE: - enable ? glEnable(GL_POLYGON_STIPPLE) : glDisable(GL_POLYGON_STIPPLE); - break; - - case NV4097_SET_DEPTH_BOUNDS_TEST_ENABLE: - enable ? glEnable(GL_DEPTH_BOUNDS_TEST_EXT) : glDisable(GL_DEPTH_BOUNDS_TEST_EXT); - break; - - case NV4097_SET_TWO_SIDED_STENCIL_TEST_ENABLE: - enable ? glEnable(GL_STENCIL_TEST_TWO_SIDE_EXT) : glDisable(GL_STENCIL_TEST_TWO_SIDE_EXT); - break; - - case NV4097_SET_USER_CLIP_PLANE_CONTROL: - const u32 clip_plane_0 = enable & 0xf; - const u32 clip_plane_1 = (enable >> 4) & 0xf; - const u32 clip_plane_2 = (enable >> 8) & 0xf; - const u32 clip_plane_3 = (enable >> 12) & 0xf; - const u32 clip_plane_4 = (enable >> 16) & 0xf; - const u32 clip_plane_5 = enable >> 20; - - clip_plane_0 ? glEnable(GL_CLIP_PLANE0) : glDisable(GL_CLIP_PLANE0); - clip_plane_1 ? glEnable(GL_CLIP_PLANE1) : glDisable(GL_CLIP_PLANE1); - clip_plane_2 ? glEnable(GL_CLIP_PLANE2) : glDisable(GL_CLIP_PLANE2); - clip_plane_3 ? glEnable(GL_CLIP_PLANE3) : glDisable(GL_CLIP_PLANE3); - clip_plane_4 ? glEnable(GL_CLIP_PLANE4) : glDisable(GL_CLIP_PLANE4); - clip_plane_5 ? glEnable(GL_CLIP_PLANE5) : glDisable(GL_CLIP_PLANE5); - break; - } -} - -void GLGSRender::ClearColor(u32 a, u32 r, u32 g, u32 b) -{ - glClearColor(r / 255.0f, g / 255.0f, b / 255.0f, a / 255.0f); - checkForGlError("glClearColor"); -} - -void GLGSRender::ClearStencil(u32 stencil) -{ - glClearStencil(stencil); - checkForGlError("glClearStencil"); -} - -void GLGSRender::ClearDepth(u32 depth) -{ - glClearDepth(depth / (float)0xffffff); - checkForGlError("glClearDepth"); -} - -void GLGSRender::ClearSurface(u32 mask) -{ InitDrawBuffers(); - GLbitfield clearMask = 0; - if (mask & 0x01) clearMask |= GL_DEPTH_BUFFER_BIT; - if (mask & 0x02) clearMask |= GL_STENCIL_BUFFER_BIT; - if (mask & 0xF0) clearMask |= GL_COLOR_BUFFER_BIT; - - glClear(clearMask); + if (m_set_color_mask) + { + glColorMask(m_color_mask_r, m_color_mask_g, m_color_mask_b, m_color_mask_a); + checkForGlError("glColorMask"); + } + + if (m_set_scissor_horizontal && m_set_scissor_vertical) + { + glScissor(m_scissor_x, m_scissor_y, m_scissor_w, m_scissor_h); + checkForGlError("glScissor"); + } + + GLbitfield f = 0; + + if (m_clear_surface_mask & 0x1) + { + glClearDepth(m_clear_surface_z / (float)0xffffff); + checkForGlError("glClearDepth"); + + f |= GL_DEPTH_BUFFER_BIT; + } + + if (m_clear_surface_mask & 0x2) + { + glClearStencil(m_clear_surface_s); + checkForGlError("glClearStencil"); + + f |= GL_STENCIL_BUFFER_BIT; + } + + if (m_clear_surface_mask & 0xF0) + { + glClearColor( + m_clear_surface_color_r / 255.0f, + m_clear_surface_color_g / 255.0f, + m_clear_surface_color_b / 255.0f, + m_clear_surface_color_a / 255.0f); + checkForGlError("glClearColor"); + + f |= GL_COLOR_BUFFER_BIT; + } + + glClear(f); checkForGlError("glClear"); WriteBuffers(); } -void GLGSRender::ColorMask(bool a, bool r, bool g, bool b) -{ - glColorMask(r, g, b, a); - checkForGlError("glColorMask"); -} - -void GLGSRender::AlphaFunc(u32 func, float ref) -{ - glAlphaFunc(func, ref); - checkForGlError("glAlphaFunc"); -} - -void GLGSRender::DepthFunc(u32 func) -{ - glDepthFunc(func); - checkForGlError("glDepthFunc"); -} - -void GLGSRender::DepthMask(u32 flag) -{ - glDepthMask(flag); - checkForGlError("glDepthMask"); -} - -void GLGSRender::PolygonMode(u32 face, u32 mode) -{ - switch (face) - { - case NV4097_SET_FRONT_POLYGON_MODE: - glPolygonMode(GL_FRONT, mode); - break; - case NV4097_SET_BACK_POLYGON_MODE: - glPolygonMode(GL_BACK, mode); - break; - } - checkForGlError("glPolygonMode"); -} - -void GLGSRender::PointSize(float size) -{ - glPointSize(m_point_size); - checkForGlError("glPointSize"); -} - -void GLGSRender::LogicOp(u32 opcode) -{ - glLogicOp(opcode); - checkForGlError("glLogicOp"); -} - -void GLGSRender::LineWidth(float width) -{ - glLineWidth(width); - checkForGlError("glLineWidth"); -} - -void GLGSRender::LineStipple(u16 factor, u16 pattern) -{ - glLineStipple(factor, pattern); - checkForGlError("glLineStipple"); -} - -void GLGSRender::PolygonStipple(u32 pattern) -{ - glPolygonStipple((const GLubyte*)pattern); - checkForGlError("glPolygonStipple"); -} - -void GLGSRender::PrimitiveRestartIndex(u32 index) -{ - glPrimitiveRestartIndex(index); - checkForGlError("glPrimitiveRestartIndex"); -} - -void GLGSRender::CullFace(u32 mode) -{ - glCullFace(mode); - checkForGlError("glCullFace"); -} - -void GLGSRender::FrontFace(u32 mode) -{ - glFrontFace(mode); - checkForGlError("glFrontFace"); -} - -void GLGSRender::Fogi(u32 mode) -{ - glFogi(GL_FOG_MODE, mode); - checkForGlError("glFogi(GL_FOG_MODE)"); -} - -void GLGSRender::Fogf(float start, float end) -{ - glFogf(GL_FOG_START, start); - checkForGlError("glFogf(GL_FOG_START)"); - glFogf(GL_FOG_END, end); - checkForGlError("glFogf(GL_FOG_END)"); -} - -void GLGSRender::PolygonOffset(float factor , float bias) -{ - glPolygonOffset(factor, bias); - checkForGlError("glPolygonOffset"); -} - -void GLGSRender::DepthRangef(float min, float max) -{ - glDepthRangef(min, max); - checkForGlError("glDepthRangef"); -} - -void GLGSRender::BlendEquationSeparate(u16 rgb, u16 a) -{ - glBlendEquationSeparate(rgb, a); - checkForGlError("glBlendEquationSeparate"); -} - -void GLGSRender::BlendFuncSeparate(u16 srcRGB, u16 dstRGB, u16 srcAlpha, u16 dstAlpha) -{ - glBlendFuncSeparate(srcRGB, dstRGB, srcAlpha, dstAlpha); - checkForGlError("glBlendFuncSeparate"); -} - -void GLGSRender::BlendColor(u8 r, u8 g, u8 b, u8 a) -{ - glBlendColor(r, g, b, a); - checkForGlError("glBlendColor"); -} - -void GLGSRender::LightModeli(u32 enable) -{ - enable ? glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, GL_TRUE) : glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, GL_FALSE); - checkForGlError("glLightModeli"); -} - -void GLGSRender::ShadeModel(u32 mode) -{ - glShadeModel(m_shade_mode); - checkForGlError("glShadeModel"); -} - -void GLGSRender::DepthBoundsEXT(float min, float max) -{ - glDepthBoundsEXT(min, max); - checkForGlError("glDepthBoundsEXT"); -} - -void GLGSRender::Scissor(u16 x, u16 y, u16 width, u16 height) -{ - glScissor(x, y, width, height); - checkForGlError("glScissor"); -} - -void GLGSRender::StencilOp(u32 fail, u32 zfail, u32 zpass) -{ - glStencilOp(fail, zfail, zpass); - checkForGlError("glStencilOp"); -} - -void GLGSRender::StencilMask(u32 mask) -{ - glStencilMask(mask); - checkForGlError("glStencilMask"); -} - -void GLGSRender::StencilFunc(u32 func, u32 ref, u32 mask) -{ - glStencilFunc(func, ref, mask); - checkForGlError("glStencilFunc"); -} - -void GLGSRender::StencilOpSeparate(u32 mode, u32 fail, u32 zfail, u32 zpass) -{ - mode ? glStencilOpSeparate(GL_FRONT, fail, zfail, zpass) : glStencilOpSeparate(GL_BACK, fail, zfail, zpass); -} - -void GLGSRender::StencilMaskSeparate(u32 mode, u32 mask) -{ - mode ? glStencilMaskSeparate(GL_FRONT, mask) : glStencilMaskSeparate(GL_BACK, mask); -} - -void GLGSRender::StencilFuncSeparate(u32 mode, u32 func, u32 ref, u32 mask) -{ - mode ? glStencilFuncSeparate(GL_FRONT, func, ref, mask) : glStencilFuncSeparate(GL_BACK, func, ref, mask); -} - void GLGSRender::ExecCMD() { + //return; if (!LoadProgram()) { LOG_ERROR(RSX, "LoadProgram failed."); @@ -1949,7 +1758,268 @@ void GLGSRender::ExecCMD() } InitDrawBuffers(); - + + if (m_set_color_mask) + { + glColorMask(m_color_mask_r, m_color_mask_g, m_color_mask_b, m_color_mask_a); + checkForGlError("glColorMask"); + } + + if (!m_indexed_array.m_count && !m_draw_array_count) + { + u32 min_vertex_size = ~0; + for (auto &i : m_vertex_data) + { + if (!i.size) + continue; + + u32 vertex_size = i.data.size() / (i.size * i.GetTypeSize()); + + if (min_vertex_size > vertex_size) + min_vertex_size = vertex_size; + } + + m_draw_array_count = min_vertex_size; + m_draw_array_first = 0; + } + + Enable(m_set_depth_test, GL_DEPTH_TEST); + Enable(m_set_alpha_test, GL_ALPHA_TEST); + Enable(m_set_depth_bounds_test, GL_DEPTH_BOUNDS_TEST_EXT); + Enable(m_set_blend || m_set_blend_mrt1 || m_set_blend_mrt2 || m_set_blend_mrt3, GL_BLEND); + Enable(m_set_scissor_horizontal && m_set_scissor_vertical, GL_SCISSOR_TEST); + Enable(m_set_logic_op, GL_LOGIC_OP); + Enable(m_set_cull_face, GL_CULL_FACE); + Enable(m_set_dither, GL_DITHER); + Enable(m_set_stencil_test, GL_STENCIL_TEST); + Enable(m_set_line_smooth, GL_LINE_SMOOTH); + Enable(m_set_poly_smooth, GL_POLYGON_SMOOTH); + Enable(m_set_point_sprite_control, GL_POINT_SPRITE); + Enable(m_set_specular, GL_LIGHTING); + Enable(m_set_poly_offset_fill, GL_POLYGON_OFFSET_FILL); + Enable(m_set_poly_offset_line, GL_POLYGON_OFFSET_LINE); + Enable(m_set_poly_offset_point, GL_POLYGON_OFFSET_POINT); + Enable(m_set_restart_index, GL_PRIMITIVE_RESTART); + Enable(m_set_line_stipple, GL_LINE_STIPPLE); + Enable(m_set_polygon_stipple, GL_POLYGON_STIPPLE); + + if (m_set_clip_plane) + { + Enable(m_clip_plane_0, GL_CLIP_PLANE0); + Enable(m_clip_plane_1, GL_CLIP_PLANE1); + Enable(m_clip_plane_2, GL_CLIP_PLANE2); + Enable(m_clip_plane_3, GL_CLIP_PLANE3); + Enable(m_clip_plane_4, GL_CLIP_PLANE4); + Enable(m_clip_plane_5, GL_CLIP_PLANE5); + + checkForGlError("m_set_clip_plane"); + } + + checkForGlError("glEnable"); + + if (m_set_front_polygon_mode) + { + glPolygonMode(GL_FRONT, m_front_polygon_mode); + checkForGlError("glPolygonMode(Front)"); + } + + if (m_set_back_polygon_mode) + { + glPolygonMode(GL_BACK, m_back_polygon_mode); + checkForGlError("glPolygonMode(Back)"); + } + + if (m_set_point_size) + { + glPointSize(m_point_size); + checkForGlError("glPointSize"); + } + + if (m_set_poly_offset_mode) + { + glPolygonOffset(m_poly_offset_scale_factor, m_poly_offset_bias); + checkForGlError("glPolygonOffset"); + } + + if (m_set_logic_op) + { + glLogicOp(m_logic_op); + checkForGlError("glLogicOp"); + } + + if (m_set_scissor_horizontal && m_set_scissor_vertical) + { + glScissor(m_scissor_x, m_scissor_y, m_scissor_w, m_scissor_h); + checkForGlError("glScissor"); + } + + if (m_set_two_sided_stencil_test_enable) + { + if (m_set_stencil_fail && m_set_stencil_zfail && m_set_stencil_zpass) + { + glStencilOpSeparate(GL_FRONT, m_stencil_fail, m_stencil_zfail, m_stencil_zpass); + checkForGlError("glStencilOpSeparate"); + } + + if (m_set_stencil_mask) + { + glStencilMaskSeparate(GL_FRONT, m_stencil_mask); + checkForGlError("glStencilMaskSeparate"); + } + + if (m_set_stencil_func && m_set_stencil_func_ref && m_set_stencil_func_mask) + { + glStencilFuncSeparate(GL_FRONT, m_stencil_func, m_stencil_func_ref, m_stencil_func_mask); + checkForGlError("glStencilFuncSeparate"); + } + + if (m_set_back_stencil_fail && m_set_back_stencil_zfail && m_set_back_stencil_zpass) + { + glStencilOpSeparate(GL_BACK, m_back_stencil_fail, m_back_stencil_zfail, m_back_stencil_zpass); + checkForGlError("glStencilOpSeparate(GL_BACK)"); + } + + if (m_set_back_stencil_mask) + { + glStencilMaskSeparate(GL_BACK, m_back_stencil_mask); + checkForGlError("glStencilMaskSeparate(GL_BACK)"); + } + + if (m_set_back_stencil_func && m_set_back_stencil_func_ref && m_set_back_stencil_func_mask) + { + glStencilFuncSeparate(GL_BACK, m_back_stencil_func, m_back_stencil_func_ref, m_back_stencil_func_mask); + checkForGlError("glStencilFuncSeparate(GL_BACK)"); + } + } + else + { + if (m_set_stencil_fail && m_set_stencil_zfail && m_set_stencil_zpass) + { + glStencilOp(m_stencil_fail, m_stencil_zfail, m_stencil_zpass); + checkForGlError("glStencilOp"); + } + + if (m_set_stencil_mask) + { + glStencilMask(m_stencil_mask); + checkForGlError("glStencilMask"); + } + + if (m_set_stencil_func && m_set_stencil_func_ref && m_set_stencil_func_mask) + { + glStencilFunc(m_stencil_func, m_stencil_func_ref, m_stencil_func_mask); + checkForGlError("glStencilFunc"); + } + } + + // TODO: Use other glLightModel functions? + glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, m_set_two_side_light_enable ? GL_TRUE : GL_FALSE); + checkForGlError("glLightModeli"); + + if (m_set_shade_mode) + { + glShadeModel(m_shade_mode); + checkForGlError("glShadeModel"); + } + + if (m_set_depth_mask) + { + glDepthMask(m_depth_mask); + checkForGlError("glDepthMask"); + } + + if (m_set_depth_func) + { + glDepthFunc(m_depth_func); + checkForGlError("glDepthFunc"); + } + + if (m_set_depth_bounds) + { + glDepthBoundsEXT(m_depth_bounds_min, m_depth_bounds_max); + checkForGlError("glDepthBounds"); + } + + if (m_set_clip) + { + glDepthRangef(m_clip_min, m_clip_max); + checkForGlError("glDepthRangef"); + } + + if (m_set_line_width) + { + glLineWidth(m_line_width); + checkForGlError("glLineWidth"); + } + + if (m_set_line_stipple) + { + glLineStipple(m_line_stipple_factor, m_line_stipple_pattern); + checkForGlError("glLineStipple"); + } + + if (m_set_polygon_stipple) + { + glPolygonStipple((const GLubyte*)m_polygon_stipple_pattern); + checkForGlError("glPolygonStipple"); + } + + if (m_set_blend_equation) + { + glBlendEquationSeparate(m_blend_equation_rgb, m_blend_equation_alpha); + checkForGlError("glBlendEquationSeparate"); + } + + if (m_set_blend_sfactor && m_set_blend_dfactor) + { + glBlendFuncSeparate(m_blend_sfactor_rgb, m_blend_dfactor_rgb, m_blend_sfactor_alpha, m_blend_dfactor_alpha); + checkForGlError("glBlendFuncSeparate"); + } + + if (m_set_blend_color) + { + glBlendColor(m_blend_color_r, m_blend_color_g, m_blend_color_b, m_blend_color_a); + checkForGlError("glBlendColor"); + } + + if (m_set_cull_face) + { + glCullFace(m_cull_face); + checkForGlError("glCullFace"); + } + + if (m_set_front_face) + { + glFrontFace(m_front_face); + checkForGlError("glFrontFace"); + } + + if (m_set_alpha_func && m_set_alpha_ref) + { + glAlphaFunc(m_alpha_func, m_alpha_ref); + checkForGlError("glAlphaFunc"); + } + + if (m_set_fog_mode) + { + glFogi(GL_FOG_MODE, m_fog_mode); + checkForGlError("glFogi(GL_FOG_MODE)"); + } + + if (m_set_fog_params) + { + glFogf(GL_FOG_START, m_fog_param0); + checkForGlError("glFogf(GL_FOG_START)"); + glFogf(GL_FOG_END, m_fog_param1); + checkForGlError("glFogf(GL_FOG_END)"); + } + + if (m_set_restart_index) + { + glPrimitiveRestartIndex(m_restart_index); + checkForGlError("glPrimitiveRestartIndex"); + } + if (m_indexed_array.m_count && m_draw_array_count) { LOG_WARNING(RSX, "m_indexed_array.m_count && draw_array_count"); @@ -2005,16 +2075,16 @@ void GLGSRender::ExecCMD() case CELL_GCM_DRAW_INDEX_ARRAY_TYPE_32: glDrawElements(m_draw_mode - 1, m_indexed_array.m_count, GL_UNSIGNED_INT, nullptr); checkForGlError("glDrawElements #4"); - break; + break; case CELL_GCM_DRAW_INDEX_ARRAY_TYPE_16: glDrawElements(m_draw_mode - 1, m_indexed_array.m_count, GL_UNSIGNED_SHORT, nullptr); checkForGlError("glDrawElements #2"); - break; + break; default: LOG_ERROR(RSX, "Bad indexed array type (%d)", m_indexed_array.m_type); - break; + break; } DisableVertexData(); @@ -2028,102 +2098,130 @@ void GLGSRender::ExecCMD() checkForGlError("glDrawArrays"); DisableVertexData(); } - + WriteBuffers(); } void GLGSRender::Flip() { - static u8* src_buffer = nullptr; - static u32 width = 0; - static u32 height = 0; - GLenum format = GL_RGBA; - - if (m_read_buffer) + // Set scissor to FBO size + if (m_set_scissor_horizontal && m_set_scissor_vertical) { - format = GL_BGRA; - CellGcmDisplayInfo* buffers = vm::get_ptr(m_gcm_buffers_addr); - u32 addr = GetAddress(buffers[m_gcm_current_buffer].offset, CELL_GCM_LOCATION_LOCAL); + glScissor(0, 0, RSXThread::m_width, RSXThread::m_height); + checkForGlError("glScissor"); + } - if (Memory.IsGoodAddr(addr)) + switch (m_surface_color_target) + { + case CELL_GCM_SURFACE_TARGET_0: + case CELL_GCM_SURFACE_TARGET_1: + case CELL_GCM_SURFACE_TARGET_MRT1: + case CELL_GCM_SURFACE_TARGET_MRT2: + case CELL_GCM_SURFACE_TARGET_MRT3: + { + // Fast path for non-MRT using glBlitFramebuffer. + GLfbo::Bind(GL_DRAW_FRAMEBUFFER, 0); + // Renderbuffer is upside turn , swapped srcY0 and srcY1 + GLfbo::Blit(0, RSXThread::m_height, RSXThread::m_width, 0, 0, 0, RSXThread::m_width, RSXThread::m_height, GL_COLOR_BUFFER_BIT, GL_NEAREST); + } + break; + + case CELL_GCM_SURFACE_TARGET_NONE: + { + // Slow path for MRT/None target using glReadPixels. + static u8* src_buffer = nullptr; + static u32 width = 0; + static u32 height = 0; + GLenum format = GL_RGBA; + + if (m_read_buffer) { - width = buffers[m_gcm_current_buffer].width; - height = buffers[m_gcm_current_buffer].height; - src_buffer = vm::get_ptr(addr); + format = GL_BGRA; + CellGcmDisplayInfo* buffers = vm::get_ptr(m_gcm_buffers_addr); + u32 addr = GetAddress(buffers[m_gcm_current_buffer].offset, CELL_GCM_LOCATION_LOCAL); + + if (Memory.IsGoodAddr(addr)) + { + width = buffers[m_gcm_current_buffer].width; + height = buffers[m_gcm_current_buffer].height; + src_buffer = vm::get_ptr(addr); + } + else + { + src_buffer = nullptr; + } + } + else if (m_fbo.IsCreated()) + { + format = GL_RGBA; + static std::vector pixels; + pixels.resize(RSXThread::m_width * RSXThread::m_height * 4); + m_fbo.Bind(GL_READ_FRAMEBUFFER); + glBindBuffer(GL_PIXEL_PACK_BUFFER, g_pbo[5]); + glBufferData(GL_PIXEL_PACK_BUFFER, RSXThread::m_width * RSXThread::m_height * 4, 0, GL_STREAM_READ); + glReadPixels(0, 0, RSXThread::m_width, RSXThread::m_height, GL_RGBA, GL_UNSIGNED_INT_8_8_8_8, 0); + checkForGlError("Flip(): glReadPixels(GL_BGRA, GL_UNSIGNED_INT_8_8_8_8)"); + GLubyte *packed = (GLubyte *)glMapBuffer(GL_PIXEL_PACK_BUFFER, GL_READ_ONLY); + if (packed) + { + memcpy(pixels.data(), packed, RSXThread::m_width * RSXThread::m_height * 4); + glUnmapBuffer(GL_PIXEL_PACK_BUFFER); + checkForGlError("Flip(): glUnmapBuffer"); + } + glBindBuffer(GL_PIXEL_PACK_BUFFER, 0); + + src_buffer = pixels.data(); + width = RSXThread::m_width; + height = RSXThread::m_height; } else { src_buffer = nullptr; } - } - else if (m_fbo.IsCreated()) - { - format = GL_RGBA; - static std::vector pixels; - pixels.resize(RSXThread::m_width * RSXThread::m_height * 4); - m_fbo.Bind(GL_READ_FRAMEBUFFER); - glBindBuffer(GL_PIXEL_PACK_BUFFER, g_pbo[5]); - glBufferData(GL_PIXEL_PACK_BUFFER, RSXThread::m_width * RSXThread::m_height * 4, 0, GL_STREAM_READ); - glReadPixels(0, 0, RSXThread::m_width, RSXThread::m_height, GL_RGBA, GL_UNSIGNED_INT_8_8_8_8, 0); - checkForGlError("Flip(): glReadPixels(GL_BGRA, GL_UNSIGNED_INT_8_8_8_8)"); - GLubyte *packed = (GLubyte *)glMapBuffer(GL_PIXEL_PACK_BUFFER, GL_READ_ONLY); - if (packed) + + if (src_buffer) { - memcpy(pixels.data(), packed, RSXThread::m_width * RSXThread::m_height * 4); - glUnmapBuffer(GL_PIXEL_PACK_BUFFER); - checkForGlError("Flip(): glUnmapBuffer"); + glDisable(GL_STENCIL_TEST); + glDisable(GL_DEPTH_TEST); + glDisable(GL_CLIP_PLANE0); + glDisable(GL_CLIP_PLANE1); + glDisable(GL_CLIP_PLANE2); + glDisable(GL_CLIP_PLANE3); + glDisable(GL_CLIP_PLANE4); + glDisable(GL_CLIP_PLANE5); + glActiveTexture(GL_TEXTURE0); + glBindTexture(GL_TEXTURE_2D, g_flip_tex); + glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, width, height, 0, format, GL_UNSIGNED_INT_8_8_8_8, src_buffer); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_SWIZZLE_A, GL_ONE); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); + + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + glOrtho(0, 1, 0, 1, 0, 1); + glMatrixMode(GL_MODELVIEW); + glLoadIdentity(); + + GLfbo::Bind(GL_DRAW_FRAMEBUFFER, 0); + + m_program.UnUse(); + m_program.Use(); + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT | GL_ACCUM_BUFFER_BIT); + + glColor3f(1, 1, 1); + glBegin(GL_QUADS); + glTexCoord2i(0, 1); + glVertex2i(0, 0); + glTexCoord2i(1, 1); + glVertex2i(1, 0); + glTexCoord2i(1, 0); + glVertex2i(1, 1); + glTexCoord2i(0, 0); + glVertex2i(0, 1); + glEnd(); } - glBindBuffer(GL_PIXEL_PACK_BUFFER, 0); - - src_buffer = pixels.data(); - width = RSXThread::m_width; - height = RSXThread::m_height; } - else - { - src_buffer = nullptr; - } - - if (src_buffer) - { - glDisable(GL_STENCIL_TEST); - glDisable(GL_DEPTH_TEST); - glDisable(GL_CLIP_PLANE0); - glDisable(GL_CLIP_PLANE1); - glDisable(GL_CLIP_PLANE2); - glDisable(GL_CLIP_PLANE3); - glDisable(GL_CLIP_PLANE4); - glDisable(GL_CLIP_PLANE5); - glActiveTexture(GL_TEXTURE0); - glBindTexture(GL_TEXTURE_2D, g_flip_tex); - glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, width, height, 0, format, GL_UNSIGNED_INT_8_8_8_8, src_buffer); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_SWIZZLE_A, GL_ONE); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); - - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - glOrtho(0, 1, 0, 1, 0, 1); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - - GLfbo::Bind(GL_DRAW_FRAMEBUFFER, 0); - - m_program.UnUse(); - m_program.Use(); - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT | GL_ACCUM_BUFFER_BIT); - - glColor3f(1, 1, 1); - glBegin(GL_QUADS); - glTexCoord2i(0, 1); - glVertex2i(0, 0); - glTexCoord2i(1, 1); - glVertex2i(1, 0); - glTexCoord2i(1, 0); - glVertex2i(1, 1); - glTexCoord2i(0, 0); - glVertex2i(0, 1); - glEnd(); + break; } // Draw Objects @@ -2133,7 +2231,14 @@ void GLGSRender::Flip() } m_frame->Flip(m_context); - + + // Restore scissor + if (m_set_scissor_horizontal && m_set_scissor_vertical) + { + glScissor(m_scissor_x, m_scissor_y, m_scissor_w, m_scissor_h); + checkForGlError("glScissor"); + } + } u32 LinearToSwizzleAddress(u32 x, u32 y, u32 z, u32 log2_width, u32 log2_height, u32 log2_depth) diff --git a/rpcs3/Emu/RSX/GL/GLGSRender.h b/rpcs3/Emu/RSX/GL/GLGSRender.h index 7ab9f406d1..a509664ded 100644 --- a/rpcs3/Emu/RSX/GL/GLGSRender.h +++ b/rpcs3/Emu/RSX/GL/GLGSRender.h @@ -21,7 +21,7 @@ u32 LinearToSwizzleAddress(u32 x, u32 y, u32 z, u32 log2_width, u32 log2_height, class GLTexture { u32 m_id; - + public: GLTexture() : m_id(0) { @@ -166,11 +166,12 @@ public: virtual ~GLGSRender(); private: - void EnableVertexData(bool indexed_draw=false); + void EnableVertexData(bool indexed_draw = false); void DisableVertexData(); void InitVertexData(); void InitFragmentData(); + void Enable(bool enable, const u32 cap); virtual void Close(); bool LoadProgram(); void WriteBuffers(); @@ -189,41 +190,7 @@ protected: virtual void OnInitThread(); virtual void OnExitThread(); virtual void OnReset(); + virtual void ExecCMD(u32 cmd); virtual void ExecCMD(); - virtual void Enable(u32 cmd, u32 enable); - virtual void ClearColor(u32 a, u32 r, u32 g, u32 b); - virtual void ClearStencil(u32 stencil); - virtual void ClearDepth(u32 depth); - virtual void ClearSurface(u32 mask); - virtual void ColorMask(bool a, bool r, bool g, bool b); - virtual void AlphaFunc(u32 func, float ref); - virtual void DepthFunc(u32 func); - virtual void DepthMask(u32 flag); - virtual void PolygonMode(u32 face, u32 mode); - virtual void PointSize(float size); - virtual void LogicOp(u32 opcode); - virtual void LineWidth(float width); - virtual void LineStipple(u16 factor, u16 pattern); - virtual void PolygonStipple(u32 pattern); - virtual void PrimitiveRestartIndex(u32 index); - virtual void CullFace(u32 mode); - virtual void FrontFace(u32 mode); - virtual void Fogi(u32 mode); - virtual void Fogf(float start, float end); - virtual void PolygonOffset(float factor, float bias); - virtual void DepthRangef(float min, float max); - virtual void BlendEquationSeparate(u16 rgb, u16 a); - virtual void BlendFuncSeparate(u16 srcRGB, u16 dstRGB, u16 srcAlpha, u16 dstAlpha); - virtual void BlendColor(u8 r, u8 g, u8 b, u8 a); - virtual void LightModeli(u32 enable); - virtual void ShadeModel(u32 mode); - virtual void DepthBoundsEXT(float min, float max); - virtual void Scissor(u16 x, u16 y, u16 width, u16 height); - virtual void StencilOp(u32 fail, u32 zfail, u32 zpass); - virtual void StencilMask(u32 mask); - virtual void StencilFunc(u32 func, u32 ref, u32 mask); - virtual void StencilOpSeparate(u32 mode, u32 fail, u32 zfail, u32 zpass); - virtual void StencilMaskSeparate(u32 mode, u32 mask); - virtual void StencilFuncSeparate(u32 mode, u32 func, u32 ref, u32 mask); virtual void Flip(); }; diff --git a/rpcs3/Emu/RSX/Null/NullGSRender.h b/rpcs3/Emu/RSX/Null/NullGSRender.h index 53786c3b8e..33875cbabe 100644 --- a/rpcs3/Emu/RSX/Null/NullGSRender.h +++ b/rpcs3/Emu/RSX/Null/NullGSRender.h @@ -6,50 +6,44 @@ class NullGSRender { public: - NullGSRender() {} - virtual ~NullGSRender() {} + NullGSRender() + { + } + + virtual ~NullGSRender() + { + } private: - virtual void OnInit() {} - virtual void OnInitThread() {} - virtual void OnExitThread() {} - virtual void OnReset() {} - virtual void Enable(u32 cmd, u32 enable) {} - virtual void ClearColor(u32 a, u32 r, u32 g, u32 b) {} - virtual void ClearStencil(u32 stencil) {} - virtual void ClearDepth(u32 depth) {} - virtual void ClearSurface(u32 mask) {} - virtual void ColorMask(bool a, bool r, bool g, bool b) {} - virtual void ExecCMD() {} - virtual void AlphaFunc(u32 func, float ref) {} - virtual void DepthFunc(u32 func) {} - virtual void DepthMask(u32 flag) {} - virtual void PolygonMode(u32 face, u32 mode) {} - virtual void PointSize(float size) {} - virtual void LogicOp(u32 opcode) {} - virtual void LineWidth(float width) {} - virtual void LineStipple(u16 factor, u16 pattern) {} - virtual void PolygonStipple(u32 pattern) {} - virtual void PrimitiveRestartIndex(u32 index) {} - virtual void CullFace(u32 mode) {} - virtual void FrontFace(u32 mode) {} - virtual void Fogi(u32 mode) {} - virtual void Fogf(float start, float end) {} - virtual void PolygonOffset(float factor, float bias) {} - virtual void DepthRangef(float min, float max) {} - virtual void BlendEquationSeparate(u16 rgb, u16 a) {} - virtual void BlendFuncSeparate(u16 srcRGB, u16 dstRGB, u16 srcAlpha, u16 dstAlpha) {} - virtual void BlendColor(u8 r, u8 g, u8 b, u8 a) {} - virtual void LightModeli(u32 enable) {} - virtual void ShadeModel(u32 mode) {} - virtual void DepthBoundsEXT(float min, float max) {} - virtual void Scissor(u16 x, u16 y, u16 width, u16 height) {} - virtual void StencilOp(u32 fail, u32 zfail, u32 zpass) {} - virtual void StencilMask(u32 mask) {} - virtual void StencilFunc(u32 func, u32 ref, u32 mask) {} - virtual void StencilOpSeparate(u32 mode, u32 fail, u32 zfail, u32 zpass) {} - virtual void StencilMaskSeparate(u32 mode, u32 mask) {} - virtual void StencilFuncSeparate(u32 mode, u32 func, u32 ref, u32 mask) {} - virtual void Flip() {} - virtual void Close() {} -}; + virtual void OnInit() + { + } + + virtual void OnInitThread() + { + } + + virtual void OnExitThread() + { + } + + virtual void OnReset() + { + } + + virtual void ExecCMD(u32 cmd) + { + } + + virtual void ExecCMD() + { + } + + virtual void Flip() + { + } + + virtual void Close() + { + } +}; \ No newline at end of file diff --git a/rpcs3/Emu/RSX/RSXThread.cpp b/rpcs3/Emu/RSX/RSXThread.cpp index 906b0281c3..2c7f2086ba 100644 --- a/rpcs3/Emu/RSX/RSXThread.cpp +++ b/rpcs3/Emu/RSX/RSXThread.cpp @@ -25,32 +25,32 @@ void RSXThread::NativeRescale(float width, float height) m_height_scale = 1080 / height * 2.0f; m_width = 1920; m_height = 1080; + break; } - break; case 2: // 1280x720 window size { m_width_scale = 1280 / width * 2.0f; m_height_scale = 720 / height * 2.0f; m_width = 1280; m_height = 720; + break; } - break; case 4: // 720x480 window size { m_width_scale = 720 / width * 2.0f; m_height_scale = 480 / height * 2.0f; m_width = 720; m_height = 480; + break; } - break; case 5: // 720x576 window size { m_width_scale = 720 / width * 2.0f; m_height_scale = 576 / height * 2.0f; m_width = 720; m_height = 576; + break; } - break; } } @@ -58,7 +58,7 @@ u32 GetAddress(u32 offset, u32 location) { u32 res = 0; - switch(location) + switch (location) { case CELL_GCM_LOCATION_LOCAL: { @@ -70,22 +70,19 @@ u32 GetAddress(u32 offset, u32 location) res = (u32)Memory.RSXIOMem.RealAddr(offset); // TODO: Error Check? if (res == 0) { - LOG_ERROR(RSX, "GetAddress(offset=0x%x): RSXIO memory not mapped", offset); - Emu.Pause(); - break; + throw fmt::format("GetAddress(offset=0x%x, location=0x%x): RSXIO memory not mapped", offset, location); } if (Emu.GetGSManager().GetRender().m_strict_ordering[offset >> 20]) { _mm_mfence(); // probably doesn't have any effect on current implementation } + break; } default: { - LOG_ERROR(RSX, "GetAddress(offset=0x%x, location=0x%x): invalid location", offset, location); - Emu.Pause(); - break; + throw fmt::format("GetAddress(offset=0x%x, location=0x%x): invalid location", offset, location); } } @@ -112,7 +109,7 @@ void RSXVertexData::Reset() data.clear(); } -void RSXVertexData::Load(u32 start, u32 count, u32 baseOffset, u32 baseIndex=0) +void RSXVertexData::Load(u32 start, u32 count, u32 baseOffset, u32 baseIndex = 0) { if (!addr) return; @@ -125,29 +122,29 @@ void RSXVertexData::Load(u32 start, u32 count, u32 baseOffset, u32 baseIndex=0) auto src = vm::get_ptr(addr + baseOffset + stride * (i + baseIndex)); u8* dst = &data[i * tsize * size]; - switch(tsize) + switch (tsize) { case 1: { - memcpy(dst, src, size); // may be dangerous + memcpy(dst, src, size); + break; } - break; case 2: { const u16* c_src = (const u16*)src; u16* c_dst = (u16*)dst; for (u32 j = 0; j < size; ++j) *c_dst++ = re16(*c_src++); + break; } - break; case 4: { const u32* c_src = (const u32*)src; u32* c_dst = (u32*)dst; for (u32 j = 0; j < size; ++j) *c_dst++ = re32(*c_src++); + break; } - break; } } } @@ -199,7 +196,7 @@ u32 RSXThread::OutOfArgsCount(const uint x, const u32 cmd, const u32 count, cons case_16(offset + 16*step, step) #define case_range(n, offset, step) \ case_##n(offset, step) \ - index = (cmd - offset) / step; + index = (cmd - offset) / step void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const u32 count) { @@ -217,14 +214,14 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const m_used_gcm_commands.insert(cmd); - switch(cmd) + switch (cmd) { // NV406E case NV406E_SET_REFERENCE: { m_ctrl->ref.exchange(be_t::make(ARGS(0))); + break; } - break; case NV406E_SET_CONTEXT_DMA_SEMAPHORE: { @@ -232,16 +229,16 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const { LOG_WARNING(RSX, "TODO: NV406E_SET_CONTEXT_DMA_SEMAPHORE: 0x%x", ARGS(0)); } + break; } - break; case NV4097_SET_SEMAPHORE_OFFSET: case NV406E_SEMAPHORE_OFFSET: { m_set_semaphore_offset = true; m_semaphore_offset = ARGS(0); + break; } - break; case NV406E_SEMAPHORE_ACQUIRE: { @@ -249,8 +246,8 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const { LOG_WARNING(RSX, "TODO: NV406E_SEMAPHORE_ACQUIRE: 0x%x", ARGS(0)); } + break; } - break; case NV406E_SEMAPHORE_RELEASE: case NV4097_TEXTURE_READ_SEMAPHORE_RELEASE: @@ -260,8 +257,8 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const m_set_semaphore_offset = false; vm::write32(Memory.RSXCMDMem.GetStartAddr() + m_semaphore_offset, ARGS(0)); } + break; } - break; case NV4097_BACK_END_WRITE_SEMAPHORE_RELEASE: { @@ -273,8 +270,8 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const vm::write32(Memory.RSXCMDMem.GetStartAddr() + m_semaphore_offset, value); } + break; } - break; // NV4097 case 0x0003fead: @@ -311,30 +308,30 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const return; } - std::this_thread::sleep_for (std::chrono::milliseconds((s64)(1000.0 / limit - m_timer_sync.GetElapsedTimeInMilliSec()))); + std::this_thread::sleep_for(std::chrono::milliseconds((s64)(1000.0 / limit - m_timer_sync.GetElapsedTimeInMilliSec()))); m_timer_sync.Start(); }; sync(); //Emu.Pause(); + break; } - break; case NV4097_NO_OPERATION: { // Nothing to do here + break; } - break; - + case NV4097_SET_CONTEXT_DMA_REPORT: { if (ARGS(0)) { LOG_WARNING(RSX, "TODO: NV4097_SET_CONTEXT_DMA_REPORT: 0x%x", ARGS(0)); } + break; } - break; case NV4097_NOTIFY: { @@ -342,8 +339,8 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const { LOG_WARNING(RSX, "TODO: NV4097_NOTIFY: 0x%x", ARGS(0)); } + break; } - break; case NV4097_WAIT_FOR_IDLE: { @@ -351,8 +348,8 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const { LOG_WARNING(RSX, "TODO: NV4097_WAIT_FOR_IDLE: 0x%x", ARGS(0)); } + break; } - break; case NV4097_PM_TRIGGER: { @@ -360,64 +357,64 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const { LOG_WARNING(RSX, "TODO: NV4097_PM_TRIGGER: 0x%x", ARGS(0)); } + break; } - break; // Texture - case_range(16, NV4097_SET_TEXTURE_FORMAT, 0x20) - case_range(16, NV4097_SET_TEXTURE_OFFSET, 0x20) - case_range(16, NV4097_SET_TEXTURE_FILTER, 0x20) - case_range(16, NV4097_SET_TEXTURE_ADDRESS, 0x20) - case_range(16, NV4097_SET_TEXTURE_IMAGE_RECT, 32) - case_range(16, NV4097_SET_TEXTURE_BORDER_COLOR, 0x20) - case_range(16, NV4097_SET_TEXTURE_CONTROL0, 0x20) - case_range(16, NV4097_SET_TEXTURE_CONTROL1, 0x20) + case_range(16, NV4097_SET_TEXTURE_FORMAT, 0x20); + case_range(16, NV4097_SET_TEXTURE_OFFSET, 0x20); + case_range(16, NV4097_SET_TEXTURE_FILTER, 0x20); + case_range(16, NV4097_SET_TEXTURE_ADDRESS, 0x20); + case_range(16, NV4097_SET_TEXTURE_IMAGE_RECT, 32); + case_range(16, NV4097_SET_TEXTURE_BORDER_COLOR, 0x20); + case_range(16, NV4097_SET_TEXTURE_CONTROL0, 0x20); + case_range(16, NV4097_SET_TEXTURE_CONTROL1, 0x20); { // Done using methodRegisters in RSXTexture.cpp + break; } - break; - case_range(16, NV4097_SET_TEX_COORD_CONTROL, 4) + case_range(16, NV4097_SET_TEX_COORD_CONTROL, 4); { LOG_WARNING(RSX, "TODO: NV4097_SET_TEX_COORD_CONTROL"); + break; } - break; - case_range(16, NV4097_SET_TEXTURE_CONTROL3, 4) + case_range(16, NV4097_SET_TEXTURE_CONTROL3, 4); { RSXTexture& tex = m_textures[index]; const u32 a0 = ARGS(0); u32 pitch = a0 & 0xFFFFF; u16 depth = a0 >> 20; tex.SetControl3(depth, pitch); + break; } - break; - - // Vertex Texture - case_range(4, NV4097_SET_VERTEX_TEXTURE_FORMAT, 0x20) - case_range(4, NV4097_SET_VERTEX_TEXTURE_OFFSET, 0x20) - case_range(4, NV4097_SET_VERTEX_TEXTURE_FILTER, 0x20) - case_range(4, NV4097_SET_VERTEX_TEXTURE_ADDRESS, 0x20) - case_range(4, NV4097_SET_VERTEX_TEXTURE_IMAGE_RECT, 0x20) - case_range(4, NV4097_SET_VERTEX_TEXTURE_BORDER_COLOR, 0x20) - case_range(4, NV4097_SET_VERTEX_TEXTURE_CONTROL0, 0x20) + + // Vertex Texture + case_range(4, NV4097_SET_VERTEX_TEXTURE_FORMAT, 0x20); + case_range(4, NV4097_SET_VERTEX_TEXTURE_OFFSET, 0x20); + case_range(4, NV4097_SET_VERTEX_TEXTURE_FILTER, 0x20); + case_range(4, NV4097_SET_VERTEX_TEXTURE_ADDRESS, 0x20); + case_range(4, NV4097_SET_VERTEX_TEXTURE_IMAGE_RECT, 0x20); + case_range(4, NV4097_SET_VERTEX_TEXTURE_BORDER_COLOR, 0x20); + case_range(4, NV4097_SET_VERTEX_TEXTURE_CONTROL0, 0x20); { // Done using methodRegisters in RSXTexture.cpp + break; } - break; - case_range(4, NV4097_SET_VERTEX_TEXTURE_CONTROL3, 0x20) + case_range(4, NV4097_SET_VERTEX_TEXTURE_CONTROL3, 0x20); { RSXVertexTexture& tex = m_vertex_textures[index]; const u32 a0 = ARGS(0); u32 pitch = a0 & 0xFFFFF; u16 depth = a0 >> 20; tex.SetControl3(depth, pitch); + break; } - break; - // Vertex data - case_range(16, NV4097_SET_VERTEX_DATA4UB_M, 4) + // Vertex data + case_range(16, NV4097_SET_VERTEX_DATA4UB_M, 4); { const u32 a0 = ARGS(0); u8 v0 = a0; @@ -434,17 +431,17 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const m_vertex_data[index].data.push_back(v3); //LOG_WARNING(RSX, "NV4097_SET_VERTEX_DATA4UB_M: index = %d, v0 = 0x%x, v1 = 0x%x, v2 = 0x%x, v3 = 0x%x", index, v0, v1, v2, v3); + break; } - break; - case_range(16, NV4097_SET_VERTEX_DATA2F_M, 8) + case_range(16, NV4097_SET_VERTEX_DATA2F_M, 8); { const u32 a0 = ARGS(0); const u32 a1 = ARGS(1); float v0 = (float&)a0; float v1 = (float&)a1; - + m_vertex_data[index].Reset(); m_vertex_data[index].type = CELL_GCM_VERTEX_F; m_vertex_data[index].size = 2; @@ -454,10 +451,10 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const (float&)m_vertex_data[index].data[pos + sizeof(float) * 1] = v1; //LOG_WARNING(RSX, "NV4097_SET_VERTEX_DATA2F_M: index = %d, v0 = %f, v1 = %f", index, v0, v1); + break; } - break; - case_range(16, NV4097_SET_VERTEX_DATA4F_M, 16) + case_range(16, NV4097_SET_VERTEX_DATA4F_M, 16); { const u32 a0 = ARGS(0); const u32 a1 = ARGS(1); @@ -480,10 +477,10 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const (float&)m_vertex_data[index].data[pos + sizeof(float) * 3] = v3; //LOG_WARNING(RSX, "NV4097_SET_VERTEX_DATA4F_M: index = %d, v0 = %f, v1 = %f, v2 = %f, v3 = %f", index, v0, v1, v2, v3); + break; } - break; - case_range(16, NV4097_SET_VERTEX_DATA_ARRAY_OFFSET, 4) + case_range(16, NV4097_SET_VERTEX_DATA_ARRAY_OFFSET, 4); { const u32 addr = GetAddress(ARGS(0) & 0x7fffffff, ARGS(0) >> 31); @@ -491,10 +488,10 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const m_vertex_data[index].data.clear(); //LOG_WARNING(RSX, "NV4097_SET_VERTEX_DATA_ARRAY_OFFSET: num=%d, addr=0x%x", index, addr); + break; } - break; - case_range(16, NV4097_SET_VERTEX_DATA_ARRAY_FORMAT, 4) + case_range(16, NV4097_SET_VERTEX_DATA_ARRAY_FORMAT, 4); { const u32 a0 = ARGS(0); u16 frequency = a0 >> 16; @@ -510,8 +507,8 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const //LOG_WARNING(RSX, "NV4097_SET_VERTEX_DATA_ARRAY_FORMAT: index=%d, frequency=%d, stride=%d, size=%d, type=%d", index, frequency, stride, size, type); + break; } - break; // Vertex Attribute case NV4097_SET_VERTEX_ATTRIB_INPUT_MASK: @@ -522,8 +519,8 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const } //VertexData[0].prog.attributeInputMask = ARGS(0); + break; } - break; case NV4097_SET_VERTEX_ATTRIB_OUTPUT_MASK: { @@ -534,16 +531,21 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const //VertexData[0].prog.attributeOutputMask = ARGS(0); //FragmentData.prog.attributeInputMask = ARGS(0)/* & ~0x20*/; + break; } - break; // Color Mask case NV4097_SET_COLOR_MASK: { - const u32 mask = ARGS(0); - ColorMask(mask & 0x1000000, mask & 0x1000000, mask & 0x1000000, mask & 0x0000001); + const u32 a0 = ARGS(0); + + m_set_color_mask = true; + m_color_mask_a = a0 & 0x1000000 ? true : false; + m_color_mask_r = a0 & 0x0010000 ? true : false; + m_color_mask_g = a0 & 0x0000100 ? true : false; + m_color_mask_b = a0 & 0x0000001 ? true : false; + break; } - break; case NV4097_SET_COLOR_MASK_MRT: { @@ -551,118 +553,105 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const { LOG_WARNING(RSX, "TODO: NV4097_SET_COLOR_MASK_MRT: 0x%x", mask); } + break; } - break; // Alpha testing case NV4097_SET_ALPHA_TEST_ENABLE: { - const u32 value = ARGS(0); - Enable(cmd, value); + m_set_alpha_test = ARGS(0) ? true : false; + break; } - break; case NV4097_SET_ALPHA_FUNC: { - const u32 value = ARGS(0); - m_alpha_func = value; + m_set_alpha_func = true; + m_alpha_func = ARGS(0); - // Sanity check here for invalid alpha func - if (m_alpha_func) + if (count == 2) { - AlphaFunc(m_alpha_func, m_alpha_ref); + m_set_alpha_ref = true; + const u32 a1 = ARGS(1); + m_alpha_ref = (float&)a1; } + break; } - break; case NV4097_SET_ALPHA_REF: { - const u32 value = ARGS(0); - m_alpha_ref = (float&)value; - - // Sanity check here for invalid alpha func - if (m_alpha_func) - { - AlphaFunc(m_alpha_func, m_alpha_ref); - } + m_set_alpha_ref = true; + const u32 a0 = ARGS(0); + m_alpha_ref = (float&)a0; + break; } - break; // Cull face case NV4097_SET_CULL_FACE_ENABLE: { - const u32 value = ARGS(0); - Enable(cmd, value); + m_set_cull_face = ARGS(0) ? true : false; + break; } - break; case NV4097_SET_CULL_FACE: { - const u32 value = ARGS(0); - CullFace(value); + m_cull_face = ARGS(0); + break; } - break; // Front face case NV4097_SET_FRONT_FACE: { - const u32 value = ARGS(0); - //FrontFace(value); + m_front_face = ARGS(0); + break; } - break; // Blending case NV4097_SET_BLEND_ENABLE: { - const u32 value = ARGS(0); - Enable(cmd, value); + m_set_blend = ARGS(0) ? true : false; + break; } - break; case NV4097_SET_BLEND_ENABLE_MRT: { m_set_blend_mrt1 = ARGS(0) & 0x02 ? true : false; m_set_blend_mrt2 = ARGS(0) & 0x04 ? true : false; m_set_blend_mrt3 = ARGS(0) & 0x08 ? true : false; + break; } - break; case NV4097_SET_BLEND_FUNC_SFACTOR: { - const u32 value = ARGS(0); m_set_blend_sfactor = true; - m_blend_sfactor_rgb = value & 0xffff; - m_blend_sfactor_alpha = value >> 16; + m_blend_sfactor_rgb = ARGS(0) & 0xffff; + m_blend_sfactor_alpha = ARGS(0) >> 16; if (count == 2) { - const u32 value1 = ARGS(1); - m_blend_dfactor_rgb = value1 & 0xffff; - m_blend_dfactor_alpha = value1 >> 16; - BlendFuncSeparate(m_blend_sfactor_rgb, m_blend_dfactor_rgb, m_blend_sfactor_alpha, m_blend_dfactor_alpha); + m_set_blend_dfactor = true; + m_blend_dfactor_rgb = ARGS(1) & 0xffff; + m_blend_dfactor_alpha = ARGS(1) >> 16; } + break; } - break; case NV4097_SET_BLEND_FUNC_DFACTOR: { - const u32 value = ARGS(0); - m_blend_dfactor_rgb = value & 0xffff; - m_blend_dfactor_alpha = value >> 16; - - if (m_set_blend_sfactor) - { - BlendFuncSeparate(m_blend_sfactor_rgb, m_blend_dfactor_rgb, m_blend_sfactor_alpha, m_blend_dfactor_alpha); - } + m_set_blend_dfactor = true; + m_blend_dfactor_rgb = ARGS(0) & 0xffff; + m_blend_dfactor_alpha = ARGS(0) >> 16; + break; } - break; case NV4097_SET_BLEND_COLOR: { - const u32 value = ARGS(0); - BlendColor(value & 0xff, (value >> 8) & 0xff, (value >> 16) & 0xff, (value >> 24) & 0xff); + m_set_blend_color = true; + m_blend_color_r = ARGS(0) & 0xff; + m_blend_color_g = (ARGS(0) >> 8) & 0xff; + m_blend_color_b = (ARGS(0) >> 16) & 0xff; + m_blend_color_a = (ARGS(0) >> 24) & 0xff; + break; } - break; case NV4097_SET_BLEND_COLOR2: { @@ -670,15 +659,16 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const { LOG_WARNING(RSX, "TODO : NV4097_SET_BLEND_COLOR2: 0x%x", value); } + break; } - break; case NV4097_SET_BLEND_EQUATION: { - const u32 value = ARGS(0); - BlendEquationSeparate(value & 0xffff, value >> 16); + m_set_blend_equation = true; + m_blend_equation_rgb = ARGS(0) & 0xffff; + m_blend_equation_alpha = ARGS(0) >> 16; + break; } - break; case NV4097_SET_REDUCE_DST_COLOR: { @@ -686,43 +676,37 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const { LOG_WARNING(RSX, "TODO: NV4097_SET_REDUCE_DST_COLOR: 0x%x", value); } + break; } - break; // Depth bound testing case NV4097_SET_DEPTH_BOUNDS_TEST_ENABLE: { - const u32 value = ARGS(0); - Enable(cmd, value); + m_set_depth_bounds_test = ARGS(0) ? true : false; + break; } - break; case NV4097_SET_DEPTH_BOUNDS_MIN: { - const u32 value = ARGS(0); m_set_depth_bounds = true; - m_depth_bounds_min = (float&)value; + const u32 a0 = ARGS(0); + m_depth_bounds_min = (float&)a0; if (count == 2) { - const u32 value1 = ARGS(1); - m_depth_bounds_max = (float&)value1; - DepthBoundsEXT(m_depth_bounds_min, m_depth_bounds_max); + const u32 a1 = ARGS(1); + m_depth_bounds_max = (float&)a1; } + break; } - break; case NV4097_SET_DEPTH_BOUNDS_MAX: { - const u32 value = ARGS(0); - m_depth_bounds_max = (float&)value; - - if (m_set_depth_bounds) - { - DepthBoundsEXT(m_depth_bounds_min, m_depth_bounds_max); - } + m_set_depth_bounds = true; + const u32 a0 = ARGS(0); + m_depth_bounds_max = (float&)a0; + break; } - break; // Viewport case NV4097_SET_VIEWPORT_HORIZONTAL: @@ -739,8 +723,8 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const } //LOG_NOTICE(RSX, "NV4097_SET_VIEWPORT_HORIZONTAL: x=%d, y=%d, w=%d, h=%d", m_viewport_x, m_viewport_y, m_viewport_w, m_viewport_h); + break; } - break; case NV4097_SET_VIEWPORT_VERTICAL: { @@ -749,124 +733,120 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const m_viewport_h = ARGS(0) >> 16; //LOG_NOTICE(RSX, "NV4097_SET_VIEWPORT_VERTICAL: y=%d, h=%d", m_viewport_y, m_viewport_h); + break; } - break; case NV4097_SET_VIEWPORT_SCALE: case NV4097_SET_VIEWPORT_OFFSET: { // Done in Vertex Shader + break; } - break; // Clipping case NV4097_SET_CLIP_MIN: { - const u32 value = ARGS(0); - m_clip_min = (float&)value; - DepthRangef(m_clip_min, m_clip_max); + const u32 a0 = ARGS(0); + const u32 a1 = ARGS(1); + + m_set_clip = true; + m_clip_min = (float&)a0; + m_clip_max = (float&)a1; + + //LOG_NOTICE(RSX, "NV4097_SET_CLIP_MIN: clip_min=%.01f, clip_max=%.01f", m_clip_min, m_clip_max); + break; } - break; case NV4097_SET_CLIP_MAX: { - const u32 value = ARGS(0); - m_clip_max = (float&)value; - DepthRangef(m_clip_min, m_clip_max); + const u32 a0 = ARGS(0); + + m_set_clip = true; + m_clip_max = (float&)a0; + + //LOG_NOTICE(RSX, "NV4097_SET_CLIP_MAX: clip_max=%.01f", m_clip_max); + break; } - break; // Depth testing case NV4097_SET_DEPTH_TEST_ENABLE: { - const u32 value = ARGS(0); - Enable(cmd, value); + m_set_depth_test = ARGS(0) ? true : false; + break; } - break; - + case NV4097_SET_DEPTH_FUNC: { - const u32 value = ARGS(0); - // Sanity check here for invalid depth func - if (value) - { - DepthFunc(value); - } + m_set_depth_func = true; + m_depth_func = ARGS(0); + break; } - break; case NV4097_SET_DEPTH_MASK: { - const u32 value = ARGS(0); - DepthMask(value); + m_set_depth_mask = true; + m_depth_mask = ARGS(0); + break; } - break; // Polygon mode/offset case NV4097_SET_FRONT_POLYGON_MODE: { - const u32 value = ARGS(0); - PolygonMode(cmd, value); + m_set_front_polygon_mode = true; + m_front_polygon_mode = ARGS(0); + break; } - break; case NV4097_SET_BACK_POLYGON_MODE: { - const u32 value = ARGS(0); - PolygonMode(cmd, value); + m_set_back_polygon_mode = true; + m_back_polygon_mode = ARGS(0); + break; } - break; - + case NV4097_SET_POLY_OFFSET_FILL_ENABLE: { - Enable(cmd, ARGS(0)); + m_set_poly_offset_fill = ARGS(0) ? true : false; + break; } - break; case NV4097_SET_POLY_OFFSET_LINE_ENABLE: { - const u32 value = ARGS(0); - Enable(cmd, value); + m_set_poly_offset_line = ARGS(0) ? true : false; + break; } - break; case NV4097_SET_POLY_OFFSET_POINT_ENABLE: { - const u32 value = ARGS(0); - Enable(cmd, value); + m_set_poly_offset_point = ARGS(0) ? true : false; + break; } - break; case NV4097_SET_POLYGON_OFFSET_SCALE_FACTOR: { - Enable(NV4097_SET_DEPTH_TEST_ENABLE, 1); - - const u32 value = ARGS(0); + m_set_depth_test = true; m_set_poly_offset_mode = true; - m_poly_offset_scale_factor = (float&)value; + + const u32 a0 = ARGS(0); + m_poly_offset_scale_factor = (float&)a0; if (count == 2) { - const u32 value1 = ARGS(1); - m_poly_offset_bias = (float&)value1; - PolygonOffset(m_poly_offset_scale_factor, m_poly_offset_bias); + const u32 a1 = ARGS(1); + m_poly_offset_bias = (float&)a1; } + break; } - break; case NV4097_SET_POLYGON_OFFSET_BIAS: { - Enable(NV4097_SET_DEPTH_TEST_ENABLE, 1); + m_set_depth_test = true; + m_set_poly_offset_mode = true; - const u32 value = ARGS(0); - m_poly_offset_bias = (float&)value; - - if (m_set_poly_offset_mode) - { - PolygonOffset(m_poly_offset_scale_factor, m_poly_offset_bias); - } + const u32 a0 = ARGS(0); + m_poly_offset_bias = (float&)a0; + break; } - break; case NV4097_SET_CYLINDRICAL_WRAP: { @@ -874,8 +854,8 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const { LOG_WARNING(RSX, "TODO: NV4097_SET_CYLINDRICAL_WRAP: 0x%x", ARGS(0)); } + break; } - break; // Clearing case NV4097_CLEAR_ZCULL_SURFACE: @@ -886,33 +866,42 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const if (a0 & 0x02) m_clear_surface_s = m_clear_s; m_clear_surface_mask |= a0 & 0x3; + break; } - break; case NV4097_CLEAR_SURFACE: { - const u32 mask = ARGS(0); + const u32 a0 = ARGS(0); - ClearSurface(mask); + if (a0 & 0x01) m_clear_surface_z = m_clear_z; + if (a0 & 0x02) m_clear_surface_s = m_clear_s; + if (a0 & 0x10) m_clear_surface_color_r = m_clear_color_r; + if (a0 & 0x20) m_clear_surface_color_g = m_clear_color_g; + if (a0 & 0x40) m_clear_surface_color_b = m_clear_color_b; + if (a0 & 0x80) m_clear_surface_color_a = m_clear_color_a; + + m_clear_surface_mask = a0; + ExecCMD(NV4097_CLEAR_SURFACE); + break; } - break; case NV4097_SET_ZSTENCIL_CLEAR_VALUE: { - const u32 value = ARGS(0); - - ClearStencil(value & 0xff); - ClearDepth(value >> 8); + const u32 a0 = ARGS(0); + m_clear_s = a0 & 0xff; + m_clear_z = a0 >> 8; + break; } - break; case NV4097_SET_COLOR_CLEAR_VALUE: { const u32 color = ARGS(0); - - ClearColor((color >> 24) & 0xff, (color >> 16) & 0xff, (color >> 8) & 0xff, color & 0xff); + m_clear_color_a = (color >> 24) & 0xff; + m_clear_color_r = (color >> 16) & 0xff; + m_clear_color_g = (color >> 8) & 0xff; + m_clear_color_b = color & 0xff; + break; } - break; case NV4097_SET_CLEAR_RECT_HORIZONTAL: { @@ -920,8 +909,8 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const { LOG_WARNING(RSX, "TODO: NV4097_SET_CLEAR_RECT_HORIZONTAL: 0x%x", value); } + break; } - break; case NV4097_SET_CLEAR_RECT_VERTICAL: { @@ -929,8 +918,8 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const { LOG_WARNING(RSX, "TODO: NV4097_SET_CLEAR_RECT_VERTICAL: 0x%x", value); } + break; } - break; // Arrays case NV4097_INLINE_ARRAY: @@ -939,12 +928,12 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const { LOG_WARNING(RSX, "TODO: NNV4097_INLINE_ARRAY: 0x%x", value); } + break; } - break; case NV4097_DRAW_ARRAYS: { - for (u32 c=0; c> 4; + break; } - break; case NV4097_DRAW_INDEX_ARRAY: { @@ -985,24 +974,24 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const u32 index; switch(m_indexed_array.m_type) { - case 0: - { - int pos = (int)m_indexed_array.m_data.size(); - m_indexed_array.m_data.resize(m_indexed_array.m_data.size() + 4); - index = vm::read32(m_indexed_array.m_addr + i * 4); - *(u32*)&m_indexed_array.m_data[pos] = index; - //LOG_WARNING(RSX, "index 4: %d", *(u32*)&m_indexed_array.m_data[pos]); - } + case 0: + { + int pos = (int)m_indexed_array.m_data.size(); + m_indexed_array.m_data.resize(m_indexed_array.m_data.size() + 4); + index = vm::read32(m_indexed_array.m_addr + i * 4); + *(u32*)&m_indexed_array.m_data[pos] = index; + //LOG_WARNING(RSX, "index 4: %d", *(u32*)&m_indexed_array.m_data[pos]); + } break; - case 1: - { - int pos = (int)m_indexed_array.m_data.size(); - m_indexed_array.m_data.resize(m_indexed_array.m_data.size() + 2); - index = vm::read16(m_indexed_array.m_addr + i * 2); - //LOG_WARNING(RSX, "index 2: %d", index); - *(u16*)&m_indexed_array.m_data[pos] = index; - } + case 1: + { + int pos = (int)m_indexed_array.m_data.size(); + m_indexed_array.m_data.resize(m_indexed_array.m_data.size() + 2); + index = vm::read16(m_indexed_array.m_addr + i * 2); + //LOG_WARNING(RSX, "index 2: %d", index); + *(u16*)&m_indexed_array.m_data[pos] = index; + } break; } @@ -1012,27 +1001,27 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const m_indexed_array.m_count += _count; } + break; } - break; case NV4097_SET_VERTEX_DATA_BASE_OFFSET: { m_vertex_data_base_offset = ARGS(0); - if (count >= 2) + if (count >= 2) { m_vertex_data_base_index = ARGS(1); } //LOG_WARNING(RSX, "NV4097_SET_VERTEX_DATA_BASE_OFFSET: 0x%x", m_vertex_data_base_offset); + break; } - break; case NV4097_SET_VERTEX_DATA_BASE_INDEX: { m_vertex_data_base_index = ARGS(0); + break; } - break; case NV4097_SET_BEGIN_END: { @@ -1068,8 +1057,8 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const { End(); } + break; } - break; // Shader case NV4097_SET_SHADER_PROGRAM: @@ -1080,21 +1069,21 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const m_cur_fragment_prog->offset = a0 & ~0x3; m_cur_fragment_prog->addr = GetAddress(m_cur_fragment_prog->offset, (a0 & 0x3) - 1); m_cur_fragment_prog->ctrl = 0x40; + break; } - break; case NV4097_SET_SHADER_CONTROL: { m_shader_ctrl = ARGS(0); + break; } - break; case NV4097_SET_SHADE_MODE: { - const u32 value = ARGS(0); - ShadeModel(value); + m_set_shade_mode = true; + m_shade_mode = ARGS(0); + break; } - break; case NV4097_SET_SHADER_PACKER: { @@ -1110,8 +1099,8 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const m_shader_window_height = a0 & 0xfff; m_shader_window_origin = (a0 >> 12) & 0xf; m_shader_window_pixel_centers = a0 >> 16; + break; } - break; // Transform case NV4097_SET_TRANSFORM_PROGRAM_LOAD: @@ -1129,20 +1118,20 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const LOG_WARNING(RSX, "NV4097_SET_TRANSFORM_PROGRAM_LOAD: start = %d", start); } } + break; } - break; case NV4097_SET_TRANSFORM_PROGRAM_START: { const u32 start = ARGS(0); - if (start) + if (start) { LOG_WARNING(RSX, "NV4097_SET_TRANSFORM_PROGRAM_START: start = %d", start); } + break; } - break; - case_range(32, NV4097_SET_TRANSFORM_PROGRAM, 4) + case_range(32, NV4097_SET_TRANSFORM_PROGRAM, 4); { //LOG_WARNING(RSX, "NV4097_SET_TRANSFORM_PROGRAM[%d](%d)", index, count); @@ -1156,11 +1145,11 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const { m_cur_vertex_prog->data.push_back(ARGS(i)); } + break; } - break; case NV4097_SET_TRANSFORM_TIMEOUT: - + { // TODO: // (cmd)[1] = CELL_GCM_ENDIAN_SWAP((count) | ((registerCount) << 16)); \ @@ -1171,7 +1160,8 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const } //m_cur_vertex_prog->Decompile(); - break; + break; + } case NV4097_SET_TRANSFORM_BRANCH_BITS: { @@ -1179,8 +1169,8 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const { LOG_WARNING(RSX, "TODO: NV4097_SET_TRANSFORM_BRANCH_BITS: 0x%x", value); } + break; } - break; case NV4097_SET_TRANSFORM_CONSTANT_LOAD: { @@ -1203,8 +1193,8 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const //LOG_NOTICE(RSX, "NV4097_SET_TRANSFORM_CONSTANT_LOAD: [%d : %d] = (%f, %f, %f, %f)", i, id, c.x, c.y, c.z, c.w); } + break; } - break; // Invalidation case NV4097_INVALIDATE_L2: @@ -1213,20 +1203,20 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const { LOG_WARNING(RSX, "TODO: NV4097_INVALIDATE_L2: 0x%x", value); } + break; } - break; case NV4097_INVALIDATE_VERTEX_CACHE_FILE: { // Nothing to do here + break; } - break; case NV4097_INVALIDATE_VERTEX_FILE: { // Nothing to do here + break; } - break; case NV4097_INVALIDATE_ZCULL: { @@ -1234,190 +1224,165 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const { LOG_WARNING(RSX, "TODO: NV4097_INVALIDATE_ZCULL: 0x%x", value); } + break; } - break; // Logic Ops case NV4097_SET_LOGIC_OP_ENABLE: { - const u32 value = ARGS(0); - Enable(cmd, value); + m_set_logic_op = ARGS(0) ? true : false; + break; } - break; case NV4097_SET_LOGIC_OP: { - const u32 value = ARGS(0); - LogicOp(value); + m_logic_op = ARGS(0); + break; } - break; - + // Dithering case NV4097_SET_DITHER_ENABLE: { - const u32 value = ARGS(0); - Enable(cmd, value); + m_set_dither = ARGS(0) ? true : false; + break; } - break; // Stencil testing case NV4097_SET_STENCIL_TEST_ENABLE: { - const u32 value = ARGS(0); - Enable(cmd, ARGS(0)); + m_set_stencil_test = ARGS(0) ? true : false; + break; } - break; case NV4097_SET_TWO_SIDED_STENCIL_TEST_ENABLE: { - const u32 value = ARGS(0); - Enable(cmd, ARGS(0)); + m_set_two_sided_stencil_test_enable = ARGS(0) ? true : false; + break; } - break; case NV4097_SET_TWO_SIDE_LIGHT_EN: { - const u32 value = ARGS(0); - LightModeli(value); + m_set_two_side_light_enable = ARGS(0) ? true : false; + break; } - break; case NV4097_SET_STENCIL_MASK: { - const u32 value = ARGS(0); m_set_stencil_mask = true; - StencilMask(value); + m_stencil_mask = ARGS(0); + break; } - break; case NV4097_SET_STENCIL_FUNC: { - if (count == 3) + m_set_stencil_func = true; + m_stencil_func = ARGS(0); + + if (count >= 2) { - m_set_stencil_func = true; - m_stencil_func = ARGS(0); + m_set_stencil_func_ref = true; m_stencil_func_ref = ARGS(1); - m_stencil_func_mask = ARGS(2); - StencilFunc(m_stencil_func, m_stencil_func_ref, m_stencil_func_mask); + + if (count >= 3) + { + m_set_stencil_func_mask = true; + m_stencil_func_mask = ARGS(2); + } } + break; } - break; case NV4097_SET_STENCIL_FUNC_REF: { + m_set_stencil_func_ref = true; m_stencil_func_ref = ARGS(0); - - if (m_set_stencil_func) - { - StencilFunc(m_stencil_func, m_stencil_func_ref, m_stencil_func_mask); - } + break; } - break; case NV4097_SET_STENCIL_FUNC_MASK: { + m_set_stencil_func_mask = true; m_stencil_func_mask = ARGS(0); - - if (m_set_stencil_func) - { - StencilFunc(m_stencil_func, m_stencil_func_ref, m_stencil_func_mask); - } + break; } - break; case NV4097_SET_STENCIL_OP_FAIL: { - if (count == 3) + m_set_stencil_fail = true; + m_stencil_fail = ARGS(0); + + if (count >= 2) { - m_set_stencil_op_fail = true; - m_stencil_fail = ARGS(0); + m_set_stencil_zfail = true; m_stencil_zfail = ARGS(1); - m_stencil_zpass = ARGS(2); - StencilOp(m_stencil_fail, m_stencil_zfail, m_stencil_zpass); + + if (count >= 3) + { + m_set_stencil_zpass = true; + m_stencil_zpass = ARGS(2); + } } + break; } - break; case NV4097_SET_BACK_STENCIL_MASK: { + m_set_back_stencil_mask = true; m_back_stencil_mask = ARGS(0); - - StencilMaskSeparate(0, m_back_stencil_mask); // GL_BACK - - if (m_set_stencil_mask) - { - StencilMaskSeparate(1, m_stencil_mask); // GL_FRONT - } + break; } - break; case NV4097_SET_BACK_STENCIL_FUNC: { - if (count == 3) + m_set_back_stencil_func = true; + m_back_stencil_func = ARGS(0); + + if (count >= 2) { - m_set_back_stencil_func = true; - m_back_stencil_func = ARGS(0); + m_set_back_stencil_func_ref = true; m_back_stencil_func_ref = ARGS(1); - m_back_stencil_func_mask = ARGS(2); - StencilFuncSeparate(0, m_back_stencil_func, m_back_stencil_func_ref, m_back_stencil_func_mask); // GL_BACK - if (m_set_stencil_func) + + if (count >= 3) { - StencilFuncSeparate(1, m_stencil_func, m_stencil_func_ref, m_stencil_func_mask); // GL_FRONT + m_set_back_stencil_func_mask = true; + m_back_stencil_func_mask = ARGS(2); } } + break; } - break; case NV4097_SET_BACK_STENCIL_FUNC_REF: { + m_set_back_stencil_func_ref = true; m_back_stencil_func_ref = ARGS(0); - - if (m_set_back_stencil_func) - { - StencilFuncSeparate(0, m_back_stencil_func, m_back_stencil_func_ref, m_back_stencil_func_mask); // GL_BACK - - if (m_set_stencil_func) - { - StencilFuncSeparate(1, m_stencil_func, m_stencil_func_ref, m_stencil_func_mask); // GL_FRONT - } - } - + break; } - break; case NV4097_SET_BACK_STENCIL_FUNC_MASK: { + m_set_back_stencil_func_mask = true; m_back_stencil_func_mask = ARGS(0); - - if (m_set_back_stencil_func) - { - StencilFuncSeparate(0, m_back_stencil_func, m_back_stencil_func_ref, m_back_stencil_func_mask); // GL_BACK - - if (m_set_stencil_func) - { - StencilFuncSeparate(1, m_stencil_func, m_stencil_func_ref, m_stencil_func_mask); // GL_FRONT - } - } + break; } - break; case NV4097_SET_BACK_STENCIL_OP_FAIL: { - if (count == 3) - { - m_back_stencil_fail = ARGS(0); - m_back_stencil_zfail = ARGS(1); - m_back_stencil_zpass = ARGS(2); - StencilOpSeparate(0, m_back_stencil_fail, m_back_stencil_zfail, m_back_stencil_zpass); // GL_BACK + m_set_stencil_fail = true; + m_stencil_fail = ARGS(0); - if (m_set_stencil_op_fail) + if (count >= 2) + { + m_set_back_stencil_zfail = true; + m_back_stencil_zfail = ARGS(1); + + if (count >= 3) { - StencilOpSeparate(1, m_stencil_fail, m_stencil_zfail, m_stencil_zpass); // GL_FRONT + m_set_back_stencil_zpass = true; + m_back_stencil_zpass = ARGS(2); } } - + break; } - break; case NV4097_SET_SCULL_CONTROL: { @@ -1425,31 +1390,30 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const { LOG_WARNING(RSX, "TODO: NV4097_SET_SCULL_CONTROL: 0x%x", value); } + break; } - break; // Primitive restart index case NV4097_SET_RESTART_INDEX_ENABLE: { - const u32 value = ARGS(0); - Enable(cmd, value); + m_set_restart_index = ARGS(0) ? true : false; + break; } - break; case NV4097_SET_RESTART_INDEX: { - const u32 value = ARGS(0); - PrimitiveRestartIndex(value); + m_restart_index = ARGS(0); + break; } - break; // Point size case NV4097_SET_POINT_SIZE: { - const u32 value = ARGS(0); - PointSize((float&)value); + m_set_point_size = true; + const u32 a0 = ARGS(0); + m_point_size = (float&)a0; + break; } - break; // Point sprite case NV4097_SET_POINT_PARAMS_ENABLE: @@ -1458,57 +1422,48 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const { LOG_WARNING(RSX, "TODO: NV4097_SET_POINT_PARAMS_ENABLE: 0x%x", value); } + break; } - break; case NV4097_SET_POINT_SPRITE_CONTROL: { - const u32 value = ARGS(0); - Enable(cmd, value); + m_set_point_sprite_control = ARGS(0) ? true : false; // TODO: //(cmd)[1] = CELL_GCM_ENDIAN_SWAP((enable) | ((rmode) << 1) | (texcoordMask)); + break; } - break; // Lighting case NV4097_SET_SPECULAR_ENABLE: { - const u32 value = ARGS(0); - Enable(cmd, value); + m_set_specular = ARGS(0) ? true : false; + break; } - break; // Scissor case NV4097_SET_SCISSOR_HORIZONTAL: { - const u32 value = ARGS(0); m_set_scissor_horizontal = true; - m_scissor_x = value & 0xffff; - m_scissor_w = value >> 16; + m_scissor_x = ARGS(0) & 0xffff; + m_scissor_w = ARGS(0) >> 16; if (count == 2) { - const u32 value1 = ARGS(1); - m_scissor_y = value1 & 0xffff; - m_scissor_h = value1 >> 16; - Scissor(m_scissor_x, m_scissor_y, m_scissor_w, m_scissor_h); + m_set_scissor_vertical = true; + m_scissor_y = ARGS(1) & 0xffff; + m_scissor_h = ARGS(1) >> 16; } + break; } - break; case NV4097_SET_SCISSOR_VERTICAL: { - const u32 value = ARGS(0); - m_scissor_y = value & 0xffff; - m_scissor_h = value >> 16; - - if (m_set_scissor_horizontal) - { - Scissor(m_scissor_x, m_scissor_y, m_scissor_w, m_scissor_h); - } + m_set_scissor_vertical = true; + m_scissor_y = ARGS(0) & 0xffff; + m_scissor_h = ARGS(0) >> 16; + break; } - break; // Depth/Color buffer usage case NV4097_SET_SURFACE_FORMAT: @@ -1536,56 +1491,56 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const m_height = buffers[m_gcm_current_buffer].height; NativeRescale((float)m_width, (float)m_height); + break; } - break; case NV4097_SET_SURFACE_COLOR_TARGET: { m_surface_color_target = ARGS(0); + break; } - break; case NV4097_SET_SURFACE_COLOR_AOFFSET: { m_surface_offset_a = ARGS(0); + break; } - break; case NV4097_SET_SURFACE_COLOR_BOFFSET: { m_surface_offset_b = ARGS(0); + break; } - break; case NV4097_SET_SURFACE_COLOR_COFFSET: { m_surface_offset_c = ARGS(0); + break; } - break; case NV4097_SET_SURFACE_COLOR_DOFFSET: { m_surface_offset_d = ARGS(0); + break; } - break; case NV4097_SET_SURFACE_ZETA_OFFSET: { m_surface_offset_z = ARGS(0); + break; } - break; case NV4097_SET_SURFACE_PITCH_A: { m_surface_pitch_a = ARGS(0); + break; } - break; case NV4097_SET_SURFACE_PITCH_B: { m_surface_pitch_b = ARGS(0); + break; } - break; case NV4097_SET_SURFACE_PITCH_C: { @@ -1599,8 +1554,8 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const m_surface_pitch_d = ARGS(1); m_surface_offset_c = ARGS(2); m_surface_offset_d = ARGS(3); + break; } - break; case NV4097_SET_SURFACE_PITCH_D: { @@ -1611,8 +1566,8 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const LOG_ERROR(RSX, "NV4097_SET_SURFACE_PITCH_D: Bad count (%d)", count); break; } + break; } - break; case NV4097_SET_SURFACE_PITCH_Z: { @@ -1623,8 +1578,8 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const LOG_ERROR(RSX, "NV4097_SET_SURFACE_PITCH_Z: Bad count (%d)", count); break; } + break; } - break; case NV4097_SET_CONTEXT_DMA_COLOR_A: { @@ -1636,15 +1591,15 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const LOG_ERROR(RSX, "NV4097_SET_CONTEXT_DMA_COLOR_A: Bad count (%d)", count); break; } + break; } - break; case NV4097_SET_CONTEXT_DMA_COLOR_B: { m_set_context_dma_color_b = true; m_context_dma_color_b = ARGS(0); + break; } - break; case NV4097_SET_CONTEXT_DMA_COLOR_C: { @@ -1656,8 +1611,8 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const m_set_context_dma_color_d = true; m_context_dma_color_d = ARGS(1); } + break; } - break; case NV4097_SET_CONTEXT_DMA_COLOR_D: { @@ -1665,15 +1620,15 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const { LOG_WARNING(RSX, "TODO: NV4097_SET_CONTEXT_DMA_COLOR_D: 0x%x", ARGS(0)); } + break; } - break; case NV4097_SET_CONTEXT_DMA_ZETA: { m_set_context_dma_z = true; m_context_dma_z = ARGS(0); + break; } - break; case NV4097_SET_CONTEXT_DMA_SEMAPHORE: { @@ -1681,8 +1636,8 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const { LOG_WARNING(RSX, "TODO: NV4097_SET_CONTEXT_DMA_SEMAPHORE: 0x%x", value); } + break; } - break; case NV4097_SET_CONTEXT_DMA_NOTIFIES: { @@ -1690,8 +1645,8 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const { LOG_WARNING(RSX, "TODO: NV4097_SET_CONTEXT_DMA_NOTIFIES: 0x%x", value); } + break; } - break; case NV4097_SET_SURFACE_CLIP_HORIZONTAL: { @@ -1708,8 +1663,8 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const m_surface_clip_y = a1; m_surface_clip_h = a1 >> 16; } + break; } - break; case NV4097_SET_SURFACE_CLIP_VERTICAL: { @@ -1717,8 +1672,8 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const m_set_surface_clip_vertical = true; m_surface_clip_y = a0; m_surface_clip_h = a0 >> 16; + break; } - break; // Anti-aliasing case NV4097_SET_ANTI_ALIASING_CONTROL: @@ -1729,78 +1684,76 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const const u8 alphaToCoverage = (a0 >> 4) & 0xf; const u8 alphaToOne = (a0 >> 8) & 0xf; const u16 sampleMask = a0 >> 16; - + if (a0) { LOG_WARNING(RSX, "TODO: NV4097_SET_ANTI_ALIASING_CONTROL: 0x%x", a0); } + break; } - break; // Line/Polygon smoothing case NV4097_SET_LINE_SMOOTH_ENABLE: { - const u32 value = ARGS(0); - Enable(cmd, value); + m_set_line_smooth = ARGS(0) ? true : false; + break; } - break; case NV4097_SET_POLY_SMOOTH_ENABLE: { - const u32 value = ARGS(0); - Enable(cmd, value); + m_set_poly_smooth = ARGS(0) ? true : false; + break; } - break; // Line width case NV4097_SET_LINE_WIDTH: { - const u32 value = ARGS(0); - LineWidth((float)value / 8.0f); + m_set_line_width = true; + const u32 a0 = ARGS(0); + m_line_width = (float)a0 / 8.0f; + break; } - break; // Line/Polygon stipple case NV4097_SET_LINE_STIPPLE: { - const u32 value = ARGS(0); - Enable(cmd, value); + m_set_line_stipple = ARGS(0) ? true : false; + break; } - break; case NV4097_SET_LINE_STIPPLE_PATTERN: { - const u32 value = ARGS(0); - LineStipple(value & 0xffff, value >> 16); + m_set_line_stipple = true; + const u32 a0 = ARGS(0); + m_line_stipple_factor = a0 & 0xffff; + m_line_stipple_pattern = a0 >> 16; + break; } - break; case NV4097_SET_POLYGON_STIPPLE: { - const u32 value = ARGS(0); - Enable(cmd, value); + m_set_polygon_stipple = ARGS(0) ? true : false; + break; } - break; case NV4097_SET_POLYGON_STIPPLE_PATTERN: { - u32 pattern[32]; for (u32 i = 0; i < 32; i++) { - pattern[i] = ARGS(i); - PolygonStipple(pattern[i]); + m_polygon_stipple_pattern[i] = ARGS(i); } + break; } - break; // Zcull case NV4097_SET_ZCULL_EN: { - const u32 value = ARGS(0); - Enable(NV4097_SET_DEPTH_TEST_ENABLE, value & 0x1); - Enable(NV4097_SET_STENCIL_TEST_ENABLE, value & 0x2); + const u32 a0 = ARGS(0); + + m_set_depth_test = a0 & 0x1 ? true : false; + m_set_stencil_test = a0 & 0x2 ? true : false; + break; } - break; case NV4097_SET_ZCULL_CONTROL0: { @@ -1808,17 +1761,17 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const { LOG_WARNING(RSX, "TODO: NV4097_SET_ZCULL_CONTROL0: 0x%x", value); } + break; } - break; - + case NV4097_SET_ZCULL_CONTROL1: { if (u32 value = ARGS(0)) { LOG_WARNING(RSX, "TODO: NV4097_SET_ZCULL_CONTROL1: 0x%x", value); } + break; } - break; case NV4097_SET_ZCULL_STATS_ENABLE: { @@ -1826,8 +1779,8 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const { LOG_WARNING(RSX, "TODO: NV4097_SET_ZCULL_STATS_ENABLE: 0x%x", value); } + break; } - break; case NV4097_ZCULL_SYNC: { @@ -1835,8 +1788,8 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const { LOG_WARNING(RSX, "TODO: NV4097_ZCULL_SYNC: 0x%x", value); } + break; } - break; // Reports case NV4097_GET_REPORT: @@ -1855,12 +1808,12 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const case CELL_GCM_ZCULL_STATS3: value = 0; LOG_WARNING(RSX, "NV4097_GET_REPORT: Unimplemented type %d", type); - break; + break; default: value = 0; LOG_ERROR(RSX, "NV4097_GET_REPORT: Bad type %d", type); - break; + break; } // Get timestamp, and convert it from microseconds to nanoseconds @@ -1870,14 +1823,14 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const vm::write64(m_local_mem_addr + offset + 0x0, timestamp); vm::write32(m_local_mem_addr + offset + 0x8, value); vm::write32(m_local_mem_addr + offset + 0xc, 0); + break; } - break; case NV4097_CLEAR_REPORT_VALUE: { const u32 type = ARGS(0); - switch(type) + switch (type) { case CELL_GCM_ZPASS_PIXEL_CNT: LOG_WARNING(RSX, "TODO: NV4097_CLEAR_REPORT_VALUE: ZPASS_PIXEL_CNT"); @@ -1888,33 +1841,41 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const default: LOG_ERROR(RSX, "NV4097_CLEAR_REPORT_VALUE: Bad type: %d", type); break; - } + } + break; } - break; // Clip Plane case NV4097_SET_USER_CLIP_PLANE_CONTROL: { - const u32 value = ARGS(0); - Enable(cmd, value); + const u32 a0 = ARGS(0); + m_set_clip_plane = true; + m_clip_plane_0 = (a0 & 0xf) ? true : false; + m_clip_plane_1 = ((a0 >> 4)) & 0xf ? true : false; + m_clip_plane_2 = ((a0 >> 8)) & 0xf ? true : false; + m_clip_plane_3 = ((a0 >> 12)) & 0xf ? true : false; + m_clip_plane_4 = ((a0 >> 16)) & 0xf ? true : false; + m_clip_plane_5 = (a0 >> 20) ? true : false; + break; } - break; // Fog case NV4097_SET_FOG_MODE: { - const u32 value = ARGS(0); - Fogi(value); + m_set_fog_mode = true; + m_fog_mode = ARGS(0); + break; } - break; case NV4097_SET_FOG_PARAMS: { - const u32 start = ARGS(0); - const u32 end = ARGS(1); - Fogf((float&)start, (float&)end); + m_set_fog_params = true; + const u32 a0 = ARGS(0); + const u32 a1 = ARGS(1); + m_fog_param0 = (float&)a0; + m_fog_param1 = (float&)a1; + break; } - break; // Zmin_max case NV4097_SET_ZMIN_MAX_CONTROL: @@ -1924,8 +1885,8 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const const u8 cullIgnoreW = (ARGS(0) >> 8) & 0xf; LOG_WARNING(RSX, "TODO: NV4097_SET_ZMIN_MAX_CONTROL: cullNearFarEnable=%d, zclampEnable=%d, cullIgnoreW=%d", cullNearFarEnable, zclampEnable, cullIgnoreW); + break; } - break; case NV4097_SET_WINDOW_OFFSET: { @@ -1933,16 +1894,16 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const const u16 y = ARGS(0) >> 16; LOG_WARNING(RSX, "TODO: NV4097_SET_WINDOW_OFFSET: x=%d, y=%d", x, y); + break; } - break; case NV4097_SET_FREQUENCY_DIVIDER_OPERATION: { m_set_frequency_divider_operation = ARGS(0); - + LOG_WARNING(RSX, "TODO: NV4097_SET_FREQUENCY_DIVIDER_OPERATION: %d", m_set_frequency_divider_operation); + break; } - break; case NV4097_SET_RENDER_ENABLE: { @@ -1950,16 +1911,16 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const const u8 mode = ARGS(0) >> 24; LOG_WARNING(RSX, "TODO: NV4097_SET_RENDER_ENABLE: Offset=0x%06x, Mode=0x%x", offset, mode); + break; } - break; case NV4097_SET_ZPASS_PIXEL_COUNT_ENABLE: { const u32 enable = ARGS(0); LOG_WARNING(RSX, "TODO: NV4097_SET_ZPASS_PIXEL_COUNT_ENABLE: %d", enable); + break; } - break; // NV0039 case NV0039_SET_CONTEXT_DMA_BUFFER_IN: @@ -1968,8 +1929,8 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const const u32 dstContext = ARGS(1); m_context_dma_buffer_in_src = srcContext; m_context_dma_buffer_in_dst = dstContext; + break; } - break; case NV0039_OFFSET_IN: { @@ -1984,7 +1945,7 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const const u32 notify = ARGS(7); // The existing GCM commands use only the value 0x1 for inFormat and outFormat - if (inFormat != 0x01 || outFormat != 0x01) + if (inFormat != 0x01 || outFormat != 0x01) { LOG_ERROR(RSX, "NV0039_OFFSET_IN: Unsupported format: inFormat=%d, outFormat=%d", inFormat, outFormat); } @@ -1998,8 +1959,8 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const LOG_ERROR(RSX, "NV0039_OFFSET_IN: bad offset(in=0x%x, out=0x%x), pitch(in=0x%x, out=0x%x), line(len=0x%x, cnt=0x%x), fmt(in=0x%x, out=0x%x), notify=0x%x", inOffset, outOffset, inPitch, outPitch, lineLength, lineCount, inFormat, outFormat, notify); } + break; } - break; case NV0039_OFFSET_OUT: // [E : RSXThread]: TODO: unknown/illegal method [0x00002310](0x0) { @@ -2012,8 +1973,8 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const { LOG_ERROR(RSX, "TODO: NV0039_OFFSET_OUT: offset=0x%x", offset); } + break; } - break; case NV0039_PITCH_IN: { @@ -2021,8 +1982,8 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const { LOG_WARNING(RSX, "TODO: NV0039_PITCH_IN: 0x%x", value); } + break; } - break; case NV0039_BUFFER_NOTIFY: { @@ -2030,29 +1991,29 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const { LOG_WARNING(RSX, "TODO: NV0039_BUFFER_NOTIFY: 0x%x", value); } + break; } - break; // NV3062 case NV3062_SET_CONTEXT_DMA_IMAGE_DESTIN: { m_context_dma_img_dst = ARGS(0); + break; } - break; case NV3062_SET_OFFSET_DESTIN: { m_dst_offset = ARGS(0); + break; } - break; case NV3062_SET_COLOR_FORMAT: { m_color_format = ARGS(0); m_color_format_src_pitch = ARGS(1); m_color_format_dst_pitch = ARGS(1) >> 16; + break; } - break; // NV309E case NV309E_SET_CONTEXT_DMA_IMAGE: @@ -2061,8 +2022,8 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const { LOG_WARNING(RSX, "TODO: NV309E_SET_CONTEXT_DMA_IMAGE: 0x%x", value); } + break; } - break; case NV309E_SET_FORMAT: { @@ -2072,8 +2033,8 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const const u32 offset = ARGS(1); LOG_WARNING(RSX, "TODO: NV309E_SET_FORMAT: Format:0x%x, Width:%d, Height:%d, Offset:0x%x", format, width, height, offset); + break; } - break; // NV308A case NV308A_POINT: @@ -2081,8 +2042,8 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const const u32 a0 = ARGS(0); m_point_x = a0 & 0xffff; m_point_y = a0 >> 16; + break; } - break; case NV308A_COLOR: { @@ -2125,15 +2086,15 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const m_fragment_constants.push_back(c); //LOG_WARNING(RSX, "NV308A_COLOR: [%d]: %f, %f, %f, %f", c.id, c.x, c.y, c.z, c.w); + break; } - break; // NV3089 case NV3089_SET_CONTEXT_DMA_IMAGE: { m_context_dma_img_src = ARGS(0); + break; } - break; case NV3089_SET_CONTEXT_SURFACE: { @@ -2141,8 +2102,8 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const { LOG_ERROR(RSX, "NV3089_SET_CONTEXT_SURFACE: Unsupported surface (0x%x)", ARGS(0)); } + break; } - break; case NV3089_IMAGE_IN_SIZE: { @@ -2174,8 +2135,8 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const //(u32&)pixels_dst[dst_offset] = (u32&)pixels_src[src_offset]; } } + break; } - break; case NV3089_SET_COLOR_CONVERSION: { @@ -2194,8 +2155,8 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const m_color_conv_dtdy = ARGS(8); LOG_WARNING(RSX, "TODO: NV3089_SET_COLOR_CONVERSION"); + break; } - break; case GCM_SET_USER_COMMAND: { @@ -2205,8 +2166,8 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const { cb(CPU, cause); }); + break; } - break; // Note: What is this? NV4097 offsets? case 0x000002c8: @@ -2216,7 +2177,7 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const case 0x000002e8: case 0x000002f0: case 0x000002f8: - break; + break; // The existing GCM commands don't use any of the following NV4097 / NV0039 / NV3062 / NV309E / NV308A / NV3089 methods case NV4097_SET_WINDOW_CLIP_TYPE: @@ -2224,8 +2185,8 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const case NV4097_SET_WINDOW_CLIP_VERTICAL: { LOG_WARNING(RSX, "Unused NV4097 method 0x%x detected!", cmd); + break; } - break; case NV0039_SET_CONTEXT_DMA_BUFFER_OUT: case NV0039_PITCH_OUT: @@ -2236,8 +2197,8 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const case NV0039_SET_CONTEXT_DMA_NOTIFIES: { LOG_WARNING(RSX, "Unused NV0039 method 0x%x detected!", cmd); + break; } - break; case NV3062_SET_OBJECT: case NV3062_SET_CONTEXT_DMA_NOTIFIES: @@ -2246,8 +2207,8 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const case NV3062_SET_OFFSET_SOURCE: { LOG_WARNING(RSX, "Unused NV3062 method 0x%x detected!", cmd); + break; } - break; case NV308A_SET_OBJECT: case NV308A_SET_CONTEXT_DMA_NOTIFIES: @@ -2265,16 +2226,16 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const case NV308A_SIZE_IN: { LOG_WARNING(RSX, "Unused NV308A method 0x%x detected!", cmd); + break; } - break; case NV309E_SET_OBJECT: case NV309E_SET_CONTEXT_DMA_NOTIFIES: case NV309E_SET_OFFSET: { LOG_WARNING(RSX, "Unused NV309E method 0x%x detected!", cmd); + break; } - break; case NV3089_SET_OBJECT: case NV3089_SET_CONTEXT_DMA_NOTIFIES: @@ -2295,20 +2256,21 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const case NV3089_IMAGE_IN: { LOG_WARNING(RSX, "Unused NV3089 methods 0x%x detected!", cmd); + break; } - break; default: { std::string log = GetMethodName(cmd); log += "("; - for (u32 i=0; i lock(m_cs_main); - inc=1; + inc = 1; u32 get = m_ctrl->get.read_sync(); u32 put = m_ctrl->put.read_sync(); @@ -2405,12 +2367,12 @@ void RSXThread::Task() const u32 cmd = ReadIO32(get); const u32 count = (cmd >> 18) & 0x7ff; - + if (Ini.RSXLogging.GetValue()) { LOG_NOTICE(Log::RSX, "%s (cmd=0x%x)", GetMethodName(cmd & 0xffff).c_str(), cmd); } - + if (cmd & CELL_GCM_METHOD_FLAG_JUMP) { u32 offs = cmd & 0x1fffffff; @@ -2418,7 +2380,6 @@ void RSXThread::Task() m_ctrl->get.exchange(be_t::make(offs)); continue; } - if (cmd & CELL_GCM_METHOD_FLAG_CALL) { m_call_stack.push(get + 4); @@ -2427,7 +2388,6 @@ void RSXThread::Task() m_ctrl->get.exchange(be_t::make(offs)); continue; } - if (cmd == CELL_GCM_METHOD_FLAG_RETURN) { u32 get = m_call_stack.top(); @@ -2436,7 +2396,6 @@ void RSXThread::Task() m_ctrl->get.exchange(be_t::make(get)); continue; } - if (cmd & CELL_GCM_METHOD_FLAG_NON_INCREMENT) { //LOG_WARNING(RSX, "rsx non increment cmd! 0x%x", cmd); diff --git a/rpcs3/Emu/RSX/RSXThread.h b/rpcs3/Emu/RSX/RSXThread.h index c0f412f648..9732c8a418 100644 --- a/rpcs3/Emu/RSX/RSXThread.h +++ b/rpcs3/Emu/RSX/RSXThread.h @@ -90,7 +90,7 @@ struct RSXTransformConstant } }; -class RSXThread : public ThreadBase +class RSXThread : public ThreadBase { public: static const uint m_textures_count = 16; @@ -498,7 +498,7 @@ protected: m_front_face = 0x0901; // GL_CCW m_cull_face = 0x0405; // GL_BACK m_alpha_func = 0x0207; // GL_ALWAYS - m_alpha_ref = 0.0; + m_alpha_ref = 0.0f; m_logic_op = 0x1503; // GL_COPY m_shade_mode = 0x1D01; // GL_SMOOTH m_depth_mask = 1; @@ -523,7 +523,7 @@ protected: m_vertex_data_base_index = 0; // Construct Stipple Pattern - for (size_t i = 0; i < 32; i++) + for (size_t i = 0; i < 32; i++) { m_polygon_stipple_pattern[i] = 0xFFFFFFFF; } @@ -629,54 +629,20 @@ protected: u32 OutOfArgsCount(const uint x, const u32 cmd, const u32 count, const u32 args_addr); void DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const u32 count); void NativeRescale(float width, float height); - + virtual void OnInit() = 0; virtual void OnInitThread() = 0; virtual void OnExitThread() = 0; virtual void OnReset() = 0; virtual void ExecCMD() = 0; - virtual void Enable(u32 cmd, u32 enable) = 0; - virtual void ClearColor(u32 a, u32 r, u32 g, u32 b) = 0; - virtual void ClearStencil(u32 stencil) = 0; - virtual void ClearDepth(u32 depth) = 0; - virtual void ClearSurface(u32 mask) = 0; - virtual void ColorMask(bool a, bool r, bool g, bool b) = 0; - virtual void AlphaFunc(u32 func, float ref) = 0; - virtual void DepthFunc(u32 func) = 0; - virtual void DepthMask(u32 flag) = 0; - virtual void PolygonMode(u32 face, u32 mode) = 0; - virtual void PointSize(float size) = 0; - virtual void LogicOp(u32 opcode) = 0; - virtual void LineWidth(float width) = 0; - virtual void LineStipple(u16 factor, u16 pattern) = 0; - virtual void PolygonStipple(u32 pattern) = 0; - virtual void PrimitiveRestartIndex(u32 index) = 0; - virtual void CullFace(u32 mode) = 0; - virtual void FrontFace(u32 mode) = 0; - virtual void Fogi(u32 mode) = 0; - virtual void Fogf(float start, float end) = 0; - virtual void PolygonOffset(float factor, float bias) = 0; - virtual void DepthRangef(float min, float max) = 0; - virtual void BlendEquationSeparate(u16 rgb, u16 a) = 0; - virtual void BlendFuncSeparate(u16 srcRGB, u16 dstRGB, u16 srcAlpha, u16 dstAlpha) = 0; - virtual void BlendColor(u8 r, u8 g, u8 b, u8 a) = 0; - virtual void LightModeli(u32 enable) = 0; - virtual void ShadeModel(u32 mode) = 0; - virtual void DepthBoundsEXT(float min, float max) = 0; - virtual void Scissor(u16 x, u16 y, u16 width, u16 height) = 0; - virtual void StencilOp(u32 fail, u32 zfail, u32 zpass) = 0; - virtual void StencilMask(u32 mask) = 0; - virtual void StencilFunc(u32 func, u32 ref, u32 mask) = 0; - virtual void StencilOpSeparate(u32 mode, u32 fail, u32 zfail, u32 zpass) = 0; - virtual void StencilMaskSeparate(u32 mode, u32 mask) = 0; - virtual void StencilFuncSeparate(u32 mode, u32 func, u32 ref, u32 mask) = 0; + virtual void ExecCMD(u32 cmd) = 0; virtual void Flip() = 0; void LoadVertexData(u32 first, u32 count) { for (u32 i = 0; i < m_vertex_count; ++i) { - if(!m_vertex_data[i].IsEnabled()) continue; + if (!m_vertex_data[i].IsEnabled()) continue; m_vertex_data[i].Load(first, count, m_vertex_data_base_offset, m_vertex_data_base_index); }