All About YModem

So on the Commander X16, the KERNAL is largely like a regular CBM system, but they removed support for a serial device. They kept IEC support for disk drives and printers, but apparently to make room for FAT support on the SD-card, they decided to remove support for cassette and serial RS-232 devices. That might not be quite accurate, because the system has numerous more ROM banks they could have used - but in any case, X16 BASIC has a lot of enhancements but has no built in device 2 support for serial communication.

Shuffling files through the SD-card is ok - but I still wanted a null-modem wired solution since that system does have a high speed serial expansion card available (a nice 14MHz clocked double 16550 UART with auto-CTS/RTS). I considered XMODEM and KERMIT - but I really wanted a batched set of files (code PRGs + zsm/sprite data files), so that tossed out xmodem. And KERMIT, well, it does a lot more things than just file transfer, and I didn’t want to deal with the 32-bit CRC stuff of ZModem. Plus on a wired (null-modem cable) short-distance connection, I didn’t think file-resume was all that important.

So, I learned towards YModem. And then with an extra multi-day winter break, I dug onto writing my own YModem. The spec wasn’t clear to me initially, so I “reverse engineered it” initially by recording transfers on a HP serial analyzer. But then the spec started to make sense.

Anyway, the result of all this is now this video that’s all about “true YModem” :slight_smile:

YMODEM File Transfer Protocol from 1985 (a deep dive with custom BASIC and C implementations)

My main conclusion is that a lot of confusion about YModem stems from Ward suggesting that the “enhanced variants” of XModem be called YModem (those variants still lacked the concept of a 0-header to pass filenames), whereas “true YModem” was really “YModem Batch.” But all that quickly got overlooked since ZModem, at the time, was altogether superior in every way anyhow.

ZModem is great, but I think there are a couple scenarios where YModem works out better. One being for “low-powered” 8-bits where 32-CRC isn’t all that fun. And the second being variable speed wireless transfers (WiFi Modems), I’ve found the overall throughput of YModem to be far faster than ZModem.

1 Like