Setting Up Mounts
Spectranext supports multiple filesystem types that can be mounted to access files over the network. You can mount TNFS (Spectranet File System) servers or HTTPS websites as filesystems, allowing you to access remote files directly from your ZX Spectrum.
Supported Filesystem Types
TNFS (Traditional Network Filesystem)
TNFS is a network file system protocol designed for 8-bit systems like the ZX Spectrum. It allows you to access files stored on a computer or server over the network with read/write capabilities.
HTTPS (Web-Based Filesystem)
HTTPS filesystem allows you to mount HTTPS URLs as read-only filesystems, enabling access to files hosted on web servers without requiring a dedicated TNFS server.
Mounting Filesystems
Once your Spectrum is connected to WiFi, you can mount filesystems at any of the 4 available mount points (0-3).
Mounting TNFS
From Spectrum BASIC, mount a TNFS filesystem using the %mount command:
%mount 1, "tnfs://tnfs-server.local/"
Or with just the hostname:
%mount 1, "tnfs-server.local"
Parameters:
1- Mount point (0-3)tnfs://tnfs-server.local/- TNFS server address
Mounting HTTPS
Mount an HTTPS filesystem to access files from a web server:
%mount 1, "https://example.com/files/"
Parameters:
1- Mount point (0-3)https://example.com/files/- HTTPS URL pointing to a directory
The URL should point to a directory on the web server. Files are fetched transparently over HTTPS when accessed.
Using Mounted Filesystems
Once mounted, you can use standard file operations with any mounted filesystem:
Listing Files
%fs 1 ; Switch to mount point 1
%cat ; List files
Loading Programs
%fs 1 ; Switch to mount point 1
%aload "game.tap" ; Load a program
Opening Files
%fs 1
%open #4, "data.bin", "r" ; Open for reading
Switching Between Mount Points
Use %fs to switch between mount points:
%fs 0 ; Switch to mount point 0 (default)
%fs 1 ; Switch to mount point 1
%fs 2 ; Switch to mount point 2
%fs 3 ; Switch to mount point 3
Unmounting
To unmount a filesystem:
%umount 1 ; Unmount mount point 1
Directory Listing Requirements
TNFS
TNFS servers typically provide directory listings automatically. No special configuration needed.
HTTPS
For directory browsing to work with HTTPS filesystems, the web server must provide an index.txt file in each directory you want to browse. See HTTPS Filesystem documentation for details on the index.txt format.
Onboard XFS Filesystem
In addition to network filesystems (TNFS/HTTPS), Spectranext includes an onboard XFS filesystem directly on the cartridge. This provides local storage that doesn't require a network connection. You can upload files directly to the cartridge using the SPX command-line tools or SPX Browser, and then access them from Spectrum programs:
%mount 0, "xfs://ram/"
This makes it easy to transfer files from your computer to the cartridge for local access, without needing a network filesystem server.
Next Steps
- Navigate Resources - Learn how to browse files using the Index browser
- HTTPS Filesystem - Detailed guide to HTTPS filesystem mounting
- Syncing with Computer - Learn how to upload files to the onboard XFS filesystem
- Filesystem Overview - Understand the Virtual File System architecture
- Development: Socket APIs - Create custom network programs