Skip to content

[NetResolver] Implement sceNetResolver library#18090

Closed
anr2me wants to merge 3 commits intohrydgard:masterfrom
anr2me:net_resolver
Closed

[NetResolver] Implement sceNetResolver library#18090
anr2me wants to merge 3 commits intohrydgard:masterfrom
anr2me:net_resolver

Conversation

@anr2me
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Owner

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

@anr2me
Copy link
Copy Markdown
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
Copy Markdown
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.
@hrydgard
Copy link
Copy Markdown
Owner

Hm, dunno why we didn't get this in, maybe I just forgot about it. Ready to merge? Because it looks like it.

@anr2me
Copy link
Copy Markdown
Collaborator Author

anr2me commented Sep 17, 2024

I also forgot about this :) it should works, but since i'm no longer working on my old PR and someone else is working on it (ie. #18578 ), merging this could cause a conflict with @JustAWhiteBloodCell PR later.

@hrydgard
Copy link
Copy Markdown
Owner

Oh right, I forgot that was incorporated there. Well, I'm going to close this then.

@hrydgard hrydgard closed this Sep 17, 2024
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.

2 participants