From 02deaa6748c44ffb2a370e4fadc8633a2ed25ac1 Mon Sep 17 00:00:00 2001 From: Martin Michelsen Date: Sat, 2 Dec 2023 23:37:28 -0800 Subject: 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. --- .../dolphinemu/features/settings/model/StringSetting.kt | 6 ++++++ .../features/settings/ui/SettingsFragmentPresenter.kt | 10 ++++++++++ 2 files changed, 16 insertions(+) (limited to 'Source/Android/app/src/main/java/org') diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/model/StringSetting.kt b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/model/StringSetting.kt index 8dc9e619c5..f959764564 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/model/StringSetting.kt +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/model/StringSetting.kt @@ -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, diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsFragmentPresenter.kt b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsFragmentPresenter.kt index a0de70a723..a3ec018b46 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsFragmentPresenter.kt +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsFragmentPresenter.kt @@ -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 + ) + ) } } -- cgit v1.2.3