A workaround for sending files to the Z80-MBC2

I'm still troubleshooting a file transfer issue between Crostini Linux and the Z80-MBC2. Sending files from Crostini to the Z80 computer via XMODEM times out, but I figured and tested an effective workaround.

The workaround, which works only for ASCII transfers, consists in pasting a text file from the Minicom terminal emulator into an ED session on CP/M, i.e. sending the contents of the file as if they were typed in. Saving ED's buffer makes the file available on CP/M.

More specifically, this sample Minicom session shows the steps I go through for sending the file greet.hex from Crostini to the Z80-MBC2.

Pasting a text file into an ED session from Minicom on Linux to CP/M on the Z80-MBC2.

First off, it's essential to set at least a 5 ms character transmit delay in Minicom's terminal settings, otherwise the board can't keep up with the flow of data. I press the keystrokes ^A T F to execute the command Terminal settings > Character tx delay (ms). I actually changed the Minicom escape from ^A to ^Y, but in the following I'll continue with the default ^A.

Next, at the CP/M prompt I run the ED text editor for creating a new file GREET.HEX to hold the text coming from Crostini:

B>ed greet.hex

After entering insert mode with the i command, ED is ready to accept any characters typed in — or coming through the serial line connected to the terminal.

In Minicom, I proceed to invoke the Paste file command with the keystrokes ^A Y and select greet.hex on the Crostini file system. One by one, the characters of the file appear in ED's buffer. When Minicom completes pasting greet.hex, in ED I execute the commands #w to save the full text and e to exit the editing session.

The file is now available on CP/M. For example, with the standard tool LOAD I can convert GREET.HEX in Intel HEX format to an executable .COM program:

B>load greet.hex

FIRST ADDRESS 0100
LAST  ADDRESS 0121
BYTES READ    0022
RECORDS WRITTEN 01

Finally, the greet.com hello world demo is ready for execution on CP/M:

B>greet
Greetings from Suite8080

This workaround is slower than XMODEM transfers, but still acceptable and practical.

Pasting text files lets me indirectly send arbitrary binary files to CP/M. Executable programs can be converted to HEX format. Other binary, non-excutable files need uuencoding or processing with similar text-encodings.

#z80mbc2 #sbc #CPM

Discuss... Email | Reply @amoroso@fosstodon.org