ExeFS: Difference between revisions
mNo edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
ExeFS or Executable Filesystem, is the part of the CXI, which is executed when the CXI is run. | === Overview === | ||
ExeFS or Executable Filesystem, is the part of the CXI, which is executed when the CXI is run. | |||
The ExeFS usually contains one or more of the following files: | |||
* .code Contains the code binary, which can be optionally reverse-LZSS compressed via an exheader flag. | * .code Contains the code binary, which can be optionally reverse-LZSS compressed via an exheader flag. | ||
* [[logo]] Contains distribution licensing Binary data. | * [[logo|.logo]] Contains distribution licensing Binary data. | ||
* [[File Formats|banner]] Contains the banner which homemenu uses for this CXI. | * [[File Formats|.banner]] Contains the banner which homemenu uses for this CXI. | ||
* [[SMDH|icon]] Contains the icon which homemenu displays for this CXI. | * [[SMDH|.icon]] Contains the icon which homemenu displays for this CXI. | ||
=== | === Format === | ||
The ExeFS header is 0x200 bytes long and follows this structure: | The ExeFS header is 0x200 bytes long and follows this simple structure: | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
Line 17: | Line 19: | ||
|- | |- | ||
| 0x00 | | 0x00 | ||
| | | 0x80 | ||
| | | File headers (8 headers maximum, 16 bytes each) | ||
|- | |- | ||
| | | 0x80 | ||
| | | 0x80 | ||
| Reserved | | Reserved | ||
|- | |- | ||
| | | 0x100 | ||
| | | 0x100 | ||
| | | File hashes (8 hashes maximum, 32 bytes each, one for each header) | ||
| | |} | ||
==== File headers ==== | |||
| | There are a maximum of 8 file headers in the ExeFS format, which have the following structure: | ||
{| class="wikitable" border="1" | |||
|- | |- | ||
! START | |||
! SIZE | |||
! DESCRIPTION | |||
|- | |- | ||
| | | 0x0 | ||
| | | 0x8 | ||
| | | File name | ||
|- | |- | ||
| | | 0x8 | ||
| | | 0x4 | ||
| | | File offset | ||
|- | |- | ||
| 0xC | |||
| 0x4 | |||
| File size | |||
|} | |} | ||
==== File hashes ==== | |||
Each file header has a corresponding file hash, which is the SHA256 hash calculated over the entire file contents. | |||
<nowiki>* Offsets are non-inclusive of the header's size(0x200 bytes).</nowiki> | <nowiki>* Offsets are non-inclusive of the header's size(0x200 bytes).</nowiki> |