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
Since kernel doesn't directly access the LMA, but just does memory
management on them instead, they should be passed as u32 (uptr) instead
of void *.
Also change CodeSetInfo to CodeSetHeader to avoid confusion with
ExHeader types.
- Added the ability to duplicate the left eye image to the right eye
(allows apps to skip rendering to the right eye framebuffer when
the 3d slider is set to 0.0)
- Deprecated gfxConfigScreen