Netstick 3DS: Difference between revisions

From GameBrew
No edit summary
No edit summary
 
(11 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Infobox-3DS-Homebrews
{{Infobox 3DS Homebrews
| title = Netstick
|title=Netstick
| image = https://dlhb.gamebrew.org/3dshomebrew/Netstick.jpg|250px
|image=Netstick3ds2.png
| type = PC Utilities
|description=Netstick client for Nintendo 3DS - turn your portable console into a Linux compatible WiFi gamepad.
| version=v5
|author=moslevin
| lastupdated = 2021/05/05
|lastupdated=2021/05/05
| licence = Mixed
|type=PC Utilities
| author = moslevin
|version=5
| website = https://github.com/moslevin/netstick-3ds
|license=Mixed
| download = https://dlhb.gamebrew.org/3dshomebrew/Netstick.rar
|download=https://dlhb.gamebrew.org/3dshomebrews/netstick3ds.7z
| source = https://github.com/moslevin/netstick-3ds
|website=https://github.com/moslevin/netstick-3ds
|source=https://github.com/moslevin/netstick-3ds
}}
}}
<youtube>arvGSoCSi6Q</youtube>
Netstick for 3DS is a client for Linux that allows you to connect the 3DS portable console to the PC via WiFi, which can be used as a normal game controller.


== Netstick for 3DS ==
Through the client it is possible to control any Linux-based device (as well as a Raspberry Pi with Retropie) using the 3DS portable console.


Copyright (c) 2021 - Funkenstein Software Consulting, all rights reserved. See license.txt for more information.
==Features==
* Supports D-Pad, Circle Pad, C-Stick (N3DS), and all buttons, which are correctly mapped.
* Accelerometer (X/Y/Z).
* Gyroscope (X/Y/Z).
* Touchscreen.


== What is it? ==
==User guide==
===Preparation===
'''On the Linux host:'''
* Build <code>netstickd</code> for your supported linux device and run it ([https://github.com/moslevin/netstick see instructions]).
* Take note of the device's IP address and port.


Netstick turns your 3DS into a wifi enabled gamepad! Control any linux-based device (such as a Raspberry Pi running Retropie) using your 3DS!
'''On the 3DS console:'''
* Prerequisite: Netstick requires Homebrew Launcher to be installed on your 3DS; for more information, refer to [https://3ds.hacks.guide/ 3DS Hacks Guide].
* On your host PC, edit the included <code>config.txt</code>, and set the server and port lines to the IP address/port of the Linux device running <code>netstickd</code>.
* Create a folder named <code>/3ds/netstick-3ds</code> on your 3DS, and copy <code>netstick-3ds.3dsx</code>, <code>netstick-3ds.smdh</code>, and your modified <code>config.txt</code> into it.


== What's supported? ==
===Running===
* Launch Netstick from the Homebrew Launcher, similar to any other homebrew app.
* You should then see the 3DS indicate success connecting to the Linux host, and events routed to a device named "Nintendo 3DS" appear under /dev/input.
* Use <code>evtest</code> on Linux to verify that the events are processed successfully.


* The dpad, circle-pad, c-stick (new 3ds), and all buttons are all mapped
===Configuration===
* Accelerometer (X/Y/Z)
The configuration file format is very simple, and consists of lines in key:value format. The supported options are described below:
* Gyroscope (X/Y/Z)
* <code>server</code> - The IP address of the server on the local network.
* Touchscreen
* <code>port</code> - The port of the server on the local network.
* <code>invert_cstick_x</code> - Invert the values reported natively by the 3DS on the C-stick's X axis (ignored on Old 3DS).
* <code>invert_cstick_y</code> - Invert the values reported natively by the 3DS on the C-stick's Y axis (ignored on Old 3DS).
* <code>invert_circle_pad_x</code> - Invert the values reported natively by the 3DS on the Circle Pad's X axis.
* <code>invert_circle_pad_y</code> - Invert the values reported natively by the 3DS on the Circle Pad's Y axis.
* <code>use_touch</code> - Enable the touchscreen device when set to "true".
* <code>use_accel</code> - Enable the accelerometer when set to "true".
* <code>use_gyro</code> - Enable the gyroscope when set to "true".
* <code>send_touch_event</code> - Send a linux "touch" event (in addition to the X/Y coordinates) when the touchscreen is active.
* <code>touch_offset</code> - Shrink the touchscreen's surface by a number of pixels on each side, making it easier to reach its limits.
* <code>swap_ab</code> - Swap the a and b buttons in the joystick report (allows correct button mapping when using a 3DS as a controller for steam, etc).
* <code>swap_xy</code> - Swap the x and y buttons in the joystick report (allows correct button mapping when using a 3DS as a controller for steam, etc).
* <code>use_steering_controls</code> - Send a virtual steering-wheel axis in the gamepad report, derived from the X/Z accelerometer values.


== Preparation ==
==Compatibility==
Tested by the suthor on New 3DS with a Raspberry Pi 4 running netstickd.


==== On the Linux host... ====
==Changelog==
'''V5'''
* Added swap_ab and swap_xy config options to allow mapping of button names to other controllers (XBOX, Dreamcast, etc).
* Overhauled the codebase + documented source for easier maintainability going forward.


Build <code>netstickd</code> for your supported linux device and run it (see instructions at https://github.com/moslevin/netstick). Take note of the device's IP address and port.
'''V4'''
* Support "touch offset" config option, allow a user to reduce the touchscreen's active area in order to make it easier to activate the corners.
* Wait 2s after every network error.


==== On the 3DS... ====
'''V3'''
* Adding Gyro support and Many Configuration Options.
* This release features support for the Gyro.
* Adding configuration options to support:
** Invert C-stick X/Y.
** Invert Circle-pad X/Y.
** Selectively enable the accel/gyro/touch devices.
** Disable sending key events when touch-down/touch-up occurs on the touchscreen.


Prerequisite: Netstick requires Homebrew Launcher to be installed on your 3DS; for more information, refer to https://3ds.hacks.guide/.
'''V2'''
* Improvements and new features, including:
** Accelerometer support (creates a separate input device on the Linux host).
** Touchscreen support (creates a separate input device on the Linux host).
** Update the polling rate of the gamepad to 180Hz, reducing latency by ~5ms.
** Socket send() calls are non-blocking.


On your host PC, edit the included <code>config.txt</code>, and set the server and port lines to the IP address/port of the Linux device running <code>netstickd</code>.
'''V1'''
* First release. Tested on New 3DS with a Raspberry Pi 4 running netstickd.


Create a folder named <code>/3ds/netstick-3ds</code> on your 3DS, and copy <code>netstick-3ds.3dsx</code>, <code>netstick-3ds.smdh</code>, and your modified <code>config.txt</code> into it.
==External links==
 
* GitHub - https://github.com/moslevin/netstick-3ds
== Running ==
* Reddit - https://www.reddit.com/r/3dshacks/comments/mv5k1c/netstick3ds_updates_adding_touch_and
 
* Reddit - https://www.reddit.com/r/3dshacks/comments/mnvk3l/turn_your_3ds_into_a_wifienabled_gamepad_for_your
Launch Netstick from the Homebrew Launcher, similar to any other homebrew app. If all goes well, you should see the 3DS indicate success connecting to the Linux host, and events routed to a device named &quot;Nintendo 3DS&quot; appear under /dev/input. Use <code>evtest</code> on Linux to verify that the events are processed successfully.
 
== Building ==
 
Netstick for 3DS is built using devkitpro (https://devkitpro.org). Once it has been properly installed and configured, Netstick can be built by typing <code>make</code> from the root of this source package.
 
== Configuration ==
 
The configuration file format is very simple, and consists of lines in key:value format.
 
The supported options are described below:
 
* server - The IP address of the server on the local network
* port - The port of the server on the local network
* invert_cstick_x - Invert the values reported natively by the 3DS on the C-stick's X axis (Ignored on Old 3DS)
* invert_cstick_y - Invert the values reported natively by the 3DS on the C-stick's Y axis (Ignored on Old 3DS)
* invert_circle_pad_x - Invert the values reported natively by the 3DS on the Circle Pad's X axis
* invert_circle_pad_y - Invert the values reported natively by the 3DS on the Circle Pad's Y axis
* use_touch - Enable the touchscreen device when set to 'true'
* use_accel - Enable the accelerometer when set to 'true'
* use_gyro - Enable the gyroscope when set to 'true'
* send_touch_event - send a linux "touch" event (in addition to the X/Y coordinates) when the touchscreen is active
* touch_offset - shrink the touchscreen's surface by a number of pixels on each side, making it easier to reach its limits
* swap_ab - swap the a and b buttons in the joystick report (allows correct button mapping when using a 3DS as a controller for steam, etc.)
* swap_xy - swap the x and y buttons in the joystick report (allows correct button mapping when using a 3DS as a controller for steam, etc.)
* use_steering_controls - send a virtual steering-wheel axis in the gamepad report, derived from the X/Z accelerometer values

Latest revision as of 11:48, 27 August 2023

Netstick
Netstick3ds2.png
General
Authormoslevin
TypePC Utilities
Version5
LicenseMixed
Last Updated2021/05/05
Links
Download
Website
Source

Netstick for 3DS is a client for Linux that allows you to connect the 3DS portable console to the PC via WiFi, which can be used as a normal game controller.

Through the client it is possible to control any Linux-based device (as well as a Raspberry Pi with Retropie) using the 3DS portable console.

Features

  • Supports D-Pad, Circle Pad, C-Stick (N3DS), and all buttons, which are correctly mapped.
  • Accelerometer (X/Y/Z).
  • Gyroscope (X/Y/Z).
  • Touchscreen.

User guide

Preparation

On the Linux host:

  • Build netstickd for your supported linux device and run it (see instructions).
  • Take note of the device's IP address and port.

On the 3DS console:

  • Prerequisite: Netstick requires Homebrew Launcher to be installed on your 3DS; for more information, refer to 3DS Hacks Guide.
  • On your host PC, edit the included config.txt, and set the server and port lines to the IP address/port of the Linux device running netstickd.
  • Create a folder named /3ds/netstick-3ds on your 3DS, and copy netstick-3ds.3dsx, netstick-3ds.smdh, and your modified config.txt into it.

Running

  • Launch Netstick from the Homebrew Launcher, similar to any other homebrew app.
  • You should then see the 3DS indicate success connecting to the Linux host, and events routed to a device named "Nintendo 3DS" appear under /dev/input.
  • Use evtest on Linux to verify that the events are processed successfully.

Configuration

The configuration file format is very simple, and consists of lines in key:value format. The supported options are described below:

  • server - The IP address of the server on the local network.
  • port - The port of the server on the local network.
  • invert_cstick_x - Invert the values reported natively by the 3DS on the C-stick's X axis (ignored on Old 3DS).
  • invert_cstick_y - Invert the values reported natively by the 3DS on the C-stick's Y axis (ignored on Old 3DS).
  • invert_circle_pad_x - Invert the values reported natively by the 3DS on the Circle Pad's X axis.
  • invert_circle_pad_y - Invert the values reported natively by the 3DS on the Circle Pad's Y axis.
  • use_touch - Enable the touchscreen device when set to "true".
  • use_accel - Enable the accelerometer when set to "true".
  • use_gyro - Enable the gyroscope when set to "true".
  • send_touch_event - Send a linux "touch" event (in addition to the X/Y coordinates) when the touchscreen is active.
  • touch_offset - Shrink the touchscreen's surface by a number of pixels on each side, making it easier to reach its limits.
  • swap_ab - Swap the a and b buttons in the joystick report (allows correct button mapping when using a 3DS as a controller for steam, etc).
  • swap_xy - Swap the x and y buttons in the joystick report (allows correct button mapping when using a 3DS as a controller for steam, etc).
  • use_steering_controls - Send a virtual steering-wheel axis in the gamepad report, derived from the X/Z accelerometer values.

Compatibility

Tested by the suthor on New 3DS with a Raspberry Pi 4 running netstickd.

Changelog

V5

  • Added swap_ab and swap_xy config options to allow mapping of button names to other controllers (XBOX, Dreamcast, etc).
  • Overhauled the codebase + documented source for easier maintainability going forward.

V4

  • Support "touch offset" config option, allow a user to reduce the touchscreen's active area in order to make it easier to activate the corners.
  • Wait 2s after every network error.

V3

  • Adding Gyro support and Many Configuration Options.
  • This release features support for the Gyro.
  • Adding configuration options to support:
    • Invert C-stick X/Y.
    • Invert Circle-pad X/Y.
    • Selectively enable the accel/gyro/touch devices.
    • Disable sending key events when touch-down/touch-up occurs on the touchscreen.

V2

  • Improvements and new features, including:
    • Accelerometer support (creates a separate input device on the Linux host).
    • Touchscreen support (creates a separate input device on the Linux host).
    • Update the polling rate of the gamepad to 180Hz, reducing latency by ~5ms.
    • Socket send() calls are non-blocking.

V1

  • First release. Tested on New 3DS with a Raspberry Pi 4 running netstickd.

External links

Advertising: