Byte 0x07 is stated as Unknown, always 0xF0 except for root folder where it is 0x00. In my testing, I have found that for the root entry, this is actually the first little-endian byte of a UInt16 (combined with byte 0x06) that represents the number of entries. The file that I tested had a value of 0x01 instead of just 0x00 and the value that was created was the correct number.
Thanks for pointing this out. I've updated the docs, I'll also update my code at some point even though it doesn't break anything for how I use it in this project.
On https://github.com/Deijin27/RanseiLink/wiki/NDS-File-System, there's an issue with the information in the Folder Allocation Table section:
Byte 0x07 is stated as
Unknown, always 0xF0 except for root folder where it is 0x00
. In my testing, I have found that for the root entry, this is actually the first little-endian byte of a UInt16 (combined with byte 0x06) that represents the number of entries. The file that I tested had a value of0x01
instead of just0x00
and the value that was created was the correct number.