Robert Morrison

Follow @robert on Micro.blog.

Sam Coupé MIDI and Serial Networking

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 Coupé with MIDI cables connected

SAM uses DIN-7 connectors but the sockets are compatible with DIN-5 (MIDI).

RC2014 with MIDI cables connected with a laptop showing a serial terminal window

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).

Screen Shot of serial terminal showing raw data bytes

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.

Screen Shot: hex view of a saved BASIC progam