INTRO TO THE SPECTRANET

The Spectranet is an ethernet card for the Sinclair Spectrum. It's a bit more than just a simple ethernet card – it contains a small “network operating system”, with a socket library very similar to the BSD socket library you'll find on Unix/Linux, Windows, Mac OS X (and of course BSD) – a network file system, support for BASIC channels and streams, so the BASIC programmer can write networked programs as well as those who know C or assembly language.

The ethernet hardware is based on the Wiznet W5100 chip, a chip that's designed for 8 bit systems – these days, this means microcontrollers and small embedded systems in general, but it also means it's perfect for the Spectrum. It supports both 10baseT and 100baseTX, full and half duplex, and access to the hardware is memory mapped rather than I/O mapped. There's a CPLD (basically, today's ULA) that provides the logic functions – memory management, the I/O ports and execution trapping to automatically map the Spectranet memory into the lower 16K of address space when library calls are made; in the lower 16K, there are four 4K pages. This allows software to provide a system of modules, so that functions of the peripheral can be easily expanded with new pieces of software. The Spectrum can program the firmware itself – the Spectranet ROM is provided by a 128K flash chip, to which the Spectrum has complete read-write access. To allow more space for programmers, there's also 128K of static RAM. Some of this is dedicated to system variables and temporary workspace, but most of it is available for programmers. The printed circuit board itself is a 4 layer board to get the best electrical performance from the CPLD and W5100, and also to keep the size of the card small enough that it's feasable to put the through port on the back of the card, rather than needing a more mechanically complex through port connector like what you may find on the Interface 1 or other similar Spectrum add-on.

In the default Spectranet ROM firmware (basically, the lowest 4 pages of flash), there's a DHCP client, DNS client, the socket library and all the functions to manage the hardware. There's also a utility accessed by the NMI button to configure the system – the usual options, such as IP address, DHCP enable/disable etc., and a utility to load and remove software modules from flash. The utilities are available in English, Spanish and Portuguese – the Spectranet has its own character generator (42 columns) that supports a subset of UTF-8, including all the accented characters used in western Europe, along with some of the symbols, such as the euro sign, and inverted question mark/exclamation marks for the Spanish language.

The Spectranet is also designed to be able to work with some mass storage peripherals. Unfortunately, the Spectrum never had a formal way of managing multiple peripheral ROMs, so it's not possible to make this entirely perfect – but the Spectranet so far has been shown to function well with the DivIDE, and with some ResiDOS peripherals (for ResiDOS, so long as the Spectranet BASIC extensions are disabled; it would be possible to add a ResiDOS module to provide these, since the Spectranet library functions and module entry points remain available). To allow the Spectranet to function with other peripherals that have their own ROM, it contains a 'hold A15' system, which means whenever the Spectranet ROM is paged in, any peripheral on the Spectranet's edge connector sees an address in upper memory rather than in the lower 16K, preventing the other peripheral's ROM from being paged (and a bus collision).

At present, the Spectranet is still under development – the hardware prototypes function well (but there's a couple of small changes needed to the PCB layout) – and there's a lot of software that still needs to be written, in particular 'client' programs, such as a simple FTP client that can download TAP files directly from an ftp server into memory, and perhaps a simple text web browser. Already, work on the network filesystem has progressed to the point where all operations basically work; the network filesystem – TNFS (Tiny Network Filesystem) is a simple UDP based filesystem that's designed to be a better than FTP for long-lasting sessions, but nowhere near as complex as NFS or Windows filesharing – it's also designed to be usable on simpler network hardware and for other 8 bit systems.