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).
Spectranext follows a simple convention: 0 is the default XFS RAM filesystem, 1 is often reserved for loading Spectranext programs from HTTPS, and 3 is preferred for business and general application mounts (TNFS, HTTPS data, external resources). See Filesystem overview: mount points for the full picture.
In Spectranext BASIC, %mount "<url>" is a simplified form that mounts the URL into a free slot and switches %fs to that slot automatically.
This shorthand is not available on the original Spectranet. If you want BASIC compatibility with Spectranet, or you want to choose the mount slot explicitly, use the full form %mount <slot>, "<url>". For manual slot selection, slot 3 is usually the best choice for TNFS and HTTPS data mounts.
Before mounting into a slot, it is best practice to unmount that slot first with %umount <slot>.
Mounting TNFS
From Spectrum BASIC, mount a TNFS filesystem using the %mount command:
%mount "tnfs://tnfs-server.local/"
Or with just the hostname:
%mount "tnfs-server.local"
Parameter:
tnfs://tnfs-server.local/- TNFS server address
Mounting HTTPS
Mount an HTTPS filesystem to access files from a web server:
%mount "https://example.com/files/"
Parameter:
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. When you use the simplified %mount "<url>" form, %fs is already switched to that filesystem.
Listing Files
%cat ; List files on the newly mounted filesystem
Loading Programs
%aload "game.tap" ; Load a program from the newly mounted filesystem
Opening Files
%fopen #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
If you mounted with the simplified form and need to unmount it later, first check which slot you chose or use the full explicit %mount <slot>, "<url>" form from the start.
If you are about to remount a slot, unmount it first and then issue the new %mount.
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 "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