Difference between revisions of "MCUHWC:ReadRegister"

From 3dbrew
Jump to navigation Jump to search
(Merge this to I2C_Registers)
 
Line 19: Line 19:
  
 
=Registers=
 
=Registers=
{| class="wikitable" border="1"
+
This table has been merged to the [[I2C_Registers#Device_3|I2C Registers]] page.
|-
 
!  ID
 
!  Info
 
!  Description
 
|-
 
| 0x04
 
0x05
 
| size=1, rw
 
| Top/bottom screen flicker
 
|-
 
| 0x08
 
| size=1, ro
 
| Raw 3D slider state
 
|-
 
| 0x09
 
| size=1, ro
 
| Volume slider state (0x00 - 0x3F)
 
This is the same value returned by [[MCUHWC:GetSoundVolume|MCUHWC:GetSoundVolume]]
 
|-
 
| 0x0B
 
| size=1, ro
 
| Battery percentage
 
|-
 
| 0x0D
 
| size=1, ro
 
| System voltage
 
|-
 
| 0x0F
 
| size=1, ro
 
| Flags (it changes when plugging/unplugging charger)
 
|-
 
| 0x20
 
| size=1, wo(?)
 
| MCU power register (0xFF is instant depower, 0x01 is poweroff, 0x02 is reboot)
 
|-
 
| 0x22
 
| size=1, rw
 
| LCD (power?) related register, AND'd with 0x3C
 
|-
 
| 0x27
 
| size=1, ro
 
| Raw volume slider state
 
|-
 
| 0x28
 
| size=1, ro
 
| 3D slider state(?) (0xFF if 3D is not enabled(?))
 
|-
 
| 0x29
 
| size=dynamic(?), rw
 
| Repeat register, any byte written here gets repeated indefinitely(?)
 
|-
 
| 0x2A
 
| size=1, rw
 
| Wifi LED state, non-0 value turns on the Wifi LED, AND'd with 0x0F
 
|-
 
| 0x2B
 
| size=1, rw
 
| Camera LED state, 0, 3, 6-0xF = off, 1 = slowly blinking, 2 = constantly on, 4 = flash once, 5 = delay before changing to 2
 
|-
 
| 0x2C
 
| size=1, rw
 
| 3D LED state, always AND'd with 0x0F
 
|-
 
| 0x2D
 
| size=??, ro(?)
 
| ???
 
|-
 
| 0x30
 
| size=6(?), rw
 
| Hexadecimal RTC (0x30 is seconds, 0x31 is minutes, 0x32 is most likely hours)
 
|-
 
| 0x3D
 
(bugs out reg. 0x3E)
 
| size=2, ro
 
| RTC tick counter (resets to 0 when the seconds increase)
 
|-
 
| 0x3F
 
| size=1, rw
 
| Peripheral power related? bit0 seems to depower everything, and pressing the power key instantly turns the 3DS off
 
|-
 
| 0x46
 
| size=1, ro
 
| Gyro Y(?) axis rotation (0x00 = flat, 0x40 = 3DS standing on right side, 0xBE = 3DS standing on left side)
 
|-
 
| 0x48
 
| size=1, ro
 
| Gyro Z(?) axis rotation (0x00 = flat, 0x40 = 3DS standing vertically, 0xBE = 3DS base is vertically upside-down)
 
|-
 
| 0x4A
 
| size=1, ro
 
| Gyro X(?) axis rotation (0x00 = 3DS standing vertically, 0x40 = face-down flat, 0xBE = flat)
 
|-
 
| 0x4F
 
| size=6(?), ??
 
| ??? (reading past 6th byte is FF-filled)
 
|-
 
| 0x60
 
| size=0x100, ro (first byte is wo)
 
| Looping queue register
 
Writing to first byte resets the queue position to the nth element
 
Reading from this register causes the values to shift up by one byte, and returns read-1 bytes from the bottom of the stack
 
|-
 
| 0x61
 
| size=dynamic(?), rw
 
| Writing to this register pushes values on top of reg. 0x60's stack (most likely in byte order(?))
 
|-
 
| 0x7F
 
| size=19(?), ro(?)
 
| ???
 
byte 06: battery related? (seems to decrase while charging and increase while discharging)
 
 
 
byte 10: power LED related? 0 is off, 1 is red
 
 
 
byte 13: RGB LED red factor
 
 
 
byte 14: RGB LED green factor
 
 
 
byte 15: RGB LED blue factor
 
 
 
byte 17: Wifi LED brightness
 
 
 
byte 18:
 
  bit0: unset while power button is held,
 
  bit1: unset while home button is held,
 
  bit2: unset while Wifi slider is held,
 
  bit4: unset when charger is plugged in,
 
  bit6: unset when charging LED is active
 
 
 
  this byte is reset to 0 before an svcBreak takes effect
 
|}
 

Latest revision as of 02:24, 11 March 2017

Request[edit]

Index Word Description
0 Header code [0x00010082]
1 u8 register
2 size
3 Descriptor for mapping a write-only buffer in the target process
4 data pointer

Response[edit]

Index Word Description
0 Header code
1 Result code

Description[edit]

This is just a wrapper for I2C command 0x001200C2 with DeviceID 3

Registers[edit]

This table has been merged to the I2C Registers page.