Android: Add Triforce Baseboard

This lets users select Triforce Baseboard for SI and SP1. Limitations:

* The test, service and coin buttons can be bound to gamepads and other
  physical inputs, but aren't available in the touch input overlay.
* The IP redirections are exposed to the user as a raw string rather than
  a table like in DolphinQt.
This commit is contained in:
JosJuice
2026-02-07 11:03:11 +01:00
committed by Jordan Woyak
parent c28ec7a6d3
commit 051133787e
5 changed files with 31 additions and 4 deletions

View File

@@ -69,6 +69,12 @@ enum class StringSetting(
""
),
MAIN_WFS_PATH(Settings.FILE_DOLPHIN, Settings.SECTION_INI_GENERAL, "WFSPath", ""),
MAIN_TRIFORCE_IP_REDIRECTIONS(
Settings.FILE_DOLPHIN,
Settings.SECTION_INI_CORE,
"TriforceIPRedirections",
"0.0.0.0/0=127.0.0.1"
),
GFX_ENHANCE_POST_SHADER(
Settings.FILE_GFX,
Settings.SECTION_GFX_ENHANCEMENTS,

View File

@@ -1276,7 +1276,17 @@ class SettingsFragmentPresenter(
}
private fun addSerialPortSubSettings(sl: ArrayList<SettingsItem>, serialPort1Type: Int) {
if (serialPort1Type == 10) {
if (serialPort1Type == 6) {
// Triforce Baseboard
sl.add(
InputStringSetting(
context,
StringSetting.MAIN_TRIFORCE_IP_REDIRECTIONS,
R.string.triforce_ip_redirections,
0
)
)
} else if (serialPort1Type == 10) {
// Broadband Adapter (XLink Kai)
sl.add(HyperLinkHeaderSetting(context, R.string.xlink_kai_guide_header, 0))
sl.add(
@@ -2352,7 +2362,7 @@ class SettingsFragmentPresenter(
private fun addGcPadSubSettings(sl: ArrayList<SettingsItem>, gcPadNumber: Int, gcPadType: Int) {
when (gcPadType) {
6, 8, 9, 10 -> {
6, 8, 9, 10, 11 -> {
// Emulated
val gcPad = EmulatedController.getGcPad(gcPadNumber)

View File

@@ -2285,6 +2285,7 @@ class InputOverlay(context: Context?, attrs: AttributeSet?) : SurfaceView(contex
const val OVERLAY_NONE = 5
private const val DISABLED_GAMECUBE_CONTROLLER = 0
private const val EMULATED_GAMECUBE_CONTROLLER = 6
private const val EMULATED_AM_BASEBOARD = 11
private const val GAMECUBE_ADAPTER = 12
// Buttons that have special positions in Wiimote only
@@ -2337,8 +2338,11 @@ class InputOverlay(context: Context?, attrs: AttributeSet?) : SurfaceView(contex
if (controllerIndex in 0 until 4) {
// GameCube controller
if (getSettingForSIDevice(controllerIndex).int == 6)
return OVERLAY_GAMECUBE
when (getSettingForSIDevice(controllerIndex).int) {
EMULATED_GAMECUBE_CONTROLLER, EMULATED_AM_BASEBOARD -> {
return OVERLAY_GAMECUBE
}
}
} else if (controllerIndex in 4 until 8) {
// Wii Remote
val wiimoteIndex = controllerIndex - 4

View File

@@ -105,6 +105,7 @@
<item>@string/broadband_adapter_hle</item>
<item>@string/broadband_adapter_tapserver</item>
<item>@string/modem_adapter_tapserver</item>
<item>@string/sp1_am_baseboard</item>
</string-array>
<integer-array name="serialPort1DeviceValues">
<item>255</item>
@@ -113,6 +114,7 @@
<item>12</item>
<item>11</item>
<item>13</item>
<item>6</item>
</integer-array>
<!-- Wii System Languages -->
@@ -375,6 +377,7 @@
<item>@string/gcpad_steering_wheel</item>
<item>@string/gcpad_dance_mat</item>
<item>@string/gcpad_taru_konga</item>
<item>@string/gcpad_am_baseboard</item>
<item>@string/gcpad_gc_adapter</item>
</string-array>
<integer-array name="gcpadTypeValues">
@@ -384,6 +387,7 @@
<item>8</item>
<item>9</item>
<item>10</item>
<item>11</item>
<item>12</item>
</integer-array>

View File

@@ -142,6 +142,7 @@
<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>
<string name="triforce_ip_redirections">IP Redirections</string>
<!-- Interface Preference Fragment -->
<string name="interface_submenu">Interface</string>
@@ -707,6 +708,7 @@ It can efficiently compress both junk data and encrypted Wii data.
<string name="broadband_adapter_hle">Broadband Adapter (HLE)</string>
<string name="broadband_adapter_tapserver">Broadband Adapter (tapserver)</string>
<string name="modem_adapter_tapserver">Modem Adapter (tapserver)</string>
<string name="sp1_am_baseboard">Triforce Baseboard</string>
<!-- Sound Mode -->
<string name="sound_mode_mono">Mono</string>
@@ -811,6 +813,7 @@ It can efficiently compress both junk data and encrypted Wii data.
<string name="gcpad_steering_wheel">Steering Wheel</string>
<string name="gcpad_dance_mat">Dance Mat</string>
<string name="gcpad_taru_konga">DK Bongos</string>
<string name="gcpad_am_baseboard">Triforce Baseboard</string>
<string name="gcpad_gc_adapter">GameCube Adapter</string>
<!-- Wiimote Types -->