### Working With Aculab Floppy Tapes

The Wafer menu shows all 8 tape drives and what wafer image is inserted in them or `<empty>` if there is none. Any wafer name enclosed in `<< .. >>` is a built-in wafer image. If the name has an asterisk (`*`) before it the wafer has been modified and must exported to be saved. For non-internal wafer images the changes are saved automatically. trs80gp will prompt to save modified wafer images when you try to eject them or exit the emulator.

All built-in wafer images have a short name that starts with a colon. This is displayed in parenthesis on each entry in the "Insert wafer..." menu as a reminder that the short name can be used on the command line to insert the wafer when starting trs80gp.

Each drive has a sub-menu that lets you eject, replace, insert, export to a new file or toggle the write protection of a wafer image. This isn't the read-only flag of the PC file system but an internal one corresponding to the physical write protect sticker on real floppy tapes.

You can also use the Wafer menu to manage files on the image. The menu shows a list of files on the wafer. Selecting one will prompt to save it to your PC. A Delete sub-menu also lists the files and selecting an entry will delete that file from the wafer. Finally, the Import... menu lets you copy files from the PC into the wafer image. Because the Aculab firmware may have a copy of a sector in memory is best to `@LIST` a drive before and after doing any file imports or deletes.

Whenever a wafer is accessed trs80gp will go into turbo mode automatically. This can be enabled or disabled with the Wafer → Auto Turbo menu.

The Wafer → Manual... brings up brief instructions how to activate and use the Aculab Floppy and access the files from within the TRS-80.

#### Internal Wafer Images

Description | Command Line
--- | ---
5 foot (14 sectors) | :a5
10 foot (30 sectors) | :a10
20 foot (64 sectors) | :a20
30 foot (104 sectors) | :a30
50 foot (180 sectors) | :a50
75 foot (252 sectors) | :a75
Maximum (256 sectors) | :amax

#### .tape File Format

Aculab floppy tape wafers are stored in `.tape` format which is designed to hold not only those images but also Exatron Stringy Floppy images and cassette tapes in various formats. It maintains 99% backwards compatibility by putting an identifying trailer at the end of the file. Simple formats such as `.cas` will see the trailer as noise at the end of the tape while others will simply ignore it.

The trailer can be up to 255 bytes long and has the following format:

Size | Type | Description
--- | --- | ---
4 bytes | Magic string | Assist in identifying `.tape` format.
1 byte | Trailer length | Currently 9 bytes. Will be longer if `.tape` format extended.
2 bytes | Trailer checksum | Computed by setting checksum to 0 and for each trailer byte doing `checksum = checksum * 2 + trailer[i];` Stored little-endian and trailer bytes are treated as unsigned.
1 byte | Flags | bit 0 - write protected if set bit 1 - has `.ESF` header bit 2 - Aculab floppy tape
1 byte | Data type | Character indicating the encoding of the data before the trailer. 'w' - waveform (e.g., audio from cassette) 't' - bit level (i.e., `.cas` format) 'p' - pulse (`.cpt` compatible) 'b' - byte stream like bit but without leaders or start bits 'd' - data - high level like sector data or files

trs80gp only creates and understands a specific variant of `.tape` files for Aculab Floppy Tape emulation — flag bit 2 set, data type `'d'` and data consisting of concatenated 256 byte sectors from 0 to the tape size.

When Exatron Stringy Floppy emulation is added to trs80gp it is expected it will be capable of `.esf` wrapping and bit level encoding.