ARMSX2 like RPCS3: front-end launches, first-time setup, PCSX2 settings, 16K pages; on-screen controls everywhere

- From the rail ARMSX2 starts the game in its full-screen, controller-driven UI
  and exits with it (-batch -bigpicture -fullscreen).
- bannerlator-pad-defaults: a PCSX2 player's settings and memory cards are
  copied into ARMSX2 once; a new player starts on ARMSX2's first-time setup with
  the BIOS folder in the ROMs folder (ps2/bios, created, or ps2/firmware), the
  ps2 folder as the game list and the controller on Player 1; the guide button
  opens the pause menu (how a rail game is left) instead of toggling analog.
  Users bring their own BIOS and games.
- The catalog can name a file per memory page size ("pages"); the device's own
  size picks it (ARMSX2 has 4K and 16K builds).
- On-screen controls: Auto keeps them off the desktop (the screen is a touchpad
  there) and shows them for rail games and Steam when no controller is
  connected; the drawer offers the setting in every session.
This commit is contained in:
The412Banner committed 2026-09-24 04:29:57 -04:00
1 parent c942cf2652
commit 4ef3bc92de
5 files changed
+96 -12

No files matched your search

@@ -885,7 +885,10 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback {
SessionPrefs.OSC_ALWAYS -> true
SessionPrefs.OSC_STEAM_QAM -> true
SessionPrefs.OSC_NEVER -> false
else -> !PadBridge.anyControllerConnected()
// Auto: the touch pad when there is no controller - except on the desktop, where the
// screen is a touchpad for the pointer and a pad over it would be in the way. A game
// started from the rail, or Steam, gets it; the drawer turns it on anywhere.
else -> !PadBridge.anyControllerConnected() && SessionState.mode != SessionService.MODE_DESKTOP
}
if (show == (controls.visibility == View.VISIBLE)) return
if (!show) controls.releaseAll()
@@ -170,6 +170,9 @@ object Library {
/** How the emulator is told which game to boot, on its command line. */
fun launchArgs(emulatorId: String, guestPath: String): List<String> = when (emulatorId) {
"rpcs3" -> listOf("--no-gui", guestPath)
// Straight into the game in its controller-driven full-screen UI (first-time setup there
// too), and gone when the game is quit from its pause menu (guide button): -batch.
"armsx2" -> listOf("-batch", "-bigpicture", "-fullscreen", "--", guestPath)
"dolphin" -> listOf("-e", guestPath)
"cemu" -> listOf("-g", guestPath)
else -> listOf(guestPath)
@@ -31,12 +31,18 @@ object DesktopCatalog {
return try {
val json = JSONObject(body)
val arr = json.getJSONArray("packages")
// A package built per memory page size (ARMSX2: 4K and 16K kernels) names the others
// under "pages"; the device's own size picks one, and the top-level file is the 4K one.
val pageSize = try {
android.system.Os.sysconf(android.system.OsConstants._SC_PAGESIZE).toString()
} catch (e: Exception) { "4096" }
(0 until arr.length()).map { i ->
val o = arr.getJSONObject(i)
val file = o.optJSONObject("pages")?.optJSONObject(pageSize) ?: o
Entry(
o.getString("id"), o.getString("name"), o.optInt("tier", 1), o.optString("version", ""),
o.optString("kind", "tar"), o.getString("url"), o.optString("sha256", ""),
o.optLong("size", 0L), o.optString("notes", ""),
o.optString("kind", "tar"), file.getString("url"), file.optString("sha256", ""),
file.optLong("size", 0L), o.optString("notes", ""),
o.optString("icon", "applications-games"), o.optString("category", "Game"),
)
}
@@ -318,9 +318,11 @@ fun SessionDrawer(open: Boolean, a: DrawerActions) {
listOf(SessionPrefs.TOUCH_AUTO to "Auto (${a.touchAuto})", SessionPrefs.TOUCH_PAD to "Touchpad", SessionPrefs.TOUCH_DIRECT to "Direct"), a.touchMode,
onPick = a.onTouch,
)
if (a.steam) ChoiceRow(
ChoiceRow(
host, "osc", "On-screen controls", null,
listOf(SessionPrefs.OSC_AUTO to "Auto", SessionPrefs.OSC_ALWAYS to "Always", SessionPrefs.OSC_STEAM_QAM to "Steam + QAM", SessionPrefs.OSC_NEVER to "Never"), a.oscMode,
if (a.steam) listOf(SessionPrefs.OSC_AUTO to "Auto", SessionPrefs.OSC_ALWAYS to "Always", SessionPrefs.OSC_STEAM_QAM to "Steam + QAM", SessionPrefs.OSC_NEVER to "Never")
else listOf(SessionPrefs.OSC_AUTO to "Auto", SessionPrefs.OSC_ALWAYS to "Always", SessionPrefs.OSC_NEVER to "Never"),
a.oscMode,
onPick = a.onOsc,
)
SettingsRow("Keyboard", null) {