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

[NetResolver] Implement sceNetResolver library #18090

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

anr2me
Copy link
Collaborator

@anr2me anr2me commented Sep 7, 2023

Yet another rough and experimental implementation taken from my stashed codes.

It works on most of the games i tested, also used for the test builds at #14256
However, since it use dummy id (1), it can only support one resolver created at a time.
It also enforce synchronous resolving (i think), including for the Async syscalls, this will lower the chance for the game to create more than one resolver, as the game will delete it once the result are out.

Leaving this as a draft until i can work on it later, at least to get the id properly generated to support multiple resolvers (ie. for games/app with multi-threading).

PS: Should also move it to a separate file (ie. sceNetResolver.cpp) as the general sceNet.cpp will grow bigger with infrastructure being implemented later.

@anr2me
Copy link
Collaborator Author

anr2me commented Sep 10, 2023

As there are no information regarding the *Async syscalls i can find on the internet, will need to find out which games uses them first to be investigated.

@anr2me anr2me marked this pull request as ready for review September 10, 2023 23:36
Copy link
Owner

@hrydgard hrydgard left a comment

Choose a reason for hiding this comment

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

Looks alright to me, I'm happy to merge after the 1.16.x release process is completed.

@hrydgard
Copy link
Owner

Actually, might want to save the list of created resolvers in DoState, and restore them on load.

@anr2me
Copy link
Collaborator Author

anr2me commented Sep 18, 2023

I intentionally not to save it in case it need additional data to be stored in the NetResolver struct for the async version (may be used for the PollAsync syscall), but hopefully there is no additional data. So for now just simply reset it and let whatever the game were doing to fail after loading from save state (as most of the time the connection won't be resumeable anyway), until i can get more info related to async syscalls.

@anr2me
Copy link
Collaborator Author

anr2me commented Sep 18, 2023

Oops i forgot that loading a savestate won't trigger the init/shutdown functions.

anr2me and others added 3 commits December 20, 2023 07:35
Added more stub functions.
Report Once on some unimplemented syscalls to find out which games uses them.
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.

None yet

2 participants