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

sceNet #2060

Draft
wants to merge 24 commits into
base: main
Choose a base branch
from
Draft

sceNet #2060

wants to merge 24 commits into from

Conversation

georgemoralis
Copy link
Collaborator

New implementation still initial

@georgemoralis georgemoralis marked this pull request as draft January 5, 2025 09:34
@fer-marino

This comment was marked as off-topic.

@georgemoralis
Copy link
Collaborator Author

ok it should start getting some shape now ;D

@chronicer
Copy link

[Debug] posix_sockets.cpp:SetSocketOptions:50: Unreachable code!
Unknown level =65535 optname =32

in NFS Hot Pursuit Remastered

@georgemoralis
Copy link
Collaborator Author

[Debug] posix_sockets.cpp:SetSocketOptions:50: Unreachable code! Unknown level =65535 optname =32

in NFS Hot Pursuit Remastered

done

@C4ndyF1sh
Copy link

[Debug] posix_sockets.cpp:SetSocketOptions:50: Unreachable code!
Unknown level =65535 optname =4608

For Superliminal

@Gabe205
Copy link

Gabe205 commented Jan 6, 2025

[Debug] posix_sockets.cpp:SetSocketOptions:53: Unreachable code!
Unknown level =65535 optname =4357

For Tony Hawk's Pro Skater 5

@C0rn3j
Copy link
Contributor

C0rn3j commented Jan 6, 2025

Peggle 2 tries the ORBIS_NET_SOCK_DGRAM_P2P codepath and crashes - this seems expected, though a bit surprising as you had it launching with the previous implementation - is there a way to improptu hack it up on my side til then?

[Lib.Net] <Error> net.cpp:sceNetSocket:1077: name = RakNet family = 2 type = 6 protocol = 0
[Debug] <Critical> net.cpp:sceNetSocket:1087: Unreachable code!
we don't support P2P

My attempt to hack it together in with the previous switch statement ended up with this, which is likely useless, but in case it's not:

[Debug] <Critical> posix_sockets.cpp:SetSocketOptions:53: Unreachable code!
Unknown level =1 optname =4098

@Missake212
Copy link

Wasn't sure if it was relevant information so I asked Fmod on Discord and he told me to post it. Far Cry 4 CUSA00462 behaves differently when using this PR, it basically spams net related logs on launch for a long time, and Fmod told me to mention this one in particular cause "the socket function is not implemented, some games use it directly instead of sceNetSocket but it's the same thing":
[Core] stubs.cpp:CommonStub:42: Stub: socket (nid: TU-d9PfIHPM) called, returning zero to 0x9026c063e
[Lib.Net] net.cpp:sceNetBind:132: socket id is invalid = 0

@georgemoralis
Copy link
Collaborator Author

Wasn't sure if it was relevant information so I asked Fmod on Discord and he told me to post it. Far Cry 4 CUSA00462 behaves differently when using this PR, it basically spams net related logs on launch for a long time, and Fmod told me to mention this one in particular cause "the socket function is not implemented, some games use it directly instead of sceNetSocket but it's the same thing": [Core] stubs.cpp:CommonStub:42: Stub: socket (nid: TU-d9PfIHPM) called, returning zero to 0x9026c063e [Lib.Net] net.cpp:sceNetBind:132: socket id is invalid = 0

yes it is similar but it goes through other module , can you send me a log using this branch?

@georgemoralis georgemoralis force-pushed the sceNet branch 3 times, most recently from caef372 to 6780ca3 Compare January 7, 2025 12:08
@chronicer
Copy link

[Debug] posix_sockets.cpp:SetSocketOptions:50: Unreachable code! Unknown level =65535 optname =32
in NFS Hot Pursuit Remastered

done

again

[Debug] posix_sockets.cpp:SetSocketOptions:53: Unreachable code!
Unknown level =65535 optname =4608

@georgemoralis
Copy link
Collaborator Author

[Debug] posix_sockets.cpp:SetSocketOptions:53: Unreachable code! Unknown level =65535 optname =4357

For Tony Hawk's Pro Skater 5

That should be ok now

@georgemoralis
Copy link
Collaborator Author

[Debug] posix_sockets.cpp:SetSocketOptions:50: Unreachable code! Unknown level =65535 optname =32
in NFS Hot Pursuit Remastered

done

again

[Debug] posix_sockets.cpp:SetSocketOptions:53: Unreachable code! Unknown level =65535 optname =4608

4608 is a bit tricky can you add a complete log file?

@kalaposfos13
Copy link
Contributor

  uVar8 = recvfrom(*(int *)(param_1 + 0xa8),*(void **)(param_1 + 0xb0),0x640,0x80,&local_868,
                   &local_86c);

LBP3 uses this (the posix variant, but neither is implemented yet), and gets stuck in an infinite loop after setting the brightness

@Djipi71
Copy link

Djipi71 commented Jan 9, 2025

i have this error: maybe it's not the good thread if it's the case sorry about that. BGE have this:

[Core] stubs.cpp:CommonStub:42: Stub: sceWebBrowserDialogGetStatus (nid: CFTG6a8TjOU) called, returning zero to 0x9003596a9

@georgemoralis
Copy link
Collaborator Author

i have this error: maybe it's not the good thread if it's the case sorry about that. BGE have this:

[Core] stubs.cpp:CommonStub:42: Stub: sceWebBrowserDialogGetStatus (nid: CFTG6a8TjOU) called, returning zero to 0x9003596a9

that is not from sceNet module is a different error :D

@Djipi71
Copy link

Djipi71 commented Jan 9, 2025

ok sorry about that :)

@georgemoralis
Copy link
Collaborator Author

Added more implementation for sceNetEpollControl,sceNetEpollDestroy

@kalaposfos13
Copy link
Contributor

With the new epoll functions, LBP3 now does this and instead of getting stuck in an infinite loop, it crashes:
shad_log.txt
This has the equeue hack and a hack in image_info.cpp that is also required for the game to run (for me, at least, I have not seen this error from other people): adding this line: case (AmdGpu::TilingMode)9: under this:

case AmdGpu::TilingMode::Display_Linear: {

and also a patch to break out of the infinite recvfrom loop.

@georgemoralis
Copy link
Collaborator Author

With the new epoll functions, LBP3 now does this and instead of getting stuck in an infinite loop, it crashes: shad_log.txt This has the equeue hack and a hack in image_info.cpp that is also required for the game to run (for me, at least, I have not seen this error from other people): adding this line: case (AmdGpu::TilingMode)9: under this:

case AmdGpu::TilingMode::Display_Linear: {

and also a patch to break out of the infinite recvfrom loop.

that log is quite interesting i will come back with some fixes :D

@chronicer
Copy link

[Debug] posix_sockets.cpp:SetSocketOptions:56: Unreachable code!
Unknown level =65535 optname =4608

NFS HP Remastered again:((((

@C0rn3j
Copy link
Contributor

C0rn3j commented Jan 9, 2025

@chronicer did you ever add that log? #2060 (comment)

@chronicer
Copy link

[Debug] posix_sockets.cpp:SetSocketOptions:50: Unreachable code! Unknown level =65535 optname =32
in NFS Hot Pursuit Remastered

done

again
[Debug] posix_sockets.cpp:SetSocketOptions:53: Unreachable code! Unknown level =65535 optname =4608

4608 is a bit tricky can you add a complete log file?

Here

shad_log.txt

@Randomuser8219
Copy link

shad_log.txt
Sims 4 still crashes on the unsupported resolver ID unreachable

return ORBIS_NET_ERROR_EBADF;
}
if (id == 100) {
LOG_ERROR(Lib_Net, "Hitted resolver id not supported");
Copy link
Contributor

Choose a reason for hiding this comment

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

Irrelevant to code quality, but the past tense of hit is just hit

@Randomuser8219
Copy link

On the latest build, Sims 4 now crashes on a equeue assert, the same one seen on main.

@fer-marino
Copy link

On the latest build, Sims 4 now crashes on a equeue assert, the same one seen on main.

BB the same, main is just broken...

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

Successfully merging this pull request may close these issues.