Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

CTROLLER for Android 3DS: Difference between revisions

From GameBrew
Line 22: Line 22:
==Installation==
==Installation==
===Prerequisites===
===Prerequisites===
ctroller-3DS - You can use the [https://github.com/phijor/ctroller/releases/latest pre-built binaries] by phijor (3DSX or CIA).
* ctroller-3DS - You can use the [https://github.com/phijor/ctroller/releases/latest pre-built binaries] by phijor (3DSX or CIA).
 
* ctroller-android - You can use either the ELF binary, or the Android app.  
ctroller-android - You can use either the ELF binary, or the Android app.  
** Your phone must be rooted with a uinput enabled kernel. ARM(64) only.
 
** To run the server, the <code>uinput</code> kernel module needs to be loaded:
To run the server, the <code>uinput</code> kernel module needs to be loaded:
  $ modprobe uinput
  $ modprobe uinput


===Installing===
===Installing===
Create a directory <code>ctroller</code> in the root of your SD card.
On the 3DS:
 
* Create a directory <code>ctroller</code> in the root of your SD card.
Place <code>ctroller.cfg</code> in there and replace the IP with the one of your PC (the config file should now be at <code>sdmc:/ctroller/ctroller.cfg</code>).
* Place <code>ctroller.cfg</code> in there and replace the IP with the one of your PC (the config file should now be at <code>sdmc:/ctroller/ctroller.cfg</code>).


Install ctroller-3DS using either one of the following:
Install ctroller-3DS using either one of the following:

Revision as of 09:54, 6 December 2021

CTROLLER for Android
Ctrollerandroid2.png
General
Authorsuperl2
TypePC Utilities
Version0.1.3 alpha
LicenseMixed
Last Updated2018/01/29
Links
[binary+apk Download]
Website
Source

Ctroller-android is a program that lets you use your 3DS as an input device for your Android system via the uinput kernel module.

It consists of a client that runs on your 3DS, continously streaming the 3DS input data to a server on your Android device. The server exposes a virtual device to your system, interpretes the data it receives and writes it to a event node under /dev/input/event* or similar. The kernel gamepad input documentation can be found here.

This is a port of phijor's ctroller application to Android.

Note: To use this your phone must be rooted with a uinput enabled kernel. ARM(64) only.

Installation

Prerequisites

  • ctroller-3DS - You can use the pre-built binaries by phijor (3DSX or CIA).
  • ctroller-android - You can use either the ELF binary, or the Android app.
    • Your phone must be rooted with a uinput enabled kernel. ARM(64) only.
    • To run the server, the uinput kernel module needs to be loaded:
$ modprobe uinput

Installing

On the 3DS:

  • Create a directory ctroller in the root of your SD card.
  • Place ctroller.cfg in there and replace the IP with the one of your PC (the config file should now be at sdmc:/ctroller/ctroller.cfg).

Install ctroller-3DS using either one of the following:

  • CIA - Install .cia with the CIA-manager of your choice.
  • 3DSX - Copy .3dsx and .smdh to /3ds/ctroller/ on your SD card.

Install ctroller-android using either one of the following:

  • APK - With a simple UI.
  • ARM64 - Run ELF binary manually.

User guide

App version

Run the application and press start.

Launch the ctroller.3dsx or ctroller.cia application on your 3DS using a homebrew launcher of your choice.

ELF binary

Start the ELF binary manually by copying to a executable location (like /data/local/tmp/) and running:

$ ./ctroller


Flags if you manually run the binary:

 -d  --daemonize              execute in background
 -h  --help                   print this help text
 -p  --port=<num>             listen on port 'num' (defaults to 15708)
 -u  --uinput-device=<path>   uinput character device (defaults to /dev/uinput)
 -k  --keymap                 use a keymap file (if not set, ctroller will use the default keymap)


Then launch the ctroller.3dsx or ctroller.cia application on your 3DS using a homebrew launcher of your choice.

For development purposes, the 3DS-Makefile includes a run target that uses 3dslink to upload and run the application using the Homebrew Menu NetLoader.

Custom keymap file

To remap the buttons in a way you want, you need to create a file with a button label on each line. The default mapping is this:

A
B
X
Y
START
SELECT
L
R
ZL
ZR


To modify it, copy the above into a file, and swap keys around. The order is very important; any key in your custom keymap will override the default one on the same line.

To use this keymap with ctroller-android, use the -k option (see above).

For example, to change the layout to be more like an xbox, you can swap A and B; X and Y; R and ZR; and L and ZL. The keymap file will look like this:

B
A
Y
X
START
SELECT
ZL
ZR
L
R


Notes

This program is intended to be used in a private network.

For simplicity, the server right now accepts any connection on it's port, which might pose a security risk if others can send data to it.

This will be changed in future releases. For now, you probably shouldn't be using this in a public network.

Screenshots

ctrollerandroid3.png

Changelog

APK v0.1.3 2017/12/27

  • Add about page - Check if the native binary is already running on app launch, and if so, give an option to stop it.
  • Update native binary to release android-0.1.2 (buttons are now mapped like an xbox controller, fixed error logging) Known bugs (same as old releases):
    • C-stick may not work, please provide feedback.
  • DPAD may not work, Please provide feedback whether the app works for you. Especially need feedback from people with 32-bit devices.

ARM64 v0.1.2 2017/12/27

  • The buttons now map like an xbox controller.

External Links

Advertising: