Implement GC modem adapter

This implements the GameCube modem adapter. This implementation is stable but not perfect; it drops frames if the receive FIFO length is exceeded. This is probably due to the unimplemented interrupt mentioned in the comments. If the tapserver end of the connection is aware of this limitation, it's easily circumvented by lowering the MTU of the link, but ideally this wouldn't be necessary.

This has been tested with a couple of different versions of Phantasy Star Online, including Episodes 1 & 2 Trial Edition. The Trial Edition is the only version of the game that supports the Modem Adapter and not the Broadband Adapter, which is what made this commit necessary in the first place.
This commit is contained in:
Martin Michelsen
2023-12-02 23:37:28 -08:00
parent 083116a89c
commit 02deaa6748
14 changed files with 954 additions and 7 deletions

View File

@ -29,6 +29,12 @@ enum class StringSetting(
"BBA_TAPSERVER_DESTINATION",
"/tmp/dolphin-tap"
),
MAIN_MODEM_TAPSERVER_DESTINATION(
Settings.FILE_DOLPHIN,
Settings.SECTION_INI_CORE,
"MODEM_TAPSERVER_DESTINATION",
"/tmp/dolphin-modem-tap"
),
MAIN_CUSTOM_RTC_VALUE(
Settings.FILE_DOLPHIN,
Settings.SECTION_INI_CORE,

View File

@ -1121,6 +1121,16 @@ class SettingsFragmentPresenter(
R.string.bba_builtin_dns_description
)
)
} else if (serialPort1Type == 13) {
// Modem Adapter (tapserver)
sl.add(
InputStringSetting(
context,
StringSetting.MAIN_MODEM_TAPSERVER_DESTINATION,
R.string.modem_tapserver_destination,
R.string.modem_tapserver_destination_description
)
)
}
}

View File

@ -135,6 +135,8 @@
<string name="xlink_kai_bba_ip_description">IP address or hostname of device running the XLink Kai client</string>
<string name="bba_tapserver_destination">Tapserver destination</string>
<string name="bba_tapserver_destination_description">Enter the socket path or netloc (address:port) of the tapserver instance</string>
<string name="modem_tapserver_destination">Tapserver destination</string>
<string name="modem_tapserver_destination_description">Enter the socket path or netloc (address:port) of the tapserver instance</string>
<string name="bba_builtin_dns">DNS Server</string>
<string name="bba_builtin_dns_description">Use 8.8.8.8 for normal DNS, else enter your custom one</string>