RPCS3 / rpcs3

PlayStation 3 emulator and debugger
https://rpcs3.net/
GNU General Public License v2.0
15.44k stars 1.92k forks source link

[Feature Request] xlink kai support #11575

Open sonikku opened 2 years ago

sonikku commented 2 years ago

Please do not ask for help or report compatibility regressions here, use RPCS3 Discord server or forums instead.

Quick summary

Ability for RPCS3 to interact with the xlink kai application.

Details

xlink now supports a protocol for direct interaction with the engine running on the same system.

1. Please describe, what part of RPCS3 would be affected by your feature:

2. Please tell us, why your feature is important to RPCS3.

This would make LAN play with actual consoles possible.

3. Please attach screenshots of the feature implemented in other projects.

The Gamecube emulator Dolphin has this feature. image

4. Please provide your system configuration:

Please include.

Dolphin is using kai's DDS Protocol to communicate with it. Link explaining it; https://www.teamxlink.co.uk/wiki/DDS_Protocol

clienthax commented 2 years ago

This seems to be a raw ethernet device, we don't actually implement that in rpcs3 yet so I'm not sure how well this would work

LeRutY commented 2 years ago

Please consider adding that network feature

clienthax commented 2 years ago

Sure, we just need to know how the entire ps3 lv2+1 network stack works, which we currently don't

teamxlink-dev commented 1 year ago

Sure, we just need to know how the entire ps3 lv2+1 network stack works, which we currently don't

If this gets added let us know :)

teamxlink-dev commented 1 year ago

Hey all!

I am super burnt out (as is most of the team) so the XLink Kai integration we had planned for RPCS3 will be very, very delayed. If someone wants to try and implement it themselves please do. We can walk you through how to use Kai's DDS system and can explain how I was going to implement it in RPCS3.

A possible implementation:

  1. If the user has enabled XLink Kai DDS in the RPCS3 settings (and maybe defined the IP for the kai client if not using discovery) then the socket calls in https://github.com/RPCS3/rpcs3/blob/master/rpcs3/Emu/Cell/lv2/sys_net/lv2_socket_native.cpp need to be swapped out for LwIP's sockets https://savannah.nongnu.org/projects/lwip/
  2. Implement Kai DDS https://www.teamxlink.co.uk/wiki/DDS_Protocol as an ethernet device in LwIP, use a PS3 MAC OUI to assign a random MAC address (A8:E3:EE:xx:xx:xx), use the DHCP client in LwIP (A DDS implementation example; https://github.com/dolphin-emu/dolphin/pull/8853 but it doesn't implement kaiEngine discovery)
  3. Magic occurs, Kai sees it as a PS3 and the players are happy

What is Kai DDS? In short it is a simple text-based protocol to interact with kaiEngine over a UDP socket and exchange ethernet frames.

Why use LwIP? Their IP stack and socket implementation is relatively easy to use and does exactly what is needed for this.

Why use a specific MAC OUI? Kai filters LAN traffic in many ways before it is sent to other players, the first step is filtering on known MAC address OUIs. If you don't use one of our known ranges then Kai will ignore all ethernet frames you give it.

If you have questions and we are unresponsive here please email support[at]teamxlink.co.uk

sonikku commented 9 months ago

Any updates on this feature?