Changes

1,065 bytes added ,  07:42, 22 April 2023
more bits
Line 6: Line 6:     
== Registers ==
 
== Registers ==
SMC has two types of registers: Read/write and command-based. Read/write registers operate by having the register number written (1 byte), followed by either another written byte, or a 1 byte read. Command-based registers perform their action just by writing the register number (1 byte). When attempting to read a command-based register, it will read as 0xFF. Registers wrap around after 0x7F.
+
SMC has two types of registers: Read/write and command-based. Read/write registers operate by having the register number written (1 byte), followed by either another written byte, or a 1 byte read. Command-based registers perform their action just by writing the register number (1 byte). When attempting to read a command-based register, it will read as 0xFF. Some registers will change themselves to read 0x97 if you attempt to write to them.
    
{| style="border: 1px solid #bbb; border-collapse: collapse; background-color: #eef; padding: 0.2em 0.2em 0.2em 0.2em;" border="1" cellpadding="2"
 
{| style="border: 1px solid #bbb; border-collapse: collapse; background-color: #eef; padding: 0.2em 0.2em 0.2em 0.2em;" border="1" cellpadding="2"
Line 20: Line 20:  
| 0x02 || Command || ODD Eject Request
 
| 0x02 || Command || ODD Eject Request
 
|-
 
|-
| 0x0D || Read/Write? || 00 on power on?
+
| 0x8D || Read/Write? || 00 on power on?
 
|-
 
|-
| 0x0E || Read/Write? || 00 on power on?
+
| 0x8E || Read/Write? || 00 on power on?
 
|-
 
|-
| 0x0F || Read/Write? || 00 on power on?
+
| 0x8F || Read/Write? || 00 on power on?
 
|-
 
|-
 
| 0x10 || Command || ON LED on
 
| 0x10 || Command || ON LED on
Line 64: Line 64:  
| 0x22 || Command || drc_wifi_rst
 
| 0x22 || Command || drc_wifi_rst
 
|-
 
|-
| 0x30 || Read/Write || TimerCounter
+
| 0x30 || Read/Write || TimerCounter, changes to 0x97 on write.
 
|-
 
|-
| 0x31 || ? || ?
+
| 0x31 || ? || ? Changes to 0x97 on write.
 
|-
 
|-
| 0x32 || ? || ?
+
| 0x32 || ? || ? Changes to 0x97 on write.
 
|-
 
|-
 
| 0x40 || Read/Write || ProgramRevision (val: 0xC5)
 
| 0x40 || Read/Write || ProgramRevision (val: 0xC5)
 
|-
 
|-
| 0x41 || Read/Write || SystemEventFlag
+
| 0x41 || Read/Write || SystemEventFlag, read-only
 
|-
 
|-
| 0x42 || Read/Write || ? (val: 0x0B)
+
| 0x42 || Read/Write || ?, read-only (val: 0x0B, 0x0A?)
 
|-
 
|-
 
| 0x43 || Read/Write || USB Power (bitmask; front USB: 0x1, rear USB: 0x2)
 
| 0x43 || Read/Write || USB Power (bitmask; front USB: 0x1, rear USB: 0x2)
 
|-
 
|-
| 0x44 || Read/Write || NotificationLED (val: 0x20)
+
| 0x44 || Read/Write || NotificationLED, current LED state. (bitmask: 0x97?)
 
|-
 
|-
 
| 0x45 || Read/Write || PowerFailureState (val: 0x08)
 
| 0x45 || Read/Write || PowerFailureState (val: 0x08)
 
|-
 
|-
| 0x46 || Read/Write || WifiRstCtrl (val: 0x00)
+
| 0x46 || Read/Write || WifiRstCtrl (val: 0x00), changes to 0x97 on write.
 
|-
 
|-
| 0x47 || Read/Write || ? (val: 0xFF)
+
| 0x47 || Read/Write || ? not writable (val: 0xFF)
 
|-
 
|-
| 0x48 || Read/Write || ? (val: 0x0F)
+
| 0x48 || Read/Write || ? not writable (val: 0x0F)
 
|-
 
|-
| 0x60 || Read/Write || LAPSSetting (val: 0x00)
+
| 0x60 || Read/Write || LAPSSetting (val: 0x00), changes to 0x97 on write.
 
|-
 
|-
| 0x61~0x70 || Read/Write || SystemError (val: 0x00)
+
| 0x61~0x70 || Read/Write || SystemError, read-only (val: 0x00)
 
|-
 
|-
 
| 0x62~0x70 || Read/Write || ? (val: 0x00)
 
| 0x62~0x70 || Read/Write || ? (val: 0x00)
 
|-
 
|-
| 0x71 || Command? || Blinks the drive LED?
+
| 0x71 || Command? || Blinks the drive LED? Causes 0x1C bytes to read as 0xFF.
 +
|-
 +
| 0x72 || Read/Write? || ? (val: 0x00)
 +
|-
 +
| 0x73 || Read/Write? || ? (val: 0x00)
 +
|-
 +
| 0x74 || Read/Write? || ? (val: 0x00)
 +
|-
 +
| 0x75 || Read/Write? || ? (val: 0x00)
 +
|-
 +
| 0x76 || Read/Write? || ? (val: 0x00)
 +
|-
 +
| 0x80~0xFF || Read/Write? || ? (val: 0x00)
 
|-
 
|-
 
|}
 
|}
Line 117: Line 129:  
|-
 
|-
 
| 0x01 || SMC_WAKE1
 
| 0x01 || SMC_WAKE1
 +
|-
 +
|}
 +
 +
=== NotificationLED ===
 +
Kinda bitmaskey but also not really?
 +
 +
{| style="border: 1px solid #bbb; border-collapse: collapse; background-color: #eef; padding: 0.2em 0.2em 0.2em 0.2em;" border="1" cellpadding="2"
 +
|- style="background-color: #ddd;"
 +
! Value
 +
! Name
 +
|-
 +
| 0x97 || Some error condition? Happens if you write 0xFF or 0x00.
 +
|-
 +
| 0x80 || bitmask? sticky
 +
|-
 +
| 0x30 || Blue LED pulse
 +
|-
 +
| 0x20 || Blue LED on
 +
|-
 +
| 0x08 || Red LED on
 +
|-
 +
| 0x03 || Yellow LED pulse
 +
|-
 +
| 0x02 || Yellow LED on
 
|-
 
|-
 
|}
 
|}