Table of Contents
Ep128emu's TAP is a 1-to-8 bit sampling of an audio tape that usually has the file extension .tap
.
There are two versions of the file format; the second adds a sequence of bookmarks into the sampled data.
Version 1
The first version of the file format has no header; it is simply a capture of the tape's audio level at 1-bit precision and a sampling rate of 24,000 Hz.
Detection
A parsing of the audio stream to look for Enterprise-format tape data is required.
Reconstruction
Output each bit of the file as an audio level for 1/24000ths of a second; in each byte output the MSB first and proceed downward.
Version 2
The second version adds a 4096-byte header, comprised of:
- the 8-byte signature
0x02, 0x75, 0xCD, 0x72, 0x1C, 0x44 0x51, 0x26
; - a four-byte number indicating the capture precision: 1-bit, 2-bit, 4-bit or 8-bit;
- a four-byte number indicating the capture frequency; and
- up to 1020 bookmarks — each is a 4-byte quantity indicating an offsets in samples. Bookmarks have no additional metadata associated with them. Unused slots are filled with
0xffffffff
.
Detection
The 8-byte signature plus the limited number of possibilities in the capture precision that effectively provide at least another three bytes of signature can be used to detect an ep128emu tape file.
Reconstruction
Starting at file position 4096, output each group of 1, 2, 4 or 8 bits as an audio level, taking bits from each byte MSB first and reconstructing multibit quantities MSB first. Output each level for the amount of time implied by the sampling frequency.