Tape
BlueSCSI can emulate a SCSI sequential access device (tape drive), allowing vintage computers to read and write tape images stored on the SD card.
Setup
Single Tape Image
Place a tape image file on the SD card root with the naming convention:
TP<id>_<blocksize>.<ext>
| Component | Description |
|---|---|
TP |
Device type prefix (case-insensitive) |
<id> |
SCSI ID (0-7) |
<blocksize> |
Block size in bytes (optional, default 512) |
<ext> |
Any file extension (e.g., .img, .tap) |
Examples:
- TP0_512.img - Tape on SCSI ID 0, 512-byte blocks
- TP3.tap - Tape on SCSI ID 3, default block size
Multi-File Tape (Directory-Based)
A directory can represent a tape with multiple file marks. Each file inside the directory is one tape section separated by file marks:
tp0 - my tape/
tape.000
tape.001
tape.002
- The directory name uses the same
TP<id>prefix - Files within the directory are enumerated in lexical order
- Each file boundary acts as a tape file mark
- Reading past a file boundary reports a filemark condition to the host, then automatically loads the next file
Configuration via bluescsi.ini
[SCSI0]
Type = tape
BlockSize = 512
The default SCSI inquiry response identifies as BLUESCSI TAPE. An Apple-specific variant (APPLE_TAPE) is used when Apple quirks are enabled.
Supported SCSI Commands
| Command | Code | Description |
|---|---|---|
| REWIND | 0x01 | Reset tape position to beginning |
| READ BLOCK LIMITS | 0x05 | Report min/max block size |
| READ(6) | 0x08 | Read blocks from tape (fixed or variable length) |
| WRITE(6) | 0x0A | Write blocks to tape (fixed or variable length) |
| WRITE FILEMARKS | 0x10 | Mark file boundary (stub: reports success) |
| SPACE | 0x11 | Move forward/backward by blocks or filemarks |
| VERIFY | 0x13 | Verify blocks (byte compare not supported) |
| ERASE | 0x19 | Erase from current position to end |
| LOCATE(10) | 0x2B | Seek to a specific block position |
| READ POSITION | 0x34 | Report current tape position |
Standard SCSI commands (INQUIRY, MODE SENSE, MODE SELECT, REQUEST SENSE, TEST UNIT READY) are also supported through the common SCSI2SD layer.
Operations Detail
READ
Supports both fixed-length (multiple blocks per transfer) and variable-length (single block) reads. When reading across a file boundary in a multi-file tape, a filemark condition is reported to the host with a CHECK CONDITION status. The sense data info field reports how many blocks were NOT transferred, per SCSI-2 spec. The next read automatically begins from the following file.
WRITE
Writes data at the current tape position. Both fixed and variable-length writes are supported. Advances the tape position after writing. Write-protected tapes return WRITE PROTECTED sense.
SPACE
- Code 0 - Space by blocks: Move forward or backward a specified number of blocks
- Code 1 - Space by filemarks: Returns end-of-data condition
- Code 3 - Space to end-of-data: Returns BLANK CHECK sense
LOCATE / SEEK
Positions the tape to a specific block address. Simulates a 10ms seek delay. Validates the target position against tape capacity.
READ POSITION
Returns a 20-byte response including:
- Beginning-of-partition (BOP) flag when at position 0
- End-of-partition (EOP) flag when past the last block
- Current block position (32-bit, big-endian)
Mode Page 0x10 (Sequential Device Configuration)
Reports density code 0x13 (DAT Data Storage) with a 100ms write delay and auto-generation of end-of-data markers.
Limitations
- WRITE FILEMARKS is a stub - it reports success but does not create actual file mark boundaries in the image
- SPACE by filemarks does not iterate through marks; returns end-of-data
- VERIFY with byte compare is not supported (returns ILLEGAL REQUEST)
- No data compression support
- No partition support (single partition only)
- OMTI compatibility mode forces fixed-block reads/writes regardless of host request
Compatibility
The OMTI tape drive quirk mode is automatically applied for hosts that require it. In this mode, all read and write operations use fixed-block transfers regardless of what the host requests.
This wiki has been updated 927 times by 95 people like you! Click here to edit this page. Generated 2026-03-10