From cd6f95c90d6e09d9ddbd7740f2234d5e3ce92a34 Mon Sep 17 00:00:00 2001 From: Nekotekina Date: Fri, 30 Jan 2015 13:48:12 +0300 Subject: [PATCH] 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