Preliminary implementation of the GBA wireless adapter using TCP (based on the IPC version).

This commit is contained in:
skidau 2015-04-14 10:21:27 +00:00
parent c75c53d898
commit 14d94c32f6
3 changed files with 1309 additions and 120 deletions

File diff suppressed because it is too large Load Diff

View File

@ -10,6 +10,7 @@ enum LinkMode
LINK_CABLE_IPC,
LINK_CABLE_SOCKET,
LINK_RFU_IPC,
LINK_RFU_SOCKET,
LINK_GAMECUBE_DOLPHIN,
LINK_GAMEBOY
};
@ -186,10 +187,7 @@ extern const char *MakeInstanceFilename(const char *Input);
typedef struct {
u8 len; //data len in 32bit words
u8 idx; //client idx
u8 gbaid; //source id
u8 qid; //target ids
u32 sign; //signal
u32 time; //linktime
u32 data[255];
} rfu_datarec;

View File

@ -73,6 +73,7 @@ BOOL LinkOptions::OnInitDialog(){
AddMode("Cable - Network", LINK_CABLE_SOCKET);
AddMode("GameCube - Dolphin", LINK_GAMECUBE_DOLPHIN);
AddMode("Wireless adapter - Single Computer", LINK_RFU_IPC);
AddMode("Wireless adapter - Network", LINK_RFU_SOCKET);
AddMode("Game Link (Game Boy) - Single Computer", LINK_GAMEBOY);
sprintf(timeout, "%d", theApp.linkTimeout);
@ -162,7 +163,7 @@ void LinkOptions::OnOk()
return;
}
bool needsServerHost = newMode == LINK_GAMECUBE_DOLPHIN || (newMode == LINK_CABLE_SOCKET && !m_server);
bool needsServerHost = newMode == LINK_GAMECUBE_DOLPHIN || (newMode == LINK_CABLE_SOCKET && !m_server) || (newMode == LINK_RFU_SOCKET && !m_server);
if (needsServerHost) {
bool valid = SetLinkServerHost(host);
@ -307,8 +308,8 @@ void LinkOptions::OnCbnSelchangeLinkMode()
void LinkOptions::UpdateAvailability()
{
bool isDisconnected = m_type == LINK_DISCONNECTED;
bool isNetwork = m_type == LINK_CABLE_SOCKET;
bool canHaveServer = (m_type == LINK_CABLE_SOCKET && !m_server) || m_type == LINK_GAMECUBE_DOLPHIN;
bool isNetwork = (m_type == LINK_CABLE_SOCKET) || (m_type == LINK_RFU_SOCKET);
bool canHaveServer = (m_type == LINK_CABLE_SOCKET && !m_server) || (m_type == LINK_RFU_SOCKET && !m_server) || m_type == LINK_GAMECUBE_DOLPHIN;
bool hasHacks = m_type == LINK_CABLE_SOCKET;
GetDlgItem(IDC_LINK_CLIENT)->EnableWindow(isNetwork);