Line 87:
Line 87:
=== Syscall 7A ===
=== Syscall 7A ===
To retrieve these parameters HAI-IOS has an additional syscall in the following format: <code>IOSError syscall_7a(u16 id, void *data, u32 *size)</code>.
To retrieve these parameters HAI-IOS has an additional syscall in the following format: <code>IOSError syscall_7a(u16 id, void *data, u32 *size)</code>.
+
+
== Companion File ==
+
The Companion file usually /shared2/sys/hai/imginf.bin on the slccmpt contains the information about the extends of the nfs files.
+
+
=== Format ===
+
The companion file starts with a 8 byte header, followed by a variable number of extends and ends with a 1 byte footer
+
==== Header ====
+
The companion file starts with a 8 byte header
+
{| class="wikitable"
+
|-
+
! Start
+
! Length
+
! Description
+
! Example
+
|-
+
| 0x00
+
| 4
+
| Number of extends
+
| 1
+
|-
+
| 0x04
+
| 2
+
| Address Base Unit
+
| 13
+
|-
+
| 0x06
+
| 2
+
| Seems to be ignored by HAI-IOS, but had same value as the Address Base Unit
+
| 13
+
|}
+
+
==== Extends ====
+
The header is followed by the Array of Extends
+
The format of one extend is:
+
{| class="wikitable"
+
|-
+
! Start
+
! Length
+
! Description
+
! Example
+
|-
+
| 0x00
+
| 4
+
| Start Address
+
| 0x0000a575
+
|-
+
| 0x04
+
| 4
+
| Length
+
| 0x00000684
+
|}
+
+
==== Footer ====
+
The extends are followed by one byte with varying values, which is also ignored by HAI-IOS