Skip to main content

FATB ("BTAF") - File Allocation Table

Author(s): Gonhex
Research: NOCASH

The file allocation table stores offsets to beginning and end of all entries within the file image.

Table of Contents


Data Structure

Section Container

struct ContainerSectionFATB
{
/* 0x0 */ struct NitroSectionHeader sectionHeader;
/* 0x8 */ struct ContainerFATB sectionData;
}; // entry size = sectionHeader.lengthSection
Field NameDescriptionData Type
sectionHeaderHeader of this section. sectionHeader.signature = "BTAF".NitroSectionHeader
sectionDataContent of this section.ContainerFATB

FATB Container

struct ContainerFATB
{
// header
/* 0x0 */ uint16_t numberFiles;
/* 0x2 */ uint16_t reserved;

// data
/* 0x4 */ EntryOffset dataEntries[numberFiles];
}; // entry size = sectionHeader.lengthSection - 0x8
Field NameDescriptionData Type
numberFilesNumber of files stored in this archive.uint16_t
reservedAlways 0.uint16_t
dataEntriesContains offsets to all files managed by this archive.EntryOffset[]

Entry Offset

struct EntryOffset
{
/* 0x0 */ uint32_t offsetBeginning;
/* 0x4 */ uint32_t offsetEnd;
}; // entry size = 0x8
Field NameDescriptionData Type
offsetBeginningOffset to the file within the file image.uint32_t
offsetEndOffset to the end of the file within the file image.uint32_t

Specification

Files