phijor / ctroller Goto Github PK
View Code? Open in Web Editor NEWUse your 3DS as a gamepad on linux
License: GNU General Public License v3.0
Use your 3DS as a gamepad on linux
License: GNU General Public License v3.0
This software is pretty good, in the first place. I've been using it for a while.
I was wondering if there was the possibility to extend the configurability of this program to allow the user to set sections of the 3DS's Touchpad as virtual Buttons, thus extending the capacity in number of buttons, or even number of axes, that the physical console can provide.
This would be particularly useful in contexts where you want to use your 3DS as a controller for a system that does not have a concept of, or a use for, the touchpad input. Using it as a N64 controller for example would allow to set button zones for the C-directional buttons, or in the PS2/PS3 would allow to set up zones as the L2 / R2 buttons.
In general, this would benefit users of physical "original" 3DS more than "New" 3DS but I would presume the latter could still find some use to it. Users of consoles with more button entries than the 3DS, such as the N64 or the Play Station consoles, would also benefit.
Furthermore, depending on the number of virtual buttons that can be added this would allow ready access to an emulator's functions if the emulator is capable of associating gamepad commands to their own menu options (such as save/load game states, system pause, etc).
For an example of already existing implementation of the concept see the touchpad panels in the Monster Hunter series 3 and 4 for the 3DS, which provide both "action buttons" on the panel and a mirror of the physical D-pad, that can be used on the right side of the screen so players of the 3DS model can access the functions with their right hand. This Siliconera article showcases a touchpad panel with a D-pad control and an action button (the "kick" icon on the screen). Here's the star screenshot reproduced:
I'm unsure how would this be implemented, but I would presume that native touchscreen and "button zones" would be mutually exclusive. The latter could use a (series of) template describing which areas of the screen are converted to what J0x input (IINM, from J0A onward?).
I've taken the liberty of elaborating crappy ASCII mockups for example:
+-----------+----+-----------+
| | | |
| (J10) | | (J11) |
+-----------+----+-----------+
| |
| |
| (J12) |
| |
+----------------------------+
Users could map eg.:
Input on the feasibility of this would be appreciated. Also I have my physical system available for testing.
EDIT: Another mockup~
+--------------------+-------+
| | |
| | A |
| +---+---+
| | B | C |
| +---+---+
| E | D |
| | |
+--------------------+-------+
In this example users could map entries A, B, C, D, to the four C↑ C↓ C← C→ buttons of the N64 and could then map E to... who knows, Z?
o2ds, ver 11.6.0
luma + b9s
Exception type: Data abort
An Exception Ocurred
Processor: Arm11 (core 0)
Exception type: Data Abort
Fault Status: Translation Section
I was just trying to open the app into a old 3ds with another language
I have bannertool in the /3DS/ folder, yet when I attempt "make" I get
Makefile:195: recipe for target '/home/ben/Documents/3ds/ctroller-master/linux/ctroller/3DS/ctroller.cia' failed
make: *** [/home/ben/Documents/3ds/ctroller-master/linux/ctroller/3DS/ctroller.cia] Error 127
Creating directories
Beginning release build
Compiling: src/main.c -> build/release/main.o
In file included from src/main.c:31:0:
src/main.c: In function ‘main’:
include/ctroller.h:18:37: error: ‘VERSION_MAJOR’ undeclared (first use in this function)
#define CTROLLER_VERSION MAKEBCDVER(VERSION_MAJOR, VERSION_MINOR, VERSION_PATCH
^
include/ctroller.h:12:7: note: in definition of macro ‘MAKEBCDVER’
((major & 0xf) << 8 | (minor & 0xf) << 4 | (patch & 0xf))
^
src/main.c:152:36: note: in expansion of macro ‘CTROLLER_VERSION’
if (hid.version != CTROLLER_VERSION) {
^
include/ctroller.h:18:37: note: each undeclared identifier is reported only once for each function it appears in
#define CTROLLER_VERSION MAKEBCDVER(VERSION_MAJOR, VERSION_MINOR, VERSION_PATCH
^
include/ctroller.h:12:7: note: in definition of macro ‘MAKEBCDVER’
((major & 0xf) << 8 | (minor & 0xf) << 4 | (patch & 0xf))
^
src/main.c:152:36: note: in expansion of macro ‘CTROLLER_VERSION’
if (hid.version != CTROLLER_VERSION) {
^
include/ctroller.h:18:52: error: ‘VERSION_MINOR’ undeclared (first use in this function)
#define CTROLLER_VERSION MAKEBCDVER(VERSION_MAJOR, VERSION_MINOR, VERSION_PATCH
^
include/ctroller.h:12:28: note: in definition of macro ‘MAKEBCDVER’
((major & 0xf) << 8 | (minor & 0xf) << 4 | (patch & 0xf))
^
src/main.c:152:36: note: in expansion of macro ‘CTROLLER_VERSION’
if (hid.version != CTROLLER_VERSION) {
^
include/ctroller.h:18:67: error: ‘VERSION_PATCH’ undeclared (first use in this function)
#define CTROLLER_VERSION MAKEBCDVER(VERSION_MAJOR, VERSION_MINOR, VERSION_PATCH
^
include/ctroller.h:12:49: note: in definition of macro ‘MAKEBCDVER’
((major & 0xf) << 8 | (minor & 0xf) << 4 | (patch & 0xf))
^
src/main.c:152:36: note: in expansion of macro ‘CTROLLER_VERSION’
if (hid.version != CTROLLER_VERSION) {
^
Makefile:194: recipe for target 'build/release/main.o' failed
make[1]: *** [build/release/main.o] Error 1
Makefile:124: recipe for target 'release' failed
make: *** [release] Error 2
I'm not running Arch and was hoping to get this running on my Raspberry Pi Retropie setup, however, that runs on Debian. I'm not sure if its even possible for me to run an Arch thing on Debian (probably not though), so would you consider making it for other linux versions?
Thanks
From the linux input documentation:
In addition to EV_KEY, there are two more basic event types: EV_REL and
EV_ABS. They are used for relative and absolute values supplied by the
device. A relative value may be for example a mouse movement in the X axis.
The mouse reports it as a relative difference from the last position,
because it doesn't have any absolute coordinate system to work in. Absolute
events are namely for joysticks and digitizers - devices that do work in an
absolute coordinate systems.Having the device report EV_REL buttons is as simple as with EV_KEY, simply
set the corresponding bits and call theinput_report_rel(struct input_dev *dev, int code, int value)
function. Events are generated only for nonzero value.
I'm new to building on github and when I try to build it i get this in my terminal ctroller-master/3DS/include/hid.h:6:10: fatal error: 3ds/types.h: No such file or directory
6 | #include <3ds/types.h>
| ^~~~~~~~~~~~~
compilation terminated.
make[1]: *** [/opt/devkitpro/devkitARM/base_rules:85: hid.o] Error 1
make: *** [Makefile:173: build] Error 2.
I see "Did you enable wifi?" for a split second before.
EDIT: Removing the goto failure
line stops the data abort, and then ctroller just waits until a wifi connection is established. Why goto failure
in the first place?
On the 3ds it says network interface is not configured a billion times. I am on N3ds with the cia and ubuntu 20.04
As soon as a connection is made between the linux app and the 3ds the screen orientation starts rapidly changing in Gnome.
I have build the linux app from source but installed the 0.4 CIA.
Accidentally pressed enter, writing this now.
So the AUR package for bannertool does not build, and since it's a dependency for ctroller-git, it will not build, even if you have bannertool installed.
ctroller is instantly crashing when launching it, I'm on version 11.8 and using luma 9.1, dunno if the fault lies somewhere else other than ctroller itself.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.