Skip to content
BlueSCSI

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)
&lt;id&gt; SCSI ID (0-7)
&lt;blocksize&gt; Block size in bytes (optional, default 512)
&lt;ext&gt; 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

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

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

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 1050 times by 108 people like you. Edit this page.

Generated 2026-09-03.