Every file on an Oric tape starts with the same few bytes. The Oric’s tape routines read a
stream of bytes, so they need to know where the stream of a file begins; the leader and the sync
byte tell them. A .tap file keeps them, because it is that stream.
Leader
A run of bytes 16. The Oric writes many of them before a file, so that the
loader, which may start listening part-way through, has time to line up with the bytes. In a
.tap file the run is of any length, and this page and the explorer take at least
three. The real tape in the Oric emulator’s demo has exactly three before each file.
Sync
The byte 24 after the leader. The first byte that is not 16 must be
24; the header follows it at once. The explorer finds a file by looking for
24 after three or more 16 bytes, and counts the 16 bytes
before it as the leader.
00000000 16 16 16 24 FF FF 00 C7 05 14 05 01 FF 42 4F 4F ...$.........BOO
00000010 54 00 T.
Between files
After a file’s data the next leader may follow at once or after other bytes. On the real tape
there is one byte between the end of one file’s data (as the
end address gives it) and the next leader. The explorer shows bytes between files as bytes
outside any file. A 16 16 16 24 that happens to be inside a file’s data is not a new file,
because the explorer skips the data by its length.