Config Savegame: Difference between revisions
LiquidFenrir (talk | contribs) →Network structure: good catch by yellows8 |
TimmSkiller (talk | contribs) Update config block 0x00030002 |
||
| (26 intermediate revisions by 10 users not shown) | |||
| Line 48: | Line 48: | ||
| 0xA | | 0xA | ||
| 0x2 | | 0x2 | ||
| Flags | | Access Flags | ||
|} | |} | ||
===Access Flags=== | |||
{| class="wikitable" border="1" | |||
|- | |||
! Bit Mask | |||
! Description | |||
|- | |||
| 0x2 | |||
| User Readable (cfg:u) | |||
|- | |||
| 0x4 | |||
| System Writable (cfg:s / cfg:i) | |||
|- | |||
| 0x8 | |||
| System Readable (cfg:s / cfg:i) | |||
|} | |||
Config blocks will typically either use 0xC for system readable/writable or 0xE for all 3. | |||
==Configuration blocks== | ==Configuration blocks== | ||
| Line 56: | Line 74: | ||
! BlkID | ! BlkID | ||
! Size | ! Size | ||
! Flags | ! Access Flags | ||
! Description | ! Description | ||
|- | |- | ||
| Line 67: | Line 85: | ||
| 0x1 | | 0x1 | ||
| 0xC | | 0xC | ||
| | | [[Hardware_calibration#RTC|RTC compensation value]] | ||
|- | |- | ||
| 0x00020000 | | 0x00020000 | ||
| 0x134 | | 0x134 | ||
| 0xC | | 0xC | ||
| | | [[Hardware_calibration#CDC|Codec]] | ||
|- | |- | ||
| 0x00030000 | | 0x00030000 | ||
| 0x1 | | 0x1 | ||
| 0xC | | 0xC | ||
| | | Leap Year Counter (read By PTM) | ||
|- | |- | ||
| 0x00030001 | | 0x00030001 | ||
| 0x8 | | 0x8 | ||
| 0xE | | 0xE | ||
| User time offset (read by CECD) | | User time offset (read by CECD): displayed timestamp - rtc timestamp | ||
|- | |- | ||
| 0x00030002 | | 0x00030002 | ||
| 0x8 | | 0x8 | ||
| 0xC | | 0xC | ||
| | | Difference (in nanoseconds) between UTC server time and RTC time. Updated by [[Friend_Services|the Friends sysmodule]] after every [[Online_Play|NASC]] login. Used by System settings to calculate the real current time according to the online play authentication server, in order to determine the user's actual age based on the given date of birth (related to COPPA, since this is used to check whether the user is at least 13 years old). | ||
|- | |- | ||
| 0x00040000 | | 0x00040000 | ||
| 0x10 | | 0x10 | ||
| 0xC | | 0xC | ||
| | | [[Hardware_calibration#Touch|Touch calibration]] (read by HID) | ||
|- | |- | ||
| 0x00040001 | | 0x00040001 | ||
| Line 102: | Line 120: | ||
| 0x12 | | 0x12 | ||
| 0xC | | 0xC | ||
| | | [[Hardware_calibration#Gyro|Gyroscope]] (read by HID) | ||
|- | |- | ||
| 0x00040003 | | 0x00040003 | ||
| 0xC | | 0xC | ||
| 0xC | | 0xC | ||
| | | [[Hardware_calibration#Accel|Accelerometer]] (read by HID) | ||
|- | |- | ||
| 0x00040004 | | 0x00040004 | ||
| 0x1C | | 0x1C | ||
| 0xC | | 0xC | ||
| | | [[Hardware_calibration#CStick|CStick calibration data]] | ||
|- | |- | ||
| 0x00050000 | | 0x00050000 | ||
| 0x2 | | 0x2 | ||
| 0xC | | 0xC | ||
| | | [[Hardware_calibration#Screen_flicker|Screen flicker]] | ||
|- | |- | ||
| 0x00050001 | | 0x00050001 | ||
| Line 127: | Line 145: | ||
| 0x38 | | 0x38 | ||
| 0xC | | 0xC | ||
| | | [[Hardware_calibration#BLPWM|Backlight PWM]] (read by GSP) | ||
|- | |- | ||
| 0x00050003 | | 0x00050003 | ||
| 0x20 | | 0x20 | ||
| 0xC | | 0xC | ||
| | | [[Hardware_calibration#ABL|Power saving mode (ABL) calibration]] (read by GSP) | ||
|- | |- | ||
| 0x00050004 | | 0x00050004 | ||
| 0x20 | | 0x20 | ||
| 0xC | | 0xC | ||
| | | [[Hardware_calibration#ABL|Power saving mode (ABL) calibration]] (for legacy FIRM) | ||
|- | |- | ||
| 0x00050005 | | 0x00050005 | ||
| 0x20 | | 0x20 | ||
| 0xE | | 0xE | ||
| Stereo display settings | | Stereo display settings (HWCAL block 0x470) | ||
|- | |- | ||
| 0x00050006 | | 0x00050006 | ||
| 0x2 | | 0x2 | ||
| 0xC | | 0xC | ||
| | | [[Hardware_calibration#ULCD_delay|3D switching delay]] | ||
|- | |- | ||
| 0x00050007 | | 0x00050007 | ||
| Line 157: | Line 175: | ||
| 0x10C | | 0x10C | ||
| 0xC | | 0xC | ||
| | | [[Hardware_calibration#ABL_extra|Power saving mode (ABL) extra config]] | ||
|- | |- | ||
| 0x00050009 | | 0x00050009 | ||
| 0x8 | | 0x8 | ||
| 0xC | | 0xC | ||
| new3DS only(?) backlight control (5th byte: | | new3DS only(?) backlight control (5th byte: auto-brightness enable) | ||
|- | |- | ||
| 0x00060000 | | 0x00060000 | ||
| 0x96 | | 0x96 | ||
| 0xC | | 0xC | ||
| ? | | ??? (HWCAL block 0x500) | ||
|- | |- | ||
| 0x00070000 | | 0x00070000 | ||
| 0x214 | | 0x214 | ||
| 0xE | | 0xE | ||
| | | [[Hardware_calibration#3D_filters|3D filters]] | ||
|- | |- | ||
| 0x00070001 | | 0x00070001 | ||
| 0x1 | | 0x1 | ||
| 0xE | | 0xE | ||
| Sound output mode (mono | | Sound output mode (mono=0, stereo=1, surround=2) | ||
|- | |- | ||
| 0x00070002 | | 0x00070002 | ||
| 0x8 | | 0x8 | ||
| 0xE | | 0xE | ||
| | | [[Hardware_calibration#Microphone_echo_cancel|Microphone echo cancellation params]] | ||
|- | |- | ||
| 0x00080000 | | 0x00080000 | ||
| Line 217: | Line 235: | ||
| 0x1C | | 0x1C | ||
| 0xE | | 0xE | ||
| | | [[#User Name Block 0x000A0000|User Name]] | ||
|- | |- | ||
| 0x000A0001 | | 0x000A0001 | ||
| Line 253: | Line 271: | ||
| 0xC0 | | 0xC0 | ||
| 0xE | | 0xE | ||
| | | [[#Parental Control Settings Block 0x000C0000|Parental Controls - Main data]] | ||
|- | |- | ||
| 0x000C0001 | | 0x000C0001 | ||
| 0x14 | | 0x14 | ||
| 0xE | | 0xE | ||
| | | COPPACS restriction data | ||
|- | |- | ||
| 0x000C0002 | | 0x000C0002 | ||
| 0x200 | | 0x200 | ||
| 0xE | | 0xE | ||
| | | [[#Parental Control Settings Block 0x000C0002|Parental Controls - Registered e-Mail address and custom secret question]] | ||
|- | |- | ||
| 0x000D0000 | | 0x000D0000 | ||
| 0x4 | | 0x4 | ||
| 0xE | | 0xE | ||
| u16 at offset 0x0: [[SMDH#EULA_Version|EULA Version]] which was agreed to. | | u16 at offset 0x0: [[SMDH#EULA_Version|EULA Version]] which was agreed to. u16 @ 0x02: latest version | ||
|- | |- | ||
| 0x000E0000 | | 0x000E0000 | ||
| 0x1 | | 0x1 | ||
| 0xE | | 0xE | ||
| ? | | ? (related to SpotPass options in Internet Settings?) | ||
|- | |- | ||
| 0x000F0000 | | 0x000F0000 | ||
| Line 289: | Line 307: | ||
| 0x1 | | 0x1 | ||
| 0xC | | 0xC | ||
| | | Home Menu button disable | ||
|- | |- | ||
| 0x000F0004 | | 0x000F0004 | ||
| Line 304: | Line 322: | ||
| 0x28 | | 0x28 | ||
| 0xC | | 0xC | ||
| | | In NIM, taken as a (hopefully null terminated) string used for the "X-Device-Token" http header field for NPNS url. | ||
|- | |- | ||
| 0x00100000 | | 0x00100000 | ||
| 0x2 | | 0x2 | ||
| 0xC | | 0xC | ||
| | | TWL EULA info ({bool agreed; u8 agreedVersion}) | ||
|- | |- | ||
| 0x00100001 | | 0x00100001 | ||
| 0x94 | | 0x94 | ||
| 0xC | | 0xC | ||
| Stores Parental Restrictions PIN/Secret Answer and other info | | Stores Parental Restrictions PIN/Secret Answer and other info for TWL mode | ||
|- | |- | ||
| 0x00100002 | | 0x00100002 | ||
| 0x1 | | 0x1 | ||
| 0xC | | 0xC | ||
| | | TWL country code | ||
|- | |- | ||
| 0x00100003 | | 0x00100003 | ||
| 0x10 | | 0x10 | ||
| 0xC | | 0xC | ||
| | | TWL movable unique ID, used for DSiWare exports | ||
|- | |- | ||
| 0x00110000 | | 0x00110000 | ||
| Line 339: | Line 357: | ||
| 0x8 | | 0x8 | ||
| 0xC | | 0xC | ||
| | | Volume Slider Bounds (Read by HID and PTM) | ||
|- | |- | ||
| 0x00130000 | | 0x00130000 | ||
| Line 349: | Line 367: | ||
| 0x4 | | 0x4 | ||
| 0xC | | 0xC | ||
| | | Clock Sequence (u16) used for generating UUIDs in [[ACT_Services|ACT]]. | ||
|- | |- | ||
| 0x00150001 | | 0x00150001 | ||
| Line 359: | Line 377: | ||
| 0x4 | | 0x4 | ||
| 0xE | | 0xE | ||
| | | [[Friend_Services#Server_Types|NFS (Nintendo Friend Server) Environment]] in the format <code>%c%d</code>. Set by the [[ACT_Services|ACT]] sysmodule. Used in the [[NIM_Services#NIM|NIM]] sysmodule for making the NPNS URL. | ||
|- | |- | ||
| 0x00160000 | | 0x00160000 | ||
| Line 369: | Line 387: | ||
| 0x4 | | 0x4 | ||
| 0xE | | 0xE | ||
| | | Miiverse (OLV) access key | ||
|- | |- | ||
| 0x00180000 | | 0x00180000 | ||
| 0x4 | | 0x4 | ||
| 0xC | | 0xC | ||
| | | QTM Infrared LED related, can be 0 or 1 | ||
|- | |- | ||
| 0x00180001 | | 0x00180001 | ||
| 0x18 | | 0x18 | ||
| 0xC | | 0xC | ||
| | | [[Hardware_calibration#QTM|QTM calibration data]] | ||
|- | |- | ||
| 0x00190000 | | 0x00190000 | ||
| Line 501: | Line 519: | ||
|} | |} | ||
===0x000A0000 | ===User Name Block 0x000A0000=== | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
|- | |- | ||
| Line 507: | Line 525: | ||
! Description | ! Description | ||
|- | |- | ||
| | | 0x00-0x15 | ||
| UTF-16 | | User name (UTF-16) | ||
|- | |- | ||
| | | 0x16-0x17 | ||
| | | u16 NGWord flag to denote that the user name is inappropriate | ||
|- | |- | ||
| 0x18-0x1B | | 0x18-0x1B | ||
| Line 517: | Line 535: | ||
|} | |} | ||
While the user name is NULL-terminated, the terminator is not applied when the user name is 10 characters long, which leads to online access breaking (002-0109) and buffer overflows when the user name is retrieved, even in DS games. | |||
===WiFi Slot Structure=== | ===WiFi Slot Structure=== | ||
| Line 579: | Line 597: | ||
|- | |- | ||
| 0x0 | | 0x0 | ||
| | | 0x2 | ||
| | | ? | ||
|- | |||
| 0x2 | |||
| 0x2 | |||
| [https://github.com/lammertb/libcrc/blob/v2.0/src/crc16.c#L43-L76 CRC-16 checksum] of the next 0x410 bytes. | |||
|- | |- | ||
| 0x4 | | 0x4 | ||
| Line 632: | Line 654: | ||
| 0x358 | | 0x358 | ||
| 0x4 | | 0x4 | ||
| | | Always 0x01050000 ? Only set if the network was the last to be set during the session. | ||
|- | |- | ||
| 0x35C | | 0x35C | ||
| Line 639: | Line 661: | ||
|- | |- | ||
| 0x360 | | 0x360 | ||
| | | 0x6 | ||
| | | MAC address of the AP. Only set if the network was the last to be set during the session. | ||
|- | |||
| 0x366 | |||
| 0x1 | |||
| Channel. Only set if the network was the last to be set during the session. | |||
|- | |||
| 0x367 | |||
| 0x1 | |||
| Padding ? Only set if the network was the last to be set during the session. | |||
|- | |- | ||
| 0x368 | | 0x368 | ||
| Line 683: | Line 713: | ||
|- | |- | ||
|} | |} | ||
===LCD display config=== | ===LCD display config=== | ||
| Line 689: | Line 718: | ||
===Parental | ===Parental Control Settings Block 0x00100001=== | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
|- | |- | ||
| Line 705: | Line 734: | ||
|- | |- | ||
| 0x11 | | 0x11 | ||
| | | 0x40 | ||
| Secret | | Secret Answer (UTF-16) | ||
|} | |||
===Parental Control Settings Block 0x000C0000=== | |||
{| class="wikitable" border="1" | |||
|- | |||
! Offset | |||
! Size | |||
! Description | |||
|- | |||
| 0x00 | |||
| 0x04 | |||
| [[#Parental Control Restriction Bitmask|Parental Control Restriction Bitmask]] | |||
|- | |||
| 0x04 | |||
| 0x04 | |||
| Unknown | |||
|- | |||
| 0x08 | |||
| 0x01 | |||
| Rating system used for configuration | |||
|- | |||
| 0x09 | |||
| 0x01 | |||
| Maximum allowed age (20 = No restriction) | |||
|- | |||
| 0x0A | |||
| 0x01 | |||
| Secret Question Type (0-5: Pre-defined, 6: Custom) | |||
|- | |||
| 0x0B | |||
| 0x01 | |||
| Unknown | |||
|- | |||
| 0x0C | |||
| 0x08 | |||
| Parental Controls PIN code (with NULL-termination, although restricted to 4 digits) | |||
|- | |||
| 0x14 | |||
| 0x44 | |||
| Secret Answer (UTF-16) | |||
|} | |||
====Parental Control Restriction Bitmask==== | |||
{| class="wikitable" border="1" | |||
|- | |||
! Bit | |||
! Restriction name | |||
|- | |||
| 0 | |||
| Global Parental Controls Enable | |||
|- | |||
| 1 | |||
| Internet Browser | |||
|- | |||
| 2 | |||
| Display of 3D Images (disabled on 2DS) | |||
|- | |||
| 3 | |||
| Sharing Images/Audio/Video/Long Text Data | |||
|- | |||
| 4 | |||
| Online Interaction | |||
|- | |||
| 5 | |||
| StreetPass | |||
|- | |||
| 6 | |||
| Friend Registration | |||
|- | |||
| 7 | |||
| DS Download Play | |||
|- | |||
| 8 | |||
| Nintendo 3DS Shopping Services (eShop / EC Applet) | |||
|- | |||
| 9 | |||
| View Distributed Videos | |||
|- | |||
| 10 | |||
| Miiverse (View) | |||
|- | |||
| 11 | |||
| Miiverse (Post) | |||
|- | |||
| 31 | |||
| "Child Online Privacy Protection" (see [[Cfg:GetRegionCanadaUSA|CFG:IsCoppacsSupported]]) | |||
|} | |||
===Parental Control Settings Block 0x000C0002=== | |||
{| class="wikitable" border="1" | |||
|- | |||
! Offset | |||
! Size | |||
! Description | |||
|- | |||
| 0x0000 | |||
| 0x0001 | |||
| Boolean, whether an e-Mail has been registered | |||
|- | |||
| 0x0001 | |||
| 0x0101 | |||
| Registered e-Mail address (Plaintext) | |||
|- | |||
| 0x0102 | |||
| 0x0068 | |||
| Custom Secret Question (UTF-16) | |||
|} | |} | ||