After the 12-byte header a UEF file is chunks to the end of the data. Every chunk has the same frame, whatever it holds:
a 16-bit type, a 32-bit length, both little-endian, then length bytes. A chunk
never overlaps the next, so a reader can skip a type it does not know. Numbers written as &0100 are chunk types.
The header is UEF File!, $00, a minor and a major version byte ($0A $00 is 0.10,
the version of the real tape and of the writer in the EmWare emulator).
The chunks the viewer describes
The last column says what each description rests on. Real tape is the tape Test.uef on this
Mac, which has chunks &0000, &0100 and &0110 only. EmWare reader is the tape loader in the source of
the EmWare BBC Micro emulator (tape.c), a program that reads these chunks and plays them, which agrees with
the layout given. Not checked means neither exists on the Mac: the layout is stated from general knowledge
of the specification and the viewer only shows the bytes.
| Type | Name | Contents | Checked against |
|---|---|---|---|
&0000 | Origin information | Text: where the tape came from (the real tape: Created by BeebEm, a zero byte) | Real tape |
&0001 | Game instructions or URL | Text | Not checked |
&0005 | Target machine | One byte naming the machine (and keyboard layout); shown as the byte | Not checked |
&0100 | Implicit start/stop bit tape data block | The data bytes. On the tape each is a start bit, 8 data bits (least significant first) and a stop bit at 1200 baud; the chunk holds the 8 data bits only. These bytes are the cassette blocks. | Real tape, EmWare reader |
&0102 | Explicit tape data block | Data as a stream of bits with the start and stop bits written out; the EmWare reader skips the first byte and plays the rest as bytes. Shown with its length only. | EmWare reader (partly) |
&0104 | Defined tape format data block | Three bytes, the number of data bits, the parity (N, E or O) and the number of stop bits (a negative number is shown with the sign bit, the EmWare reader keeps the low 7 bits), then the data bytes. Read as blocks when it is 8 bits, no parity. | EmWare reader |
&0110 | Carrier tone | A 16-bit count of cycles of the tone (the real tape: 8 chunks) | Real tape, EmWare reader |
&0111 | Carrier tone with dummy byte | Two 16-bit cycle counts: the tone before and after one dummy byte, $AA, sent between them | EmWare reader |
&0112 | Integer gap | A 16-bit count of cycles of silence | EmWare reader |
&0113 | Change of base frequency | A 32-bit IEEE floating-point number: the base frequency in hertz (1200 by default) | EmWare reader |
&0114 | Security cycles | Cycles of a pulse pattern used for tape protection; shown with its length only | Not checked |
&0115 | Phase change | A 16-bit phase in degrees | Not checked |
&0116 | Floating point gap | A 32-bit floating-point number: seconds of silence | EmWare reader |
&0117 | Data encoding format change | A 16-bit baud rate (the EmWare reader uses it as the new rate when it is at least 75) | EmWare reader |
&0120 | Position marker | Text naming a place on the tape | Not checked |
&0130 | Tape set-up | Named in the specification; its contents are not described here, the viewer shows its length | Not checked |
The viewer's description of each chunk is in its own tree node and in the Chunks table of the tape view. The cycle counts are shown as a number of cycles; they are not turned into seconds, because the unit depends on the base frequency and the baud rate in force at that point of the tape, and no tape here changes either.
Where the list ends
Any other type, including &0101, &0103, &0131 and everything from &0200 up (the specification's chunks for disc images, ROM images and machine state), is shown as Chunk type not described with its length and bytes. A tape that has them still opens; the data and tone chunks around them are read as usual. The specification itself is linked from the overview; it was not downloaded, so the names above are not taken from it line by line. Any further type would need the specification or a tape that uses it.