The SAM Coupé was a British 8 bit home computer that was pitched as a successor to the ZX Spectrum, alongside improved graphics and sound and higher processor speed it also had in built support for MIDI and networking. The manual talked up how the SAM was ready to expand and the accompanying image captured my imagination, thinking of all the possibilities this little box had in it.
This diagram seems to suggest the network is a ring network.
25 years later and my Sam Coupe is still yet to connect to a network (or scanner/digitiser, VCR, modem, light pen...) and I thought it was time to do something about that.
There is now an Ethernet networking option available for the Sam Coupe – the Trinity Ethernet Interface from Quazar. If you want to get your Sam Coupe online that's probably a far more sensible option – this is about getting the original hardware to do what it was intended.
The Sam Coupe User Manual mentions the networking capabilities, under a section titled "Edication" (p118) about using the Sam Coupe in an educational network setting.
This setup is a bit different to how we think of networks now, with a single host #0 (teacher) being the controller of the network, broadcasting data to the others to
LOAD. Oddly, after starting talking about networks, over the page (p119) it then starts talking about streams – a related, but separate thing, which allow you to direct output to devices. Maybe this allows you to send data to network stations by doing something like
OPEN #6; "n5" (it doesn't 1)
In the list of BASIC commands (p140) there is a mention of using
DEVICE n<number> to select which network device (computer) to communicate with (
LOAD from or
DEVICE N5 use Network Station 5
The glossary (p153) there is this helpful note –
Network Up to 16 Sam Coupés can be linked in a network, with Channel 0 as the broadcast station and Channels 1 - 15 as personal operator stations.
This gives us a maximum size of the network (16 machines) and that individual machines have their own channel number. But we're none the wiser in how to actually wire multiple machines together – is the network is intended to be set up as a loop (as in the first diagram above) or linear. How are network station numbers assigned?
Finally, the appendix (p171) has a wiring diagram for creating a network cable. Note that MIDI is on the same port, but using different pins.
@chipper:l@ Don't wire your cable like this, kids. I find out later it's upside down.
This is interesting, since it shows that pins 6 & 1
NET- should be joined together, and to the screen – suggesting that these are ground pins. The pins 3 & 7 are also joined together and provide the signal. What isn't clear is what is meant by "FROM NETWORK PLUG" since both sides of this cable are going to be plugged into a Sam (whether in a loop or linear topology).
That's basically it for the User Manual, next up the technical manual.
Unfortunately, there's even less information about the network in the technical manual than in the user manual, with the only useful thing being a pin diagram for the two network ports (shared with MIDI in and out) matching what is in the user manual. The section about MIDI gives the maximum data rate as 31.25Kbaud (MIDI standard) although it's not clear if this also applies to the network – everything else here is about MIDI. There is no information here about voltages, transmission/network protocols, or how to wire the SAMs together.
To support developers in [[ countryRegion ]] I give a [[ localizedDiscount[couponCode] ]]% discount on all books and courses.
[[ activeDiscount.description ]] I'm giving a [[ activeDiscount.discount ]]% discount on all books and courses.
Networking Article by Malcolm Perry, FRED40
Firstly the connecting lead. The handbook (p171) shows a lead that has pins 1&6, 3&7 joined at one end but only pins 6&7 used at the other. This single lead will give data transfer in one direction only.
A clue! P108 vaguely shows the SAMs connected in a closed loop, use a second lead and providing they're connected the right way round so that each SAM has an end that has the pins linked then two way transfer is possible.
This suggests that the machines must be connected in a loop for the network to function. If true that would mean that pin 7 is a passthrough in one direction only (there is no way for data to get back up the line).
Incidentally, the data leaves the SAM via pins 6&7 and receives via pins 1&3. I have not worked out the implications of the same SAM having data fed back into itself by the linking of pins 3&7.
Based on the wiring diagram I though pins 1&6 were just grounded, will need to check this on the machine itself. There seem to be problems with this setup when actually using software that was supposed to support the network, for example –
Unfortunately, a lot of programs seemed to lock up when both leads were connected. I found that many routines trigger the Network output and leave it high. It seems that if pin 3 is taken high then the keyboard is locked out, no doubt to prevent data corruption during network use. However, as pin 3 is connected to pin 7 then when the programs drive an output on network and leave it there things come to a halt and the computer is locked up.
The article has a reply from Colin Macdonald (FRED editor) describing using the network, and potential problems with only two SAMs in a closed loop.
When at SAMCo last Summer, Adrian, Charles and myself did some experimenting and besides having fun we did actually produce some interesting results!
Yes, there does seem to be a problem with two SAM's in a closed loop but we didn't investigate as far as Malcolm as done. We successfully "daisy-chained" four SAMs together with each one being a different station number.
So there is a problem with 2 computers in a loop. This might be a timing problem with data being received back to the originating station too quickly, while it's still broadcasting. Or maybe you don't want a loop at all? The phrase daisy-chained is a bit ambiguous here.
Looking for more info on networking was one of my motivations for extracting all the text from FRED issues, but this was all there was!
The last bit of the puzzle I could find online was on the The Computer Sam Coupe page by Aleš Keprt, which lists some basic technical specifications of the computer. Under Network, the Sam Coupe network is described as "Built-in ZX Network-based serial system, supported by DOS".
The ZX Network was a Sinclair ZX Spectrum networking system, available on the Interface 1. Miles Gordon Technology was founded by former employees of Sinclair Research (Alan Miles & Bruce Gordon) so it wouldn't be too far a stretch that the SAM Coupe networking system was based on this earlier system.
Looking at the ZX Microdrive and ZX Interface 1 Manual there are certainly some similarities, at least in capabilities.
ZX Spectrum Microdrive & Interface 1 Manual cover, you can almost smell the 80s
Chapter 5 has a mention of streams, which sound awfully familiar (p 21 & 22).
The network is covered in Chapter 7, and also sounds very similar to the networking capabilities in the Sam Coupe manual. On the first page (p29) we see the following diagram showing 3 ZX Spectrum computers connected in a line (not a loop!) together.
The accompanying text says
Using the lead supplied with each Interface you can link up as few as two and as many as sixty-four Spectrum computers, as shown below. Note, however, that you and your friends should not form a loop of computers: the computers at each end of the net should never be connected to each other. Each should be left with one net socket free.
So, this network can be up to 64 stations (I wonder if anyone ever managed that!).
The DISCiPLE +D was an improved disk interface for the ZX Spectrum developed by MGT, the same guys behind the SAM Coupe itself. The SAM disk operating system SAMDOS was also based on the DISCiPLE's GDOS: it seems likely at least some ideas for networking would have carried over. The DISCiPLE +D network is ZX NET (Interface compatible).
Looking at the DISCiPLE manual chapter on networking (section 9.1) it says the DISCiPLE is IF1 (ZX NET) compatible, using the standard 64 base stations.
GDOS (DISCiPLE) implements an IF1 compatible network, with some enhancements. Up to 63 Spectrums can be connected together and share their resources (files and printers) simply through a 3.5 mm mono jack cable. Each station is given an unique station number ranging from 1 to 63.
As on the SAM there are roles assigned to these stations, and #0 is broadcast -- although on the SAM the master station was expected to broadcast.
|2-9||Assistants (they load the system file)|
|10-63||Pupils or assistants (pupils do not load the system file)|
The commands used in GDOS for loading and saving over the network are also familiar, although using
d for stations (which is used for disks on the SAM) and
devices for networking loading and saving are included with the filename on SAMDOS.
LOAD d1;"pippo" first load the file, a Basic program in this case SAVE N16 send it to station 16
The GDOS description also mentions being able to get a directory of another stations disk using:
Which (as far as I know) isn't possible in SAMDOS.
I've also discovered -- thanks to this tweet by Peter Fletcher -- that the MIDI ports on the Atari ST were also sometimes used for networking, as in the game MIDI maze. That page mentions that Up to 16 computers can be networked in a "MIDI Ring" by daisy chaining MIDI ports that are built into the Atari ST series. 2
micro:bit Arcade by Martin Fitzpatrick — Tiny games for your BBC micro:bit. This book takes you from the basic principles of programming micro:bit with Python up to creating your own games in 5x5 pixels!
With everything we've read so far, we can be reasonably sure that --
- the network has 16 stations, each with their own channel number
- channel 0 is the broadcast station, 1-15 are the personal operator stations (it's not clear if channel 0 has to be dedicated station, or all operator stations can broadcast)
- there are 2 network ports, and we have a wiring diagram
Superficially the description of the SAM network matches with the ZX Net, aside from the number of stations. But we still don't know if the ZX protocol is actually used, or how the network should be wired together.
Next I'm going to dig into the schematics of the Interface 1, DISCiPLE & Sam Coupe to see if we can settle how the networking works electronically. Once we have that we rig something up to start reading/writing the protocol on the wire.
Continue reading the SAM Coupé Networking series with Network Interface Design