Tonight I’m mostly using @shieladixon’s wonderful MIDI interface for RC2014 to take a closer look at how serial Networking is implemented on the SAM Coupé. (TL;DR it’s MIDI).
SAM uses DIN-7 connectors but the sockets are compatible with DIN-5 (MIDI).
The RC2014 MIDI Interface Z80 Framework gives straightforward access to the raw bytes. I’ve noticed that my USB-MIDI adapter (also pictured but not in use here) automatically translates the bytes into “standard” two- or three-byte MIDI messages (usually by injecting extra control bytes in an attempt to try to make musical sense out of non-musical data).
The data structure is similar to how ZX Spectrum BASIC programs are stored. Header bytes give file type and file name etc, the BASIC keywords are tokenised and variable names and values are tacked on at the end.