Changes

693 bytes added ,  02:52, 28 December 2017
document command 0xA
Line 45: Line 45:  
| 0x000A....
 
| 0x000A....
 
| [[1.0.0-0]]
 
| [[1.0.0-0]]
|?
+
| Sets Process9's internal date/time, see below.
 
|-
 
|-
 
| 0x000B0040
 
| 0x000B0040
Line 69: Line 69:  
* Writes value 0x3 to [[CONFIG_Registers|REG_BOOTENV]], and value 0x1 to an u8 state field.
 
* Writes value 0x3 to [[CONFIG_Registers|REG_BOOTENV]], and value 0x1 to an u8 state field.
 
* Uses [[SVC|svcSignalEvent]], then returns.
 
* Uses [[SVC|svcSignalEvent]], then returns.
 +
 +
=Command 0xA=
 +
This takes 3 arguments, which are the following structure packed into 12 bytes (no padding):
 +
s32 year;
 +
s8 month;
 +
s8 day;
 +
s8 day_of_week; // Sunday = 0, up to Saturday = 6
 +
s8 hour;
 +
s8 minute;
 +
s8 second;
 +
s16 ms;
 +
This should be the current date/time (AgbBg seems to get it from MCU); it's converted from this structure into milliseconds, and saved into .data. Another .data variable is set from svcGetSystemTick by this command, and another function in (LGY) P9 essentially does <code>return date_time_set_from_this_command + ticks_to_ms(svcGetSystemTick() - systemtick_from_this_command);</code> to get the current date&time.
39

edits