Settings services: Difference between revisions
No edit summary |
No edit summary |
||
| (10 intermediate revisions by 4 users not shown) | |||
| Line 61: | Line 61: | ||
== GetKeyCodeMap == | == GetKeyCodeMap == | ||
Takes a type-0x16 output buffer containing KeyCodeMap, official sw uses fixed size 0x1000. This is | Takes a type-0x16 output buffer containing KeyCodeMap, official sw uses fixed size 0x1000. This is related to the USB HID keyboard. | ||
The returned buffer consists of a 0x20-byte header followed by an array of key mapping structures. | |||
{| class="wikitable" border="1" | |||
|- | |||
! Offset || Size || Description | |||
|- | |||
| 0x0 || 0x4 || Magic number? (0x01000001) | |||
|- | |||
| 0x4 || 0x4 || Entry count per key (3 for US English, 4 for German as it includes AltGr mappings) | |||
|- | |||
| 0x8 || 0x4 || Map count | |||
|- | |||
| 0xC || 0x4 || Layout ID (e.g. 3 = German QWERTZ) | |||
|- | |||
| 0x10 || 0x10 || Reserved | |||
|- | |||
| 0x20 || 0x8 * MapCount || Array of <code>KeyMapEntry</code> structures. Indexed by the standard USB HID Usage ID (Keyboard/Keypad page 0x07). | |||
|- | |||
| ... || ... || Padding (remaining space up to 0x1000) | |||
|} | |||
=== KeyMapEntry === | |||
Structure defining the output characters and modifier behaviors for a single physical key. Size may vary depending on the symbol count per key. | |||
{| class="wikitable" border="1" | |||
|- | |||
! Offset || Size || Description | |||
|- | |||
| 0x0 || 0x2 || Normal char: UTF-16 code point when no modifiers are pressed. Dead keys map directly to Unicode combining characters (like U+0301 for combining acute accent). | |||
|- | |||
| 0x2 || 0x2 || Flags: Bitmask for character behavior and modifier rules. | |||
|- | |||
| 0x4 || 0x2 || Shift char: UTF-16 code point emitted when Shift is held. | |||
|- | |||
| 0x6 || 0x2 || AltGr char: UTF-16 code point emitted when AltGr is held (only included if the 'entry count per key' = 4) | |||
|} | |||
The Flags field changes how state changes are handled (like Caps Lock or NumLock) for that specific code point: | |||
* 0x1001: Standard character. Uses standard Shift and Caps Lock rules. | |||
* 0x1000: Static/dead character (e.g., Space). | |||
* 0x20FF: Keypad modifier. State influenced by NumLock. | |||
== GetFirmwareVersionForDebug == | == GetFirmwareVersionForDebug == | ||
| Line 616: | Line 658: | ||
| 52 || [S1] GetOverlayDispProgramId | | 52 || [S1] GetOverlayDispProgramId | ||
|- | |- | ||
| 53 || GetDeviceTimeZoneLocationName | | 53 || [[#GetDeviceTimeZoneLocationName]] | ||
|- | |- | ||
| 54 || SetDeviceTimeZoneLocationName | | 54 || [[#SetDeviceTimeZoneLocationName]] | ||
|- | |- | ||
| 55 || [S1] [[#GetWirelessCertificationFileSize]] | | 55 || [S1] [[#GetWirelessCertificationFileSize]] | ||
| Line 1,289: | Line 1,331: | ||
== SetDataDeletionSettings == | == SetDataDeletionSettings == | ||
Takes an input [[#DataDeletionSettings]], no output. | Takes an input [[#DataDeletionSettings]], no output. | ||
== GetDeviceTimeZoneLocationName == | |||
No input, returns an output [[Glue_services#LocationName|LocationName]]. | |||
== SetDeviceTimeZoneLocationName == | |||
Takes an input [[Glue_services#LocationName|LocationName]], no output. | |||
== GetWirelessCertificationFileSize == | == GetWirelessCertificationFileSize == | ||
| Line 1,988: | Line 2,036: | ||
| 3 || GrayScale | | 3 || GrayScale | ||
|} | |} | ||
= TvUnderscan = | |||
This is s32. It defines the percentage point reduction from a 100% baseline. | |||
= HandheldSleepPlan = | = HandheldSleepPlan = | ||
| Line 2,232: | Line 2,283: | ||
| 0x10 || 0x4 || [[#CmuMode|CmuMode]] | | 0x10 || 0x4 || [[#CmuMode|CmuMode]] | ||
|- | |- | ||
| 0x14 || 0x4 || TvUnderscan | | 0x14 || 0x4 || [[#TvUnderscan|TvUnderscan]] | ||
|- | |- | ||
| 0x18 || 0x4 || TvGamma | | 0x18 || 0x4 || TvGamma | ||
| Line 2,537: | Line 2,588: | ||
|- | |- | ||
! Value | ! Value | ||
! [[#ProductModelName|ProductModelName]] | ! Description | ||
|- | |||
| 0 || Invalid | |||
|- | |||
| 1 || Nx | |||
|- | |||
| 2 || NxCopper | |||
|- | |||
| 3 || NxIowa | |||
|- | |||
| 4 || NxHoag | |||
|- | |||
| 5 || NxCalcio | |||
|- | |||
| 6 || NxAula | |||
|- | |||
| 7 || ([[#ProductModelName|ProductModelName]] BEE) | |||
|- | |- | ||
| | | 8 || [22.5.0+] ([[#ProductModelName|ProductModelName]] OSM) | ||
|- | |- | ||
| | | 9 || | ||
|- | |- | ||
| | | 10 || | ||
|- | |- | ||
| | | 11 || | ||
|- | |- | ||
| | | 12 || | ||
|} | |} | ||
Range 1-6 is Nintendo Switch, range 7-12 is Nintendo Switch 2. | |||
= ProductModelName = | = ProductModelName = | ||
This is "nn::settings::system::ProductModelName". This is a 0x8-byte struct containing a [[#ProductModel|string]]. | This is "nn::settings::system::ProductModelName". This is a 0x8-byte struct containing a [[#ProductModel|string]]. | ||
= | {| class="wikitable" border="1" | ||
|- | |||
! Value | |||
! [[#ProductModel|ProductModel]] | |||
|- | |||
| "HAC" || 1 | |||
|- | |||
| "HAD" || 3 | |||
|- | |||
| "HDH" || 4 | |||
|- | |||
| "HEG" || 6 | |||
|- | |||
| "BEE" || 7 | |||
|- | |||
| "OSM" || [22.5.0+] 8 | |||
|} | |||
= SystemConfiguration = | |||
There's a common configuration title (*818), and one configuration title for each [[SMC#HardwareType|HardwareType]]. | There's a common configuration title (*818), and one configuration title for each [[SMC#HardwareType|HardwareType]]. | ||