Ctroller 3DS: Difference between revisions

From GameBrew
(Created page with "{{Infobox 3DS homebrew | title = ctroller | image = https://dlhb.gamebrew.org/3dshomebrew/|250px | type = PC Utilities | version = 0.4.0 | licence = Mixed | author = phijor |...")
 
No edit summary
 
(11 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Infobox 3DS homebrew
{{Infobox 3DS Homebrews
| title = ctroller
|title=ctroller
| image = https://dlhb.gamebrew.org/3dshomebrew/|250px
|image=ctroller02.png
| type = PC Utilities
|description=Use your 3DS as a gamepad for your GNU/Linux PC.
| version = 0.4.0
|author=phijor
| licence = Mixed
|lastupdated=2016/06/16
| author = phijor
|type=PC Utilities
| website = https://github.com/phijor/ctroller
|version=0.4.0
| download = https://dlhb.gamebrew.org/3dshomebrew/ctroller-3DS.rar
|license=Mixed
| source = https://dlhb.gamebrew.org/3dshomebrew/ctroller-3DS.rar
|download=https://dlhb.gamebrew.org/3dshomebrews/ctroller.7z
|website=https://github.com/phijor/ctroller
|source=https://github.com/phijor/ctroller
}}
}}
<youtube></youtube>
Ctroller is an application that allows you to use your 3DS as an input device for your Linux system via the uinput kernel module. Inspired by [[3DSController]], it consists of a client that runs on your 3DS, continously streaming the 3DS input data to a server on your PC.


= ctroller =
The server exposes a virtual device to your system, interpretes the data it receives and writes it to a event node under <code>/dev/input/event*</code> or similar.
''ctroller'' lets you use your 3DS as an input device for your Linux 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 PC. The server exposes a virtual device to your system, interpretes the data it receives and writes it to a event node under <code>/dev/input/event*</code> or similar.
 
== Prerequisites ==
'''Note:''' This project is no longer maintained, it might still work in an up to date homebrew environment but this is not guaranteed.
You will need [https://sourceforge.net/projects/devkitpro/files/devkitARM/ DevkitARM] and the [https://github.com/smealum/ctrulib ctrulib] to build the 3DS component. Building the 3DS CIA requires [https://github.com/Steveice10/bannertool bannertool] and [https://github.com/profi200/Project_CTR/tree/master/makerom makerom] to be in your <code>$PATH</code>. To run the server, the <code>uinput</code> kernel module needs to be loaded:
 
<source lang="bash">$ modprobe uinput
==Installation==
===Prerequisites===
You will need [https://sourceforge.net/projects/devkitpro/files/devkitARM/ DevkitARM] and the [https://github.com/smealum/ctrulib ctrulib] to build the 3DS component. Building the 3DS CIA requires [https://github.com/Steveice10/bannertool bannertool] and [https://github.com/profi200/Project_CTR/tree/master/makerom makerom] to be in your <code>$PATH</code>.  
 
To run the server, the <code>uinput</code> kernel module needs to be loaded:
 
<source lang="bash">
$ modprobe uinput
</source>
</source>
== Building ==
 
===Building===
Run <code>make</code> to build both components, or enter either of the <code>3DS</code>/<code>linux</code> subdirectories to build them individually by running <code>make</code> there. You can use the <code>debug</code> target for development.
Run <code>make</code> to build both components, or enter either of the <code>3DS</code>/<code>linux</code> subdirectories to build them individually by running <code>make</code> there. You can use the <code>debug</code> target for development.
== Installation ==
 
===Installing===
If you are using Arch Linux, install [https://aur.archlinux.org/packages/ctroller-git/ ctroller-git] from the AUR. Or use [https://aur.archlinux.org/packages/ctroller-bin/ ctroller-bin] if you do not want to set up the 3DS toolchain.
If you are using Arch Linux, install [https://aur.archlinux.org/packages/ctroller-git/ ctroller-git] from the AUR. Or use [https://aur.archlinux.org/packages/ctroller-bin/ ctroller-bin] if you do not want to set up the 3DS toolchain.
# Install the server to your system by running <code>make install</code>. This is equivalent to:
 
<source lang="bash">$ cd linux
Install the server to your system by running <code>make install</code>. This is equivalent to:
$ make install DESTDIR="" BINDIR="/usr/bin"
* <code> $ cd linux </code>
</source>
* <code> $ make install DESTDIR="" BINDIR="/usr/bin" </code>
You can set <code>DESTDIR</code> to a install to a different location, i.e. <code>make DESTDIR=&quot;/my/fakeroot/environment&quot;</code> installs ''ctroller'' in <code>/my/fakeroot/environment/usr/bin</code>. 2. Download the [https://github.com/phijor/ctroller/releases/latest latest release of the 3DS binaries]. Or you can build them yourself:
* You can set <code>DESTDIR</code> to a install to a different location, i.e. <code>make DESTDIR="/my/fakeroot/environment"</code> installs ctroller in <code>/my/fakeroot/environment/usr/bin</code>.  
<source lang="bash">$ cd 3DS
 
$ make release
Download the [https://github.com/phijor/ctroller/releases/latest latest release of the 3DS binaries]. Or you can build them yourself:
</source>
* <code> $ cd 3DS </code>
<ol start="3">
* <code> $ make release </code>
<li>Install <code>ctroller.cia</code> with the CIA-manager of your choice. If you want to install the 3DSX-executable: Copy <code>ctroller.{3dsx,smdh}</code> to <code>/3ds/ctroller/</code> on your SD card. You can also directly upload the application to your 3DS using [[./3DS/upload.sh|upload.sh]] (do not blindly execute unknown scrips, I'm not responsible if this accidentally deletes your SD card or unfreezes your fridge). To do so, start a FTP server (such as [https://github.com/mtheall/ftpd ftpd]) on your 3DS on port 5000, then run:</li></ol>
 
<source lang="bash">$ cd 3DS
Install <code>ctroller.cia</code> with the CIA-manager of your choice. If you want to install the 3DSX-executable:  
$ make upload DSIP=<IP of your 3DS here>
* Copy <code>ctroller.{3dsx,smdh}</code> to <code>/3ds/ctroller/</code> on your SD card.  
</source>
* You can also directly upload the application to your 3DS using [https://github.com/phijor/ctroller/blob/master/3DS/upload.sh upload.sh] (do not blindly execute unknown scrips).  
This requires <code>ftp</code> to be installed on your system. 4. Create a directory <code>ctroller</code> in the root of your SD card 5. '''Place [[./3DS/ctroller.cfg|3DS/ctroller.cfg]] 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>)
* To do so, start a FTP server, such as [[Ftpd 3DS|ftpd]], on your 3DS on port 5000, then run:
== Running ==
** <code> $ cd 3DS </code>
** <code> $ make upload DSIP=<IP of your 3DS here> </code>
** Note this requires <code>ftp</code> to be installed on your system.  
 
Create a directory <code>ctroller</code> in the root of your SD card.
 
Place [https://github.com/phijor/ctroller/blob/master/3DS/ctroller.cfg 3DS/ctroller.cfg] 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>).
 
==User guide==
Start the server by running:
Start the server by running:
<source lang="bash">$ ./linux/ctroller
 
<source lang="bash">
$ ./linux/ctroller </code>
</source>
</source>
Usage:
Usage:
<pre>-d --daemonize execute in background
-d --daemonize execute in background
-h --help print this help text
-h --help print this help text
-p --port=&lt;num&gt; listen on port 'num' (defaults to 15708)
-p --port=&lt;num&gt; listen on port 'num' (defaults to 15708)
-u --uinput-device=&lt;path&gt; uinput character device (defaults to /dev/uinput)
-u --uinput-device=&lt;path&gt; uinput character device (defaults to /dev/uinput)
</pre>
 
Then launch the ''ctroller.3dsx'' application on your 3DS using a homebrew launcher of your choice. For development purposes, the 3DS-Makefile includes a <code>run</code> target that uses <code>3dslink</code> to upload and run the application using the Homebrew Menu NetLoader.
Then launch the ctroller.3dsx application on your 3DS using a homebrew launcher of your choice. For development purposes, the 3DS-Makefile includes a <code>run</code> target that uses <code>3dslink</code> to upload and run the application using the Homebrew Menu NetLoader.
== Notes ==
 
===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.
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.
==Changelog==
* GitHub - https://github.com/phijor/ctroller
* Arch Linux - https://aur.archlinux.org/packages/ctroller-git
* Reddit - https://www.reddit.com/r/3dshacks/comments/4iko2r/ctroller_use_your_3ds_as_a_gamepad_on_your_linux
[[Category:3DS homebrew applications]]
[[Category:PC utilities for 3DS homebrew]]

Latest revision as of 11:51, 27 August 2023

ctroller
Ctroller02.png
General
Authorphijor
TypePC Utilities
Version0.4.0
LicenseMixed
Last Updated2016/06/16
Links
Download
Website
Source

Ctroller is an application that allows you to use your 3DS as an input device for your Linux system via the uinput kernel module. Inspired by 3DSController, it consists of a client that runs on your 3DS, continously streaming the 3DS input data to a server on your PC.

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.

Note: This project is no longer maintained, it might still work in an up to date homebrew environment but this is not guaranteed.

Installation

Prerequisites

You will need DevkitARM and the ctrulib to build the 3DS component. Building the 3DS CIA requires bannertool and makerom to be in your $PATH.

To run the server, the uinput kernel module needs to be loaded:

$ modprobe uinput

Building

Run make to build both components, or enter either of the 3DS/linux subdirectories to build them individually by running make there. You can use the debug target for development.

Installing

If you are using Arch Linux, install ctroller-git from the AUR. Or use ctroller-bin if you do not want to set up the 3DS toolchain.

Install the server to your system by running make install. This is equivalent to:

  • $ cd linux
  • $ make install DESTDIR="" BINDIR="/usr/bin"
  • You can set DESTDIR to a install to a different location, i.e. make DESTDIR="/my/fakeroot/environment" installs ctroller in /my/fakeroot/environment/usr/bin.

Download the latest release of the 3DS binaries. Or you can build them yourself:

  • $ cd 3DS
  • $ make release

Install ctroller.cia with the CIA-manager of your choice. If you want to install the 3DSX-executable:

  • Copy ctroller.{3dsx,smdh} to /3ds/ctroller/ on your SD card.
  • You can also directly upload the application to your 3DS using upload.sh (do not blindly execute unknown scrips).
  • To do so, start a FTP server, such as ftpd, on your 3DS on port 5000, then run:
    • $ cd 3DS
    • $ make upload DSIP=<IP of your 3DS here>
    • Note this requires ftp to be installed on your system.

Create a directory ctroller in the root of your SD card.

Place 3DS/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).

User guide

Start the server by running:

 $ ./linux/ctroller </code>

Usage:

-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)

Then launch the ctroller.3dsx 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.

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.

Changelog

Advertising: