Classic User Guide
Adapted from Guide.
This guide covers the classic Spectranet user flow: first startup, network configuration, filesystem mounting, and the BASIC commands provided by the ROM.
Starting out
On classic hardware the jumper setting depends on the Spectrum model:
- 48K, Spectrum+, 128K with heatsink, and grey +2: remove jumper J3
- +3 and black +2: install jumper J3
128K machines use USR 0 mode for BASIC support. This starts automatically because the BASIC extensions are for the 48K-style editor.
Configuration
The default network configuration uses DHCP. To configure a static address or inspect settings, use:
%ifconfig
The configuration menu is also available from the NMI menu.
Configuring filesystems
Classic Spectranet uses filesystem modules, with TNFS being the usual network filesystem. A filesystem can be mounted with %mount:
%mount 0,"vexed4.alioth.net"
%mount 1,"tnfs://192.168.0.1"
%mount 3,"tnfs://example.com/games"
Automount entries are configured with:
%fsconfig
If a mount hangs because the server is unavailable, BREAK can be used while the ROM is trying to mount it.
Navigating filesystems
%mount <fsnum>,"<url>" mounts a filesystem.
%umount <fsnum> disconnects a filesystem:
%umount 0
%cat "<fsp>" lists a directory:
%cat
%cat "foobar"
%cat "0:/foo/bar/baz"
Paths use / as the separator, with . for the current directory and .. for the parent directory.
%cd "<fsp>" changes directory:
%cd "/"
%cd "games"
%cd "/programs/basic"
%cd ".."
%fs <fsnum> changes the current filesystem:
%fs 1
Reading and saving files
%load "<fsp>" [CODE address] loads a file:
%load "manic"
%load "image" CODE 16384
%load "/foo/bar/baz.zx"
%load ""
%load "" loads the default boot.zx program.
%save "<fsp>" [CODE address,size] saves a file:
%save "program"
%save "image" CODE 16384,6912
%save "program" LINE 1
%aload "<fsp>" CODE address loads raw headerless data:
%aload "machinecode" CODE 32768
%tapein "<fsp>" presents a TAP archive as virtual tape:
%tapein "jsw.tap"
LOAD ""
%loadsnap "<fsp>" loads an SNA snapshot:
%loadsnap "matchday.sna"
Opening files and sockets
ZX BASIC streams can be used for files, directories, and network sockets. A typical file read pattern is:
10 %open #4,"file","r"
20 %oneof 100
30 INPUT #4,a$
40 PRINT a$
50 GO TO 30
100 %close #4
Closing streams is important; open files and sockets use limited Spectranet resources.