Introduction
An Oric .tap file holds the bytes of a cassette tape made by an Oric-1 or an
Oric Atmos: what the computer’s tape routines read once the sound has been turned back into
bytes. A tape can hold one file or many, one after another: a BASIC program, a machine-code
program, or a screen or data block.
Each file is a run of 16 bytes (the leader), the byte 24 (the
sync), a 9-byte header, the file name ending in a zero byte, and the data. The header says
what kind of file it is, whether to run it after loading, and where in memory the data goes.
Unlike nearly everything else on a 6502 machine, its addresses are stored with the high byte
first. The Oric’s processor is a 6502; the data of a machine-code file is its instructions.
The extension .tap is shared with two unrelated formats, the
ZX Spectrum tape and the
Commodore raw-pulse tape; see
all the .tap variations. A file is an Oric tape when it
contains the bytes 16 16 16 24.
A .tap file dropped on any page of this site opens in the explorer. It lists every
file on the tape, decodes each header, lists BASIC programs with the Oric BASIC keywords, and
disassembles machine code from its start address with the 6502 decoder, naming the VIA
registers and the hardware vectors. A Processor option changes the decoder.
Structure
0Leader: at least three16bytesvariesnSync:241 byten+1Header: reserved, type, autorun, end address, start address, reserved9 bytesn+10Name: up to 16 characters and a001 to 17 bytes…Data: end address minus start address bytesvaries
A BASIC file’s data is a program of tokenised lines; a machine-code file’s data goes at the start address, and the processor is told where the hardware is.
Variants
- ZX Spectrum tape image – blocks of a 2-byte length, a flag, the contents and an XOR checksum
- Oric tape image – the bytes of an Oric-1 or Atmos cassette: leader, sync, a 9-byte header, the name and the data
- Commodore raw-pulse tape image – the lengths of the pulses on a C64, VIC-20 or C16 tape
Links
Software
- Oricutron – Oric-1, Atmos, Telestrat and Pravetz emulator that loads tape images (Windows, macOS, Linux)
Not described
Header and data are described from the format as emulators read it and from one real tape; see the data page for what that tape settles and what it does not.
Known, not yet covered
- Reference: the sound encoding of the tape (the tones the bytes are turned into) is not stored in a
.tapfile and is not described. - Viewer: machine code is decoded at every byte rather than followed from the start address; HIRES and text screens are shown as bytes, not as pictures. The Oric ROM routines and the page 2 system variables are not named in the code.
Unknown
- Reference: the file types other than
00(BASIC) and80(machine code), the full set of autorun values, and the purpose of the three reserved header bytes (FF FFandFFon the BASIC file of the real tape, zeros on its machine-code files). No source on this Mac documents them. - Reference: whether the keyword tokens of the Oric-1’s ROM 1.0 equal those of ROM 1.1; only ROM 1.1 was available to check.
- Reference: whether the end address of every tool is one past the last byte. It is on the real tape checked; see the data page.