Configuration Memory: Difference between revisions
No edit summary |
|||
(12 intermediate revisions by 6 users not shown) | |||
Line 33: | Line 33: | ||
| 4 | | 4 | ||
|- | |- | ||
| | | ENVINFO | ||
| 0x1FF80014 | | 0x1FF80014 | ||
| 1 | | 1 | ||
|- | |- | ||
| | | 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) | | ? (Set by PTM) Possibe values are 2, 4, 6, 7, 8 and 9 | ||
| 0x1FF81006 | |||
| 1 | |||
|- | |||
| 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 138: | ||
| 1 | | 1 | ||
|- | |- | ||
| | | 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 163: | Line 171: | ||
|} | |} | ||
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 181: | Line 191: | ||
== 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 196: | Line 208: | ||
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. | ||
== | == ENVINFO == | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
! Bit | ! Bit | ||
Line 211: | Line 223: | ||
|} | |} | ||
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" | {| class="wikitable" border="1" | ||
! Value | ! Value | ||
Line 231: | Line 243: | ||
|} | |} | ||
The ARM11 loads | 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. | ||
When this field is zero, bit0 for | 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" | {| class="wikitable" border="1" | ||
! Value | ! Value | ||
Line 278: | Line 290: | ||
== WIFI_MACADDR == | == WIFI_MACADDR == | ||
This is the WiFi MAC address for the 3DS. This is initialized by the [[NWM_Services|NWM]] module | 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 == | == 3D_SLIDERSTATE == | ||
Line 287: | Line 299: | ||
== 3D_LEDSTATE == | == 3D_LEDSTATE == | ||
When non-zero, the 3D LED is disabled. See [[GSPGPU:SetLedForceOff]]. | 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 == | == MENUTID == |