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 HTTP(s) 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.
HTTP(s) (Web-Based Filesystem)
HTTP(s) filesystem allows you to mount HTTPS or HTTP URLs as read-only filesystems, enabling access to files hosted on web servers without requiring a dedicated TNFS server. Use HTTPS for public resources; plain HTTP is mainly useful for local testing.
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 local XFS filesystem, 1 is often reserved for loading Spectranext programs from HTTPS, and 3 is preferred for business and general application mounts (TNFS, HTTP(s) 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 HTTP(s) 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 HTTP(s)
Mount an HTTP(s) filesystem to access files from a web server:
%mount "https://example.com/files/"
Parameter:
https://example.com/files/- HTTPS URL pointing to a directory, preferred for public resourceshttp://192.168.1.20:8000/files/- HTTP URL, typically for local testing
The URL should point to a directory on the web server. Files are fetched transparently over HTTP or 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.
HTTP(s)
For directory browsing to work with HTTP(s) filesystems, the web server must provide an index.txt file in each directory you want to browse. See HTTP(s) Filesystem documentation for details on the index.txt format.
Onboard XFS Filesystem
In addition to network filesystems (TNFS/HTTP(s)), 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 Spectranext Browser or SPX command-line tools, 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. Uploaded files are temporary by default; commit selected files or directories to flash when they should survive power loss.
Next Steps
- Navigate Resources - Learn how to browse files using the Index browser
- HTTP(s) Filesystem - Detailed guide to HTTP(s) 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