Commit graph

44 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
RipleyTom
9dd0b055d0 Fake sceNpMatching2GetLobbyInfoList 2024-09-26 21:12:10 +02:00
RipleyTom
3d9c8a670e Implement old matching API 2024-09-19 20:34:56 +02:00
RipleyTom
dd9b3c651f Support old sceNpScoreRankData 2024-07-18 18:29:49 +02:00
RipleyTom
3e7ff4059e Add matching2 option handling 2024-05-16 22:38:11 +02:00
RipleyTom
397c2698ae Fix sceNpScoreGetRankingByNpId 2024-03-12 09:36:31 +02:00
RipleyTom
26d406fec3 RPCN 1.1 2024-02-05 09:44:29 +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
Megamouse
3dbde04d18 sceNpCommerce: add init checks 2024-01-27 08:31:16 +01:00
RipleyTom
fe9a24a1b8
RPCN 1.0 (#15045) 2024-01-14 12:36:23 +01:00
RipleyTom
47ae192cf8 Impl sceNpBasicSendMessage 2024-01-07 13:36:27 +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
0c410f8a14 Postpone thread launching on g_fxo->init 2023-12-19 15:34:07 +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
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
Team XLink Developers
b4757b514d
Add ability to have sockets bind to a local IP address (#12998) 2022-11-30 18:35:42 +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
d1a7bb0136 Fix faulty GetScoreFriendsRequest 2022-09-28 21:58:11 +02:00
RipleyTom
eea73deab3 RPCN v0.6 2022-09-27 23:39:54 +03:00
Elad Ashkenazi
fcd297ffb2
Savestates Support For PS3 Emulation (#10478) 2022-07-04 16:02:17 +03:00
Megamouse
1e1b111678 sceNp: register custom menu 2022-05-13 21:52:14 +02:00
RipleyTom
4479d99a9a Implement sceNpManagerGetTicketParam 2022-05-10 21:04:15 +02:00
RipleyTom
dc0793b731 NP: Implement sceNpMatching2DeleteServerContext 2021-11-08 13:10:40 +03: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
68fdc49528 Defaults to 127.0.0.1 when failing to discover IP 2021-10-13 08:17:29 +02:00
RipleyTom
ea9dc9317d rpcn v0.4.0 2021-10-11 22:20:20 +02:00
Megamouse
f18e80e899 fix some warning spam 2021-05-29 08:17:30 +02:00
Megamouse
a16d8ba3ea More random changes 2021-04-11 14:01:51 +03:00
RipleyTom
67378c7dea Add CELL_NET_CTL_INFO_DHCP_HOSTNAME impl 2021-02-26 11:58:42 +03:00
RipleyTom
8be2a55ccc Add mutex lock for NP changes 2021-02-21 18:04:55 +03:00
Nekotekina
f944573b3c Fix old warnings: remove strncpy
Use strcpy_trunc instead.
Change some sce structs.
2021-01-20 12:26:09 +03:00
Nekotekina
a8e0d261b7 types.hpp: more cleanup
Also fix compilation.
2020-12-22 19:08:09 +03:00
Nekotekina
fb29933d3d Add usz alias for std::size_t 2020-12-18 12:23:53 +03:00
RipleyTom
a83df01bfd
rpcn 0.3.5 (#9227) 2020-11-10 08:55:49 +00:00
RipleyTom
9e14d240a8 Implement ethernet address determination 2020-10-16 22:53:48 +03:00
RipleyTom
10820fa135
Implement sceNpSignaling & signaling improvements (#8836) 2020-09-07 22:50:17 +01:00
RipleyTom
190822c2b2
RPCN Client (#8663) 2020-08-27 20:47:04 +01:00
RipleyTom
f1f5c91386
Fake PSN (#7516) 2020-03-04 13:55:35 +00:00