I2C Registers: Difference between revisions

mcu reset Device 3
Free regs Device 3
Line 408: Line 408:
   bit2: reboot (used by mcu sysmodule and LgyBg)
   bit2: reboot (used by mcu sysmodule and LgyBg)
   bit3: used by LgyBg to power off, causes hangs in 3DS-mode
   bit3: used by LgyBg to power off, causes hangs in 3DS-mode
   bit4: an mcu::RTC command uses this, seems to do something with the watchdog
   bit4: used by PTM to signal that sleep mode is about to be entered
Bit 4 sets a bit at a RAM address which seems to control the watcdog timer state, then this bit is immediately unmasked. This field has a bitmask of 0x0F.  
Bit 4 sets a bit at a RAM address which seems to control the watcdog timer state, then this bit is immediately unmasked. This field has a bitmask of 0x0F.  
|-
|-
Line 672: Line 672:
| ds
| ds
| rw
| rw
| Looping queue register
| Free register bank address select
Writing to first byte resets the queue position to the nth element
Selects the index to read from in the free register bank, up to 200 (?). Used with reg 0x61.
Reading from this register causes the values to shift up by `readsize-1`(needs confirmation) bytes after returning `readsize-1` bytes from the top of the stack (first byte is read-only, so is always zero)
 
Reading from this register seem to read N bytes from the bank while incrementing the internal index by the same amount.
 
Byte 0: bit0 = "WirelessDisabled", bit1 = "SoftwareClosed", bit2 = "PowerOffInitiated", bit3 = "LgyNativeResolution", bit4 = "LegacyJumpProhibited"
Byte 1: Legacy LCD data
Bytes 2 and 3: Local Friend Code counter
Bytes 4 and 5: UUID clock sequence
Bytes 6 and 7: Unused
Bytes 8 to 175: Play count data for legacy titles
Bytes 176 to 199: Unused
|-
|-
| 0x61
| 0x61
| ds(0x100)
| ds(0x100)
| rw
| rw
| Writing to this register pushes values on top of register 0x60's stack. Reading from this register doesn't advance the stack.
| Free register bank, data is read from/written to here.
The first byte is used to store flags for managing FIRM/NS state - bit0 = "WirelessDisabled", bit1 = "SoftwareClosed", bit2 = "PowerOffInitiated", bit4 = "LegacyJumpProhibited". This register survives a power-off, but it resides in RAM, so its contents get lost on battery pulls. This register doesn't seem to actually control MCU behaviour by itself, it just seems to be used for storing arbitrary data.
 
Writing to here seems to increment the internal index?
|-
|-
| 0x62 - 0x7E
| 0x62 - 0x7E