![]() This commit adds support for all service commands of all 4 QTM services (`qtm:u`, `qtm:s`, `qtm:sp` (which are built on top of one another) and `qtm:c` ("hardware check")), with precise documentation about each command's behaviour and about I/O internals. The existing `qtm:c` code in libctru had a lot of misconceptions; this commit is a full rewrite with breaking changes. In particular: QTM does *not* track the position of 4 points on the user's face. Instead, it tracks the position of the user's eyes (but not the direction they are looking at) and reports their coordinates in camera space and in world space. The data is presented in a console/hardware-agnostic way to the user. QTM is a service process responsible for: - eye tracking (see above). Head tracking data is available even when "super-stable 3D" is disabled - parallax barrier management through the TI TCA6416A I2C->Parallel expander. The parallax barrier hardware on N3DS requires that software (in this case, QTM process) alternates between writing the barrier's mask pattern & polarity followed by the bit-negation of that pattern on polarity continuously, at all times - automatic barrier management by adjusting it with the results of eye-tracking ("super-stable 3D") - automatic (and manual) IR LED emitter management so that eye-tracking can work even in the dark - fowarding camera brightness information from cam:q. GSP uses this for auto-brightness |
||
---|---|---|
.github/workflows | ||
libctru | ||
.gitignore | ||
Changelog.md | ||
README.md |
libctru - CTR User Library
Library for writing user mode ARM11 code for the 3DS (CTR)
This library aims to provide the foundations necessary to write 3DS Homebrew, and straightforwardly access the different functionalities provided by the 3DS operating system. It is not meant to provide higher level functions; to put things in perspective, the purpose of libctru would be to sit between the OS and a possible port of SDL rather than replace it.
(Originally located at github.com/smealum/ctrulib)
Setup
libctru is just a library and needs a toolchain to function. devkitARM (created by devkitPro) is the officially supported ARM cross compiling toolchain, which provides the framework necessary to supply a usable POSIX-like environment, with working C and C++ standard libraries; as well as the tools required to compile homebrew in the 3DSX format, and assemble GPU shaders. The use of other ARM toolchains is severely discouraged.
The most recent version of devkitARM is always recommended. The installers/setup scripts supplied by devkitPro install a prebuilt copy of the latest stable version of libctru, which is recommended for general use. Please note that devkitPro has a policy of keeping legacy code to a minimum, so a library upgrade may result in older code failing to compile or behave properly. Developers are encouraged to keep their code working with the latest versions of the tools and libraries.
You may find instructions on how to install devkitARM on the devkitPro Wiki.
Documentation
The documentation is automatically built upon release and can be found at the following url: https://devkitpro.github.io/libctru/
License
This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.
Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:
- The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
- Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
- This notice may not be removed or altered from any source distribution.