Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] np: Stub functionality for Simulated NP #16582

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

InvoxiPlayGames
Copy link
Contributor

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.

Copy link
Contributor

@kd-11 kd-11 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants