Commit graph

74 commits

Author SHA1 Message Date
Elad 575a245f8d
IDM: Implement lock-free smart pointers (#16403)
Replaces `std::shared_pointer` with `stx::atomic_ptr` and `stx::shared_ptr`.

Notes to programmers:

* This pr kills the use of `dynamic_cast`, `std::dynamic_pointer_cast` and `std::weak_ptr` on IDM objects, possible replacement is to save the object ID on the base object, then use idm::check/get_unlocked to the destination type via the saved ID which may be null. Null pointer check is how you can tell type mismatch (as dynamic cast) or object destruction (as weak_ptr locking).
* Double-inheritance on IDM objects should be used with care, `stx::shared_ptr` does not support constant-evaluated pointer offsetting to parent/child type.
* `idm::check/get_unlocked` can now be used anywhere.

Misc fixes:
* Fixes some segfaults with RPCN with interaction with IDM.
* Fix deadlocks in access violation handler due locking recursion.
* Fixes race condition in process exit-spawn on memory containers read.
* Fix bug that theoretically can prevent RPCS3 from booting - fix `id_manager::typeinfo` comparison to compare members instead of `memcmp` which can fail spuriously on padding bytes.
* Ensure all IDM inherited types of base, either has `id_base` or `id_type` defined locally, this allows to make getters such as `idm::get_unlocked<lv2_socket, lv2_socket_raw>()` which were broken before. (requires save-states invalidation)
* Removes broken operator[] overload of `stx::shared_ptr` and `stx::single_ptr` for non-array types.
2024-12-22 20:59:48 +02:00
Megamouse 0a57c459b6 overlays: add friends list to home menu 2024-10-06 09:57:20 +02:00
RipleyTom 3d9c8a670e Implement old matching API 2024-09-19 20:34:56 +02:00
Ninetime 7d84d084a4
Enable user to change country code (#15884) 2024-08-10 22:33:38 +02:00
Silent 9e094fded6 Do not set the data size in sceNpBasicGetEvent for SCE_NP_BASIC_EVENT_OFFLINE
There is no data associated with this event,
size is not supposed to be set.
2024-07-18 21:42:07 +03:00
RipleyTom 3e7ff4059e Add matching2 option handling 2024-05-16 22:38:11 +02:00
RipleyTom b7a882f42b Split normal sockets and p2p sockets handling v2 2024-05-08 20:04:23 +03:00
RipleyTom b38ce9452d Revert "Split normal sockets and p2p sockets handling"
This reverts commit 08c3a38b67.
2024-04-27 10:45:14 +02:00
RipleyTom 08c3a38b67 Split normal sockets and p2p sockets handling 2024-04-24 14:15:17 +03:00
Megamouse 59dc5dcd54 Update wolfssl to 5.7.0 2024-03-26 12:26:26 +01:00
RipleyTom 573734fab8 Send initial presence for offline friends. 2024-02-28 17:41:25 +01:00
RipleyTom 26d406fec3 RPCN 1.1 2024-02-05 09:44:29 +01:00
Megamouse 48f82c75c1 np: fix signed/unsigned warning
who the heck thought returning signed on a counter makes sense...
2024-02-03 17:59:19 +01:00
RipleyTom 319657e815 Review fixes 2024-02-03 08:45:29 +01:00
RipleyTom c589001dff Add player history 2024-02-03 08:45:29 +01:00
RipleyTom fe9a24a1b8
RPCN 1.0 (#15045) 2024-01-14 12:36:23 +01:00
RipleyTom 4c36b80300 Misc NP fixes 2024-01-13 15:44:28 +01:00
RipleyTom 236e32fb3d Fix weird cmp in np_handler.cpp 2024-01-09 23:06:23 +01:00
RipleyTom 485fca34b0 Misc NP fixes 2024-01-08 14:03:15 +01:00
RipleyTom 47ae192cf8 Impl sceNpBasicSendMessage 2024-01-07 13:36:27 +01:00
RipleyTom 0227b16d06 Fix sceNpBasicSetPresence when data is nullptr and size is 0 2024-01-05 22:34:52 +01:00
RipleyTom b6e9746198
RPCN 0.9 (#15002) 2024-01-05 09:43:26 +01:00
RipleyTom 03761c5dd4 rpcn 0.8 2023-12-29 19:22:49 +01:00
Eladash 40604f6076 Fixup np_handler ctor 2023-12-21 16:12:50 +02:00
Eladash 0c410f8a14 Postpone thread launching on g_fxo->init 2023-12-19 15:34:07 +02:00
Megamouse 16f869fe5a logging: minor trace optimizations 2023-06-15 19:48:15 +02:00
Megamouse d28e3c4f08 np_handler: fix warning: check socket in discover_ip_address 2023-06-13 18:08:51 +02:00
RipleyTom 195de818b6 Fix rpcn config reset 2023-05-06 19:48:40 +02:00
RipleyTom 02a53c582c Invite changes 2023-03-18 01:51:35 +01:00
Megamouse 1d7a00666e rpcn: throw exception when using rpcn features without a proper config 2023-03-03 11:30:39 +01:00
RipleyTom 1a00341e6b Forces local IP to bind address if set 2023-02-25 10:38:19 +01:00
RipleyTom 6186ac0245 rpcn: signaling handler improvements & upnp
Simplify signaling by making Matching2 a layer over normal signaling.
Implements UPNP port forwarding
Implement sceNpMatching2AbortRequest
Fix reported bw in sceNpUtil
Hack for Fat Princess binding udp on 3658
Reenable CB for sceNpBasicAddPlayersHistoryAsync
Misc fixes
2023-02-21 15:41:41 +01:00
Ani 0d929a210f
NP: Disable some logging (#13061) 2022-12-11 16:49:14 +00:00
Team XLink Developers b4757b514d
Add ability to have sockets bind to a local IP address (#12998) 2022-11-30 18:35:42 +03:00
Nekotekina 7c15001042 Implement read_from_ptr<>() util
Doing std::bit_cast on a "span".
Should be usable in constexpr.
2022-11-26 09:30:11 +03:00
RipleyTom 01c285fc4a RPCN v0.7
Bump protocol version
Improve signaling RTT calculation for client
Implement score game data functions
Various sceNpScore fixes
Verify flatbuffer buffers
Use std::variant for transaction specific data
2022-10-17 09:57:10 +02:00
RipleyTom eea73deab3 RPCN v0.6 2022-09-27 23:39:54 +03:00
Nekotekina 6ff6a4989a Implement at32() util
Works like .at() but uses source location for "exception".
2022-09-26 18:04:15 +03:00
Elad Ashkenazi fcd297ffb2
Savestates Support For PS3 Emulation (#10478) 2022-07-04 16:02:17 +03:00
RipleyTom e68ffdbc81 Add a message overlay 2022-05-23 08:38:02 +02:00
RipleyTom 2f9b930c6b Fix for ticket parsing 2022-05-11 19:03:54 +02:00
RipleyTom 4479d99a9a Implement sceNpManagerGetTicketParam 2022-05-10 21:04:15 +02:00
Nekotekina 580bd2b25e Initial Linux Aarch64 support
* Update asmjit dependency (aarch64 branch)
* Disable USE_DISCORD_RPC by default
* Dump some JIT objects in rpcs3 cache dir
* Add SIGILL handler for all platforms
* Fix resetting zeroing denormals in thread pool
* Refactor most v128:: utils into global gv_** functions
* Refactor PPU interpreter (incomplete), remove "precise"
* - Instruction specializations with multiple accuracy flags
* - Adjust calling convention for speed
* - Removed precise/fast setting, replaced with static
* - Started refactoring interpreters for building at runtime JIT
*   (I got tired of poor compiler optimizations)
* - Expose some accuracy settings (SAT, NJ, VNAN, FPCC)
* - Add exec_bytes PPU thread variable (akin to cycle count)
* PPU LLVM: fix VCTUXS+VCTSXS instruction NaN results
* SPU interpreter: remove "precise" for now (extremely non-portable)
* - As with PPU, settings changed to static/dynamic for interpreters.
* - Precise options will be implemented later
* Fix termination after fatal error dialog
2022-01-15 06:48:04 +03:00
RipleyTom b736691bde Special nullptr optParam->cbFunc case fix 2021-11-10 20:03:11 +01:00
RipleyTom c194804fec NP: Implement sceNpBasicGetFriendListEntry 2021-11-08 13:10:40 +03:00
RipleyTom d41e405420 NP: Cache Manager + improvements 2021-11-08 13:10:40 +03:00
RipleyTom 516cb959cb rpcn: new allocator + refactoring of np_handler 2021-11-08 13:10:40 +03:00
Nick Renieris b70f08d850 The Velocity Improvements: RoomData/RoomMemberData commands & fixes
modules/np2: Correct some SceNpMaching2 ptr type endianness
np/handler: Use STL .contains() method
Ignore USECRYPTO & USESIGNATURE in recvfrom/sendto
Implement RoomData/RoomMemberData commands
2021-11-08 13:10:40 +03:00
RipleyTom 962e140cea fix: cleanup basic handler in np term 2021-10-23 08:31:59 +02:00
RipleyTom 68fdc49528 Defaults to 127.0.0.1 when failing to discover IP 2021-10-13 08:17:29 +02:00