Preliminary implementation of the GBA wireless adapter using TCP (based on the IPC version).
This commit is contained in:
parent
c75c53d898
commit
14d94c32f6
1406
src/gba/GBALink.cpp
1406
src/gba/GBALink.cpp
File diff suppressed because it is too large
Load Diff
|
@ -10,6 +10,7 @@ enum LinkMode
|
||||||
LINK_CABLE_IPC,
|
LINK_CABLE_IPC,
|
||||||
LINK_CABLE_SOCKET,
|
LINK_CABLE_SOCKET,
|
||||||
LINK_RFU_IPC,
|
LINK_RFU_IPC,
|
||||||
|
LINK_RFU_SOCKET,
|
||||||
LINK_GAMECUBE_DOLPHIN,
|
LINK_GAMECUBE_DOLPHIN,
|
||||||
LINK_GAMEBOY
|
LINK_GAMEBOY
|
||||||
};
|
};
|
||||||
|
@ -186,10 +187,7 @@ extern const char *MakeInstanceFilename(const char *Input);
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
u8 len; //data len in 32bit words
|
u8 len; //data len in 32bit words
|
||||||
u8 idx; //client idx
|
|
||||||
u8 gbaid; //source id
|
u8 gbaid; //source id
|
||||||
u8 qid; //target ids
|
|
||||||
u32 sign; //signal
|
|
||||||
u32 time; //linktime
|
u32 time; //linktime
|
||||||
u32 data[255];
|
u32 data[255];
|
||||||
} rfu_datarec;
|
} rfu_datarec;
|
||||||
|
|
|
@ -73,6 +73,7 @@ BOOL LinkOptions::OnInitDialog(){
|
||||||
AddMode("Cable - Network", LINK_CABLE_SOCKET);
|
AddMode("Cable - Network", LINK_CABLE_SOCKET);
|
||||||
AddMode("GameCube - Dolphin", LINK_GAMECUBE_DOLPHIN);
|
AddMode("GameCube - Dolphin", LINK_GAMECUBE_DOLPHIN);
|
||||||
AddMode("Wireless adapter - Single Computer", LINK_RFU_IPC);
|
AddMode("Wireless adapter - Single Computer", LINK_RFU_IPC);
|
||||||
|
AddMode("Wireless adapter - Network", LINK_RFU_SOCKET);
|
||||||
AddMode("Game Link (Game Boy) - Single Computer", LINK_GAMEBOY);
|
AddMode("Game Link (Game Boy) - Single Computer", LINK_GAMEBOY);
|
||||||
|
|
||||||
sprintf(timeout, "%d", theApp.linkTimeout);
|
sprintf(timeout, "%d", theApp.linkTimeout);
|
||||||
|
@ -162,7 +163,7 @@ void LinkOptions::OnOk()
|
||||||
return;
|
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) {
|
if (needsServerHost) {
|
||||||
bool valid = SetLinkServerHost(host);
|
bool valid = SetLinkServerHost(host);
|
||||||
|
@ -307,8 +308,8 @@ void LinkOptions::OnCbnSelchangeLinkMode()
|
||||||
void LinkOptions::UpdateAvailability()
|
void LinkOptions::UpdateAvailability()
|
||||||
{
|
{
|
||||||
bool isDisconnected = m_type == LINK_DISCONNECTED;
|
bool isDisconnected = m_type == LINK_DISCONNECTED;
|
||||||
bool isNetwork = m_type == LINK_CABLE_SOCKET;
|
bool isNetwork = (m_type == LINK_CABLE_SOCKET) || (m_type == LINK_RFU_SOCKET);
|
||||||
bool canHaveServer = (m_type == LINK_CABLE_SOCKET && !m_server) || m_type == LINK_GAMECUBE_DOLPHIN;
|
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;
|
bool hasHacks = m_type == LINK_CABLE_SOCKET;
|
||||||
|
|
||||||
GetDlgItem(IDC_LINK_CLIENT)->EnableWindow(isNetwork);
|
GetDlgItem(IDC_LINK_CLIENT)->EnableWindow(isNetwork);
|
||||||
|
|
Loading…
Reference in New Issue