[WIP] np: Stub functionality for Simulated NP#16582
Draft
InvoxiPlayGames wants to merge 1 commit intoRPCS3:masterfrom
Draft
[WIP] np: Stub functionality for Simulated NP#16582InvoxiPlayGames wants to merge 1 commit intoRPCS3:masterfrom
InvoxiPlayGames wants to merge 1 commit intoRPCS3:masterfrom
Conversation
kd-11
reviewed
Jan 19, 2025
Contributor
kd-11
left a comment
There was a problem hiding this comment.
This looks like a textbook case for polymorphism.
Instead of mixing the code we should juat create a separate class with stubs for the implementation and register that instead.
Contributor
|
maybe this PR, if a dummy implementation will avoid the emulator throwing an exception, can be properly implemented by one of the main developers (e.g. galciv if I'm not wrong)? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
With the network mode set to "Simulated" for a game, almost any attempt to actually use NP functions results in the emulator throwing an exception from the game thread since RPCN tries to be accessed. Since if a game thinks it's connected it's probably going to use NP features, the game should at the very least not crash and be fed dummy data.
Since a full implementation would be a larger undertaking and might need codebase changes, I'm sending in as a draft for opinions on how it should be implemented. Currently it's just checking if the current PSN status isn't RPCN and then returning a fake response in the np_handler functions.
PR status: sceNpBasicGetBlockListEntryCount, sceNpBasicGetFriendListEntryCount and sceNpManagerRequestTicket2 no longer crash the guest (required for BLES01222), other functions (creating lobbies etc) probably do.