Tools for working with magnetic tape devices and analysing SIMH tape fiules. Largely designed around 9-track tapes (for now).
SIMH .tap specs can be found in ./docs.
Magnetic Tape -> SIMH .TAP Image Creator
A command-line tool that copies data from physical magnetic tape SCSI devices to SIMH-compatible tape image files (.tap format).
Features: Multi-threaded and double-buffered reading, automatic tape mark detection, configurable retry logic.
Permissions:
Ideally the tool isn't run as root. For this to happen...
- The user that runs this tool must have access to tape devices. On Linux, you can do this (usually) by adding them to the
tapegroup and logging out/in before running the tool. - The tool will attempt to capture tape-related kernel messages such as medium errors, from
journalctlordmesg. If you do not see any output, either the tape drive is working great, or you must allow the user to see kernel messages. To do so, create the file/etc/sysctl.d/99-dmesg-restrict.confwith the following content:kernel.dmesg_restrict = 0. Runsudo sysctl --systemto immediately apply the changes.
Usage:
# Read from tape device
rtimage /dev/nst0 output.tap
# Read from device shorthand
rtimage nst0 output.tap
# Read from stdin
rtimage - output.tap < raw_tape_data.bin
# With custom retry attempts
rtimage /dev/nst0 output.tap --max-reattempts 200rtimage is heavily based on timage.c by Natalie & Gwyn (gwyn@arl.army.mil).
Tape Image Analyser
A CLI tool for analysing SIMH tape images, providing detailed information about tape structure, record formats, ANSI labels, and data signatures.
This was originally a web app (still exists for now at at https://tapeinfo.tx.au), but it has since been improved and ported into a tool for programmatic use.
Features: Detects SIMH Extended Format markers and class bits, decodes ANSI tape labels, identifies record signatures, and offers configurable output verbosity.
Usage:
# Analyse tape image with default settings
rtinfo mytape.tap
# Show summaries only (minimal output)
rtinfo --summaries-only mytape.tap
# Enable specific previews
rtinfo --show-ascii --show-labels mytape.tap
# Read from stdin
rtinfo - < mytape.tapCLI Options:
--summaries-only: Hide all previews unless explicitly re-enabled.--show-binary/--suppress-binary: Control binary field previews.--show-ascii/--suppress-ascii: Control ASCII/ANSI field previews.--show-labels/--suppress-labels: Control 80-byte label previews.
SIMH Format Library
A shared Rust library providing core functionality for working with SIMH tape image formats. Implements the SIMH Extended Format specification with full support for class bits, metadata markers (tape marks, erase gaps, half-gaps, end-of-medium), and class-aware record framing.
Library Usage:
use rtsimh::SimhTapeWriter;
use std::fs::File;
use std::io::BufWriter;
let file = File::create("output.tap")?;
let mut writer = SimhTapeWriter::new(BufWriter::new(file));
// Write a good data record (class 0)
writer.write_record(b"Hello, tape!")?;
// Write a bad data record (class 8)
writer.write_bad_record(b"Corrupted data")?;
// Write a tape mark
writer.write_tape_mark()?;
// Write end of medium marker
writer.write_end_of_medium()?;# Build all projects
cargo build --release
# Build specific project
cargo build --release -p rtimage
# Run tests
cargo test --workspace