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

Misc Ad-hoc issues #14641

Open
10 of 17 tasks
ghost opened this issue Jul 25, 2021 · 140 comments
Open
10 of 17 tasks

Misc Ad-hoc issues #14641

ghost opened this issue Jul 25, 2021 · 140 comments

Comments

@ghost
Copy link

ghost commented Jul 25, 2021

What happens?

Didn't wanna group them as one but also didn't want to have seperate issues.
This is probably the last time I gonna report any issues for awhile though.
Super Pocket Tennis - After the 2nd player joins the game disconnects.
Rush- Game freezes after a 2nd player joins the game.
WHO WANTS TO BE A MILLIONAIRE - PARTY EDITION - similar to Rush, freeze on both instances.
Vulcanus: Seek & Destroy - Similar to Rush , but the game freezes when someone just hosts a game instead.
Gensan - Similar to Rush , the game will freeze on both instances.
Bomberman Panic Bomber - After the 2nd player joins the game disconnects.
Shinseiki GPX Cyber Formula VS - disconnects after starting game.
All tried locally by using "localhost" as IP.
I remember trying with a higher timeout for some of the games but I don't remember if i did for all of them.
The result was still the same though.

What are you using?
What hardware / device and operating system?
OS: Windows 10
CPU:Intel 8550U

What graphics card (GPU) or mobile phone model?
GPU:Radeon 530

What PPSSPP version (standalone/official), and did it work before?
Didn't notice but I dont think they worked on the latest stable release.

Which game or games?

Checklist

  • Test in the latest git build in case it's already fixed.
  • Search for other reports of the same issue.
  • Try resetting settings or older versions and include if the issue is related.
  • Include logs or screenshots of issue.
@ghost
Copy link
Author

ghost commented Jul 25, 2021

The Super Pocket Tennis issue seems to be similar to the Def Jam issue...
You need to accept pretty fast for it to work , and it will work only sometimes.

@anr2me
Copy link
Collaborator

anr2me commented Jul 25, 2021

Vulcanus Seek And Destroy is japanese only isn't? how to get to multiplayer?

Edit: nevermind, found it
Hmm.. it's strange, just trying to host it will get timeout, and it stuck with 0/0 FPS unable to cancel/go back to previous menu.

This is where the issue is starting:
image
It first use blocking PdpRecv with infinite timeout on socket fd number 2 on thread "Thread" followed by non-bocking PdpRecv on socket fd number 1 (belonged to AdhocMatching) on thread "Thread"... if the thread supposed to be blocked it shouldn't be able to call another PdpRecv... unless it was a different thread but with the same name.
Looked like an issue with blocking simulation or AdhocMatching (because current AdhocMatching is running on real thread instead of PSPThread)

Edit: That socket error 10014 seems to be the main issue, and it can be tricky as it's related to invalid buffer address or size.
According to this https://stackoverflow.com/questions/861154/winsock-error-code-10014
Apparently Winsock doesn't like buffers to be located on the stack, there is also a possible issue related to memory address alignment.

@ghost
Copy link
Author

ghost commented Jul 25, 2021

Added another game : Gensan.

@ghost
Copy link
Author

ghost commented Aug 7, 2021

@anr2me was the problem with some games getting 0 FPS not a socket buffer size issue?
Seeing as you talked about it here: #13648 (comment)
Not talking about Vulcanus but the other ones here.
They seem to get lower fps gradually until 0 FPS...

@anr2me
Copy link
Collaborator

anr2me commented Aug 8, 2021

For Vulcanus, based on the logs the blocking socket simulation is behaving strange, it's an issue related to blocking socket simulation.

Most 0 FPS issue are probably because the game is waiting for something that takes a very long time (or endlessly) before it can update/render the frame, for example when loading some files.

The only game i know where FPS could dropped significantly due to socket buffer was Warriors Orochi 2, but it only dropped to 4/4 FPS at most, never reached 0/0 FPS.
This game is the only game i know that have a strange netcode, it won't update the frame as long there is available data to be received in the buffer, so the game will try to repeatedly recv the data until there is no more sufficient data to be recved (about 700-736 bytes per recv) and then continue to render the frame, thus using a small buffer size will cause some incoming packets to be dropped (and need to be resent) but giving the receiver time to render the frame (due to 0 available data in buffer after the first recv), while using larger buffer will cause the game to render less frames per second (due to continuous incoming data being queued in buffer).

While the issue on PSP2/PSP2i that was related to buffer size were related to VPN (it seems some VPN doesn't worked well with small buffer size)

@ghost
Copy link

ghost commented Aug 10, 2021

Why we can't see and fight each other on ppsspp latest dev apk multiplayer function Tekken 6 :(
Screenshot_2021-08-10-21-53-37-752_org ppsspp ppsspp
Im only using mobile data 😅
Any tips and guide? Sir @anr2me

@anr2me
Copy link
Collaborator

anr2me commented Aug 10, 2021

Why we can't see and fight each other on ppsspp latest dev apk multiplayer function Tekken 6 :(
Screenshot_2021-08-10-21-53-37-752_org ppsspp ppsspp
Im only using mobile data 😅
Any tips and guide? Sir @anr2me

If this is happened recently, check your Port Offset value, the most recent update related to network is related to Port Offset (i think)

There are also other issue related to mobile:
1). If you're using mobile data without VPN it will most-likely to fail, as most mobile data provider doesn't allow port-forwarding.
2). If you're on Android there is a possibility of getting "incorrect port" issue, did you see any message saying this with orange color?

@ghost
Copy link

ghost commented Aug 10, 2021

Why we can't see and fight each other on ppsspp latest dev apk multiplayer function Tekken 6 :(
Screenshot_2021-08-10-21-53-37-752_org ppsspp ppsspp
Im only using mobile data 😅
Any tips and guide? Sir @anr2me

If this is happened recently, check your Port Offset value, the most recent update related to network is related to Port Offset (i think)

There are also other issue related to mobile:
1). If you're using mobile data without VPN it will most-likely to fail, as most mobile data provider doesn't allow port-forwarding.
2). If you're on Android there is a possibility of getting "incorrect port" issue, did you see any message saying this with orange color?

Didn't see any incorrect port warning
Here's my settings.
Screenshot_2021-08-10-21-13-39-483_org ppsspp ppsspp
Screenshot_2021-08-10-21-13-44-205_org ppsspp ppsspp
Screenshot_2021-08-10-21-39-50-439_org ppsspp ppsspp

I tried also local lan multiplayer but also failed :(
Screenshot_2021-08-10-22-38-38-599_org ppsspp ppsspp

@anr2me
Copy link
Collaborator

anr2me commented Aug 10, 2021

Your friends will need to check their settings too, because if they use a different port offset or have a blocked port, you won't be able to connect to them.

@ghost
Copy link

ghost commented Aug 10, 2021

I tried also local lan multiplayer but also failed :(
Screenshot_2021-08-10-22-38-38-599_org ppsspp ppsspp

Nevermind this local lan multiplayer is working but super lag on both phones 🤣 unlike before when we play local lan multiplayer is smooth.

@ghost
Copy link

ghost commented Aug 10, 2021

Your friends will need to check their settings too, because if they use a different port offset or have a blocked port, you won't be able to connect to them.

We have the same settings 😅

@anr2me
Copy link
Collaborator

anr2me commented Aug 10, 2021

I tried also local lan multiplayer but also failed :(
Screenshot_2021-08-10-22-38-38-599_org ppsspp ppsspp

Nevermind this local lan multiplayer is working but super lag on both phones 🤣 unlike before when we play local lan multiplayer is smooth.

I tested the latest dev build just now on localhost using the same settings on your screenshot on PC (my phone is full recently so i don't play game on it anymore) and it worked fine, full speed 60 FPS.

If it gets lag on recent builds, could you find out which revision was the last time it worked properly from https://buildbot.orphis.net/ppsspp/index.php?m=fulllist so that we can investigate which update causing it, because it shouldn't lag at least on LAN.

@ghost
Copy link
Author

ghost commented Aug 10, 2021

I had no issue with Tekken 6 locally either.
Well in general i do get lower fps with multiple instances on the other instance.
But that seems like a Windows scheduler/gpu scheduling issue that makes it lower on the non active window...
I know that issue on another emulator already.

@ghost
Copy link

ghost commented Aug 11, 2021

Local lan is now smooth just need to delete some files on my Redmi note 9 🤣

But online mobile net still failed 😭
Screenshot_2021-08-11-14-27-18-304_org ppsspp ppsspp

@ghost
Copy link
Author

ghost commented Aug 11, 2021

Stick to LAN.
I bet you get errors because of the port offset (needs to be higher then 1024) but even then the game is exteremly sensitive to lag and it makes the game not worth to bother with.
It's the most sensitive to lag game I ever saw even on hardware (35-40 ms ping is slow).

@ghost
Copy link

ghost commented Aug 24, 2021

Screenshot_2021-08-24-22-41-16-223_org ppsspp ppsspp
Naruto Shippuden Ultimate Ninja Impact Lan Multiplayer Doesn't Work anymore :(

@anr2me
Copy link
Collaborator

anr2me commented Aug 24, 2021

It worked fine on localhost, that error code 0 is strange, may be you weren't connected to AdhocServer?
Did you see "Network initialized" message on screen? (which indicate that you're successfully connected to AdhocServer)

image

@ghost
Copy link
Author

ghost commented Sep 5, 2021

Well Hammerin Hero/Gensan seems to work:
https://www.youtube.com/watch?v=0AcZMJpFOP0
And I tried it know and it worked but on my other PPSSPP folder.
So it could be my main folder acting up again or something changed on the latest PPSSPP builds lol.
The main folder issue is weird if its that tho.

@anr2me
Copy link
Collaborator

anr2me commented Sep 7, 2021

Btw @mojojojodojo could you test Vulcanus Seek And Destroy on Linux and see whether it's generating similar issue (ie. the log filled with a lot of sceNetAdhocPdpRecv Errors)
I might have a clue what's going on, at least on windows, not sure about other platform tho.

And also, do you still remember which game was it, where i said the game couldn't handle partially received TCP/PTP data properly?
I might have a clue about that too, but can't remember which game was it >.< i don't even remembered whether it was Adhoc game or Infrastructure game.

It was CCCR - SF2, and the issue is the opposite of what i thought it was :(
I might have a clue if the game couldn't handle partially received data, but it seems SF2 couldn't handle multiple TCP data being merged/combined, and i haven't found a clue how to separate those TCP data (other than reducing the buffer size that is, since we use larger buffer than what the game set)

@ghost
Copy link
Author

ghost commented Sep 9, 2021

Returning to the Hammerin Hero issue it seems like a regression on the latest builds.
Latest stable build 1.11.2 seems to work fine with the game so maybe other games should play nice too.
I will try Vulcanus and edit this post later.
EDIT: Vulcanus at least seems to be able to host on Linux with one of the latest builds.
I don't know about joining because I can never seem to get multiple instances to work on Linux lol.
The log will show these messages on linux:

07:47:441 game I[SCEKERNEL]: HLE/sceKernelThread.cpp:2104 0=sceNetAdhocMatchingStart(1, 54, 7168, 54, 0, 56, 08bfab20)
07:47:473 game I[SCEKERNEL]: HLE/sceKernelThread.cpp:2006 443=sceKernelCreateThread(Thread, 08946908, 00000020, 4096, 00000000, 00000000)
07:47:474 game I[SCEKERNEL]: HLE/sceKernelThread.cpp:2104 0=sceKernelStartThread(443, 4, 08d44808)
08:56:465 game I[SCEKERNEL]: HLE/sceKernelThread.cpp:2322 sceKernelTerminateDeleteThread(443)
09:00:364 game I[SCEIO]: HLE/sceIo.cpp:1166 stdout: [i3NetworkContext::ConnectAdhoc] Start
09:00:434 game I[SCEIO]: HLE/sceIo.cpp:1166 stdout: [i3NetworkContext::CreateLobby] Start
09:00:434 game I[SCEIO]: HLE/sceIo.cpp:1166 stdout: [i3NetworkContext::CreateLobby] End
09:00:434 game I[SCEKERNEL]: HLE/sceKernelThread.cpp:2006 454=sceNetAdhocMatchingStart(1, 54, 7168, 54, 0, 56, 08bfab20)
09:00:434 game I[SCEKERNEL]: HLE/sceKernelThread.cpp:2104 0=sceNetAdhocMatchingStart(1, 54, 7168, 54, 0, 56, 08bfab20)
09:00:434 game I[SCEKERNEL]: HLE/sceKernelThread.cpp:2006 455=sceKernelCreateThread(Thread, 08946908, 00000020, 4096, 00000000, 00000000)
09:00:434 game I[SCEKERNEL]: HLE/sceKernelThread.cpp:2104 0=sceKernelStartThread(455, 4, 08d44808)

It seems like you will get an error if you try to run PPSSPP as sudo/admin:
image

@anr2me
Copy link
Collaborator

anr2me commented Sep 9, 2021

I see, i had a feeling it's something that happen on windows only (ie. received data size not allowed to be initialized to -1 while it's okay on PSP apparently)
Thanks for testing it.

Regarding Hammerin Hero, it would be nice if you know how to bisects it :) not even working on the earliest 1.11.3 ?

@ghost
Copy link
Author

ghost commented Sep 9, 2021

I see, i had a feeling it's something that happen on windows only (ie. received data size not allowed to be initialized to -1 while it's okay on PSP apparently)
Thanks for testing it.

Regarding Hammerin Hero, it would be nice if you know how to bisects it :) not even working on the earliest 1.11.3 ?

I only checked for commits by you and the last one that worked was 1 commit before this one :
#14466
Tested commit v1.11.3-669-g29ae351a5 .. didn't take a lot of time because you didn't have a lot of changes since stable lol.

@anr2me
Copy link
Collaborator

anr2me commented Sep 9, 2021

Hmm.. that PR doesn't seems to do anything odd other than checking whether the socket is null or not during blocking-socket simulation, which could happen when the socket was deleted from a different PSPThread, thus avoid access violation.

Since the game worked before this crash fix, that means the socket never null on Hammerin Hero, thus never reached the code that returned ERROR_NET_ADHOC_SOCKET_DELETED, which mean that crash fix shouldn't affect Hammerin Hero.. so it's strange...

Is the issue persistant and can always be reproduced using the build with that crash fix? (v1.11.3-672-gf1bf596f5)

So v1.11.3-669-g29ae351a5 is the last working version?

Also, previously you said Hammerin Hero/Gensan worked with the latest version on another folder.
I assume you're using default settings on this folder (ie. freshly extracted/installed)?
So may be the issue is something related to some settings you've changed from default (either system/networking settings usually)? can also be some changes on compat.ini

Btw, regarding PPSSPP with sudo on Vulcanus, did you see any "failed to bind" error message with sudo?
It would be nice if you can show the log when using sudo, so i can compare it with your previous log to see whether there are any difference or not.

@ghost
Copy link
Author

ghost commented Sep 9, 2021

Nah thats definitly a regression... I tried it on a fresh folder.
I sm not sure its a adhoc change by you that made it regress though because later I tried some later builds and they still worked.
It's somewhere between 672 and 742 , 742 was your change with HLE delays.
Also it should be the reverse on linux - I should see a failed to bind error without sudo.
But I used a high port offset either way and didnt get that error.

@ghost
Copy link
Author

ghost commented Sep 10, 2021

Ah wait @anr2me I just noticed the game is GameMode so the commit that caused it is from #14492
i couldn't notice its gamemode from logs because it didnt see it clearly from all the other logs lol.
Maybe now its fixable? and maybe the other freezing games are GameMode too....

@ghost
Copy link
Author

ghost commented Sep 11, 2021

Ah man why I feel like i always kill responds in issues like that lol.

@anr2me
Copy link
Collaborator

anr2me commented Sep 13, 2021

Vulcanus Seek and Destroy should be fixed by this PR #14849

@ghost
Copy link
Author

ghost commented Sep 14, 2021

Anything about the other games?
Well updated that game for now.
You know when I think about it someone could just patch out the game sending the all zero mac address first and the buffer size thing lol.

@anr2me
Copy link
Collaborator

anr2me commented Sep 14, 2021

For Hammerin,
The Host side seems to be alright, i can see "Initiating GameMode Scheduler"
image

While on the Guest side, i didn't see it :( So that's probably the main issue
image

PS: Those Kernel Warnings are spamming the logs way too much LOL

@anr2me
Copy link
Collaborator

anr2me commented Feb 9, 2022

The UNO game seems to relies on the result returned on the parameter instead of the dialog status itself, and currently my workaround is by updating the result after the animation completed instead of during Update, it will prevent the game from calling Shutdown in the middle of fade-out animation.
But as i remembered you said the result supposed to be updated during Update calls, so i thought may be the Dialog UI runs on a separate thread, thus the animation won't be affected by the game's code/misbehavior.

@unknownbrackets
Copy link
Collaborator

Hm, okay, for MsgDialog, I belive you're right about the timing of result being written. We have tests showing that.

But I think the graphics stop if you stop calling Update. Even if it writes the displaylist on a thread, I'm not sure how the fade would continue in that case. Also, some games seem to draw backgrounds or overlays (like loading spinners) before/after Update, which also seems to confirm that it's when drawing happens.

-[Unknown]

@anr2me
Copy link
Collaborator

anr2me commented Feb 9, 2022

This is just an assumption,
The dialog can be rendered in a loop on the thread (from PSP perspective, from HLE side may be something like timer/ScheduledEvent), while the speed/framerate of the animation is updated based on the Update argument.
Similar to when the game is calling Update but we're calling update internally on interval basis instead of relying on the game Update calls for the rendering part, while the Update being called by the game passes the argument to the dialog renderer thread to update the speed.
The Shutdown can then wait for the animation to complete.

Not sure about the overlays things, tho.

@unknownbrackets
Copy link
Collaborator

unknownbrackets commented Feb 9, 2022

I'm sure it's possible for someone to design it that way in theory, but like I said - from memory, the graphics stop updating if you stop calling Update. We can test again to be sure. But also, if the game can't really predict when graphics will be drawn, I'm not sure how it draws stuff on top accurately. For example, iirc Popolocrois does this, but there are others.

-[Unknown]

@adenovan
Copy link
Contributor

adenovan commented Feb 10, 2022

Hey, welcome back @adenovan :) it's been awhile.

yeah its been a while looking at this fun stuff

I was talking about sceNetAdhocctlScan syscall, the game didn't use it on interval basis, and only use it when the player is pressing the "Scan" button, which is why the room list didn't shows the latest number of player's value (which is updated after the scan process)

scan syscall is not meant to be called on interval basis when i try to call it multiple times on homebrew , it will lead to a crash on psp and there is getScanInfo syscall to retrieve the result so its mean a long operation and to be used as nested grouping the peer in the networks. most of game assign a button press to select a group in the network on this operation.

most of PSP already exchange the peer list when we call create or connect on ScenetAdhocctl , its already established and they re start exchanging peer info just its not visible on user space,, if i remember correctly tekken is not scanning at all instead using a matching event and matching socket to do the transfer on the network for their lobby matchmaking .

its means there is many games did not using the Scan api on the network , as they re can establish a connection to each address and retrieve mac address by just creating simply creating adhoc network or connect to them and do their own netcode socket directly without grouping a peer in the network .

@anr2me
Copy link
Collaborator

anr2me commented Feb 10, 2022

Yes, scanning process took a long time, so it shouldn't be used on a short interval, it's not something that should be done by PPSSPP anyway, the game should do it if they choose to use AdhocctlScan.

Many games uses socket communications to retrieve game room info (such as AdhocMatching), but specific to this game (Rainbow Six) they use AdhocctlScan.
While games that use AdhocMatching doesn't need to scan because the room data (HELLO data) is being broadcasted on interval basis, thus updating the room list upon receiving this HELLO data.

Well depends how the game's netcode were designed, we can't simply change their AdhocctlScan way into AdhocMatching way ;)

@ghost
Copy link
Author

ghost commented Feb 14, 2022

Yeah and it could be confusing if the wait is long and if the scan is manual so you think it doesn't work lol

@ghost
Copy link
Author

ghost commented Mar 1, 2022

Kurohyou 2: Ryu ga Gotoku Ashura Hen is stuck infinite loading after trying the "playing online" feature (coop mode?) on the english patched game.
The game is not AdhocMatching so its not related to any recent commits about it.
Tried it on LInux like always on localhost.
At least the Solo Battle option works fine though.

@ghost
Copy link
Author

ghost commented Mar 5, 2022

R-Type Command disconnects after both players try to connect to the game.
Game uses AdhocMatching and I tired an earlier build to see what happens but it still happened there (don't know how far back it goes though).
INFO log here:

23:40:838 user_main    I[SCENET]: HLE/sceNetAdhoc.cpp:3739 sceNetAdhocPtpConnect(2, 0, 1) at 089eaba0
23:40:838 user_main    E[SCENET]: HLE/sceNetAdhoc.cpp:3670 sceNetAdhocPtpConnect[2]: Socket Error (111) to 127.0.0.1:67
23:40:838 user_main    E[SCENET]: HLE/sceNetAdhoc.cpp:3708 80410709=sceNetAdhocPtpConnect(2, 0, 1): connection refused workaround
23:40:838 user_main    I[SCENET]: HLE/sceNetAdhoc.cpp:3497 sceNetAdhocPtpAccept[3->4:66]: Established (127.0.0.1:23537) - state: 4
23:40:871 user_main    I[SCENET]: HLE/sceNetAdhoc.cpp:3739 sceNetAdhocPtpConnect(2, 0, 1) at 089eaba0
23:40:871 user_main    E[SCENET]: HLE/sceNetAdhoc.cpp:3670 sceNetAdhocPtpConnect[2]: Socket Error (115) to 127.0.0.1:67
23:40:905 user_main    I[SCENET]: HLE/sceNetAdhoc.cpp:3739 sceNetAdhocPtpConnect(2, 0, 1) at 089eaba0
23:40:905 user_main    I[SCENET]: HLE/sceNetAdhoc.cpp:3680 sceNetAdhocPtpConnect[2:31213]: Already Connected to 127.0.0.1:67
23:40:905 user_main    I[SCENET]: HLE/sceNetAdhoc.cpp:3797 sceNetAdhocPtpClose(4,0) at 089eb50c
23:40:973 user_main    E[SCENET]: HLE/sceNetAdhoc.cpp:4269 8041070c=sceNetAdhocPtpFlush(2, 0, 1): disconnected
23:40:974 user_main    I[SCENET]: HLE/sceNetAdhoc.cpp:3797 sceNetAdhocPtpClose(2,0) at 089eb6cc

Seems similar to what I also got on another game called Gintama but that game seemed to work fine Windows to Linux.
This one doesn't even work there.
Tried on Linux with localhost.

@anr2me
Copy link
Collaborator

anr2me commented Mar 5, 2022

R-Type Command (US) worked fine on Windows, but i didn't get that "connection refused" error, and Flush didn't get disconnected error either.
image
PS: Socket Error 10056 on Windows is "Already connected"

It's strange that PtpFlush gets an error of "disconnected" while PtpSend didn't get it (or it might get the error but only visible on Debug Log).

There are a few possibilities that can cause Socket error 111 on Linux (an example of HTTP connection getting socket error 111)
image

Btw, have you tried using sudo?

@anr2me
Copy link
Collaborator

anr2me commented Mar 5, 2022

Btw, you can use my branch with up to Verbose Logging enabled https://github.com/ANR2ME/ppsspp/tree/verboselog
But select Debug channel on SCENET instead of Verbose, so it won't flood the logs too much.

I would like to see what happen to PtpSend and what is the error code the PtpFlush is getting.

@ghost
Copy link
Author

ghost commented Mar 8, 2022

Hmm so I got this log on 1 instance with debug enabled:

31:14:599 user_main    D[SCENET]: HLE/sceNet.cpp:701 0=sceWlanGetEtherAddr(09fff5f8)
31:14:599 user_main    I[SCENET]: HLE/sceNetAdhoc.cpp:3239 sceNetAdhocPtpOpen(c8:74:af:af:59:e0, 0, 00:02:02:02:02:02, 66, 4104, 200000, 100, 0) at 089eaa70
31:14:599 user_main    E[SCENET]: HLE/sceNetAdhoc.cpp:3671 sceNetAdhocPtpConnect[2]: Socket Error (115) to 127.0.0.2:66
31:14:599 user_main    D[SCENET]: HLE/sceNetAdhoc.cpp:3702 80410709=sceNetAdhocPtpOpen(�t��Y�, 0, , 66, 4104, 200000, 100, 0): would block
31:14:599 user_main    D[SCENET]: HLE/sceNetAdhoc.cpp:3375 00000002=sceNetAdhocPtpOpen(�t��Y�, 0, , 66, 4104, 200000, 100, 0): success
31:14:600 user_main    D[SCENET]: HLE/sceNet.cpp:701 0=sceWlanGetEtherAddr(09fff5e8)
31:14:600 user_main    I[SCENET]: HLE/sceNetAdhoc.cpp:3819 sceNetAdhocPtpListen(c8:74:af:af:59:e0, 67, 4104, 200000, 100, 1, 0) at 089eb0c8
31:14:600 user_main    D[SCENET]: HLE/sceNetAdhoc.cpp:3947 00000003=sceNetAdhocPtpListen(�t��Y�(d, 67, 4104, 200000, 100, 1, 0): success
31:14:606 idle0        D[SCENET]: HLE/sceNetAdhoc.cpp:1609 sceNetAdhocPdpSend[1:10010]: Sent 1 bytes to 127.0.0.2:10010

31:14:632 user_main    I[SCENET]: HLE/sceNetAdhoc.cpp:3740 sceNetAdhocPtpConnect(2, 0, 1) at 089eaba0
31:14:632 user_main    E[SCENET]: HLE/sceNetAdhoc.cpp:3671 sceNetAdhocPtpConnect[2]: Socket Error (111) to 127.0.0.2:66
31:14:632 user_main    E[SCENET]: HLE/sceNetAdhoc.cpp:3709 80410709=sceNetAdhocPtpConnect(2, 0, 1): connection refused workaround
31:14:633 user_main    I[SCENET]: HLE/sceNetAdhoc.cpp:3498 sceNetAdhocPtpAccept[3->4:67]: Established (127.0.0.2:31995) - state: 4
31:14:633 user_main    D[SCENET]: HLE/sceNetAdhoc.cpp:4100 sceNetAdhocPtpRecv(4,08c41d00,09fff5ec,0,1) at 089eb2f8
31:14:666 user_main    I[SCENET]: HLE/sceNetAdhoc.cpp:3740 sceNetAdhocPtpConnect(2, 0, 1) at 089eaba0
31:14:666 user_main    E[SCENET]: HLE/sceNetAdhoc.cpp:3671 sceNetAdhocPtpConnect[2]: Socket Error (115) to 127.0.0.2:66
31:14:666 user_main    D[SCENET]: HLE/sceNetAdhoc.cpp:3702 80410709=sceNetAdhocPtpConnect(2, 0, 1): would block
31:14:666 user_main    D[SCENET]: HLE/sceNetAdhoc.cpp:4100 sceNetAdhocPtpRecv(4,08c41d00,09fff60c,0,1) at 089eb2f8
31:14:666 user_main    D[SCENET]: HLE/sceNetAdhoc.cpp:4166 sceNetAdhocPtpRecv[4:67]: Received 8 bytes from 00:02:02:02:02:02:31995

31:14:666 user_main    D[SCENET]: HLE/sceNetAdhoc.cpp:4100 sceNetAdhocPtpRecv(4,08c41d08,09fff5ec,0,1) at 089eb4c0
31:14:667 user_main    D[SCENET]: HLE/sceNetAdhoc.cpp:4166 sceNetAdhocPtpRecv[4:67]: Received 808 bytes from 00:02:02:02:02:02:31995

31:14:667 user_main    I[SCENET]: HLE/sceNetAdhoc.cpp:3798 sceNetAdhocPtpClose(4,0) at 089eb50c
31:14:700 user_main    I[SCENET]: HLE/sceNetAdhoc.cpp:3740 sceNetAdhocPtpConnect(2, 0, 1) at 089eaba0
31:14:700 user_main    I[SCENET]: HLE/sceNetAdhoc.cpp:3681 sceNetAdhocPtpConnect[2:35687]: Already Connected to 127.0.0.2:66
31:14:733 user_main    D[SCENET]: HLE/sceNetAdhoc.cpp:3998 sceNetAdhocPtpSend(2,08c40ca8,09fff61c,0,1) at 089ead5c
31:14:733 user_main    D[SCENET]: HLE/sceNetAdhoc.cpp:4044 sceNetAdhocPtpSend[2:35687]: Sent 816 bytes to 00:02:02:02:02:02:66

31:14:767 user_main    D[SCENET]: HLE/sceNetAdhoc.cpp:4230 sceNetAdhocPtpFlush(2,0,1) at 089eaf24
31:14:767 user_main    E[SCENET]: HLE/sceNetAdhoc.cpp:4270 8041070c=sceNetAdhocPtpFlush(2, 0, 1): disconnected
31:14:767 user_main    I[SCENET]: HLE/sceNetAdhoc.cpp:3798 sceNetAdhocPtpClose(2,0) at 089eb6cc
31:15:812 idle0        D[SCENET]: HLE/sceNetAdhoc.cpp:1887 sceNetAdhocPdpRecv[1:10010]: Received 1 bytes from 127.0.0.2:10010

31:15:812 idle0        D[SCENET]: HLE/sceNetAdhoc.cpp:7612 Timestamp LastRecv Delta: 0 (184817279 - 184817279) from 00:02:02:02:02:02
31:16:604 idle0        D[SCENET]: HLE/sceNetAdhoc.cpp:1609 sceNetAdhocPdpSend[1:10010]: Sent 1 bytes to 127.0.0.2:10010

31:17:535 user_main    I[SCENET]: HLE/sceNetAdhoc.cpp:3798 sceNetAdhocPtpClose(3,0) at 089eb5e8
31:17:535 user_main    W[SCENET]: HLE/sceNetAdhoc.cpp:4595 UNTESTED sceNetAdhocMatchingStop(1) at 089df9c0
31:17:545 user_main    D[SCENET]: HLE/sceNetAdhoc.cpp:1609 sceNetAdhocPdpSend[1:10010]: Sent 1 bytes to 127.0.0.2:10010

31:17:545 user_main    I[SCENET]: HLE/sceNetAdhoc.cpp:7742 InputLoop: End of InputLoop[1] Thread
31:17:550 user_main    I[SCENET]: HLE/sceNetAdhoc.cpp:7457 EventLoop: End of EventLoop[1] Thread
31:17:551 user_main    W[SCENET]: HLE/sceNetAdhoc.cpp:4670 UNTESTED sceNetAdhocMatchingDelete(1) at 089df9cc
31:17:551 user_main    W[SCENET]: HLE/sceNetAdhoc.cpp:4714 UNTESTED sceNetAdhocMatchingTerm() at 089df9e0
31:17:551 user_main    I[SCENET]: HLE/sceNetAdhoc.cpp:2482 Marked for Timedout Peer List (1)
31:17:551 user_main    I[SCENET]: HLE/sceNetAdhoc.cpp:2518 00000000=sceNetAdhocctlDisconnect() at 089df130 [group=]
31:17:551 AdhocThread  D[SCENET]: HLE/sceNetAdhoc.cpp:5729 AdhocctlCallback: [ID=0][EVENT=2][Error=00000000]
31:17:553 idle0        I[SCENET]: HLE/proAdhocServer.cpp:1007 AdhocServer: Zinx (MAC: c8:74:af:af:59:e0 - IP: 127.0.0.1) left ULUS10343 group 
31:17:567 idle0        D[SCENET]: HLE/sceNetAdhoc.cpp:418 Returning (WaitID: 3, error: 00000000) Result (00000000) of sceNetAdhocctl - Event: 2, State: 0
31:17:567 AdhocThread  D[SCENET]: HLE/proAdhoc.cpp:1212 AfterAdhocMipsCall::run [ID=0][Event=2] [cbId: 22090][retV0: 00000000]


And this log with the other instance:

31:13:687 idle0        I[SCENET]: HLE/sceNetAdhoc.cpp:7380 EventLoop[1]: Matching Event [1=HELLO][c8:74:af:af:59:e0] OptSize=288
31:13:697 MatchingThr1 D[SCENET]: HLE/sceNetAdhoc.cpp:5764 AdhocMatching - Remaining Events: 1
31:13:697 MatchingThr1 D[SCENET]: HLE/sceNetAdhoc.cpp:5768 AdhocMatchingCallback: [ID=1][EVENT=1][c8:74:af:af:59:e0]
31:13:697 MatchingThr1 D[SCENET]: HLE/sceNet.cpp:722 sceNetEtherNtostr(088adb00, 09fb1a6c) at 089dfdd4
31:13:698 MatchingThr1 D[SCENET]: HLE/proAdhoc.cpp:1161 AfterMatchingMipsCall::run [ID=1][Event=1][c8:74:af:af:59:e0] [cbId: 22022][retV0: 00000000]
31:13:700 user_main    D[SCENET]: HLE/sceNetAdhoc.cpp:5887 sceNetAdhocctlGetPeerList([09fff64c]=151922852, 00000000) at 089df464
31:13:700 user_main    D[SCENET]: HLE/sceNetAdhoc.cpp:5906 PeerList [Active: 1]
31:13:700 user_main    D[SCENET]: HLE/sceNetAdhoc.cpp:5887 sceNetAdhocctlGetPeerList([09fff64c]=152, 08c3d778) at 089df4a0
31:13:700 user_main    D[SCENET]: HLE/sceNetAdhoc.cpp:5942 Peer [c8:74:af:af:59:e0][127.0.0.1][Zinx][94334113]
31:13:700 user_main    D[SCENET]: HLE/sceNetAdhoc.cpp:5957 PeerList [Requested: 1][Discovered: 1]
31:13:700 user_main    D[SCENET]: HLE/sceNetAdhoc.cpp:2599 UNTESTED sceNetAdhocctlGetNameByAddr(c8:74:af:af:59:e0, 08c40048) at 089df740
31:13:700 user_main    D[SCENET]: HLE/sceNetAdhoc.cpp:2642 sceNetAdhocctlGetNameByAddr - [PeerName:Zinx]
31:14:033 idle0        D[SCENET]: HLE/sceNetAdhoc.cpp:1609 sceNetAdhocPdpSend[1:10010]: Sent 1 bytes to 127.0.0.1:10010

31:14:467 user_main    W[SCENET]: HLE/sceNetAdhoc.cpp:4927 UNTESTED sceNetAdhocMatchingSelectTarget(1, c8:74:af:af:59:e0, 0, 00000000) at 089dfa94
31:14:468 user_main    D[SCENET]: HLE/sceNetAdhoc.cpp:1609 sceNetAdhocPdpSend[1:10010]: Sent 5 bytes to 127.0.0.1:10010

31:14:509 idle0        D[SCENET]: HLE/sceNetAdhoc.cpp:1887 sceNetAdhocPdpRecv[1:10010]: Received 17 bytes from 127.0.0.1:10010

31:14:509 idle0        I[SCENET]: HLE/sceNetAdhoc.cpp:7603 InputLoop[1]: Received 17 Bytes (Opcode[3]=ACCEPT)
31:14:509 idle0        D[SCENET]: HLE/sceNetAdhoc.cpp:7612 Timestamp LastRecv Delta: 0 (97029582 - 97029582) from c8:74:af:af:59:e0
31:14:509 idle0        I[SCENET]: HLE/proAdhoc.cpp:576 Removing Unneeded Peers (0/1)
31:14:516 idle0        I[SCENET]: HLE/sceNetAdhoc.cpp:7380 EventLoop[1]: Matching Event [6=ACCEPT][c8:74:af:af:59:e0] OptSize=8
31:14:526 idle0        I[SCENET]: HLE/sceNetAdhoc.cpp:7380 EventLoop[1]: Matching Event [7=ESTABLISHED][c8:74:af:af:59:e0] OptSize=0
31:14:530 MatchingThr1 D[SCENET]: HLE/sceNetAdhoc.cpp:5764 AdhocMatching - Remaining Events: 2
31:14:530 MatchingThr1 D[SCENET]: HLE/sceNetAdhoc.cpp:5768 AdhocMatchingCallback: [ID=1][EVENT=6][c8:74:af:af:59:e0]
31:14:530 MatchingThr1 D[SCENET]: HLE/sceNet.cpp:722 sceNetEtherNtostr(088adb00, 09fb1a6c) at 089dfdd4
31:14:530 MatchingThr1 D[SCENET]: HLE/proAdhoc.cpp:1161 AfterMatchingMipsCall::run [ID=1][Event=6][c8:74:af:af:59:e0] [cbId: 0][retV0: 00000000]
31:14:530 MatchingThr1 D[SCENET]: HLE/sceNetAdhoc.cpp:5764 AdhocMatching - Remaining Events: 1
31:14:530 MatchingThr1 D[SCENET]: HLE/sceNetAdhoc.cpp:5768 AdhocMatchingCallback: [ID=1][EVENT=7][c8:74:af:af:59:e0]
31:14:530 MatchingThr1 D[SCENET]: HLE/sceNet.cpp:722 sceNetEtherNtostr(088adc00, 09fb1a6c) at 089dfdd4
31:14:531 MatchingThr1 D[SCENET]: HLE/proAdhoc.cpp:1161 AfterMatchingMipsCall::run [ID=1][Event=7][c8:74:af:af:59:e0] [cbId: 0][retV0: 00000000]
31:14:600 user_main    D[SCENET]: HLE/sceNet.cpp:701 0=sceWlanGetEtherAddr(09fff5f8)
31:14:600 user_main    I[SCENET]: HLE/sceNetAdhoc.cpp:3239 sceNetAdhocPtpOpen(00:02:02:02:02:02, 0, c8:74:af:af:59:e0, 67, 4104, 200000, 100, 0) at 089eaa70
31:14:600 user_main    E[SCENET]: HLE/sceNetAdhoc.cpp:3671 sceNetAdhocPtpConnect[2]: Socket Error (115) to 127.0.0.1:67
31:14:600 user_main    D[SCENET]: HLE/sceNetAdhoc.cpp:3702 80410709=sceNetAdhocPtpOpen(, 0, �t��Y�, 67, 4104, 200000, 100, 0): would block
31:14:600 user_main    D[SCENET]: HLE/sceNetAdhoc.cpp:3375 00000002=sceNetAdhocPtpOpen(, 0, �t��Y�, 67, 4104, 200000, 100, 0): success
31:14:600 user_main    D[SCENET]: HLE/sceNet.cpp:701 0=sceWlanGetEtherAddr(09fff5e8)
31:14:600 user_main    I[SCENET]: HLE/sceNetAdhoc.cpp:3819 sceNetAdhocPtpListen(00:02:02:02:02:02, 66, 4104, 200000, 100, 1, 0) at 089eb0c8
31:14:600 user_main    D[SCENET]: HLE/sceNetAdhoc.cpp:3947 00000003=sceNetAdhocPtpListen(, 66, 4104, 200000, 100, 1, 0): success
31:14:610 idle0        D[SCENET]: HLE/sceNetAdhoc.cpp:1887 sceNetAdhocPdpRecv[1:10010]: Received 1 bytes from 127.0.0.1:10010

31:14:610 idle0        D[SCENET]: HLE/sceNetAdhoc.cpp:7612 Timestamp LastRecv Delta: 0 (97129682 - 97129682) from c8:74:af:af:59:e0
31:14:633 user_main    I[SCENET]: HLE/sceNetAdhoc.cpp:3740 sceNetAdhocPtpConnect(2, 0, 1) at 089eaba0
31:14:633 user_main    I[SCENET]: HLE/sceNetAdhoc.cpp:3681 sceNetAdhocPtpConnect[2:31995]: Already Connected to 127.0.0.1:67
31:14:666 user_main    D[SCENET]: HLE/sceNetAdhoc.cpp:3998 sceNetAdhocPtpSend(2,08c41d00,09fff61c,0,1) at 089ead5c
31:14:666 user_main    D[SCENET]: HLE/sceNetAdhoc.cpp:4044 sceNetAdhocPtpSend[2:31995]: Sent 816 bytes to c8:74:af:af:59:e0:67

31:14:666 user_main    I[SCENET]: HLE/sceNetAdhoc.cpp:3498 sceNetAdhocPtpAccept[3->4:66]: Established (127.0.0.1:32030) - state: 4
31:14:667 user_main    D[SCENET]: HLE/sceNetAdhoc.cpp:4100 sceNetAdhocPtpRecv(4,08c40ca8,09fff5ec,0,1) at 089eb2f8
31:14:701 user_main    D[SCENET]: HLE/sceNetAdhoc.cpp:4230 sceNetAdhocPtpFlush(2,0,1) at 089eaf24
31:14:701 user_main    E[SCENET]: HLE/sceNetAdhoc.cpp:4270 8041070c=sceNetAdhocPtpFlush(2, 0, 1): disconnected
31:14:701 user_main    I[SCENET]: HLE/sceNetAdhoc.cpp:3798 sceNetAdhocPtpClose(2,0) at 089eb6cc
31:14:701 user_main    D[SCENET]: HLE/sceNetAdhoc.cpp:4100 sceNetAdhocPtpRecv(4,08c40ca8,09fff60c,0,1) at 089eb2f8
31:14:733 user_main    D[SCENET]: HLE/sceNetAdhoc.cpp:4100 sceNetAdhocPtpRecv(4,08c40ca8,09fff60c,0,1) at 089eb2f8
31:14:765 user_main    D[SCENET]: HLE/sceNetAdhoc.cpp:4100 sceNetAdhocPtpRecv(4,08c40ca8,09fff60c,0,1) at 089eb2f8
31:14:765 user_main    D[SCENET]: HLE/sceNetAdhoc.cpp:4166 sceNetAdhocPtpRecv[4:66]: Received 8 bytes from c8:74:af:af:59:e0:32030

31:14:766 user_main    D[SCENET]: HLE/sceNetAdhoc.cpp:4100 sceNetAdhocPtpRecv(4,08c40cb0,09fff5ec,0,1) at 089eb4c0
31:14:766 user_main    D[SCENET]: HLE/sceNetAdhoc.cpp:4166 sceNetAdhocPtpRecv[4:66]: Received 808 bytes from c8:74:af:af:59:e0:32030

31:14:766 user_main    I[SCENET]: HLE/sceNetAdhoc.cpp:3798 sceNetAdhocPtpClose(4,0) at 089eb50c
31:15:806 idle0        D[SCENET]: HLE/sceNetAdhoc.cpp:1609 sceNetAdhocPdpSend[1:10010]: Sent 1 bytes to 127.0.0.1:10010

31:16:609 idle0        D[SCENET]: HLE/sceNetAdhoc.cpp:1887 sceNetAdhocPdpRecv[1:10010]: Received 1 bytes from 127.0.0.1:10010

31:16:609 idle0        D[SCENET]: HLE/sceNetAdhoc.cpp:7612 Timestamp LastRecv Delta: 0 (99131682 - 99131682) from c8:74:af:af:59:e0
31:17:550 idle0        D[SCENET]: HLE/sceNetAdhoc.cpp:1887 sceNetAdhocPdpRecv[1:10010]: Received 1 bytes from 127.0.0.1:10010

31:17:550 idle0        I[SCENET]: HLE/sceNetAdhoc.cpp:7603 InputLoop[1]: Received 1 Bytes (Opcode[9]=BYE)
31:17:550 idle0        D[SCENET]: HLE/sceNetAdhoc.cpp:7612 Timestamp LastRecv Delta: 0 (100065949 - 100065949) from c8:74:af:af:59:e0
31:17:555 idle0        I[SCENET]: HLE/sceNetAdhoc.cpp:7380 EventLoop[1]: Matching Event [10=DISCONNECT][c8:74:af:af:59:e0] OptSize=0
31:17:562 idle0        I[SCENET]: HLE/proAdhoc.cpp:1460 Received 5 Bytes of Data from Adhoc Server
31:17:563 idle0        D[SCENET]: HLE/proAdhoc.cpp:1636 FriendFinder: OPCODE_DISCONNECT
31:17:563 idle0        I[SCENET]: HLE/proAdhoc.cpp:1639 FriendFinder: Incoming Peer Data Delete Request...
31:17:563 idle0        I[SCENET]: HLE/proAdhoc.cpp:469 Removing Friend Peer c8:74:af:af:59:e0 [127.0.0.1]
31:17:567 MatchingThr1 D[SCENET]: HLE/sceNetAdhoc.cpp:5764 AdhocMatching - Remaining Events: 1
31:17:567 MatchingThr1 D[SCENET]: HLE/sceNetAdhoc.cpp:5768 AdhocMatchingCallback: [ID=1][EVENT=10][c8:74:af:af:59:e0]
31:17:567 MatchingThr1 D[SCENET]: HLE/sceNet.cpp:722 sceNetEtherNtostr(088adb00, 09fb1a6c) at 089dfdd4
31:17:567 MatchingThr1 D[SCENET]: HLE/proAdhoc.cpp:1161 AfterMatchingMipsCall::run [ID=1][Event=10][c8:74:af:af:59:e0] [cbId: 0][retV0: 00000000]

The garbage data you see in PtpOpen appears as it is on the logs as well..

@anr2me
Copy link
Collaborator

anr2me commented Mar 9, 2022

Thanks for the logs, i can see that it managed to send successfully, which mean the connection was successfully established, but there might be something wrong with PtpFlush causing the connection to be disconnected... i guess it's another inconsistency with Windows.

Btw, that garbage data is actually MAC address being printed as string, since the log was printed using hleLogDebug which directly print the *char argument as it.

@anr2me
Copy link
Collaborator

anr2me commented Mar 14, 2022

@mojojojodojo could you try again using this branch https://github.com/ANR2ME/ppsspp/tree/ptpflush_logs
This won't fix the issue, just to shows additional Debug logs during PtpFlush

PS: This branch also includes the verbose branch, so you can use Debug Log too.

@anr2me
Copy link
Collaborator

anr2me commented Mar 14, 2022

Since you have confirmed at discord that the game is running fine with my test build, i've created the PR for the PtpFlush issue #15445

This issue may also happened on Windows and other platform, since the issue you had on Linux was a normal case, due to the remote peer already closing the connection at the time PtpFlush was called.

@ghost
Copy link
Author

ghost commented Mar 14, 2022

Ahhh new issue this time for a game called Taiko no Tatsujin Portable DX:
info log:

59:43:007 user_main    W[SCENET]: HLE/sceNetAdhoc.cpp:5568 UNTESTED sceNetAdhocMatchingAbortSendData(1, c8:74:af:af:59:e0)
59:43:007 user_main    E[SCENET]: HLE/sceNetAdhoc.cpp:5608 8041080c=sceNetAdhocMatchingAbortSendData(1, �t��Y�): adhocmatching unknown target
59:43:007 user_main    W[SCENET]: HLE/sceNetAdhoc.cpp:5490 UNTESTED sceNetAdhocMatchingSendData(1, c8:74:af:af:59:e0, 8, 0966be90) at 0896f8fc
59:43:007 user_main    E[SCENET]: HLE/sceNetAdhoc.cpp:5548 8041080c=sceNetAdhocMatchingSendData(1, �t��Y�, 8, 0966be90): unknown target
59:43:007 user_main    W[SCENET]: HLE/sceNetAdhoc.cpp:5568 UNTESTED sceNetAdhocMatchingAbortSendData(1, 00:02:02:02:02:02)
59:43:007 user_main    W[SCENET]: HLE/sceNetAdhoc.cpp:5490 UNTESTED sceNetAdhocMatchingSendData(1, 00:02:02:02:02:02, 8, 0966be90) at 0896f8fc
59:43:013 user_main    I[SCENET]: HLE/sceNetAdhoc.cpp:7391 EventLoop[1]: Matching Event [12=DATA_ACK][00:02:02:02:02:02] OptSize=0
59:43:023 user_main    I[SCENET]: HLE/sceNetAdhoc.cpp:3239 sceNetAdhocPtpOpen(c8:74:af:af:59:e0, 0, 00:02:02:02:02:02, 111, 8664, 200000, 300, 0) at 08971304
59:43:023 user_main    E[SCENET]: HLE/sceNetAdhoc.cpp:3671 sceNetAdhocPtpConnect[3]: Socket Error (115) to 127.0.0.2:111
59:43:025 AdhocTCPThre I[SCENET]: HLE/sceNetAdhoc.cpp:3740 sceNetAdhocPtpConnect(3, 20000000, 0) at 08971410
59:43:025 AdhocTCPThre E[SCENET]: HLE/sceNetAdhoc.cpp:3671 sceNetAdhocPtpConnect[3]: Socket Error (111) to 127.0.0.2:111
59:43:025 AdhocTCPThre E[SCENET]: HLE/sceNetAdhoc.cpp:3711 80410715=sceNetAdhocPtpConnect(3, 20000000, 0): connection refused workaround

Debug log:

04:30:883 MatchingThr1 D[SCENET]: HLE/proAdhoc.cpp:1161 AfterMatchingMipsCall::run [ID=1][Event=11][00:03:03:03:03:03] [cbId: 0][retV0: 00000001]
04:30:901 user_main    W[SCENET]: HLE/sceNetAdhoc.cpp:5568 UNTESTED sceNetAdhocMatchingAbortSendData(1, 00:02:02:02:02:02)
04:30:901 user_main    E[SCENET]: HLE/sceNetAdhoc.cpp:5608 8041080c=sceNetAdhocMatchingAbortSendData(1, ): adhocmatching unknown target
04:30:902 user_main    W[SCENET]: HLE/sceNetAdhoc.cpp:5490 UNTESTED sceNetAdhocMatchingSendData(1, 00:02:02:02:02:02, 8, 0966bdb0) at 0896f8fc
04:30:902 user_main    E[SCENET]: HLE/sceNetAdhoc.cpp:5548 8041080c=sceNetAdhocMatchingSendData(1, , 8, 0966bdb0): unknown target
04:30:902 user_main    W[SCENET]: HLE/sceNetAdhoc.cpp:5568 UNTESTED sceNetAdhocMatchingAbortSendData(1, 00:03:03:03:03:03)
04:30:902 user_main    W[SCENET]: HLE/sceNetAdhoc.cpp:5490 UNTESTED sceNetAdhocMatchingSendData(1, 00:03:03:03:03:03, 8, 0966bdb0) at 0896f8fc
04:30:902 user_main    D[SCENET]: HLE/sceNetAdhoc.cpp:1609 sceNetAdhocPdpSend[1:10001]: Sent 13 bytes to 127.0.0.3:10001

04:30:909 user_main    I[SCENET]: HLE/sceNetAdhoc.cpp:7391 EventLoop[1]: Matching Event [12=DATA_ACK][00:03:03:03:03:03] OptSize=0
04:30:916 user_main    D[SCENET]: HLE/sceNet.cpp:701 0=sceNetGetLocalEtherAddr(0966be28)
04:30:916 MatchingThr1 D[SCENET]: HLE/sceNetAdhoc.cpp:5775 AdhocMatching - Remaining Events: 1
04:30:916 MatchingThr1 D[SCENET]: HLE/sceNetAdhoc.cpp:5779 AdhocMatchingCallback: [ID=1][EVENT=12][00:03:03:03:03:03]
04:30:917 user_main    I[SCENET]: HLE/sceNetAdhoc.cpp:3239 sceNetAdhocPtpOpen(00:02:02:02:02:02, 0, 00:03:03:03:03:03, 111, 8664, 200000, 300, 0) at 08971304
04:30:917 user_main    E[SCENET]: HLE/sceNetAdhoc.cpp:3671 sceNetAdhocPtpConnect[3]: Socket Error (115) to 127.0.0.3:111
04:30:917 user_main    D[SCENET]: HLE/sceNetAdhoc.cpp:3702 80410709=sceNetAdhocPtpOpen(, 0, , 111, 8664, 200000, 300, 0): would block
04:30:917 user_main    D[SCENET]: HLE/sceNetAdhoc.cpp:3375 00000003=sceNetAdhocPtpOpen(, 0, , 111, 8664, 200000, 300, 0): success
04:30:919 MatchingThr1 D[SCENET]: HLE/proAdhoc.cpp:1161 AfterMatchingMipsCall::run [ID=1][Event=12][00:03:03:03:03:03] [cbId: 0][retV0: 00000001]
04:30:920 AdhocTCPThre I[SCENET]: HLE/sceNetAdhoc.cpp:3740 sceNetAdhocPtpConnect(3, 20000000, 0) at 08971410
04:30:920 AdhocTCPThre E[SCENET]: HLE/sceNetAdhoc.cpp:3671 sceNetAdhocPtpConnect[3]: Socket Error (111) to 127.0.0.3:111
04:30:920 AdhocTCPThre E[SCENET]: HLE/sceNetAdhoc.cpp:3711 80410715=sceNetAdhocPtpConnect(3, 20000000, 0): connection refused workaround
04:30:933 user_main    W[SCENET]: HLE/sceNetAdhoc.cpp:4606 UNTESTED sceNetAdhocMatchingStop(1) at 0896edd4
04:30:939 user_main    D[SCENET]: HLE/sceNetAdhoc.cpp:1609 sceNetAdhocPdpSend[1:10001]: Sent 1 bytes to 127.0.0.3:10001

04:30:939 user_main    I[SCENET]: HLE/sceNetAdhoc.cpp:7753 InputLoop: End of InputLoop[1] Thread
04:30:939 user_main    I[SCENET]: HLE/sceNetAdhoc.cpp:7468 EventLoop: End of EventLoop[1] Thread
04:30:941 user_main    W[SCENET]: HLE/sceNetAdhoc.cpp:4606 UNTESTED sceNetAdhocMatchingStop(1) at 089692e0
04:30:941 user_main    W[SCENET]: HLE/sceNetAdhoc.cpp:4681 UNTESTED sceNetAdhocMatchingDelete(1) at 089692e8
04:30:941 user_main    I[SCENET]: HLE/sceNetAdhoc.cpp:2195 sceNetAdhocPdpDelete(2, 0) at 08968a40
04:31:750 user_main    I[SCENET]: HLE/sceNetAdhoc.cpp:3798 sceNetAdhocPtpClose(3,0) at 089715d8
04:31:751 user_main    I[SCENET]: HLE/sceNetAdhoc.cpp:2482 Marked for Timedout Peer List (1)
04:31:751 user_main    I[SCENET]: HLE/sceNetAdhoc.cpp:2518 00000000=sceNetAdhocctlDisconnect() at 08968c74 [group=ADHCGAME]
04:31:751 AdhocThread  D[SCENET]: HLE/sceNetAdhoc.cpp:5740 AdhocctlCallback: [ID=0][EVENT=2][Error=00000000]
04:31:751 idle0        D[SCENET]: HLE/sceNetAdhoc.cpp:418 Returning (WaitID: 3, error: 00000000) Result (00000000) of sceNetAdhocctl - Event: 2, State: 0
04:31:752 AdhocThread  D[SCENET]: HLE/proAdhoc.cpp:1212 AfterAdhocMipsCall::run [ID=0][Event=2] [cbId: 0][retV0: 00000000]

Using the PR build that you just made.

@anr2me
Copy link
Collaborator

anr2me commented Mar 14, 2022

Looks like an issue between sceNetAdhocPtpOpen or sceNetAdhocPtpConnect, will need to compare the logs with Windows (if it works on Windows)

It may not supposed to return "connection refused workaround" that soon, since it use a blocking mode with long timeout (20 seconds)

@ghost
Copy link
Author

ghost commented Apr 9, 2022

The newly disovered prototype Duke Nukem Critical Mass (latest prototype release) got issues on multiplayer.
For one player you will see everything is fine but for the other player you will see him all warped and out of place.
The game needs 64mb ram to make it work so maybe it got to do with it.
I tried it out with disabling fast memory and didnt see much change though.
You can see the player warping out in this video here:
https://m.youtube.com/watch?v=CYItabLnh_w

As I understand if you make the game to work out on a PSP you won't see the issue locally.
Console image:
https://media.discordapp.net/attachments/659889867219533828/961751033674100776/duke.jpg?width=1054&height=593
The player will warp out even if he is standing in place lol
The bug happens on both localhost and online play.

@anr2me
Copy link
Collaborator

anr2me commented Apr 9, 2022

Will need to compare the multiplayer gameplay video with PSP vs PSP to see whether it was a game bug or not, since the game prototype is an unreleased dev build (which is prone to have bugs) afterall.

Based on the way how the other player's body could sink halfway under the terrain, it could also be related to VFPU.
Have you tried disabling VFPU on the JIT?

@ghost
Copy link
Author

ghost commented Apr 10, 2022

Seems like with VFPU disabled the character is half stuck to the ground and is less twitching around.
Looks like having fast memory disabled or enabled also got to do with how the character moves around too tho.

@ghost
Copy link
Author

ghost commented Apr 23, 2022

Tales of VS doesn't work.
I think its one of the games that worked in previous builds but now it doesnt.
Not feeling like finding which commit broke it tho.
I think it worked on 1.11+ at least

@ghost
Copy link
Author

ghost commented May 1, 2022

Will need to compare the multiplayer gameplay video with PSP vs PSP to see whether it was a game bug or not, since the game prototype is an unreleased dev build (which is prone to have bugs) afterall.

Based on the way how the other player's body could sink halfway under the terrain, it could also be related to VFPU. Have you tried disabling VFPU on the JIT?

https://www.youtube.com/watch?v=I0N_BMBbhvo
PSP to PSP seems to work fine...
Don't really know if the source for the issues is JIT related or something else though.

@ghost
Copy link
Author

ghost commented Jun 18, 2022

Returning to the Hammerin Hero issue it seems like a regression on the latest builds. Latest stable build 1.11.2 seems to work fine with the game so maybe other games should play nice too. I will try Vulcanus and edit this post later. EDIT: Vulcanus at least seems to be able to host on Linux with one of the latest builds. I don't know about joining because I can never seem to get multiple instances to work on Linux lol. The log will show these messages on linux:

07:47:441 game I[SCEKERNEL]: HLE/sceKernelThread.cpp:2104 0=sceNetAdhocMatchingStart(1, 54, 7168, 54, 0, 56, 08bfab20)
07:47:473 game I[SCEKERNEL]: HLE/sceKernelThread.cpp:2006 443=sceKernelCreateThread(Thread, 08946908, 00000020, 4096, 00000000, 00000000)
07:47:474 game I[SCEKERNEL]: HLE/sceKernelThread.cpp:2104 0=sceKernelStartThread(443, 4, 08d44808)
08:56:465 game I[SCEKERNEL]: HLE/sceKernelThread.cpp:2322 sceKernelTerminateDeleteThread(443)
09:00:364 game I[SCEIO]: HLE/sceIo.cpp:1166 stdout: [i3NetworkContext::ConnectAdhoc] Start
09:00:434 game I[SCEIO]: HLE/sceIo.cpp:1166 stdout: [i3NetworkContext::CreateLobby] Start
09:00:434 game I[SCEIO]: HLE/sceIo.cpp:1166 stdout: [i3NetworkContext::CreateLobby] End
09:00:434 game I[SCEKERNEL]: HLE/sceKernelThread.cpp:2006 454=sceNetAdhocMatchingStart(1, 54, 7168, 54, 0, 56, 08bfab20)
09:00:434 game I[SCEKERNEL]: HLE/sceKernelThread.cpp:2104 0=sceNetAdhocMatchingStart(1, 54, 7168, 54, 0, 56, 08bfab20)
09:00:434 game I[SCEKERNEL]: HLE/sceKernelThread.cpp:2006 455=sceKernelCreateThread(Thread, 08946908, 00000020, 4096, 00000000, 00000000)
09:00:434 game I[SCEKERNEL]: HLE/sceKernelThread.cpp:2104 0=sceKernelStartThread(455, 4, 08d44808)

It seems like you will get an error if you try to run PPSSPP as sudo/admin: image

Vulcanus is still an issue only if you use Linux though (dunno about any other platforms) over localhost
1.12.3 stable and latest dev as of right now wont work.

@Casaandra
Copy link

Vulcanus Seek And Destroy is japanese only isn't? how to get to multiplayer?

Edit: nevermind, found it Hmm.. it's strange, just trying to host it will get timeout, and it stuck with 0/0 FPS unable to cancel/go back to previous menu.

This is where the issue is starting: image It first use blocking PdpRecv with infinite timeout on socket fd number 2 on thread "Thread" followed by non-bocking PdpRecv on socket fd number 1 (belonged to AdhocMatching) on thread "Thread"... if the thread supposed to be blocked it shouldn't be able to call another PdpRecv... unless it was a different thread but with the same name. Looked like an issue with blocking simulation or AdhocMatching (because current AdhocMatching is running on real thread instead of PSPThread)

Edit: That socket error 10014 seems to be the main issue, and it can be tricky as it's related to invalid buffer address or size. According to this https://stackoverflow.com/questions/861154/winsock-error-code-10014 Apparently Winsock doesn't like buffers to be located on the stack, there is also a possible issue related to memory address alignment.

I am actually having problem with SVR can you help me?I have upnp enabled port offset=10000 but still I cant play on public server with my friend.Why?It's also not showing network initialised option

@anr2me
Copy link
Collaborator

anr2me commented Apr 1, 2023

I am actually having problem with SVR can you help me?I have upnp enabled port offset=10000 but still I cant play on public server with my friend.Why?It's also not showing network initialised option

I'm not sure what SVR is, but you can try asking at PPSSPP's discord server for this kind of issue, may be someone there familiar with this SVR game.

You can also check the guide at wiki (in case you missed something) https://github.com/hrydgard/ppsspp/wiki/How-to-play-multiplayer-games-with-PPSSPP

PS: Usually, when it didn't shows "Network initialized" it will shows "Failed to connect to Adhoc Server" instead.

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

No branches or pull requests

4 participants