Skip to content

Commit d494335

Browse files
Merge pull request #57 from DerfJagged/master
Add SMC commands 0x04 / 0x85
2 parents f282164 + d980d7d commit d494335

File tree

3 files changed

+47
-16
lines changed

3 files changed

+47
-16
lines changed

docs/Hardware/Console/SMC.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -51,27 +51,27 @@ int smc_read_reply(void *msg)
5151

5252
## Command Messages
5353

54-
| ID | Len | Example | Purpose |
55-
| ------------------------------------ | ------- | ---------------------------------------------------------- | -------------------------- |
56-
| [0x82](SMC_Command_0x82.md) | 2-3 | "\\x82\\0x04\\0x31\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0" | set standby/power |
57-
| 0x85 | ? | ? | set real time clock |
58-
| 0x88 | ? | ? | set fan algorithm |
59-
| 0x89 | ? | ? | set fan speed (cpu/gpu?) |
60-
| 0x8b | ? | "\\x8b\\0x62\\0x00\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0" | set dvd tray |
61-
| 0x8c | 3 | "\\x8c\\0x01\\0x00\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0" | set power led |
62-
| 0x8d | 2 | "\\x8d\\0x01\\0x00\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0" | set audio mute |
63-
| 0x94 | ? | ? | set fan speed (cpu/gpu?) |
64-
| 0x95 | ? | ? | set ir address |
65-
| 0x98 | 1 | "\\x98\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0" | set dvd tray secure |
66-
| 0x99 | 3 | "\\x99\\0x01\\0x0f\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0" | set ring of light |
67-
| 0x9a | ? | ? | set rtc wake |
54+
| ID | Len | Example | Purpose |
55+
| ------------------------------------ | ------- | ------------------------------------------------------------- | -------------------------- |
56+
| [0x82](SMC_Command_0x82.md) | 2-3 | "\\x82\\0x04\\0x31\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0" | set standby/power |
57+
| [0x85](SMC_Command_0x85.md) | 9 | "\\x85\\0x24\\0x27\\0x39\\0x88\\0x20\\0x50\\0x01\\0x00" | set real time clock |
58+
| 0x88 | ? | ? | set fan algorithm |
59+
| 0x89 | ? | ? | set fan speed (cpu/gpu?) |
60+
| 0x8b | ? | "\\x8b\\0x62\\0x00\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0" | set dvd tray |
61+
| 0x8c | 3 | "\\x8c\\0x01\\0x00\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0" | set power led |
62+
| 0x8d | 2 | "\\x8d\\0x01\\0x00\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0" | set audio mute |
63+
| 0x94 | ? | ? | set fan speed (cpu/gpu?) |
64+
| 0x95 | ? | ? | set ir address |
65+
| 0x98 | 1 | "\\x98\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0" | set dvd tray secure |
66+
| 0x99 | 3 | "\\x99\\0x01\\0x0f\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0" | set ring of light |
67+
| 0x9a | ? | ? | set rtc wake |
6868

6969
## Query Messages
7070

7171
| ID | Len | Example Query | Example Reply | Purpose |
7272
| ------------------------------------ | -------- | ---------------------------------------------------- | ---------------------------- | ---------------------------- |
73-
| [0x01](SMC_Command_0x01.md) | 1:6 | "\\x01\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0" | `01 12 00 00 00 00` | power on type |
74-
| 0x04 | 1:11 | "\\x04\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0" | `04 602f 212223 01 00000000` | real time clock |
73+
| [0x01](SMC_Command_0x01.md) | 1:6 | "\\x01\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0" | `01 12 00 00 00 00` | power on type |
74+
| [0x04](SMC_Command_0x04.md) | 1:9 | "\\x04\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0" | `04 242739882050 01 00` | real time clock |
7575
| 0x07 | 1:10 | "\\x07\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0" | `07ff 241b 2fa4 2cfa 262c` | read temps |
7676
| 0x0a | 1:2 | "\\x0a\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0" | `0a 60` | request tray state |
7777
| 0x0f | 1:2 | "\\x0f\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0" | `0f 54` | request AV pack type |
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
## Query Real Time Clock
2+
3+
The reply to the SMC command 0x04 will contain big-endian count of miliseconds since `11-15-2001 00:00:00 UTC`, represented in hex. This code is identical to the original Xbox Real Time Clock (RTC) code.
4+
5+
This value wraps around once it reaches `FFFFFFFFFF`, representing `09/17/2036 19:53:47 UTC`.
6+
7+
| | |
8+
| -------- | ------------------- |
9+
| Message: | `04` |
10+
| Reply: | `04 XX XX XX XX XX YY ZZ` |
11+
12+
| | Meaning |
13+
| -- | ----------------------------------- |
14+
| XX | Number of miliseconds since epoch. |
15+
| YY | Boolean; whether time is in sync. |
16+
| ZZ | Unknown; seemingly always 00. |
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
## Set Real Time Clock
2+
3+
This Command Message sets the real time clock to the specified big-endian count of miliseconds since `11-15-2001 00:00:00 UTC`, represented in hex. This code is identical to the original Xbox Real Time Clock (RTC) code.
4+
5+
The maximum value that the clock can be set to is `FFFFFFFFFF`, representing `09/17/2036 19:53:47 UTC`. After this, the clock will wrap around.
6+
7+
| | |
8+
| -------- | ------------------------- |
9+
| Message: | `85 XX XX XX XX XX YY ZZ` |
10+
11+
| | Meaning |
12+
| -- | ----------------------------------- |
13+
| XX | Number of miliseconds since epoch. |
14+
| YY | Boolean; whether time is in sync. |
15+
| ZZ | Unknown; seemingly always 00. |

0 commit comments

Comments
 (0)