Second version of my filesystem-archive generator for use with N64 homebrew. Compatible with both windows and *nix.
Option | Params | Required |
---|---|---|
-d | [directory] | yes |
-o | [output file] | yes |
-b | when passed, will byteswap | no |
-g | do not omit debug info | no |
The binary generated by this program has the following format:
Offset | Description |
---|---|
0x00 | "fspack2" string |
0x08 | padding0 |
0x0C | archive size |
0x10 | file count |
0x14 | offset of the hash table |
0x18 | offset table |
0x18 + (file count * 4) | padding1 |
padding1 + 8 | hash table |
hash table + (file count * 8) | padding2 |
padding2 + 4 | archive |
archive + archive size | debug |
To use the output of this program with your homebrew, you can simply link it as you would any binary file, and read from its' location in rom. I suggest caching the header in memory.