mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-04-24 21:56:10 +03:00
[GH-ISSUE #4490] Some sort of Netplay functionality with WinPCap #1832
Labels
No labels
Atrac3+
Audio
CPU emulation
D3D11
D3D9 (removed)
Depth / Z
Feature Request
Font Atlas
GE emulation
Guardband / Range Culling
HLE/Kernel
I/O
Input/Controller
MP3
Multithreading
Needs hardware testing
Networking/adhoc/infrastructure
No Feedback / Outdated?
OpenGL
PGF / sceFont
PSMF / MPEG
Platform-specific (Android)
Platform-specific (Windows)
Platform-specific (iOS)
PowerVR GPU
SDL2
Saving issue
User Interface
Vulkan
arm64jit
armjit
armv6
x86jit
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/ppsspp#1832
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @sooyong94 on GitHub (Nov 10, 2013).
Original GitHub issue: https://github.com/hrydgard/ppsspp/issues/4490
Is it possible to implement some kind of netplay functionality through a software AP, for example WinPCap? Some emulators like Desmume has been implementing such features.
http://forum.romulation.net/index.php?topic=54397.0
@hrydgard commented on GitHub (Nov 10, 2013):
Don't think there's any need for winpcap actually. We do need to implement all the networking stuff though.
@Ritori commented on GitHub (Nov 10, 2013):
Igorcalabria implement network stuff now.
https://github.com/igorcalabria/ppsspp/tree/adhoc-support
You can only wait, for now it can compiler for linux.
@CPkmn commented on GitHub (Nov 10, 2013):
@Ritori https://github.com/igorcalabria/ppsspp/tree/adhoc-support-windows
Also for windows, although the linux version is more up to date with his work. If you can build it yourself though, you can add the more recent updates to your local build.
I'm not sure if it's just me (I have modified build settings) or if its a problem with the code, but it crashes on the first send() and recv() in __friendFinder() while debugging...I can debug past that but I don't think I should have to. If I'm not debugging there's no crashing from it.
@Ritori commented on GitHub (Nov 10, 2013):
@CPkmn Nice :)
I still can't compile after i merge both those branch, dunno what you change in code maybe you comment there? to help he out :D
@CPkmn commented on GitHub (Nov 10, 2013):
I changed nothing and it compiled. Did you check the linux version by mistake?
@Ritori commented on GitHub (Nov 10, 2013):
I think i merge both adhoc-support and adhoc-window-support maybe that is problem, Thank i will try again :)
@CPkmn commented on GitHub (Nov 10, 2013):
yeah, that would cause a problem because you're not doing it manually.
Merging adhoc-support-windows is fine, but to get newer changes from adhoc-support you need to merge it manually (eg copy+paste only the relevant changes) since the base files aren't exactly the same.
The problem is, merging adhoc-support will overwrite the windows compatibility adjustments.
I mean, I changed some things after merging it but the crashing in debug mode happened before and after my changes.
@Ritori commented on GitHub (Nov 10, 2013):
So need manually to get newer version? You already do that and it work okay? I dunno how to doing that cause my low INT skill about programmer stuff :P
@LunaMoo commented on GitHub (Nov 10, 2013):
Doesn't crash for me, both release and debug builds seem to work fine(at least in MH series) althrough I had to change
#include <thread>and#include <mutex>to#include <thread.h>and#include <base/mutex.h>in sceNetAdhoc.cpp to build it successfully. It's set to connect with localhost anyway from what my firewall says and I didn't even compiled the server, so it get's connection error. BTW about server - is that the "eclipse server" thing that ColdBird mentions somewhere or I'm just confused?:p And if it is, anyone compiled it on windows or it's really linux only?:3 I only have SliTaz on some laptop, so being linux noob that's where my testing takes a break.^_^@Ritori commented on GitHub (Nov 10, 2013):
I can't build ever i only merge adhoc-support-windows 6 successfuly 4 fail :I maybe i doing something wrong?
Ohh LunaMoo where i should change that #include ? o.o?
I think it really a issue https://code.google.com/p/aemu/issues/detail?id=1
Edit:- Thank you LunaMoo :P it build now
@LunaMoo commented on GitHub (Nov 10, 2013):
;3 Glad you managed it, after I added recent changes from linux repo only
#include <thread>had to be changed and seem to work same.And nice find, there's a patch for windows on this issue you linked;p, don't have make for windows, and no time to look around now, but whole thing looks more and more promising^_^, thanks to ColdBird and IgorCalabria.
@Ritori commented on GitHub (Nov 10, 2013):
Ohh thank you, hope that will help some people that interesting with this net implement stuff :D
@bollu commented on GitHub (Nov 10, 2013):
I've actually taken up AEMU integretion. Unfortunately, it's been a really slow and painful process as I haven't done a lot of network programming. It's coming along though :)
@unknownbrackets commented on GitHub (Nov 10, 2013):
@bollu you have seen @igorcalabria's work, right?
-[Unknown]
@bollu commented on GitHub (Nov 10, 2013):
Nope, I haven't. checking it out right now.
EDIT: Whoa, I didn't know he was doing it too :) Guess I'll contribute to his fork in that case (should make the merge to the main master much less painful). Thats fior the tip @unknownbrackets !
@Ritori commented on GitHub (Nov 10, 2013):
@bollu maybe you can improve windows port or android port :D @igorcalabria work focus on linux version for now though.
@bollu commented on GitHub (Nov 10, 2013):
I usually use an android phone for testing. Don't develop on windows after some terrible experiences.... So yeah, I can handle the mobile side of things :)
@Ritori commented on GitHub (Nov 10, 2013):
@bollu Nice, good luck can't wait for result ^^
@igorcalabria commented on GitHub (Nov 12, 2013):
@bollu, please let me know if you have any questions about the repository.
@Kyhel commented on GitHub (Nov 20, 2013):
@igorcalabria Hi, i must say i really appreciate the work you've done here. I was wondering, when you tested it with a local server of Pro Online, did you just compiled the code in the pspnet_adhocctl_server of aemu code ? That's what i did but when i connect to it with 2 computers one the same LAN with MHFU on ppsspp, i can't see each other (although when i leave the room once, i get a "left" message but with the pseudo of my character, not the one who left). Plus, on the console of the server, when i connect my 2 computers to it, they have the same MAC address, 01:02:03:04:05:06, i'm still trying to know why. I also tried to connect to coldbird.uk.to, and it works, i can see the other players, but can't get into a quest with them. So i just wanted to know how you did manage to get to connect your psp and emulator to get into a quest together with your local server.
Can't wait for it to be complete :D
@igorcalabria commented on GitHub (Nov 20, 2013):
@Kyhel, Thanks for the support man.
Ok, you made me realize that I really need to update the readme. I'm using a slightly modified version of psnet_adhocctl_server to test it locally, cause if the server is running on the same computer as the emulator, the emulator instance will be asgined the 127.0.0.1 ip and the psp won't be able to send to that address(since it's just the loopback). Also the MAC is hardcoded for now, I was too lazy to add a config for it. Oh, and you can't really play with players outside your network, because the upnp stuff is still missing. Maybe you could see which ports are being used by the game and forward them manually on your router.
@Kyhel commented on GitHub (Nov 20, 2013):
@igorcalabria Actually i'm in an engineering school and we all share the same router to access the internet, that's why i tried to setup my own local server, i can't modify the router, and i discussed with the admin, even with complete port of Pro Online we may not be able to connect to it anyway. I built the server on my macbook, and connected to it via 2 different Pc, which still gives me the same result that when i used only one Pc and the other emulator on the macbook alone with the server : i can connect to it, but i can't see each other and when i leave the gathering hall, it says "pseudo has left", but not with the right pseudo like i explained. But yet, could you give me an hint on what to modify on the server ? (Since like you say it is supposed to work with the actual port in ppssp). Actually i just want to play with my friend with MHFU, and since i'm really interested in network programming, i'm not afraid of spending some time trying to get things work ^^
PS : since our wifi routers are WPA2 protected, i can't get my psp to connect to it, but i share the ethernet connection with wifi to my psp to connect to it. Yet i don't know if i can communicate with the emulator that way, but only 2 emulators on PC working with the server on my macbook will be fine for me :)
EDIT: I think i figured out what you said by "hardcoded, the emulator gives himself a fixed MAC address (i just managed to connect my psp on my server on the macbook), so i guess i'ld have to give the server the right mac instead of a fixed one. (that may be the reason why the "connect" messages are not sent to the other emulator)
EDIT2 : I finally managed to get into a quest with my emulator(on the same computer than the server) and my psp, with the unmodified server, with internet sharing on my mac, psp server set to connect to the ip address of my mac in my school's network, and 192.168.2.1(address of my virtual mac wifi access point) for the emulator. I did the quest (it crashes when i try to save at the end of a quest though, maybe if i put your changes in the latests build of hrydgard repository it'll work). It also works with my pc sharing the same wifi from the mac, and the psp, but still not with both emulator, the server seems not to be able to differentiate both of them, even after putting another random mac address. Do you have any idea why the server can differentiate the emulator on my mac (along with the server) from the psp, the emulator on the pc from the psp, but not differentiate both emulators ?
EDIT3 : I merged the latests modifications you made on the windows brand into the linux/mac branch, modified the MAC address for one of the builds (i realized they were 2 places where to change it). I can now get into the gathering hall, but the windows build still disconnects when launching the quest. (Beside adding some configuration (or just getting the real mac address of the device), there is not much more to do for 2 emulators to play locally together thanks to the amazing job you did) :D And it still can't save once sceUtilityNetconfUpdate (called when an online thing is started) has been called, i don't know why, but sceUtilityNetconfShutdown is not called.
@Kyhel commented on GitHub (Nov 22, 2013):
Hi, i must say when i have something in mind i don't easily give up :P So i've changed a little bit the code in the PSPNetconfDialog.cpp in the Update method, i've replaced :
return sceNetAdhocctlCreate(request.NetconfData->groupName)
by :
if(sceNetAdhocctlCreate(request.NetconfData->groupName) == 0)
{
status = SCE_UTILITY_STATUS_FINISHED;
return 0;
}
return -1;
I don't know why you split the Init in 2 parts, the init, and the update, unlike in aemu code, but whatever, my fix seems to have fixed the problem with the lock on the dialog and we're now able to save after an online wandering.
In my opinion we can say, with both mac and linux os, the MHFU port of proOnline, is fully fonctionnal LOCALY, i still need to understand why the connection drops with the windows version and i'm done ^^
If you have any idea why it breaks i'ld be glad to hear it, i can't wait to play with my friend :D
PS : With setting the "proAdhocServer" to the local ip adress of my computer (not 127.0.0.1) the server running on the same machines adresses the emulator the same ip, and since the server and emulator port are different there is no problem. No need to modify the server from the aemu repo.
EDIT : Using the debug menu i've investigated a little bit. I've launched the 2 emulators (1 on the pc, 1 on the mac along with the server) and my psp in a quest, and only the pc disconnected from the 2 others, while they finished the quest together (but in the end they still have been able to meet up in the gathering hall). I've looked at the connecting process when launching the quest on my mac, i have :
sceKernelVolatileMemLock(...)
sceNetAdhocPtpOpen(....)
sceNetAdhocPtpOpen(....)
sceNetAdhocPtpClose(1,0)
sceNetAdhocPtpOpen(....)
sceNetAdhocPdpCreate(...)
And then the quest started (after 30s, waiting for the pc to drop, he was bloquing the quest launching process i guess)
While on the pc i have :
sceNetAdhocPtpListen(...)
sceNetAdhocPtpAccept(1,,43xx,0,1) like 25 times, and then
sceNetAdhocPtpOpen(....)
sceNetAdhocPtpAccept(....)
sceNetAdhocPtpClose(2,0)
and over and over again with the
sceNetAdhocPtpAccept(1,,43xx,0,1) like 25 times, and then
sceNetAdhocPtpOpen(....)
sceNetAdhocPtpAccept(....)
sceNetAdhocPtpClose(2,0)
and it ends with
sceNetAdhocPtpClose(1,0)
sceNetAdhocPtpOpen(....)
sceNetAdhocPtpClose(1,0)
sceNetAdhocPdpCreate(...)
sceNetAdhocPdpDelete(...)
I really don't understand a thing to that, but i can see there is a problem with the Ptp (even though i don't know what it is).
The sames kind of things happens when i don't plug in the psp, but i have a some sceNetAdhocPtpAccept(...) on the mac too then.
Anyone has an idea of what could be wrong here ? And how to fix it ? It would make the proOnline port complete for local purposes with both windows/mac/linux/psp compatibility :D
@vnctdj commented on GitHub (Nov 22, 2013):
Why not creating a pull request to igorcalabria's repository ?
@Kyhel commented on GitHub (Nov 22, 2013):
First reason, i really don't know how this thing work. Second reason it's just a little fix i've managed to find, after hours trying to understand this whole thing, so i don't think i'll be able to contribute in any other way for this (only if i find what makes windows build disconnect from the quest). I'm really not a network programmer, i just try to be able to play with my friend. And i've posted a reply on http://forums.ppsspp.org/showthread.php?tid=3595&page=11 explaining how far (even if it's just a little) i've been wandering into this code :)
That's not that i dont want to, but i don't think it'ld be a thing for @igorcalabria when he finds the time, to just add those 4 lines to a commit from him ^^'
@vnctdj commented on GitHub (Nov 23, 2013):
No problem, my question wasn't only addressed to you, maybe someone else can do this :)
Anyway, nice work Kyhel :)
@Kyhel commented on GitHub (Nov 23, 2013):
I've just found how to get the windows version work, and i've posted it on the forum (edited my post and informed with a new reply). Since i really wanted to play with my friends i'll just do that for the moment, but i'll try to get a unified version windows/mac as soon as i can with improvements to help @igorcalabria , and figure out how to pull it here ;)
@vnctdj commented on GitHub (Nov 23, 2013):
Glad to hear that :)
Keep up the good work ! ;)
@unknownbrackets commented on GitHub (Jan 20, 2015):
Is this still relevant? I mean, we have other bugs for network stuff, and I don't think we want/need to use winpcap.
-[Unknown]
@vnctdj commented on GitHub (Jan 20, 2015):
I think we should answer to that :
What would be the benefits/drawbacks to use WinPcap ? Could it be useful for PPSSPP ?
@Bigpet commented on GitHub (Jan 20, 2015):
I don't know what we would use winpcap for. I mean you could use it outside of ppsspp with tools like wireshark but I think we should just do the tooling around networking without an extra library, just with bsd sockets.
@unknownbrackets commented on GitHub (Jan 20, 2015):
I guess the benefit of winpcap would be emulating a protocol other than tcp/udp/etc. However, I don't think the psp uses any such protocols.
-[Unknown]
@hrydgard commented on GitHub (Feb 28, 2017):
Probably no longer relevant, closing.