Line 33: |
Line 33: |
| | 4 | | | 4 |
| |- | | |- |
− | | UNITINFO | + | | ENVINFO |
| | 0x1FF80014 | | | 0x1FF80014 |
| | 1 | | | 1 |
| |- | | |- |
− | | BOOT_FIRM | + | | UNITINFO |
| | 0x1FF80015 | | | 0x1FF80015 |
| | 1 | | | 1 |
Line 47: |
Line 47: |
| | KERNEL_CTRSDKVERSION | | | KERNEL_CTRSDKVERSION |
| | 0x1FF80018 | | | 0x1FF80018 |
| + | | 4 |
| + | |- |
| + | | FIRMLAUNCHFLAGS |
| + | | 0x1FF80020 |
| | 4 | | | 4 |
| |- | | |- |
Line 90: |
Line 94: |
| |} | | |} |
| | | |
− | This memory page is [[Memory_layout|read-only]] for ARM11 processes. This memory and the kernel code for it only exists under NATIVE_FIRM/SAFE_MODE_FIRM. | + | This memory page is mapped as "shared device" (it is thus uncached) and [[Memory_layout|read-only]] for ARM11 processes. This memory and the kernel code for it only exists under NATIVE_FIRM/SAFE_MODE_FIRM. |
| | | |
| The FIRM_* fields are by default identical to the KERNEL_* fields. However, the FIRM_* fields can be overridden via FIRM-launch parameters, see [[FIRM|here]]. | | The FIRM_* fields are by default identical to the KERNEL_* fields. However, the FIRM_* fields can be overridden via FIRM-launch parameters, see [[FIRM|here]]. |
Line 106: |
Line 110: |
| | 4 | | | 4 |
| |- | | |- |
− | | RUNNING_HW (1=product, 2=devboard, 3=debugger, 4=capture) | + | | RUNNING_HW (1=product, 2=devboard, 3=debugger, 4=capture, 5=?) |
| | 0x1FF81004 | | | 0x1FF81004 |
| | 1 | | | 1 |
Line 114: |
Line 118: |
| | 1 | | | 1 |
| |- | | |- |
− | | DATETIME_0 {(u64)MillisecondsSinceFirstJan1900,(u64)SystemTickLastTimeThisWasUpdated,(u32)unk,(u32)unk,(u32)unk,(u32)unk} | + | | DATETIME_0 {(u64)MillisecondsSinceFirstJan1900,(u64)SystemTickLastTimeThisWasUpdated,(u32)unk(set to 0xFFB0FF0 by PTM),(u32)Set to 0 by PTM,(u32)Set to 0 by PTM,(u32)set to 0 by PTM} |
| | 0x1FF81020 | | | 0x1FF81020 |
| | 32 | | | 32 |
Line 130: |
Line 134: |
| | 1 | | | 1 |
| |- | | |- |
− | | WIFI_? Likely wifi hardware related, NWM module initializes this. Regular Old3DS value = 0x00, regular New3DS value = 0x02. | + | | NETWORK_STATE The network state displayed by [[Home Menu]]. 2: Internet, 3/4/6: Local, 7: Disabled, Everything else: Enabled |
| | 0x1FF81067 | | | 0x1FF81067 |
| | 1 | | | 1 |
Line 144: |
Line 148: |
| | BATTERY_LEDSTATE | | | BATTERY_LEDSTATE |
| | 0x1FF81085 | | | 0x1FF81085 |
| + | | 1 |
| + | |- |
| + | | PTM sets bit0 to 1 when it has done writing MCU-originating hw info to [[#RUNNING_HW|RUNNING_HW]], [[#MCU_HW_INFO|MCU_HW_INFO]]. There are no other bits. |
| + | | 0x1FF81086 |
| | 1 | | | 1 |
| |- | | |- |
Line 159: |
Line 167: |
| |} | | |} |
| | | |
− | This memory page is normally read-only for ARM11 processes, write-access is [[Memory_layout|determined]] by the process exheader kernel "shared page writing" flag. This memory only exists under NATIVE_FIRM/SAFE_MODE_FIRM. | + | This memory page is normally read-only for ARM11 processes, write-access is [[Memory_layout|determined]] by the process exheader kernel "shared page writing" flag. It is mapped as "shared device" (it is thus uncached) in both cases. |
| + | |
| + | This memory only exists under NATIVE_FIRM/SAFE_MODE_FIRM. |
| | | |
| = ARM11 Kernel Config Fields = | | = ARM11 Kernel Config Fields = |
Line 177: |
Line 187: |
| == KERNEL_VERSIONMAJOR / FIRM_VERSIONMAJOR == | | == KERNEL_VERSIONMAJOR / FIRM_VERSIONMAJOR == |
| This is the version-major for the currently running [[FIRM]]. | | This is the version-major for the currently running [[FIRM]]. |
| + | |
| + | The kernel initializes KERNEL_VERSIONMAJOR and SYSCOREVER with the same constant value. |
| | | |
| == UPDATEFLAG == | | == UPDATEFLAG == |
Line 192: |
Line 204: |
| Normally this is the same as SYSCOREVER. This used by [[AM:InstallNATIVEFIRM]] for comparing with the NATIVE_FIRM titleID-low. When the low u8 from the NATIVE_FIRM titleID-low is larger than FIRMSYSCOREVER, [[AM:InstallNATIVEFIRM]] will trigger FIRM installing. When that u8 is not larger than FIRM_SYSCOREVER, and these two values don't match, [[AM:InstallNATIVEFIRM]] will return an error. | | Normally this is the same as SYSCOREVER. This used by [[AM:InstallNATIVEFIRM]] for comparing with the NATIVE_FIRM titleID-low. When the low u8 from the NATIVE_FIRM titleID-low is larger than FIRMSYSCOREVER, [[AM:InstallNATIVEFIRM]] will trigger FIRM installing. When that u8 is not larger than FIRM_SYSCOREVER, and these two values don't match, [[AM:InstallNATIVEFIRM]] will return an error. |
| | | |
− | == UNITINFO == | + | == ENVINFO == |
| {| class="wikitable" border="1" | | {| class="wikitable" border="1" |
| ! Bit | | ! Bit |
Line 201: |
Line 213: |
| |- | | |- |
| | 1 | | | 1 |
− | | Set for debug units | + | | IsJtagConnected |
| |- | | |- |
| | 2-7 | | | 2-7 |
Line 207: |
Line 219: |
| |} | | |} |
| | | |
− | Bit1 in this field is set by the ARM11 kernel when ARM debug CP14 DSCR bit14 is set. [[NS]] loads the menu TID from MENUTID when bits 1-7 of this field are clear. [[ErrDisp]] will display development error info when bit0 is clear. | + | Bit1 in this field is set by the ARM11 kernel when ARM debug CP14 DSCR bit14 is set (halting debug-mode enabled). [[NS]] loads the menu TID from MENUTID when bits 1-7 of this field are clear. [[ErrDisp]] will display development error info when bit0 is clear. |
| + | |
| + | == UNITINFO == |
| + | {| class="wikitable" border="1" |
| + | ! Value |
| + | ! Boot Env |
| + | |- |
| + | | 0 |
| + | | Prod |
| + | |- |
| + | | 1 |
| + | | Dev |
| + | |- |
| + | | 2 |
| + | | Debugger |
| + | |- |
| + | | 3 |
| + | | Firm |
| + | |} |
| | | |
− | == 0x1FF80015 ==
| + | The ARM11 loads the value of [[CONFIG_Registers#CFG_UNITINFO|CFG_UNITINFO]] from 0x1FFFFFF0+1 during startup, which is written by the ARM9 during ARM9<>ARM11 kernel sync. |
− | The ARM11 loads this value from 0x1FFFFFF0+1 during startup, which is written by the ARM9 during ARM9<>ARM11 kernel sync. | |
| | | |
− | When this field is zero, bit0 for UNITINFO is set for retail. When this field is non-zero, bit0 for UNITINFO is clear for dev/debug units, and an ARM11 kernel state flag which enables debugging is set. Bit1 means JTAG connected. | + | When this field is zero, bit0 for ENVINFO is set for retail. When this field is non-zero, bit0 for ENVINFO is clear for dev/debug units, and an ARM11 kernel state flag which enables debugging is set. JTAG is only enabled for debugger and "firm" modes (bit1). |
| + | |
| + | == PREV_FIRM == |
| + | {| class="wikitable" border="1" |
| + | ! Value |
| + | ! Description |
| + | |- |
| + | | 0 |
| + | | Cold Boot |
| + | |- |
| + | | 1 |
| + | | Reset from CTR mode |
| + | |- |
| + | | 3 |
| + | | Reset from TWL mode |
| + | |- |
| + | | 5 |
| + | | Reset from NTR mode |
| + | |- |
| + | | 7 |
| + | | Reset from AGB mode |
| + | |} |
| | | |
− | == 0x1FF80016 ==
| |
| The ARM11 loads this value from 0x1FFFFFF0+2 during startup, which is written by the ARM9 during ARM9<>ARM11 kernel sync. | | The ARM11 loads this value from 0x1FFFFFF0+2 during startup, which is written by the ARM9 during ARM9<>ARM11 kernel sync. |
| | | |
Line 236: |
Line 285: |
| = Shared Memory Page Fields = | | = Shared Memory Page Fields = |
| | | |
− | == WIFI_MACADDR == | + | == RUNNING_HW == |
− | This is the WiFi MAC address for the 3DS. This is initialized by the [[NWM_Services|NWM]] module, it's unknown where the MAC address written here was originally loaded from.
| + | Converted from [[#MCU_HW_INFO|MCU_HW_INFO]] (names extracted from TestMenu) by PTM, depending on whether or not the system is a N3DS/N2DS or not: |
− | | |
− | == 3D_SLIDERSTATE ==
| |
− | This float contains the state of the 3D slider. The range of this float is value 0.0f for "off", and 1.0f for max.
| |
− | | |
− | This is written/updated by [[HID_Services|HID]] module.
| |
− | | |
− | == 3D_LEDSTATE ==
| |
− | When non-zero, the 3D LED is disabled. See [[GSPGPU:SetLedForceOff]].
| |
− | | |
− | == MENUTID ==
| |
− | Unknown, contains the menu TID (used by [[NS]])
| |
− | | |
− | == ACTIVEMENUTID ==
| |
− | This contains the titleID of the currently running menu launched by [[NS]].
| |
| | | |
− | = NATIVE_FIRM Versions =
| |
| {| class="wikitable" border="1" | | {| class="wikitable" border="1" |
− | ! System version | + | ! Value |
− | ! old 3DS title version | + | ! Description |
− | ! old 3DS hex title contentID
| |
− | ! Kernel/FIRM version (old 3DS/new 3DS)
| |
| |- | | |- |
− | | [[Factory_Setup|Factory]] FIRM (titleID 00040001-00000002) | + | | 0 |
− | | v0
| + | | Invalid (unknown) |
− | | 00
| |
− | | 2.3-0
| |
| |- | | |- |
− | | [[1.0.0-0|1.0.0]] | + | | 1 |
− | | v432
| + | | PRODUCT |
− | | 00
| |
− | | 2.27-0 | |
| |- | | |- |
− | | [[1.1.0-1|1.1.0]] | + | | 2 |
− | | v1472
| + | | TS_BOARD |
− | | 02 | |
− | | 2.28-0
| |
| |- | | |- |
− | | [[2.0.0-2|2.0.0]] | + | | 3 |
− | | v2516
| + | | KMC_DEBUGGER |
− | | 09
| |
− | | 2.29-7 | |
| |- | | |- |
− | | [[2.1.0-3|2.1.0]] | + | | 4 |
− | | v3553
| + | | KMC_CAPTURE |
− | | 0B
| |
− | | 2.30-18 | |
| |- | | |- |
− | | [[2.2.0-X|2.2.0]] | + | | 5 |
− | | v4595
| + | | IS_DEBUGGER |
− | | 0F
| |
− | | 2.31-40 | |
| |- | | |- |
− | | [[3.0.0-5|3.0.0]] | + | | 6 |
− | | v5647
| + | | SNAKE_PRODUCT |
− | | 18
| |
− | | 2.32-15 | |
| |- | | |- |
− | | [[4.0.0-7|4.0.0]] | + | | 7 |
− | | v6677
| + | | SNAKE_IS_DEBUGGER |
− | | 1D
| |
− | | 2.33-4 | |
| |- | | |- |
− | | [[4.1.0-8|4.1.0]] | + | | 8 |
− | | v7712
| + | | SNAKE_IS_CAPTURE |
− | | 1F
| |
− | | 2.34-0 | |
| |- | | |- |
− | | [[5.0.0-11|5.0.0]] | + | | 9 |
− | | v8758 | + | | SNAKE_KMC_DEBUGGER |
− | | 25
| + | |} |
− | | 2.35-6
| + | |
| + | == MCU_HW_INFO == |
| + | |
| + | Converted to [[#RUNNING_HW|RUNNING_HW]] by PTM. |
| + | |
| + | {| class="wikitable" border="1" |
| + | ! Value |
| + | ! Description |
| |- | | |- |
− | | [[5.1.0-11|5.1.0]] | + | | 0 |
− | | v9792
| + | | PRODUCT |
− | | 26 | |
− | | 2.36-0
| |
| |- | | |- |
− | | [[6.0.0-11|6.0.0]] | + | | 1 |
− | | v10833
| + | | TS_BOARD |
− | | 29
| |
− | | 2.37-0 | |
| |- | | |- |
− | | [[6.1.0-11|6.1.0]] | + | | 2 |
− | | v11872
| + | | KMC_DEBUGGER |
− | | 2A | |
− | | 2.38-0
| |
| |- | | |- |
− | | [[7.0.0-13|7.0.0]] | + | | 4 |
− | | v12916
| + | | KMC_CAPTURE |
− | | 2E | |
− | | 2.39-4
| |
| |- | | |- |
− | | [[7.2.0-17|7.2.0]] | + | | 5 |
− | | v13956
| + | | IS_DEBUGGER |
− | | 30
| |
− | | 2.40-0 | |
| |- | | |- |
− | | [[8.0.0-18|8.0.0]] | + | | 6 |
− | | v15047
| + | | IS_CAPTURE (N3DS only) |
− | | 37
| |
− | | 2.44-6
| |
− | |- | |
− | | [[8.1.0-0_New3DS]]
| |
− | |N/A
| |
− | |N/A
| |
− | | 2.45-5
| |
− | |-
| |
− | | [[9.0.0-20|9.0.0]]
| |
− | | v17120
| |
− | | 38
| |
− | | 2.46-0
| |
− | |-
| |
− | | [[9.3.0-21|9.3.0]]
| |
− | | v18182
| |
− | | 3F
| |
− | | 2.48-3
| |
− | |-
| |
− | | [[9.5.0-22|9.5.0]]
| |
− | | v19216
| |
− | | 40
| |
− | | 2.49-0
| |
− | |-
| |
− | | [[9.6.0-24|9.6.0]]
| |
− | | v20262
| |
− | | 49
| |
− | | 2.50-1
| |
| |} | | |} |
| | | |
− | The above kernel/FIRM versions are in the format: <KERNEL_VERSIONMAJOR>.<KERNEL_VERSIONMINOR>-<KERNEL_VERSIONREVISION>. | + | == WIFI_MACADDR == |
| + | This is the WiFi MAC address for the 3DS. This is initialized by the [[NWM_Services|NWM]] module and is loaded from the WiFi card's EEPROM. |
| + | |
| + | == 3D_SLIDERSTATE == |
| + | This float contains the state of the 3D slider. The range of this float is value 0.0f for "off", and 1.0f for max. |
| + | |
| + | This is written/updated by [[HID_Services|HID]] module. |
| + | |
| + | == 3D_LEDSTATE == |
| + | When non-zero, the 3D LED is disabled. See [[GSPGPU:SetLedForceOff]]. |
| + | |
| + | == BATTERY_LEDSTATE == |
| + | Bit[0] is set when the adapter is connected. Bit[1] is set when the battery is charging. Bit[2:4] is the value of [[PTM:GetBatteryLevel|battery level]]. If the connection bit is set but the charging bit is clear, it means the battery is already fully charged but still with adapter connected. |
| + | |
| + | == MENUTID == |
| + | Unknown, contains the menu TID (used by [[NS]]) |
| + | |
| + | == ACTIVEMENUTID == |
| + | This contains the titleID of the currently running menu launched by [[NS]]. |
| + | |
| + | = NATIVE_FIRM Versions = |
| + | |
| + | See [[FIRM#NATIVE_FIRM|FIRM]]. |