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

WIP: Broadband Adapter over Tcp (cross-compatible!) #7786

Open
wants to merge 5 commits into
base: master
from

Conversation

5 participants
@0xFEEDC0DE64
Copy link
Contributor

0xFEEDC0DE64 commented Feb 5, 2019

In this PR I implement a second Broadband adapter which uses tcp client/server architecture to communicate with other dolphin instances.

Should be easier to setup on Windows/Linux/Mac/Android than tun/tap vpn interfaces.

Server comes as standalone headless cmd line program or in the official DolphinQt gui (Tools -> Broadband Adapter Server)

Status: Implementation largly finished, doing cleanups and fixing MSVC build

image

image

@lioncash
Copy link
Member

lioncash left a comment

Our member variable naming coding style is: snake_case and our function naming scheme is CamelCase (with initialisms/abbreviations being uppercased).

Our file naming is also CamelCased as well, so they shouldn't be lowercased.

Show resolved Hide resolved Source/Core/Common/CMakeLists.txt Outdated
Show resolved Hide resolved Source/Core/Common/bbaclient.cpp Outdated
Show resolved Hide resolved Source/Core/Common/bbaclient.h Outdated
Show resolved Hide resolved Source/Core/Common/bbaclient.h Outdated
Show resolved Hide resolved Source/Core/Common/bbadebug.h Outdated
Show resolved Hide resolved Source/Core/DolphinQt/BbaServerWindow.cpp Outdated
Show resolved Hide resolved Source/Core/DolphinQt/BbaServerWindow.h Outdated
Show resolved Hide resolved Source/Core/DolphinQt/Config/BbaConfigWidget.cpp Outdated
Show resolved Hide resolved Source/Core/DolphinQt/Config/BbaConfigWidget.cpp Outdated
Show resolved Hide resolved Source/Core/DolphinQt/Config/BbaConfigWidget.h Outdated

@0xFEEDC0DE64 0xFEEDC0DE64 force-pushed the 0xFEEDC0DE64:bba-rewrite branch from d78ea45 to 4ceb652 Feb 6, 2019

Show resolved Hide resolved Source/Core/DolphinQt/Config/BBAConfigWidget.cpp Outdated
Show resolved Hide resolved Source/Core/DolphinQt/Config/BBAConfigWidget.cpp Outdated
qInfo().noquote() << logLine;
});

if(!server.Listen(QString(), 50000))

This comment has been minimized.

@Techjar

Techjar Feb 6, 2019

Contributor

This should probably accept the port as an argument rather than being hard-coded. Also ideally the server should not rely on Qt, so it can operate on headless servers without having to install a huge dependency that is mostly useless.

Show resolved Hide resolved Source/Core/Core/HW/EXI/EXI_DeviceEthernetTcp.cpp Outdated
Show resolved Hide resolved Source/Core/Core/HW/EXI/EXI_DeviceEthernetTap_Win32.cpp Outdated
Show resolved Hide resolved Source/Core/Core/HW/EXI/EXI_DeviceEthernetTcp.cpp Outdated
Show resolved Hide resolved Source/Core/DolphinQt/Config/BBAConfigWidget.cpp Outdated
Show resolved Hide resolved Source/Core/DolphinQt/Settings/GameCubePane.cpp Outdated
Show resolved Hide resolved Source/Core/DolphinQt/MenuBar.cpp Outdated
@@ -235,6 +235,8 @@ void SConfig::SaveCoreSettings(IniFile& ini)
core->Set("SlotB", m_EXIDevice[1]);
core->Set("SerialPort1", m_EXIDevice[2]);
core->Set("BBA_MAC", m_bba_mac);
core->Set("BBA_SERVER", m_bba_server);

This comment has been minimized.

@Techjar

Techjar Feb 6, 2019

Contributor

New configuration values should use onion config (the stuff in Common/Config/ and Core/ConfigLoaders/) rather than SConfig, as this interface is partially deprecated.

@container1234

This comment has been minimized.

Copy link
Contributor

container1234 commented Feb 7, 2019

Will it support games required to connect server such as PSO and Homeland?

@0xFEEDC0DE64

This comment has been minimized.

Copy link
Contributor Author

0xFEEDC0DE64 commented Feb 8, 2019

Will it support games required to connect server such as PSO and Homeland?

No it won't, my current server implementation doesn't do DHCP or routing (gateway to internet).
And TBH I think playing PSO is better with TAP and bridging, as it uses an IP provided by your home router and doesn't care for other gamecubes / dolphin instances.

@0xFEEDC0DE64 0xFEEDC0DE64 force-pushed the 0xFEEDC0DE64:bba-rewrite branch from f13843e to bac88f0 Feb 8, 2019

Show resolved Hide resolved Source/Core/Core/HW/EXI/EXI_DeviceEthernetTCP.h Outdated

#include "DolphinQt/BBAClient.h"

#include <QTcpSocket>

This comment has been minimized.

@lioncash

lioncash Feb 8, 2019

Member

These includes should be ordered alphabetically. Ditto for the DolphinQt ones below as well.

Show resolved Hide resolved Source/Core/Core/HW/EXI/EXI_DeviceEthernetTAP.h Outdated
Show resolved Hide resolved Source/Core/Core/HW/EXI/EXI_DeviceEthernetTAP_Win32.cpp Outdated

#include "DolphinQt/BBAServerWindow.h"

#include <QVBoxLayout>

This comment has been minimized.

@lioncash

lioncash Feb 8, 2019

Member

These includes should be ordered alphabetically

Show resolved Hide resolved Source/Core/Core/HW/EXI/EXI_DeviceEthernetTCP.cpp Outdated
Show resolved Hide resolved Source/Core/Core/HW/EXI/EXI_DeviceEthernetTCP.cpp Outdated
Show resolved Hide resolved Source/Core/Core/HW/EXI/EXI_DeviceEthernetTCP.cpp Outdated
Show resolved Hide resolved Source/Core/Core/HW/EXI/EXI_DeviceEthernetTCP.cpp Outdated
Show resolved Hide resolved Source/Core/Core/HW/EXI/EXI_DeviceEthernetTCP.cpp Outdated

@0xFEEDC0DE64 0xFEEDC0DE64 force-pushed the 0xFEEDC0DE64:bba-rewrite branch 2 times, most recently from 2860d1f to ee891e6 Feb 9, 2019

@0xFEEDC0DE64 0xFEEDC0DE64 force-pushed the 0xFEEDC0DE64:bba-rewrite branch from ee891e6 to 549b3eb Feb 15, 2019

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