Commit Graph

442 Commits

Author SHA1 Message Date
ANR2ME e79d3b8204 Fix Phantasy Star Portable 2 Timeout issue 2020-09-05 11:45:14 +07:00
ANR2ME 423a7b2391 Fix multiplayer on Valhalla Knights 2 2020-09-05 08:58:29 +07:00
ANR2ME c564e77b9f Fix AdhocMatching P2P Mode. This fix Bleach Heat the Soul 7 2020-09-04 16:08:07 +07:00
ANR2ME 170d313fa7 Minor changes to make sure the output struct/arg have similar value to the one from prx file (based on Kingdom Hearts BBS) 2020-09-04 13:09:46 +07:00
ANR2ME d3157205dd Don't allocate PSP's Memory during DoState 2020-09-04 13:09:45 +07:00
ANR2ME a05da1a8c5 Fix communication issue with Adhoc Server where ping to the Adhoc Server sometimes getting socket error 10053 and disconnected from Adhoc Server 2020-09-04 13:09:45 +07:00
ANR2ME 439171fc56 An attempt to reduce the lags/stutters during multiplayer caused by improper blocking behavior. 2020-09-04 13:09:44 +07:00
ANR2ME 6a9cf0f575 An attempt to differentiate adhoc connect, create, and join. 2020-09-04 13:09:44 +07:00
ANR2ME db3e7d80d9 Oops we already have local mac stored in context, no longer need to getLocalMac again 2020-09-04 08:35:40 +07:00
ANR2ME 5155925516 Fix connection issue on games using AdhocMatching due to sometimes events are removed prematurely before being processed. This fix Gran Turismo where some peers could permanently be in "busy data" state. 2020-09-04 02:39:00 +07:00
ANR2ME d99f55465e Fixed possible crash issue due to lingering leftover callback events from previous multiplayer session. 2020-09-04 02:39:00 +07:00
ANR2ME 7083342046 Avoid using hleLog during a Shutdown 2020-09-04 02:38:58 +07:00
ANR2ME 804dd07c93 An attempt to sort AdhocMatching Member List in order to make a consistent list on all players (based on Host). Also fixed some disconnection issue on other players when a player is leaving the room on Gran Turismo and Patapon 3. 2020-09-04 01:32:15 +07:00
ANR2ME 405863c579 An attempt to make PDP and PTP ID to be unique so they can be polled properly together without getting conflicted ID. This fixes Gran Turismo. 2020-09-03 05:27:51 +07:00
ANR2ME 577209752e An attempt to fix sceNetAdhocPollSocket to works properly. This fixes one of the multiplayer mode on Bleach Heat the Soul 7 2020-09-03 05:17:44 +07:00
ANR2ME 9c5f02fbf5 Default to P2P/Parent's MAC address if the target MAC on sceNetAdhocMatchingSendData is 00:00:00:00:00:00 (need to confirm whether this is correct or an error should be returned instead) 2020-09-02 21:17:38 +07:00
ANR2ME a76a5bdf56 Ignores the 1st byte of MAC address when comparing, since there might be games (ie. Gran Turismo) that tries to tamper/change the 1st byte during multiplayer upon use. 2020-09-02 21:17:38 +07:00
Henrik Rydgård ccc0331279 Move timeutil to Common. (Experiment to see how much work it is to move these). 2020-08-15 20:53:08 +02:00
ANR2ME 8dec09703f Moving reused adhoc function out of sceNet function to prevent getting extra SCENET log 2020-08-13 00:59:50 +07:00
Unknown W. Brackets b8342fb8ec SaveState: Rename ChunkFile files to Serialize.
Makes more sense and less weird than ChunkFileDoMap, etc.
2020-08-10 08:04:05 +00:00
Unknown W. Brackets 1dc5ee424b SaveState: Split out Do types to reduce headers. 2020-08-10 08:03:44 +00:00
Unknown W. Brackets 4b4e3432cd SaveState: Split Do() into a separate header. 2020-08-10 08:03:41 +00:00
Henrik Rydgård 914b6ce24c Merge pull request #13216 from ANR2ME/net_apctl_stuff
Added a fake thread to process Apctl Request Events into Apctl State Changes
2020-08-02 11:05:17 +02:00
ANR2ME 5de2707633 Fix crashes issue due to 0 is a valid index to types_, using invalid index like -1 should give a better/clearer stack trace 2020-08-02 14:02:49 +07:00
ANR2ME 8886291434 Save&Restore PSP Thread IDs to prevent using the wrong Thread ID after loading from save state, also making sure DoState have default value 2020-08-02 12:57:27 +07:00
ANR2ME 90ff382c59 Rearranged network's After PSPAction creation/registration so that newer one have higher value to prevent network's callbacks triggering the wrong after action after loading from old save state. 2020-08-02 08:49:58 +07:00
AdamN 1380c09cb8 Patapon 3 Fix (#13231)
* Showing returned error code in the logs to give more info on the exact error with so many error code variations.

* Fix an issue where players that got forcefully disconnected (ie. Resetting the game) are no longer recognized by the Host when trying to reJoin on Patapon 3

* Allows Optional data pointer to be non-zero/null even if Optional data Length is 0, since we're not even accessing the data if it's length is 0 anyway. TODO: Will need someone to confirm if this is really allowed or returning an error on a real PSP.

* Fix Identity issue on Patapon 3 where all players became Player1. This should also fix other games with similar issue.
2020-08-01 15:24:21 +02:00
ANR2ME f927ca795c Added a fake thread to process Apctl Request Events into Apctl State Changes 2020-07-29 02:27:39 +07:00
ANR2ME 30ea1087dd Attempt to fix an issue when the 3rd player joined causing problem to other players on Patapon 3 (this may also affects other games that use AdhocMatching) 2020-07-25 11:48:19 +07:00
ANR2ME 2f44495654 Added more info to AdhocMatching Logs to get a better insight 2020-07-25 11:48:18 +07:00
ANR2ME 87b712450f Locking before changing peer linked list order, just to be safe. 2020-07-24 14:46:40 +07:00
ANR2ME 581ba6c326 Added target/destination IP & port of sceNetAdhocPtpConnect in the log to get better insight 2020-07-24 08:28:42 +07:00
ANR2ME 5153b60637 Fix some logs text 2020-07-24 08:07:01 +07:00
ANR2ME c8ea017e8c Fix an issue where a player got disconnected when another player tries to join.
This should affects games that use AdhocMatching such as Patapon 3
2020-07-24 07:59:40 +07:00
ANR2ME a3b21b04ea Making mac2str function easier/cleaner/safer to use for logging purpose 2020-07-23 12:41:13 +02:00
ANR2ME bd36fdda0e Do UPnP stuff on it's own thread to prevent causing stutters/lags during multiplayer game due to blocking socket behavior on miniUPnP 2020-07-23 12:41:13 +02:00
ANR2ME d078a73278 Need to make sure already connected to Adhoc Server before Creating/Joining a group. (Fix GTA VCS failed to join a group and unable to see any room) 2020-07-23 12:09:39 +02:00
ANR2ME a0f0973462 Reconnect to Adhoc Server when disconnected while still having the AdhocCtl Inited (ie. due to timeout or network failure) so players doesn't need to reset the game to reconnect. 2020-07-23 12:09:28 +02:00
ANR2ME 6695001b94 Fix timeout comparison 2020-07-22 23:13:41 +02:00
ANR2ME df26845388 Minor fixes 2020-07-22 23:13:41 +02:00
ANR2ME 1d30a9efec Fix possible crash issue during Networking Cleanup 2020-07-22 23:13:41 +02:00
ANR2ME 65bc68609c Added an option to Disable Nagle Algorithm (Enable TCP No Delay) 2020-07-22 23:13:41 +02:00
ANR2ME b9025b50bd Added a UPnP option to use original port for external port instead of using the shifted port by port offset, to be compatible with real PSP or other PSP emulators 2020-07-22 23:13:41 +02:00
ANR2ME 3e2266e1c4 Making sure there are no warnings on adhoc code when building on android studio 2020-07-22 22:31:05 +02:00
ANR2ME 2ca6a4f0d7 Fixed GvG Next Plus, Phantasy Star Portable 2, and some minor changes 2020-07-22 22:22:59 +02:00
ANR2ME 8daf2ff66e Added UI to change WLAN Channel.
Currently Ridge Racer 2 doesn't works with Auto channel (TODO: Making sure sceUtilityGetSystemParamInt doesn't returns channel 0 when connected to a network for Ridge Racer 2 to works with Auto channel)
2020-07-22 16:46:39 +02:00
ANR2ME 33d3ac28de Added UPnP Support
Fix i18n type
2020-07-21 23:02:58 +02:00
ANR2ME 0d0ccf3b73 Making sure Adhoc codes doesn't have compilation warnings 2020-07-20 19:13:18 +02:00
ANR2ME b58f4a6e90 Enabling KeepAlive on sockets 2020-07-20 19:13:10 +02:00
ANR2ME c783aaf40d Increasing the extra delays on Adhoc's callbacks just to be on the safe side, also decreasing the default network's timeout to be noticed sooner 2020-07-20 19:13:05 +02:00