In memory of Ben “bushing” Byer, who passed away on Monday, February 8th, 2016.

Changes

Jump to navigation Jump to search
1,399 bytes added ,  02:43, 20 December 2024
no edit summary
Line 372: Line 372:  
| 0x12 || 0x12 || IOSError || UnhandleEvent || IOSEvent event
 
| 0x12 || 0x12 || IOSError || UnhandleEvent || IOSEvent event
 
|-
 
|-
| 0x13 || 0x13 || IOSTimerId || IOS_CreateTimer || IOSTime time_us, IOSTime repeat_time_us, IOSMessageQueueId id, IOSMessage message
+
| 0x13 || 0x13 || IOSTimerId || IOS_CreateTimer || IOSTime time, IOSTime interval, IOSMessageQueueId id, IOSMessage message
 
|-
 
|-
| 0x14 || 0x14 || IOSError || IOS_RestartTimer || IOSTimerId id, IOSTime time_us, IOSTime repeat_time_us
+
| 0x14 || 0x14 || IOSError || IOS_RestartTimer || IOSTimerId id, IOSTime time, IOSTime interval
 
|-
 
|-
 
| 0x15 || 0x15 || IOSError || IOS_StopTimer || IOSTimerId id
 
| 0x15 || 0x15 || IOSError || IOS_StopTimer || IOSTimerId id
Line 380: Line 380:  
| 0x16 || 0x16 || IOSError || IOS_DestroyTimer || IOSTimerId id
 
| 0x16 || 0x16 || IOSError || IOS_DestroyTimer || IOSTimerId id
 
|-
 
|-
| 0x17 || 0x17 || IOSTime || GetUpTimer ||  
+
| 0x17 || 0x17 || IOSTime || [[#GetUpTimer|GetUpTimer]] ||  
 
|-
 
|-
| 0x18 || 0x18 || IOSTime || GetTimer ||
+
| 0x18 || 0x18 || u32 || [[#GetTimer|GetTimer]] ||
 
|-
 
|-
| 0x19 || 0x19 || IOSError || IOS_GetUpTimeStruct ||
+
| 0x19 || 0x19 || IOSError || [[#IOS_GetUpTimeStruct|IOS_GetUpTimeStruct]] || [[#IOSTimeStruct|IOSTimeStruct]] *out
 
|-
 
|-
| 0x1A || 0x1A || IOSError || IOS_GetUpTime64 || u64 *out_buf
+
| 0x1A || 0x1A || IOSError || [[#IOS_GetUpTime64|IOS_GetUpTime64]] || u64 *out
 
|-
 
|-
| 0x1B || 0x1B || IOSError || SetUpTime64 || u64 *in_buf
+
| 0x1B || 0x1B || IOSError || [[#SetRtcTimeStruct|SetRtcTimeStruct]] || [[#IOSTimeStruct|IOSTimeStruct]] *in
 
|-
 
|-
| 0x1C || 0x1C || IOSError || IOS_GetAbsTimeCalendar || void *out_buf
+
| 0x1C || 0x1C || IOSError || [[#IOS_GetAbsTimeCalendar|IOS_GetAbsTimeCalendar]] || [[#IOSTimeCalendar|IOSTimeCalendar]] *out
 
|-
 
|-
| 0x1D || 0x1D || IOSError || IOS_GetAbsTime64 ||  
+
| 0x1D || 0x1D || IOSError || [[#IOS_GetAbsTime64|IOS_GetAbsTime64]] || u64 *out
 
|-
 
|-
| 0x1E || 0x1E || IOSError || IOS_GetAbsTimeStruct ||  
+
| 0x1E || 0x1E || IOSError || [[#IOS_GetAbsTimeStruct|IOS_GetAbsTimeStruct]] || [[#IOSTimeStruct|IOSTimeStruct]] *out
 
|-
 
|-
 
| 0x1F || 0x1F || IOSError || [[#SetProcessPanic|SetProcessPanic]] || IOSProcessId id, u32 flag
 
| 0x1F || 0x1F || IOSError || [[#SetProcessPanic|SetProcessPanic]] || IOSProcessId id, u32 flag
Line 630: Line 630:  
| 0x93 || 0x87 || void || [[#ResetEXI|ResetEXI]] ||
 
| 0x93 || 0x87 || void || [[#ResetEXI|ResetEXI]] ||
 
|}
 
|}
 +
 +
=== GetUpTimer ===
 +
Returns the number of microseconds elapsed since boot as an u32.
 +
 +
=== GetTimer ===
 +
Returns the raw tick count from the [[Hardware/Latte_registers|HW_TIMER]] register.
 +
 +
=== IOS_GetUpTimeStruct ===
 +
Returns the time elapsed since boot in struct format.
 +
 +
=== IOS_GetUpTimeStruct ===
 +
Returns the time elapsed since boot as an u64.
 +
 +
=== SetRtcTimeStruct ===
 +
Sets the time provided by the RTC in struct format.
 +
 +
=== IOS_GetAbsTimeCalendar ===
 +
Returns the absolute time (up time + RTC) in calendar format.
 +
 +
=== IOS_GetAbsTime64 ===
 +
Returns the absolute time (up time + RTC) as an u64.
 +
 +
=== IOS_GetAbsTimeStruct ===
 +
Returns the absolute time (up time + RTC) in struct format.
    
=== SetProcessPanic ===
 
=== SetProcessPanic ===
Line 989: Line 1,013:     
When memory is allocated to a heap, the linked list (terminated using nullptr's) is traversed to find a large enough chunk, chunks are split and back and forward pointers are cleared for the allocated chunk. When a chunk is allocated aligned, a chunk bigger than the needed one may be allocated. Inside this chunk, a second heap chunk is set up in a fashion that the beginning of the memory block described by this "inner" chunk is aligned according to the specified alignment. It's magic is set to 0xBABE0002 and the back pointer is set to the chunk containing it. These inner chunks can not be expanded.
 
When memory is allocated to a heap, the linked list (terminated using nullptr's) is traversed to find a large enough chunk, chunks are split and back and forward pointers are cleared for the allocated chunk. When a chunk is allocated aligned, a chunk bigger than the needed one may be allocated. Inside this chunk, a second heap chunk is set up in a fashion that the beginning of the memory block described by this "inner" chunk is aligned according to the specified alignment. It's magic is set to 0xBABE0002 and the back pointer is set to the chunk containing it. These inner chunks can not be expanded.
 +
 +
== IOSTimeStruct ==
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset || Size || Description
 +
|-
 +
| 0x0 || 0x4 || Microsecond
 +
|-
 +
| 0x4 || 0x4 || Second
 +
|}
 +
 +
== IOSTimeCalendar ==
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset || Size || Description
 +
|-
 +
| 0x0 || 0x4 || Year
 +
|-
 +
| 0x4 || 0x4 || Month
 +
|-
 +
| 0x8 || 0x4 || Day
 +
|-
 +
| 0xC || 0x4 || Hour
 +
|-
 +
| 0x10 || 0x4 || Minute
 +
|-
 +
| 0x14 || 0x4 || Second
 +
|-
 +
| 0x18 || 0x4 || Microsecond
 +
|}
    
== IOSError ==
 
== IOSError ==

Navigation menu