Skip to content

FORMAT: .T

TheStolenBattenberg edited this page Dec 5, 2020 · 1 revision

.T File Format

T Files are the primary archive format for early From Software games on the PS1. They are composed of two simple sections; a header and a binary dump.

Sections are in the order they appear unless it is stated otherwise.

Header:

struct Header {
    unsigned short numOffset;
    unsigned short offsetTable[];
    unsigned short endOfFile;
};

The length of 'offsetTable[]' is dynamic, and equal to 'numOffset'.

In order to use the offsets, you will need to multiply them by 2,048 in order to get an actual offset into the binary dump.

Be weary! 'numOffset' is not equal to the number of files present in a T file - there may be duplicate offsets that you must to remove while unpacking and restore while repacking.

Binary Dump:
The binary dump is the content of each file packed into a T file one after the other. Each files data is padded to the next nearest multiple of 2,048.

A files data usually ends with a simple checksum, but this may not be the case for some file types such as .VB