• Please review our updated Terms and Rules here

Kaypro serial data transfer

Diesel419

New Member
Joined
Nov 3, 2024
Messages
4
So I'm fairly new to CP/M so please forgive my ignorance. I have a Kaypro 2X and I know I should be able to transfer simple files over the serial port using a terminal program and pip but I can't get it to work. I try to send a file using from Teraterm, but the Kaypro just sits there, with the drive spinning.

Would anyone be able to give me some guidance on how to do this?
 
Taking a step back from file transfer, are you able to get any form of 2-way communication working between your host and the Kaypro? First thing to do is start a comm program on the Kaypro side and work with things until you can type back and forth. Walking before you try to run and all that sort of thing... PIP is very iffy for binary file transfer. "Back in the day" we converted binary files to raw hex on the sending end, pip-ed them across a serial link and used LOAD.COM on the receiving end to reconstitute the binary.
 
Taking a step back from file transfer, are you able to get any form of 2-way communication working between your host and the Kaypro? First thing to do is start a comm program on the Kaypro side and work with things until you can type back and forth. Walking before you try to run and all that sort of thing... PIP is very iffy for binary file transfer. "Back in the day" we converted binary files to raw hex on the sending end, pip-ed them across a serial link and used LOAD.COM on the receiving end to reconstitute the binary.
So before I went to bed last night I did some experiments. I loaded TERM.COM on the Kaypro and Teraterm on my modern machine (Panasonic CF-31). And if I type for a while on the Teraterm side I will get some random junk on the Kaypro side. Typing on the Kaypro side seemingly does nothing.

I'll be able to do some more experiments after I get home from work today.
I can recommend this Youtube video, appropriately titled "So you have a CP/M machine, how do you get software onto it?" to start with.

PIP can send and receive bytes through the serial port, but it does not configure the port.
Text transfers end with a ^Z, but for binary transfers, you need a proper file transfer protocol, such as XMODEM.
As for this, I have seen that video, and maybe I'll have to watch it again.

Getting XMODEM on the Kaypro 2X is my end goal, I want to get PCGET and PCPUT onto it and I have the .ASM files already provided by deramp (Technically for a Kaypro 10 but I believe it should work with a 2x as well as the machines are very similar.)

I was attempting to follow a video titled "CPM Software Transfer: Where to find it, & how to get into a CP/M computer" by Electrogeek64 on YouTube.
 

Attachments

  • IMG_20241103_205334155.jpg
    IMG_20241103_205334155.jpg
    1.9 MB · Views: 14
A mentioned above, can you get any terminal coms visible and clear between your host and the kaypro? Make sure that's working well before looking at file transfers. If you can't get that to work, one strange thing worth checking is whether both SIO chips are plugged in correctly (The keyboard SIO is or you'd know!). One of my Kaypro 2x's worked fine for lots of tasks but not serial transfers. I happened to notice one of the SIO chips (the one that controls the RS-232) was actually not plugged in correctly (shifted one set of pins over).

If you're doing regular file transfers, I suggest looking to Kermit. For moving files around, short of needing to do whole disks, I've been using kermit server running on an Ubuntu box and kermit on the kaypros with one of these wi-fi modems: https://www.cbmstuff.com/index.php?route=product/product&product_id=113. 19,200 file transfers work well with this setup though any kind of interactive terminal doesn't at that speed, I guess because of the slow screen updates (and I think the device is helping buffer the 19,200 a bit plus adding in network buffering). But this setup should work well serial-to-serial though I never managed better than 9600 kaypro to kaypro with serial.

There is a pre-built Kermit for Kaypro, and even some instructions for building a minimal loader to pull Kermit over, though I didn't try those.

Also check the baud rate you are expecting, and of course crank it down low at first as you test to get things working. I believe the program on the standard kaypro disks that sets the baudrate is called "baudm" (one called "baudP", I believe, sets the printer serial port). Or if you're using KPLUS Roms or Advent Turbo ROM the baud rate can be set there.

I understand the appeal of the nostalgia if you're just trying to see if you can get the serial transfer to work with bare bones utilities, but on a more practical level, using something like a GoTek, to get files over is more practical especially if you're moving lots of files.

Lastly, the "drive just spinning" sounds like the machine is hung up, so maybe something more basic going wrong here.
 
If you're doing regular file transfers, I suggest looking to Kermit. For moving files around, short of needing to do whole disks, I've been using kermit server running on an Ubuntu box and kermit on the kaypros with one of these wi-fi modems: https://www.cbmstuff.com/index.php?route=product/product&product_id=113. 19,200 file transfers work well with this setup though any kind of interactive terminal doesn't at that speed, I guess because of the slow screen updates (and I think the device is helping buffer the 19,200 a bit plus adding in network buffering). But this setup should work well serial-to-serial though I never managed better than 9600 kaypro to kaypro with serial.
And as OP is probably on Windows given the use of TeraTerm, Kermit 95 (the now open source windows version of C-Kermit) would be the thing to use as a kermit server there. And as a bonus, it can do mostly everything TeraTerm can do too.
 
I loaded TERM.COM on the Kaypro and Teraterm on my modern machine (Panasonic CF-31).
And if I type for a while on the Teraterm side I will get some random junk on the Kaypro side. Typing on the Kaypro side seemingly does nothing.
That means you already have a terminal program on both ends, but they do not agree on their configuration. The PC likely sends much faster than the Kaypro expects, causing garbage characters; the Kaypro likely sends much slower than the PC expects, causing a frame error for every character instead.

I don't know how the Kaypro is configured, so I would start by changing the configuration on the PC side. In TeraTerm, disable handshaking, then try various baudrates (300, 1200 and 9600 are reasonable values), both 7 and 8 data bits, no / even / odd parity. One of these combinations should get characters to get through to the other side correctly. Until you get that to work, you don't need to try anything else.

If you have a program to configure the Kaypro, try to set it to 1200 baud, 8 data bits, 1 stop bit, no parity and no handshaking. That combination should work reliably on any machine. Higher baudrates are more problematic.

I've never used Kermit, XMODEM was good enough for my uses and I found it easier to use. YMMV.

As soon as you get any communication to work, you can either follow the video I mentioned, or some other tutorial.
 
So I did some more experiments, and I made some really good progress.
That means you already have a terminal program on both ends, but they do not agree on their configuration. The PC likely sends much faster than the Kaypro expects, causing garbage characters; the Kaypro likely sends much slower than the PC expects, causing a frame error for every character instead.
You were absolutely correct with this, I have now been able to get the two Terminal programs to talk to each other just like normal, typing one one outputs to the other.

If you're doing regular file transfers, I suggest looking to Kermit. For moving files around, short of needing to do whole disks, I've been using kermit server running on an Ubuntu box and kermit on the kaypros with one of these wi-fi modems: https://www.cbmstuff.com/index.php?route=product/product&product_id=113. 19,200 file transfers work well with this setup though any kind of interactive terminal doesn't at that speed, I guess because of the slow screen updates (and I think the device is helping buffer the 19,200 a bit plus adding in network buffering). But this setup should work well serial-to-serial though I never managed better than 9600 kaypro to kaypro with serial.

There is a pre-built Kermit for Kaypro, and even some instructions for building a minimal loader to pull Kermit over, though I didn't try those.

Also check the baud rate you are expecting, and of course crank it down low at first as you test to get things working. I believe the program on the standard kaypro disks that sets the baudrate is called "baudm" (one called "baudP", I believe, sets the printer serial port). Or if you're using KPLUS Roms or Advent Turbo ROM the baud rate can be set there.

I understand the appeal of the nostalgia if you're just trying to see if you can get the serial transfer to work with bare bones utilities, but on a more practical level, using something like a GoTek, to get files over is more practical especially if you're moving lots of files.

Lastly, the "drive just spinning" sounds like the machine is hung up, so maybe something more basic going wrong here.
I've heard of Kermit but hadn't looked into it yet, those Wifi modems do look really neat, I'll keep those in mind.

As for Goteks, I've been planning to put one of those in my other Kaypro, (a normal 2 not a 2x) which has only one working drive.


Finally I should probably have mentioned this earlier, but when I got the .ASM files from deramp for PCGET and PCPUT, it came with instructions to copy over the file using PIP and the RDR device which according to the instructions is the printer serial port on a Kaypro, what would the device name for the modem serial port be as I can't seem to find it in any of the documentation although I may have just missed it.
 
I think the "serial data" port on the 2X is TTY: in CP/M, but that's just from memory. There are STAT commands to list the possible device names, but of course that doesn't tell where they connect.
 
Now that I think about it, I don’t think the Kaypro bios actually supports the serial data port. I think all access is done via direct port statements.

That means RDR, TTY, etc don’t interact with the serial data port.

Search the net for “Addendum to the Kaypro users guide”. My copy dated September 1984 makes the above statement (no bios support).
It actually says “to assign the serial data port to the punch or reader devices you must modify the bios”.
 
Now that I think about it, I don’t think the Kaypro bios actually supports the serial data port. I think all access is done via direct port statements.

That means RDR, TTY, etc don’t interact with the serial data port.

Search the net for “Addendum to the Kaypro users guide”. My copy dated September 1984 makes the above statement (no bios support).
It actually says “to assign the serial data port to the punch or reader devices you must modify the bios”.
I believe that may be for the earlier models, II and IV. I have used redirection on my 2X and have redirected CON: to TTY: and accessed CP/M from the serial port. It appears that CP/M 2.2g (ROM 81-292) only support CRT: and TTY: for CON:, and TTY: is the "serial printer" port. That ROM may only support that one serial port. The universal ROM, 81-478 (CP/M 2.2u), supports more devices and BAT: is the "serial data" port.
 
Now that I think about it, I don’t think the Kaypro bios actually supports the serial data port. I think all access is done via direct port statements.

That means RDR, TTY, etc don’t interact with the serial data port.

Search the net for “Addendum to the Kaypro users guide”. My copy dated September 1984 makes the above statement (no bios support).
It actually says “to assign the serial data port to the punch or reader devices you must modify the bios”.
I'll keep an eye out for that. That info mirrors the previously mentioned install instructions.

I believe that may be for the earlier models, II and IV. I have used redirection on my 2X and have redirected CON: to TTY: and accessed CP/M from the serial port. It appears that CP/M 2.2g (ROM 81-292) only support CRT: and TTY: for CON:, and TTY: is the "serial printer" port. That ROM may only support that one serial port. The universal ROM, 81-478 (CP/M 2.2u), supports more devices and BAT: is the "serial data" port.
I checked my version 2.2u1 and I'm not seeing anything more than CON LST RDR and PUN

Also I won't be able to do any more tests until Thursday evening.
 
I believe that may be for the earlier models, II and IV. I have used redirection on my 2X and have redirected CON: to TTY: and accessed CP/M from the serial port. It appears that CP/M 2.2g (ROM 81-292) only support CRT: and TTY: for CON:, and TTY: is the "serial printer" port. That ROM may only support that one serial port. The universal ROM, 81-478 (CP/M 2.2u), supports more devices and BAT: is the "serial data" port.
Ah, thanks for this.
 
That seems very odd. According to seasip and at least one other source I've seen, BAT: means, "Use the current Reader for console input, and he current List (printer) device as the console output." It's not actually a real device.
BAT: has no special meaning or functionality in CP/M, it is simply one of the 4 possible choices for I/O redirection. What a BIOS chooses to do with that choice is up to the vendor. The output from STAT VAL: shows:

Code:
Iobyte Assign:
CON: = TTY: CRT: BAT: UC1:
RDR: = TTY: PTR: UR1: UR2:
PUN: = TTY: PTP: UP1: UP2:
LST: = TTY: CRT: LPT: UL1:
 
What flavor of serial cable are you using? Regular 25 pin to USB or Null Modem 25 pin to USB?

I have found a zillion CP/M files that I would love to copy over. Even if they don't work, I'm up for the battle.
 
fwiw, I figured out a way to transfer text files from my Kaypro 1 (1986) to a Mac by redirecting the printer output to the serial port, then conencting the serial port via a USB adapter to my Mac. I listen on the Mac side using the "screen" command. I then print from WordStar and it shows up on the Mac side where I can log to disk. Won't help for anything other than text, and is only one direction (Kaypro --> Mac), but it worked for me. I am putting together a video on the process if there is any interest.
 
fwiw, I figured out a way to transfer text files from my Kaypro 1 (1986) to a Mac by redirecting the printer output to the serial port, then conencting the serial port via a USB adapter to my Mac. I listen on the Mac side using the "screen" command. I then print from WordStar and it shows up on the Mac side where I can log to disk. Won't help for anything other than text, and is only one direction (Kaypro --> Mac), but it worked for me. I am putting together a video on the process if there is any interest.
Here is a link to the video for anyone interested:
 
On the Kaypro (4/83) I use a communication/terminal program called ST.COM which handles Xmodem (through the 'block' option file transfer).
You can send and receive (binary) files this way. The menu system is a bit awkward but once known it works fine.
 
Back
Top