Changes

Jump to navigation Jump to search
Add and fix MCU-related battery and voltage info
Line 316: Line 316:  
| s
 
| s
 
| ro
 
| ro
| Battery temperature (in Celcius?)
+
| Internal battery temperature (in Celsius)
 
|-
 
|-
 
| 0x0B
 
| 0x0B
 
| s
 
| s
 
| ro
 
| ro
| Battery percentage
+
| Battery percentage (integer part).
 +
 
 +
Valid values are in range of 0 to 100 inclusive.
 
|-
 
|-
 
| 0x0C
 
| 0x0C
 
| s
 
| s
 
| ro
 
| ro
| Battery percentage, fractional part (seems to have a resolution of around 0.1% according to tests)
+
| Battery percentage (fractional part).
 +
 
 +
Seems to have a resolution of around 0.1% according to tests.
 +
 
 +
To calculate battery charge percentage in full resolution:
 +
MCU[0x0B] + (MCU[0x0C] / 256.0F)
 
|-
 
|-
 
| 0x0D
 
| 0x0D
 
| s
 
| s
 
| ro
 
| ro
| System voltage
+
| System voltage.
 +
 
 +
This voltage seems to be measured at the load side, so the voltage reading will always be lower than direct probes across the battery due to the various voltage drops in the system by the time the voltage is measured.
 +
 
 +
To calculate system voltage in Volts:
 +
MCU[0x0D] * 5 / 256.0F
 
|-
 
|-
 
| 0x0E
 
| 0x0E
Line 383: Line 395:  
   bit09: Charger plugged in
 
   bit09: Charger plugged in
 
   bit10: RTC alarm (when some conditions are met it's sent when the current day and month and year matches the current RTC time)
 
   bit10: RTC alarm (when some conditions are met it's sent when the current day and month and year matches the current RTC time)
   bit11: ??? (accelerometer related)
+
   bit11: Accelerometer I2C read/write done [https://github.com/profi200/libn3ds/blob/083c8ffa3f56a49802fa74b6afe45a96820f0439/include/arm11/drivers/mcu_regmap.h#L124]
 
   bit12: HID update
 
   bit12: HID update
 
   bit13: Battery percentage status change (triggered at 10%, 5%, and 0% while discharging)
 
   bit13: Battery percentage status change (triggered at 10%, 5%, and 0% while discharging)
Line 704: Line 716:  
   bytes 6 and 7: Unused
 
   bytes 6 and 7: Unused
 
   bytes 8 to 175: Playtime data for legacy titles
 
   bytes 8 to 175: Playtime data for legacy titles
   bytes 176 to 188: Playtime data
+
   bytes 176 to 188: Temporary playtime data in case console doesn't shut down gracefully, updated every 5 minutes
 
   bytes 188 to 199: Unused
 
   bytes 188 to 199: Unused
 
|-
 
|-
Line 726: Line 738:  
   byte 0x01: PMIC vendor code
 
   byte 0x01: PMIC vendor code
 
   byte 0x02: Battery vendor code
 
   byte 0x02: Battery vendor code
 +
    0x00: Maxell
 +
      CTR-003 CTR-A-BP (old3DS)
 +
      CTR-003 CTR-A-BPMX-C3 (2DS): Wuxi Hitachi Maxell Co.,Ltd.
 +
      CTR-003 CTR-A-BPMX-C5 (Switch Pro Controller): Wuxi Maxell Co., Ltd.
 +
      SPR-003 SPR-A-BPMX-C3 (new3DSXL): Wuxi Hitachi Maxell Co.,Ltd.
 
   byte 0x03: MGIC version (major?)
 
   byte 0x03: MGIC version (major?)
 
   byte 0x04: MGIC version (minor?)
 
   byte 0x04: MGIC version (minor?)
 
   byte 0x05: RCOMP(?)
 
   byte 0x05: RCOMP(?)
   byte 0x06: battery related? (seems to decrease while charging and increase while discharging)
+
   byte 0x06: Battery middle terminal NTC reading (more heat causes this value to go *down*, and cooling off will make this value go back up)
 
   byte 0x09: system model (see [[Cfg:GetSystemModel#System_Model_Values|Cfg:GetSystemModel]] for values)
 
   byte 0x09: system model (see [[Cfg:GetSystemModel#System_Model_Values|Cfg:GetSystemModel]] for values)
 
   byte 0x0A: Red Power LED mode (0 = off, 1 = on)
 
   byte 0x0A: Red Power LED mode (0 = off, 1 = on)
Line 834: Line 851:  
| Controller ID
 
| Controller ID
 
|  
 
|  
| Upper 4bits is manufacturer. Lower 4bits is unknown, most likely revision, possibly encoded as a Johnson counter.
+
| Upper 4bits is manufacturer. Lower 4bits is unknown, most likely revision, possibly encoded as a Johnson counter. The fields are encoded this way, most likely for the register checksum feature.
 +
 
 +
Manufacturers:
 +
  - 0x0 - SHARP (LTPS(?) TN), old I2CLCD, found in old3DS (non-XL) only
 +
  - 0x1 - JDI (LTPS IPS), found in select new3DS and new3DSXL consoles
 +
  - 0xC - SHARP (LTPS(?) TN), new I2CLCD
 +
  - 0xE - SHARP (TFT), found in 2DS only
    
Known IDs:
 
Known IDs:
Line 840: Line 863:  
   - 0xC3 - older old3DSXL
 
   - 0xC3 - older old3DSXL
 
   - 0xE1 - 2DS
 
   - 0xE1 - 2DS
 +
    - LQ050B1LW10B
 +
      - LQ = normal TFT
 +
      - 050 = panel 5 inches diagonal
 +
      - B = "other" display format
 +
      - 1 = transmissive (backlight-compatible)
 +
      - L = LVDS
 +
      - W = *unknown coating type*
 +
      - 10 = model number
 +
      - B = *unknown suffix*
 
   - 0x10 - some select new3DS and new3DSXL with IPS screens
 
   - 0x10 - some select new3DS and new3DSXL with IPS screens
 
   - 0x01 - old3DS
 
   - 0x01 - old3DS
  - 0x00 - unknown, gsp compares for this exact Controller ID for an alternate initialization path
+
    - LS035T7LE38P (top screen)
 
+
      - LS = TFT (LTPS or SI-TFT ?)
Manufacturers:
+
      - 035 = panel 3.5 inches diagonal
  - 0xC - SHARP (TN)
+
      - T = "other 16:9" (even though the panel is 16:10 in physical size, or 32:10 in terms of pixel count)
  - 0x1 - JDI (LTPS IPS), found in select new3DS and new3DSXL consoles
+
      - 7 = *unknown backing type*
  - 0xE - unknown, found in 2DS only
+
      - L = LVDS
   - 0x0 - unknown, found in old3DS (non-XL) only
+
      - E = *unknown coating type*
 +
      - 38 = model number
 +
      - P = *unknow suffix*
 +
    - LS030Q7DW48P (bottom screen)
 +
      - LS = TFT (LTPS or SI-TFT ?)
 +
      - 030 = panel 3 inches diagonal
 +
      - Q = QVGA (320x240)
 +
      - 7 = *unknown backing type*
 +
      - D = parallel RGB (unspecified, but it's known to be RGB888 for this display)
 +
      - W = *unknown coating type*
 +
      - 48 = model number
 +
      - P = *unknow suffix*
 +
   - 0x00 - no controller, or dead (I2CLCD always ACKs reads, but returns 00 if dead)
 
|}
 
|}
      
=== Custom registers for controller 0x00 ===
 
=== Custom registers for controller 0x00 ===
Line 1,329: Line 1,372:  
| Firmware image for this chunk, size varies.
 
| Firmware image for this chunk, size varies.
 
| This is used during NFC module startup to upload the firmware image to the NFC controller. This is used repeatedly to upload multiple chunks of the image.
 
| This is used during NFC module startup to upload the firmware image to the NFC controller. This is used repeatedly to upload multiple chunks of the image.
 +
|}
 +
 +
== Device 17 ==
 +
 +
(Stub)
 +
 +
Used by New 3DS for ZL, ZR, C stick
 +
 +
This device do not use registers. After writing the address, read the next several bytes.
 +
 +
{| class="wikitable" border="1"
 +
!  Offset
 +
!  Description
 +
|-
 +
| 0x0
 +
| Fixed 0x80
 +
|-
 +
| 0x1
 +
| Buttons (ZL = 0x4, ZR = 0x2)
 
|}
 
|}
216

edits

Navigation menu