Skip to main content

USB storage

On Spectranext hardware with USB host support, you can connect a USB mass-storage drive to the USB-C port using a suitable USB-C host adapter. FAT and exFAT filesystems are supported. Files can be read and written directly on the drive, without copying them into onboard storage first.

The USB-C port is occupied by the drive while you use it. To manage files from your computer at the same time, use the device web tool over Wi-Fi.

Access the drive from BASIC​

USB is available automatically

The standard overlay filesystem automatically includes a connected USB drive. You do not need to mount or select the drive separately: with the default filesystem selected, %cat lists its files and %tapein "game.tap" can load a TAP from it.

The overlay's mount address is xfs://ram/, despite its name. USB files take priority over onboard files with the same path.

If you want to see only the USB drive's contents, you can optionally mount it separately:

%mount "xfs://usb/"
%cat

The mount command selects a free slot and switches to it automatically. To choose a slot yourself:

%mount 3, "xfs://usb/"
%fs 3
%cat

If slot 3 is already in use, unmount it first with %umount 3.

Load a TAP file using the usual tape input commands:

%tapein "game.tap"
LOAD ""

Replace game.tap with a file on your drive. The mounted drive also supports the usual Spectranet file and directory commands for reading, writing, creating, renaming, and deleting files.

USB files in the default filesystem​

You do not have to mount the drive separately to see its files. The default xfs://ram/ filesystem combines USB storage, temporary RAM files, committed flash files, and bundled system files in one directory tree.

When a USB drive is available:

  • Files on USB take priority over RAM, flash, and bundled files with the same path.
  • New files and uploads to the default filesystem are written to USB. They remain on the drive after power is removed; Commit To Flash is not needed for those files.
  • Removing or ejecting the drive reveals the onboard files underneath it. New files then go to temporary RAM again.

The name xfs://ram/ stays the same whether or not a USB drive is connected. If you want to see only the drive's contents, use xfs://usb/.

See Overlayed Filesystem for the full storage order and commit rules.

Remove the drive safely​

Close files and finish any uploads or other operations before removing the drive. In the device web tool, click USB EJECT and wait for the message that the drive can be removed safely.

If ejection fails because files are still open, close them and try again. After ejecting, unplug and reconnect the drive to use it again.

%umount removes a particular filesystem mount. Use USB EJECT to stop access to the drive across all mounts, including the default overlay.