POD Files

Overview

Terminal Reality has used .POD files ever since the days of Terminal Velocity. A .POD file is basically a container for other files, much like a ZIP. However, the files in a .POD are not compressed. The .POD format is intended to provide a package of related files. For example, one track could be one .POD.

Version history

POD1 - The first POD version was used in Terminal Velocity, Hellbender, Fury, Monster Truck Madness 1 & 2, and Cart Precision Racing.

EPD - Fly! introduced the "enhanced" pod file format, identified by the .EPD file extension. This file version includes longer file names, and CRCs per file.

POD2 - Nocturne used POD version 2 files. This version of the POD file allowed for filenames of unlimited length, an audit history, and CRCs per file.

POD3 - POD version 3 has little information available about it. However, plans were to remove the CRC over the entire POD, move the file diectory to the end of the POD, and remove the restriction that the file data appear in the same order as the directory, and plans were to add interdependency records so dependent or related POD files are detected and/or mounted.

Version indentification

If the extension is .EPD, then we have an .EPD POD

If the first four bytes of the file are "POD2" or "POD3" then we have that type of POD.

Otherwise, assume a POD1 (legacy) POD.

Conventions

POD writers should adhere strictly to the POD file format. POD readers should allow any POD which it can reasonably process. For example, POD builders should not insert slack or padding space into the POD in any place that is not specfically permitted. However, if there is slack or padding, then a POD reader should allow this.

POD files are stored in binary. All multi-byte fields are stored in Intel (LSB first) order.

A POD file is divided into sections, ie, the header, the directory, the data area, etc. Unless otherwise stated, each section immediately follows the prior section, with no padding or alignment.

Filenames are not to be considered case sensitive.

Duplicate filenames are not permitted.

A POD writer should output the directory in sorted order. However, a POD reader should never assume that the directory is in any particular order.

All strings must be terminated by '\0' characters.

POD1 FORMAT DESCRIPTION

Master layout

Header
Directory
Data

Header format

The POD1 header format exists at byte offset 0 and has the following format:

int n;
char volumeName[80]

n = number of files contained in the POD
volumeName = '\0' terminated descriptive volume name, for user purposes.

Directory structure

Immediately following the header (at byte offset 84) is the directory of the POD. This is a list of fixed sized records of the following format:

char name[32]
int size
int ptr

name = '\0' terminated filename. Max filename length supported is 31 characters.
size = size of the file in bytes.
ptr = absolute file offset of the data in the file.

Data area

The file data is the last section of the POD1 file.